From ff76395f61840c4e89711b31708c58bb9b809b94 Mon Sep 17 00:00:00 2001 From: Kendrick Curtis Date: Fri, 27 Feb 2026 11:41:50 +0000 Subject: [PATCH 1/5] wip xeol --- Dockerfile | 38 +- Makefile | 12 + cmd/eoltest/main.go | 115 + cmd/openssfbuild/main.go | 101 + docs/complexity-reduction-plan.md | 100 + docs/description/description.json | 52 + docs/description/eol_critical.md | 2 + docs/description/eol_high.md | 2 + docs/description/eol_medium.md | 2 + docs/description/eol_minor.md | 2 + docs/xeol-api-verification.md | 32 + docs/xeol-db-overview.md | 38 + go.mod | 91 +- go.sum | 2479 +++- internal/docgen/rule.go | 40 + internal/openssfdb/builder.go | 238 + internal/openssfdb/builder_test.go | 150 + .../malicious/npm/pkg-one/MAL-TEST-0001.json | 46 + .../malicious/pypi/pkg-two/MAL-TEST-0002.json | 39 + internal/openssfdb/writer.go | 29 + internal/tool/eol_scanner.go | 284 + internal/tool/eol_scanner_test.go | 314 + internal/tool/eol_xeol_lib.go | 144 + internal/tool/tool.go | 62 +- internal/tool/tool_test.go | 14 +- internal/tool/xeol_stub.go | 3 + test-cve-2025-55182/.codacyrc.bak | 14 + .../src/javascript/package-lock.json | 84 + .../src/javascript/package.json | 9 + test-eol-project/README.md | 64 + .../node_modules/.bin/blocking-proxy | 1 + test-eol-project/node_modules/.bin/jasmine | 1 + test-eol-project/node_modules/.bin/protractor | 1 + test-eol-project/node_modules/.bin/rimraf | 1 + test-eol-project/node_modules/.bin/semver | 1 + test-eol-project/node_modules/.bin/sshpk-conv | 1 + test-eol-project/node_modules/.bin/sshpk-sign | 1 + .../node_modules/.bin/sshpk-verify | 1 + test-eol-project/node_modules/.bin/uuid | 1 + .../node_modules/.bin/webdriver-manager | 1 + .../node_modules/.package-lock.json | 1547 +++ .../node_modules/@types/q/README.md | 18 + .../node_modules/@types/q/index.d.ts | 360 + .../node_modules/@types/q/package.json | 17 + .../node_modules/@types/q/types-metadata.json | 23 + .../@types/selenium-webdriver/LICENSE | 21 + .../@types/selenium-webdriver/README.md | 15 + .../@types/selenium-webdriver/chrome.d.ts | 360 + .../@types/selenium-webdriver/edge.d.ts | 96 + .../@types/selenium-webdriver/firefox.d.ts | 337 + .../@types/selenium-webdriver/http.d.ts | 159 + .../@types/selenium-webdriver/ie.d.ts | 211 + .../@types/selenium-webdriver/index.d.ts | 4775 +++++++ .../@types/selenium-webdriver/opera.d.ts | 180 + .../@types/selenium-webdriver/package.json | 50 + .../@types/selenium-webdriver/remote.d.ts | 239 + .../@types/selenium-webdriver/safari.d.ts | 90 + .../@types/selenium-webdriver/testing.d.ts | 106 + test-eol-project/node_modules/adm-zip/LICENSE | 21 + .../node_modules/adm-zip/README.md | 87 + .../node_modules/adm-zip/adm-zip.js | 949 ++ .../adm-zip/headers/entryHeader.js | 374 + .../node_modules/adm-zip/headers/index.js | 2 + .../adm-zip/headers/mainHeader.js | 130 + .../node_modules/adm-zip/methods/deflater.js | 33 + .../node_modules/adm-zip/methods/index.js | 3 + .../node_modules/adm-zip/methods/inflater.js | 34 + .../node_modules/adm-zip/methods/zipcrypto.js | 175 + .../node_modules/adm-zip/package.json | 49 + .../node_modules/adm-zip/util/constants.js | 142 + .../node_modules/adm-zip/util/decoder.js | 5 + .../node_modules/adm-zip/util/errors.js | 63 + .../node_modules/adm-zip/util/fattr.js | 76 + .../node_modules/adm-zip/util/index.js | 5 + .../node_modules/adm-zip/util/utils.js | 336 + .../node_modules/adm-zip/zipEntry.js | 405 + .../node_modules/adm-zip/zipFile.js | 446 + .../node_modules/agent-base/.travis.yml | 24 + .../node_modules/agent-base/History.md | 113 + .../node_modules/agent-base/README.md | 145 + .../node_modules/agent-base/index.d.ts | 43 + .../node_modules/agent-base/index.js | 170 + .../node_modules/agent-base/package.json | 37 + .../node_modules/agent-base/patch-core.js | 51 + .../agent-base/test/ssl-cert-snakeoil.key | 15 + .../agent-base/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/agent-base/test/test.js | 728 + .../node_modules/ajv/.tonic_example.js | 20 + test-eol-project/node_modules/ajv/LICENSE | 22 + test-eol-project/node_modules/ajv/README.md | 1505 ++ .../node_modules/ajv/dist/ajv.bundle.js | 7201 ++++++++++ .../node_modules/ajv/dist/ajv.min.js | 3 + .../node_modules/ajv/dist/ajv.min.js.map | 1 + .../node_modules/ajv/lib/ajv.d.ts | 402 + test-eol-project/node_modules/ajv/lib/ajv.js | 506 + .../node_modules/ajv/lib/cache.js | 26 + .../node_modules/ajv/lib/compile/async.js | 90 + .../node_modules/ajv/lib/compile/equal.js | 5 + .../ajv/lib/compile/error_classes.js | 34 + .../node_modules/ajv/lib/compile/formats.js | 142 + .../node_modules/ajv/lib/compile/index.js | 389 + .../node_modules/ajv/lib/compile/resolve.js | 270 + .../node_modules/ajv/lib/compile/rules.js | 66 + .../ajv/lib/compile/schema_obj.js | 9 + .../ajv/lib/compile/ucs2length.js | 20 + .../node_modules/ajv/lib/compile/util.js | 239 + test-eol-project/node_modules/ajv/lib/data.js | 49 + .../node_modules/ajv/lib/definition_schema.js | 37 + .../node_modules/ajv/lib/dot/_limit.jst | 113 + .../node_modules/ajv/lib/dot/_limitItems.jst | 12 + .../node_modules/ajv/lib/dot/_limitLength.jst | 12 + .../ajv/lib/dot/_limitProperties.jst | 12 + .../node_modules/ajv/lib/dot/allOf.jst | 32 + .../node_modules/ajv/lib/dot/anyOf.jst | 46 + .../node_modules/ajv/lib/dot/coerce.def | 51 + .../node_modules/ajv/lib/dot/comment.jst | 9 + .../node_modules/ajv/lib/dot/const.jst | 11 + .../node_modules/ajv/lib/dot/contains.jst | 55 + .../node_modules/ajv/lib/dot/custom.jst | 191 + .../node_modules/ajv/lib/dot/defaults.def | 47 + .../node_modules/ajv/lib/dot/definitions.def | 203 + .../node_modules/ajv/lib/dot/dependencies.jst | 79 + .../node_modules/ajv/lib/dot/enum.jst | 30 + .../node_modules/ajv/lib/dot/errors.def | 194 + .../node_modules/ajv/lib/dot/format.jst | 106 + .../node_modules/ajv/lib/dot/if.jst | 73 + .../node_modules/ajv/lib/dot/items.jst | 98 + .../node_modules/ajv/lib/dot/missing.def | 39 + .../node_modules/ajv/lib/dot/multipleOf.jst | 22 + .../node_modules/ajv/lib/dot/not.jst | 43 + .../node_modules/ajv/lib/dot/oneOf.jst | 54 + .../node_modules/ajv/lib/dot/pattern.jst | 25 + .../node_modules/ajv/lib/dot/properties.jst | 245 + .../ajv/lib/dot/propertyNames.jst | 52 + .../node_modules/ajv/lib/dot/ref.jst | 85 + .../node_modules/ajv/lib/dot/required.jst | 108 + .../node_modules/ajv/lib/dot/uniqueItems.jst | 62 + .../node_modules/ajv/lib/dot/validate.jst | 276 + .../node_modules/ajv/lib/dotjs/README.md | 3 + .../node_modules/ajv/lib/dotjs/_limit.js | 163 + .../node_modules/ajv/lib/dotjs/_limitItems.js | 80 + .../ajv/lib/dotjs/_limitLength.js | 85 + .../ajv/lib/dotjs/_limitProperties.js | 80 + .../node_modules/ajv/lib/dotjs/allOf.js | 42 + .../node_modules/ajv/lib/dotjs/anyOf.js | 73 + .../node_modules/ajv/lib/dotjs/comment.js | 14 + .../node_modules/ajv/lib/dotjs/const.js | 56 + .../node_modules/ajv/lib/dotjs/contains.js | 81 + .../node_modules/ajv/lib/dotjs/custom.js | 228 + .../ajv/lib/dotjs/dependencies.js | 168 + .../node_modules/ajv/lib/dotjs/enum.js | 66 + .../node_modules/ajv/lib/dotjs/format.js | 150 + .../node_modules/ajv/lib/dotjs/if.js | 103 + .../node_modules/ajv/lib/dotjs/index.js | 33 + .../node_modules/ajv/lib/dotjs/items.js | 140 + .../node_modules/ajv/lib/dotjs/multipleOf.js | 80 + .../node_modules/ajv/lib/dotjs/not.js | 84 + .../node_modules/ajv/lib/dotjs/oneOf.js | 73 + .../node_modules/ajv/lib/dotjs/pattern.js | 85 + .../node_modules/ajv/lib/dotjs/properties.js | 335 + .../ajv/lib/dotjs/propertyNames.js | 81 + .../node_modules/ajv/lib/dotjs/ref.js | 124 + .../node_modules/ajv/lib/dotjs/required.js | 270 + .../node_modules/ajv/lib/dotjs/uniqueItems.js | 86 + .../node_modules/ajv/lib/dotjs/validate.js | 482 + .../node_modules/ajv/lib/keyword.js | 146 + .../node_modules/ajv/lib/refs/data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 149 + .../ajv/lib/refs/json-schema-draft-06.json | 154 + .../ajv/lib/refs/json-schema-draft-07.json | 168 + .../ajv/lib/refs/json-schema-secure.json | 94 + .../node_modules/ajv/package.json | 107 + .../node_modules/ajv/scripts/.eslintrc.yml | 3 + .../node_modules/ajv/scripts/bundle.js | 61 + .../node_modules/ajv/scripts/compile-dots.js | 73 + .../node_modules/ajv/scripts/info | 10 + .../node_modules/ajv/scripts/prepare-tests | 12 + .../ajv/scripts/publish-built-version | 32 + .../node_modules/ajv/scripts/travis-gh-pages | 23 + .../node_modules/ansi-regex/index.js | 4 + .../node_modules/ansi-regex/license | 21 + .../node_modules/ansi-regex/package.json | 64 + .../node_modules/ansi-regex/readme.md | 39 + .../node_modules/ansi-styles/index.js | 65 + .../node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../node_modules/array-union/index.js | 6 + .../node_modules/array-union/license | 21 + .../node_modules/array-union/package.json | 40 + .../node_modules/array-union/readme.md | 28 + .../node_modules/array-uniq/index.js | 62 + .../node_modules/array-uniq/license | 21 + .../node_modules/array-uniq/package.json | 37 + .../node_modules/array-uniq/readme.md | 30 + test-eol-project/node_modules/arrify/index.js | 8 + test-eol-project/node_modules/arrify/license | 21 + .../node_modules/arrify/package.json | 33 + .../node_modules/arrify/readme.md | 36 + .../node_modules/asn1/Jenkinsfile | 65 + test-eol-project/node_modules/asn1/LICENSE | 19 + test-eol-project/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 | 31 + .../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 | 23 + .../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 + .../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 | 63 + .../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/aws-sign2/LICENSE | 55 + .../node_modules/aws-sign2/README.md | 4 + .../node_modules/aws-sign2/index.js | 212 + .../node_modules/aws-sign2/package.json | 17 + test-eol-project/node_modules/aws4/LICENSE | 19 + test-eol-project/node_modules/aws4/README.md | 211 + test-eol-project/node_modules/aws4/aws4.js | 383 + test-eol-project/node_modules/aws4/lru.js | 96 + .../node_modules/aws4/package.json | 21 + .../balanced-match/.github/FUNDING.yml | 2 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 97 + .../node_modules/balanced-match/index.js | 62 + .../node_modules/balanced-match/package.json | 48 + .../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 | 15 + .../node_modules/blocking-proxy/.clang-format | 3 + .../node_modules/blocking-proxy/.nvmrc | 1 + .../node_modules/blocking-proxy/LICENSE | 21 + .../node_modules/blocking-proxy/README.md | 90 + .../built/lib/angular_wait_barrier.d.ts | 44 + .../built/lib/angular_wait_barrier.js | 108 + .../built/lib/angular_wait_barrier.js.map | 1 + .../blocking-proxy/built/lib/bin.d.ts | 0 .../blocking-proxy/built/lib/bin.js | 28 + .../blocking-proxy/built/lib/bin.js.map | 1 + .../built/lib/blockingproxy.d.ts | 41 + .../blocking-proxy/built/lib/blockingproxy.js | 119 + .../built/lib/blockingproxy.js.map | 1 + .../blocking-proxy/built/lib/client.d.ts | 20 + .../blocking-proxy/built/lib/client.js | 68 + .../blocking-proxy/built/lib/client.js.map | 1 + .../built/lib/client_scripts/highlight.js | 29 + .../built/lib/client_scripts/wait.js | 180 + .../blocking-proxy/built/lib/config.d.ts | 10 + .../blocking-proxy/built/lib/config.js | 40 + .../blocking-proxy/built/lib/config.js.map | 1 + .../built/lib/highlight_delay_barrier.d.ts | 18 + .../built/lib/highlight_delay_barrier.js | 67 + .../built/lib/highlight_delay_barrier.js.map | 1 + .../blocking-proxy/built/lib/index.d.ts | 2 + .../blocking-proxy/built/lib/index.js | 7 + .../blocking-proxy/built/lib/index.js.map | 1 + .../built/lib/simple_webdriver_client.d.ts | 39 + .../built/lib/simple_webdriver_client.js | 96 + .../built/lib/simple_webdriver_client.js.map | 1 + .../built/lib/webdriver_commands.d.ts | 67 + .../built/lib/webdriver_commands.js | 212 + .../built/lib/webdriver_commands.js.map | 1 + .../built/lib/webdriver_logger.d.ts | 35 + .../built/lib/webdriver_logger.js | 152 + .../built/lib/webdriver_logger.js.map | 1 + .../built/lib/webdriver_proxy.d.ts | 24 + .../built/lib/webdriver_proxy.js | 81 + .../built/lib/webdriver_proxy.js.map | 1 + .../node_modules/blocking-proxy/circle.yml | 29 + .../blocking-proxy/examples/README.md | 22 + .../blocking-proxy/examples/e2e_test.py | 31 + .../blocking-proxy/examples/run_example.sh | 22 + .../node_modules/blocking-proxy/gulpfile.js | 65 + .../node_modules/blocking-proxy/package.json | 73 + .../node_modules/blocking-proxy/tsconfig.json | 24 + .../node_modules/blocking-proxy/tslint.json | 15 + .../node_modules/brace-expansion/LICENSE | 21 + .../node_modules/brace-expansion/README.md | 129 + .../node_modules/brace-expansion/index.js | 201 + .../node_modules/brace-expansion/package.json | 50 + .../node_modules/browserstack/.editorconfig | 11 + .../node_modules/browserstack/.jscsrc | 74 + .../node_modules/browserstack/.jshintrc | 24 + .../node_modules/browserstack/.travis.yml | 4 + .../node_modules/browserstack/LICENSE-MIT.txt | 26 + .../node_modules/browserstack/lib/api.js | 280 + .../browserstack/lib/app-automate.js | 119 + .../node_modules/browserstack/lib/automate.js | 125 + .../browserstack/lib/browserstack.js | 11 + .../node_modules/browserstack/lib/client.js | 94 + .../node_modules/browserstack/lib/extend.js | 7 + .../browserstack/lib/screenshot.js | 48 + .../node_modules/browserstack/package.json | 41 + .../node_modules/browserstack/readme.md | 477 + .../node_modules/browserstack/test/api.js | 352 + .../node_modules/browserstack/test/client.js | 76 + .../browserstack/test/screenshot.js | 95 + .../node_modules/browserstack/test/util.js | 134 + .../node_modules/camelcase/index.d.ts | 63 + .../node_modules/camelcase/index.js | 76 + .../node_modules/camelcase/license | 9 + .../node_modules/camelcase/package.json | 43 + .../node_modules/camelcase/readme.md | 99 + .../node_modules/caseless/LICENSE | 28 + .../node_modules/caseless/README.md | 45 + .../node_modules/caseless/index.js | 67 + .../node_modules/caseless/package.json | 27 + .../node_modules/caseless/test.js | 67 + test-eol-project/node_modules/chalk/index.js | 116 + test-eol-project/node_modules/chalk/license | 21 + .../node_modules/chalk/package.json | 70 + test-eol-project/node_modules/chalk/readme.md | 213 + .../node_modules/cliui/CHANGELOG.md | 76 + .../node_modules/cliui/LICENSE.txt | 14 + test-eol-project/node_modules/cliui/README.md | 115 + test-eol-project/node_modules/cliui/index.js | 354 + .../cliui/node_modules/ansi-regex/index.d.ts | 37 + .../cliui/node_modules/ansi-regex/index.js | 10 + .../cliui/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 55 + .../cliui/node_modules/ansi-regex/readme.md | 78 + .../cliui/node_modules/strip-ansi/index.d.ts | 17 + .../cliui/node_modules/strip-ansi/index.js | 4 + .../cliui/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 54 + .../cliui/node_modules/strip-ansi/readme.md | 46 + .../node_modules/cliui/package.json | 65 + .../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 | 48 + .../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 | 28 + .../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 | 25 + .../node_modules/combined-stream/yarn.lock | 17 + .../node_modules/concat-map/.travis.yml | 4 + .../node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/example/map.js | 6 + .../node_modules/concat-map/index.js | 13 + .../node_modules/concat-map/package.json | 43 + .../node_modules/concat-map/test/map.js | 39 + .../node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 38 + .../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 | 26 + .../node_modules/debug/CHANGELOG.md | 395 + test-eol-project/node_modules/debug/LICENSE | 19 + test-eol-project/node_modules/debug/README.md | 437 + test-eol-project/node_modules/debug/node.js | 1 + .../node_modules/debug/package.json | 51 + .../node_modules/debug/src/browser.js | 180 + .../node_modules/debug/src/common.js | 249 + .../node_modules/debug/src/index.js | 12 + .../node_modules/debug/src/node.js | 177 + .../node_modules/decamelize/index.js | 13 + .../node_modules/decamelize/license | 21 + .../node_modules/decamelize/package.json | 38 + .../node_modules/decamelize/readme.md | 48 + test-eol-project/node_modules/del/index.js | 73 + test-eol-project/node_modules/del/license | 21 + .../node_modules/del/package.json | 61 + test-eol-project/node_modules/del/readme.md | 106 + .../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 | 27 + .../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 | 40 + .../node_modules/ecc-jsbn/test.js | 14 + .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 + .../node_modules/emoji-regex/README.md | 73 + .../node_modules/emoji-regex/es2015/index.js | 6 + .../node_modules/emoji-regex/es2015/text.js | 6 + .../node_modules/emoji-regex/index.d.ts | 23 + .../node_modules/emoji-regex/index.js | 6 + .../node_modules/emoji-regex/package.json | 50 + .../node_modules/emoji-regex/text.js | 6 + .../node_modules/es6-promise/CHANGELOG.md | 155 + .../node_modules/es6-promise/LICENSE | 19 + .../node_modules/es6-promise/README.md | 97 + .../node_modules/es6-promise/auto.js | 4 + .../es6-promise/dist/es6-promise.auto.js | 1176 ++ .../es6-promise/dist/es6-promise.auto.map | 1 + .../es6-promise/dist/es6-promise.auto.min.js | 1 + .../es6-promise/dist/es6-promise.auto.min.map | 1 + .../es6-promise/dist/es6-promise.js | 1174 ++ .../es6-promise/dist/es6-promise.map | 1 + .../es6-promise/dist/es6-promise.min.js | 1 + .../es6-promise/dist/es6-promise.min.map | 1 + .../node_modules/es6-promise/es6-promise.d.ts | 85 + .../es6-promise/lib/es6-promise.auto.js | 3 + .../es6-promise/lib/es6-promise.js | 7 + .../es6-promise/lib/es6-promise/-internal.js | 243 + .../es6-promise/lib/es6-promise/asap.js | 119 + .../es6-promise/lib/es6-promise/enumerator.js | 124 + .../es6-promise/lib/es6-promise/polyfill.js | 35 + .../es6-promise/lib/es6-promise/promise.js | 431 + .../lib/es6-promise/promise/all.js | 52 + .../lib/es6-promise/promise/race.js | 84 + .../lib/es6-promise/promise/reject.js | 46 + .../lib/es6-promise/promise/resolve.js | 48 + .../es6-promise/lib/es6-promise/then.js | 32 + .../es6-promise/lib/es6-promise/utils.js | 21 + .../node_modules/es6-promise/package.json | 78 + .../node_modules/es6-promisify/README.md | 89 + .../es6-promisify/dist/promise.js | 73 + .../es6-promisify/dist/promisify.js | 85 + .../node_modules/es6-promisify/package.json | 41 + .../escape-string-regexp/index.js | 11 + .../node_modules/escape-string-regexp/license | 21 + .../escape-string-regexp/package.json | 41 + .../escape-string-regexp/readme.md | 27 + test-eol-project/node_modules/exit/.jshintrc | 14 + test-eol-project/node_modules/exit/.npmignore | 0 .../node_modules/exit/.travis.yml | 6 + .../node_modules/exit/Gruntfile.js | 48 + .../node_modules/exit/LICENSE-MIT | 22 + test-eol-project/node_modules/exit/README.md | 75 + .../node_modules/exit/lib/exit.js | 41 + .../node_modules/exit/package.json | 47 + .../node_modules/exit/test/exit_test.js | 121 + .../exit/test/fixtures/10-stderr.txt | 10 + .../exit/test/fixtures/10-stdout-stderr.txt | 20 + .../exit/test/fixtures/10-stdout.txt | 10 + .../exit/test/fixtures/100-stderr.txt | 100 + .../exit/test/fixtures/100-stdout-stderr.txt | 200 + .../exit/test/fixtures/100-stdout.txt | 100 + .../exit/test/fixtures/1000-stderr.txt | 1000 ++ .../exit/test/fixtures/1000-stdout-stderr.txt | 2000 +++ .../exit/test/fixtures/1000-stdout.txt | 1000 ++ .../exit/test/fixtures/create-files.sh | 8 + .../exit/test/fixtures/log-broken.js | 23 + .../node_modules/exit/test/fixtures/log.js | 25 + .../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 + test-eol-project/node_modules/extend/LICENSE | 23 + .../node_modules/extend/README.md | 81 + .../node_modules/extend/component.json | 32 + test-eol-project/node_modules/extend/index.js | 117 + .../node_modules/extend/package.json | 42 + .../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 | 14 + .../node_modules/fast-deep-equal/LICENSE | 21 + .../node_modules/fast-deep-equal/README.md | 96 + .../fast-deep-equal/es6/index.d.ts | 2 + .../node_modules/fast-deep-equal/es6/index.js | 72 + .../fast-deep-equal/es6/react.d.ts | 2 + .../node_modules/fast-deep-equal/es6/react.js | 79 + .../node_modules/fast-deep-equal/index.d.ts | 4 + .../node_modules/fast-deep-equal/index.js | 46 + .../node_modules/fast-deep-equal/package.json | 61 + .../node_modules/fast-deep-equal/react.d.ts | 2 + .../node_modules/fast-deep-equal/react.js | 53 + .../fast-json-stable-stringify/.eslintrc.yml | 26 + .../.github/FUNDING.yml | 1 + .../fast-json-stable-stringify/.travis.yml | 8 + .../fast-json-stable-stringify/LICENSE | 21 + .../fast-json-stable-stringify/README.md | 131 + .../benchmark/index.js | 31 + .../benchmark/test.json | 137 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../fast-json-stable-stringify/example/str.js | 3 + .../example/value_cmp.js | 7 + .../fast-json-stable-stringify/index.d.ts | 4 + .../fast-json-stable-stringify/index.js | 59 + .../fast-json-stable-stringify/package.json | 52 + .../fast-json-stable-stringify/test/cmp.js | 13 + .../fast-json-stable-stringify/test/nested.js | 44 + .../fast-json-stable-stringify/test/str.js | 46 + .../test/to-json.js | 22 + .../node_modules/find-up/index.d.ts | 137 + .../node_modules/find-up/index.js | 89 + test-eol-project/node_modules/find-up/license | 9 + .../node_modules/find-up/package.json | 53 + .../node_modules/find-up/readme.md | 156 + .../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 | 17 + .../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 | 65 + .../node_modules/form-data/yarn.lock | 2662 ++++ .../node_modules/fs.realpath/LICENSE | 43 + .../node_modules/fs.realpath/README.md | 33 + .../node_modules/fs.realpath/index.js | 66 + .../node_modules/fs.realpath/old.js | 303 + .../node_modules/fs.realpath/package.json | 26 + .../node_modules/get-caller-file/LICENSE.md | 6 + .../node_modules/get-caller-file/README.md | 41 + .../node_modules/get-caller-file/index.d.ts | 2 + .../node_modules/get-caller-file/index.js | 22 + .../node_modules/get-caller-file/index.js.map | 1 + .../node_modules/get-caller-file/package.json | 42 + .../node_modules/getpass/.npmignore | 8 + .../node_modules/getpass/.travis.yml | 9 + test-eol-project/node_modules/getpass/LICENSE | 18 + .../node_modules/getpass/README.md | 32 + .../node_modules/getpass/lib/index.js | 123 + .../node_modules/getpass/package.json | 18 + test-eol-project/node_modules/glob/LICENSE | 21 + test-eol-project/node_modules/glob/README.md | 378 + test-eol-project/node_modules/glob/common.js | 238 + test-eol-project/node_modules/glob/glob.js | 790 ++ .../node_modules/glob/package.json | 55 + test-eol-project/node_modules/glob/sync.js | 486 + test-eol-project/node_modules/globby/index.js | 65 + test-eol-project/node_modules/globby/license | 21 + .../node_modules/globby/package.json | 70 + .../node_modules/globby/readme.md | 82 + .../node_modules/har-schema/LICENSE | 13 + .../node_modules/har-schema/README.md | 49 + .../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 + .../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 | 54 + .../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 | 43 + .../node_modules/has-ansi/index.js | 4 + .../node_modules/has-ansi/license | 21 + .../node_modules/has-ansi/package.json | 55 + .../node_modules/has-ansi/readme.md | 36 + .../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 + .../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 | 39 + .../https-proxy-agent/.editorconfig | 37 + .../https-proxy-agent/.eslintrc.js | 86 + .../node_modules/https-proxy-agent/History.md | 124 + .../node_modules/https-proxy-agent/README.md | 137 + .../node_modules/https-proxy-agent/index.d.ts | 22 + .../node_modules/https-proxy-agent/index.js | 241 + .../https-proxy-agent/package.json | 36 + .../node_modules/immediate/LICENSE.txt | 20 + .../node_modules/immediate/README.md | 93 + .../node_modules/immediate/dist/immediate.js | 75 + .../immediate/dist/immediate.min.js | 1 + .../node_modules/immediate/lib/browser.js | 69 + .../node_modules/immediate/lib/index.js | 73 + .../node_modules/immediate/package.json | 42 + .../node_modules/inflight/LICENSE | 15 + .../node_modules/inflight/README.md | 37 + .../node_modules/inflight/inflight.js | 54 + .../node_modules/inflight/package.json | 29 + .../node_modules/inherits/LICENSE | 16 + .../node_modules/inherits/README.md | 42 + .../node_modules/inherits/inherits.js | 9 + .../node_modules/inherits/inherits_browser.js | 27 + .../node_modules/inherits/package.json | 29 + test-eol-project/node_modules/ini/LICENSE | 15 + test-eol-project/node_modules/ini/README.md | 102 + test-eol-project/node_modules/ini/ini.js | 206 + .../node_modules/ini/package.json | 33 + .../is-fullwidth-code-point/index.d.ts | 17 + .../is-fullwidth-code-point/index.js | 50 + .../is-fullwidth-code-point/license | 9 + .../is-fullwidth-code-point/package.json | 42 + .../is-fullwidth-code-point/readme.md | 39 + .../node_modules/is-path-cwd/index.js | 6 + .../node_modules/is-path-cwd/package.json | 33 + .../node_modules/is-path-cwd/readme.md | 28 + .../node_modules/is-path-in-cwd/index.js | 6 + .../node_modules/is-path-in-cwd/license | 21 + .../node_modules/is-path-in-cwd/package.json | 38 + .../node_modules/is-path-in-cwd/readme.md | 31 + .../node_modules/is-path-inside/index.js | 14 + .../node_modules/is-path-inside/license | 21 + .../node_modules/is-path-inside/package.json | 37 + .../node_modules/is-path-inside/readme.md | 34 + .../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 | 30 + .../node_modules/is-typedarray/test.js | 34 + .../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 | 45 + test-eol-project/node_modules/isarray/test.js | 20 + .../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 | 33 + .../node_modules/isstream/test.js | 168 + .../jasmine-core/.codeclimate.yml | 16 + .../node_modules/jasmine-core/.editorconfig | 16 + .../jasmine-core/.github/CONTRIBUTING.md | 139 + .../jasmine-core/.github/ISSUE_TEMPLATE.md | 44 + .../.github/PULL_REQUEST_TEMPLATE.md | 30 + .../node_modules/jasmine-core/.npmignore | 28 + .../jasmine-core/CODE_OF_CONDUCT.md | 46 + .../node_modules/jasmine-core/MANIFEST.in | 5 + .../node_modules/jasmine-core/MIT.LICENSE | 20 + .../node_modules/jasmine-core/README.md | 79 + .../node_modules/jasmine-core/RELEASE.md | 76 + .../node_modules/jasmine-core/bower.json | 40 + .../images/jasmine-horizontal.png | Bin 0 -> 1714 bytes .../images/jasmine-horizontal.svg | 102 + .../jasmine-core/images/jasmine_favicon.png | Bin 0 -> 1486 bytes .../jasmine_core.egg-info/PKG-INFO | 30 + .../jasmine_core.egg-info/SOURCES.txt | 24 + .../dependency_links.txt | 1 + .../jasmine_core.egg-info/requires.txt | 2 + .../jasmine_core.egg-info/top_level.txt | 1 + .../jasmine-core/lib/console/console.js | 190 + .../jasmine-core/lib/jasmine-core.js | 37 + .../jasmine-core/lib/jasmine-core/boot.js | 155 + .../lib/jasmine_examples/Player.js | 24 + .../node_example/lib/jasmine_examples/Song.js | 9 + .../helpers/jasmine_examples/SpecHelper.js | 15 + .../spec/jasmine_examples/PlayerSpec.js | 60 + .../jasmine-core/example/spec/PlayerSpec.js | 58 + .../jasmine-core/example/spec/SpecHelper.js | 15 + .../lib/jasmine-core/example/src/Player.js | 22 + .../lib/jasmine-core/example/src/Song.js | 7 + .../lib/jasmine-core/jasmine-html.js | 499 + .../jasmine-core/lib/jasmine-core/jasmine.css | 58 + .../jasmine-core/lib/jasmine-core/jasmine.js | 5385 +++++++ .../jasmine-core/lib/jasmine-core/json2.js | 489 + .../lib/jasmine-core/node_boot.js | 41 + .../node_modules/jasmine-core/package.json | 34 + .../jasmine-core/requirements.txt | 1 + .../node_modules/jasmine/.travis.yml | 10 + .../node_modules/jasmine/Gruntfile.js | 44 + .../node_modules/jasmine/MIT.LICENSE | 20 + .../node_modules/jasmine/README.md | 63 + .../node_modules/jasmine/lib/command.js | 246 + .../jasmine/lib/examples/jasmine.json | 11 + .../node_modules/jasmine/lib/exit.js | 17 + .../lib/filters/console_spec_filter.js | 10 + .../node_modules/jasmine/lib/jasmine.js | 201 + .../jasmine/lib/printDeprecation.js | 3 + .../lib/reporters/completion_reporter.js | 33 + .../jasmine/lib/reporters/console_reporter.js | 240 + .../node_modules/jasmine/package.json | 33 + .../node_modules/jasmine/tasks/jasmine.js | 14 + .../node_modules/jasminewd2/CHANGELOG.md | 244 + .../node_modules/jasminewd2/LICENSE | 21 + .../node_modules/jasminewd2/README.md | 94 + .../node_modules/jasminewd2/index.js | 354 + .../node_modules/jasminewd2/maybePromise.js | 72 + .../node_modules/jasminewd2/package.json | 44 + .../node_modules/jasminewd2/scheduler.md | 68 + test-eol-project/node_modules/jsbn/.npmignore | 2 + test-eol-project/node_modules/jsbn/LICENSE | 40 + test-eol-project/node_modules/jsbn/README.md | 175 + .../node_modules/jsbn/example.html | 12 + test-eol-project/node_modules/jsbn/example.js | 3 + test-eol-project/node_modules/jsbn/index.js | 1357 ++ .../node_modules/jsbn/package.json | 21 + .../json-schema-traverse/.eslintrc.yml | 27 + .../json-schema-traverse/.travis.yml | 8 + .../node_modules/json-schema-traverse/LICENSE | 21 + .../json-schema-traverse/README.md | 83 + .../json-schema-traverse/index.js | 89 + .../json-schema-traverse/package.json | 43 + .../json-schema-traverse/spec/.eslintrc.yml | 6 + .../spec/fixtures/schema.js | 125 + .../json-schema-traverse/spec/index.spec.js | 171 + .../node_modules/json-schema/LICENSE | 195 + .../node_modules/json-schema/README.md | 3 + .../node_modules/json-schema/lib/links.js | 65 + .../node_modules/json-schema/lib/validate.js | 271 + .../node_modules/json-schema/package.json | 24 + .../json-stringify-safe/.npmignore | 1 + .../json-stringify-safe/CHANGELOG.md | 14 + .../node_modules/json-stringify-safe/LICENSE | 15 + .../node_modules/json-stringify-safe/Makefile | 35 + .../json-stringify-safe/README.md | 52 + .../json-stringify-safe/package.json | 31 + .../json-stringify-safe/stringify.js | 27 + .../json-stringify-safe/test/mocha.opts | 2 + .../test/stringify_test.js | 246 + .../node_modules/jsprim/CHANGES.md | 53 + .../node_modules/jsprim/CONTRIBUTING.md | 19 + test-eol-project/node_modules/jsprim/LICENSE | 19 + .../node_modules/jsprim/README.md | 287 + .../node_modules/jsprim/lib/jsprim.js | 735 + .../node_modules/jsprim/package.json | 20 + .../node_modules/jszip/.codeclimate.yml | 16 + .../node_modules/jszip/.editorconfig | 8 + .../node_modules/jszip/.eslintrc.js | 43 + .../jszip/.github/workflows/pr.yaml | 58 + .../node_modules/jszip/.jekyll-metadata | Bin 0 -> 24628 bytes .../node_modules/jszip/.travis.yml | 17 + .../node_modules/jszip/CHANGES.md | 204 + .../node_modules/jszip/LICENSE.markdown | 651 + .../node_modules/jszip/README.markdown | 33 + test-eol-project/node_modules/jszip/deps.js | 37 + .../node_modules/jszip/dist/jszip.js | 11577 ++++++++++++++++ .../node_modules/jszip/dist/jszip.min.js | 13 + test-eol-project/node_modules/jszip/graph.svg | 601 + .../node_modules/jszip/index.d.ts | 330 + .../node_modules/jszip/lib/base64.js | 106 + .../jszip/lib/compressedObject.js | 74 + .../node_modules/jszip/lib/compressions.js | 14 + .../node_modules/jszip/lib/crc32.js | 77 + .../node_modules/jszip/lib/defaults.js | 11 + .../node_modules/jszip/lib/external.js | 18 + .../node_modules/jszip/lib/flate.js | 85 + .../jszip/lib/generate/ZipFileWorker.js | 539 + .../node_modules/jszip/lib/generate/index.js | 57 + .../node_modules/jszip/lib/index.js | 55 + .../node_modules/jszip/lib/license_header.js | 11 + .../node_modules/jszip/lib/load.js | 88 + .../lib/nodejs/NodejsStreamInputAdapter.js | 74 + .../lib/nodejs/NodejsStreamOutputAdapter.js | 42 + .../node_modules/jszip/lib/nodejsUtils.js | 57 + .../node_modules/jszip/lib/object.js | 384 + .../jszip/lib/readable-stream-browser.js | 10 + .../jszip/lib/reader/ArrayReader.js | 57 + .../jszip/lib/reader/DataReader.js | 116 + .../jszip/lib/reader/NodeBufferReader.js | 19 + .../jszip/lib/reader/StringReader.js | 38 + .../jszip/lib/reader/Uint8ArrayReader.js | 22 + .../jszip/lib/reader/readerFor.js | 28 + .../node_modules/jszip/lib/signature.js | 7 + .../jszip/lib/stream/ConvertWorker.js | 26 + .../jszip/lib/stream/Crc32Probe.js | 24 + .../jszip/lib/stream/DataLengthProbe.js | 29 + .../jszip/lib/stream/DataWorker.js | 116 + .../jszip/lib/stream/GenericWorker.js | 263 + .../jszip/lib/stream/StreamHelper.js | 214 + .../node_modules/jszip/lib/support.js | 38 + .../node_modules/jszip/lib/utf8.js | 275 + .../node_modules/jszip/lib/utils.js | 501 + .../node_modules/jszip/lib/zipEntries.js | 261 + .../node_modules/jszip/lib/zipEntry.js | 293 + .../node_modules/jszip/lib/zipObject.js | 133 + .../node_modules/jszip/package.json | 67 + .../node_modules/jszip/sponsors.md | 21 + .../node_modules/jszip/tsconfig.json | 101 + .../node_modules/jszip/vendor/FileSaver.js | 247 + test-eol-project/node_modules/lie/README.md | 62 + test-eol-project/node_modules/lie/dist/lie.js | 350 + .../node_modules/lie/dist/lie.min.js | 1 + .../node_modules/lie/dist/lie.polyfill.js | 358 + .../node_modules/lie/dist/lie.polyfill.min.js | 1 + .../node_modules/lie/lib/browser.js | 273 + .../node_modules/lie/lib/index.js | 298 + test-eol-project/node_modules/lie/license.md | 7 + test-eol-project/node_modules/lie/lie.d.ts | 244 + .../node_modules/lie/package.json | 69 + test-eol-project/node_modules/lie/polyfill.js | 4 + .../node_modules/locate-path/index.d.ts | 83 + .../node_modules/locate-path/index.js | 65 + .../node_modules/locate-path/license | 9 + .../node_modules/locate-path/package.json | 45 + .../node_modules/locate-path/readme.md | 122 + .../node_modules/mime-db/HISTORY.md | 507 + test-eol-project/node_modules/mime-db/LICENSE | 23 + .../node_modules/mime-db/README.md | 100 + test-eol-project/node_modules/mime-db/db.json | 8519 ++++++++++++ .../node_modules/mime-db/index.js | 12 + .../node_modules/mime-db/package.json | 60 + .../node_modules/mime-types/HISTORY.md | 397 + .../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 | 44 + .../node_modules/minimatch/LICENSE | 15 + .../node_modules/minimatch/README.md | 267 + .../node_modules/minimatch/minimatch.js | 1005 ++ .../node_modules/minimatch/package.json | 33 + .../node_modules/minimist/.eslintrc | 29 + .../node_modules/minimist/.github/FUNDING.yml | 12 + test-eol-project/node_modules/minimist/.nycrc | 14 + .../node_modules/minimist/CHANGELOG.md | 298 + .../node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/README.md | 121 + .../node_modules/minimist/example/parse.js | 4 + .../node_modules/minimist/index.js | 263 + .../node_modules/minimist/package.json | 75 + .../node_modules/minimist/test/all_bool.js | 34 + .../node_modules/minimist/test/bool.js | 177 + .../node_modules/minimist/test/dash.js | 43 + .../minimist/test/default_bool.js | 37 + .../node_modules/minimist/test/dotted.js | 24 + .../node_modules/minimist/test/kv_short.js | 32 + .../node_modules/minimist/test/long.js | 33 + .../node_modules/minimist/test/num.js | 38 + .../node_modules/minimist/test/parse.js | 209 + .../minimist/test/parse_modified.js | 11 + .../node_modules/minimist/test/proto.js | 64 + .../node_modules/minimist/test/short.js | 69 + .../node_modules/minimist/test/stop_early.js | 17 + .../node_modules/minimist/test/unknown.js | 104 + .../node_modules/minimist/test/whitespace.js | 10 + test-eol-project/node_modules/ms/index.js | 162 + test-eol-project/node_modules/ms/license.md | 21 + test-eol-project/node_modules/ms/package.json | 38 + test-eol-project/node_modules/ms/readme.md | 59 + .../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 | 23 + .../node_modules/object-assign/index.js | 90 + .../node_modules/object-assign/license | 21 + .../node_modules/object-assign/package.json | 42 + .../node_modules/object-assign/readme.md | 61 + test-eol-project/node_modules/once/LICENSE | 15 + test-eol-project/node_modules/once/README.md | 79 + test-eol-project/node_modules/once/once.js | 42 + .../node_modules/once/package.json | 33 + .../node_modules/os-tmpdir/index.js | 25 + .../node_modules/os-tmpdir/license | 21 + .../node_modules/os-tmpdir/package.json | 41 + .../node_modules/os-tmpdir/readme.md | 32 + .../node_modules/p-limit/index.d.ts | 38 + .../node_modules/p-limit/index.js | 57 + test-eol-project/node_modules/p-limit/license | 9 + .../node_modules/p-limit/package.json | 52 + .../node_modules/p-limit/readme.md | 101 + .../node_modules/p-locate/index.d.ts | 64 + .../node_modules/p-locate/index.js | 52 + .../node_modules/p-locate/license | 9 + .../node_modules/p-locate/package.json | 53 + .../node_modules/p-locate/readme.md | 90 + .../node_modules/p-try/index.d.ts | 39 + test-eol-project/node_modules/p-try/index.js | 9 + test-eol-project/node_modules/p-try/license | 9 + .../node_modules/p-try/package.json | 42 + test-eol-project/node_modules/p-try/readme.md | 58 + .../node_modules/pako/CHANGELOG.md | 164 + test-eol-project/node_modules/pako/LICENSE | 21 + test-eol-project/node_modules/pako/README.md | 191 + .../node_modules/pako/dist/pako.js | 6818 +++++++++ .../node_modules/pako/dist/pako.min.js | 1 + .../node_modules/pako/dist/pako_deflate.js | 3997 ++++++ .../pako/dist/pako_deflate.min.js | 1 + .../node_modules/pako/dist/pako_inflate.js | 3300 +++++ .../pako/dist/pako_inflate.min.js | 1 + test-eol-project/node_modules/pako/index.js | 14 + .../node_modules/pako/lib/deflate.js | 400 + .../node_modules/pako/lib/inflate.js | 423 + .../node_modules/pako/lib/utils/common.js | 105 + .../node_modules/pako/lib/utils/strings.js | 187 + .../node_modules/pako/lib/zlib/README | 59 + .../node_modules/pako/lib/zlib/adler32.js | 51 + .../node_modules/pako/lib/zlib/constants.js | 68 + .../node_modules/pako/lib/zlib/crc32.js | 59 + .../node_modules/pako/lib/zlib/deflate.js | 1874 +++ .../node_modules/pako/lib/zlib/gzheader.js | 58 + .../node_modules/pako/lib/zlib/inffast.js | 345 + .../node_modules/pako/lib/zlib/inflate.js | 1556 +++ .../node_modules/pako/lib/zlib/inftrees.js | 343 + .../node_modules/pako/lib/zlib/messages.js | 32 + .../node_modules/pako/lib/zlib/trees.js | 1222 ++ .../node_modules/pako/lib/zlib/zstream.js | 47 + .../node_modules/pako/package.json | 44 + .../node_modules/path-exists/index.d.ts | 28 + .../node_modules/path-exists/index.js | 23 + .../node_modules/path-exists/license | 9 + .../node_modules/path-exists/package.json | 39 + .../node_modules/path-exists/readme.md | 52 + .../node_modules/path-is-absolute/index.js | 20 + .../node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 43 + .../node_modules/path-is-absolute/readme.md | 59 + .../node_modules/path-is-inside/LICENSE.txt | 47 + .../path-is-inside/lib/path-is-inside.js | 28 + .../node_modules/path-is-inside/package.json | 21 + .../node_modules/performance-now/.npmignore | 1 + .../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 | 35 + .../performance-now/src/index.d.ts | 8 + .../src/performance-now.coffee | 17 + .../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 + test-eol-project/node_modules/pify/index.js | 68 + test-eol-project/node_modules/pify/license | 21 + .../node_modules/pify/package.json | 48 + test-eol-project/node_modules/pify/readme.md | 119 + .../node_modules/pinkie-promise/index.js | 3 + .../node_modules/pinkie-promise/license | 21 + .../node_modules/pinkie-promise/package.json | 35 + .../node_modules/pinkie-promise/readme.md | 28 + test-eol-project/node_modules/pinkie/index.js | 292 + test-eol-project/node_modules/pinkie/license | 21 + .../node_modules/pinkie/package.json | 36 + .../node_modules/pinkie/readme.md | 83 + .../process-nextick-args/index.js | 45 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 25 + .../process-nextick-args/readme.md | 18 + .../protractor/.circleci/config.yml | 75 + .../node_modules/protractor/.jshintignore | 1 + .../node_modules/protractor/CHANGELOG.md | 4288 ++++++ .../node_modules/protractor/CONTRIBUTING.md | 74 + .../node_modules/protractor/DEVELOPER.md | 151 + .../node_modules/protractor/LICENSE | 21 + .../node_modules/protractor/README.md | 37 + .../protractor/built/bpRunner.d.ts | 13 + .../node_modules/protractor/built/bpRunner.js | 59 + .../protractor/built/breakpointhook.js | 10 + .../protractor/built/browser.d.ts | 474 + .../node_modules/protractor/built/browser.js | 863 ++ .../node_modules/protractor/built/cli.d.ts | 0 .../node_modules/protractor/built/cli.js | 228 + .../protractor/built/clientsidescripts.js | 939 ++ .../node_modules/protractor/built/config.d.ts | 619 + .../node_modules/protractor/built/config.js | 3 + .../protractor/built/configParser.d.ts | 50 + .../protractor/built/configParser.js | 215 + .../protractor/built/debugger.d.ts | 47 + .../node_modules/protractor/built/debugger.js | 233 + .../built/debugger/clients/explorer.js | 157 + .../built/debugger/clients/wddebugger.js | 83 + .../built/debugger/debuggerCommons.js | 113 + .../built/debugger/modes/commandRepl.js | 127 + .../built/debugger/modes/debuggerRepl.js | 143 + .../built/driverProviders/attachSession.d.ts | 27 + .../built/driverProviders/attachSession.js | 51 + .../built/driverProviders/browserStack.d.ts | 21 + .../built/driverProviders/browserStack.js | 84 + .../built/driverProviders/direct.d.ts | 22 + .../built/driverProviders/direct.js | 116 + .../built/driverProviders/driverProvider.d.ts | 65 + .../built/driverProviders/driverProvider.js | 131 + .../built/driverProviders/hosted.d.ts | 14 + .../built/driverProviders/hosted.js | 28 + .../built/driverProviders/index.d.ts | 15 + .../protractor/built/driverProviders/index.js | 129 + .../built/driverProviders/kobiton.d.ts | 13 + .../built/driverProviders/kobiton.js | 33 + .../built/driverProviders/local.d.ts | 30 + .../protractor/built/driverProviders/local.js | 165 + .../built/driverProviders/mock.d.ts | 29 + .../protractor/built/driverProviders/mock.js | 50 + .../built/driverProviders/sauce.d.ts | 29 + .../protractor/built/driverProviders/sauce.js | 93 + .../built/driverProviders/testObject.d.ts | 13 + .../built/driverProviders/testObject.js | 32 + .../driverProviders/useExistingWebDriver.d.ts | 27 + .../driverProviders/useExistingWebDriver.js | 52 + .../protractor/built/element.d.ts | 871 ++ .../node_modules/protractor/built/element.js | 1166 ++ .../protractor/built/exitCodes.d.ts | 32 + .../protractor/built/exitCodes.js | 84 + .../protractor/built/expectedConditions.d.ts | 320 + .../protractor/built/expectedConditions.js | 424 + ...rotractor_internal_afterEach_setup_spec.js | 10 + .../protractor/built/frameworks/debugprint.js | 22 + .../protractor/built/frameworks/explorer.js | 24 + .../protractor/built/frameworks/jasmine.js | 135 + .../protractor/built/frameworks/mocha.js | 140 + .../built/frameworks/setupAfterEach.js | 29 + .../node_modules/protractor/built/index.d.ts | 29 + .../node_modules/protractor/built/index.js | 54 + .../protractor/built/launcher.d.ts | 2 + .../node_modules/protractor/built/launcher.js | 285 + .../protractor/built/locators.d.ts | 294 + .../node_modules/protractor/built/locators.js | 451 + .../node_modules/protractor/built/logger.d.ts | 101 + .../node_modules/protractor/built/logger.js | 275 + .../protractor/built/plugins.d.ts | 348 + .../node_modules/protractor/built/plugins.js | 225 + .../node_modules/protractor/built/ptor.d.ts | 50 + .../node_modules/protractor/built/ptor.js | 47 + .../node_modules/protractor/built/runner.d.ts | 104 + .../node_modules/protractor/built/runner.js | 445 + .../protractor/built/runnerCli.d.ts | 0 .../protractor/built/runnerCli.js | 56 + .../built/selenium-webdriver/locators.js | 216 + .../built/selenium-webdriver/webdriver.js | 765 + .../protractor/built/taskLogger.d.ts | 37 + .../protractor/built/taskLogger.js | 92 + .../protractor/built/taskRunner.d.ts | 40 + .../protractor/built/taskRunner.js | 118 + .../protractor/built/taskScheduler.d.ts | 61 + .../protractor/built/taskScheduler.js | 146 + .../node_modules/protractor/built/util.d.ts | 40 + .../node_modules/protractor/built/util.js | 109 + .../built/webdriver-js-extender/index.js | 47 + .../example/angular_material/conf.js | 27 + .../example/angular_material/input_spec.js | 15 + .../angular_material/mat_paginator_spec.js | 31 + .../node_modules/protractor/example/conf.js | 21 + .../protractor/example/example_spec.js | 37 + .../protractor/exampleTypescript/README.md | 89 + .../exampleTypescript/angularPage.ts | 26 + .../exampleTypescript/asyncAwait/README.md | 34 + .../exampleTypescript/asyncAwait/conf.js | 20 + .../exampleTypescript/asyncAwait/spec.ts | 13 + .../protractor/exampleTypescript/conf.ts | 24 + .../exampleTypescript/confPageObjects.ts | 20 + .../protractor/exampleTypescript/package.json | 24 + .../protractor/exampleTypescript/plugins.ts | 16 + .../protractor/exampleTypescript/spec.ts | 26 + .../exampleTypescript/specPageObjects.ts | 12 + .../exampleTypescript/tsconfig.json | 16 + .../node_modules/protractor/gulpfile.js | 100 + .../node_modules/protractor/package.json | 86 + .../protractor/ts_spec_config.json | 15 + .../node_modules/protractor/tsconfig.json | 21 + .../node_modules/protractor/tslint.json | 14 + test-eol-project/node_modules/psl/LICENSE | 9 + test-eol-project/node_modules/psl/README.md | 260 + test-eol-project/node_modules/psl/SECURITY.md | 13 + .../node_modules/psl/browserstack-logo.svg | 90 + .../node_modules/psl/data/rules.js | 9778 +++++++++++++ .../node_modules/psl/dist/psl.cjs | 1 + .../node_modules/psl/dist/psl.mjs | 10008 +++++++++++++ .../node_modules/psl/dist/psl.umd.cjs | 1 + test-eol-project/node_modules/psl/index.js | 247 + .../node_modules/psl/package.json | 51 + .../node_modules/psl/types/index.d.ts | 52 + .../node_modules/psl/types/test.ts | 14 + .../node_modules/psl/types/tsconfig.json | 22 + .../node_modules/psl/vite.config.js | 20 + .../node_modules/punycode/LICENSE-MIT.txt | 20 + .../node_modules/punycode/README.md | 148 + .../node_modules/punycode/package.json | 58 + .../node_modules/punycode/punycode.es6.js | 444 + .../node_modules/punycode/punycode.js | 443 + test-eol-project/node_modules/q/CHANGES.md | 786 ++ test-eol-project/node_modules/q/LICENSE | 18 + test-eol-project/node_modules/q/README.md | 881 ++ test-eol-project/node_modules/q/package.json | 79 + test-eol-project/node_modules/q/q.js | 2048 +++ test-eol-project/node_modules/q/queue.js | 35 + .../node_modules/qs/.editorconfig | 43 + test-eol-project/node_modules/qs/.eslintrc | 37 + .../node_modules/qs/.github/FUNDING.yml | 12 + test-eol-project/node_modules/qs/.nycrc | 13 + test-eol-project/node_modules/qs/CHANGELOG.md | 262 + test-eol-project/node_modules/qs/LICENSE.md | 29 + test-eol-project/node_modules/qs/README.md | 516 + test-eol-project/node_modules/qs/dist/qs.js | 648 + .../node_modules/qs/lib/formats.js | 18 + test-eol-project/node_modules/qs/lib/index.js | 11 + test-eol-project/node_modules/qs/lib/parse.js | 175 + .../node_modules/qs/lib/stringify.js | 217 + test-eol-project/node_modules/qs/lib/utils.js | 215 + test-eol-project/node_modules/qs/package.json | 63 + .../node_modules/qs/test/index.js | 7 + .../node_modules/qs/test/parse.js | 658 + .../node_modules/qs/test/stringify.js | 648 + .../node_modules/qs/test/utils.js | 65 + .../node_modules/readable-stream/.travis.yml | 34 + .../readable-stream/CONTRIBUTING.md | 38 + .../readable-stream/GOVERNANCE.md | 136 + .../node_modules/readable-stream/LICENSE | 47 + .../node_modules/readable-stream/README.md | 58 + .../doc/wg-meetings/2015-01-30.md | 60 + .../readable-stream/duplex-browser.js | 1 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 131 + .../lib/_stream_passthrough.js | 47 + .../readable-stream/lib/_stream_readable.js | 1019 ++ .../readable-stream/lib/_stream_transform.js | 214 + .../readable-stream/lib/_stream_writable.js | 685 + .../lib/internal/streams/BufferList.js | 78 + .../lib/internal/streams/destroy.js | 84 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/readable-stream/package.json | 52 + .../readable-stream/passthrough.js | 1 + .../readable-stream/readable-browser.js | 7 + .../node_modules/readable-stream/readable.js | 19 + .../node_modules/readable-stream/transform.js | 1 + .../readable-stream/writable-browser.js | 1 + .../node_modules/readable-stream/writable.js | 8 + .../node_modules/request/CHANGELOG.md | 717 + test-eol-project/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 + .../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/package.json | 86 + .../node_modules/request/request.js | 1553 +++ .../node_modules/require-directory/.jshintrc | 67 + .../node_modules/require-directory/.npmignore | 1 + .../require-directory/.travis.yml | 3 + .../node_modules/require-directory/LICENSE | 22 + .../require-directory/README.markdown | 184 + .../node_modules/require-directory/index.js | 86 + .../require-directory/package.json | 40 + .../require-main-filename/CHANGELOG.md | 26 + .../require-main-filename/LICENSE.txt | 14 + .../require-main-filename/README.md | 26 + .../require-main-filename/index.js | 18 + .../require-main-filename/package.json | 35 + test-eol-project/node_modules/rimraf/LICENSE | 15 + .../node_modules/rimraf/README.md | 101 + test-eol-project/node_modules/rimraf/bin.js | 50 + .../node_modules/rimraf/package.json | 29 + .../node_modules/rimraf/rimraf.js | 372 + .../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 | 37 + .../node_modules/safer-buffer/LICENSE | 21 + .../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 | 34 + .../node_modules/safer-buffer/safer.js | 77 + .../node_modules/safer-buffer/tests.js | 406 + .../node_modules/saucelabs/.jshintrc | 64 + .../node_modules/saucelabs/.travis.yml | 4 + .../node_modules/saucelabs/Makefile | 21 + .../node_modules/saucelabs/README.md | 337 + .../node_modules/saucelabs/index.js | 3 + .../node_modules/saucelabs/lib/SauceLabs.js | 344 + .../node_modules/saucelabs/lib/utils.js | 20 + .../node_modules/saucelabs/package.json | 27 + .../node_modules/saucelabs/test/SauceLabs.js | 315 + .../saucelabs/test/bootstrap/index.js | 6 + .../saucelabs/test/helpers/index.js | 62 + .../node_modules/saucelabs/test/mocha.opts | 3 + .../node_modules/saucelabs/test/utils.js | 28 + test-eol-project/node_modules/sax/LICENSE.md | 55 + test-eol-project/node_modules/sax/README.md | 227 + test-eol-project/node_modules/sax/lib/sax.js | 1704 +++ .../node_modules/sax/package.json | 31 + .../selenium-webdriver/.npmignore | 2 + .../selenium-webdriver/CHANGES.md | 851 ++ .../node_modules/selenium-webdriver/LICENSE | 202 + .../node_modules/selenium-webdriver/NOTICE | 2 + .../node_modules/selenium-webdriver/README.md | 226 + .../node_modules/selenium-webdriver/chrome.js | 829 ++ .../node_modules/selenium-webdriver/edge.js | 301 + .../example/async_await_test.js | 69 + .../example/chrome_android.js | 42 + .../example/chrome_mobile_emulation.js | 42 + .../example/firefox_channels.js | 73 + .../example/google_search.js | 50 + .../example/google_search_generator.js | 47 + .../example/google_search_test.js | 60 + .../selenium-webdriver/example/headless.js | 55 + .../selenium-webdriver/example/logging.js | 35 + .../example/parallel_flows.js | 51 + .../selenium-webdriver/firefox/binary.js | 347 + .../selenium-webdriver/firefox/extension.js | 224 + .../selenium-webdriver/firefox/index.js | 576 + .../selenium-webdriver/firefox/profile.js | 311 + .../selenium-webdriver/http/index.js | 255 + .../selenium-webdriver/http/util.js | 175 + .../node_modules/selenium-webdriver/ie.js | 441 + .../node_modules/selenium-webdriver/index.js | 694 + .../selenium-webdriver/io/exec.js | 153 + .../selenium-webdriver/io/index.js | 359 + .../node_modules/selenium-webdriver/io/zip.js | 214 + .../selenium-webdriver/lib/README | 5 + .../selenium-webdriver/lib/actions.js | 604 + .../lib/atoms/get-attribute.js | 9 + .../lib/atoms/is-displayed.js | 102 + .../node_modules/selenium-webdriver/lib/by.js | 285 + .../selenium-webdriver/lib/capabilities.js | 489 + .../selenium-webdriver/lib/command.js | 245 + .../selenium-webdriver/lib/devmode.js | 34 + .../selenium-webdriver/lib/error.js | 598 + .../selenium-webdriver/lib/events.js | 210 + .../selenium-webdriver/lib/http.js | 582 + .../selenium-webdriver/lib/input.js | 171 + .../selenium-webdriver/lib/logging.js | 676 + .../selenium-webdriver/lib/promise.js | 3404 +++++ .../selenium-webdriver/lib/proxy.js | 127 + .../selenium-webdriver/lib/session.js | 80 + .../selenium-webdriver/lib/symbols.js | 38 + .../selenium-webdriver/lib/test/build.js | 151 + ...kTest_testClicksASurroundingStrongTag.html | 11 + .../lib/test/data/Page.aspx | 17 + .../lib/test/data/Page.aspx.cs | 22 + .../lib/test/data/Redirect.aspx | 11 + .../lib/test/data/Redirect.aspx.cs | 9 + .../lib/test/data/Settings.StyleCop | 759 + .../lib/test/data/Web.Config | 59 + .../lib/test/data/actualXhtmlPage.xhtml | 14 + .../lib/test/data/ajaxy_page.html | 81 + .../lib/test/data/alerts.html | 85 + .../lib/test/data/banner.gif | Bin 0 -> 2109 bytes .../lib/test/data/beach.jpg | Bin 0 -> 14085 bytes .../lib/test/data/blank.html | 1 + .../lib/test/data/bodyTypingTest.html | 41 + .../lib/test/data/booleanAttributes.html | 19 + .../lib/test/data/child/childPage.html | 8 + .../data/child/grandchild/grandchildPage.html | 8 + .../lib/test/data/clickEventPage.html | 26 + .../lib/test/data/click_frames.html | 10 + .../lib/test/data/click_jacker.html | 38 + .../lib/test/data/click_out_of_bounds.html | 23 + .../data/click_out_of_bounds_overflow.html | 85 + .../lib/test/data/click_rtl.html | 19 + .../lib/test/data/click_source.html | 18 + .../test/data/click_tests/click_iframe.html | 6 + .../data/click_tests/click_in_iframe.html | 8 + .../data/click_tests/disabled_element.html | 12 + .../click_tests/disappearing_element.html | 62 + .../lib/test/data/click_tests/google_map.html | 15 + .../lib/test/data/click_tests/google_map.png | Bin 0 -> 26209 bytes .../click_tests/html5_submit_buttons.html | 16 + .../lib/test/data/click_tests/issue5237.html | 9 + .../data/click_tests/issue5237_frame.html | 1 + .../data/click_tests/issue5237_target.html | 10 + .../data/click_tests/link_that_wraps.html | 11 + .../test/data/click_tests/mapped_page1.html | 9 + .../test/data/click_tests/mapped_page2.html | 9 + .../test/data/click_tests/mapped_page3.html | 9 + .../click_tests/overlapping_elements.html | 70 + .../partially_overlapping_elements.html | 124 + .../data/click_tests/span_that_wraps.html | 11 + .../test/data/click_tests/submitted_page.html | 9 + .../wrapped_overlapping_elements.html | 13 + .../lib/test/data/click_too_big.html | 10 + .../lib/test/data/click_too_big_in_frame.html | 11 + .../lib/test/data/clicks.html | 35 + .../lib/test/data/closeable_window.html | 8 + .../lib/test/data/cn-test.html | 156 + .../lib/test/data/colorPage.html | 20 + .../lib/test/data/content-editable.html | 10 + .../lib/test/data/cookies.html | 30 + .../coordinates_tests/element_in_frame.html | 9 + .../element_in_nested_frame.html | 9 + .../page_with_element_out_of_view.html | 11 + .../page_with_empty_element.html | 10 + .../page_with_fixed_element.html | 12 + .../page_with_hidden_element.html | 10 + .../page_with_invisible_element.html | 10 + .../page_with_transparent_element.html | 10 + .../data/coordinates_tests/simple_page.html | 10 + .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 260 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 104 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 125 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 3762 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 90 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 129 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes .../ui-lightness/jquery-ui-1.8.10.custom.css | 573 + .../lib/test/data/cssTransform.html | 61 + .../lib/test/data/cssTransform2.html | 20 + .../test/data/document_write_in_onload.html | 13 + .../data/dragAndDropInsideScrolledDiv.html | 67 + .../lib/test/data/dragAndDropTest.html | 102 + .../lib/test/data/dragDropOverflow.html | 104 + .../lib/test/data/draggableLists.html | 67 + .../lib/test/data/droppableItems.html | 65 + .../lib/test/data/dynamic.html | 39 + .../test/data/dynamicallyModifiedPage.html | 42 + .../lib/test/data/errors.html | 15 + .../lib/test/data/firefox/jetpack-sample.xpi | Bin 0 -> 7289 bytes .../lib/test/data/firefox/sample.xpi | Bin 0 -> 1551 bytes .../lib/test/data/firefox/webextension.xpi | Bin 0 -> 4692 bytes .../lib/test/data/fixedFooterNoScroll.html | 13 + .../data/fixedFooterNoScrollQuirksMode.html | 12 + .../lib/test/data/formPage.html | 175 + .../lib/test/data/formSelectionPage.html | 46 + .../test/data/form_handling_js_submit.html | 30 + .../lib/test/data/framePage3.html | 7 + .../lib/test/data/frameScrollChild.html | 26 + .../lib/test/data/frameScrollPage.html | 14 + .../lib/test/data/frameScrollParent.html | 11 + .../lib/test/data/frameWithAnimals.html | 11 + .../data/frame_switching_tests/bug4876.html | 9 + .../frame_switching_tests/bug4876_iframe.html | 9 + .../frame_switching_tests/deletingFrame.html | 29 + .../deletingFrame_iframe.html | 8 + .../deletingFrame_iframe2.html | 7 + .../lib/test/data/frameset.html | 14 + .../lib/test/data/framesetPage2.html | 7 + .../lib/test/data/framesetPage3.html | 4 + .../lib/test/data/globalscope.html | 15 + .../lib/test/data/hidden.html | 5 + .../lib/test/data/hidden_partially.html | 45 + .../lib/test/data/html5/blue.jpg | Bin 0 -> 92 bytes .../lib/test/data/html5/database.js | 84 + .../lib/test/data/html5/geolocation.js | 18 + .../lib/test/data/html5/green.jpg | Bin 0 -> 92 bytes .../lib/test/data/html5/red.jpg | Bin 0 -> 92 bytes .../lib/test/data/html5/status.html | 1 + .../lib/test/data/html5/test.appcache | 11 + .../lib/test/data/html5/yellow.jpg | Bin 0 -> 92 bytes .../lib/test/data/html5Page.html | 32 + .../selenium-webdriver/lib/test/data/icon.gif | Bin 0 -> 127 bytes .../lib/test/data/idElements.html | 2 + .../lib/test/data/iframeAtBottom.html | 15 + .../lib/test/data/iframeWithAlert.html | 1 + .../lib/test/data/iframeWithIframe.html | 1 + .../lib/test/data/iframes.html | 11 + .../lib/test/data/injectableContent.html | 22 + .../lib/test/data/javascriptEnhancedForm.html | 30 + .../lib/test/data/javascriptPage.html | 285 + .../lib/test/data/jquery-1.3.2.js | 4376 ++++++ .../lib/test/data/js/jquery-1.4.4.min.js | 167 + .../data/js/jquery-ui-1.8.10.custom.min.js | 782 ++ .../js/skins/lightgray/content.inline.min.css | 1 + .../data/js/skins/lightgray/content.min.css | 1 + .../data/js/skins/lightgray/fonts/readme.md | 1 + .../lightgray/fonts/tinymce-small.dev.svg | 175 + .../skins/lightgray/fonts/tinymce-small.eot | Bin 0 -> 10316 bytes .../skins/lightgray/fonts/tinymce-small.svg | 62 + .../skins/lightgray/fonts/tinymce-small.ttf | Bin 0 -> 10128 bytes .../skins/lightgray/fonts/tinymce-small.woff | Bin 0 -> 7848 bytes .../js/skins/lightgray/fonts/tinymce.dev.svg | 153 + .../data/js/skins/lightgray/fonts/tinymce.eot | Bin 0 -> 10024 bytes .../data/js/skins/lightgray/fonts/tinymce.svg | 63 + .../data/js/skins/lightgray/fonts/tinymce.ttf | Bin 0 -> 9860 bytes .../js/skins/lightgray/fonts/tinymce.woff | Bin 0 -> 7664 bytes .../data/js/skins/lightgray/img/anchor.gif | Bin 0 -> 53 bytes .../data/js/skins/lightgray/img/loader.gif | Bin 0 -> 2608 bytes .../data/js/skins/lightgray/img/object.gif | Bin 0 -> 152 bytes .../data/js/skins/lightgray/img/trans.gif | Bin 0 -> 43 bytes .../data/js/skins/lightgray/skin.ie7.min.css | 1 + .../test/data/js/skins/lightgray/skin.min.css | 1 + .../test/data/js/themes/modern/theme.min.js | 1 + .../lib/test/data/js/tinymce.min.js | 10 + .../lib/test/data/key_logger.html | 34 + .../data/key_tests/remove_on_keypress.html | 36 + .../lib/test/data/keyboard_shortcut.html | 36 + .../lib/test/data/linked_image.html | 16 + .../boolean_attribute_selected.html | 13 + .../boolean_attribute_selected_html4.html | 13 + .../lib/test/data/longContentPage.html | 55 + .../lib/test/data/macbeth.html | 5255 +++++++ .../selenium-webdriver/lib/test/data/map.png | Bin 0 -> 26209 bytes .../lib/test/data/map_visibility.html | 8 + .../lib/test/data/markerTransparent.png | Bin 0 -> 260 bytes .../lib/test/data/messages.html | 15 + .../lib/test/data/meta-redirect.html | 11 + .../lib/test/data/missedJsReference.html | 11 + .../lib/test/data/modal_dialogs/modal_1.html | 21 + .../lib/test/data/modal_dialogs/modal_2.html | 21 + .../lib/test/data/modal_dialogs/modal_3.html | 15 + .../test/data/modal_dialogs/modalindex.html | 21 + .../lib/test/data/mouseOver.html | 17 + .../lib/test/data/mousePositionTracker.html | 33 + .../lib/test/data/nestedElements.html | 164 + .../lib/test/data/overflow-body.html | 15 + .../lib/test/data/overflow/x_auto_y_auto.html | 30 + .../test/data/overflow/x_auto_y_hidden.html | 30 + .../test/data/overflow/x_auto_y_scroll.html | 30 + .../test/data/overflow/x_hidden_y_auto.html | 30 + .../test/data/overflow/x_hidden_y_hidden.html | 30 + .../test/data/overflow/x_hidden_y_scroll.html | 30 + .../test/data/overflow/x_scroll_y_auto.html | 30 + .../test/data/overflow/x_scroll_y_hidden.html | 30 + .../test/data/overflow/x_scroll_y_scroll.html | 30 + .../data/pageWithOnBeforeUnloadMessage.html | 20 + .../lib/test/data/pageWithOnLoad.html | 6 + .../lib/test/data/pageWithOnUnload.html | 6 + .../page_with_link_to_slow_loading_page.html | 6 + .../lib/test/data/plain.txt | 1 + .../lib/test/data/proxy/page1.html | 20 + .../lib/test/data/proxy/page2.html | 24 + .../lib/test/data/proxy/page3.html | 5 + .../lib/test/data/readOnlyPage.html | 24 + .../lib/test/data/rectangles.html | 40 + .../lib/test/data/resultPage.html | 25 + .../lib/test/data/rich_text.html | 161 + .../test/data/safari/frames_benchmark.html | 31 + .../lib/test/data/screen/screen.css | 19 + .../lib/test/data/screen/screen.html | 72 + .../lib/test/data/screen/screen.js | 7 + .../lib/test/data/screen/screen_frame1.html | 72 + .../lib/test/data/screen/screen_frame2.html | 72 + .../lib/test/data/screen/screen_frames.html | 11 + .../lib/test/data/screen/screen_iframes.html | 12 + .../lib/test/data/screen/screen_too_long.html | 68 + .../lib/test/data/screen/screen_x_long.html | 72 + .../test/data/screen/screen_x_too_long.html | 72 + .../lib/test/data/screen/screen_y_long.html | 72 + .../test/data/screen/screen_y_too_long.html | 72 + .../lib/test/data/scroll.html | 27 + .../lib/test/data/scroll2.html | 21 + .../lib/test/data/scroll3.html | 8 + .../lib/test/data/scroll4.html | 7 + .../lib/test/data/scroll5.html | 18 + .../frame_with_height_above_200.html | 26 + .../frame_with_height_above_2000.html | 26 + .../frame_with_nested_scrolling_frame.html | 11 + ...th_nested_scrolling_frame_out_of_view.html | 12 + .../frame_with_small_height.html | 10 + .../page_with_double_overflow_auto.html | 19 + .../page_with_frame_out_of_view.html | 12 + .../page_with_nested_scrolling_frames.html | 11 + ...h_nested_scrolling_frames_out_of_view.html | 12 + .../page_with_non_scrolling_frame.html | 11 + .../page_with_partially_hidden_element.html | 14 + .../page_with_scrolling_frame.html | 11 + ...page_with_scrolling_frame_out_of_view.html | 12 + .../scrolling_tests/page_with_tall_frame.html | 11 + .../page_with_y_overflow_auto.html | 14 + .../data/scrolling_tests/target_page.html | 9 + .../lib/test/data/selectPage.html | 58 + .../lib/test/data/selectableItems.html | 65 + .../lib/test/data/sessionCookie.html | 21 + .../lib/test/data/sessionCookieDest.html | 34 + .../lib/test/data/simple.xml | 5 + .../lib/test/data/simpleTest.html | 98 + .../lib/test/data/single_text_input.html | 12 + .../lib/test/data/slowLoadingAlert.html | 10 + .../test/data/slowLoadingResourcePage.html | 12 + .../lib/test/data/slow_loading_iframes.html | 14 + .../lib/test/data/styledPage.html | 28 + .../lib/test/data/svgPiechart.xhtml | 81 + .../lib/test/data/svgTest.svg | 4 + .../lib/test/data/tables.html | 36 + .../lib/test/data/tinymce.html | 10 + .../lib/test/data/transformable.xml | 11 + .../lib/test/data/transformable.xsl | 37 + .../lib/test/data/transparentUpload.html | 70 + .../lib/test/data/underscore.html | 9 + .../lib/test/data/unicode_ltr.html | 8 + .../lib/test/data/upload.html | 45 + .../lib/test/data/userDefinedProperty.html | 8 + .../lib/test/data/veryLargeCanvas.html | 81 + .../lib/test/data/visibility-css.html | 21 + .../lib/test/data/win32frameset.html | 8 + .../page_with_frame.html | 12 + .../window_switching_tests/simple_page.html | 9 + .../lib/test/data/xhtmlFormPage.xhtml | 17 + .../lib/test/data/xhtmlTest.html | 76 + .../selenium-webdriver/lib/test/fileserver.js | 321 + .../selenium-webdriver/lib/test/httpserver.js | 120 + .../selenium-webdriver/lib/test/index.js | 270 + .../selenium-webdriver/lib/test/promise.js | 79 + .../selenium-webdriver/lib/test/resources.js | 44 + .../selenium-webdriver/lib/until.js | 427 + .../selenium-webdriver/lib/webdriver.js | 2656 ++++ .../selenium-webdriver/net/index.js | 117 + .../selenium-webdriver/net/portprober.js | 205 + .../node_modules/selenium-webdriver/opera.js | 405 + .../selenium-webdriver/package.json | 42 + .../selenium-webdriver/phantomjs.js | 282 + .../node_modules/selenium-webdriver/proxy.js | 32 + .../selenium-webdriver/remote/index.js | 604 + .../node_modules/selenium-webdriver/safari.js | 264 + .../selenium-webdriver/test/actions_test.js | 52 + .../test/chrome/options_test.js | 227 + .../test/chrome/service_test.js | 45 + .../selenium-webdriver/test/cookie_test.js | 214 + .../test/element_finding_test.js | 426 + .../test/execute_script_test.js | 350 + .../test/fingerprint_test.js | 62 + .../test/firefox/extension_test.js | 120 + .../test/firefox/firefox_test.js | 244 + .../test/firefox/profile_test.js | 140 + .../selenium-webdriver/test/http/http_test.js | 223 + .../selenium-webdriver/test/http/util_test.js | 178 + .../selenium-webdriver/test/io/io_test.js | 360 + .../selenium-webdriver/test/io/zip_test.js | 128 + .../selenium-webdriver/test/lib/by_test.js | 160 + .../test/lib/capabilities_test.js | 111 + .../selenium-webdriver/test/lib/error_test.js | 306 + .../test/lib/events_test.js | 177 + .../selenium-webdriver/test/lib/http_test.js | 696 + .../test/lib/logging_test.js | 272 + .../test/lib/promise_aplus_test.js | 78 + .../test/lib/promise_error_test.js | 884 ++ .../test/lib/promise_flow_test.js | 2288 +++ .../test/lib/promise_generator_test.js | 310 + .../test/lib/promise_test.js | 1109 ++ .../selenium-webdriver/test/lib/testutil.js | 90 + .../selenium-webdriver/test/lib/until_test.js | 478 + .../test/lib/webdriver_test.js | 2311 +++ .../selenium-webdriver/test/logging_test.js | 167 + .../selenium-webdriver/test/net/index_test.js | 60 + .../test/net/portprober_test.js | 128 + .../test/page_loading_test.js | 166 + .../test/phantomjs/execute_phantomjs_test.js | 59 + .../selenium-webdriver/test/proxy_test.js | 180 + .../selenium-webdriver/test/rect_test.js | 60 + .../selenium-webdriver/test/remote_test.js | 117 + .../selenium-webdriver/test/safari_test.js | 108 + .../selenium-webdriver/test/session_test.js | 99 + .../test/stale_element_test.js | 63 + .../selenium-webdriver/test/tag_name_test.js | 36 + .../test/testing/assert_test.js | 373 + .../test/testing/index_test.js | 224 + .../selenium-webdriver/test/upload_test.js | 86 + .../selenium-webdriver/test/window_test.js | 161 + .../selenium-webdriver/testing/assert.js | 378 + .../selenium-webdriver/testing/index.js | 426 + test-eol-project/node_modules/semver/LICENSE | 15 + .../node_modules/semver/README.md | 412 + .../node_modules/semver/package.json | 38 + .../node_modules/semver/range.bnf | 16 + .../node_modules/semver/semver.js | 1525 ++ .../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 | 42 + .../node_modules/setimmediate/LICENSE.txt | 20 + .../node_modules/setimmediate/package.json | 30 + .../node_modules/setimmediate/setImmediate.js | 186 + .../source-map-support/LICENSE.md | 21 + .../node_modules/source-map-support/README.md | 251 + .../browser-source-map-support.js | 110 + .../source-map-support/package.json | 30 + .../source-map-support/register.js | 1 + .../source-map-support/source-map-support.js | 527 + .../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 | 72 + .../node_modules/source-map/source-map.js | 8 + .../node_modules/sshpk/.travis.yml | 11 + .../node_modules/sshpk/Jenkinsfile | 86 + test-eol-project/node_modules/sshpk/LICENSE | 18 + test-eol-project/node_modules/sshpk/README.md | 804 ++ .../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 | 643 + .../node_modules/sshpk/lib/formats/putty.js | 194 + .../node_modules/sshpk/lib/formats/rfc4253.js | 166 + .../sshpk/lib/formats/ssh-private.js | 262 + .../node_modules/sshpk/lib/formats/ssh.js | 115 + .../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 | 247 + .../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 + .../sshpk/man/man1/sshpk-verify.1 | 68 + .../node_modules/sshpk/package.json | 59 + .../node_modules/string-width/index.d.ts | 29 + .../node_modules/string-width/index.js | 47 + .../node_modules/string-width/license | 9 + .../node_modules/ansi-regex/index.d.ts | 37 + .../node_modules/ansi-regex/index.js | 10 + .../node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 55 + .../node_modules/ansi-regex/readme.md | 78 + .../node_modules/strip-ansi/index.d.ts | 17 + .../node_modules/strip-ansi/index.js | 4 + .../node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 54 + .../node_modules/strip-ansi/readme.md | 46 + .../node_modules/string-width/package.json | 56 + .../node_modules/string-width/readme.md | 50 + .../node_modules/string_decoder/.travis.yml | 50 + .../node_modules/string_decoder/LICENSE | 48 + .../node_modules/string_decoder/README.md | 47 + .../string_decoder/lib/string_decoder.js | 296 + .../node_modules/string_decoder/package.json | 31 + .../node_modules/strip-ansi/index.js | 6 + .../node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/index.js | 50 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 49 + .../node_modules/supports-color/readme.md | 36 + .../node_modules/tmp/.eslintrc.js | 24 + test-eol-project/node_modules/tmp/.npmignore | 2 + test-eol-project/node_modules/tmp/.travis.yml | 15 + .../node_modules/tmp/Gruntfile.js | 18 + test-eol-project/node_modules/tmp/LICENSE | 21 + test-eol-project/node_modules/tmp/README.md | 268 + test-eol-project/node_modules/tmp/cleanup.sh | 3 + .../node_modules/tmp/coverage/coverage.json | 1 + .../tmp/coverage/lcov-report/base.css | 213 + .../tmp/coverage/lcov-report/index.html | 93 + .../tmp/coverage/lcov-report/lib/index.html | 93 + .../tmp/coverage/lcov-report/lib/tmp.js.html | 1448 ++ .../tmp/coverage/lcov-report/prettify.css | 1 + .../tmp/coverage/lcov-report/prettify.js | 1 + .../lcov-report/sort-arrow-sprite.png | Bin 0 -> 209 bytes .../tmp/coverage/lcov-report/sorter.js | 158 + .../node_modules/tmp/coverage/lcov.info | 300 + test-eol-project/node_modules/tmp/lib/tmp.js | 463 + .../node_modules/tmp/package.json | 38 + test-eol-project/node_modules/tmp/run-tests | 7 + .../node_modules/tmp/test/base.js | 149 + .../node_modules/tmp/test/dir-sync-test.js | 230 + .../node_modules/tmp/test/dir-test.js | 225 + .../node_modules/tmp/test/file-sync-test.js | 190 + .../node_modules/tmp/test/file-test.js | 191 + .../node_modules/tmp/test/graceful-sync.js | 20 + .../node_modules/tmp/test/graceful.js | 15 + .../node_modules/tmp/test/issue62-sync.js | 27 + .../node_modules/tmp/test/issue62.js | 27 + .../node_modules/tmp/test/keep-sync.js | 12 + .../node_modules/tmp/test/keep.js | 11 + .../node_modules/tmp/test/name-test.js | 82 + .../node_modules/tmp/test/spawn-sync.js | 32 + .../node_modules/tmp/test/spawn.js | 32 + .../node_modules/tmp/test/symlinkme/file.js | 0 .../node_modules/tmp/test/unsafe-sync.js | 30 + .../node_modules/tmp/test/unsafe.js | 30 + .../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 | 78 + .../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 | 22 + .../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 | 58 + test-eol-project/node_modules/uri-js/LICENSE | 11 + .../node_modules/uri-js/README.md | 203 + .../node_modules/uri-js/dist/es5/uri.all.d.ts | 59 + .../node_modules/uri-js/dist/es5/uri.all.js | 1443 ++ .../uri-js/dist/es5/uri.all.js.map | 1 + .../uri-js/dist/es5/uri.all.min.d.ts | 59 + .../uri-js/dist/es5/uri.all.min.js | 3 + .../uri-js/dist/es5/uri.all.min.js.map | 1 + .../uri-js/dist/esnext/index.d.ts | 1 + .../node_modules/uri-js/dist/esnext/index.js | 17 + .../uri-js/dist/esnext/index.js.map | 1 + .../uri-js/dist/esnext/regexps-iri.d.ts | 3 + .../uri-js/dist/esnext/regexps-iri.js | 3 + .../uri-js/dist/esnext/regexps-iri.js.map | 1 + .../uri-js/dist/esnext/regexps-uri.d.ts | 4 + .../uri-js/dist/esnext/regexps-uri.js | 42 + .../uri-js/dist/esnext/regexps-uri.js.map | 1 + .../uri-js/dist/esnext/schemes/http.d.ts | 3 + .../uri-js/dist/esnext/schemes/http.js | 28 + .../uri-js/dist/esnext/schemes/http.js.map | 1 + .../uri-js/dist/esnext/schemes/https.d.ts | 3 + .../uri-js/dist/esnext/schemes/https.js | 9 + .../uri-js/dist/esnext/schemes/https.js.map | 1 + .../uri-js/dist/esnext/schemes/mailto.d.ts | 12 + .../uri-js/dist/esnext/schemes/mailto.js | 148 + .../uri-js/dist/esnext/schemes/mailto.js.map | 1 + .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 7 + .../uri-js/dist/esnext/schemes/urn-uuid.js | 23 + .../dist/esnext/schemes/urn-uuid.js.map | 1 + .../uri-js/dist/esnext/schemes/urn.d.ts | 10 + .../uri-js/dist/esnext/schemes/urn.js | 49 + .../uri-js/dist/esnext/schemes/urn.js.map | 1 + .../uri-js/dist/esnext/schemes/ws.d.ts | 7 + .../uri-js/dist/esnext/schemes/ws.js | 41 + .../uri-js/dist/esnext/schemes/ws.js.map | 1 + .../uri-js/dist/esnext/schemes/wss.d.ts | 3 + .../uri-js/dist/esnext/schemes/wss.js | 9 + .../uri-js/dist/esnext/schemes/wss.js.map | 1 + .../node_modules/uri-js/dist/esnext/uri.d.ts | 59 + .../node_modules/uri-js/dist/esnext/uri.js | 480 + .../uri-js/dist/esnext/uri.js.map | 1 + .../node_modules/uri-js/dist/esnext/util.d.ts | 6 + .../node_modules/uri-js/dist/esnext/util.js | 36 + .../uri-js/dist/esnext/util.js.map | 1 + .../node_modules/uri-js/package.json | 77 + .../node_modules/uri-js/yarn.lock | 2558 ++++ .../node_modules/util-deprecate/History.md | 16 + .../node_modules/util-deprecate/LICENSE | 24 + .../node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 67 + .../node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 27 + test-eol-project/node_modules/uuid/AUTHORS | 5 + .../node_modules/uuid/CHANGELOG.md | 119 + test-eol-project/node_modules/uuid/LICENSE.md | 21 + test-eol-project/node_modules/uuid/README.md | 276 + test-eol-project/node_modules/uuid/index.js | 8 + .../node_modules/uuid/lib/bytesToUuid.js | 26 + .../node_modules/uuid/lib/md5-browser.js | 216 + test-eol-project/node_modules/uuid/lib/md5.js | 25 + .../node_modules/uuid/lib/rng-browser.js | 34 + test-eol-project/node_modules/uuid/lib/rng.js | 8 + .../node_modules/uuid/lib/sha1-browser.js | 89 + .../node_modules/uuid/lib/sha1.js | 25 + test-eol-project/node_modules/uuid/lib/v35.js | 57 + .../node_modules/uuid/package.json | 49 + test-eol-project/node_modules/uuid/v1.js | 109 + test-eol-project/node_modules/uuid/v3.js | 4 + test-eol-project/node_modules/uuid/v4.js | 29 + test-eol-project/node_modules/uuid/v5.js | 3 + .../node_modules/verror/.npmignore | 9 + .../node_modules/verror/CHANGES.md | 28 + .../node_modules/verror/CONTRIBUTING.md | 19 + test-eol-project/node_modules/verror/LICENSE | 19 + .../node_modules/verror/README.md | 528 + .../node_modules/verror/lib/verror.js | 451 + .../verror/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 | 32 + .../verror/node_modules/core-util-is/test.js | 68 + .../node_modules/verror/package.json | 22 + .../webdriver-js-extender/.travis.yml | 23 + .../webdriver-js-extender/CONTRIBUTING.md | 13 + .../webdriver-js-extender/LICENSE | 22 + .../webdriver-js-extender/README.md | 21 + .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../built/lib/command_definition.d.ts | 11 + .../built/lib/command_definition.js | 33 + .../built/lib/command_definition.js.map | 1 + .../built/lib/command_definitions.d.ts | 48 + .../built/lib/command_definitions.js | 106 + .../built/lib/command_definitions.js.map | 1 + .../built/lib/deferred_executor.d.ts | 10 + .../built/lib/deferred_executor.js | 35 + .../built/lib/deferred_executor.js.map | 1 + .../built/lib/extender.d.ts | 35 + .../built/lib/extender.js | 71 + .../built/lib/extender.js.map | 1 + .../built/lib/index.d.ts | 53 + .../webdriver-js-extender/built/lib/index.js | 15 + .../built/lib/index.js.map | 1 + .../webdriver-js-extender/built/package.json | 39 + .../built/spec/command_tests/helpers.d.ts | 2 + .../built/spec/command_tests/helpers.js | 73 + .../built/spec/command_tests/helpers.js.map | 1 + .../built/spec/command_tests/normal_spec.d.ts | 1 + .../built/spec/command_tests/normal_spec.js | 213 + .../spec/command_tests/normal_spec.js.map | 1 + .../built/spec/command_tests/table_spec.d.ts | 10 + .../built/spec/command_tests/table_spec.js | 95 + .../spec/command_tests/table_spec.js.map | 1 + .../spec/command_tests/totally_real_apk.apk | 1 + .../built/spec/extender_spec.d.ts | 1 + .../built/spec/extender_spec.js | 70 + .../built/spec/extender_spec.js.map | 1 + .../built/spec/index_spec.d.ts | 1 + .../built/spec/index_spec.js | 28 + .../built/spec/index_spec.js.map | 1 + .../spec/mock-server/commands/appium.d.ts | 2 + .../built/spec/mock-server/commands/appium.js | 118 + .../spec/mock-server/commands/appium.js.map | 1 + .../spec/mock-server/commands/chromium.d.ts | 2 + .../spec/mock-server/commands/chromium.js | 14 + .../spec/mock-server/commands/chromium.js.map | 1 + .../spec/mock-server/commands/helpers.d.ts | 12 + .../spec/mock-server/commands/helpers.js | 35 + .../spec/mock-server/commands/helpers.js.map | 1 + .../spec/mock-server/commands/index.d.ts | 2 + .../built/spec/mock-server/commands/index.js | 62 + .../spec/mock-server/commands/index.js.map | 1 + .../spec/mock-server/commands/storage.d.ts | 2 + .../spec/mock-server/commands/storage.js | 39 + .../spec/mock-server/commands/storage.js.map | 1 + .../built/spec/mock-server/index.d.ts | 5 + .../built/spec/mock-server/index.js | 38 + .../built/spec/mock-server/index.js.map | 1 + .../built/spec/mock-server/interfaces.d.ts | 108 + .../built/spec/mock-server/interfaces.js | 3 + .../built/spec/mock-server/interfaces.js.map | 1 + .../built/spec/mockdriver.d.ts | 6 + .../built/spec/mockdriver.js | 23 + .../built/spec/mockdriver.js.map | 1 + .../webdriver-js-extender/gulpfile.js | 58 + .../webdriver-js-extender/package.json | 39 + .../webdriver-js-extender/tsconfig.json | 16 + .../webdriver-manager/.circleci/config.yml | 24 + .../webdriver-manager/CHANGELOG.md | 670 + .../webdriver-manager/CONTRIBUTING.md | 61 + .../node_modules/webdriver-manager/LICENSE | 21 + .../node_modules/webdriver-manager/README.md | 76 + .../webdriver-manager/built/config.json | 18 + .../built/lib/binaries/android_sdk.d.ts | 26 + .../built/lib/binaries/android_sdk.js | 103 + .../built/lib/binaries/android_sdk.js.map | 1 + .../built/lib/binaries/appium.d.ts | 18 + .../built/lib/binaries/appium.js | 42 + .../built/lib/binaries/appium.js.map | 1 + .../built/lib/binaries/binary.d.ts | 66 + .../built/lib/binaries/binary.js | 76 + .../built/lib/binaries/binary.js.map | 1 + .../built/lib/binaries/chrome_driver.d.ts | 12 + .../built/lib/binaries/chrome_driver.js | 38 + .../built/lib/binaries/chrome_driver.js.map | 1 + .../built/lib/binaries/chrome_xml.d.ts | 36 + .../built/lib/binaries/chrome_xml.js | 156 + .../built/lib/binaries/chrome_xml.js.map | 1 + .../built/lib/binaries/config_source.d.ts | 38 + .../built/lib/binaries/config_source.js | 209 + .../built/lib/binaries/config_source.js.map | 1 + .../built/lib/binaries/gecko_driver.d.ts | 13 + .../built/lib/binaries/gecko_driver.js | 50 + .../built/lib/binaries/gecko_driver.js.map | 1 + .../lib/binaries/gecko_driver_github.d.ts | 14 + .../built/lib/binaries/gecko_driver_github.js | 93 + .../lib/binaries/gecko_driver_github.js.map | 1 + .../built/lib/binaries/iedriver.d.ts | 13 + .../built/lib/binaries/iedriver.js | 38 + .../built/lib/binaries/iedriver.js.map | 1 + .../built/lib/binaries/iedriver_xml.d.ts | 9 + .../built/lib/binaries/iedriver_xml.js | 69 + .../built/lib/binaries/iedriver_xml.js.map | 1 + .../built/lib/binaries/index.d.ts | 7 + .../built/lib/binaries/index.js | 13 + .../built/lib/binaries/index.js.map | 1 + .../built/lib/binaries/standalone.d.ts | 13 + .../built/lib/binaries/standalone.js | 41 + .../built/lib/binaries/standalone.js.map | 1 + .../built/lib/binaries/standalone_xml.d.ts | 9 + .../built/lib/binaries/standalone_xml.js | 89 + .../built/lib/binaries/standalone_xml.js.map | 1 + .../webdriver-manager/built/lib/cli/cli.d.ts | 57 + .../webdriver-manager/built/lib/cli/cli.js | 136 + .../built/lib/cli/cli.js.map | 1 + .../built/lib/cli/index.d.ts | 4 + .../webdriver-manager/built/lib/cli/index.js | 10 + .../built/lib/cli/index.js.map | 1 + .../built/lib/cli/logger.d.ts | 95 + .../webdriver-manager/built/lib/cli/logger.js | 264 + .../built/lib/cli/logger.js.map | 1 + .../built/lib/cli/options.d.ts | 22 + .../built/lib/cli/options.js | 67 + .../built/lib/cli/options.js.map | 1 + .../built/lib/cli/programs.d.ts | 93 + .../built/lib/cli/programs.js | 226 + .../built/lib/cli/programs.js.map | 1 + .../built/lib/cli_instance.d.ts | 2 + .../built/lib/cli_instance.js | 18 + .../built/lib/cli_instance.js.map | 1 + .../built/lib/cmds/clean.d.ts | 2 + .../webdriver-manager/built/lib/cmds/clean.js | 39 + .../built/lib/cmds/clean.js.map | 1 + .../built/lib/cmds/index.d.ts | 1 + .../webdriver-manager/built/lib/cmds/index.js | 7 + .../built/lib/cmds/index.js.map | 1 + .../built/lib/cmds/initialize.d.ts | 3 + .../built/lib/cmds/initialize.js | 244 + .../built/lib/cmds/initialize.js.map | 1 + .../built/lib/cmds/opts.d.ts | 38 + .../webdriver-manager/built/lib/cmds/opts.js | 91 + .../built/lib/cmds/opts.js.map | 1 + .../built/lib/cmds/shutdown.d.ts | 2 + .../built/lib/cmds/shutdown.js | 46 + .../built/lib/cmds/shutdown.js.map | 1 + .../built/lib/cmds/start.d.ts | 2 + .../webdriver-manager/built/lib/cmds/start.js | 458 + .../built/lib/cmds/start.js.map | 1 + .../built/lib/cmds/status.d.ts | 2 + .../built/lib/cmds/status.js | 120 + .../built/lib/cmds/status.js.map | 1 + .../built/lib/cmds/update.d.ts | 3 + .../built/lib/cmds/update.js | 300 + .../built/lib/cmds/update.js.map | 1 + .../built/lib/cmds/version.d.ts | 2 + .../built/lib/cmds/version.js | 17 + .../built/lib/cmds/version.js.map | 1 + .../webdriver-manager/built/lib/config.d.ts | 58 + .../webdriver-manager/built/lib/config.js | 95 + .../webdriver-manager/built/lib/config.js.map | 1 + .../built/lib/files/downloaded_binary.d.ts | 14 + .../built/lib/files/downloaded_binary.js | 32 + .../built/lib/files/downloaded_binary.js.map | 1 + .../built/lib/files/downloader.d.ts | 20 + .../built/lib/files/downloader.js | 103 + .../built/lib/files/downloader.js.map | 1 + .../built/lib/files/file_manager.d.ts | 72 + .../built/lib/files/file_manager.js | 239 + .../built/lib/files/file_manager.js.map | 1 + .../built/lib/files/index.d.ts | 3 + .../built/lib/files/index.js | 9 + .../built/lib/files/index.js.map | 1 + .../built/lib/http_utils.d.ts | 27 + .../webdriver-manager/built/lib/http_utils.js | 118 + .../built/lib/http_utils.js.map | 1 + .../webdriver-manager/built/lib/utils.d.ts | 6 + .../webdriver-manager/built/lib/utils.js | 115 + .../webdriver-manager/built/lib/utils.js.map | 1 + .../built/lib/webdriver.d.ts | 0 .../webdriver-manager/built/lib/webdriver.js | 22 + .../built/lib/webdriver.js.map | 1 + .../webdriver-manager/built/package.json | 81 + .../webdriver-manager/config.json | 18 + .../webdriver-manager/docs/README.md | 6 + .../webdriver-manager/docs/mobile.md | 79 + .../webdriver-manager/docs/protractor.md | 41 + .../webdriver-manager/docs/versions.md | 87 + .../webdriver-manager/gulpfile.js | 44 + .../webdriver-manager/package.json | 81 + .../node_modules/which-module/LICENSE | 13 + .../node_modules/which-module/README.md | 58 + .../node_modules/which-module/index.js | 9 + .../node_modules/which-module/package.json | 41 + .../node_modules/wrap-ansi/index.js | 186 + .../node_modules/wrap-ansi/license | 9 + .../node_modules/ansi-regex/index.d.ts | 37 + .../node_modules/ansi-regex/index.js | 10 + .../wrap-ansi/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 55 + .../node_modules/ansi-regex/readme.md | 78 + .../node_modules/ansi-styles/index.d.ts | 345 + .../node_modules/ansi-styles/index.js | 163 + .../node_modules/ansi-styles/license | 9 + .../node_modules/ansi-styles/package.json | 56 + .../node_modules/ansi-styles/readme.md | 152 + .../node_modules/strip-ansi/index.d.ts | 17 + .../node_modules/strip-ansi/index.js | 4 + .../wrap-ansi/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 54 + .../node_modules/strip-ansi/readme.md | 46 + .../node_modules/wrap-ansi/package.json | 61 + .../node_modules/wrap-ansi/readme.md | 97 + test-eol-project/node_modules/wrappy/LICENSE | 15 + .../node_modules/wrappy/README.md | 36 + .../node_modules/wrappy/package.json | 29 + .../node_modules/wrappy/wrappy.js | 33 + test-eol-project/node_modules/xml2js/LICENSE | 19 + .../node_modules/xml2js/README.md | 488 + .../node_modules/xml2js/lib/bom.js | 12 + .../node_modules/xml2js/lib/builder.js | 127 + .../node_modules/xml2js/lib/defaults.js | 72 + .../node_modules/xml2js/lib/parser.js | 381 + .../node_modules/xml2js/lib/processors.js | 34 + .../node_modules/xml2js/lib/xml2js.js | 39 + .../node_modules/xml2js/package.json | 92 + .../node_modules/xmlbuilder/CHANGELOG.md | 470 + .../node_modules/xmlbuilder/LICENSE | 21 + .../node_modules/xmlbuilder/README.md | 86 + .../node_modules/xmlbuilder/appveyor.yml | 20 + .../node_modules/xmlbuilder/lib/Derivation.js | 10 + .../xmlbuilder/lib/DocumentPosition.js | 12 + .../node_modules/xmlbuilder/lib/NodeType.js | 23 + .../xmlbuilder/lib/OperationType.js | 11 + .../node_modules/xmlbuilder/lib/Utility.js | 83 + .../xmlbuilder/lib/WriterState.js | 10 + .../xmlbuilder/lib/XMLAttribute.js | 108 + .../node_modules/xmlbuilder/lib/XMLCData.js | 36 + .../xmlbuilder/lib/XMLCharacterData.js | 79 + .../node_modules/xmlbuilder/lib/XMLComment.js | 36 + .../xmlbuilder/lib/XMLDOMConfiguration.js | 64 + .../xmlbuilder/lib/XMLDOMErrorHandler.js | 16 + .../xmlbuilder/lib/XMLDOMImplementation.js | 32 + .../xmlbuilder/lib/XMLDOMStringList.js | 28 + .../xmlbuilder/lib/XMLDTDAttList.js | 55 + .../xmlbuilder/lib/XMLDTDElement.js | 38 + .../xmlbuilder/lib/XMLDTDEntity.js | 97 + .../xmlbuilder/lib/XMLDTDNotation.js | 52 + .../xmlbuilder/lib/XMLDeclaration.js | 43 + .../node_modules/xmlbuilder/lib/XMLDocType.js | 186 + .../xmlbuilder/lib/XMLDocument.js | 242 + .../xmlbuilder/lib/XMLDocumentCB.js | 528 + .../xmlbuilder/lib/XMLDocumentFragment.js | 24 + .../node_modules/xmlbuilder/lib/XMLDummy.js | 31 + .../node_modules/xmlbuilder/lib/XMLElement.js | 298 + .../xmlbuilder/lib/XMLNamedNodeMap.js | 58 + .../node_modules/xmlbuilder/lib/XMLNode.js | 785 ++ .../xmlbuilder/lib/XMLNodeFilter.js | 48 + .../xmlbuilder/lib/XMLNodeList.js | 28 + .../lib/XMLProcessingInstruction.js | 49 + .../node_modules/xmlbuilder/lib/XMLRaw.js | 35 + .../xmlbuilder/lib/XMLStreamWriter.js | 176 + .../xmlbuilder/lib/XMLStringWriter.js | 35 + .../xmlbuilder/lib/XMLStringifier.js | 240 + .../node_modules/xmlbuilder/lib/XMLText.js | 69 + .../xmlbuilder/lib/XMLTypeInfo.js | 21 + .../xmlbuilder/lib/XMLUserDataHandler.js | 16 + .../xmlbuilder/lib/XMLWriterBase.js | 428 + .../node_modules/xmlbuilder/lib/index.js | 65 + .../node_modules/xmlbuilder/package.json | 39 + .../xmlbuilder/typings/index.d.ts | 153 + .../node_modules/y18n/CHANGELOG.md | 35 + test-eol-project/node_modules/y18n/LICENSE | 13 + test-eol-project/node_modules/y18n/README.md | 109 + test-eol-project/node_modules/y18n/index.js | 188 + .../node_modules/y18n/package.json | 39 + .../node_modules/yargs-parser/CHANGELOG.md | 601 + .../node_modules/yargs-parser/LICENSE.txt | 14 + .../node_modules/yargs-parser/README.md | 449 + .../node_modules/yargs-parser/index.js | 1032 ++ .../yargs-parser/lib/tokenize-arg-string.js | 40 + .../node_modules/yargs-parser/package.json | 46 + .../node_modules/yargs/CHANGELOG.md | 420 + test-eol-project/node_modules/yargs/LICENSE | 21 + test-eol-project/node_modules/yargs/README.md | 140 + .../yargs/build/lib/apply-extends.d.ts | 2 + .../yargs/build/lib/apply-extends.js | 65 + .../node_modules/yargs/build/lib/argsert.d.ts | 2 + .../node_modules/yargs/build/lib/argsert.js | 65 + .../node_modules/yargs/build/lib/command.d.ts | 64 + .../node_modules/yargs/build/lib/command.js | 416 + .../yargs/build/lib/common-types.d.ts | 36 + .../yargs/build/lib/common-types.js | 25 + .../yargs/build/lib/completion-templates.d.ts | 2 + .../yargs/build/lib/completion-templates.js | 50 + .../yargs/build/lib/completion.d.ts | 21 + .../yargs/build/lib/completion.js | 135 + .../yargs/build/lib/is-promise.d.ts | 1 + .../yargs/build/lib/is-promise.js | 9 + .../yargs/build/lib/levenshtein.d.ts | 1 + .../yargs/build/lib/levenshtein.js | 58 + .../yargs/build/lib/middleware.d.ts | 10 + .../yargs/build/lib/middleware.js | 57 + .../yargs/build/lib/obj-filter.d.ts | 1 + .../yargs/build/lib/obj-filter.js | 14 + .../yargs/build/lib/parse-command.d.ts | 11 + .../yargs/build/lib/parse-command.js | 36 + .../yargs/build/lib/process-argv.d.ts | 2 + .../yargs/build/lib/process-argv.js | 31 + .../node_modules/yargs/build/lib/usage.d.ts | 49 + .../node_modules/yargs/build/lib/usage.js | 540 + .../yargs/build/lib/validation.d.ts | 34 + .../yargs/build/lib/validation.js | 330 + .../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 | 11 + test-eol-project/node_modules/yargs/index.js | 40 + .../node_modules/yargs/locales/be.json | 46 + .../node_modules/yargs/locales/de.json | 46 + .../node_modules/yargs/locales/en.json | 51 + .../node_modules/yargs/locales/es.json | 46 + .../node_modules/yargs/locales/fi.json | 49 + .../node_modules/yargs/locales/fr.json | 53 + .../node_modules/yargs/locales/hi.json | 49 + .../node_modules/yargs/locales/hu.json | 46 + .../node_modules/yargs/locales/id.json | 50 + .../node_modules/yargs/locales/it.json | 46 + .../node_modules/yargs/locales/ja.json | 51 + .../node_modules/yargs/locales/ko.json | 49 + .../node_modules/yargs/locales/nb.json | 44 + .../node_modules/yargs/locales/nl.json | 49 + .../node_modules/yargs/locales/nn.json | 44 + .../node_modules/yargs/locales/pirate.json | 13 + .../node_modules/yargs/locales/pl.json | 49 + .../node_modules/yargs/locales/pt.json | 45 + .../node_modules/yargs/locales/pt_BR.json | 48 + .../node_modules/yargs/locales/ru.json | 46 + .../node_modules/yargs/locales/th.json | 46 + .../node_modules/yargs/locales/tr.json | 48 + .../node_modules/yargs/locales/zh_CN.json | 48 + .../node_modules/yargs/locales/zh_TW.json | 47 + .../node_modules/yargs/package.json | 92 + test-eol-project/node_modules/yargs/yargs.js | 14 + test-eol-project/package-lock.json | 1554 +++ test-eol-project/package.json | 8 + 2197 files changed, 334879 insertions(+), 22 deletions(-) create mode 100644 Makefile create mode 100644 cmd/eoltest/main.go create mode 100644 cmd/openssfbuild/main.go create mode 100644 docs/complexity-reduction-plan.md create mode 100644 docs/description/description.json create mode 100644 docs/description/eol_critical.md create mode 100644 docs/description/eol_high.md create mode 100644 docs/description/eol_medium.md create mode 100644 docs/description/eol_minor.md create mode 100644 docs/xeol-api-verification.md create mode 100644 docs/xeol-db-overview.md create mode 100644 internal/openssfdb/builder.go create mode 100644 internal/openssfdb/builder_test.go create mode 100644 internal/openssfdb/testdata/repo/osv/malicious/npm/pkg-one/MAL-TEST-0001.json create mode 100644 internal/openssfdb/testdata/repo/osv/malicious/pypi/pkg-two/MAL-TEST-0002.json create mode 100644 internal/openssfdb/writer.go create mode 100644 internal/tool/eol_scanner.go create mode 100644 internal/tool/eol_scanner_test.go create mode 100644 internal/tool/eol_xeol_lib.go create mode 100644 internal/tool/xeol_stub.go create mode 100644 test-cve-2025-55182/.codacyrc.bak create mode 100644 test-cve-2025-55182/src/javascript/package-lock.json create mode 100644 test-cve-2025-55182/src/javascript/package.json create mode 100644 test-eol-project/README.md create mode 120000 test-eol-project/node_modules/.bin/blocking-proxy create mode 120000 test-eol-project/node_modules/.bin/jasmine create mode 120000 test-eol-project/node_modules/.bin/protractor create mode 120000 test-eol-project/node_modules/.bin/rimraf create mode 120000 test-eol-project/node_modules/.bin/semver create mode 120000 test-eol-project/node_modules/.bin/sshpk-conv create mode 120000 test-eol-project/node_modules/.bin/sshpk-sign create mode 120000 test-eol-project/node_modules/.bin/sshpk-verify create mode 120000 test-eol-project/node_modules/.bin/uuid create mode 120000 test-eol-project/node_modules/.bin/webdriver-manager create mode 100644 test-eol-project/node_modules/.package-lock.json create mode 100644 test-eol-project/node_modules/@types/q/README.md create mode 100644 test-eol-project/node_modules/@types/q/index.d.ts create mode 100644 test-eol-project/node_modules/@types/q/package.json create mode 100644 test-eol-project/node_modules/@types/q/types-metadata.json create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/LICENSE create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/README.md create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/package.json create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts create mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts create mode 100644 test-eol-project/node_modules/adm-zip/LICENSE create mode 100644 test-eol-project/node_modules/adm-zip/README.md create mode 100644 test-eol-project/node_modules/adm-zip/adm-zip.js create mode 100644 test-eol-project/node_modules/adm-zip/headers/entryHeader.js create mode 100644 test-eol-project/node_modules/adm-zip/headers/index.js create mode 100644 test-eol-project/node_modules/adm-zip/headers/mainHeader.js create mode 100644 test-eol-project/node_modules/adm-zip/methods/deflater.js create mode 100644 test-eol-project/node_modules/adm-zip/methods/index.js create mode 100644 test-eol-project/node_modules/adm-zip/methods/inflater.js create mode 100644 test-eol-project/node_modules/adm-zip/methods/zipcrypto.js create mode 100644 test-eol-project/node_modules/adm-zip/package.json create mode 100644 test-eol-project/node_modules/adm-zip/util/constants.js create mode 100644 test-eol-project/node_modules/adm-zip/util/decoder.js create mode 100644 test-eol-project/node_modules/adm-zip/util/errors.js create mode 100644 test-eol-project/node_modules/adm-zip/util/fattr.js create mode 100644 test-eol-project/node_modules/adm-zip/util/index.js create mode 100644 test-eol-project/node_modules/adm-zip/util/utils.js create mode 100644 test-eol-project/node_modules/adm-zip/zipEntry.js create mode 100644 test-eol-project/node_modules/adm-zip/zipFile.js create mode 100644 test-eol-project/node_modules/agent-base/.travis.yml create mode 100644 test-eol-project/node_modules/agent-base/History.md create mode 100644 test-eol-project/node_modules/agent-base/README.md create mode 100644 test-eol-project/node_modules/agent-base/index.d.ts create mode 100644 test-eol-project/node_modules/agent-base/index.js create mode 100644 test-eol-project/node_modules/agent-base/package.json create mode 100644 test-eol-project/node_modules/agent-base/patch-core.js create mode 100644 test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key create mode 100644 test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem create mode 100644 test-eol-project/node_modules/agent-base/test/test.js create mode 100644 test-eol-project/node_modules/ajv/.tonic_example.js create mode 100644 test-eol-project/node_modules/ajv/LICENSE create mode 100644 test-eol-project/node_modules/ajv/README.md create mode 100644 test-eol-project/node_modules/ajv/dist/ajv.bundle.js create mode 100644 test-eol-project/node_modules/ajv/dist/ajv.min.js create mode 100644 test-eol-project/node_modules/ajv/dist/ajv.min.js.map create mode 100644 test-eol-project/node_modules/ajv/lib/ajv.d.ts create mode 100644 test-eol-project/node_modules/ajv/lib/ajv.js create mode 100644 test-eol-project/node_modules/ajv/lib/cache.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/async.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/equal.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/error_classes.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/formats.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/index.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/resolve.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/rules.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/schema_obj.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/ucs2length.js create mode 100644 test-eol-project/node_modules/ajv/lib/compile/util.js create mode 100644 test-eol-project/node_modules/ajv/lib/data.js create mode 100644 test-eol-project/node_modules/ajv/lib/definition_schema.js create mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limit.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/allOf.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/anyOf.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/coerce.def create mode 100644 test-eol-project/node_modules/ajv/lib/dot/comment.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/const.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/contains.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/custom.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/defaults.def create mode 100644 test-eol-project/node_modules/ajv/lib/dot/definitions.def create mode 100644 test-eol-project/node_modules/ajv/lib/dot/dependencies.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/enum.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/errors.def create mode 100644 test-eol-project/node_modules/ajv/lib/dot/format.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/if.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/items.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/missing.def create mode 100644 test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/not.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/oneOf.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/pattern.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/properties.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/ref.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/required.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dot/validate.jst create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/README.md create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limit.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/allOf.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/comment.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/const.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/contains.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/custom.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/enum.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/format.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/if.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/index.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/items.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/not.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/pattern.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/properties.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/ref.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/required.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/validate.js create mode 100644 test-eol-project/node_modules/ajv/lib/keyword.js create mode 100644 test-eol-project/node_modules/ajv/lib/refs/data.json create mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-draft-06.json create mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-draft-07.json create mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-secure.json create mode 100644 test-eol-project/node_modules/ajv/package.json create mode 100644 test-eol-project/node_modules/ajv/scripts/.eslintrc.yml create mode 100644 test-eol-project/node_modules/ajv/scripts/bundle.js create mode 100644 test-eol-project/node_modules/ajv/scripts/compile-dots.js create mode 100755 test-eol-project/node_modules/ajv/scripts/info create mode 100755 test-eol-project/node_modules/ajv/scripts/prepare-tests create mode 100755 test-eol-project/node_modules/ajv/scripts/publish-built-version create mode 100755 test-eol-project/node_modules/ajv/scripts/travis-gh-pages create mode 100644 test-eol-project/node_modules/ansi-regex/index.js create mode 100644 test-eol-project/node_modules/ansi-regex/license create mode 100644 test-eol-project/node_modules/ansi-regex/package.json create mode 100644 test-eol-project/node_modules/ansi-regex/readme.md create mode 100644 test-eol-project/node_modules/ansi-styles/index.js create mode 100644 test-eol-project/node_modules/ansi-styles/license create mode 100644 test-eol-project/node_modules/ansi-styles/package.json create mode 100644 test-eol-project/node_modules/ansi-styles/readme.md create mode 100644 test-eol-project/node_modules/array-union/index.js create mode 100644 test-eol-project/node_modules/array-union/license create mode 100644 test-eol-project/node_modules/array-union/package.json create mode 100644 test-eol-project/node_modules/array-union/readme.md create mode 100644 test-eol-project/node_modules/array-uniq/index.js create mode 100644 test-eol-project/node_modules/array-uniq/license create mode 100644 test-eol-project/node_modules/array-uniq/package.json create mode 100644 test-eol-project/node_modules/array-uniq/readme.md create mode 100644 test-eol-project/node_modules/arrify/index.js create mode 100644 test-eol-project/node_modules/arrify/license create mode 100644 test-eol-project/node_modules/arrify/package.json create mode 100644 test-eol-project/node_modules/arrify/readme.md create mode 100644 test-eol-project/node_modules/asn1/Jenkinsfile create mode 100644 test-eol-project/node_modules/asn1/LICENSE create mode 100644 test-eol-project/node_modules/asn1/README.md create mode 100644 test-eol-project/node_modules/asn1/lib/ber/errors.js create mode 100644 test-eol-project/node_modules/asn1/lib/ber/index.js create mode 100644 test-eol-project/node_modules/asn1/lib/ber/reader.js create mode 100644 test-eol-project/node_modules/asn1/lib/ber/types.js create mode 100644 test-eol-project/node_modules/asn1/lib/ber/writer.js create mode 100644 test-eol-project/node_modules/asn1/lib/index.js create mode 100644 test-eol-project/node_modules/asn1/package.json create mode 100644 test-eol-project/node_modules/assert-plus/AUTHORS create mode 100644 test-eol-project/node_modules/assert-plus/CHANGES.md create mode 100644 test-eol-project/node_modules/assert-plus/README.md create mode 100644 test-eol-project/node_modules/assert-plus/assert.js create mode 100644 test-eol-project/node_modules/assert-plus/package.json create mode 100644 test-eol-project/node_modules/asynckit/LICENSE create mode 100644 test-eol-project/node_modules/asynckit/README.md create mode 100644 test-eol-project/node_modules/asynckit/bench.js create mode 100644 test-eol-project/node_modules/asynckit/index.js create mode 100644 test-eol-project/node_modules/asynckit/lib/abort.js create mode 100644 test-eol-project/node_modules/asynckit/lib/async.js create mode 100644 test-eol-project/node_modules/asynckit/lib/defer.js create mode 100644 test-eol-project/node_modules/asynckit/lib/iterate.js create mode 100644 test-eol-project/node_modules/asynckit/lib/readable_asynckit.js create mode 100644 test-eol-project/node_modules/asynckit/lib/readable_parallel.js create mode 100644 test-eol-project/node_modules/asynckit/lib/readable_serial.js create mode 100644 test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js create mode 100644 test-eol-project/node_modules/asynckit/lib/state.js create mode 100644 test-eol-project/node_modules/asynckit/lib/streamify.js create mode 100644 test-eol-project/node_modules/asynckit/lib/terminator.js create mode 100644 test-eol-project/node_modules/asynckit/package.json create mode 100644 test-eol-project/node_modules/asynckit/parallel.js create mode 100644 test-eol-project/node_modules/asynckit/serial.js create mode 100644 test-eol-project/node_modules/asynckit/serialOrdered.js create mode 100644 test-eol-project/node_modules/asynckit/stream.js create mode 100644 test-eol-project/node_modules/aws-sign2/LICENSE create mode 100644 test-eol-project/node_modules/aws-sign2/README.md create mode 100644 test-eol-project/node_modules/aws-sign2/index.js create mode 100644 test-eol-project/node_modules/aws-sign2/package.json create mode 100644 test-eol-project/node_modules/aws4/LICENSE create mode 100644 test-eol-project/node_modules/aws4/README.md create mode 100644 test-eol-project/node_modules/aws4/aws4.js create mode 100644 test-eol-project/node_modules/aws4/lru.js create mode 100644 test-eol-project/node_modules/aws4/package.json create mode 100644 test-eol-project/node_modules/balanced-match/.github/FUNDING.yml create mode 100644 test-eol-project/node_modules/balanced-match/LICENSE.md create mode 100644 test-eol-project/node_modules/balanced-match/README.md create mode 100644 test-eol-project/node_modules/balanced-match/index.js create mode 100644 test-eol-project/node_modules/balanced-match/package.json create mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/LICENSE create mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/README.md create mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/index.js create mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/package.json create mode 100644 test-eol-project/node_modules/blocking-proxy/.clang-format create mode 100644 test-eol-project/node_modules/blocking-proxy/.nvmrc create mode 100644 test-eol-project/node_modules/blocking-proxy/LICENSE create mode 100644 test-eol-project/node_modules/blocking-proxy/README.md create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/bin.d.ts create mode 100755 test-eol-project/node_modules/blocking-proxy/built/lib/bin.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/config.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/index.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js create mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map create mode 100644 test-eol-project/node_modules/blocking-proxy/circle.yml create mode 100644 test-eol-project/node_modules/blocking-proxy/examples/README.md create mode 100644 test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py create mode 100755 test-eol-project/node_modules/blocking-proxy/examples/run_example.sh create mode 100644 test-eol-project/node_modules/blocking-proxy/gulpfile.js create mode 100644 test-eol-project/node_modules/blocking-proxy/package.json create mode 100644 test-eol-project/node_modules/blocking-proxy/tsconfig.json create mode 100644 test-eol-project/node_modules/blocking-proxy/tslint.json create mode 100644 test-eol-project/node_modules/brace-expansion/LICENSE create mode 100644 test-eol-project/node_modules/brace-expansion/README.md create mode 100644 test-eol-project/node_modules/brace-expansion/index.js create mode 100644 test-eol-project/node_modules/brace-expansion/package.json create mode 100644 test-eol-project/node_modules/browserstack/.editorconfig create mode 100644 test-eol-project/node_modules/browserstack/.jscsrc create mode 100644 test-eol-project/node_modules/browserstack/.jshintrc create mode 100644 test-eol-project/node_modules/browserstack/.travis.yml create mode 100644 test-eol-project/node_modules/browserstack/LICENSE-MIT.txt create mode 100644 test-eol-project/node_modules/browserstack/lib/api.js create mode 100644 test-eol-project/node_modules/browserstack/lib/app-automate.js create mode 100644 test-eol-project/node_modules/browserstack/lib/automate.js create mode 100644 test-eol-project/node_modules/browserstack/lib/browserstack.js create mode 100644 test-eol-project/node_modules/browserstack/lib/client.js create mode 100644 test-eol-project/node_modules/browserstack/lib/extend.js create mode 100644 test-eol-project/node_modules/browserstack/lib/screenshot.js create mode 100644 test-eol-project/node_modules/browserstack/package.json create mode 100644 test-eol-project/node_modules/browserstack/readme.md create mode 100644 test-eol-project/node_modules/browserstack/test/api.js create mode 100644 test-eol-project/node_modules/browserstack/test/client.js create mode 100644 test-eol-project/node_modules/browserstack/test/screenshot.js create mode 100644 test-eol-project/node_modules/browserstack/test/util.js create mode 100644 test-eol-project/node_modules/camelcase/index.d.ts create mode 100644 test-eol-project/node_modules/camelcase/index.js create mode 100644 test-eol-project/node_modules/camelcase/license create mode 100644 test-eol-project/node_modules/camelcase/package.json create mode 100644 test-eol-project/node_modules/camelcase/readme.md create mode 100644 test-eol-project/node_modules/caseless/LICENSE create mode 100644 test-eol-project/node_modules/caseless/README.md create mode 100644 test-eol-project/node_modules/caseless/index.js create mode 100644 test-eol-project/node_modules/caseless/package.json create mode 100644 test-eol-project/node_modules/caseless/test.js create mode 100644 test-eol-project/node_modules/chalk/index.js create mode 100644 test-eol-project/node_modules/chalk/license create mode 100644 test-eol-project/node_modules/chalk/package.json create mode 100644 test-eol-project/node_modules/chalk/readme.md create mode 100644 test-eol-project/node_modules/cliui/CHANGELOG.md create mode 100644 test-eol-project/node_modules/cliui/LICENSE.txt create mode 100644 test-eol-project/node_modules/cliui/README.md create mode 100644 test-eol-project/node_modules/cliui/index.js create mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/index.d.ts create mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/index.js create mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/license create mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/package.json create mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/readme.md create mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/index.d.ts create mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/index.js create mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/license create mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/package.json create mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/readme.md create mode 100644 test-eol-project/node_modules/cliui/package.json create mode 100644 test-eol-project/node_modules/color-convert/CHANGELOG.md create mode 100644 test-eol-project/node_modules/color-convert/LICENSE create mode 100644 test-eol-project/node_modules/color-convert/README.md create mode 100644 test-eol-project/node_modules/color-convert/conversions.js create mode 100644 test-eol-project/node_modules/color-convert/index.js create mode 100644 test-eol-project/node_modules/color-convert/package.json create mode 100644 test-eol-project/node_modules/color-convert/route.js create mode 100644 test-eol-project/node_modules/color-name/LICENSE create mode 100644 test-eol-project/node_modules/color-name/README.md create mode 100644 test-eol-project/node_modules/color-name/index.js create mode 100644 test-eol-project/node_modules/color-name/package.json create mode 100644 test-eol-project/node_modules/combined-stream/License create mode 100644 test-eol-project/node_modules/combined-stream/Readme.md create mode 100644 test-eol-project/node_modules/combined-stream/lib/combined_stream.js create mode 100644 test-eol-project/node_modules/combined-stream/package.json create mode 100644 test-eol-project/node_modules/combined-stream/yarn.lock create mode 100644 test-eol-project/node_modules/concat-map/.travis.yml create mode 100644 test-eol-project/node_modules/concat-map/LICENSE create mode 100644 test-eol-project/node_modules/concat-map/README.markdown create mode 100644 test-eol-project/node_modules/concat-map/example/map.js create mode 100644 test-eol-project/node_modules/concat-map/index.js create mode 100644 test-eol-project/node_modules/concat-map/package.json create mode 100644 test-eol-project/node_modules/concat-map/test/map.js create mode 100644 test-eol-project/node_modules/core-util-is/LICENSE create mode 100644 test-eol-project/node_modules/core-util-is/README.md create mode 100644 test-eol-project/node_modules/core-util-is/lib/util.js create mode 100644 test-eol-project/node_modules/core-util-is/package.json create mode 100644 test-eol-project/node_modules/dashdash/CHANGES.md create mode 100644 test-eol-project/node_modules/dashdash/LICENSE.txt create mode 100644 test-eol-project/node_modules/dashdash/README.md create mode 100644 test-eol-project/node_modules/dashdash/etc/dashdash.bash_completion.in create mode 100644 test-eol-project/node_modules/dashdash/lib/dashdash.js create mode 100644 test-eol-project/node_modules/dashdash/package.json create mode 100644 test-eol-project/node_modules/debug/CHANGELOG.md create mode 100644 test-eol-project/node_modules/debug/LICENSE create mode 100644 test-eol-project/node_modules/debug/README.md create mode 100644 test-eol-project/node_modules/debug/node.js create mode 100644 test-eol-project/node_modules/debug/package.json create mode 100644 test-eol-project/node_modules/debug/src/browser.js create mode 100644 test-eol-project/node_modules/debug/src/common.js create mode 100644 test-eol-project/node_modules/debug/src/index.js create mode 100644 test-eol-project/node_modules/debug/src/node.js create mode 100644 test-eol-project/node_modules/decamelize/index.js create mode 100644 test-eol-project/node_modules/decamelize/license create mode 100644 test-eol-project/node_modules/decamelize/package.json create mode 100644 test-eol-project/node_modules/decamelize/readme.md create mode 100644 test-eol-project/node_modules/del/index.js create mode 100644 test-eol-project/node_modules/del/license create mode 100644 test-eol-project/node_modules/del/package.json create mode 100644 test-eol-project/node_modules/del/readme.md create mode 100644 test-eol-project/node_modules/delayed-stream/.npmignore create mode 100644 test-eol-project/node_modules/delayed-stream/License create mode 100644 test-eol-project/node_modules/delayed-stream/Makefile create mode 100644 test-eol-project/node_modules/delayed-stream/Readme.md create mode 100644 test-eol-project/node_modules/delayed-stream/lib/delayed_stream.js create mode 100644 test-eol-project/node_modules/delayed-stream/package.json create mode 100755 test-eol-project/node_modules/ecc-jsbn/LICENSE create mode 100755 test-eol-project/node_modules/ecc-jsbn/README.md create mode 100755 test-eol-project/node_modules/ecc-jsbn/index.js create mode 100755 test-eol-project/node_modules/ecc-jsbn/lib/LICENSE-jsbn create mode 100755 test-eol-project/node_modules/ecc-jsbn/lib/ec.js create mode 100755 test-eol-project/node_modules/ecc-jsbn/lib/sec.js create mode 100755 test-eol-project/node_modules/ecc-jsbn/package.json create mode 100755 test-eol-project/node_modules/ecc-jsbn/test.js create mode 100644 test-eol-project/node_modules/emoji-regex/LICENSE-MIT.txt create mode 100644 test-eol-project/node_modules/emoji-regex/README.md create mode 100644 test-eol-project/node_modules/emoji-regex/es2015/index.js create mode 100644 test-eol-project/node_modules/emoji-regex/es2015/text.js create mode 100644 test-eol-project/node_modules/emoji-regex/index.d.ts create mode 100644 test-eol-project/node_modules/emoji-regex/index.js create mode 100644 test-eol-project/node_modules/emoji-regex/package.json create mode 100644 test-eol-project/node_modules/emoji-regex/text.js create mode 100644 test-eol-project/node_modules/es6-promise/CHANGELOG.md create mode 100644 test-eol-project/node_modules/es6-promise/LICENSE create mode 100644 test-eol-project/node_modules/es6-promise/README.md create mode 100644 test-eol-project/node_modules/es6-promise/auto.js create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.js create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.map create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.min.js create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.min.map create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.js create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.map create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.min.js create mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.min.map create mode 100644 test-eol-project/node_modules/es6-promise/es6-promise.d.ts create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise.auto.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/-internal.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/asap.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/enumerator.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/polyfill.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/all.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/race.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/reject.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/resolve.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/then.js create mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/utils.js create mode 100644 test-eol-project/node_modules/es6-promise/package.json create mode 100644 test-eol-project/node_modules/es6-promisify/README.md create mode 100644 test-eol-project/node_modules/es6-promisify/dist/promise.js create mode 100644 test-eol-project/node_modules/es6-promisify/dist/promisify.js create mode 100644 test-eol-project/node_modules/es6-promisify/package.json create mode 100644 test-eol-project/node_modules/escape-string-regexp/index.js create mode 100644 test-eol-project/node_modules/escape-string-regexp/license create mode 100644 test-eol-project/node_modules/escape-string-regexp/package.json create mode 100644 test-eol-project/node_modules/escape-string-regexp/readme.md create mode 100644 test-eol-project/node_modules/exit/.jshintrc create mode 100644 test-eol-project/node_modules/exit/.npmignore create mode 100644 test-eol-project/node_modules/exit/.travis.yml create mode 100644 test-eol-project/node_modules/exit/Gruntfile.js create mode 100644 test-eol-project/node_modules/exit/LICENSE-MIT create mode 100644 test-eol-project/node_modules/exit/README.md create mode 100644 test-eol-project/node_modules/exit/lib/exit.js create mode 100644 test-eol-project/node_modules/exit/package.json create mode 100644 test-eol-project/node_modules/exit/test/exit_test.js create mode 100644 test-eol-project/node_modules/exit/test/fixtures/10-stderr.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/10-stdout-stderr.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/10-stdout.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/100-stderr.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/100-stdout-stderr.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/100-stdout.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/1000-stderr.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/1000-stdout-stderr.txt create mode 100644 test-eol-project/node_modules/exit/test/fixtures/1000-stdout.txt create mode 100755 test-eol-project/node_modules/exit/test/fixtures/create-files.sh create mode 100644 test-eol-project/node_modules/exit/test/fixtures/log-broken.js create mode 100644 test-eol-project/node_modules/exit/test/fixtures/log.js create mode 100644 test-eol-project/node_modules/extend/.editorconfig create mode 100644 test-eol-project/node_modules/extend/.eslintrc create mode 100644 test-eol-project/node_modules/extend/.jscs.json create mode 100644 test-eol-project/node_modules/extend/.travis.yml create mode 100644 test-eol-project/node_modules/extend/CHANGELOG.md create mode 100644 test-eol-project/node_modules/extend/LICENSE create mode 100644 test-eol-project/node_modules/extend/README.md create mode 100644 test-eol-project/node_modules/extend/component.json create mode 100644 test-eol-project/node_modules/extend/index.js create mode 100644 test-eol-project/node_modules/extend/package.json create mode 100644 test-eol-project/node_modules/extsprintf/.gitmodules create mode 100644 test-eol-project/node_modules/extsprintf/.npmignore create mode 100644 test-eol-project/node_modules/extsprintf/LICENSE create mode 100644 test-eol-project/node_modules/extsprintf/Makefile create mode 100644 test-eol-project/node_modules/extsprintf/Makefile.targ create mode 100644 test-eol-project/node_modules/extsprintf/README.md create mode 100644 test-eol-project/node_modules/extsprintf/jsl.node.conf create mode 100644 test-eol-project/node_modules/extsprintf/lib/extsprintf.js create mode 100644 test-eol-project/node_modules/extsprintf/package.json create mode 100644 test-eol-project/node_modules/fast-deep-equal/LICENSE create mode 100644 test-eol-project/node_modules/fast-deep-equal/README.md create mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/index.d.ts create mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/index.js create mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/react.d.ts create mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/react.js create mode 100644 test-eol-project/node_modules/fast-deep-equal/index.d.ts create mode 100644 test-eol-project/node_modules/fast-deep-equal/index.js create mode 100644 test-eol-project/node_modules/fast-deep-equal/package.json create mode 100644 test-eol-project/node_modules/fast-deep-equal/react.d.ts create mode 100644 test-eol-project/node_modules/fast-deep-equal/react.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/.eslintrc.yml create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/.github/FUNDING.yml create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/.travis.yml create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/LICENSE create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/README.md create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/benchmark/index.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/benchmark/test.json create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/key_cmp.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/nested.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/str.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/value_cmp.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/index.d.ts create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/index.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/package.json create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/cmp.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/nested.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/str.js create mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/to-json.js create mode 100644 test-eol-project/node_modules/find-up/index.d.ts create mode 100644 test-eol-project/node_modules/find-up/index.js create mode 100644 test-eol-project/node_modules/find-up/license create mode 100644 test-eol-project/node_modules/find-up/package.json create mode 100644 test-eol-project/node_modules/find-up/readme.md create mode 100644 test-eol-project/node_modules/forever-agent/LICENSE create mode 100644 test-eol-project/node_modules/forever-agent/README.md create mode 100644 test-eol-project/node_modules/forever-agent/index.js create mode 100644 test-eol-project/node_modules/forever-agent/package.json create mode 100644 test-eol-project/node_modules/form-data/License create mode 100644 test-eol-project/node_modules/form-data/README.md create mode 100644 test-eol-project/node_modules/form-data/README.md.bak create mode 100644 test-eol-project/node_modules/form-data/lib/browser.js create mode 100644 test-eol-project/node_modules/form-data/lib/form_data.js create mode 100644 test-eol-project/node_modules/form-data/lib/populate.js create mode 100644 test-eol-project/node_modules/form-data/package.json create mode 100644 test-eol-project/node_modules/form-data/yarn.lock create mode 100644 test-eol-project/node_modules/fs.realpath/LICENSE create mode 100644 test-eol-project/node_modules/fs.realpath/README.md create mode 100644 test-eol-project/node_modules/fs.realpath/index.js create mode 100644 test-eol-project/node_modules/fs.realpath/old.js create mode 100644 test-eol-project/node_modules/fs.realpath/package.json create mode 100644 test-eol-project/node_modules/get-caller-file/LICENSE.md create mode 100644 test-eol-project/node_modules/get-caller-file/README.md create mode 100644 test-eol-project/node_modules/get-caller-file/index.d.ts create mode 100644 test-eol-project/node_modules/get-caller-file/index.js create mode 100644 test-eol-project/node_modules/get-caller-file/index.js.map create mode 100644 test-eol-project/node_modules/get-caller-file/package.json create mode 100644 test-eol-project/node_modules/getpass/.npmignore create mode 100644 test-eol-project/node_modules/getpass/.travis.yml create mode 100644 test-eol-project/node_modules/getpass/LICENSE create mode 100644 test-eol-project/node_modules/getpass/README.md create mode 100644 test-eol-project/node_modules/getpass/lib/index.js create mode 100644 test-eol-project/node_modules/getpass/package.json create mode 100644 test-eol-project/node_modules/glob/LICENSE create mode 100644 test-eol-project/node_modules/glob/README.md create mode 100644 test-eol-project/node_modules/glob/common.js create mode 100644 test-eol-project/node_modules/glob/glob.js create mode 100644 test-eol-project/node_modules/glob/package.json create mode 100644 test-eol-project/node_modules/glob/sync.js create mode 100644 test-eol-project/node_modules/globby/index.js create mode 100644 test-eol-project/node_modules/globby/license create mode 100644 test-eol-project/node_modules/globby/package.json create mode 100644 test-eol-project/node_modules/globby/readme.md create mode 100644 test-eol-project/node_modules/har-schema/LICENSE create mode 100644 test-eol-project/node_modules/har-schema/README.md create mode 100644 test-eol-project/node_modules/har-schema/lib/afterRequest.json create mode 100644 test-eol-project/node_modules/har-schema/lib/beforeRequest.json create mode 100644 test-eol-project/node_modules/har-schema/lib/browser.json create mode 100644 test-eol-project/node_modules/har-schema/lib/cache.json create mode 100644 test-eol-project/node_modules/har-schema/lib/content.json create mode 100644 test-eol-project/node_modules/har-schema/lib/cookie.json create mode 100644 test-eol-project/node_modules/har-schema/lib/creator.json create mode 100644 test-eol-project/node_modules/har-schema/lib/entry.json create mode 100644 test-eol-project/node_modules/har-schema/lib/har.json create mode 100644 test-eol-project/node_modules/har-schema/lib/header.json create mode 100644 test-eol-project/node_modules/har-schema/lib/index.js create mode 100644 test-eol-project/node_modules/har-schema/lib/log.json create mode 100644 test-eol-project/node_modules/har-schema/lib/page.json create mode 100644 test-eol-project/node_modules/har-schema/lib/pageTimings.json create mode 100644 test-eol-project/node_modules/har-schema/lib/postData.json create mode 100644 test-eol-project/node_modules/har-schema/lib/query.json create mode 100644 test-eol-project/node_modules/har-schema/lib/request.json create mode 100644 test-eol-project/node_modules/har-schema/lib/response.json create mode 100644 test-eol-project/node_modules/har-schema/lib/timings.json create mode 100644 test-eol-project/node_modules/har-schema/package.json create mode 100644 test-eol-project/node_modules/har-validator/LICENSE create mode 100644 test-eol-project/node_modules/har-validator/README.md create mode 100644 test-eol-project/node_modules/har-validator/lib/async.js create mode 100644 test-eol-project/node_modules/har-validator/lib/error.js create mode 100644 test-eol-project/node_modules/har-validator/lib/promise.js create mode 100644 test-eol-project/node_modules/har-validator/package.json create mode 100644 test-eol-project/node_modules/has-ansi/index.js create mode 100644 test-eol-project/node_modules/has-ansi/license create mode 100644 test-eol-project/node_modules/has-ansi/package.json create mode 100644 test-eol-project/node_modules/has-ansi/readme.md create mode 100644 test-eol-project/node_modules/http-signature/.dir-locals.el create mode 100644 test-eol-project/node_modules/http-signature/.npmignore create mode 100644 test-eol-project/node_modules/http-signature/CHANGES.md create mode 100644 test-eol-project/node_modules/http-signature/LICENSE create mode 100644 test-eol-project/node_modules/http-signature/README.md create mode 100644 test-eol-project/node_modules/http-signature/http_signing.md create mode 100644 test-eol-project/node_modules/http-signature/lib/index.js create mode 100644 test-eol-project/node_modules/http-signature/lib/parser.js create mode 100644 test-eol-project/node_modules/http-signature/lib/signer.js create mode 100644 test-eol-project/node_modules/http-signature/lib/utils.js create mode 100644 test-eol-project/node_modules/http-signature/lib/verify.js create mode 100644 test-eol-project/node_modules/http-signature/package.json create mode 100644 test-eol-project/node_modules/https-proxy-agent/.editorconfig create mode 100644 test-eol-project/node_modules/https-proxy-agent/.eslintrc.js create mode 100644 test-eol-project/node_modules/https-proxy-agent/History.md create mode 100644 test-eol-project/node_modules/https-proxy-agent/README.md create mode 100644 test-eol-project/node_modules/https-proxy-agent/index.d.ts create mode 100644 test-eol-project/node_modules/https-proxy-agent/index.js create mode 100644 test-eol-project/node_modules/https-proxy-agent/package.json create mode 100644 test-eol-project/node_modules/immediate/LICENSE.txt create mode 100644 test-eol-project/node_modules/immediate/README.md create mode 100644 test-eol-project/node_modules/immediate/dist/immediate.js create mode 100644 test-eol-project/node_modules/immediate/dist/immediate.min.js create mode 100644 test-eol-project/node_modules/immediate/lib/browser.js create mode 100644 test-eol-project/node_modules/immediate/lib/index.js create mode 100644 test-eol-project/node_modules/immediate/package.json create mode 100644 test-eol-project/node_modules/inflight/LICENSE create mode 100644 test-eol-project/node_modules/inflight/README.md create mode 100644 test-eol-project/node_modules/inflight/inflight.js create mode 100644 test-eol-project/node_modules/inflight/package.json create mode 100644 test-eol-project/node_modules/inherits/LICENSE create mode 100644 test-eol-project/node_modules/inherits/README.md create mode 100644 test-eol-project/node_modules/inherits/inherits.js create mode 100644 test-eol-project/node_modules/inherits/inherits_browser.js create mode 100644 test-eol-project/node_modules/inherits/package.json create mode 100644 test-eol-project/node_modules/ini/LICENSE create mode 100644 test-eol-project/node_modules/ini/README.md create mode 100644 test-eol-project/node_modules/ini/ini.js create mode 100644 test-eol-project/node_modules/ini/package.json create mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/index.d.ts create mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/index.js create mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/license create mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/package.json create mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/readme.md create mode 100644 test-eol-project/node_modules/is-path-cwd/index.js create mode 100644 test-eol-project/node_modules/is-path-cwd/package.json create mode 100644 test-eol-project/node_modules/is-path-cwd/readme.md create mode 100644 test-eol-project/node_modules/is-path-in-cwd/index.js create mode 100644 test-eol-project/node_modules/is-path-in-cwd/license create mode 100644 test-eol-project/node_modules/is-path-in-cwd/package.json create mode 100644 test-eol-project/node_modules/is-path-in-cwd/readme.md create mode 100644 test-eol-project/node_modules/is-path-inside/index.js create mode 100644 test-eol-project/node_modules/is-path-inside/license create mode 100644 test-eol-project/node_modules/is-path-inside/package.json create mode 100644 test-eol-project/node_modules/is-path-inside/readme.md create mode 100644 test-eol-project/node_modules/is-typedarray/LICENSE.md create mode 100644 test-eol-project/node_modules/is-typedarray/README.md create mode 100644 test-eol-project/node_modules/is-typedarray/index.js create mode 100644 test-eol-project/node_modules/is-typedarray/package.json create mode 100644 test-eol-project/node_modules/is-typedarray/test.js create mode 100644 test-eol-project/node_modules/isarray/.npmignore create mode 100644 test-eol-project/node_modules/isarray/.travis.yml create mode 100644 test-eol-project/node_modules/isarray/Makefile create mode 100644 test-eol-project/node_modules/isarray/README.md create mode 100644 test-eol-project/node_modules/isarray/component.json create mode 100644 test-eol-project/node_modules/isarray/index.js create mode 100644 test-eol-project/node_modules/isarray/package.json create mode 100644 test-eol-project/node_modules/isarray/test.js create mode 100644 test-eol-project/node_modules/isstream/.jshintrc create mode 100644 test-eol-project/node_modules/isstream/.npmignore create mode 100644 test-eol-project/node_modules/isstream/.travis.yml create mode 100644 test-eol-project/node_modules/isstream/LICENSE.md create mode 100644 test-eol-project/node_modules/isstream/README.md create mode 100644 test-eol-project/node_modules/isstream/isstream.js create mode 100644 test-eol-project/node_modules/isstream/package.json create mode 100644 test-eol-project/node_modules/isstream/test.js create mode 100644 test-eol-project/node_modules/jasmine-core/.codeclimate.yml create mode 100644 test-eol-project/node_modules/jasmine-core/.editorconfig create mode 100644 test-eol-project/node_modules/jasmine-core/.github/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/jasmine-core/.github/ISSUE_TEMPLATE.md create mode 100644 test-eol-project/node_modules/jasmine-core/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 test-eol-project/node_modules/jasmine-core/.npmignore create mode 100644 test-eol-project/node_modules/jasmine-core/CODE_OF_CONDUCT.md create mode 100644 test-eol-project/node_modules/jasmine-core/MANIFEST.in create mode 100644 test-eol-project/node_modules/jasmine-core/MIT.LICENSE create mode 100644 test-eol-project/node_modules/jasmine-core/README.md create mode 100644 test-eol-project/node_modules/jasmine-core/RELEASE.md create mode 100644 test-eol-project/node_modules/jasmine-core/bower.json create mode 100644 test-eol-project/node_modules/jasmine-core/images/jasmine-horizontal.png create mode 100644 test-eol-project/node_modules/jasmine-core/images/jasmine-horizontal.svg create mode 100644 test-eol-project/node_modules/jasmine-core/images/jasmine_favicon.png create mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/PKG-INFO create mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/SOURCES.txt create mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/dependency_links.txt create mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/requires.txt create mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/top_level.txt create mode 100644 test-eol-project/node_modules/jasmine-core/lib/console/console.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/boot.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Player.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Song.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples/SpecHelper.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/spec/jasmine_examples/PlayerSpec.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/spec/PlayerSpec.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/spec/SpecHelper.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/src/Player.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/src/Song.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/jasmine.css create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/json2.js create mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/node_boot.js create mode 100644 test-eol-project/node_modules/jasmine-core/package.json create mode 100644 test-eol-project/node_modules/jasmine-core/requirements.txt create mode 100644 test-eol-project/node_modules/jasmine/.travis.yml create mode 100644 test-eol-project/node_modules/jasmine/Gruntfile.js create mode 100644 test-eol-project/node_modules/jasmine/MIT.LICENSE create mode 100644 test-eol-project/node_modules/jasmine/README.md create mode 100644 test-eol-project/node_modules/jasmine/lib/command.js create mode 100644 test-eol-project/node_modules/jasmine/lib/examples/jasmine.json create mode 100644 test-eol-project/node_modules/jasmine/lib/exit.js create mode 100644 test-eol-project/node_modules/jasmine/lib/filters/console_spec_filter.js create mode 100644 test-eol-project/node_modules/jasmine/lib/jasmine.js create mode 100644 test-eol-project/node_modules/jasmine/lib/printDeprecation.js create mode 100644 test-eol-project/node_modules/jasmine/lib/reporters/completion_reporter.js create mode 100644 test-eol-project/node_modules/jasmine/lib/reporters/console_reporter.js create mode 100644 test-eol-project/node_modules/jasmine/package.json create mode 100644 test-eol-project/node_modules/jasmine/tasks/jasmine.js create mode 100644 test-eol-project/node_modules/jasminewd2/CHANGELOG.md create mode 100644 test-eol-project/node_modules/jasminewd2/LICENSE create mode 100644 test-eol-project/node_modules/jasminewd2/README.md create mode 100644 test-eol-project/node_modules/jasminewd2/index.js create mode 100644 test-eol-project/node_modules/jasminewd2/maybePromise.js create mode 100644 test-eol-project/node_modules/jasminewd2/package.json create mode 100644 test-eol-project/node_modules/jasminewd2/scheduler.md create mode 100644 test-eol-project/node_modules/jsbn/.npmignore create mode 100644 test-eol-project/node_modules/jsbn/LICENSE create mode 100644 test-eol-project/node_modules/jsbn/README.md create mode 100644 test-eol-project/node_modules/jsbn/example.html create mode 100644 test-eol-project/node_modules/jsbn/example.js create mode 100644 test-eol-project/node_modules/jsbn/index.js create mode 100644 test-eol-project/node_modules/jsbn/package.json create mode 100644 test-eol-project/node_modules/json-schema-traverse/.eslintrc.yml create mode 100644 test-eol-project/node_modules/json-schema-traverse/.travis.yml create mode 100644 test-eol-project/node_modules/json-schema-traverse/LICENSE create mode 100644 test-eol-project/node_modules/json-schema-traverse/README.md create mode 100644 test-eol-project/node_modules/json-schema-traverse/index.js create mode 100644 test-eol-project/node_modules/json-schema-traverse/package.json create mode 100644 test-eol-project/node_modules/json-schema-traverse/spec/.eslintrc.yml create mode 100644 test-eol-project/node_modules/json-schema-traverse/spec/fixtures/schema.js create mode 100644 test-eol-project/node_modules/json-schema-traverse/spec/index.spec.js create mode 100644 test-eol-project/node_modules/json-schema/LICENSE create mode 100644 test-eol-project/node_modules/json-schema/README.md create mode 100644 test-eol-project/node_modules/json-schema/lib/links.js create mode 100644 test-eol-project/node_modules/json-schema/lib/validate.js create mode 100644 test-eol-project/node_modules/json-schema/package.json create mode 100644 test-eol-project/node_modules/json-stringify-safe/.npmignore create mode 100644 test-eol-project/node_modules/json-stringify-safe/CHANGELOG.md create mode 100644 test-eol-project/node_modules/json-stringify-safe/LICENSE create mode 100644 test-eol-project/node_modules/json-stringify-safe/Makefile create mode 100644 test-eol-project/node_modules/json-stringify-safe/README.md create mode 100644 test-eol-project/node_modules/json-stringify-safe/package.json create mode 100644 test-eol-project/node_modules/json-stringify-safe/stringify.js create mode 100644 test-eol-project/node_modules/json-stringify-safe/test/mocha.opts create mode 100644 test-eol-project/node_modules/json-stringify-safe/test/stringify_test.js create mode 100644 test-eol-project/node_modules/jsprim/CHANGES.md create mode 100644 test-eol-project/node_modules/jsprim/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/jsprim/LICENSE create mode 100644 test-eol-project/node_modules/jsprim/README.md create mode 100644 test-eol-project/node_modules/jsprim/lib/jsprim.js create mode 100644 test-eol-project/node_modules/jsprim/package.json create mode 100644 test-eol-project/node_modules/jszip/.codeclimate.yml create mode 100644 test-eol-project/node_modules/jszip/.editorconfig create mode 100644 test-eol-project/node_modules/jszip/.eslintrc.js create mode 100644 test-eol-project/node_modules/jszip/.github/workflows/pr.yaml create mode 100644 test-eol-project/node_modules/jszip/.jekyll-metadata create mode 100644 test-eol-project/node_modules/jszip/.travis.yml create mode 100644 test-eol-project/node_modules/jszip/CHANGES.md create mode 100644 test-eol-project/node_modules/jszip/LICENSE.markdown create mode 100644 test-eol-project/node_modules/jszip/README.markdown create mode 100644 test-eol-project/node_modules/jszip/deps.js create mode 100644 test-eol-project/node_modules/jszip/dist/jszip.js create mode 100644 test-eol-project/node_modules/jszip/dist/jszip.min.js create mode 100644 test-eol-project/node_modules/jszip/graph.svg create mode 100644 test-eol-project/node_modules/jszip/index.d.ts create mode 100644 test-eol-project/node_modules/jszip/lib/base64.js create mode 100644 test-eol-project/node_modules/jszip/lib/compressedObject.js create mode 100644 test-eol-project/node_modules/jszip/lib/compressions.js create mode 100644 test-eol-project/node_modules/jszip/lib/crc32.js create mode 100644 test-eol-project/node_modules/jszip/lib/defaults.js create mode 100644 test-eol-project/node_modules/jszip/lib/external.js create mode 100644 test-eol-project/node_modules/jszip/lib/flate.js create mode 100644 test-eol-project/node_modules/jszip/lib/generate/ZipFileWorker.js create mode 100644 test-eol-project/node_modules/jszip/lib/generate/index.js create mode 100644 test-eol-project/node_modules/jszip/lib/index.js create mode 100644 test-eol-project/node_modules/jszip/lib/license_header.js create mode 100644 test-eol-project/node_modules/jszip/lib/load.js create mode 100644 test-eol-project/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js create mode 100644 test-eol-project/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js create mode 100644 test-eol-project/node_modules/jszip/lib/nodejsUtils.js create mode 100644 test-eol-project/node_modules/jszip/lib/object.js create mode 100644 test-eol-project/node_modules/jszip/lib/readable-stream-browser.js create mode 100644 test-eol-project/node_modules/jszip/lib/reader/ArrayReader.js create mode 100644 test-eol-project/node_modules/jszip/lib/reader/DataReader.js create mode 100644 test-eol-project/node_modules/jszip/lib/reader/NodeBufferReader.js create mode 100644 test-eol-project/node_modules/jszip/lib/reader/StringReader.js create mode 100644 test-eol-project/node_modules/jszip/lib/reader/Uint8ArrayReader.js create mode 100644 test-eol-project/node_modules/jszip/lib/reader/readerFor.js create mode 100644 test-eol-project/node_modules/jszip/lib/signature.js create mode 100644 test-eol-project/node_modules/jszip/lib/stream/ConvertWorker.js create mode 100644 test-eol-project/node_modules/jszip/lib/stream/Crc32Probe.js create mode 100644 test-eol-project/node_modules/jszip/lib/stream/DataLengthProbe.js create mode 100644 test-eol-project/node_modules/jszip/lib/stream/DataWorker.js create mode 100644 test-eol-project/node_modules/jszip/lib/stream/GenericWorker.js create mode 100644 test-eol-project/node_modules/jszip/lib/stream/StreamHelper.js create mode 100644 test-eol-project/node_modules/jszip/lib/support.js create mode 100644 test-eol-project/node_modules/jszip/lib/utf8.js create mode 100644 test-eol-project/node_modules/jszip/lib/utils.js create mode 100644 test-eol-project/node_modules/jszip/lib/zipEntries.js create mode 100644 test-eol-project/node_modules/jszip/lib/zipEntry.js create mode 100644 test-eol-project/node_modules/jszip/lib/zipObject.js create mode 100644 test-eol-project/node_modules/jszip/package.json create mode 100644 test-eol-project/node_modules/jszip/sponsors.md create mode 100644 test-eol-project/node_modules/jszip/tsconfig.json create mode 100644 test-eol-project/node_modules/jszip/vendor/FileSaver.js create mode 100644 test-eol-project/node_modules/lie/README.md create mode 100644 test-eol-project/node_modules/lie/dist/lie.js create mode 100644 test-eol-project/node_modules/lie/dist/lie.min.js create mode 100644 test-eol-project/node_modules/lie/dist/lie.polyfill.js create mode 100644 test-eol-project/node_modules/lie/dist/lie.polyfill.min.js create mode 100644 test-eol-project/node_modules/lie/lib/browser.js create mode 100644 test-eol-project/node_modules/lie/lib/index.js create mode 100644 test-eol-project/node_modules/lie/license.md create mode 100644 test-eol-project/node_modules/lie/lie.d.ts create mode 100644 test-eol-project/node_modules/lie/package.json create mode 100644 test-eol-project/node_modules/lie/polyfill.js create mode 100644 test-eol-project/node_modules/locate-path/index.d.ts create mode 100644 test-eol-project/node_modules/locate-path/index.js create mode 100644 test-eol-project/node_modules/locate-path/license create mode 100644 test-eol-project/node_modules/locate-path/package.json create mode 100644 test-eol-project/node_modules/locate-path/readme.md create mode 100644 test-eol-project/node_modules/mime-db/HISTORY.md create mode 100644 test-eol-project/node_modules/mime-db/LICENSE create mode 100644 test-eol-project/node_modules/mime-db/README.md create mode 100644 test-eol-project/node_modules/mime-db/db.json create mode 100644 test-eol-project/node_modules/mime-db/index.js create mode 100644 test-eol-project/node_modules/mime-db/package.json create mode 100644 test-eol-project/node_modules/mime-types/HISTORY.md create mode 100644 test-eol-project/node_modules/mime-types/LICENSE create mode 100644 test-eol-project/node_modules/mime-types/README.md create mode 100644 test-eol-project/node_modules/mime-types/index.js create mode 100644 test-eol-project/node_modules/mime-types/package.json create mode 100644 test-eol-project/node_modules/minimatch/LICENSE create mode 100644 test-eol-project/node_modules/minimatch/README.md create mode 100644 test-eol-project/node_modules/minimatch/minimatch.js create mode 100644 test-eol-project/node_modules/minimatch/package.json create mode 100644 test-eol-project/node_modules/minimist/.eslintrc create mode 100644 test-eol-project/node_modules/minimist/.github/FUNDING.yml create mode 100644 test-eol-project/node_modules/minimist/.nycrc create mode 100644 test-eol-project/node_modules/minimist/CHANGELOG.md create mode 100644 test-eol-project/node_modules/minimist/LICENSE create mode 100644 test-eol-project/node_modules/minimist/README.md create mode 100644 test-eol-project/node_modules/minimist/example/parse.js create mode 100644 test-eol-project/node_modules/minimist/index.js create mode 100644 test-eol-project/node_modules/minimist/package.json create mode 100644 test-eol-project/node_modules/minimist/test/all_bool.js create mode 100644 test-eol-project/node_modules/minimist/test/bool.js create mode 100644 test-eol-project/node_modules/minimist/test/dash.js create mode 100644 test-eol-project/node_modules/minimist/test/default_bool.js create mode 100644 test-eol-project/node_modules/minimist/test/dotted.js create mode 100644 test-eol-project/node_modules/minimist/test/kv_short.js create mode 100644 test-eol-project/node_modules/minimist/test/long.js create mode 100644 test-eol-project/node_modules/minimist/test/num.js create mode 100644 test-eol-project/node_modules/minimist/test/parse.js create mode 100644 test-eol-project/node_modules/minimist/test/parse_modified.js create mode 100644 test-eol-project/node_modules/minimist/test/proto.js create mode 100644 test-eol-project/node_modules/minimist/test/short.js create mode 100644 test-eol-project/node_modules/minimist/test/stop_early.js create mode 100644 test-eol-project/node_modules/minimist/test/unknown.js create mode 100644 test-eol-project/node_modules/minimist/test/whitespace.js create mode 100644 test-eol-project/node_modules/ms/index.js create mode 100644 test-eol-project/node_modules/ms/license.md create mode 100644 test-eol-project/node_modules/ms/package.json create mode 100644 test-eol-project/node_modules/ms/readme.md create mode 100644 test-eol-project/node_modules/oauth-sign/LICENSE create mode 100644 test-eol-project/node_modules/oauth-sign/README.md create mode 100644 test-eol-project/node_modules/oauth-sign/index.js create mode 100644 test-eol-project/node_modules/oauth-sign/package.json create mode 100644 test-eol-project/node_modules/object-assign/index.js create mode 100644 test-eol-project/node_modules/object-assign/license create mode 100644 test-eol-project/node_modules/object-assign/package.json create mode 100644 test-eol-project/node_modules/object-assign/readme.md create mode 100644 test-eol-project/node_modules/once/LICENSE create mode 100644 test-eol-project/node_modules/once/README.md create mode 100644 test-eol-project/node_modules/once/once.js create mode 100644 test-eol-project/node_modules/once/package.json create mode 100644 test-eol-project/node_modules/os-tmpdir/index.js create mode 100644 test-eol-project/node_modules/os-tmpdir/license create mode 100644 test-eol-project/node_modules/os-tmpdir/package.json create mode 100644 test-eol-project/node_modules/os-tmpdir/readme.md create mode 100644 test-eol-project/node_modules/p-limit/index.d.ts create mode 100644 test-eol-project/node_modules/p-limit/index.js create mode 100644 test-eol-project/node_modules/p-limit/license create mode 100644 test-eol-project/node_modules/p-limit/package.json create mode 100644 test-eol-project/node_modules/p-limit/readme.md create mode 100644 test-eol-project/node_modules/p-locate/index.d.ts create mode 100644 test-eol-project/node_modules/p-locate/index.js create mode 100644 test-eol-project/node_modules/p-locate/license create mode 100644 test-eol-project/node_modules/p-locate/package.json create mode 100644 test-eol-project/node_modules/p-locate/readme.md create mode 100644 test-eol-project/node_modules/p-try/index.d.ts create mode 100644 test-eol-project/node_modules/p-try/index.js create mode 100644 test-eol-project/node_modules/p-try/license create mode 100644 test-eol-project/node_modules/p-try/package.json create mode 100644 test-eol-project/node_modules/p-try/readme.md create mode 100644 test-eol-project/node_modules/pako/CHANGELOG.md create mode 100644 test-eol-project/node_modules/pako/LICENSE create mode 100644 test-eol-project/node_modules/pako/README.md create mode 100644 test-eol-project/node_modules/pako/dist/pako.js create mode 100644 test-eol-project/node_modules/pako/dist/pako.min.js create mode 100644 test-eol-project/node_modules/pako/dist/pako_deflate.js create mode 100644 test-eol-project/node_modules/pako/dist/pako_deflate.min.js create mode 100644 test-eol-project/node_modules/pako/dist/pako_inflate.js create mode 100644 test-eol-project/node_modules/pako/dist/pako_inflate.min.js create mode 100644 test-eol-project/node_modules/pako/index.js create mode 100644 test-eol-project/node_modules/pako/lib/deflate.js create mode 100644 test-eol-project/node_modules/pako/lib/inflate.js create mode 100644 test-eol-project/node_modules/pako/lib/utils/common.js create mode 100644 test-eol-project/node_modules/pako/lib/utils/strings.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/README create mode 100644 test-eol-project/node_modules/pako/lib/zlib/adler32.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/constants.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/crc32.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/deflate.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/gzheader.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/inffast.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/inflate.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/inftrees.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/messages.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/trees.js create mode 100644 test-eol-project/node_modules/pako/lib/zlib/zstream.js create mode 100644 test-eol-project/node_modules/pako/package.json create mode 100644 test-eol-project/node_modules/path-exists/index.d.ts create mode 100644 test-eol-project/node_modules/path-exists/index.js create mode 100644 test-eol-project/node_modules/path-exists/license create mode 100644 test-eol-project/node_modules/path-exists/package.json create mode 100644 test-eol-project/node_modules/path-exists/readme.md create mode 100644 test-eol-project/node_modules/path-is-absolute/index.js create mode 100644 test-eol-project/node_modules/path-is-absolute/license create mode 100644 test-eol-project/node_modules/path-is-absolute/package.json create mode 100644 test-eol-project/node_modules/path-is-absolute/readme.md create mode 100644 test-eol-project/node_modules/path-is-inside/LICENSE.txt create mode 100644 test-eol-project/node_modules/path-is-inside/lib/path-is-inside.js create mode 100644 test-eol-project/node_modules/path-is-inside/package.json create mode 100644 test-eol-project/node_modules/performance-now/.npmignore create mode 100644 test-eol-project/node_modules/performance-now/.tm_properties create mode 100644 test-eol-project/node_modules/performance-now/.travis.yml create mode 100644 test-eol-project/node_modules/performance-now/README.md create mode 100644 test-eol-project/node_modules/performance-now/lib/performance-now.js create mode 100644 test-eol-project/node_modules/performance-now/lib/performance-now.js.map create mode 100644 test-eol-project/node_modules/performance-now/license.txt create mode 100644 test-eol-project/node_modules/performance-now/package.json create mode 100644 test-eol-project/node_modules/performance-now/src/index.d.ts create mode 100644 test-eol-project/node_modules/performance-now/src/performance-now.coffee create mode 100644 test-eol-project/node_modules/performance-now/test/mocha.opts create mode 100644 test-eol-project/node_modules/performance-now/test/performance-now.coffee create mode 100644 test-eol-project/node_modules/performance-now/test/scripts.coffee create mode 100755 test-eol-project/node_modules/performance-now/test/scripts/delayed-call.coffee create mode 100755 test-eol-project/node_modules/performance-now/test/scripts/delayed-require.coffee create mode 100755 test-eol-project/node_modules/performance-now/test/scripts/difference.coffee create mode 100755 test-eol-project/node_modules/performance-now/test/scripts/initial-value.coffee create mode 100644 test-eol-project/node_modules/pify/index.js create mode 100644 test-eol-project/node_modules/pify/license create mode 100644 test-eol-project/node_modules/pify/package.json create mode 100644 test-eol-project/node_modules/pify/readme.md create mode 100644 test-eol-project/node_modules/pinkie-promise/index.js create mode 100644 test-eol-project/node_modules/pinkie-promise/license create mode 100644 test-eol-project/node_modules/pinkie-promise/package.json create mode 100644 test-eol-project/node_modules/pinkie-promise/readme.md create mode 100644 test-eol-project/node_modules/pinkie/index.js create mode 100644 test-eol-project/node_modules/pinkie/license create mode 100644 test-eol-project/node_modules/pinkie/package.json create mode 100644 test-eol-project/node_modules/pinkie/readme.md create mode 100644 test-eol-project/node_modules/process-nextick-args/index.js create mode 100644 test-eol-project/node_modules/process-nextick-args/license.md create mode 100644 test-eol-project/node_modules/process-nextick-args/package.json create mode 100644 test-eol-project/node_modules/process-nextick-args/readme.md create mode 100644 test-eol-project/node_modules/protractor/.circleci/config.yml create mode 100644 test-eol-project/node_modules/protractor/.jshintignore create mode 100644 test-eol-project/node_modules/protractor/CHANGELOG.md create mode 100644 test-eol-project/node_modules/protractor/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/protractor/DEVELOPER.md create mode 100644 test-eol-project/node_modules/protractor/LICENSE create mode 100644 test-eol-project/node_modules/protractor/README.md create mode 100644 test-eol-project/node_modules/protractor/built/bpRunner.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/bpRunner.js create mode 100644 test-eol-project/node_modules/protractor/built/breakpointhook.js create mode 100644 test-eol-project/node_modules/protractor/built/browser.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/browser.js create mode 100644 test-eol-project/node_modules/protractor/built/cli.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/cli.js create mode 100644 test-eol-project/node_modules/protractor/built/clientsidescripts.js create mode 100644 test-eol-project/node_modules/protractor/built/config.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/config.js create mode 100644 test-eol-project/node_modules/protractor/built/configParser.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/configParser.js create mode 100644 test-eol-project/node_modules/protractor/built/debugger.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/debugger.js create mode 100644 test-eol-project/node_modules/protractor/built/debugger/clients/explorer.js create mode 100644 test-eol-project/node_modules/protractor/built/debugger/clients/wddebugger.js create mode 100644 test-eol-project/node_modules/protractor/built/debugger/debuggerCommons.js create mode 100644 test-eol-project/node_modules/protractor/built/debugger/modes/commandRepl.js create mode 100644 test-eol-project/node_modules/protractor/built/debugger/modes/debuggerRepl.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/attachSession.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/attachSession.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/browserStack.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/browserStack.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/direct.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/direct.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/driverProvider.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/driverProvider.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/hosted.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/hosted.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/index.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/index.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/kobiton.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/kobiton.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/local.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/local.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/mock.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/mock.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/sauce.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/sauce.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/testObject.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/testObject.js create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/useExistingWebDriver.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/useExistingWebDriver.js create mode 100644 test-eol-project/node_modules/protractor/built/element.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/element.js create mode 100644 test-eol-project/node_modules/protractor/built/exitCodes.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/exitCodes.js create mode 100644 test-eol-project/node_modules/protractor/built/expectedConditions.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/expectedConditions.js create mode 100644 test-eol-project/node_modules/protractor/built/frameworks/__protractor_internal_afterEach_setup_spec.js create mode 100644 test-eol-project/node_modules/protractor/built/frameworks/debugprint.js create mode 100644 test-eol-project/node_modules/protractor/built/frameworks/explorer.js create mode 100644 test-eol-project/node_modules/protractor/built/frameworks/jasmine.js create mode 100644 test-eol-project/node_modules/protractor/built/frameworks/mocha.js create mode 100644 test-eol-project/node_modules/protractor/built/frameworks/setupAfterEach.js create mode 100644 test-eol-project/node_modules/protractor/built/index.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/index.js create mode 100644 test-eol-project/node_modules/protractor/built/launcher.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/launcher.js create mode 100644 test-eol-project/node_modules/protractor/built/locators.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/locators.js create mode 100644 test-eol-project/node_modules/protractor/built/logger.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/logger.js create mode 100644 test-eol-project/node_modules/protractor/built/plugins.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/plugins.js create mode 100644 test-eol-project/node_modules/protractor/built/ptor.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/ptor.js create mode 100644 test-eol-project/node_modules/protractor/built/runner.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/runner.js create mode 100644 test-eol-project/node_modules/protractor/built/runnerCli.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/runnerCli.js create mode 100644 test-eol-project/node_modules/protractor/built/selenium-webdriver/locators.js create mode 100644 test-eol-project/node_modules/protractor/built/selenium-webdriver/webdriver.js create mode 100644 test-eol-project/node_modules/protractor/built/taskLogger.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/taskLogger.js create mode 100644 test-eol-project/node_modules/protractor/built/taskRunner.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/taskRunner.js create mode 100644 test-eol-project/node_modules/protractor/built/taskScheduler.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/taskScheduler.js create mode 100644 test-eol-project/node_modules/protractor/built/util.d.ts create mode 100644 test-eol-project/node_modules/protractor/built/util.js create mode 100644 test-eol-project/node_modules/protractor/built/webdriver-js-extender/index.js create mode 100644 test-eol-project/node_modules/protractor/example/angular_material/conf.js create mode 100644 test-eol-project/node_modules/protractor/example/angular_material/input_spec.js create mode 100644 test-eol-project/node_modules/protractor/example/angular_material/mat_paginator_spec.js create mode 100644 test-eol-project/node_modules/protractor/example/conf.js create mode 100644 test-eol-project/node_modules/protractor/example/example_spec.js create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/README.md create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/angularPage.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/asyncAwait/README.md create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/asyncAwait/conf.js create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/asyncAwait/spec.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/conf.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/confPageObjects.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/package.json create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/plugins.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/spec.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/specPageObjects.ts create mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/tsconfig.json create mode 100644 test-eol-project/node_modules/protractor/gulpfile.js create mode 100644 test-eol-project/node_modules/protractor/package.json create mode 100644 test-eol-project/node_modules/protractor/ts_spec_config.json create mode 100644 test-eol-project/node_modules/protractor/tsconfig.json create mode 100644 test-eol-project/node_modules/protractor/tslint.json create mode 100644 test-eol-project/node_modules/psl/LICENSE create mode 100644 test-eol-project/node_modules/psl/README.md create mode 100644 test-eol-project/node_modules/psl/SECURITY.md create mode 100644 test-eol-project/node_modules/psl/browserstack-logo.svg create mode 100644 test-eol-project/node_modules/psl/data/rules.js create mode 100644 test-eol-project/node_modules/psl/dist/psl.cjs create mode 100644 test-eol-project/node_modules/psl/dist/psl.mjs create mode 100644 test-eol-project/node_modules/psl/dist/psl.umd.cjs create mode 100644 test-eol-project/node_modules/psl/index.js create mode 100644 test-eol-project/node_modules/psl/package.json create mode 100644 test-eol-project/node_modules/psl/types/index.d.ts create mode 100644 test-eol-project/node_modules/psl/types/test.ts create mode 100644 test-eol-project/node_modules/psl/types/tsconfig.json create mode 100644 test-eol-project/node_modules/psl/vite.config.js create mode 100644 test-eol-project/node_modules/punycode/LICENSE-MIT.txt create mode 100644 test-eol-project/node_modules/punycode/README.md create mode 100644 test-eol-project/node_modules/punycode/package.json create mode 100644 test-eol-project/node_modules/punycode/punycode.es6.js create mode 100644 test-eol-project/node_modules/punycode/punycode.js create mode 100644 test-eol-project/node_modules/q/CHANGES.md create mode 100644 test-eol-project/node_modules/q/LICENSE create mode 100644 test-eol-project/node_modules/q/README.md create mode 100644 test-eol-project/node_modules/q/package.json create mode 100644 test-eol-project/node_modules/q/q.js create mode 100644 test-eol-project/node_modules/q/queue.js create mode 100644 test-eol-project/node_modules/qs/.editorconfig create mode 100644 test-eol-project/node_modules/qs/.eslintrc create mode 100644 test-eol-project/node_modules/qs/.github/FUNDING.yml create mode 100644 test-eol-project/node_modules/qs/.nycrc create mode 100644 test-eol-project/node_modules/qs/CHANGELOG.md create mode 100644 test-eol-project/node_modules/qs/LICENSE.md create mode 100644 test-eol-project/node_modules/qs/README.md create mode 100644 test-eol-project/node_modules/qs/dist/qs.js create mode 100644 test-eol-project/node_modules/qs/lib/formats.js create mode 100644 test-eol-project/node_modules/qs/lib/index.js create mode 100644 test-eol-project/node_modules/qs/lib/parse.js create mode 100644 test-eol-project/node_modules/qs/lib/stringify.js create mode 100644 test-eol-project/node_modules/qs/lib/utils.js create mode 100644 test-eol-project/node_modules/qs/package.json create mode 100644 test-eol-project/node_modules/qs/test/index.js create mode 100644 test-eol-project/node_modules/qs/test/parse.js create mode 100644 test-eol-project/node_modules/qs/test/stringify.js create mode 100644 test-eol-project/node_modules/qs/test/utils.js create mode 100644 test-eol-project/node_modules/readable-stream/.travis.yml create mode 100644 test-eol-project/node_modules/readable-stream/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/readable-stream/GOVERNANCE.md create mode 100644 test-eol-project/node_modules/readable-stream/LICENSE create mode 100644 test-eol-project/node_modules/readable-stream/README.md create mode 100644 test-eol-project/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 test-eol-project/node_modules/readable-stream/duplex-browser.js create mode 100644 test-eol-project/node_modules/readable-stream/duplex.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/BufferList.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 test-eol-project/node_modules/readable-stream/package.json create mode 100644 test-eol-project/node_modules/readable-stream/passthrough.js create mode 100644 test-eol-project/node_modules/readable-stream/readable-browser.js create mode 100644 test-eol-project/node_modules/readable-stream/readable.js create mode 100644 test-eol-project/node_modules/readable-stream/transform.js create mode 100644 test-eol-project/node_modules/readable-stream/writable-browser.js create mode 100644 test-eol-project/node_modules/readable-stream/writable.js create mode 100644 test-eol-project/node_modules/request/CHANGELOG.md create mode 100644 test-eol-project/node_modules/request/LICENSE create mode 100644 test-eol-project/node_modules/request/README.md create mode 100755 test-eol-project/node_modules/request/index.js create mode 100644 test-eol-project/node_modules/request/lib/auth.js create mode 100644 test-eol-project/node_modules/request/lib/cookies.js create mode 100644 test-eol-project/node_modules/request/lib/getProxyFromURI.js create mode 100644 test-eol-project/node_modules/request/lib/har.js create mode 100644 test-eol-project/node_modules/request/lib/hawk.js create mode 100644 test-eol-project/node_modules/request/lib/helpers.js create mode 100644 test-eol-project/node_modules/request/lib/multipart.js create mode 100644 test-eol-project/node_modules/request/lib/oauth.js create mode 100644 test-eol-project/node_modules/request/lib/querystring.js create mode 100644 test-eol-project/node_modules/request/lib/redirect.js create mode 100644 test-eol-project/node_modules/request/lib/tunnel.js create mode 100644 test-eol-project/node_modules/request/package.json create mode 100644 test-eol-project/node_modules/request/request.js create mode 100644 test-eol-project/node_modules/require-directory/.jshintrc create mode 100644 test-eol-project/node_modules/require-directory/.npmignore create mode 100644 test-eol-project/node_modules/require-directory/.travis.yml create mode 100644 test-eol-project/node_modules/require-directory/LICENSE create mode 100644 test-eol-project/node_modules/require-directory/README.markdown create mode 100644 test-eol-project/node_modules/require-directory/index.js create mode 100644 test-eol-project/node_modules/require-directory/package.json create mode 100644 test-eol-project/node_modules/require-main-filename/CHANGELOG.md create mode 100644 test-eol-project/node_modules/require-main-filename/LICENSE.txt create mode 100644 test-eol-project/node_modules/require-main-filename/README.md create mode 100644 test-eol-project/node_modules/require-main-filename/index.js create mode 100644 test-eol-project/node_modules/require-main-filename/package.json create mode 100644 test-eol-project/node_modules/rimraf/LICENSE create mode 100644 test-eol-project/node_modules/rimraf/README.md create mode 100755 test-eol-project/node_modules/rimraf/bin.js create mode 100644 test-eol-project/node_modules/rimraf/package.json create mode 100644 test-eol-project/node_modules/rimraf/rimraf.js create mode 100644 test-eol-project/node_modules/safe-buffer/LICENSE create mode 100644 test-eol-project/node_modules/safe-buffer/README.md create mode 100644 test-eol-project/node_modules/safe-buffer/index.d.ts create mode 100644 test-eol-project/node_modules/safe-buffer/index.js create mode 100644 test-eol-project/node_modules/safe-buffer/package.json create mode 100644 test-eol-project/node_modules/safer-buffer/LICENSE create mode 100644 test-eol-project/node_modules/safer-buffer/Porting-Buffer.md create mode 100644 test-eol-project/node_modules/safer-buffer/Readme.md create mode 100644 test-eol-project/node_modules/safer-buffer/dangerous.js create mode 100644 test-eol-project/node_modules/safer-buffer/package.json create mode 100644 test-eol-project/node_modules/safer-buffer/safer.js create mode 100644 test-eol-project/node_modules/safer-buffer/tests.js create mode 100644 test-eol-project/node_modules/saucelabs/.jshintrc create mode 100644 test-eol-project/node_modules/saucelabs/.travis.yml create mode 100644 test-eol-project/node_modules/saucelabs/Makefile create mode 100644 test-eol-project/node_modules/saucelabs/README.md create mode 100644 test-eol-project/node_modules/saucelabs/index.js create mode 100644 test-eol-project/node_modules/saucelabs/lib/SauceLabs.js create mode 100644 test-eol-project/node_modules/saucelabs/lib/utils.js create mode 100644 test-eol-project/node_modules/saucelabs/package.json create mode 100644 test-eol-project/node_modules/saucelabs/test/SauceLabs.js create mode 100644 test-eol-project/node_modules/saucelabs/test/bootstrap/index.js create mode 100644 test-eol-project/node_modules/saucelabs/test/helpers/index.js create mode 100644 test-eol-project/node_modules/saucelabs/test/mocha.opts create mode 100644 test-eol-project/node_modules/saucelabs/test/utils.js create mode 100644 test-eol-project/node_modules/sax/LICENSE.md create mode 100644 test-eol-project/node_modules/sax/README.md create mode 100644 test-eol-project/node_modules/sax/lib/sax.js create mode 100644 test-eol-project/node_modules/sax/package.json create mode 100644 test-eol-project/node_modules/selenium-webdriver/.npmignore create mode 100644 test-eol-project/node_modules/selenium-webdriver/CHANGES.md create mode 100644 test-eol-project/node_modules/selenium-webdriver/LICENSE create mode 100644 test-eol-project/node_modules/selenium-webdriver/NOTICE create mode 100644 test-eol-project/node_modules/selenium-webdriver/README.md create mode 100644 test-eol-project/node_modules/selenium-webdriver/chrome.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/edge.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/async_await_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/chrome_android.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/chrome_mobile_emulation.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/firefox_channels.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/google_search.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/google_search_generator.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/google_search_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/headless.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/logging.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/example/parallel_flows.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/binary.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/extension.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/profile.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/http/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/http/util.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/ie.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/io/exec.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/io/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/io/zip.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/README create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/actions.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/atoms/get-attribute.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/atoms/is-displayed.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/by.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/capabilities.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/command.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/devmode.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/error.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/events.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/http.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/input.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/logging.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/promise.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/proxy.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/session.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/symbols.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/build.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/ClickTest_testClicksASurroundingStrongTag.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Page.aspx create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Page.aspx.cs create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/banner.gif create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/beach.jpg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/blank.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/disabled_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/disappearing_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/google_map.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/google_map.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/html5_submit_buttons.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/clicks.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/jetpack-sample.xpi create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/sample.xpi create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/webextension.xpi create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/blue.jpg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/green.jpg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/red.jpg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/yellow.jpg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5Page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/icon.gif create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeWithAlert.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeWithIframe.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/injectableContent.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/javascriptEnhancedForm.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/javascriptPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/jquery-1.3.2.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/jquery-1.4.4.min.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/jquery-ui-1.8.10.custom.min.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.svg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.eot create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.woff create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/anchor.gif create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/loader.gif create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/object.gif create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/trans.gif create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.ie7.min.css create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/tinymce.min.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_logger.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/map.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/map_visibility.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/markerTransparent.png create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/messages.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/until.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/net/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/net/portprober.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/opera.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/package.json create mode 100644 test-eol-project/node_modules/selenium-webdriver/phantomjs.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/proxy.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/remote/index.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/safari.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/actions_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/logging_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/rect_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/remote_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/safari_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/session_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/upload_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/test/window_test.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/testing/assert.js create mode 100644 test-eol-project/node_modules/selenium-webdriver/testing/index.js create mode 100644 test-eol-project/node_modules/semver/LICENSE create mode 100644 test-eol-project/node_modules/semver/README.md create mode 100644 test-eol-project/node_modules/semver/package.json create mode 100644 test-eol-project/node_modules/semver/range.bnf create mode 100644 test-eol-project/node_modules/semver/semver.js create mode 100644 test-eol-project/node_modules/set-blocking/CHANGELOG.md create mode 100644 test-eol-project/node_modules/set-blocking/LICENSE.txt create mode 100644 test-eol-project/node_modules/set-blocking/README.md create mode 100644 test-eol-project/node_modules/set-blocking/index.js create mode 100644 test-eol-project/node_modules/set-blocking/package.json create mode 100644 test-eol-project/node_modules/setimmediate/LICENSE.txt create mode 100644 test-eol-project/node_modules/setimmediate/package.json create mode 100644 test-eol-project/node_modules/setimmediate/setImmediate.js create mode 100644 test-eol-project/node_modules/source-map-support/LICENSE.md create mode 100644 test-eol-project/node_modules/source-map-support/README.md create mode 100644 test-eol-project/node_modules/source-map-support/browser-source-map-support.js create mode 100644 test-eol-project/node_modules/source-map-support/package.json create mode 100644 test-eol-project/node_modules/source-map-support/register.js create mode 100644 test-eol-project/node_modules/source-map-support/source-map-support.js create mode 100644 test-eol-project/node_modules/source-map/CHANGELOG.md create mode 100644 test-eol-project/node_modules/source-map/LICENSE create mode 100644 test-eol-project/node_modules/source-map/README.md create mode 100644 test-eol-project/node_modules/source-map/dist/source-map.debug.js create mode 100644 test-eol-project/node_modules/source-map/dist/source-map.js create mode 100644 test-eol-project/node_modules/source-map/dist/source-map.min.js create mode 100644 test-eol-project/node_modules/source-map/dist/source-map.min.js.map create mode 100644 test-eol-project/node_modules/source-map/lib/array-set.js create mode 100644 test-eol-project/node_modules/source-map/lib/base64-vlq.js create mode 100644 test-eol-project/node_modules/source-map/lib/base64.js create mode 100644 test-eol-project/node_modules/source-map/lib/binary-search.js create mode 100644 test-eol-project/node_modules/source-map/lib/mapping-list.js create mode 100644 test-eol-project/node_modules/source-map/lib/quick-sort.js create mode 100644 test-eol-project/node_modules/source-map/lib/source-map-consumer.js create mode 100644 test-eol-project/node_modules/source-map/lib/source-map-generator.js create mode 100644 test-eol-project/node_modules/source-map/lib/source-node.js create mode 100644 test-eol-project/node_modules/source-map/lib/util.js create mode 100644 test-eol-project/node_modules/source-map/package.json create mode 100644 test-eol-project/node_modules/source-map/source-map.js create mode 100644 test-eol-project/node_modules/sshpk/.travis.yml create mode 100644 test-eol-project/node_modules/sshpk/Jenkinsfile create mode 100644 test-eol-project/node_modules/sshpk/LICENSE create mode 100644 test-eol-project/node_modules/sshpk/README.md create mode 100644 test-eol-project/node_modules/sshpk/lib/algs.js create mode 100644 test-eol-project/node_modules/sshpk/lib/certificate.js create mode 100644 test-eol-project/node_modules/sshpk/lib/dhe.js create mode 100644 test-eol-project/node_modules/sshpk/lib/ed-compat.js create mode 100644 test-eol-project/node_modules/sshpk/lib/errors.js create mode 100644 test-eol-project/node_modules/sshpk/lib/fingerprint.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/auto.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/dnssec.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/pem.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/putty.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/ssh.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js create mode 100644 test-eol-project/node_modules/sshpk/lib/formats/x509.js create mode 100644 test-eol-project/node_modules/sshpk/lib/identity.js create mode 100644 test-eol-project/node_modules/sshpk/lib/index.js create mode 100644 test-eol-project/node_modules/sshpk/lib/key.js create mode 100644 test-eol-project/node_modules/sshpk/lib/private-key.js create mode 100644 test-eol-project/node_modules/sshpk/lib/signature.js create mode 100644 test-eol-project/node_modules/sshpk/lib/ssh-buffer.js create mode 100644 test-eol-project/node_modules/sshpk/lib/utils.js create mode 100644 test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 create mode 100644 test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 create mode 100644 test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 create mode 100644 test-eol-project/node_modules/sshpk/package.json create mode 100644 test-eol-project/node_modules/string-width/index.d.ts create mode 100644 test-eol-project/node_modules/string-width/index.js create mode 100644 test-eol-project/node_modules/string-width/license create mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts create mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js create mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/license create mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json create mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md create mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts create mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js create mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/license create mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json create mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md create mode 100644 test-eol-project/node_modules/string-width/package.json create mode 100644 test-eol-project/node_modules/string-width/readme.md create mode 100644 test-eol-project/node_modules/string_decoder/.travis.yml create mode 100644 test-eol-project/node_modules/string_decoder/LICENSE create mode 100644 test-eol-project/node_modules/string_decoder/README.md create mode 100644 test-eol-project/node_modules/string_decoder/lib/string_decoder.js create mode 100644 test-eol-project/node_modules/string_decoder/package.json create mode 100644 test-eol-project/node_modules/strip-ansi/index.js create mode 100644 test-eol-project/node_modules/strip-ansi/license create mode 100644 test-eol-project/node_modules/strip-ansi/package.json create mode 100644 test-eol-project/node_modules/strip-ansi/readme.md create mode 100644 test-eol-project/node_modules/supports-color/index.js create mode 100644 test-eol-project/node_modules/supports-color/license create mode 100644 test-eol-project/node_modules/supports-color/package.json create mode 100644 test-eol-project/node_modules/supports-color/readme.md create mode 100644 test-eol-project/node_modules/tmp/.eslintrc.js create mode 100644 test-eol-project/node_modules/tmp/.npmignore create mode 100644 test-eol-project/node_modules/tmp/.travis.yml create mode 100644 test-eol-project/node_modules/tmp/Gruntfile.js create mode 100644 test-eol-project/node_modules/tmp/LICENSE create mode 100644 test-eol-project/node_modules/tmp/README.md create mode 100755 test-eol-project/node_modules/tmp/cleanup.sh create mode 100644 test-eol-project/node_modules/tmp/coverage/coverage.json create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/base.css create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/index.html create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/sort-arrow-sprite.png create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/sorter.js create mode 100644 test-eol-project/node_modules/tmp/coverage/lcov.info create mode 100644 test-eol-project/node_modules/tmp/lib/tmp.js create mode 100644 test-eol-project/node_modules/tmp/package.json create mode 100755 test-eol-project/node_modules/tmp/run-tests create mode 100644 test-eol-project/node_modules/tmp/test/base.js create mode 100644 test-eol-project/node_modules/tmp/test/dir-sync-test.js create mode 100644 test-eol-project/node_modules/tmp/test/dir-test.js create mode 100644 test-eol-project/node_modules/tmp/test/file-sync-test.js create mode 100644 test-eol-project/node_modules/tmp/test/file-test.js create mode 100644 test-eol-project/node_modules/tmp/test/graceful-sync.js create mode 100644 test-eol-project/node_modules/tmp/test/graceful.js create mode 100644 test-eol-project/node_modules/tmp/test/issue62-sync.js create mode 100644 test-eol-project/node_modules/tmp/test/issue62.js create mode 100644 test-eol-project/node_modules/tmp/test/keep-sync.js create mode 100644 test-eol-project/node_modules/tmp/test/keep.js create mode 100644 test-eol-project/node_modules/tmp/test/name-test.js create mode 100644 test-eol-project/node_modules/tmp/test/spawn-sync.js create mode 100644 test-eol-project/node_modules/tmp/test/spawn.js create mode 100644 test-eol-project/node_modules/tmp/test/symlinkme/file.js create mode 100644 test-eol-project/node_modules/tmp/test/unsafe-sync.js create mode 100644 test-eol-project/node_modules/tmp/test/unsafe.js create mode 100644 test-eol-project/node_modules/tough-cookie/LICENSE create mode 100644 test-eol-project/node_modules/tough-cookie/README.md create mode 100644 test-eol-project/node_modules/tough-cookie/lib/cookie.js create mode 100644 test-eol-project/node_modules/tough-cookie/lib/memstore.js create mode 100644 test-eol-project/node_modules/tough-cookie/lib/pathMatch.js create mode 100644 test-eol-project/node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 test-eol-project/node_modules/tough-cookie/lib/pubsuffix-psl.js create mode 100644 test-eol-project/node_modules/tough-cookie/lib/store.js create mode 100644 test-eol-project/node_modules/tough-cookie/lib/version.js create mode 100644 test-eol-project/node_modules/tough-cookie/package.json create mode 100644 test-eol-project/node_modules/tunnel-agent/LICENSE create mode 100644 test-eol-project/node_modules/tunnel-agent/README.md create mode 100644 test-eol-project/node_modules/tunnel-agent/index.js create mode 100644 test-eol-project/node_modules/tunnel-agent/package.json create mode 100644 test-eol-project/node_modules/tweetnacl/.npmignore create mode 100644 test-eol-project/node_modules/tweetnacl/AUTHORS.md create mode 100644 test-eol-project/node_modules/tweetnacl/CHANGELOG.md create mode 100644 test-eol-project/node_modules/tweetnacl/LICENSE create mode 100644 test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md create mode 100644 test-eol-project/node_modules/tweetnacl/README.md create mode 100644 test-eol-project/node_modules/tweetnacl/nacl-fast.js create mode 100644 test-eol-project/node_modules/tweetnacl/nacl-fast.min.js create mode 100644 test-eol-project/node_modules/tweetnacl/nacl.d.ts create mode 100644 test-eol-project/node_modules/tweetnacl/nacl.js create mode 100644 test-eol-project/node_modules/tweetnacl/nacl.min.js create mode 100644 test-eol-project/node_modules/tweetnacl/package.json create mode 100755 test-eol-project/node_modules/uri-js/LICENSE create mode 100755 test-eol-project/node_modules/uri-js/README.md create mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.js create mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js create mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/index.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/index.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/uri.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/util.js create mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/util.js.map create mode 100755 test-eol-project/node_modules/uri-js/package.json create mode 100755 test-eol-project/node_modules/uri-js/yarn.lock create mode 100644 test-eol-project/node_modules/util-deprecate/History.md create mode 100644 test-eol-project/node_modules/util-deprecate/LICENSE create mode 100644 test-eol-project/node_modules/util-deprecate/README.md create mode 100644 test-eol-project/node_modules/util-deprecate/browser.js create mode 100644 test-eol-project/node_modules/util-deprecate/node.js create mode 100644 test-eol-project/node_modules/util-deprecate/package.json create mode 100644 test-eol-project/node_modules/uuid/AUTHORS create mode 100644 test-eol-project/node_modules/uuid/CHANGELOG.md create mode 100644 test-eol-project/node_modules/uuid/LICENSE.md create mode 100644 test-eol-project/node_modules/uuid/README.md create mode 100644 test-eol-project/node_modules/uuid/index.js create mode 100644 test-eol-project/node_modules/uuid/lib/bytesToUuid.js create mode 100644 test-eol-project/node_modules/uuid/lib/md5-browser.js create mode 100644 test-eol-project/node_modules/uuid/lib/md5.js create mode 100644 test-eol-project/node_modules/uuid/lib/rng-browser.js create mode 100644 test-eol-project/node_modules/uuid/lib/rng.js create mode 100644 test-eol-project/node_modules/uuid/lib/sha1-browser.js create mode 100644 test-eol-project/node_modules/uuid/lib/sha1.js create mode 100644 test-eol-project/node_modules/uuid/lib/v35.js create mode 100644 test-eol-project/node_modules/uuid/package.json create mode 100644 test-eol-project/node_modules/uuid/v1.js create mode 100644 test-eol-project/node_modules/uuid/v3.js create mode 100644 test-eol-project/node_modules/uuid/v4.js create mode 100644 test-eol-project/node_modules/uuid/v5.js create mode 100644 test-eol-project/node_modules/verror/.npmignore create mode 100644 test-eol-project/node_modules/verror/CHANGES.md create mode 100644 test-eol-project/node_modules/verror/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/verror/LICENSE create mode 100644 test-eol-project/node_modules/verror/README.md create mode 100644 test-eol-project/node_modules/verror/lib/verror.js create mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE create mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/README.md create mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch create mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js create mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/package.json create mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/test.js create mode 100644 test-eol-project/node_modules/verror/package.json create mode 100644 test-eol-project/node_modules/webdriver-js-extender/.travis.yml create mode 100644 test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/webdriver-js-extender/LICENSE create mode 100644 test-eol-project/node_modules/webdriver-js-extender/README.md create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/package.json create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map create mode 100644 test-eol-project/node_modules/webdriver-js-extender/gulpfile.js create mode 100644 test-eol-project/node_modules/webdriver-js-extender/package.json create mode 100644 test-eol-project/node_modules/webdriver-js-extender/tsconfig.json create mode 100644 test-eol-project/node_modules/webdriver-manager/.circleci/config.yml create mode 100644 test-eol-project/node_modules/webdriver-manager/CHANGELOG.md create mode 100644 test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md create mode 100644 test-eol-project/node_modules/webdriver-manager/LICENSE create mode 100644 test-eol-project/node_modules/webdriver-manager/README.md create mode 100644 test-eol-project/node_modules/webdriver-manager/built/config.json create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/config.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/utils.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.d.ts create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js create mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map create mode 100644 test-eol-project/node_modules/webdriver-manager/built/package.json create mode 100644 test-eol-project/node_modules/webdriver-manager/config.json create mode 100644 test-eol-project/node_modules/webdriver-manager/docs/README.md create mode 100644 test-eol-project/node_modules/webdriver-manager/docs/mobile.md create mode 100644 test-eol-project/node_modules/webdriver-manager/docs/protractor.md create mode 100644 test-eol-project/node_modules/webdriver-manager/docs/versions.md create mode 100644 test-eol-project/node_modules/webdriver-manager/gulpfile.js create mode 100644 test-eol-project/node_modules/webdriver-manager/package.json create mode 100644 test-eol-project/node_modules/which-module/LICENSE create mode 100644 test-eol-project/node_modules/which-module/README.md create mode 100644 test-eol-project/node_modules/which-module/index.js create mode 100644 test-eol-project/node_modules/which-module/package.json create mode 100755 test-eol-project/node_modules/wrap-ansi/index.js create mode 100644 test-eol-project/node_modules/wrap-ansi/license create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json create mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md create mode 100644 test-eol-project/node_modules/wrap-ansi/package.json create mode 100644 test-eol-project/node_modules/wrap-ansi/readme.md create mode 100644 test-eol-project/node_modules/wrappy/LICENSE create mode 100644 test-eol-project/node_modules/wrappy/README.md create mode 100644 test-eol-project/node_modules/wrappy/package.json create mode 100644 test-eol-project/node_modules/wrappy/wrappy.js create mode 100644 test-eol-project/node_modules/xml2js/LICENSE create mode 100644 test-eol-project/node_modules/xml2js/README.md create mode 100644 test-eol-project/node_modules/xml2js/lib/bom.js create mode 100644 test-eol-project/node_modules/xml2js/lib/builder.js create mode 100644 test-eol-project/node_modules/xml2js/lib/defaults.js create mode 100644 test-eol-project/node_modules/xml2js/lib/parser.js create mode 100644 test-eol-project/node_modules/xml2js/lib/processors.js create mode 100644 test-eol-project/node_modules/xml2js/lib/xml2js.js create mode 100644 test-eol-project/node_modules/xml2js/package.json create mode 100644 test-eol-project/node_modules/xmlbuilder/CHANGELOG.md create mode 100644 test-eol-project/node_modules/xmlbuilder/LICENSE create mode 100644 test-eol-project/node_modules/xmlbuilder/README.md create mode 100644 test-eol-project/node_modules/xmlbuilder/appveyor.yml create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/Derivation.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/NodeType.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/OperationType.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/Utility.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/WriterState.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLText.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLTypeInfo.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLUserDataHandler.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLWriterBase.js create mode 100644 test-eol-project/node_modules/xmlbuilder/lib/index.js create mode 100644 test-eol-project/node_modules/xmlbuilder/package.json create mode 100644 test-eol-project/node_modules/xmlbuilder/typings/index.d.ts create mode 100644 test-eol-project/node_modules/y18n/CHANGELOG.md create mode 100644 test-eol-project/node_modules/y18n/LICENSE create mode 100644 test-eol-project/node_modules/y18n/README.md create mode 100644 test-eol-project/node_modules/y18n/index.js create mode 100644 test-eol-project/node_modules/y18n/package.json create mode 100644 test-eol-project/node_modules/yargs-parser/CHANGELOG.md create mode 100644 test-eol-project/node_modules/yargs-parser/LICENSE.txt create mode 100644 test-eol-project/node_modules/yargs-parser/README.md create mode 100644 test-eol-project/node_modules/yargs-parser/index.js create mode 100644 test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js create mode 100644 test-eol-project/node_modules/yargs-parser/package.json create mode 100644 test-eol-project/node_modules/yargs/CHANGELOG.md create mode 100644 test-eol-project/node_modules/yargs/LICENSE create mode 100644 test-eol-project/node_modules/yargs/README.md create mode 100644 test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/apply-extends.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/argsert.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/argsert.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/command.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/command.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/common-types.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/common-types.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/completion-templates.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/completion.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/completion.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/is-promise.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/levenshtein.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/middleware.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/middleware.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/obj-filter.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/parse-command.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/process-argv.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/usage.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/usage.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/validation.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/validation.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/yargs.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/yargs.js create mode 100644 test-eol-project/node_modules/yargs/build/lib/yerror.d.ts create mode 100644 test-eol-project/node_modules/yargs/build/lib/yerror.js create mode 100644 test-eol-project/node_modules/yargs/index.js create mode 100644 test-eol-project/node_modules/yargs/locales/be.json create mode 100644 test-eol-project/node_modules/yargs/locales/de.json create mode 100644 test-eol-project/node_modules/yargs/locales/en.json create mode 100644 test-eol-project/node_modules/yargs/locales/es.json create mode 100644 test-eol-project/node_modules/yargs/locales/fi.json create mode 100644 test-eol-project/node_modules/yargs/locales/fr.json create mode 100644 test-eol-project/node_modules/yargs/locales/hi.json create mode 100644 test-eol-project/node_modules/yargs/locales/hu.json create mode 100644 test-eol-project/node_modules/yargs/locales/id.json create mode 100644 test-eol-project/node_modules/yargs/locales/it.json create mode 100644 test-eol-project/node_modules/yargs/locales/ja.json create mode 100644 test-eol-project/node_modules/yargs/locales/ko.json create mode 100644 test-eol-project/node_modules/yargs/locales/nb.json create mode 100644 test-eol-project/node_modules/yargs/locales/nl.json create mode 100644 test-eol-project/node_modules/yargs/locales/nn.json create mode 100644 test-eol-project/node_modules/yargs/locales/pirate.json create mode 100644 test-eol-project/node_modules/yargs/locales/pl.json create mode 100644 test-eol-project/node_modules/yargs/locales/pt.json create mode 100644 test-eol-project/node_modules/yargs/locales/pt_BR.json create mode 100644 test-eol-project/node_modules/yargs/locales/ru.json create mode 100644 test-eol-project/node_modules/yargs/locales/th.json create mode 100644 test-eol-project/node_modules/yargs/locales/tr.json create mode 100644 test-eol-project/node_modules/yargs/locales/zh_CN.json create mode 100644 test-eol-project/node_modules/yargs/locales/zh_TW.json create mode 100644 test-eol-project/node_modules/yargs/package.json create mode 100644 test-eol-project/node_modules/yargs/yargs.js create mode 100644 test-eol-project/package-lock.json create mode 100644 test-eol-project/package.json diff --git a/Dockerfile b/Dockerfile index 076ff6cf..23b0237f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,13 +24,45 @@ COPY docs docs RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \ go run ./cmd/docgen -FROM busybox +# Download xeol EOL DB at build time (offline at runtime). Listing serves .tar.xz URLs. +RUN apk add --no-cache curl jq xz && \ + XEOL_DB_URL=$(curl -sSfL https://data.xeol.io/xeol/databases/listing.json | jq -r '.available["1"] | .[-1] | .url') && \ + curl -sSfL "$XEOL_DB_URL" -o /tmp/xeol-db.tar.xz && \ + mkdir -p /src/xeol-db/1 && tar -xJf /tmp/xeol-db.tar.xz -C /src/xeol-db/1 && \ + rm /tmp/xeol-db.tar.xz -RUN adduser -u 2004 -D docker +# Download Trivy vuln DB at build time so slim image can run EOL scan (runner still needs DB to init). +RUN ORAS_VER=1.1.0 && \ + curl -sSfL "https://github.com/oras-project/oras/releases/download/v${ORAS_VER}/oras_${ORAS_VER}_linux_amd64.tar.gz" -o /tmp/oras.tar.gz && \ + tar -xzf /tmp/oras.tar.gz -C /usr/local/bin oras && rm /tmp/oras.tar.gz && \ + mkdir -p /src/trivy-cache/db && cd /src/trivy-cache/db && \ + oras pull ghcr.io/aquasecurity/trivy-db:2 && \ + (test -f db.tar.gz && tar -xzf db.tar.gz && rm -f db.tar.gz) && \ + (mv 2/* . 2>/dev/null; rmdir 2 2>/dev/null) || true + +# Build eoltest for container verification (optional). +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \ + go build -o bin/eoltest ./cmd/eoltest +FROM busybox AS full +RUN adduser -u 2004 -D docker COPY --from=builder --chown=docker:docker /src/bin /dist/bin -COPY --from=builder --chown=docker:docker /src/docs /docs +COPY --from=builder --chown=docker:docker /src/docs /docs COPY --chown=docker:docker cache/ /dist/cache/codacy-trivy COPY --chown=docker:docker openssf-malicious-packages/openssf-malicious-packages-index.json.gz /dist/cache/codacy-trivy/openssf-malicious-packages-index.json.gz +COPY --from=builder --chown=docker:docker /src/xeol-db /dist/cache/xeol/db +ENV XEOL_DB_CACHE_DIR=/dist/cache/xeol/db +CMD [ "/dist/bin/codacy-trivy" ] +# Slim: no host cache/openssf; includes Trivy DB + xeol DB for EOL scan. Use: docker build --target slim -t codacy-trivy:eol . +FROM busybox AS slim +RUN adduser -u 2004 -D docker +COPY --from=builder --chown=docker:docker /src/bin /dist/bin +COPY --from=builder --chown=docker:docker /src/docs /docs +RUN mkdir -p /dist/cache/codacy-trivy +COPY --from=builder --chown=docker:docker /src/trivy-cache/db /dist/cache/codacy-trivy/db +COPY --from=builder --chown=docker:docker /src/xeol-db /dist/cache/xeol/db +ENV XEOL_DB_CACHE_DIR=/dist/cache/xeol/db CMD [ "/dist/bin/codacy-trivy" ] + +FROM full diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..4063b06a --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +# Build and test require Go 1.25+ and GOEXPERIMENT=jsonv2 (for Trivy). +# CGO_ENABLED=0 avoids linking system libs (e.g. faiss on macOS). +export GOEXPERIMENT := jsonv2 +export GOTOOLCHAIN := auto +export CGO_ENABLED := 0 + +.PHONY: build test +build: + go build -o bin/codacy-trivy -ldflags="-s -w" ./cmd/tool + +test: + go test ./... diff --git a/cmd/eoltest/main.go b/cmd/eoltest/main.go new file mode 100644 index 00000000..55f4de87 --- /dev/null +++ b/cmd/eoltest/main.go @@ -0,0 +1,115 @@ +// Program eoltest runs the codacy-trivy tool against a directory with EOL patterns +// for local testing. EOL scan uses the xeol Go library (no xeol binary needed). +// Requires (for full scan) a valid malicious-packages index; uses an empty index if the default path is missing. +// +// Usage: go run ./cmd/eoltest -dir ./test-eol-project +package main + +import ( + "compress/gzip" + "context" + "flag" + "fmt" + "os" + "path/filepath" + + codacy "github.com/codacy/codacy-engine-golang-seed/v6" + "github.com/codacy/codacy-trivy/internal/tool" +) + +func main() { + dir := flag.String("dir", "", "Source directory to scan (e.g. test-eol-project)") + flag.Parse() + if *dir == "" { + fmt.Fprintln(os.Stderr, "usage: eoltest -dir ") + os.Exit(1) + } + absDir, err := filepath.Abs(*dir) + if err != nil { + fmt.Fprintf(os.Stderr, "dir: %v\n", err) + os.Exit(1) + } + if _, err := os.Stat(absDir); err != nil { + fmt.Fprintf(os.Stderr, "dir %s: %v\n", absDir, err) + os.Exit(1) + } + + indexPath := tool.MaliciousPackagesIndexPath + if _, err := os.Stat(indexPath); err != nil { + // Use empty index so we can run without the real index + f, err := os.CreateTemp("", "codacy-trivy-malicious-*.json.gz") + if err != nil { + fmt.Fprintf(os.Stderr, "temp index: %v\n", err) + os.Exit(1) + } + defer os.Remove(f.Name()) + gw := gzip.NewWriter(f) + _, _ = gw.Write([]byte("{}")) + _ = gw.Close() + _ = f.Close() + indexPath = f.Name() + } + + trivy, err := tool.New(indexPath) + if err != nil { + fmt.Fprintf(os.Stderr, "New: %v\n", err) + os.Exit(1) + } + + files := listFiles(absDir) + patterns := []codacy.Pattern{ + {ID: "eol_critical"}, + {ID: "eol_high"}, + {ID: "eol_medium"}, + {ID: "eol_minor"}, + } + te := codacy.ToolExecution{ + SourceDir: absDir, + Patterns: &patterns, + Files: &files, + } + + results, err := trivy.Run(context.Background(), te) + if err != nil { + fmt.Fprintf(os.Stderr, "Run: %v\n", err) + os.Exit(1) + } + + // Print EOL results only + var count int + for _, r := range results { + switch v := r.(type) { + case codacy.Issue: + if isEOL(v.PatternID) { + count++ + fmt.Printf("%s:%d [%s] %s\n", v.File, v.Line, v.PatternID, v.Message) + } + case codacy.FileError: + if v.File != "" { + fmt.Fprintf(os.Stderr, "file error %s: %s\n", v.File, v.Message) + } + } + } + if count == 0 { + fmt.Println("No EOL issues found. Ensure the project has EOL deps (e.g. npm install in test-eol-project) and XEOL_DB_CACHE_DIR is set or DB is in default cache.") + } else { + fmt.Printf("\nTotal EOL issues: %d\n", count) + } +} + +func listFiles(dir string) []string { + var out []string + _ = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if err != nil || info.IsDir() { + return nil + } + rel, _ := filepath.Rel(dir, path) + out = append(out, rel) + return nil + }) + return out +} + +func isEOL(id string) bool { + return id == "eol_critical" || id == "eol_high" || id == "eol_medium" || id == "eol_minor" +} diff --git a/cmd/openssfbuild/main.go b/cmd/openssfbuild/main.go new file mode 100644 index 00000000..6c9e1639 --- /dev/null +++ b/cmd/openssfbuild/main.go @@ -0,0 +1,101 @@ +package main + +import ( + "context" + "flag" + "fmt" + "log" + "os" + "path/filepath" + + "github.com/codacy/codacy-trivy/internal/openssfdb" + git "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing" +) + +const ( + defaultRepoURL = "https://github.com/ossf/malicious-packages.git" + defaultOutput = "/dist/cache/openssf-malicious-packages.json.gz" + defaultRef = "" + defaultSourceID = "OpenSSF Malicious Packages DB" +) + +func main() { + repoURL := flag.String("repo", defaultRepoURL, "OpenSSF malicious packages repository URL") + repoDir := flag.String("repo-dir", "", "Pre-cloned OpenSSF repository to reuse instead of cloning") + ref := flag.String("ref", defaultRef, "Specific git reference to checkout when cloning the repository") + output := flag.String("out", defaultOutput, "Destination path for the gzipped JSON payload") + + flag.Parse() + + ctx := context.Background() + + var ( + sourcePath string + sourceMeta string + cleanup func() + err error + ) + + switch { + case *repoDir != "": + sourcePath, err = filepath.Abs(*repoDir) + if err != nil { + log.Fatalf("resolve repo dir: %v", err) + } + sourceMeta = fmt.Sprintf("%s (local)", defaultSourceID) + default: + sourcePath, cleanup, sourceMeta, err = cloneRepository(ctx, *repoURL, *ref) + if err != nil { + log.Fatalf("clone repository: %v", err) + } + defer cleanup() + } + + builder := openssfdb.NewBuilder() + + outputPayload, err := builder.Build(ctx, sourcePath, sourceMeta) + if err != nil { + log.Fatalf("build payload: %v", err) + } + + if err := openssfdb.WriteGzippedJSON(*output, outputPayload); err != nil { + log.Fatalf("write payload: %v", err) + } +} + +func cloneRepository(ctx context.Context, repoURL, ref string) (string, func(), string, error) { + tmpDir, err := os.MkdirTemp("", "openssf-malicious-*") + if err != nil { + return "", nil, "", err + } + cleanup := func() { + _ = os.RemoveAll(tmpDir) + } + + options := &git.CloneOptions{ + URL: repoURL, + Depth: 1, + } + if ref != "" { + options.ReferenceName = plumbing.ReferenceName(ref) + } + + repo, err := git.PlainCloneContext(ctx, tmpDir, false, options) + if err != nil { + cleanup() + return "", nil, "", err + } + + sourceMeta := fmt.Sprintf("%s@%s", repoURL, resolveHeadHash(repo)) + + return tmpDir, cleanup, sourceMeta, nil +} + +func resolveHeadHash(repo *git.Repository) string { + headRef, err := repo.Head() + if err != nil { + return "unknown" + } + return headRef.Hash().String() +} diff --git a/docs/complexity-reduction-plan.md b/docs/complexity-reduction-plan.md new file mode 100644 index 00000000..d7800919 --- /dev/null +++ b/docs/complexity-reduction-plan.md @@ -0,0 +1,100 @@ +# Plan: Resolve Lizard Complexity Issues via Architectural Improvements + +Target: bring NLOC and CCN within Lizard thresholds (function ≤50 lines, CCN ≤8) without changing behavior. + +--- + +## 1. `internal/tool/tool.go` — getVulnerabilities (58 lines, CCN 14) + +**Cause:** One large function that (1) builds a PURL→line map from packages, (2) filters result by severity, (3) loops over vulns with several conditionals (PURL skip, line fallback, fixed-version message, ruleID), and (4) builds issues. + +**Approach:** Extract helpers so `getVulnerabilities` stays orchestration-only. + +| Step | Action | +|------|--------| +| 1.1 | Add **`buildLineNumberByPurl(result ptypes.Result) map[string]int`** in `tool.go`. Single responsibility: from `result.Packages` produce PURL→line map. | +| 1.2 | Add **`vulnerabilityToIssue(target string, vuln ptypes.DetectedVulnerability, lineByPurl map[string]int, sourceDir string) (codacy.Issue, bool)`**. Encapsulates: PURL nil → false; line fallback; fixedVersion message; getRuleIDFromTrivySeverity; build Issue. Returns (issue, true) or (zero, false). | +| 1.3 | **Refactor getVulnerabilities:** Keep early exit and severity filter. For each result: `lineByPurl := buildLineNumberByPurl(result)`; FilterResult; loop vulns calling `vulnerabilityToIssue` and appending when true. Final line: same `mapIssuesWithoutLineNumber(filterIssuesFromKnownFiles(...))`. | + +**Outcome:** getVulnerabilities shrinks to ~25 lines, CCN ~4; new helpers each small and low CCN. + +--- + +## 2. `internal/tool/eol_scanner.go` — Scan (63 lines, CCN 15) + +**Cause:** Scan does SBOM write, runner call, PURL→location build, and a loop with multiple branches (severity, location lookup, fallback, message formatting). + +**Approach:** Extract SBOM I/O and “match → issue” logic. + +| Step | Action | +|------|--------| +| 2.1 | Add **`writeSBOMToTemp(bom *cdx.BOM) (sbomPath string, cleanup func(), err error)`** in `eol_scanner.go`. Creates temp dir, writes `sbom.json`, returns path and `cleanup` (e.g. `os.RemoveAll(tmpDir)`). Caller: `defer cleanup()`. | +| 2.2 | Add **`matchToIssue(m eolMatch, report ptypes.Report, sourceDir string, files []string, purlToLocation map[string]pkgLocation) (codacy.Issue, bool)`**. Encapsulates: severityFromEolDate; PURL then findLocationByPackage; line fallback; message with optional CycleID; returns (issue, true) or (zero, false). Does not do filtering by files; caller filters. | +| 2.3 | **Refactor Scan:** Early exits unchanged. Call `sbomPath, cleanup, err := writeSBOMToTemp(bom)`; `defer cleanup()`; `matches, err := s.runner.Run(sbomPath)`; `purlToLocation := buildPURLToLocation(report)`; loop matches → `matchToIssue` → append; return `mapIssuesWithoutLineNumber(filterIssuesFromKnownFiles(issues, *toolExecution.Files))`. | + +**Outcome:** Scan becomes ~25 lines, CCN ~5; helpers stay under limits. + +--- + +## 3. `internal/docgen/rule.go` — trivyRules (104 lines) + +**Cause:** One long function returning a large literal slice of similar structs (data, not logic). + +**Approach:** Treat as data; avoid one giant function. + +| Step | Action | +|------|--------| +| 3.1 | **Option A (preferred):** Move rule definitions to **data**. Add `internal/docgen/rules_data.go` (or `rules.yaml` + codegen). Define a slice `var trivyRulesList = []Rule{ ... }` (or load from YAML). `trivyRules()` becomes `return Rules(trivyRulesList)` or `return trivyRulesList`. Lizard counts lines of the slice initializer in a separate “block”; the exported `trivyRules()` stays tiny. | +| 3.2 | **Option B:** Split by category: **`secretRule()`**, **`vulnerabilityRules()`**, **`maliciousPackagesRule()`**, **`eolRules()`**, each returning 1–4 rules. **`trivyRules() Rules`** returns `append(append(append(secretRule(), vulnerabilityRules()...), maliciousPackagesRule()), eolRules()...)`. Each helper is under ~25 lines. | + +**Outcome:** trivyRules (and any one helper in Option B) under 50 lines; no CCN concern. + +--- + +## 4. `internal/openssfdb/builder.go` — Build walk callback (@97–148: 46 NLOC, CCN 11) + +**Cause:** The `filepath.WalkDir` callback does file open, decode, trim, loop over Affected, normalize, build Entry, and map insert. + +**Approach:** Move “one file” and “aggregate into output” into named functions. + +| Step | Action | +|------|--------| +| 4.1 | Add **`parseOSVFile(path string) (*rawRecord, error)`**: open file, `json.Decode(&raw)`, `raw.trim()`, return raw. | +| 4.2 | Add **`aggregateRawInto(out *Output, raw *rawRecord)`**: loop over `raw.Affected`, normalize ecosystem, skip empty name/ecosystem, build Entry, ensure `out.Packages[ecosystem]` and `out.Packages[ecosystem][name]` exist, append entry. No file I/O. | +| 4.3 | **Refactor Build:** Walk callback: if not dir and not `.json` skip; `raw, err := parseOSVFile(path)`; if err return err; `aggregateRawInto(out, raw)`; return nil. | + +**Outcome:** Callback shrinks to ~8 lines, CCN ~3; complexity lives in small, testable helpers. + +--- + +## 5. `cmd/eoltest/main.go` — main (66 lines, CCN 13) + +**Cause:** main does flag parsing, dir validation, index path resolution (with temp file), tool creation, file listing, execution, and result printing in one flow. + +**Approach:** Extract “setup”, “run”, “print” so main is a short pipeline. + +| Step | Action | +|------|--------| +| 5.1 | Add **`resolveIndexPath() (path string, cleanup func(), err error)`**: if default index path exists, return it and no-op cleanup; else create temp gzipped `{}`, return path and cleanup that removes it. | +| 5.2 | Add **`runEOLScan(ctx context.Context, dir, indexPath string) ([]codacy.Result, error)`**: `tool.New(indexPath)`, `listFiles(dir)`, build ToolExecution with EOL patterns, `trivy.Run(ctx, te)`, return results and error. | +| 5.3 | Add **`printEOLResults(results []codacy.Result)`**: loop results, switch on type (Issue vs FileError), print EOL issues and file errors; print “No EOL issues…” or “Total EOL issues: N”. | +| 5.4 | **Refactor main:** Parse and validate `-dir`; `indexPath, cleanup := resolveIndexPath()`; `defer cleanup()`; `results, err := runEOLScan(ctx, dir, indexPath)`; handle err; `printEOLResults(results)`. | + +**Outcome:** main ~15 lines, CCN ~4; eoltest behavior unchanged. + +--- + +## Order of implementation + +1. **tool.go** (getVulnerabilities) — core tool; no new files. +2. **eol_scanner.go** (Scan) — same package, clear boundaries. +3. **cmd/eoltest/main.go** — small surface, fast win. +4. **openssfdb/builder.go** — localized to one file. +5. **docgen/rule.go** — Option B is minimal change; Option A is cleaner long-term. + +## Verification + +After each refactor: + +- Run existing tests (`go test ./internal/tool/... ./cmd/eoltest/... ./internal/openssfdb/... ./internal/docgen/...`). +- Run `codacy-cli analyze -t lizard` and confirm NLOC/CCN for the touched functions are within thresholds. diff --git a/docs/description/description.json b/docs/description/description.json new file mode 100644 index 00000000..22066a5e --- /dev/null +++ b/docs/description/description.json @@ -0,0 +1,52 @@ +[ + { + "patternId": "secret", + "title": "Secret detection", + "description": "Detects secrets that should not be committed to a repository or otherwise disclosed, such as secret keys, passwords, and authentication tokens from multiple products." + }, + { + "patternId": "vulnerability_critical", + "title": "Insecure dependencies detection (critical severity)", + "description": "Detects insecure dependencies (critical severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities." + }, + { + "patternId": "vulnerability_high", + "title": "Insecure dependencies detection (high severity)", + "description": "Detects insecure dependencies (high severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities." + }, + { + "patternId": "vulnerability_medium", + "title": "Insecure dependencies detection (medium severity)", + "description": "Detects insecure dependencies (medium severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities." + }, + { + "patternId": "vulnerability_minor", + "title": "Insecure dependencies detection (minor severity)", + "description": "Detects insecure dependencies (minor severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities." + }, + { + "patternId": "malicious_packages", + "title": "Malicious packages detection", + "description": "Detects malicious packages identified in the OpenSSF Malicious Packages database, including typosquatting attacks, dependency confusion, and packages with malicious payloads." + }, + { + "patternId": "eol_critical", + "title": "End-of-life package (obsolete)", + "description": "Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded." + }, + { + "patternId": "eol_high", + "title": "End-of-life package (within 1 month)", + "description": "Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends." + }, + { + "patternId": "eol_medium", + "title": "End-of-life package (within 6 months)", + "description": "Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version." + }, + { + "patternId": "eol_minor", + "title": "End-of-life package (beyond 6 months)", + "description": "Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning." + } +] \ No newline at end of file diff --git a/docs/description/eol_critical.md b/docs/description/eol_critical.md new file mode 100644 index 00000000..2b632b83 --- /dev/null +++ b/docs/description/eol_critical.md @@ -0,0 +1,2 @@ +## End-of-life package (obsolete) +Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded. \ No newline at end of file diff --git a/docs/description/eol_high.md b/docs/description/eol_high.md new file mode 100644 index 00000000..fb150e80 --- /dev/null +++ b/docs/description/eol_high.md @@ -0,0 +1,2 @@ +## End-of-life package (within 1 month) +Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends. \ No newline at end of file diff --git a/docs/description/eol_medium.md b/docs/description/eol_medium.md new file mode 100644 index 00000000..885cc047 --- /dev/null +++ b/docs/description/eol_medium.md @@ -0,0 +1,2 @@ +## End-of-life package (within 6 months) +Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version. \ No newline at end of file diff --git a/docs/description/eol_minor.md b/docs/description/eol_minor.md new file mode 100644 index 00000000..9ed40e4b --- /dev/null +++ b/docs/description/eol_minor.md @@ -0,0 +1,2 @@ +## End-of-life package (beyond 6 months) +Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning. \ No newline at end of file diff --git a/docs/xeol-api-verification.md b/docs/xeol-api-verification.md new file mode 100644 index 00000000..fe6f13de --- /dev/null +++ b/docs/xeol-api-verification.md @@ -0,0 +1,32 @@ +# Step 1: XEOL API and output structure verification + +This document completes **Step 1** of the XEOL EOL Detection Integration Plan: verify xeol API and output structure for implementing the four severity bands (critical / high / medium / minor). + +## 1. Input: in-memory BOM vs path + +- **Library**: The xeol Go library (`github.com/xeol-io/xeol/xeol`) can run `FindEol` with a package catalog. However, adding `github.com/xeol-io/xeol` as a direct dependency pulls in `anchore/syft` and `anchore/fangs`, which **conflicted (tablewriter/viper)**; build fixed via go.mod replace with this project’s toolchain (Go 1.25 + `GOEXPERIMENT=jsonv2`). We **use the Go library** (see `internal/tool/eol_xeol_lib.go`); build fixed via go.mod replace. +- **CLI**: The xeol CLI accepts **path-based input only** for SBOMs: + - `xeol sbom:path/to/sbom.json` (or pipe: `cat sbom.json | xeol`). + - Supported formats: **Syft, SPDX, CycloneDX** ([README](https://github.com/xeol-io/xeol)). +- **Conclusion**: Write the Trivy-generated CycloneDX BOM to a temporary file; the **xeol library** decodes it (syft format), loads the EOL DB, and runs FindEol. No xeol binary required. + +## 2. Output: EOL date and four severity bands + +- **EOL date in matches**: The plan’s Clarifications state that **Match.Cycle exposes `Eol`** (string date, e.g. `"2025-06-01"`). The DB overview ([docs/xeol-db-overview.md](xeol-db-overview.md)) confirms that cycles have an `eol` date and that we can **compute days until EOL** and map to Codacy severity. +- **Lookahead**: The CLI supports `--lookahead` (e.g. `1w`, `30d`, `1y`). Default is 30 days. For our bands we need matches up to “longer than 6 months” (minor). Use a long lookahead (e.g. `--lookahead 1y`) so xeol returns all relevant matches; we then **classify each match** by days until EOL into: + - **Now obsolete** (EOL date in the past): **critical** (`eol_critical`). + - **Within 1 month of expiry**: **high** (`eol_high`). + - **Within 6 months**: **medium** (`eol_medium`). + - **Longer than 6 months**: **minor** (`eol_minor`). +- **CLI JSON**: The CLI can output JSON (e.g. `-o json`). The exact top-level and per-match structure (e.g. package identifier, cycle, EOL date field name) should be **confirmed at implementation time** from xeol’s presenter code or a sample run (`xeol sbom: -o json`). The integration will parse that JSON and read the EOL date string for each match to compute days and assign the rule ID. + +## 3. Summary + +| Question | Answer | +|----------|--------| +| Can we scan from an in-memory CycloneDX BOM? | Library builds (see go.mod replace). CLI accepts path only. Use temp file + `xeol sbom:`, or library API if preferred. | +| Does each match include EOL/cycle end date? | Yes. Match.Cycle has `Eol` (string date). We can compute days until EOL. | +| Can we implement all four bands (obsolete, <1 month, <6 months, >6 months)? | Yes. Parse EOL date, compute days, map to `eol_critical` / `eol_high` / `eol_medium` / `eol_minor`. | +| Integration approach | Use **xeol Go library**: write CycloneDX to temp file, decode with syft format, LoadEolDB + FindEol, map matches to Codacy issues. CLI runner available as fallback. | + +Step 1 is **complete**. Proceed to Step 2 (EOL rules and docgen). diff --git a/docs/xeol-db-overview.md b/docs/xeol-db-overview.md new file mode 100644 index 00000000..0919aea9 --- /dev/null +++ b/docs/xeol-db-overview.md @@ -0,0 +1,38 @@ +# XEOL EOL database overview + +This document summarizes what the XEOL (xeol-io/xeol) EOL database contains and how it is used. It is intended for implementers of the Codacy Trivy EOL scanner. + +## What is in the XEOL DB + +- **Source**: The open-source XEOL scanner uses an **open-source EOL data source**. The DB is hosted at `https://data.xeol.io/xeol/databases/` (listing: `listing.json`). DB archives are tar.gz files containing `xeol.db` (SQLite) and `metadata.json`. +- **Updated**: The EOL Explorer database is **updated weekly**. For Codacy we download the DB at **container build time** (offline at runtime). +- **Package ecosystems (EOL Explorer)**: The public EOL Explorer indexes: + - **NuGet** (.NET packages) + - **npm** (JavaScript/Node) + - **Maven** (Java) +- **Additional coverage**: Xeol also uses **endoflife.date**-style data. endoflife.date tracks 400+ products across: + - Programming languages (Python, Java, Node.js, PHP, Go, Ruby, etc.) + - Databases (MongoDB, PostgreSQL, Redis, MySQL) + - OS / distros (Windows, Android, macOS, Linux distros) + - Frameworks (Angular, Django, Rails, .NET) + - Server apps (Nginx, Kubernetes, Tomcat, HAProxy) + - Cloud (EKS, GKE, AKS) +- **DB schema (v1)**: + - **products** table: `id`, `name`, `permalink` (e.g. product name and slug). + - **cycles** table: `product_name`, `product_permalink`, `release_cycle`, `eol` (date), `eol_bool`, `lts`, `latest_release`, `latest_release_date`, `release_date`. +- **Lookup**: The store exposes: + - `GetCyclesByPurl(purl string)` — short PURL (e.g. `pkg:npm/lodash` without version) → list of EOL cycles for that package. + - `GetCyclesByCpe(cpe string)` — CPE (e.g. for OS/distro) → list of EOL cycles. +- **Cycle fields used for severity**: Each cycle has `Eol` (string date, e.g. `"2025-06-01"`) and `EolBool`. We parse `Eol` and compute days until EOL to map to Codacy severity (critical / high / medium / minor). + +## Libraries and packages (summary) + +- **Libraries**: The DB does not list “libraries” as a separate concept; it lists **products** and **release cycles** with EOL dates. Package ecosystems covered for **application dependencies** are primarily **npm**, **NuGet**, and **Maven** (via EOL Explorer). Broader products (languages, DBs, OSes, frameworks) come from endoflife.date-style data. +- **Go API**: `github.com/xeol-io/xeol/xeol` provides `FindEol(store, d, matchers, packages, failOnEolFound, eolMatchDate)` and `LoadEolDB(cfg, update)`. The DB is SQLite; the curator downloads from `Config.ListingURL` (default `https://data.xeol.io/xeol/databases/listing.json`) and expects `DBRootDir` to contain `{schema_version}/xeol.db` and metadata. + +## References + +- Xeol: https://github.com/xeol-io/xeol +- EOL Explorer: https://www.xeol.io/explorer +- endoflife.date: https://endoflife.date +- DB listing URL (default): `https://data.xeol.io/xeol/databases/listing.json` diff --git a/go.mod b/go.mod index 851ef602..95012c3d 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,11 @@ require ( golang.org/x/mod v0.32.0 ) +require ( + github.com/go-git/go-git/v5 v5.16.3 + github.com/xeol-io/xeol v0.10.8 +) + require ( al.essio.dev/pkg/shellescape v1.6.0 // indirect cel.dev/expr v0.24.0 // indirect @@ -28,6 +33,8 @@ require ( cloud.google.com/go/storage v1.57.1 // indirect cyphar.com/go-pathrs v0.2.1 // indirect dario.cat/mergo v1.0.2 // indirect + github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect + github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/containers/azcontainerregistry v0.2.3 // indirect @@ -44,6 +51,7 @@ require ( github.com/Intevation/jsonpath v0.2.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Masterminds/squirrel v1.5.4 // indirect @@ -51,10 +59,22 @@ require ( github.com/Microsoft/hcsshim v0.14.0-rc.1 // indirect github.com/ProtonMail/go-crypto v1.3.0 // indirect github.com/VividCortex/ewma v1.2.0 // indirect + github.com/acobaugh/osrelease v0.1.0 // indirect + github.com/adrg/xdg v0.5.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/agnivade/levenshtein v1.2.1 // indirect github.com/alecthomas/chroma v0.10.0 // indirect + github.com/anchore/clio v0.0.0-20240522144804-d81e109008aa // indirect + github.com/anchore/fangs v0.0.0-20240508143433-f016b099950f // indirect + github.com/anchore/go-collections v0.0.0-20240216171411-9321230ce537 // indirect + github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a // indirect + github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb // indirect github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect + github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4 // indirect + github.com/anchore/packageurl-go v0.1.1-0.20240507183024-848e011fc24f // indirect + github.com/anchore/stereoscope v0.0.3-0.20240725180315-50ce3be7aa1f // indirect + github.com/anchore/syft v1.10.0 // indirect + github.com/andybalholm/brotli v1.0.4 // indirect github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce // indirect @@ -90,17 +110,22 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.12 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.41.5 // indirect github.com/aws/smithy-go v1.24.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/becheran/wildmatch-go v1.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bitnami/go-version v0.0.0-20231130084017-bb00604d650c // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect + github.com/bmatcuk/doublestar/v2 v2.0.4 // indirect github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect github.com/briandowns/spinner v1.23.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect + github.com/charmbracelet/lipgloss v0.12.1 // indirect + github.com/charmbracelet/x/ansi v0.1.4 // indirect github.com/cheggaaa/pb/v3 v3.1.7 // indirect github.com/cloudflare/circl v1.6.1 // indirect github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect @@ -123,6 +148,7 @@ require ( github.com/cyphar/filepath-securejoin v0.6.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect + github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect github.com/digitorus/timestamp v0.0.0-20231217203849-220c5c2851b7 // indirect @@ -133,24 +159,33 @@ require ( github.com/docker/docker v28.5.2+incompatible // indirect github.com/docker/docker-credential-helpers v0.9.3 // indirect github.com/docker/go-connections v0.6.0 // indirect + github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/edsrzf/mmap-go v1.1.0 // indirect + github.com/elliotchance/phpserialize v1.4.0 // indirect github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/evanphx/json-patch v5.9.11+incompatible // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect + github.com/facebookincubator/nvdtools v0.1.5 // indirect github.com/fatih/color v1.18.0 // indirect + github.com/felixge/fgprof v0.9.3 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/fvbommel/sortorder v1.1.0 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.10 // indirect + github.com/github/go-spdx/v2 v2.3.1 // indirect + github.com/glebarez/go-sqlite v1.21.2 // indirect + github.com/glebarez/sqlite v1.9.0 // indirect github.com/go-chi/chi/v5 v5.2.4 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.6.2 // indirect - github.com/go-git/go-git/v5 v5.16.3 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-jose/go-jose/v4 v4.1.3 // indirect @@ -178,6 +213,7 @@ require ( github.com/go-openapi/swag/yamlutils v0.25.4 // indirect github.com/go-openapi/validate v0.25.1 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect + github.com/go-restruct/restruct v1.2.0-alpha // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.5 // indirect @@ -192,15 +228,19 @@ require ( github.com/google/go-containerregistry v0.20.7 // indirect github.com/google/go-github/v62 v62.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/licensecheck v0.3.1 // indirect github.com/google/licenseclassifier/v2 v2.0.0 // indirect + github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.9 // indirect github.com/googleapis/gax-go/v2 v2.16.0 // indirect + github.com/gookit/color v1.5.4 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect + github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b // indirect github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -210,17 +250,24 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/hcl v1.0.1-vault-7 // indirect github.com/hashicorp/hcl/v2 v2.24.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/in-toto/attestation v1.1.2 // indirect github.com/in-toto/in-toto-golang v0.9.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect + github.com/jinzhu/copier v0.4.0 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect github.com/jmoiron/sqlx v1.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.18.1 // indirect + github.com/klauspost/pgzip v1.2.6 // indirect github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f // indirect github.com/knqyf263/go-deb-version v0.0.0-20241115132648-6f4aee6ccd23 // indirect github.com/knqyf263/go-rpm-version v0.0.0-20220614171824-631e686d1075 // indirect @@ -240,7 +287,9 @@ require ( github.com/letsencrypt/boulder v0.20251110.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 // indirect + github.com/magiconair/properties v1.8.10 // indirect github.com/masahiro331/go-disk v0.0.0-20240625071113-56c933208fee // indirect github.com/masahiro331/go-ebs-file v0.0.0-20240917043618-e6d2bea5c32e // indirect github.com/masahiro331/go-ext4-filesystem v0.0.0-20240620024024-ca14e6327bbd // indirect @@ -251,10 +300,14 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect + github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect + github.com/mholt/archiver/v3 v3.5.1 // indirect + github.com/microsoft/go-rustaudit v0.0.0-20220808201409-204dfee52032 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/buildkit v0.26.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect @@ -273,11 +326,15 @@ require ( github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/ncruces/go-strftime v0.1.9 // indirect github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect + github.com/nwaples/rardecode v1.1.2 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/oklog/ulid/v2 v2.1.1 // indirect + github.com/olekukonko/tablewriter v1.1.0 // indirect github.com/open-policy-agent/opa v1.10.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect @@ -288,11 +345,15 @@ require ( github.com/owenrumney/go-sarif/v2 v2.3.3 // indirect github.com/owenrumney/squealer v1.2.11 // indirect github.com/pandatix/go-cvss v0.6.2 // indirect + github.com/pborman/indent v1.2.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect + github.com/pierrec/lz4/v4 v4.1.19 // indirect github.com/pjbgf/sha1cd v0.3.2 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/profile v1.7.0 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.23.2 // indirect @@ -300,15 +361,21 @@ require ( github.com/prometheus/common v0.67.4 // indirect github.com/prometheus/procfs v0.17.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rubenv/sql-migrate v1.8.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/rust-secure-code/go-rustaudit v0.0.0-20250226111315-e20ec32e963c // indirect + github.com/saferwall/pe v1.5.4 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect github.com/samber/oops v1.18.1 // indirect github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/sassoftware/go-rpmutils v0.4.0 // indirect github.com/sassoftware/relic v7.2.1+incompatible // indirect + github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e // indirect + github.com/secDre4mer/pkcs7 v0.0.0-20240322103146-665324a4461d // indirect github.com/secure-systems-lab/go-securesystemslib v0.10.0 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/sergi/go-diff v1.4.0 // indirect @@ -332,9 +399,12 @@ require ( github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/sylabs/sif/v2 v2.17.1 // indirect + github.com/sylabs/squashfs v1.0.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tchap/go-patricia/v2 v2.3.3 // indirect github.com/tetratelabs/wazero v1.10.1 // indirect + github.com/therootcompany/xz v1.0.1 // indirect github.com/theupdateframework/go-tuf v0.7.0 // indirect github.com/theupdateframework/go-tuf/v2 v2.4.1 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect @@ -345,10 +415,14 @@ require ( github.com/twitchtv/twirp v8.1.3+incompatible // indirect github.com/ulikunitz/xz v0.5.15 // indirect github.com/valyala/fastjson v1.6.4 // indirect + github.com/vbatts/go-mtree v0.5.4 // indirect github.com/vbatts/tar-split v0.12.2 // indirect github.com/vektah/gqlparser/v2 v2.5.30 // indirect + github.com/vifraa/gopom v1.0.0 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651 // indirect + github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect @@ -356,6 +430,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xlab/treeprint v1.2.0 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yashtewari/glob-intersection v0.2.0 // indirect github.com/zclconf/go-cty v1.17.0 // indirect github.com/zclconf/go-cty-yaml v1.1.0 // indirect @@ -380,6 +455,7 @@ require ( go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.46.0 // indirect + golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect golang.org/x/net v0.48.0 // indirect golang.org/x/oauth2 v0.34.0 // indirect golang.org/x/sync v0.19.0 // indirect @@ -398,8 +474,10 @@ require ( gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.67.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gorm.io/gorm v1.25.6 // indirect helm.sh/helm/v3 v3.19.2 // indirect k8s.io/api v0.34.2 // indirect k8s.io/apiextensions-apiserver v0.34.0 // indirect @@ -412,6 +490,10 @@ require ( k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/kubectl v0.34.0 // indirect k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect + modernc.org/libc v1.66.10 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect + modernc.org/sqlite v1.40.1 // indirect mvdan.cc/sh/v3 v3.11.0 // indirect oras.land/oras-go/v2 v2.6.0 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect @@ -421,3 +503,10 @@ require ( sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) + +// Pin versions required by xeol's transitive deps (anchore/syft, anchore/fangs). +// Syft expects tablewriter v0.0.5 API; viper v1.18.2 matches fangs' DecoderConfigOption. +replace ( + github.com/olekukonko/tablewriter => github.com/olekukonko/tablewriter v0.0.5 + github.com/spf13/viper => github.com/spf13/viper v1.18.2 +) diff --git a/go.sum b/go.sum index 1e1fb006..23c036e4 100644 --- a/go.sum +++ b/go.sum @@ -3,36 +3,1175 @@ al.essio.dev/pkg/shellescape v1.6.0/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWt cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go v0.121.6 h1:waZiuajrI28iAf40cWgycWNgaXPO06dupuS+sgibK6c= cloud.google.com/go v0.121.6/go.mod h1:coChdst4Ea5vUpiALcYKXEpR1S9ZgXbhEzzMcMR66vI= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= +cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= +cloud.google.com/go/accessapproval v1.7.3/go.mod h1:4l8+pwIxGTNqSf4T3ds8nLO94NQf0W/KnMNuQ9PbnP8= +cloud.google.com/go/accessapproval v1.7.4/go.mod h1:/aTEh45LzplQgFYdQdwPMR9YdX0UlhBmvB84uAmQKUc= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= +cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= +cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= +cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= +cloud.google.com/go/accesscontextmanager v1.8.3/go.mod h1:4i/JkF2JiFbhLnnpnfoTX5vRXfhf9ukhU1ANOTALTOQ= +cloud.google.com/go/accesscontextmanager v1.8.4/go.mod h1:ParU+WbMpD34s5JFEnGAnPBYAgUHozaTmDJU7aCU9+M= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= +cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= +cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= +cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= +cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= +cloud.google.com/go/aiplatform v1.51.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= +cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= +cloud.google.com/go/aiplatform v1.51.2/go.mod h1:hCqVYB3mY45w99TmetEoe8eCQEwZEp9WHxeZdcv9phw= +cloud.google.com/go/aiplatform v1.52.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= +cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= +cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= +cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= +cloud.google.com/go/analytics v0.21.5/go.mod h1:BQtOBHWTlJ96axpPPnw5CvGJ6i3Ve/qX2fTxR8qWyr8= +cloud.google.com/go/analytics v0.21.6/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= +cloud.google.com/go/apigateway v1.6.3/go.mod h1:k68PXWpEs6BVDTtnLQAyG606Q3mz8pshItwPXjgv44Y= +cloud.google.com/go/apigateway v1.6.4/go.mod h1:0EpJlVGH5HwAN4VF4Iec8TAzGN1aQgbxAWGJsnPCGGY= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= +cloud.google.com/go/apigeeconnect v1.6.3/go.mod h1:peG0HFQ0si2bN15M6QSjEW/W7Gy3NYkWGz7pFz13cbo= +cloud.google.com/go/apigeeconnect v1.6.4/go.mod h1:CapQCWZ8TCjnU0d7PobxhpOdVz/OVJ2Hr/Zcuu1xFx0= +cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= +cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= +cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= +cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= +cloud.google.com/go/apigeeregistry v0.8.1/go.mod h1:MW4ig1N4JZQsXmBSwH4rwpgDonocz7FPBSw6XPGHmYw= +cloud.google.com/go/apigeeregistry v0.8.2/go.mod h1:h4v11TDGdeXJDJvImtgK2AFVvMIgGWjSb0HRnBSjcX8= +cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= +cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= +cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= +cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= +cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= +cloud.google.com/go/appengine v1.8.3/go.mod h1:2oUPZ1LVZ5EXi+AF1ihNAF+S8JrzQ3till5m9VQkrsk= +cloud.google.com/go/appengine v1.8.4/go.mod h1:TZ24v+wXBujtkK77CXCpjZbnuTvsFNT41MUaZ28D6vg= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= +cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= +cloud.google.com/go/area120 v0.8.3/go.mod h1:5zj6pMzVTH+SVHljdSKC35sriR/CVvQZzG/Icdyriw0= +cloud.google.com/go/area120 v0.8.4/go.mod h1:jfawXjxf29wyBXr48+W+GyX/f8fflxp642D/bb9v68M= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= +cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= +cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= +cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= +cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/artifactregistry v1.14.2/go.mod h1:Xk+QbsKEb0ElmyeMfdHAey41B+qBq3q5R5f5xD4XT3U= +cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= +cloud.google.com/go/artifactregistry v1.14.4/go.mod h1:SJJcZTMv6ce0LDMUnihCN7WSrI+kBSFV0KIKo8S8aYU= +cloud.google.com/go/artifactregistry v1.14.6/go.mod h1:np9LSFotNWHcjnOgh8UVK0RFPCTUGbO0ve3384xyHfE= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= +cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= +cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= +cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/asset v1.15.0/go.mod h1:tpKafV6mEut3+vN9ScGvCHXHj7FALFVta+okxFECHcg= +cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= +cloud.google.com/go/asset v1.15.2/go.mod h1:B6H5tclkXvXz7PD22qCA2TDxSVQfasa3iDlM89O2NXs= +cloud.google.com/go/asset v1.15.3/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= +cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= +cloud.google.com/go/assuredworkloads v1.11.3/go.mod h1:vEjfTKYyRUaIeA0bsGJceFV2JKpVRgyG2op3jfa59Zs= +cloud.google.com/go/assuredworkloads v1.11.4/go.mod h1:4pwwGNwy1RP0m+y12ef3Q/8PaiWrIDQ6nD2E8kvWI9U= cloud.google.com/go/auth v0.18.0 h1:wnqy5hrv7p3k7cShwAU/Br3nzod7fxoqG+k0VZ+/Pk0= cloud.google.com/go/auth v0.18.0/go.mod h1:wwkPM1AgE1f2u6dG443MiWoD8C3BtOywNsUMcUTVDRo= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= +cloud.google.com/go/automl v1.13.3/go.mod h1:Y8KwvyAZFOsMAPqUCfNu1AyclbC6ivCUF/MTwORymyY= +cloud.google.com/go/automl v1.13.4/go.mod h1:ULqwX/OLZ4hBVfKQaMtxMSTlPx0GqGbWN8uA/1EqCP8= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= +cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= +cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= +cloud.google.com/go/baremetalsolution v1.2.2/go.mod h1:O5V6Uu1vzVelYahKfwEWRMaS3AbCkeYHy3145s1FkhM= +cloud.google.com/go/baremetalsolution v1.2.3/go.mod h1:/UAQ5xG3faDdy180rCUv47e0jvpp3BFxT+Cl0PFjw5g= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= +cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= +cloud.google.com/go/batch v1.5.0/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= +cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= +cloud.google.com/go/batch v1.6.1/go.mod h1:urdpD13zPe6YOK+6iZs/8/x2VBRofvblLpx0t57vM98= +cloud.google.com/go/batch v1.6.3/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= +cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= +cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= +cloud.google.com/go/beyondcorp v1.0.2/go.mod h1:m8cpG7caD+5su+1eZr+TSvF6r21NdLJk4f9u4SP2Ntc= +cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= +cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= +cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= +cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= +cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= +cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= +cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= +cloud.google.com/go/bigquery v1.57.1/go.mod h1:iYzC0tGVWt1jqSzBHqCr3lrRn0u13E8e+AqowBsDgug= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= +cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= +cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= +cloud.google.com/go/billing v1.17.1/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= +cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= +cloud.google.com/go/billing v1.17.3/go.mod h1:z83AkoZ7mZwBGT3yTnt6rSGI1OOsHSIi6a5M3mJ8NaU= +cloud.google.com/go/billing v1.17.4/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= +cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= +cloud.google.com/go/binaryauthorization v1.7.2/go.mod h1:kFK5fQtxEp97m92ziy+hbu+uKocka1qRRL8MVJIgjv0= +cloud.google.com/go/binaryauthorization v1.7.3/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= +cloud.google.com/go/certificatemanager v1.7.3/go.mod h1:T/sZYuC30PTag0TLo28VedIRIj1KPGcOQzjWAptHa00= +cloud.google.com/go/certificatemanager v1.7.4/go.mod h1:FHAylPe/6IIKuaRmHbjbdLhGhVQ+CWHSD5Jq0k4+cCE= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= +cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= +cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= +cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= +cloud.google.com/go/channel v1.17.2/go.mod h1:aT2LhnftnyfQceFql5I/mP8mIbiiJS4lWqgXA815zMk= +cloud.google.com/go/channel v1.17.3/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= +cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= +cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= +cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= +cloud.google.com/go/cloudbuild v1.14.2/go.mod h1:Bn6RO0mBYk8Vlrt+8NLrru7WXlQ9/RDWz2uo5KG1/sg= +cloud.google.com/go/cloudbuild v1.14.3/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= +cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= +cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= +cloud.google.com/go/clouddms v1.7.2/go.mod h1:Rk32TmWmHo64XqDvW7jgkFQet1tUKNVzs7oajtJT3jU= +cloud.google.com/go/clouddms v1.7.3/go.mod h1:fkN2HQQNUYInAU3NQ3vRLkV2iWs8lIdmBKOx4nrL6Hc= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= +cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= +cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= +cloud.google.com/go/cloudtasks v1.12.3/go.mod h1:GPVXhIOSGEaR+3xT4Fp72ScI+HjHffSS4B8+BaBB5Ys= +cloud.google.com/go/cloudtasks v1.12.4/go.mod h1:BEPu0Gtt2dU6FxZHNqqNdGqIG86qyWKBPGnsb7udGY0= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= +cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.11.0/go.mod h1:hutBdImE4XNZ1NV4vbPJKSFOnQruhC5Lj9bZqWMTKiU= +cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= +cloud.google.com/go/contactcenterinsights v1.11.2/go.mod h1:A9PIR5ov5cRcd28KlDbmmXE8Aay+Gccer2h4wzkYFso= +cloud.google.com/go/contactcenterinsights v1.11.3/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= +cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= +cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= +cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= +cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= +cloud.google.com/go/container v1.26.2/go.mod h1:YlO84xCt5xupVbLaMY4s3XNE79MUJ+49VmkInr6HvF4= +cloud.google.com/go/container v1.27.1/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= +cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= +cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= +cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= +cloud.google.com/go/containeranalysis v0.11.2/go.mod h1:xibioGBC1MD2j4reTyV1xY1/MvKaz+fyM9ENWhmIeP8= +cloud.google.com/go/containeranalysis v0.11.3/go.mod h1:kMeST7yWFQMGjiG9K7Eov+fPNQcGhb8mXj/UcTiWw9U= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= +cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= +cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= +cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= +cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= +cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= +cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= +cloud.google.com/go/datacatalog v1.18.2/go.mod h1:SPVgWW2WEMuWHA+fHodYjmxPiMqcOiWfhc9OD5msigk= +cloud.google.com/go/datacatalog v1.18.3/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= +cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= +cloud.google.com/go/dataflow v0.9.3/go.mod h1:HI4kMVjcHGTs3jTHW/kv3501YW+eloiJSLxkJa/vqFE= +cloud.google.com/go/dataflow v0.9.4/go.mod h1:4G8vAkHYCSzU8b/kmsoR2lWyHJD85oMJPHMtan40K8w= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= +cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= +cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= +cloud.google.com/go/dataform v0.8.3/go.mod h1:8nI/tvv5Fso0drO3pEjtowz58lodx8MVkdV2q0aPlqg= +cloud.google.com/go/dataform v0.9.1/go.mod h1:pWTg+zGQ7i16pyn0bS1ruqIE91SdL2FDMvEYu/8oQxs= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= +cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= +cloud.google.com/go/datafusion v1.7.3/go.mod h1:eoLt1uFXKGBq48jy9LZ+Is8EAVLnmn50lNncLzwYokE= +cloud.google.com/go/datafusion v1.7.4/go.mod h1:BBs78WTOLYkT4GVZIXQCZT3GFpkpDN4aBY4NDX/jVlM= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= +cloud.google.com/go/datalabeling v0.8.3/go.mod h1:tvPhpGyS/V7lqjmb3V0TaDdGvhzgR1JoW7G2bpi2UTI= +cloud.google.com/go/datalabeling v0.8.4/go.mod h1:Z1z3E6LHtffBGrNUkKwbwbDxTiXEApLzIgmymj8A3S8= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= +cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= +cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= +cloud.google.com/go/dataplex v1.10.2/go.mod h1:xdC8URdTrCrZMW6keY779ZT1cTOfV8KEPNsw+LTRT1Y= +cloud.google.com/go/dataplex v1.11.1/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= +cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= +cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= +cloud.google.com/go/dataproc/v2 v2.2.2/go.mod h1:aocQywVmQVF4i8CL740rNI/ZRpsaaC1Wh2++BJ7HEJ4= +cloud.google.com/go/dataproc/v2 v2.2.3/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= +cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= +cloud.google.com/go/dataqna v0.8.3/go.mod h1:wXNBW2uvc9e7Gl5k8adyAMnLush1KVV6lZUhB+rqNu4= +cloud.google.com/go/dataqna v0.8.4/go.mod h1:mySRKjKg5Lz784P6sCov3p1QD+RZQONRMRjzGNcFd0c= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= +cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.14.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= +cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= +cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= +cloud.google.com/go/datastream v1.10.2/go.mod h1:W42TFgKAs/om6x/CdXX5E4oiAsKlH+e8MTGy81zdYt0= +cloud.google.com/go/datastream v1.10.3/go.mod h1:YR0USzgjhqA/Id0Ycu1VvZe8hEWwrkjuXrGbzeDOSEA= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= +cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= +cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= +cloud.google.com/go/deploy v1.14.1/go.mod h1:N8S0b+aIHSEeSr5ORVoC0+/mOPUysVt8ae4QkZYolAw= +cloud.google.com/go/deploy v1.14.2/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= +cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= +cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= +cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= +cloud.google.com/go/dialogflow v1.44.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= +cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= +cloud.google.com/go/dialogflow v1.44.2/go.mod h1:QzFYndeJhpVPElnFkUXxdlptx0wPnBWLCBT9BvtC3/c= +cloud.google.com/go/dialogflow v1.44.3/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= +cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= +cloud.google.com/go/dlp v1.10.3/go.mod h1:iUaTc/ln8I+QT6Ai5vmuwfw8fqTk2kaz0FvCwhLCom0= +cloud.google.com/go/dlp v1.11.1/go.mod h1:/PA2EnioBeXTL/0hInwgj0rfsQb3lpE3R8XUJxqUNKI= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= +cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= +cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= +cloud.google.com/go/documentai v1.23.0/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= +cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= +cloud.google.com/go/documentai v1.23.4/go.mod h1:4MYAaEMnADPN1LPN5xboDR5QVB6AgsaxgFdJhitlE2Y= +cloud.google.com/go/documentai v1.23.5/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= +cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= +cloud.google.com/go/domains v0.9.3/go.mod h1:29k66YNDLDY9LCFKpGFeh6Nj9r62ZKm5EsUJxAl84KU= +cloud.google.com/go/domains v0.9.4/go.mod h1:27jmJGShuXYdUNjyDG0SodTfT5RwLi7xmH334Gvi3fY= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= +cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= +cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= +cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= +cloud.google.com/go/edgecontainer v1.1.3/go.mod h1:Ll2DtIABzEfaxaVSbwj3QHFaOOovlDFiWVDu349jSsA= +cloud.google.com/go/edgecontainer v1.1.4/go.mod h1:AvFdVuZuVGdgaE5YvlL1faAoa1ndRR/5XhXZvPBHbsE= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= +cloud.google.com/go/essentialcontacts v1.6.4/go.mod h1:iju5Vy3d9tJUg0PYMd1nHhjV7xoCXaOAVabrwLaPBEM= +cloud.google.com/go/essentialcontacts v1.6.5/go.mod h1:jjYbPzw0x+yglXC890l6ECJWdYeZ5dlYACTFL0U/VuM= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= +cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= +cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= +cloud.google.com/go/eventarc v1.13.2/go.mod h1:X9A80ShVu19fb4e5sc/OLV7mpFUKZMwfJFeeWhcIObM= +cloud.google.com/go/eventarc v1.13.3/go.mod h1:RWH10IAZIRcj1s/vClXkBgMHwh59ts7hSWcqD3kaclg= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= +cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= +cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= +cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= +cloud.google.com/go/filestore v1.7.3/go.mod h1:Qp8WaEERR3cSkxToxFPHh/b8AACkSut+4qlCjAmKTV0= +cloud.google.com/go/filestore v1.7.4/go.mod h1:S5JCxIbFjeBhWMTfIYH2Jx24J6BqjwpkkPl+nBA5DlI= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= +cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= +cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= +cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= +cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= +cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= +cloud.google.com/go/functions v1.15.3/go.mod h1:r/AMHwBheapkkySEhiZYLDBwVJCdlRwsm4ieJu35/Ug= +cloud.google.com/go/functions v1.15.4/go.mod h1:CAsTc3VlRMVvx+XqXxKqVevguqJpnVip4DdonFsX28I= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb7iHGwB3s= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= +cloud.google.com/go/gkebackup v1.3.3/go.mod h1:eMk7/wVV5P22KBakhQnJxWSVftL1p4VBFLpv0kIft7I= +cloud.google.com/go/gkebackup v1.3.4/go.mod h1:gLVlbM8h/nHIs09ns1qx3q3eaXcGSELgNu1DWXYz1HI= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= +cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= +cloud.google.com/go/gkeconnect v0.8.3/go.mod h1:i9GDTrfzBSUZGCe98qSu1B8YB8qfapT57PenIb820Jo= +cloud.google.com/go/gkeconnect v0.8.4/go.mod h1:84hZz4UMlDCKl8ifVW8layK4WHlMAFeq8vbzjU0yJkw= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= +cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= +cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= +cloud.google.com/go/gkehub v0.14.3/go.mod h1:jAl6WafkHHW18qgq7kqcrXYzN08hXeK/Va3utN8VKg8= +cloud.google.com/go/gkehub v0.14.4/go.mod h1:Xispfu2MqnnFt8rV/2/3o73SK1snL8s9dYJ9G2oQMfc= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= +cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= +cloud.google.com/go/gkemulticloud v1.0.2/go.mod h1:+ee5VXxKb3H1l4LZAcgWB/rvI16VTNTrInWxDjAGsGo= +cloud.google.com/go/gkemulticloud v1.0.3/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= +cloud.google.com/go/gsuiteaddons v1.6.3/go.mod h1:sCFJkZoMrLZT3JTb8uJqgKPNshH2tfXeCwTFRebTq48= +cloud.google.com/go/gsuiteaddons v1.6.4/go.mod h1:rxtstw7Fx22uLOXBpsvb9DUbC+fiXs7rF4U29KHM/pE= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iam v1.5.3 h1:+vMINPiDF2ognBJ97ABAYYwRgsaqxPbQDlMnbHMjolc= cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= +cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= +cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= +cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= +cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= +cloud.google.com/go/iap v1.9.2/go.mod h1:GwDTOs047PPSnwRD0Us5FKf4WDRcVvHg1q9WVkKBhdI= +cloud.google.com/go/iap v1.9.3/go.mod h1:DTdutSZBqkkOm2HEOTBzhZxh2mwwxshfD/h3yofAiCw= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= +cloud.google.com/go/ids v1.4.3/go.mod h1:9CXPqI3GedjmkjbMWCUhMZ2P2N7TUMzAkVXYEH2orYU= +cloud.google.com/go/ids v1.4.4/go.mod h1:z+WUc2eEl6S/1aZWzwtVNWoSZslgzPxAboS0lZX0HjI= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= +cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= +cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= +cloud.google.com/go/iot v1.7.3/go.mod h1:t8itFchkol4VgNbHnIq9lXoOOtHNR3uAACQMYbN9N4I= +cloud.google.com/go/iot v1.7.4/go.mod h1:3TWqDVvsddYBG++nHSZmluoCAVGr1hAcabbWZNKEZLk= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= +cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= +cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= +cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= +cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= +cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= +cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= +cloud.google.com/go/kms v1.15.4/go.mod h1:L3Sdj6QTHK8dfwK5D1JLsAyELsNMnd3tAIwGS4ltKpc= +cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= cloud.google.com/go/kms v1.23.2 h1:4IYDQL5hG4L+HzJBhzejUySoUOheh3Lk5YT4PCyyW6k= cloud.google.com/go/kms v1.23.2/go.mod h1:rZ5kK0I7Kn9W4erhYVoIRPtpizjunlrfU4fUkumUp8g= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= +cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= +cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= +cloud.google.com/go/language v1.12.1/go.mod h1:zQhalE2QlQIxbKIZt54IASBzmZpN/aDASea5zl1l+J4= +cloud.google.com/go/language v1.12.2/go.mod h1:9idWapzr/JKXBBQ4lWqVX/hcadxB194ry20m/bTrhWc= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= +cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= +cloud.google.com/go/lifesciences v0.9.3/go.mod h1:gNGBOJV80IWZdkd+xz4GQj4mbqaz737SCLHn2aRhQKM= +cloud.google.com/go/lifesciences v0.9.4/go.mod h1:bhm64duKhMi7s9jR9WYJYvjAFJwRqNj+Nia7hF0Z7JA= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= cloud.google.com/go/logging v1.13.1 h1:O7LvmO0kGLaHY/gq8cV7T0dyp6zJhYAOtZPX4TF3QtY= cloud.google.com/go/logging v1.13.1/go.mod h1:XAQkfkMBxQRjQek96WLPNze7vsOmay9H5PqfsNYDqvw= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= +cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= +cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= +cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= +cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= +cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= cloud.google.com/go/longrunning v0.7.0 h1:FV0+SYF1RIj59gyoWDRi45GiYUMM3K1qO51qoboQT1E= cloud.google.com/go/longrunning v0.7.0/go.mod h1:ySn2yXmjbK9Ba0zsQqunhDkYi0+9rlXIwnoAf+h+TPY= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= +cloud.google.com/go/managedidentities v1.6.3/go.mod h1:tewiat9WLyFN0Fi7q1fDD5+0N4VUoL0SCX0OTCthZq4= +cloud.google.com/go/managedidentities v1.6.4/go.mod h1:WgyaECfHmF00t/1Uk8Oun3CQ2PGUtjc3e9Alh79wyiM= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= +cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= +cloud.google.com/go/maps v1.5.1/go.mod h1:NPMZw1LJwQZYCfz4y+EIw+SI+24A4bpdFJqdKVr0lt4= +cloud.google.com/go/maps v1.6.1/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= +cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= +cloud.google.com/go/mediatranslation v0.8.3/go.mod h1:F9OnXTy336rteOEywtY7FOqCk+J43o2RF638hkOQl4Y= +cloud.google.com/go/mediatranslation v0.8.4/go.mod h1:9WstgtNVAdN53m6TQa5GjIjLqKQPXe74hwSCxUP6nj4= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= +cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= +cloud.google.com/go/memcache v1.10.3/go.mod h1:6z89A41MT2DVAW0P4iIRdu5cmRTsbsFn4cyiIx8gbwo= +cloud.google.com/go/memcache v1.10.4/go.mod h1:v/d8PuC8d1gD6Yn5+I3INzLR01IDn0N4Ym56RgikSI0= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.13.0/go.mod h1:URDhpG6XLeh5K+Glq0NOt74OfrPKTwS62gEPZzb5SOk= +cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= +cloud.google.com/go/metastore v1.13.2/go.mod h1:KS59dD+unBji/kFebVp8XU/quNSyo8b6N6tPGspKszA= +cloud.google.com/go/metastore v1.13.3/go.mod h1:K+wdjXdtkdk7AQg4+sXS8bRrQa9gcOr+foOMF2tqINE= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= +cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= +cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= +cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= +cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= +cloud.google.com/go/monitoring v1.16.3/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE= cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= +cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= +cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= +cloud.google.com/go/networkconnectivity v1.14.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= +cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= +cloud.google.com/go/networkconnectivity v1.14.2/go.mod h1:5UFlwIisZylSkGG1AdwK/WZUaoz12PKu6wODwIbFzJo= +cloud.google.com/go/networkconnectivity v1.14.3/go.mod h1:4aoeFdrJpYEXNvrnfyD5kIzs8YtHg945Og4koAjHQek= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= +cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= +cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= +cloud.google.com/go/networkmanagement v1.9.2/go.mod h1:iDGvGzAoYRghhp4j2Cji7sF899GnfGQcQRQwgVOWnDw= +cloud.google.com/go/networkmanagement v1.9.3/go.mod h1:y7WMO1bRLaP5h3Obm4tey+NquUvB93Co1oh4wpL+XcU= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= +cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= +cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= +cloud.google.com/go/networksecurity v0.9.3/go.mod h1:l+C0ynM6P+KV9YjOnx+kk5IZqMSLccdBqW6GUoF4p/0= +cloud.google.com/go/networksecurity v0.9.4/go.mod h1:E9CeMZ2zDsNBkr8axKSYm8XyTqNhiCHf1JO/Vb8mD1w= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= +cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= +cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= +cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= +cloud.google.com/go/notebooks v1.11.1/go.mod h1:V2Zkv8wX9kDCGRJqYoI+bQAaoVeE5kSiz4yYHd2yJwQ= +cloud.google.com/go/notebooks v1.11.2/go.mod h1:z0tlHI/lREXC8BS2mIsUeR3agM1AkgLiS+Isov3SS70= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= +cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= +cloud.google.com/go/optimization v1.6.1/go.mod h1:hH2RYPTTM9e9zOiTaYPTiGPcGdNZVnBSBxjIAJzUkqo= +cloud.google.com/go/optimization v1.6.2/go.mod h1:mWNZ7B9/EyMCcwNl1frUGEuY6CPijSkz88Fz2vwKPOY= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= +cloud.google.com/go/orchestration v1.8.3/go.mod h1:xhgWAYqlbYjlz2ftbFghdyqENYW+JXuhBx9KsjMoGHs= +cloud.google.com/go/orchestration v1.8.4/go.mod h1:d0lywZSVYtIoSZXb0iFjv9SaL13PGyVOKDxqGxEf/qI= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= +cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= +cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= +cloud.google.com/go/orgpolicy v1.11.3/go.mod h1:oKAtJ/gkMjum5icv2aujkP4CxROxPXsBbYGCDbPO8MM= +cloud.google.com/go/orgpolicy v1.11.4/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= +cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= +cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= +cloud.google.com/go/osconfig v1.12.3/go.mod h1:L/fPS8LL6bEYUi1au832WtMnPeQNT94Zo3FwwV1/xGM= +cloud.google.com/go/osconfig v1.12.4/go.mod h1:B1qEwJ/jzqSRslvdOCI8Kdnp0gSng0xW4LOnIebQomA= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= +cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/oslogin v1.11.0/go.mod h1:8GMTJs4X2nOAUVJiPGqIWVcDaF0eniEto3xlOxaboXE= +cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= +cloud.google.com/go/oslogin v1.12.1/go.mod h1:VfwTeFJGbnakxAY236eN8fsnglLiVXndlbcNomY4iZU= +cloud.google.com/go/oslogin v1.12.2/go.mod h1:CQ3V8Jvw4Qo4WRhNPF0o+HAM4DiLuE27Ul9CX9g2QdY= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= +cloud.google.com/go/phishingprotection v0.8.3/go.mod h1:3B01yO7T2Ra/TMojifn8EoGd4G9jts/6cIO0DgDY9J8= +cloud.google.com/go/phishingprotection v0.8.4/go.mod h1:6b3kNPAc2AQ6jZfFHioZKg9MQNybDg4ixFd4RPZZ2nE= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= +cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= +cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= +cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= +cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= +cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= +cloud.google.com/go/policytroubleshooter v1.10.1/go.mod h1:5C0rhT3TDZVxAu8813bwmTvd57Phbl8mr9F4ipOsxEs= +cloud.google.com/go/policytroubleshooter v1.10.2/go.mod h1:m4uF3f6LseVEnMV6nknlN2vYGRb+75ylQwJdnOXfnv0= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= +cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= +cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= +cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= +cloud.google.com/go/privatecatalog v0.9.3/go.mod h1:K5pn2GrVmOPjXz3T26mzwXLcKivfIJ9R5N79AFCF9UE= +cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= +cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= +cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= +cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.0/go.mod h1:QuE8EdU9dEnesG8/kG3XuJyNsjEqMlMzg3v3scCJ46c= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.2/go.mod h1:kpaDBOpkwD4G0GVMzG1W6Doy1tFFC97XAV3xy+Rd/pw= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.3/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= +cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= +cloud.google.com/go/recommendationengine v0.8.3/go.mod h1:m3b0RZV02BnODE9FeSvGv1qibFo8g0OnmB/RMwYy4V8= +cloud.google.com/go/recommendationengine v0.8.4/go.mod h1:GEteCf1PATl5v5ZsQ60sTClUE0phbWmo3rQ1Js8louU= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= +cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= +cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= +cloud.google.com/go/recommender v1.11.2/go.mod h1:AeoJuzOvFR/emIcXdVFkspVXVTYpliRCmKNYDnyBv6Y= +cloud.google.com/go/recommender v1.11.3/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= +cloud.google.com/go/redis v1.13.3/go.mod h1:vbUpCKUAZSYzFcWKmICnYgRAhTFg9r+djWqFxDYXi4U= +cloud.google.com/go/redis v1.14.1/go.mod h1:MbmBxN8bEnQI4doZPC1BzADU4HGocHBk2de3SbgOkqs= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= +cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= +cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= +cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= +cloud.google.com/go/resourcemanager v1.9.3/go.mod h1:IqrY+g0ZgLsihcfcmqSe+RKp1hzjXwG904B92AwBz6U= +cloud.google.com/go/resourcemanager v1.9.4/go.mod h1:N1dhP9RFvo3lUfwtfLWVxfUWq8+KUQ+XLlHLH3BoFJ0= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= +cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= +cloud.google.com/go/resourcesettings v1.6.3/go.mod h1:pno5D+7oDYkMWZ5BpPsb4SO0ewg3IXcmmrUZaMJrFic= +cloud.google.com/go/resourcesettings v1.6.4/go.mod h1:pYTTkWdv2lmQcjsthbZLNBP4QW140cs7wqA3DuqErVI= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= +cloud.google.com/go/retail v1.14.3/go.mod h1:Omz2akDHeSlfCq8ArPKiBxlnRpKEBjUH386JYFLUvXo= +cloud.google.com/go/retail v1.14.4/go.mod h1:l/N7cMtY78yRnJqp5JW8emy7MB1nz8E4t2yfOmklYfg= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= +cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= +cloud.google.com/go/run v1.3.0/go.mod h1:S/osX/4jIPZGg+ssuqh6GNgg7syixKe3YnprwehzHKU= +cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= +cloud.google.com/go/run v1.3.2/go.mod h1:SIhmqArbjdU/D9M6JoHaAqnAMKLFtXaVdNeq04NjnVE= +cloud.google.com/go/run v1.3.3/go.mod h1:WSM5pGyJ7cfYyYbONVQBN4buz42zFqwG67Q3ch07iK4= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= +cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= +cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= +cloud.google.com/go/scheduler v1.10.3/go.mod h1:8ANskEM33+sIbpJ+R4xRfw/jzOG+ZFE8WVLy7/yGvbc= +cloud.google.com/go/scheduler v1.10.4/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= +cloud.google.com/go/secretmanager v1.11.3/go.mod h1:0bA2o6FabmShrEy328i67aV+65XoUFFSmVeLBn/51jI= +cloud.google.com/go/secretmanager v1.11.4/go.mod h1:wreJlbS9Zdq21lMzWmJ0XhWW2ZxgPeahsqeV/vZoJ3w= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= +cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= +cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= +cloud.google.com/go/security v1.15.3/go.mod h1:gQ/7Q2JYUZZgOzqKtw9McShH+MjNvtDpL40J1cT+vBs= +cloud.google.com/go/security v1.15.4/go.mod h1:oN7C2uIZKhxCLiAAijKUCuHLZbIt/ghYEo8MqwD/Ty4= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= +cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= +cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= +cloud.google.com/go/securitycenter v1.24.1/go.mod h1:3h9IdjjHhVMXdQnmqzVnM7b0wMn/1O/U20eWVpMpZjI= +cloud.google.com/go/securitycenter v1.24.2/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= +cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= +cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= +cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= +cloud.google.com/go/servicedirectory v1.11.2/go.mod h1:KD9hCLhncWRV5jJphwIpugKwM5bn1x0GyVVD4NO8mGg= +cloud.google.com/go/servicedirectory v1.11.3/go.mod h1:LV+cHkomRLr67YoQy3Xq2tUXBGOs5z5bPofdq7qtiAw= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= +cloud.google.com/go/shell v1.7.3/go.mod h1:cTTEz/JdaBsQAeTQ3B6HHldZudFoYBOqjteev07FbIc= +cloud.google.com/go/shell v1.7.4/go.mod h1:yLeXB8eKLxw0dpEmXQ/FjriYrBijNsONpwnWsdPqlKM= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= +cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= +cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= +cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= +cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= +cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= +cloud.google.com/go/speech v1.19.2/go.mod h1:2OYFfj+Ch5LWjsaSINuCZsre/789zlcCI3SY4oAi2oI= +cloud.google.com/go/speech v1.20.1/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/storage v1.57.1 h1:gzao6odNJ7dR3XXYvAgPK+Iw4fVPPznEPPyNjbaVkq8= cloud.google.com/go/storage v1.57.1/go.mod h1:329cwlpzALLgJuu8beyJ/uvQznDHpa2U5lGjWednkzg= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= +cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= +cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= +cloud.google.com/go/storagetransfer v1.10.2/go.mod h1:meIhYQup5rg9juQJdyppnA/WLQCOguxtk1pr3/vBWzA= +cloud.google.com/go/storagetransfer v1.10.3/go.mod h1:Up8LY2p6X68SZ+WToswpQbQHnJpOty/ACcMafuey8gc= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= +cloud.google.com/go/talent v1.6.4/go.mod h1:QsWvi5eKeh6gG2DlBkpMaFYZYrYUnIpo34f6/V5QykY= +cloud.google.com/go/talent v1.6.5/go.mod h1:Mf5cma696HmE+P2BWJ/ZwYqeJXEeU0UqjHFXVLadEDI= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= +cloud.google.com/go/texttospeech v1.7.3/go.mod h1:Av/zpkcgWfXlDLRYob17lqMstGZ3GqlvJXqKMp2u8so= +cloud.google.com/go/texttospeech v1.7.4/go.mod h1:vgv0002WvR4liGuSd5BJbWy4nDn5Ozco0uJymY5+U74= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= +cloud.google.com/go/tpu v1.6.3/go.mod h1:lxiueqfVMlSToZY1151IaZqp89ELPSrk+3HIQ5HRkbY= +cloud.google.com/go/tpu v1.6.4/go.mod h1:NAm9q3Rq2wIlGnOhpYICNI7+bpBebMJbh0yyp3aNw1Y= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= +cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= +cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= +cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= +cloud.google.com/go/trace v1.10.4/go.mod h1:Nso99EDIK8Mj5/zmB+iGr9dosS/bzWCJ8wGmE6TXNWY= cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U= cloud.google.com/go/trace v1.11.7/go.mod h1:TNn9d5V3fQVf6s4SCveVMIBS2LJUqo73GACmq/Tky0s= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= +cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= +cloud.google.com/go/translate v1.9.2/go.mod h1:E3Tc6rUTsQkVrXW6avbUhKJSr7ZE3j7zNmqzXKHqRrY= +cloud.google.com/go/translate v1.9.3/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= +cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= +cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= +cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= +cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= +cloud.google.com/go/video v1.20.2/go.mod h1:lrixr5JeKNThsgfM9gqtwb6Okuqzfo4VrY2xynaViTA= +cloud.google.com/go/video v1.20.3/go.mod h1:TnH/mNZKVHeNtpamsSPygSR0iHtvrR/cW1/GDjN5+GU= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= +cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= +cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= +cloud.google.com/go/videointelligence v1.11.3/go.mod h1:tf0NUaGTjU1iS2KEkGWvO5hRHeCkFK3nPo0/cOZhZAo= +cloud.google.com/go/videointelligence v1.11.4/go.mod h1:kPBMAYsTPFiQxMLmmjpcZUMklJp3nC9+ipJJtprccD8= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= +cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= +cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= +cloud.google.com/go/vision/v2 v2.7.4/go.mod h1:ynDKnsDN/0RtqkKxQZ2iatv3Dm9O+HfRb5djl7l4Vvw= +cloud.google.com/go/vision/v2 v2.7.5/go.mod h1:GcviprJLFfK9OLf0z8Gm6lQb6ZFUulvpZws+mm6yPLM= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= +cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= +cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= +cloud.google.com/go/vmmigration v1.7.3/go.mod h1:ZCQC7cENwmSWlwyTrZcWivchn78YnFniEQYRWQ65tBo= +cloud.google.com/go/vmmigration v1.7.4/go.mod h1:yBXCmiLaB99hEl/G9ZooNx2GyzgsjKnw5fWcINRgD70= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= +cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= +cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= +cloud.google.com/go/vmwareengine v1.0.2/go.mod h1:xMSNjIk8/itYrz1JA8nV3Ajg4L4n3N+ugP8JKzk3OaA= +cloud.google.com/go/vmwareengine v1.0.3/go.mod h1:QSpdZ1stlbfKtyt6Iu19M6XRxjmXO+vb5a/R6Fvy2y4= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= +cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= +cloud.google.com/go/vpcaccess v1.7.3/go.mod h1:YX4skyfW3NC8vI3Fk+EegJnlYFatA+dXK4o236EUCUc= +cloud.google.com/go/vpcaccess v1.7.4/go.mod h1:lA0KTvhtEOb/VOdnH/gwPuOzGgM+CWsmGu6bb4IoMKk= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= +cloud.google.com/go/webrisk v1.9.3/go.mod h1:RUYXe9X/wBDXhVilss7EDLW9ZNa06aowPuinUOPCXH8= +cloud.google.com/go/webrisk v1.9.4/go.mod h1:w7m4Ib4C+OseSr2GL66m0zMBywdrVNTDKsdEsfMl7X0= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= +cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= +cloud.google.com/go/websecurityscanner v1.6.3/go.mod h1:x9XANObUFR+83Cya3g/B9M/yoHVqzxPnFtgF8yYGAXw= +cloud.google.com/go/websecurityscanner v1.6.4/go.mod h1:mUiyMQ+dGpPPRkHgknIZeCzSHJ45+fY4F52nZFDHm2o= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= +cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= +cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= +cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= +cloud.google.com/go/workflows v1.12.2/go.mod h1:+OmBIgNqYJPVggnMo9nqmizW0qEXHhmnAzK/CnBqsHc= +cloud.google.com/go/workflows v1.12.3/go.mod h1:fmOUeeqEwPzIU81foMjTRQIdwQHADi/vEr1cx9R1m5g= cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8= cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc= dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA= +github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU= github.com/AdamKorcz/go-fuzz-headers-1 v0.0.0-20230919221257-8b5d3ce2d11d h1:zjqpY4C7H15HjRPEenkS4SAn3Jy2eRRjkjZbGR30TOg= github.com/AdamKorcz/go-fuzz-headers-1 v0.0.0-20230919221257-8b5d3ce2d11d/go.mod h1:XNqJ7hv2kY++g8XEHREpi+JqZo3+0l+CH2egBVN4yqM= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= @@ -57,12 +1196,15 @@ github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mo github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CycloneDX/cyclonedx-go v0.9.3 h1:Pyk/lwavPz7AaZNvugKFkdWOm93MzaIyWmBwmBo3aUI= github.com/CycloneDX/cyclonedx-go v0.9.3/go.mod h1:vcK6pKgO1WanCdd61qx4bFnSsDJQ6SbM2ZuMIgq86Jg= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/GoogleCloudPlatform/docker-credential-gcr/v2 v2.1.30 h1:LZKiFW/Mmr5ohlGs/2UmNlv+E0sWoa3lXqbJ8ZKwwDY= @@ -79,10 +1221,13 @@ github.com/Intevation/gval v1.3.0 h1:+Ze5sft5MmGbZrHj06NVUbcxCb67l9RaPTLMNr37mjw github.com/Intevation/gval v1.3.0/go.mod h1:xmGyGpP5be12EL0P12h+dqiYG8qn2j3PJxIgkoOHO5o= github.com/Intevation/jsonpath v0.2.1 h1:rINNQJ0Pts5XTFEG+zamtdL7l9uuE1z0FBA+r55Sw+A= github.com/Intevation/jsonpath v0.2.1/go.mod h1:WnZ8weMmwAx/fAO3SutjYFU+v7DFreNYnibV7CiaYIw= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= @@ -94,24 +1239,66 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.14.0-rc.1 h1:qAPXKwGOkVn8LlqgBN8GS0bxZ83hOJpcjxzmlQKxKsQ= github.com/Microsoft/hcsshim v0.14.0-rc.1/go.mod h1:hTKFGbnDtQb1wHiOWv4v0eN+7boSWAHyK/tNAaYZL0c= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= +github.com/acobaugh/osrelease v0.1.0 h1:Yb59HQDGGNhCj4suHaFQQfBps5wyoKLSSX/J/+UifRE= +github.com/acobaugh/osrelease v0.1.0/go.mod h1:4bFEs0MtgHNHBrmHCt67gNisnabCRAlzdVasCEGHTWY= +github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY= +github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM= github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= +github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= +github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM= +github.com/anchore/clio v0.0.0-20240522144804-d81e109008aa h1:pwlAn4O9SBUnlgfa69YcqIynbUyobLVFYu8HxSoCffA= +github.com/anchore/clio v0.0.0-20240522144804-d81e109008aa/go.mod h1:nD3H5uIvjxlfmakOBgtyFQbk5Zjp3l538kxfpHPslzI= +github.com/anchore/fangs v0.0.0-20240508143433-f016b099950f h1:NOhzafCyNYFi88qxkBFjMzQo4dRa1vDhBzx+0Uovx8Q= +github.com/anchore/fangs v0.0.0-20240508143433-f016b099950f/go.mod h1:sVpRS2yNCw6tLVpvA1QSDVWTJVpCuAm8JNZgn4Sjz/k= +github.com/anchore/go-collections v0.0.0-20240216171411-9321230ce537 h1:GjNGuwK5jWjJMyVppBjYS54eOiiSNv4Ba869k4wh72Q= +github.com/anchore/go-collections v0.0.0-20240216171411-9321230ce537/go.mod h1:1aiktV46ATCkuVg0O573ZrH56BUawTECPETbZyBcqT8= +github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a h1:nJ2G8zWKASyVClGVgG7sfM5mwoZlZ2zYpIzN2OhjWkw= +github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a/go.mod h1:ubLFmlsv8/DFUQrZwY5syT5/8Er3ugSr4rDFwHsE3hg= +github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb h1:iDMnx6LIjtjZ46C0akqveX83WFzhpTD3eqOthawb5vU= +github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb/go.mod h1:DmTY2Mfcv38hsHbG78xMiTDdxFtkHpgYNVDPsF2TgHk= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= +github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04 h1:VzprUTpc0vW0nnNKJfJieyH/TZ9UYAnTZs5/gHTdAe8= +github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04/go.mod h1:6dK64g27Qi1qGQZ67gFmBFvEHScy0/C8qhQhNe5B5pQ= +github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4 h1:rmZG77uXgE+o2gozGEBoUMpX27lsku+xrMwlmBZJtbg= +github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4/go.mod h1:Bkc+JYWjMCF8OyZ340IMSIi2Ebf3uwByOk6ho4wne1E= +github.com/anchore/packageurl-go v0.1.1-0.20240507183024-848e011fc24f h1:B/E9ixKNCasntpoch61NDaQyGPDXLEJlL+B9B/PbdbA= +github.com/anchore/packageurl-go v0.1.1-0.20240507183024-848e011fc24f/go.mod h1:Blo6OgJNiYF41ufcgHKkbCKF2MDOMlrqhXv/ij6ocR4= +github.com/anchore/stereoscope v0.0.3-0.20240725180315-50ce3be7aa1f h1:xuBvotcht1Ns8IdaC4UuYV1U8MFln9c5ELeo5bzDEO8= +github.com/anchore/stereoscope v0.0.3-0.20240725180315-50ce3be7aa1f/go.mod h1:DcQdMes8SwpFli3rDH0v+Vd9qU9Jariq7JSHNJV5X/A= +github.com/anchore/syft v1.10.0 h1:zZ8BWhrajaIIRyFe7zj3hWASEdeo/2kYUfEx7c9twZs= +github.com/anchore/syft v1.10.0/go.mod h1:+i4dtOhJc9o+t7o8TKwsIkOeCQKgRaDk7N8YqwhsU10= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= +github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= +github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= @@ -148,10 +1335,17 @@ github.com/aquasecurity/trivy-java-db v0.0.0-20240109071736-184bd7481d48 h1:JVgB github.com/aquasecurity/trivy-java-db v0.0.0-20240109071736-184bd7481d48/go.mod h1:Ldya37FLi0e/5Cjq2T5Bty7cFkzUDwTcPeQua+2M8i8= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= +github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ= github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk= github.com/aws/aws-sdk-go-v2 v1.41.0 h1:tNvqh1s+v0vFYdA1xq0aOJH+Y5cRyZ5upu6roPgPKd4= @@ -200,18 +1394,30 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.41.5 h1:SciGFVNZ4mHdm7gpD1dgZYnCuVdX github.com/aws/aws-sdk-go-v2/service/sts v1.41.5/go.mod h1:iW40X4QBmUxdP+fZNOpfmkdMZqsovezbAeO+Ubiv2pk= github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk= github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/becheran/wildmatch-go v1.0.0 h1:mE3dGGkTmpKtT4Z+88t8RStG40yN9T+kFEGj2PZFSzA= +github.com/becheran/wildmatch-go v1.0.0/go.mod h1:gbMvj0NtVdJ15Mg/mH9uxk2R1QCistMyU7d9KFzroX4= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitnami/go-version v0.0.0-20231130084017-bb00604d650c h1:C4UZIaS+HAw+X6jGUsoP2ZbM99PuqhCttjomg1yhNAI= github.com/bitnami/go-version v0.0.0-20231130084017-bb00604d650c/go.mod h1:9iglf1GG4oNRJ39bZ5AZrjgAFD2RwQbXw6Qf7Cs47wo= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bmatcuk/doublestar/v2 v2.0.4 h1:6I6oUiT/sU27eE2OFcWqBhL1SwjyvQuOssxT4a1yidI= +github.com/bmatcuk/doublestar/v2 v2.0.4/go.mod h1:QMmcs3H2AUQICWhfzLXz+IYln8lRQmTZRptLie8RgRw= github.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE= github.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A= @@ -225,19 +1431,54 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= +github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= +github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= +github.com/charmbracelet/bubbletea v0.26.6 h1:zTCWSuST+3yZYZnVSvbXwKOPRSNZceVeqpzOLN2zq1s= +github.com/charmbracelet/bubbletea v0.26.6/go.mod h1:dz8CWPlfCCGLFbBlTY4N7bjLiyOGDJEnd2Muu7pOWhk= +github.com/charmbracelet/lipgloss v0.12.1 h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs= +github.com/charmbracelet/lipgloss v0.12.1/go.mod h1:V2CiwIuhx9S1S1ZlADfOj9HmxeMAORuz5izHb0zGbB8= +github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM= +github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/input v0.1.0 h1:TEsGSfZYQyOtp+STIjyBq6tpRaorH0qpwZUj8DavAhQ= +github.com/charmbracelet/x/input v0.1.0/go.mod h1:ZZwaBxPF7IG8gWWzPUVqHEtWhc1+HXJPNuerJGRGZ28= +github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI= +github.com/charmbracelet/x/term v0.1.1/go.mod h1:wB1fHt5ECsu3mXYusyzcngVWWlu1KKUmmLhfgr/Flxw= +github.com/charmbracelet/x/windows v0.1.0 h1:gTaxdvzDM5oMa/I2ZNF7wN78X/atWemG9Wph7Ika2k4= +github.com/charmbracelet/x/windows v0.1.0/go.mod h1:GLEO/l+lizvFDBPLIOk+49gdX49L9YWMB5t+DZd0jkQ= github.com/cheggaaa/pb/v3 v3.1.7 h1:2FsIW307kt7A/rz/ZI2lvPO+v3wKazzE4K/0LtTWsOI= github.com/cheggaaa/pb/v3 v3.1.7/go.mod h1:/Ji89zfVPeC/u5j8ukD0MBPHt2bzTYp74lQ7KlgFWTQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/codacy/codacy-engine-golang-seed/v6 v6.4.7 h1:7Y/xWhDaLO3WCS1+AoFAPVbpSkHLw5hHutek641l8+I= @@ -274,12 +1515,16 @@ github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++ github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/coreos/go-oidc/v3 v3.17.0 h1:hWBGaQfbi0iVviX4ibC7bk8OKT5qNr4klBaCHVNvehc= github.com/coreos/go-oidc/v3 v3.17.0/go.mod h1:wqPbKFrVnE90vty060SB40FCJ8fTHTxSwyXJqZH+sI8= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 h1:uX1JmpONuD549D73r6cgnxyUu18Zb7yHAy5AYU0Pm4Q= @@ -294,10 +1539,13 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= +github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da h1:ZOjWpVsFZ06eIhnh4mkaceTiVoktdU67+M7KDHJ268M= +github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da/go.mod h1:B3tI9iGHi4imdLi4Asdha1Sc6feLMTfPLXh9IUYmysk= github.com/dgraph-io/badger/v4 v4.8.0 h1:JYph1ChBijCw8SLeybvPINizbDKWZ5n/GYbz2yhN/bs= github.com/dgraph-io/badger/v4 v4.8.0/go.mod h1:U6on6e8k/RTbUWxqKR0MvugJuVmkxSNc79ap4917h4w= github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM= github.com/dgraph-io/ristretto/v2 v2.2.0/go.mod h1:RZrm63UmcBAaYWC1DotLYBmTvgkrs0+XhBd7Npn7/zI= +github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo= @@ -330,12 +1578,22 @@ github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQ github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= +github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4= +github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= +github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw= github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= +github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= +github.com/elliotchance/phpserialize v1.4.0 h1:cAp/9+KSnEbUC8oYCE32n2n84BeW8HOY3HMDI8hG2OY= +github.com/elliotchance/phpserialize v1.4.0/go.mod h1:gt7XX9+ETUcLXbtTKEuyrqW3lcLUAeS/AnGZ2e49TZs= github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -343,6 +1601,16 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329/go.mod h1:Alz8LEClvR7xKsrq3qzoc4N0guvVNSS8KmSChGYr9hs= github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= @@ -350,16 +1618,37 @@ github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/ github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= +github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= +github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8= github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/facebookincubator/flog v0.0.0-20190930132826-d2511d0ce33c/go.mod h1:QGzNH9ujQ2ZUr/CjDGZGWeDAVStrWNjHeEcjJL96Nuk= +github.com/facebookincubator/nvdtools v0.1.5 h1:jbmDT1nd6+k+rlvKhnkgMokrCAzHoASWE5LtHbX2qFQ= +github.com/facebookincubator/nvdtools v0.1.5/go.mod h1:Kh55SAWnjckS96TBSrXI99KrEKH4iB0OJby3N8GRJO4= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= +github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= +github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= +github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= @@ -369,20 +1658,33 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/glebarez/go-sqlite v1.20.3 h1:89BkqGOXR9oRmG58ZrzgoY/Fhy5x0M+/WV48U5zVrZ4= -github.com/glebarez/go-sqlite v1.20.3/go.mod h1:u3N6D/wftiAzIOJtZl6BmedqxmmkDfH3q+ihjqxC9u0= +github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0= +github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/github/go-spdx/v2 v2.3.1 h1:ffGuHTbHuHzWPt53n8f9o8clGutuLPObo3zB4JAjxU8= +github.com/github/go-spdx/v2 v2.3.1/go.mod h1:2ZxKsOhvBp+OYBDlsGnUMcchLeo2mrpEBn2L1C+U3IQ= +github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9gAXWo= +github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k= +github.com/glebarez/sqlite v1.9.0 h1:Aj6bPA12ZEx5GbSF6XADmCkYXlljPNUY+Zf1EQxynXs= +github.com/glebarez/sqlite v1.9.0/go.mod h1:YBYCoyupOao60lzp1MVBLEjZfgkq0tdB1voAQ09K9zw= github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= github.com/go-chi/chi/v5 v5.2.4 h1:WtFKPHwlywe8Srng8j2BhOD9312j9cGUxG1SP4V2cR4= github.com/go-chi/chi/v5 v5.2.4/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= @@ -391,12 +1693,23 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.16.3 h1:Z8BtvxZ09bYm/yYNgPKCzgWtaRqDTgIKRgIRHBfU6Z8= github.com/go-git/go-git/v5 v5.16.3/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -452,15 +1765,21 @@ github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6 github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/go-restruct/restruct v1.2.0-alpha h1:2Lp474S/9660+SJjpVxoKuWX09JsXHSrdV7Nv3/gkvc= +github.com/go-restruct/restruct v1.2.0-alpha/go.mod h1:KqrpKpn4M8OLznErihXTGLlsXFGeLxHUrLRRI/1YjGk= github.com/go-rod/rod v0.116.2 h1:A5t2Ky2A+5eD/ZJQr1EfsQSe5rms5Xof/qj296e+ZqA= github.com/go-rod/rod v0.116.2/go.mod h1:H+CMO9SCNc2TJ2WfrG+pKhITz57uGNYU43qYHh438Mg= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= @@ -471,33 +1790,53 @@ github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9L github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/goccy/go-yaml v1.15.23 h1:WS0GAX1uNPDLUvLkNU2vXq6oTnsmfVFocjQ/4qA48qo= github.com/goccy/go-yaml v1.15.23/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/gocsaf/csaf/v3 v3.4.0 h1:rzVTiA5WmzTHumgGfK/823h0zQ0y4WAS+Rorhcm2LDE= github.com/gocsaf/csaf/v3 v3.4.0/go.mod h1:MmKPoT9IhckqbC590XvKbCkRstuba9vbL+HT3bsuQLk= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U= github.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -507,15 +1846,23 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/certificate-transparency-go v1.3.2 h1:9ahSNZF2o7SYMaKaXhAumVEzXB2QaayzII9C8rv7v+A= github.com/google/certificate-transparency-go v1.3.2/go.mod h1:H5FpMUaGa5Ab2+KCYsxg6sELw3Flkl7pGZzWdBoYLXs= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v25.2.10+incompatible h1:F3vclr7C3HpB1k9mxCGRMXq6FdUalZ6H/pNX4FP1v0Q= github.com/google/flatbuffers v25.2.10+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= @@ -524,10 +1871,16 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -536,29 +1889,92 @@ github.com/google/go-containerregistry v0.20.7 h1:24VGNpS0IwrOZ2ms2P1QE3Xa5X9p4p github.com/google/go-containerregistry v0.20.7/go.mod h1:Lx5LCZQjLH1QBaMPeGwsME9biPeo1lPx6lbGj/UmzgM= github.com/google/go-github/v62 v62.0.0 h1:/6mGCaRywZz9MuHyw9gD1CwsbmBX8GWsbFkwMmHdhl4= github.com/google/go-github/v62 v62.0.0/go.mod h1:EMxeUqGJq2xRu9DYBMwel/mr7kZrzUOfQmmpYrZn2a4= +github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/licensecheck v0.3.1 h1:QoxgoDkaeC4nFrtGN1jV7IPmDCHFNIVh54e5hSt6sPs= +github.com/google/licensecheck v0.3.1/go.mod h1:ORkR35t/JjW+emNKtfJDII0zlciG9JgbT7SmsohlHmY= github.com/google/licenseclassifier/v2 v2.0.0 h1:1Y57HHILNf4m0ABuMVb6xk4vAJYEUO0gDxNpog0pyeA= github.com/google/licenseclassifier/v2 v2.0.0/go.mod h1:cOjbdH0kyC9R22sdQbYsFkto4NGCAc+ZSwbeThazEtM= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pIsMjahcegHh6rmhqxzIRQIyepY= github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= +github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/trillian v1.7.2 h1:EPBxc4YWY4Ak8tcuhyFleY+zYlbCDCa4Sn24e1Ka8Js= github.com/google/trillian v1.7.2/go.mod h1:mfQJW4qRH6/ilABtPYNBerVJAJ/upxHLX81zxNQw05s= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/enterprise-certificate-proxy v0.3.9 h1:TOpi/QG8iDcZlkQlGlFUti/ZtyLkliXvHDcyUIMuFrU= github.com/googleapis/enterprise-certificate-proxy v0.3.9/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/gax-go/v2 v2.16.0 h1:iHbQmKLLZrexmb0OSsNGTeSTS0HO4YvFOG8g5E4Zd0Y= github.com/googleapis/gax-go/v2 v2.16.0/go.mod h1:o1vfQjjNZn4+dPnRdl/4ZD7S9414Y4xA+a/6Icj6l14= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.2.5/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= +github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= +github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= @@ -573,21 +1989,38 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= +github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b h1:wDUNC2eKiL35DbLvsDhiblTUXHxcOPwQSCzi7xpQUN4= +github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b/go.mod h1:VzxiSdG6j1pi7rwGm/xYI5RbtpBgM8sARDXlvEvxlu0= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65 h1:81+kWbE1yErFBMjME0I5k3x3kojjKsWtPYHEAutoPow= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.65/go.mod h1:WtMzv9T++tfWVea+qB2MXoaqxw33S8bpJslzUike2mQ= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.8.3 h1:gIS+oTNv3kyYAvlUVgMR46MiG0bM0KuSON/KZEvRoRg= github.com/hashicorp/go-getter v1.8.3/go.mod h1:CUTt9x2bCtJ/sV8ihgrITL3IUE+0BE1j/e4n5P/GIM4= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= @@ -596,20 +2029,35 @@ github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 h1:U+kC2dOhMFQctRfhK0gRct github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0/go.mod h1:Ll013mhdmsVDuoIXVfBtvgGJsXDYkTw1kooNcoCXuE0= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-sockaddr v1.0.7 h1:G+pTkSO01HpR5qCxg7lxfsFEZaG+C0VssTy/9dbT+Fw= github.com/hashicorp/go-sockaddr v1.0.7/go.mod h1:FZQbEYa1pxkQ7WLpyXJ6cbjpT8q0YgQaK/JakXqGyWw= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/arc/v2 v2.0.5 h1:l2zaLDubNhW4XO3LnliVj0GXO3+/CGNJAg1dcN2Fpfw= github.com/hashicorp/golang-lru/arc/v2 v2.0.5/go.mod h1:ny6zBSQZi2JxIeYcv7kt2sH2PXJtirBN7RDhRpxPkxU= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.1-vault-7 h1:ag5OxFVy3QYTFTJODRzTKVZ6xvdfLLCA1cy/Y6xGI0I= github.com/hashicorp/hcl v1.0.1-vault-7/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/hashicorp/hcl/v2 v2.24.0 h1:2QJdZ454DSsYGoaE6QheQZjtKZSUs9Nh2izTWiwQxvE= github.com/hashicorp/hcl/v2 v2.24.0/go.mod h1:oGoO1FIQYfn/AgyOhlg9qLC6/nOJPX3qGbkZpYAcqfM= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hashicorp/vault/api v1.22.0 h1:+HYFquE35/B74fHoIeXlZIP2YADVboaPjaSicHEZiH0= github.com/hashicorp/vault/api v1.22.0/go.mod h1:IUZA2cDvr4Ok3+NtK2Oq/r+lJeXkeCrHRmqdyWfpmGM= github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef h1:A9HsByNhogrvm9cWb28sjiS3i7tcKCkflWFEkHfuAgM= @@ -617,11 +2065,17 @@ github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef/go.mod h1:lADxMC39cJ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/in-toto/attestation v1.1.2 h1:MBFn6lsMq6dptQZJBhalXTcWMb/aJy3V+GX3VYj/V1E= github.com/in-toto/attestation v1.1.2/go.mod h1:gYFddHMZj3DiQ0b62ltNi1Vj5rC879bTmBbrv9CRHpM= github.com/in-toto/in-toto-golang v0.9.0 h1:tHny7ac4KgtsfrG6ybU8gVOZux2H8jN05AXJ9EBM1XU= github.com/in-toto/in-toto-golang v0.9.0/go.mod h1:xsBVrVsHNsB61++S6Dy2vWosKhuA3lUTQd+eF9HdeMo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= @@ -638,22 +2092,52 @@ github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 h1:TMtDYDHKYY github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= github.com/jellydator/ttlcache/v3 v3.4.0 h1:YS4P125qQS0tNhtL6aeYkheEaB/m8HCqdMMP4mnWdTY= github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7YjFMd4Srg5EJlgD4= +github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= +github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 h1:liMMTbpW34dhU4az1GN0pTPADwNmvoRSeoZ6PItiqnY= github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmhodges/clock v1.2.0 h1:eq4kys+NI0PLngzaHEe7AmPT90XMGIEySD1JfV1PDIs= github.com/jmhodges/clock v1.2.0/go.mod h1:qKjhA7x7u/lQpPB1XAqX1b1lCI/w3/fNuYpI/ZjLynI= github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953 h1:WdAeg/imY2JFPc/9CST4bZ80nNJbiBFCAdSZCSgrS5Y= +github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953/go.mod h1:6o+UrvuZWc4UTyBhQf0LGjW9Ld7qJxLz/OqvSOWWlEc= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/keybase/go-keychain v0.0.1 h1:way+bWYa6lDppZoZcgMbYsvC7GxljxrskdNInRtuthU= github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXwkPPMeUgOK1k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= +github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f h1:GvCU5GXhHq+7LeOzx/haG7HSIZokl3/0GkoUFzsRJjg= github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f/go.mod h1:q59u9px8b7UTj0nIjEjvmTWekazka6xIt6Uogz5Dm+8= github.com/knqyf263/go-deb-version v0.0.0-20241115132648-6f4aee6ccd23 h1:dWzdsqjh1p2gNtRKqNwuBvKqMNwnLOPLzVZT1n6DK7s= @@ -664,7 +2148,13 @@ github.com/knqyf263/go-rpmdb v0.1.1 h1:oh68mTCvp1XzxdU7EfafcWzzfstUZAEa3MW0IJye5 github.com/knqyf263/go-rpmdb v0.1.1/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww= github.com/knqyf263/nested v0.0.1 h1:Sv26CegUMhjt19zqbBKntjwESdxe5hxVPSk0+AKjdUc= github.com/knqyf263/nested v0.0.1/go.mod h1:zwhsIhMkBg90DTOJQvxPkKIypEHPYkgWHs4gybdlUmk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -699,10 +2189,19 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= +github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a h1:3Bm7EwfUQUvhNeKIkUct/gl9eod1TcXuj8stxvi/GoI= github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 h1:EnfXoSqDfSNJv0VBNqY/88RNnhSGYkrHaO0mmFGbVsc= github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= +github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/masahiro331/go-disk v0.0.0-20240625071113-56c933208fee h1:cgm8mE25x5XXX2oyvJDlyJ72K+rDu/4ZCYce2worNb8= @@ -717,27 +2216,61 @@ github.com/masahiro331/go-vmdk-parser v0.0.0-20221225061455-612096e4bbbd h1:Y30E github.com/masahiro331/go-vmdk-parser v0.0.0-20221225061455-612096e4bbbd/go.mod h1:5f7mCJGW9cJb8SDn3z8qodGxpMCOo8d/2nls/tiwRrw= github.com/masahiro331/go-xfs-filesystem v0.0.0-20231205045356-1b22259a6c44 h1:VmSjn0UCyfXUNdePDr7uM/uZTnGSp+mKD5+cYkEoLx4= github.com/masahiro331/go-xfs-filesystem v0.0.0-20231205045356-1b22259a6c44/go.mod h1:QKBZqdn6teT0LK3QhAf3K6xakItd1LonOShOEC44idQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-localereader v0.0.2-0.20220822084749-2491eb6c1c75 h1:P8UmIzZMYDR+NGImiFvErt6VWfIRPuGM+vyjiEdkmIw= +github.com/mattn/go-localereader v0.0.2-0.20220822084749-2491eb6c1c75/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A= github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= +github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= +github.com/microsoft/go-rustaudit v0.0.0-20220808201409-204dfee52032 h1:TLygBUBxikNJJfLwgm+Qwdgq1FtfV8Uh7bcxRyTzK8s= +github.com/microsoft/go-rustaudit v0.0.0-20220808201409-204dfee52032/go.mod h1:vYT9HE7WCvL64iVeZylKmCsWKfE+JZ8105iuh2Trk8g= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs= github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -775,6 +2308,8 @@ github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFL github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= @@ -782,16 +2317,33 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0A= github.com/natefinch/atomic v1.0.1/go.mod h1:N/D/ELrljoqDyT3rZrsUmtsuzvHkeB/wWjHV22AZRbM= +github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8= +github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= +github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 h1:Up6+btDp321ZG5/zdSLo48H9Iaq0UQGthrhWC6pCxzE= github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481/go.mod h1:yKZQO8QE2bHlgozqWDiRVqTFlLQSj30K/6SAK8EeYFw= +github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/nwaples/rardecode v1.1.2 h1:Cj0yZY6T1Zx1R7AhTbyGSALm44/Mmq+BAPc4B/p/d3M= +github.com/nwaples/rardecode v1.1.2/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= @@ -800,6 +2352,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -837,37 +2391,80 @@ github.com/package-url/packageurl-go v0.1.3 h1:4juMED3hHiz0set3Vq3KeQ75KD1avthoX github.com/package-url/packageurl-go v0.1.3/go.mod h1:nKAWB8E6uk1MHqiS/lQb9pYBGH2+mdJ2PJc2s50dQY0= github.com/pandatix/go-cvss v0.6.2 h1:TFiHlzUkT67s6UkelHmK6s1INKVUG7nlKYiWWDTITGI= github.com/pandatix/go-cvss v0.6.2/go.mod h1:jDXYlQBZrc8nvrMUVVvTG8PhmuShOnKrxP53nOFkt8Q= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pborman/indent v1.2.1 h1:lFiviAbISHv3Rf0jcuh489bi06hj98JsVMtIDZQb9yM= +github.com/pborman/indent v1.2.1/go.mod h1:FitS+t35kIYtB5xWTZAPhnmrxcciEEOdbyrrpz5K6Vw= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.19 h1:tYLzDnjDXh9qIxSTKHwXwOYmm9d887Y7Y1ZkyXYHAN4= +github.com/pierrec/lz4/v4 v4.1.19/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= +github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= github.com/prometheus/otlptranslator v0.0.2 h1:+1CdeLVrRQ6Psmhnobldo0kTp96Rj80DRXRd5OSnMEQ= github.com/prometheus/otlptranslator v0.0.2/go.mod h1:P8AwMgdD7XEr6QRUJ2QWLpiAZTgTE2UYgjlu3svompI= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0= github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw= github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 h1:bsUq1dX0N8AOIL7EB/X911+m4EHsnWEHeJ0c+3TTBrg= @@ -878,11 +2475,17 @@ github.com/redis/go-redis/extra/redisotel/v9 v9.5.3 h1:kuvuJL/+MZIEdvtb/kTBRiRgY github.com/redis/go-redis/extra/redisotel/v9 v9.5.3/go.mod h1:7f/FMrf5RRRVHXgfk7CzSVzXHiWeuOQUu2bsVqWoa+g= github.com/redis/go-redis/v9 v9.17.2 h1:P2EGsA4qVIM3Pp+aPocCJ7DguDHhqrXNhVcEp4ViluI= github.com/redis/go-redis/v9 v9.17.2/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rubenv/sql-migrate v1.8.0 h1:dXnYiJk9k3wetp7GfQbKJcPHjVJL6YK19tKj8t2Ns0o= @@ -892,14 +2495,30 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/rust-secure-code/go-rustaudit v0.0.0-20250226111315-e20ec32e963c h1:8gOLsYwaY2JwlTMT4brS5/9XJdrdIbmk2obvQ748CC0= github.com/rust-secure-code/go-rustaudit v0.0.0-20250226111315-e20ec32e963c/go.mod h1:kwM/7r/rVluTE8qJbHAffduuqmSv4knVQT2IajGvSiA= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/saferwall/pe v1.5.4 h1:tLmMggEMUfeqrpJ25zS/okUQmyFdD5xWKL2+z9njCqg= +github.com/saferwall/pe v1.5.4/go.mod h1:mJx+PuptmNpoPFBNhWs/uDMFL/kTHVZIkg0d4OUJFbQ= +github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y= +github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= +github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d h1:hrujxIzL1woJ7AwssoOcM/tq5JjjG2yYOc8odClEiXA= +github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw= github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/samber/oops v1.18.1 h1:qjhZbqbdyhWBKntkY8sxrDNKA8b4c5VHlmI1rli7X7M= github.com/samber/oops v1.18.1/go.mod h1:xYqvimigkKV70HyLXiBZJFpIWi2CGcc6Xx7eV+2HycI= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sassoftware/go-rpmutils v0.4.0 h1:ojND82NYBxgwrV+mX1CWsd5QJvvEZTKddtCdFLPWhpg= @@ -908,11 +2527,19 @@ github.com/sassoftware/relic v7.2.1+incompatible h1:Pwyh1F3I0r4clFJXkSI8bOyJINGq github.com/sassoftware/relic v7.2.1+incompatible/go.mod h1:CWfAxv73/iLZ17rbyhIEq3K9hs5w6FpNMdUT//qR+zk= github.com/sassoftware/relic/v7 v7.6.2 h1:rS44Lbv9G9eXsukknS4mSjIAuuX+lMq/FnStgmZlUv4= github.com/sassoftware/relic/v7 v7.6.2/go.mod h1:kjmP0IBVkJZ6gXeAu35/KCEfca//+PKM6vTAsyDPY+k= +github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e h1:7q6NSFZDeGfvvtIRwBrU/aegEYJYmvev0cHAwo17zZQ= +github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= +github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= +github.com/secDre4mer/pkcs7 v0.0.0-20240322103146-665324a4461d h1:RQqyEogx5J6wPdoxqL132b100j8KjcVHO1c0KLRoIhc= +github.com/secDre4mer/pkcs7 v0.0.0-20240322103146-665324a4461d/go.mod h1:PegD7EVqlN88z7TpCqH92hHP+GBpfomGCCnw1PFtNOA= github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14= github.com/secure-systems-lab/go-securesystemslib v0.10.0/go.mod h1:MRKONWmRoFzPNQ9USRF9i1mc7MvAVvF1LlW8X5VWDvk= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= @@ -945,6 +2572,9 @@ github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.10.3 h1:lJSdaC/aOlF github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.10.3/go.mod h1:b2rV9qPbt/jv/Yy75AIOZThP8j+pe1ZdLEjOwmjPdoA= github.com/sigstore/timestamp-authority/v2 v2.0.3 h1:sRyYNtdED/ttLCMdaYnwpf0zre1A9chvjTnCmWWxN8Y= github.com/sigstore/timestamp-authority/v2 v2.0.3/go.mod h1:mDaHxkt3HmZYoIlwYj4QWo0RUr7VjYU52aVO5f5Qb3I= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= @@ -952,25 +2582,35 @@ github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnB github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/sosedoff/gitkit v0.4.0 h1:opyQJ/h9xMRLsz2ca/2CRXtstePcpldiZN8DpLLF8Os= github.com/sosedoff/gitkit v0.4.0/go.mod h1:V3EpGZ0nvCBhXerPsbDeqtyReNb48cwP9KtkUYTKT5I= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= github.com/spdx/tools-golang v0.5.5 h1:61c0KLfAcNqAjlg6UNMdkwpMernhw3zVRwDZ2x9XOmk= github.com/spdx/tools-golang v0.5.5/go.mod h1:MVIsXx8ZZzaRWNQpUDhC4Dud34edUYJYecciXgrw5vE= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= -github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= @@ -983,14 +2623,21 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/sylabs/sif/v2 v2.17.1 h1:p6Sl0LWyShXBj2SBsS1dMOMIMrZHe8pwBnBrYt6uo4M= +github.com/sylabs/sif/v2 v2.17.1/go.mod h1:XUGB6AQUXGkms3qPOPdevctT3lBLRLWZNWHVnt5HMKE= +github.com/sylabs/squashfs v1.0.0 h1:xAyMS21ogglkuR5HaY55PCfqY3H32ma9GkasTYo28Zg= +github.com/sylabs/squashfs v1.0.0/go.mod h1:rhWzvgefq1X+R+LZdts10hfMsTg3g74OfGunW8tvg/4= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/tchap/go-patricia/v2 v2.3.3 h1:xfNEsODumaEcCcY3gI0hYPZ/PcpVv5ju6RMAhgwZDDc= @@ -1003,6 +2650,8 @@ github.com/testcontainers/testcontainers-go/modules/localstack v0.40.0 h1:b+lN2C github.com/testcontainers/testcontainers-go/modules/localstack v0.40.0/go.mod h1:8LuTSboTo2MJKFKV5xH6z4ZH1s3jhRJWwvtPJzKogj4= github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8= github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU= +github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+xzw= +github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY= github.com/theupdateframework/go-tuf v0.7.0 h1:CqbQFrWo1ae3/I0UCblSbczevCCbS31Qvs5LdxRWqRI= github.com/theupdateframework/go-tuf v0.7.0/go.mod h1:uEB7WSY+7ZIugK6R1hiBMBjQftaFzn7ZCDJcp1tCUug= github.com/theupdateframework/go-tuf/v2 v2.4.1 h1:K6ewW064rKZCPkRo1W/CTbTtm/+IB4+coG1iNURAGCw= @@ -1029,23 +2678,34 @@ github.com/transparency-dev/formats v0.0.0-20251017110053-404c0d5b696c h1:5a2XDQ github.com/transparency-dev/formats v0.0.0-20251017110053-404c0d5b696c/go.mod h1:g85IafeFJZLxlzZCDRu4JLpfS7HKzR+Hw9qRh3bVzDI= github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG81+twTK4= github.com/transparency-dev/merkle v0.0.2/go.mod h1:pqSy+OXefQ1EDUVmAJ8MUhHB9TXGuzVAT58PqBoHz1A= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchtv/twirp v8.1.3+incompatible h1:+F4TdErPgSUbMZMwp13Q/KgDVuI7HJXP61mNV3/7iuU= github.com/twitchtv/twirp v8.1.3+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A= +github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= +github.com/vbatts/go-mtree v0.5.4 h1:OMAb8jaCyiFA7zXj0Zc/oARcxBDBoeu2LizjB8BVJl0= +github.com/vbatts/go-mtree v0.5.4/go.mod h1:5GqJbVhm9BBiCc4K5uc/c42FPgXulHaQs4sFUEfIWMo= github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4= github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= github.com/vektah/gqlparser/v2 v2.5.30 h1:EqLwGAFLIzt1wpx1IPpY67DwUujF1OfzgEyDsLrN6kE= github.com/vektah/gqlparser/v2 v2.5.30/go.mod h1:D1/VCZtV3LPnQrcPBeR/q5jkSQIPti0uYCP/RI0gIeo= +github.com/vifraa/gopom v1.0.0 h1:L9XlKbyvid8PAIK8nr0lihMApJQg/12OBvMA28BcWh0= +github.com/vifraa/gopom v1.0.0/go.mod h1:oPa1dcrGrtlO37WPDBm5SqHAT+wTgF8An1Q71Z6Vv4o= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651 h1:jIVmlAFIqV3d+DOxazTR9v+zgj8+VYuQBzPgBZvWBHA= +github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651/go.mod h1:b26F2tHLqaoRQf8DywqzVaV1MQ9yvjb0OMcNl7Nxu20= +github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0 h1:0KGbf+0SMg+UFy4e1A/CPVvXn21f1qtWdeJwxZFoQG8= +github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0/go.mod h1:jLXFoL31zFaHKAAyZUh+sxiTDFe1L1ZHrcK2T1itVKA= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= @@ -1057,10 +2717,14 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xeol-io/xeol v0.10.8 h1:KSAR+1+xvwo41yXzcpwd4J5OHvoLNPJ3bharQ3ir/hM= +github.com/xeol-io/xeol v0.10.8/go.mod h1:eYIMGzfiW2TLJ6oc0twtPA5x6FZdPh2yHFx/bxtKWLo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yashtewari/glob-intersection v0.2.0 h1:8iuHdN88yYuCzCdjt0gDe+6bAhUwBeEWqThExu54RFg= github.com/yashtewari/glob-intersection v0.2.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok= github.com/ysmood/fetchup v0.2.3 h1:ulX+SonA0Vma5zUFXtv52Kzip/xe7aj4vqT5AJwQ+ZQ= @@ -1073,8 +2737,13 @@ github.com/ysmood/gson v0.7.3 h1:QFkWbTH8MxyUTKPkVWAENJhxqdBa4lYTQWqZCiLG6kE= github.com/ysmood/gson v0.7.3/go.mod h1:3Kzs5zDl21g5F/BlLTNcuAGAYLKt2lV5G8D1zF3RNmg= github.com/ysmood/leakless v0.9.0 h1:qxCG5VirSBvmi3uynXFkcnLMzkphdh3xx5FtrORwDCU= github.com/ysmood/leakless v0.9.0/go.mod h1:R8iAXPRaG97QJwqxs74RdwzcRHT1SWCGTNqY8q0JvMQ= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= @@ -1088,10 +2757,23 @@ github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6 github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= github.com/zclconf/go-cty-yaml v1.1.0 h1:nP+jp0qPHv2IhUVqmQSzjvqAWcObN0KBkUl2rWBdig0= github.com/zclconf/go-cty-yaml v1.1.0/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= @@ -1142,149 +2824,841 @@ go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6 go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.step.sm/crypto v0.75.0 h1:UAHYD6q6ggYyzLlIKHv1MCUVjZIesXRZpGTlRC/HSHw= go.step.sm/crypto v0.75.0/go.mod h1:wwQ57+ajmDype9mrI/2hRyrvJd7yja5xVgWYqpUN3PE= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU= golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= +google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= +google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= +google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= google.golang.org/api v0.260.0 h1:XbNi5E6bOVEj/uLXQRlt6TKuEzMD7zvW/6tNwltE4P4= google.golang.org/api v0.260.0/go.mod h1:Shj1j0Phr/9sloYrKomICzdYgsSDImpTxME8rGLaZ/o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= google.golang.org/genproto v0.0.0-20251202230838-ff82c1b0f217 h1:GvESR9BIyHUahIb0NcTum6itIWtdoglGX+rnGxm2934= google.golang.org/genproto v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:yJ2HH4EHEDTd3JiLmhds6NkJ17ITVYOdV3m3VKOnws0= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= +google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920183334-c177e329c48b/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b h1:Mv8VFug0MP9e5vUxfBcE3vUkV6CImK3cMNMIDFjmzxU= google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1293,11 +3667,19 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1305,30 +3687,46 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.1 h1:tVBILHy0R6e4wkYOn3XmiITt/hEVH4TFMYvAX2Ytz6k= +gopkg.in/ini.v1 v1.67.1/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/gorm v1.25.6 h1:V92+vVda1wEISSOMtodHVRcUIOPYa2tgQtyF+DfFx+A= +gorm.io/gorm v1.25.6/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= helm.sh/helm/v3 v3.19.2 h1:psQjaM8aIWrSVEly6PgYtLu/y6MRSmok4ERiGhZmtUY= helm.sh/helm/v3 v3.19.2/go.mod h1:gX10tB5ErM+8fr7bglUUS/UfTOO8UUTYWIBH1IYNnpE= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc= @@ -1351,20 +3749,92 @@ k8s.io/kubectl v0.34.0 h1:NcXz4TPTaUwhiX4LU+6r6udrlm0NsVnSkP3R9t0dmxs= k8s.io/kubectl v0.34.0/go.mod h1:bmd0W5i+HuG7/p5sqicr0Li0rR2iIhXL0oUyLF3OjR4= k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= +modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= +modernc.org/cc/v4 v4.26.5 h1:xM3bX7Mve6G8K8b+T11ReenJOT+BmVqQj0FY5T4+5Y4= +modernc.org/cc/v4 v4.26.5/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= +modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= +modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= +modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= +modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= +modernc.org/ccgo/v4 v4.28.1 h1:wPKYn5EC/mYTqBO373jKjvX2n+3+aK7+sICCv4Fjy1A= +modernc.org/ccgo/v4 v4.28.1/go.mod h1:uD+4RnfrVgE6ec9NGguUNdhqzNIeeomeXf6CL0GTE5Q= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/fileutil v1.3.40 h1:ZGMswMNc9JOCrcrakF1HrvmergNLAmxOPjizirpfqBA= +modernc.org/fileutil v1.3.40/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= +modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= +modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= +modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= +modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= +modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= +modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= +modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= +modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= modernc.org/libc v1.66.10 h1:yZkb3YeLx4oynyR+iUsXsybsX4Ubx7MQlSYEw4yj59A= modernc.org/libc v1.66.10/go.mod h1:8vGSEwvoUoltr4dlywvHqjtAqHBaw0j1jI7iFBTAr2I= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= +modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/sqlite v1.18.2/go.mod h1:kvrTLEWgxUcHa2GfHBQtanR1H9ht3hTJNtKpzH9k1u0= modernc.org/sqlite v1.40.1 h1:VfuXcxcUWWKRBuP8+BR9L7VnmusMgBNNnBYGEe9w/iY= modernc.org/sqlite v1.40.1/go.mod h1:9fjQZ0mB1LLP0GYrp39oOJXx/I2sxEnZtzCmEQIKvGE= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= +modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= +modernc.org/tcl v1.13.2/go.mod h1:7CLiGIPo1M8Rv1Mitpv5akc2+8fxUd2y2UzC/MfMzy0= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= mvdan.cc/sh/v3 v3.11.0 h1:q5h+XMDRfUGUedCqFFsjoFjrhwf2Mvtt1rkMvVz0blw= mvdan.cc/sh/v3 v3.11.0/go.mod h1:LRM+1NjoYCzuq/WZ6y44x14YNAI0NK7FLPeQSaFagGg= oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= @@ -1375,6 +3845,7 @@ sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/internal/docgen/rule.go b/internal/docgen/rule.go index a36f7d72..03d81ac2 100644 --- a/internal/docgen/rule.go +++ b/internal/docgen/rule.go @@ -115,5 +115,45 @@ func trivyRules() Rules { ScanType: "SCA", Enabled: true, }, + { + ID: "eol_critical", + Title: "End-of-life package (obsolete)", + Description: "Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded.", + Level: "Error", + Category: "Security", + SubCategory: "InsecureModulesLibraries", + ScanType: "SCA", + Enabled: true, + }, + { + ID: "eol_high", + Title: "End-of-life package (within 1 month)", + Description: "Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends.", + Level: "High", + Category: "Security", + SubCategory: "InsecureModulesLibraries", + ScanType: "SCA", + Enabled: true, + }, + { + ID: "eol_medium", + Title: "End-of-life package (within 6 months)", + Description: "Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version.", + Level: "Warning", + Category: "Security", + SubCategory: "InsecureModulesLibraries", + ScanType: "SCA", + Enabled: true, + }, + { + ID: "eol_minor", + Title: "End-of-life package (beyond 6 months)", + Description: "Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning.", + Level: "Info", + Category: "Security", + SubCategory: "InsecureModulesLibraries", + ScanType: "SCA", + Enabled: true, + }, } } diff --git a/internal/openssfdb/builder.go b/internal/openssfdb/builder.go new file mode 100644 index 00000000..f95edd02 --- /dev/null +++ b/internal/openssfdb/builder.go @@ -0,0 +1,238 @@ +package openssfdb + +import ( + "context" + "encoding/json" + "errors" + "io/fs" + "os" + "path/filepath" + "sort" + "strings" + "time" +) + +const ( + // SchemaVersion defines the JSON schema version emitted for the packaged OpenSSF data. + SchemaVersion = "1.0.0" +) + +// Builder produces a compact representation of the OpenSSF malicious packages database. +type Builder struct { + now func() time.Time +} + +// Output describes the JSON payload persisted for consumption at runtime. +type Output struct { + SchemaVersion string `json:"schema_version"` + GeneratedAt time.Time `json:"generated_at"` + Source string `json:"source"` + Packages map[string]map[string][]*Entry `json:"packages"` +} + +// Entry contains the reduced malicious package metadata retained from the upstream OSV record. +type Entry struct { + ID string `json:"id"` + Ecosystem string `json:"ecosystem"` + Package string `json:"package"` + Summary string `json:"summary"` + Details string `json:"details"` + Versions []string `json:"versions,omitempty"` + Ranges []Range `json:"ranges,omitempty"` + References []Reference `json:"references,omitempty"` + Aliases []string `json:"aliases,omitempty"` + Published string `json:"published,omitempty"` + Modified string `json:"modified,omitempty"` +} + +// Range models the OSV affected range information we keep for version matching. +type Range struct { + Type string `json:"type"` + Events []RangeEvent `json:"events,omitempty"` +} + +// RangeEvent captures the supported OSV range event attributes. +type RangeEvent struct { + Introduced string `json:"introduced,omitempty"` + Fixed string `json:"fixed,omitempty"` + LastAffected string `json:"last_affected,omitempty"` + Limit string `json:"limit,omitempty"` +} + +// Reference contains a pointer to additional upstream context for a malicious entry. +type Reference struct { + Type string `json:"type,omitempty"` + URL string `json:"url,omitempty"` +} + +// NewBuilder returns a Builder instance configured for production use. +func NewBuilder() *Builder { + return &Builder{ + now: time.Now, + } +} + +// Build walks the provided OpenSSF repository directory and emits an aggregated Output. +// The source parameter is used to document where the data originated from. +func (b *Builder) Build(ctx context.Context, repoDir, source string) (*Output, error) { + if repoDir == "" { + return nil, errors.New("repository directory is required") + } + if source == "" { + return nil, errors.New("source description is required") + } + + root := filepath.Join(repoDir, "osv", "malicious") + if _, err := os.Stat(root); err != nil { + return nil, err + } + + out := &Output{ + SchemaVersion: SchemaVersion, + GeneratedAt: b.now().UTC(), + Source: source, + Packages: make(map[string]map[string][]*Entry), + } + + err := filepath.WalkDir(root, func(path string, d fs.DirEntry, walkErr error) error { + if walkErr != nil { + return walkErr + } + if d.IsDir() || !strings.HasSuffix(d.Name(), ".json") { + return nil + } + if ctxErr := ctx.Err(); ctxErr != nil { + return ctxErr + } + + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + var raw rawRecord + if err := json.NewDecoder(file).Decode(&raw); err != nil { + return err + } + raw.trim() + + for _, affected := range raw.Affected { + ecosystem := normalizeEcosystem(affected.Package.Ecosystem) + if ecosystem == "" || affected.Package.Name == "" { + continue + } + name := strings.ToLower(affected.Package.Name) + + entry := &Entry{ + ID: raw.ID, + Ecosystem: ecosystem, + Package: affected.Package.Name, + Summary: raw.Summary, + Details: raw.Details, + Versions: cloneAndSort(affected.Versions), + Ranges: cloneRanges(affected.Ranges), + References: cloneReferences(raw.References), + Aliases: cloneStrings(raw.Aliases), + Published: raw.Published, + Modified: raw.Modified, + } + + if _, ok := out.Packages[ecosystem]; !ok { + out.Packages[ecosystem] = make(map[string][]*Entry) + } + out.Packages[ecosystem][name] = append(out.Packages[ecosystem][name], entry) + } + + return nil + }) + if err != nil { + return nil, err + } + + return out, nil +} + +type rawRecord struct { + ID string `json:"id"` + Published string `json:"published"` + Modified string `json:"modified"` + Summary string `json:"summary"` + Details string `json:"details"` + Aliases []string `json:"aliases"` + Affected []rawTarget `json:"affected"` + References []Reference `json:"references"` +} + +type rawTarget struct { + Package struct { + Ecosystem string `json:"ecosystem"` + Name string `json:"name"` + } `json:"package"` + Versions []string `json:"versions"` + Ranges []Range `json:"ranges"` +} + +func (r *rawRecord) trim() { + r.Summary = strings.TrimSpace(r.Summary) + r.Details = strings.TrimSpace(r.Details) +} + +func normalizeEcosystem(value string) string { + value = strings.TrimSpace(value) + if value == "" { + return "" + } + return strings.ToLower(value) +} + +func cloneAndSort(values []string) []string { + if len(values) == 0 { + return nil + } + out := make([]string, len(values)) + copy(out, values) + sort.Strings(out) + return out +} + +func cloneStrings(values []string) []string { + if len(values) == 0 { + return nil + } + out := make([]string, len(values)) + copy(out, values) + return out +} + +func cloneRanges(values []Range) []Range { + if len(values) == 0 { + return nil + } + out := make([]Range, len(values)) + for idx := range values { + out[idx] = Range{ + Type: values[idx].Type, + Events: cloneRangeEvents(values[idx].Events), + } + } + return out +} + +func cloneRangeEvents(values []RangeEvent) []RangeEvent { + if len(values) == 0 { + return nil + } + out := make([]RangeEvent, len(values)) + copy(out, values) + return out +} + +func cloneReferences(values []Reference) []Reference { + if len(values) == 0 { + return nil + } + out := make([]Reference, len(values)) + copy(out, values) + return out +} diff --git a/internal/openssfdb/builder_test.go b/internal/openssfdb/builder_test.go new file mode 100644 index 00000000..dbd4581f --- /dev/null +++ b/internal/openssfdb/builder_test.go @@ -0,0 +1,150 @@ +package openssfdb + +import ( + "compress/gzip" + "context" + "encoding/json" + "os" + "path/filepath" + "testing" + "time" +) + +func TestBuildAggregatesEntries(t *testing.T) { + t.Helper() + + builder := NewBuilder() + fixedNow := time.Date(2025, time.January, 20, 12, 0, 0, 0, time.UTC) + builder.now = func() time.Time { return fixedNow } + + ctx := context.Background() + repoDir := filepath.Join("testdata", "repo") + + output, err := builder.Build(ctx, repoDir, "test-source") + if err != nil { + t.Fatalf("Build returned error: %v", err) + } + + if output.SchemaVersion != SchemaVersion { + t.Fatalf("unexpected schema version: %s", output.SchemaVersion) + } + if !output.GeneratedAt.Equal(fixedNow) { + t.Fatalf("generated timestamp mismatch, got %s", output.GeneratedAt.Format(time.RFC3339)) + } + if output.Source != "test-source" { + t.Fatalf("unexpected source recorded: %s", output.Source) + } + + npmPackages, ok := output.Packages["npm"] + if !ok { + t.Fatalf("expected npm ecosystem") + } + npmEntry := npmPackages["pkg-one"] + if len(npmEntry) != 1 { + t.Fatalf("expected 1 entry for pkg-one, got %d", len(npmEntry)) + } + entry := npmEntry[0] + if entry.ID != "MAL-TEST-0001" { + t.Errorf("unexpected ID: %s", entry.ID) + } + if entry.Package != "pkg-one" { + t.Errorf("unexpected package name: %s", entry.Package) + } + if entry.Ecosystem != "npm" { + t.Errorf("unexpected ecosystem: %s", entry.Ecosystem) + } + if len(entry.Versions) != 2 || entry.Versions[0] != "1.0.0" || entry.Versions[1] != "1.0.1" { + t.Errorf("unexpected versions: %#v", entry.Versions) + } + if len(entry.Ranges) != 1 { + t.Fatalf("expected 1 range, got %d", len(entry.Ranges)) + } + if len(entry.Ranges[0].Events) != 2 { + t.Fatalf("expected 2 range events, got %d", len(entry.Ranges[0].Events)) + } + if entry.Ranges[0].Events[0].Introduced != "0" { + t.Errorf("unexpected introduced: %s", entry.Ranges[0].Events[0].Introduced) + } + if entry.Ranges[0].Events[1].Fixed != "1.0.2" { + t.Errorf("unexpected fixed: %s", entry.Ranges[0].Events[1].Fixed) + } + if entry.Summary == "" || entry.Details == "" { + t.Errorf("expected summary and details to be retained") + } + if len(entry.References) != 2 { + t.Errorf("expected 2 references, got %d", len(entry.References)) + } + if len(entry.Aliases) != 1 || entry.Aliases[0] != "GHSA-1111-aaaa" { + t.Errorf("expected aliases to be preserved, got %#v", entry.Aliases) + } + + pypiPackages, ok := output.Packages["pypi"] + if !ok { + t.Fatalf("expected pypi ecosystem") + } + pypiEntry := pypiPackages["pkg-two"] + if len(pypiEntry) != 1 { + t.Fatalf("expected 1 entry for pkg-two, got %d", len(pypiEntry)) + } + if pypiEntry[0].Ranges[0].Events[1].LastAffected != "1.3.4" { + t.Errorf("expected last_affected to be retained, got %#v", pypiEntry[0].Ranges[0].Events) + } +} + +func TestWriteGzippedJSONCreatesReadablePayload(t *testing.T) { + t.Helper() + + builder := NewBuilder() + fixedNow := time.Date(2025, time.January, 20, 12, 0, 0, 0, time.UTC) + builder.now = func() time.Time { return fixedNow } + + ctx := context.Background() + repoDir := filepath.Join("testdata", "repo") + + output, err := builder.Build(ctx, repoDir, "test-source") + if err != nil { + t.Fatalf("Build returned error: %v", err) + } + + tmpDir := t.TempDir() + dest := filepath.Join(tmpDir, "db", "openssf-malicious.json.gz") + + if err := WriteGzippedJSON(dest, output); err != nil { + t.Fatalf("WriteGzippedJSON returned error: %v", err) + } + + info, err := os.Stat(dest) + if err != nil { + t.Fatalf("expected gzipped JSON to be written: %v", err) + } + if info.Size() == 0 { + t.Fatalf("expected gzipped JSON file to have content") + } + + file, err := os.Open(dest) + if err != nil { + t.Fatalf("failed to open written file: %v", err) + } + defer file.Close() + + gz, err := gzip.NewReader(file) + if err != nil { + t.Fatalf("failed to create gzip reader: %v", err) + } + defer gz.Close() + + var decoded Output + if err := json.NewDecoder(gz).Decode(&decoded); err != nil { + t.Fatalf("failed to decode written JSON: %v", err) + } + + if decoded.SchemaVersion != SchemaVersion { + t.Errorf("schema version mismatch after round-trip: %s", decoded.SchemaVersion) + } + if _, ok := decoded.Packages["npm"]; !ok { + t.Errorf("npm ecosystem missing after round-trip") + } + if _, ok := decoded.Packages["pypi"]; !ok { + t.Errorf("pypi ecosystem missing after round-trip") + } +} diff --git a/internal/openssfdb/testdata/repo/osv/malicious/npm/pkg-one/MAL-TEST-0001.json b/internal/openssfdb/testdata/repo/osv/malicious/npm/pkg-one/MAL-TEST-0001.json new file mode 100644 index 00000000..b6fe5f89 --- /dev/null +++ b/internal/openssfdb/testdata/repo/osv/malicious/npm/pkg-one/MAL-TEST-0001.json @@ -0,0 +1,46 @@ +{ + "schema_version": "1.5.0", + "id": "MAL-TEST-0001", + "modified": "2024-12-01T00:00:00Z", + "published": "2024-11-30T00:00:00Z", + "summary": "Malicious code in pkg-one (npm)", + "details": "Pkg-one contains a credential stealer that exfiltrates secrets to a remote server.", + "aliases": [ + "GHSA-1111-aaaa" + ], + "affected": [ + { + "package": { + "ecosystem": "npm", + "name": "pkg-one" + }, + "versions": [ + "1.0.0", + "1.0.1" + ], + "ranges": [ + { + "type": "SEMVER", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "1.0.2" + } + ] + } + ] + } + ], + "references": [ + { + "type": "ADVISORY", + "url": "https://example.com/advisory/pkg-one" + }, + { + "type": "REPORT", + "url": "https://example.com/report/pkg-one" + } + ] +} diff --git a/internal/openssfdb/testdata/repo/osv/malicious/pypi/pkg-two/MAL-TEST-0002.json b/internal/openssfdb/testdata/repo/osv/malicious/pypi/pkg-two/MAL-TEST-0002.json new file mode 100644 index 00000000..f878945e --- /dev/null +++ b/internal/openssfdb/testdata/repo/osv/malicious/pypi/pkg-two/MAL-TEST-0002.json @@ -0,0 +1,39 @@ +{ + "schema_version": "1.5.0", + "id": "MAL-TEST-0002", + "modified": "2023-05-15T10:00:00Z", + "published": "2023-05-01T09:30:00Z", + "summary": "Malicious code in pkg-two (PyPI)", + "details": "Pkg-two embeds a reverse shell and downloads additional payloads.", + "aliases": [ + "CVE-2023-9999", + "GHSA-2222-bbbb" + ], + "affected": [ + { + "package": { + "ecosystem": "PyPI", + "name": "pkg-two" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "1.0.0" + }, + { + "last_affected": "1.3.4" + } + ] + } + ] + } + ], + "references": [ + { + "type": "ARTICLE", + "url": "https://blog.example.com/pkg-two-malware" + } + ] +} diff --git a/internal/openssfdb/writer.go b/internal/openssfdb/writer.go new file mode 100644 index 00000000..17463a18 --- /dev/null +++ b/internal/openssfdb/writer.go @@ -0,0 +1,29 @@ +package openssfdb + +import ( + "compress/gzip" + "encoding/json" + "os" + "path/filepath" +) + +// WriteGzippedJSON persists the provided Output as a gzip-compressed JSON payload. +func WriteGzippedJSON(path string, output *Output) error { + if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { + return err + } + + file, err := os.Create(path) + if err != nil { + return err + } + defer file.Close() + + gz := gzip.NewWriter(file) + defer gz.Close() + + encoder := json.NewEncoder(gz) + encoder.SetEscapeHTML(false) + + return encoder.Encode(output) +} diff --git a/internal/tool/eol_scanner.go b/internal/tool/eol_scanner.go new file mode 100644 index 00000000..839c1a52 --- /dev/null +++ b/internal/tool/eol_scanner.go @@ -0,0 +1,284 @@ +package tool + +import ( + "encoding/json" + "fmt" + "io" + "os" + "os/exec" + "path/filepath" + "time" + + cdx "github.com/CycloneDX/cyclonedx-go" + ptypes "github.com/aquasecurity/trivy/pkg/types" + codacy "github.com/codacy/codacy-engine-golang-seed/v6" + "github.com/samber/lo" +) + +const ( + daysPerMonth = 30 + daysSixMonths = 180 +) + +// EOLRunner runs an EOL scan on an SBOM file and returns matches. +// Production implementation execs the xeol CLI; tests use a mock. +type EOLRunner interface { + Run(sbomPath string) ([]eolMatch, error) +} + +// eolMatch represents one EOL finding from xeol (package + cycle EOL date). +type eolMatch struct { + PURL string // package URL for matching to report + Name string + Version string + EolDate string // date string e.g. "2025-06-01" + CycleID string // optional, for message +} + +// xeolJSON is the structure we parse from xeol CLI -o json. +// See docs/xeol-api-verification.md; exact keys may vary by xeol version. +type xeolJSON struct { + Matches []xeolMatchJSON `json:"matches"` +} + +type xeolMatchJSON struct { + Package xeolPackageJSON `json:"package"` + Cycle xeolCycleJSON `json:"cycle"` +} + +type xeolPackageJSON struct { + Name string `json:"name"` + Version string `json:"version"` + PURL string `json:"purl"` +} + +type xeolCycleJSON struct { + Eol string `json:"eol"` + ReleaseCycle string `json:"release_cycle,omitempty"` +} + +// EOLScanner scans for end-of-life packages using an EOLRunner (e.g. xeol CLI). +type EOLScanner struct { + runner EOLRunner +} + +// NewEOLScanner creates an EOL scanner that uses the given runner. +func NewEOLScanner(runner EOLRunner) *EOLScanner { + return &EOLScanner{runner: runner} +} + +// Scan runs the EOL scan and returns Codacy results. +// If no EOL pattern is enabled, returns empty. Uses report to resolve file/line from PURL. +func (s *EOLScanner) Scan(report ptypes.Report, toolExecution codacy.ToolExecution, bom *cdx.BOM) []codacy.Result { + eolEnabled := lo.SomeBy(*toolExecution.Patterns, func(p codacy.Pattern) bool { + return lo.Contains(ruleIDsEOL, p.ID) + }) + if !eolEnabled { + return []codacy.Result{} + } + + if bom == nil || bom.Components == nil { + return []codacy.Result{} + } + + tmpDir, err := os.MkdirTemp("", "codacy-trivy-sbom-") + if err != nil { + return []codacy.Result{codacy.FileError{File: "", Message: "Failed to create temp dir for EOL scan"}} + } + defer os.RemoveAll(tmpDir) + + sbomPath := filepath.Join(tmpDir, "sbom.json") + f, err := os.Create(sbomPath) + if err != nil { + return []codacy.Result{codacy.FileError{File: "", Message: "Failed to write SBOM for EOL scan"}} + } + enc := json.NewEncoder(f) + enc.SetIndent("", " ") + if err := enc.Encode(bom); err != nil { + f.Close() + return []codacy.Result{codacy.FileError{File: "", Message: "Failed to encode SBOM for EOL scan"}} + } + if err := f.Close(); err != nil { + return []codacy.Result{codacy.FileError{File: "", Message: "Failed to close SBOM file"}} + } + + matches, err := s.runner.Run(sbomPath) + if err != nil { + return []codacy.Result{codacy.FileError{File: "", Message: fmt.Sprintf("EOL scan failed: %v", err)}} + } + + purlToLocation := buildPURLToLocation(report) + var issues []codacy.Issue + for _, m := range matches { + ruleID, err := severityFromEolDate(m.EolDate) + if err != nil { + continue + } + loc, ok := purlToLocation[m.PURL] + if !ok { + // Try by name+version in case PURL format differs + loc, ok = findLocationByPackage(report, m.Name, m.Version) + if !ok { + continue + } + } + line := loc.line + if line == 0 { + line = fallbackSearchForLineNumber(toolExecution.SourceDir, loc.target, m.Name) + } + msg := fmt.Sprintf("End-of-life package %s@%s (EOL %s)", m.Name, m.Version, m.EolDate) + if m.CycleID != "" { + msg = fmt.Sprintf("%s [%s]", msg, m.CycleID) + } + issues = append(issues, codacy.Issue{ + File: loc.target, + Line: line, + Message: msg, + PatternID: ruleID, + SourceID: m.EolDate, + }) + } + + return mapIssuesWithoutLineNumber(filterIssuesFromKnownFiles(issues, *toolExecution.Files)) +} + +type pkgLocation struct { + target string + line int +} + +func buildPURLToLocation(report ptypes.Report) map[string]pkgLocation { + out := make(map[string]pkgLocation) + for _, result := range report.Results { + for _, pkg := range result.Packages { + if pkg.Identifier.PURL == nil { + continue + } + purlStr := pkg.Identifier.PURL.ToString() + line := 0 + if len(pkg.Locations) > 0 { + line = pkg.Locations[0].StartLine + } + out[purlStr] = pkgLocation{target: result.Target, line: line} + } + } + return out +} + +func findLocationByPackage(report ptypes.Report, name, version string) (pkgLocation, bool) { + for _, result := range report.Results { + for _, pkg := range result.Packages { + if pkg.Name == name && pkg.Version == version { + line := 0 + if len(pkg.Locations) > 0 { + line = pkg.Locations[0].StartLine + } + return pkgLocation{target: result.Target, line: line}, true + } + } + } + return pkgLocation{}, false +} + +// severityFromEolDate maps EOL date to Codacy rule ID. +// Now obsolete -> critical; within 1 month -> high; within 6 months -> medium; else -> minor. +func severityFromEolDate(eolDate string) (string, error) { + if eolDate == "" { + return "", fmt.Errorf("empty EOL date") + } + t, err := time.Parse("2006-01-02", eolDate) + if err != nil { + return "", err + } + now := time.Now().UTC() + // Use start of today for consistent day boundary + today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.UTC) + eolMidnight := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.UTC) + daysUntil := int(eolMidnight.Sub(today).Hours() / 24) + + switch { + case daysUntil <= 0: + return ruleIDEOLCritical, nil + case daysUntil <= daysPerMonth: + return ruleIDEOLHigh, nil + case daysUntil <= daysSixMonths: + return ruleIDEOLMedium, nil + default: + return ruleIDEOLMinor, nil + } +} + +// XeolCLIRunner runs the xeol CLI on an SBOM path. +type XeolCLIRunner struct { + ExecPath string // path to xeol binary; empty means "xeol" + Env []string // optional env (e.g. XEOL_DB_CACHE_DIR, XEOL_DB_AUTO_UPDATE=false) +} + +// Run executes xeol sbom: -o json --lookahead 365d and parses matches. +func (r *XeolCLIRunner) Run(sbomPath string) ([]eolMatch, error) { + return runXeolCLI(r.ExecPath, sbomPath, r.Env) +} + +// runXeolCLI is the actual CLI invocation (testable with exec). +var runXeolCLI = func(execPath, sbomPath string, env []string) ([]eolMatch, error) { + return runXeolCLIImpl(execPath, sbomPath, env) +} + +func runXeolCLIImpl(execPath, sbomPath string, env []string) ([]eolMatch, error) { + if execPath == "" { + execPath = "xeol" + } + cmd, stdout, stderr, err := runCommand(execPath, env, "sbom:"+sbomPath, "-o", "json", "--lookahead", "365d") + if err != nil { + return nil, err + } + defer stdout.Close() + defer stderr.Close() + + var out xeolJSON + if err := json.NewDecoder(stdout).Decode(&out); err != nil { + return nil, fmt.Errorf("decode xeol json: %w", err) + } + if err := cmd.Wait(); err != nil { + return nil, fmt.Errorf("xeol exit: %w", err) + } + + matches := make([]eolMatch, 0, len(out.Matches)) + for _, m := range out.Matches { + purl := m.Package.PURL + if purl == "" { + purl = "pkg:generic/" + m.Package.Name + "@" + m.Package.Version + } + matches = append(matches, eolMatch{ + PURL: purl, + Name: m.Package.Name, + Version: m.Package.Version, + EolDate: m.Cycle.Eol, + CycleID: m.Cycle.ReleaseCycle, + }) + } + return matches, nil +} + +// runCommand starts the command and returns stdout/stderr pipes. Caller must call cmd.Wait() and close pipes. +func runCommand(execPath string, env []string, args ...string) (*exec.Cmd, io.ReadCloser, io.ReadCloser, error) { + cmd := exec.Command(execPath, args...) + if len(env) > 0 { + cmd.Env = env + } + stdout, err := cmd.StdoutPipe() + if err != nil { + return nil, nil, nil, err + } + stderr, err := cmd.StderrPipe() + if err != nil { + stdout.Close() + return nil, nil, nil, err + } + if err := cmd.Start(); err != nil { + stdout.Close() + stderr.Close() + return nil, nil, nil, err + } + return cmd, stdout, stderr, nil +} \ No newline at end of file diff --git a/internal/tool/eol_scanner_test.go b/internal/tool/eol_scanner_test.go new file mode 100644 index 00000000..970ed141 --- /dev/null +++ b/internal/tool/eol_scanner_test.go @@ -0,0 +1,314 @@ +package tool + +import ( + "testing" + "time" + + cdx "github.com/CycloneDX/cyclonedx-go" + ftypes "github.com/aquasecurity/trivy/pkg/fanal/types" + ptypes "github.com/aquasecurity/trivy/pkg/types" + codacy "github.com/codacy/codacy-engine-golang-seed/v6" + "github.com/package-url/packageurl-go" + "github.com/stretchr/testify/assert" +) + +func TestSeverityFromEolDate(t *testing.T) { + tests := []struct { + name string + eolDate string + wantRule string + wantErr bool + }{ + {"obsolete (past)", "2020-01-01", ruleIDEOLCritical, false}, + {"empty", "", "", true}, + {"invalid format", "not-a-date", "", true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := severityFromEolDate(tt.eolDate) + if tt.wantErr { + assert.Error(t, err) + return + } + assert.NoError(t, err) + assert.Equal(t, tt.wantRule, got) + }) + } + // Relative dates: use now + offset so tests are stable + now := time.Now().UTC() + highDate := now.AddDate(0, 0, 15).Format("2006-01-02") // 15 days + mediumDate := now.AddDate(0, 2, 0).Format("2006-01-02") // ~60 days + minorDate := now.AddDate(1, 0, 0).Format("2006-01-02") // 1 year + t.Run("within 1 month", func(t *testing.T) { + got, err := severityFromEolDate(highDate) + assert.NoError(t, err) + assert.Equal(t, ruleIDEOLHigh, got) + }) + t.Run("within 6 months", func(t *testing.T) { + got, err := severityFromEolDate(mediumDate) + assert.NoError(t, err) + assert.Equal(t, ruleIDEOLMedium, got) + }) + t.Run("beyond 6 months", func(t *testing.T) { + got, err := severityFromEolDate(minorDate) + assert.NoError(t, err) + assert.Equal(t, ruleIDEOLMinor, got) + }) +} + +func TestEOLScanner_Scan_NoPatternEnabled(t *testing.T) { + mockRunner := &mockEOLRunner{matches: []eolMatch{ + {PURL: "pkg:npm/lodash@4.17.21", Name: "lodash", Version: "4.17.21", EolDate: "2024-01-01"}, + }} + s := NewEOLScanner(mockRunner) + report := ptypes.Report{Results: []ptypes.Result{}} + bom := &cdx.BOM{} + patterns := []codacy.Pattern{{ID: ruleIDVulnerabilityCritical}} + files := []string{"go.mod"} + te := codacy.ToolExecution{Patterns: &patterns, Files: &files, SourceDir: t.TempDir()} + + result := s.Scan(report, te, bom) + + assert.Empty(t, result) + assert.False(t, mockRunner.called, "runner should not be called when no EOL pattern enabled") +} + +func TestEOLScanner_Scan_WithMockRunner(t *testing.T) { + purlStr := "pkg:npm/lodash@4.17.21" + report := ptypes.Report{ + Results: []ptypes.Result{ + { + Target: "package-lock.json", + Packages: []ftypes.Package{ + { + Identifier: ftypes.PkgIdentifier{ + PURL: &packageurl.PackageURL{Type: "npm", Name: "lodash", Version: "4.17.21"}, + }, + Name: "lodash", + Version: "4.17.21", + Locations: ftypes.Locations{{StartLine: 42}}, + }, + }, + }, + }, + } + mockRunner := &mockEOLRunner{matches: []eolMatch{ + {PURL: purlStr, Name: "lodash", Version: "4.17.21", EolDate: "2024-06-01", CycleID: "4.x"}, + }} + s := NewEOLScanner(mockRunner) + bom := minimalBOM(t) + patterns := []codacy.Pattern{{ID: ruleIDEOLCritical}} + files := []string{"package-lock.json"} + te := codacy.ToolExecution{Patterns: &patterns, Files: &files, SourceDir: t.TempDir()} + + result := s.Scan(report, te, bom) + + assert.True(t, mockRunner.called) + assert.Len(t, result, 1) + issue, ok := result[0].(codacy.Issue) + assert.True(t, ok) + assert.Equal(t, ruleIDEOLCritical, issue.PatternID) + assert.Equal(t, "package-lock.json", issue.File) + assert.Equal(t, 42, issue.Line) + assert.Contains(t, issue.Message, "lodash@4.17.21") + assert.Contains(t, issue.Message, "2024-06-01") +} + +func TestEOLScanner_Scan_SeverityBands(t *testing.T) { + purl := packageurl.NewPackageURL("npm", "", "pkg", "1.0.0", nil, "") + purlStr := purl.ToString() + report := ptypes.Report{ + Results: []ptypes.Result{ + { + Target: "package-lock.json", + Packages: []ftypes.Package{ + { + Identifier: ftypes.PkgIdentifier{PURL: purl}, + Name: "pkg", + Version: "1.0.0", + Locations: ftypes.Locations{{StartLine: 1}}, + }, + }, + }, + }, + } + files := []string{"package-lock.json"} + te := codacy.ToolExecution{Patterns: &[]codacy.Pattern{{ID: ruleIDEOLCritical}, {ID: ruleIDEOLHigh}, {ID: ruleIDEOLMedium}, {ID: ruleIDEOLMinor}}, Files: &files, SourceDir: t.TempDir()} + bom := minimalBOM(t) + + now := time.Now().UTC() + bands := []struct { + eolDate string + ruleID string + }{ + {"2020-01-01", ruleIDEOLCritical}, + {now.AddDate(0, 0, 15).Format("2006-01-02"), ruleIDEOLHigh}, + {now.AddDate(0, 2, 0).Format("2006-01-02"), ruleIDEOLMedium}, + {now.AddDate(1, 0, 0).Format("2006-01-02"), ruleIDEOLMinor}, + } + for _, b := range bands { + mockRunner := &mockEOLRunner{matches: []eolMatch{{PURL: purlStr, Name: "pkg", Version: "1.0.0", EolDate: b.eolDate}}} + s := NewEOLScanner(mockRunner) + result := s.Scan(report, te, bom) + assert.Len(t, result, 1, "eol date %s should produce one issue", b.eolDate) + issue := result[0].(codacy.Issue) + assert.Equal(t, b.ruleID, issue.PatternID, "eol date %s", b.eolDate) + } +} + +func TestEOLScanner_Scan_FiltersKnownFiles(t *testing.T) { + report := ptypes.Report{ + Results: []ptypes.Result{ + { + Target: "ExcludedLock.json", + Packages: []ftypes.Package{ + { + Identifier: ftypes.PkgIdentifier{PURL: &packageurl.PackageURL{Type: "npm", Name: "eol-pkg", Version: "1.0.0"}}, + Name: "eol-pkg", + Version: "1.0.0", + Locations: ftypes.Locations{{StartLine: 10}}, + }, + }, + }, + }, + } + mockRunner := &mockEOLRunner{matches: []eolMatch{ + {PURL: "pkg:npm/eol-pkg@1.0.0", Name: "eol-pkg", Version: "1.0.0", EolDate: "2024-01-01"}, + }} + s := NewEOLScanner(mockRunner) + bom := minimalBOM(t) + patterns := []codacy.Pattern{{ID: ruleIDEOLCritical}} + files := []string{"package-lock.json"} // ExcludedLock.json not in list + te := codacy.ToolExecution{Patterns: &patterns, Files: &files, SourceDir: t.TempDir()} + + result := s.Scan(report, te, bom) + + assert.Empty(t, result) +} + +func TestEOLScanner_Scan_NilBOM(t *testing.T) { + s := NewEOLScanner(&mockEOLRunner{}) + patterns := []codacy.Pattern{{ID: ruleIDEOLCritical}} + files := []string{} + te := codacy.ToolExecution{Patterns: &patterns, Files: &files} + + result := s.Scan(ptypes.Report{}, te, nil) + + assert.Empty(t, result) +} + +func TestEOLScanner_Scan_EmptyComponentsBOM(t *testing.T) { + s := NewEOLScanner(&mockEOLRunner{}) + bom := &cdx.BOM{} + patterns := []codacy.Pattern{{ID: ruleIDEOLCritical}} + files := []string{} + te := codacy.ToolExecution{Patterns: &patterns, Files: &files} + + result := s.Scan(ptypes.Report{}, te, bom) + + // Still runs runner (temp file written); mock returns empty + assert.Empty(t, result) +} + +func TestEOLScanner_Scan_NoLineNumberBecomesFileError(t *testing.T) { + purl := packageurl.NewPackageURL("npm", "", "no-line-pkg", "1.0.0", nil, "") + report := ptypes.Report{ + Results: []ptypes.Result{ + { + Target: "package-lock.json", + Packages: []ftypes.Package{ + { + Identifier: ftypes.PkgIdentifier{PURL: purl}, + Name: "no-line-pkg", + Version: "1.0.0", + Locations: nil, // no location + }, + }, + }, + }, + } + dir := t.TempDir() + // No file with "no-line-pkg" in content -> fallback returns 0 + mockRunner := &mockEOLRunner{matches: []eolMatch{ + {PURL: purl.ToString(), Name: "no-line-pkg", Version: "1.0.0", EolDate: "2024-01-01"}, + }} + s := NewEOLScanner(mockRunner) + bom := minimalBOM(t) + patterns := []codacy.Pattern{{ID: ruleIDEOLCritical}} + files := []string{"package-lock.json"} + te := codacy.ToolExecution{Patterns: &patterns, Files: &files, SourceDir: dir} + + result := s.Scan(report, te, bom) + + assert.Len(t, result, 1) + fe, ok := result[0].(codacy.FileError) + assert.True(t, ok) + assert.Equal(t, "package-lock.json", fe.File) + assert.Contains(t, fe.Message, "Line numbers") +} + +func TestBuildPURLToLocation(t *testing.T) { + purl := packageurl.NewPackageURL("npm", "", "lodash", "4.17.21", nil, "") + report := ptypes.Report{ + Results: []ptypes.Result{ + { + Target: "package-lock.json", + Packages: []ftypes.Package{ + { + Identifier: ftypes.PkgIdentifier{PURL: purl}, + Locations: ftypes.Locations{{StartLine: 10}}, + }, + }, + }, + }, + } + m := buildPURLToLocation(report) + assert.Len(t, m, 1) + loc, ok := m[purl.ToString()] + assert.True(t, ok) + assert.Equal(t, "package-lock.json", loc.target) + assert.Equal(t, 10, loc.line) +} + +func TestFindLocationByPackage(t *testing.T) { + report := ptypes.Report{ + Results: []ptypes.Result{ + { + Target: "go.mod", + Packages: []ftypes.Package{ + {Name: "stdlib", Version: "1.22", Locations: ftypes.Locations{{StartLine: 2}}}, + }, + }, + }, + } + loc, ok := findLocationByPackage(report, "stdlib", "1.22") + assert.True(t, ok) + assert.Equal(t, "go.mod", loc.target) + assert.Equal(t, 2, loc.line) + + _, ok = findLocationByPackage(report, "other", "1.0") + assert.False(t, ok) +} + +type mockEOLRunner struct { + matches []eolMatch + called bool +} + +func (m *mockEOLRunner) Run(sbomPath string) ([]eolMatch, error) { + m.called = true + return m.matches, nil +} + +func minimalBOM(t *testing.T) *cdx.BOM { + t.Helper() + comps := []cdx.Component{} + deps := []cdx.Dependency{} + return &cdx.BOM{ + BOMFormat: "CycloneDX", + SpecVersion: cdx.SpecVersion1_4, + Version: 1, + Components: &comps, + Dependencies: &deps, + } +} diff --git a/internal/tool/eol_xeol_lib.go b/internal/tool/eol_xeol_lib.go new file mode 100644 index 00000000..065517b0 --- /dev/null +++ b/internal/tool/eol_xeol_lib.go @@ -0,0 +1,144 @@ +// Package tool - EOL runner using xeol Go library (no CLI subprocess). +package tool + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/anchore/syft/syft/format" + xeolPkg "github.com/xeol-io/xeol/xeol/pkg" + xeolLib "github.com/xeol-io/xeol/xeol" + "github.com/xeol-io/xeol/xeol/db" + "github.com/xeol-io/xeol/xeol/match" + "github.com/xeol-io/xeol/xeol/store" + "github.com/xeol-io/xeol/xeol/xeolerr" +) + +const lookahead365d = 365 * 24 * time.Hour + +// XeolLibraryRunner runs EOL scan using the xeol Go library (no xeol binary required). +type XeolLibraryRunner struct { + // DBCacheDir overrides XEOL_DB_CACHE_DIR when non-empty. + DBCacheDir string + // UpdateDB if true, allow DB update; set false for offline. + UpdateDB bool +} + +// Run decodes the SBOM at sbomPath, loads the xeol DB, runs FindEol, and returns eolMatch slice. +func (r *XeolLibraryRunner) Run(sbomPath string) ([]eolMatch, error) { + packages, err := r.packagesFromSBOM(sbomPath) + if err != nil { + return nil, err + } + if len(packages) == 0 { + return []eolMatch{}, nil + } + + store, closer, err := r.loadStore() + if err != nil { + return nil, err + } + if closer != nil { + defer closer.Close() + } + + eolMatchDate := time.Now().UTC().Add(lookahead365d) + matches, err := xeolLib.FindEol(*store, nil, nil, packages, false, eolMatchDate) + if err != nil && !errors.Is(err, xeolerr.ErrEolFound) { + return nil, fmt.Errorf("find eol: %w", err) + } + return libMatchesToEolMatch(matches), nil +} + +func (r *XeolLibraryRunner) packagesFromSBOM(sbomPath string) ([]xeolPkg.Package, error) { + raw, err := os.ReadFile(sbomPath) + if err != nil { + return nil, fmt.Errorf("open sbom: %w", err) + } + // Syft's CycloneDX decoder expects specVersion as string (e.g. "1.6"); Trivy may emit a number. + raw = normalizeCycloneDXSpecVersion(raw) + decoded, _, _, err := format.Decode(bytes.NewReader(raw)) + if err != nil { + return nil, fmt.Errorf("decode sbom: %w", err) + } + if decoded == nil || decoded.Artifacts.Packages == nil { + return nil, nil + } + config := xeolPkg.SynthesisConfig{GenerateMissingCPEs: false} + return xeolPkg.FromCollection(decoded.Artifacts.Packages, config), nil +} + +// normalizeCycloneDXSpecVersion ensures specVersion is a JSON string so syft's decoder can identify the format. +func normalizeCycloneDXSpecVersion(b []byte) []byte { + var m map[string]interface{} + if err := json.Unmarshal(b, &m); err != nil { + return b + } + if v, ok := m["specVersion"]; ok { + switch t := v.(type) { + case string: + return b + case float64: + // Syft supports 1.2–1.6; Trivy/cyclonedx-go often use integer (e.g. 7 for 1.6). + n := int(t) + if n >= 0 && n <= 6 { + m["specVersion"] = fmt.Sprintf("1.%d", n) + } else { + m["specVersion"] = "1.6" + } + out, _ := json.Marshal(m) + return out + } + } + return b +} + +func (r *XeolLibraryRunner) loadStore() (*store.Store, *db.Closer, error) { + cfg := r.dbConfig() + store, _, closer, err := xeolLib.LoadEolDB(cfg, r.UpdateDB) + if err != nil { + return nil, nil, fmt.Errorf("load xeol db: %w", err) + } + return store, closer, nil +} + +func (r *XeolLibraryRunner) dbConfig() db.Config { + rootDir := r.DBCacheDir + if rootDir == "" { + rootDir = os.Getenv("XEOL_DB_CACHE_DIR") + } + if rootDir == "" { + // Default: XDG cache (e.g. ~/Library/Caches/xeol/db on macOS) + rootDir = filepath.Join(os.Getenv("HOME"), ".cache", "xeol", "db") + if d := os.Getenv("XDG_CACHE_HOME"); d != "" { + rootDir = filepath.Join(d, "xeol", "db") + } + } + return db.Config{ + DBRootDir: rootDir, + // ListingURL left empty to use xeol default + } +} + +func libMatchesToEolMatch(m match.Matches) []eolMatch { + out := make([]eolMatch, 0, m.Count()) + for m := range m.Enumerate() { + purl := m.Package.PURL + if purl == "" { + purl = "pkg:generic/" + m.Package.Name + "@" + m.Package.Version + } + out = append(out, eolMatch{ + PURL: purl, + Name: m.Package.Name, + Version: m.Package.Version, + EolDate: m.Cycle.Eol, + CycleID: m.Cycle.ReleaseCycle, + }) + } + return out +} diff --git a/internal/tool/tool.go b/internal/tool/tool.go index d0495293..57b67612 100644 --- a/internal/tool/tool.go +++ b/internal/tool/tool.go @@ -34,6 +34,10 @@ const ( ruleIDVulnerabilityMedium string = "vulnerability_medium" ruleIDVulnerabilityMinor string = "vulnerability_minor" ruleIDMaliciousPackages string = "malicious_packages" + ruleIDEOLCritical string = "eol_critical" + ruleIDEOLHigh string = "eol_high" + ruleIDEOLMedium string = "eol_medium" + ruleIDEOLMinor string = "eol_minor" // See https://aquasecurity.github.io/trivy/v0.59/docs/scanner/vulnerability/#severity-selection trivySeverityLow string = "low" @@ -41,28 +45,42 @@ const ( trivySeverityHigh string = "high" trivySeverityCritical string = "critical" - cacheDir string = "/dist/cache/codacy-trivy" + defaultCacheDir string = "/dist/cache/codacy-trivy" ) +// getTrivyCacheDir returns the Trivy cache directory (env TRIVY_CACHE_DIR for local runs, else default). +func getTrivyCacheDir() string { + if d := os.Getenv("TRIVY_CACHE_DIR"); d != "" { + return d + } + return defaultCacheDir +} + // ruleIDsVulnerability contains IDs all rule (or pattern) IDs that find vulnerable dependencies. var ruleIDsVulnerability = []string{ruleIDVulnerabilityCritical, ruleIDVulnerabilityHigh, ruleIDVulnerabilityMedium, ruleIDVulnerabilityMinor} +// ruleIDsEOL contains all EOL rule IDs. +var ruleIDsEOL = []string{ruleIDEOLCritical, ruleIDEOLHigh, ruleIDEOLMedium, ruleIDEOLMinor} + // New creates a new instance of Codacy Trivy. func New(maliciousPackagesIndexPath string) (*codacyTrivy, error) { maliciousPackagesScanner, err := NewMaliciousPackagesScanner(maliciousPackagesIndexPath) if err != nil { return nil, err } + eolScanner := NewEOLScanner(&XeolLibraryRunner{UpdateDB: false}) return &codacyTrivy{ runnerFactory: &defaultRunnerFactory{}, maliciousPackagesScanner: *maliciousPackagesScanner, + eolScanner: eolScanner, }, nil } type codacyTrivy struct { runnerFactory RunnerFactory maliciousPackagesScanner MaliciousPackagesScanner + eolScanner *EOLScanner } // https://github.com/uber-go/guide/blob/master/style.md#verify-interface-compliance @@ -77,7 +95,11 @@ func (t codacyTrivy) Run(ctx context.Context, toolExecution codacy.ToolExecution // This is the only way to suppress Trivy logs. log.InitLogger(false, true) - report, err := t.runBaseScan(ctx, toolExecution.SourceDir) + patterns := []codacy.Pattern{} + if toolExecution.Patterns != nil { + patterns = *toolExecution.Patterns + } + report, err := t.runBaseScan(ctx, toolExecution.SourceDir, patterns) if err != nil { return nil, err } @@ -96,25 +118,41 @@ func (t codacyTrivy) Run(ctx context.Context, toolExecution codacy.ToolExecution maliciousPackagesIssues := t.maliciousPackagesScanner.Scan(report, toolExecution) + var eolIssues []codacy.Result + if t.eolScanner != nil { + eolIssues = t.eolScanner.Scan(report, toolExecution, &sbom.BOM) + } + allIssues := append(vulnerabilityScanningIssues, secretScanningIssues...) allIssues = append(allIssues, maliciousPackagesIssues...) + allIssues = append(allIssues, eolIssues...) allIssues = append(allIssues, sbom) return allIssues, nil } // runBaseScan will run a vulnerability scan that produces a report to be used for SBOM generation or for vulnerability issues. -func (t codacyTrivy) runBaseScan(ctx context.Context, sourceDir string) (ptypes.Report, error) { +// When patterns do not include any vulnerability pattern (EOL-only, secret, malicious), Scanners is left empty so the Trivy vuln DB is not required. +func (t codacyTrivy) runBaseScan(ctx context.Context, sourceDir string, patterns []codacy.Pattern) (ptypes.Report, error) { + if patterns == nil { + patterns = []codacy.Pattern{} + } + cacheDir := getTrivyCacheDir() + vulnerabilityScanningEnabled := lo.SomeBy(patterns, func(p codacy.Pattern) bool { + return lo.Contains(ruleIDsVulnerability, p.ID) + }) + // When using a local cache (TRIVY_CACHE_DIR), allow DB update on first run; production image uses skip. + skipDBUpdate := cacheDir == defaultCacheDir + offlineScan := cacheDir == defaultCacheDir + scanners := ptypes.Scanners{ptypes.VulnerabilityScanner} + // EOL-only: still use VulnerabilityScanner so report has packages for SBOM; Trivy DB must exist in image (see Dockerfile). config := flag.Options{ GlobalOptions: flag.GlobalOptions{ - // CacheDir needs to be explicitly set and match the directory in the Dockerfile. - // The cache dir will contain the pre-downloaded vulnerability DBs. CacheDir: cacheDir, }, DBOptions: flag.DBOptions{ - // Do not try to update vulnerability DBs. - SkipDBUpdate: true, - SkipJavaDBUpdate: true, + SkipDBUpdate: skipDBUpdate, + SkipJavaDBUpdate: skipDBUpdate, }, PackageOptions: flag.PackageOptions{ // Only scan libraries not OS packages. @@ -127,9 +165,9 @@ func (t codacyTrivy) runBaseScan(ctx context.Context, sourceDir string) (ptypes. ListAllPkgs: true, }, ScanOptions: flag.ScanOptions{ - // Do not try to connect to the internet to download vulnerability DBs, for example. - OfflineScan: true, - Scanners: ptypes.Scanners{ptypes.VulnerabilityScanner}, + // Offline when using production cache; allow network when using TRIVY_CACHE_DIR for local runs. + OfflineScan: offlineScan, + Scanners: scanners, // Instead of scanning files individually, scan the whole source directory since it's faster. // Then filter issues from files that were not supposed to be analysed. Target: sourceDir, @@ -311,7 +349,7 @@ func validateExecutionConfiguration(toolExecution codacy.ToolExecution) error { } noSupportedPatterns := lo.NoneBy(*toolExecution.Patterns, func(p codacy.Pattern) bool { - return p.ID == ruleIDSecret || p.ID == ruleIDMaliciousPackages || lo.Contains(ruleIDsVulnerability, p.ID) + return p.ID == ruleIDSecret || p.ID == ruleIDMaliciousPackages || lo.Contains(ruleIDsVulnerability, p.ID) || lo.Contains(ruleIDsEOL, p.ID) }) if noSupportedPatterns { patternIDs := lo.Map(*toolExecution.Patterns, func(p codacy.Pattern, _ int) string { diff --git a/internal/tool/tool_test.go b/internal/tool/tool_test.go index 731d8dad..b027da84 100644 --- a/internal/tool/tool_test.go +++ b/internal/tool/tool_test.go @@ -116,7 +116,7 @@ func TestRun(t *testing.T) { config := flag.Options{ GlobalOptions: flag.GlobalOptions{ - CacheDir: cacheDir, + CacheDir: defaultCacheDir, }, DBOptions: flag.DBOptions{ SkipDBUpdate: true, @@ -549,7 +549,7 @@ func TestRunScanFilesystemError(t *testing.T) { config := flag.Options{ GlobalOptions: flag.GlobalOptions{ - CacheDir: cacheDir, + CacheDir: defaultCacheDir, }, DBOptions: flag.DBOptions{ SkipDBUpdate: true, @@ -646,6 +646,12 @@ func TestValidateExecutionConfiguration(t *testing.T) { }, errMsg: "Failed to configure Codacy Trivy: configured patterns don't match existing rules (provided [unknown])", }, + "EOL pattern only": { + executionConfiguration: codacy.ToolExecution{ + Patterns: &[]codacy.Pattern{{ID: ruleIDEOLCritical}}, + }, + errMsg: "", + }, } for testName, testData := range testSet { @@ -654,6 +660,10 @@ func TestValidateExecutionConfiguration(t *testing.T) { err := validateExecutionConfiguration(testData.executionConfiguration) // Assert + if testData.errMsg == "" { + assert.NoError(t, err) + return + } expectedErr := &ToolError{msg: testData.errMsg} assert.Equal(t, expectedErr, err) }) diff --git a/internal/tool/xeol_stub.go b/internal/tool/xeol_stub.go new file mode 100644 index 00000000..8fa5bead --- /dev/null +++ b/internal/tool/xeol_stub.go @@ -0,0 +1,3 @@ +// Package tool - xeol is used by the EOL scanner via the Go library in eol_xeol_lib.go (not the CLI). +// Build is fixed for xeol's transitive deps (syft, fangs) via go.mod replace directives. +package tool diff --git a/test-cve-2025-55182/.codacyrc.bak b/test-cve-2025-55182/.codacyrc.bak new file mode 100644 index 00000000..7f908730 --- /dev/null +++ b/test-cve-2025-55182/.codacyrc.bak @@ -0,0 +1,14 @@ +{ + "files": [ + "*.json" + ], + "tools": [ + { "name": "trivy", "patterns": [ + { "patternId": "vulnerability_critical" }, + { "patternId": "vulnerability_high" }, + { "patternId": "vulnerability_medium" }, + { "patternId": "vulnerability_minor" } + ] } + ] +} + diff --git a/test-cve-2025-55182/src/javascript/package-lock.json b/test-cve-2025-55182/src/javascript/package-lock.json new file mode 100644 index 00000000..4cab8f15 --- /dev/null +++ b/test-cve-2025-55182/src/javascript/package-lock.json @@ -0,0 +1,84 @@ +{ + "name": "test-react-cve", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "test-react-cve", + "version": "1.0.0", + "dependencies": { + "react": "19.0.0", + "react-server-dom-webpack": "19.0.0" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-loose": { + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/acorn-loose/-/acorn-loose-8.5.2.tgz", + "integrity": "sha512-PPvV6g8UGMGgjrMu+n/f9E/tCSkNQ2Y97eFvuVdJfG11+xdIeDcLyNdC8SHcrHbRqkfwLASdplyR6B6sKM1U4A==", + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "license": "MIT" + }, + "node_modules/react": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-server-dom-webpack": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-server-dom-webpack/-/react-server-dom-webpack-19.0.0.tgz", + "integrity": "sha512-hLug9KEXLc8vnU9lDNe2b2rKKDaqrp5gNiES4uyu2Up3FZfZJZmdwLFXlWzdA9gTB/6/cWduSB2K1Lfag2pSvw==", + "deprecated": "Critical Security Vulnerability in React Server Components", + "license": "MIT", + "dependencies": { + "acorn-loose": "^8.3.0", + "neo-async": "^2.6.1", + "webpack-sources": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^19.0.0", + "react-dom": "^19.0.0", + "webpack": "^5.59.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + } + } +} diff --git a/test-cve-2025-55182/src/javascript/package.json b/test-cve-2025-55182/src/javascript/package.json new file mode 100644 index 00000000..29317148 --- /dev/null +++ b/test-cve-2025-55182/src/javascript/package.json @@ -0,0 +1,9 @@ +{ + "name": "test-react-cve", + "version": "1.0.0", + "dependencies": { + "react": "19.0.0", + "react-server-dom-webpack": "19.0.0" + } +} + diff --git a/test-eol-project/README.md b/test-eol-project/README.md new file mode 100644 index 00000000..6f226cd9 --- /dev/null +++ b/test-eol-project/README.md @@ -0,0 +1,64 @@ +# Test project for EOL detection + +This project pins the **protractor** npm package (v7.0.0), which is in the xeol DB as EOL (2023-08-31). It is used to verify that the codacy-trivy EOL scanner reports useful findings. + +## 1. One-time setup + +```bash +cd test-eol-project +npm install +cd .. +``` + +Install **xeol** (required for EOL scan): +`brew install xeol-io/xeol/xeol` or [install script](https://github.com/xeol-io/xeol#installation). + +## 2. Quick check that xeol finds EOL + +From repo root, after `npm install` in test-eol-project: + +```bash +xeol dir:./test-eol-project -o json --lookahead 365d +``` + +You should see matches for **protractor** (EOL 2023-08-31). This confirms xeol and its DB work. + +## 3. Full tool (codacy-trivy with EOL patterns) + +For a local run you do **not** need the container. You do need: + +- **Trivy DB cache** – use a local cache dir so the tool can run (and on first use with that dir, it will download the DB if you have network). +- **xeol** on PATH – so the EOL scanner can find obsolete deps. + +Build: + +```bash +make build +GOTOOLCHAIN=auto GOEXPERIMENT=jsonv2 CGO_ENABLED=0 go build -o bin/eoltest ./cmd/eoltest +``` + +One-time: populate Trivy cache (if you don’t have one yet): + +```bash +trivy --cache-dir ./cache image --download-db-only +``` + +Run codacy-trivy (eoltest) against the test project: + +```bash +TRIVY_CACHE_DIR=$PWD/cache ./bin/eoltest -dir ./test-eol-project +``` + +You should see EOL issues for the `protractor` package. + +## 4. Step 5: Run in container (prove EOL in Docker) + +The image bakes in the xeol EOL DB at build time. Build and run: + +```bash +docker build -t codacy-trivy:eol . +docker run --rm -v "$(pwd)/test-eol-project:/project:ro" codacy-trivy:eol /dist/bin/eoltest -dir /project +``` + +You should see `[eol_critical] End-of-life package protractor@7.0.0 (EOL 2023-08-31)`. + diff --git a/test-eol-project/node_modules/.bin/blocking-proxy b/test-eol-project/node_modules/.bin/blocking-proxy new file mode 120000 index 00000000..2b0fa22f --- /dev/null +++ b/test-eol-project/node_modules/.bin/blocking-proxy @@ -0,0 +1 @@ +../blocking-proxy/built/lib/bin.js \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/jasmine b/test-eol-project/node_modules/.bin/jasmine new file mode 120000 index 00000000..d2c1bff3 --- /dev/null +++ b/test-eol-project/node_modules/.bin/jasmine @@ -0,0 +1 @@ +../jasmine/bin/jasmine.js \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/protractor b/test-eol-project/node_modules/.bin/protractor new file mode 120000 index 00000000..58967e81 --- /dev/null +++ b/test-eol-project/node_modules/.bin/protractor @@ -0,0 +1 @@ +../protractor/bin/protractor \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/rimraf b/test-eol-project/node_modules/.bin/rimraf new file mode 120000 index 00000000..4cd49a49 --- /dev/null +++ b/test-eol-project/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/semver b/test-eol-project/node_modules/.bin/semver new file mode 120000 index 00000000..317eb293 --- /dev/null +++ b/test-eol-project/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/sshpk-conv b/test-eol-project/node_modules/.bin/sshpk-conv new file mode 120000 index 00000000..a2a295c8 --- /dev/null +++ b/test-eol-project/node_modules/.bin/sshpk-conv @@ -0,0 +1 @@ +../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/sshpk-sign b/test-eol-project/node_modules/.bin/sshpk-sign new file mode 120000 index 00000000..766b9b3a --- /dev/null +++ b/test-eol-project/node_modules/.bin/sshpk-sign @@ -0,0 +1 @@ +../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/sshpk-verify b/test-eol-project/node_modules/.bin/sshpk-verify new file mode 120000 index 00000000..bfd7e3ad --- /dev/null +++ b/test-eol-project/node_modules/.bin/sshpk-verify @@ -0,0 +1 @@ +../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/uuid b/test-eol-project/node_modules/.bin/uuid new file mode 120000 index 00000000..b3e45bc5 --- /dev/null +++ b/test-eol-project/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/webdriver-manager b/test-eol-project/node_modules/.bin/webdriver-manager new file mode 120000 index 00000000..bc2ec1ac --- /dev/null +++ b/test-eol-project/node_modules/.bin/webdriver-manager @@ -0,0 +1 @@ +../protractor/bin/webdriver-manager \ No newline at end of file diff --git a/test-eol-project/node_modules/.package-lock.json b/test-eol-project/node_modules/.package-lock.json new file mode 100644 index 00000000..9318a50c --- /dev/null +++ b/test-eol-project/node_modules/.package-lock.json @@ -0,0 +1,1547 @@ +{ + "name": "test-eol-project", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@types/q": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", + "integrity": "sha512-qYi3YV9inU/REEfxwVcGZzbS3KG/Xs90lv0Pr+lDtuVjBPGd1A+eciXzVSaRvLify132BfcvhvEjeVahrUl0Ug==", + "license": "MIT" + }, + "node_modules/@types/selenium-webdriver": { + "version": "3.0.26", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.26.tgz", + "integrity": "sha512-dyIGFKXfUFiwkMfNGn1+F6b80ZjR3uSYv1j6xVJSDlft5waZ2cwkHW4e7zNzvq7hiEackcgvBpmnXZrI1GltPg==", + "license": "MIT" + }, + "node_modules/adm-zip": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", + "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", + "license": "MIT", + "engines": { + "node": ">=12.0" + } + }, + "node_modules/agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "license": "MIT", + "dependencies": { + "es6-promisify": "^5.0.0" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/ajv": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "license": "MIT", + "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-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "license": "MIT", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/blocking-proxy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", + "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "blocking-proxy": "built/lib/bin.js" + }, + "engines": { + "node": ">=6.9.x" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/browserstack": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.6.1.tgz", + "integrity": "sha512-GxtFjpIaKdbAyzHfFDKixKO8IBT7wR3NjbzrGc78nNs/Ciys9wU3/nBtsqsWv5nDSrdI5tz0peKuzCPuNXNUiw==", + "license": "MIT", + "dependencies": { + "https-proxy-agent": "^2.2.1" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "license": "Apache-2.0" + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/cliui/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha512-Z4fzpbIRjOu7lO5jCETSWoqUDVe0IPOlfugBsF6suen2LKDlVb4QZpKEM9P+buNJ4KI1eN7I083w/pbKUpsrWQ==", + "license": "MIT", + "dependencies": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "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": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "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==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha512-HJRTIH2EeH44ka+LWig+EqT2ONSYpVlNfx6pyd592/VF1TbfljJ7elwie7oSwcViLGqOdWocSdu2txwBF9bjmQ==", + "license": "MIT", + "dependencies": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "license": "MIT", + "dependencies": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "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==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "license": "MIT", + "dependencies": { + "is-path-inside": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", + "license": "MIT", + "dependencies": { + "path-is-inside": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" + }, + "node_modules/jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha512-KbdGQTf5jbZgltoHs31XGiChAPumMSY64OZMWLNYnEnMfG5uwGBhffePwuskexjT+/Jea/gU3qAU8344hNohSw==", + "license": "MIT", + "dependencies": { + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.8.0" + }, + "bin": { + "jasmine": "bin/jasmine.js" + } + }, + "node_modules/jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha512-SNkOkS+/jMZvLhuSx1fjhcNWUC/KG6oVyFUGkSBEr9n1axSNduWU8GlI7suaHXr4yxjet6KjrUZxUTE5WzzWwQ==", + "license": "MIT" + }, + "node_modules/jasminewd2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", + "integrity": "sha512-Rn0nZe4rfDhzA63Al3ZGh0E+JTmM6ESZYXJGKuqKGZObsAB9fwXPD03GjtIEvJBDOhN94T5MzbwZSqzFHSQPzg==", + "license": "MIT", + "engines": { + "node": ">= 6.9.x" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "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==", + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "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==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "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==", + "license": "MIT", + "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "license": "(WTFPL OR MIT)" + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "license": "MIT", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/protractor": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-7.0.0.tgz", + "integrity": "sha512-UqkFjivi4GcvUQYzqGYNe0mLzfn5jiLmO8w9nMhQoJRLhy2grJonpga2IWhI6yJO30LibWXJJtA4MOIZD2GgZw==", + "deprecated": "We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular", + "license": "MIT", + "dependencies": { + "@types/q": "^0.0.32", + "@types/selenium-webdriver": "^3.0.0", + "blocking-proxy": "^1.0.0", + "browserstack": "^1.5.1", + "chalk": "^1.1.3", + "glob": "^7.0.3", + "jasmine": "2.8.0", + "jasminewd2": "^2.1.0", + "q": "1.4.1", + "saucelabs": "^1.5.0", + "selenium-webdriver": "3.6.0", + "source-map-support": "~0.4.0", + "webdriver-js-extender": "2.1.0", + "webdriver-manager": "^12.1.7", + "yargs": "^15.3.1" + }, + "bin": { + "protractor": "bin/protractor", + "webdriver-manager": "bin/webdriver-manager" + }, + "engines": { + "node": ">=10.13.x" + } + }, + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha512-/CdEdaw49VZVmyIDGUQKDDT53c7qBkO6g5CefWz91Ae+l4+cRtcDYwMTXh6me4O8TMldeGHG3N2Bl84V78Ywbg==", + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "license": "MIT", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/qs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.5.tgz", + "integrity": "sha512-mzR4sElr1bfCaPJe7m8ilJ6ZXdDaGoObcYR0ZHSsktM/Lt21MVHj5De30GQH2eiZ1qGRTO7LCAzQsUeXTNexWQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/saucelabs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", + "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", + "dependencies": { + "https-proxy-agent": "^2.2.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sax": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "license": "Apache-2.0", + "dependencies": { + "jszip": "^3.1.3", + "rimraf": "^2.5.4", + "tmp": "0.0.30", + "xml2js": "^0.4.17" + }, + "engines": { + "node": ">= 6.9.0" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "license": "MIT", + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha512-HXdTB7lvMwcb55XFfrTM8CPr/IYREk4hVBFaQ4b/6nInrluSL86hfHm7vu0luYKCfyBZp2trCjpc8caC3vVM3w==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" + }, + "node_modules/webdriver-js-extender": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", + "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", + "license": "MIT", + "dependencies": { + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" + }, + "engines": { + "node": ">=6.9.x" + } + }, + "node_modules/webdriver-manager": { + "version": "12.1.9", + "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.9.tgz", + "integrity": "sha512-Yl113uKm8z4m/KMUVWHq1Sjtla2uxEBtx2Ue3AmIlnlPAKloDn/Lvmy6pqWCUersVISpdMeVpAaGbNnvMuT2LQ==", + "license": "MIT", + "dependencies": { + "adm-zip": "^0.5.2", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.87.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" + }, + "bin": { + "webdriver-manager": "bin/webdriver-manager" + }, + "engines": { + "node": ">=6.9.x" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "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/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + } + } +} diff --git a/test-eol-project/node_modules/@types/q/README.md b/test-eol-project/node_modules/@types/q/README.md new file mode 100644 index 00000000..f5803404 --- /dev/null +++ b/test-eol-project/node_modules/@types/q/README.md @@ -0,0 +1,18 @@ +# Installation +> `npm install --save @types/q` + +# Summary +This package contains type definitions for Q (https://github.com/kriskowal/q). + +# Details +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/q + +Additional Details + * Last updated: Wed, 05 Oct 2016 20:53:38 GMT + * File structure: UMD + * Library Dependencies: none + * Module Dependencies: none + * Global values: Q + +# Credits +These definitions were written by Barrie Nemetchek , Andrew Gaspar , John Reilly . diff --git a/test-eol-project/node_modules/@types/q/index.d.ts b/test-eol-project/node_modules/@types/q/index.d.ts new file mode 100644 index 00000000..b14a6831 --- /dev/null +++ b/test-eol-project/node_modules/@types/q/index.d.ts @@ -0,0 +1,360 @@ +// Type definitions for Q +// Project: https://github.com/kriskowal/q +// Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = Q; +export as namespace Q; + +/** + * If value is a Q promise, returns the promise. + * If value is a promise from another library it is coerced into a Q promise (where possible). + */ +declare function Q(promise: Q.IPromise): Q.Promise; +/** + * If value is not a promise, returns a promise that is fulfilled with value. + */ +declare function Q(value: T): Q.Promise; +/** + * Calling with nothing at all creates a void promise + */ +declare function Q(): Q.Promise; + +declare namespace Q { + type IWhenable = IPromise | T; + interface IPromise { + then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable): IPromise; + } + + interface Deferred { + promise: Promise; + resolve(value?: IWhenable): void; + reject(reason: any): void; + notify(value: any): void; + makeNodeResolver(): (reason: any, value: T) => void; + } + + interface Promise { + /** + * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. + + * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. + */ + fin(finallyCallback: () => any): Promise; + /** + * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. + + * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. + */ + finally(finallyCallback: () => any): Promise; + + /** + * The then method from the Promises/A+ specification, with an additional progress handler. + */ + then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable, onProgress?: Function): Promise; + + /** + * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. + * + * This is especially useful in conjunction with all + */ + spread(onFulfill: (...args: any[]) => IWhenable, onReject?: (reason: any) => IWhenable): Promise; + + fail(onRejected: (reason: any) => IWhenable): Promise; + + /** + * A sugar method, equivalent to promise.then(undefined, onRejected). + */ + catch(onRejected: (reason: any) => IWhenable): Promise; + + /** + * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). + */ + progress(onProgress: (progress: any) => any): Promise; + + /** + * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop. + * + * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object. + * + * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn. + * + * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it. + */ + done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; + + /** + * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise. + */ + nodeify(callback: (reason: any, value: any) => void): Promise; + + /** + * Returns a promise to get the named property of an object. Essentially equivalent to + * + * promise.then(function (o) { + * return o[propertyName]; + * }); + */ + get(propertyName: String): Promise; + set(propertyName: String, value: any): Promise; + delete(propertyName: String): Promise; + /** + * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to + * + * promise.then(function (o) { + * return o[methodName].apply(o, args); + * }); + */ + post(methodName: String, args: any[]): Promise; + /** + * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call. + */ + invoke(methodName: String, ...args: any[]): Promise; + fapply(args: any[]): Promise; + fcall(...args: any[]): Promise; + + /** + * Returns a promise for an array of the property names of an object. Essentially equivalent to + * + * promise.then(function (o) { + * return Object.keys(o); + * }); + */ + keys(): Promise; + + /** + * A sugar method, equivalent to promise.then(function () { return value; }). + */ + thenResolve(value: U): Promise; + /** + * A sugar method, equivalent to promise.then(function () { throw reason; }). + */ + thenReject(reason: any): Promise; + + /** + * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler. + */ + tap(onFulfilled: (value: T) => any): Promise; + + timeout(ms: number, message?: string): Promise; + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + delay(ms: number): Promise; + + /** + * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. + */ + isFulfilled(): boolean; + /** + * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. + */ + isRejected(): boolean; + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + isPending(): boolean; + + valueOf(): any; + + /** + * Returns a "state snapshot" object, which will be in one of three forms: + * + * - { state: "pending" } + * - { state: "fulfilled", value: } + * - { state: "rejected", reason: } + */ + inspect(): PromiseState; + } + + interface PromiseState { + /** + * "fulfilled", "rejected", "pending" + */ + state: string; + value?: T; + reason?: any; + } + + // If no value provided, returned promise will be of void type + export function when(): Promise; + + // if no fulfill, reject, or progress provided, returned promise will be of same type + export function when(value: IWhenable): Promise; + + // If a non-promise value is provided, it will not reject or progress + export function when(value: IWhenable, onFulfilled: (val: T) => IWhenable, onRejected?: (reason: any) => IWhenable, onProgress?: (progress: any) => any): Promise; + + /** + * Currently "impossible" (and I use the term loosely) to implement due to TypeScript limitations as it is now. + * See: https://github.com/Microsoft/TypeScript/issues/1784 for discussion on it. + */ + // export function try(method: Function, ...args: any[]): Promise; + + export function fbind(method: (...args: any[]) => IWhenable, ...args: any[]): (...args: any[]) => Promise; + + export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; + + export function send(obj: any, functionName: string, ...args: any[]): Promise; + export function invoke(obj: any, functionName: string, ...args: any[]): Promise; + export function mcall(obj: any, functionName: string, ...args: any[]): Promise; + + export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; + export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise; + export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; + export function nfcall(nodeFunction: Function, ...args: any[]): Promise; + export function nfapply(nodeFunction: Function, args: any[]): Promise; + + export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; + export function npost(nodeModule: any, functionName: string, args: any[]): Promise; + export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; + export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise; + + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E, F]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable]>): Promise<[A, B]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable[]>): Promise; + + /** + * Returns a promise for the first of an array of promises to become settled. + */ + export function race(promises: IWhenable[]): Promise; + + /** + * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. + */ + export function allSettled(promises: IWhenable[]>): Promise[]>; + + export function allResolved(promises: IWhenable[]>): Promise[]>; + + /** + * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. + * This is especially useful in conjunction with all. + */ + export function spread(promises: IWhenable[], onFulfilled: (...args: T[]) => IWhenable, onRejected?: (reason: any) => IWhenable): Promise; + + /** + * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms". + */ + export function timeout(promise: Promise, ms: number, message?: string): Promise; + + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + export function delay(promise: Promise, ms: number): Promise; + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + export function delay(value: T, ms: number): Promise; + /** + * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. + */ + export function delay(ms: number): Promise ; + /** + * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. + */ + export function isFulfilled(promise: Promise): boolean; + /** + * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. + */ + export function isRejected(promise: Promise): boolean; + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + export function isPending(promise: Promise): boolean; + + /** + * Returns a "deferred" object with a: + * promise property + * resolve(value) method + * reject(reason) method + * notify(value) method + * makeNodeResolver() method + */ + export function defer(): Deferred; + + /** + * Returns a promise that is rejected with reason. + */ + export function reject(reason?: any): Promise; + + export function Promise(resolver: (resolve: (val: IWhenable) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; + + /** + * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version also always returns a promise: if func does a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. + * + * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that the function always returns a promise even in the face of unintentional thrown exceptions. + */ + export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; + + /** + * Returns whether the given value is a Q promise. + */ + export function isPromise(object: any): boolean; + /** + * Returns whether the given value is a promise (i.e. it's an object with a then function). + */ + export function isPromiseAlike(object: any): boolean; + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + export function isPending(object: any): boolean; + /** + * If an object is not a promise, it is as "near" as possible. + * If a promise is rejected, it is as "near" as possible too. + * If it’s a fulfilled promise, the fulfillment value is nearer. + * If it’s a deferred promise and the deferred has been resolved, the + * resolution is "nearer". + */ + export function nearer(promise: Promise): T; + + /** + * This is an experimental tool for converting a generator function into a deferred function. This has the potential of reducing nested callbacks in engines that support yield. + */ + export function async(generatorFunction: any): (...args: any[]) => Promise; + export function nextTick(callback: Function): void; + + /** + * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the event loop, usually as a result of done. Can be useful for getting the full stack trace of an error in browsers, which is not usually possible with window.onerror. + */ + export var onerror: (reason: any) => void; + /** + * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack property is inspected in a rejection callback, a long stack trace is produced. + */ + export var longStackSupport: boolean; + + /** + * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). + * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. + * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. + * Calling resolve with a non-promise value causes promise to be fulfilled with that value. + */ + export function resolve(object: IWhenable): Promise; + + /** + * Resets the global "Q" variable to the value it has before Q was loaded. + * This will either be undefined if there was no version or the version of Q which was already loaded before. + * @returns { The last version of Q. } + */ + export function noConflict(): typeof Q; +} diff --git a/test-eol-project/node_modules/@types/q/package.json b/test-eol-project/node_modules/@types/q/package.json new file mode 100644 index 00000000..b5f8915d --- /dev/null +++ b/test-eol-project/node_modules/@types/q/package.json @@ -0,0 +1,17 @@ +{ + "name": "@types/q", + "version": "0.0.32", + "description": "TypeScript definitions for Q", + "license": "MIT", + "author": "Barrie Nemetchek , Andrew Gaspar , John Reilly ", + "main": "", + "repository": { + "type": "git", + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": {}, + "peerDependencies": {}, + "typings": "index.d.ts", + "typesPublisherContentHash": "6597b89d57d9ceec9ef1e6af32e2fd02f4582abaf309f8a76f6746ee1af830d5" +} \ No newline at end of file diff --git a/test-eol-project/node_modules/@types/q/types-metadata.json b/test-eol-project/node_modules/@types/q/types-metadata.json new file mode 100644 index 00000000..de386750 --- /dev/null +++ b/test-eol-project/node_modules/@types/q/types-metadata.json @@ -0,0 +1,23 @@ +{ + "authors": "Barrie Nemetchek , Andrew Gaspar , John Reilly ", + "definitionFilename": "index.d.ts", + "libraryDependencies": [], + "moduleDependencies": [], + "libraryMajorVersion": "0", + "libraryMinorVersion": "0", + "libraryName": "Q", + "typingsPackageName": "q", + "projectName": "https://github.com/kriskowal/q", + "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", + "sourceBranch": "types-2.0", + "kind": "UMD", + "globals": [ + "Q" + ], + "declaredModules": [], + "files": [ + "index.d.ts" + ], + "hasPackageJson": false, + "contentHash": "6597b89d57d9ceec9ef1e6af32e2fd02f4582abaf309f8a76f6746ee1af830d5" +} \ No newline at end of file diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/LICENSE b/test-eol-project/node_modules/@types/selenium-webdriver/LICENSE new file mode 100644 index 00000000..9e841e7a --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + 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/test-eol-project/node_modules/@types/selenium-webdriver/README.md b/test-eol-project/node_modules/@types/selenium-webdriver/README.md new file mode 100644 index 00000000..42a02fac --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/selenium-webdriver` + +# Summary +This package contains type definitions for selenium-webdriver (https://github.com/SeleniumHQ/selenium/tree/master/javascript/node/selenium-webdriver). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver/v3. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 20:08:00 GMT + * Dependencies: none + +# Credits +These definitions were written by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak), [Craig Nishina](https://github.com/cnishina), [Simon Gellis](https://github.com/SupernaviX), [Ben Dixon](https://github.com/bendxn), and [Ziyu](https://github.com/oddui). diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts new file mode 100644 index 00000000..6730a57a --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts @@ -0,0 +1,360 @@ +import * as http from "./http"; +import * as webdriver from "./index"; +import * as remote from "./remote"; + +/** + * Creates a new WebDriver client for Chrome. + */ +export class Driver extends webdriver.WebDriver { + /** + * Creates a new session with the ChromeDriver. + * + * @param {(Capabilities|Options)=} opt_config The configuration options. + * @param {(remote.DriverService|http.Executor)=} opt_serviceExecutor Either + * a DriverService to use for the remote end, or a preconfigured executor + * for an externally managed endpoint. If neither is provided, the + * {@linkplain ##getDefaultService default service} will be used by + * default. + * @param {promise.ControlFlow=} opt_flow The control flow to use, or `null` + * to use the currently active flow. + * @return {!Driver} A new driver instance. + */ + static createSession( + opt_config?: Options | webdriver.CreateSessionCapabilities, + opt_service?: remote.DriverService | http.Executor, + opt_flow?: webdriver.promise.ControlFlow, + ): Driver; +} + +export interface IOptionsValues { + args: string[]; + binary?: string | undefined; + detach: boolean; + extensions: string[]; + localState?: any; + logFile?: string | undefined; + prefs?: any; +} + +export interface IPerfLoggingPrefs { + enableNetwork: boolean; + enablePage: boolean; + enableTimeline: boolean; + tracingCategories: string; + bufferUsageReportingInterval: number; +} + +/** + * Class for managing ChromeDriver specific options. + */ +export class Options { + /** */ + constructor(); + + /** + * Extracts the ChromeDriver specific options from the given capabilities + * object. + * @param {!webdriver.Capabilities} capabilities The capabilities object. + * @return {!Options} The ChromeDriver options. + */ + static fromCapabilities(capabilities: webdriver.Capabilities): Options; + + /** + * Add additional command line arguments to use when launching the Chrome + * browser. Each argument may be specified with or without the '--' prefix + * (e.g. '--foo' and 'foo'). Arguments with an associated value should be + * delimited by an '=': 'foo=bar'. + * @param {...(string|!Array.)} var_args The arguments to add. + * @return {!Options} A self reference. + */ + addArguments(...var_args: string[]): Options; + + /** + * Configures the chromedriver to start Chrome in headless mode. + * + * > __NOTE:__ Resizing the browser window in headless mode is only supported + * > in Chrome 60. Users are encouraged to set an initial window size with + * > the {@link #windowSize windowSize({width, height})} option. + * + * @return {!Options} A self reference. + */ + headless(): Options; + + /** + * List of Chrome command line switches to exclude that ChromeDriver by default + * passes when starting Chrome. Do not prefix switches with '--'. + * + * @param {...(string|!Array)} var_args The switches to exclude. + * @return {!Options} A self reference. + */ + excludeSwitches(...var_args: string[]): Options; + + /** + * Add additional extensions to install when launching Chrome. Each extension + * should be specified as the path to the packed CRX file, or a Buffer for an + * extension. + * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The + * extensions to add. + * @return {!Options} A self reference. + */ + addExtensions(...var_args: any[]): Options; + + /** + * Sets the path to the Chrome binary to use. On Mac OS X, this path should + * reference the actual Chrome executable, not just the application binary + * (e.g. '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'). + * + * The binary path be absolute or relative to the chromedriver server + * executable, but it must exist on the machine that will launch Chrome. + * + * @param {string} path The path to the Chrome binary to use. + * @return {!Options} A self reference. + */ + setChromeBinaryPath(path: string): Options; + + /** + * Sets whether to leave the started Chrome browser running if the controlling + * ChromeDriver service is killed before {@link webdriver.WebDriver#quit()} is + * called. + * @param {boolean} detach Whether to leave the browser running if the + * chromedriver service is killed before the session. + * @return {!Options} A self reference. + */ + detachDriver(detach: boolean): Options; + + /** + * Sets the user preferences for Chrome's user profile. See the 'Preferences' + * file in Chrome's user data directory for examples. + * @param {!Object} prefs Dictionary of user preferences to use. + * @return {!Options} A self reference. + */ + setUserPreferences(prefs: any): Options; + + /** + * Sets the logging preferences for the new session. + * @param {!webdriver.logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; + + /** + * Sets the performance logging preferences. Options include: + * + * - `enableNetwork`: Whether or not to collect events from Network domain. + * - `enablePage`: Whether or not to collect events from Page domain. + * - `enableTimeline`: Whether or not to collect events from Timeline domain. + * Note: when tracing is enabled, Timeline domain is implicitly disabled, + * unless `enableTimeline` is explicitly set to true. + * - `tracingCategories`: A comma-separated string of Chrome tracing categories + * for which trace events should be collected. An unspecified or empty + * string disables tracing. + * - `bufferUsageReportingInterval`: The requested number of milliseconds + * between DevTools trace buffer usage events. For example, if 1000, then + * once per second, DevTools will report how full the trace buffer is. If a + * report indicates the buffer usage is 100%, a warning will be issued. + * + * @param {{enableNetwork: boolean, + * enablePage: boolean, + * enableTimeline: boolean, + * tracingCategories: string, + * bufferUsageReportingInterval: number}} prefs The performance + * logging preferences. + * @return {!Options} A self reference. + */ + setPerfLoggingPrefs(prefs: IPerfLoggingPrefs): Options; + + /** + * Sets preferences for the 'Local State' file in Chrome's user data + * directory. + * @param {!Object} state Dictionary of local state preferences. + * @return {!Options} A self reference. + */ + setLocalState(state: any): Options; + + /** + * Sets the name of the activity hosting a Chrome-based Android WebView. This + * option must be set to connect to an [Android WebView]( + * https://sites.google.com/a/chromium.org/chromedriver/getting-started/getting-started---android) + * + * @param {string} name The activity name. + * @return {!Options} A self reference. + */ + androidActivity(name: string): Options; + + /** + * Sets the device serial number to connect to via ADB. If not specified, the + * ChromeDriver will select an unused device at random. An error will be + * returned if all devices already have active sessions. + * + * @param {string} serial The device serial number to connect to. + * @return {!Options} A self reference. + */ + androidDeviceSerial(serial: string): Options; + + /** + * Configures the ChromeDriver to launch Chrome on Android via adb. This + * function is shorthand for + * {@link #androidPackage options.androidPackage('com.android.chrome')}. + * @return {!Options} A self reference. + */ + androidChrome(): Options; + + /** + * Sets the package name of the Chrome or WebView app. + * + * @param {?string} pkg The package to connect to, or `null` to disable Android + * and switch back to using desktop Chrome. + * @return {!Options} A self reference. + */ + androidPackage(pkg: string): Options; + + /** + * Sets the process name of the Activity hosting the WebView (as given by `ps`). + * If not specified, the process name is assumed to be the same as + * {@link #androidPackage}. + * + * @param {string} processName The main activity name. + * @return {!Options} A self reference. + */ + androidProcess(processName: string): Options; + + /** + * Sets whether to connect to an already-running instead of the specified + * {@linkplain #androidProcess app} instead of launching the app with a clean + * data directory. + * + * @param {boolean} useRunning Whether to connect to a running instance. + * @return {!Options} A self reference. + */ + androidUseRunningApp(useRunning: boolean): Options; + + /** + * Sets the path to Chrome's log file. This path should exist on the machine + * that will launch Chrome. + * @param {string} path Path to the log file to use. + * @return {!Options} A self reference. + */ + setChromeLogFile(path: string): Options; + + /** + * Sets the directory to store Chrome minidumps in. This option is only + * supported when ChromeDriver is running on Linux. + * @param {string} path The directory path. + * @return {!Options} A self reference. + */ + setChromeMinidumpPath(path: string): Options; + + /** + * Configures Chrome to emulate a mobile device. For more information, refer + * to the ChromeDriver project page on [mobile emulation][em]. Configuration + * options include: + * + * - `deviceName`: The name of a pre-configured [emulated device][devem] + * - `width`: screen width, in pixels + * - `height`: screen height, in pixels + * - `pixelRatio`: screen pixel ratio + * + * __Example 1: Using a Pre-configured Device__ + * + * let options = new chrome.Options().setMobileEmulation( + * {deviceName: 'Google Nexus 5'}); + * + * let driver = new chrome.Driver(options); + * + * __Example 2: Using Custom Screen Configuration__ + * + * let options = new chrome.Options().setMobileEmulation({ + * width: 360, + * height: 640, + * pixelRatio: 3.0 + * }); + * + * let driver = new chrome.Driver(options); + * + * [em]: https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation + * [devem]: https://developer.chrome.com/devtools/docs/device-mode + * + * @param {?({deviceName: string}| + * {width: number, height: number, pixelRatio: number})} config The + * mobile emulation configuration, or `null` to disable emulation. + * @return {!Options} A self reference. + */ + setMobileEmulation(config: any): Options; + + /** + * Sets the proxy settings for the new session. + * @param {webdriver.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + /** + * Converts this options instance to a {@link webdriver.Capabilities} object. + * @param {webdriver.Capabilities=} opt_capabilities The capabilities to merge + * these options into, if any. + * @return {!webdriver.Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; +} + +/** + * Creates {@link remote.DriverService} instances that manage a ChromeDriver + * server. + */ +export class ServiceBuilder extends remote.DriverService.Builder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the chromedriver on the current + * PATH. + * @throws {Error} If provided executable does not exist, or the chromedriver + * cannot be found on the PATH. + */ + constructor(opt_exe?: string); + + /** + * Sets which port adb is listening to. _The ChromeDriver will connect to adb + * if an {@linkplain Options#androidPackage Android session} is requested, but + * adb **must** be started beforehand._ + * + * @param {number} port Which port adb is running on. + * @return {!ServiceBuilder} A self reference. + */ + setAdbPort(port: number): this; + + /** + * Sets the path of the log file the driver should log to. If a log file is + * not specified, the driver will log to stderr. + * @param {string} path Path of the log file to use. + * @return {!ServiceBuilder} A self reference. + */ + loggingTo(path: string): this; + + /** + * Enables verbose logging. + * @return {!ServiceBuilder} A self reference. + */ + enableVerboseLogging(): this; + + /** + * Sets the number of threads the driver should use to manage HTTP requests. + * By default, the driver will use 4 threads. + * @param {number} n The number of threads to use. + * @return {!ServiceBuilder} A self reference. + */ + setNumHttpThreads(n: number): this; +} + +/** + * Returns the default ChromeDriver service. If such a service has not been + * configured, one will be constructed using the default configuration for + * a ChromeDriver executable found on the system PATH. + * @return {!remote.DriverService} The default ChromeDriver service. + */ +export function getDefaultService(): remote.DriverService; + +/** + * Sets the default service to use for new ChromeDriver instances. + * @param {!remote.DriverService} service The service to use. + * @throws {Error} If the default service is currently running. + */ +export function setDefaultService(service: remote.DriverService): void; diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts new file mode 100644 index 00000000..b2c41ba3 --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts @@ -0,0 +1,96 @@ +import * as webdriver from "./index"; +import * as remote from "./remote"; + +export class Driver extends webdriver.WebDriver { + /** + * Creates a new browser session for Microsoft's Edge browser. + * + * @param {(capabilities.Capabilities|Options)=} opt_config The configuration + * options. + * @param {remote.DriverService=} opt_service The session to use; will use + * the {@linkplain #getDefaultService default service} by default. + * @param {promise.ControlFlow=} opt_flow The control flow to use, or + * {@code null} to use the currently active flow. + * @return {!Driver} A new driver instance. + */ + static createSession( + opt_config?: webdriver.CreateSessionCapabilities, + opt_service?: remote.DriverService, + opt_flow?: webdriver.promise.ControlFlow, + ): Driver; + + /** + * This function is a no-op as file detectors are not supported by this + * implementation. + * @override + */ + setFileDetector(): void; +} + +/** + * Class for managing MicrosoftEdgeDriver specific options. + */ +export class Options { + /** + * Extracts the MicrosoftEdgeDriver specific options from the given + * capabilities object. + * @param {!capabilities.Capabilities} caps The capabilities object. + * @return {!Options} The MicrosoftEdgeDriver options. + */ + static fromCapabilities(cap: webdriver.Capabilities): Options; + + /** + * Sets the proxy settings for the new session. + * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + /** + * Sets the page load strategy for Edge. + * Supported values are 'normal', 'eager', and 'none'; + * + * @param {string} pageLoadStrategy The page load strategy to use. + * @return {!Options} A self reference. + */ + setPageLoadStrategy(pageLoadStrategy: string): Options; + + /** + * Converts this options instance to a {@link capabilities.Capabilities} + * object. + * @param {capabilities.Capabilities=} opt_capabilities The capabilities to + * merge these options into, if any. + * @return {!capabilities.Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; +} + +/** + * Creates {@link remote.DriverService} instances that manage a + * MicrosoftEdgeDriver server in a child process. + */ +export class ServiceBuilder extends remote.DriverService.Builder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the MicrosoftEdgeDriver on the current + * PATH. + * @throws {Error} If provided executable does not exist, or the + * MicrosoftEdgeDriver cannot be found on the PATH. + */ + constructor(opt_exe?: string); +} + +/** + * Returns the default MicrosoftEdgeDriver service. If such a service has + * not been configured, one will be constructed using the default configuration + * for an MicrosoftEdgeDriver executable found on the system PATH. + * @return {!remote.DriverService} The default MicrosoftEdgeDriver service. + */ +export function getDefaultService(): remote.DriverService; + +/** + * Sets the default service to use for new MicrosoftEdgeDriver instances. + * @param {!remote.DriverService} service The service to use. + * @throws {Error} If the default service is currently running. + */ +export function setDefaultService(service: remote.DriverService): void; diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts new file mode 100644 index 00000000..7004d39c --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts @@ -0,0 +1,337 @@ +import * as http from "./http"; +import * as webdriver from "./index"; +import * as remote from "./remote"; + +/** + * Manages a Firefox subprocess configured for use with WebDriver. + */ +export class Binary { + /** + * @param {string=} opt_exe Path to the Firefox binary to use. If not + * specified, will attempt to locate Firefox on the current system. + */ + constructor(opt_exe?: string); + + /** + * Add arguments to the command line used to start Firefox. + * @param {...(string|!Array.)} var_args Either the arguments to add as + * varargs, or the arguments as an array. + */ + addArguments(...var_args: string[]): void; + + /** + * Launches Firefox and eturns a promise that will be fulfilled when the process + * terminates. + * @param {string} profile Path to the profile directory to use. + * @return {!promise.Promise.} A promise for the process result. + * @throws {Error} If this instance has already been started. + */ + launch(profile: string): webdriver.promise.Promise; + + /** + * Kills the managed Firefox process. + * @return {!promise.Promise} A promise for when the process has terminated. + */ + kill(): webdriver.promise.Promise; +} + +/** + * Models a Firefox proifle directory for use with the FirefoxDriver. The + * {@code Proifle} directory uses an in-memory model until {@link #writeToDisk} + * is called. + */ +export class Profile { + /** + * @param {string=} opt_dir Path to an existing Firefox profile directory to + * use a template for this profile. If not specified, a blank profile will + * be used. + */ + constructor(opt_dir?: string); + + /** + * Registers an extension to be included with this profile. + * @param {string} extension Path to the extension to include, as either an + * unpacked extension directory or the path to a xpi file. + */ + addExtension(extension: string): void; + + /** + * Sets a desired preference for this profile. + * @param {string} key The preference key. + * @param {(string|number|boolean)} value The preference value. + * @throws {Error} If attempting to set a frozen preference. + */ + setPreference(key: string, value: string): void; + setPreference(key: string, value: number): void; + setPreference(key: string, value: boolean): void; + + /** + * Returns the currently configured value of a profile preference. This does + * not include any defaults defined in the profile's template directory user.js + * file (if a template were specified on construction). + * @param {string} key The desired preference. + * @return {(string|number|boolean|undefined)} The current value of the + * requested preference. + */ + getPreference(key: string): any; + + /** + * @return {number} The port this profile is currently configured to use, or + * 0 if the port will be selected at random when the profile is written + * to disk. + */ + getPort(): number; + + /** + * Sets the port to use for the WebDriver extension loaded by this profile. + * @param {number} port The desired port, or 0 to use any free port. + */ + setPort(port: number): void; + + /** + * @return {boolean} Whether the FirefoxDriver is configured to automatically + * accept untrusted SSL certificates. + */ + acceptUntrustedCerts(): boolean; + + /** + * Sets whether the FirefoxDriver should automatically accept untrusted SSL + * certificates. + * @param {boolean} value . + */ + setAcceptUntrustedCerts(value: boolean): void; + + /** + * Sets whether to assume untrusted certificates come from untrusted issuers. + * @param {boolean} value . + */ + setAssumeUntrustedCertIssuer(value: boolean): void; + + /** + * @return {boolean} Whether to assume untrusted certs come from untrusted + * issuers. + */ + assumeUntrustedCertIssuer(): boolean; + + /** + * Sets whether to use native events with this profile. + * @param {boolean} enabled . + */ + setNativeEventsEnabled(enabled: boolean): void; + + /** + * Returns whether native events are enabled in this profile. + * @return {boolean} . + */ + nativeEventsEnabled(): boolean; + + /** + * Writes this profile to disk. + * @param {boolean=} opt_excludeWebDriverExt Whether to exclude the WebDriver + * extension from the generated profile. Used to reduce the size of an + * {@link #encode() encoded profile} since the server will always install + * the extension itself. + * @return {!promise.Promise.} A promise for the path to the new + * profile directory. + */ + writeToDisk(opt_excludeWebDriverExt?: boolean): webdriver.promise.Promise; + + /** + * Encodes this profile as a zipped, base64 encoded directory. + * @return {!promise.Promise.} A promise for the encoded profile. + */ + encode(): webdriver.promise.Promise; +} + +/** + * Configuration options for the FirefoxDriver. + */ +export class Options { + /** + * Specify additional command line arguments that should be used when starting + * the Firefox browser. + * + * @param {...(string|!Array)} args The arguments to include. + * @return {!Options} A self reference. + */ + addArguments(...args: string[]): Options; + + /** + * Sets the browser to be in headless mode. + * + * @return {!Options} A self reference. + */ + headless(): Options; + + /** + * Sets the initial window size when running in + * {@linkplain #headless headless} mode. + * + * @param {{width: number, height: number}} size The desired window size. + * @return {!Options} A self reference. + * @throws {TypeError} if width or height is unspecified, not a number, or + * less than or equal to 0. + */ + windowSize(size: { width: number; height: number }): Options; + + /** + * Add extensions that should be installed when starting Firefox. + * + * @param {...string} paths The paths to the extension XPI files to install. + * @return {!Options} A self reference. + */ + addExtensions(...paths: string[]): Options; + + /** + * @param {string} key the preference key. + * @param {(string|number|boolean)} value the preference value. + * @return {!Options} A self reference. + * @throws {TypeError} if either the key or value has an invalid type. + */ + setPreference(key: string, value: string | number | boolean): Options; + + /** + * Sets the profile to use. The profile may be specified as a + * {@link Profile} object or as the path to an existing Firefox profile to use + * as a template. + * + * @param {(string|!Profile)} profile The profile to use. + * @return {!Options} A self reference. + */ + setProfile(profile: string | any): Options; + + /** + * Sets the binary to use. The binary may be specified as the path to a Firefox + * executable, or as a {@link Binary} object. + * + * @param {(string|!Binary)} binary The binary to use. + * @return {!Options} A self reference. + */ + setBinary(binary: string | any): Options; + + /** + * Sets the logging preferences for the new session. + * @param {logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPreferences(prefs: webdriver.logging.Preferences): Options; + + /** + * Sets the proxy to use. + * + * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + /** + * Sets whether to use Mozilla's geckodriver to drive the browser. This option + * is enabled by default and required for Firefox 47+. + * + * @param {boolean} enable Whether to enable the geckodriver. + * @see https://github.com/mozilla/geckodriver + */ + useGeckoDriver(enable: boolean): Options; + + /** + * Converts these options to a {@link capabilities.Capabilities} instance. + * + * @return {!capabilities.Capabilities} A new capabilities object. + */ + toCapabilities(): webdriver.Capabilities; +} + +/** + * @return {string} . + * @throws {Error} + */ +export function findWires(): string; + +/** + * @param {(string|!Binary)} binary . + * @return {!remote.DriverService} . + */ +export function createWiresService(binary: string | any): remote.DriverService; + +/** + * @param {(Profile|string)} profile The profile to prepare. + * @param {number} port The port the FirefoxDriver should listen on. + * @return {!Promise} a promise for the path to the profile directory. + */ +export function prepareProfile(profile: string | any, port: number): any; + +/** + * A WebDriver client for Firefox. + */ +export class Driver extends webdriver.WebDriver { + /** + * Creates a new Firefox session. + * + * @param {(Options|capabilities.Capabilities|Object)=} opt_config The + * configuration options for this driver, specified as either an + * {@link Options} or {@link capabilities.Capabilities}, or as a raw hash + * object. + * @param {(http.Executor|remote.DriverService)=} opt_executor Either a + * pre-configured command executor to use for communicating with an + * externally managed remote end (which is assumed to already be running), + * or the `DriverService` to use to start the geckodriver in a child + * process. + * + * If an executor is provided, care should e taken not to use reuse it with + * other clients as its internal command mappings will be updated to support + * Firefox-specific commands. + * + * _This parameter may only be used with Mozilla's GeckoDriver._ + * + * @param {promise.ControlFlow=} opt_flow The flow to + * schedule commands through. Defaults to the active flow object. + * @throws {Error} If a custom command executor is provided and the driver is + * configured to use the legacy FirefoxDriver from the Selenium project. + * @return {!Driver} A new driver instance. + */ + static createSession( + opt_config?: Options | webdriver.Capabilities, + opt_executor?: http.Executor | remote.DriverService, + opt_flow?: webdriver.promise.ControlFlow, + ): Driver; + + /** + * This function is a no-op as file detectors are not supported by this + * implementation. + * @override + */ + setFileDetector(): void; +} + +/** + * Creates {@link selenium-webdriver/remote.DriverService} instances that manage + * a [geckodriver](https://github.com/mozilla/geckodriver) server in a child + * process. + */ +export class ServiceBuilder extends remote.DriverService.Builder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the geckodriver on the system PATH. + */ + constructor(opt_exe?: string); + + /** + * Enables verbose logging. + * + * @param {boolean=} opt_trace Whether to enable trace-level logging. By + * default, only debug logging is enabled. + * @return {!ServiceBuilder} A self reference. + */ + enableVerboseLogging(opt_trace?: boolean): this; + + /** + * Sets the path to the executable Firefox binary that the geckodriver should + * use. If this method is not called, this builder will attempt to locate + * Firefox in the default installation location for the current platform. + * + * @param {(string|!Binary)} binary Path to the executable Firefox binary to use. + * @return {!ServiceBuilder} A self reference. + * @see Binary#locate() + */ + setFirefoxBinary(binary: string | Binary): this; +} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts new file mode 100644 index 00000000..4fce3f6b --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts @@ -0,0 +1,159 @@ +import * as webdriver from "./index"; + +/** + * Converts a headers map to a HTTP header block string. + * @param {!Map} headers The map to convert. + * @return {string} The headers as a string. + */ +export function headersToString(headers: any): string; + +/** + * Represents a HTTP request message. This class is a 'partial' request and only + * defines the path on the server to send a request to. It is each client's + * responsibility to build the full URL for the final request. + * @final + */ +export class Request { + /** + * @param {string} method The HTTP method to use for the request. + * @param {string} path The path on the server to send the request to. + * @param {Object=} opt_data This request's non-serialized JSON payload data. + */ + constructor(method: string, path: string, opt_data?: Object); + + headers: Map; + method: string; + path: string; + data: Object; + + /** @override */ + toString(): string; +} + +/** + * Represents a HTTP response message. + * @final + */ +export class Response { + /** + * @param {number} status The response code. + * @param {!Object} headers The response headers. All header names + * will be converted to lowercase strings for consistent lookups. + * @param {string} body The response body. + */ + constructor(status: number, headers: Object, body: string); + + status: number; + body: string; + headers: Map; + + /** @override */ + toString(): string; +} + +export function post(path: string): any; +export function del(path: string): any; +export function get(path: string): any; +export function resource(method: string, path: string): any; + +/** + * A basic HTTP client used to send messages to a remote end. + */ +export class HttpClient { + /** + * @param {string} serverUrl URL for the WebDriver server to send commands to. + * @param {http.Agent=} opt_agent The agent to use for each request. + * Defaults to `http.globalAgent`. + * @param {?string=} opt_proxy The proxy to use for the connection to the + * server. Default is to use no proxy. + */ + constructor(serverUrl: string, opt_agent?: any, opt_proxy?: string); + + /** + * Sends a request to the server. The client will automatically follow any + * redirects returned by the server, fulfilling the returned promise with the + * final response. + * + * @param {!HttpRequest} httpRequest The request to send. + * @return {!promise.Promise} A promise that will be fulfilled + * with the server's response. + */ + send(httpRequest: Request): webdriver.promise.Promise; +} + +/** + * Sends a single HTTP request. + * @param {!Object} options The request options. + * @param {function(!HttpResponse)} onOk The function to call if the + * request succeeds. + * @param {function(!Error)} onError The function to call if the request fails. + * @param {?string=} opt_data The data to send with the request. + * @param {?string=} opt_proxy The proxy server to use for the request. + */ +export function sendRequest(options: Object, onOk: any, onError: any, opt_data?: string, opt_proxy?: string): any; + +/** + * A command executor that communicates with the server using HTTP + JSON. + * + * By default, each instance of this class will use the legacy wire protocol + * from [Selenium project][json]. The executor will automatically switch to the + * [W3C wire protocol][w3c] if the remote end returns a compliant response to + * a new session command. + * + * [json]: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol + * [w3c]: https://w3c.github.io/webdriver/webdriver-spec.html + */ +export class Executor { + /** + * @param {!(HttpClient|IThenable)} client The client to use for sending + * requests to the server, or a promise-like object that will resolve to + * to the client. + */ + constructor(client: HttpClient | webdriver.promise.IThenable); + + /** + * Defines a new command for use with this executor. When a command is sent, + * the {@code path} will be preprocessed using the command's parameters; any + * path segments prefixed with ':' will be replaced by the parameter of the + * same name. For example, given '/person/:name' and the parameters + * '{name: 'Bob'}', the final command path will be '/person/Bob'. + * + * @param {string} name The command name. + * @param {string} method The HTTP method to use when sending this command. + * @param {string} path The path to send the command to, relative to + * the WebDriver server's command root and of the form + * '/path/:variable/segment'. + */ + defineCommand(name: string, method: string, path: string): void; + + /** @override */ + execute(command: any): any; +} + +/** + * @param {string} str . + * @return {?} . + */ +export function tryParse(str: string): any; + +/** + * Callback used to parse {@link HttpResponse} objects from a + * {@link HttpClient}. + * @param {!HttpResponse} httpResponse The HTTP response to parse. + * @param {boolean} w3c Whether the response should be processed using the + * W3C wire protocol. + * @return {{value: ?}} The parsed response. + * @throws {WebDriverError} If the HTTP response is an error. + */ +export function parseHttpResponse(httpResponse: Response, w3c: boolean): any; + +/** + * Builds a fully qualified path using the given set of command parameters. Each + * path segment prefixed with ':' will be replaced by the value of the + * corresponding parameter. All parameters spliced into the path will be + * removed from the parameter map. + * @param {string} path The original resource path. + * @param {!Object<*>} parameters The parameters object to splice into the path. + * @return {string} The modified path. + */ +export function buildPath(path: string, parameters: Object): string; diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts new file mode 100644 index 00000000..93673c68 --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts @@ -0,0 +1,211 @@ +import * as webdriver from "./index"; + +/** + * A WebDriver client for Microsoft's Internet Explorer. + */ +export class Driver extends webdriver.WebDriver { + /** + * Creates a new session for Microsoft's Internet Explorer. + * + * @param {(capabilities.Capabilities|Options)=} opt_config The configuration + * options. + * @param {promise.ControlFlow=} opt_flow The control flow to use, + * or {@code null} to use the currently active flow. + * @return {!Driver} A new driver instance. + */ + static createSession( + opt_config?: webdriver.Capabilities | Options, + opt_flow?: webdriver.promise.ControlFlow, + ): Driver; + + /** + * This function is a no-op as file detectors are not supported by this + * implementation. + * @override + */ + setFileDetector(): void; +} + +/** + * Class for managing IEDriver specific options. + */ +export class Options { + constructor(); + + /** + * Extracts the IEDriver specific options from the given capabilities + * object. + * @param {!capabilities.Capabilities} caps The capabilities object. + * @return {!Options} The IEDriver options. + */ + static fromCapabilities(caps: webdriver.Capabilities): Options; + + /** + * Whether to disable the protected mode settings check when the session is + * created. Disbling this setting may lead to significant instability as the + * browser may become unresponsive/hang. Only 'best effort' support is provided + * when using this capability. + * + * For more information, refer to the IEDriver's + * [required system configuration](http://goo.gl/eH0Yi3). + * + * @param {boolean} ignoreSettings Whether to ignore protected mode settings. + * @return {!Options} A self reference. + */ + introduceFlakinessByIgnoringProtectedModeSettings(ignoreSettings: boolean): Options; + + /** + * Indicates whether to skip the check that the browser's zoom level is set to + * 100%. + * + * @param {boolean} ignore Whether to ignore the browser's zoom level settings. + * @return {!Options} A self reference. + */ + ignoreZoomSetting(ignore: boolean): Options; + + /** + * Sets the initial URL loaded when IE starts. This is intended to be used with + * {@link #ignoreProtectedModeSettings} to allow the user to initialize IE in + * the proper Protected Mode zone. Setting this option may cause browser + * instability or flaky and unresponsive code. Only 'best effort' support is + * provided when using this option. + * + * @param {string} url The initial browser URL. + * @return {!Options} A self reference. + */ + initialBrowserUrl(url: string): Options; + + /** + * Configures whether to enable persistent mouse hovering (true by default). + * Persistent hovering is achieved by continuously firing mouse over events at + * the last location the mouse cursor has been moved to. + * + * @param {boolean} enable Whether to enable persistent hovering. + * @return {!Options} A self reference. + */ + enablePersistentHover(enable: boolean): Options; + + /** + * Configures whether the driver should attempt to remove obsolete + * {@linkplain webdriver.WebElement WebElements} from its internal cache on + * page navigation (true by default). Disabling this option will cause the + * driver to run with a larger memory footprint. + * + * @param {boolean} enable Whether to enable element reference cleanup. + * @return {!Options} A self reference. + */ + enableElementCacheCleanup(enable: boolean): Options; + + /** + * Configures whether to require the IE window to have input focus before + * performing any user interactions (i.e. mouse or keyboard events). This + * option is disabled by default, but delivers much more accurate interaction + * events when enabled. + * + * @param {boolean} require Whether to require window focus. + * @return {!Options} A self reference. + */ + requireWindowFocus(require: boolean): Options; + + /** + * Configures the timeout, in milliseconds, that the driver will attempt to + * located and attach to a newly opened instance of Internet Explorer. The + * default is zero, which indicates waiting indefinitely. + * + * @param {number} timeout How long to wait for IE. + * @return {!Options} A self reference. + */ + browserAttachTimeout(timeout: number): Options; + + /** + * Configures whether to launch Internet Explorer using the CreateProcess API. + * If this option is not specified, IE is launched using IELaunchURL, if + * available. For IE 8 and above, this option requires the TabProcGrowth + * registry value to be set to 0. + * + * @param {boolean} force Whether to use the CreateProcess API. + * @return {!Options} A self reference. + */ + forceCreateProcessApi(force: boolean): Options; + + /** + * Specifies command-line switches to use when launching Internet Explorer. + * This is only valid when used with {@link #forceCreateProcessApi}. + * + * @param {...(string|!Array.)} var_args The arguments to add. + * @return {!Options} A self reference. + */ + addArguments(...var_args: string[]): Options; + + /** + * Configures whether proxies should be configured on a per-process basis. If + * not set, setting a {@linkplain #setProxy proxy} will configure the system + * proxy. The default behavior is to use the system proxy. + * + * @param {boolean} enable Whether to enable per-process proxy settings. + * @return {!Options} A self reference. + */ + usePerProcessProxy(enable: boolean): Options; + + /** + * Configures whether to clear the cache, cookies, history, and saved form data + * before starting the browser. _Using this capability will clear session data + * for all running instances of Internet Explorer, including those started + * manually._ + * + * @param {boolean} cleanSession Whether to clear all session data on startup. + * @return {!Options} A self reference. + */ + ensureCleanSession(cleanSession: boolean): Options; + + /** + * Sets the path to the log file the driver should log to. + * @param {string} file The log file path. + * @return {!Options} A self reference. + */ + setLogFile(file: string): Options; + + /** + * Sets the IEDriverServer's logging {@linkplain Level level}. + * @param {Level} level The logging level. + * @return {!Options} A self reference. + */ + setLogLevel(level: webdriver.logging.Level): Options; + + /** + * Sets the IP address of the driver's host adapter. + * @param {string} host The IP address to use. + * @return {!Options} A self reference. + */ + setHost(host: string): Options; + + /** + * Sets the path of the temporary data directory to use. + * @param {string} path The log file path. + * @return {!Options} A self reference. + */ + setExtractPath(path: string): Options; + + /** + * Sets whether the driver should start in silent mode. + * @param {boolean} silent Whether to run in silent mode. + * @return {!Options} A self reference. + */ + silent(silent: boolean): Options; + + /** + * Sets the proxy settings for the new session. + * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + /** + * Converts this options instance to a {@link capabilities.Capabilities} + * object. + * @param {capabilities.Capabilities=} opt_capabilities The capabilities to + * merge these options into, if any. + * @return {!capabilities.Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; +} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts new file mode 100644 index 00000000..5f53b214 --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts @@ -0,0 +1,4775 @@ +import * as chrome from "./chrome"; +import * as edge from "./edge"; +import * as firefox from "./firefox"; +import * as ie from "./ie"; +import * as opera from "./opera"; +import * as safari from "./safari"; + +export namespace error { + class IError extends Error { + constructor(opt_error?: string); + } + + /** + * The base WebDriver error type. This error type is only used directly when a + * more appropriate category is not defined for the offending error. + */ + class WebDriverError extends IError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An attempt was made to select an element that cannot be selected. + */ + class ElementNotSelectableError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An element command could not be completed because the element is not visible + * on the page. + */ + class ElementNotVisibleError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * The arguments passed to a command are either invalid or malformed. + */ + class InvalidArgumentError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An illegal attempt was made to set a cookie under a different domain than + * the current page. + */ + class InvalidCookieDomainError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * The coordinates provided to an interactions operation are invalid. + */ + class InvalidElementCoordinatesError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An element command could not be completed because the element is in an + * invalid state, e.g. attempting to click an element that is no longer attached + * to the document. + */ + class InvalidElementStateError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * Argument was an invalid selector. + */ + class InvalidSelectorError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * Occurs when a command is directed to a session that does not exist. + */ + class NoSuchSessionError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An error occurred while executing JavaScript supplied by the user. + */ + class JavascriptError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * The target for mouse interaction is not in the browser’s viewport and cannot + * be brought into that viewport. + */ + class MoveTargetOutOfBoundsError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An attempt was made to operate on a modal dialog when one was not open. + */ + class NoSuchAlertError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An element could not be located on the page using the given search + * parameters. + */ + class NoSuchElementError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A request to switch to a frame could not be satisfied because the frame + * could not be found. + */ + class NoSuchFrameError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A request to switch to a window could not be satisfied because the window + * could not be found. + */ + class NoSuchWindowError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A script did not complete before its timeout expired. + */ + class ScriptTimeoutError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A new session could not be created. + */ + class SessionNotCreatedError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An element command failed because the referenced element is no longer + * attached to the DOM. + */ + class StaleElementReferenceError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * An operation did not completErrorCodee before its timeout expired. + */ + class TimeoutError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A request to set a cookie’s value could not be satisfied. + */ + class UnableToSetCookieError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A screen capture operation was not possible. + */ + class UnableToCaptureScreenError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * A modal dialog was open, blocking this operation. + */ + class UnexpectedAlertOpenError extends WebDriverError { + /** + * @param {string=} opt_error the error message, if any. + * @param {string=} opt_text the text of the open dialog, if available. + */ + constructor(opt_error?: string, opt_text?: string); + + /** + * @return {(string|undefined)} The text displayed with the unhandled alert, + * if available. + */ + getAlertText(): string; + } + + /** + * A command could not be executed because the remote end is not aware of it. + */ + class UnknownCommandError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * The requested command matched a known URL but did not match an method for + * that URL. + */ + class UnknownMethodError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } + + /** + * Reports an unsupport operation. + */ + class UnsupportedOperationError extends WebDriverError { + /** @param {string=} opt_error the error message, if any. */ + constructor(opt_error?: string); + } +} + +export namespace logging { + /** + * A hash describing log preferences. + */ + class Preferences { + setLevel(type: string, level: Level | string | number): void; + toJSON(): { [key: string]: string }; + } + + interface IType { + /** Logs originating from the browser. */ + BROWSER: string; + /** Logs from a WebDriver client. */ + CLIENT: string; + /** Logs from a WebDriver implementation. */ + DRIVER: string; + /** Logs related to performance. */ + PERFORMANCE: string; + /** Logs from the remote server. */ + SERVER: string; + } + + /** + * Common log types. + */ + const Type: IType; + + /** + * Defines a message level that may be used to control logging output. + * + * @final + */ + class Level { + name_: string; + value_: number; + /** + * @param {string} name the level's name. + * @param {number} level the level's numeric value. + */ + constructor(name: string, level: number); + + /** @override */ + toString(): string; + + /** This logger's name. */ + name: string; + + /** The numeric log level. */ + value: number; + + /** + * Indicates no log messages should be recorded. + * @constant + */ + static OFF: Level; + /** + * Log messages with a level of `1000` or higher. + * @constant + */ + static SEVERE: Level; + /** + * Log messages with a level of `900` or higher. + * @constant + */ + static WARNING: Level; + /** + * Log messages with a level of `800` or higher. + * @constant + */ + static INFO: Level; + /** + * Log messages with a level of `700` or higher. + * @constant + */ + static DEBUG: Level; + /** + * Log messages with a level of `500` or higher. + * @constant + */ + static FINE: Level; + /** + * Log messages with a level of `400` or higher. + * @constant + */ + static FINER: Level; + /** + * Log messages with a level of `300` or higher. + * @constant + */ + static FINEST: Level; + /** + * Indicates all log messages should be recorded. + * @constant + */ + static ALL: Level; + } + + /** + * Converts a level name or value to a {@link logging.Level} value. + * If the name/value is not recognized, {@link logging.Level.ALL} + * will be returned. + * @param {(number|string)} nameOrValue The log level name, or value, to + * convert . + * @return {!logging.Level} The converted level. + */ + function getLevel(nameOrValue: string | number): Level; + + interface IEntryJSON { + level: string; + message: string; + timestamp: number; + type: string; + } + + /** + * A single log entry. + */ + class Entry { + /** + * @param {(!logging.Level|string)} level The entry level. + * @param {string} message The log message. + * @param {number=} opt_timestamp The time this entry was generated, in + * milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the + * current time will be used. + * @param {string=} opt_type The log type, if known. + */ + constructor(level: Level | string | number, message: string, opt_timestamp?: number, opt_type?: string | IType); + + level: Level; + + message: string; + + timestamp: number; + + type: string; + + /** + * @return {{level: string, message: string, timestamp: number, + * type: string}} The JSON representation of this entry. + */ + toJSON(): IEntryJSON; + } + + /** + * An object used to log debugging messages. Loggers use a hierarchical, + * dot-separated naming scheme. For instance, 'foo' is considered the parent of + * the 'foo.bar' and an ancestor of 'foo.bar.baz'. + * + * Each logger may be assigned a {@linkplain #setLevel log level}, which + * controls which level of messages will be reported to the + * {@linkplain #addHandler handlers} attached to this instance. If a log level + * is not explicitly set on a logger, it will inherit its parent. + * + * This class should never be directly instantiated. Instead, users should + * obtain logger references using the {@linkplain ./logging.getLogger() + * getLogger()} function. + * + * @final + */ + class Logger { + /** + * @param {string} name the name of this logger. + * @param {Level=} opt_level the initial level for this logger. + */ + constructor(name: string, opt_level?: Level); + + name_: string; + level_: Level; + parent_: Logger; + handlers_: any; + + /** @return {string} the name of this logger. */ + getName(): string; + + /** + * @param {Level} level the new level for this logger, or `null` if the logger + * should inherit its level from its parent logger. + */ + setLevel(level: Level): void; + + /** @return {Level} the log level for this logger. */ + getLevel(): Level; + + /** + * @return {!Level} the effective level for this logger. + */ + getEffectiveLevel(): Level; + + /** + * @param {!Level} level the level to check. + * @return {boolean} whether messages recorded at the given level are loggable + * by this instance. + */ + isLoggable(level: Level): boolean; + + /** + * Adds a handler to this logger. The handler will be invoked for each message + * logged with this instance, or any of its descendants. + * + * @param {function(!Entry)} handler the handler to add. + */ + addHandler(handler: any): void; + + /** + * Removes a handler from this logger. + * + * @param {function(!Entry)} handler the handler to remove. + * @return {boolean} whether a handler was successfully removed. + */ + removeHandler(handler: any): void; + + /** + * Logs a message at the given level. The message may be defined as a string + * or as a function that will return the message. If a function is provided, + * it will only be invoked if this logger's + * {@linkplain #getEffectiveLevel() effective log level} includes the given + * `level`. + * + * @param {!Level} level the level at which to log the message. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + log(level: Level, loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.SEVERE} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + severe(loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.WARNING} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + warning(loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.INFO} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + info(loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.DEBUG} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + debug(loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.FINE} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + fine(loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.FINER} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + finer(loggable: string | Function): void; + + /** + * Logs a message at the {@link Level.FINEST} log level. + * @param {(string|function(): string)} loggable the message to log, or a + * function that will return the message. + */ + finest(loggable: string | Function): void; + } + + /** + * Maintains a collection of loggers. + * + * @final + */ + class LogManager { + /** + * Retrieves a named logger, creating it in the process. This function will + * implicitly create the requested logger, and any of its parents, if they + * do not yet exist. + * + * @param {string} name the logger's name. + * @return {!Logger} the requested logger. + */ + getLogger(name?: string): Logger; + + /** + * Creates a new logger. + * + * @param {string} name the logger's name. + * @param {!Logger} parent the logger's parent. + * @return {!Logger} the new logger. + */ + createLogger_(name: string, parent: Logger): Logger; + } + + /** + * Retrieves a named logger, creating it in the process. This function will + * implicitly create the requested logger, and any of its parents, if they + * do not yet exist. + * + * @param {string} name the logger's name. + * @return {!Logger} the requested logger. + */ + function getLogger(name?: string): Logger; + + /** + * Adds the console handler to the given logger. The console handler will log + * all messages using the JavaScript Console API. + * + * @param {Logger=} opt_logger The logger to add the handler to; defaults + * to the root logger. + */ + function addConsoleHandler(opt_logger?: Logger): void; + + /** + * Removes the console log handler from the given logger. + * + * @param {Logger=} opt_logger The logger to remove the handler from; defaults + * to the root logger. + * @see exports.addConsoleHandler + */ + function removeConsoleHandler(opt_logger?: Logger): void; +} + +export namespace promise { + // region Functions + + /** + * Set `USE_PROMISE_MANAGER` to `false` to disable the promise manager. + * This is useful, if you use async/await (see https://github.com/SeleniumHQ/selenium/issues/2969 + * and https://github.com/SeleniumHQ/selenium/issues/3037). + */ + let USE_PROMISE_MANAGER: boolean; + + /** + * Given an array of promises, will return a promise that will be fulfilled + * with the fulfillment values of the input array's values. If any of the + * input array's promises are rejected, the returned promise will be rejected + * with the same reason. + * + * @param {!Array<(T|!ManagedPromise)>} arr An array of + * promises to wait on. + * @return {!ManagedPromise} A promise that is + * fulfilled with an array containing the fulfilled values of the + * input array, or rejected with the same reason as the first + * rejected value. + * @template T + */ + function all(arr: Array>): Promise; + + /** + * Invokes the appropriate callback function as soon as a promised + * {@code value} is resolved. This function is similar to + * {@link promise.when}, except it does not return a new promise. + * @param {*} value The value to observe. + * @param {Function} callback The function to call when the value is + * resolved successfully. + * @param {Function=} opt_errback The function to call when the value is + * rejected. + */ + function asap(value: any, callback: Function, opt_errback?: Function): void; + + /** + * @return {!promise.ControlFlow} The currently active control flow. + */ + function controlFlow(): ControlFlow; + + /** + * Creates a new control flow. The provided callback will be invoked as the + * first task within the new flow, with the flow as its sole argument. Returns + * a promise that resolves to the callback result. + * @param {function(!ControlFlow)} callback The entry point + * to the newly created flow. + * @return {!ManagedPromise} A promise that resolves to the callback + * result. + */ + function createFlow(callback: (flow: ControlFlow) => R): Promise; + + /** + * Determines whether a {@code value} should be treated as a promise. + * Any object whose 'then' property is a function will be considered a promise. + * + * @param {*} value The value to test. + * @return {boolean} Whether the value is a promise. + */ + function isPromise(value: any): boolean; + + /** + * Tests is a function is a generator. + * @param {!Function} fn The function to test. + * @return {boolean} Whether the function is a generator. + */ + function isGenerator(fn: Function): boolean; + + /** + * Creates a promise that will be resolved at a set time in the future. + * @param {number} ms The amount of time, in milliseconds, to wait before + * resolving the promise. + * @return {!ManagedPromise} The promise. + */ + function delayed(ms: number): Promise; + + /** + * Calls a function for each element in an array, and if the function returns + * true adds the element to a new array. + * + * If the return value of the filter function is a promise, this function + * will wait for it to be fulfilled before determining whether to insert the + * element into the new array. + * + * If the filter function throws or returns a rejected promise, the promise + * returned by this function will be rejected with the same reason. Only the + * first failure will be reported; all subsequent errors will be silently + * ignored. + * + * @param {!(Array|ManagedPromise>)} arr The + * array to iterator over, or a promise that will resolve to said array. + * @param {function(this: SELF, TYPE, number, !Array): ( + * boolean|ManagedPromise)} fn The function + * to call for each element in the array. + * @param {SELF=} opt_self The object to be used as the value of 'this' within + * {@code fn}. + * @template TYPE, SELF + */ + function filter( + arr: T[] | Promise, + fn: (element: T, type: any, index: number, array: T[]) => any, + opt_self?: any, + ): Promise; + + /** + * Creates a new deferred object. + * @return {!promise.Deferred} The new deferred object. + */ + function defer(): Deferred; + + /** + * Creates a promise that has been resolved with the given value. + * @param {T=} opt_value The resolved value. + * @return {!Promise} The resolved promise. + * @deprecated Use {@link Promise#resolve Promise.resolve(value)}. + * @template T + */ + function fulfilled(opt_value?: T): Promise; + + /** + * Calls a function for each element in an array and inserts the result into a + * new array, which is used as the fulfillment value of the promise returned + * by this function. + * + * If the return value of the mapping function is a promise, this function + * will wait for it to be fulfilled before inserting it into the new array. + * + * If the mapping function throws or returns a rejected promise, the + * promise returned by this function will be rejected with the same reason. + * Only the first failure will be reported; all subsequent errors will be + * silently ignored. + * + * @param {!(Array|ManagedPromise>)} arr The + * array to iterator over, or a promise that will resolve to said array. + * @param {function(this: SELF, TYPE, number, !Array): ?} fn The + * function to call for each element in the array. This function should + * expect three arguments (the element, the index, and the array itself. + * @param {SELF=} opt_self The object to be used as the value of 'this' within + * {@code fn}. + * @template TYPE, SELF + */ + function map( + arr: T[] | Promise, + fn: (self: any, type: any, index: number, array: T[]) => any, + opt_self?: any, + ): Promise; + + /** + * Creates a promise that has been rejected with the given reason. + * @param {*=} opt_reason The rejection reason; may be any value, but is + * usually an Error or a string. + * @return {!Promise} The rejected promise. + * @deprecated Use {@link Promise#reject Promise.Promise(reason)}. + */ + function rejected(opt_reason?: any): Promise; + + /** + * Wraps a function that expects a node-style callback as its final + * argument. This callback expects two arguments: an error value (which will be + * null if the call succeeded), and the success value as the second argument. + * The callback will the resolve or reject the returned promise, based on its + * arguments. + * @param {!Function} fn The function to wrap. + * @param {...?} var_args The arguments to apply to the function, excluding the + * final callback. + * @return {!ManagedPromise} A promise that will be resolved with the + * result of the provided function's callback. + */ + function checkedNodeCall(fn: Function, ...var_args: any[]): Promise; + + /** + * Consumes a {@code GeneratorFunction}. Each time the generator yields a + * promise, this function will wait for it to be fulfilled before feeding the + * fulfilled value back into {@code next}. Likewise, if a yielded promise is + * rejected, the rejection error will be passed to {@code throw}. + * + * __Example 1:__ the Fibonacci Sequence. + * + * promise.consume(function* fibonacci() { + * var n1 = 1, n2 = 1; + * for (var i = 0; i < 4; ++i) { + * var tmp = yield n1 + n2; + * n1 = n2; + * n2 = tmp; + * } + * return n1 + n2; + * }).then(function(result) { + * console.log(result); // 13 + * }); + * + * __Example 2:__ a generator that throws. + * + * promise.consume(function* () { + * yield promise.delayed(250).then(function() { + * throw Error('boom'); + * }); + * }).catch(function(e) { + * console.log(e.toString()); // Error: boom + * }); + * + * @param {!Function} generatorFn The generator function to execute. + * @param {Object=} opt_self The object to use as 'this' when invoking the + * initial generator. + * @param {...*} var_args Any arguments to pass to the initial generator. + * @return {!ManagedPromise} A promise that will resolve to the + * generator's final result. + * @throws {TypeError} If the given function is not a generator. + */ + function consume(generatorFn: (...args: any[]) => T, opt_self?: any, ...var_args: any[]): Promise; + + /** + * Registers an observer on a promised {@code value}, returning a new promise + * that will be resolved when the value is. If {@code value} is not a promise, + * then the return promise will be immediately resolved. + * @param {*} value The value to observe. + * @param {Function=} opt_callback The function to call when the value is + * resolved successfully. + * @param {Function=} opt_errback The function to call when the value is + * rejected. + * @return {!ManagedPromise} A new promise. + */ + function when( + value: T | Promise, + opt_callback?: (value: T) => any, + opt_errback?: (error: any) => any, + ): Promise; + + /** + * Returns a promise that will be resolved with the input value in a + * fully-resolved state. If the value is an array, each element will be fully + * resolved. Likewise, if the value is an object, all keys will be fully + * resolved. In both cases, all nested arrays and objects will also be + * fully resolved. All fields are resolved in place; the returned promise will + * resolve on {@code value} and not a copy. + * + * Warning: This function makes no checks against objects that contain + * cyclical references: + * + * var value = {}; + * value['self'] = value; + * promise.fullyResolved(value); // Stack overflow. + * + * @param {*} value The value to fully resolve. + * @return {!ManagedPromise} A promise for a fully resolved version + * of the input value. + */ + function fullyResolved(value: any): Promise; + + /** + * Changes the default flow to use when no others are active. + * @param {!ControlFlow} flow The new default flow. + * @throws {Error} If the default flow is not currently active. + */ + function setDefaultFlow(flow: ControlFlow): void; + + // endregion + + /** + * Error used when the computation of a promise is cancelled. + */ + class CancellationError extends Error { + /** + * @param {string=} opt_msg The cancellation message. + */ + constructor(opt_msg?: string); + } + + interface IThenable extends PromiseLike { + /** + * Registers listeners for when this instance is resolved. + * + * @param onfulfilled + * The function to call if this promise is successfully resolved. The function + * should expect a single argument: the promise's resolved value. + * @param onrejected + * The function to call if this promise is rejected. The function should + * expect a single argument: the rejection reason. + * @return A new promise which will be resolved with the result + * of the invoked callback. + * @template R + */ + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | null, + ): PromiseLike; + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + * + * // Synchronous API: + * try { + * doSynchronousWork(); + * } catch (ex) { + * console.error(ex); + * } + * + * // Asynchronous promise API: + * doAsynchronousWork().catch(function(ex) { + * console.error(ex); + * }); + * + * @param {function(*): (R|IThenable)} errback The + * function to call if this promise is rejected. The function should + * expect a single argument: the rejection reason. + * @return {!ManagedPromise} A new promise which will be + * resolved with the result of the invoked callback. + * @template R + */ + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | null, + ): Promise; + } + + /** + * Thenable is a promise-like object with a {@code then} method which may be + * used to schedule callbacks on a promised value. + * + * @interface + * @template T + */ + interface Thenable extends IThenable {} + class Thenable { + /** + * Registers a listener to invoke when this promise is resolved, regardless + * of whether the promise's value was successfully computed. This function + * is synonymous with the {@code finally} clause in a synchronous API: + * + * // Synchronous API: + * try { + * doSynchronousWork(); + * } finally { + * cleanUp(); + * } + * + * // Asynchronous promise API: + * doAsynchronousWork().finally(cleanUp); + * + * __Note:__ similar to the {@code finally} clause, if the registered + * callback returns a rejected promise or throws an error, it will silently + * replace the rejection error (if any) from this promise: + * + * try { + * throw Error('one'); + * } finally { + * throw Error('two'); // Hides Error: one + * } + * + * promise.rejected(Error('one')) + * .finally(function() { + * throw Error('two'); // Hides Error: one + * }); + * + * @param {function(): (R|IThenable)} callback The function to call when + * this promise is resolved. + * @return {!ManagedPromise} A promise that will be fulfilled + * with the callback result. + * @template R + */ + finally(callback: Function): Promise; + + /** + * Adds a property to a class prototype to allow runtime checks of whether + * instances of that class implement the Thenable interface. This function + * will also ensure the prototype's {@code then} function is exported from + * compiled code. + * @param {function(new: Thenable, ...?)} ctor The + * constructor whose prototype to modify. + */ + static addImplementation(ctor: Function): void; + + /** + * Checks if an object has been tagged for implementing the Thenable + * interface as defined by {@link Thenable.addImplementation}. + * @param {*} object The object to test. + * @return {boolean} Whether the object is an implementation of the Thenable + * interface. + */ + static isImplementation(object: any): boolean; + } + + interface IFulfilledCallback { + (value: T | IThenable | Thenable | undefined): void; + } + + interface IRejectedCallback { + (reason: any): void; + } + + /** + * Represents the eventual value of a completed operation. Each promise may be + * in one of three states: pending, fulfilled, or rejected. Each promise starts + * in the pending state and may make a single transition to either a + * fulfilled or rejected state, at which point the promise is considered + * resolved. + * + * @template T + * @see http://promises-aplus.github.io/promises-spec/ + */ + class Promise implements IThenable, PromiseLike { + /** + * @param {function( + * function((T|IThenable|Thenable)=), + * function(*=))} resolver + * Function that is invoked immediately to begin computation of this + * promise's value. The function should accept a pair of callback + * functions, one for fulfilling the promise and another for rejecting it. + * @param {ControlFlow=} opt_flow The control flow + * this instance was created under. Defaults to the currently active flow. + */ + constructor( + resolver: (resolve: IFulfilledCallback, reject: IRejectedCallback) => void, + opt_flow?: ControlFlow, + ); + + /** + * Creates a promise that is immediately resolved with the given value. + * + * @param {T=} opt_value The value to resolve. + * @return {!ManagedPromise} A promise resolved with the given value. + * @template T + */ + static resolve(opt_value?: T): Promise; + + /** + * Creates a promise that is immediately rejected with the given reason. + * + * @param {*=} opt_reason The rejection reason. + * @return {!ManagedPromise} A new rejected promise. + */ + static reject(opt_reason?: any): Promise; + + /** + * Registers listeners for when this instance is resolved. + * + * @param onfulfilled + * The function to call if this promise is successfully resolved. The function + * should expect a single argument: the promise's resolved value. + * @param onrejected + * The function to call if this promise is rejected. The function should + * expect a single argument: the rejection reason. + * @return A new promise which will be resolved with the result + * of the invoked callback. + */ + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | null, + ): Promise; + + /** + * Registers a listener for when this promise is rejected. This is synonymous + * with the {@code catch} clause in a synchronous API: + * + * // Synchronous API: + * try { + * doSynchronousWork(); + * } catch (ex) { + * console.error(ex); + * } + * + * // Asynchronous promise API: + * doAsynchronousWork().catch(function(ex) { + * console.error(ex); + * }); + * + * @param onrejected + * The function to call if this promise is rejected. The function should + * expect a single argument: the rejection reason. + * @return A new promise which will be resolved with the result of the invoked callback. + */ + catch( + onrejected?: ((reason: any) => TResult | PromiseLike) | null, + ): Promise; + } + + /** + * Represents a value that will be resolved at some point in the future. This + * class represents the protected 'producer' half of a Promise - each Deferred + * has a {@code promise} property that may be returned to consumers for + * registering callbacks, reserving the ability to resolve the deferred to the + * producer. + * + *

You may also define the target browser using the {@code SELENIUM_BROWSER} + * environment variable. If set, this environment variable should be of the + * form {@code browser[:[version][:platform]]}. + * + * @param {(string|Browser)} name The name of the target browser; + * common defaults are available on the {@link Browser} enum. + * @param {string=} opt_version A desired version; may be omitted if any + * version should be used. + * @param {string=} opt_platform The desired platform; may be omitted if any + * version may be used. + * @return {!Builder} A self reference. + */ + forBrowser(name: string, opt_version?: string, opt_platform?: string): Builder; + + /** + * Returns the base set of capabilities this instance is currently configured + * to use. + * @return {!Capabilities} The current capabilities for this builder. + */ + getCapabilities(): Capabilities; + + /** + * @return {string} The URL of the WebDriver server this instance is configured + * to use. + */ + getServerUrl(): string; + + /** + * @return {?string} The URL of the proxy server to use for the WebDriver's + * HTTP connections, or `null` if not set. + */ + getWebDriverProxy(): string; + + /** + * Sets the default action to take with an unexpected alert before returning + * an error. + * @param {string} beahvior The desired behavior; should be 'accept', 'dismiss', + * or 'ignore'. Defaults to 'dismiss'. + * @return {!Builder} A self reference. + */ + setAlertBehavior(behavior: string): Builder; + + /** + * Sets Chrome-specific options for drivers created by this builder. Any + * logging or proxy settings defined on the given options will take precedence + * over those set through {@link #setLoggingPrefs} and {@link #setProxy}, + * respectively. + * + * @param {!chrome.Options} options The ChromeDriver options to use. + * @return {!Builder} A self reference. + */ + setChromeOptions(options: chrome.Options): Builder; + + /** + * @return {chrome.Options} the Chrome specific options currently configured + * for this builder. + */ + getChromeOptions(): chrome.Options; + + /** + * Sets the service builder to use for managing the chromedriver child process + * when creating new Chrome sessions. + * + * @param {chrome.ServiceBuilder} service the service to use. + * @return {!Builder} A self reference. + */ + setChromeService(service: chrome.ServiceBuilder): Builder; + + /** + * Sets the control flow that created drivers should execute actions in. If + * the flow is never set, or is set to {@code null}, it will use the active + * flow at the time {@link #build()} is called. + * @param {promise.ControlFlow} flow The control flow to use, or + * {@code null} to + * @return {!Builder} A self reference. + */ + setControlFlow(flow: promise.ControlFlow): Builder; + + /** + * Set {@linkplain edge.Options options} specific to Microsoft's Edge browser + * for drivers created by this builder. Any proxy settings defined on the + * given options will take precedence over those set through + * {@link #setProxy}. + * + * @param {!edge.Options} options The MicrosoftEdgeDriver options to use. + * @return {!Builder} A self reference. + */ + setEdgeOptions(options: edge.Options): Builder; + + /** + * Sets the {@link edge.ServiceBuilder} to use to manage the + * MicrosoftEdgeDriver child process when creating sessions locally. + * + * @param {edge.ServiceBuilder} service the service to use. + * @return {!Builder} a self reference. + */ + setEdgeService(service: edge.ServiceBuilder): Builder; + + /** + * Sets whether native events should be used. + * @param {boolean} enabled Whether to enable native events. + * @return {!Builder} A self reference. + */ + setEnableNativeEvents(enabled: boolean): Builder; + + /** + * Sets Firefox-specific options for drivers created by this builder. Any + * logging or proxy settings defined on the given options will take precedence + * over those set through {@link #setLoggingPrefs} and {@link #setProxy}, + * respectively. + * + * @param {!firefox.Options} options The FirefoxDriver options to use. + * @return {!Builder} A self reference. + */ + setFirefoxOptions(options: firefox.Options): Builder; + + /** + * @return {firefox.Options} the Firefox specific options currently configured + * for this instance. + */ + getFirefoxOptions(): firefox.Options; + + /** + * Sets the {@link firefox.ServiceBuilder} to use to manage the geckodriver + * child process when creating Firefox sessions locally. + * + * @param {firefox.ServiceBuilder} service the service to use. + * @return {!Builder} a self reference. + */ + setFirefoxService(service: firefox.ServiceBuilder): Builder; + + /** + * Set Internet Explorer specific {@linkplain ie.Options options} for drivers + * created by this builder. Any proxy settings defined on the given options + * will take precedence over those set through {@link #setProxy}. + * + * @param {!ie.Options} options The IEDriver options to use. + * @return {!Builder} A self reference. + */ + setIeOptions(options: ie.Options): Builder; + + /** + * Sets the logging preferences for the created session. Preferences may be + * changed by repeated calls, or by calling {@link #withCapabilities}. + * @param {!(logging.Preferences|Object.)} prefs The + * desired logging preferences. + * @return {!Builder} A self reference. + */ + setLoggingPrefs(prefs: logging.Preferences | Object): Builder; + + /** + * Sets Opera specific {@linkplain opera.Options options} for drivers created + * by this builder. Any logging or proxy settings defined on the given options + * will take precedence over those set through {@link #setLoggingPrefs} and + * {@link #setProxy}, respectively. + * + * @param {!opera.Options} options The OperaDriver options to use. + * @return {!Builder} A self reference. + */ + setOperaOptions(options: opera.Options): Builder; + + /** + * Sets the proxy configuration to use for WebDriver clients created by this + * builder. Any calls to {@link #withCapabilities} after this function will + * overwrite these settings. + * @param {!capabilities.ProxyConfig} config The configuration to use. + * @return {!Builder} A self reference. + */ + setProxy(config: ProxyConfig): Builder; + + /** + * Sets Safari specific {@linkplain safari.Options options} for drivers + * created by this builder. Any logging settings defined on the given options + * will take precedence over those set through {@link #setLoggingPrefs}. + * + * @param {!safari.Options} options The Safari options to use. + * @return {!Builder} A self reference. + */ + setSafariOptions(options: safari.Options): Builder; + + /** + * @return {safari.Options} the Safari specific options currently configured + * for this instance. + */ + getSafariOptions(): safari.Options; + + /** + * Sets how elements should be scrolled into view for interaction. + * @param {number} behavior The desired scroll behavior: either 0 to align with + * the top of the viewport or 1 to align with the bottom. + * @return {!Builder} A self reference. + */ + setScrollBehavior(behavior: number): Builder; + + /** + * Sets the http agent to use for each request. + * If this method is not called, the Builder will use http.globalAgent by default. + * + * @param {http.Agent} agent The agent to use for each request. + * @return {!Builder} A self reference. + */ + usingHttpAgent(agent: any): Builder; + + /** + * Sets the URL of a remote WebDriver server to use. Once a remote URL has been + * specified, the builder direct all new clients to that server. If this method + * is never called, the Builder will attempt to create all clients locally. + * + *

As an alternative to this method, you may also set the + * {@code SELENIUM_REMOTE_URL} environment variable. + * + * @param {string} url The URL of a remote server to use. + * @return {!Builder} A self reference. + */ + usingServer(url: string): Builder; + + /** + * Sets the URL of the proxy to use for the WebDriver's HTTP connections. + * If this method is never called, the Builder will create a connection + * without a proxy. + * + * @param {string} proxy The URL of a proxy to use. + * @return {!Builder} A self reference. + */ + usingWebDriverProxy(proxy: string): Builder; + + /** + * Sets the desired capabilities when requesting a new session. This will + * overwrite any previously set capabilities. + * @param {!(Object|Capabilities)} capabilities The desired + * capabilities for a new session. + * @return {!Builder} A self reference. + */ + withCapabilities(capabilities: Object | Capabilities): Builder; + + // endregion +} + +/** + * Describes a mechanism for locating an element on the page. + * @final + */ +export class By { + /** + * @param {string} using the name of the location strategy to use. + * @param {string} value the value to search for. + */ + constructor(using: string, value: string); + + /** + * Locates elements that have a specific class name. + * + * @param {string} name The class name to search for. + * @return {!By} The new locator. + * @see http://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes + * @see http://www.w3.org/TR/CSS2/selector.html#class-html + */ + static className(name: string): By; + + /** + * Locates elements using a CSS selector. + * + * @param {string} selector The CSS selector to use. + * @return {!By} The new locator. + * @see http://www.w3.org/TR/CSS2/selector.html + */ + static css(selector: string): By; + + /** + * Locates eleemnts by the ID attribute. This locator uses the CSS selector + * `*[id='$ID']`, _not_ `document.getElementById`. + * + * @param {string} id The ID to search for. + * @return {!By} The new locator. + */ + static id(id: string): By; + + /** + * Locates link elements whose + * {@linkplain WebElement#getText visible text} matches the given + * string. + * + * @param {string} text The link text to search for. + * @return {!By} The new locator. + */ + static linkText(text: string): By; + + /** + * Locates an elements by evaluating a + * {@linkplain WebDriver#executeScript JavaScript expression}. + * The result of this expression must be an element or list of elements. + * + * @param {!(string|Function)} script The script to execute. + * @param {...*} var_args The arguments to pass to the script. + * @return {function(!./WebDriver): !./promise.Promise} + * A new JavaScript-based locator function. + */ + static js(script: string | Function, ...var_args: any[]): (webdriver: WebDriver) => promise.Promise; + + /** + * Locates elements whose `name` attribute has the given value. + * + * @param {string} name The name attribute to search for. + * @return {!By} The new locator. + */ + static name(name: string): By; + + /** + * Locates link elements whose + * {@linkplain WebElement#getText visible text} contains the given + * substring. + * + * @param {string} text The substring to check for in a link's visible text. + * @return {!By} The new locator. + */ + static partialLinkText(text: string): By; + + /** + * Locates elements with a given tag name. + * + * @param {string} name The tag name to search for. + * @return {!By} The new locator. + * @deprecated Use {@link By.css() By.css(tagName)} instead. + */ + static tagName(name: string): By; + + /** + * Locates elements matching a XPath selector. Care should be taken when + * using an XPath selector with a {@link WebElement} as WebDriver + * will respect the context in the specified in the selector. For example, + * given the selector `//div`, WebDriver will search from the document root + * regardless of whether the locator was used with a WebElement. + * + * @param {string} xpath The XPath selector to use. + * @return {!By} The new locator. + * @see http://www.w3.org/TR/xpath/ + */ + static xpath(xpath: string): By; + + /** @override */ + toString(): string; +} + +/** + * Short-hand expressions for the primary element locator strategies. + * For example the following two statements are equivalent: + * + * var e1 = driver.findElement(By.id('foo')); + * var e2 = driver.findElement({id: 'foo'}); + * + * Care should be taken when using JavaScript minifiers (such as the + * Closure compiler), as locator hashes will always be parsed using + * the un-obfuscated properties listed. + */ +export type ByHash = + | { className: string } + | { css: string } + | { id: string } + | { js: string } + | { linkText: string } + | { name: string } + | { partialLinkText: string } + | { tagName: string } + | { xpath: string }; + +export type Locator = By | Function | ByHash; + +/** + * Common webdriver capability keys. + */ +export interface ICapability { + /** + * Indicates whether a driver should accept all SSL certs by default. This + * capability only applies when requesting a new session. To query whether + * a driver can handle insecure SSL certs, see + * {@link Capability.SECURE_SSL}. + */ + ACCEPT_SSL_CERTS: string; + + /** + * The browser name. Common browser names are defined in the + * {@link Browser} enum. + */ + BROWSER_NAME: string; + + /** + * Defines how elements should be scrolled into the viewport for interaction. + * This capability will be set to zero (0) if elements are aligned with the + * top of the viewport, or one (1) if aligned with the bottom. The default + * behavior is to align with the top of the viewport. + */ + ELEMENT_SCROLL_BEHAVIOR: string; + + /** + * Whether the driver is capable of handling modal alerts (e.g. alert, + * confirm, prompt). To define how a driver should handle alerts, + * use {@link Capability.UNEXPECTED_ALERT_BEHAVIOR}. + */ + HANDLES_ALERTS: string; + + /** + * Key for the logging driver logging preferences. + */ + LOGGING_PREFS: string; + + /** + * Whether this session generates native events when simulating user input. + */ + NATIVE_EVENTS: string; + + /** + * Describes the platform the browser is running on. Will be one of + * ANDROID, IOS, LINUX, MAC, UNIX, or WINDOWS. When requesting a + * session, ANY may be used to indicate no platform preference (this is + * semantically equivalent to omitting the platform capability). + */ + PLATFORM: string; + + /** + * Describes the proxy configuration to use for a new WebDriver session. + */ + PROXY: string; + + /** Whether the driver supports changing the brower's orientation. */ + ROTATABLE: string; + + /** + * Whether a driver is only capable of handling secure SSL certs. To request + * that a driver accept insecure SSL certs by default, use + * {@link Capability.ACCEPT_SSL_CERTS}. + */ + SECURE_SSL: string; + + /** Whether the driver supports manipulating the app cache. */ + SUPPORTS_APPLICATION_CACHE: string; + + /** Whether the driver supports locating elements with CSS selectors. */ + SUPPORTS_CSS_SELECTORS: string; + + /** Whether the browser supports JavaScript. */ + SUPPORTS_JAVASCRIPT: string; + + /** Whether the driver supports controlling the browser's location info. */ + SUPPORTS_LOCATION_CONTEXT: string; + + /** Whether the driver supports taking screenshots. */ + TAKES_SCREENSHOT: string; + + /** + * Defines how the driver should handle unexpected alerts. The value should + * be one of 'accept', 'dismiss', or 'ignore. + */ + UNEXPECTED_ALERT_BEHAVIOR: string; + + /** Defines the browser version. */ + VERSION: string; +} + +export const Capability: ICapability; + +export class Capabilities { + // region Constructors + + /** + * @param {(Capabilities|Object)=} opt_other Another set of + * capabilities to merge into this instance. + */ + constructor(opt_other?: Capabilities | Object); + + // endregion + + // region Methods + + /** @return {!Object} The JSON representation of this instance. */ + toJSON(): any; + + /** + * Merges another set of capabilities into this instance. Any duplicates in + * the provided set will override those already set on this instance. + * @param {!(Capabilities|Object)} other The capabilities to + * merge into this instance. + * @return {!Capabilities} A self reference. + */ + merge(other: Capabilities | Object): Capabilities; + + /** + * @param {string} key The capability to set. + * @param {*} value The capability value. Capability values must be JSON + * serializable. Pass {@code null} to unset the capability. + * @return {!Capabilities} A self reference. + */ + set(key: string, value: any): Capabilities; + + /** + * Sets the logging preferences. Preferences may be specified as a + * {@link logging.Preferences} instance, or a as a map of log-type to + * log-level. + * @param {!(logging.Preferences|Object.)} prefs The + * logging preferences. + * @return {!Capabilities} A self reference. + */ + setLoggingPrefs(prefs: logging.Preferences | Object): Capabilities; + + /** + * Sets the proxy configuration for this instance. + * @param {ProxyConfig} proxy The desired proxy configuration. + * @return {!Capabilities} A self reference. + */ + setProxy(proxy: ProxyConfig): Capabilities; + + /** + * Sets whether native events should be used. + * @param {boolean} enabled Whether to enable native events. + * @return {!Capabilities} A self reference. + */ + setEnableNativeEvents(enabled: boolean): Capabilities; + + /** + * Sets how elements should be scrolled into view for interaction. + * @param {number} behavior The desired scroll behavior: either 0 to align with + * the top of the viewport or 1 to align with the bottom. + * @return {!Capabilities} A self reference. + */ + setScrollBehavior(behavior: number): Capabilities; + + /** + * Sets the default action to take with an unexpected alert before returning + * an error. + * @param {string} behavior The desired behavior; should be 'accept', 'dismiss', + * or 'ignore'. Defaults to 'dismiss'. + * @return {!Capabilities} A self reference. + */ + setAlertBehavior(behavior: string): Capabilities; + + /** + * @param {string} key The capability to return. + * @return {*} The capability with the given key, or {@code null} if it has + * not been set. + */ + get(key: string): any; + + /** + * @param {string} key The capability to check. + * @return {boolean} Whether the specified capability is set. + */ + has(key: string): boolean; + + // endregion + + // region Static Methods + + /** + * @return {!Capabilities} A basic set of capabilities for Android. + */ + static android(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for Chrome. + */ + static chrome(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for Microsoft Edge. + */ + static edge(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for Firefox. + */ + static firefox(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for + * Internet Explorer. + */ + static ie(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for iPad. + */ + static ipad(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for iPhone. + */ + static iphone(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for Opera. + */ + static opera(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for + * PhantomJS. + */ + static phantomjs(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for Safari. + */ + static safari(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for HTMLUnit. + */ + static htmlunit(): Capabilities; + + /** + * @return {!Capabilities} A basic set of capabilities for HTMLUnit + * with enabled Javascript. + */ + static htmlunitwithjs(): Capabilities; + + // endregion +} + +/** + * An enumeration of valid command string. + */ +export interface ICommandName { + GET_SERVER_STATUS: string; + + NEW_SESSION: string; + GET_SESSIONS: string; + DESCRIBE_SESSION: string; + + CLOSE: string; + QUIT: string; + + GET_CURRENT_URL: string; + GET: string; + GO_BACK: string; + GO_FORWARD: string; + REFRESH: string; + + ADD_COOKIE: string; + GET_COOKIE: string; + GET_ALL_COOKIES: string; + DELETE_COOKIE: string; + DELETE_ALL_COOKIES: string; + + GET_ACTIVE_ELEMENT: string; + FIND_ELEMENT: string; + FIND_ELEMENTS: string; + FIND_CHILD_ELEMENT: string; + FIND_CHILD_ELEMENTS: string; + + CLEAR_ELEMENT: string; + CLICK_ELEMENT: string; + SEND_KEYS_TO_ELEMENT: string; + SUBMIT_ELEMENT: string; + + GET_CURRENT_WINDOW_HANDLE: string; + GET_WINDOW_HANDLES: string; + GET_WINDOW_POSITION: string; + SET_WINDOW_POSITION: string; + GET_WINDOW_SIZE: string; + SET_WINDOW_SIZE: string; + MAXIMIZE_WINDOW: string; + + SWITCH_TO_WINDOW: string; + SWITCH_TO_FRAME: string; + GET_PAGE_SOURCE: string; + GET_TITLE: string; + + EXECUTE_SCRIPT: string; + EXECUTE_ASYNC_SCRIPT: string; + + GET_ELEMENT_TEXT: string; + GET_ELEMENT_TAG_NAME: string; + IS_ELEMENT_SELECTED: string; + IS_ELEMENT_ENABLED: string; + IS_ELEMENT_DISPLAYED: string; + GET_ELEMENT_LOCATION: string; + GET_ELEMENT_LOCATION_IN_VIEW: string; + GET_ELEMENT_SIZE: string; + GET_ELEMENT_ATTRIBUTE: string; + GET_ELEMENT_VALUE_OF_CSS_PROPERTY: string; + ELEMENT_EQUALS: string; + + SCREENSHOT: string; + IMPLICITLY_WAIT: string; + SET_SCRIPT_TIMEOUT: string; + SET_TIMEOUT: string; + + ACCEPT_ALERT: string; + DISMISS_ALERT: string; + GET_ALERT_TEXT: string; + SET_ALERT_TEXT: string; + + EXECUTE_SQL: string; + GET_LOCATION: string; + SET_LOCATION: string; + GET_APP_CACHE: string; + GET_APP_CACHE_STATUS: string; + CLEAR_APP_CACHE: string; + IS_BROWSER_ONLINE: string; + SET_BROWSER_ONLINE: string; + + GET_LOCAL_STORAGE_ITEM: string; + GET_LOCAL_STORAGE_KEYS: string; + SET_LOCAL_STORAGE_ITEM: string; + REMOVE_LOCAL_STORAGE_ITEM: string; + CLEAR_LOCAL_STORAGE: string; + GET_LOCAL_STORAGE_SIZE: string; + + GET_SESSION_STORAGE_ITEM: string; + GET_SESSION_STORAGE_KEYS: string; + SET_SESSION_STORAGE_ITEM: string; + REMOVE_SESSION_STORAGE_ITEM: string; + CLEAR_SESSION_STORAGE: string; + GET_SESSION_STORAGE_SIZE: string; + + SET_SCREEN_ORIENTATION: string; + GET_SCREEN_ORIENTATION: string; + + // These belong to the Advanced user interactions - an element is + // optional for these commands. + CLICK: string; + DOUBLE_CLICK: string; + MOUSE_DOWN: string; + MOUSE_UP: string; + MOVE_TO: string; + SEND_KEYS_TO_ACTIVE_ELEMENT: string; + + // These belong to the Advanced Touch API + TOUCH_SINGLE_TAP: string; + TOUCH_DOWN: string; + TOUCH_UP: string; + TOUCH_MOVE: string; + TOUCH_SCROLL: string; + TOUCH_DOUBLE_TAP: string; + TOUCH_LONG_PRESS: string; + TOUCH_FLICK: string; + + GET_AVAILABLE_LOG_TYPES: string; + GET_LOG: string; + GET_SESSION_LOGS: string; + + UPLOAD_FILE: string; +} + +export const CommandName: ICommandName; + +/** + * Describes a command to be executed by the WebDriverJS framework. + * @param {!CommandName} name The name of this command. + */ +export class Command { + // region Constructors + + /** + * @param {!CommandName} name The name of this command. + */ + constructor(name: string); + + // endregion + + // region Methods + + /** + * @return {!CommandName} This command's name. + */ + getName(): string; + + /** + * Sets a parameter to send with this command. + * @param {string} name The parameter name. + * @param {*} value The parameter value. + * @return {!Command} A self reference. + */ + setParameter(name: string, value: any): Command; + + /** + * Sets the parameters for this command. + * @param {!Object.<*>} parameters The command parameters. + * @return {!Command} A self reference. + */ + setParameters(parameters: any): Command; + + /** + * Returns a named command parameter. + * @param {string} key The parameter key to look up. + * @return {*} The parameter value, or undefined if it has not been set. + */ + getParameter(key: string): any; + + /** + * @return {!Object.<*>} The parameters to send with this command. + */ + getParameters(): any; + + // endregion +} + +/** + * Handles the execution of WebDriver {@link Command commands}. + * @interface + */ +export class Executor { + /** + * Executes the given {@code command}. If there is an error executing the + * command, the provided callback will be invoked with the offending error. + * Otherwise, the callback will be invoked with a null Error and non-null + * response object. + * + * @param {!Command} command The command to execute. + * @return {!promise.Promise} A promise that will be fulfilled with + * the command result. + */ + execute(command: Command): promise.Promise; +} + +/** + * Describes an event listener registered on an {@linkplain EventEmitter}. + */ +export class Listener { + /** + * @param {!Function} fn The acutal listener function. + * @param {(Object|undefined)} scope The object in whose scope to invoke the + * listener. + * @param {boolean} oneshot Whether this listener should only be used once. + */ + constructor(fn: Function, scope: Object, oneshot: boolean); +} + +/** + * Object that can emit events for others to listen for. This is used instead + * of Closure's event system because it is much more light weight. The API is + * based on Node's EventEmitters. + */ +export class EventEmitter { + // region Constructors + + /** */ + constructor(); + + // endregion + + // region Methods + + /** + * Fires an event and calls all listeners. + * @param {string} type The type of event to emit. + * @param {...*} var_args Any arguments to pass to each listener. + */ + emit(type: string, ...var_args: any[]): void; + + /** + * Returns a mutable list of listeners for a specific type of event. + * @param {string} type The type of event to retrieve the listeners for. + * @return {!Set} The registered listeners for the given event + * type. + */ + listeners(type: string): any; + + /** + * Registers a listener. + * @param {string} type The type of event to listen for. + * @param {!Function} fn The function to invoke when the event is fired. + * @param {Object=} opt_self The object in whose scope to invoke the listener. + * @param {boolean=} opt_oneshot Whether the listener should b (e removed after + * the first event is fired. + * @return {!EventEmitter} A self reference. + */ + addListener(type: string, fn: Function, opt_scope?: any, opt_oneshot?: boolean): EventEmitter; + + /** + * Registers a one-time listener which will be called only the first time an + * event is emitted, after which it will be removed. + * @param {string} type The type of event to listen for. + * @param {!Function} fn The function to invoke when the event is fired. + * @param {Object=} opt_scope The object in whose scope to invoke the listener. + * @return {!EventEmitter} A self reference. + */ + once(type: string, fn: any, opt_scope?: any): EventEmitter; + + /** + * An alias for {@code #addListener()}. + * @param {string} type The type of event to listen for. + * @param {!Function} fn The function to invoke when the event is fired. + * @param {Object=} opt_scope The object in whose scope to invoke the listener. + * @return {!EventEmitter} A self reference. + */ + on(type: string, fn: Function, opt_scope?: any): EventEmitter; + + /** + * Removes a previously registered event listener. + * @param {string} type The type of event to unregister. + * @param {!Function} listenerFn The handler function to remove. + * @return {!EventEmitter} A self reference. + */ + removeListener(type: string, listenerFn: Function): EventEmitter; + + /** + * Removes all listeners for a specific type of event. If no event is + * specified, all listeners across all types will be removed. + * @param {string=} opt_type The type of event to remove listeners from. + * @return {!EventEmitter} A self reference. + */ + removeAllListeners(opt_type?: string): EventEmitter; + + // endregion +} + +/** + * Interface for navigating back and forth in the browser history. + */ +export class Navigation { + // region Constructors + + /** + * Interface for navigating back and forth in the browser history. + * + * This class should never be instantiated directly. Insead, obtain an instance + * with + * + * navigate() + * + * @see WebDriver#navigate() + */ + constructor(driver: WebDriver); + + // endregion + + // region Methods + + /** + * Schedules a command to navigate to a new URL. + * @param {string} url The URL to navigate to. + * @return {!promise.Promise.} A promise that will be resolved + * when the URL has been loaded. + */ + to(url: string): promise.Promise; + + /** + * Schedules a command to move backwards in the browser history. + * @return {!promise.Promise.} A promise that will be resolved + * when the navigation event has completed. + */ + back(): promise.Promise; + + /** + * Schedules a command to move forwards in the browser history. + * @return {!promise.Promise.} A promise that will be resolved + * when the navigation event has completed. + */ + forward(): promise.Promise; + + /** + * Schedules a command to refresh the current page. + * @return {!promise.Promise.} A promise that will be resolved + * when the navigation event has completed. + */ + refresh(): promise.Promise; + + // endregion +} + +export interface IWebDriverOptionsCookie { + /** + * The name of the cookie. + */ + name: string; + + /** + * The cookie value. + */ + value: string; + + /** + * The cookie path. Defaults to "/" when adding a cookie. + */ + path?: string | undefined; + + /** + * The domain the cookie is visible to. Defaults to the current browsing + * context's document's URL when adding a cookie. + */ + domain?: string | undefined; + + /** + * Whether the cookie is a secure cookie. Defaults to false when adding a new + * cookie. + */ + secure?: boolean | undefined; + + /** + * Whether the cookie is an HTTP only cookie. Defaults to false when adding a + * new cookie. + */ + httpOnly?: boolean | undefined; + + /** + * When the cookie expires. + * + * When {@linkplain Options#addCookie() adding a cookie}, this may be specified + * in _seconds_ since Unix epoch (January 1, 1970). The expiry will default to + * 20 years in the future if omitted. + * + * The expiry is always returned in seconds since epoch when + * {@linkplain Options#getCookies() retrieving cookies} from the browser. + */ + expiry?: number | Date | undefined; +} + +export interface IWebDriverCookie extends IWebDriverOptionsCookie { + /** + * When the cookie expires. + * + * The expiry is always returned in seconds since epoch when + * {@linkplain Options#getCookies() retrieving cookies} from the browser. + */ + expiry?: number | undefined; +} + +/** + * Provides methods for managing browser and driver state. + */ +export class Options { + // region Constructors + + /** + * @param {!WebDriver} driver The parent driver. + */ + constructor(driver: WebDriver); + + // endregion + + // region Methods + + /** + * Schedules a command to add a cookie. + * @param {IWebDriverOptionsCookie} spec Defines the cookie to add. + * @return {!promise.Promise} A promise that will be resolved + * when the cookie has been added to the page. + * @throws {error.InvalidArgumentError} if any of the cookie parameters are + * invalid. + * @throws {TypeError} if `spec` is not a cookie object. + */ + addCookie(spec: IWebDriverOptionsCookie): promise.Promise; + + /** + * Schedules a command to delete all cookies visible to the current page. + * @return {!promise.Promise} A promise that will be resolved when all + * cookies have been deleted. + */ + deleteAllCookies(): promise.Promise; + + /** + * Schedules a command to delete the cookie with the given name. This command is + * a no-op if there is no cookie with the given name visible to the current + * page. + * @param {string} name The name of the cookie to delete. + * @return {!promise.Promise} A promise that will be resolved when the + * cookie has been deleted. + */ + deleteCookie(name: string): promise.Promise; + + /** + * Schedules a command to retrieve all cookies visible to the current page. + * Each cookie will be returned as a JSON object as described by the WebDriver + * wire protocol. + * @return {!promise.Promise} A promise that will be resolved with the + * cookies visible to the current page. + * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object + */ + getCookies(): promise.Promise; + + /** + * Schedules a command to retrieve the cookie with the given name. Returns null + * if there is no such cookie. The cookie will be returned as a JSON object as + * described by the WebDriver wire protocol. + * @param {string} name The name of the cookie to retrieve. + * @return {!promise.Promise} A promise that will be resolved with the + * named cookie, or {@code null} if there is no such cookie. + * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object + */ + getCookie(name: string): promise.Promise; + + /** + * @return {!Logs} The interface for managing driver + * logs. + */ + logs(): Logs; + + /** + * @return {!Timeouts} The interface for managing driver + * timeouts. + */ + timeouts(): Timeouts; + + /** + * @return {!Window} The interface for managing the + * current window. + */ + window(): Window; + + // endregion +} + +/** + * An interface for managing timeout behavior for WebDriver instances. + */ +export class Timeouts { + // region Constructors + + /** + * @param {!WebDriver} driver The parent driver. + */ + constructor(driver: WebDriver); + + // endregion + + // region Methods + + /** + * Specifies the amount of time the driver should wait when searching for an + * element if it is not immediately present. + *

+ * When searching for a single element, the driver should poll the page + * until the element has been found, or this timeout expires before failing + * with a {@code bot.ErrorCode.NO_SUCH_ELEMENT} error. When searching + * for multiple elements, the driver should poll the page until at least one + * element has been found or this timeout has expired. + *

+ * Setting the wait timeout to 0 (its default value), disables implicit + * waiting. + *

+ * Increasing the implicit wait timeout should be used judiciously as it + * will have an adverse effect on test run time, especially when used with + * slower location strategies like XPath. + * + * @param {number} ms The amount of time to wait, in milliseconds. + * @return {!promise.Promise} A promise that will be resolved when the + * implicit wait timeout has been set. + */ + implicitlyWait(ms: number): promise.Promise; + + /** + * Sets the amount of time to wait, in milliseconds, for an asynchronous script + * to finish execution before returning an error. If the timeout is less than or + * equal to 0, the script will be allowed to run indefinitely. + * + * @param {number} ms The amount of time to wait, in milliseconds. + * @return {!promise.Promise} A promise that will be resolved when the + * script timeout has been set. + */ + setScriptTimeout(ms: number): promise.Promise; + + /** + * Sets the amount of time to wait for a page load to complete before returning + * an error. If the timeout is negative, page loads may be indefinite. + * @param {number} ms The amount of time to wait, in milliseconds. + * @return {!promise.Promise} A promise that will be resolved when + * the timeout has been set. + */ + pageLoadTimeout(ms: number): promise.Promise; + + // endregion +} + +/** + * An interface for managing the current window. + */ +export class Window { + // region Constructors + + /** + * @param {!WebDriver} driver The parent driver. + */ + constructor(driver: WebDriver); + + // endregion + + // region Methods + + /** + * Retrieves the window's current position, relative to the top left corner of + * the screen. + * @return {!promise.Promise} A promise that will be resolved with the + * window's position in the form of a {x:number, y:number} object literal. + */ + getPosition(): promise.Promise; + + /** + * Repositions the current window. + * @param {number} x The desired horizontal position, relative to the left side + * of the screen. + * @param {number} y The desired vertical position, relative to the top of the + * of the screen. + * @return {!promise.Promise} A promise that will be resolved when the + * command has completed. + */ + setPosition(x: number, y: number): promise.Promise; + + /** + * Retrieves the window's current size. + * @return {!promise.Promise} A promise that will be resolved with the + * window's size in the form of a {width:number, height:number} object + * literal. + */ + getSize(): promise.Promise; + + /** + * Resizes the current window. + * @param {number} width The desired window width. + * @param {number} height The desired window height. + * @return {!promise.Promise} A promise that will be resolved when the + * command has completed. + */ + setSize(width: number, height: number): promise.Promise; + + /** + * Maximizes the current window. + * @return {!promise.Promise} A promise that will be resolved when the + * command has completed. + */ + maximize(): promise.Promise; + + // endregion +} + +/** + * Interface for managing WebDriver log records. + */ +export class Logs { + // region Constructors + + /** + * @param {!WebDriver} driver The parent driver. + */ + constructor(driver: WebDriver); + + // endregion + + // region + + /** + * Fetches available log entries for the given type. + * + *

Note that log buffers are reset after each call, meaning that + * available log entries correspond to those entries not yet returned for a + * given log type. In practice, this means that this call will return the + * available log entries since the last call, or from the start of the + * session. + * + * @param {!logging.Type} type The desired log type. + * @return {!promise.Promise.>} A + * promise that will resolve to a list of log entries for the specified + * type. + */ + get(type: string): promise.Promise; + + /** + * Retrieves the log types available to this driver. + * @return {!promise.Promise.>} A + * promise that will resolve to a list of available log types. + */ + getAvailableLogTypes(): promise.Promise; + + // endregion +} + +/** + * An interface for changing the focus of the driver to another frame or window. + */ +export class TargetLocator { + // region Constructors + + /** + * @param {!WebDriver} driver The parent driver. + */ + constructor(driver: WebDriver); + + // endregion + + // region Methods + + /** + * Schedules a command retrieve the {@code document.activeElement} element on + * the current document, or {@code document.body} if activeElement is not + * available. + * @return {!WebElement} The active element. + */ + activeElement(): WebElementPromise; + + /** + * Schedules a command to switch focus of all future commands to the first frame + * on the page. + * @return {!promise.Promise} A promise that will be resolved when the + * driver has changed focus to the default content. + */ + defaultContent(): promise.Promise; + + /** + * Schedules a command to switch the focus of all future commands to another + * frame on the page. The target frame may be specified as one of the + * following: + * + * - A number that specifies a (zero-based) index into [window.frames]( + * https://developer.mozilla.org/en-US/docs/Web/API/Window.frames). + * - A {@link WebElement} reference, which correspond to a `frame` or `iframe` + * DOM element. + * - The `null` value, to select the topmost frame on the page. Passing `null` + * is the same as calling {@link #defaultContent defaultContent()}. + * + * If the specified frame can not be found, the returned promise will be + * rejected with a {@linkplain error.NoSuchFrameError}. + * + * @param {(number|WebElement|null)} id The frame locator. + * @return {!promise.Promise} A promise that will be resolved + * when the driver has changed focus to the specified frame. + */ + frame(nameOrIndex: number | WebElement | null): promise.Promise; + + /** + * Schedules a command to switch the focus of all future commands to another + * window. Windows may be specified by their {@code window.name} attribute or + * by its handle (as returned by {@link WebDriver#getWindowHandles}). + * + * If the specified window cannot be found, the returned promise will be + * rejected with a {@linkplain error.NoSuchWindowError}. + * + * @param {string} nameOrHandle The name or window handle of the window to + * switch focus to. + * @return {!promise.Promise} A promise that will be resolved + * when the driver has changed focus to the specified window. + */ + window(nameOrHandle: string): promise.Promise; + + /** + * Schedules a command to change focus to the active modal dialog, such as + * those opened by `window.alert()`, `window.confirm()`, and + * `window.prompt()`. The returned promise will be rejected with a + * {@linkplain error.NoSuchAlertError} if there are no open alerts. + * + * @return {!AlertPromise} The open alert. + */ + alert(): AlertPromise; + + // endregion +} + +/** + * Used with {@link WebElement#sendKeys WebElement#sendKeys} on file + * input elements ({@code }) to detect when the entered key + * sequence defines the path to a file. + * + * By default, {@linkplain WebElement WebElement's} will enter all + * key sequences exactly as entered. You may set a + * {@linkplain WebDriver#setFileDetector file detector} on the parent + * WebDriver instance to define custom behavior for handling file elements. Of + * particular note is the {@link selenium-webdriver/remote.FileDetector}, which + * should be used when running against a remote + * [Selenium Server](http://docs.seleniumhq.org/download/). + */ +export class FileDetector { + constructor(); + + /** + * Handles the file specified by the given path, preparing it for use with + * the current browser. If the path does not refer to a valid file, it will + * be returned unchanged, otherwisee a path suitable for use with the current + * browser will be returned. + * + * This default implementation is a no-op. Subtypes may override this + * function for custom tailored file handling. + * + * @param {!WebDriver} driver The driver for the current browser. + * @param {string} path The path to process. + * @return {!promise.Promise} A promise for the processed + * file path. + * @package + */ + handleFile(driver: WebDriver, path: string): promise.Promise; +} + +export type CreateSessionCapabilities = + | Capabilities + | { + desired?: Capabilities | undefined; + required?: Capabilities | undefined; + }; + +/** + * Creates a new WebDriver client, which provides control over a browser. + * + * Every WebDriver command returns a {@code promise.Promise} that + * represents the result of that command. Callbacks may be registered on this + * object to manipulate the command result or catch an expected error. Any + * commands scheduled with a callback are considered sub-commands and will + * execute before the next command in the current frame. For example: + * + * var message = []; + * driver.call(message.push, message, 'a').then(function() { + * driver.call(message.push, message, 'b'); + * }); + * driver.call(message.push, message, 'c'); + * driver.call(function() { + * alert('message is abc? ' + (message.join('') == 'abc')); + * }); + */ +export class WebDriver { + // region Constructors + + /** + * @param {!(Session|promise.Promise)} session Either a + * known session or a promise that will be resolved to a session. + * @param {!command.Executor} executor The executor to use when sending + * commands to the browser. + * @param {promise.ControlFlow=} opt_flow The flow to + * schedule commands through. Defaults to the active flow object. + */ + constructor(session: Session | promise.Promise, executor: Executor, opt_flow?: promise.ControlFlow); + + // endregion + + // region StaticMethods + + /** + * Creates a new WebDriver client for an existing session. + * @param {!command.Executor} executor Command executor to use when querying + * for session details. + * @param {string} sessionId ID of the session to attach to. + * @param {promise.ControlFlow=} opt_flow The control flow all + * driver commands should execute under. Defaults to the + * {@link promise.controlFlow() currently active} control flow. + * @return {!WebDriver} A new client for the specified session. + */ + static attachToSession(executor: Executor, sessionId: string, opt_flow?: promise.ControlFlow): WebDriver; + + /** + * Creates a new WebDriver session. + * + * By default, the requested session `capabilities` are merely "desired" and + * the remote end will still create a new session even if it cannot satisfy + * all of the requested capabilities. You can query which capabilities a + * session actually has using the + * {@linkplain #getCapabilities() getCapabilities()} method on the returned + * WebDriver instance. + * + * To define _required capabilities_, provide the `capabilities` as an object + * literal with `required` and `desired` keys. The `desired` key may be + * omitted if all capabilities are required, and vice versa. If the server + * cannot create a session with all of the required capabilities, it will + * return an {@linkplain error.SessionNotCreatedError}. + * + * let required = new Capabilities().set('browserName', 'firefox'); + * let desired = new Capabilities().set('version', '45'); + * let driver = WebDriver.createSession(executor, {required, desired}); + * + * This function will always return a WebDriver instance. If there is an error + * creating the session, such as the aforementioned SessionNotCreatedError, + * the driver will have a rejected {@linkplain #getSession session} promise. + * It is recommended that this promise is left _unhandled_ so it will + * propagate through the {@linkplain promise.ControlFlow control flow} and + * cause subsequent commands to fail. + * + * let required = Capabilities.firefox(); + * let driver = WebDriver.createSession(executor, {required}); + * + * // If the createSession operation failed, then this command will also + * // also fail, propagating the creation failure. + * driver.get('http://www.google.com').catch(e => console.log(e)); + * + * @param {!command.Executor} executor The executor to create the new session + * with. + * @param {(!Capabilities| + * {desired: (Capabilities|undefined), + * required: (Capabilities|undefined)})} capabilities The desired + * capabilities for the new session. + * @param {promise.ControlFlow=} opt_flow The control flow all driver + * commands should execute under, including the initial session creation. + * Defaults to the {@link promise.controlFlow() currently active} + * control flow. + * @param {(function(new: WebDriver, + * !IThenable, + * !command.Executor, + * promise.ControlFlow=))=} opt_ctor + * A reference to the constructor of the specific type of WebDriver client + * to instantiate. Will create a vanilla {@linkplain WebDriver} instance + * if a constructor is not provided. + * @param {(function(this: void): ?)=} opt_onQuit A callback to invoke when + * the newly created session is terminated. This should be used to clean + * up any resources associated with the session. + * @return {!WebDriver} The driver for the newly created session. + */ + // This method's arguments are untyped so that its overloads can have correct types. + // Typescript doesn't allow static methods to be overridden with incompatible signatures. + static createSession(...var_args: any[]): WebDriver; + + // endregion + + // region Methods + + /** + * @return {!promise.ControlFlow} The control flow used by this + * instance. + */ + controlFlow(): promise.ControlFlow; + + /** + * Schedules a {@link command.Command} to be executed by this driver's + * {@link command.Executor}. + * + * @param {!command.Command} command The command to schedule. + * @param {string} description A description of the command for debugging. + * @return {!promise.Promise} A promise that will be resolved + * with the command result. + * @template T + */ + schedule(command: Command, description: string): promise.Promise; + + /** + * Sets the {@linkplain input.FileDetector file detector} that should be + * used with this instance. + * @param {input.FileDetector} detector The detector to use or {@code null}. + */ + setFileDetector(detector: FileDetector): void; + + /** + * @return {!promise.Promise.} A promise for this + * client's session. + */ + getSession(): promise.Promise; + + /** + * @return {!promise.Promise.} A promise + * that will resolve with the this instance's capabilities. + */ + getCapabilities(): promise.Promise; + + /** + * Schedules a command to quit the current session. After calling quit, this + * instance will be invalidated and may no longer be used to issue commands + * against the browser. + * @return {!promise.Promise.} A promise that will be resolved + * when the command has completed. + */ + quit(): promise.Promise; + + /** + * Creates a new action sequence using this driver. The sequence will not be + * scheduled for execution until {@link actions.ActionSequence#perform} is + * called. Example: + * + * driver.actions(). + * mouseDown(element1). + * mouseMove(element2). + * mouseUp(). + * perform(); + * + * @return {!actions.ActionSequence} A new action sequence for this instance. + */ + actions(): ActionSequence; + + /** + * Creates a new touch sequence using this driver. The sequence will not be + * scheduled for execution until {@link actions.TouchSequence#perform} is + * called. Example: + * + * driver.touchActions(). + * tap(element1). + * doubleTap(element2). + * perform(); + * + * @return {!actions.TouchSequence} A new touch sequence for this instance. + */ + touchActions(): TouchSequence; + + /** + * Schedules a command to execute JavaScript in the context of the currently + * selected frame or window. The script fragment will be executed as the body + * of an anonymous function. If the script is provided as a function object, + * that function will be converted to a string for injection into the target + * window. + * + * Any arguments provided in addition to the script will be included as script + * arguments and may be referenced using the {@code arguments} object. + * Arguments may be a boolean, number, string, or {@code WebElement}. + * Arrays and objects may also be used as script arguments as long as each item + * adheres to the types previously mentioned. + * + * The script may refer to any variables accessible from the current window. + * Furthermore, the script will execute in the window's context, thus + * {@code document} may be used to refer to the current document. Any local + * variables will not be available once the script has finished executing, + * though global variables will persist. + * + * If the script has a return value (i.e. if the script contains a return + * statement), then the following steps will be taken for resolving this + * functions return value: + * + * - For a HTML element, the value will resolve to a + * {@link WebElement} + * - Null and undefined return values will resolve to null + * - Booleans, numbers, and strings will resolve as is + * - Functions will resolve to their string representation + * - For arrays and objects, each member item will be converted according to + * the rules above + * + * @param {!(string|Function)} script The script to execute. + * @param {...*} var_args The arguments to pass to the script. + * @return {!promise.Promise.} A promise that will resolve to the + * scripts return value. + * @template T + */ + executeScript(script: string | Function, ...var_args: any[]): promise.Promise; + + /** + * Schedules a command to execute asynchronous JavaScript in the context of the + * currently selected frame or window. The script fragment will be executed as + * the body of an anonymous function. If the script is provided as a function + * object, that function will be converted to a string for injection into the + * target window. + * + * Any arguments provided in addition to the script will be included as script + * arguments and may be referenced using the {@code arguments} object. + * Arguments may be a boolean, number, string, or {@code WebElement}. + * Arrays and objects may also be used as script arguments as long as each item + * adheres to the types previously mentioned. + * + * Unlike executing synchronous JavaScript with {@link #executeScript}, + * scripts executed with this function must explicitly signal they are finished + * by invoking the provided callback. This callback will always be injected + * into the executed function as the last argument, and thus may be referenced + * with {@code arguments[arguments.length - 1]}. The following steps will be + * taken for resolving this functions return value against the first argument + * to the script's callback function: + * + * - For a HTML element, the value will resolve to a + * {@link WebElement} + * - Null and undefined return values will resolve to null + * - Booleans, numbers, and strings will resolve as is + * - Functions will resolve to their string representation + * - For arrays and objects, each member item will be converted according to + * the rules above + * + * __Example #1:__ Performing a sleep that is synchronized with the currently + * selected window: + * + * var start = new Date().getTime(); + * driver.executeAsyncScript( + * 'window.setTimeout(arguments[arguments.length - 1], 500);'). + * then(function() { + * console.log( + * 'Elapsed time: ' + (new Date().getTime() - start) + ' ms'); + * }); + * + * __Example #2:__ Synchronizing a test with an AJAX application: + * + * var button = driver.findElement(By.id('compose-button')); + * button.click(); + * driver.executeAsyncScript( + * 'var callback = arguments[arguments.length - 1];' + + * 'mailClient.getComposeWindowWidget().onload(callback);'); + * driver.switchTo().frame('composeWidget'); + * driver.findElement(By.id('to')).sendKeys('dog@example.com'); + * + * __Example #3:__ Injecting a XMLHttpRequest and waiting for the result. In + * this example, the inject script is specified with a function literal. When + * using this format, the function is converted to a string for injection, so it + * should not reference any symbols not defined in the scope of the page under + * test. + * + * driver.executeAsyncScript(function() { + * var callback = arguments[arguments.length - 1]; + * var xhr = new XMLHttpRequest(); + * xhr.open('GET', '/resource/data.json', true); + * xhr.onreadystatechange = function() { + * if (xhr.readyState == 4) { + * callback(xhr.responseText); + * } + * } + * xhr.send(''); + * }).then(function(str) { + * console.log(JSON.parse(str)['food']); + * }); + * + * @param {!(string|Function)} script The script to execute. + * @param {...*} var_args The arguments to pass to the script. + * @return {!promise.Promise.} A promise that will resolve to the + * scripts return value. + * @template T + */ + executeAsyncScript(script: string | Function, ...var_args: any[]): promise.Promise; + + /** + * Schedules a command to execute a custom function. + * @param {function(...): (T|promise.Promise.)} fn The function to + * execute. + * @param {Object=} opt_scope The object in whose scope to execute the function. + * @param {...*} var_args Any arguments to pass to the function. + * @return {!promise.Promise.} A promise that will be resolved' + * with the function's result. + * @template T + */ + call( + fn: (...var_args: any[]) => T | promise.Promise, + opt_scope?: any, + ...var_args: any[] + ): promise.Promise; + + /** + * Schedules a command to wait for a condition to hold. The condition may be + * specified by a {@link Condition}, as a custom function, or + * as a {@link promise.Promise}. + * + * For a {@link Condition} or function, the wait will repeatedly + * evaluate the condition until it returns a truthy value. If any errors occur + * while evaluating the condition, they will be allowed to propagate. In the + * event a condition returns a {@link promise.Promise promise}, the + * polling loop will wait for it to be resolved and use the resolved value for + * whether the condition has been satisified. Note the resolution time for + * a promise is factored into whether a wait has timed out. + * + * Note, if the provided condition is a {@link WebElementCondition}, then + * the wait will return a {@link WebElementPromise} that will resolve to the + * element that satisified the condition. + * + * *Example:* waiting up to 10 seconds for an element to be present and visible + * on the page. + * + * var button = driver.wait(until.elementLocated(By.id('foo'), 10000); + * button.click(); + * + * This function may also be used to block the command flow on the resolution + * of a {@link promise.Promise promise}. When given a promise, the + * command will simply wait for its resolution before completing. A timeout may + * be provided to fail the command if the promise does not resolve before the + * timeout expires. + * + * *Example:* Suppose you have a function, `startTestServer`, that returns a + * promise for when a server is ready for requests. You can block a `WebDriver` + * client on this promise with: + * + * var started = startTestServer(); + * driver.wait(started, 5 * 1000, 'Server should start within 5 seconds'); + * driver.get(getServerUrl()); + * + * @param {!WebElementCondition} condition The condition to + * wait on, defined as a promise, condition object, or a function to + * evaluate as a condition. + * @param {number=} opt_timeout How long to wait for the condition to be true. + * @param {string=} opt_message An optional message to use if the wait times + * out. + * @return {!WebElementPromise} A promise that will be fulfilled + * with the first truthy value returned by the condition function, or + * rejected if the condition times out. + * @template T + */ + wait(condition: WebElementCondition, opt_timeout?: number, opt_message?: string): WebElementPromise; + + /** + * Schedules a command to wait for a condition to hold. The condition may be + * specified by a {@link webdriver.Condition}, as a custom function, or + * as a {@link webdriver.promise.Promise}. + * + * For a {@link webdriver.Condition} or function, the wait will repeatedly + * evaluate the condition until it returns a truthy value. If any errors occur + * while evaluating the condition, they will be allowed to propagate. In the + * event a condition returns a {@link webdriver.promise.Promise promise}, the + * polling loop will wait for it to be resolved and use the resolved value for + * whether the condition has been satisified. Note the resolution time for + * a promise is factored into whether a wait has timed out. + * + * Note, if the provided condition is a {@link WebElementCondition}, then + * the wait will return a {@link WebElementPromise} that will resolve to the + * element that satisified the condition. + * + * *Example:* waiting up to 10 seconds for an element to be present and visible + * on the page. + * + * var button = driver.wait(until.elementLocated(By.id('foo'), 10000); + * button.click(); + * + * This function may also be used to block the command flow on the resolution + * of a {@link webdriver.promise.Promise promise}. When given a promise, the + * command will simply wait for its resolution before completing. A timeout may + * be provided to fail the command if the promise does not resolve before the + * timeout expires. + * + * *Example:* Suppose you have a function, `startTestServer`, that returns a + * promise for when a server is ready for requests. You can block a `WebDriver` + * client on this promise with: + * + * var started = startTestServer(); + * driver.wait(started, 5 * 1000, 'Server should start within 5 seconds'); + * driver.get(getServerUrl()); + * + * @param {!(promise.Promise| + * Condition| + * function(!WebDriver): T)} condition The condition to + * wait on, defined as a promise, condition object, or a function to + * evaluate as a condition. + * @param {number=} opt_timeout How long to wait for the condition to be true. + * @param {string=} opt_message An optional message to use if the wait times + * out. + * @return {!promise.Promise} A promise that will be fulfilled + * with the first truthy value returned by the condition function, or + * rejected if the condition times out. + * @template T + */ + wait( + condition: PromiseLike | Condition | ((driver: WebDriver) => T | PromiseLike) | Function, + opt_timeout?: number, + opt_message?: string, + ): promise.Promise; + + /** + * Schedules a command to make the driver sleep for the given amount of time. + * @param {number} ms The amount of time, in milliseconds, to sleep. + * @return {!promise.Promise.} A promise that will be resolved + * when the sleep has finished. + */ + sleep(ms: number): promise.Promise; + + /** + * Schedules a command to retrieve they current window handle. + * @return {!promise.Promise.} A promise that will be + * resolved with the current window handle. + */ + getWindowHandle(): promise.Promise; + + /** + * Schedules a command to retrieve the current list of available window handles. + * @return {!promise.Promise.>} A promise that will + * be resolved with an array of window handles. + */ + getAllWindowHandles(): promise.Promise; + + /** + * Schedules a command to retrieve the current page's source. The page source + * returned is a representation of the underlying DOM: do not expect it to be + * formatted or escaped in the same way as the response sent from the web + * server. + * @return {!promise.Promise.} A promise that will be + * resolved with the current page source. + */ + getPageSource(): promise.Promise; + + /** + * Schedules a command to close the current window. + * @return {!promise.Promise.} A promise that will be resolved + * when this command has completed. + */ + close(): promise.Promise; + + /** + * Schedules a command to navigate to the given URL. + * @param {string} url The fully qualified URL to open. + * @return {!promise.Promise.} A promise that will be resolved + * when the document has finished loading. + */ + get(url: string): promise.Promise; + + /** + * Schedules a command to retrieve the URL of the current page. + * @return {!promise.Promise.} A promise that will be + * resolved with the current URL. + */ + getCurrentUrl(): promise.Promise; + + /** + * Schedules a command to retrieve the current page's title. + * @return {!promise.Promise.} A promise that will be + * resolved with the current page's title. + */ + getTitle(): promise.Promise; + + /** + * Schedule a command to find an element on the page. If the element cannot be + * found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned + * by the driver. Unlike other commands, this error cannot be suppressed. In + * other words, scheduling a command to find an element doubles as an assert + * that the element is present on the page. To test whether an element is + * present on the page, use {@link #findElements}. + * + * The search criteria for an element may be defined using one of the + * factories in the {@link By} namespace, or as a short-hand + * {@link By.Hash} object. For example, the following two statements + * are equivalent: + * + * var e1 = driver.findElement(By.id('foo')); + * var e2 = driver.findElement({id:'foo'}); + * + * You may also provide a custom locator function, which takes as input this + * instance and returns a {@link WebElement}, or a promise that will resolve + * to a WebElement. If the returned promise resolves to an array of + * WebElements, WebDriver will use the first element. For example, to find the + * first visible link on a page, you could write: + * + * var link = driver.findElement(firstVisibleLink); + * + * function firstVisibleLink(driver) { + * var links = driver.findElements(By.tagName('a')); + * return promise.filter(links, function(link) { + * return link.isDisplayed(); + * }); + * } + * + * @param {!(by.By|Function)} locator The locator to use. + * @return {!WebElementPromise} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator: Locator): WebElementPromise; + + /** + * Schedule a command to search for multiple elements on the page. + * + * @param {!(by.By|Function)} locator The locator to use. + * @return {!promise.Promise.>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator: Locator): promise.Promise; + + /** + * Schedule a command to take a screenshot. The driver makes a best effort to + * return a screenshot of the following, in order of preference: + * + * 1. Entire page + * 2. Current window + * 3. Visible portion of the current frame + * 4. The entire display containing the browser + * + * @return {!promise.Promise} A promise that will be + * resolved to the screenshot as a base-64 encoded PNG. + */ + takeScreenshot(): promise.Promise; + + /** + * @return {!Options} The options interface for this + * instance. + */ + manage(): Options; + + /** + * @return {!Navigation} The navigation interface for this + * instance. + */ + navigate(): Navigation; + + /** + * @return {!TargetLocator} The target locator interface for + * this instance. + */ + switchTo(): TargetLocator; + + // endregion +} + +/** + * A thenable wrapper around a {@linkplain webdriver.IWebDriver IWebDriver} + * instance that allows commands to be issued directly instead of having to + * repeatedly call `then`: + * + * let driver = new Builder().build(); + * driver.then(d => d.get(url)); // You can do this... + * driver.get(url); // ...or this + * + * If the driver instance fails to resolve (e.g. the session cannot be created), + * every issued command will fail. + * + * @interface + */ +export interface ThenableWebDriver extends WebDriver, promise.IThenable {} + +export interface IWebElementId { + [ELEMENT: string]: string; +} + +/** + * Represents a DOM element. WebElements can be found by searching from the + * document root using a {@code WebDriver} instance, or by searching + * under another {@code WebElement}: + *


+ *   driver.get('http://www.google.com');
+ *   var searchForm = driver.findElement(By.tagName('form'));
+ *   var searchBox = searchForm.findElement(By.name('q'));
+ *   searchBox.sendKeys('webdriver');
+ * 
+ * + * The WebElement is implemented as a promise for compatibility with the promise + * API. It will always resolve itself when its internal state has been fully + * resolved and commands may be issued against the element. This can be used to + * catch errors when an element cannot be located on the page: + *

+ *   driver.findElement(By.id('not-there')).then(function(element) {
+ *     alert('Found an element that was not expected to be there!');
+ *   }, function(error) {
+ *     alert('The element was not found, as expected');
+ *   });
+ * 
+ */ +export interface IWebElement { + // region Methods + + /** + * Schedules a command to click on this element. + * @return {!promise.Promise} A promise that will be resolved when + * the click command has completed. + */ + click(): promise.Promise; + + /** + * Schedules a command to type a sequence on the DOM element represented by + * this instance. + * + * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is + * processed in the key sequence, that key state is toggled until one of the + * following occurs: + * + * - The modifier key is encountered again in the sequence. At this point the + * state of the key is toggled (along with the appropriate keyup/down + * events). + * - The {@link input.Key.NULL} key is encountered in the sequence. When + * this key is encountered, all modifier keys current in the down state are + * released (with accompanying keyup events). The NULL key can be used to + * simulate common keyboard shortcuts: + * + * element.sendKeys('text was', + * Key.CONTROL, 'a', Key.NULL, + * 'now text is'); + * // Alternatively: + * element.sendKeys('text was', + * Key.chord(Key.CONTROL, 'a'), + * 'now text is'); + * + * - The end of the key sequence is encountered. When there are no more keys + * to type, all depressed modifier keys are released (with accompanying + * keyup events). + * + * If this element is a file input ({@code }), the + * specified key sequence should specify the path to the file to attach to + * the element. This is analogous to the user clicking 'Browse...' and entering + * the path into the file select dialog. + * + * var form = driver.findElement(By.css('form')); + * var element = form.findElement(By.css('input[type=file]')); + * element.sendKeys('/path/to/file.txt'); + * form.submit(); + * + * For uploads to function correctly, the entered path must reference a file + * on the _browser's_ machine, not the local machine running this script. When + * running against a remote Selenium server, a {@link input.FileDetector} + * may be used to transparently copy files to the remote machine before + * attempting to upload them in the browser. + * + * __Note:__ On browsers where native keyboard events are not supported + * (e.g. Firefox on OS X), key events will be synthesized. Special + * punctuation keys will be synthesized according to a standard QWERTY en-us + * keyboard layout. + * + * @param {...(number|string|!IThenable<(number|string)>)} var_args The + * sequence of keys to type. Number keys may be referenced numerically or + * by string (1 or '1'). All arguments will be joined into a single + * sequence. + * @return {!promise.Promise} A promise that will be resolved when all + * keys have been typed. + */ + sendKeys(...var_args: Array>): promise.Promise; + + /** + * Schedules a command to query for the tag/node name of this element. + * @return {!promise.Promise} A promise that will be resolved with the + * element's tag name. + */ + getTagName(): promise.Promise; + + /** + * Schedules a command to query for the computed style of the element + * represented by this instance. If the element inherits the named style from + * its parent, the parent will be queried for its value. Where possible, color + * values will be converted to their hex representation (e.g. #00ff00 instead of + * rgb(0, 255, 0)). + *

+ * Warning: the value returned will be as the browser interprets it, so + * it may be tricky to form a proper assertion. + * + * @param {string} cssStyleProperty The name of the CSS style property to look + * up. + * @return {!promise.Promise} A promise that will be resolved with the + * requested CSS value. + */ + getCssValue(cssStyleProperty: string): promise.Promise; + + /** + * Schedules a command to query for the value of the given attribute of the + * element. Will return the current value even if it has been modified after the + * page has been loaded. More exactly, this method will return the value of the + * given attribute, unless that attribute is not present, in which case the + * value of the property with the same name is returned. If neither value is + * set, null is returned. The 'style' attribute is converted as best can be to a + * text representation with a trailing semi-colon. The following are deemed to + * be 'boolean' attributes and will be returned as thus: + * + *

async, autofocus, autoplay, checked, compact, complete, controls, declare, + * defaultchecked, defaultselected, defer, disabled, draggable, ended, + * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, + * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, + * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, + * selected, spellcheck, truespeed, willvalidate + * + *

Finally, the following commonly mis-capitalized attribute/property names + * are evaluated as expected: + *

    + *
  • 'class' + *
  • 'readonly' + *
+ * @param {string} attributeName The name of the attribute to query. + * @return {!promise.Promise} A promise that will be resolved with the + * attribute's value. + */ + getAttribute(attributeName: string): promise.Promise; + + /** + * Get the visible (i.e. not hidden by CSS) innerText of this element, including + * sub-elements, without any leading or trailing whitespace. + * @return {!promise.Promise} A promise that will be resolved with the + * element's visible text. + */ + getText(): promise.Promise; + + /** + * Schedules a command to compute the size of this element's bounding box, in + * pixels. + * @return {!promise.Promise} A promise that will be resolved with the + * element's size as a {@code {width:number, height:number}} object. + */ + getSize(): promise.Promise; + + /** + * Schedules a command to compute the location of this element in page space. + * @return {!promise.Promise} A promise that will be resolved to the + * element's location as a {@code {x:number, y:number}} object. + */ + getLocation(): promise.Promise; + + /** + * Schedules a command to query whether the DOM element represented by this + * instance is enabled, as dicted by the {@code disabled} attribute. + * @return {!promise.Promise} A promise that will be resolved with + * whether this element is currently enabled. + */ + isEnabled(): promise.Promise; + + /** + * Schedules a command to query whether this element is selected. + * @return {!promise.Promise} A promise that will be resolved with + * whether this element is currently selected. + */ + isSelected(): promise.Promise; + + /** + * Schedules a command to submit the form containing this element (or this + * element if it is a FORM element). This command is a no-op if the element is + * not contained in a form. + * @return {!promise.Promise} A promise that will be resolved when + * the form has been submitted. + */ + submit(): promise.Promise; + + /** + * Schedules a command to clear the {@code value} of this element. This command + * has no effect if the underlying DOM element is neither a text INPUT element + * nor a TEXTAREA element. + * @return {!promise.Promise} A promise that will be resolved when + * the element has been cleared. + */ + clear(): promise.Promise; + + /** + * Schedules a command to test whether this element is currently displayed. + * @return {!promise.Promise} A promise that will be resolved with + * whether this element is currently visible on the page. + */ + isDisplayed(): promise.Promise; + + /** + * @return {!promise.Promise.} A promise + * that resolves to this element's JSON representation as defined by the + * WebDriver wire protocol. + * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol + */ + getId(): promise.Promise; + + // endregion +} + +export interface IWebElementFinders { + /** + * Schedule a command to find a descendant of this element. If the element + * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will + * be returned by the driver. Unlike other commands, this error cannot be + * suppressed. In other words, scheduling a command to find an element doubles + * as an assert that the element is present on the page. To test whether an + * element is present on the page, use {@code #findElements}. + * + *

The search criteria for an element may be defined using one of the + * factories in the {@link By} namespace, or as a short-hand + * {@link By.Hash} object. For example, the following two statements + * are equivalent: + *

+     * var e1 = element.findElement(By.id('foo'));
+     * var e2 = element.findElement({id:'foo'});
+     * 
+ * + *

You may also provide a custom locator function, which takes as input + * this WebDriver instance and returns a {@link WebElement}, or a + * promise that will resolve to a WebElement. For example, to find the first + * visible link on a page, you could write: + *

+     * var link = element.findElement(firstVisibleLink);
+     *
+     * function firstVisibleLink(element) {
+     *   var links = element.findElements(By.tagName('a'));
+     *   return promise.filter(links, function(link) {
+     *     return links.isDisplayed();
+     *   }).then(function(visibleLinks) {
+     *     return visibleLinks[0];
+     *   });
+     * }
+     * 
+ * + * @param {!(Locator|By.Hash|Function)} locator The + * locator strategy to use when searching for the element. + * @return {!WebElement} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator: Locator): WebElementPromise; + + /** + * Schedules a command to find all of the descendants of this element that + * match the given search criteria. + * + * @param {!(Locator|By.Hash|Function)} locator The + * locator strategy to use when searching for the elements. + * @return {!promise.Promise.>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator: Locator): promise.Promise; +} + +/** + * Defines an object that can be asynchronously serialized to its WebDriver + * wire representation. + * + * @template T + */ +export interface Serializable { + /** + * Returns either this instance's serialized represention, if immediately + * available, or a promise for its serialized representation. This function is + * conceptually equivalent to objects that have a {@code toJSON()} property, + * except the serialize() result may be a promise or an object containing a + * promise (which are not directly JSON friendly). + * + * @return {!(T|IThenable.)} This instance's serialized wire format. + */ + serialize(): T | promise.IThenable; +} + +/** + * Represents a DOM element. WebElements can be found by searching from the + * document root using a {@link WebDriver} instance, or by searching + * under another WebElement: + * + * driver.get('http://www.google.com'); + * var searchForm = driver.findElement(By.tagName('form')); + * var searchBox = searchForm.findElement(By.name('q')); + * searchBox.sendKeys('webdriver'); + * + * The WebElement is implemented as a promise for compatibility with the promise + * API. It will always resolve itself when its internal state has been fully + * resolved and commands may be issued against the element. This can be used to + * catch errors when an element cannot be located on the page: + * + * driver.findElement(By.id('not-there')).then(function(element) { + * alert('Found an element that was not expected to be there!'); + * }, function(error) { + * alert('The element was not found, as expected'); + * }); + */ +export class WebElement implements Serializable { + /** + * @param {!WebDriver} driver the parent WebDriver instance for this element. + * @param {(!IThenable|string)} id The server-assigned opaque ID for + * the underlying DOM element. + */ + constructor(driver: WebDriver, id: promise.Promise | string); + + /** + * @param {string} id The raw ID. + * @param {boolean=} opt_noLegacy Whether to exclude the legacy element key. + * @return {!Object} The element ID for use with WebDriver's wire protocol. + */ + static buildId(id: string, opt_noLegacy?: boolean): Object; + + /** + * Extracts the encoded WebElement ID from the object. + * + * @param {?} obj The object to extract the ID from. + * @return {string} the extracted ID. + * @throws {TypeError} if the object is not a valid encoded ID. + */ + static extractId(obj: IWebElementId): string; + + /** + * @param {?} obj the object to test. + * @return {boolean} whether the object is a valid encoded WebElement ID. + */ + static isId(obj: IWebElementId): boolean; + + /** + * Compares two WebElements for equality. + * + * @param {!WebElement} a A WebElement. + * @param {!WebElement} b A WebElement. + * @return {!promise.Promise} A promise that will be + * resolved to whether the two WebElements are equal. + */ + static equals(a: WebElement, b: WebElement): promise.Promise; + + /** + * @return {!WebDriver} The parent driver for this instance. + */ + getDriver(): WebDriver; + + /** + * @return {!promise.Promise} A promise that resolves to + * the server-assigned opaque ID assigned to this element. + */ + getId(): promise.Promise; + + /** + * Schedule a command to find a descendant of this element. If the element + * cannot be found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will + * be returned by the driver. Unlike other commands, this error cannot be + * suppressed. In other words, scheduling a command to find an element doubles + * as an assert that the element is present on the page. To test whether an + * element is present on the page, use {@link #findElements}. + * + * The search criteria for an element may be defined using one of the + * factories in the {@link By} namespace, or as a short-hand + * {@link By.Hash} object. For example, the following two statements + * are equivalent: + * + * var e1 = element.findElement(By.id('foo')); + * var e2 = element.findElement({id:'foo'}); + * + * You may also provide a custom locator function, which takes as input + * this WebDriver instance and returns a {@link WebElement}, or a + * promise that will resolve to a WebElement. For example, to find the first + * visible link on a page, you could write: + * + * var link = element.findElement(firstVisibleLink); + * + * function firstVisibleLink(element) { + * var links = element.findElements(By.tagName('a')); + * return promise.filter(links, function(link) { + * return links.isDisplayed(); + * }).then(function(visibleLinks) { + * return visibleLinks[0]; + * }); + * } + * + * @param {!(by.By|Function)} locator The locator strategy to use when + * searching for the element. + * @return {!WebElementPromise} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator: Locator): WebElementPromise; + + /** + * Schedules a command to find all of the descendants of this element that + * match the given search criteria. + * + * @param {!(by.By|Function)} locator The locator strategy to use when + * searching for the element. + * @return {!promise.Promise>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator: Locator): promise.Promise; + + /** + * Schedules a command to click on this element. + * @return {!promise.Promise.} A promise that will be resolved + * when the click command has completed. + */ + click(): promise.Promise; + + /** + * Schedules a command to type a sequence on the DOM element represented by this + * promsieinstance. + * + * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is + * processed in the keysequence, that key state is toggled until one of the + * following occurs: + * + * - The modifier key is encountered again in the sequence. At this point the + * state of the key is toggled (along with the appropriate keyup/down events). + * - The {@link Key.NULL} key is encountered in the sequence. When + * this key is encountered, all modifier keys current in the down state are + * released (with accompanying keyup events). The NULL key can be used to + * simulate common keyboard shortcuts: + * + * element.sendKeys('text was', + * Key.CONTROL, 'a', Key.NULL, + * 'now text is'); + * // Alternatively: + * element.sendKeys('text was', + * Key.chord(Key.CONTROL, 'a'), + * 'now text is'); + * + * - The end of the keysequence is encountered. When there are no more keys + * to type, all depressed modifier keys are released (with accompanying keyup + * events). + * + * If this element is a file input ({@code }), the + * specified key sequence should specify the path to the file to attach to + * the element. This is analgous to the user clicking 'Browse...' and entering + * the path into the file select dialog. + * + * var form = driver.findElement(By.css('form')); + * var element = form.findElement(By.css('input[type=file]')); + * element.sendKeys('/path/to/file.txt'); + * form.submit(); + * + * For uploads to function correctly, the entered path must reference a file + * on the _browser's_ machine, not the local machine running this script. When + * running against a remote Selenium server, a {@link FileDetector} + * may be used to transparently copy files to the remote machine before + * attempting to upload them in the browser. + * + * __Note:__ On browsers where native keyboard events are not supported + * (e.g. Firefox on OS X), key events will be synthesized. Special + * punctionation keys will be synthesized according to a standard QWERTY en-us + * keyboard layout. + * + * @param {...(string|!promise.Promise)} var_args The sequence + * of keys to type. All arguments will be joined into a single sequence. + * @return {!promise.Promise.} A promise that will be resolved + * when all keys have been typed. + */ + sendKeys(...var_args: Array>): promise.Promise; + + /** + * Schedules a command to query for the tag/node name of this element. + * @return {!promise.Promise.} A promise that will be + * resolved with the element's tag name. + */ + getTagName(): promise.Promise; + + /** + * Schedules a command to query for the computed style of the element + * represented by this instance. If the element inherits the named style from + * its parent, the parent will be queried for its value. Where possible, color + * values will be converted to their hex representation (e.g. #00ff00 instead of + * rgb(0, 255, 0)). + * + * _Warning:_ the value returned will be as the browser interprets it, so + * it may be tricky to form a proper assertion. + * + * @param {string} cssStyleProperty The name of the CSS style property to look + * up. + * @return {!promise.Promise} A promise that will be + * resolved with the requested CSS value. + */ + getCssValue(cssStyleProperty: string): promise.Promise; + + /** + * Schedules a command to query for the value of the given attribute of the + * element. Will return the current value, even if it has been modified after + * the page has been loaded. More exactly, this method will return the value of + * the given attribute, unless that attribute is not present, in which case the + * value of the property with the same name is returned. If neither value is + * set, null is returned (for example, the 'value' property of a textarea + * element). The 'style' attribute is converted as best can be to a + * text representation with a trailing semi-colon. The following are deemed to + * be 'boolean' attributes and will return either 'true' or null: + * + * async, autofocus, autoplay, checked, compact, complete, controls, declare, + * defaultchecked, defaultselected, defer, disabled, draggable, ended, + * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, + * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, + * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, + * selected, spellcheck, truespeed, willvalidate + * + * Finally, the following commonly mis-capitalized attribute/property names + * are evaluated as expected: + * + * - 'class' + * - 'readonly' + * + * @param {string} attributeName The name of the attribute to query. + * @return {!promise.Promise.} A promise that will be + * resolved with the attribute's value. The returned value will always be + * either a string or null. + */ + getAttribute(attributeName: string): promise.Promise; + + /** + * Get the visible (i.e. not hidden by CSS) innerText of this element, including + * sub-elements, without any leading or trailing whitespace. + * @return {!promise.Promise.} A promise that will be + * resolved with the element's visible text. + */ + getText(): promise.Promise; + + /** + * Schedules a command to compute the size of this element's bounding box, in + * pixels. + * @return {!promise.Promise.<{width: number, height: number}>} A + * promise that will be resolved with the element's size as a + * {@code {width:number, height:number}} object. + */ + getSize(): promise.Promise; + + /** + * Schedules a command to compute the location of this element in page space. + * @return {!promise.Promise.<{x: number, y: number}>} A promise that + * will be resolved to the element's location as a + * {@code {x:number, y:number}} object. + */ + getLocation(): promise.Promise; + + /** + * Schedules a command to query whether the DOM element represented by this + * instance is enabled, as dicted by the {@code disabled} attribute. + * @return {!promise.Promise.} A promise that will be + * resolved with whether this element is currently enabled. + */ + isEnabled(): promise.Promise; + + /** + * Schedules a command to query whether this element is selected. + * @return {!promise.Promise.} A promise that will be + * resolved with whether this element is currently selected. + */ + isSelected(): promise.Promise; + + /** + * Schedules a command to submit the form containing this element (or this + * element if it is a FORM element). This command is a no-op if the element is + * not contained in a form. + * @return {!promise.Promise.} A promise that will be resolved + * when the form has been submitted. + */ + submit(): promise.Promise; + + /** + * Schedules a command to clear the `value` of this element. This command has + * no effect if the underlying DOM element is neither a text INPUT element + * nor a TEXTAREA element. + * @return {!promise.Promise} A promise that will be resolved + * when the element has been cleared. + */ + clear(): promise.Promise; + + /** + * Schedules a command to test whether this element is currently displayed. + * @return {!promise.Promise.} A promise that will be + * resolved with whether this element is currently visible on the page. + */ + isDisplayed(): promise.Promise; + + /** + * Take a screenshot of the visible region encompassed by this element's + * bounding rectangle. + * + * @param {boolean=} opt_scroll Optional argument that indicates whether the + * element should be scrolled into view before taking a screenshot. + * Defaults to false. + * @return {!promise.Promise} A promise that will be + * resolved to the screenshot as a base-64 encoded PNG. + */ + takeScreenshot(opt_scroll?: boolean): promise.Promise; + + /** @override */ + serialize(): promise.Promise; +} + +/** + * WebElementPromise is a promise that will be fulfilled with a WebElement. + * This serves as a forward proxy on WebElement, allowing calls to be + * scheduled without directly on this instance before the underlying + * WebElement has been fulfilled. In other words, the following two statements + * are equivalent: + *

+ *     driver.findElement({id: 'my-button'}).click();
+ *     driver.findElement({id: 'my-button'}).then(function(el) {
+ *       return el.click();
+ *     });
+ * 
+ * + * @param {!WebDriver} driver The parent WebDriver instance for this + * element. + * @param {!promise.Promise.} el A promise + * that will resolve to the promised element. + * @final + */ +export interface WebElementPromise extends promise.IThenable {} +export class WebElementPromise extends WebElement { + /** + * @param {!WebDriver} driver The parent WebDriver instance for this + * element. + * @param {!promise.Promise} el A promise + * that will resolve to the promised element. + */ + constructor(driver: WebDriver, el: promise.Promise); +} + +/** + * Contains information about a WebDriver session. + */ +export class Session { + // region Constructors + + /** + * @param {string} id The session ID. + * @param {!(Object|Capabilities)} capabilities The session + * capabilities. + */ + constructor(id: string, capabilities: Capabilities | Object); + + // endregion + + // region Methods + + /** + * @return {string} This session's ID. + */ + getId(): string; + + /** + * @return {!Capabilities} This session's capabilities. + */ + getCapabilities(): Capabilities; + + /** + * Retrieves the value of a specific capability. + * @param {string} key The capability to retrieve. + * @return {*} The capability value. + */ + getCapability(key: string): any; + + /** + * Returns the JSON representation of this object, which is just the string + * session ID. + * @return {string} The JSON representation of this Session. + */ + toJSON(): string; + + // endregion +} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts new file mode 100644 index 00000000..7999e0ae --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts @@ -0,0 +1,180 @@ +import * as webdriver from "./index"; +import * as remote from "./remote"; + +/** + * Creates {@link remote.DriverService} instances that manages an + * [OperaDriver](https://github.com/operasoftware/operachromiumdriver) + * server in a child process. + */ +export class ServiceBuilder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the operadriver on the current + * PATH. + * @throws {Error} If provided executable does not exist, or the operadriver + * cannot be found on the PATH. + */ + constructor(opt_exe?: string); + + /** + * Sets the port to start the OperaDriver on. + * @param {number} port The port to use, or 0 for any free port. + * @return {!ServiceBuilder} A self reference. + * @throws {Error} If the port is invalid. + */ + usingPort(port: number): ServiceBuilder; + + /** + * Sets the path of the log file the driver should log to. If a log file is + * not specified, the driver will log to stderr. + * @param {string} path Path of the log file to use. + * @return {!ServiceBuilder} A self reference. + */ + loggingTo(path: string): ServiceBuilder; + + /** + * Enables verbose logging. + * @return {!ServiceBuilder} A self reference. + */ + enableVerboseLogging(): ServiceBuilder; + + /** + * Silence sthe drivers output. + * @return {!ServiceBuilder} A self reference. + */ + silent(): ServiceBuilder; + + /** + * Defines the stdio configuration for the driver service. See + * {@code child_process.spawn} for more information. + * @param {(string|!Array)} + * config The configuration to use. + * @return {!ServiceBuilder} A self reference. + */ + setStdio(config: string | Array): ServiceBuilder; + + /** + * Defines the environment to start the server under. This settings will be + * inherited by every browser session started by the server. + * @param {!Object.} env The environment to use. + * @return {!ServiceBuilder} A self reference. + */ + withEnvironment(env: Object): ServiceBuilder; + + /** + * Creates a new DriverService using this instance's current configuration. + * @return {!remote.DriverService} A new driver service using this instance's + * current configuration. + * @throws {Error} If the driver exectuable was not specified and a default + * could not be found on the current PATH. + */ + build(): remote.DriverService; +} + +/** + * Sets the default service to use for new OperaDriver instances. + * @param {!remote.DriverService} service The service to use. + * @throws {Error} If the default service is currently running. + */ +export function setDefaultService(service: remote.DriverService): any; + +/** + * Returns the default OperaDriver service. If such a service has not been + * configured, one will be constructed using the default configuration for + * a OperaDriver executable found on the system PATH. + * @return {!remote.DriverService} The default OperaDriver service. + */ +export function getDefaultService(): remote.DriverService; + +/** + * Class for managing {@linkplain Driver OperaDriver} specific options. + */ +export class Options { + /** + * Extracts the OperaDriver specific options from the given capabilities + * object. + * @param {!capabilities.Capabilities} caps The capabilities object. + * @return {!Options} The OperaDriver options. + */ + static fromCapabilities(caps: webdriver.Capabilities): Options; + + /** + * Add additional command line arguments to use when launching the Opera + * browser. Each argument may be specified with or without the '--' prefix + * (e.g. '--foo' and 'foo'). Arguments with an associated value should be + * delimited by an '=': 'foo=bar'. + * @param {...(string|!Array.)} var_args The arguments to add. + * @return {!Options} A self reference. + */ + addArguments(...var_args: string[]): Options; + + /** + * Add additional extensions to install when launching Opera. Each extension + * should be specified as the path to the packed CRX file, or a Buffer for an + * extension. + * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The + * extensions to add. + * @return {!Options} A self reference. + */ + addExtensions(...var_args: any[]): Options; + + /** + * Sets the path to the Opera binary to use. On Mac OS X, this path should + * reference the actual Opera executable, not just the application binary. The + * binary path be absolute or relative to the operadriver server executable, but + * it must exist on the machine that will launch Opera. + * + * @param {string} path The path to the Opera binary to use. + * @return {!Options} A self reference. + */ + setOperaBinaryPath(path: string): Options; + + /** + * Sets the logging preferences for the new session. + * @param {!./lib/logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; + + /** + * Sets the proxy settings for the new session. + * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy: webdriver.ProxyConfig): Options; + + /** + * Converts this options instance to a {@link capabilities.Capabilities} + * object. + * @param {capabilities.Capabilities=} opt_capabilities The capabilities to + * merge these options into, if any. + * @return {!capabilities.Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; +} + +export class Driver extends webdriver.WebDriver { + /** + * Creates a new session for Opera. + * + * @param {(capabilities.Capabilities|Options)=} opt_config The configuration + * options. + * @param {remote.DriverService=} opt_service The session to use; will use + * the {@link getDefaultService default service} by default. + * @param {promise.ControlFlow=} opt_flow The control flow to use, + * or {@code null} to use the currently active flow. + * @return {!Driver} A new driver instance. + */ + static createSession( + opt_config?: webdriver.Capabilities | Options, + opt_service?: remote.DriverService, + opt_flow?: webdriver.promise.ControlFlow, + ): Driver; + + /** + * This function is a no-op as file detectors are not supported by this + * implementation. + * @override + */ + setFileDetector(): void; +} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/package.json b/test-eol-project/node_modules/@types/selenium-webdriver/package.json new file mode 100644 index 00000000..55d34aec --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/package.json @@ -0,0 +1,50 @@ +{ + "name": "@types/selenium-webdriver", + "version": "3.0.26", + "description": "TypeScript definitions for selenium-webdriver", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver", + "license": "MIT", + "contributors": [ + { + "name": "Bill Armstrong", + "githubUsername": "BillArmstrong", + "url": "https://github.com/BillArmstrong" + }, + { + "name": "Yuki Kokubun", + "githubUsername": "Kuniwak", + "url": "https://github.com/Kuniwak" + }, + { + "name": "Craig Nishina", + "githubUsername": "cnishina", + "url": "https://github.com/cnishina" + }, + { + "name": "Simon Gellis", + "githubUsername": "SupernaviX", + "url": "https://github.com/SupernaviX" + }, + { + "name": "Ben Dixon", + "githubUsername": "bendxn", + "url": "https://github.com/bendxn" + }, + { + "name": "Ziyu", + "githubUsername": "oddui", + "url": "https://github.com/oddui" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/selenium-webdriver" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "fa3688820548519d3250cc924949bca3d2ac35c1e6219dfa95a7a76f77eeabe8", + "typeScriptVersion": "4.5" +} \ No newline at end of file diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts new file mode 100644 index 00000000..14f3fa1b --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts @@ -0,0 +1,239 @@ +import * as webdriver from "./index"; + +/** + * A record object that defines the configuration options for a DriverService + * instance. + * + * @record + */ +export interface ServiceOptions {} + +/** + * Manages the life and death of a native executable WebDriver server. + * + * It is expected that the driver server implements the + * https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. + * Furthermore, the managed server should support multiple concurrent sessions, + * so that this class may be reused for multiple clients. + */ +export class DriverService { + /** + * @param {string} executable Path to the executable to run. + * @param {!ServiceOptions} options Configuration options for the service. + */ + constructor(executable: string, options: ServiceOptions); + + /** + * @return {!promise.Promise} A promise that resolves to + * the server's address. + * @throws {Error} If the server has not been started. + */ + address(): webdriver.promise.Promise; + + /** + * Returns whether the underlying process is still running. This does not take + * into account whether the process is in the process of shutting down. + * @return {boolean} Whether the underlying service process is running. + */ + isRunning(): boolean; + + /** + * Starts the server if it is not already running. + * @param {number=} opt_timeoutMs How long to wait, in milliseconds, for the + * server to start accepting requests. Defaults to 30 seconds. + * @return {!promise.Promise} A promise that will resolve + * to the server's base URL when it has started accepting requests. If the + * timeout expires before the server has started, the promise will be + * rejected. + */ + start(opt_timeoutMs?: number): webdriver.promise.Promise; + + /** + * Stops the service if it is not currently running. This function will kill + * the server immediately. To synchronize with the active control flow, use + * {@link #stop()}. + * @return {!promise.Promise} A promise that will be resolved when + * the server has been stopped. + */ + kill(): webdriver.promise.Promise; + + /** + * Schedules a task in the current control flow to stop the server if it is + * currently running. + * @return {!promise.Promise} A promise that will be resolved when + * the server has been stopped. + */ + stop(): webdriver.promise.Promise; +} + +export namespace DriverService { + /** + * Creates {@link DriverService} objects that manage a WebDriver server in a + * child process. + */ + class Builder { + /** + * @param {string} exe Path to the executable to use. This executable must + * accept the `--port` flag for defining the port to start the server on. + * @throws {Error} If the provided executable path does not exist. + */ + constructor(exe: string); + + /** + * Define additional command line arguments to use when starting the server. + * + * @param {...CommandLineFlag} var_args The arguments to include. + * @return {!THIS} A self reference. + * @template THIS + */ + addArguments(...var_args: string[]): this; + + /** + * Sets the host name to access the server on. If specified, the + * {@linkplain #setLoopback() loopback} setting will be ignored. + * + * @param {string} hostname + * @return {!DriverService.Builder} A self reference. + */ + setHostname(hostname: string): this; + + /** + * Sets whether the service should be accessed at this host's loopback + * address. + * + * @param {boolean} loopback + * @return {!DriverService.Builder} A self reference. + */ + setLoopback(loopback: boolean): this; + + /** + * Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). + * By default, the driver will accept commands relative to "/". + * + * @param {?string} basePath The base path to use, or `null` to use the + * default. + * @return {!DriverService.Builder} A self reference. + */ + setPath(basePath: string | null): this; + + /** + * Sets the port to start the server on. + * + * @param {number} port The port to use, or 0 for any free port. + * @return {!DriverService.Builder} A self reference. + * @throws {Error} If an invalid port is specified. + */ + setPort(port: number): this; + + /** + * Defines the environment to start the server under. This setting will be + * inherited by every browser session started by the server. By default, the + * server will inherit the enviroment of the current process. + * + * @param {(Map|Object|null)} env The desired + * environment to use, or `null` if the server should inherit the + * current environment. + * @return {!DriverService.Builder} A self reference. + */ + setEnvironment(env: Map | { [name: string]: string } | null): this; + + /** + * IO configuration for the spawned server process. For more information, + * refer to the documentation of `child_process.spawn`. + * + * @param {StdIoOptions} config The desired IO configuration. + * @return {!DriverService.Builder} A self reference. + * @see https://nodejs.org/dist/latest-v4.x/docs/api/child_process.html#child_process_options_stdio + */ + setStdio(config: any): this; + + /** + * Creates a new DriverService using this instance's current configuration. + * + * @return {!DriverService} A new driver service. + */ + build(): DriverService; + } +} + +/** + * Manages the life and death of the + * + * standalone Selenium server. + */ +export class SeleniumServer extends DriverService { + /** + * @param {string} jar Path to the Selenium server jar. + * @param {SeleniumServer.Options=} opt_options Configuration options for the + * server. + * @throws {Error} If the path to the Selenium jar is not specified or if an + * invalid port is specified. + */ + constructor(jar: string, opt_options?: SeleniumServer.Options); +} + +export namespace SeleniumServer { + /** + * Options for the Selenium server + */ + interface Options { + /** Whether the server should only be accessed on this host's loopback address.*/ + loopback?: boolean | undefined; + + /** The port to start the server on (must be > 0). If the port is provided + as a promise, the service will wait for the promise to resolve before starting. */ + port?: number | webdriver.promise.IThenable | undefined; + + /** The arguments to pass to the service. If a promise is provided, the + service will wait for it to resolve before starting. */ + args?: string[] | webdriver.promise.IThenable | undefined; + + /** The arguments to pass to the JVM. If a promise is provided, the service + will wait for it to resolve before starting. */ + jvmArgs?: string[] | webdriver.promise.IThenable | undefined; + + /** The environment variables that should be visible to the server process. + Defaults to inheriting the current process's environment.*/ + env?: { [key: string]: string } | undefined; + + /** IO configuration for the spawned server process. For more information, + refer to the documentation of `child_process.spawn`*/ + stdio?: string | Array | undefined; + } +} + +/** + * A {@link webdriver.FileDetector} that may be used when running + * against a remote + * [Selenium server](http://selenium-release.storage.googleapis.com/index.html). + * + * When a file path on the local machine running this script is entered with + * {@link webdriver.WebElement#sendKeys WebElement#sendKeys}, this file detector + * will transfer the specified file to the Selenium server's host; the sendKeys + * command will be updated to use the transfered file's path. + * + * __Note:__ This class depends on a non-standard command supported on the + * Java Selenium server. The file detector will fail if used with a server that + * only supports standard WebDriver commands (such as the ChromeDriver). + * + * @final + */ +export class FileDetector extends webdriver.FileDetector { + /** */ + constructor(); + + /** + * Prepares a `file` for use with the remote browser. If the provided path + * does not reference a normal file (i.e. it does not exist or is a + * directory), then the promise returned by this method will be resolved with + * the original file path. Otherwise, this method will upload the file to the + * remote server, which will return the file's path on the remote system so + * it may be referenced in subsequent commands. + * + * @param {!webdriver.WebDriver} driver The driver for the current browser. + * @param {string} file The path of the file to process. + * @return {!webdriver.promise.Promise} A promise for the processed + * file path. + */ + handleFile(driver: webdriver.WebDriver, file: string): webdriver.promise.Promise; +} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts new file mode 100644 index 00000000..3e9ab602 --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts @@ -0,0 +1,90 @@ +import * as webdriver from "./index"; + +export class Server {} + +/** + * @return {!Promise} A promise that will resolve with the path + * to Safari on the current system. + */ +export function findSafariExecutable(): any; + +/** + * @param {string} serverUrl The URL to connect to. + * @return {!Promise} A promise for the path to a file that Safari can + * open on start-up to trigger a new connection to the WebSocket server. + */ +export function createConnectFile(serverUrl: string): any; + +/** + * Deletes all session data files if so desired. + * @param {!Object} desiredCapabilities . + * @return {!Array} A list of promises for the deleted files. + */ +export function cleanSession(desiredCapabilities: webdriver.Capabilities): any[]; + +/** @return {string} . */ +export function getRandomString(): string; + +/** */ +export class CommandExecutor {} + +/** + * Configuration options specific to the {@link Driver SafariDriver}. + */ +export class Options { + /** + * Extracts the SafariDriver specific options from the given capabilities + * object. + * @param {!Capabilities} capabilities The capabilities object. + * @return {!Options} The ChromeDriver options. + */ + static fromCapabilities(capabilities: webdriver.Capabilities): Options; + + /** + * Sets whether to force Safari to start with a clean session. Enabling this + * option will cause all global browser data to be deleted. + * @param {boolean} clean Whether to make sure the session has no cookies, + * cache entries, local storage, or databases. + * @return {!Options} A self reference. + */ + setCleanSession(clean: boolean): Options; + + /** + * Sets the logging preferences for the new session. + * @param {!./lib/logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; + + /** + * Converts this options instance to a {@link Capabilities} object. + * @param {Capabilities=} opt_capabilities The capabilities to + * merge these options into, if any. + * @return {!Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; +} + +/** + * A WebDriver client for Safari. This class should never be instantiated + * directly; instead, use the {@linkplain ./builder.Builder Builder}: + * + * var driver = new Builder() + * .forBrowser('safari') + * .build(); + */ +export class Driver extends webdriver.WebDriver { + /** + * Creates a new Safari session. + * + * @param {(Options|Capabilities)=} opt_config The configuration + * options for the new session. + * @param {promise.ControlFlow=} opt_flow The control flow to create + * the driver under. + * @return {!Driver} A new driver instance. + */ + static createSession( + opt_config?: Options | webdriver.Capabilities, + opt_flow?: webdriver.promise.ControlFlow, + ): Driver; +} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts new file mode 100644 index 00000000..3e267049 --- /dev/null +++ b/test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts @@ -0,0 +1,106 @@ +import { promise } from "./index"; +import * as Testing from "./testing"; + +export const describe: { + /** + * Registers a new test suite. + * @param name The suite name. + * @param fn The suite function, or {@code undefined} to define a pending test suite. + */ + (name: string, fn: Function): void; + + /** + * An alias for {@link #describe()} that marks the suite as exclusive, + * suppressing all other test suites. + * @param {string} name The suite name. + * @param {function()=} opt_fn The suite function, or `undefined` to define + * a pending test suite. + */ + only(name: string, fn: Function): void; + + /** + * Defines a suppressed test suite. + * @param name The suite name. + * @param fn The suite function, or {@code undefined} to define a pending test suite. + */ + skip(name: string, fn: Function): void; +}; + +/** + * Defines a suppressed test suite. + * @param name The suite name. + * @param fn The suite function, or {@code undefined} to define a pending test suite. + */ +export function xdescribe(name: string, fn: Function): void; + +/** + * Register a function to call after the current suite finishes. + * @param fn + */ +export function after(fn: Function): void; + +/** + * Register a function to call after each test in a suite. + * @param fn + */ +export function afterEach(fn: Function): void; + +/** + * Register a function to call before the current suite starts. + * @param fn + */ +export function before(fn: Function): void; + +/** + * Register a function to call before each test in a suite. + * @param fn + */ +export function beforeEach(fn: Function): void; + +export const it: { + /** + * Add a test to the current suite. + * @param name The test name. + * @param fn The test function, or {@code undefined} to define a pending test case. + */ + (name: string, fn: Function): void; + + /** + * An alias for {@link #it()} that flags the test as the only one that should + * be run within the current suite. + * @param {string} name The test name. + * @param {function()=} opt_fn The test function, or `undefined` to define + * a pending test case. + */ + only(name: string, fn: Function): void; + + /** + * Adds a test to the current suite while suppressing it so it is not run. + * @param name The test name. + * @param fn The test function, or {@code undefined} to define a pending test case. + */ + skip(name: string, fn: Function): void; +}; + +/** + * Adds a test to the current suite while suppressing it so it is not run. + * @param name The test name. + * @param fn The test function, or {@code undefined} to define a pending test case. + */ +export function xit(name: string, fn: Function): void; + +/** + * @return {!promise.ControlFlow} the control flow instance used by this module + * to coordinate test actions. + */ +export function controlFlow(): promise.ControlFlow; + +/** + * Ignores the test chained to this function if the provided predicate returns + * true. + * @param {function(): boolean} predicateFn A predicate to call to determine + * if the test should be suppressed. This function MUST be synchronous. + * @return {!Object} An object with wrapped versions of {@link #it()} and + * {@link #describe()} that ignore tests as indicated by the predicate. + */ +export function ignore(predicateFn: () => boolean): typeof Testing; diff --git a/test-eol-project/node_modules/adm-zip/LICENSE b/test-eol-project/node_modules/adm-zip/LICENSE new file mode 100644 index 00000000..f748c3de --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2012 Another-D-Mention Software and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/test-eol-project/node_modules/adm-zip/README.md b/test-eol-project/node_modules/adm-zip/README.md new file mode 100644 index 00000000..61f62123 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/README.md @@ -0,0 +1,87 @@ +# ADM-ZIP for NodeJS + +ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](https://nodejs.org/). + + + Build Status + + +# Installation + +With [npm](https://www.npmjs.com/) do: + + $ npm install adm-zip + +**Electron** file system support described below. + +## What is it good for? + +The library allows you to: + +- decompress zip files directly to disk or in memory buffers +- compress files and store them to disk in .zip format or in compressed buffers +- update content of/add new/delete files from an existing .zip + +# Dependencies + +There are no other nodeJS libraries that ADM-ZIP is dependent of + +# Examples + +## Basic usage + +```javascript +var AdmZip = require("adm-zip"); + +// reading archives +var zip = new AdmZip("./my_file.zip"); +var password = "1234567890"; +var zipEntries = zip.getEntries(); // an array of ZipEntry records - add password parameter if entries are password protected + +zipEntries.forEach(function (zipEntry) { + console.log(zipEntry.toString()); // outputs zip entries information + if (zipEntry.entryName == "my_file.txt") { + console.log(zipEntry.getData().toString("utf8")); + } +}); +// outputs the content of some_folder/my_file.txt +console.log(zip.readAsText("some_folder/my_file.txt")); +// extracts the specified file to the specified location +zip.extractEntryTo(/*entry name*/ "some_folder/my_file.txt", /*target path*/ "/home/me/tempfolder", /*maintainEntryPath*/ false, /*overwrite*/ true); +// extracts everything +zip.extractAllTo(/*target path*/ "/home/me/zipcontent/", /*overwrite*/ true); + +// creating archives +var zip = new AdmZip(); + +// add file directly +var content = "inner content of the file"; +zip.addFile("test.txt", Buffer.from(content, "utf8"), "entry comment goes here"); +// add local file +zip.addLocalFile("/home/me/some_picture.png"); +// get everything as a buffer +var willSendthis = zip.toBuffer(); +// or write everything to disk +zip.writeZip(/*target file name*/ "/home/me/files.zip"); + +// ... more examples in the wiki +``` + +For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). + +## Electron original-fs + +ADM-ZIP has supported electron **original-fs** for years without any user interractions but it causes problem with bundlers like rollup etc. For continuing support **original-fs** or any other custom file system module. There is possible specify your module by **fs** option in ADM-ZIP constructor. + +Example: + +```javascript +const AdmZip = require("adm-zip"); +const OriginalFs = require("original-fs"); + +// reading archives +const zip = new AdmZip("./my_file.zip", { fs: OriginalFs }); +. +. +. +``` diff --git a/test-eol-project/node_modules/adm-zip/adm-zip.js b/test-eol-project/node_modules/adm-zip/adm-zip.js new file mode 100644 index 00000000..31dddf2b --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/adm-zip.js @@ -0,0 +1,949 @@ +const Utils = require("./util"); +const pth = require("path"); +const ZipEntry = require("./zipEntry"); +const ZipFile = require("./zipFile"); + +const get_Bool = (...val) => Utils.findLast(val, (c) => typeof c === "boolean"); +const get_Str = (...val) => Utils.findLast(val, (c) => typeof c === "string"); +const get_Fun = (...val) => Utils.findLast(val, (c) => typeof c === "function"); + +const defaultOptions = { + // option "noSort" : if true it disables files sorting + noSort: false, + // read entries during load (initial loading may be slower) + readEntries: false, + // default method is none + method: Utils.Constants.NONE, + // file system + fs: null +}; + +module.exports = function (/**String*/ input, /** object */ options) { + let inBuffer = null; + + // create object based default options, allowing them to be overwritten + const opts = Object.assign(Object.create(null), defaultOptions); + + // test input variable + if (input && "object" === typeof input) { + // if value is not buffer we accept it to be object with options + if (!(input instanceof Uint8Array)) { + Object.assign(opts, input); + input = opts.input ? opts.input : undefined; + if (opts.input) delete opts.input; + } + + // if input is buffer + if (Buffer.isBuffer(input)) { + inBuffer = input; + opts.method = Utils.Constants.BUFFER; + input = undefined; + } + } + + // assign options + Object.assign(opts, options); + + // instanciate utils filesystem + const filetools = new Utils(opts); + + if (typeof opts.decoder !== "object" || typeof opts.decoder.encode !== "function" || typeof opts.decoder.decode !== "function") { + opts.decoder = Utils.decoder; + } + + // if input is file name we retrieve its content + if (input && "string" === typeof input) { + // load zip file + if (filetools.fs.existsSync(input)) { + opts.method = Utils.Constants.FILE; + opts.filename = input; + inBuffer = filetools.fs.readFileSync(input); + } else { + throw Utils.Errors.INVALID_FILENAME(); + } + } + + // create variable + const _zip = new ZipFile(inBuffer, opts); + + const { canonical, sanitize, zipnamefix } = Utils; + + function getEntry(/**Object*/ entry) { + if (entry && _zip) { + var item; + // If entry was given as a file name + if (typeof entry === "string") item = _zip.getEntry(pth.posix.normalize(entry)); + // if entry was given as a ZipEntry object + if (typeof entry === "object" && typeof entry.entryName !== "undefined" && typeof entry.header !== "undefined") item = _zip.getEntry(entry.entryName); + + if (item) { + return item; + } + } + return null; + } + + function fixPath(zipPath) { + const { join, normalize, sep } = pth.posix; + // convert windows file separators and normalize + return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep)); + } + + function filenameFilter(filterfn) { + if (filterfn instanceof RegExp) { + // if filter is RegExp wrap it + return (function (rx) { + return function (filename) { + return rx.test(filename); + }; + })(filterfn); + } else if ("function" !== typeof filterfn) { + // if filter is not function we will replace it + return () => true; + } + return filterfn; + } + + // keep last character on folders + const relativePath = (local, entry) => { + let lastChar = entry.slice(-1); + lastChar = lastChar === filetools.sep ? filetools.sep : ""; + return pth.relative(local, entry) + lastChar; + }; + + return { + /** + * Extracts the given entry from the archive and returns the content as a Buffer object + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @param {Buffer|string} [pass] - password + * @return Buffer or Null in case of error + */ + readFile: function (entry, pass) { + var item = getEntry(entry); + return (item && item.getData(pass)) || null; + }, + + /** + * Returns how many child elements has on entry (directories) on files it is always 0 + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @returns {integer} + */ + childCount: function (entry) { + const item = getEntry(entry); + if (item) { + return _zip.getChildCount(item); + } + }, + + /** + * Asynchronous readFile + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @param {callback} callback + * + * @return Buffer or Null in case of error + */ + readFileAsync: function (entry, callback) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(callback); + } else { + callback(null, "getEntry failed for:" + entry); + } + }, + + /** + * Extracts the given entry from the archive and returns the content as plain text in the given encoding + * @param {ZipEntry|string} entry - ZipEntry object or String with the full path of the entry + * @param {string} encoding - Optional. If no encoding is specified utf8 is used + * + * @return String + */ + readAsText: function (entry, encoding) { + var item = getEntry(entry); + if (item) { + var data = item.getData(); + if (data && data.length) { + return data.toString(encoding || "utf8"); + } + } + return ""; + }, + + /** + * Asynchronous readAsText + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @param {callback} callback + * @param {string} [encoding] - Optional. If no encoding is specified utf8 is used + * + * @return String + */ + readAsTextAsync: function (entry, callback, encoding) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(function (data, err) { + if (err) { + callback(data, err); + return; + } + + if (data && data.length) { + callback(data.toString(encoding || "utf8")); + } else { + callback(""); + } + }); + } else { + callback(""); + } + }, + + /** + * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory + * + * @param {ZipEntry|string} entry + * @returns {void} + */ + deleteFile: function (entry, withsubfolders = true) { + // @TODO: test deleteFile + var item = getEntry(entry); + if (item) { + _zip.deleteFile(item.entryName, withsubfolders); + } + }, + + /** + * Remove the entry from the file or directory without affecting any nested entries + * + * @param {ZipEntry|string} entry + * @returns {void} + */ + deleteEntry: function (entry) { + // @TODO: test deleteEntry + var item = getEntry(entry); + if (item) { + _zip.deleteEntry(item.entryName); + } + }, + + /** + * Adds a comment to the zip. The zip must be rewritten after adding the comment. + * + * @param {string} comment + */ + addZipComment: function (comment) { + // @TODO: test addZipComment + _zip.comment = comment; + }, + + /** + * Returns the zip comment + * + * @return String + */ + getZipComment: function () { + return _zip.comment || ""; + }, + + /** + * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment + * The comment cannot exceed 65535 characters in length + * + * @param {ZipEntry} entry + * @param {string} comment + */ + addZipEntryComment: function (entry, comment) { + var item = getEntry(entry); + if (item) { + item.comment = comment; + } + }, + + /** + * Returns the comment of the specified entry + * + * @param {ZipEntry} entry + * @return String + */ + getZipEntryComment: function (entry) { + var item = getEntry(entry); + if (item) { + return item.comment || ""; + } + return ""; + }, + + /** + * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content + * + * @param {ZipEntry} entry + * @param {Buffer} content + */ + updateFile: function (entry, content) { + var item = getEntry(entry); + if (item) { + item.setData(content); + } + }, + + /** + * Adds a file from the disk to the archive + * + * @param {string} localPath File to add to zip + * @param {string} [zipPath] Optional path inside the zip + * @param {string} [zipName] Optional name for the file + * @param {string} [comment] Optional file comment + */ + addLocalFile: function (localPath, zipPath, zipName, comment) { + if (filetools.fs.existsSync(localPath)) { + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // p - local file name + const p = pth.win32.basename(pth.win32.normalize(localPath)); + + // add file name into zippath + zipPath += zipName ? zipName : p; + + // read file attributes + const _attr = filetools.fs.statSync(localPath); + + // get file content + const data = _attr.isFile() ? filetools.fs.readFileSync(localPath) : Buffer.alloc(0); + + // if folder + if (_attr.isDirectory()) zipPath += filetools.sep; + + // add file into zip file + this.addFile(zipPath, data, comment, _attr); + } else { + throw Utils.Errors.FILE_NOT_FOUND(localPath); + } + }, + + /** + * Callback for showing if everything was done. + * + * @callback doneCallback + * @param {Error} err - Error object + * @param {boolean} done - was request fully completed + */ + + /** + * Adds a file from the disk to the archive + * + * @param {(object|string)} options - options object, if it is string it us used as localPath. + * @param {string} options.localPath - Local path to the file. + * @param {string} [options.comment] - Optional file comment. + * @param {string} [options.zipPath] - Optional path inside the zip + * @param {string} [options.zipName] - Optional name for the file + * @param {doneCallback} callback - The callback that handles the response. + */ + addLocalFileAsync: function (options, callback) { + options = typeof options === "object" ? options : { localPath: options }; + const localPath = pth.resolve(options.localPath); + const { comment } = options; + let { zipPath, zipName } = options; + const self = this; + + filetools.fs.stat(localPath, function (err, stats) { + if (err) return callback(err, false); + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + // p - local file name + const p = pth.win32.basename(pth.win32.normalize(localPath)); + // add file name into zippath + zipPath += zipName ? zipName : p; + + if (stats.isFile()) { + filetools.fs.readFile(localPath, function (err, data) { + if (err) return callback(err, false); + self.addFile(zipPath, data, comment, stats); + return setImmediate(callback, undefined, true); + }); + } else if (stats.isDirectory()) { + zipPath += filetools.sep; + self.addFile(zipPath, Buffer.alloc(0), comment, stats); + return setImmediate(callback, undefined, true); + } + }); + }, + + /** + * Adds a local directory and all its nested files and directories to the archive + * + * @param {string} localPath - local path to the folder + * @param {string} [zipPath] - optional path inside zip + * @param {(RegExp|function)} [filter] - optional RegExp or Function if files match will be included. + */ + addLocalFolder: function (localPath, zipPath, filter) { + // Prepare filter + filter = filenameFilter(filter); + + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // normalize the path first + localPath = pth.normalize(localPath); + + if (filetools.fs.existsSync(localPath)) { + const items = filetools.findFiles(localPath); + const self = this; + + if (items.length) { + for (const filepath of items) { + const p = pth.join(zipPath, relativePath(localPath, filepath)); + if (filter(p)) { + self.addLocalFile(filepath, pth.dirname(p)); + } + } + } + } else { + throw Utils.Errors.FILE_NOT_FOUND(localPath); + } + }, + + /** + * Asynchronous addLocalFolder + * @param {string} localPath + * @param {callback} callback + * @param {string} [zipPath] optional path inside zip + * @param {RegExp|function} [filter] optional RegExp or Function if files match will + * be included. + */ + addLocalFolderAsync: function (localPath, callback, zipPath, filter) { + // Prepare filter + filter = filenameFilter(filter); + + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // normalize the path first + localPath = pth.normalize(localPath); + + var self = this; + filetools.fs.open(localPath, "r", function (err) { + if (err && err.code === "ENOENT") { + callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath)); + } else if (err) { + callback(undefined, err); + } else { + var items = filetools.findFiles(localPath); + var i = -1; + + var next = function () { + i += 1; + if (i < items.length) { + var filepath = items[i]; + var p = relativePath(localPath, filepath).split("\\").join("/"); //windows fix + p = p + .normalize("NFD") + .replace(/[\u0300-\u036f]/g, "") + .replace(/[^\x20-\x7E]/g, ""); // accent fix + if (filter(p)) { + filetools.fs.stat(filepath, function (er0, stats) { + if (er0) callback(undefined, er0); + if (stats.isFile()) { + filetools.fs.readFile(filepath, function (er1, data) { + if (er1) { + callback(undefined, er1); + } else { + self.addFile(zipPath + p, data, "", stats); + next(); + } + }); + } else { + self.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + next(); + } + }); + } else { + process.nextTick(() => { + next(); + }); + } + } else { + callback(true, undefined); + } + }; + + next(); + } + }); + }, + + /** + * Adds a local directory and all its nested files and directories to the archive + * + * @param {object | string} options - options object, if it is string it us used as localPath. + * @param {string} options.localPath - Local path to the folder. + * @param {string} [options.zipPath] - optional path inside zip. + * @param {RegExp|function} [options.filter] - optional RegExp or Function if files match will be included. + * @param {function|string} [options.namefix] - optional function to help fix filename + * @param {doneCallback} callback - The callback that handles the response. + * + */ + addLocalFolderAsync2: function (options, callback) { + const self = this; + options = typeof options === "object" ? options : { localPath: options }; + localPath = pth.resolve(fixPath(options.localPath)); + let { zipPath, filter, namefix } = options; + + if (filter instanceof RegExp) { + filter = (function (rx) { + return function (filename) { + return rx.test(filename); + }; + })(filter); + } else if ("function" !== typeof filter) { + filter = function () { + return true; + }; + } + + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // Check Namefix function + if (namefix == "latin1") { + namefix = (str) => + str + .normalize("NFD") + .replace(/[\u0300-\u036f]/g, "") + .replace(/[^\x20-\x7E]/g, ""); // accent fix (latin1 characers only) + } + + if (typeof namefix !== "function") namefix = (str) => str; + + // internal, create relative path + fix the name + const relPathFix = (entry) => pth.join(zipPath, namefix(relativePath(localPath, entry))); + const fileNameFix = (entry) => pth.win32.basename(pth.win32.normalize(namefix(entry))); + + filetools.fs.open(localPath, "r", function (err) { + if (err && err.code === "ENOENT") { + callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath)); + } else if (err) { + callback(undefined, err); + } else { + filetools.findFilesAsync(localPath, function (err, fileEntries) { + if (err) return callback(err); + fileEntries = fileEntries.filter((dir) => filter(relPathFix(dir))); + if (!fileEntries.length) callback(undefined, false); + + setImmediate( + fileEntries.reverse().reduce(function (next, entry) { + return function (err, done) { + if (err || done === false) return setImmediate(next, err, false); + + self.addLocalFileAsync( + { + localPath: entry, + zipPath: pth.dirname(relPathFix(entry)), + zipName: fileNameFix(entry) + }, + next + ); + }; + }, callback) + ); + }); + } + }); + }, + + /** + * Adds a local directory and all its nested files and directories to the archive + * + * @param {string} localPath - path where files will be extracted + * @param {object} props - optional properties + * @param {string} [props.zipPath] - optional path inside zip + * @param {RegExp|function} [props.filter] - optional RegExp or Function if files match will be included. + * @param {function|string} [props.namefix] - optional function to help fix filename + */ + addLocalFolderPromise: function (localPath, props) { + return new Promise((resolve, reject) => { + this.addLocalFolderAsync2(Object.assign({ localPath }, props), (err, done) => { + if (err) reject(err); + if (done) resolve(this); + }); + }); + }, + + /** + * Allows you to create a entry (file or directory) in the zip file. + * If you want to create a directory the entryName must end in / and a null buffer should be provided. + * Comment and attributes are optional + * + * @param {string} entryName + * @param {Buffer | string} content - file content as buffer or utf8 coded string + * @param {string} [comment] - file comment + * @param {number | object} [attr] - number as unix file permissions, object as filesystem Stats object + */ + addFile: function (entryName, content, comment, attr) { + entryName = zipnamefix(entryName); + let entry = getEntry(entryName); + const update = entry != null; + + // prepare new entry + if (!update) { + entry = new ZipEntry(opts); + entry.entryName = entryName; + } + entry.comment = comment || ""; + + const isStat = "object" === typeof attr && attr instanceof filetools.fs.Stats; + + // last modification time from file stats + if (isStat) { + entry.header.time = attr.mtime; + } + + // Set file attribute + var fileattr = entry.isDirectory ? 0x10 : 0; // (MS-DOS directory flag) + + // extended attributes field for Unix + // set file type either S_IFDIR / S_IFREG + let unix = entry.isDirectory ? 0x4000 : 0x8000; + + if (isStat) { + // File attributes from file stats + unix |= 0xfff & attr.mode; + } else if ("number" === typeof attr) { + // attr from given attr values + unix |= 0xfff & attr; + } else { + // Default values: + unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--) + } + + fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes + + entry.attr = fileattr; + + entry.setData(content); + if (!update) _zip.setEntry(entry); + + return entry; + }, + + /** + * Returns an array of ZipEntry objects representing the files and folders inside the archive + * + * @param {string} [password] + * @returns Array + */ + getEntries: function (password) { + _zip.password = password; + return _zip ? _zip.entries : []; + }, + + /** + * Returns a ZipEntry object representing the file or folder specified by ``name``. + * + * @param {string} name + * @return ZipEntry + */ + getEntry: function (/**String*/ name) { + return getEntry(name); + }, + + getEntryCount: function () { + return _zip.getEntryCount(); + }, + + forEach: function (callback) { + return _zip.forEach(callback); + }, + + /** + * Extracts the given entry to the given targetPath + * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted + * + * @param {string|ZipEntry} entry - ZipEntry object or String with the full path of the entry + * @param {string} targetPath - Target folder where to write the file + * @param {boolean} [maintainEntryPath=true] - If maintainEntryPath is true and the entry is inside a folder, the entry folder will be created in targetPath as well. Default is TRUE + * @param {boolean} [overwrite=false] - If the file already exists at the target path, the file will be overwriten if this is true. + * @param {boolean} [keepOriginalPermission=false] - The file will be set as the permission from the entry if this is true. + * @param {string} [outFileName] - String If set will override the filename of the extracted file (Only works if the entry is a file) + * + * @return Boolean + */ + extractEntryTo: function (entry, targetPath, maintainEntryPath, overwrite, keepOriginalPermission, outFileName) { + overwrite = get_Bool(false, overwrite); + keepOriginalPermission = get_Bool(false, keepOriginalPermission); + maintainEntryPath = get_Bool(true, maintainEntryPath); + outFileName = get_Str(keepOriginalPermission, outFileName); + + var item = getEntry(entry); + if (!item) { + throw Utils.Errors.NO_ENTRY(); + } + + var entryName = canonical(item.entryName); + + var target = sanitize(targetPath, outFileName && !item.isDirectory ? outFileName : maintainEntryPath ? entryName : pth.basename(entryName)); + + if (item.isDirectory) { + var children = _zip.getEntryChildren(item); + children.forEach(function (child) { + if (child.isDirectory) return; + var content = child.getData(); + if (!content) { + throw Utils.Errors.CANT_EXTRACT_FILE(); + } + var name = canonical(child.entryName); + var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name)); + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? child.header.fileAttr : undefined; + filetools.writeFileTo(childName, content, overwrite, fileAttr); + }); + return true; + } + + var content = item.getData(_zip.password); + if (!content) throw Utils.Errors.CANT_EXTRACT_FILE(); + + if (filetools.fs.existsSync(target) && !overwrite) { + throw Utils.Errors.CANT_OVERRIDE(); + } + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + filetools.writeFileTo(target, content, overwrite, fileAttr); + + return true; + }, + + /** + * Test the archive + * @param {string} [pass] + */ + test: function (pass) { + if (!_zip) { + return false; + } + + for (var entry in _zip.entries) { + try { + if (entry.isDirectory) { + continue; + } + var content = _zip.entries[entry].getData(pass); + if (!content) { + return false; + } + } catch (err) { + return false; + } + } + return true; + }, + + /** + * Extracts the entire archive to the given location + * + * @param {string} targetPath Target location + * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true. + * Default is FALSE + * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true. + * Default is FALSE + * @param {string|Buffer} [pass] password + */ + extractAllTo: function (targetPath, overwrite, keepOriginalPermission, pass) { + keepOriginalPermission = get_Bool(false, keepOriginalPermission); + pass = get_Str(keepOriginalPermission, pass); + overwrite = get_Bool(false, overwrite); + if (!_zip) throw Utils.Errors.NO_ZIP(); + + _zip.entries.forEach(function (entry) { + var entryName = sanitize(targetPath, canonical(entry.entryName)); + if (entry.isDirectory) { + filetools.makeDir(entryName); + return; + } + var content = entry.getData(pass); + if (!content) { + throw Utils.Errors.CANT_EXTRACT_FILE(); + } + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + filetools.writeFileTo(entryName, content, overwrite, fileAttr); + try { + filetools.fs.utimesSync(entryName, entry.header.time, entry.header.time); + } catch (err) { + throw Utils.Errors.CANT_EXTRACT_FILE(); + } + }); + }, + + /** + * Asynchronous extractAllTo + * + * @param {string} targetPath Target location + * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true. + * Default is FALSE + * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true. + * Default is FALSE + * @param {function} callback The callback will be executed when all entries are extracted successfully or any error is thrown. + */ + extractAllToAsync: function (targetPath, overwrite, keepOriginalPermission, callback) { + callback = get_Fun(overwrite, keepOriginalPermission, callback); + keepOriginalPermission = get_Bool(false, keepOriginalPermission); + overwrite = get_Bool(false, overwrite); + if (!callback) { + return new Promise((resolve, reject) => { + this.extractAllToAsync(targetPath, overwrite, keepOriginalPermission, function (err) { + if (err) { + reject(err); + } else { + resolve(this); + } + }); + }); + } + if (!_zip) { + callback(Utils.Errors.NO_ZIP()); + return; + } + + targetPath = pth.resolve(targetPath); + // convert entryName to + const getPath = (entry) => sanitize(targetPath, pth.normalize(canonical(entry.entryName))); + const getError = (msg, file) => new Error(msg + ': "' + file + '"'); + + // separate directories from files + const dirEntries = []; + const fileEntries = []; + _zip.entries.forEach((e) => { + if (e.isDirectory) { + dirEntries.push(e); + } else { + fileEntries.push(e); + } + }); + + // Create directory entries first synchronously + // this prevents race condition and assures folders are there before writing files + for (const entry of dirEntries) { + const dirPath = getPath(entry); + // The reverse operation for attr depend on method addFile() + const dirAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + try { + filetools.makeDir(dirPath); + if (dirAttr) filetools.fs.chmodSync(dirPath, dirAttr); + // in unix timestamp will change if files are later added to folder, but still + filetools.fs.utimesSync(dirPath, entry.header.time, entry.header.time); + } catch (er) { + callback(getError("Unable to create folder", dirPath)); + } + } + + fileEntries.reverse().reduce(function (next, entry) { + return function (err) { + if (err) { + next(err); + } else { + const entryName = pth.normalize(canonical(entry.entryName)); + const filePath = sanitize(targetPath, entryName); + entry.getDataAsync(function (content, err_1) { + if (err_1) { + next(err_1); + } else if (!content) { + next(Utils.Errors.CANT_EXTRACT_FILE()); + } else { + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + filetools.writeFileToAsync(filePath, content, overwrite, fileAttr, function (succ) { + if (!succ) { + next(getError("Unable to write file", filePath)); + } + filetools.fs.utimes(filePath, entry.header.time, entry.header.time, function (err_2) { + if (err_2) { + next(getError("Unable to set times", filePath)); + } else { + next(); + } + }); + }); + } + }); + } + }; + }, callback)(); + }, + + /** + * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip + * + * @param {string} targetFileName + * @param {function} callback + */ + writeZip: function (targetFileName, callback) { + if (arguments.length === 1) { + if (typeof targetFileName === "function") { + callback = targetFileName; + targetFileName = ""; + } + } + + if (!targetFileName && opts.filename) { + targetFileName = opts.filename; + } + if (!targetFileName) return; + + var zipData = _zip.compressToBuffer(); + if (zipData) { + var ok = filetools.writeFileTo(targetFileName, zipData, true); + if (typeof callback === "function") callback(!ok ? new Error("failed") : null, ""); + } + }, + + /** + * + * @param {string} targetFileName + * @param {object} [props] + * @param {boolean} [props.overwrite=true] If the file already exists at the target path, the file will be overwriten if this is true. + * @param {boolean} [props.perm] The file will be set as the permission from the entry if this is true. + + * @returns {Promise} + */ + writeZipPromise: function (/**String*/ targetFileName, /* object */ props) { + const { overwrite, perm } = Object.assign({ overwrite: true }, props); + + return new Promise((resolve, reject) => { + // find file name + if (!targetFileName && opts.filename) targetFileName = opts.filename; + if (!targetFileName) reject("ADM-ZIP: ZIP File Name Missing"); + + this.toBufferPromise().then((zipData) => { + const ret = (done) => (done ? resolve(done) : reject("ADM-ZIP: Wasn't able to write zip file")); + filetools.writeFileToAsync(targetFileName, zipData, overwrite, perm, ret); + }, reject); + }); + }, + + /** + * @returns {Promise} A promise to the Buffer. + */ + toBufferPromise: function () { + return new Promise((resolve, reject) => { + _zip.toAsyncBuffer(resolve, reject); + }); + }, + + /** + * Returns the content of the entire zip file as a Buffer object + * + * @prop {function} [onSuccess] + * @prop {function} [onFail] + * @prop {function} [onItemStart] + * @prop {function} [onItemEnd] + * @returns {Buffer} + */ + toBuffer: function (onSuccess, onFail, onItemStart, onItemEnd) { + if (typeof onSuccess === "function") { + _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd); + return null; + } + return _zip.compressToBuffer(); + } + }; +}; diff --git a/test-eol-project/node_modules/adm-zip/headers/entryHeader.js b/test-eol-project/node_modules/adm-zip/headers/entryHeader.js new file mode 100644 index 00000000..61000ad3 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/headers/entryHeader.js @@ -0,0 +1,374 @@ +var Utils = require("../util"), + Constants = Utils.Constants; + +/* The central directory file header */ +module.exports = function () { + var _verMade = 20, // v2.0 + _version = 10, // v1.0 + _flags = 0, + _method = 0, + _time = 0, + _crc = 0, + _compressedSize = 0, + _size = 0, + _fnameLen = 0, + _extraLen = 0, + _comLen = 0, + _diskStart = 0, + _inattr = 0, + _attr = 0, + _offset = 0; + + _verMade |= Utils.isWin ? 0x0a00 : 0x0300; + + // Set EFS flag since filename and comment fields are all by default encoded using UTF-8. + // Without it file names may be corrupted for other apps when file names use unicode chars + _flags |= Constants.FLG_EFS; + + const _localHeader = { + extraLen: 0 + }; + + // casting + const uint32 = (val) => Math.max(0, val) >>> 0; + const uint16 = (val) => Math.max(0, val) & 0xffff; + const uint8 = (val) => Math.max(0, val) & 0xff; + + _time = Utils.fromDate2DOS(new Date()); + + return { + get made() { + return _verMade; + }, + set made(val) { + _verMade = val; + }, + + get version() { + return _version; + }, + set version(val) { + _version = val; + }, + + get flags() { + return _flags; + }, + set flags(val) { + _flags = val; + }, + + get flags_efs() { + return (_flags & Constants.FLG_EFS) > 0; + }, + set flags_efs(val) { + if (val) { + _flags |= Constants.FLG_EFS; + } else { + _flags &= ~Constants.FLG_EFS; + } + }, + + get flags_desc() { + return (_flags & Constants.FLG_DESC) > 0; + }, + set flags_desc(val) { + if (val) { + _flags |= Constants.FLG_DESC; + } else { + _flags &= ~Constants.FLG_DESC; + } + }, + + get method() { + return _method; + }, + set method(val) { + switch (val) { + case Constants.STORED: + this.version = 10; + case Constants.DEFLATED: + default: + this.version = 20; + } + _method = val; + }, + + get time() { + return Utils.fromDOS2Date(this.timeval); + }, + set time(val) { + this.timeval = Utils.fromDate2DOS(val); + }, + + get timeval() { + return _time; + }, + set timeval(val) { + _time = uint32(val); + }, + + get timeHighByte() { + return uint8(_time >>> 8); + }, + get crc() { + return _crc; + }, + set crc(val) { + _crc = uint32(val); + }, + + get compressedSize() { + return _compressedSize; + }, + set compressedSize(val) { + _compressedSize = uint32(val); + }, + + get size() { + return _size; + }, + set size(val) { + _size = uint32(val); + }, + + get fileNameLength() { + return _fnameLen; + }, + set fileNameLength(val) { + _fnameLen = val; + }, + + get extraLength() { + return _extraLen; + }, + set extraLength(val) { + _extraLen = val; + }, + + get extraLocalLength() { + return _localHeader.extraLen; + }, + set extraLocalLength(val) { + _localHeader.extraLen = val; + }, + + get commentLength() { + return _comLen; + }, + set commentLength(val) { + _comLen = val; + }, + + get diskNumStart() { + return _diskStart; + }, + set diskNumStart(val) { + _diskStart = uint32(val); + }, + + get inAttr() { + return _inattr; + }, + set inAttr(val) { + _inattr = uint32(val); + }, + + get attr() { + return _attr; + }, + set attr(val) { + _attr = uint32(val); + }, + + // get Unix file permissions + get fileAttr() { + return (_attr || 0) >> 16 & 0xfff; + }, + + get offset() { + return _offset; + }, + set offset(val) { + _offset = uint32(val); + }, + + get encrypted() { + return (_flags & Constants.FLG_ENC) === Constants.FLG_ENC; + }, + + get centralHeaderSize() { + return Constants.CENHDR + _fnameLen + _extraLen + _comLen; + }, + + get realDataOffset() { + return _offset + Constants.LOCHDR + _localHeader.fnameLen + _localHeader.extraLen; + }, + + get localHeader() { + return _localHeader; + }, + + loadLocalHeaderFromBinary: function (/*Buffer*/ input) { + var data = input.slice(_offset, _offset + Constants.LOCHDR); + // 30 bytes and should start with "PK\003\004" + if (data.readUInt32LE(0) !== Constants.LOCSIG) { + throw Utils.Errors.INVALID_LOC(); + } + + // version needed to extract + _localHeader.version = data.readUInt16LE(Constants.LOCVER); + // general purpose bit flag + _localHeader.flags = data.readUInt16LE(Constants.LOCFLG); + // compression method + _localHeader.method = data.readUInt16LE(Constants.LOCHOW); + // modification time (2 bytes time, 2 bytes date) + _localHeader.time = data.readUInt32LE(Constants.LOCTIM); + // uncompressed file crc-32 valu + _localHeader.crc = data.readUInt32LE(Constants.LOCCRC); + // compressed size + _localHeader.compressedSize = data.readUInt32LE(Constants.LOCSIZ); + // uncompressed size + _localHeader.size = data.readUInt32LE(Constants.LOCLEN); + // filename length + _localHeader.fnameLen = data.readUInt16LE(Constants.LOCNAM); + // extra field length + _localHeader.extraLen = data.readUInt16LE(Constants.LOCEXT); + + // read extra data + const extraStart = _offset + Constants.LOCHDR + _localHeader.fnameLen; + const extraEnd = extraStart + _localHeader.extraLen; + return input.slice(extraStart, extraEnd); + }, + + loadFromBinary: function (/*Buffer*/ data) { + // data should be 46 bytes and start with "PK 01 02" + if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) { + throw Utils.Errors.INVALID_CEN(); + } + // version made by + _verMade = data.readUInt16LE(Constants.CENVEM); + // version needed to extract + _version = data.readUInt16LE(Constants.CENVER); + // encrypt, decrypt flags + _flags = data.readUInt16LE(Constants.CENFLG); + // compression method + _method = data.readUInt16LE(Constants.CENHOW); + // modification time (2 bytes time, 2 bytes date) + _time = data.readUInt32LE(Constants.CENTIM); + // uncompressed file crc-32 value + _crc = data.readUInt32LE(Constants.CENCRC); + // compressed size + _compressedSize = data.readUInt32LE(Constants.CENSIZ); + // uncompressed size + _size = data.readUInt32LE(Constants.CENLEN); + // filename length + _fnameLen = data.readUInt16LE(Constants.CENNAM); + // extra field length + _extraLen = data.readUInt16LE(Constants.CENEXT); + // file comment length + _comLen = data.readUInt16LE(Constants.CENCOM); + // volume number start + _diskStart = data.readUInt16LE(Constants.CENDSK); + // internal file attributes + _inattr = data.readUInt16LE(Constants.CENATT); + // external file attributes + _attr = data.readUInt32LE(Constants.CENATX); + // LOC header offset + _offset = data.readUInt32LE(Constants.CENOFF); + }, + + localHeaderToBinary: function () { + // LOC header size (30 bytes) + var data = Buffer.alloc(Constants.LOCHDR); + // "PK\003\004" + data.writeUInt32LE(Constants.LOCSIG, 0); + // version needed to extract + data.writeUInt16LE(_version, Constants.LOCVER); + // general purpose bit flag + data.writeUInt16LE(_flags, Constants.LOCFLG); + // compression method + data.writeUInt16LE(_method, Constants.LOCHOW); + // modification time (2 bytes time, 2 bytes date) + data.writeUInt32LE(_time, Constants.LOCTIM); + // uncompressed file crc-32 value + data.writeUInt32LE(_crc, Constants.LOCCRC); + // compressed size + data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); + // uncompressed size + data.writeUInt32LE(_size, Constants.LOCLEN); + // filename length + data.writeUInt16LE(_fnameLen, Constants.LOCNAM); + // extra field length + data.writeUInt16LE(_localHeader.extraLen, Constants.LOCEXT); + return data; + }, + + centralHeaderToBinary: function () { + // CEN header size (46 bytes) + var data = Buffer.alloc(Constants.CENHDR + _fnameLen + _extraLen + _comLen); + // "PK\001\002" + data.writeUInt32LE(Constants.CENSIG, 0); + // version made by + data.writeUInt16LE(_verMade, Constants.CENVEM); + // version needed to extract + data.writeUInt16LE(_version, Constants.CENVER); + // encrypt, decrypt flags + data.writeUInt16LE(_flags, Constants.CENFLG); + // compression method + data.writeUInt16LE(_method, Constants.CENHOW); + // modification time (2 bytes time, 2 bytes date) + data.writeUInt32LE(_time, Constants.CENTIM); + // uncompressed file crc-32 value + data.writeUInt32LE(_crc, Constants.CENCRC); + // compressed size + data.writeUInt32LE(_compressedSize, Constants.CENSIZ); + // uncompressed size + data.writeUInt32LE(_size, Constants.CENLEN); + // filename length + data.writeUInt16LE(_fnameLen, Constants.CENNAM); + // extra field length + data.writeUInt16LE(_extraLen, Constants.CENEXT); + // file comment length + data.writeUInt16LE(_comLen, Constants.CENCOM); + // volume number start + data.writeUInt16LE(_diskStart, Constants.CENDSK); + // internal file attributes + data.writeUInt16LE(_inattr, Constants.CENATT); + // external file attributes + data.writeUInt32LE(_attr, Constants.CENATX); + // LOC header offset + data.writeUInt32LE(_offset, Constants.CENOFF); + return data; + }, + + toJSON: function () { + const bytes = function (nr) { + return nr + " bytes"; + }; + + return { + made: _verMade, + version: _version, + flags: _flags, + method: Utils.methodToString(_method), + time: this.time, + crc: "0x" + _crc.toString(16).toUpperCase(), + compressedSize: bytes(_compressedSize), + size: bytes(_size), + fileNameLength: bytes(_fnameLen), + extraLength: bytes(_extraLen), + commentLength: bytes(_comLen), + diskNumStart: _diskStart, + inAttr: _inattr, + attr: _attr, + offset: _offset, + centralHeaderSize: bytes(Constants.CENHDR + _fnameLen + _extraLen + _comLen) + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); + } + }; +}; diff --git a/test-eol-project/node_modules/adm-zip/headers/index.js b/test-eol-project/node_modules/adm-zip/headers/index.js new file mode 100644 index 00000000..b54a7222 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/headers/index.js @@ -0,0 +1,2 @@ +exports.EntryHeader = require("./entryHeader"); +exports.MainHeader = require("./mainHeader"); diff --git a/test-eol-project/node_modules/adm-zip/headers/mainHeader.js b/test-eol-project/node_modules/adm-zip/headers/mainHeader.js new file mode 100644 index 00000000..bb3e8a39 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/headers/mainHeader.js @@ -0,0 +1,130 @@ +var Utils = require("../util"), + Constants = Utils.Constants; + +/* The entries in the end of central directory */ +module.exports = function () { + var _volumeEntries = 0, + _totalEntries = 0, + _size = 0, + _offset = 0, + _commentLength = 0; + + return { + get diskEntries() { + return _volumeEntries; + }, + set diskEntries(/*Number*/ val) { + _volumeEntries = _totalEntries = val; + }, + + get totalEntries() { + return _totalEntries; + }, + set totalEntries(/*Number*/ val) { + _totalEntries = _volumeEntries = val; + }, + + get size() { + return _size; + }, + set size(/*Number*/ val) { + _size = val; + }, + + get offset() { + return _offset; + }, + set offset(/*Number*/ val) { + _offset = val; + }, + + get commentLength() { + return _commentLength; + }, + set commentLength(/*Number*/ val) { + _commentLength = val; + }, + + get mainHeaderSize() { + return Constants.ENDHDR + _commentLength; + }, + + loadFromBinary: function (/*Buffer*/ data) { + // data should be 22 bytes and start with "PK 05 06" + // or be 56+ bytes and start with "PK 06 06" for Zip64 + if ( + (data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) && + (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG) + ) { + throw Utils.Errors.INVALID_END(); + } + + if (data.readUInt32LE(0) === Constants.ENDSIG) { + // number of entries on this volume + _volumeEntries = data.readUInt16LE(Constants.ENDSUB); + // total number of entries + _totalEntries = data.readUInt16LE(Constants.ENDTOT); + // central directory size in bytes + _size = data.readUInt32LE(Constants.ENDSIZ); + // offset of first CEN header + _offset = data.readUInt32LE(Constants.ENDOFF); + // zip file comment length + _commentLength = data.readUInt16LE(Constants.ENDCOM); + } else { + // number of entries on this volume + _volumeEntries = Utils.readBigUInt64LE(data, Constants.ZIP64SUB); + // total number of entries + _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT); + // central directory size in bytes + _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZE); + // offset of first CEN header + _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF); + + _commentLength = 0; + } + }, + + toBinary: function () { + var b = Buffer.alloc(Constants.ENDHDR + _commentLength); + // "PK 05 06" signature + b.writeUInt32LE(Constants.ENDSIG, 0); + b.writeUInt32LE(0, 4); + // number of entries on this volume + b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); + // total number of entries + b.writeUInt16LE(_totalEntries, Constants.ENDTOT); + // central directory size in bytes + b.writeUInt32LE(_size, Constants.ENDSIZ); + // offset of first CEN header + b.writeUInt32LE(_offset, Constants.ENDOFF); + // zip file comment length + b.writeUInt16LE(_commentLength, Constants.ENDCOM); + // fill comment memory with spaces so no garbage is left there + b.fill(" ", Constants.ENDHDR); + + return b; + }, + + toJSON: function () { + // creates 0x0000 style output + const offset = function (nr, len) { + let offs = nr.toString(16).toUpperCase(); + while (offs.length < len) offs = "0" + offs; + return "0x" + offs; + }; + + return { + diskEntries: _volumeEntries, + totalEntries: _totalEntries, + size: _size + " bytes", + offset: offset(_offset, 4), + commentLength: _commentLength + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); + } + }; +}; +// Misspelled diff --git a/test-eol-project/node_modules/adm-zip/methods/deflater.js b/test-eol-project/node_modules/adm-zip/methods/deflater.js new file mode 100644 index 00000000..992de8f1 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/methods/deflater.js @@ -0,0 +1,33 @@ +module.exports = function (/*Buffer*/ inbuf) { + var zlib = require("zlib"); + + var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 }; + + return { + deflate: function () { + return zlib.deflateRawSync(inbuf, opts); + }, + + deflateAsync: function (/*Function*/ callback) { + var tmp = zlib.createDeflateRaw(opts), + parts = [], + total = 0; + tmp.on("data", function (data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function () { + var buf = Buffer.alloc(total), + written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); + } + }; +}; diff --git a/test-eol-project/node_modules/adm-zip/methods/index.js b/test-eol-project/node_modules/adm-zip/methods/index.js new file mode 100644 index 00000000..5285677f --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/methods/index.js @@ -0,0 +1,3 @@ +exports.Deflater = require("./deflater"); +exports.Inflater = require("./inflater"); +exports.ZipCrypto = require("./zipcrypto"); diff --git a/test-eol-project/node_modules/adm-zip/methods/inflater.js b/test-eol-project/node_modules/adm-zip/methods/inflater.js new file mode 100644 index 00000000..8769e66e --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/methods/inflater.js @@ -0,0 +1,34 @@ +const version = +(process.versions ? process.versions.node : "").split(".")[0] || 0; + +module.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) { + var zlib = require("zlib"); + const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {}; + + return { + inflate: function () { + return zlib.inflateRawSync(inbuf, option); + }, + + inflateAsync: function (/*Function*/ callback) { + var tmp = zlib.createInflateRaw(option), + parts = [], + total = 0; + tmp.on("data", function (data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function () { + var buf = Buffer.alloc(total), + written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); + } + }; +}; diff --git a/test-eol-project/node_modules/adm-zip/methods/zipcrypto.js b/test-eol-project/node_modules/adm-zip/methods/zipcrypto.js new file mode 100644 index 00000000..e1018f6f --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/methods/zipcrypto.js @@ -0,0 +1,175 @@ +"use strict"; + +// node crypt, we use it for generate salt +// eslint-disable-next-line node/no-unsupported-features/node-builtins +const { randomFillSync } = require("crypto"); +const Errors = require("../util/errors"); + +// generate CRC32 lookup table +const crctable = new Uint32Array(256).map((t, crc) => { + for (let j = 0; j < 8; j++) { + if (0 !== (crc & 1)) { + crc = (crc >>> 1) ^ 0xedb88320; + } else { + crc >>>= 1; + } + } + return crc >>> 0; +}); + +// C-style uInt32 Multiply (discards higher bits, when JS multiply discards lower bits) +const uMul = (a, b) => Math.imul(a, b) >>> 0; + +// crc32 byte single update (actually same function is part of utils.crc32 function :) ) +const crc32update = (pCrc32, bval) => { + return crctable[(pCrc32 ^ bval) & 0xff] ^ (pCrc32 >>> 8); +}; + +// function for generating salt for encrytion header +const genSalt = () => { + if ("function" === typeof randomFillSync) { + return randomFillSync(Buffer.alloc(12)); + } else { + // fallback if function is not defined + return genSalt.node(); + } +}; + +// salt generation with node random function (mainly as fallback) +genSalt.node = () => { + const salt = Buffer.alloc(12); + const len = salt.length; + for (let i = 0; i < len; i++) salt[i] = (Math.random() * 256) & 0xff; + return salt; +}; + +// general config +const config = { + genSalt +}; + +// Class Initkeys handles same basic ops with keys +function Initkeys(pw) { + const pass = Buffer.isBuffer(pw) ? pw : Buffer.from(pw); + this.keys = new Uint32Array([0x12345678, 0x23456789, 0x34567890]); + for (let i = 0; i < pass.length; i++) { + this.updateKeys(pass[i]); + } +} + +Initkeys.prototype.updateKeys = function (byteValue) { + const keys = this.keys; + keys[0] = crc32update(keys[0], byteValue); + keys[1] += keys[0] & 0xff; + keys[1] = uMul(keys[1], 134775813) + 1; + keys[2] = crc32update(keys[2], keys[1] >>> 24); + return byteValue; +}; + +Initkeys.prototype.next = function () { + const k = (this.keys[2] | 2) >>> 0; // key + return (uMul(k, k ^ 1) >> 8) & 0xff; // decode +}; + +function make_decrypter(/*Buffer*/ pwd) { + // 1. Stage initialize key + const keys = new Initkeys(pwd); + + // return decrypter function + return function (/*Buffer*/ data) { + // result - we create new Buffer for results + const result = Buffer.alloc(data.length); + let pos = 0; + // process input data + for (let c of data) { + //c ^= keys.next(); + //result[pos++] = c; // decode & Save Value + result[pos++] = keys.updateKeys(c ^ keys.next()); // update keys with decoded byte + } + return result; + }; +} + +function make_encrypter(/*Buffer*/ pwd) { + // 1. Stage initialize key + const keys = new Initkeys(pwd); + + // return encrypting function, result and pos is here so we dont have to merge buffers later + return function (/*Buffer*/ data, /*Buffer*/ result, /* Number */ pos = 0) { + // result - we create new Buffer for results + if (!result) result = Buffer.alloc(data.length); + // process input data + for (let c of data) { + const k = keys.next(); // save key byte + result[pos++] = c ^ k; // save val + keys.updateKeys(c); // update keys with decoded byte + } + return result; + }; +} + +function decrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd) { + if (!data || !Buffer.isBuffer(data) || data.length < 12) { + return Buffer.alloc(0); + } + + // 1. We Initialize and generate decrypting function + const decrypter = make_decrypter(pwd); + + // 2. decrypt salt what is always 12 bytes and is a part of file content + const salt = decrypter(data.slice(0, 12)); + + // if bit 3 (0x08) of the general-purpose flags field is set, check salt[11] with the high byte of the header time + // 2 byte data block (as per Info-Zip spec), otherwise check with the high byte of the header entry + const verifyByte = (header.flags & 0x8) === 0x8 ? header.timeHighByte : header.crc >>> 24; + + //3. does password meet expectations + if (salt[11] !== verifyByte) { + throw Errors.WRONG_PASSWORD(); + } + + // 4. decode content + return decrypter(data.slice(12)); +} + +// lets add way to populate salt, NOT RECOMMENDED for production but maybe useful for testing general functionality +function _salter(data) { + if (Buffer.isBuffer(data) && data.length >= 12) { + // be aware - currently salting buffer data is modified + config.genSalt = function () { + return data.slice(0, 12); + }; + } else if (data === "node") { + // test salt generation with node random function + config.genSalt = genSalt.node; + } else { + // if value is not acceptable config gets reset. + config.genSalt = genSalt; + } +} + +function encrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd, /*Boolean*/ oldlike = false) { + // 1. test data if data is not Buffer we make buffer from it + if (data == null) data = Buffer.alloc(0); + // if data is not buffer be make buffer from it + if (!Buffer.isBuffer(data)) data = Buffer.from(data.toString()); + + // 2. We Initialize and generate encrypting function + const encrypter = make_encrypter(pwd); + + // 3. generate salt (12-bytes of random data) + const salt = config.genSalt(); + salt[11] = (header.crc >>> 24) & 0xff; + + // old implementations (before PKZip 2.04g) used two byte check + if (oldlike) salt[10] = (header.crc >>> 16) & 0xff; + + // 4. create output + const result = Buffer.alloc(data.length + 12); + encrypter(salt, result); + + // finally encode content + return encrypter(data, result, 12); +} + +module.exports = { decrypt, encrypt, _salter }; diff --git a/test-eol-project/node_modules/adm-zip/package.json b/test-eol-project/node_modules/adm-zip/package.json new file mode 100644 index 00000000..59b8baf7 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/package.json @@ -0,0 +1,49 @@ +{ + "name": "adm-zip", + "version": "0.5.16", + "description": "Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk", + "scripts": { + "test": "mocha -R spec", + "test:format": "npm run format:prettier:raw -- --check", + "format": "npm run format:prettier", + "format:prettier": "npm run format:prettier:raw -- --write", + "format:prettier:raw": "prettier \"**/*.{js,yml,json}\"" + }, + "keywords": [ + "zip", + "methods", + "archive", + "unzip" + ], + "homepage": "https://github.com/cthackers/adm-zip", + "author": "Nasca Iacob (https://github.com/cthackers)", + "bugs": { + "email": "sy@another-d-mention.ro", + "url": "https://github.com/cthackers/adm-zip/issues" + }, + "license": "MIT", + "files": [ + "adm-zip.js", + "headers", + "methods", + "util", + "zipEntry.js", + "zipFile.js", + "LICENSE" + ], + "main": "adm-zip.js", + "repository": { + "type": "git", + "url": "https://github.com/cthackers/adm-zip.git" + }, + "engines": { + "node": ">=12.0" + }, + "devDependencies": { + "chai": "^4.3.4", + "iconv-lite": "^0.6.3", + "mocha": "^10.2.0", + "prettier": "^3.3.2", + "rimraf": "^3.0.2" + } +} diff --git a/test-eol-project/node_modules/adm-zip/util/constants.js b/test-eol-project/node_modules/adm-zip/util/constants.js new file mode 100644 index 00000000..119954ba --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/util/constants.js @@ -0,0 +1,142 @@ +module.exports = { + /* The local file header */ + LOCHDR : 30, // LOC header size + LOCSIG : 0x04034b50, // "PK\003\004" + LOCVER : 4, // version needed to extract + LOCFLG : 6, // general purpose bit flag + LOCHOW : 8, // compression method + LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) + LOCCRC : 14, // uncompressed file crc-32 value + LOCSIZ : 18, // compressed size + LOCLEN : 22, // uncompressed size + LOCNAM : 26, // filename length + LOCEXT : 28, // extra field length + + /* The Data descriptor */ + EXTSIG : 0x08074b50, // "PK\007\008" + EXTHDR : 16, // EXT header size + EXTCRC : 4, // uncompressed file crc-32 value + EXTSIZ : 8, // compressed size + EXTLEN : 12, // uncompressed size + + /* The central directory file header */ + CENHDR : 46, // CEN header size + CENSIG : 0x02014b50, // "PK\001\002" + CENVEM : 4, // version made by + CENVER : 6, // version needed to extract + CENFLG : 8, // encrypt, decrypt flags + CENHOW : 10, // compression method + CENTIM : 12, // modification time (2 bytes time, 2 bytes date) + CENCRC : 16, // uncompressed file crc-32 value + CENSIZ : 20, // compressed size + CENLEN : 24, // uncompressed size + CENNAM : 28, // filename length + CENEXT : 30, // extra field length + CENCOM : 32, // file comment length + CENDSK : 34, // volume number start + CENATT : 36, // internal file attributes + CENATX : 38, // external file attributes (host system dependent) + CENOFF : 42, // LOC header offset + + /* The entries in the end of central directory */ + ENDHDR : 22, // END header size + ENDSIG : 0x06054b50, // "PK\005\006" + ENDSUB : 8, // number of entries on this disk + ENDTOT : 10, // total number of entries + ENDSIZ : 12, // central directory size in bytes + ENDOFF : 16, // offset of first CEN header + ENDCOM : 20, // zip file comment length + + END64HDR : 20, // zip64 END header size + END64SIG : 0x07064b50, // zip64 Locator signature, "PK\006\007" + END64START : 4, // number of the disk with the start of the zip64 + END64OFF : 8, // relative offset of the zip64 end of central directory + END64NUMDISKS : 16, // total number of disks + + ZIP64SIG : 0x06064b50, // zip64 signature, "PK\006\006" + ZIP64HDR : 56, // zip64 record minimum size + ZIP64LEAD : 12, // leading bytes at the start of the record, not counted by the value stored in ZIP64SIZE + ZIP64SIZE : 4, // zip64 size of the central directory record + ZIP64VEM : 12, // zip64 version made by + ZIP64VER : 14, // zip64 version needed to extract + ZIP64DSK : 16, // zip64 number of this disk + ZIP64DSKDIR : 20, // number of the disk with the start of the record directory + ZIP64SUB : 24, // number of entries on this disk + ZIP64TOT : 32, // total number of entries + ZIP64SIZB : 40, // zip64 central directory size in bytes + ZIP64OFF : 48, // offset of start of central directory with respect to the starting disk number + ZIP64EXTRA : 56, // extensible data sector + + /* Compression methods */ + STORED : 0, // no compression + SHRUNK : 1, // shrunk + REDUCED1 : 2, // reduced with compression factor 1 + REDUCED2 : 3, // reduced with compression factor 2 + REDUCED3 : 4, // reduced with compression factor 3 + REDUCED4 : 5, // reduced with compression factor 4 + IMPLODED : 6, // imploded + // 7 reserved for Tokenizing compression algorithm + DEFLATED : 8, // deflated + ENHANCED_DEFLATED: 9, // enhanced deflated + PKWARE : 10,// PKWare DCL imploded + // 11 reserved by PKWARE + BZIP2 : 12, // compressed using BZIP2 + // 13 reserved by PKWARE + LZMA : 14, // LZMA + // 15-17 reserved by PKWARE + IBM_TERSE : 18, // compressed using IBM TERSE + IBM_LZ77 : 19, // IBM LZ77 z + AES_ENCRYPT : 99, // WinZIP AES encryption method + + /* General purpose bit flag */ + // values can obtained with expression 2**bitnr + FLG_ENC : 1, // Bit 0: encrypted file + FLG_COMP1 : 2, // Bit 1, compression option + FLG_COMP2 : 4, // Bit 2, compression option + FLG_DESC : 8, // Bit 3, data descriptor + FLG_ENH : 16, // Bit 4, enhanced deflating + FLG_PATCH : 32, // Bit 5, indicates that the file is compressed patched data. + FLG_STR : 64, // Bit 6, strong encryption (patented) + // Bits 7-10: Currently unused. + FLG_EFS : 2048, // Bit 11: Language encoding flag (EFS) + // Bit 12: Reserved by PKWARE for enhanced compression. + // Bit 13: encrypted the Central Directory (patented). + // Bits 14-15: Reserved by PKWARE. + FLG_MSK : 4096, // mask header values + + /* Load type */ + FILE : 2, + BUFFER : 1, + NONE : 0, + + /* 4.5 Extensible data fields */ + EF_ID : 0, + EF_SIZE : 2, + + /* Header IDs */ + ID_ZIP64 : 0x0001, + ID_AVINFO : 0x0007, + ID_PFS : 0x0008, + ID_OS2 : 0x0009, + ID_NTFS : 0x000a, + ID_OPENVMS : 0x000c, + ID_UNIX : 0x000d, + ID_FORK : 0x000e, + ID_PATCH : 0x000f, + ID_X509_PKCS7 : 0x0014, + ID_X509_CERTID_F : 0x0015, + ID_X509_CERTID_C : 0x0016, + ID_STRONGENC : 0x0017, + ID_RECORD_MGT : 0x0018, + ID_X509_PKCS7_RL : 0x0019, + ID_IBM1 : 0x0065, + ID_IBM2 : 0x0066, + ID_POSZIP : 0x4690, + + EF_ZIP64_OR_32 : 0xffffffff, + EF_ZIP64_OR_16 : 0xffff, + EF_ZIP64_SUNCOMP : 0, + EF_ZIP64_SCOMP : 8, + EF_ZIP64_RHO : 16, + EF_ZIP64_DSN : 24 +}; diff --git a/test-eol-project/node_modules/adm-zip/util/decoder.js b/test-eol-project/node_modules/adm-zip/util/decoder.js new file mode 100644 index 00000000..d8b98f08 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/util/decoder.js @@ -0,0 +1,5 @@ +module.exports = { + efs: true, + encode: (data) => Buffer.from(data, "utf8"), + decode: (data) => data.toString("utf8") +}; diff --git a/test-eol-project/node_modules/adm-zip/util/errors.js b/test-eol-project/node_modules/adm-zip/util/errors.js new file mode 100644 index 00000000..ad594ed6 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/util/errors.js @@ -0,0 +1,63 @@ +const errors = { + /* Header error messages */ + INVALID_LOC: "Invalid LOC header (bad signature)", + INVALID_CEN: "Invalid CEN header (bad signature)", + INVALID_END: "Invalid END header (bad signature)", + + /* Descriptor */ + DESCRIPTOR_NOT_EXIST: "No descriptor present", + DESCRIPTOR_UNKNOWN: "Unknown descriptor format", + DESCRIPTOR_FAULTY: "Descriptor data is malformed", + + /* ZipEntry error messages*/ + NO_DATA: "Nothing to decompress", + BAD_CRC: "CRC32 checksum failed {0}", + FILE_IN_THE_WAY: "There is a file in the way: {0}", + UNKNOWN_METHOD: "Invalid/unsupported compression method", + + /* Inflater error messages */ + AVAIL_DATA: "inflate::Available inflate data did not terminate", + INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block", + TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes", + INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths", + INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length", + INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete", + INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths", + INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths", + INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement", + INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)", + + /* ADM-ZIP error messages */ + CANT_EXTRACT_FILE: "Could not extract the file", + CANT_OVERRIDE: "Target file already exists", + DISK_ENTRY_TOO_LARGE: "Number of disk entries is too large", + NO_ZIP: "No zip file was loaded", + NO_ENTRY: "Entry doesn't exist", + DIRECTORY_CONTENT_ERROR: "A directory cannot have content", + FILE_NOT_FOUND: 'File not found: "{0}"', + NOT_IMPLEMENTED: "Not implemented", + INVALID_FILENAME: "Invalid filename", + INVALID_FORMAT: "Invalid or unsupported zip format. No END header found", + INVALID_PASS_PARAM: "Incompatible password parameter", + WRONG_PASSWORD: "Wrong Password", + + /* ADM-ZIP */ + COMMENT_TOO_LONG: "Comment is too long", // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space) + EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error" +}; + +// template +function E(message) { + return function (...args) { + if (args.length) { // Allow {0} .. {9} arguments in error message, based on argument number + message = message.replace(/\{(\d)\}/g, (_, n) => args[n] || ''); + } + + return new Error('ADM-ZIP: ' + message); + }; +} + +// Init errors with template +for (const msg of Object.keys(errors)) { + exports[msg] = E(errors[msg]); +} diff --git a/test-eol-project/node_modules/adm-zip/util/fattr.js b/test-eol-project/node_modules/adm-zip/util/fattr.js new file mode 100644 index 00000000..720b8278 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/util/fattr.js @@ -0,0 +1,76 @@ +const pth = require("path"); + +module.exports = function (/*String*/ path, /*Utils object*/ { fs }) { + var _path = path || "", + _obj = newAttr(), + _stat = null; + + function newAttr() { + return { + directory: false, + readonly: false, + hidden: false, + executable: false, + mtime: 0, + atime: 0 + }; + } + + if (_path && fs.existsSync(_path)) { + _stat = fs.statSync(_path); + _obj.directory = _stat.isDirectory(); + _obj.mtime = _stat.mtime; + _obj.atime = _stat.atime; + _obj.executable = (0o111 & _stat.mode) !== 0; // file is executable who ever har right not just owner + _obj.readonly = (0o200 & _stat.mode) === 0; // readonly if owner has no write right + _obj.hidden = pth.basename(_path)[0] === "."; + } else { + console.warn("Invalid path: " + _path); + } + + return { + get directory() { + return _obj.directory; + }, + + get readOnly() { + return _obj.readonly; + }, + + get hidden() { + return _obj.hidden; + }, + + get mtime() { + return _obj.mtime; + }, + + get atime() { + return _obj.atime; + }, + + get executable() { + return _obj.executable; + }, + + decodeAttributes: function () {}, + + encodeAttributes: function () {}, + + toJSON: function () { + return { + path: _path, + isDirectory: _obj.directory, + isReadOnly: _obj.readonly, + isHidden: _obj.hidden, + isExecutable: _obj.executable, + mTime: _obj.mtime, + aTime: _obj.atime + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); + } + }; +}; diff --git a/test-eol-project/node_modules/adm-zip/util/index.js b/test-eol-project/node_modules/adm-zip/util/index.js new file mode 100644 index 00000000..10119cfe --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/util/index.js @@ -0,0 +1,5 @@ +module.exports = require("./utils"); +module.exports.Constants = require("./constants"); +module.exports.Errors = require("./errors"); +module.exports.FileAttr = require("./fattr"); +module.exports.decoder = require("./decoder"); diff --git a/test-eol-project/node_modules/adm-zip/util/utils.js b/test-eol-project/node_modules/adm-zip/util/utils.js new file mode 100644 index 00000000..56807698 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/util/utils.js @@ -0,0 +1,336 @@ +const fsystem = require("fs"); +const pth = require("path"); +const Constants = require("./constants"); +const Errors = require("./errors"); +const isWin = typeof process === "object" && "win32" === process.platform; + +const is_Obj = (obj) => typeof obj === "object" && obj !== null; + +// generate CRC32 lookup table +const crcTable = new Uint32Array(256).map((t, c) => { + for (let k = 0; k < 8; k++) { + if ((c & 1) !== 0) { + c = 0xedb88320 ^ (c >>> 1); + } else { + c >>>= 1; + } + } + return c >>> 0; +}); + +// UTILS functions + +function Utils(opts) { + this.sep = pth.sep; + this.fs = fsystem; + + if (is_Obj(opts)) { + // custom filesystem + if (is_Obj(opts.fs) && typeof opts.fs.statSync === "function") { + this.fs = opts.fs; + } + } +} + +module.exports = Utils; + +// INSTANTIABLE functions + +Utils.prototype.makeDir = function (/*String*/ folder) { + const self = this; + + // Sync - make directories tree + function mkdirSync(/*String*/ fpath) { + let resolvedPath = fpath.split(self.sep)[0]; + fpath.split(self.sep).forEach(function (name) { + if (!name || name.substr(-1, 1) === ":") return; + resolvedPath += self.sep + name; + var stat; + try { + stat = self.fs.statSync(resolvedPath); + } catch (e) { + self.fs.mkdirSync(resolvedPath); + } + if (stat && stat.isFile()) throw Errors.FILE_IN_THE_WAY(`"${resolvedPath}"`); + }); + } + + mkdirSync(folder); +}; + +Utils.prototype.writeFileTo = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr) { + const self = this; + if (self.fs.existsSync(path)) { + if (!overwrite) return false; // cannot overwrite + + var stat = self.fs.statSync(path); + if (stat.isDirectory()) { + return false; + } + } + var folder = pth.dirname(path); + if (!self.fs.existsSync(folder)) { + self.makeDir(folder); + } + + var fd; + try { + fd = self.fs.openSync(path, "w", 0o666); // 0666 + } catch (e) { + self.fs.chmodSync(path, 0o666); + fd = self.fs.openSync(path, "w", 0o666); + } + if (fd) { + try { + self.fs.writeSync(fd, content, 0, content.length, 0); + } finally { + self.fs.closeSync(fd); + } + } + self.fs.chmodSync(path, attr || 0o666); + return true; +}; + +Utils.prototype.writeFileToAsync = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr, /*Function*/ callback) { + if (typeof attr === "function") { + callback = attr; + attr = undefined; + } + + const self = this; + + self.fs.exists(path, function (exist) { + if (exist && !overwrite) return callback(false); + + self.fs.stat(path, function (err, stat) { + if (exist && stat.isDirectory()) { + return callback(false); + } + + var folder = pth.dirname(path); + self.fs.exists(folder, function (exists) { + if (!exists) self.makeDir(folder); + + self.fs.open(path, "w", 0o666, function (err, fd) { + if (err) { + self.fs.chmod(path, 0o666, function () { + self.fs.open(path, "w", 0o666, function (err, fd) { + self.fs.write(fd, content, 0, content.length, 0, function () { + self.fs.close(fd, function () { + self.fs.chmod(path, attr || 0o666, function () { + callback(true); + }); + }); + }); + }); + }); + } else if (fd) { + self.fs.write(fd, content, 0, content.length, 0, function () { + self.fs.close(fd, function () { + self.fs.chmod(path, attr || 0o666, function () { + callback(true); + }); + }); + }); + } else { + self.fs.chmod(path, attr || 0o666, function () { + callback(true); + }); + } + }); + }); + }); + }); +}; + +Utils.prototype.findFiles = function (/*String*/ path) { + const self = this; + + function findSync(/*String*/ dir, /*RegExp*/ pattern, /*Boolean*/ recursive) { + if (typeof pattern === "boolean") { + recursive = pattern; + pattern = undefined; + } + let files = []; + self.fs.readdirSync(dir).forEach(function (file) { + const path = pth.join(dir, file); + const stat = self.fs.statSync(path); + + if (!pattern || pattern.test(path)) { + files.push(pth.normalize(path) + (stat.isDirectory() ? self.sep : "")); + } + + if (stat.isDirectory() && recursive) files = files.concat(findSync(path, pattern, recursive)); + }); + return files; + } + + return findSync(path, undefined, true); +}; + +/** + * Callback for showing if everything was done. + * + * @callback filelistCallback + * @param {Error} err - Error object + * @param {string[]} list - was request fully completed + */ + +/** + * + * @param {string} dir + * @param {filelistCallback} cb + */ +Utils.prototype.findFilesAsync = function (dir, cb) { + const self = this; + let results = []; + self.fs.readdir(dir, function (err, list) { + if (err) return cb(err); + let list_length = list.length; + if (!list_length) return cb(null, results); + list.forEach(function (file) { + file = pth.join(dir, file); + self.fs.stat(file, function (err, stat) { + if (err) return cb(err); + if (stat) { + results.push(pth.normalize(file) + (stat.isDirectory() ? self.sep : "")); + if (stat.isDirectory()) { + self.findFilesAsync(file, function (err, res) { + if (err) return cb(err); + results = results.concat(res); + if (!--list_length) cb(null, results); + }); + } else { + if (!--list_length) cb(null, results); + } + } + }); + }); + }); +}; + +Utils.prototype.getAttributes = function () {}; + +Utils.prototype.setAttributes = function () {}; + +// STATIC functions + +// crc32 single update (it is part of crc32) +Utils.crc32update = function (crc, byte) { + return crcTable[(crc ^ byte) & 0xff] ^ (crc >>> 8); +}; + +Utils.crc32 = function (buf) { + if (typeof buf === "string") { + buf = Buffer.from(buf, "utf8"); + } + + let len = buf.length; + let crc = ~0; + for (let off = 0; off < len; ) crc = Utils.crc32update(crc, buf[off++]); + // xor and cast as uint32 number + return ~crc >>> 0; +}; + +Utils.methodToString = function (/*Number*/ method) { + switch (method) { + case Constants.STORED: + return "STORED (" + method + ")"; + case Constants.DEFLATED: + return "DEFLATED (" + method + ")"; + default: + return "UNSUPPORTED (" + method + ")"; + } +}; + +/** + * removes ".." style path elements + * @param {string} path - fixable path + * @returns string - fixed filepath + */ +Utils.canonical = function (/*string*/ path) { + if (!path) return ""; + // trick normalize think path is absolute + const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/")); + return pth.join(".", safeSuffix); +}; + +/** + * fix file names in achive + * @param {string} path - fixable path + * @returns string - fixed filepath + */ + +Utils.zipnamefix = function (path) { + if (!path) return ""; + // trick normalize think path is absolute + const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/")); + return pth.posix.join(".", safeSuffix); +}; + +/** + * + * @param {Array} arr + * @param {function} callback + * @returns + */ +Utils.findLast = function (arr, callback) { + if (!Array.isArray(arr)) throw new TypeError("arr is not array"); + + const len = arr.length >>> 0; + for (let i = len - 1; i >= 0; i--) { + if (callback(arr[i], i, arr)) { + return arr[i]; + } + } + return void 0; +}; + +// make abolute paths taking prefix as root folder +Utils.sanitize = function (/*string*/ prefix, /*string*/ name) { + prefix = pth.resolve(pth.normalize(prefix)); + var parts = name.split("/"); + for (var i = 0, l = parts.length; i < l; i++) { + var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep))); + if (path.indexOf(prefix) === 0) { + return path; + } + } + return pth.normalize(pth.join(prefix, pth.basename(name))); +}; + +// converts buffer, Uint8Array, string types to buffer +Utils.toBuffer = function toBuffer(/*buffer, Uint8Array, string*/ input, /* function */ encoder) { + if (Buffer.isBuffer(input)) { + return input; + } else if (input instanceof Uint8Array) { + return Buffer.from(input); + } else { + // expect string all other values are invalid and return empty buffer + return typeof input === "string" ? encoder(input) : Buffer.alloc(0); + } +}; + +Utils.readBigUInt64LE = function (/*Buffer*/ buffer, /*int*/ index) { + var slice = Buffer.from(buffer.slice(index, index + 8)); + slice.swap64(); + + return parseInt(`0x${slice.toString("hex")}`); +}; + +Utils.fromDOS2Date = function (val) { + return new Date(((val >> 25) & 0x7f) + 1980, Math.max(((val >> 21) & 0x0f) - 1, 0), Math.max((val >> 16) & 0x1f, 1), (val >> 11) & 0x1f, (val >> 5) & 0x3f, (val & 0x1f) << 1); +}; + +Utils.fromDate2DOS = function (val) { + let date = 0; + let time = 0; + if (val.getFullYear() > 1979) { + date = (((val.getFullYear() - 1980) & 0x7f) << 9) | ((val.getMonth() + 1) << 5) | val.getDate(); + time = (val.getHours() << 11) | (val.getMinutes() << 5) | (val.getSeconds() >> 1); + } + return (date << 16) | time; +}; + +Utils.isWin = isWin; // Do we have windows system +Utils.crcTable = crcTable; diff --git a/test-eol-project/node_modules/adm-zip/zipEntry.js b/test-eol-project/node_modules/adm-zip/zipEntry.js new file mode 100644 index 00000000..e7804b6c --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/zipEntry.js @@ -0,0 +1,405 @@ +var Utils = require("./util"), + Headers = require("./headers"), + Constants = Utils.Constants, + Methods = require("./methods"); + +module.exports = function (/** object */ options, /*Buffer*/ input) { + var _centralHeader = new Headers.EntryHeader(), + _entryName = Buffer.alloc(0), + _comment = Buffer.alloc(0), + _isDirectory = false, + uncompressedData = null, + _extra = Buffer.alloc(0), + _extralocal = Buffer.alloc(0), + _efs = true; + + // assign options + const opts = options; + + const decoder = typeof opts.decoder === "object" ? opts.decoder : Utils.decoder; + _efs = decoder.hasOwnProperty("efs") ? decoder.efs : false; + + function getCompressedDataFromZip() { + //if (!input || !Buffer.isBuffer(input)) { + if (!input || !(input instanceof Uint8Array)) { + return Buffer.alloc(0); + } + _extralocal = _centralHeader.loadLocalHeaderFromBinary(input); + return input.slice(_centralHeader.realDataOffset, _centralHeader.realDataOffset + _centralHeader.compressedSize); + } + + function crc32OK(data) { + // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the local header is written + if (!_centralHeader.flags_desc) { + if (Utils.crc32(data) !== _centralHeader.localHeader.crc) { + return false; + } + } else { + const descriptor = {}; + const dataEndOffset = _centralHeader.realDataOffset + _centralHeader.compressedSize; + // no descriptor after compressed data, instead new local header + if (input.readUInt32LE(dataEndOffset) == Constants.LOCSIG || input.readUInt32LE(dataEndOffset) == Constants.CENSIG) { + throw Utils.Errors.DESCRIPTOR_NOT_EXIST(); + } + + // get decriptor data + if (input.readUInt32LE(dataEndOffset) == Constants.EXTSIG) { + // descriptor with signature + descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC); + descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ); + descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN); + } else if (input.readUInt16LE(dataEndOffset + 12) === 0x4b50) { + // descriptor without signature (we check is new header starting where we expect) + descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC - 4); + descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ - 4); + descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN - 4); + } else { + throw Utils.Errors.DESCRIPTOR_UNKNOWN(); + } + + // check data integrity + if (descriptor.compressedSize !== _centralHeader.compressedSize || descriptor.size !== _centralHeader.size || descriptor.crc !== _centralHeader.crc) { + throw Utils.Errors.DESCRIPTOR_FAULTY(); + } + if (Utils.crc32(data) !== descriptor.crc) { + return false; + } + + // @TODO: zip64 bit descriptor fields + // if bit 3 is set and any value in local header "zip64 Extended information" extra field are set 0 (place holder) + // then 64-bit descriptor format is used instead of 32-bit + // central header - "zip64 Extended information" extra field should store real values and not place holders + } + return true; + } + + function decompress(/*Boolean*/ async, /*Function*/ callback, /*String, Buffer*/ pass) { + if (typeof callback === "undefined" && typeof async === "string") { + pass = async; + async = void 0; + } + if (_isDirectory) { + if (async && callback) { + callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR()); //si added error. + } + return Buffer.alloc(0); + } + + var compressedData = getCompressedDataFromZip(); + + if (compressedData.length === 0) { + // File is empty, nothing to decompress. + if (async && callback) callback(compressedData); + return compressedData; + } + + if (_centralHeader.encrypted) { + if ("string" !== typeof pass && !Buffer.isBuffer(pass)) { + throw Utils.Errors.INVALID_PASS_PARAM(); + } + compressedData = Methods.ZipCrypto.decrypt(compressedData, _centralHeader, pass); + } + + var data = Buffer.alloc(_centralHeader.size); + + switch (_centralHeader.method) { + case Utils.Constants.STORED: + compressedData.copy(data); + if (!crc32OK(data)) { + if (async && callback) callback(data, Utils.Errors.BAD_CRC()); //si added error + throw Utils.Errors.BAD_CRC(); + } else { + //si added otherwise did not seem to return data. + if (async && callback) callback(data); + return data; + } + case Utils.Constants.DEFLATED: + var inflater = new Methods.Inflater(compressedData, _centralHeader.size); + if (!async) { + const result = inflater.inflate(data); + result.copy(data, 0); + if (!crc32OK(data)) { + throw Utils.Errors.BAD_CRC(`"${decoder.decode(_entryName)}"`); + } + return data; + } else { + inflater.inflateAsync(function (result) { + result.copy(result, 0); + if (callback) { + if (!crc32OK(result)) { + callback(result, Utils.Errors.BAD_CRC()); //si added error + } else { + callback(result); + } + } + }); + } + break; + default: + if (async && callback) callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD()); + throw Utils.Errors.UNKNOWN_METHOD(); + } + } + + function compress(/*Boolean*/ async, /*Function*/ callback) { + if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { + // no data set or the data wasn't changed to require recompression + if (async && callback) callback(getCompressedDataFromZip()); + return getCompressedDataFromZip(); + } + + if (uncompressedData.length && !_isDirectory) { + var compressedData; + // Local file header + switch (_centralHeader.method) { + case Utils.Constants.STORED: + _centralHeader.compressedSize = _centralHeader.size; + + compressedData = Buffer.alloc(uncompressedData.length); + uncompressedData.copy(compressedData); + + if (async && callback) callback(compressedData); + return compressedData; + default: + case Utils.Constants.DEFLATED: + var deflater = new Methods.Deflater(uncompressedData); + if (!async) { + var deflated = deflater.deflate(); + _centralHeader.compressedSize = deflated.length; + return deflated; + } else { + deflater.deflateAsync(function (data) { + compressedData = Buffer.alloc(data.length); + _centralHeader.compressedSize = data.length; + data.copy(compressedData); + callback && callback(compressedData); + }); + } + deflater = null; + break; + } + } else if (async && callback) { + callback(Buffer.alloc(0)); + } else { + return Buffer.alloc(0); + } + } + + function readUInt64LE(buffer, offset) { + return (buffer.readUInt32LE(offset + 4) << 4) + buffer.readUInt32LE(offset); + } + + function parseExtra(data) { + try { + var offset = 0; + var signature, size, part; + while (offset + 4 < data.length) { + signature = data.readUInt16LE(offset); + offset += 2; + size = data.readUInt16LE(offset); + offset += 2; + part = data.slice(offset, offset + size); + offset += size; + if (Constants.ID_ZIP64 === signature) { + parseZip64ExtendedInformation(part); + } + } + } catch (error) { + throw Utils.Errors.EXTRA_FIELD_PARSE_ERROR(); + } + } + + //Override header field values with values from the ZIP64 extra field + function parseZip64ExtendedInformation(data) { + var size, compressedSize, offset, diskNumStart; + + if (data.length >= Constants.EF_ZIP64_SCOMP) { + size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP); + if (_centralHeader.size === Constants.EF_ZIP64_OR_32) { + _centralHeader.size = size; + } + } + if (data.length >= Constants.EF_ZIP64_RHO) { + compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP); + if (_centralHeader.compressedSize === Constants.EF_ZIP64_OR_32) { + _centralHeader.compressedSize = compressedSize; + } + } + if (data.length >= Constants.EF_ZIP64_DSN) { + offset = readUInt64LE(data, Constants.EF_ZIP64_RHO); + if (_centralHeader.offset === Constants.EF_ZIP64_OR_32) { + _centralHeader.offset = offset; + } + } + if (data.length >= Constants.EF_ZIP64_DSN + 4) { + diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN); + if (_centralHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { + _centralHeader.diskNumStart = diskNumStart; + } + } + } + + return { + get entryName() { + return decoder.decode(_entryName); + }, + get rawEntryName() { + return _entryName; + }, + set entryName(val) { + _entryName = Utils.toBuffer(val, decoder.encode); + var lastChar = _entryName[_entryName.length - 1]; + _isDirectory = lastChar === 47 || lastChar === 92; + _centralHeader.fileNameLength = _entryName.length; + }, + + get efs() { + if (typeof _efs === "function") { + return _efs(this.entryName); + } else { + return _efs; + } + }, + + get extra() { + return _extra; + }, + set extra(val) { + _extra = val; + _centralHeader.extraLength = val.length; + parseExtra(val); + }, + + get comment() { + return decoder.decode(_comment); + }, + set comment(val) { + _comment = Utils.toBuffer(val, decoder.encode); + _centralHeader.commentLength = _comment.length; + if (_comment.length > 0xffff) throw Utils.Errors.COMMENT_TOO_LONG(); + }, + + get name() { + var n = decoder.decode(_entryName); + return _isDirectory + ? n + .substr(n.length - 1) + .split("/") + .pop() + : n.split("/").pop(); + }, + get isDirectory() { + return _isDirectory; + }, + + getCompressedData: function () { + return compress(false, null); + }, + + getCompressedDataAsync: function (/*Function*/ callback) { + compress(true, callback); + }, + + setData: function (value) { + uncompressedData = Utils.toBuffer(value, Utils.decoder.encode); + if (!_isDirectory && uncompressedData.length) { + _centralHeader.size = uncompressedData.length; + _centralHeader.method = Utils.Constants.DEFLATED; + _centralHeader.crc = Utils.crc32(value); + _centralHeader.changed = true; + } else { + // folders and blank files should be stored + _centralHeader.method = Utils.Constants.STORED; + } + }, + + getData: function (pass) { + if (_centralHeader.changed) { + return uncompressedData; + } else { + return decompress(false, null, pass); + } + }, + + getDataAsync: function (/*Function*/ callback, pass) { + if (_centralHeader.changed) { + callback(uncompressedData); + } else { + decompress(true, callback, pass); + } + }, + + set attr(attr) { + _centralHeader.attr = attr; + }, + get attr() { + return _centralHeader.attr; + }, + + set header(/*Buffer*/ data) { + _centralHeader.loadFromBinary(data); + }, + + get header() { + return _centralHeader; + }, + + packCentralHeader: function () { + _centralHeader.flags_efs = this.efs; + _centralHeader.extraLength = _extra.length; + // 1. create header (buffer) + var header = _centralHeader.centralHeaderToBinary(); + var addpos = Utils.Constants.CENHDR; + // 2. add file name + _entryName.copy(header, addpos); + addpos += _entryName.length; + // 3. add extra data + _extra.copy(header, addpos); + addpos += _centralHeader.extraLength; + // 4. add file comment + _comment.copy(header, addpos); + return header; + }, + + packLocalHeader: function () { + let addpos = 0; + _centralHeader.flags_efs = this.efs; + _centralHeader.extraLocalLength = _extralocal.length; + // 1. construct local header Buffer + const localHeaderBuf = _centralHeader.localHeaderToBinary(); + // 2. localHeader - crate header buffer + const localHeader = Buffer.alloc(localHeaderBuf.length + _entryName.length + _centralHeader.extraLocalLength); + // 2.1 add localheader + localHeaderBuf.copy(localHeader, addpos); + addpos += localHeaderBuf.length; + // 2.2 add file name + _entryName.copy(localHeader, addpos); + addpos += _entryName.length; + // 2.3 add extra field + _extralocal.copy(localHeader, addpos); + addpos += _extralocal.length; + + return localHeader; + }, + + toJSON: function () { + const bytes = function (nr) { + return "<" + ((nr && nr.length + " bytes buffer") || "null") + ">"; + }; + + return { + entryName: this.entryName, + name: this.name, + comment: this.comment, + isDirectory: this.isDirectory, + header: _centralHeader.toJSON(), + compressedData: bytes(input), + data: bytes(uncompressedData) + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); + } + }; +}; diff --git a/test-eol-project/node_modules/adm-zip/zipFile.js b/test-eol-project/node_modules/adm-zip/zipFile.js new file mode 100644 index 00000000..a52db943 --- /dev/null +++ b/test-eol-project/node_modules/adm-zip/zipFile.js @@ -0,0 +1,446 @@ +const ZipEntry = require("./zipEntry"); +const Headers = require("./headers"); +const Utils = require("./util"); + +module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) { + var entryList = [], + entryTable = {}, + _comment = Buffer.alloc(0), + mainHeader = new Headers.MainHeader(), + loadedEntries = false; + var password = null; + const temporary = new Set(); + + // assign options + const opts = options; + + const { noSort, decoder } = opts; + + if (inBuffer) { + // is a memory buffer + readMainHeader(opts.readEntries); + } else { + // none. is a new file + loadedEntries = true; + } + + function makeTemporaryFolders() { + const foldersList = new Set(); + + // Make list of all folders in file + for (const elem of Object.keys(entryTable)) { + const elements = elem.split("/"); + elements.pop(); // filename + if (!elements.length) continue; // no folders + for (let i = 0; i < elements.length; i++) { + const sub = elements.slice(0, i + 1).join("/") + "/"; + foldersList.add(sub); + } + } + + // create missing folders as temporary + for (const elem of foldersList) { + if (!(elem in entryTable)) { + const tempfolder = new ZipEntry(opts); + tempfolder.entryName = elem; + tempfolder.attr = 0x10; + tempfolder.temporary = true; + entryList.push(tempfolder); + entryTable[tempfolder.entryName] = tempfolder; + temporary.add(tempfolder); + } + } + } + + function readEntries() { + loadedEntries = true; + entryTable = {}; + if (mainHeader.diskEntries > (inBuffer.length - mainHeader.offset) / Utils.Constants.CENHDR) { + throw Utils.Errors.DISK_ENTRY_TOO_LARGE(); + } + entryList = new Array(mainHeader.diskEntries); // total number of entries + var index = mainHeader.offset; // offset of first CEN header + for (var i = 0; i < entryList.length; i++) { + var tmp = index, + entry = new ZipEntry(opts, inBuffer); + entry.header = inBuffer.slice(tmp, (tmp += Utils.Constants.CENHDR)); + + entry.entryName = inBuffer.slice(tmp, (tmp += entry.header.fileNameLength)); + + if (entry.header.extraLength) { + entry.extra = inBuffer.slice(tmp, (tmp += entry.header.extraLength)); + } + + if (entry.header.commentLength) entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); + + index += entry.header.centralHeaderSize; + + entryList[i] = entry; + entryTable[entry.entryName] = entry; + } + temporary.clear(); + makeTemporaryFolders(); + } + + function readMainHeader(/*Boolean*/ readNow) { + var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size + max = Math.max(0, i - 0xffff), // 0xFFFF is the max zip file comment length + n = max, + endStart = inBuffer.length, + endOffset = -1, // Start offset of the END header + commentEnd = 0; + + // option to search header form entire file + const trailingSpace = typeof opts.trailingSpace === "boolean" ? opts.trailingSpace : false; + if (trailingSpace) max = 0; + + for (i; i >= n; i--) { + if (inBuffer[i] !== 0x50) continue; // quick check that the byte is 'P' + if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) { + // "PK\005\006" + endOffset = i; + commentEnd = i; + endStart = i + Utils.Constants.ENDHDR; + // We already found a regular signature, let's look just a bit further to check if there's any zip64 signature + n = i - Utils.Constants.END64HDR; + continue; + } + + if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) { + // Found a zip64 signature, let's continue reading the whole zip64 record + n = max; + continue; + } + + if (inBuffer.readUInt32LE(i) === Utils.Constants.ZIP64SIG) { + // Found the zip64 record, let's determine it's size + endOffset = i; + endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD; + break; + } + } + + if (endOffset == -1) throw Utils.Errors.INVALID_FORMAT(); + + mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart)); + if (mainHeader.commentLength) { + _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR); + } + if (readNow) readEntries(); + } + + function sortEntries() { + if (entryList.length > 1 && !noSort) { + entryList.sort((a, b) => a.entryName.toLowerCase().localeCompare(b.entryName.toLowerCase())); + } + } + + return { + /** + * Returns an array of ZipEntry objects existent in the current opened archive + * @return Array + */ + get entries() { + if (!loadedEntries) { + readEntries(); + } + return entryList.filter((e) => !temporary.has(e)); + }, + + /** + * Archive comment + * @return {String} + */ + get comment() { + return decoder.decode(_comment); + }, + set comment(val) { + _comment = Utils.toBuffer(val, decoder.encode); + mainHeader.commentLength = _comment.length; + }, + + getEntryCount: function () { + if (!loadedEntries) { + return mainHeader.diskEntries; + } + + return entryList.length; + }, + + forEach: function (callback) { + this.entries.forEach(callback); + }, + + /** + * Returns a reference to the entry with the given name or null if entry is inexistent + * + * @param entryName + * @return ZipEntry + */ + getEntry: function (/*String*/ entryName) { + if (!loadedEntries) { + readEntries(); + } + return entryTable[entryName] || null; + }, + + /** + * Adds the given entry to the entry list + * + * @param entry + */ + setEntry: function (/*ZipEntry*/ entry) { + if (!loadedEntries) { + readEntries(); + } + entryList.push(entry); + entryTable[entry.entryName] = entry; + mainHeader.totalEntries = entryList.length; + }, + + /** + * Removes the file with the given name from the entry list. + * + * If the entry is a directory, then all nested files and directories will be removed + * @param entryName + * @returns {void} + */ + deleteFile: function (/*String*/ entryName, withsubfolders = true) { + if (!loadedEntries) { + readEntries(); + } + const entry = entryTable[entryName]; + const list = this.getEntryChildren(entry, withsubfolders).map((child) => child.entryName); + + list.forEach(this.deleteEntry); + }, + + /** + * Removes the entry with the given name from the entry list. + * + * @param {string} entryName + * @returns {void} + */ + deleteEntry: function (/*String*/ entryName) { + if (!loadedEntries) { + readEntries(); + } + const entry = entryTable[entryName]; + const index = entryList.indexOf(entry); + if (index >= 0) { + entryList.splice(index, 1); + delete entryTable[entryName]; + mainHeader.totalEntries = entryList.length; + } + }, + + /** + * Iterates and returns all nested files and directories of the given entry + * + * @param entry + * @return Array + */ + getEntryChildren: function (/*ZipEntry*/ entry, subfolders = true) { + if (!loadedEntries) { + readEntries(); + } + if (typeof entry === "object") { + if (entry.isDirectory && subfolders) { + const list = []; + const name = entry.entryName; + + for (const zipEntry of entryList) { + if (zipEntry.entryName.startsWith(name)) { + list.push(zipEntry); + } + } + return list; + } else { + return [entry]; + } + } + return []; + }, + + /** + * How many child elements entry has + * + * @param {ZipEntry} entry + * @return {integer} + */ + getChildCount: function (entry) { + if (entry && entry.isDirectory) { + const list = this.getEntryChildren(entry); + return list.includes(entry) ? list.length - 1 : list.length; + } + return 0; + }, + + /** + * Returns the zip file + * + * @return Buffer + */ + compressToBuffer: function () { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + + const dataBlock = []; + const headerBlocks = []; + let totalSize = 0; + let dindex = 0; + + mainHeader.size = 0; + mainHeader.offset = 0; + let totalEntries = 0; + + for (const entry of this.entries) { + // compress data and set local and entry header accordingly. Reason why is called first + const compressedData = entry.getCompressedData(); + entry.header.offset = dindex; + + // 1. construct local header + const localHeader = entry.packLocalHeader(); + + // 2. offsets + const dataLength = localHeader.length + compressedData.length; + dindex += dataLength; + + // 3. store values in sequence + dataBlock.push(localHeader); + dataBlock.push(compressedData); + + // 4. construct central header + const centralHeader = entry.packCentralHeader(); + headerBlocks.push(centralHeader); + // 5. update main header + mainHeader.size += centralHeader.length; + totalSize += dataLength + centralHeader.length; + totalEntries++; + } + + totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length + // point to end of data and beginning of central directory first record + mainHeader.offset = dindex; + mainHeader.totalEntries = totalEntries; + + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + // write data blocks + for (const content of dataBlock) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + + // write central directory entries + for (const content of headerBlocks) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + + // write main header + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment + } + mh.copy(outBuffer, dindex); + + // Since we update entry and main header offsets, + // they are no longer valid and we have to reset content + // (Issue 64) + + inBuffer = outBuffer; + loadedEntries = false; + + return outBuffer; + }, + + toAsyncBuffer: function (/*Function*/ onSuccess, /*Function*/ onFail, /*Function*/ onItemStart, /*Function*/ onItemEnd) { + try { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + + const dataBlock = []; + const centralHeaders = []; + let totalSize = 0; + let dindex = 0; + let totalEntries = 0; + + mainHeader.size = 0; + mainHeader.offset = 0; + + const compress2Buffer = function (entryLists) { + if (entryLists.length > 0) { + const entry = entryLists.shift(); + const name = entry.entryName + entry.extra.toString(); + if (onItemStart) onItemStart(name); + entry.getCompressedDataAsync(function (compressedData) { + if (onItemEnd) onItemEnd(name); + entry.header.offset = dindex; + + // 1. construct local header + const localHeader = entry.packLocalHeader(); + + // 2. offsets + const dataLength = localHeader.length + compressedData.length; + dindex += dataLength; + + // 3. store values in sequence + dataBlock.push(localHeader); + dataBlock.push(compressedData); + + // central header + const centalHeader = entry.packCentralHeader(); + centralHeaders.push(centalHeader); + mainHeader.size += centalHeader.length; + totalSize += dataLength + centalHeader.length; + totalEntries++; + + compress2Buffer(entryLists); + }); + } else { + totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length + // point to end of data and beginning of central directory first record + mainHeader.offset = dindex; + mainHeader.totalEntries = totalEntries; + + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + dataBlock.forEach(function (content) { + content.copy(outBuffer, dindex); // write data blocks + dindex += content.length; + }); + centralHeaders.forEach(function (content) { + content.copy(outBuffer, dindex); // write central directory entries + dindex += content.length; + }); + + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment + } + + mh.copy(outBuffer, dindex); // write main header + + // Since we update entry and main header offsets, they are no + // longer valid and we have to reset content using our new buffer + // (Issue 64) + + inBuffer = outBuffer; + loadedEntries = false; + + onSuccess(outBuffer); + } + }; + + compress2Buffer(Array.from(this.entries)); + } catch (e) { + onFail(e); + } + } + }; +}; diff --git a/test-eol-project/node_modules/agent-base/.travis.yml b/test-eol-project/node_modules/agent-base/.travis.yml new file mode 100644 index 00000000..76200951 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/.travis.yml @@ -0,0 +1,24 @@ +sudo: false + +language: node_js + +node_js: + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + - "10" + +install: + - PATH="`npm bin`:`npm bin -g`:$PATH" + # Install dependencies and build + - npm install + +script: + # Output useful info for debugging + - node --version + - npm --version + # Run tests + - npm test diff --git a/test-eol-project/node_modules/agent-base/History.md b/test-eol-project/node_modules/agent-base/History.md new file mode 100644 index 00000000..80c88dc4 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/History.md @@ -0,0 +1,113 @@ + +4.2.0 / 2018-01-15 +================== + + * Add support for returning an `http.Agent` instance + * Optimize promisifying logic + * Set `timeout` to null for proper cleanup + * Remove Node.js <= 0.11.3 special-casing from test case + +4.1.2 / 2017-11-20 +================== + + * test Node 9 on Travis + * ensure that `https.get()` uses the patched `https.request()` + +4.1.1 / 2017-07-20 +================== + + * Correct `https.request()` with a String (#9) + +4.1.0 / 2017-06-26 +================== + + * mix in Agent options into Request options + * throw when nothing is returned from agent-base callback + * do not modify the options object for https requests + +4.0.1 / 2017-06-13 +================== + + * add `this` context tests and fixes + +4.0.0 / 2017-06-06 +================== + + * drop support for Node.js < 4 + * drop old versions of Node.js from Travis-CI + * specify Node.js >= 4.0.0 in `engines.node` + * remove more old code + * remove "extend" dependency + * remove "semver" dependency + * make the Promise logic a bit cleaner + * add async function pseudo-example to README + * use direct return in README example + +3.0.0 / 2017-06-02 +================== + + * drop support for Node.js v0.8 and v0.10 + * add support for async, Promises, and direct return + * add a couple `options` test cases + * implement a `"timeout"` option + * rename main file to `index.js` + * test Node 8 on Travis + +2.1.1 / 2017-05-30 +================== + + * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) + +2.1.0 / 2017-05-26 +================== + + * unref is not supported for node < 0.9.1 (@pi0) + * add tests to dangling socket (@pi0) + * check unref() is supported (@pi0) + * fix dangling sockets problem (@pi0) + * add basic "ws" module tests + * make `Agent` be subclassable + * turn `addRequest()` into a named function + * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) + * travis: test node v4, v5, v6 and v7 + +2.0.1 / 2015-09-10 +================== + + * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet) + +2.0.0 / 2015-07-10 +================== + + * refactor to patch Node.js core for more consistent `opts` values + * ensure that HTTP(s) default port numbers are always given + * test: use ssl-cert-snakeoil SSL certs + * test: add tests for arbitrary options + * README: add API section + * README: make the Agent HTTP/HTTPS generic in the example + * README: use SVG for Travis-CI badge + +1.0.2 / 2015-06-27 +================== + + * agent: set `req._hadError` to true after emitting "error" + * package: update "mocha" to v2 + * test: add artificial HTTP GET request test + * test: add artificial data events test + * test: fix artifical GET response test on node > v0.11.3 + * test: use a real timeout for the async error test + +1.0.1 / 2013-09-09 +================== + + * Fix passing an "error" object to the callback function on the first tick + +1.0.0 / 2013-09-09 +================== + + * New API: now you pass a callback function directly + +0.0.1 / 2013-07-09 +================== + + * Initial release diff --git a/test-eol-project/node_modules/agent-base/README.md b/test-eol-project/node_modules/agent-base/README.md new file mode 100644 index 00000000..dbeceab8 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/README.md @@ -0,0 +1,145 @@ +agent-base +========== +### Turn a function into an [`http.Agent`][http.Agent] instance +[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base) + +This module provides an `http.Agent` generator. That is, you pass it an async +callback function, and it returns a new `http.Agent` instance that will invoke the +given callback function when sending outbound HTTP requests. + +#### Some subclasses: + +Here's some more interesting uses of `agent-base`. +Send a pull request to list yours! + + * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints + * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints + * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS + * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install agent-base +``` + + +Example +------- + +Here's a minimal example that creates a new `net.Socket` connection to the server +for every HTTP request (i.e. the equivalent of `agent: false` option): + +```js +var net = require('net'); +var tls = require('tls'); +var url = require('url'); +var http = require('http'); +var agent = require('agent-base'); + +var endpoint = 'http://nodejs.org/api/'; +var parsed = url.parse(endpoint); + +// This is the important part! +parsed.agent = agent(function (req, opts) { + var socket; + // `secureEndpoint` is true when using the https module + if (opts.secureEndpoint) { + socket = tls.connect(opts); + } else { + socket = net.connect(opts); + } + return socket; +}); + +// Everything else works just like normal... +http.get(parsed, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +Returning a Promise or using an `async` function is also supported: + +```js +agent(async function (req, opts) { + await sleep(1000); + // etc… +}); +``` + +Return another `http.Agent` instance to "pass through" the responsibility +for that HTTP request to that agent: + +```js +agent(function (req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); +``` + + +API +--- + +## Agent(Function callback[, Object options]) → [http.Agent][] + +Creates a base `http.Agent` that will execute the callback function `callback` +for every HTTP request that it is used as the `agent` for. The callback function +is responsible for creating a `stream.Duplex` instance of some kind that will be +used as the underlying socket in the HTTP request. + +The `options` object accepts the following properties: + + * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). + +The callback function should have the following signature: + +### callback(http.ClientRequest req, Object options, Function cb) → undefined + +The ClientRequest `req` can be accessed to read request headers and +and the path, etc. The `options` object contains the options passed +to the `http.request()`/`https.request()` function call, and is formatted +to be directly passed to `net.connect()`/`tls.connect()`, or however +else you want a Socket to be created. Pass the created socket to +the callback function `cb` once created, and the HTTP request will +continue to proceed. + +If the `https` module is used to invoke the HTTP request, then the +`secureEndpoint` property on `options` _will be set to `true`_. + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +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. + +[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent +[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent +[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent +[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent +[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/test-eol-project/node_modules/agent-base/index.d.ts b/test-eol-project/node_modules/agent-base/index.d.ts new file mode 100644 index 00000000..ff6788bd --- /dev/null +++ b/test-eol-project/node_modules/agent-base/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for agent-base 4.2.1 +// Project: https://github.com/TooTallNate/node-agent-base +// Definitions by: Christopher Quadflieg + +/// +import { EventEmitter } from 'events'; + +declare namespace Agent { + export type AgentCallback = ( + req?: any, + opts?: { + secureEndpoint: boolean; + } + ) => void; + + export interface AgentOptions { + timeout?: number; + host?: string; + port?: number; + [key: string]: any; + } + + export interface Agent extends EventEmitter { + _promisifiedCallback: boolean; + timeout: number | null; + options?: AgentOptions; + callback: AgentCallback; + addRequest: (req?: any, opts?: any) => void; + freeSocket: (socket: any, opts: any) => void; + } +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + */ +declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; +declare function Agent( + callback: Agent.AgentCallback, + opts?: Agent.AgentOptions +): Agent.Agent; + +export = Agent; diff --git a/test-eol-project/node_modules/agent-base/index.js b/test-eol-project/node_modules/agent-base/index.js new file mode 100644 index 00000000..0ee6b296 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/index.js @@ -0,0 +1,170 @@ +'use strict'; +require('./patch-core'); +const inherits = require('util').inherits; +const promisify = require('es6-promisify'); +const EventEmitter = require('events').EventEmitter; + +module.exports = Agent; + +function isAgent(v) { + return v && typeof v.addRequest === 'function'; +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ +function Agent(callback, _opts) { + if (!(this instanceof Agent)) { + return new Agent(callback, _opts); + } + + EventEmitter.call(this); + + // The callback gets promisified if it has 3 parameters + // (i.e. it has a callback function) lazily + this._promisifiedCallback = false; + + let opts = _opts; + if ('function' === typeof callback) { + this.callback = callback; + } else if (callback) { + opts = callback; + } + + // timeout for the socket to be returned from the callback + this.timeout = (opts && opts.timeout) || null; + + this.options = opts; +} +inherits(Agent, EventEmitter); + +/** + * Override this function in your subclass! + */ +Agent.prototype.callback = function callback(req, opts) { + throw new Error( + '"agent-base" has no default implementation, you must subclass and override `callback()`' + ); +}; + +/** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ +Agent.prototype.addRequest = function addRequest(req, _opts) { + const ownOpts = Object.assign({}, _opts); + + // Set default `host` for HTTP to localhost + if (null == ownOpts.host) { + ownOpts.host = 'localhost'; + } + + // Set default `port` for HTTP if none was explicitly specified + if (null == ownOpts.port) { + ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; + } + + const opts = Object.assign({}, this.options, ownOpts); + + if (opts.host && opts.path) { + // If both a `host` and `path` are specified then it's most likely the + // result of a `url.parse()` call... we need to remove the `path` portion so + // that `net.connect()` doesn't attempt to open that as a unix socket file. + delete opts.path; + } + + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + + // Hint to use "Connection: close" + // XXX: non-documented `http` module API :( + req._last = true; + req.shouldKeepAlive = false; + + // Create the `stream.Duplex` instance + let timeout; + let timedOut = false; + const timeoutMs = this.timeout; + const freeSocket = this.freeSocket; + + function onerror(err) { + if (req._hadError) return; + req.emit('error', err); + // For Safety. Some additional errors might fire later on + // and we need to make sure we don't double-fire the error event. + req._hadError = true; + } + + function ontimeout() { + timeout = null; + timedOut = true; + const err = new Error( + 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms' + ); + err.code = 'ETIMEOUT'; + onerror(err); + } + + function callbackError(err) { + if (timedOut) return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + onerror(err); + } + + function onsocket(socket) { + if (timedOut) return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + if (isAgent(socket)) { + // `socket` is actually an http.Agent instance, so relinquish + // responsibility for this `req` to the Agent from here on + socket.addRequest(req, opts); + } else if (socket) { + function onfree() { + freeSocket(socket, opts); + } + socket.on('free', onfree); + req.onSocket(socket); + } else { + const err = new Error( + 'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`' + ); + onerror(err); + } + } + + if (!this._promisifiedCallback && this.callback.length >= 3) { + // Legacy callback function - convert to a Promise + this.callback = promisify(this.callback, this); + this._promisifiedCallback = true; + } + + if (timeoutMs > 0) { + timeout = setTimeout(ontimeout, timeoutMs); + } + + try { + Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } +}; + +Agent.prototype.freeSocket = function freeSocket(socket, opts) { + // TODO reuse sockets + socket.destroy(); +}; diff --git a/test-eol-project/node_modules/agent-base/package.json b/test-eol-project/node_modules/agent-base/package.json new file mode 100644 index 00000000..9958cbc0 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/package.json @@ -0,0 +1,37 @@ +{ + "name": "agent-base", + "version": "4.3.0", + "description": "Turn a function into an `http.Agent` instance", + "main": "./index.js", + "scripts": { + "test": "mocha --reporter spec" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-agent-base.git" + }, + "keywords": [ + "http", + "agent", + "base", + "barebones", + "https" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/node-agent-base/issues" + }, + "devDependencies": { + "@types/es6-promisify": "^5.0.0", + "@types/node": "^10.5.3", + "mocha": "^3.4.2", + "ws": "^3.0.0" + }, + "dependencies": { + "es6-promisify": "^5.0.0" + }, + "engines": { + "node": ">= 4.0.0" + } +} diff --git a/test-eol-project/node_modules/agent-base/patch-core.js b/test-eol-project/node_modules/agent-base/patch-core.js new file mode 100644 index 00000000..21cbbb67 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/patch-core.js @@ -0,0 +1,51 @@ +'use strict'; +const url = require('url'); +const https = require('https'); + +/** + * This currently needs to be applied to all Node.js versions + * in order to determine if the `req` is an HTTP or HTTPS request. + * + * There is currently no PR attempting to move this property upstream. + */ +const patchMarker = "__agent_base_https_request_patched__"; +if (!https.request[patchMarker]) { + https.request = (function(request) { + return function(_options, cb) { + let options; + if (typeof _options === 'string') { + options = url.parse(_options); + } else { + options = Object.assign({}, _options); + } + if (null == options.port) { + options.port = 443; + } + options.secureEndpoint = true; + return request.call(https, options, cb); + }; + })(https.request); + https.request[patchMarker] = true; +} + +/** + * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the + * patched `https.request()`. + * + * Ref: https://github.com/nodejs/node/commit/5118f31 + */ +https.get = function (_url, _options, cb) { + let options; + if (typeof _url === 'string' && _options && typeof _options !== 'function') { + options = Object.assign({}, url.parse(_url), _options); + } else if (!_options && !cb) { + options = _url; + } else if (!cb) { + options = _url; + cb = _options; + } + + const req = https.request(options, cb); + req.end(); + return req; +}; diff --git a/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key b/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key new file mode 100644 index 00000000..fd125012 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr +bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y +b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB +AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd +Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x +1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ +5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW +T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX +uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N +Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw +h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J +bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ +ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== +-----END RSA PRIVATE KEY----- diff --git a/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem new file mode 100644 index 00000000..b115a5e9 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 +NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 +NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 +NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB +ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay +OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn +g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN +AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 +1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J +QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= +-----END CERTIFICATE----- diff --git a/test-eol-project/node_modules/agent-base/test/test.js b/test-eol-project/node_modules/agent-base/test/test.js new file mode 100644 index 00000000..0f372c07 --- /dev/null +++ b/test-eol-project/node_modules/agent-base/test/test.js @@ -0,0 +1,728 @@ +/** + * Module dependencies. + */ + +var fs = require('fs'); +var url = require('url'); +var net = require('net'); +var tls = require('tls'); +var http = require('http'); +var https = require('https'); +var WebSocket = require('ws'); +var assert = require('assert'); +var events = require('events'); +var inherits = require('util').inherits; +var Agent = require('../'); + +var PassthroughAgent = Agent(function(req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); + +describe('Agent', function() { + describe('subclass', function() { + it('should be subclassable', function(done) { + function MyAgent() { + Agent.call(this); + } + inherits(MyAgent, Agent); + + MyAgent.prototype.callback = function(req, opts, fn) { + assert.equal(req.path, '/foo'); + assert.equal(req.getHeader('host'), '127.0.0.1:1234'); + assert.equal(opts.secureEndpoint, true); + done(); + }; + + var info = url.parse('https://127.0.0.1:1234/foo'); + info.agent = new MyAgent(); + https.get(info); + }); + }); + describe('options', function() { + it('should support an options Object as first argument', function() { + var agent = new Agent({ timeout: 1000 }); + assert.equal(1000, agent.timeout); + }); + it('should support an options Object as second argument', function() { + var agent = new Agent(function() {}, { timeout: 1000 }); + assert.equal(1000, agent.timeout); + }); + it('should be mixed in with HTTP request options', function(done) { + var agent = new Agent({ + host: 'my-proxy.com', + port: 3128, + foo: 'bar' + }); + agent.callback = function(req, opts, fn) { + assert.equal('bar', opts.foo); + assert.equal('a', opts.b); + + // `host` and `port` are special-cases, and should always be + // overwritten in the request `opts` inside the agent-base callback + assert.equal('localhost', opts.host); + assert.equal(80, opts.port); + done(); + }; + var opts = { + b: 'a', + agent: agent + }; + http.get(opts); + }); + }); + describe('`this` context', function() { + it('should be the Agent instance', function(done) { + var called = false; + var agent = new Agent(); + agent.callback = function() { + called = true; + assert.equal(this, agent); + }; + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert(/no Duplex stream was returned/.test(err.message)); + done(); + }); + }); + it('should be the Agent instance with callback signature', function(done) { + var called = false; + var agent = new Agent(); + agent.callback = function(req, opts, fn) { + called = true; + assert.equal(this, agent); + fn(); + }; + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert(/no Duplex stream was returned/.test(err.message)); + done(); + }); + }); + }); + describe('"error" event', function() { + it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function( + done + ) { + var agent = new Agent(); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal( + '"agent-base" has no default implementation, you must subclass and override `callback()`', + err.message + ); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function( + done + ) { + var agent = new Agent(function(req, opts, fn) { + fn(new Error('is this caught?')); + }); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal('is this caught?', err.message); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function( + done + ) { + var agent = new Agent(function(req, opts, fn) { + setTimeout(function() { + fn(new Error('is this caught?')); + }, 10); + }); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal('is this caught?', err.message); + done(); + }); + }); + }); + describe('artificial "streams"', function() { + it('should send a GET request', function(done) { + var stream = new events.EventEmitter(); + + // needed for the `http` module to call .write() on the stream + stream.writable = true; + + stream.write = function(str) { + assert(0 == str.indexOf('GET / HTTP/1.1')); + done(); + }; + + // needed for `http` module in Node.js 4 + stream.cork = function() {}; + + var opts = { + method: 'GET', + host: '127.0.0.1', + path: '/', + port: 80, + agent: new Agent(function(req, opts, fn) { + fn(null, stream); + }) + }; + var req = http.request(opts); + req.end(); + }); + it('should receive a GET response', function(done) { + var stream = new events.EventEmitter(); + var opts = { + method: 'GET', + host: '127.0.0.1', + path: '/', + port: 80, + agent: new Agent(function(req, opts, fn) { + fn(null, stream); + }) + }; + var req = http.request(opts, function(res) { + assert.equal('1.0', res.httpVersion); + assert.equal(200, res.statusCode); + assert.equal('bar', res.headers.foo); + assert.deepEqual(['1', '2'], res.headers['set-cookie']); + done(); + }); + + // have to wait for the "socket" event since `http.ClientRequest` + // doesn't *actually* attach the listeners to the "stream" until + // this happens + req.once('socket', function() { + var buf = Buffer.from( + 'HTTP/1.0 200\r\n' + + 'Foo: bar\r\n' + + 'Set-Cookie: 1\r\n' + + 'Set-Cookie: 2\r\n\r\n' + ); + stream.emit('data', buf); + }); + + req.end(); + }); + }); +}); + +describe('"http" module', function() { + var server; + var port; + + // setup test HTTP server + before(function(done) { + server = http.createServer(); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for basic HTTP requests', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should support direct return in `connect()`', function(done) { + var called = false; + var agent = new Agent(function(req, opts) { + called = true; + return net.connect(opts); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should support returning a Promise in `connect()`', function(done) { + var called = false; + var agent = new Agent(function(req, opts) { + return new Promise(function(resolve, reject) { + called = true; + resolve(net.connect(opts)); + }); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should set the `Connection: close` response header', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Url', req.url); + assert.equal('close', req.headers.connection); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/bar'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('/bar', res.headers['x-url']); + assert.equal('close', res.headers.connection); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should pass through options from `http.request()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('bar', opts.foo); + done(); + }); + + http.get({ + host: 'google.com', + foo: 'bar', + agent: agent + }); + }); + + it('should default to port 80', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal(80, opts.port); + done(); + }); + + // (probably) not hitting a real HTTP server here, + // so no need to add a httpServer request listener + http.get({ + host: '127.0.0.1', + path: '/foo', + agent: agent + }); + }); + + it('should support the "timeout" option', function(done) { + // ensure we timeout after the "error" event had a chance to trigger + this.timeout(1000); + this.slow(800); + + var agent = new Agent( + function(req, opts, fn) { + // this function will time out + }, + { timeout: 100 } + ); + + var opts = url.parse('http://nodejs.org'); + opts.agent = agent; + + var req = http.get(opts); + req.once('error', function(err) { + assert.equal('ETIMEOUT', err.code); + req.abort(); + done(); + }); + }); + + it('should free sockets after use', function(done) { + var agent = new Agent(function(req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + res.socket.emit('free'); + assert.equal(true, res.socket.destroyed); + assert(gotReq); + done(); + }); + }); + + + describe('PassthroughAgent', function() { + it('should pass through to `http.globalAgent`', function(done) { + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = PassthroughAgent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + done(); + }); + }); + }); +}); + +describe('"https" module', function() { + var server; + var port; + + // setup test HTTPS server + before(function(done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should not modify the passed in Options object', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + assert.equal(true, opts.secureEndpoint); + assert.equal(443, opts.port); + assert.equal('localhost', opts.host); + }); + var opts = { agent: agent }; + var req = https.request(opts); + assert.equal(true, called); + assert.equal(false, 'secureEndpoint' in opts); + assert.equal(false, 'port' in opts); + done(); + }); + + it('should work with a String URL', function(done) { + var endpoint = 'https://127.0.0.1:' + port; + var req = https.get(endpoint); + + // it's gonna error out since `rejectUnauthorized` is not being passed in + req.on('error', function(err) { + assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); + done(); + }); + }); + + it('should work for basic HTTPS requests', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + assert(opts.secureEndpoint); + var socket = tls.connect(opts); + fn(null, socket); + }); + + // add HTTPS server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('https://127.0.0.1:' + port + '/foo'); + info.agent = agent; + info.rejectUnauthorized = false; + https.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should pass through options from `https.request()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('bar', opts.foo); + done(); + }); + + https.get({ + host: 'google.com', + foo: 'bar', + agent: agent + }); + }); + + it('should support the 3-argument `https.get()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('/q', opts.pathname || opts.path); + assert.equal('881', opts.port); + assert.equal('bar', opts.foo); + done(); + }); + + https.get( + 'https://google.com:881/q', + { + host: 'google.com', + foo: 'bar', + agent: agent + } + ); + }); + + it('should default to port 443', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal(true, opts.secureEndpoint); + assert.equal(false, opts.rejectUnauthorized); + assert.equal(443, opts.port); + done(); + }); + + // (probably) not hitting a real HTTPS server here, + // so no need to add a httpsServer request listener + https.get({ + host: '127.0.0.1', + path: '/foo', + agent: agent, + rejectUnauthorized: false + }); + }); + + it('should not re-patch https.request', () => { + var patchModulePath = "../patch-core"; + var patchedRequest = https.request; + + delete require.cache[require.resolve(patchModulePath)]; + require(patchModulePath); + + assert.equal(patchedRequest, https.request); + assert.equal(true, https.request.__agent_base_https_request_patched__); + }); + + describe('PassthroughAgent', function() { + it('should pass through to `https.globalAgent`', function(done) { + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('https://127.0.0.1:' + port + '/foo'); + info.agent = PassthroughAgent; + info.rejectUnauthorized = false; + https.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + done(); + }); + }); + }); +}); + +describe('"ws" server', function() { + var wss; + var server; + var port; + + // setup test HTTP server + before(function(done) { + server = http.createServer(); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for basic WebSocket connections', function(done) { + function onconnection(ws) { + ws.on('message', function(data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function(req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('ws://127.0.0.1:' + port + '/', { + agent: agent + }); + + client.on('open', function() { + client.send('ping'); + }); + + client.on('message', function(data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); +}); + +describe('"wss" server', function() { + var wss; + var server; + var port; + + // setup test HTTP server + before(function(done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for secure WebSocket connections', function(done) { + function onconnection(ws) { + ws.on('message', function(data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function(req, opts, fn) { + var socket = tls.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('wss://127.0.0.1:' + port + '/', { + agent: agent, + rejectUnauthorized: false + }); + + client.on('open', function() { + client.send('ping'); + }); + + client.on('message', function(data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); +}); diff --git a/test-eol-project/node_modules/ajv/.tonic_example.js b/test-eol-project/node_modules/ajv/.tonic_example.js new file mode 100644 index 00000000..aa11812d --- /dev/null +++ b/test-eol-project/node_modules/ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/test-eol-project/node_modules/ajv/LICENSE b/test-eol-project/node_modules/ajv/LICENSE new file mode 100644 index 00000000..96ee7199 --- /dev/null +++ b/test-eol-project/node_modules/ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 Evgeny Poberezkin + +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/test-eol-project/node_modules/ajv/README.md b/test-eol-project/node_modules/ajv/README.md new file mode 100644 index 00000000..65077a0b --- /dev/null +++ b/test-eol-project/node_modules/ajv/README.md @@ -0,0 +1,1505 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. + +[![Build Status](https://travis-ci.org/ajv-validator/ajv.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv) +[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm (beta)](https://img.shields.io/npm/v/ajv/beta)](https://www.npmjs.com/package/ajv/v/7.0.0-beta.4) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) +[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) +[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) + + +## Ajv v7 beta is released + +[Ajv version 7 (beta)](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes: + +- support of JSON Schema draft-2019-09 features: [`unevaluatedProperties`](./json-schema.md#unevaluatedproperties) and [`unevaluatedItems`](./json-schema.md#unevaluateditems), [dynamic recursive references](./validation.md#extending-recursive-schemas) and other [additional keywords](./json-schema.md#json-schema-draft-2019-09). +- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements. +- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe and to allow code optimization (compiled schema code size is reduced by more than 10%). +- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas. [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package was updated to use the new API (in [v4.0.0-beta.0](https://github.com/ajv-validator/ajv-keywords/releases/tag/v4.0.0-beta.0)) +- schemas are compiled to ES6 code (ES5 code generation is also supported with an option). +- to improve reliability and maintainability the code is migrated to TypeScript. + +**Please note**: + +- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021). +- all formats are separated to ajv-formats package - they have to be explicitely added if you use them. + +See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details. + +To install the new version: + +```bash +npm install ajv@beta +``` + +See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example. + + +## Mozilla MOSS grant and OpenJS Foundation + +[](https://www.mozilla.org/en-US/moss/)     [](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/) + +Ajv has been awarded a grant from Mozilla’s [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the “Foundational Technology” track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04). + +Ajv also joined [OpenJS Foundation](https://openjsf.org/) – having this support will help ensure the longevity and stability of Ajv for all its users. + +This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details. + +I am looking for the long term maintainers of Ajv – working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community. + + +## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin) + +Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant! + +Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released. + +Please sponsor Ajv via: +- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it) +- [Ajv Open Collective️](https://opencollective.com/ajv) + +Thank you. + + +#### Open Collective sponsors + + + + + + + + + + + + + + + +## Using version 6 + +[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. + +[Ajv version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). + +__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); +``` + +To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId: + +```javascript +var ajv = new Ajv({schemaId: 'id'}); +// If you want to use both draft-04 and draft-06/07 schemas: +// var ajv = new Ajv({schemaId: 'auto'}); +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/ajv-validator/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) + - [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Annotation keywords](#annotation-keywords) + - [Formats](#formats) + - [Combining schemas with $ref](#ref) + - [$data reference](#data-reference) + - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) + - [Defining custom keywords](#defining-custom-keywords) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) + - [Asynchronous validation](#asynchronous-validation) +- [Security considerations](#security-considerations) + - [Security contact](#security-contact) + - [Untrusted schemas](#untrusted-schemas) + - [Circular references in objects](#circular-references-in-javascript-objects) + - [Trusted schemas](#security-risks-of-trusted-schemas) + - [ReDoS attack](#redos-attack) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Plugins](#plugins) +- [Related packages](#related-packages) +- [Some packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, Changes history](#tests) +- [Support, Code of conduct, License](#open-source-software-support) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): + +[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) + + +## Features + +- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md)) + - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) + - support of circular references between schemas + - correct string lengths for strings with unicode pairs (can be turned off) + - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off) + - [validates schemas against meta-schema](#api-validateschema) +- supports [browsers](#using-in-browser) and Node.js 0.10-14.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else` +- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + + +## Install + +``` +npm install ajv +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +// Node.js require: +var Ajv = require('ajv'); +// or ESM/TypeScript import +import Ajv from 'ajv'; + +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .validate('mySchema', data); +if (!valid) console.log(ajv.errorsText()); +// ... +``` + +See [API](#api) and [Options](#options) for more details. + +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. + +The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). + +__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) + +__Note for TypeScript users__: `ajv` provides its own TypeScript declarations +out of the box, so you don't need to install the deprecated `@types/ajv` +module. + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/ajv-validator/ajv/issues/234)). + + +### Ajv and Content Security Policies (CSP) + +If you're using Ajv to compile a schema (the typical use) in a browser document that is loaded with a Content Security Policy (CSP), that policy will require a `script-src` directive that includes the value `'unsafe-eval'`. +:warning: NOTE, however, that `unsafe-eval` is NOT recommended in a secure CSP[[1]](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval), as it has the potential to open the document to cross-site scripting (XSS) attacks. + +In order to make use of Ajv without easing your CSP, you can [pre-compile a schema using the CLI](https://github.com/ajv-validator/ajv-cli#compile-schemas). This will transpile the schema JSON into a JavaScript file that exports a `validate` function that works simlarly to a schema compiled at runtime. + +Note that pre-compilation of schemas is performed using [ajv-pack](https://github.com/ajv-validator/ajv-pack) and there are [some limitations to the schema features it can compile](https://github.com/ajv-validator/ajv-pack#limitations). A successfully pre-compiled schema is equivalent to the same schema compiled at runtime. + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/ajv-cli). It supports: + +- compiling JSON Schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/ajv-validator/ajv-pack)) +- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) +- validating data file(s) against JSON Schema +- testing expected validity of data against JSON Schema +- referenced schemas +- custom meta-schemas +- files in JSON, JSON5, YAML, and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft-07 of JSON Schema standard: + +- [type](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#ifthenelse) + +With [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: + +- [patternRequired](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. + +See [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md) for more details. + + +## Annotation keywords + +JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation. + +- `title` and `description`: information about the data represented by that schema +- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options). +- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults). +- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema. +- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.). +- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64". +- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png". + +__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance. + + +## Formats + +Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack). + +__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios. + +The following formats are implemented for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full URI. +- _uri-reference_: URI reference, including full and relative URIs. +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url). +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here. + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, and `email`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allow specific format(s) that will be ignored. See [Options](#options) for details. + +You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js). + + +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +```javascript +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +```javascript +var ajv = new Ajv; +var validate = ajv.addSchema(defsSchema) + .compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + +## $data reference + +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema-org/json-schema-spec/issues/51) for more information about how it works. + +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +var validData = { + smaller: 5, + larger: 7 +}; + +ajv.validate(schema, validData); // true +``` + +This schema requires that the properties have the same format as their field names: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. + + +## $merge and $patch keywords + +With the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/ajv-validator/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... +}); + +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation + +You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). + +If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. + +__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. + +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). + +Ajv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options). + +The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. + + +Example: + +```javascript +var ajv = new Ajv; +// require('ajv-async')(ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.catch(function (err) { + if (!(err instanceof Ajv.ValidationError)) throw err; + // data is invalid + console.log('Validation errors:', err.errors); +}); +``` + +### Using transpilers with asynchronous validation functions. + +[ajv-async](https://github.com/ajv-validator/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). + + +#### Using nodent + +```javascript +var ajv = new Ajv; +require('ajv-async')(ajv); +// in the browser if you want to load ajv-async bundle separately you can: +// window.ajvAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +## Security considerations + +JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider. + + +##### Security contact + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues. + + +##### Untrusted schemas + +Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application. + +If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent: +- compiling schemas can cause stack overflow (if they are too deep) +- compiling schemas can be slow (e.g. [#557](https://github.com/ajv-validator/ajv/issues/557)) +- validating certain data can be slow + +It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords. + +Regardless the measures you take, using untrusted schemas increases security risks. + + +##### Circular references in JavaScript objects + +Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/ajv-validator/ajv/issues/802). + +An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references. + + +##### Security risks of trusted schemas + +Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to): + +- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)). +- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well. +- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate + +__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors). + +You can validate your JSON schemas against [this meta-schema](https://github.com/ajv-validator/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: + +```javascript +const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json')); + +const schema1 = {format: 'email'}; +isSchemaSecure(schema1); // false + +const schema2 = {format: 'email', maxLength: MAX_LENGTH}; +isSchemaSecure(schema2); // true +``` + +__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results. + + +##### Content Security Policies (CSP) +See [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) + + +## ReDoS attack + +Certain regular expressions can lead to the exponential evaluation time even with relatively short strings. + +Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example. + +__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following: + +- making assessment of "format" implementations in Ajv. +- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe). +- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method. +- disabling format validation by ignoring "format" keyword with option `format: false` + +Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios. + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/ajv-validator/ajv/issues/129), [#134](https://github.com/ajv-validator/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults. + +This option modifies original data. + +__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/ajv-validator/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + +The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning). + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema. + +The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise + +Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: + +- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). +- a schema containing a missing reference is loaded, but the reference cannot be resolved. +- schema (or some loaded/referenced schema) is invalid. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. +This allows you to do nice things like the following. + +```javascript +var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); +``` + +##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). + +There is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. + +Errors will be available at `ajv.errors`. + + +##### .getSchema(String key) -> Function<Object data> + +Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/ajv-validator/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. + +Custom formats can be also added via `formats` option. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation +- _modifying_: `true` MUST be passed if keyword modifies data +- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression) +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean or string `"full"` indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + $comment: false, // NEW in Ajv version 6.0 + jsonPointers: false, + uniqueItems: true, + unicode: true, + nullable: false, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: '$id', + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // strict mode options + strictDefaults: false, + strictKeywords: false, + strictNumbers: false, + // asynchronous validation options: + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', // deprecated + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string, schema: object): string {} + cache: new Cache, + serialize: undefined, + regExp: undefined // custom RegExp engine +} +``` + +##### Validation and reporting options + +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). +- _allErrors_: check all rules collecting all errors. Default is to return after the first error. +- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). +- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values: + - `false` (default): ignore $comment keyword. + - `true`: log the keyword value to console. + - function: pass the keyword value, its schema path and root schema to the specified function +- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. +- _uniqueItems_: validate `uniqueItems` keyword (true by default). +- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. +- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/). +- _format_: formats validation mode. Option values: + - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option). + - `"full"` - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. + - `false` - ignore all format keywords. +- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _keywords_: an object with custom keywords. Keys and values will be passed to `addKeyword` method. +- _unknownFormats_: handling of unknown formats. Option values: + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. See [Error logging](#error-logging). Option values: + - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. + - `false` - logging is disabled. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. +- _missingRefs_: handling of missing referenced schemas. Option values: + - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). + - `"ignore"` - to log error during compilation and always pass validation. + - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. +- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing or undefined properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (object literal is used). + - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string). + - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Strict mode options + +- _strictDefaults_: report ignored `default` keywords in schemas. Option values: + - `false` (default) - ignored defaults are not reported + - `true` - if an ignored default is present, throw an error + - `"log"` - if an ignored default is present, log warning +- _strictKeywords_: report unknown keywords in schemas. Option values: + - `false` (default) - unknown keywords are not reported + - `true` - if an unknown keyword is present, throw an error + - `"log"` - if an unknown keyword is present, log warning +- _strictNumbers_: validate numbers strictly, failing validation for NaN and Infinity. Option values: + - `false` (default) - NaN or Infinity will pass validation for numeric types + - `true` - NaN or Infinity will not pass validation for numeric types + +##### Asynchronous validation options + +- _transpile_: Requires [ajv-async](https://github.com/ajv-validator/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. + - `true` - always transpile with nodent. + - `false` - do not transpile; if async functions are not supported an exception will be thrown. + + +##### Advanced options + +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: + - `true` (default) - if the validation fails, throw the exception. + - `"log"` - if the validation fails, log error. + - `false` - skip schema validation. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/ajv-validator/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n)). +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass a function calling `require('js-beautify').js_beautify` as `processCode: code => js_beautify(code)`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. +- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. +- _regExp_: an optional function to create RegExp objects. This allows using a custom RegExp engine (e.g., [RE2](https://github.com/uhop/node-re2)) to mitigate ReDoS attacks. The function must have the signature `(pattern: string) => RegExpLike` where `RegExpLike` is an object with a `test(string) => boolean` method. Example with RE2: + ```javascript + var ajv = new Ajv({regExp: require('re2')}); + ``` + By default (`undefined`), native `RegExp` constructor is used. + + +## Validation errors + +In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + + +### Error parameters + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `dependencies` - properties: + - `property` (dependent property), + - `missingProperty` (required missing dependency - only the first one is reported currently) + - `deps` (required dependencies, comma separated list as a string), + - `depsCount` (the number of required dependencies). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). +- `type` - property `type` (required type(s), a string, can be a comma-separated list) +- `uniqueItems` - properties `i` and `j` (indices of duplicate items). +- `const` - property `allowedValue` pointing to the value (the schema of the keyword). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes). +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +### Error logging + +Using the `logger` option when initiallizing Ajv will allow you to define custom logging. Here you can build upon the exisiting logging. The use of other logging packages is supported as long as the package or its associated wrapper exposes the required methods. If any of the required methods are missing an exception will be thrown. +- **Required Methods**: `log`, `warn`, `error` + +```javascript +var otherLogger = new OtherLogger(); +var ajv = new Ajv({ + logger: { + log: console.log.bind(console), + warn: function warn() { + otherLogger.logWarn.apply(otherLogger, arguments); + }, + error: function error() { + otherLogger.logError.apply(otherLogger, arguments); + console.error.apply(console, arguments); + } + } +}); +``` + + +## Plugins + +Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: + +- it exports a function +- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining +- this function can accept an optional configuration as the second parameter + +If you have published a useful plugin please submit a PR to add it to the next section. + + +## Related packages + +- [ajv-async](https://github.com/ajv-validator/ajv-async) - plugin to configure async validation mode +- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/ajv-validator/ajv-errors) - plugin for custom error messages +- [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/ajv-validator/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) +- [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) - plugin with keywords $merge and $patch +- [ajv-pack](https://github.com/ajv-validator/ajv-pack) - produces a compact module exporting validation functions +- [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) - format validators for draft2019 that aren't already included in ajv (ie. `idn-hostname`, `idn-email`, `iri`, `iri-reference` and `duration`). + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator +- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org +- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com +- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file +- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app +- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages +- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX +- [Spectral](https://github.com/stoplightio/spectral) - the customizable linting utility for JSON/YAML, OpenAPI, AsyncAPI, and JSON Schema + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/ajv-validator/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/ajv-validator/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/ajv-validator/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/ajv-validator/ajv/releases + +__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) + +[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). + +## Code of conduct + +Please review and follow the [Code of conduct](https://github.com/ajv-validator/ajv/blob/master/CODE_OF_CONDUCT.md). + +Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team. + + +## Open-source software support + +Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers. + + +## License + +[MIT](https://github.com/ajv-validator/ajv/blob/master/LICENSE) diff --git a/test-eol-project/node_modules/ajv/dist/ajv.bundle.js b/test-eol-project/node_modules/ajv/dist/ajv.bundle.js new file mode 100644 index 00000000..3243c9fc --- /dev/null +++ b/test-eol-project/node_modules/ajv/dist/ajv.bundle.js @@ -0,0 +1,7201 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + +},{"./util":10}],5:[function(require,module,exports){ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + function patternCode(i, patterns) { + var regExpCode = opts.regExp ? 'regExp' : 'new RegExp'; + return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');'; + } + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + 'regExp', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError, + opts.regExp + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + +},{}],10:[function(require,module,exports){ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],14:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],15:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],16:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],17:[function(require,module,exports){ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} + +},{}],18:[function(require,module,exports){ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],19:[function(require,module,exports){ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],21:[function(require,module,exports){ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],22:[function(require,module,exports){ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + +},{}],24:[function(require,module,exports){ +'use strict'; +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],25:[function(require,module,exports){ +'use strict'; +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],26:[function(require,module,exports){ +'use strict'; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],27:[function(require,module,exports){ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; + +},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + +},{}],29:[function(require,module,exports){ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],30:[function(require,module,exports){ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],32:[function(require,module,exports){ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; + if ($isData) { + out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($valid) + ') {'; + } else { + var $regexp = it.usePattern($schema); + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],33:[function(require,module,exports){ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + +},{}],34:[function(require,module,exports){ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + +},{}],37:[function(require,module,exports){ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],38:[function(require,module,exports){ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + +},{}],39:[function(require,module,exports){ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); +var definitionSchema = require('./definition_schema'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + //normalize the default port + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +function isSecure(wsComponents) { + return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; +} +//RFC 6455 +var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse(components, options) { + var wsComponents = components; + //indicate if the secure flag is set + wsComponents.secure = isSecure(wsComponents); + //construct resouce name + wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); + wsComponents.path = undefined; + wsComponents.query = undefined; + return wsComponents; + }, + serialize: function serialize(wsComponents, options) { + //normalize the default port + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = undefined; + } + //ensure scheme matches secure flag + if (typeof wsComponents.secure === 'boolean') { + wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; + wsComponents.secure = undefined; + } + //reconstruct path from resource name + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split('?'), + _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), + path = _wsComponents$resourc2[0], + query = _wsComponents$resourc2[1]; + + wsComponents.path = path && path !== '/' ? path : undefined; + wsComponents.query = query; + wsComponents.resourceName = undefined; + } + //forbid fragment component + wsComponents.fragment = undefined; + return wsComponents; + } +}; + +var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$6 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; +SCHEMES[handler$5.scheme] = handler$5; +SCHEMES[handler$6.scheme] = handler$6; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + + +},{}],"ajv":[function(require,module,exports){ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,e())})(function(){return function a(s,o,i){function n(r,e){if(!o[r]){if(!s[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);throw(e=new Error("Cannot find module '"+r+"'")).code="MODULE_NOT_FOUND",e}t=o[r]={exports:{}},s[r][0].call(t.exports,function(e){return n(s[r][1][e]||e)},t,t.exports,a,s,o,i)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,u=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,d=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(e){return a.copy(f[e="full"==e?"full":"fast"])}function m(e){var r,t,e=e.match(s);return!!e&&(t=+e[3],1<=(r=+e[2]))&&r<=12&&1<=t&&t<=(2!=r||(t=+e[1])%4!=0||t%100==0&&t%400!=0?o[r]:29)}function v(e,r){var t,a,s,e=e.match(i);return!!e&&(a=e[2],s=e[3],(t=e[1])<=23&&a<=59&&s<=59||23==t&&59==a&&60==s)&&(!r||e[5])}(r.exports=f).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?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?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:u,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":p},f.full={date:m,time:v,"date-time":function(e){e=e.split(y);return 2==e.length&&m(e[0])&&v(e[1],!0)},uri:function(e){return g.test(e)&&n.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0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]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:u,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":p};var y=/t|\s/i;var g=/\/|:/;var P=/[^\\]\\Z/;function E(e){if(P.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){var $=e("./resolve"),j=e("./util"),D=e("./error_classes"),O=e("fast-json-stable-stringify"),I=e("../dotjs/validate"),A=j.ucs2length,k=e("fast-deep-equal"),C=D.Validation;function L(e,i,n,r){var l=this,c=this._opts,u=[void 0],h={},d=[],t={},p=[],a={},f=[];function m(e,r){return"var pattern"+e+" = "+(c.regExp?"regExp":"new RegExp")+"("+j.toQuotedString(r[e])+");"}i=i||{schema:e,refVal:u,refs:h};var s=function(e,r,t){var a=N.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:(this._compilations[a=this._compilations.length]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,e,i,r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=E;var v=this._formats,y=this.RULES;try{var g=w(e,i,n,r),P=(o.validate=g,o.callValidate);return P&&(P.schema=g.schema,P.errors=null,P.refs=g.refs,P.refVal=g.refVal,P.root=g.root,P.$async=g.$async,c.sourceCode)&&(P.source=g.source),g}finally{!function(e,r,t){e=N.call(this,e,r,t);0<=e&&this._compilations.splice(e,1)}.call(this,e,i,r)}function E(){var e=o.validate,r=e.apply(this,arguments);return E.errors=e.errors,r}function w(e,r,t,a){var s=!r||r.schema==e;if(r.schema!=i.schema)return L.call(l,e,r,t,a);t=!0===e.$async,a=I({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:D.MissingRef,RULES:y,validate:I,util:j,resolve:$,resolveRef:b,usePattern:F,useDefault:x,useCustomRule:R,opts:c,formats:v,logger:l.logger,self:l}),a=Q(u,q)+Q(d,m)+Q(p,z)+Q(f,T)+a;c.processCode&&(a=c.processCode(a,e));try{var o=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError","regExp",a)(l,y,v,i,u,p,f,k,A,C,c.regExp);u[0]=o}catch(e){throw l.logger.error("Error compiling schema, function code:",a),e}return o.schema=e,o.errors=null,o.refs=h,o.refVal=u,o.root=s?o:r,t&&(o.$async=!0),!0===c.sourceCode&&(o.source={code:a,patterns:d,defaults:p}),o}function b(e,r,t){r=$.url(e,r);var a=h[r];if(void 0!==a)return _(s=u[a],o="refVal["+a+"]");if(!t&&i.refs){a=i.refs[r];if(void 0!==a)return _(s=i.refVal[a],o=S(r,s))}var s,o=S(r),t=$.call(l,w,i,r);if(void 0!==(t=void 0===t&&(a=n&&n[r])?$.inlineRef(a,c.inlineRefs)?a:L.call(l,a,i,n,e):t))return s=t,u[h[r]]=s,_(t,o);delete h[r]}function S(e,r){var t=u.length;return u[t]=r,"refVal"+(h[e]=t)}function _(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=t[e];return void 0===r&&(r=t[e]=d.length,d[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return j.toQuotedString(e);case"object":var r,t;return null===e?"null":(r=O(e),void 0===(t=a[r])&&(t=a[r]=p.length,p[t]=e),"default"+t)}}function R(e,r,t,a){if(!1!==l._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));s=e.definition.validateSchema;if(s)if(!s(r)){s="keyword schema is invalid: "+l.errorsText(s.errors);if("log"!=l._opts.validateSchema)throw new Error(s);l.logger.error(s)}}var o,s=e.definition.compile,i=e.definition.inline,n=e.definition.macro;if(s)o=s.call(l,r,t,a);else if(n)o=n.call(l,r,t,a),!1!==c.validateSchema&&l.validateSchema(o,!0);else if(i)o=i.call(l,a,e.keyword,r,t);else if(!(o=e.definition.validate))return;if(void 0===o)throw new Error('custom keyword "'+e.keyword+'"failed to compile');s=f.length;return{code:"customRule"+s,validate:f[s]=o}}}function N(e,r,t){for(var a=0;a",S=g?">":"<",_=void 0;if(!v&&"number"!=typeof h&&void 0!==h)throw new Error(r+" must be number");if(!w&&void 0!==E&&"number"!=typeof E&&"boolean"!=typeof E)throw new Error(P+" must be number or boolean");w?(u=e.util.getData(E.$data,u,e.dataPathArr),o="exclIsNumber"+c,i="' + "+(n="op"+c)+" + '",_=P,(F=F||[]).push(l=l+(" var schemaExcl"+c+" = "+u+"; ")+(" var "+(a="exclusive"+c)+"; var "+(s="exclType"+c)+" = typeof "+(u="schemaExcl"+c)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { ")),l="",!1!==e.createErrors?(l+=" { keyword: '"+(_||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(l+=" , message: '"+P+" should be boolean' "),e.opts.verbose&&(l+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ",x=l,l=(l=F.pop())+(!e.compositeRule&&f?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+" } else if ( ",v&&(l+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),l+=" "+s+" == 'number' ? ( ("+a+" = "+y+" === undefined || "+u+" "+b+"= "+y+") ? "+m+" "+S+"= "+u+" : "+m+" "+S+" "+y+" ) : ( ("+a+" = "+u+" === true) ? "+m+" "+S+"= "+y+" : "+m+" "+S+" "+y+" ) || "+m+" !== "+m+") { var op"+c+" = "+a+" ? '"+b+"' : '"+b+"='; ",void 0===h&&(p=e.errSchemaPath+"/"+(_=P),y=u,v=w)):(i=b,(o="number"==typeof E)&&v?(n="'"+i+"'",l+=" if ( ",v&&(l+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),l+=" ( "+y+" === undefined || "+E+" "+b+"= "+y+" ? "+m+" "+S+"= "+E+" : "+m+" "+S+" "+y+" ) || "+m+" !== "+m+") { "):(o&&void 0===h?(a=!0,p=e.errSchemaPath+"/"+(_=P),y=E,S+="="):(o&&(y=Math[g?"min":"max"](E,h)),E===(!o||y)?(a=!0,p=e.errSchemaPath+"/"+(_=P),S+="="):(a=!1,i+="=")),n="'"+i+"'",l+=" if ( ",v&&(l+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),l+=" "+m+" "+S+" "+y+" || "+m+" !== "+m+") { ")),_=_||r;(F=F||[]).push(l),l="",!1!==e.createErrors?(l+=" { keyword: '"+(_||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { comparison: "+n+", limit: "+y+", exclusive: "+a+" } ",!1!==e.opts.messages&&(l=l+" , message: 'should be "+i+" "+(v?"' + "+y:y+"'")),e.opts.verbose&&(l=(l+=" , schema: ")+(v?"validate.schema"+d:""+h)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ";var F,x=l;return l=(l=F.pop())+(!e.compositeRule&&f?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+" } ",f&&(l+=" else { "),l}},{}],14:[function(e,r,t){r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data,i=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n;if(d||"number"==typeof n)return s+="if ( ",d&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),(o=[]).push(s+=" "+h+".length "+("maxItems"==(a=r)?">":"<")+" "+i+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s=(s=(s+=" , message: 'should NOT have ")+("maxItems"==r?"more":"fewer")+" than ")+(d?"' + "+i+" + '":""+n)+" items' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",a=s,s=(s=o.pop())+(!e.compositeRule&&u?e.async?" throw new ValidationError(["+a+"]); ":" validate.errors = ["+a+"]; return false; ":" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",u&&(s+=" else { "),s;throw new Error(r+" must be number")}},{}],15:[function(e,r,t){r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data,i=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n;if(d||"number"==typeof n)return s+="if ( ",d&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),(o=[]).push(s=s+(!1===e.opts.unicode?" "+h+".length ":" ucs2length("+h+") ")+(" "+("maxLength"==(a=r)?">":"<")+" "+i+") { ")),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s=(s=(s+=" , message: 'should NOT be ")+("maxLength"==r?"longer":"shorter")+" than ")+(d?"' + "+i+" + '":""+n)+" characters' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",a=s,s=(s=o.pop())+(!e.compositeRule&&u?e.async?" throw new ValidationError(["+a+"]); ":" validate.errors = ["+a+"]; return false; ":" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",u&&(s+=" else { "),s;throw new Error(r+" must be number")}},{}],16:[function(e,r,t){r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data,i=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n;if(d||"number"==typeof n)return s+="if ( ",d&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),(o=[]).push(s+=" Object.keys("+h+").length "+("maxProperties"==(a=r)?">":"<")+" "+i+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s=(s=(s+=" , message: 'should NOT have ")+("maxProperties"==r?"more":"fewer")+" than ")+(d?"' + "+i+" + '":""+n)+" properties' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",a=s,s=(s=o.pop())+(!e.compositeRule&&u?e.async?" throw new ValidationError(["+a+"]); ":" validate.errors = ["+a+"]; return false; ":" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",u&&(s+=" else { "),s;throw new Error(r+" must be number")}},{}],17:[function(e,r,t){r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="",u=(l.level++,"valid"+l.level),h=l.baseId,d=!0,p=s;if(p)for(var f,m=-1,v=p.length-1;m "+w+") { ",S=u+"["+w+"]",h.schema=F,h.schemaPath=n+"["+w+"]",h.errSchemaPath=l+"/"+w,h.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0),h.dataPathArr[f]=w,_=e.validate(h),h.baseId=v,e.util.varOccurences(_,m)<2?a+=" "+e.util.varReplace(_,m,S)+" ":a+=" var "+m+" = "+S+"; "+_+" ",a+=" } ",c)&&(a+=" if ("+p+") { ",d+="}")}"object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&0 "+i.length+") { for (var "+s+" = "+i.length+"; "+s+" < "+u+".length; "+s+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,s,e.opts.jsonPointers,!0),S=u+"["+s+"]",h.dataPathArr[f]=s,_=e.validate(h),h.baseId=v,e.util.varOccurences(_,m)<2?a+=" "+e.util.varReplace(_,m,S)+" ":a+=" var "+m+" = "+S+"; "+_+" ",c&&(a+=" if (!"+p+") break; "),a+=" } } ",c)&&(a+=" if ("+p+") { ",d+="}")}else(e.opts.strictKeywords?"object"==typeof i&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+s+" !== parseInt(division"+s+") ")+" ) ",h&&(a+=" ) ");r=[],r.push(a+=" ) { "),a="",!1!==e.createErrors?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+o+" } ",!1!==e.opts.messages&&(a=a+" , message: 'should be multiple of "+(h?"' + "+o:o+"'")),e.opts.verbose&&(a=(a+=" , schema: ")+(h?"validate.schema"+n:""+i)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",s=a;return a=(a=r.pop())+(!e.compositeRule&&c?e.async?" throw new ValidationError(["+s+"]); ":" validate.errors = ["+s+"]; return false; ":" var err = "+s+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",c&&(a+=" else { "),a}},{}],30:[function(e,r,t){r.exports=function(e,r,t){var a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),r=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,n="data"+(n||""),i="errs__"+i,h=e.util.copy(e),d=(h.level++,"valid"+h.level);return(e.opts.strictKeywords?"object"==typeof l&&0 1) { ",o=e.schema.items&&e.schema.items.type,i=Array.isArray(o),!o||"object"==o||"array"==o||i&&(0<=o.indexOf("object")||0<=o.indexOf("array"))?s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+h+" = false; break outer; } } } ":(s=(s+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ")+" if ("+e.util["checkDataType"+(i?"s":"")](o,"item",e.opts.strictNumbers,!0)+") continue; ",i&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),s+=" } ",d&&(s+=" } "),(a=a||[]).push(s+=" if (!"+h+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(r)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",o=s,s=(s=a.pop())+(!e.compositeRule&&c?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+" } ",c&&(s+=" else { ")):c&&(s+=" if (true) { "),s}},{}],38:[function(e,r,t){r.exports=function(a,e,L){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){i="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(i);a.logger.warn(i)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o)&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ "),"boolean"==typeof a.schema||!s&&!a.schema.$ref)l=a.level,c=a.dataLevel,j=a.schema[e="false schema"],E=a.schemaPath+a.util.getProperty(e),w=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,u="data"+(c||""),d="valid"+l,!1===a.schema?(a.isTop?p=!0:r+=" var "+d+" = false; ",(k=k||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",R=r,r=k.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+R+"]); ":" validate.errors = ["+R+"]; return false; ":" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+d+" = true; ",a.isTop&&(r+=" }; return validate; ");else{if(a.isTop){var n=a.isTop,l=a.level=0,c=a.dataLevel=0,u="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var h="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(h);a.logger.warn(h)}r=(r+=" var vErrors = null; ")+" var errors = 0; "+" if (rootData === undefined) rootData = data; "}else{l=a.level,u="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var d="valid"+l,p=!a.opts.allErrors,f="",m="",v=a.schema.type,y=Array.isArray(v);if(v&&a.opts.nullable&&!0===a.schema.nullable&&(y?-1==v.indexOf("null")&&(v=v.concat("null")):"null"!=v&&(v=[v,"null"],y=!0)),y&&1==v.length&&(v=v[0],y=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),v){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,v));var g,P=a.RULES.types[v];if(g||y||!0===P||P&&!B(P)){var E=a.schemaPath+".type",w=a.errSchemaPath+"/type",E=a.schemaPath+".type",w=a.errSchemaPath+"/type";if(r+=" if ("+a.util[y?"checkDataTypes":"checkDataType"](v,u,a.opts.strictNumbers,!0)+") { ",g){var b="dataType"+l,S="coerced"+l,_=(r+=" var "+b+" = typeof "+u+"; var "+S+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+b+" == 'object' && Array.isArray("+u+") && "+u+".length == 1) { "+u+" = "+u+"[0]; "+b+" = typeof "+u+"; if ("+a.util.checkDataType(a.schema.type,u,a.opts.strictNumbers)+") "+S+" = "+u+"; } "),r+=" if ("+S+" !== undefined) ; ",g);if(_)for(var F,x=-1,N=_.length-1;x{for(var r=e.implements,t=0;t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=I-1,k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(Q[e])}function t(e,r){var t=e.split("@"),a="",t=(1{for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t})(t,r).join(".")}function V(e){for(var r=[],t=0,a=e.length;t>1,e+=k(e/r);s*A>>1k((O-a)/u))&&L("overflow"),a+=d*u,h<=o?1:o+A<=h?A:h-o);if(dk(O/d)&&L("overflow"),u*=d}var f=r.length+1,o=z(a-c,f,0==c);k(a/f)>O-s&&L("overflow"),s+=k(a/f),a%=f,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function H(e){var r=[],t=(e=V(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((O-s)/w)&&L("overflow"),s+=(f-a)*w,a=f,!0),v=!1,y=void 0;try{for(var S,_=e[Symbol.iterator]();!(b=(S=_.next()).done);b=!0){var F=S.value;if(FO&&L("overflow"),F==a){for(var x=s,R=I;;R+=I){var $=R<=o?1:o+A<=R?A:R-o;if(x<$)break;var j=x-$,D=I-$;r.push(C(N($+j%D,0))),x=k(j/D)}r.push(C(N(x,0))),o=z(s,w,p==d),s=0,++p}}}catch(e){v=!0,y=e}finally{try{!b&&_.return&&_.return()}finally{if(v)throw y}}++s,++a}return r.join("")}var v=function(e){return t(e,function(e){return q.test(e)?"xn--"+H(e):e})},M=function(e){return t(e,function(e){return D.test(e)?U(e.slice(4).toLowerCase()):e})},c={};function f(e){e=e.charCodeAt(0);return e<16?"%0"+e.toString(16).toUpperCase():e<128?"%"+e.toString(16).toUpperCase():e<2048?"%"+(e>>6|192).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase():"%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase()}function u(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]'),se=new RegExp(_,"g"),x=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),oe=new RegExp(g("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',F),"g"),ie=new RegExp(g("[^]",_,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=ie;function R(e){var r=u(e);return r.match(se)?r:e}var F={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n{var t=e;if(r)for(var a in r)t[a]=r[a];return t})({scheme:"null"},t),i(X(o(e,t),o(r,t),t,!0),t)},e.normalize=function(e,r){return"string"==typeof e?e=i(o(e,r),r):"object"===a(e)&&(e=o(i(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=i(o(e,t),t):"object"===a(e)&&(e=i(e,t)),"string"==typeof r?r=i(o(r,t),t):"object"===a(r)&&(r=i(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace((r&&r.iri?l:n).ESCAPE,f)},e.unescapeComponent=w,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof t&&void 0!==r?t:a.URI=a.URI||{})},{}],ajv:[function(h,e,r){var i=h("./compile"),l=h("./compile/resolve"),d=h("./cache"),c=h("./compile/schema_obj"),p=h("fast-json-stable-stringify"),f=h("./compile/formats"),m=h("./compile/rules"),v=h("./data"),y=h("./compile/util"),e=((e.exports=w).prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{e=this._addSchema(e);t=e.validate||this._compile(e)}e=t(r);!0!==t.$async&&(this.errors=t.errors);return e},w.prototype.compile=function(e,r){e=this._addSchema(e,void 0,r);return e.validate||this._compile(e)},w.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e))for(var s=0;s{var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(g)?g:void 0,e._opts.defaultMeta})(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);t=this.validate(t,e);if(!t&&r){e="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(e);this.logger.error(e)}return t},w.prototype.getSchema=function(e){var r=t(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return((e,r)=>{var t,a,s,o=l.schema.call(e,{schema:{}},r);if(o)return s=i.call(e,t=o.schema,a=o.root,void 0,o=o.baseId),e._fragments[r]=new c({ref:r,fragment:!0,schema:t,root:a,baseId:o,validate:s}),s})(this,e)}},w.prototype.removeSchema=function(e){if(e instanceof RegExp)a(this,this._schemas,e),a(this,this._refs,e);else switch(typeof e){case"undefined":return a(this,this._schemas),a(this,this._refs),this._cache.clear(),this;case"string":var r=t(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":r=this._opts.serialize,r=r?r(e):e,r=(this._cache.del(r),this._getId(e));r&&(r=l.normalizeId(r),delete this._schemas[r],delete this._refs[r])}return this},w.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},w.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o{switch(e.schemaId){case"auto":return _;case"id":return b;default:return S}})(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=p),this._metaOpts=(e=>{for(var r=y.copy(e._opts),t=0;t); + + message: string; + errors: Array; + ajv: true; + validation: true; + } + + class MissingRefError extends Error { + constructor(baseId: string, ref: string, message?: string); + static message: (baseId: string, ref: string) => string; + + message: string; + missingRef: string; + missingSchema: string; + } +} + +declare namespace ajv { + type ValidationError = AjvErrors.ValidationError; + + type MissingRefError = AjvErrors.MissingRefError; + + interface Ajv { + /** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default). + * @param {string|object|Boolean} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ + validate(schemaKeyRef: object | string | boolean, data: any): boolean | PromiseLike; + /** + * Create validating function for passed schema. + * @param {object|Boolean} schema schema object + * @return {Function} validating function + */ + compile(schema: object | boolean): ValidateFunction; + /** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and node-style callback. + * @this Ajv + * @param {object|Boolean} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function. + * @return {PromiseLike} validating function + */ + compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike; + /** + * Adds schema to the instance. + * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @return {Ajv} this for method chaining + */ + addSchema(schema: Array | object, key?: string): Ajv; + /** + * Add schema that will be used to validate other schemas + * options in META_IGNORE_OPTIONS are alway set to false + * @param {object} schema schema object + * @param {string} key optional schema key + * @return {Ajv} this for method chaining + */ + addMetaSchema(schema: object, key?: string): Ajv; + /** + * Validate schema + * @param {object|Boolean} schema schema to validate + * @return {Boolean} true if schema is valid + */ + validateSchema(schema: object | boolean): boolean; + /** + * Get compiled schema from the instance by `key` or `ref`. + * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). + * @return {Function} schema validating function (with property `schema`). Returns undefined if keyRef can't be resolved to an existing schema. + */ + getSchema(keyRef: string): ValidateFunction | undefined; + /** + * Remove cached schema(s). + * If no parameter is passed all schemas but meta-schemas are removed. + * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object + * @return {Ajv} this for method chaining + */ + removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; + /** + * Add custom format + * @param {string} name format name + * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) + * @return {Ajv} this for method chaining + */ + addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; + /** + * Define custom keyword + * @this Ajv + * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. + * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ + addKeyword(keyword: string, definition: KeywordDefinition): Ajv; + /** + * Get keyword definition + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. + */ + getKeyword(keyword: string): object | boolean; + /** + * Remove keyword + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining + */ + removeKeyword(keyword: string): Ajv; + /** + * Validate keyword + * @this Ajv + * @param {object} definition keyword definition object + * @param {boolean} throwError true to throw exception if definition is invalid + * @return {boolean} validation result + */ + validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean; + /** + * Convert array of error message objects to string + * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {object} options optional options with properties `separator` and `dataVar`. + * @return {string} human readable string with all errors descriptions + */ + errorsText(errors?: Array | null, options?: ErrorsTextOptions): string; + errors?: Array | null; + _opts: Options; + } + + interface CustomLogger { + log(...args: any[]): any; + warn(...args: any[]): any; + error(...args: any[]): any; + } + + interface ValidateFunction { + ( + data: any, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | PromiseLike; + schema?: object | boolean; + errors?: null | Array; + refs?: object; + refVal?: Array; + root?: ValidateFunction | object; + $async?: true; + source?: object; + } + + interface Options { + $data?: boolean; + allErrors?: boolean; + verbose?: boolean; + jsonPointers?: boolean; + uniqueItems?: boolean; + unicode?: boolean; + format?: false | string; + formats?: object; + keywords?: object; + unknownFormats?: true | string[] | 'ignore'; + schemas?: Array | object; + schemaId?: '$id' | 'id' | 'auto'; + missingRefs?: true | 'ignore' | 'fail'; + extendRefs?: true | 'ignore' | 'fail'; + loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike; + removeAdditional?: boolean | 'all' | 'failing'; + useDefaults?: boolean | 'empty' | 'shared'; + coerceTypes?: boolean | 'array'; + strictDefaults?: boolean | 'log'; + strictKeywords?: boolean | 'log'; + strictNumbers?: boolean; + async?: boolean | string; + transpile?: string | ((code: string) => string); + meta?: boolean | object; + validateSchema?: boolean | 'log'; + addUsedSchema?: boolean; + inlineRefs?: boolean | number; + passContext?: boolean; + loopRequired?: number; + ownProperties?: boolean; + multipleOfPrecision?: boolean | number; + errorDataPath?: string, + messages?: boolean; + sourceCode?: boolean; + processCode?: (code: string, schema: object) => string; + cache?: object; + logger?: CustomLogger | false; + nullable?: boolean; + serialize?: ((schema: object | boolean) => any) | false; + regExp?: (pattern: string) => RegExpLike; + } + + interface RegExpLike { + test: (s: string) => boolean; + } + + type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike); + type NumberFormatValidator = ((data: number) => boolean | PromiseLike); + + interface NumberFormatDefinition { + type: "number", + validate: NumberFormatValidator; + compare?: (data1: number, data2: number) => number; + async?: boolean; + } + + interface StringFormatDefinition { + type?: "string", + validate: FormatValidator; + compare?: (data1: string, data2: string) => number; + async?: boolean; + } + + type FormatDefinition = NumberFormatDefinition | StringFormatDefinition; + + interface KeywordDefinition { + type?: string | Array; + async?: boolean; + $data?: boolean; + errors?: boolean | string; + metaSchema?: object; + // schema: false makes validate not to expect schema (ValidateFunction) + schema?: boolean; + statements?: boolean; + dependencies?: Array; + modifying?: boolean; + valid?: boolean; + // one and only one of the following properties should be present + validate?: SchemaValidateFunction | ValidateFunction; + compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction; + macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean; + inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string; + } + + interface CompilationContext { + level: number; + dataLevel: number; + dataPathArr: string[]; + schema: any; + schemaPath: string; + baseId: string; + async: boolean; + opts: Options; + formats: { + [index: string]: FormatDefinition | undefined; + }; + keywords: { + [index: string]: KeywordDefinition | undefined; + }; + compositeRule: boolean; + validate: (schema: object) => boolean; + util: { + copy(obj: any, target?: any): any; + toHash(source: string[]): { [index: string]: true | undefined }; + equal(obj: any, target: any): boolean; + getProperty(str: string): string; + schemaHasRules(schema: object, rules: any): string; + escapeQuotes(str: string): string; + toQuotedString(str: string): string; + getData(jsonPointer: string, dataLevel: number, paths: string[]): string; + escapeJsonPointer(str: string): string; + unescapeJsonPointer(str: string): string; + escapeFragment(str: string): string; + unescapeFragment(str: string): string; + }; + self: Ajv; + } + + interface SchemaValidateFunction { + ( + schema: any, + data: any, + parentSchema?: object, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | PromiseLike; + errors?: Array; + } + + interface ErrorsTextOptions { + separator?: string; + dataVar?: string; + } + + interface ErrorObject { + keyword: string; + dataPath: string; + schemaPath: string; + params: ErrorParameters; + // Added to validation errors of propertyNames keyword schema + propertyName?: string; + // Excluded if messages set to false. + message?: string; + // These are added with the `verbose` option. + schema?: any; + parentSchema?: object; + data?: any; + } + + type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | + DependenciesParams | FormatParams | ComparisonParams | + MultipleOfParams | PatternParams | RequiredParams | + TypeParams | UniqueItemsParams | CustomParams | + PatternRequiredParams | PropertyNamesParams | + IfParams | SwitchParams | NoParams | EnumParams; + + interface RefParams { + ref: string; + } + + interface LimitParams { + limit: number; + } + + interface AdditionalPropertiesParams { + additionalProperty: string; + } + + interface DependenciesParams { + property: string; + missingProperty: string; + depsCount: number; + deps: string; + } + + interface FormatParams { + format: string + } + + interface ComparisonParams { + comparison: string; + limit: number | string; + exclusive: boolean; + } + + interface MultipleOfParams { + multipleOf: number; + } + + interface PatternParams { + pattern: string; + } + + interface RequiredParams { + missingProperty: string; + } + + interface TypeParams { + type: string; + } + + interface UniqueItemsParams { + i: number; + j: number; + } + + interface CustomParams { + keyword: string; + } + + interface PatternRequiredParams { + missingPattern: string; + } + + interface PropertyNamesParams { + propertyName: string; + } + + interface IfParams { + failingKeyword: string; + } + + interface SwitchParams { + caseIndex: number; + } + + interface NoParams { } + + interface EnumParams { + allowedValues: Array; + } +} + +export = ajv; diff --git a/test-eol-project/node_modules/ajv/lib/ajv.js b/test-eol-project/node_modules/ajv/lib/ajv.js new file mode 100644 index 00000000..06a45b65 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/ajv.js @@ -0,0 +1,506 @@ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} diff --git a/test-eol-project/node_modules/ajv/lib/compile/index.js b/test-eol-project/node_modules/ajv/lib/compile/index.js new file mode 100644 index 00000000..32169902 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/compile/index.js @@ -0,0 +1,389 @@ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + function patternCode(i, patterns) { + var regExpCode = opts.regExp ? 'regExp' : 'new RegExp'; + return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');'; + } + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + 'regExp', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError, + opts.regExp + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; diff --git a/test-eol-project/node_modules/ajv/lib/compile/util.js b/test-eol-project/node_modules/ajv/lib/compile/util.js new file mode 100644 index 00000000..ef07b8c7 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/compile/util.js @@ -0,0 +1,239 @@ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i' + , $notOp = $isMax ? '>' : '<' + , $errorKeyword = undefined; + + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined + || typeof $schemaExcl == 'number' + || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } +}} + +{{? $isDataExcl }} + {{ + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) + , $exclusive = 'exclusive' + $lvl + , $exclType = 'exclType' + $lvl + , $exclIsNumber = 'exclIsNumber' + $lvl + , $opExpr = 'op' + $lvl + , $opStr = '\' + ' + $opExpr + ' + \''; + }} + var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; + {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} + + var {{=$exclusive}}; + var {{=$exclType}} = typeof {{=$schemaValueExcl}}; + if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') { + {{ var $errorKeyword = $exclusiveKeyword; }} + {{# def.error:'_exclusiveLimit' }} + } else if ({{# def.$dataNotType:'number' }} + {{=$exclType}} == 'number' + ? ( + ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}}) + ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + : ( + ({{=$exclusive}} = {{=$schemaValueExcl}} === true) + ? {{=$data}} {{=$notOp}}= {{=$schemaValue}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + || {{=$data}} !== {{=$data}}) { + var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; + {{ + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + }} +{{??}} + {{ + var $exclIsNumber = typeof $schemaExcl == 'number' + , $opStr = $op; /*used in error*/ + }} + + {{? $exclIsNumber && $isData }} + {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }} + if ({{# def.$dataNotType:'number' }} + ( {{=$schemaValue}} === undefined + || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}} + ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} ) + || {{=$data}} !== {{=$data}}) { + {{??}} + {{ + if ($exclIsNumber && $schema === undefined) { + {{# def.setExclusiveLimit }} + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) + $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + {{# def.setExclusiveLimit }} + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + + var $opExpr = '\'' + $opStr + '\''; /*used in error*/ + }} + + if ({{# def.$dataNotType:'number' }} + {{=$data}} {{=$notOp}} {{=$schemaValue}} + || {{=$data}} !== {{=$data}}) { + {{?}} +{{?}} + {{ $errorKeyword = $errorKeyword || $keyword; }} + {{# def.error:'_limit' }} + } {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst b/test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst new file mode 100644 index 00000000..741329e7 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst @@ -0,0 +1,12 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitItems' }} +} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst b/test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst new file mode 100644 index 00000000..285c66bd --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst @@ -0,0 +1,12 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitLength' }} +} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst b/test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst new file mode 100644 index 00000000..c4c21551 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst @@ -0,0 +1,12 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitProperties' }} +} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/allOf.jst b/test-eol-project/node_modules/ajv/lib/dot/allOf.jst new file mode 100644 index 00000000..0e782fe9 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/allOf.jst @@ -0,0 +1,32 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $allSchemasEmpty = true; +}} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{# def.ifResultValid }} + {{?}} +{{~}} + +{{? $breakOnError }} + {{? $allSchemasEmpty }} + if (true) { + {{??}} + {{= $closingBraces.slice(0,-1) }} + {{?}} +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/anyOf.jst b/test-eol-project/node_modules/ajv/lib/dot/anyOf.jst new file mode 100644 index 00000000..ea909ee6 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/anyOf.jst @@ -0,0 +1,46 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $noEmptySchema = $schema.every(function($sch) { + return {{# def.nonEmptySchema:$sch }}; + }); +}} +{{? $noEmptySchema }} + {{ var $currentBaseId = $it.baseId; }} + var {{=$errs}} = errors; + var {{=$valid}} = false; + + {{# def.setCompositeRule }} + + {{~ $schema:$sch:$i }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{=$valid}} = {{=$valid}} || {{=$nextValid}}; + + if (!{{=$valid}}) { + {{ $closingBraces += '}'; }} + {{~}} + + {{# def.resetCompositeRule }} + + {{= $closingBraces }} + + if (!{{=$valid}}) { + {{# def.extraError:'anyOf' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/coerce.def b/test-eol-project/node_modules/ajv/lib/dot/coerce.def new file mode 100644 index 00000000..c947ed6a --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/coerce.def @@ -0,0 +1,51 @@ +{{## def.coerceType: + {{ + var $dataType = 'dataType' + $lvl + , $coerced = 'coerced' + $lvl; + }} + var {{=$dataType}} = typeof {{=$data}}; + var {{=$coerced}} = undefined; + + {{? it.opts.coerceTypes == 'array' }} + if ({{=$dataType}} == 'object' && Array.isArray({{=$data}}) && {{=$data}}.length == 1) { + {{=$data}} = {{=$data}}[0]; + {{=$dataType}} = typeof {{=$data}}; + if ({{=it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)}}) {{=$coerced}} = {{=$data}}; + } + {{?}} + + if ({{=$coerced}} !== undefined) ; + {{~ $coerceToTypes:$type:$i }} + {{? $type == 'string' }} + else if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') + {{=$coerced}} = '' + {{=$data}}; + else if ({{=$data}} === null) {{=$coerced}} = ''; + {{?? $type == 'number' || $type == 'integer' }} + else if ({{=$dataType}} == 'boolean' || {{=$data}} === null + || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} + {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) + {{=$coerced}} = +{{=$data}}; + {{?? $type == 'boolean' }} + else if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) + {{=$coerced}} = false; + else if ({{=$data}} === 'true' || {{=$data}} === 1) + {{=$coerced}} = true; + {{?? $type == 'null' }} + else if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) + {{=$coerced}} = null; + {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} + else if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) + {{=$coerced}} = [{{=$data}}]; + {{?}} + {{~}} + else { + {{# def.error:'type' }} + } + + if ({{=$coerced}} !== undefined) { + {{# def.setParentData }} + {{=$data}} = {{=$coerced}}; + {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} + {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; + } +#}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/comment.jst b/test-eol-project/node_modules/ajv/lib/dot/comment.jst new file mode 100644 index 00000000..f9591503 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/comment.jst @@ -0,0 +1,9 @@ +{{# def.definitions }} +{{# def.setupKeyword }} + +{{ var $comment = it.util.toQuotedString($schema); }} +{{? it.opts.$comment === true }} + console.log({{=$comment}}); +{{?? typeof it.opts.$comment == 'function' }} + self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema); +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/const.jst b/test-eol-project/node_modules/ajv/lib/dot/const.jst new file mode 100644 index 00000000..2aa22980 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/const.jst @@ -0,0 +1,11 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{? !$isData }} + var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); +{{# def.checkError:'const' }} +{{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/contains.jst b/test-eol-project/node_modules/ajv/lib/dot/contains.jst new file mode 100644 index 00000000..4dc99674 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/contains.jst @@ -0,0 +1,55 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId + , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? $nonEmptySchema }} + {{# def.setCompositeRule }} + + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$nextValid}} = false; + + for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + if ({{=$nextValid}}) break; + } + + {{# def.resetCompositeRule }} + {{= $closingBraces }} + + if (!{{=$nextValid}}) { +{{??}} + if ({{=$data}}.length == 0) { +{{?}} + + {{# def.error:'contains' }} + } else { + {{? $nonEmptySchema }} + {{# def.resetErrors }} + {{?}} + {{? it.opts.allErrors }} } {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/custom.jst b/test-eol-project/node_modules/ajv/lib/dot/custom.jst new file mode 100644 index 00000000..d30588fb --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/custom.jst @@ -0,0 +1,191 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $rule = this + , $definition = 'definition' + $lvl + , $rDef = $rule.definition + , $closingBraces = ''; + var $validate = $rDef.validate; + var $compile, $inline, $macro, $ruleValidate, $validateCode; +}} + +{{? $isData && $rDef.$data }} + {{ + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + }} + var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; + var {{=$validateCode}} = {{=$definition}}.validate; +{{??}} + {{ + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + }} +{{?}} + +{{ + var $ruleErrs = $validateCode + '.errors' + , $i = 'i' + $lvl + , $ruleErr = 'ruleErr' + $lvl + , $asyncKeyword = $rDef.async; + + if ($asyncKeyword && !it.async) + throw new Error('async keyword in sync schema'); +}} + + +{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} +var {{=$errs}} = errors; +var {{=$valid}}; + +{{## def.callRuleValidate: + {{=$validateCode}}.call( + {{? it.opts.passContext }}this{{??}}self{{?}} + {{? $compile || $rDef.schema === false }} + , {{=$data}} + {{??}} + , {{=$schemaValue}} + , {{=$data}} + , validate.schema{{=it.schemaPath}} + {{?}} + , {{# def.dataPath }} + {{# def.passParentData }} + , rootData + ) +#}} + +{{## def.extendErrors:_inline: + for (var {{=$i}}={{=$errs}}; {{=$i}} 0) + || _schema === false + : it.util.schemaHasRules(_schema, it.RULES.all)) +#}} + + +{{## def.strLength: + {{? it.opts.unicode === false }} + {{=$data}}.length + {{??}} + ucs2length({{=$data}}) + {{?}} +#}} + + +{{## def.willOptimize: + it.util.varOccurences($code, $nextData) < 2 +#}} + + +{{## def.generateSubschemaCode: + {{ + var $code = it.validate($it); + $it.baseId = $currentBaseId; + }} +#}} + + +{{## def.insertSubschemaCode: + {{= it.validate($it) }} + {{ $it.baseId = $currentBaseId; }} +#}} + + +{{## def._optimizeValidate: + it.util.varReplace($code, $nextData, $passData) +#}} + + +{{## def.optimizeValidate: + {{? {{# def.willOptimize}} }} + {{= {{# def._optimizeValidate }} }} + {{??}} + var {{=$nextData}} = {{=$passData}}; + {{= $code }} + {{?}} +#}} + + +{{## def.$data: + {{ + var $isData = it.opts.$data && $schema && $schema.$data + , $schemaValue; + }} + {{? $isData }} + var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }}; + {{ $schemaValue = 'schema' + $lvl; }} + {{??}} + {{ $schemaValue = $schema; }} + {{?}} +#}} + + +{{## def.$dataNotType:_type: + {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}} +#}} + + +{{## def.check$dataIsArray: + if (schema{{=$lvl}} === undefined) {{=$valid}} = true; + else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false; + else { +#}} + + +{{## def.numberKeyword: + {{? !($isData || typeof $schema == 'number') }} + {{ throw new Error($keyword + ' must be number'); }} + {{?}} +#}} + + +{{## def.beginDefOut: + {{ + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + }} +#}} + + +{{## def.storeDefOut:_variable: + {{ + var _variable = out; + out = $$outStack.pop(); + }} +#}} + + +{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}} + +{{## def.setParentData: + {{ + var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData' + , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + }} +#}} + +{{## def.passParentData: + {{# def.setParentData }} + , {{= $parentData }} + , {{= $parentDataProperty }} +#}} + + +{{## def.iterateProperties: + {{? $ownProperties }} + {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}}); + for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) { + var {{=$key}} = {{=$dataProperties}}[{{=$idx}}]; + {{??}} + for (var {{=$key}} in {{=$data}}) { + {{?}} +#}} + + +{{## def.noPropertyInData: + {{=$useData}} === undefined + {{? $ownProperties }} + || !{{# def.isOwnProperty }} + {{?}} +#}} + + +{{## def.isOwnProperty: + Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}') +#}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/dependencies.jst b/test-eol-project/node_modules/ajv/lib/dot/dependencies.jst new file mode 100644 index 00000000..e4bdddec --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/dependencies.jst @@ -0,0 +1,79 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.missing }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.propertyInData: + {{=$data}}{{= it.util.getProperty($property) }} !== undefined + {{? $ownProperties }} + && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}') + {{?}} +#}} + + +{{ + var $schemaDeps = {} + , $propertyDeps = {} + , $ownProperties = it.opts.ownProperties; + + for ($property in $schema) { + if ($property == '__proto__') continue; + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } +}} + +var {{=$errs}} = errors; + +{{ var $currentErrorPath = it.errorPath; }} + +var missing{{=$lvl}}; +{{ for (var $property in $propertyDeps) { }} + {{ $deps = $propertyDeps[$property]; }} + {{? $deps.length }} + if ({{# def.propertyInData }} + {{? $breakOnError }} + && ({{# def.checkMissingProperty:$deps }})) { + {{# def.errorMissingProperty:'dependencies' }} + {{??}} + ) { + {{~ $deps:$propertyKey }} + {{# def.allErrorsMissingProperty:'dependencies' }} + {{~}} + {{?}} + } {{# def.elseIfValid }} + {{?}} +{{ } }} + +{{ + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; +}} + + +{{ for (var $property in $schemaDeps) { }} + {{ var $sch = $schemaDeps[$property]; }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{# def.propertyInData }}) { + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + }} + + {{# def.insertSubschemaCode }} + } + + {{# def.ifResultValid }} + {{?}} +{{ } }} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/enum.jst b/test-eol-project/node_modules/ajv/lib/dot/enum.jst new file mode 100644 index 00000000..357c2e8c --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/enum.jst @@ -0,0 +1,30 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $i = 'i' + $lvl + , $vSchema = 'schema' + $lvl; +}} + +{{? !$isData }} + var {{=$vSchema}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}}; + +{{?$isData}}{{# def.check$dataIsArray }}{{?}} + +{{=$valid}} = false; + +for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) + if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { + {{=$valid}} = true; + break; + } + +{{? $isData }} } {{?}} + +{{# def.checkError:'enum' }} + +{{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/errors.def b/test-eol-project/node_modules/ajv/lib/dot/errors.def new file mode 100644 index 00000000..5c5752cb --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/errors.def @@ -0,0 +1,194 @@ +{{# def.definitions }} + +{{## def._error:_rule: + {{ 'istanbul ignore else'; }} + {{? it.createErrors !== false }} + { + keyword: '{{= $errorKeyword || _rule }}' + , dataPath: (dataPath || '') + {{= it.errorPath }} + , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}} + , params: {{# def._errorParams[_rule] }} + {{? it.opts.messages !== false }} + , message: {{# def._errorMessages[_rule] }} + {{?}} + {{? it.opts.verbose }} + , schema: {{# def._errorSchemas[_rule] }} + , parentSchema: validate.schema{{=it.schemaPath}} + , data: {{=$data}} + {{?}} + } + {{??}} + {} + {{?}} +#}} + + +{{## def._addError:_rule: + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; +#}} + + +{{## def.addError:_rule: + var err = {{# def._error:_rule }}; + {{# def._addError:_rule }} +#}} + + +{{## def.error:_rule: + {{# def.beginDefOut}} + {{# def._error:_rule }} + {{# def.storeDefOut:__err }} + + {{? !it.compositeRule && $breakOnError }} + {{ 'istanbul ignore if'; }} + {{? it.async }} + throw new ValidationError([{{=__err}}]); + {{??}} + validate.errors = [{{=__err}}]; + return false; + {{?}} + {{??}} + var err = {{=__err}}; + {{# def._addError:_rule }} + {{?}} +#}} + + +{{## def.extraError:_rule: + {{# def.addError:_rule}} + {{? !it.compositeRule && $breakOnError }} + {{ 'istanbul ignore if'; }} + {{? it.async }} + throw new ValidationError(vErrors); + {{??}} + validate.errors = vErrors; + return false; + {{?}} + {{?}} +#}} + + +{{## def.checkError:_rule: + if (!{{=$valid}}) { + {{# def.error:_rule }} + } +#}} + + +{{## def.resetErrors: + errors = {{=$errs}}; + if (vErrors !== null) { + if ({{=$errs}}) vErrors.length = {{=$errs}}; + else vErrors = null; + } +#}} + + +{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}} +{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}} +{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}} + +{{## def._errorMessages = { + 'false schema': "'boolean schema is false'", + $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'", + additionalItems: "'should NOT have more than {{=$schema.length}} items'", + additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'", + anyOf: "'should match some schema in anyOf'", + const: "'should be equal to constant'", + contains: "'should contain a valid item'", + dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'", + 'enum': "'should be equal to one of the allowed values'", + format: "'should match format \"{{#def.concatSchemaEQ}}\"'", + 'if': "'should match \"' + {{=$ifClause}} + '\" schema'", + _limit: "'should be {{=$opStr}} {{#def.appendSchema}}", + _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'", + _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'", + _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'", + _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'", + multipleOf: "'should be multiple of {{#def.appendSchema}}", + not: "'should NOT be valid'", + oneOf: "'should match exactly one schema in oneOf'", + pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'", + propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'", + required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'", + type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'", + uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'", + custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'", + patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''", + switch: "'should pass \"switch\" keyword validation'", + _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'", + _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'" +} #}} + + +{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}} +{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} + +{{## def._errorSchemas = { + 'false schema': "false", + $ref: "{{=it.util.toQuotedString($schema)}}", + additionalItems: "false", + additionalProperties: "false", + anyOf: "validate.schema{{=$schemaPath}}", + const: "validate.schema{{=$schemaPath}}", + contains: "validate.schema{{=$schemaPath}}", + dependencies: "validate.schema{{=$schemaPath}}", + 'enum': "validate.schema{{=$schemaPath}}", + format: "{{#def.schemaRefOrQS}}", + 'if': "validate.schema{{=$schemaPath}}", + _limit: "{{#def.schemaRefOrVal}}", + _exclusiveLimit: "validate.schema{{=$schemaPath}}", + _limitItems: "{{#def.schemaRefOrVal}}", + _limitLength: "{{#def.schemaRefOrVal}}", + _limitProperties:"{{#def.schemaRefOrVal}}", + multipleOf: "{{#def.schemaRefOrVal}}", + not: "validate.schema{{=$schemaPath}}", + oneOf: "validate.schema{{=$schemaPath}}", + pattern: "{{#def.schemaRefOrQS}}", + propertyNames: "validate.schema{{=$schemaPath}}", + required: "validate.schema{{=$schemaPath}}", + type: "validate.schema{{=$schemaPath}}", + uniqueItems: "{{#def.schemaRefOrVal}}", + custom: "validate.schema{{=$schemaPath}}", + patternRequired: "validate.schema{{=$schemaPath}}", + switch: "validate.schema{{=$schemaPath}}", + _formatLimit: "{{#def.schemaRefOrQS}}", + _formatExclusiveLimit: "validate.schema{{=$schemaPath}}" +} #}} + + +{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} + +{{## def._errorParams = { + 'false schema': "{}", + $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }", + additionalItems: "{ limit: {{=$schema.length}} }", + additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }", + anyOf: "{}", + const: "{ allowedValue: schema{{=$lvl}} }", + contains: "{}", + dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }", + 'enum': "{ allowedValues: schema{{=$lvl}} }", + format: "{ format: {{#def.schemaValueQS}} }", + 'if': "{ failingKeyword: {{=$ifClause}} }", + _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }", + _exclusiveLimit: "{}", + _limitItems: "{ limit: {{=$schemaValue}} }", + _limitLength: "{ limit: {{=$schemaValue}} }", + _limitProperties:"{ limit: {{=$schemaValue}} }", + multipleOf: "{ multipleOf: {{=$schemaValue}} }", + not: "{}", + oneOf: "{ passingSchemas: {{=$passingSchemas}} }", + pattern: "{ pattern: {{#def.schemaValueQS}} }", + propertyNames: "{ propertyName: '{{=$invalidName}}' }", + required: "{ missingProperty: '{{=$missingProperty}}' }", + type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }", + uniqueItems: "{ i: i, j: j }", + custom: "{ keyword: '{{=$rule.keyword}}' }", + patternRequired: "{ missingPattern: '{{=$missingPattern}}' }", + switch: "{ caseIndex: {{=$caseIndex}} }", + _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }", + _formatExclusiveLimit: "{}" +} #}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/format.jst b/test-eol-project/node_modules/ajv/lib/dot/format.jst new file mode 100644 index 00000000..37f14da8 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/format.jst @@ -0,0 +1,106 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} + +{{## def.skipFormat: + {{? $breakOnError }} if (true) { {{?}} + {{ return out; }} +#}} + +{{? it.opts.format === false }}{{# def.skipFormat }}{{?}} + + +{{# def.$data }} + + +{{## def.$dataCheckFormat: + {{# def.$dataNotType:'string' }} + ({{? $unknownFormats != 'ignore' }} + ({{=$schemaValue}} && !{{=$format}} + {{? $allowUnknown }} + && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1 + {{?}}) || + {{?}} + ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}' + && !(typeof {{=$format}} == 'function' + ? {{? it.async}} + (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}})) + {{??}} + {{=$format}}({{=$data}}) + {{?}} + : {{=$format}}.test({{=$data}})))) +#}} + +{{## def.checkFormat: + {{ + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + }} + {{? typeof $format == 'function' }} + {{=$formatRef}}({{=$data}}) + {{??}} + {{=$formatRef}}.test({{=$data}}) + {{?}} +#}} + + +{{ + var $unknownFormats = it.opts.unknownFormats + , $allowUnknown = Array.isArray($unknownFormats); +}} + +{{? $isData }} + {{ + var $format = 'format' + $lvl + , $isObject = 'isObject' + $lvl + , $formatType = 'formatType' + $lvl; + }} + var {{=$format}} = formats[{{=$schemaValue}}]; + var {{=$isObject}} = typeof {{=$format}} == 'object' + && !({{=$format}} instanceof RegExp) + && {{=$format}}.validate; + var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string'; + if ({{=$isObject}}) { + {{? it.async}} + var async{{=$lvl}} = {{=$format}}.async; + {{?}} + {{=$format}} = {{=$format}}.validate; + } + if ({{# def.$dataCheckFormat }}) { +{{??}} + {{ var $format = it.formats[$schema]; }} + {{? !$format }} + {{? $unknownFormats == 'ignore' }} + {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }} + {{# def.skipFormat }} + {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }} + {{# def.skipFormat }} + {{??}} + {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }} + {{?}} + {{?}} + {{ + var $isObject = typeof $format == 'object' + && !($format instanceof RegExp) + && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + }} + {{? $formatType != $ruleType }} + {{# def.skipFormat }} + {{?}} + {{? $async }} + {{ + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + }} + if (!(await {{=$formatRef}}({{=$data}}))) { + {{??}} + if (!{{# def.checkFormat }}) { + {{?}} +{{?}} + {{# def.error:'format' }} + } {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/if.jst b/test-eol-project/node_modules/ajv/lib/dot/if.jst new file mode 100644 index 00000000..adb50361 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/if.jst @@ -0,0 +1,73 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateIfClause:_clause: + {{ + $it.schema = it.schema['_clause']; + $it.schemaPath = it.schemaPath + '._clause'; + $it.errSchemaPath = it.errSchemaPath + '/_clause'; + }} + {{# def.insertSubschemaCode }} + {{=$valid}} = {{=$nextValid}}; + {{? $thenPresent && $elsePresent }} + {{ $ifClause = 'ifClause' + $lvl; }} + var {{=$ifClause}} = '_clause'; + {{??}} + {{ $ifClause = '\'_clause\''; }} + {{?}} +#}} + +{{ + var $thenSch = it.schema['then'] + , $elseSch = it.schema['else'] + , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }} + , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }} + , $currentBaseId = $it.baseId; +}} + +{{? $thenPresent || $elsePresent }} + {{ + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + var {{=$errs}} = errors; + var {{=$valid}} = true; + + {{# def.setCompositeRule }} + {{# def.insertSubschemaCode }} + {{ $it.createErrors = true; }} + {{# def.resetErrors }} + {{# def.resetCompositeRule }} + + {{? $thenPresent }} + if ({{=$nextValid}}) { + {{# def.validateIfClause:then }} + } + {{? $elsePresent }} + else { + {{?}} + {{??}} + if (!{{=$nextValid}}) { + {{?}} + + {{? $elsePresent }} + {{# def.validateIfClause:else }} + } + {{?}} + + if (!{{=$valid}}) { + {{# def.extraError:'if' }} + } + {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} + diff --git a/test-eol-project/node_modules/ajv/lib/dot/items.jst b/test-eol-project/node_modules/ajv/lib/dot/items.jst new file mode 100644 index 00000000..acc932a2 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/items.jst @@ -0,0 +1,98 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateItems:startFrom: + for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} + if (!{{=$nextValid}}) break; + {{?}} + } +#}} + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? Array.isArray($schema) }} + {{ /* 'items' is an array of schemas */}} + {{ var $additionalItems = it.schema.additionalItems; }} + {{? $additionalItems === false }} + {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{# def.checkError:'additionalItems' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{# def.elseIfValid}} + {{?}} + + {{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{=$i}}) { + {{ + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + } + + {{# def.ifResultValid }} + {{?}} + {{~}} + + {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} + {{ + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{= $schema.length }}) { + {{# def.validateItems: $schema.length }} + } + + {{# def.ifResultValid }} + {{?}} + +{{?? {{# def.nonEmptySchema:$schema }} }} + {{ /* 'items' is a single schema */}} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + {{# def.validateItems: 0 }} +{{?}} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/missing.def b/test-eol-project/node_modules/ajv/lib/dot/missing.def new file mode 100644 index 00000000..a73b9f96 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/missing.def @@ -0,0 +1,39 @@ +{{## def.checkMissingProperty:_properties: + {{~ _properties:$propertyKey:$i }} + {{?$i}} || {{?}} + {{ + var $prop = it.util.getProperty($propertyKey) + , $useData = $data + $prop; + }} + ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) + {{~}} +#}} + + +{{## def.errorMissingProperty:_error: + {{ + var $propertyPath = 'missing' + $lvl + , $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers + ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) + : $currentErrorPath + ' + ' + $propertyPath; + } + }} + {{# def.error:_error }} +#}} + + +{{## def.allErrorsMissingProperty:_error: + {{ + var $prop = it.util.getProperty($propertyKey) + , $missingProperty = it.util.escapeQuotes($propertyKey) + , $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + }} + if ({{# def.noPropertyInData }}) { + {{# def.addError:_error }} + } +#}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst b/test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst new file mode 100644 index 00000000..6d88a456 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst @@ -0,0 +1,22 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +var division{{=$lvl}}; +if ({{?$isData}} + {{=$schemaValue}} !== undefined && ( + typeof {{=$schemaValue}} != 'number' || + {{?}} + (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, + {{? it.opts.multipleOfPrecision }} + Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} + {{??}} + division{{=$lvl}} !== parseInt(division{{=$lvl}}) + {{?}} + ) + {{?$isData}} ) {{?}} ) { + {{# def.error:'multipleOf' }} +} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/not.jst b/test-eol-project/node_modules/ajv/lib/dot/not.jst new file mode 100644 index 00000000..e03185ae --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/not.jst @@ -0,0 +1,43 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$errs}} = errors; + + {{# def.setCompositeRule }} + + {{ + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + }} + {{= it.validate($it) }} + {{ + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + }} + + {{# def.resetCompositeRule }} + + if ({{=$nextValid}}) { + {{# def.error:'not' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{# def.addError:'not' }} + {{? $breakOnError}} + if (false) { + {{?}} +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/oneOf.jst b/test-eol-project/node_modules/ajv/lib/dot/oneOf.jst new file mode 100644 index 00000000..bcce2c6e --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/oneOf.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $prevValid = 'prevValid' + $lvl + , $passingSchemas = 'passingSchemas' + $lvl; +}} + +var {{=$errs}} = errors + , {{=$prevValid}} = false + , {{=$valid}} = false + , {{=$passingSchemas}} = null; + +{{# def.setCompositeRule }} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + {{??}} + var {{=$nextValid}} = true; + {{?}} + + {{? $i }} + if ({{=$nextValid}} && {{=$prevValid}}) { + {{=$valid}} = false; + {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}]; + } else { + {{ $closingBraces += '}'; }} + {{?}} + + if ({{=$nextValid}}) { + {{=$valid}} = {{=$prevValid}} = true; + {{=$passingSchemas}} = {{=$i}}; + } +{{~}} + +{{# def.resetCompositeRule }} + +{{= $closingBraces }} + +if (!{{=$valid}}) { + {{# def.extraError:'oneOf' }} +} else { + {{# def.resetErrors }} +{{? it.opts.allErrors }} } {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/pattern.jst b/test-eol-project/node_modules/ajv/lib/dot/pattern.jst new file mode 100644 index 00000000..8f7f9993 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/pattern.jst @@ -0,0 +1,25 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; +}} + +{{? $isData }} + var {{=$valid}} = true; + try { + {{=$valid}} = {{=$regExpCode}}({{=$schemaValue}}).test({{=$data}}); + } catch(e) { + {{=$valid}} = false; + } + if ({{# def.$dataNotType:'string' }} !{{=$valid}}) { +{{??}} + {{ + var $regexp = it.usePattern($schema); + }} + if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { +{{?}} + {{# def.error:'pattern' }} +} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/properties.jst b/test-eol-project/node_modules/ajv/lib/dot/properties.jst new file mode 100644 index 00000000..5cebb9b1 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/properties.jst @@ -0,0 +1,245 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateAdditional: + {{ /* additionalProperties is schema */ + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty + ? it.errorPath + : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} +#}} + + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl; + + var $schemaKeys = Object.keys($schema || {}).filter(notProto) + , $pProperties = it.schema.patternProperties || {} + , $pPropertyKeys = Object.keys($pProperties).filter(notProto) + , $aProperties = it.schema.additionalProperties + , $someProperties = $schemaKeys.length || $pPropertyKeys.length + , $noAdditional = $aProperties === false + , $additionalIsSchema = typeof $aProperties == 'object' + && Object.keys($aProperties).length + , $removeAdditional = it.opts.removeAdditional + , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { return p !== '__proto__'; } +}} + + +var {{=$errs}} = errors; +var {{=$nextValid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{? $checkAdditional }} + {{# def.iterateProperties }} + {{? $someProperties }} + var isAdditional{{=$lvl}} = !(false + {{? $schemaKeys.length }} + {{? $schemaKeys.length > 8 }} + || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}}) + {{??}} + {{~ $schemaKeys:$propertyKey }} + || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} + {{~}} + {{?}} + {{?}} + {{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty:$i }} + || {{= it.usePattern($pProperty) }}.test({{=$key}}) + {{~}} + {{?}} + ); + + if (isAdditional{{=$lvl}}) { + {{?}} + {{? $removeAdditional == 'all' }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{ + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + }} + {{? $noAdditional }} + {{? $removeAdditional }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{=$nextValid}} = false; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + }} + {{# def.error:'additionalProperties' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{? $breakOnError }} break; {{?}} + {{?}} + {{?? $additionalIsSchema }} + {{? $removeAdditional == 'failing' }} + var {{=$errs}} = errors; + {{# def.setCompositeRule }} + + {{# def.validateAdditional }} + + if (!{{=$nextValid}}) { + errors = {{=$errs}}; + if (validate.errors !== null) { + if (errors) validate.errors.length = errors; + else validate.errors = null; + } + delete {{=$data}}[{{=$key}}]; + } + + {{# def.resetCompositeRule }} + {{??}} + {{# def.validateAdditional }} + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + {{?}} + {{?}} + {{ it.errorPath = $currentErrorPath; }} + {{?}} + {{? $someProperties }} + } + {{?}} + } + + {{# def.ifResultValid }} +{{?}} + +{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} + +{{? $schemaKeys.length }} + {{~ $schemaKeys:$propertyKey }} + {{ var $sch = $schema[$propertyKey]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + var $prop = it.util.getProperty($propertyKey) + , $passData = $data + $prop + , $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + }} + + {{# def.generateSubschemaCode }} + + {{? {{# def.willOptimize }} }} + {{ + $code = {{# def._optimizeValidate }}; + var $useData = $passData; + }} + {{??}} + {{ var $useData = $nextData; }} + var {{=$nextData}} = {{=$passData}}; + {{?}} + + {{? $hasDefault }} + {{= $code }} + {{??}} + {{? $requiredHash && $requiredHash[$propertyKey] }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = false; + {{ + var $currentErrorPath = it.errorPath + , $currErrSchemaPath = $errSchemaPath + , $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + }} + {{# def.error:'required' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{ it.errorPath = $currentErrorPath; }} + } else { + {{??}} + {{? $breakOnError }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = true; + } else { + {{??}} + if ({{=$useData}} !== undefined + {{? $ownProperties }} + && {{# def.isOwnProperty }} + {{?}} + ) { + {{?}} + {{?}} + + {{= $code }} + } + {{?}} {{ /* $hasDefault */ }} + {{?}} {{ /* def.nonEmptySchema */ }} + + {{# def.ifResultValid }} + {{~}} +{{?}} + +{{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty }} + {{ var $sch = $pProperties[$pProperty]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + + it.util.escapeFragment($pProperty); + }} + + {{# def.iterateProperties }} + if ({{= it.usePattern($pProperty) }}.test({{=$key}})) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + } + {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} + } + + {{# def.ifResultValid }} + {{?}} {{ /* def.nonEmptySchema */ }} + {{~}} +{{?}} + + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst b/test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst new file mode 100644 index 00000000..d456ccaf --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst @@ -0,0 +1,52 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +var {{=$errs}} = errors; + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + {{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $i = 'i' + $lvl + , $invalidName = '\' + ' + $key + ' + \'' + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + }} + + {{? $ownProperties }} + var {{=$dataProperties}} = undefined; + {{?}} + {{# def.iterateProperties }} + var startErrs{{=$lvl}} = errors; + + {{ var $passData = $key; }} + {{# def.setCompositeRule }} + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + {{# def.resetCompositeRule }} + + if (!{{=$nextValid}}) { + for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired + , $ownProperties = it.opts.ownProperties; + }} + + {{? $breakOnError }} + var missing{{=$lvl}}; + {{? $loopRequired }} + {{# def.setupLoop }} + var {{=$valid}} = true; + + {{?$isData}}{{# def.check$dataIsArray }}{{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined + {{? $ownProperties }} + && {{# def.isRequiredOwnProperty }} + {{?}}; + if (!{{=$valid}}) break; + } + + {{? $isData }} } {{?}} + + {{# def.checkError:'required' }} + else { + {{??}} + if ({{# def.checkMissingProperty:$required }}) { + {{# def.errorMissingProperty:'required' }} + } else { + {{?}} + {{??}} + {{? $loopRequired }} + {{# def.setupLoop }} + {{? $isData }} + if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { + {{# def.addError:'required' }} + } else if ({{=$vSchema}} !== undefined) { + {{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined + {{? $ownProperties }} + || !{{# def.isRequiredOwnProperty }} + {{?}}) { + {{# def.addError:'required' }} + } + } + + {{? $isData }} } {{?}} + {{??}} + {{~ $required:$propertyKey }} + {{# def.allErrorsMissingProperty:'required' }} + {{~}} + {{?}} + {{?}} + + {{ it.errorPath = $currentErrorPath; }} + +{{?? $breakOnError }} + if (true) { +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst b/test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst new file mode 100644 index 00000000..e69b8308 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst @@ -0,0 +1,62 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + + +{{? ($schema || $isData) && it.opts.uniqueItems !== false }} + {{? $isData }} + var {{=$valid}}; + if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) + {{=$valid}} = true; + else if (typeof {{=$schemaValue}} != 'boolean') + {{=$valid}} = false; + else { + {{?}} + + var i = {{=$data}}.length + , {{=$valid}} = true + , j; + if (i > 1) { + {{ + var $itemType = it.schema.items && it.schema.items.type + , $typeIsArray = Array.isArray($itemType); + }} + {{? !$itemType || $itemType == 'object' || $itemType == 'array' || + ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }} + outer: + for (;i--;) { + for (j = i; j--;) { + if (equal({{=$data}}[i], {{=$data}}[j])) { + {{=$valid}} = false; + break outer; + } + } + } + {{??}} + var itemIndices = {}, item; + for (;i--;) { + var item = {{=$data}}[i]; + {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }} + if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue; + {{? $typeIsArray}} + if (typeof item == 'string') item = '"' + item; + {{?}} + if (typeof itemIndices[item] == 'number') { + {{=$valid}} = false; + j = itemIndices[item]; + break; + } + itemIndices[item] = i; + } + {{?}} + } + + {{? $isData }} } {{?}} + + if (!{{=$valid}}) { + {{# def.error:'uniqueItems' }} + } {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} if (true) { {{?}} +{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/validate.jst b/test-eol-project/node_modules/ajv/lib/dot/validate.jst new file mode 100644 index 00000000..32087e71 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dot/validate.jst @@ -0,0 +1,276 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.defaults }} +{{# def.coerce }} + +{{ /** + * schema compilation (render) time: + * it = { schema, RULES, _validate, opts } + * it.validate - this template function, + * it is used recursively to generate code for subschemas + * + * runtime: + * "validate" is a variable name to which this function will be assigned + * validateRef etc. are defined in the parent scope in index.js + */ }} + +{{ + var $async = it.schema.$async === true + , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') + , $id = it.self._getId(it.schema); +}} + +{{ + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } +}} + +{{? it.isTop }} + var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + {{? $id && (it.opts.sourceCode || it.opts.processCode) }} + {{= '/\*# sourceURL=' + $id + ' */' }} + {{?}} +{{?}} + +{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }} + {{ var $keyword = 'false schema'; }} + {{# def.setupKeyword }} + {{? it.schema === false}} + {{? it.isTop}} + {{ $breakOnError = true; }} + {{??}} + var {{=$valid}} = false; + {{?}} + {{# def.error:'false schema' }} + {{??}} + {{? it.isTop}} + {{? $async }} + return data; + {{??}} + validate.errors = null; + return true; + {{?}} + {{??}} + var {{=$valid}} = true; + {{?}} + {{?}} + + {{? it.isTop}} + }; + return validate; + {{?}} + + {{ return out; }} +{{?}} + + +{{? it.isTop }} + {{ + var $top = it.isTop + , $lvl = it.level = 0 + , $dataLvl = it.dataLevel = 0 + , $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + + it.dataPathArr = [""]; + + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + }} + + var vErrors = null; {{ /* don't edit, used in replace */ }} + var errors = 0; {{ /* don't edit, used in replace */ }} + if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }} +{{??}} + {{ + var $lvl = it.level + , $dataLvl = it.dataLevel + , $data = 'data' + ($dataLvl || ''); + + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + + if ($async && !it.async) throw new Error('async schema in sync schema'); + }} + + var errs_{{=$lvl}} = errors; +{{?}} + +{{ + var $valid = 'valid' + $lvl + , $breakOnError = !it.opts.allErrors + , $closingBraces1 = '' + , $closingBraces2 = ''; + + var $errorKeyword; + var $typeSchema = it.schema.type + , $typeIsArray = Array.isArray($typeSchema); + + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) + $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } +}} + +{{## def.checkType: + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type' + , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + }} + + if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) { +#}} + +{{? it.schema.$ref && $refKeywords }} + {{? it.opts.extendRefs == 'fail' }} + {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }} + {{?? it.opts.extendRefs !== true }} + {{ + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + }} + {{?}} +{{?}} + +{{? it.schema.$comment && it.opts.$comment }} + {{= it.RULES.all.$comment.code(it, '$comment') }} +{{?}} + +{{? $typeSchema }} + {{? it.opts.coerceTypes }} + {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }} + {{?}} + + {{ var $rulesGroup = it.RULES.types[$typeSchema]; }} + {{? $coerceToTypes || $typeIsArray || $rulesGroup === true || + ($rulesGroup && !$shouldUseGroup($rulesGroup)) }} + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.checkType }} + {{? $coerceToTypes }} + {{# def.coerceType }} + {{??}} + {{# def.error:'type' }} + {{?}} + } + {{?}} +{{?}} + + +{{? it.schema.$ref && !$refKeywords }} + {{= it.RULES.all.$ref.code(it, '$ref') }} + {{? $breakOnError }} + } + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} +{{??}} + {{~ it.RULES:$rulesGroup }} + {{? $shouldUseGroup($rulesGroup) }} + {{? $rulesGroup.type }} + if ({{= it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) }}) { + {{?}} + {{? it.opts.useDefaults }} + {{? $rulesGroup.type == 'object' && it.schema.properties }} + {{# def.defaultProperties }} + {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} + {{# def.defaultItems }} + {{?}} + {{?}} + {{~ $rulesGroup.rules:$rule }} + {{? $shouldUseRule($rule) }} + {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} + {{? $code }} + {{= $code }} + {{? $breakOnError }} + {{ $closingBraces1 += '}'; }} + {{?}} + {{?}} + {{?}} + {{~}} + {{? $breakOnError }} + {{= $closingBraces1 }} + {{ $closingBraces1 = ''; }} + {{?}} + {{? $rulesGroup.type }} + } + {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} + else { + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.error:'type' }} + } + {{?}} + {{?}} + + {{? $breakOnError }} + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} + {{?}} + {{~}} +{{?}} + +{{? $breakOnError }} {{= $closingBraces2 }} {{?}} + +{{? $top }} + {{? $async }} + if (errors === 0) return data; {{ /* don't edit, used in replace */ }} + else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} + {{??}} + validate.errors = vErrors; {{ /* don't edit, used in replace */ }} + return errors === 0; {{ /* don't edit, used in replace */ }} + {{?}} + }; + + return validate; +{{??}} + var {{=$valid}} = errors === errs_{{=$lvl}}; +{{?}} + +{{ + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i=0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) + return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || + ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i=0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) + return true; + } +}} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/README.md b/test-eol-project/node_modules/ajv/lib/dotjs/README.md new file mode 100644 index 00000000..4d994846 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limit.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limit.js new file mode 100644 index 00000000..05a1979d --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/_limit.js @@ -0,0 +1,163 @@ +'use strict'; +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js new file mode 100644 index 00000000..e092a559 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js @@ -0,0 +1,80 @@ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js new file mode 100644 index 00000000..ecbd3fe1 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js @@ -0,0 +1,85 @@ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js new file mode 100644 index 00000000..d232755a --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js @@ -0,0 +1,80 @@ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/allOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/allOf.js new file mode 100644 index 00000000..fb8c2e4b --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/allOf.js @@ -0,0 +1,42 @@ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js new file mode 100644 index 00000000..0600a9d4 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/comment.js b/test-eol-project/node_modules/ajv/lib/dotjs/comment.js new file mode 100644 index 00000000..dd66bb8f --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/comment.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/const.js b/test-eol-project/node_modules/ajv/lib/dotjs/const.js new file mode 100644 index 00000000..15b7c619 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/const.js @@ -0,0 +1,56 @@ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/contains.js b/test-eol-project/node_modules/ajv/lib/dotjs/contains.js new file mode 100644 index 00000000..7d763009 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/contains.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/custom.js b/test-eol-project/node_modules/ajv/lib/dotjs/custom.js new file mode 100644 index 00000000..f3e641e7 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/custom.js @@ -0,0 +1,228 @@ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/enum.js b/test-eol-project/node_modules/ajv/lib/dotjs/enum.js new file mode 100644 index 00000000..90580b9f --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/enum.js @@ -0,0 +1,66 @@ +'use strict'; +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/format.js b/test-eol-project/node_modules/ajv/lib/dotjs/format.js new file mode 100644 index 00000000..cd9a5693 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/format.js @@ -0,0 +1,150 @@ +'use strict'; +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/if.js b/test-eol-project/node_modules/ajv/lib/dotjs/if.js new file mode 100644 index 00000000..94d27ad8 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/if.js @@ -0,0 +1,103 @@ +'use strict'; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/index.js b/test-eol-project/node_modules/ajv/lib/dotjs/index.js new file mode 100644 index 00000000..2fb1b00e --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/index.js @@ -0,0 +1,33 @@ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/items.js b/test-eol-project/node_modules/ajv/lib/dotjs/items.js new file mode 100644 index 00000000..bee5d67d --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/items.js @@ -0,0 +1,140 @@ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js new file mode 100644 index 00000000..9d6401b8 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js @@ -0,0 +1,80 @@ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/not.js b/test-eol-project/node_modules/ajv/lib/dotjs/not.js new file mode 100644 index 00000000..f50c9378 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/not.js @@ -0,0 +1,84 @@ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js new file mode 100644 index 00000000..dfe2fd55 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/pattern.js b/test-eol-project/node_modules/ajv/lib/dotjs/pattern.js new file mode 100644 index 00000000..7efafef3 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/pattern.js @@ -0,0 +1,85 @@ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; + if ($isData) { + out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($valid) + ') {'; + } else { + var $regexp = it.usePattern($schema); + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/properties.js b/test-eol-project/node_modules/ajv/lib/dotjs/properties.js new file mode 100644 index 00000000..bc5ee554 --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/properties.js @@ -0,0 +1,335 @@ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js b/test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js new file mode 100644 index 00000000..2a54a08f --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js b/test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js new file mode 100644 index 00000000..0736a0ed --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js @@ -0,0 +1,86 @@ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/validate.js b/test-eol-project/node_modules/ajv/lib/dotjs/validate.js new file mode 100644 index 00000000..f295824b --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/dotjs/validate.js @@ -0,0 +1,482 @@ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} diff --git a/test-eol-project/node_modules/ajv/lib/keyword.js b/test-eol-project/node_modules/ajv/lib/keyword.js new file mode 100644 index 00000000..06da9a2d --- /dev/null +++ b/test-eol-project/node_modules/ajv/lib/keyword.js @@ -0,0 +1,146 @@ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); +var definitionSchema = require('./definition_schema'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i ../ajv-dist/bower.json + cd ../ajv-dist + + if [[ `git status --porcelain` ]]; then + echo "Changes detected. Updating master branch..." + git add -A + git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin master > /dev/null 2>&1 + fi + + echo "Publishing tag..." + + git tag $TRAVIS_TAG + git push --tags > /dev/null 2>&1 + + echo "Done" +fi diff --git a/test-eol-project/node_modules/ajv/scripts/travis-gh-pages b/test-eol-project/node_modules/ajv/scripts/travis-gh-pages new file mode 100755 index 00000000..b3d4f3d0 --- /dev/null +++ b/test-eol-project/node_modules/ajv/scripts/travis-gh-pages @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e + +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then + git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { + rm -rf ../gh-pages + git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv.git ../gh-pages + mkdir -p ../gh-pages/_source + cp *.md ../gh-pages/_source + cp LICENSE ../gh-pages/_source + currentDir=$(pwd) + cd ../gh-pages + $currentDir/node_modules/.bin/gh-pages-generator + # remove logo from README + sed -i -E "s/]+ajv_logo[^>]+>//" index.md + git config user.email "$GIT_USER_EMAIL" + git config user.name "$GIT_USER_NAME" + git add . + git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin gh-pages > /dev/null 2>&1 + } +fi diff --git a/test-eol-project/node_modules/ansi-regex/index.js b/test-eol-project/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..b9574ed7 --- /dev/null +++ b/test-eol-project/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/test-eol-project/node_modules/ansi-regex/license b/test-eol-project/node_modules/ansi-regex/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/ansi-regex/package.json b/test-eol-project/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..eb44fb5c --- /dev/null +++ b/test-eol-project/node_modules/ansi-regex/package.json @@ -0,0 +1,64 @@ +{ + "name": "ansi-regex", + "version": "2.1.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/test-eol-project/node_modules/ansi-regex/readme.md b/test-eol-project/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..6a928edf --- /dev/null +++ b/test-eol-project/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/ansi-styles/index.js b/test-eol-project/node_modules/ansi-styles/index.js new file mode 100644 index 00000000..78945278 --- /dev/null +++ b/test-eol-project/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/test-eol-project/node_modules/ansi-styles/license b/test-eol-project/node_modules/ansi-styles/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/ansi-styles/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/ansi-styles/package.json b/test-eol-project/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..78c535f7 --- /dev/null +++ b/test-eol-project/node_modules/ansi-styles/package.json @@ -0,0 +1,50 @@ +{ + "name": "ansi-styles", + "version": "2.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/test-eol-project/node_modules/ansi-styles/readme.md b/test-eol-project/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..3f933f61 --- /dev/null +++ b/test-eol-project/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/array-union/index.js b/test-eol-project/node_modules/array-union/index.js new file mode 100644 index 00000000..e33f38a1 --- /dev/null +++ b/test-eol-project/node_modules/array-union/index.js @@ -0,0 +1,6 @@ +'use strict'; +var arrayUniq = require('array-uniq'); + +module.exports = function () { + return arrayUniq([].concat.apply([], arguments)); +}; diff --git a/test-eol-project/node_modules/array-union/license b/test-eol-project/node_modules/array-union/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/array-union/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/array-union/package.json b/test-eol-project/node_modules/array-union/package.json new file mode 100644 index 00000000..367c844b --- /dev/null +++ b/test-eol-project/node_modules/array-union/package.json @@ -0,0 +1,40 @@ +{ + "name": "array-union", + "version": "1.0.2", + "description": "Create an array of unique values, in order, from the input arrays", + "license": "MIT", + "repository": "sindresorhus/array-union", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "duplicate", + "remove", + "union", + "combine", + "merge" + ], + "dependencies": { + "array-uniq": "^1.0.1" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/test-eol-project/node_modules/array-union/readme.md b/test-eol-project/node_modules/array-union/readme.md new file mode 100644 index 00000000..ea472dd0 --- /dev/null +++ b/test-eol-project/node_modules/array-union/readme.md @@ -0,0 +1,28 @@ +# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) + +> Create an array of unique values, in order, from the input arrays + + +## Install + +``` +$ npm install --save array-union +``` + + +## Usage + +```js +const arrayUnion = require('array-union'); + +arrayUnion([1, 1, 2, 3], [2, 3]); +//=> [1, 2, 3] + +arrayUnion(['foo', 'foo', 'bar'], ['foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/test-eol-project/node_modules/array-uniq/index.js b/test-eol-project/node_modules/array-uniq/index.js new file mode 100644 index 00000000..edd09f81 --- /dev/null +++ b/test-eol-project/node_modules/array-uniq/index.js @@ -0,0 +1,62 @@ +'use strict'; + +// there's 3 implementations written in increasing order of efficiency + +// 1 - no Set type is defined +function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; +} + +// 2 - a simple Set type is defined +function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + + return false; + }); +} + +// 3 - a standard Set type is defined and it has a forEach method +function uniqSetWithForEach(arr) { + var ret = []; + + (new Set(arr)).forEach(function (el) { + ret.push(el); + }); + + return ret; +} + +// V8 currently has a broken implementation +// https://github.com/joyent/node/issues/8449 +function doesForEachActuallyWork() { + var ret = false; + + (new Set([true])).forEach(function (el) { + ret = el; + }); + + return ret === true; +} + +if ('Set' in global) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } +} else { + module.exports = uniqNoSet; +} diff --git a/test-eol-project/node_modules/array-uniq/license b/test-eol-project/node_modules/array-uniq/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/array-uniq/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/array-uniq/package.json b/test-eol-project/node_modules/array-uniq/package.json new file mode 100644 index 00000000..106a3a95 --- /dev/null +++ b/test-eol-project/node_modules/array-uniq/package.json @@ -0,0 +1,37 @@ +{ + "name": "array-uniq", + "version": "1.0.3", + "description": "Create an array without duplicates", + "license": "MIT", + "repository": "sindresorhus/array-uniq", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "es6", + "duplicate", + "remove" + ], + "devDependencies": { + "ava": "*", + "es6-set": "^0.1.0", + "require-uncached": "^1.0.2", + "xo": "*" + } +} diff --git a/test-eol-project/node_modules/array-uniq/readme.md b/test-eol-project/node_modules/array-uniq/readme.md new file mode 100644 index 00000000..f0bd98c4 --- /dev/null +++ b/test-eol-project/node_modules/array-uniq/readme.md @@ -0,0 +1,30 @@ +# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) + +> Create an array without duplicates + +It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). + + +## Install + +``` +$ npm install --save array-uniq +``` + + +## Usage + +```js +const arrayUniq = require('array-uniq'); + +arrayUniq([1, 1, 2, 3, 3]); +//=> [1, 2, 3] + +arrayUniq(['foo', 'foo', 'bar', 'foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/test-eol-project/node_modules/arrify/index.js b/test-eol-project/node_modules/arrify/index.js new file mode 100644 index 00000000..2a2fdeeb --- /dev/null +++ b/test-eol-project/node_modules/arrify/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (val) { + if (val === null || val === undefined) { + return []; + } + + return Array.isArray(val) ? val : [val]; +}; diff --git a/test-eol-project/node_modules/arrify/license b/test-eol-project/node_modules/arrify/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/arrify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/arrify/package.json b/test-eol-project/node_modules/arrify/package.json new file mode 100644 index 00000000..1e63e597 --- /dev/null +++ b/test-eol-project/node_modules/arrify/package.json @@ -0,0 +1,33 @@ +{ + "name": "arrify", + "version": "1.0.1", + "description": "Convert a value to an array", + "license": "MIT", + "repository": "sindresorhus/arrify", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "array", + "arr", + "arrify", + "arrayify", + "convert", + "value" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/test-eol-project/node_modules/arrify/readme.md b/test-eol-project/node_modules/arrify/readme.md new file mode 100644 index 00000000..183d0757 --- /dev/null +++ b/test-eol-project/node_modules/arrify/readme.md @@ -0,0 +1,36 @@ +# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) + +> Convert a value to an array + + +## Install + +``` +$ npm install --save arrify +``` + + +## Usage + +```js +const arrify = require('arrify'); + +arrify('unicorn'); +//=> ['unicorn'] + +arrify(['unicorn']); +//=> ['unicorn'] + +arrify(null); +//=> [] + +arrify(undefined); +//=> [] +``` + +*Supplying `null` or `undefined` results in an empty array.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/asn1/Jenkinsfile b/test-eol-project/node_modules/asn1/Jenkinsfile new file mode 100644 index 00000000..d1b45937 --- /dev/null +++ b/test-eol-project/node_modules/asn1/Jenkinsfile @@ -0,0 +1,65 @@ +@Library('jenkins-joylib@v1.0.8') _ + +pipeline { + + agent none + + options { + buildDiscarder(logRotator(numToKeepStr: '45')) + timestamps() + } + + stages { + stage('top') { + parallel { + stage('v4-zone') { + agent { + label joyCommonLabels(image_ver: '15.4.1') + } + tools { + nodejs 'sdcnode-v4-zone' + } + stages { + stage('check') { + steps{ + sh('make check') + } + } + stage('test') { + steps{ + sh('make test') + } + } + } + } + + stage('v6-zone64') { + agent { + label joyCommonLabels(image_ver: '18.4.0') + } + tools { + nodejs 'sdcnode-v6-zone64' + } + stages { + stage('check') { + steps{ + sh('make check') + } + } + stage('test') { + steps{ + sh('make test') + } + } + } + } + } + } + } + + post { + always { + joySlackNotifications() + } + } +} diff --git a/test-eol-project/node_modules/asn1/LICENSE b/test-eol-project/node_modules/asn1/LICENSE new file mode 100644 index 00000000..9b5dcdb7 --- /dev/null +++ b/test-eol-project/node_modules/asn1/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Mark Cavage, 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/test-eol-project/node_modules/asn1/README.md b/test-eol-project/node_modules/asn1/README.md new file mode 100644 index 00000000..2208210a --- /dev/null +++ b/test-eol-project/node_modules/asn1/README.md @@ -0,0 +1,50 @@ +node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. +Currently BER encoding is supported; at some point I'll likely have to do DER. + +## Usage + +Mostly, if you're *actually* needing to read and write ASN.1, you probably don't +need this readme to explain what and why. If you have no idea what ASN.1 is, +see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +The source is pretty much self-explanatory, and has read/write methods for the +common types out there. + +### Decoding + +The following reads an ASN.1 sequence with a boolean. + + var Ber = require('asn1').Ber; + + var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff])); + + reader.readSequence(); + console.log('Sequence len: ' + reader.length); + if (reader.peek() === Ber.Boolean) + console.log(reader.readBoolean()); + +### Encoding + +The following generates the same payload as above. + + var Ber = require('asn1').Ber; + + var writer = new Ber.Writer(); + + writer.startSequence(); + writer.writeBoolean(true); + writer.endSequence(); + + console.log(writer.buffer); + +## Installation + + npm install asn1 + +## License + +MIT. + +## Bugs + +See . diff --git a/test-eol-project/node_modules/asn1/lib/ber/errors.js b/test-eol-project/node_modules/asn1/lib/ber/errors.js new file mode 100644 index 00000000..4557b8ae --- /dev/null +++ b/test-eol-project/node_modules/asn1/lib/ber/errors.js @@ -0,0 +1,13 @@ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + + newInvalidAsn1Error: function (msg) { + var e = new Error(); + e.name = 'InvalidAsn1Error'; + e.message = msg || ''; + return e; + } + +}; diff --git a/test-eol-project/node_modules/asn1/lib/ber/index.js b/test-eol-project/node_modules/asn1/lib/ber/index.js new file mode 100644 index 00000000..387d1326 --- /dev/null +++ b/test-eol-project/node_modules/asn1/lib/ber/index.js @@ -0,0 +1,27 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var errors = require('./errors'); +var types = require('./types'); + +var Reader = require('./reader'); +var Writer = require('./writer'); + + +// --- Exports + +module.exports = { + + Reader: Reader, + + Writer: Writer + +}; + +for (var t in types) { + if (types.hasOwnProperty(t)) + module.exports[t] = types[t]; +} +for (var e in errors) { + if (errors.hasOwnProperty(e)) + module.exports[e] = errors[e]; +} diff --git a/test-eol-project/node_modules/asn1/lib/ber/reader.js b/test-eol-project/node_modules/asn1/lib/ber/reader.js new file mode 100644 index 00000000..8a7e4ca0 --- /dev/null +++ b/test-eol-project/node_modules/asn1/lib/ber/reader.js @@ -0,0 +1,262 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var Buffer = require('safer-buffer').Buffer; + +var ASN1 = require('./types'); +var errors = require('./errors'); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + + + +// --- API + +function Reader(data) { + if (!data || !Buffer.isBuffer(data)) + throw new TypeError('data must be a node Buffer'); + + this._buf = data; + this._size = data.length; + + // These hold the "current" state + this._len = 0; + this._offset = 0; +} + +Object.defineProperty(Reader.prototype, 'length', { + enumerable: true, + get: function () { return (this._len); } +}); + +Object.defineProperty(Reader.prototype, 'offset', { + enumerable: true, + get: function () { return (this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'remain', { + get: function () { return (this._size - this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'buffer', { + get: function () { return (this._buf.slice(this._offset)); } +}); + + +/** + * Reads a single byte and advances offset; you can pass in `true` to make this + * a "peek" operation (i.e., get the byte, but don't advance the offset). + * + * @param {Boolean} peek true means don't move offset. + * @return {Number} the next byte, null if not enough data. + */ +Reader.prototype.readByte = function (peek) { + if (this._size - this._offset < 1) + return null; + + var b = this._buf[this._offset] & 0xff; + + if (!peek) + this._offset += 1; + + return b; +}; + + +Reader.prototype.peek = function () { + return this.readByte(true); +}; + + +/** + * Reads a (potentially) variable length off the BER buffer. This call is + * not really meant to be called directly, as callers have to manipulate + * the internal buffer afterwards. + * + * As a result of this call, you can call `Reader.length`, until the + * next thing called that does a readLength. + * + * @return {Number} the amount of offset to advance the buffer. + * @throws {InvalidAsn1Error} on bad ASN.1 + */ +Reader.prototype.readLength = function (offset) { + if (offset === undefined) + offset = this._offset; + + if (offset >= this._size) + return null; + + var lenB = this._buf[offset++] & 0xff; + if (lenB === null) + return null; + + if ((lenB & 0x80) === 0x80) { + lenB &= 0x7f; + + if (lenB === 0) + throw newInvalidAsn1Error('Indefinite length not supported'); + + if (lenB > 4) + throw newInvalidAsn1Error('encoding too long'); + + if (this._size - offset < lenB) + return null; + + this._len = 0; + for (var i = 0; i < lenB; i++) + this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + + } else { + // Wasn't a variable length + this._len = lenB; + } + + return offset; +}; + + +/** + * Parses the next sequence in this BER buffer. + * + * To get the length of the sequence, call `Reader.length`. + * + * @return {Number} the sequence's tag. + */ +Reader.prototype.readSequence = function (tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== undefined && tag !== seq) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + seq.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + this._offset = o; + return seq; +}; + + +Reader.prototype.readInt = function () { + return this._readTag(ASN1.Integer); +}; + + +Reader.prototype.readBoolean = function () { + return (this._readTag(ASN1.Boolean) === 0 ? false : true); +}; + + +Reader.prototype.readEnumeration = function () { + return this._readTag(ASN1.Enumeration); +}; + + +Reader.prototype.readString = function (tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; + + var b = this.peek(); + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + + if (o === null) + return null; + + if (this.length > this._size - o) + return null; + + this._offset = o; + + if (this.length === 0) + return retbuf ? Buffer.alloc(0) : ''; + + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; + + return retbuf ? str : str.toString('utf8'); +}; + +Reader.prototype.readOID = function (tag) { + if (!tag) + tag = ASN1.OID; + + var b = this.readString(tag, true); + if (b === null) + return null; + + var values = []; + var value = 0; + + for (var i = 0; i < b.length; i++) { + var byte = b[i] & 0xff; + + value <<= 7; + value += byte & 0x7f; + if ((byte & 0x80) === 0) { + values.push(value); + value = 0; + } + } + + value = values.shift(); + values.unshift(value % 40); + values.unshift((value / 40) >> 0); + + return values.join('.'); +}; + + +Reader.prototype._readTag = function (tag) { + assert.ok(tag !== undefined); + + var b = this.peek(); + + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + if (this.length > 4) + throw newInvalidAsn1Error('Integer too long: ' + this.length); + + if (this.length > this._size - o) + return null; + this._offset = o; + + var fb = this._buf[this._offset]; + var value = 0; + + for (var i = 0; i < this.length; i++) { + value <<= 8; + value |= (this._buf[this._offset++] & 0xff); + } + + if ((fb & 0x80) === 0x80 && i !== 4) + value -= (1 << (i * 8)); + + return value >> 0; +}; + + + +// --- Exported API + +module.exports = Reader; diff --git a/test-eol-project/node_modules/asn1/lib/ber/types.js b/test-eol-project/node_modules/asn1/lib/ber/types.js new file mode 100644 index 00000000..8aea0001 --- /dev/null +++ b/test-eol-project/node_modules/asn1/lib/ber/types.js @@ -0,0 +1,36 @@ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + EOC: 0, + Boolean: 1, + Integer: 2, + BitString: 3, + OctetString: 4, + Null: 5, + OID: 6, + ObjectDescriptor: 7, + External: 8, + Real: 9, // float + Enumeration: 10, + PDV: 11, + Utf8String: 12, + RelativeOID: 13, + Sequence: 16, + Set: 17, + NumericString: 18, + PrintableString: 19, + T61String: 20, + VideotexString: 21, + IA5String: 22, + UTCTime: 23, + GeneralizedTime: 24, + GraphicString: 25, + VisibleString: 26, + GeneralString: 28, + UniversalString: 29, + CharacterString: 30, + BMPString: 31, + Constructor: 32, + Context: 128 +}; diff --git a/test-eol-project/node_modules/asn1/lib/ber/writer.js b/test-eol-project/node_modules/asn1/lib/ber/writer.js new file mode 100644 index 00000000..3515acf7 --- /dev/null +++ b/test-eol-project/node_modules/asn1/lib/ber/writer.js @@ -0,0 +1,317 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var Buffer = require('safer-buffer').Buffer; +var ASN1 = require('./types'); +var errors = require('./errors'); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + +var DEFAULT_OPTS = { + size: 1024, + growthFactor: 8 +}; + + +// --- Helpers + +function merge(from, to) { + assert.ok(from); + assert.equal(typeof (from), 'object'); + assert.ok(to); + assert.equal(typeof (to), 'object'); + + var keys = Object.getOwnPropertyNames(from); + keys.forEach(function (key) { + if (to[key]) + return; + + var value = Object.getOwnPropertyDescriptor(from, key); + Object.defineProperty(to, key, value); + }); + + return to; +} + + + +// --- API + +function Writer(options) { + options = merge(DEFAULT_OPTS, options || {}); + + this._buf = Buffer.alloc(options.size || 1024); + this._size = this._buf.length; + this._offset = 0; + this._options = options; + + // A list of offsets in the buffer where we need to insert + // sequence tag/len pairs. + this._seq = []; +} + +Object.defineProperty(Writer.prototype, 'buffer', { + get: function () { + if (this._seq.length) + throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + + return (this._buf.slice(0, this._offset)); + } +}); + +Writer.prototype.writeByte = function (b) { + if (typeof (b) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(1); + this._buf[this._offset++] = b; +}; + + +Writer.prototype.writeInt = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Integer; + + var sz = 4; + + while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && + (sz > 1)) { + sz--; + i <<= 8; + } + + if (sz > 4) + throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); + + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; + + while (sz-- > 0) { + this._buf[this._offset++] = ((i & 0xff000000) >>> 24); + i <<= 8; + } + +}; + + +Writer.prototype.writeNull = function () { + this.writeByte(ASN1.Null); + this.writeByte(0x00); +}; + + +Writer.prototype.writeEnumeration = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Enumeration; + + return this.writeInt(i, tag); +}; + + +Writer.prototype.writeBoolean = function (b, tag) { + if (typeof (b) !== 'boolean') + throw new TypeError('argument must be a Boolean'); + if (typeof (tag) !== 'number') + tag = ASN1.Boolean; + + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 0x01; + this._buf[this._offset++] = b ? 0xff : 0x00; +}; + + +Writer.prototype.writeString = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); + if (typeof (tag) !== 'number') + tag = ASN1.OctetString; + + var len = Buffer.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; + } +}; + + +Writer.prototype.writeBuffer = function (buf, tag) { + if (typeof (tag) !== 'number') + throw new TypeError('tag must be a number'); + if (!Buffer.isBuffer(buf)) + throw new TypeError('argument must be a buffer'); + + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; +}; + + +Writer.prototype.writeStringArray = function (strings) { + if ((!strings instanceof Array)) + throw new TypeError('argument must be an Array[String]'); + + var self = this; + strings.forEach(function (s) { + self.writeString(s); + }); +}; + +// This is really to solve DER cases, but whatever for now +Writer.prototype.writeOID = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string'); + if (typeof (tag) !== 'number') + tag = ASN1.OID; + + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error('argument is not a valid OID string'); + + function encodeOctet(bytes, octet) { + if (octet < 128) { + bytes.push(octet); + } else if (octet < 16384) { + bytes.push((octet >>> 7) | 0x80); + bytes.push(octet & 0x7F); + } else if (octet < 2097152) { + bytes.push((octet >>> 14) | 0x80); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else if (octet < 268435456) { + bytes.push((octet >>> 21) | 0x80); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else { + bytes.push(((octet >>> 28) | 0x80) & 0xFF); + bytes.push(((octet >>> 21) | 0x80) & 0xFF); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } + } + + var tmp = s.split('.'); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function (b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + + var self = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function (b) { + self.writeByte(b); + }); +}; + + +Writer.prototype.writeLength = function (len) { + if (typeof (len) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(4); + + if (len <= 0x7f) { + this._buf[this._offset++] = len; + } else if (len <= 0xff) { + this._buf[this._offset++] = 0x81; + this._buf[this._offset++] = len; + } else if (len <= 0xffff) { + this._buf[this._offset++] = 0x82; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 0xffffff) { + this._buf[this._offset++] = 0x83; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else { + throw newInvalidAsn1Error('Length too long (> 4 bytes)'); + } +}; + +Writer.prototype.startSequence = function (tag) { + if (typeof (tag) !== 'number') + tag = ASN1.Sequence | ASN1.Constructor; + + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; +}; + + +Writer.prototype.endSequence = function () { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + + if (len <= 0x7f) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 0xff) { + this._shift(start, len, -1); + this._buf[seq] = 0x81; + this._buf[seq + 1] = len; + } else if (len <= 0xffff) { + this._buf[seq] = 0x82; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 0xffffff) { + this._shift(start, len, 1); + this._buf[seq] = 0x83; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; + } else { + throw newInvalidAsn1Error('Sequence too long'); + } +}; + + +Writer.prototype._shift = function (start, len, shift) { + assert.ok(start !== undefined); + assert.ok(len !== undefined); + assert.ok(shift); + + this._buf.copy(this._buf, start + shift, start, start + len); + this._offset += shift; +}; + +Writer.prototype._ensure = function (len) { + assert.ok(len); + + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + + var buf = Buffer.alloc(sz); + + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; + } +}; + + + +// --- Exported API + +module.exports = Writer; diff --git a/test-eol-project/node_modules/asn1/lib/index.js b/test-eol-project/node_modules/asn1/lib/index.js new file mode 100644 index 00000000..ede3ab23 --- /dev/null +++ b/test-eol-project/node_modules/asn1/lib/index.js @@ -0,0 +1,20 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +// If you have no idea what ASN.1 or BER is, see this: +// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +var Ber = require('./ber/index'); + + + +// --- Exported API + +module.exports = { + + Ber: Ber, + + BerReader: Ber.Reader, + + BerWriter: Ber.Writer + +}; diff --git a/test-eol-project/node_modules/asn1/package.json b/test-eol-project/node_modules/asn1/package.json new file mode 100644 index 00000000..e31cce5e --- /dev/null +++ b/test-eol-project/node_modules/asn1/package.json @@ -0,0 +1,31 @@ +{ + "author": "Joyent (joyent.com)", + "contributors": [ + "Mark Cavage ", + "David Gwynne ", + "Yunong Xiao ", + "Alex Wilson " + ], + "name": "asn1", + "description": "Contains parsers and serializers for ASN.1 (currently BER only)", + "version": "0.2.6", + "repository": { + "type": "git", + "url": "https://github.com/joyent/node-asn1.git" + }, + "main": "lib/index.js", + "dependencies": { + "safer-buffer": "~2.1.0" + }, + "devDependencies": { + "istanbul": "^0.3.6", + "faucet": "0.0.1", + "tape": "^3.5.0", + "eslint": "2.13.1", + "eslint-plugin-joyent": "~1.3.0" + }, + "scripts": { + "test": "./node_modules/.bin/tape ./test/ber/*.test.js" + }, + "license": "MIT" +} diff --git a/test-eol-project/node_modules/assert-plus/AUTHORS b/test-eol-project/node_modules/assert-plus/AUTHORS new file mode 100644 index 00000000..1923524f --- /dev/null +++ b/test-eol-project/node_modules/assert-plus/AUTHORS @@ -0,0 +1,6 @@ +Dave Eddy +Fred Kuo +Lars-Magnus Skog +Mark Cavage +Patrick Mooney +Rob Gulewich diff --git a/test-eol-project/node_modules/assert-plus/CHANGES.md b/test-eol-project/node_modules/assert-plus/CHANGES.md new file mode 100644 index 00000000..57d92bfd --- /dev/null +++ b/test-eol-project/node_modules/assert-plus/CHANGES.md @@ -0,0 +1,14 @@ +# assert-plus Changelog + +## 1.0.0 + +- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input +- Add assert.finite check. Previous assert.number callers should use this if + they expect Infinity inputs to throw. + +## 0.2.0 + +- Fix `assert.object(null)` so it throws +- Fix optional/arrayOf exports for non-type-of asserts +- Add optiona/arrayOf exports for Stream/Date/Regex/uuid +- Add basic unit test coverage diff --git a/test-eol-project/node_modules/assert-plus/README.md b/test-eol-project/node_modules/assert-plus/README.md new file mode 100644 index 00000000..ec200d16 --- /dev/null +++ b/test-eol-project/node_modules/assert-plus/README.md @@ -0,0 +1,162 @@ +# assert-plus + +This library is a super small wrapper over node's assert module that has two +things: (1) the ability to disable assertions with the environment variable +NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like +`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks +like this: + +```javascript + var assert = require('assert-plus'); + + function fooAccount(options, callback) { + assert.object(options, 'options'); + assert.number(options.id, 'options.id'); + assert.bool(options.isManager, 'options.isManager'); + assert.string(options.name, 'options.name'); + assert.arrayOfString(options.email, 'options.email'); + assert.func(callback, 'callback'); + + // Do stuff + callback(null, {}); + } +``` + +# API + +All methods that *aren't* part of node's core assert API are simply assumed to +take an argument, and then a string 'name' that's not a message; `AssertionError` +will be thrown if the assertion fails with a message like: + + AssertionError: foo (string) is required + at test (/home/mark/work/foo/foo.js:3:9) + at Object. (/home/mark/work/foo/foo.js:15:1) + at Module._compile (module.js:446:26) + at Object..js (module.js:464:10) + at Module.load (module.js:353:31) + at Function._load (module.js:311:12) + at Array.0 (module.js:484:10) + at EventEmitter._tickCallback (node.js:190:38) + +from: + +```javascript + function test(foo) { + assert.string(foo, 'foo'); + } +``` + +There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: + +```javascript + function test(foo) { + assert.arrayOfString(foo, 'foo'); + } +``` + +You can assert IFF an argument is not `undefined` (i.e., an optional arg): + +```javascript + assert.optionalString(foo, 'foo'); +``` + +Lastly, you can opt-out of assertion checking altogether by setting the +environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have +lots of assertions, and don't want to pay `typeof ()` taxes to v8 in +production. Be advised: The standard functions re-exported from `assert` are +also disabled in assert-plus if NDEBUG is specified. Using them directly from +the `assert` module avoids this behavior. + +The complete list of APIs is: + +* assert.array +* assert.bool +* assert.buffer +* assert.func +* assert.number +* assert.finite +* assert.object +* assert.string +* assert.stream +* assert.date +* assert.regexp +* assert.uuid +* assert.arrayOfArray +* assert.arrayOfBool +* assert.arrayOfBuffer +* assert.arrayOfFunc +* assert.arrayOfNumber +* assert.arrayOfFinite +* assert.arrayOfObject +* assert.arrayOfString +* assert.arrayOfStream +* assert.arrayOfDate +* assert.arrayOfRegexp +* assert.arrayOfUuid +* assert.optionalArray +* assert.optionalBool +* assert.optionalBuffer +* assert.optionalFunc +* assert.optionalNumber +* assert.optionalFinite +* assert.optionalObject +* assert.optionalString +* assert.optionalStream +* assert.optionalDate +* assert.optionalRegexp +* assert.optionalUuid +* assert.optionalArrayOfArray +* assert.optionalArrayOfBool +* assert.optionalArrayOfBuffer +* assert.optionalArrayOfFunc +* assert.optionalArrayOfNumber +* assert.optionalArrayOfFinite +* assert.optionalArrayOfObject +* assert.optionalArrayOfString +* assert.optionalArrayOfStream +* assert.optionalArrayOfDate +* assert.optionalArrayOfRegexp +* assert.optionalArrayOfUuid +* assert.AssertionError +* assert.fail +* assert.ok +* assert.equal +* assert.notEqual +* assert.deepEqual +* assert.notDeepEqual +* assert.strictEqual +* assert.notStrictEqual +* assert.throws +* assert.doesNotThrow +* assert.ifError + +# Installation + + npm install assert-plus + +## License + +The MIT License (MIT) +Copyright (c) 2012 Mark Cavage + +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. + +## Bugs + +See . diff --git a/test-eol-project/node_modules/assert-plus/assert.js b/test-eol-project/node_modules/assert-plus/assert.js new file mode 100644 index 00000000..26f944ee --- /dev/null +++ b/test-eol-project/node_modules/assert-plus/assert.js @@ -0,0 +1,211 @@ +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = require('assert'); +var Stream = require('stream').Stream; +var util = require('util'); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/test-eol-project/node_modules/assert-plus/package.json b/test-eol-project/node_modules/assert-plus/package.json new file mode 100644 index 00000000..40d6a5cd --- /dev/null +++ b/test-eol-project/node_modules/assert-plus/package.json @@ -0,0 +1,23 @@ +{ + "author": "Mark Cavage ", + "name": "assert-plus", + "description": "Extra assertions on top of node's assert module", + "version": "1.0.0", + "license": "MIT", + "main": "./assert.js", + "devDependencies": { + "tape": "4.2.2", + "faucet": "0.0.1" + }, + "optionalDependencies": {}, + "scripts": { + "test": "./node_modules/.bin/tape tests/*.js | ./node_modules/.bin/faucet" + }, + "repository": { + "type": "git", + "url": "https://github.com/mcavage/node-assert-plus.git" + }, + "engines": { + "node": ">=0.8" + } +} diff --git a/test-eol-project/node_modules/asynckit/LICENSE b/test-eol-project/node_modules/asynckit/LICENSE new file mode 100644 index 00000000..c9eca5dd --- /dev/null +++ b/test-eol-project/node_modules/asynckit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +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/test-eol-project/node_modules/asynckit/README.md b/test-eol-project/node_modules/asynckit/README.md new file mode 100644 index 00000000..ddcc7e6b --- /dev/null +++ b/test-eol-project/node_modules/asynckit/README.md @@ -0,0 +1,233 @@ +# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) + +Minimal async jobs utility library, with streams support. + +[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) + +[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) +[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) +[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) + + + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/test-eol-project/node_modules/asynckit/bench.js b/test-eol-project/node_modules/asynckit/bench.js new file mode 100644 index 00000000..c612f1a5 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/test-eol-project/node_modules/asynckit/index.js b/test-eol-project/node_modules/asynckit/index.js new file mode 100644 index 00000000..455f9454 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/test-eol-project/node_modules/asynckit/lib/abort.js b/test-eol-project/node_modules/asynckit/lib/abort.js new file mode 100644 index 00000000..114367e5 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/test-eol-project/node_modules/asynckit/lib/async.js b/test-eol-project/node_modules/asynckit/lib/async.js new file mode 100644 index 00000000..7f1288a4 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/test-eol-project/node_modules/asynckit/lib/defer.js b/test-eol-project/node_modules/asynckit/lib/defer.js new file mode 100644 index 00000000..b67110c7 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/test-eol-project/node_modules/asynckit/lib/iterate.js b/test-eol-project/node_modules/asynckit/lib/iterate.js new file mode 100644 index 00000000..5d2839a5 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_asynckit.js b/test-eol-project/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 00000000..78ad240f --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_parallel.js b/test-eol-project/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 00000000..5d2929f7 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_serial.js b/test-eol-project/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 00000000..78226982 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js b/test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 00000000..3de89c47 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/test-eol-project/node_modules/asynckit/lib/state.js b/test-eol-project/node_modules/asynckit/lib/state.js new file mode 100644 index 00000000..cbea7ad8 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/test-eol-project/node_modules/asynckit/lib/streamify.js b/test-eol-project/node_modules/asynckit/lib/streamify.js new file mode 100644 index 00000000..f56a1c92 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/test-eol-project/node_modules/asynckit/lib/terminator.js b/test-eol-project/node_modules/asynckit/lib/terminator.js new file mode 100644 index 00000000..d6eb9921 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/test-eol-project/node_modules/asynckit/package.json b/test-eol-project/node_modules/asynckit/package.json new file mode 100644 index 00000000..51147d65 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/package.json @@ -0,0 +1,63 @@ +{ + "name": "asynckit", + "version": "0.4.0", + "description": "Minimal async jobs utility library, with streams support", + "main": "index.js", + "scripts": { + "clean": "rimraf coverage", + "lint": "eslint *.js lib/*.js test/*.js", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js", + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "debug": "tape test/test-*.js" + }, + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "author": "Alex Indigo ", + "license": "MIT", + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "homepage": "https://github.com/alexindigo/asynckit#readme", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "dependencies": {} +} diff --git a/test-eol-project/node_modules/asynckit/parallel.js b/test-eol-project/node_modules/asynckit/parallel.js new file mode 100644 index 00000000..3c50344d --- /dev/null +++ b/test-eol-project/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/test-eol-project/node_modules/asynckit/serial.js b/test-eol-project/node_modules/asynckit/serial.js new file mode 100644 index 00000000..6cd949a6 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/test-eol-project/node_modules/asynckit/serialOrdered.js b/test-eol-project/node_modules/asynckit/serialOrdered.js new file mode 100644 index 00000000..607eafea --- /dev/null +++ b/test-eol-project/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/test-eol-project/node_modules/asynckit/stream.js b/test-eol-project/node_modules/asynckit/stream.js new file mode 100644 index 00000000..d43465f9 --- /dev/null +++ b/test-eol-project/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/test-eol-project/node_modules/aws-sign2/LICENSE b/test-eol-project/node_modules/aws-sign2/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/test-eol-project/node_modules/aws-sign2/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/test-eol-project/node_modules/aws-sign2/README.md b/test-eol-project/node_modules/aws-sign2/README.md new file mode 100644 index 00000000..763564e0 --- /dev/null +++ b/test-eol-project/node_modules/aws-sign2/README.md @@ -0,0 +1,4 @@ +aws-sign +======== + +AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/test-eol-project/node_modules/aws-sign2/index.js b/test-eol-project/node_modules/aws-sign2/index.js new file mode 100644 index 00000000..fb35f6db --- /dev/null +++ b/test-eol-project/node_modules/aws-sign2/index.js @@ -0,0 +1,212 @@ + +/*! + * Copyright 2010 LearnBoost + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Module dependencies. + */ + +var crypto = require('crypto') + , parse = require('url').parse + ; + +/** + * Valid keys. + */ + +var keys = + [ 'acl' + , 'location' + , 'logging' + , 'notification' + , 'partNumber' + , 'policy' + , 'requestPayment' + , 'torrent' + , 'uploadId' + , 'uploads' + , 'versionId' + , 'versioning' + , 'versions' + , 'website' + ] + +/** + * Return an "Authorization" header value with the given `options` + * in the form of "AWS :" + * + * @param {Object} options + * @return {String} + * @api private + */ + +function authorization (options) { + return 'AWS ' + options.key + ':' + sign(options) +} + +module.exports = authorization +module.exports.authorization = authorization + +/** + * Simple HMAC-SHA1 Wrapper + * + * @param {Object} options + * @return {String} + * @api private + */ + +function hmacSha1 (options) { + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +} + +module.exports.hmacSha1 = hmacSha1 + +/** + * Create a base64 sha1 HMAC for `options`. + * + * @param {Object} options + * @return {String} + * @api private + */ + +function sign (options) { + options.message = stringToSign(options) + return hmacSha1(options) +} +module.exports.sign = sign + +/** + * Create a base64 sha1 HMAC for `options`. + * + * Specifically to be used with S3 presigned URLs + * + * @param {Object} options + * @return {String} + * @api private + */ + +function signQuery (options) { + options.message = queryStringToSign(options) + return hmacSha1(options) +} +module.exports.signQuery= signQuery + +/** + * Return a string for sign() with the given `options`. + * + * Spec: + * + * \n + * \n + * \n + * \n + * [headers\n] + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function stringToSign (options) { + var headers = options.amazonHeaders || '' + if (headers) headers += '\n' + var r = + [ options.verb + , options.md5 + , options.contentType + , options.date ? options.date.toUTCString() : '' + , headers + options.resource + ] + return r.join('\n') +} +module.exports.stringToSign = stringToSign + +/** + * Return a string for sign() with the given `options`, but is meant exclusively + * for S3 presigned URLs + * + * Spec: + * + * \n + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function queryStringToSign (options){ + return 'GET\n\n\n' + options.date + '\n' + options.resource +} +module.exports.queryStringToSign = queryStringToSign + +/** + * Perform the following: + * + * - ignore non-amazon headers + * - lowercase fields + * - sort lexicographically + * - trim whitespace between ":" + * - join with newline + * + * @param {Object} headers + * @return {String} + * @api private + */ + +function canonicalizeHeaders (headers) { + var buf = [] + , fields = Object.keys(headers) + ; + for (var i = 0, len = fields.length; i < len; ++i) { + var field = fields[i] + , val = headers[field] + , field = field.toLowerCase() + ; + if (0 !== field.indexOf('x-amz')) continue + buf.push(field + ':' + val) + } + return buf.sort().join('\n') +} +module.exports.canonicalizeHeaders = canonicalizeHeaders + +/** + * Perform the following: + * + * - ignore non sub-resources + * - sort lexicographically + * + * @param {String} resource + * @return {String} + * @api private + */ + +function canonicalizeResource (resource) { + var url = parse(resource, true) + , path = url.pathname + , buf = [] + ; + + Object.keys(url.query).forEach(function(key){ + if (!~keys.indexOf(key)) return + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) + buf.push(key + val) + }) + + return path + (buf.length ? '?' + buf.sort().join('&') : '') +} +module.exports.canonicalizeResource = canonicalizeResource diff --git a/test-eol-project/node_modules/aws-sign2/package.json b/test-eol-project/node_modules/aws-sign2/package.json new file mode 100644 index 00000000..4c3d57e5 --- /dev/null +++ b/test-eol-project/node_modules/aws-sign2/package.json @@ -0,0 +1,17 @@ +{ + "author": "Mikeal Rogers (http://www.futurealoof.com)", + "name": "aws-sign2", + "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", + "version": "0.7.0", + "repository": { + "url": "https://github.com/mikeal/aws-sign" + }, + "license": "Apache-2.0", + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + } +} diff --git a/test-eol-project/node_modules/aws4/LICENSE b/test-eol-project/node_modules/aws4/LICENSE new file mode 100644 index 00000000..4f321e59 --- /dev/null +++ b/test-eol-project/node_modules/aws4/LICENSE @@ -0,0 +1,19 @@ +Copyright 2013 Michael Hart (michael.hart.au@gmail.com) + +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/test-eol-project/node_modules/aws4/README.md b/test-eol-project/node_modules/aws4/README.md new file mode 100644 index 00000000..fa4d5946 --- /dev/null +++ b/test-eol-project/node_modules/aws4/README.md @@ -0,0 +1,211 @@ +aws4 +---- + +A small utility to sign [vanilla Node.js http(s)](https://nodejs.org/api/http.html) request options using Amazon's +[AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). + +If you want to sign and send AWS requests using [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), then check out [aws4fetch](https://github.com/mhart/aws4fetch) – otherwise you can also bundle this library for use [in older browsers](./browser). + +The only AWS service I know of that *doesn't* support v4 is +[SimpleDB](https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) +(it only supports [AWS Signature Version 2](https://github.com/mhart/aws2)). + +It also provides defaults for a number of core AWS headers and +request parameters, making it very easy to query AWS services, or +build out a fully-featured AWS library. + +Example +------- + +```javascript +var https = require('https') +var aws4 = require('aws4') + +// to illustrate usage, we'll create a utility function to request and pipe to stdout +function request(opts) { https.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') } + +// aws4 will sign an options object as you'd pass to http.request, with an AWS service and region +var opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object', service: 's3', region: 'us-west-1' } + +// aws4.sign() will sign and modify these options, ready to pass to http.request +aws4.sign(opts, { accessKeyId: '', secretAccessKey: '' }) + +// or it can get credentials from process.env.AWS_ACCESS_KEY_ID, etc +aws4.sign(opts) + +// for most AWS services, aws4 can figure out the service and region if you pass a host +opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object' } + +// usually it will add/modify request headers, but you can also sign the query: +opts = { host: 'my-bucket.s3.amazonaws.com', path: '/?X-Amz-Expires=12345', signQuery: true } + +// and for services with simple hosts, aws4 can infer the host from service and region: +opts = { service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues' } + +// and if you're using us-east-1, it's the default: +opts = { service: 'sqs', path: '/?Action=ListQueues' } + +aws4.sign(opts) +console.log(opts) +/* +{ + host: 'sqs.us-east-1.amazonaws.com', + path: '/?Action=ListQueues', + headers: { + Host: 'sqs.us-east-1.amazonaws.com', + 'X-Amz-Date': '20121226T061030Z', + Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' + } +} +*/ + +// we can now use this to query AWS +request(opts) +/* + + +... +*/ + +// aws4 can infer the HTTP method if a body is passed in +// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' +request(aws4.sign({ service: 'iam', body: 'Action=ListGroups&Version=2010-05-08' })) +/* + +... +*/ + +// you can specify any custom option or header as per usual +request(aws4.sign({ + service: 'dynamodb', + region: 'ap-southeast-2', + method: 'POST', + path: '/', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'DynamoDB_20120810.ListTables' + }, + body: '{}' +})) +/* +{"TableNames":[]} +... +*/ + +// you can also specify extra headers to ignore during signing +request(aws4.sign({ + host: '07tjusf2h91cunochc.us-east-1.aoss.amazonaws.com', + method: 'PUT', + path: '/my-index', + body: '{"mappings":{}}', + headers: { + 'Content-Type': 'application/json', + 'X-Amz-Content-Sha256': 'UNSIGNED-PAYLOAD' + }, + extraHeadersToIgnore: { + 'content-length': true + } +})) + +// and headers to include that would normally be ignored +request(aws4.sign({ + service: 'mycustomservice', + path: '/whatever', + headers: { + 'Range': 'bytes=200-1000, 2000-6576, 19000-' + }, + extraHeadersToInclude: { + 'range': true + } +})) + + +// The raw RequestSigner can be used to generate CodeCommit Git passwords +var signer = new aws4.RequestSigner({ + service: 'codecommit', + host: 'git-codecommit.us-east-1.amazonaws.com', + method: 'GIT', + path: '/v1/repos/MyAwesomeRepo', +}) +var password = signer.getDateTime() + 'Z' + signer.signature() + +// see example.js for examples with other services +``` + +API +--- + +### aws4.sign(requestOptions, [credentials]) + +Calculates and populates any necessary AWS headers and/or request +options on `requestOptions`. Returns `requestOptions` as a convenience for chaining. + +`requestOptions` is an object holding the same options that the Node.js +[http.request](https://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) +function takes. + +The following properties of `requestOptions` are used in the signing or +populated if they don't already exist: + +- `hostname` or `host` (will try to be determined from `service` and `region` if not given) +- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) +- `path` (will use `'/'` if not given) +- `body` (will use `''` if not given) +- `service` (will try to be calculated from `hostname` or `host` if not given) +- `region` (will try to be calculated from `hostname` or `host` or use `'us-east-1'` if not given) +- `signQuery` (to sign the query instead of adding an `Authorization` header, defaults to false) +- `extraHeadersToIgnore` (an object with lowercase header keys to ignore when signing, eg `{ 'content-length': true }`) +- `extraHeadersToInclude` (an object with lowercase header keys to include when signing, overriding any ignores) +- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) +- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` + if not given and there is a `body`) +- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) + +Your AWS credentials (which can be found in your +[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) +can be specified in one of two ways: + +- As the second argument, like this: + +```javascript +aws4.sign(requestOptions, { + secretAccessKey: "", + accessKeyId: "", + sessionToken: "" +}) +``` + +- From `process.env`, such as this: + +``` +export AWS_ACCESS_KEY_ID="" +export AWS_SECRET_ACCESS_KEY="" +export AWS_SESSION_TOKEN="" +``` + +(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) + +The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing +with [IAM STS temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html). + +Installation +------------ + +With [npm](https://www.npmjs.com/) do: + +``` +npm install aws4 +``` + +Can also be used [in the browser](./browser). + +Thanks +------ + +Thanks to [@jed](https://github.com/jed) for his +[dynamo-client](https://github.com/jed/dynamo-client) lib where I first +committed and subsequently extracted this code. + +Also thanks to the +[official Node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving +me a start on implementing the v4 signature. diff --git a/test-eol-project/node_modules/aws4/aws4.js b/test-eol-project/node_modules/aws4/aws4.js new file mode 100644 index 00000000..6a96676f --- /dev/null +++ b/test-eol-project/node_modules/aws4/aws4.js @@ -0,0 +1,383 @@ +var aws4 = exports, + url = require('url'), + querystring = require('querystring'), + crypto = require('crypto'), + lru = require('./lru'), + credentialsCache = lru(1000) + +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +function encodeRfc3986Full(str) { + return encodeRfc3986(encodeURIComponent(str)) +} + +// A bit of a combination of: +// https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59 +// https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199 +// https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34 +var HEADERS_TO_IGNORE = { + 'authorization': true, + 'connection': true, + 'x-amzn-trace-id': true, + 'user-agent': true, + 'expect': true, + 'presigned-expires': true, + 'range': true, +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = Object.assign({}, (request.headers || {})), + hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost() + + // If a port is specified explicitly, use it as is + if (request.port) + headers.Host += ':' + request.port + } + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host + + this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' + + this.extraHeadersToIgnore = request.extraHeadersToIgnore || Object.create(null) + this.extraHeadersToInclude = request.extraHeadersToInclude || Object.create(null) +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]{1,63})\.(?:([^\.]{0,63})\.)?amazonaws\.com(\.cn)?$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es' || hostParts[1] === 'aoss') + hostParts = hostParts.reverse() + + if (hostParts[1] == 's3') { + hostParts[0] = 's3' + hostParts[1] = 'us-east-1' + } else { + for (var i = 0; i < 2; i++) { + if (/^s3-/.test(hostParts[i])) { + hostParts[1] = hostParts[i].slice(3) + hostParts[0] = 's3' + break + } + } + } + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : '.' + this.region, + subdomain = this.service === 'ses' ? 'email' : this.service + return subdomain + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + + } else { + + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date'] || headers['x-amz-date']) + this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] + else + headers['X-Amz-Date'] = this.getDateTime() + } + + delete headers.Authorization + delete headers.authorization + } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() + } else { + this.request.headers.Authorization = this.authHeader() + } + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + + // Remove the trailing 'Z' on the timestamp string for CodeCommit git access + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) + } + return this.datetime +} + +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} + +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} + +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} + +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + headers = this.request.headers, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash + + if (this.service === 's3' && this.request.signQuery) { + bodyHash = 'UNSIGNED-PAYLOAD' + } else if (this.isCodeCommitGit) { + bodyHash = '' + } else { + bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || + hash(this.request.body || '', 'hex') + } + + if (query) { + var reducedQuery = Object.keys(query).reduce(function(obj, key) { + if (!key) return obj + obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key]) + return obj + }, {}) + var encodedQueryPieces = [] + Object.keys(reducedQuery).sort().forEach(function(key) { + if (!Array.isArray(reducedQuery[key])) { + encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) + } else { + reducedQuery[key].map(encodeRfc3986Full).sort() + .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) + } + }) + queryStr = encodedQueryPieces.join('&') + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + pathStr = pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) + path.push(encodeRfc3986Full(piece)) + } + return path + }, []).join('/') + if (pathStr[0] !== '/') pathStr = '/' + pathStr + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') + } + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') +} + +RequestSigner.prototype.filterHeaders = function() { + var headers = this.request.headers, + extraHeadersToInclude = this.extraHeadersToInclude, + extraHeadersToIgnore = this.extraHeadersToIgnore + this.filteredHeaders = Object.keys(headers) + .map(function(key) { return [key.toLowerCase(), headers[key]] }) + .filter(function(entry) { + return extraHeadersToInclude[entry[0]] || + (HEADERS_TO_IGNORE[entry[0]] == null && !extraHeadersToIgnore[entry[0]]) + }) + .sort(function(a, b) { return a[0] < b[0] ? -1 : 1 }) +} + +RequestSigner.prototype.canonicalHeaders = function() { + if (!this.filteredHeaders) this.filterHeaders() + + return this.filteredHeaders.map(function(entry) { + return entry[0] + ':' + entry[1].toString().trim().replace(/\s+/g, ' ') + }).join('\n') +} + +RequestSigner.prototype.signedHeaders = function() { + if (!this.filteredHeaders) this.filterHeaders() + + return this.filteredHeaders.map(function(entry) { return entry[0] }).join(';') +} + +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} + +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, + } +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/' + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { + path = encodeURI(decodeURI(path)) + } + + var queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) + } + + this.parsedPath = { + path: path, + query: query, + } +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() +} diff --git a/test-eol-project/node_modules/aws4/lru.js b/test-eol-project/node_modules/aws4/lru.js new file mode 100644 index 00000000..333f66a4 --- /dev/null +++ b/test-eol-project/node_modules/aws4/lru.js @@ -0,0 +1,96 @@ +module.exports = function(size) { + return new LruCache(size) +} + +function LruCache(size) { + this.capacity = size | 0 + this.map = Object.create(null) + this.list = new DoublyLinkedList() +} + +LruCache.prototype.get = function(key) { + var node = this.map[key] + if (node == null) return undefined + this.used(node) + return node.val +} + +LruCache.prototype.set = function(key, val) { + var node = this.map[key] + if (node != null) { + node.val = val + } else { + if (!this.capacity) this.prune() + if (!this.capacity) return false + node = new DoublyLinkedNode(key, val) + this.map[key] = node + this.capacity-- + } + this.used(node) + return true +} + +LruCache.prototype.used = function(node) { + this.list.moveToFront(node) +} + +LruCache.prototype.prune = function() { + var node = this.list.pop() + if (node != null) { + delete this.map[node.key] + this.capacity++ + } +} + + +function DoublyLinkedList() { + this.firstNode = null + this.lastNode = null +} + +DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return + + this.remove(node) + + if (this.firstNode == null) { + this.firstNode = node + this.lastNode = node + node.prev = null + node.next = null + } else { + node.prev = null + node.next = this.firstNode + node.next.prev = node + this.firstNode = node + } +} + +DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode + if (lastNode != null) { + this.remove(lastNode) + } + return lastNode +} + +DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next + } else if (node.prev != null) { + node.prev.next = node.next + } + if (this.lastNode == node) { + this.lastNode = node.prev + } else if (node.next != null) { + node.next.prev = node.prev + } +} + + +function DoublyLinkedNode(key, val) { + this.key = key + this.val = val + this.prev = null + this.next = null +} diff --git a/test-eol-project/node_modules/aws4/package.json b/test-eol-project/node_modules/aws4/package.json new file mode 100644 index 00000000..fbd6195e --- /dev/null +++ b/test-eol-project/node_modules/aws4/package.json @@ -0,0 +1,21 @@ +{ + "name": "aws4", + "version": "1.13.2", + "description": "Signs and prepares requests using AWS Signature Version 4", + "author": "Michael Hart (https://github.com/mhart)", + "license": "MIT", + "repository": "github:mhart/aws4", + "main": "aws4.js", + "files": [ + "aws4.js", + "lru.js" + ], + "scripts": { + "test": "mocha ./test/fast.js -R list", + "integration": "node ./test/slow.js" + }, + "devDependencies": { + "mocha": "^10.7.3", + "should": "^13.2.3" + } +} diff --git a/test-eol-project/node_modules/balanced-match/.github/FUNDING.yml b/test-eol-project/node_modules/balanced-match/.github/FUNDING.yml new file mode 100644 index 00000000..cea8b16e --- /dev/null +++ b/test-eol-project/node_modules/balanced-match/.github/FUNDING.yml @@ -0,0 +1,2 @@ +tidelift: "npm/balanced-match" +patreon: juliangruber diff --git a/test-eol-project/node_modules/balanced-match/LICENSE.md b/test-eol-project/node_modules/balanced-match/LICENSE.md new file mode 100644 index 00000000..2cdc8e41 --- /dev/null +++ b/test-eol-project/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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/test-eol-project/node_modules/balanced-match/README.md b/test-eol-project/node_modules/balanced-match/README.md new file mode 100644 index 00000000..d2a48b6b --- /dev/null +++ b/test-eol-project/node_modules/balanced-match/README.md @@ -0,0 +1,97 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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/test-eol-project/node_modules/balanced-match/index.js b/test-eol-project/node_modules/balanced-match/index.js new file mode 100644 index 00000000..c67a6460 --- /dev/null +++ b/test-eol-project/node_modules/balanced-match/index.js @@ -0,0 +1,62 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/test-eol-project/node_modules/balanced-match/package.json b/test-eol-project/node_modules/balanced-match/package.json new file mode 100644 index 00000000..ce6073e0 --- /dev/null +++ b/test-eol-project/node_modules/balanced-match/package.json @@ -0,0 +1,48 @@ +{ + "name": "balanced-match", + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "version": "1.0.2", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "main": "index.js", + "scripts": { + "test": "tape test/test.js", + "bench": "matcha test/bench.js" + }, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md new file mode 100644 index 00000000..401d34ed --- /dev/null +++ b/test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing + +This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new +changes. Anyone can submit changes. To get started, see the [cr.joyent.us user +guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). +This repo does not use GitHub pull requests. + +See the [Joyent Engineering +Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general +best practices expected in this repository. + +If you're changing something non-trivial or user-facing, you may want to submit +an issue first. diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/LICENSE b/test-eol-project/node_modules/bcrypt-pbkdf/LICENSE new file mode 100644 index 00000000..fc58d2ab --- /dev/null +++ b/test-eol-project/node_modules/bcrypt-pbkdf/LICENSE @@ -0,0 +1,66 @@ +The Blowfish portions are under the following license: + +Blowfish block cipher for OpenBSD +Copyright 1997 Niels Provos +All rights reserved. + +Implementation advice by David Mazieres . + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The bcrypt_pbkdf portions are under the following license: + +Copyright (c) 2013 Ted Unangst + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +Performance improvements (Javascript-specific): + +Copyright 2016, Joyent Inc +Author: Alex Wilson + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/README.md b/test-eol-project/node_modules/bcrypt-pbkdf/README.md new file mode 100644 index 00000000..7551f335 --- /dev/null +++ b/test-eol-project/node_modules/bcrypt-pbkdf/README.md @@ -0,0 +1,45 @@ +Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified +version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), +with some minor performance improvements. The code is copied verbatim (and +un-styled) from Devi's work. + +This product includes software developed by Niels Provos. + +## API + +### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` + +Derive a cryptographic key of arbitrary length from a given password and salt, +using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and +SHA-512. + +See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for +further information. + +Parameters: + + * `pass`, a Uint8Array of length `passlen` + * `passlen`, an integer Number + * `salt`, a Uint8Array of length `saltlen` + * `saltlen`, an integer Number + * `key`, a Uint8Array of length `keylen`, will be filled with output + * `keylen`, an integer Number + * `rounds`, an integer Number, number of rounds of the PBKDF to run + +### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` + +Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as +part of the inner round function in the PBKDF. + +Parameters: + + * `sha2pass`, a Uint8Array of length 64 + * `sha2salt`, a Uint8Array of length 64 + * `out`, a Uint8Array of length 32, will be filled with output + +## License + +This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`. +As a result, it retains the original copyright and license. The two files are +under slightly different (but compatible) licenses, and are here combined in +one file. For each of the full license texts see `LICENSE`. diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/index.js b/test-eol-project/node_modules/bcrypt-pbkdf/index.js new file mode 100644 index 00000000..b1b5ad4b --- /dev/null +++ b/test-eol-project/node_modules/bcrypt-pbkdf/index.js @@ -0,0 +1,556 @@ +'use strict'; + +var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; + +/* + * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a + * result, it retains the original copyright and license. The two files are + * under slightly different (but compatible) licenses, and are here combined in + * one file. + * + * Credit for the actual porting work goes to: + * Devi Mandiri + */ + +/* + * The Blowfish portions are under the following license: + * + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * The bcrypt_pbkdf portions are under the following license: + * + * Copyright (c) 2013 Ted Unangst + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Performance improvements (Javascript-specific): + * + * Copyright 2016, Joyent Inc + * Author: Alex Wilson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +// Ported from OpenBSD bcrypt_pbkdf.c v1.9 + +var BLF_J = 0; + +var Blowfish = function() { + this.S = [ + new Uint32Array([ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), + new Uint32Array([ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), + new Uint32Array([ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), + new Uint32Array([ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) + ]; + this.P = new Uint32Array([ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b]); +}; + +function F(S, x8, i) { + return (((S[0][x8[i+3]] + + S[1][x8[i+2]]) ^ + S[2][x8[i+1]]) + + S[3][x8[i]]); +}; + +Blowfish.prototype.encipher = function(x, x8) { + if (x8 === undefined) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i = 1; i < 16; i += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; +}; + +Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i = 16; i > 0; i -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; +}; + +function stream2word(data, databytes){ + var i, temp = 0; + for (i = 0; i < 4; i++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = (temp << 8) | data[BLF_J]; + } + return temp; +}; + +Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i, k; + var d8 = new Uint8Array(d.buffer); + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + BLF_J = 0; + + for (i = 0; i < 18; i += 2) { + this.encipher(d, d8); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } +}; + +Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i, k; + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + + for (i = 0, BLF_J = 0; i < 18; i += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } + BLF_J = 0; +}; + +Blowfish.prototype.enc = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.encipher(data.subarray(i*2)); + } +}; + +Blowfish.prototype.dec = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.decipher(data.subarray(i*2)); + } +}; + +var BCRYPT_BLOCKS = 8, + BCRYPT_HASHSIZE = 32; + +function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), + cdata = new Uint32Array(BCRYPT_BLOCKS), i, + ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, + 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, + 105,116,101]); //"OxychromaticBlowfishSwatDynamite" + + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i = 0; i < 64; i++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = stream2word(ciphertext, ciphertext.byteLength); + for (i = 0; i < 64; i++) + state.enc(cdata, cdata.byteLength / 8); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + out[4*i+3] = cdata[i] >>> 24; + out[4*i+2] = cdata[i] >>> 16; + out[4*i+1] = cdata[i] >>> 8; + out[4*i+0] = cdata[i]; + } +}; + +function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), + sha2salt = new Uint8Array(64), + out = new Uint8Array(BCRYPT_HASHSIZE), + tmpout = new Uint8Array(BCRYPT_HASHSIZE), + countsalt = new Uint8Array(saltlen+4), + i, j, amt, stride, dest, count, + origkeylen = keylen; + + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || + keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) + return -1; + + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + + for (i = 0; i < saltlen; i++) + countsalt[i] = salt[i]; + + crypto_hash_sha512(sha2pass, pass, passlen); + + for (count = 1; keylen > 0; count++) { + countsalt[saltlen+0] = count >>> 24; + countsalt[saltlen+1] = count >>> 16; + countsalt[saltlen+2] = count >>> 8; + countsalt[saltlen+3] = count; + + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i = out.byteLength; i--;) + out[i] = tmpout[i]; + + for (i = 1; i < rounds; i++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + + amt = Math.min(amt, keylen); + for (i = 0; i < amt; i++) { + dest = i * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i]; + } + keylen -= i; + } + + return 0; +}; + +module.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf +}; diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/package.json b/test-eol-project/node_modules/bcrypt-pbkdf/package.json new file mode 100644 index 00000000..e93a969b --- /dev/null +++ b/test-eol-project/node_modules/bcrypt-pbkdf/package.json @@ -0,0 +1,15 @@ +{ + "name": "bcrypt-pbkdf", + "version": "1.0.2", + "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-bcrypt-pbkdf.git" + }, + "main": "index.js", + "dependencies": { + "tweetnacl": "^0.14.3" + }, + "devDependencies": {}, + "license": "BSD-3-Clause" +} diff --git a/test-eol-project/node_modules/blocking-proxy/.clang-format b/test-eol-project/node_modules/blocking-proxy/.clang-format new file mode 100644 index 00000000..8d1c3c31 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/.clang-format @@ -0,0 +1,3 @@ +Language: JavaScript +BasedOnStyle: Google +ColumnLimit: 100 diff --git a/test-eol-project/node_modules/blocking-proxy/.nvmrc b/test-eol-project/node_modules/blocking-proxy/.nvmrc new file mode 100644 index 00000000..b3d791d7 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/.nvmrc @@ -0,0 +1 @@ +4.6 diff --git a/test-eol-project/node_modules/blocking-proxy/LICENSE b/test-eol-project/node_modules/blocking-proxy/LICENSE new file mode 100644 index 00000000..de60465e --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Angular + +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/test-eol-project/node_modules/blocking-proxy/README.md b/test-eol-project/node_modules/blocking-proxy/README.md new file mode 100644 index 00000000..2acfaf54 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/README.md @@ -0,0 +1,90 @@ +# Blocking Proxy [![Build Status](https://circleci.com/gh/angular/blocking-proxy.svg?style=shield)](https://circleci.com/gh/angular/blocking-proxy) + +Blocking Proxy is a tool for adding functionality to WebDriver-based +tests. It sits between your tests and the Selenium Server. For each +WebDriver command, it runs a set of 'barriers' that will block +forwarding the command to the Selenium server until some condition +is met. + +Because it interacts with WebDriver at the network level, Blocking Proxy can be +used regardless of which language your tests are written in. See [the example](https://github.com/angular/blocking-proxy/blob/master/examples/README.md) +for a demonstration of using Blocking Proxy with WebDriver tests written in Python. + +Although Blocking Proxy can handle multiple WebDriver sessions, it can not yet handle +multiple concurrent clients. Thus, it's recommended to start a separate instance +for each test process. + +# Usage + +Blocking Proxy can be installed globally with `npm install -g blocking-proxy`. +You can also use it by cloning this repo and running these commands: + +``` +npm install +webdriver-manager update && webdriver-manager start (in another terminal) +node ./built/lib/bin.js --seleniumAddress http://localhost:4444/wd/hub +``` + +# Features + +## Wait for Angular + +When testing an Angular application, Blocking Proxy can block webdriver commands +until Angular's change detection is finished, and thus make your tests less flaky. + +## Highlight Delay + +If `--highlightDelay ` is specified, Blocking Proxy will wait for +the specified delay (in milliseconds) before executing click commands or sending +keys. It will also highlight the element that is the target of the command. + +Here's an example of highlight delay in action: + +![Highlight Delay](http://i.giphy.com/jg7B2HHPIkwak.gif) + +## WebDriver logging + +When `--logDir ` is set, Blocking Proxy will create a readable log of +WebDriver commands at the specified path. The log will look something like this: + +``` +20:08:14.830 | 834ms | 37f13c | NewSession + {"browserName":"chrome"} +20:08:15.674 | 4ms | 37f13c | SetTimeouts +20:08:15.681 | 578ms | 37f13c | Go http://localhost:8081/ng1/#/interaction +20:08:16.300 | 438ms | 37f13c | FindElement + Using css selector \'.invalid\' + ERROR: no such element +``` +Each line shows the command that was executed and how long it took. For some +commands, extra data or the response from WebDriver will be shown on following +lines. + +# Development + +## Formatting and lint + +`gulp format` runs clang-format. `gulp lint` validates format and runs tslint. + +## Running tests + +Unit tests live in `spec/unit` and can be run with `npm test`. Run `npm run test:auto` to automatically watch for changes and run unit tests. + +## Running e2e tests + +Start webdriver + + webdriver-manager update + webdriver-manager start + +in another terminal, start the testapp + + npm run testapp + +Start the proxy with + + npm start + +in yet another terminal, run the tests + + npm run test:e2e diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts new file mode 100644 index 00000000..e505b54d --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts @@ -0,0 +1,44 @@ +import { SimpleWebDriverClient } from './simple_webdriver_client'; +import { WebDriverCommand } from './webdriver_commands'; +import { WebDriverLogger } from './webdriver_logger'; +import { WebDriverBarrier } from './webdriver_proxy'; +/** + * A barrier that uses Angular's Testability API to block commands until the application is stable. + */ +export declare class AngularWaitBarrier implements WebDriverBarrier { + private client; + rootSelector: string; + enabled: boolean; + logger: WebDriverLogger; + constructor(client: SimpleWebDriverClient); + /** + * A CSS Selector for a DOM element within your Angular application. + * BlockingProxy will attempt to automatically find your application, but it is + * necessary to set rootElement in certain cases. + * + * In Angular 1, BlockingProxy will use the element your app bootstrapped to by + * default. If that doesn't work, it will then search for hooks in `body` or + * `ng-app` elements (details here: https://git.io/v1b2r). + * + * In later versions of Angular, BlockingProxy will try to hook into all angular + * apps on the page. Use rootElement to limit the scope of which apps + * BlockingProxy waits for and searches within. + * + * @param rootSelector A selector for the root element of the Angular app. + */ + setRootSelector(selector: string): void; + private waitForAngularData(); + /** + * Turn on WebDriver logging. + * + * @param logDir The directory to create logs in. + */ + enableLogging(logDir: string): void; + /** + * Override the logger instance. Only used for testing. + */ + setLogger(logger: WebDriverLogger): void; + private sendRequestToStabilize(command); + private shouldStabilize(command); + onCommand(command: WebDriverCommand): Promise; +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js new file mode 100644 index 00000000..8f84f3cd --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js @@ -0,0 +1,108 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const webdriver_logger_1 = require("./webdriver_logger"); +const angularWaits = require('./client_scripts/wait.js'); +/** + * A barrier that uses Angular's Testability API to block commands until the application is stable. + */ +class AngularWaitBarrier { + constructor(client) { + this.client = client; + this.enabled = true; + this.rootSelector = ''; + } + /** + * A CSS Selector for a DOM element within your Angular application. + * BlockingProxy will attempt to automatically find your application, but it is + * necessary to set rootElement in certain cases. + * + * In Angular 1, BlockingProxy will use the element your app bootstrapped to by + * default. If that doesn't work, it will then search for hooks in `body` or + * `ng-app` elements (details here: https://git.io/v1b2r). + * + * In later versions of Angular, BlockingProxy will try to hook into all angular + * apps on the page. Use rootElement to limit the scope of which apps + * BlockingProxy waits for and searches within. + * + * @param rootSelector A selector for the root element of the Angular app. + */ + setRootSelector(selector) { + this.rootSelector = selector; + } + waitForAngularData() { + return JSON.stringify({ + script: 'return (' + angularWaits.NG_WAIT_FN + ').apply(null, arguments);', + args: [this.rootSelector] + }); + } + /** + * Turn on WebDriver logging. + * + * @param logDir The directory to create logs in. + */ + enableLogging(logDir) { + if (!this.logger) { + this.logger = new webdriver_logger_1.WebDriverLogger(); + } + this.logger.setLogDir(logDir); + } + /** + * Override the logger instance. Only used for testing. + */ + setLogger(logger) { + this.logger = logger; + } + sendRequestToStabilize(command) { + return this.client.executeAsync(command.sessionId, this.waitForAngularData()).then((value) => { + // waitForAngular only returns a value if there was an error + // in the browser. + if (value) { + throw new Error('Error from waitForAngular: ' + value); + } + }); + } + shouldStabilize(command) { + const url = command.url; + if (!this.enabled) { + return false; + } + // TODO - should this implement some state, and be smart about whether + // stabilization is necessary or not? Would that be as simple as GET/POST? + // e.g. two gets in a row don't require a wait btwn. + // + // See https://code.google.com/p/selenium/wiki/JsonWireProtocol for + // descriptions of the paths. + // We shouldn't stabilize if we haven't loaded the page yet. + const parts = url.split('/'); + if (parts.length < 4) { + return false; + } + const commandsToWaitFor = [ + 'executeScript', 'screenshot', 'source', 'title', 'element', 'elements', 'execute', 'keys', + 'moveto', 'click', 'buttondown', 'buttonup', 'doubleclick', 'touch', 'get' + ]; + if (commandsToWaitFor.indexOf(parts[3]) != -1) { + return true; + } + return false; + } + onCommand(command) { + if (this.logger) { + command.on('data', () => { + this.logger.logWebDriverCommand(command); + }); + } + if (this.shouldStabilize(command)) { + const started = Date.now(); + return this.sendRequestToStabilize(command).then(() => { + const ended = Date.now(); + if (this.logger) { + this.logger.logEvent('Waiting for Angular', command.sessionId, (ended - started)); + } + }); + } + return Promise.resolve(null); + } +} +exports.AngularWaitBarrier = AngularWaitBarrier; +//# sourceMappingURL=angular_wait_barrier.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map new file mode 100644 index 00000000..69fafa1f --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map @@ -0,0 +1 @@ +{"version":3,"file":"angular_wait_barrier.js","sourceRoot":"","sources":["../../lib/angular_wait_barrier.ts"],"names":[],"mappings":";;AAEA,yDAAmD;AAGnD,MAAM,YAAY,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAEzD;;GAEG;AACH;IAME,YAAoB,MAA6B;QAA7B,WAAM,GAAN,MAAM,CAAuB;QAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,QAAgB;QAC9B,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IAC/B,CAAC;IAEO,kBAAkB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CAAC;gBACpF,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAjHD,gDAiHC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js new file mode 100755 index 00000000..3ee7eb7e --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js @@ -0,0 +1,28 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const blockingproxy_1 = require("./blockingproxy"); +const config_1 = require("./config"); +/** + * Starts up a proxy server which modifies calls between the test process + * and the selenium server. + */ +const argv = config_1.processArgs(process.argv.slice(2)); +if (argv.help) { + config_1.printHelp(); + process.exit(0); +} +const proxy = new blockingproxy_1.BlockingProxy(argv.seleniumAddress, parseInt(argv.highlightDelay)); +if (argv.logDir) { + proxy.enableLogging(argv.logDir); +} +let port = proxy.listen(argv.port); +console.log(`Listening on :${port}`); +if (argv.fork) { + process.send({ ready: true, port: port }); + process.on('disconnect', function () { + console.log('parent exited, quitting'); + process.exit(); + }); +} +//# sourceMappingURL=bin.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map new file mode 100644 index 00000000..b2adc103 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../lib/bin.ts"],"names":[],"mappings":";;;AAEA,mDAA8C;AAC9C,qCAAgD;AAEhD;;;GAGG;AAEH,MAAM,IAAI,GAAG,oBAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACd,kBAAS,EAAE,CAAC;IACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,KAAK,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;AACrF,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AACD,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;AACrC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE;QACvB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts new file mode 100644 index 00000000..329e16cb --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts @@ -0,0 +1,41 @@ +/// +import * as http from 'http'; +import { AngularWaitBarrier } from './angular_wait_barrier'; +import { HighlightDelayBarrier } from './highlight_delay_barrier'; +import { WebDriverLogger } from './webdriver_logger'; +export declare const BP_PREFIX = "bpproxy"; +/** + * The stability proxy is an http server responsible for intercepting + * JSON webdriver commands. It keeps track of whether the page under test + * needs to wait for page stability, and initiates a wait if so. + */ +export declare class BlockingProxy { + server: http.Server; + logger: WebDriverLogger; + waitBarrier: AngularWaitBarrier; + highlightBarrier: HighlightDelayBarrier; + private proxy; + constructor(seleniumAddress: string, highlightDelay?: number); + /** + * This command is for the proxy server, not to be forwarded to Selenium. + */ + static isProxyCommand(commandPath: string): boolean; + /** + * Turn on WebDriver logging. + * + * @param logDir The directory to create logs in. + */ + enableLogging(logDir: string): void; + /** + * Override the logger instance. Only used for testing. + */ + setLogger(logger: WebDriverLogger): void; + /** + * Change the parameters used by the wait function. + */ + setWaitParams(rootEl: any): void; + handleProxyCommand(message: any, data: any, response: any): void; + requestListener(originalRequest: http.IncomingMessage, response: http.ServerResponse): void; + listen(port: number): number; + quit(): Promise<{}>; +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js new file mode 100644 index 00000000..b4945535 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js @@ -0,0 +1,119 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const angular_wait_barrier_1 = require("./angular_wait_barrier"); +const highlight_delay_barrier_1 = require("./highlight_delay_barrier"); +const simple_webdriver_client_1 = require("./simple_webdriver_client"); +const webdriver_proxy_1 = require("./webdriver_proxy"); +exports.BP_PREFIX = 'bpproxy'; +/** + * The stability proxy is an http server responsible for intercepting + * JSON webdriver commands. It keeps track of whether the page under test + * needs to wait for page stability, and initiates a wait if so. + */ +class BlockingProxy { + constructor(seleniumAddress, highlightDelay = null) { + this.server = http.createServer(this.requestListener.bind(this)); + this.proxy = new webdriver_proxy_1.WebDriverProxy(seleniumAddress); + let client = new simple_webdriver_client_1.SimpleWebDriverClient(seleniumAddress); + this.waitBarrier = new angular_wait_barrier_1.AngularWaitBarrier(client); + this.highlightBarrier = new highlight_delay_barrier_1.HighlightDelayBarrier(client, highlightDelay); + this.proxy.addBarrier(this.waitBarrier); + this.proxy.addBarrier(this.highlightBarrier); + } + /** + * This command is for the proxy server, not to be forwarded to Selenium. + */ + static isProxyCommand(commandPath) { + return (commandPath.split('/')[1] === exports.BP_PREFIX); + } + /** + * Turn on WebDriver logging. + * + * @param logDir The directory to create logs in. + */ + enableLogging(logDir) { + this.waitBarrier.enableLogging(logDir); + } + /** + * Override the logger instance. Only used for testing. + */ + setLogger(logger) { + this.waitBarrier.setLogger(logger); + } + /** + * Change the parameters used by the wait function. + */ + setWaitParams(rootEl) { + this.waitBarrier.setRootSelector(rootEl); + } + handleProxyCommand(message, data, response) { + let command = message.url.split('/')[2]; + switch (command) { + case 'waitEnabled': + if (message.method === 'GET') { + response.writeHead(200); + response.write(JSON.stringify({ value: this.waitBarrier.enabled })); + response.end(); + } + else if (message.method === 'POST') { + response.writeHead(200); + this.waitBarrier.enabled = JSON.parse(data).value; + response.end(); + } + else { + response.writeHead(405); + response.write('Invalid method'); + response.end(); + } + break; + case 'waitParams': + if (message.method === 'GET') { + response.writeHead(200); + response.write(JSON.stringify({ rootSelector: this.waitBarrier.rootSelector })); + response.end(); + } + else if (message.method === 'POST') { + response.writeHead(200); + this.waitBarrier.rootSelector = JSON.parse(data).rootSelector; + response.end(); + } + else { + response.writeHead(405); + response.write('Invalid method'); + response.end(); + } + break; + default: + response.writeHead(404); + response.write('Unknown stabilizer proxy command'); + response.end(); + } + } + requestListener(originalRequest, response) { + if (BlockingProxy.isProxyCommand(originalRequest.url)) { + let commandData = ''; + originalRequest.on('data', (d) => { + commandData += d; + }); + originalRequest.on('end', () => { + this.handleProxyCommand(originalRequest, commandData, response); + }); + return; + } + // OK to ignore the promise returned by this. + this.proxy.handleRequest(originalRequest, response); + } + listen(port) { + this.server.listen(port); + let actualPort = this.server.address().port; + return actualPort; + } + quit() { + return new Promise((resolve) => { + this.server.close(resolve); + }); + } +} +exports.BlockingProxy = BlockingProxy; +//# sourceMappingURL=blockingproxy.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map new file mode 100644 index 00000000..5ede0bba --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"blockingproxy.js","sourceRoot":"","sources":["../../lib/blockingproxy.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,iEAA0D;AAC1D,uEAAgE;AAChE,uEAAgE;AAEhE,uDAAiD;AAEpC,QAAA,SAAS,GAAG,SAAS,CAAC;AAEnC;;;;GAIG;AACH;IAOE,YAAY,eAAuB,EAAE,iBAAyB,IAAI;QAChE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,GAAG,IAAI,gCAAc,CAAC,eAAe,CAAC,CAAC;QAEjD,IAAI,MAAM,GAAG,IAAI,+CAAqB,CAAC,eAAe,CAAC,CAAC;QACxD,IAAI,CAAC,WAAW,GAAG,IAAI,yCAAkB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,gBAAgB,GAAG,IAAI,+CAAqB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAC1E,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,WAAmB;QACvC,MAAM,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,iBAAS,CAAC,CAAC;IACnD,CAAC;IAED;;;;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,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;gBAC/B,WAAW,IAAI,CAAC,CAAC;YACnB,CAAC,CAAC,CAAC;YACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBAC7B,IAAI,CAAC,kBAAkB,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;YAClE,CAAC,CAAC,CAAC;YACH,MAAM,CAAC;QACT,CAAC;QAED,6CAA6C;QAC7C,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC;QAC5C,MAAM,CAAC,UAAU,CAAC;IACpB,CAAC;IAED,IAAI;QACF,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAnHD,sCAmHC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts new file mode 100644 index 00000000..1758880e --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts @@ -0,0 +1,20 @@ +export declare class BPClient { + hostname: string; + port: number; + constructor(bpUrlValue: string); + /** + * Toggle whether waiting for Angular is enabled. + * + * @param enabled Whether or not to enable waiting for angular. + * @returns {Promise} + */ + setWaitEnabled(enabled: boolean): Promise; + /** + * Set the selector used to find the root element of the Angular application to wait for. See + * AngularWaitBarrier for more details. + * + * @param selector A selector, or empty string to wait for all Angular apps. + */ + setWaitParams(rootSelector: string): Promise; + isWaitEnabled(): Promise<{}>; +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client.js b/test-eol-project/node_modules/blocking-proxy/built/lib/client.js new file mode 100644 index 00000000..e4ce2c49 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/client.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const url = require("url"); +const blockingproxy_1 = require("./blockingproxy"); +class BPClient { + constructor(bpUrlValue) { + let bpUrl = url.parse(bpUrlValue); + this.hostname = bpUrl.hostname; + this.port = parseInt(bpUrl.port); + } + /** + * Toggle whether waiting for Angular is enabled. + * + * @param enabled Whether or not to enable waiting for angular. + * @returns {Promise} + */ + setWaitEnabled(enabled) { + return new Promise((resolve, reject) => { + let options = { host: this.hostname, port: this.port, method: 'POST', path: `/${blockingproxy_1.BP_PREFIX}/waitEnabled` }; + let request = http.request(options, (response) => { + response.on('data', () => { }); + response.on('error', (err) => reject(err)); + response.on('end', () => { + resolve(); + }); + }); + request.write(JSON.stringify({ value: enabled })); + request.end(); + }); + } + /** + * Set the selector used to find the root element of the Angular application to wait for. See + * AngularWaitBarrier for more details. + * + * @param selector A selector, or empty string to wait for all Angular apps. + */ + setWaitParams(rootSelector) { + return new Promise((resolve, reject) => { + let options = { host: this.hostname, port: this.port, method: 'POST', path: `/${blockingproxy_1.BP_PREFIX}/waitParams` }; + let request = http.request(options, (response) => { + response.on('data', () => { }); + response.on('error', (err) => reject(err)); + response.on('end', () => { + resolve(); + }); + }); + request.write(JSON.stringify({ rootSelector: rootSelector })); + request.end(); + }); + } + isWaitEnabled() { + return new Promise((res) => { + let options = { host: this.hostname, port: this.port, path: `/${blockingproxy_1.BP_PREFIX}/waitEnabled` }; + http.get(options, (response) => { + let body = ''; + response.on('data', (data) => { + body += data; + }); + response.on('end', () => { + res(JSON.parse(body).value); + }); + }); + }); + } +} +exports.BPClient = BPClient; +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map new file mode 100644 index 00000000..bc6131d1 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,2BAA2B;AAC3B,mDAA0C;AAE1C;IAIE,YAAY,UAAkB;QAC5B,IAAI,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,OAAgB;QAC7B,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,OAAO,GACP,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,yBAAS,cAAc,EAAC,CAAC;YAE9F,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC/C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;gBAC9B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC3C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBACtB,OAAO,EAAE,CAAC;gBACZ,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YACH,OAAO,CAAC,KA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AC;YAExF,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC7B,IAAI,IAAI,GAAG,EAAE,CAAC;gBACd,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;oBAC3B,IAAI,IAAI,IAAI,CAAC;gBACf,CAAC,CAAC,CAAC;gBACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBACtB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvED,4BAuEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js b/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js new file mode 100644 index 00000000..b2432967 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js @@ -0,0 +1,29 @@ +/** + * Creates a floating translucent div at the specified location in order to highlight a particular + * element. Note that these scripts are run directly in the browser under test, so they need to + * be ES5 compatible and serializable. + */ +exports.HIGHLIGHT_FN = function(top, left, width, height) { + console.log('Highlighting at ', top, left, width, height); + var el = document.createElement('div'); + el.id = 'BP_ELEMENT_HIGHLIGHT__'; + document.body.appendChild(el); + el.style['position'] = 'absolute'; + el.style['background-color'] = 'lightblue'; + el.style['opacity'] = '0.7'; + el.style['top'] = top + 'px'; + el.style['left'] = left + 'px'; + el.style['width'] = width + 'px'; + el.style['height'] = height + 'px'; +}; + +/** + * Removes the highlight + */ +exports.REMOVE_HIGHLIGHT_FN = function() { + var el = document.getElementById('BP_ELEMENT_HIGHLIGHT__'); + if (el) { + el.parentElement.removeChild(el); + } +}; + diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js b/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js new file mode 100644 index 00000000..09e634d1 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js @@ -0,0 +1,180 @@ +/** + * Copied from Protractor 5.2.0 + * + * Wait until Angular has finished rendering and has + * no outstanding $http calls before continuing. The specific Angular app + * is determined by the rootSelector. + * + * Asynchronous. + * + * @param {string} rootSelector The selector housing an ng-app + * @param {function(string)} callback callback. If a failure occurs, it will + * be passed as a parameter. + */ +function waitForAngular(rootSelector, callback) { + + try { + // Wait for both angular1 testability and angular2 testability. + + var testCallback = callback; + + // Wait for angular1 testability first and run waitForAngular2 as a callback + var waitForAngular1 = function(callback) { + + if (window.angular) { + var hooks = getNg1Hooks(rootSelector); + if (!hooks){ + callback(); // not an angular1 app + } + else{ + if (hooks.$$testability) { + hooks.$$testability.whenStable(callback); + } else if (hooks.$injector) { + hooks.$injector.get('$browser') + .notifyWhenNoOutstandingRequests(callback); + } else if (!!rootSelector) { + throw new Error( + 'Could not automatically find injector on page: "' + + window.location.toString() + '". Consider using config.rootEl'); + } else { + throw new Error( + 'root element (' + rootSelector + ') has no injector.' + + ' this may mean it is not inside ng-app.'); + } + } + } + else {callback();} // not an angular1 app + }; + + // Wait for Angular2 testability and then run test callback + var waitForAngular2 = function() { + if (window.getAngularTestability) { + if (rootSelector) { + var testability = null; + var el = document.querySelector(rootSelector); + try{ + testability = window.getAngularTestability(el); + } + catch(e){} + if (testability) { + return testability.whenStable(testCallback); + } + } + + // Didn't specify root element or testability could not be found + // by rootSelector. This may happen in a hybrid app, which could have + // more than one root. + var testabilities = window.getAllAngularTestabilities(); + var count = testabilities.length; + + // No angular2 testability, this happens when + // going to a hybrid page and going back to a pure angular1 page + if (count === 0) { + return testCallback(); + } + + var decrement = function() { + count--; + if (count === 0) { + testCallback(); + } + }; + testabilities.forEach(function(testability) { + testability.whenStable(decrement); + }); + + } + else {testCallback();} // not an angular2 app + }; + + if (!(window.angular) && !(window.getAngularTestability)) { + // no testability hook + throw new Error( + 'both angularJS testability and angular testability are undefined.' + + ' This could be either ' + + 'because this is a non-angular page or because your test involves ' + + 'client-side navigation, which can interfere with Protractor\'s ' + + 'bootstrapping. See http://git.io/v4gXM for details'); + } else {waitForAngular1(waitForAngular2);} // Wait for angular1 and angular2 + // Testability hooks sequentially + + } catch (err) { + callback(err.message); + } + + }; + +/* Tries to find $$testability and possibly $injector for an ng1 app + * + * By default, doesn't care about $injector if it finds $$testability. However, + * these priorities can be reversed. + * + * @param {string=} selector The selector for the element with the injector. If + * falsy, tries a variety of methods to find an injector + * @param {boolean=} injectorPlease Prioritize finding an injector + * @return {$$testability?: Testability, $injector?: Injector} Returns whatever + * ng1 app hooks it finds + */ +function getNg1Hooks(selector, injectorPlease) { + function tryEl(el) { + try { + if (!injectorPlease && angular.getTestability) { + var $$testability = angular.getTestability(el); + if ($$testability) { + return {$$testability: $$testability}; + } + } else { + var $injector = angular.element(el).injector(); + if ($injector) { + return {$injector: $injector}; + } + } + } catch(err) {} + } + function trySelector(selector) { + var els = document.querySelectorAll(selector); + for (var i = 0; i < els.length; i++) { + var elHooks = tryEl(els[i]); + if (elHooks) { + return elHooks; + } + } + } + + if (selector) { + return trySelector(selector); + } else if (window.__TESTABILITY__NG1_APP_ROOT_INJECTOR__) { + var $injector = window.__TESTABILITY__NG1_APP_ROOT_INJECTOR__; + var $$testability = null; + try { + $$testability = $injector.get('$$testability'); + } catch (e) {} + return {$injector: $injector, $$testability: $$testability}; + } else { + return tryEl(document.body) || + trySelector('[ng-app]') || trySelector('[ng\\:app]') || + trySelector('[ng-controller]') || trySelector('[ng\\:controller]'); + } +} + +/* Wraps a function up into a string with its helper functions so that it can + * call those helper functions client side + * + * @param {function} fun The function to wrap up with its helpers + * @param {...function} The helper functions. Each function must be named + * + * @return {string} The string which, when executed, will invoke fun in such a + * way that it has access to its helper functions + */ +function wrapWithHelpers(fun) { + var helpers = Array.prototype.slice.call(arguments, 1); + if (!helpers.length) { + return fun; + } + var FunClass = Function; // Get the linter to allow this eval + return new FunClass( + helpers.join(';') + String.fromCharCode(59) + + ' return (' + fun.toString() + ').apply(this, arguments);'); +} + +exports.NG_WAIT_FN = wrapWithHelpers(waitForAngular, getNg1Hooks); diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts new file mode 100644 index 00000000..935b4846 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts @@ -0,0 +1,10 @@ +export interface Config { + help?: boolean; + fork?: boolean; + highlightDelay?: string; + seleniumAddress?: string; + logDir?: string; + port?: number; +} +export declare function processArgs(argv: string[]): Config; +export declare function printHelp(): void; diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/config.js b/test-eol-project/node_modules/blocking-proxy/built/lib/config.js new file mode 100644 index 00000000..b7cf659c --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/config.js @@ -0,0 +1,40 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const minimist = require("minimist"); +const opts = { + boolean: ['help', 'fork'], + string: ['port', 'seleniumAddress', 'highlightDelay', 'logDir'], + alias: { + help: ['h'], + port: ['p'], + seleniumAddress: ['s'], + }, + default: { + port: process.env.BP_PORT || 0, + seleniumAddress: process.env.BP_SELENIUM_ADDRESS || 'http://localhost:4444/wd/hub', + } +}; +function processArgs(argv) { + return minimist(argv, opts); +} +exports.processArgs = processArgs; +function printHelp() { + console.log(` +Usage: blocking-proxy + +Options: + --help, -h Show help. + --port, -p The port to listen on. If unset, will choose a random free port. + --fork Start in fork mode. BlockingProxy will use process.send() to communicate + with the parent process. + --selenumAddress, -s The address of the selenium remote server to proxy. + --highlightDelay If specified, will highlight elements before interacting with them and + wait the specified amount of time (in ms) before allowing WebDriver + to continue. + --logDir If specified, will create a log of WebDriver commands in this directory. + --rootElement Element housing ng-app, if not html or body. +`); +} +exports.printHelp = printHelp; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map new file mode 100644 index 00000000..3ae13c9e --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AAWrC,MAAM,IAAI,GAAkB;IAC1B,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,CAAC;IAC/D,KAAK,EAAE;QACL,IAAI,EAAE,CAAC,GAAG,CAAC;QACX,IAAI,EAAE,CAAC,GAAG,CAAC;QACX,eAAe,EAAE,CAAC,GAAG,CAAC;KACvB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC;QAC9B,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,8BAA8B;KACnF;CACF,CAAC;AAEF,qBAA4B,IAAc;IACxC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAW,CAAC;AACxC,CAAC;AAFD,kCAEC;AAED;IACE,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;CAcb,CAAC,CAAC;AACH,CAAC;AAhBD,8BAgBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts new file mode 100644 index 00000000..21808706 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts @@ -0,0 +1,18 @@ +import { SimpleWebDriverClient } from './simple_webdriver_client'; +import { WebDriverCommand } from './webdriver_commands'; +import { WebDriverBarrier } from './webdriver_proxy'; +/** + * A barrier that delays forwarding WebDriver commands that can affect the app (ie, clicks or + * sending text) for a fixed amount of time. During the delay, the element that's the target + * of the command will be highlighted by drawing a transparent div on top of it. + */ +export declare class HighlightDelayBarrier implements WebDriverBarrier { + private client; + delay: number; + constructor(client: SimpleWebDriverClient, delay: number); + private isHighlightCommand(command); + private highlightData(top, left, width, height); + private removeHighlightData(); + private sleep(delay); + onCommand(command: WebDriverCommand): Promise; +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js new file mode 100644 index 00000000..8df43c4c --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js @@ -0,0 +1,67 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const webdriver_commands_1 = require("./webdriver_commands"); +const HIGHLIGHT_COMMAND = [webdriver_commands_1.CommandName.ElementClick, webdriver_commands_1.CommandName.ElementSendKeys, webdriver_commands_1.CommandName.ElementClear]; +let clientScripts = require('./client_scripts/highlight.js'); +/** + * A barrier that delays forwarding WebDriver commands that can affect the app (ie, clicks or + * sending text) for a fixed amount of time. During the delay, the element that's the target + * of the command will be highlighted by drawing a transparent div on top of it. + */ +class HighlightDelayBarrier { + constructor(client, delay) { + this.client = client; + this.delay = delay; + } + isHighlightCommand(command) { + return HIGHLIGHT_COMMAND.indexOf(command.commandName) !== -1; + } + highlightData(top, left, width, height) { + return JSON.stringify({ + script: 'return (' + clientScripts.HIGHLIGHT_FN + ').apply(null, arguments);', + args: [top, left, width, height] + }); + } + removeHighlightData() { + return JSON.stringify({ + script: 'return (' + clientScripts.REMOVE_HIGHLIGHT_FN + ').apply(null, arguments);', + args: [] + }); + } + // Simple promise-based sleep so we can use async/await + sleep(delay) { + return new Promise((resolve) => { + setTimeout(() => { + resolve(); + }, delay); + }); + } + onCommand(command) { + return __awaiter(this, void 0, void 0, function* () { + if (!this.isHighlightCommand(command) || !this.delay) { + return; + } + const sessId = command.sessionId; + const el = command.getParam('elementId'); + // The W3C spec does have a 'getRect', but the standalone server doesn't support it yet. + const loc = yield this.client.getLocation(sessId, el); + const size = yield this.client.getSize(sessId, el); + // Set the highlight + yield this.client.execute(sessId, this.highlightData(loc['y'], loc['x'], size['width'], size['height'])); + // Wait + yield this.sleep(this.delay); + // Clear the highlight + yield this.client.execute(sessId, this.removeHighlightData()); + }); + } +} +exports.HighlightDelayBarrier = HighlightDelayBarrier; +//# sourceMappingURL=highlight_delay_barrier.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map new file mode 100644 index 00000000..af8d3623 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map @@ -0,0 +1 @@ +{"version":3,"file":"highlight_delay_barrier.js","sourceRoot":"","sources":["../../lib/highlight_delay_barrier.ts"],"names":[],"mappings":";;;;;;;;;;AACA,6DAAmE;AAGnE,MAAM,iBAAiB,GACnB,CAAC,gCAAW,CAAC,YAAY,EAAE,gCAAW,CAAC,eAAe,EAAE,gCAAW,CAAC,YAAY,CAAC,CAAC;AAEtF,IAAI,aAAa,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;AAG7D;;;;GAIG;AACH;IACE,YAAoB,MAA6B,EAAS,KAAa;QAAnD,WAAM,GAAN,MAAM,CAAuB;QAAS,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAEnE,kBAAkB,CAAC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C,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAEnD,oBAAoB;YACpB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACrB,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAEnF,OAAO;YACP,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7B,sBAAsB;YACtB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAChE,CAAC;KAAA;CACF;AAnDD,sDAmDC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts new file mode 100644 index 00000000..24432527 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts @@ -0,0 +1,2 @@ +export { BlockingProxy } from './blockingproxy'; +export { BPClient } from './client'; diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/index.js b/test-eol-project/node_modules/blocking-proxy/built/lib/index.js new file mode 100644 index 00000000..855d25f9 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var blockingproxy_1 = require("./blockingproxy"); +exports.BlockingProxy = blockingproxy_1.BlockingProxy; +var client_1 = require("./client"); +exports.BPClient = client_1.BPClient; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map new file mode 100644 index 00000000..e9e98ba3 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAAtC,wCAAA,aAAa,CAAA;AACrB,mCAAkC;AAA1B,4BAAA,QAAQ,CAAA"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts new file mode 100644 index 00000000..bd95c1c4 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts @@ -0,0 +1,39 @@ +/** + * Super dumb and simple WebDriver client. Works with selenium standalone, may or may not work yet + * directly with other drivers. + */ +export declare class SimpleWebDriverClient { + seleniumAddress: string; + constructor(seleniumAddress: string); + /** + * Send an execute script command. + * + * @param sessionId + * @param data A JSON blob with the script and arguments to execute. + */ + execute(sessionId: string, data: string): Promise; + /** + * Send an execute async script command. + * + * @param sessionId + * @param data A JSON blob with the script and arguments to execute. + */ + executeAsync(sessionId: string, data: string): Promise; + /** + * Get the location of an element. + * + * @param sessionId + * @param elementId + * @returns Promise<{}> A promise that resolves with the x and y coordinates of the element. + */ + getLocation(sessionId: string, elementId: string): Promise; + /** + * Get the size of an element. + * + * @param sessionId + * @param elementId + * @returns Promise<{}> A promise that resolves with the height and width of the element. + */ + getSize(sessionId: string, elementId: string): Promise; + private createSeleniumRequest(method, messageUrl, data?); +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js new file mode 100644 index 00000000..d7353567 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js @@ -0,0 +1,96 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const url = require("url"); +/** + * Super dumb and simple WebDriver client. Works with selenium standalone, may or may not work yet + * directly with other drivers. + */ +class SimpleWebDriverClient { + constructor(seleniumAddress) { + this.seleniumAddress = seleniumAddress; + } + /** + * Send an execute script command. + * + * @param sessionId + * @param data A JSON blob with the script and arguments to execute. + */ + execute(sessionId, data) { + const url = ['session', sessionId, 'execute'].join('/'); + return this.createSeleniumRequest('POST', url, data); + } + /** + * Send an execute async script command. + * + * @param sessionId + * @param data A JSON blob with the script and arguments to execute. + */ + executeAsync(sessionId, data) { + const url = ['session', sessionId, 'execute_async'].join('/'); + return this.createSeleniumRequest('POST', url, data); + } + /** + * Get the location of an element. + * + * @param sessionId + * @param elementId + * @returns Promise<{}> A promise that resolves with the x and y coordinates of the element. + */ + getLocation(sessionId, elementId) { + const url = ['session', sessionId, 'element', elementId, 'location'].join('/'); + return this.createSeleniumRequest('GET', url); + } + /** + * Get the size of an element. + * + * @param sessionId + * @param elementId + * @returns Promise<{}> A promise that resolves with the height and width of the element. + */ + getSize(sessionId, elementId) { + const url = ['session', sessionId, 'element', elementId, 'size'].join('/'); + return this.createSeleniumRequest('GET', url); + } + createSeleniumRequest(method, messageUrl, data) { + let parsedUrl = url.parse(this.seleniumAddress); + let options = {}; + options['method'] = method; + options['path'] = parsedUrl.path + '/' + messageUrl; + options['hostname'] = parsedUrl.hostname; + options['port'] = parseInt(parsedUrl.port); + let request = http.request(options); + return new Promise((resolve, reject) => { + if (data) { + request.write(data); + } + request.end(); + request.on('response', (resp) => { + let respData = ''; + resp.on('data', (d) => { + respData += d; + }); + resp.on('error', (err) => { + reject(err); + }); + resp.on('end', () => { + let response = JSON.parse(respData); + // Selenium 3.5.x or greater + if (response.status && response.status > 0) { + console.error(`Got status ${response.status} from selenium`, response.value); + reject(JSON.stringify(response.value)); + } + // Selenium 3.0.x + if (response.state && response.state !== 'success') { + console.error(`Got response ${response.state} from selenium`, response.value); + reject(JSON.stringify(response.value)); + } + resolve(response.value); + }); + }); + }); + } + ; +} +exports.SimpleWebDriverClient = SimpleWebDriverClient; +//# sourceMappingURL=simple_webdriver_client.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map new file mode 100644 index 00000000..e8cb52ba --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"simple_webdriver_client.js","sourceRoot":"","sources":["../../lib/simple_webdriver_client.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,2BAA2B;AAE3B;;;GAGG;AACH;IAGE,YAAY,eAAuB;QACjC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACI,OAAO,CAAC,SAAiB,EAAE,IAAY;QAC5C,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,SAAiB,EAAE,IAAY;QACjD,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;OAMG;IACI,WAAW,CAAC,SAAiB,EAAE,SAAiB;QACrD,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/E,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAC,SAAiB,EAAE,SAAiB;Q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AAE;oBACvB,MAAM,CAAC,GAAG,CAAC,CAAC;gBACd,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBAClB,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACpC,4BAA4B;oBAC5B,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;wBAC3C,OAAO,CAAC,KAAK,CAAC,cAAc,QAAQ,CAAC,MAAM,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;wBAC7E,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;oBACzC,CAAC;oBACD,iBAAiB;oBACjB,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;wBACnD,OAAO,CAAC,KAAK,CAAC,gBAAgB,QAAQ,CAAC,KAAK,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;wBAC9E,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;oBACzC,CAAC;oBACD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAC1B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAA,CAAC;CACH;AA9FD,sDA8FC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts new file mode 100644 index 00000000..cda03be2 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts @@ -0,0 +1,67 @@ +/// +/** + * Utilities for parsing WebDriver commands from HTTP Requests. + */ +import * as events from 'events'; +export declare type HttpMethod = 'GET' | 'POST' | 'DELETE'; +export declare type paramKey = 'sessionId' | 'elementId' | 'name' | 'propertyName'; +export declare enum CommandName { + NewSession = 0, + DeleteSession = 1, + Status = 2, + GetTimeouts = 3, + SetTimeouts = 4, + Go = 5, + GetCurrentURL = 6, + Back = 7, + Forward = 8, + Refresh = 9, + GetTitle = 10, + FindElement = 11, + FindElements = 12, + FindElementFromElement = 13, + FindElementsFromElement = 14, + IsElementSelected = 15, + GetElementAttribute = 16, + GetElementProperty = 17, + GetElementCSSValue = 18, + GetElementText = 19, + GetElementTagName = 20, + GetElementRect = 21, + IsElementEnabled = 22, + ElementClick = 23, + ElementClear = 24, + ElementSendKeys = 25, + WireMoveTo = 26, + WireButtonDown = 27, + WireButtonUp = 28, + GetAlertText = 29, + AcceptAlert = 30, + DismissAlert = 31, + UNKNOWN = 32, +} +/** + * An instance of a WebDriver command, containing the params and data for that request. + * + * @param commandName The enum identifying the command. + * @param params Parameters for the command taken from the request's url. + * @param data Optional data included with the command, taken from the body of the request. + */ +export declare class WebDriverCommand extends events.EventEmitter { + commandName: CommandName; + readonly url: string; + readonly method: HttpMethod; + private params; + data: any; + responseStatus: number; + responseData: any; + readonly sessionId: string; + constructor(commandName: CommandName, url: string, method: HttpMethod, params?: any); + getParam(key: paramKey): string; + handleData(data?: any): void; + handleResponse(statusCode: number, data?: any): void; +} +/** + * Returns a new WebdriverCommand object for the resource at the given URL. + */ +export declare function parseWebDriverCommand(url: any, method: any): WebDriverCommand; diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js new file mode 100644 index 00000000..56af1db3 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js @@ -0,0 +1,212 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Utilities for parsing WebDriver commands from HTTP Requests. + */ +const events = require("events"); +var CommandName; +(function (CommandName) { + CommandName[CommandName["NewSession"] = 0] = "NewSession"; + CommandName[CommandName["DeleteSession"] = 1] = "DeleteSession"; + CommandName[CommandName["Status"] = 2] = "Status"; + CommandName[CommandName["GetTimeouts"] = 3] = "GetTimeouts"; + CommandName[CommandName["SetTimeouts"] = 4] = "SetTimeouts"; + CommandName[CommandName["Go"] = 5] = "Go"; + CommandName[CommandName["GetCurrentURL"] = 6] = "GetCurrentURL"; + CommandName[CommandName["Back"] = 7] = "Back"; + CommandName[CommandName["Forward"] = 8] = "Forward"; + CommandName[CommandName["Refresh"] = 9] = "Refresh"; + CommandName[CommandName["GetTitle"] = 10] = "GetTitle"; + CommandName[CommandName["FindElement"] = 11] = "FindElement"; + CommandName[CommandName["FindElements"] = 12] = "FindElements"; + CommandName[CommandName["FindElementFromElement"] = 13] = "FindElementFromElement"; + CommandName[CommandName["FindElementsFromElement"] = 14] = "FindElementsFromElement"; + CommandName[CommandName["IsElementSelected"] = 15] = "IsElementSelected"; + CommandName[CommandName["GetElementAttribute"] = 16] = "GetElementAttribute"; + CommandName[CommandName["GetElementProperty"] = 17] = "GetElementProperty"; + CommandName[CommandName["GetElementCSSValue"] = 18] = "GetElementCSSValue"; + CommandName[CommandName["GetElementText"] = 19] = "GetElementText"; + CommandName[CommandName["GetElementTagName"] = 20] = "GetElementTagName"; + CommandName[CommandName["GetElementRect"] = 21] = "GetElementRect"; + CommandName[CommandName["IsElementEnabled"] = 22] = "IsElementEnabled"; + CommandName[CommandName["ElementClick"] = 23] = "ElementClick"; + CommandName[CommandName["ElementClear"] = 24] = "ElementClear"; + CommandName[CommandName["ElementSendKeys"] = 25] = "ElementSendKeys"; + CommandName[CommandName["WireMoveTo"] = 26] = "WireMoveTo"; + CommandName[CommandName["WireButtonDown"] = 27] = "WireButtonDown"; + CommandName[CommandName["WireButtonUp"] = 28] = "WireButtonUp"; + CommandName[CommandName["GetAlertText"] = 29] = "GetAlertText"; + CommandName[CommandName["AcceptAlert"] = 30] = "AcceptAlert"; + CommandName[CommandName["DismissAlert"] = 31] = "DismissAlert"; + CommandName[CommandName["UNKNOWN"] = 32] = "UNKNOWN"; +})(CommandName = exports.CommandName || (exports.CommandName = {})); +/** + * Represents an endpoint in the WebDriver spec. Endpoints are defined by + * the CommandName enum and the url pattern that they match. + * + * For example, the pattern + * /session/:sessionId/element/:elementId/click + * will match urls such as + * /session/d9e52b96-9b6a-4cb3-b017-76e8b4236646/element/1c2855ba-213d-4466-ba16-b14a7e6c3699/click + * + * @param pattern The url pattern + * @param method The HTTP method, ie GET, POST, DELETE + * @param name The CommandName of this endpoint. + */ +class Endpoint { + constructor(pattern, method, name) { + this.pattern = pattern; + this.method = method; + this.name = name; + } + /** + * Tests whether a given url from a request matches this endpoint. + * + * @param url A url from a request to test against the endpoint. + * @param method The HTTP method. + * @returns {boolean} Whether the endpoint matches. + */ + matches(url, method) { + let urlParts = url.split('/'); + let patternParts = this.pattern.split('/'); + if (method != this.method || urlParts.length != patternParts.length) { + return false; + } + // TODO: Replace this naive search with better parsing. + for (let idx in patternParts) { + if (!patternParts[idx].startsWith(':') && patternParts[idx] != urlParts[idx]) { + return false; + } + } + return true; + } + /** + * Given a url from a http request, create an object containing parameters from the URL. + * + * Parameters are the parts of the endpoint's pattern that start with ':'. The ':' is dropped + * from the parameter key. + * + * @param url The url from the request. + * @returns An object mapping parameter keys to values from the url. + */ + getParams(url) { + let urlParts = url.split('/'); + let patternParts = this.pattern.split('/'); + let params = {}; + for (let idx in patternParts) { + if (patternParts[idx].startsWith(':')) { + let paramName = patternParts[idx].slice(1); + params[paramName] = urlParts[idx]; + } + } + return params; + } +} +/** + * An instance of a WebDriver command, containing the params and data for that request. + * + * @param commandName The enum identifying the command. + * @param params Parameters for the command taken from the request's url. + * @param data Optional data included with the command, taken from the body of the request. + */ +class WebDriverCommand extends events.EventEmitter { + constructor(commandName, url, method, params) { + super(); + this.commandName = commandName; + this.url = url; + this.method = method; + this.params = params; + } + // All WebDriver commands have a session Id, except for two. + // NewSession will have a session Id in the data + // Status just doesn't + get sessionId() { + if (!this.getParam('sessionId') && this.url.startsWith('/session')) { + return this.url.split('/')[2]; + } + return this.getParam('sessionId'); + } + getParam(key) { + return this.params[key]; + } + handleData(data) { + try { + this.data = JSON.parse(data); + } + catch (err) { + this.data = data; + } + this.emit('data'); + } + handleResponse(statusCode, data) { + this.responseStatus = statusCode; + try { + this.responseData = JSON.parse(data); + } + catch (err) { + this.responseData = data; + } + this.emit('response'); + } +} +exports.WebDriverCommand = WebDriverCommand; +/** + * The set of known endpoints. + */ +let endpoints = []; +function addWebDriverCommand(command, method, pattern) { + endpoints.push(new Endpoint(pattern, method, command)); +} +/** + * Returns a new WebdriverCommand object for the resource at the given URL. + */ +function parseWebDriverCommand(url, method) { + for (let endpoint of endpoints) { + if (endpoint.matches(url, method)) { + let params = endpoint.getParams(url); + return new WebDriverCommand(endpoint.name, url, method, params); + } + } + return new WebDriverCommand(CommandName.UNKNOWN, url, method, {}); +} +exports.parseWebDriverCommand = parseWebDriverCommand; +let sessionPrefix = '/session/:sessionId'; +addWebDriverCommand(CommandName.NewSession, 'POST', '/session'); +addWebDriverCommand(CommandName.DeleteSession, 'DELETE', '/session/:sessionId'); +addWebDriverCommand(CommandName.Status, 'GET', '/status'); +addWebDriverCommand(CommandName.GetTimeouts, 'GET', sessionPrefix + '/timeouts'); +addWebDriverCommand(CommandName.SetTimeouts, 'POST', sessionPrefix + '/timeouts'); +addWebDriverCommand(CommandName.Go, 'POST', sessionPrefix + '/url'); +addWebDriverCommand(CommandName.GetCurrentURL, 'GET', sessionPrefix + '/url'); +addWebDriverCommand(CommandName.Back, 'POST', sessionPrefix + '/back'); +addWebDriverCommand(CommandName.Forward, 'POST', sessionPrefix + '/forward'); +addWebDriverCommand(CommandName.Refresh, 'POST', sessionPrefix + '/refresh'); +addWebDriverCommand(CommandName.GetTitle, 'GET', sessionPrefix + '/title'); +addWebDriverCommand(CommandName.FindElement, 'POST', sessionPrefix + '/element'); +addWebDriverCommand(CommandName.FindElements, 'POST', sessionPrefix + '/elements'); +addWebDriverCommand(CommandName.FindElementFromElement, 'POST', sessionPrefix + '/element/:elementId/element'); +addWebDriverCommand(CommandName.FindElementsFromElement, 'POST', sessionPrefix + '/element/:elementId/elements'); +addWebDriverCommand(CommandName.IsElementSelected, 'POST', sessionPrefix + '/element/:elementId/selected'); +addWebDriverCommand(CommandName.GetElementAttribute, 'GET', sessionPrefix + '/element/:elementId/attribute/:attributeName'); +addWebDriverCommand(CommandName.GetElementProperty, 'GET', sessionPrefix + '/element/:elementId/property/:propertyName'); +addWebDriverCommand(CommandName.GetElementCSSValue, 'GET', sessionPrefix + '/element/:elementId/css/:cssPropertyName'); +addWebDriverCommand(CommandName.GetElementText, 'GET', sessionPrefix + '/element/:elementId/text'); +addWebDriverCommand(CommandName.GetElementTagName, 'GET', sessionPrefix + '/element/:elementId/name'); +addWebDriverCommand(CommandName.GetElementRect, 'GET', sessionPrefix + '/element/:elementId/rect'); +addWebDriverCommand(CommandName.GetElementRect, 'GET', sessionPrefix + '/element/:elementId/size'); +addWebDriverCommand(CommandName.IsElementEnabled, 'GET', sessionPrefix + '/element/:elementId/enabled'); +addWebDriverCommand(CommandName.ElementClick, 'POST', sessionPrefix + '/element/:elementId/click'); +addWebDriverCommand(CommandName.ElementClear, 'POST', sessionPrefix + '/element/:elementId/clear'); +addWebDriverCommand(CommandName.ElementSendKeys, 'POST', sessionPrefix + '/element/:elementId/value'); +addWebDriverCommand(CommandName.GetAlertText, 'GET', sessionPrefix + '/alert_text'); +addWebDriverCommand(CommandName.GetAlertText, 'GET', sessionPrefix + '/alert/text'); +addWebDriverCommand(CommandName.AcceptAlert, 'POST', sessionPrefix + '/alert/accept'); +addWebDriverCommand(CommandName.AcceptAlert, 'POST', sessionPrefix + '/accept_alert'); +addWebDriverCommand(CommandName.DismissAlert, 'POST', sessionPrefix + '/alert/dismiss'); +addWebDriverCommand(CommandName.DismissAlert, 'POST', sessionPrefix + '/dismiss_alert'); +// These commands are part of the JSON protocol, and were replaced by Perform Actions in the W3C +// spec +addWebDriverCommand(CommandName.WireMoveTo, 'POST', sessionPrefix + '/moveto'); +addWebDriverCommand(CommandName.WireButtonDown, 'POST', sessionPrefix + '/buttondown'); +addWebDriverCommand(CommandName.WireButtonUp, 'POST', sessionPrefix + '/buttonup'); +//# sourceMappingURL=webdriver_commands.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map new file mode 100644 index 00000000..563c4cea --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webdriver_commands.js","sourceRoot":"","sources":["../../lib/webdriver_commands.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,iCAAiC;AAKjC,IAAY,WAkCX;AAlCD,WAAY,WAAW;IACrB,yDAAU,CAAA;IACV,+DAAa,CAAA;IACb,iDAAM,CAAA;IACN,2DAAW,CAAA;IACX,2DAAW,CAAA;IACX,yCAAE,CAAA;IACF,+DAAa,CAAA;IACb,6CAAI,CAAA;IACJ,mDAAO,CAAA;IACP,mDAAO,CAAA;IACP,sDAAQ,CAAA;IACR,4DAAW,CAAA;IACX,8DAAY,CAAA;IACZ,kFAAsB,CAAA;IACtB,oFAAuB,CAAA;IACvB,wEAAiB,CAAA;IACjB,4EAAmB,CAAA;IACnB,0EAAkB,CAAA;IAClB,0EAAkB,CAAA;IAClB,kEAAc,CAAA;IACd,wEAAiB,CAAA;IACjB,kEAAc,CAAA;IACd,sEAAgB,CAAA;IAChB,8DAAY,CAAA;IACZ,8DAAY,CAAA;IACZ,oEAAe,CAAA;IACf,0DAAU,CAAA;IACV,kEAAc,CAAA;IACd,8DAAY,CAAA;IACZ,8DAAY,CAAA;IACZ,4DAAW,CAAA;IACX,8DAAY,CAAA;IACZ,oDAAO,CAAA;AACT,CAAC,EAlCW,WAAW,GAA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pF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACpF,mBAAmB,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC;AACtF,mBAAmB,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC;AACtF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC;AACxF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC;AAExF,gGAAgG;AAChG,OAAO;AACP,mBAAmB,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC,CAAC;AAC/E,mBAAmB,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACvF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts new file mode 100644 index 00000000..ce4cbb17 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts @@ -0,0 +1,35 @@ +/// +import * as stream from 'stream'; +import { WebDriverCommand } from './webdriver_commands'; +/** + * Logs WebDriver commands, transforming the command into a user-friendly description. + */ +export declare class WebDriverLogger { + logStream: stream.Writable; + readonly logName: string; + constructor(); + /** + * Start logging to the specified directory. Will create a file named + * 'webdriver_log_.txt' + * + * @param logDir The directory to create log files in. + */ + setLogDir(logDir: string): void; + /** + * Logs a webdriver command to the log file. + * + * @param command The command to log. + */ + logWebDriverCommand(command: WebDriverCommand): void; + /** + * Log an arbitrary event to the log file. + * + * @param msg The message to log. + * @param sessionId The session id associated with the event. + * @param elapsedMs How long the event took, in ms. + */ + logEvent(msg: string, sessionId: string, elapsedMs: number): void; + private renderData(command); + private renderResponse(command); + private timestamp(); +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js new file mode 100644 index 00000000..215d84aa --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js @@ -0,0 +1,152 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const path = require("path"); +const webdriver_commands_1 = require("./webdriver_commands"); +// Generate a random 8 character ID to avoid collisions. +function getLogId() { + return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(36).slice(0, 8); +} +// Super proprietary left pad implementation. Do not copy plzkthx. +function leftPad(field) { + const fieldWidth = 6; + let padding = fieldWidth - field.length; + if (padding > 0) { + return ' '.repeat(padding) + field; + } + return field; +} +const FINDERS = [ + webdriver_commands_1.CommandName.FindElement, webdriver_commands_1.CommandName.FindElementFromElement, webdriver_commands_1.CommandName.FindElements, + webdriver_commands_1.CommandName.FindElementsFromElement +]; +const READERS = [ + webdriver_commands_1.CommandName.GetElementTagName, webdriver_commands_1.CommandName.GetElementText, webdriver_commands_1.CommandName.GetElementAttribute, + webdriver_commands_1.CommandName.GetElementProperty, webdriver_commands_1.CommandName.GetElementCSSValue, webdriver_commands_1.CommandName.GetElementRect +]; +const PAD = ' '; +/** + * Logs WebDriver commands, transforming the command into a user-friendly description. + */ +class WebDriverLogger { + constructor() { + this.logName = `webdriver_log_${getLogId()}.txt`; + } + /** + * Start logging to the specified directory. Will create a file named + * 'webdriver_log_.txt' + * + * @param logDir The directory to create log files in. + */ + setLogDir(logDir) { + this.logStream = fs.createWriteStream(path.join(logDir, this.logName), { flags: 'a' }); + } + /** + * Logs a webdriver command to the log file. + * + * @param command The command to log. + */ + logWebDriverCommand(command) { + if (!this.logStream) { + return; + } + let logLine; + logLine = `${this.timestamp()} `; + let started = Date.now(); + command.on('response', () => { + let done = Date.now(); + let elapsed = leftPad((done - started) + ''); + logLine += `| ${elapsed}ms `; + if (command.getParam('sessionId')) { + let session = command.getParam('sessionId').slice(0, 6); + logLine += `| ${session} `; + } + else if (command.commandName == webdriver_commands_1.CommandName.NewSession) { + // Only for new session commands, the sessionId is in the response. + let session = command.responseData['sessionId'].slice(0, 6); + logLine += `| ${session} `; + } + if (command.commandName == webdriver_commands_1.CommandName.UNKNOWN) { + logLine += `| ${command.url}`; + } + else { + logLine += `| ${webdriver_commands_1.CommandName[command.commandName]}`; + } + if (command.commandName == webdriver_commands_1.CommandName.Go) { + logLine += ' ' + command.data['url']; + } + else if (command.getParam('elementId')) { + logLine += ` (${command.getParam('elementId')})`; + } + logLine += '\n'; + this.logStream.write(logLine); + this.renderData(command); + this.renderResponse(command); + }); + } + /** + * Log an arbitrary event to the log file. + * + * @param msg The message to log. + * @param sessionId The session id associated with the event. + * @param elapsedMs How long the event took, in ms. + */ + logEvent(msg, sessionId, elapsedMs) { + let elapsed = leftPad(elapsedMs.toString()); + let logLine = `${this.timestamp()} | ${elapsed}ms | ${sessionId.slice(0, 6)} | ${msg}\n`; + this.logStream.write(logLine); + } + renderData(command) { + let dataLine = ''; + if (command.commandName === webdriver_commands_1.CommandName.NewSession) { + dataLine = JSON.stringify(command.data['desiredCapabilities']); + } + else if (command.commandName === webdriver_commands_1.CommandName.ElementSendKeys) { + let value = command.data['value'].join(''); + dataLine = `Send: ${value}`; + } + else if (FINDERS.indexOf(command.commandName) !== -1) { + const using = command.data['using']; + const value = command.data['value']; + dataLine = `Using ${using} '${value}'`; + } + if (dataLine) { + this.logStream.write(PAD + dataLine + '\n'); + } + } + renderResponse(command) { + let respLine = ''; + const data = command.responseData; + if (data['status'] > 0) { + respLine = `ERROR ${data['status']}: ${data['value']['message']}`; + } + else if (FINDERS.indexOf(command.commandName) !== -1) { + let els = command.responseData['value']; + if (!Array.isArray(els)) { + els = [els]; + } + els = els.map((e) => e['ELEMENT']); + respLine = 'Elements: ' + els; + } + else if (READERS.indexOf(command.commandName) !== -1) { + respLine = command.responseData['value']; + if (typeof respLine == 'object') { + respLine = JSON.stringify(respLine); + } + } + if (respLine) { + this.logStream.write(PAD + respLine + '\n'); + } + } + timestamp() { + let d = new Date(); + let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours(); + let minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes(); + let seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(); + let millis = d.getMilliseconds().toString(); + millis = '000'.slice(0, 3 - millis.length) + millis; + return `${hours}:${minutes}:${seconds}.${millis}`; + } +} +exports.WebDriverLogger = WebDriverLogger; +//# sourceMappingURL=webdriver_logger.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map new file mode 100644 index 00000000..e0d61c3e --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webdriver_logger.js","sourceRoot":"","sources":["../../lib/webdriver_logger.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAG7B,6DAAmE;AAEnE,wDAAwD;AACxD;IACE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtF,CAAC;AAED,kEAAkE;AAClE,iBAAiB,KAAa;IAC5B,MAAM,UAAU,GAAG,CAAC,CAAC;IACrB,IAAI,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC;IACxC,EAAE,CAAC,CAAC,OAAO,GA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AM,EAAE,CAAC;IACpD,CAAC;CACF;AAjID,0CAiIC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts new file mode 100644 index 00000000..0407f0cd --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts @@ -0,0 +1,24 @@ +/// +import * as http from 'http'; +import { WebDriverCommand } from './webdriver_commands'; +/** + * A proxy that understands WebDriver commands. Users can add barriers (similar to middleware in + * express) that will be called before forwarding the request to WebDriver. The proxy will wait for + * each barrier to finish, calling them in the order in which they were added. + */ +export declare class WebDriverProxy { + barriers: WebDriverBarrier[]; + seleniumAddress: string; + constructor(seleniumAddress: string); + addBarrier(barrier: WebDriverBarrier): void; + handleRequest(originalRequest: http.IncomingMessage, response: http.ServerResponse): Promise; +} +/** + * When the proxy receives a WebDriver command, it will call onCommand() for each of it's barriers. + * Barriers may return a promise for the proxy to wait for before proceeding. If the promise is + * rejected, the proxy will reply with an error code and the result of the promise and the command + * will not be forwarded to Selenium. + */ +export interface WebDriverBarrier { + onCommand(command: WebDriverCommand): Promise; +} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js new file mode 100644 index 00000000..7b074d35 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js @@ -0,0 +1,81 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const url = require("url"); +const webdriver_commands_1 = require("./webdriver_commands"); +/** + * A proxy that understands WebDriver commands. Users can add barriers (similar to middleware in + * express) that will be called before forwarding the request to WebDriver. The proxy will wait for + * each barrier to finish, calling them in the order in which they were added. + */ +class WebDriverProxy { + constructor(seleniumAddress) { + this.barriers = []; + this.seleniumAddress = seleniumAddress; + } + addBarrier(barrier) { + this.barriers.push(barrier); + } + handleRequest(originalRequest, response) { + return __awaiter(this, void 0, void 0, function* () { + let command = webdriver_commands_1.parseWebDriverCommand(originalRequest.url, originalRequest.method); + let replyWithError = (err) => { + response.writeHead(502); + if (err && err.toString) { + response.write(err.toString()); + } + response.end(); + }; + // Process barriers in order, one at a time. + try { + for (let barrier of this.barriers) { + yield barrier.onCommand(command); + } + } + catch (err) { + replyWithError(err); + // Don't call through if a barrier fails. + return; + } + let parsedUrl = url.parse(this.seleniumAddress); + let options = {}; + options.method = originalRequest.method; + options.path = parsedUrl.path + originalRequest.url; + options.hostname = parsedUrl.hostname; + options.port = parseInt(parsedUrl.port); + options.headers = originalRequest.headers; + let forwardedRequest = http.request(options); + // clang-format off + let reqData = ''; + originalRequest.on('data', (d) => { + reqData += d; + forwardedRequest.write(d); + }).on('end', () => { + command.handleData(reqData); + forwardedRequest.end(); + }).on('error', replyWithError); + forwardedRequest.on('response', (seleniumResponse) => { + response.writeHead(seleniumResponse.statusCode, seleniumResponse.headers); + let respData = ''; + seleniumResponse.on('data', (d) => { + respData += d; + response.write(d); + }).on('end', () => { + command.handleResponse(seleniumResponse.statusCode, respData); + response.end(); + }).on('error', replyWithError); + }).on('error', replyWithError); + // clang-format on + }); + } +} +exports.WebDriverProxy = WebDriverProxy; +//# sourceMappingURL=webdriver_proxy.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map new file mode 100644 index 00000000..5c84d0a3 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webdriver_proxy.js","sourceRoot":"","sources":["../../lib/webdriver_proxy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6BAA6B;AAC7B,2BAA2B;AAE3B,6DAA6E;AAE7E;;;;GAIG;AACH;IAIE,YAAY,eAAuB;QACjC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED,UAAU,CAAC,OAAyB;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAEK,aAAa,CAAC,eAAqC,EAAE,QAA6B;;YACtF,IAAI,OAAO,GAAG,0CAAqB,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;YAEjF,IAAI,cAAc,GAAG,CAAC,GAAG,EAAE,EAAE;gBAC3B,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBACxB,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACjC,CAAC;gBACD,QAAQ,CAAC,GAAG,EAAE,CAAC;YACjB,CAAC,CAAC;YAEF,4CAA4C;YAC5C,IAAI,CAAC;gBACH,GAAG,CAAC,CAAC,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAClC,MAAM,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC;YAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACb,cAAc,CAAC,GAAG,CAAC,CAAC;gBACpB,yCAAyC;gBACzC,MAAM,CAAC;YACT,CAAC;YAED,IAAI,SAAS,GAAG,GAAG,C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CAAC,CAAC;gBACpB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBAChB,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;oBAC9D,QAAQ,CAAC,GAAG,EAAE,CAAC;gBACjB,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAEjC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAC/B,kBAAkB;QACpB,CAAC;KAAA;CACF;AAtED,wCAsEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/circle.yml b/test-eol-project/node_modules/blocking-proxy/circle.yml new file mode 100644 index 00000000..fae08cea --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/circle.yml @@ -0,0 +1,29 @@ +machine: + node: + version: 6.9.1 + environment: + # Fix issue with selenium-server in containers. + # See http://github.com/SeleniumHQ/docker-selenium/issues/87 + DBUS_SESSION_BUS_ADDRESS: /dev/null + +dependencies: + override: + - npm update + cache_directories: + - testapp/node_modules + post: + # Install the latest Chrome + - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + - sudo dpkg -i google-chrome.deb + - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome + - rm google-chrome.deb + - npm run webdriver: + background: true + - cd testapp && npm update + - npm run testapp: + background: true +test: + override: + - ./node_modules/.bin/gulp lint + - npm test + - npm run test:e2e diff --git a/test-eol-project/node_modules/blocking-proxy/examples/README.md b/test-eol-project/node_modules/blocking-proxy/examples/README.md new file mode 100644 index 00000000..e15ad33c --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/examples/README.md @@ -0,0 +1,22 @@ +This is an example test that makes use of Blocking Proxy. + +## Running the example + +The example requires python 2.7 and the python selenium module. Assuming you +have pip and python, you can run the example like so: + +``` +pip install selenium +./run_example.sh +``` + +## What it does + +The example test is a simple WebDriver test of angularjs.io. It starts a +selenium server (using [WebDriver Manager](https://github.com/angular/webdriver-manager), +starts a Blocking Proxy instance, then runs the test. + +Blocking Proxy is set to use a 3 second highlight delay, so you'll see elements +highlighted before they're interacted with. It will also generate a log of WebDriver +commands in the current directory, with the file like `webdriver_log_xxxxxxxx.txt`. + diff --git a/test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py b/test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py new file mode 100644 index 00000000..e6b72e43 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py @@ -0,0 +1,31 @@ +from selenium import webdriver + +capabilities = webdriver.DesiredCapabilities.CHROME.copy() +WD_URL = 'http://localhost:8001' + +driver = webdriver.Remote(desired_capabilities=capabilities, command_executor=WD_URL) + +print "Loading angularjs.org" +driver.get('https://angularjs.org/') + +print "Testing hello app" +sample_app = driver.find_element_by_css_selector("[app-run='hello.html']") +sample_app.location_once_scrolled_into_view +name_box = sample_app.find_element_by_css_selector('[ng-model="yourName"]') +hello_box = sample_app.find_element_by_css_selector('h1') + +name_box.send_keys('Bob') + +assert "Hello Bob!" in hello_box.text + +print "Testing todo app" +todo_app = driver.find_element_by_css_selector("[app-run='todo.html']") +todo_app.location_once_scrolled_into_view +todo_input = todo_app.find_element_by_css_selector('[ng-model="todoList.todoText"]') +todo_list = todo_app.find_element_by_css_selector('ul') + +todo_input.send_keys('write some tests'); +add_button = todo_app.find_element_by_css_selector('[value="add"]') +add_button.click() + +assert 'write some tests' in todo_list.text diff --git a/test-eol-project/node_modules/blocking-proxy/examples/run_example.sh b/test-eol-project/node_modules/blocking-proxy/examples/run_example.sh new file mode 100755 index 00000000..a9c54293 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/examples/run_example.sh @@ -0,0 +1,22 @@ +#!/bin/bash +trap "kill -- -$$" EXIT + +cd .. +npm install + +# Start Selenium Server +./node_modules/.bin/webdriver-manager update +./node_modules/.bin/webdriver-manager start &> /dev/null & + +# Start Blocking Proxy +node ./built/lib/bin.js \ + --seleniumAddress http://localhost:4444/wd/hub \ + --port 8001 \ + --highlightDelay 3000 \ + --logDir examples/ &> /dev/null & + +# Wait a bit for things to come up +sleep 2 + +# Run the test +python examples/e2e_test.py diff --git a/test-eol-project/node_modules/blocking-proxy/gulpfile.js b/test-eol-project/node_modules/blocking-proxy/gulpfile.js new file mode 100644 index 00000000..28fce9f5 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/gulpfile.js @@ -0,0 +1,65 @@ +'use strict'; + +var gulp = require('gulp'); +var runSequence = require('run-sequence'); +var spawn = require('child_process').spawn; +var tslint = require('gulp-tslint'); + +var runSpawn = function(done, task, opt_arg) { + var child = spawn(task, opt_arg, {stdio: 'inherit'}); + child.on('close', function() { + done(); + }); +}; + +gulp.task('built:copy', function() { + return gulp.src(['lib/**/*','!lib/**/*.ts']) + .pipe(gulp.dest('built/lib/')); +}); + +gulp.task('webdriver:update', function(done) { + runSpawn(done, 'webdriver-manager', ['update']); +}); + +gulp.task('tslint', function() { + return gulp.src(['lib/**/*.ts', 'spec/**/*.ts']).pipe(tslint()).pipe(tslint.report()); +}); + +gulp.task('format:enforce', () => { + const format = require('gulp-clang-format'); + const clangFormat = require('clang-format'); + return gulp.src(['lib/**/*.ts', 'spec/**/*.ts']).pipe( + format.checkFormat('file', clangFormat, {verbose: true, fail: true})); +}); + +gulp.task('format', () => { + const format = require('gulp-clang-format'); + const clangFormat = require('clang-format'); + return gulp.src(['lib/**/*.ts', 'spec/**/*.ts'], { base: '.' }).pipe( + format.format('file', clangFormat)).pipe(gulp.dest('.')); +}); + +gulp.task('tsc', function(done) { + runSpawn(done, 'node', ['node_modules/typescript/bin/tsc']); +}); + +gulp.task('lint', function(done) { + runSequence('tslint', 'format:enforce', done); +}); + +gulp.task('prepublish', function(done) { + runSequence('lint' ,'tsc', 'built:copy', done); +}); + +gulp.task('pretest', function(done) { + runSequence( + ['webdriver:update', 'tslint', 'clang'], 'tsc', 'built:copy', done); +}); + +gulp.task('default', ['prepublish']); +gulp.task('build', ['prepublish']); + +gulp.task('test:copy', function(done) { + return gulp.src(['spec/**/*','!spec/**/*.ts']) + .pipe(gulp.dest('built/spec/')); +}); diff --git a/test-eol-project/node_modules/blocking-proxy/package.json b/test-eol-project/node_modules/blocking-proxy/package.json new file mode 100644 index 00000000..9d26f6a5 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/package.json @@ -0,0 +1,73 @@ +{ + "name": "blocking-proxy", + "description": "WebDriver Proxy for testing rich clients. It block certain calls until Angular is done updating the page under test.", + "homepage": "https://github.com/angular/blocking-proxy", + "keywords": [ + "test", + "testing", + "webdriver", + "webdriverjs", + "selenium" + ], + "contributors": [ + "Michael Giambalvo ", + "Julie Ralph " + ], + "dependencies": { + "minimist": "^1.2.0" + }, + "devDependencies": { + "@types/jasmine": "2.5.45", + "@types/minimist": "^1.1.29", + "@types/nock": "^8.2.0", + "@types/node": "^6.0.45", + "@types/rimraf": "0.0.28", + "@types/selenium-webdriver": "^2.53.39", + "body-parser": "1.14.2", + "clang-format": "^1.0.34", + "gulp": "^3.9.1", + "gulp-clang-format": "^1.0.23", + "gulp-tslint": "^7.0.1", + "jasmine": "^2.3.2", + "jasmine-co": "^1.2.2", + "jasmine-ts": "^0.2.1", + "jshint": "2.9.1", + "nock": "^9.0.2", + "rimraf": "^2.5.4", + "run-sequence": "^1.2.2", + "selenium-mock": "^0.1.5", + "selenium-webdriver": "^3.6.0", + "ts-node": "^2.1.2", + "tslint": "^4.3.1", + "tslint-eslint-rules": "^3.1.0", + "typescript": "^2.1.5", + "vrsource-tslint-rules": "^0.14.1", + "webdriver-manager": "^12.0.6" + }, + "repository": { + "type": "git", + "url": "git://github.com/angular/jasminewd.git" + }, + "typings": "built/lib/index.d.ts", + "main": "built/lib/index.js", + "bin": { + "blocking-proxy": "built/lib/bin.js" + }, + "scripts": { + "prepublish": "gulp prepublish", + "start": "node built/lib/bin.js", + "webdriver": "webdriver-manager update && webdriver-manager start", + "test": "JASMINE_CONFIG_PATH=spec/jasmine_unit.json jasmine-ts", + "test:auto": "find lib spec | entr npm test", + "testapp": "cd testapp && npm start", + "test:e2e": "JASMINE_CONFIG_PATH=spec/jasmine_e2e.json jasmine-ts" + }, + "jshintConfig": { + "esversion": 6 + }, + "engines": { + "node": ">=6.9.x" + }, + "license": "MIT", + "version": "1.0.1" +} diff --git a/test-eol-project/node_modules/blocking-proxy/tsconfig.json b/test-eol-project/node_modules/blocking-proxy/tsconfig.json new file mode 100644 index 00000000..c23dc499 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "noUnusedLocals": true, + "sourceMap": true, + "declaration": true, + "removeComments": false, + "noImplicitAny": false, + "outDir": "built/" + }, + "exclude": [ + "built", + "node_modules", + "selenium", + "testapp", + "typings/browser", + "typings/browser.d.ts" + ], + "filesGlob": [ + "**/*.ts" + ] +} diff --git a/test-eol-project/node_modules/blocking-proxy/tslint.json b/test-eol-project/node_modules/blocking-proxy/tslint.json new file mode 100644 index 00000000..5935ad95 --- /dev/null +++ b/test-eol-project/node_modules/blocking-proxy/tslint.json @@ -0,0 +1,15 @@ +{ + "rulesDirectory": [ + "node_modules/vrsource-tslint-rules/rules", + "node_modules/tslint-eslint-rules/dist/rules" + ], + "rules": { + "no-duplicate-imports": true, + "no-duplicate-variable": true, + "no-jasmine-focus": true, + "no-var-keyword": true, + "semicolon": [true], + "variable-name": [true, "ban-keywords"], + "no-inner-declarations": [true, "function"] + } +} diff --git a/test-eol-project/node_modules/brace-expansion/LICENSE b/test-eol-project/node_modules/brace-expansion/LICENSE new file mode 100644 index 00000000..de322667 --- /dev/null +++ b/test-eol-project/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +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/test-eol-project/node_modules/brace-expansion/README.md b/test-eol-project/node_modules/brace-expansion/README.md new file mode 100644 index 00000000..6b4e0e16 --- /dev/null +++ b/test-eol-project/node_modules/brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +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/test-eol-project/node_modules/brace-expansion/index.js b/test-eol-project/node_modules/brace-expansion/index.js new file mode 100644 index 00000000..bd19fe68 --- /dev/null +++ b/test-eol-project/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/test-eol-project/node_modules/brace-expansion/package.json b/test-eol-project/node_modules/brace-expansion/package.json new file mode 100644 index 00000000..34478881 --- /dev/null +++ b/test-eol-project/node_modules/brace-expansion/package.json @@ -0,0 +1,50 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.12", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh", + "bench": "matcha test/perf/bench.js" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "publishConfig": { + "tag": "1.x" + } +} diff --git a/test-eol-project/node_modules/browserstack/.editorconfig b/test-eol-project/node_modules/browserstack/.editorconfig new file mode 100644 index 00000000..861e6aff --- /dev/null +++ b/test-eol-project/node_modules/browserstack/.editorconfig @@ -0,0 +1,11 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +root = true + +[lib/*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/test-eol-project/node_modules/browserstack/.jscsrc b/test-eol-project/node_modules/browserstack/.jscsrc new file mode 100644 index 00000000..07d407b3 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/.jscsrc @@ -0,0 +1,74 @@ +{ + "disallowKeywords": [ "with" ], + "disallowMixedSpacesAndTabs": "smart", + "disallowMultipleLineBreaks": true, + "disallowMultipleLineStrings": true, + "disallowMultipleSpaces": true, + "disallowOperatorBeforeLineBreak": [ "." ], + "disallowSpaceAfterObjectKeys": true, + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowSpaceBeforeBinaryOperators": [ ",", ":" ], + "disallowSpaceBeforePostfixUnaryOperators": true, + "disallowSpacesInAnonymousFunctionExpression": { + "beforeOpeningRoundBrace": true + }, + "disallowSpacesInCallExpression": true, + "disallowSpacesInFunction": { + "beforeOpeningRoundBrace": true + }, + "disallowSpacesInsideBrackets": true, + "disallowSpacesInsideParentheses": true, + "disallowTrailingComma": true, + "disallowTrailingWhitespace": true, + "maximumLineLength": { + "value": 100, + "tabSize": 4, + "allowUrlComments": true, + "allowRegex": true + }, + "requireCommaBeforeLineBreak": true, + "requireCurlyBraces": [ + "if", + "else", + "for", + "while", + "do", + "try", + "catch" + ], + "requireDotNotation": true, + "requireLineBreakAfterVariableAssignment": true, + "requireLineFeedAtFileEnd": true, + "requireOperatorBeforeLineBreak": true, + "requirePaddingNewLinesBeforeLineComments": true, + "requireParenthesesAroundIIFE": true, + "requireSemicolons": true, + "requireSpaceAfterBinaryOperators": true, + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do", + "switch", + "return", + "try", + "catch" + ], + "requireSpaceAfterLineComment": true, + "requireSpaceBeforeBinaryOperators": true, + "requireSpaceBeforeBlockStatements": true, + "requireSpaceBeforeObjectValues": true, + "requireSpaceBetweenArguments": true, + "requireSpacesInAnonymousFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "requireSpacesInConditionalExpression": true, + "requireSpacesInForStatement": true, + "requireSpacesInFunction": { + "beforeOpeningCurlyBrace": true + }, + "requireSpacesInsideObjectBrackets": "all", + "validateLineBreaks": "LF", + "validateQuoteMarks": "\"" +} diff --git a/test-eol-project/node_modules/browserstack/.jshintrc b/test-eol-project/node_modules/browserstack/.jshintrc new file mode 100644 index 00000000..19e2a2e8 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/.jshintrc @@ -0,0 +1,24 @@ +{ + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "expr": true, + "immed": true, + "noarg": true, + "smarttabs": true, + "trailing": true, + "undef": true, + "unused": true, + + "node": true, + "esnext": true, + + "globals": { + "afterEach": false, + "beforeEach": false, + "define": false, + "describe": false, + "it": false + } +} diff --git a/test-eol-project/node_modules/browserstack/.travis.yml b/test-eol-project/node_modules/browserstack/.travis.yml new file mode 100644 index 00000000..ebc97d3a --- /dev/null +++ b/test-eol-project/node_modules/browserstack/.travis.yml @@ -0,0 +1,4 @@ +sudo: false +language: node_js +node_js: +- node diff --git a/test-eol-project/node_modules/browserstack/LICENSE-MIT.txt b/test-eol-project/node_modules/browserstack/LICENSE-MIT.txt new file mode 100644 index 00000000..ceaf503a --- /dev/null +++ b/test-eol-project/node_modules/browserstack/LICENSE-MIT.txt @@ -0,0 +1,26 @@ +Copyright node-browserstack contributors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/scottgonzalez/node-browserstack. + +==== + +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/test-eol-project/node_modules/browserstack/lib/api.js b/test-eol-project/node_modules/browserstack/lib/api.js new file mode 100644 index 00000000..0674acd3 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/api.js @@ -0,0 +1,280 @@ +var util = require("util"); +var BaseClient = require("./client"); +var extend = require("./extend"); + +function ApiBaseClient(settings) { + this.server = { + host: "api.browserstack.com" + }; + BaseClient.call(this, settings); +} + +util.inherits(ApiBaseClient, BaseClient); + +// public API +extend(ApiBaseClient.prototype, { + getBrowsers: function(fn) { + this._getBrowsers(function(error, browsers) { + if (!error) { + this.updateLatest(browsers); + } + + fn(error, browsers); + }.bind(this)); + }, + + createWorker: function(options, fn) { + if (options[this.versionField] === "latest") { + return this.getLatest(options, function(error, version) { + if (error) { + return fn(error); + } + + options = extend({}, options); + options[this.versionField] = version; + this.createWorker(options, fn); + }.bind(this)); + } + + var data = JSON.stringify(options); + this.request({ + path: this.path("/worker"), + method: "POST" + }, data, fn); + }, + + getWorker: function(id, fn) { + this.request({ + path: this.path("/worker/" + id) + }, fn); + }, + + changeUrl: function(id, options, fn) { + var data = JSON.stringify(options); + this.request({ + path: this.path("/worker/" + id + "/url.json"), + method: "PUT" + }, data, fn); + }, + + terminateWorker: function(id, fn) { + this.request({ + path: this.path("/worker/" + id), + method: "DELETE" + }, fn); + }, + + getWorkers: function(fn) { + this.request({ + path: this.path("/workers") + }, fn); + }, + + getLatest: function(browser, fn) { + var latest = this.latest; + + if (typeof browser === "function") { + fn = browser; + browser = null; + } + + // there may be a lot of createWorker() calls with "latest" version + // so minimize the number of calls to getBrowsers() + if (this.latestPending) { + return setTimeout(function() { + this.getLatest(browser, fn); + }.bind(this), 50); + } + + // only cache browsers for one day + if (!latest || this.latestUpdate < (new Date() - 864e5)) { + this.latestPending = true; + return this.getBrowsers(function(error) { + this.latestPending = false; + + if (error) { + return fn(error); + } + + this.getLatest(browser, fn); + }.bind(this)); + } + + process.nextTick(function() { + fn(null, browser ? latest[this.getBrowserId(browser)] : extend({}, latest)); + }.bind(this)); + }, + + takeScreenshot: function(id, fn) { + this.request({ + path: this.path("/worker/" + id + "/screenshot.json") + }, fn); + } +}); + +// internal API +extend(ApiBaseClient.prototype, { + latest: null, + latestUpdate: 0, + latestPending: false, + + path: function(path) { + return "/" + this.version + path; + }, + + updateLatest: function(browsers) { + var latest = this.latest = {}; + var getBrowserId = this.getBrowserId.bind(this); + var versionField = this.versionField; + + this.latestUpdate = new Date(); + browsers.forEach(function(browser) { + var version = browser[versionField]; + var browserId = getBrowserId(browser); + + // ignore devices that don't have versions + if (!version) { + return; + } + + // ignore pre-release versions + if (/\s/.test(version)) { + return; + } + + if (parseFloat(version) > (parseFloat(latest[browserId]) || 0)) { + latest[browserId] = version; + } + }); + }, + + getBrowserId: function(browser) { + return this._getBrowserId(browser).toLowerCase(); + } +}); + +// Versions + +ApiBaseClient.versions = {}; +ApiBaseClient.latestVersion = 0; +ApiBaseClient.createVersion = function(version, prototype) { + function ApiClient(settings) { + ApiBaseClient.call(this, settings); + } + + util.inherits(ApiClient, ApiBaseClient); + + ApiClient.prototype.version = version; + extend(ApiClient.prototype, prototype); + + ApiBaseClient.versions[version] = ApiClient; + ApiBaseClient.latestVersion = Math.max(ApiBaseClient.latestVersion, version); +}; + +ApiBaseClient.createVersion(1, { + useHttp: true, + + versionField: "version", + + _getBrowsers: function(fn) { + this.request({ + path: this.path("/browsers") + }, fn); + }, + + _getBrowserId: function(browser) { + return browser.browser; + } +}); + +ApiBaseClient.createVersion(2, { + useHttp: true, + + versionField: "version", + + _getBrowsers: function(fn) { + this.request({ + path: this.path("/browsers") + }, function(error, osBrowsers) { + if (error) { + return fn(error); + } + + fn(null, [].concat.apply([], + Object.keys(osBrowsers).map(function(os) { + return osBrowsers[os].map(function(browser) { + browser.os = os; + return browser; + }); + }) + )); + }); + }, + + _getBrowserId: function(browser) { + return browser.os + ":" + (browser.browser || browser.device); + } +}); + +ApiBaseClient.createVersion(3, { + useHttp: true, + + versionField: "browser_version", + + _getBrowsers: function(fn) { + this.request({ + path: this.path("/browsers?flat=true") + }, fn); + }, + + _getBrowserId: function(browser) { + var id = browser.os + ":" + browser.os_version + ":" + browser.browser; + if (browser.device) { + id += ":" + browser.device; + } + + return id; + }, + + getApiStatus: function(fn) { + this.request({ + path: this.path("/status") + }, fn); + } +}); + +ApiBaseClient.createVersion(4, { + versionField: "browser_version", + + _getBrowsers: function(fn) { + this.request({ + path: this.path("/browsers?flat=true") + }, fn); + }, + + _getBrowserId: function(browser) { + var id = browser.os + ":" + browser.os_version + ":" + browser.browser; + if (browser.device) { + id += ":" + browser.device; + } + + return id; + }, + + getApiStatus: function(fn) { + this.request({ + path: this.path("/status") + }, fn); + } +}); + +module.exports = { + createClient: function(settings) { + var ApiClient = ApiBaseClient.versions[settings.version || ApiBaseClient.latestVersion]; + if (!ApiClient) { + throw new Error("Invalid version"); + } + + return new ApiClient(settings); + } +}; diff --git a/test-eol-project/node_modules/browserstack/lib/app-automate.js b/test-eol-project/node_modules/browserstack/lib/app-automate.js new file mode 100644 index 00000000..f07951ea --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/app-automate.js @@ -0,0 +1,119 @@ +var util = require("util"); +var querystring = require("querystring"); +var BaseClient = require("./client"); +var extend = require("./extend"); + +function AppAutomateClient(settings) { + this.server = { + host: "api.browserstack.com" + }; + BaseClient.call(this, settings); +} + +util.inherits(AppAutomateClient, BaseClient); + +// public API +extend(AppAutomateClient.prototype, { + getPlan: function(fn) { + this.request({ + path: this.path("/plan.json") + }, fn); + }, + + getProjects: function(fn) { + this.request({ + path: this.path("/projects.json") + }, this.handleResponse(fn, this.stripChildKeys("automation_project"))); + }, + + getProject: function(id, fn) { + this.request({ + path: this.path("/projects/" + id + ".json") + }, this.handleResponse(fn, function(project) { + project = project.project; + project.builds = this.stripChildKeys("automation_build")(project.builds); + return project; + }.bind(this))); + }, + + getBuilds: function(options, fn) { + if (typeof options === "function") { + fn = options; + options = {}; + } + + this.request({ + path: this.path("/builds.json?" + querystring.stringify(options)) + }, this.handleResponse(fn, this.stripChildKeys("automation_build"))); + }, + + getSessions: function(buildId, options, fn) { + if (typeof fn === "undefined") { + fn = options; + options = {}; + } + + this.request({ + path: this.path("/builds/" + buildId + "/sessions.json?" + + querystring.stringify(options)) + }, this.handleResponse(fn, this.stripChildKeys("automation_session"))); + }, + + getSession: function(id, fn) { + this.request({ + path: this.path("/sessions/" + id + ".json") + }, this.handleResponse(fn, this.stripKey("automation_session"))); + }, + + updateSession: function(id, options, fn) { + var data = JSON.stringify(options); + this.request({ + method: "PUT", + path: this.path("/sessions/" + id + ".json") + }, data, this.handleResponse(fn, this.stripKey("automation_session"))); + }, + + deleteSession: function(id, fn) { + this.request({ + method: "DELETE", + path: this.path("/sessions/" + id + ".json") + }, fn); + } +}); + +// internal API +extend(AppAutomateClient.prototype, { + path: function(path) { + return "/app-automate" + path; + }, + + handleResponse: function(fn, modifier) { + return function(error, data) { + if (error) { + return fn(error); + } + + fn(null, modifier(data)); + }; + }, + + stripKey: function(key) { + return function(item) { + return item[key]; + }; + }, + + stripChildKeys: function(key) { + return function(items) { + return items.map(function(item) { + return item[key]; + }); + }; + } +}); + +module.exports = { + createClient: function(settings) { + return new AppAutomateClient(settings); + } +}; diff --git a/test-eol-project/node_modules/browserstack/lib/automate.js b/test-eol-project/node_modules/browserstack/lib/automate.js new file mode 100644 index 00000000..f9914056 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/automate.js @@ -0,0 +1,125 @@ +var util = require("util"); +var querystring = require("querystring"); +var BaseClient = require("./client"); +var extend = require("./extend"); + +function AutomateClient(settings) { + this.server = { + host: "api.browserstack.com" + }; + BaseClient.call(this, settings); +} + +util.inherits(AutomateClient, BaseClient); + +// public API +extend(AutomateClient.prototype, { + getPlan: function(fn) { + this.request({ + path: this.path("/plan.json") + }, fn); + }, + + getBrowsers: function(fn) { + this.request({ + path: this.path("/browsers.json") + }, fn); + }, + + getProjects: function(fn) { + this.request({ + path: this.path("/projects.json") + }, this.handleResponse(fn, this.stripChildKeys("automation_project"))); + }, + + getProject: function(id, fn) { + this.request({ + path: this.path("/projects/" + id + ".json") + }, this.handleResponse(fn, function(project) { + project = project.project; + project.builds = this.stripChildKeys("automation_build")(project.builds); + return project; + }.bind(this))); + }, + + getBuilds: function(options, fn) { + if (typeof options === "function") { + fn = options; + options = {}; + } + + this.request({ + path: this.path("/builds.json?" + querystring.stringify(options)) + }, this.handleResponse(fn, this.stripChildKeys("automation_build"))); + }, + + getSessions: function(buildId, options, fn) { + if (typeof fn === "undefined") { + fn = options; + options = {}; + } + + this.request({ + path: this.path("/builds/" + buildId + "/sessions.json?" + + querystring.stringify(options)) + }, this.handleResponse(fn, this.stripChildKeys("automation_session"))); + }, + + getSession: function(id, fn) { + this.request({ + path: this.path("/sessions/" + id + ".json") + }, this.handleResponse(fn, this.stripKey("automation_session"))); + }, + + updateSession: function(id, options, fn) { + var data = JSON.stringify(options); + this.request({ + method: "PUT", + path: this.path("/sessions/" + id + ".json") + }, data, this.handleResponse(fn, this.stripKey("automation_session"))); + }, + + deleteSession: function(id, fn) { + this.request({ + method: "DELETE", + path: this.path("/sessions/" + id + ".json") + }, fn); + } +}); + +// internal API +extend(AutomateClient.prototype, { + path: function(path) { + return "/automate" + path; + }, + + handleResponse: function(fn, modifier) { + return function(error, data) { + if (error) { + return fn(error); + } + + fn(null, modifier(data)); + }; + }, + + stripKey: function(key) { + return function(item) { + return item[key]; + }; + }, + + stripChildKeys: function(key) { + return function(items) { + return items.map(function(item) { + return item[key]; + }); + }; + } +}); + +module.exports = { + createClient: function(settings) { + return new AutomateClient(settings); + } +}; diff --git a/test-eol-project/node_modules/browserstack/lib/browserstack.js b/test-eol-project/node_modules/browserstack/lib/browserstack.js new file mode 100644 index 00000000..28b98644 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/browserstack.js @@ -0,0 +1,11 @@ +var browserstackApi = require("./api"); +var browserstackAutomate = require("./automate"); +var browserstackAppAutomate = require("./app-automate"); +var browserstackScreenshot = require("./screenshot"); + +module.exports = { + createClient: browserstackApi.createClient, + createAutomateClient: browserstackAutomate.createClient, + createAppAutomateClient: browserstackAppAutomate.createClient, + createScreenshotClient: browserstackScreenshot.createClient +}; diff --git a/test-eol-project/node_modules/browserstack/lib/client.js b/test-eol-project/node_modules/browserstack/lib/client.js new file mode 100644 index 00000000..2df5dfd1 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/client.js @@ -0,0 +1,94 @@ +var https = require("https"); +var http = require("http"); +var extend = require("./extend"); +var HttpsProxyAgent = require("https-proxy-agent"); +var userAgent = getUA(); + +function getUA() { + var os = require("os"); + var version = require("../package.json").version; + + return os.platform() + "/" + os.release() + " " + + "node/" + process.versions.node + " " + + "node-browserstack/" + version; +} + +var BaseClient = function(settings) { + if (!settings.username) { + throw new Error("Username is required."); + } + if (!settings.password) { + throw new Error("Password is required."); + } + + extend(this, settings); + + this.authHeader = "Basic " + + Buffer.from(this.username + ":" + this.password).toString("base64"); +}; + +BaseClient.prototype.request = function(options, data, fn) { + if (typeof data === "function") { + fn = data; + data = null; + } + + fn = fn || function() {}; + + var reqOptions = extend({ + host: this.server.host, + port: this.server.port, + method: "GET", + headers: { + authorization: this.authHeader, + "content-type": "application/json", + "user-agent": userAgent, + "content-length": typeof data === "string" ? data.length : 0 + }, + agent: (this.proxy) ? new HttpsProxyAgent(this.proxy) : null + }, options); + + var req = (this.useHttp ? http : https).request(reqOptions, function(res) { + var response = ""; + res.setEncoding("utf8"); + res.on("data", function(chunk) { + response += chunk; + }); + res.on("end", function() { + if (res.statusCode !== 200) { + var message; + if (res.headers["content-type"].indexOf("json") !== -1) { + response = JSON.parse(response); + message = response.message; + if (response.errors) { + if (Array.isArray(response.errors) && response.errors.length) { + message += " - " + response.errors.map(function(error) { + return "`" + error.field + "` " + error.code; + }).join(", "); + } else { + message += " - " + response.errors.toString(); + } + } + } else { + message = response; + } + if (!message && res.statusCode === 403) { + message = "Forbidden"; + } + fn(new Error(message)); + } else { + fn(null, JSON.parse(response)); + } + }); + }); + + req.on("error", fn); + + if (data) { + req.write(data); + } + + req.end(); +}; + +module.exports = BaseClient; diff --git a/test-eol-project/node_modules/browserstack/lib/extend.js b/test-eol-project/node_modules/browserstack/lib/extend.js new file mode 100644 index 00000000..8ea5f7d0 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/extend.js @@ -0,0 +1,7 @@ +module.exports = function(a, b) { + for (var p in b) { + a[p] = b[p]; + } + + return a; +}; diff --git a/test-eol-project/node_modules/browserstack/lib/screenshot.js b/test-eol-project/node_modules/browserstack/lib/screenshot.js new file mode 100644 index 00000000..2329e98d --- /dev/null +++ b/test-eol-project/node_modules/browserstack/lib/screenshot.js @@ -0,0 +1,48 @@ +var util = require("util"); +var BaseClient = require("./client"); +var extend = require("./extend"); + +function ScreenshotClient(settings) { + this.server = { + host: "www.browserstack.com" + }; + BaseClient.call(this, settings); +} + +util.inherits(ScreenshotClient, BaseClient); + +// public API +extend(ScreenshotClient.prototype, { + getBrowsers: function(fn) { + this.request({ + path: this.path("/browsers.json") + }, fn); + }, + + generateScreenshots: function(options, fn) { + var data = JSON.stringify(options); + this.request({ + method: "POST", + path: this.path("") + }, data, fn); + }, + + getJob: function(id, fn) { + this.request({ + path: this.path("/" + id + ".json") + }, fn); + } +}); + +// internal API +extend(ScreenshotClient.prototype, { + path: function(path) { + return "/screenshots" + path; + } +}); + +module.exports = { + createClient: function(settings) { + return new ScreenshotClient(settings); + } +}; diff --git a/test-eol-project/node_modules/browserstack/package.json b/test-eol-project/node_modules/browserstack/package.json new file mode 100644 index 00000000..9f23de0a --- /dev/null +++ b/test-eol-project/node_modules/browserstack/package.json @@ -0,0 +1,41 @@ +{ + "name": "browserstack", + "title": "BrowserStack Client", + "description": "A client for working with the BrowserStack APIs.", + "version": "1.6.1", + "homepage": "https://github.com/scottgonzalez/node-browserstack", + "author": "Scott González (http://scottgonzalez.com)", + "contributors": [ + "Simon Tarchichi " + ], + "repository": { + "type": "git", + "url": "git://github.com/scottgonzalez/node-browserstack.git" + }, + "bugs": "https://github.com/scottgonzalez/node-browserstack/issues", + "license": "MIT", + "dependencies": { + "https-proxy-agent": "^2.2.1" + }, + "devDependencies": { + "jscs": "2.8.0", + "jshint": "2.8.0", + "mocha": "2.4.5", + "should": "8.2.1" + }, + "main": "lib/browserstack.js", + "scripts": { + "jscs": "jscs lib/* test/*", + "jscs-fix": "jscs lib/* test/* --fix", + "jshint": "jshint lib/* test/*", + "lint": "npm run jscs && npm run jshint", + "test": "npm run lint && mocha" + }, + "keywords": [ + "automation", + "browser", + "browserstack", + "screenshot", + "testing" + ] +} diff --git a/test-eol-project/node_modules/browserstack/readme.md b/test-eol-project/node_modules/browserstack/readme.md new file mode 100644 index 00000000..fb9ff819 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/readme.md @@ -0,0 +1,477 @@ +# node-browserstack + +A node.js JavaScript client for working with [BrowserStack](http://browserstack.com) through its [REST API](https://github.com/browserstack/api) (*aka* Javascript Testing API), [Automate API](https://www.browserstack.com/automate/rest-api), [App Automate API](https://www.browserstack.com/app-automate/rest-api), and [Screenshots API](https://www.browserstack.com/screenshots/api). + +## Installation + +``` +npm install browserstack +``` + +## Usage + +```javascript +var BrowserStack = require("browserstack"); +var browserStackCredentials = { + username: "foo", + password: "p455w0rd!!1" +}; + +// REST API +var client = BrowserStack.createClient(browserStackCredentials); + +client.getBrowsers(function(error, browsers) { + console.log("The following browsers are available for testing"); + console.log(browsers); +}); + +// Automate API +var automateClient = BrowserStack.createAutomateClient(browserStackCredentials); + +automateClient.getBrowsers(function(error, browsers) { + console.log("The following browsers are available for automated testing"); + console.log(browsers); +}); + +// App Automate API +// Show the upload builds for mobile app automation +var appAutomateClient = BrowserStack.createAppAutomateClient(browserStackCredentials); + +appAutomateClient.getBuilds(function(error, builds) { + console.log("The following builds are available for app automated testing"); + console.log(builds); +}); + +// Screenshots API +var screenshotClient = BrowserStack.createScreenshotClient(browserStackCredentials); + +screenshotClient.getBrowsers(function(error, browsers) { + console.log("The following browsers are available for screenshots"); + console.log(browsers); +}); +``` + +## API + +### Objects + +#### browser objects + +A common pattern in the APIs is a "browser object" which is just a plain object with the following properties: + +* `os`: The operating system. +* `os_version`: The operating system version. +* `browser`: The browser name. +* `browser_version`: The browser version. +* `device`: The device name. + +A browser object may only have one of `browser` or `device` set; which property is set will depend on `os`. + +#### worker objects + +Worker objects are extended [browser objects](#browser-objects) which contain the following additional properties: + +* `id`: The worker id. +* `status`: A string representing the current status of the worker. + * Possible statuses: `"running"`, `"queue"`. + +#### project objects + +Project objects are plain objects which contain the following properties: + +* `id`: The id of the project. +* `name`: The name of the project. +* `created_at`: When the project was created. +* `updated_at`: When the project was most recently updated. +* `user_id` +* `group_id` + +#### build objects + +Build objects are plain objects which contain the following properties: + +* `hashed_id`: The hashed if of the build. +* `name`: The name of the build. +* `status`: The status of the build. +* `duration` + +#### extended build objects + +Extended build objects are [build objects](#build-objects) with the following additional properties: + +* `id`: The id of the build. +* `automation_project_id`: The id of the project this build belongs to. +* `updated_at`: When the build was created. +* `created_at`: When the build was most recently updated. +* `delta` +* `tags` +* `user_id` +* `group_id` + +#### session objects + +Session objects are extended [browser objects](#browser-objects) which contain the following additional properties: + +* `hashed_id`: The hashed ID of the session. +* `name`: The name of the session. +* `build_name`: The name of the build this session belongs to. +* `project_name`: The name of the project this session belongs to. +* `status`: The status of the session. +* `browser_url`: The most recenly loaded URL the worker. +* `duration`: The duration in seconds that the session has been active. +* `logs`: The URL for the session logs. +* `video_url`: The URL for the session video. +* `reason`: The reason the session was terminated. + +#### screenshot job objects + +Screenshot job objects are plain objects which contain the following properties: + +* `job_id`: The id of the job. +* `state`: The state of the job. +* `win_res`: The screen resolution for browsers running on Windows. May be one of: `"1024x768"`, `"1280x1024"`. +* `mac_res`: The screen resolution for browsers running on Mac OS X. May be one of: `"1024x768"`, `"1280x960"`, `"1280x1024"`, `"1600x1200"`, `"1920x1080"`. +* `orientation`: The screen orientation for devices. May be one of: `"portrait"`, `"landscape"`. +* `quality`: The quality of the screenshot. May be one of: `"original"`, `"compressed"`. +* `wait_time`: The number of seconds to wait before taking the screenshot. May be one of: `2`, `5`, `10`, `15`, `20`, `60`. +* `local`: Boolean indicating whether a local testing connection should be used. +* `browsers`: A collection of [browser objects](#browser-objects) indicating which browsers and devices to take screenshots with. + +### screenshot state objects + +Screenshot state objects are extended [browser objects](#browser-objects) which contain the following additional properties: + +* `id`: The id of the screenshot object. +* `state`: The state of the screenshot. +* `url`: The URL of the page the screenshot was generated from. +* `thumb_url`: The URL for the screenshot thumbnail. +* `image_url`: The URL for the full-size screenshot. +* `created_at`: The timestamp indicating when the screenshot was generated. + +### REST API v4 + +*Note: For earlier versions of the API, please see [the wiki](https://github.com/scottgonzalez/node-browserstack/wiki/API).* + +#### BrowserStack.createClient(settings) + +Creates a new client instance. + +* `settings`: A hash of settings that apply to all requests for the new client. + * `username`: The username for the BrowserStack account. + * `password`: The password for the BrowserStack account. + * `version` (optional; default: `4`): Which version of the BrowserStack API to use. + * `server` (optional; default: `{ host: "api.browserstack.com", port: 80 }`): An object containing `host` and `port` to connect to a different BrowserStack API compatible service. + * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack (or `settings.server`). e.g. `"http://proxy.example.com:1234"` + +#### client.getBrowsers(callback) + +Gets the list of available browsers. + +* `callback` (`function(error, browsers)`): A callback to invoke when the API call is complete. + * `browsers`: An array of [browser objects](#browser-objects). + +#### client.createWorker(settings, callback) + +Creates a worker. + +* `settings`: A hash of settings for the worker (an extended [browser object](#browser-objects)). + * `os`: See [browser object](#browser-objects) for details. + * `os_version`: See [browser object](#browser-objects) for details. + * `browser`: See [browser object](#browser-objects) for details. + * `browser_version`: See [browser object](#browser-objects) for details. + * `device`: See [browser object](#browser-objects) for details. + * `url` (optional): Which URL to navigate to upon creation. + * `timeout` (optional): Maximum life of the worker (in seconds). Maximum value of `1800`. Specifying `0` will use the default of `300`. + * `name` (optional): Provide a name for the worker. + * `build` (optional): Group workers into a build. + * `project` (optional): Provide the project the worker belongs to. + * `browserstack.video` (optional): Set to `false` to disable video recording. +* `callback` (`function(error, worker)`): A callback to invoke when the API call is complete. + * `worker` A [worker object](#worker-objects). + +*Note: A special value of `"latest"` is supported for `browser_version`, which will use the latest stable version.* + +#### client.getWorker(id, callback) + +Gets the status of a worker. + +* `id`: The id of the worker. +* `callback` (`function(error, worker)`): A callback to invoke when the API call is complete. + * `worker`: A [worker object](#worker-objects). + +#### client.changeUrl(id, options, callback) + +Change the URL of a worker. + +* `id`: The id of the worker. +* `options`: Configuration for the URL change. + * `url`: The new URL to set. + * `timeout` (optional): Set a new timeout for this worker, see [createWorker](#client.CreateWorker) for details. +* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. + * `data`: An object with a `message`, confirming the URL change. + +#### client.terminateWorker(id, callback) + +Terminates an active worker. + +* `id`: The id of the worker to terminate. +* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. + * `data`: An object with a `time` property indicating how long the worker was alive. + +#### client.getWorkers(callback) + +Gets the status of all workers. + +* `callback` (`function(error, workers)`): A callback to invoke when the API call is complete. + * `workers`: An array of [worker objects](#worker-objects). + +#### client.takeScreenshot(id, callback) + +Take a screenshot at current state of worker. + +* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. + * `data`: An object with a `url` property having the public url for the screenshot. + +#### client.getLatest(browser, callback) + +Gets the latest version of a browser. + +* `browser`: Which browser to get the latest version for. See [browser object](#browser-objects) for details. +* `callback` (`function(error, version)`): A callback to invoke when the version is determined. + * `version`: The latest version of the browser. + +*Note: Since mobile devices do not have version numbers, there is no latest version.* + +#### client.getLatest(callback) + +Gets the latest version of all browsers. + +* `callback` (`function(error, versions)`): A callback to invoke when the versions are determined. + * `versions`: A hash of browser names and versions. + +#### client.getApiStatus(callback) + +* `callback` (`function(error, status)`): A callback to invoke when the status is determined. + * `used_time`: Time used so far this month, in seconds. + * `total_available_time`: Total available time, in seconds. Paid plans have unlimited API time and will receive the string `"Unlimited Testing Time"` instead of a number. + * `running_sessions`: Number of running sessions. + * `sessions_limit`: Number of allowable concurrent sessions. + +### Automate API + +#### BrowserStack.createAutomateClient(settings) + +Creates a new client instance. + +* `settings`: A hash of settings that apply to all requests for the new client. + * `username`: The username for the BrowserStack account. + * `password`: The password for the BrowserStack account. + * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack. e.g. `"http://proxy.example.com:1234"` + +#### automateClient.getPlan(callback) + +Gets information about your group's Automate plan, including the maximum number of parallel sessions allowed and the number of parallel sessions currently running. + +* `callback` (`function(error, plan)`): A callback to invoke when the API call is complete. + * `plan`: An object with `parallel_sessions_max_allowed`, `parallel_sessions_running`, and `automate_plan` showing the current state of your plan. + +#### automateClient.getBrowsers(callback) + +Gets the list of available browsers. + +* `callback` (`function(error, browsers)`): A callback to invoke when the API call is complete. + * `browsers`: An array of [browser objects](#browser-objects). + +#### automateClient.getProjects(callback) + +Gets the list of projects. + +* `callback` (`function(error, projects)`): A callback to invoke when the API call is complete. + * `projects`: An array of [project objects](#project-objects). + +#### automateClient.getProject(id, callback) + +Gets information about a project. + +* `id`: The ID of the project. +* `callback` (`function(error, project)`): A callback to invoke when the API call is complete. + * `project`: A [project object](#project-objects) including an array of [extended build objects](#build-objects). + +#### automateClient.getBuilds([options,] callback) + +Gets the list of builds. + +* `options` (optional): An object containing search parameters. + * `limit`: The number of builds to return. Defaults to `10`. + * `status`: Filter builds based on status. May be one of `"running"`, `"done"`, `"failed"`, `"timeout"`. +* `callback` (`function(error, builds)`): A callback to invoke when the API call is complete. + * `builds`: An array of [build objects](#build-objects). + +#### automateClient.getSessions(buildId, [options,] callback) + +Gets the list of sessions in a build. + +* `buildId`: The hashed ID of the build. +* `options` (optional): An object containing search parameters. + * `limit`: The number of sessions to return. Defaults to `10`. + * `status`: Filter sessions based on status. May be one of `"running"`, `"done"`, `"failed"`. +* `callback` (`function(error, sessions)`): A callback to invoke when the API call is complete. + * `sessions`: An array of [session objects](#session-objects). + +#### automateClient.getSession(id, callback) + +Gets the details for a session. + +* `id`: The hashed ID of the session. +* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. + * `session`: A [session object](#session-objects). + +#### automateClient.updateSession(id, options, callback) + +Updates the status of a session. + +* `id`: The hashed ID of the session. +* `options`: An object containing the parameters. + * `status`: New status value. [May be one of](https://www.browserstack.com/automate/rest-api#rest-api-sessions) `"completed"` or `"error"`. +* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. + * `session`: The updated [session object](#session-objects). + +#### automateClient.deleteSession(id, callback) + +Deletes a session. + +* `id`: The hashed ID of the session. +* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. + * `data`: An object with a `message`, confirming the deletion. + +### App Automate API + +#### BrowserStack.createAppAutomateClient(settings) + +Creates a new client instance. + +* `settings`: A hash of settings that apply to all requests for the new client. + * `username`: The username for the BrowserStack account. + * `password`: The password for the BrowserStack account. + * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack. e.g. `"http://proxy.example.com:1234"` + +#### automateClient.getPlan(callback) + +Gets information about your group's App Automate plan, including the maximum number of parallel sessions allowed and the number of parallel sessions currently running. + +* `callback` (`function(error, plan)`): A callback to invoke when the API call is complete. + * `plan`: An object with `parallel_sessions_max_allowed`, `parallel_sessions_running`, and `automate_plan` showing the current state of your plan. + +#### automateClient.getProjects(callback) + +Gets the list of projects. + +* `callback` (`function(error, projects)`): A callback to invoke when the API call is complete. + * `projects`: An array of [project objects](#project-objects). + +#### automateClient.getProject(id, callback) + +Gets information about a project. + +* `id`: The ID of the project. +* `callback` (`function(error, project)`): A callback to invoke when the API call is complete. + * `project`: A [project object](#project-objects) including an array of [extended build objects](#build-objects). + +#### automateClient.getBuilds([options,] callback) + +Gets the list of builds. + +* `options` (optional): An object containing search parameters. + * `limit`: The number of builds to return. Defaults to `10`. + * `status`: Filter builds based on status. May be one of `"running"`, `"done"`, `"failed"`, `"timeout"`. +* `callback` (`function(error, builds)`): A callback to invoke when the API call is complete. + * `builds`: An array of [build objects](#build-objects). + +#### automateClient.getSessions(buildId, [options,] callback) + +Gets the list of sessions in a build. + +* `buildId`: The hashed ID of the build. +* `options` (optional): An object containing search parameters. + * `limit`: The number of sessions to return. Defaults to `10`. + * `status`: Filter sessions based on status. May be one of `"running"`, `"done"`, `"failed"`. +* `callback` (`function(error, sessions)`): A callback to invoke when the API call is complete. + * `sessions`: An array of [session objects](#session-objects). + +#### automateClient.getSession(id, callback) + +Gets the details for a session. + +* `id`: The hashed ID of the session. +* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. + * `session`: A [session object](#session-objects). + +#### automateClient.updateSession(id, options, callback) + +Updates the status of a session. + +* `id`: The hashed ID of the session. +* `options`: An object containing the parameters. + * `status`: New status value. [May be one of](https://www.browserstack.com/automate/rest-api#rest-api-sessions) `"completed"` or `"error"`. +* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. + * `session`: The updated [session object](#session-objects). + +#### automateClient.deleteSession(id, callback) + +Deletes a session. + +* `id`: The hashed ID of the session. +* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. + * `data`: An object with a `message`, confirming the deletion. + +### Screenshots API + +#### BrowserStack.createScreenshotClient(settings) + +Creates a new client instance. + +* `settings`: A hash of settings that apply to all requests for the new client. + * `username`: The username for the BrowserStack account. + * `password`: The password for the BrowserStack account. + * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack. e.g. `"http://proxy.example.com:1234"` + +#### screenshotClient.getBrowsers(callback) + +Gets the list of available browsers. + +* `callback` (`function(error, browsers)`): A callback to invoke when the API call is complete. + * `browsers`: An array of [browser objects](#browser-objects). + +#### screenshotClient.generateScreenshots(options, callback) + +Creates a job to take screenshots. + +* `options`: A hash of settings for the screenshots. See [screenshot job objects](#screenshot-job-objects) for details. + * `url`: The URL of the desired page. + * `browsers`: A collection of [browser objects](#browser-objects) indicating which browsers and devices to take screenshots with. + * `win_res` (optional): Only required if taking a screenshot on Windows. Defaults to `"1024x768"`. + * `mac_res` (optional): Only required if taking a screenshot on Mac OS X. Defaults to "1024x768"`. + * `orientation` (optional): Defaults to `"portrait"`. + * `quality` (optional): Defaults to `"compressed"`. + * `wait_time` (optional): Defaults to `5`. + * `local` (optional): Defaults to `false`. +* `callback` (`function(error, job)`): A callback to invoke when the API call is complete. + * `job`: A [screenshot job object](#screenshot-job-objects) containing [screenshot state objects](#screenshot-state-objects) in place of [browser objects](#browser-objects). + +#### screenshotClient.getJob(id, callback) + +Gets details about the current status of a screenshot job. + +* `id`: The id of the job. +* `callback` (`function(error, job)`): A callback to invoke when the API call is complete. + * `job`: A [screenshot job object](#screenshot-job-objects) containing [screenshot state objects](#screenshot-state-objects) in place of [browser objects](#browser-objects). + +## Tests + +To run the full test suite, you must have a BrowserStack account. Run `npm test` with the `BROWSERSTACK_USERNAME` and `BROWSERSTACK_KEY` environment variables set. + +To run just the lint checks, run `npm lint`. + +## License + +Copyright node-browserstack contributors. Released under the terms of the MIT license. diff --git a/test-eol-project/node_modules/browserstack/test/api.js b/test-eol-project/node_modules/browserstack/test/api.js new file mode 100644 index 00000000..2db15534 --- /dev/null +++ b/test-eol-project/node_modules/browserstack/test/api.js @@ -0,0 +1,352 @@ +"use strict"; + +var should = require("should"); +var BrowserStack = require("../lib/browserstack"); +var util = require("./util"); + +var username = util.browserStack.username; +var password = util.browserStack.password; + +if (!username || !password) { + throw new Error("Please set BROWSERSTACK_USERNAME and BROWSERSTACK_KEY environment variables."); +} + +describe("BrowserStack API", function() { + this.timeout(60000); // 60s + + var client; + var workers = []; + + beforeEach(function() { + client = BrowserStack.createClient({ + username: username, + password: password + }); + }); + + afterEach(function(done) { + util.terminateWorkers(client, workers, function() { + workers = []; + done(); + }); + }); + + describe("API Status", function() { + it("should get API status", function(done) { + client.getApiStatus(function(err, status) { + should.ifError(err); + + status.should.be.an.Object().and.have.keys([ + "running_sessions", + "sessions_limit", + "used_time", + "total_available_time" + ]); + + done(err); + }); + }); + }); + + describe("Browser Listing", function() { + it("should list browsers", function(done) { + client.getBrowsers(function(err, browsers) { + should.ifError(err); + + browsers.should.be.an.Array().and.not.be.empty(); + browsers.map(util.validateBrowserObject); + + done(err); + }); + }); + + it("should get latest browser versions", function(done) { + client.getLatest(function(err, versions) { + should.ifError(err); + + versions.should.be.an.Object().and.not.be.empty(); + done(err); + }); + }); + + it("should get the latest version for specified browser", function(done) { + client.getBrowsers(function(err, browsers) { + should.ifError(err); + + browsers = browsers.filter(function(browser) { + return !browser.device; + }); + + var requests = browsers.length; + + browsers.forEach(function(browser) { + client.getLatest(browser, function(err, version) { + should.ifError(err); + version.should.match(/\d+(\.)*\d*/); + + if (err || --requests < 1) { + if (done) { + done(err); + done = null; + } + } + }); + }); + }); + }); + + it("should fail to get the latest version for invalid browser", function(done) { + client.getLatest({ + os: "Windows", + os_version: "10", + browser: "mosaic" + }, function(err, version) { + should.ifError(err); + should.equal(undefined, version); + + done(err); + }); + }); + }); + + describe("Worker API", function() { + var sampleDesktopBrowser = { + os: "Windows", + os_version: "10", + browser: "chrome", + browser_version: "47.0", + timeout: 20 + }; + + var sampleDeviceBrowser = { + device: "Google Nexus 6", + os: "android", + os_version: "5.0", + browser: "Android Browser", + timeout: 20 + }; + + it("should create worker", function(done) { + client.createWorker(util.merge(sampleDesktopBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + done(err); + }); + }); + + it("should create worker with latest edge", function(done) { + client.createWorker({ + os: "Windows", + os_version: "10", + browser: "Edge", + browser_version: "latest", + url: "http://www.example.com", + timeout: 20 + }, function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + done(err); + }); + }); + + it("should fail to create worker for invalid browser", function(done) { + client.createWorker(util.merge(sampleDesktopBrowser, { + url: "http://www.example.com", + browser: "mosaic" + }), function(err, worker) { + err.should.be.an.Error(); + err.message.should.match(/validation failed/i); + + should.not.exist(worker); + done(); + }); + }); + + it("should create a worker with details", function(done) { + client.createWorker(util.merge(sampleDesktopBrowser, { + url: "http://www.example.com", + name: "worker-1", + build: "build-1", + project: "project-1" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + done(err); + }); + }); + + it("should create a worker for a device browser", function(done) { + client.createWorker(util.merge(sampleDeviceBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + done(err); + }); + }); + + it("should fail to create worker for invalid device", function(done) { + client.createWorker(util.merge(sampleDeviceBrowser, { + url: "http://www.example.com", + device: "Nexus 5S" + }), function(err, worker) { + + err.should.be.an.Error(); + err.message.should.match(/validation failed/i); + + should.not.exist(worker); + done(); + }); + }); + + it("should get created worker by id", function(done) { + client.createWorker(util.merge(sampleDeviceBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + + client.getWorker(worker.id, function(err, worker2) { + should.ifError(err); + + util.validateWorker(worker2); + should.equal(worker.id, worker2.id, "Worker id mismatch"); + done(err); + }); + }); + }); + + it("should fetch list of workers", function(done) { + client.createWorker(util.merge(sampleDeviceBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + + client.getWorkers(function(err, workers) { + should.ifError(err); + + workers.should.be.an.Array().and.not.be.empty(); + + var workerExists = workers.filter(function(w) { + util.validateWorker(w); + return (w.id === worker.id); + }).shift(); + + done(workerExists ? null : new Error("failed to fetch created worker")); + }); + }); + }); + + it("should terminate a worker by id", function(done) { + client.createWorker(util.merge(sampleDeviceBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + + client.terminateWorker(worker.id, function(err, data) { + should.ifError(err); + + data.should.be.an.Object(); + data.time.should.match(/\d+/); + + done(err); + }); + }); + }); + }); + + describe("Worker Session APIs", function() { + this.timeout(100000); + + var sampleDesktopBrowser = { + os: "Windows", + os_version: "10", + browser: "chrome", + browser_version: "47.0", + timeout: 120 + }; + + it("should change worker url", function(done) { + client.createWorker(util.merge(sampleDesktopBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + + util.validateWorker(worker); + workers.push(worker); + + util.pollApiWorker(client, worker, function(err, isRunning) { + if (isRunning) { + return client.changeUrl(worker.id, { + url: "http://www.example.net", + timeout: 20 + }, function(err, data) { + should.ifError(err); + + data.should.be.an.Object(); + data.message.should.match(/browser updated with new url/i); + + done(err); + }); + } + + should.ifError(err); + return done(err || new Error("worker remained in queue until timeout")); + }); + + }); + }); + + it("should take screenshot of worker session", function(done) { + client.createWorker(util.merge(sampleDesktopBrowser, { + url: "http://www.example.com" + }), function(err, worker) { + should.ifError(err); + util.validateWorker(worker); + workers.push(worker); + + util.pollApiWorker(client, worker, function(err, isRunning) { + if (isRunning) { + + // wait for page load + var pageLoadTime = 5000; + + return setTimeout(function() { + client.takeScreenshot(worker.id, function(err, data) { + should.ifError(err); + + data.should.be.an.Object(); + data.url.should.match(/^http(s)?:\/\/.*\.png$/i); + + done(err); + }); + }, pageLoadTime); + } + + should.ifError(err); + return done(err || new Error("worker remained in queue until timeout")); + }); + + }); + }); + + }); +}); diff --git a/test-eol-project/node_modules/browserstack/test/client.js b/test-eol-project/node_modules/browserstack/test/client.js new file mode 100644 index 00000000..d33da98a --- /dev/null +++ b/test-eol-project/node_modules/browserstack/test/client.js @@ -0,0 +1,76 @@ +"use strict"; + +var assert = require("assert"); +var BrowserStack = require("../lib/browserstack"); +var util = require("./util"); + +var apiLatestVersion = 4; + +var username = util.browserStack.username; +var password = util.browserStack.password; + +if (!username || !password) { + throw new Error("Please set BROWSERSTACK_USERNAME and BROWSERSTACK_KEY environment variables."); +} + +describe("Public API", function() { + it("exposes API and Screenshots clients", function() { + [ + "createClient", + "createScreenshotClient" + ].forEach(function(fn) { + assert.equal("function", typeof BrowserStack[fn]); + }); + }); + + describe("new ApiClient", function() { + var className = "ApiClient"; + + it("should return an API client", function() { + var client = BrowserStack.createClient({ + username: username, + password: password + }); + + assert.equal(className, client.constructor.name, "instance of " + className); + }); + + it("should return an API client of a particular version", function() { + for (var version = 1; version <= apiLatestVersion; version++) { + var client = BrowserStack.createClient({ + username: username, + password: password, + version: version + }); + + assert.equal(className, client.constructor.name, "instance of ApiClient"); + assert.equal(version, client.version, "ApiClient version mismatch"); + } + }); + + it("should throw an error for invalid ApiClient version", function() { + try { + BrowserStack.createClient({ + username: username, + password: password, + version: -1 + }); + } catch (err) { + assert.ok(err.toString().match(/invalid version/i)); + } + }); + }); + + describe("new ScreenshotClient", function() { + var className = "ScreenshotClient"; + + it("should return a screenshot client", function() { + var client = BrowserStack.createScreenshotClient({ + username: username, + password: password + }); + + assert.equal(className, client.constructor.name, "instance of " + className); + }); + }); +}); diff --git a/test-eol-project/node_modules/browserstack/test/screenshot.js b/test-eol-project/node_modules/browserstack/test/screenshot.js new file mode 100644 index 00000000..fd1cd5dd --- /dev/null +++ b/test-eol-project/node_modules/browserstack/test/screenshot.js @@ -0,0 +1,95 @@ +"use strict"; + +var should = require("should"); +var BrowserStack = require("../lib/browserstack"); +var util = require("./util"); + +var username = util.browserStack.username; +var password = util.browserStack.password; + +if (!username || !password) { + throw new Error("Please set BROWSERSTACK_USERNAME and BROWSERSTACK_KEY environment variables."); +} + +describe("Screenshot API", function() { + this.timeout(300000); // 300s + + var client; + + beforeEach(function() { + client = BrowserStack.createScreenshotClient({ + username: username, + password: password + }); + }); + + it("should list browsers", function(done) { + client.getBrowsers(function(err, browsers) { + should.ifError(err); + + browsers.should.be.an.Array().and.not.be.empty(); + browsers.map(util.validateBrowserObject); + + done(err); + }); + }); + + it("should generate screenshots for multiple browsers", function(done) { + var options = { + url: "http://www.example.com", + browsers: ["40.0", "41.0", "42.0"].map(function(v) { + return { + os: "Windows", + os_version: "7", + browser: "chrome", + browser_version: v + }; + }) + }; + + client.generateScreenshots(options, function(err, job) { + should.ifError(err); + util.validateScreenshotJob(job); + + util.pollScreenshotWorker(client, job, function(err, isRunning) { + if (!err && !isRunning) { + + // this is highly dependent on demand and queue time at BrowserStack; + // little point in stalling the test run waiting for this job to complete + + // print warning in console for user to decide + console.warn("\t[WARN] worker %s did not run within timeout", job.job_id); + } + + done(err); + }); + }); + }); + + it("should fetch a screenshot job", function(done) { + var options = { + url: "http://www.example.com", + browsers: [ + { + os: "Windows", + os_version: "7", + browser: "chrome", + browser_version: "42.0" + } + ] + }; + + client.generateScreenshots(options, function(err, job) { + should.ifError(err); + util.validateScreenshotJob(job); + + client.getJob(job.job_id, function(err, job) { + if (!err) { + util.validateScreenshotJob(job); + } + + done(err); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/browserstack/test/util.js b/test-eol-project/node_modules/browserstack/test/util.js new file mode 100644 index 00000000..3a0e097b --- /dev/null +++ b/test-eol-project/node_modules/browserstack/test/util.js @@ -0,0 +1,134 @@ +"use strict"; + +var extend = require("../lib/extend"); + +var pollWorkerRetries = 30; +var pollWorkerRetryInterval = 2000; + +var encoding = process.env.TRAVIS ? "base64" : "utf8"; +module.exports.browserStack = { + username: Buffer.from(process.env.BROWSERSTACK_USERNAME || "", encoding).toString(), + password: Buffer.from(process.env.BROWSERSTACK_KEY || "", encoding).toString() +}; + +module.exports.terminateWorkers = function terminateWorkers(client, workers, callback) { + if (!workers.length) { + return callback(null); + } + + if (workers[0].id) { + workers = workers.map(function(w) { + return w.id; + }); + } + + client.terminateWorker(workers.shift(), function() { + if (!workers.length) { + return callback(null); + } + + terminateWorkers(client, workers, callback); + }); +}; + +module.exports.pollApiWorker = function pollApiWorker(client, worker, callback) { + pollWorker(worker, + client.getWorker.bind(client), + function getWorkerId(worker) { + return worker && worker.id; + }, + function isWorkerRunning(worker) { + return worker && worker.status === "running"; + }, callback); +}; + +module.exports.pollScreenshotWorker = function pollScreenshotWorker(client, worker, callback) { + pollWorker(worker, + client.getJob.bind(client), + function getWorkerId(worker) { + return worker && (worker.job_id || worker.id); + }, + function isWorkerRunning(worker) { + return worker && worker.state === "running"; + }, callback); +}; + +module.exports.validateBrowserObject = function validateBrowserObject(browser) { + [ + "os", + "os_version", + "browser", + browser.device ? "device" : "browser_version" + ].forEach(function(attr) { + if (attr.match(/version/)) { + browser[attr].should.be.a.String().and.match(/\S+/); + } else { + browser[attr].should.be.a.String().and.match(/^[a-zA-Z]+/); + } + }); + + return browser; +}; + +module.exports.validateScreenshotJob = function validateScreenshotJob(job) { + job.should.be.an.Object().and.not.be.empty(); + (job.job_id || job.id).should.match(/[a-zA-Z0-9]+/); + + [ + "quality", + "win_res", + "wait_time" + ].forEach(function(k) { + job.should.have.property(k); + }); + + job.screenshots + .map(this.validateBrowserObject) + .forEach(function(screenshotState) { + screenshotState.id.should.match(/[a-zA-Z0-9]+/); + ["processing", "pending", "queue", "running"].should.containEql(screenshotState.state); + }); +}; + +module.exports.validateWorker = function validateWorker(w) { + w.should.be.an.Object(); + w.id.should.match(/\d+/); + return w; +}; + +module.exports.merge = function merge(o, a) { + return extend(extend({}, o), a); +}; + +function pollWorker(worker, getWorkerStatusFn, getWorkerIdFn, isWorkerRunningFn, callback) { + var maxRetries = pollWorkerRetries; + var retryInterval = pollWorkerRetryInterval; + var workerId = getWorkerIdFn(worker); + var timer; + + var pollWorkerState = function(id, callback) { + if (--maxRetries < 1) { + clearTimeout(timer); + return callback(null, false); + } + + getWorkerStatusFn(workerId, function(err, worker) { + workerId = getWorkerIdFn(worker); + + if (err || !workerId) { + clearTimeout(timer); + return callback(err, false); + } + + if (isWorkerRunningFn(worker)) { + return callback(null, true); + } + + setTimeout(function() { + pollWorkerState(id, callback); + }, retryInterval); + }); + }; + + pollWorkerState(workerId, callback); +} diff --git a/test-eol-project/node_modules/camelcase/index.d.ts b/test-eol-project/node_modules/camelcase/index.d.ts new file mode 100644 index 00000000..58f2069a --- /dev/null +++ b/test-eol-project/node_modules/camelcase/index.d.ts @@ -0,0 +1,63 @@ +declare namespace camelcase { + interface Options { + /** + Uppercase the first character: `foo-bar` → `FooBar`. + + @default false + */ + readonly pascalCase?: boolean; + } +} + +declare const camelcase: { + /** + Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. + + @param input - String to convert to camel case. + + @example + ``` + import camelCase = require('camelcase'); + + camelCase('foo-bar'); + //=> 'fooBar' + + camelCase('foo_bar'); + //=> 'fooBar' + + camelCase('Foo-Bar'); + //=> 'fooBar' + + camelCase('Foo-Bar', {pascalCase: true}); + //=> 'FooBar' + + camelCase('--foo.bar', {pascalCase: false}); + //=> 'fooBar' + + camelCase('foo bar'); + //=> 'fooBar' + + console.log(process.argv[3]); + //=> '--foo-bar' + camelCase(process.argv[3]); + //=> 'fooBar' + + camelCase(['foo', 'bar']); + //=> 'fooBar' + + camelCase(['__foo__', '--bar'], {pascalCase: true}); + //=> 'FooBar' + ``` + */ + (input: string | ReadonlyArray, options?: camelcase.Options): string; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function camelcase( + // input: string | ReadonlyArray, + // options?: camelcase.Options + // ): string; + // export = camelcase; + default: typeof camelcase; +}; + +export = camelcase; diff --git a/test-eol-project/node_modules/camelcase/index.js b/test-eol-project/node_modules/camelcase/index.js new file mode 100644 index 00000000..579f99b4 --- /dev/null +++ b/test-eol-project/node_modules/camelcase/index.js @@ -0,0 +1,76 @@ +'use strict'; + +const preserveCamelCase = string => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < string.length; i++) { + const character = string[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + '-' + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + '-' + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + + return string; +}; + +const camelCase = (input, options) => { + if (!(typeof input === 'string' || Array.isArray(input))) { + throw new TypeError('Expected the input to be `string | string[]`'); + } + + options = Object.assign({ + pascalCase: false + }, options); + + const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + + if (Array.isArray(input)) { + input = input.map(x => x.trim()) + .filter(x => x.length) + .join('-'); + } else { + input = input.trim(); + } + + if (input.length === 0) { + return ''; + } + + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + + const hasUpperCase = input !== input.toLowerCase(); + + if (hasUpperCase) { + input = preserveCamelCase(input); + } + + input = input + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) + .replace(/\d+(\w|$)/g, m => m.toUpperCase()); + + return postProcess(input); +}; + +module.exports = camelCase; +// TODO: Remove this for the next major release +module.exports.default = camelCase; diff --git a/test-eol-project/node_modules/camelcase/license b/test-eol-project/node_modules/camelcase/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/camelcase/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/camelcase/package.json b/test-eol-project/node_modules/camelcase/package.json new file mode 100644 index 00000000..fbdbaaa7 --- /dev/null +++ b/test-eol-project/node_modules/camelcase/package.json @@ -0,0 +1,43 @@ +{ + "name": "camelcase", + "version": "5.3.1", + "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", + "license": "MIT", + "repository": "sindresorhus/camelcase", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert", + "pascalcase", + "pascal-case" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/test-eol-project/node_modules/camelcase/readme.md b/test-eol-project/node_modules/camelcase/readme.md new file mode 100644 index 00000000..fde27261 --- /dev/null +++ b/test-eol-project/node_modules/camelcase/readme.md @@ -0,0 +1,99 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` + +--- + + + +--- + +## Install + +``` +$ npm install camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('Foo-Bar', {pascalCase: true}); +//=> 'FooBar' + +camelCase('--foo.bar', {pascalCase: false}); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase(['foo', 'bar']); +//=> 'fooBar' + +camelCase(['__foo__', '--bar'], {pascalCase: true}); +//=> 'FooBar' +``` + + +## API + +### camelCase(input, [options]) + +#### input + +Type: `string` `string[]` + +String to convert to camel case. + +#### options + +Type: `Object` + +##### pascalCase + +Type: `boolean`
+Default: `false` + +Uppercase the first character: `foo-bar` → `FooBar` + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase +- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string +- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/test-eol-project/node_modules/caseless/LICENSE b/test-eol-project/node_modules/caseless/LICENSE new file mode 100644 index 00000000..61789f4a --- /dev/null +++ b/test-eol-project/node_modules/caseless/LICENSE @@ -0,0 +1,28 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +1. Definitions. +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/test-eol-project/node_modules/caseless/README.md b/test-eol-project/node_modules/caseless/README.md new file mode 100644 index 00000000..e5077a21 --- /dev/null +++ b/test-eol-project/node_modules/caseless/README.md @@ -0,0 +1,45 @@ +## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. + +This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. + +## Usage + +```javascript +var headers = {} + , c = caseless(headers) + ; +c.set('a-Header', 'asdf') +c.get('a-header') === 'asdf' +``` + +## has(key) + +Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. + +```javascript +c.has('a-header') === 'a-Header' +``` + +## set(key, value[, clobber=true]) + +Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. + +```javascript +c.set('a-Header', 'fdas') +c.set('a-HEADER', 'more', false) +c.get('a-header') === 'fdsa,more' +``` + +## swap(key) + +Swaps the casing of a header with the new one that is passed in. + +```javascript +var headers = {} + , c = caseless(headers) + ; +c.set('a-Header', 'fdas') +c.swap('a-HEADER') +c.has('a-header') === 'a-HEADER' +headers === {'a-HEADER': 'fdas'} +``` diff --git a/test-eol-project/node_modules/caseless/index.js b/test-eol-project/node_modules/caseless/index.js new file mode 100644 index 00000000..b194734e --- /dev/null +++ b/test-eol-project/node_modules/caseless/index.js @@ -0,0 +1,67 @@ +function Caseless (dict) { + this.dict = dict || {} +} +Caseless.prototype.set = function (name, value, clobber) { + if (typeof name === 'object') { + for (var i in name) { + this.set(i, name[i], value) + } + } else { + if (typeof clobber === 'undefined') clobber = true + var has = this.has(name) + + if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value + else this.dict[has || name] = value + return has + } +} +Caseless.prototype.has = function (name) { + var keys = Object.keys(this.dict) + , name = name.toLowerCase() + ; + for (var i=0;i", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/mikeal/caseless/issues" + }, + "devDependencies": { + "tape": "^2.10.2" + } +} diff --git a/test-eol-project/node_modules/caseless/test.js b/test-eol-project/node_modules/caseless/test.js new file mode 100644 index 00000000..f55196cc --- /dev/null +++ b/test-eol-project/node_modules/caseless/test.js @@ -0,0 +1,67 @@ +var tape = require('tape') + , caseless = require('./') + ; + +tape('set get has', function (t) { + var headers = {} + , c = caseless(headers) + ; + t.plan(17) + c.set('a-Header', 'asdf') + t.equal(c.get('a-header'), 'asdf') + t.equal(c.has('a-header'), 'a-Header') + t.ok(!c.has('nothing')) + // old bug where we used the wrong regex + t.ok(!c.has('a-hea')) + c.set('a-header', 'fdsa') + t.equal(c.get('a-header'), 'fdsa') + t.equal(c.get('a-Header'), 'fdsa') + c.set('a-HEADER', 'more', false) + t.equal(c.get('a-header'), 'fdsa,more') + + t.deepEqual(headers, {'a-Header': 'fdsa,more'}) + c.swap('a-HEADER') + t.deepEqual(headers, {'a-HEADER': 'fdsa,more'}) + + c.set('deleteme', 'foobar') + t.ok(c.has('deleteme')) + t.ok(c.del('deleteme')) + t.notOk(c.has('deleteme')) + t.notOk(c.has('idonotexist')) + t.ok(c.del('idonotexist')) + + c.set('tva', 'test1') + c.set('tva-header', 'test2') + t.equal(c.has('tva'), 'tva') + t.notOk(c.has('header')) + + t.equal(c.get('tva'), 'test1') + +}) + +tape('swap', function (t) { + var headers = {} + , c = caseless(headers) + ; + t.plan(4) + // No Header to Swap. + t.throws(function () { + c.swap('content-type') + }) + // Set Header. + c.set('content-type', 'application/json') + // Swap Header With Itself. + c.swap('content-type') + // Does Not Delete Itself. + t.ok(c.has('content-type')) + // Swap Header With a Different Header. + c.swap('Content-Type') + // Still Has Header. + t.ok(c.has('Content-Type')) + // Delete Header. + c.del('Content-Type') + // No Header to Swap. + t.throws(function () { + c.swap('content-type') + }) +}) diff --git a/test-eol-project/node_modules/chalk/index.js b/test-eol-project/node_modules/chalk/index.js new file mode 100644 index 00000000..2d85a917 --- /dev/null +++ b/test-eol-project/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/test-eol-project/node_modules/chalk/license b/test-eol-project/node_modules/chalk/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/chalk/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/chalk/package.json b/test-eol-project/node_modules/chalk/package.json new file mode 100644 index 00000000..2b5881e9 --- /dev/null +++ b/test-eol-project/node_modules/chalk/package.json @@ -0,0 +1,70 @@ +{ + "name": "chalk", + "version": "1.1.3", + "description": "Terminal string styling done right. Much color.", + "license": "MIT", + "repository": "chalk/chalk", + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && mocha", + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/test-eol-project/node_modules/chalk/readme.md b/test-eol-project/node_modules/chalk/readme.md new file mode 100644 index 00000000..5cf111e3 --- /dev/null +++ b/test-eol-project/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.` +Browserstack-logo-white + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-eol-project/node_modules/psl/data/rules.js b/test-eol-project/node_modules/psl/data/rules.js new file mode 100644 index 00000000..7c167fb7 --- /dev/null +++ b/test-eol-project/node_modules/psl/data/rules.js @@ -0,0 +1,9778 @@ +export default [ + "ac", + "com.ac", + "edu.ac", + "gov.ac", + "mil.ac", + "net.ac", + "org.ac", + "ad", + "ae", + "ac.ae", + "co.ae", + "gov.ae", + "mil.ae", + "net.ae", + "org.ae", + "sch.ae", + "aero", + "airline.aero", + "airport.aero", + "accident-investigation.aero", + "accident-prevention.aero", + "aerobatic.aero", + "aeroclub.aero", + "aerodrome.aero", + "agents.aero", + "air-surveillance.aero", + "air-traffic-control.aero", + "aircraft.aero", + "airtraffic.aero", + "ambulance.aero", + "association.aero", + "author.aero", + "ballooning.aero", + "broker.aero", + "caa.aero", + "cargo.aero", + "catering.aero", + "certification.aero", + "championship.aero", + "charter.aero", + "civilaviation.aero", + "club.aero", + "conference.aero", + "consultant.aero", + "consulting.aero", + "control.aero", + "council.aero", + "crew.aero", + "design.aero", + "dgca.aero", + "educator.aero", + "emergency.aero", + "engine.aero", + "engineer.aero", + "entertainment.aero", + "equipment.aero", + "exchange.aero", + "express.aero", + "federation.aero", + "flight.aero", + "freight.aero", + "fuel.aero", + "gliding.aero", + "government.aero", + "groundhandling.aero", + "group.aero", + "hanggliding.aero", + "homebuilt.aero", + "insurance.aero", + "journal.aero", + "journalist.aero", + "leasing.aero", + "logistics.aero", + "magazine.aero", + "maintenance.aero", + "marketplace.aero", + "media.aero", + "microlight.aero", + "modelling.aero", + "navigation.aero", + "parachuting.aero", + "paragliding.aero", + "passenger-association.aero", + "pilot.aero", + "press.aero", + "production.aero", + "recreation.aero", + "repbody.aero", + "res.aero", + "research.aero", + "rotorcraft.aero", + "safety.aero", + "scientist.aero", + "services.aero", + "show.aero", + "skydiving.aero", + "software.aero", + "student.aero", + "taxi.aero", + "trader.aero", + "trading.aero", + "trainer.aero", + "union.aero", + "workinggroup.aero", + "works.aero", + "af", + "com.af", + "edu.af", + "gov.af", + "net.af", + "org.af", + "ag", + "co.ag", + "com.ag", + "net.ag", + "nom.ag", + "org.ag", + "ai", + "com.ai", + "net.ai", + "off.ai", + "org.ai", + "al", + "com.al", + "edu.al", + "gov.al", + "mil.al", + "net.al", + "org.al", + "am", + "co.am", + "com.am", + "commune.am", + "net.am", + "org.am", + "ao", + "co.ao", + "ed.ao", + "edu.ao", + "gov.ao", + "gv.ao", + "it.ao", + "og.ao", + "org.ao", + "pb.ao", + "aq", + "ar", + "bet.ar", + "com.ar", + "coop.ar", + "edu.ar", + "gob.ar", + "gov.ar", + "int.ar", + "mil.ar", + "musica.ar", + "mutual.ar", + "net.ar", + "org.ar", + "senasa.ar", + "tur.ar", + "arpa", + "e164.arpa", + "home.arpa", + "in-addr.arpa", + "ip6.arpa", + "iris.arpa", + "uri.arpa", + "urn.arpa", + "as", + "gov.as", + "asia", + "at", + "ac.at", + "sth.ac.at", + "co.at", + "gv.at", + "or.at", + "au", + "asn.au", + "com.au", + "edu.au", + "gov.au", + "id.au", + "net.au", + "org.au", + "conf.au", + "oz.au", + "act.au", + "nsw.au", + "nt.au", + "qld.au", + "sa.au", + "tas.au", + "vic.au", + "wa.au", + "act.edu.au", + "catholic.edu.au", + "nsw.edu.au", + "nt.edu.au", + "qld.edu.au", + "sa.edu.au", + "tas.edu.au", + "vic.edu.au", + "wa.edu.au", + "qld.gov.au", + "sa.gov.au", + "tas.gov.au", + "vic.gov.au", + "wa.gov.au", + "schools.nsw.edu.au", + "aw", + "com.aw", + "ax", + "az", + "biz.az", + "com.az", + "edu.az", + "gov.az", + "info.az", + "int.az", + "mil.az", + "name.az", + "net.az", + "org.az", + "pp.az", + "pro.az", + "ba", + "com.ba", + "edu.ba", + "gov.ba", + "mil.ba", + "net.ba", + "org.ba", + "bb", + "biz.bb", + "co.bb", + "com.bb", + "edu.bb", + "gov.bb", + "info.bb", + "net.bb", + "org.bb", + "store.bb", + "tv.bb", + "*.bd", + "be", + "ac.be", + "bf", + "gov.bf", + "bg", + "0.bg", + "1.bg", + "2.bg", + "3.bg", + "4.bg", + "5.bg", + "6.bg", + "7.bg", + "8.bg", + "9.bg", + "a.bg", + "b.bg", + "c.bg", + "d.bg", + "e.bg", + "f.bg", + "g.bg", + "h.bg", + "i.bg", + "j.bg", + "k.bg", + "l.bg", + "m.bg", + "n.bg", + "o.bg", + "p.bg", + "q.bg", + "r.bg", + "s.bg", + "t.bg", + "u.bg", + "v.bg", + "w.bg", + "x.bg", + "y.bg", + "z.bg", + "bh", + "com.bh", + "edu.bh", + "gov.bh", + "net.bh", + "org.bh", + "bi", + "co.bi", + "com.bi", + "edu.bi", + "or.bi", + "org.bi", + "biz", + "bj", + "africa.bj", + "agro.bj", + "architectes.bj", + "assur.bj", + "avocats.bj", + "co.bj", + "com.bj", + "eco.bj", + "econo.bj", + "edu.bj", + "info.bj", + "loisirs.bj", + "money.bj", + "net.bj", + "org.bj", + "ote.bj", + "restaurant.bj", + "resto.bj", + "tourism.bj", + "univ.bj", + "bm", + "com.bm", + "edu.bm", + "gov.bm", + "net.bm", + "org.bm", + "bn", + "com.bn", + "edu.bn", + "gov.bn", + "net.bn", + "org.bn", + "bo", + "com.bo", + "edu.bo", + "gob.bo", + "int.bo", + "mil.bo", + "net.bo", + "org.bo", + "tv.bo", + "web.bo", + "academia.bo", + "agro.bo", + "arte.bo", + "blog.bo", + "bolivia.bo", + "ciencia.bo", + "cooperativa.bo", + "democracia.bo", + "deporte.bo", + "ecologia.bo", + "economia.bo", + "empresa.bo", + "indigena.bo", + "industria.bo", + "info.bo", + "medicina.bo", + "movimiento.bo", + "musica.bo", + "natural.bo", + "nombre.bo", + "noticias.bo", + "patria.bo", + "plurinacional.bo", + "politica.bo", + "profesional.bo", + "pueblo.bo", + "revista.bo", + "salud.bo", + "tecnologia.bo", + "tksat.bo", + "transporte.bo", + "wiki.bo", + "br", + "9guacu.br", + "abc.br", + "adm.br", + "adv.br", + "agr.br", + "aju.br", + "am.br", + "anani.br", + "aparecida.br", + "app.br", + "arq.br", + "art.br", + "ato.br", + "b.br", + "barueri.br", + "belem.br", + "bet.br", + "bhz.br", + "bib.br", + "bio.br", + "blog.br", + "bmd.br", + "boavista.br", + "bsb.br", + "campinagrande.br", + "campinas.br", + "caxias.br", + "cim.br", + "cng.br", + "cnt.br", + "com.br", + "contagem.br", + "coop.br", + "coz.br", + "cri.br", + "cuiaba.br", + "curitiba.br", + "def.br", + "des.br", + "det.br", + "dev.br", + "ecn.br", + "eco.br", + "edu.br", + "emp.br", + "enf.br", + "eng.br", + "esp.br", + "etc.br", + "eti.br", + "far.br", + "feira.br", + "flog.br", + "floripa.br", + "fm.br", + "fnd.br", + "fortal.br", + "fot.br", + "foz.br", + "fst.br", + "g12.br", + "geo.br", + "ggf.br", + "goiania.br", + "gov.br", + "ac.gov.br", + "al.gov.br", + "am.gov.br", + "ap.gov.br", + "ba.gov.br", + "ce.gov.br", + "df.gov.br", + "es.gov.br", + "go.gov.br", + "ma.gov.br", + "mg.gov.br", + "ms.gov.br", + "mt.gov.br", + "pa.gov.br", + "pb.gov.br", + "pe.gov.br", + "pi.gov.br", + "pr.gov.br", + "rj.gov.br", + "rn.gov.br", + "ro.gov.br", + "rr.gov.br", + "rs.gov.br", + "sc.gov.br", + "se.gov.br", + "sp.gov.br", + "to.gov.br", + "gru.br", + "imb.br", + "ind.br", + "inf.br", + "jab.br", + "jampa.br", + "jdf.br", + "joinville.br", + "jor.br", + "jus.br", + "leg.br", + "leilao.br", + "lel.br", + "log.br", + "londrina.br", + "macapa.br", + "maceio.br", + "manaus.br", + "maringa.br", + "mat.br", + "med.br", + "mil.br", + "morena.br", + "mp.br", + "mus.br", + "natal.br", + "net.br", + "niteroi.br", + "*.nom.br", + "not.br", + "ntr.br", + "odo.br", + "ong.br", + "org.br", + "osasco.br", + "palmas.br", + "poa.br", + "ppg.br", + "pro.br", + "psc.br", + "psi.br", + "pvh.br", + "qsl.br", + "radio.br", + "rec.br", + "recife.br", + "rep.br", + "ribeirao.br", + "rio.br", + "riobranco.br", + "riopreto.br", + "salvador.br", + "sampa.br", + "santamaria.br", + "santoandre.br", + "saobernardo.br", + "saogonca.br", + "seg.br", + "sjc.br", + "slg.br", + "slz.br", + "sorocaba.br", + "srv.br", + "taxi.br", + "tc.br", + "tec.br", + "teo.br", + "the.br", + "tmp.br", + "trd.br", + "tur.br", + "tv.br", + "udi.br", + "vet.br", + "vix.br", + "vlog.br", + "wiki.br", + "zlg.br", + "bs", + "com.bs", + "edu.bs", + "gov.bs", + "net.bs", + "org.bs", + "bt", + "com.bt", + "edu.bt", + "gov.bt", + "net.bt", + "org.bt", + "bv", + "bw", + "co.bw", + "org.bw", + "by", + "gov.by", + "mil.by", + "com.by", + "of.by", + "bz", + "co.bz", + "com.bz", + "edu.bz", + "gov.bz", + "net.bz", + "org.bz", + "ca", + "ab.ca", + "bc.ca", + "mb.ca", + "nb.ca", + "nf.ca", + "nl.ca", + "ns.ca", + "nt.ca", + "nu.ca", + "on.ca", + "pe.ca", + "qc.ca", + "sk.ca", + "yk.ca", + "gc.ca", + "cat", + "cc", + "cd", + "gov.cd", + "cf", + "cg", + "ch", + "ci", + "ac.ci", + "aéroport.ci", + "asso.ci", + "co.ci", + "com.ci", + "ed.ci", + "edu.ci", + "go.ci", + "gouv.ci", + "int.ci", + "net.ci", + "or.ci", + "org.ci", + "*.ck", + "!www.ck", + "cl", + "co.cl", + "gob.cl", + "gov.cl", + "mil.cl", + "cm", + "co.cm", + "com.cm", + "gov.cm", + "net.cm", + "cn", + "ac.cn", + "com.cn", + "edu.cn", + "gov.cn", + "mil.cn", + "net.cn", + "org.cn", + "公司.cn", + "網絡.cn", + "网络.cn", + "ah.cn", + "bj.cn", + "cq.cn", + "fj.cn", + "gd.cn", + "gs.cn", + "gx.cn", + "gz.cn", + "ha.cn", + "hb.cn", + "he.cn", + "hi.cn", + "hk.cn", + "hl.cn", + "hn.cn", + "jl.cn", + "js.cn", + "jx.cn", + "ln.cn", + "mo.cn", + "nm.cn", + "nx.cn", + "qh.cn", + "sc.cn", + "sd.cn", + "sh.cn", + "sn.cn", + "sx.cn", + "tj.cn", + "tw.cn", + "xj.cn", + "xz.cn", + "yn.cn", + "zj.cn", + "co", + "com.co", + "edu.co", + "gov.co", + "mil.co", + "net.co", + "nom.co", + "org.co", + "com", + "coop", + "cr", + "ac.cr", + "co.cr", + "ed.cr", + "fi.cr", + "go.cr", + "or.cr", + "sa.cr", + "cu", + "com.cu", + "edu.cu", + "gob.cu", + "inf.cu", + "nat.cu", + "net.cu", + "org.cu", + "cv", + "com.cv", + "edu.cv", + "id.cv", + "int.cv", + "net.cv", + "nome.cv", + "org.cv", + "publ.cv", + "cw", + "com.cw", + "edu.cw", + "net.cw", + "org.cw", + "cx", + "gov.cx", + "cy", + "ac.cy", + "biz.cy", + "com.cy", + "ekloges.cy", + "gov.cy", + "ltd.cy", + "mil.cy", + "net.cy", + "org.cy", + "press.cy", + "pro.cy", + "tm.cy", + "cz", + "de", + "dj", + "dk", + "dm", + "co.dm", + "com.dm", + "edu.dm", + "gov.dm", + "net.dm", + "org.dm", + "do", + "art.do", + "com.do", + "edu.do", + "gob.do", + "gov.do", + "mil.do", + "net.do", + "org.do", + "sld.do", + "web.do", + "dz", + "art.dz", + "asso.dz", + "com.dz", + "edu.dz", + "gov.dz", + "net.dz", + "org.dz", + "pol.dz", + "soc.dz", + "tm.dz", + "ec", + "com.ec", + "edu.ec", + "fin.ec", + "gob.ec", + "gov.ec", + "info.ec", + "k12.ec", + "med.ec", + "mil.ec", + "net.ec", + "org.ec", + "pro.ec", + "edu", + "ee", + "aip.ee", + "com.ee", + "edu.ee", + "fie.ee", + "gov.ee", + "lib.ee", + "med.ee", + "org.ee", + "pri.ee", + "riik.ee", + "eg", + "ac.eg", + "com.eg", + "edu.eg", + "eun.eg", + "gov.eg", + "info.eg", + "me.eg", + "mil.eg", + "name.eg", + "net.eg", + "org.eg", + "sci.eg", + "sport.eg", + "tv.eg", + "*.er", + "es", + "com.es", + "edu.es", + "gob.es", + "nom.es", + "org.es", + "et", + "biz.et", + "com.et", + "edu.et", + "gov.et", + "info.et", + "name.et", + "net.et", + "org.et", + "eu", + "fi", + "aland.fi", + "fj", + "ac.fj", + "biz.fj", + "com.fj", + "gov.fj", + "info.fj", + "mil.fj", + "name.fj", + "net.fj", + "org.fj", + "pro.fj", + "*.fk", + "fm", + "com.fm", + "edu.fm", + "net.fm", + "org.fm", + "fo", + "fr", + "asso.fr", + "com.fr", + "gouv.fr", + "nom.fr", + "prd.fr", + "tm.fr", + "avoues.fr", + "cci.fr", + "greta.fr", + "huissier-justice.fr", + "ga", + "gb", + "gd", + "edu.gd", + "gov.gd", + "ge", + "com.ge", + "edu.ge", + "gov.ge", + "net.ge", + "org.ge", + "pvt.ge", + "school.ge", + "gf", + "gg", + "co.gg", + "net.gg", + "org.gg", + "gh", + "com.gh", + "edu.gh", + "gov.gh", + "mil.gh", + "org.gh", + "gi", + "com.gi", + "edu.gi", + "gov.gi", + "ltd.gi", + "mod.gi", + "org.gi", + "gl", + "co.gl", + "com.gl", + "edu.gl", + "net.gl", + "org.gl", + "gm", + "gn", + "ac.gn", + "com.gn", + "edu.gn", + "gov.gn", + "net.gn", + "org.gn", + "gov", + "gp", + "asso.gp", + "com.gp", + "edu.gp", + "mobi.gp", + "net.gp", + "org.gp", + "gq", + "gr", + "com.gr", + "edu.gr", + "gov.gr", + "net.gr", + "org.gr", + "gs", + "gt", + "com.gt", + "edu.gt", + "gob.gt", + "ind.gt", + "mil.gt", + "net.gt", + "org.gt", + "gu", + "com.gu", + "edu.gu", + "gov.gu", + "guam.gu", + "info.gu", + "net.gu", + "org.gu", + "web.gu", + "gw", + "gy", + "co.gy", + "com.gy", + "edu.gy", + "gov.gy", + "net.gy", + "org.gy", + "hk", + "com.hk", + "edu.hk", + "gov.hk", + "idv.hk", + "net.hk", + "org.hk", + "个人.hk", + "個人.hk", + "公司.hk", + "政府.hk", + "敎育.hk", + "教育.hk", + "箇人.hk", + "組織.hk", + "組织.hk", + "網絡.hk", + "網络.hk", + "组織.hk", + "组织.hk", + "网絡.hk", + "网络.hk", + "hm", + "hn", + "com.hn", + "edu.hn", + "gob.hn", + "mil.hn", + "net.hn", + "org.hn", + "hr", + "com.hr", + "from.hr", + "iz.hr", + "name.hr", + "ht", + "adult.ht", + "art.ht", + "asso.ht", + "com.ht", + "coop.ht", + "edu.ht", + "firm.ht", + "gouv.ht", + "info.ht", + "med.ht", + "net.ht", + "org.ht", + "perso.ht", + "pol.ht", + "pro.ht", + "rel.ht", + "shop.ht", + "hu", + "2000.hu", + "agrar.hu", + "bolt.hu", + "casino.hu", + "city.hu", + "co.hu", + "erotica.hu", + "erotika.hu", + "film.hu", + "forum.hu", + "games.hu", + "hotel.hu", + "info.hu", + "ingatlan.hu", + "jogasz.hu", + "konyvelo.hu", + "lakas.hu", + "media.hu", + "news.hu", + "org.hu", + "priv.hu", + "reklam.hu", + "sex.hu", + "shop.hu", + "sport.hu", + "suli.hu", + "szex.hu", + "tm.hu", + "tozsde.hu", + "utazas.hu", + "video.hu", + "id", + "ac.id", + "biz.id", + "co.id", + "desa.id", + "go.id", + "mil.id", + "my.id", + "net.id", + "or.id", + "ponpes.id", + "sch.id", + "web.id", + "ie", + "gov.ie", + "il", + "ac.il", + "co.il", + "gov.il", + "idf.il", + "k12.il", + "muni.il", + "net.il", + "org.il", + "ישראל", + "אקדמיה.ישראל", + "ישוב.ישראל", + "צהל.ישראל", + "ממשל.ישראל", + "im", + "ac.im", + "co.im", + "ltd.co.im", + "plc.co.im", + "com.im", + "net.im", + "org.im", + "tt.im", + "tv.im", + "in", + "5g.in", + "6g.in", + "ac.in", + "ai.in", + "am.in", + "bihar.in", + "biz.in", + "business.in", + "ca.in", + "cn.in", + "co.in", + "com.in", + "coop.in", + "cs.in", + "delhi.in", + "dr.in", + "edu.in", + "er.in", + "firm.in", + "gen.in", + "gov.in", + "gujarat.in", + "ind.in", + "info.in", + "int.in", + "internet.in", + "io.in", + "me.in", + "mil.in", + "net.in", + "nic.in", + "org.in", + "pg.in", + "post.in", + "pro.in", + "res.in", + "travel.in", + "tv.in", + "uk.in", + "up.in", + "us.in", + "info", + "int", + "eu.int", + "io", + "co.io", + "com.io", + "edu.io", + "gov.io", + "mil.io", + "net.io", + "nom.io", + "org.io", + "iq", + "com.iq", + "edu.iq", + "gov.iq", + "mil.iq", + "net.iq", + "org.iq", + "ir", + "ac.ir", + "co.ir", + "gov.ir", + "id.ir", + "net.ir", + "org.ir", + "sch.ir", + "ایران.ir", + "ايران.ir", + "is", + "it", + "edu.it", + "gov.it", + "abr.it", + "abruzzo.it", + "aosta-valley.it", + "aostavalley.it", + "bas.it", + "basilicata.it", + "cal.it", + "calabria.it", + "cam.it", + "campania.it", + "emilia-romagna.it", + "emiliaromagna.it", + "emr.it", + "friuli-v-giulia.it", + "friuli-ve-giulia.it", + "friuli-vegiulia.it", + "friuli-venezia-giulia.it", + "friuli-veneziagiulia.it", + "friuli-vgiulia.it", + "friuliv-giulia.it", + "friulive-giulia.it", + "friulivegiulia.it", + "friulivenezia-giulia.it", + "friuliveneziagiulia.it", + "friulivgiulia.it", + "fvg.it", + "laz.it", + "lazio.it", + "lig.it", + "liguria.it", + "lom.it", + "lombardia.it", + "lombardy.it", + "lucania.it", + "mar.it", + "marche.it", + "mol.it", + "molise.it", + "piedmont.it", + "piemonte.it", + "pmn.it", + "pug.it", + "puglia.it", + "sar.it", + "sardegna.it", + "sardinia.it", + "sic.it", + "sicilia.it", + "sicily.it", + "taa.it", + "tos.it", + "toscana.it", + "trentin-sud-tirol.it", + "trentin-süd-tirol.it", + "trentin-sudtirol.it", + "trentin-südtirol.it", + "trentin-sued-tirol.it", + "trentin-suedtirol.it", + "trentino.it", + "trentino-a-adige.it", + "trentino-aadige.it", + "trentino-alto-adige.it", + "trentino-altoadige.it", + "trentino-s-tirol.it", + "trentino-stirol.it", + "trentino-sud-tirol.it", + "trentino-süd-tirol.it", + "trentino-sudtirol.it", + "trentino-südtirol.it", + "trentino-sued-tirol.it", + "trentino-suedtirol.it", + "trentinoa-adige.it", + "trentinoaadige.it", + "trentinoalto-adige.it", + "trentinoaltoadige.it", + "trentinos-tirol.it", + "trentinostirol.it", + "trentinosud-tirol.it", + "trentinosüd-tirol.it", + "trentinosudtirol.it", + "trentinosüdtirol.it", + "trentinosued-tirol.it", + "trentinosuedtirol.it", + "trentinsud-tirol.it", + "trentinsüd-tirol.it", + "trentinsudtirol.it", + "trentinsüdtirol.it", + "trentinsued-tirol.it", + "trentinsuedtirol.it", + "tuscany.it", + "umb.it", + "umbria.it", + "val-d-aosta.it", + "val-daosta.it", + "vald-aosta.it", + "valdaosta.it", + "valle-aosta.it", + "valle-d-aosta.it", + "valle-daosta.it", + "valleaosta.it", + "valled-aosta.it", + "valledaosta.it", + "vallee-aoste.it", + "vallée-aoste.it", + "vallee-d-aoste.it", + "vallée-d-aoste.it", + "valleeaoste.it", + "valléeaoste.it", + "valleedaoste.it", + "valléedaoste.it", + "vao.it", + "vda.it", + "ven.it", + "veneto.it", + "ag.it", + "agrigento.it", + "al.it", + "alessandria.it", + "alto-adige.it", + "altoadige.it", + "an.it", + "ancona.it", + "andria-barletta-trani.it", + "andria-trani-barletta.it", + "andriabarlettatrani.it", + "andriatranibarletta.it", + "ao.it", + "aosta.it", + "aoste.it", + "ap.it", + "aq.it", + "aquila.it", + "ar.it", + "arezzo.it", + "ascoli-piceno.it", + "ascolipiceno.it", + "asti.it", + "at.it", + "av.it", + "avellino.it", + "ba.it", + "balsan.it", + "balsan-sudtirol.it", + "balsan-südtirol.it", + "balsan-suedtirol.it", + "bari.it", + "barletta-trani-andria.it", + "barlettatraniandria.it", + "belluno.it", + "benevento.it", + "bergamo.it", + "bg.it", + "bi.it", + "biella.it", + "bl.it", + "bn.it", + "bo.it", + "bologna.it", + "bolzano.it", + "bolzano-altoadige.it", + "bozen.it", + "bozen-sudtirol.it", + "bozen-südtirol.it", + "bozen-suedtirol.it", + "br.it", + "brescia.it", + "brindisi.it", + "bs.it", + "bt.it", + "bulsan.it", + "bulsan-sudtirol.it", + "bulsan-südtirol.it", + "bulsan-suedtirol.it", + "bz.it", + "ca.it", + "cagliari.it", + "caltanissetta.it", + "campidano-medio.it", + "campidanomedio.it", + "campobasso.it", + "carbonia-iglesias.it", + "carboniaiglesias.it", + "carrara-massa.it", + "carraramassa.it", + "caserta.it", + "catania.it", + "catanzaro.it", + "cb.it", + "ce.it", + "cesena-forli.it", + "cesena-forlì.it", + "cesenaforli.it", + "cesenaforlì.it", + "ch.it", + "chieti.it", + "ci.it", + "cl.it", + "cn.it", + "co.it", + "como.it", + "cosenza.it", + "cr.it", + "cremona.it", + "crotone.it", + "cs.it", + "ct.it", + "cuneo.it", + "cz.it", + "dell-ogliastra.it", + "dellogliastra.it", + "en.it", + "enna.it", + "fc.it", + "fe.it", + "fermo.it", + "ferrara.it", + "fg.it", + "fi.it", + "firenze.it", + "florence.it", + "fm.it", + "foggia.it", + "forli-cesena.it", + "forlì-cesena.it", + "forlicesena.it", + "forlìcesena.it", + "fr.it", + "frosinone.it", + "ge.it", + "genoa.it", + "genova.it", + "go.it", + "gorizia.it", + "gr.it", + "grosseto.it", + "iglesias-carbonia.it", + "iglesiascarbonia.it", + "im.it", + "imperia.it", + "is.it", + "isernia.it", + "kr.it", + "la-spezia.it", + "laquila.it", + "laspezia.it", + "latina.it", + "lc.it", + "le.it", + "lecce.it", + "lecco.it", + "li.it", + "livorno.it", + "lo.it", + "lodi.it", + "lt.it", + "lu.it", + "lucca.it", + "macerata.it", + "mantova.it", + "massa-carrara.it", + "massacarrara.it", + "matera.it", + "mb.it", + "mc.it", + "me.it", + "medio-campidano.it", + "mediocampidano.it", + "messina.it", + "mi.it", + "milan.it", + "milano.it", + "mn.it", + "mo.it", + "modena.it", + "monza.it", + "monza-brianza.it", + "monza-e-della-brianza.it", + "monzabrianza.it", + "monzaebrianza.it", + "monzaedellabrianza.it", + "ms.it", + "mt.it", + "na.it", + "naples.it", + "napoli.it", + "no.it", + "novara.it", + "nu.it", + "nuoro.it", + "og.it", + "ogliastra.it", + "olbia-tempio.it", + "olbiatempio.it", + "or.it", + "oristano.it", + "ot.it", + "pa.it", + "padova.it", + "padua.it", + "palermo.it", + "parma.it", + "pavia.it", + "pc.it", + "pd.it", + "pe.it", + "perugia.it", + "pesaro-urbino.it", + "pesarourbino.it", + "pescara.it", + "pg.it", + "pi.it", + "piacenza.it", + "pisa.it", + "pistoia.it", + "pn.it", + "po.it", + "pordenone.it", + "potenza.it", + "pr.it", + "prato.it", + "pt.it", + "pu.it", + "pv.it", + "pz.it", + "ra.it", + "ragusa.it", + "ravenna.it", + "rc.it", + "re.it", + "reggio-calabria.it", + "reggio-emilia.it", + "reggiocalabria.it", + "reggioemilia.it", + "rg.it", + "ri.it", + "rieti.it", + "rimini.it", + "rm.it", + "rn.it", + "ro.it", + "roma.it", + "rome.it", + "rovigo.it", + "sa.it", + "salerno.it", + "sassari.it", + "savona.it", + "si.it", + "siena.it", + "siracusa.it", + "so.it", + "sondrio.it", + "sp.it", + "sr.it", + "ss.it", + "südtirol.it", + "suedtirol.it", + "sv.it", + "ta.it", + "taranto.it", + "te.it", + "tempio-olbia.it", + "tempioolbia.it", + "teramo.it", + "terni.it", + "tn.it", + "to.it", + "torino.it", + "tp.it", + "tr.it", + "trani-andria-barletta.it", + "trani-barletta-andria.it", + "traniandriabarletta.it", + "tranibarlettaandria.it", + "trapani.it", + "trento.it", + "treviso.it", + "trieste.it", + "ts.it", + "turin.it", + "tv.it", + "ud.it", + "udine.it", + "urbino-pesaro.it", + "urbinopesaro.it", + "va.it", + "varese.it", + "vb.it", + "vc.it", + "ve.it", + "venezia.it", + "venice.it", + "verbania.it", + "vercelli.it", + "verona.it", + "vi.it", + "vibo-valentia.it", + "vibovalentia.it", + "vicenza.it", + "viterbo.it", + "vr.it", + "vs.it", + "vt.it", + "vv.it", + "je", + "co.je", + "net.je", + "org.je", + "*.jm", + "jo", + "agri.jo", + "ai.jo", + "com.jo", + "edu.jo", + "eng.jo", + "fm.jo", + "gov.jo", + "mil.jo", + "net.jo", + "org.jo", + "per.jo", + "phd.jo", + "sch.jo", + "tv.jo", + "jobs", + "jp", + "ac.jp", + "ad.jp", + "co.jp", + "ed.jp", + "go.jp", + "gr.jp", + "lg.jp", + "ne.jp", + "or.jp", + "aichi.jp", + "akita.jp", + "aomori.jp", + "chiba.jp", + "ehime.jp", + "fukui.jp", + "fukuoka.jp", + "fukushima.jp", + "gifu.jp", + "gunma.jp", + "hiroshima.jp", + "hokkaido.jp", + "hyogo.jp", + "ibaraki.jp", + "ishikawa.jp", + "iwate.jp", + "kagawa.jp", + "kagoshima.jp", + "kanagawa.jp", + "kochi.jp", + "kumamoto.jp", + "kyoto.jp", + "mie.jp", + "miyagi.jp", + "miyazaki.jp", + "nagano.jp", + "nagasaki.jp", + "nara.jp", + "niigata.jp", + "oita.jp", + "okayama.jp", + "okinawa.jp", + "osaka.jp", + "saga.jp", + "saitama.jp", + "shiga.jp", + "shimane.jp", + "shizuoka.jp", + "tochigi.jp", + "tokushima.jp", + "tokyo.jp", + "tottori.jp", + "toyama.jp", + "wakayama.jp", + "yamagata.jp", + "yamaguchi.jp", + "yamanashi.jp", + "三重.jp", + "京都.jp", + "佐賀.jp", + "兵庫.jp", + "北海道.jp", + "千葉.jp", + "和歌山.jp", + "埼玉.jp", + "大分.jp", + "大阪.jp", + "奈良.jp", + "宮城.jp", + "宮崎.jp", + "富山.jp", + "山口.jp", + "山形.jp", + "山梨.jp", + "岐阜.jp", + "岡山.jp", + "岩手.jp", + "島根.jp", + "広島.jp", + "徳島.jp", + "愛媛.jp", + "愛知.jp", + "新潟.jp", + "東京.jp", + "栃木.jp", + "沖縄.jp", + "滋賀.jp", + "熊本.jp", + "石川.jp", + "神奈川.jp", + "福井.jp", + "福岡.jp", + "福島.jp", + "秋田.jp", + "群馬.jp", + "茨城.jp", + "長崎.jp", + "長野.jp", + "青森.jp", + "静岡.jp", + "香川.jp", + "高知.jp", + "鳥取.jp", + "鹿児島.jp", + "*.kawasaki.jp", + "!city.kawasaki.jp", + "*.kitakyushu.jp", + "!city.kitakyushu.jp", + "*.kobe.jp", + "!city.kobe.jp", + "*.nagoya.jp", + "!city.nagoya.jp", + "*.sapporo.jp", + "!city.sapporo.jp", + "*.sendai.jp", + "!city.sendai.jp", + "*.yokohama.jp", + "!city.yokohama.jp", + "aisai.aichi.jp", + "ama.aichi.jp", + "anjo.aichi.jp", + "asuke.aichi.jp", + "chiryu.aichi.jp", + "chita.aichi.jp", + "fuso.aichi.jp", + "gamagori.aichi.jp", + "handa.aichi.jp", + "hazu.aichi.jp", + "hekinan.aichi.jp", + "higashiura.aichi.jp", + "ichinomiya.aichi.jp", + "inazawa.aichi.jp", + "inuyama.aichi.jp", + "isshiki.aichi.jp", + "iwakura.aichi.jp", + "kanie.aichi.jp", + "kariya.aichi.jp", + "kasugai.aichi.jp", + "kira.aichi.jp", + "kiyosu.aichi.jp", + "komaki.aichi.jp", + "konan.aichi.jp", + "kota.aichi.jp", + "mihama.aichi.jp", + "miyoshi.aichi.jp", + "nishio.aichi.jp", + "nisshin.aichi.jp", + "obu.aichi.jp", + "oguchi.aichi.jp", + "oharu.aichi.jp", + "okazaki.aichi.jp", + "owariasahi.aichi.jp", + "seto.aichi.jp", + "shikatsu.aichi.jp", + "shinshiro.aichi.jp", + "shitara.aichi.jp", + "tahara.aichi.jp", + "takahama.aichi.jp", + "tobishima.aichi.jp", + "toei.aichi.jp", + "togo.aichi.jp", + "tokai.aichi.jp", + "tokoname.aichi.jp", + "toyoake.aichi.jp", + "toyohashi.aichi.jp", + "toyokawa.aichi.jp", + "toyone.aichi.jp", + "toyota.aichi.jp", + "tsushima.aichi.jp", + "yatomi.aichi.jp", + "akita.akita.jp", + "daisen.akita.jp", + "fujisato.akita.jp", + "gojome.akita.jp", + "hachirogata.akita.jp", + "happou.akita.jp", + "higashinaruse.akita.jp", + "honjo.akita.jp", + "honjyo.akita.jp", + "ikawa.akita.jp", + "kamikoani.akita.jp", + "kamioka.akita.jp", + "katagami.akita.jp", + "kazuno.akita.jp", + "kitaakita.akita.jp", + "kosaka.akita.jp", + "kyowa.akita.jp", + "misato.akita.jp", + "mitane.akita.jp", + "moriyoshi.akita.jp", + "nikaho.akita.jp", + "noshiro.akita.jp", + "odate.akita.jp", + "oga.akita.jp", + "ogata.akita.jp", + "semboku.akita.jp", + "yokote.akita.jp", + "yurihonjo.akita.jp", + "aomori.aomori.jp", + "gonohe.aomori.jp", + "hachinohe.aomori.jp", + "hashikami.aomori.jp", + "hiranai.aomori.jp", + "hirosaki.aomori.jp", + "itayanagi.aomori.jp", + "kuroishi.aomori.jp", + "misawa.aomori.jp", + "mutsu.aomori.jp", + "nakadomari.aomori.jp", + "noheji.aomori.jp", + "oirase.aomori.jp", + "owani.aomori.jp", + "rokunohe.aomori.jp", + "sannohe.aomori.jp", + "shichinohe.aomori.jp", + "shingo.aomori.jp", + "takko.aomori.jp", + "towada.aomori.jp", + "tsugaru.aomori.jp", + "tsuruta.aomori.jp", + "abiko.chiba.jp", + "asahi.chiba.jp", + "chonan.chiba.jp", + "chosei.chiba.jp", + "choshi.chiba.jp", + "chuo.chiba.jp", + "funabashi.chiba.jp", + "futtsu.chiba.jp", + "hanamigawa.chiba.jp", + "ichihara.chiba.jp", + "ichikawa.chiba.jp", + "ichinomiya.chiba.jp", + "inzai.chiba.jp", + "isumi.chiba.jp", + "kamagaya.chiba.jp", + "kamogawa.chiba.jp", + "kashiwa.chiba.jp", + "katori.chiba.jp", + "katsuura.chiba.jp", + "kimitsu.chiba.jp", + "kisarazu.chiba.jp", + "kozaki.chiba.jp", + "kujukuri.chiba.jp", + "kyonan.chiba.jp", + "matsudo.chiba.jp", + "midori.chiba.jp", + "mihama.chiba.jp", + "minamiboso.chiba.jp", + "mobara.chiba.jp", + "mutsuzawa.chiba.jp", + "nagara.chiba.jp", + "nagareyama.chiba.jp", + "narashino.chiba.jp", + "narita.chiba.jp", + "noda.chiba.jp", + "oamishirasato.chiba.jp", + "omigawa.chiba.jp", + "onjuku.chiba.jp", + "otaki.chiba.jp", + "sakae.chiba.jp", + "sakura.chiba.jp", + "shimofusa.chiba.jp", + "shirako.chiba.jp", + "shiroi.chiba.jp", + "shisui.chiba.jp", + "sodegaura.chiba.jp", + "sosa.chiba.jp", + "tako.chiba.jp", + "tateyama.chiba.jp", + "togane.chiba.jp", + "tohnosho.chiba.jp", + "tomisato.chiba.jp", + "urayasu.chiba.jp", + "yachimata.chiba.jp", + "yachiyo.chiba.jp", + "yokaichiba.chiba.jp", + "yokoshibahikari.chiba.jp", + "yotsukaido.chiba.jp", + "ainan.ehime.jp", + "honai.ehime.jp", + "ikata.ehime.jp", + "imabari.ehime.jp", + "iyo.ehime.jp", + "kamijima.ehime.jp", + "kihoku.ehime.jp", + "kumakogen.ehime.jp", + "masaki.ehime.jp", + "matsuno.ehime.jp", + "matsuyama.ehime.jp", + "namikata.ehime.jp", + "niihama.ehime.jp", + "ozu.ehime.jp", + "saijo.ehime.jp", + "seiyo.ehime.jp", + "shikokuchuo.ehime.jp", + "tobe.ehime.jp", + "toon.ehime.jp", + "uchiko.ehime.jp", + "uwajima.ehime.jp", + "yawatahama.ehime.jp", + "echizen.fukui.jp", + "eiheiji.fukui.jp", + "fukui.fukui.jp", + "ikeda.fukui.jp", + "katsuyama.fukui.jp", + "mihama.fukui.jp", + "minamiechizen.fukui.jp", + "obama.fukui.jp", + "ohi.fukui.jp", + "ono.fukui.jp", + "sabae.fukui.jp", + "sakai.fukui.jp", + "takahama.fukui.jp", + "tsuruga.fukui.jp", + "wakasa.fukui.jp", + "ashiya.fukuoka.jp", + "buzen.fukuoka.jp", + "chikugo.fukuoka.jp", + "chikuho.fukuoka.jp", + "chikujo.fukuoka.jp", + "chikushino.fukuoka.jp", + "chikuzen.fukuoka.jp", + "chuo.fukuoka.jp", + "dazaifu.fukuoka.jp", + "fukuchi.fukuoka.jp", + "hakata.fukuoka.jp", + "higashi.fukuoka.jp", + "hirokawa.fukuoka.jp", + "hisayama.fukuoka.jp", + "iizuka.fukuoka.jp", + "inatsuki.fukuoka.jp", + "kaho.fukuoka.jp", + "kasuga.fukuoka.jp", + "kasuya.fukuoka.jp", + "kawara.fukuoka.jp", + "keisen.fukuoka.jp", + "koga.fukuoka.jp", + "kurate.fukuoka.jp", + "kurogi.fukuoka.jp", + "kurume.fukuoka.jp", + "minami.fukuoka.jp", + "miyako.fukuoka.jp", + "miyama.fukuoka.jp", + "miyawaka.fukuoka.jp", + "mizumaki.fukuoka.jp", + "munakata.fukuoka.jp", + "nakagawa.fukuoka.jp", + "nakama.fukuoka.jp", + "nishi.fukuoka.jp", + "nogata.fukuoka.jp", + "ogori.fukuoka.jp", + "okagaki.fukuoka.jp", + "okawa.fukuoka.jp", + "oki.fukuoka.jp", + "omuta.fukuoka.jp", + "onga.fukuoka.jp", + "onojo.fukuoka.jp", + "oto.fukuoka.jp", + "saigawa.fukuoka.jp", + "sasaguri.fukuoka.jp", + "shingu.fukuoka.jp", + "shinyoshitomi.fukuoka.jp", + "shonai.fukuoka.jp", + "soeda.fukuoka.jp", + "sue.fukuoka.jp", + "tachiarai.fukuoka.jp", + "tagawa.fukuoka.jp", + "takata.fukuoka.jp", + "toho.fukuoka.jp", + "toyotsu.fukuoka.jp", + "tsuiki.fukuoka.jp", + "ukiha.fukuoka.jp", + "umi.fukuoka.jp", + "usui.fukuoka.jp", + "yamada.fukuoka.jp", + "yame.fukuoka.jp", + "yanagawa.fukuoka.jp", + "yukuhashi.fukuoka.jp", + "aizubange.fukushima.jp", + "aizumisato.fukushima.jp", + "aizuwakamatsu.fukushima.jp", + "asakawa.fukushima.jp", + "bandai.fukushima.jp", + "date.fukushima.jp", + "fukushima.fukushima.jp", + "furudono.fukushima.jp", + "futaba.fukushima.jp", + "hanawa.fukushima.jp", + "higashi.fukushima.jp", + "hirata.fukushima.jp", + "hirono.fukushima.jp", + "iitate.fukushima.jp", + "inawashiro.fukushima.jp", + "ishikawa.fukushima.jp", + "iwaki.fukushima.jp", + "izumizaki.fukushima.jp", + "kagamiishi.fukushima.jp", + "kaneyama.fukushima.jp", + "kawamata.fukushima.jp", + "kitakata.fukushima.jp", + "kitashiobara.fukushima.jp", + "koori.fukushima.jp", + "koriyama.fukushima.jp", + "kunimi.fukushima.jp", + "miharu.fukushima.jp", + "mishima.fukushima.jp", + "namie.fukushima.jp", + "nango.fukushima.jp", + "nishiaizu.fukushima.jp", + "nishigo.fukushima.jp", + "okuma.fukushima.jp", + "omotego.fukushima.jp", + "ono.fukushima.jp", + "otama.fukushima.jp", + "samegawa.fukushima.jp", + "shimogo.fukushima.jp", + "shirakawa.fukushima.jp", + "showa.fukushima.jp", + "soma.fukushima.jp", + "sukagawa.fukushima.jp", + "taishin.fukushima.jp", + "tamakawa.fukushima.jp", + "tanagura.fukushima.jp", + "tenei.fukushima.jp", + "yabuki.fukushima.jp", + "yamato.fukushima.jp", + "yamatsuri.fukushima.jp", + "yanaizu.fukushima.jp", + "yugawa.fukushima.jp", + "anpachi.gifu.jp", + "ena.gifu.jp", + "gifu.gifu.jp", + "ginan.gifu.jp", + "godo.gifu.jp", + "gujo.gifu.jp", + "hashima.gifu.jp", + "hichiso.gifu.jp", + "hida.gifu.jp", + "higashishirakawa.gifu.jp", + "ibigawa.gifu.jp", + "ikeda.gifu.jp", + "kakamigahara.gifu.jp", + "kani.gifu.jp", + "kasahara.gifu.jp", + "kasamatsu.gifu.jp", + "kawaue.gifu.jp", + "kitagata.gifu.jp", + "mino.gifu.jp", + "minokamo.gifu.jp", + "mitake.gifu.jp", + "mizunami.gifu.jp", + "motosu.gifu.jp", + "nakatsugawa.gifu.jp", + "ogaki.gifu.jp", + "sakahogi.gifu.jp", + "seki.gifu.jp", + "sekigahara.gifu.jp", + "shirakawa.gifu.jp", + "tajimi.gifu.jp", + "takayama.gifu.jp", + "tarui.gifu.jp", + "toki.gifu.jp", + "tomika.gifu.jp", + "wanouchi.gifu.jp", + "yamagata.gifu.jp", + "yaotsu.gifu.jp", + "yoro.gifu.jp", + "annaka.gunma.jp", + "chiyoda.gunma.jp", + "fujioka.gunma.jp", + "higashiagatsuma.gunma.jp", + "isesaki.gunma.jp", + "itakura.gunma.jp", + "kanna.gunma.jp", + "kanra.gunma.jp", + "katashina.gunma.jp", + "kawaba.gunma.jp", + "kiryu.gunma.jp", + "kusatsu.gunma.jp", + "maebashi.gunma.jp", + "meiwa.gunma.jp", + "midori.gunma.jp", + "minakami.gunma.jp", + "naganohara.gunma.jp", + "nakanojo.gunma.jp", + "nanmoku.gunma.jp", + "numata.gunma.jp", + "oizumi.gunma.jp", + "ora.gunma.jp", + "ota.gunma.jp", + "shibukawa.gunma.jp", + "shimonita.gunma.jp", + "shinto.gunma.jp", + "showa.gunma.jp", + "takasaki.gunma.jp", + "takayama.gunma.jp", + "tamamura.gunma.jp", + "tatebayashi.gunma.jp", + "tomioka.gunma.jp", + "tsukiyono.gunma.jp", + "tsumagoi.gunma.jp", + "ueno.gunma.jp", + "yoshioka.gunma.jp", + "asaminami.hiroshima.jp", + "daiwa.hiroshima.jp", + "etajima.hiroshima.jp", + "fuchu.hiroshima.jp", + "fukuyama.hiroshima.jp", + "hatsukaichi.hiroshima.jp", + "higashihiroshima.hiroshima.jp", + "hongo.hiroshima.jp", + "jinsekikogen.hiroshima.jp", + "kaita.hiroshima.jp", + "kui.hiroshima.jp", + "kumano.hiroshima.jp", + "kure.hiroshima.jp", + "mihara.hiroshima.jp", + "miyoshi.hiroshima.jp", + "naka.hiroshima.jp", + "onomichi.hiroshima.jp", + "osakikamijima.hiroshima.jp", + "otake.hiroshima.jp", + "saka.hiroshima.jp", + "sera.hiroshima.jp", + "seranishi.hiroshima.jp", + "shinichi.hiroshima.jp", + "shobara.hiroshima.jp", + "takehara.hiroshima.jp", + "abashiri.hokkaido.jp", + "abira.hokkaido.jp", + "aibetsu.hokkaido.jp", + "akabira.hokkaido.jp", + "akkeshi.hokkaido.jp", + "asahikawa.hokkaido.jp", + "ashibetsu.hokkaido.jp", + "ashoro.hokkaido.jp", + "assabu.hokkaido.jp", + "atsuma.hokkaido.jp", + "bibai.hokkaido.jp", + "biei.hokkaido.jp", + "bifuka.hokkaido.jp", + "bihoro.hokkaido.jp", + "biratori.hokkaido.jp", + "chippubetsu.hokkaido.jp", + "chitose.hokkaido.jp", + "date.hokkaido.jp", + "ebetsu.hokkaido.jp", + "embetsu.hokkaido.jp", + "eniwa.hokkaido.jp", + "erimo.hokkaido.jp", + "esan.hokkaido.jp", + "esashi.hokkaido.jp", + "fukagawa.hokkaido.jp", + "fukushima.hokkaido.jp", + "furano.hokkaido.jp", + "furubira.hokkaido.jp", + "haboro.hokkaido.jp", + "hakodate.hokkaido.jp", + "hamatonbetsu.hokkaido.jp", + "hidaka.hokkaido.jp", + "higashikagura.hokkaido.jp", + "higashikawa.hokkaido.jp", + "hiroo.hokkaido.jp", + "hokuryu.hokkaido.jp", + "hokuto.hokkaido.jp", + "honbetsu.hokkaido.jp", + "horokanai.hokkaido.jp", + "horonobe.hokkaido.jp", + "ikeda.hokkaido.jp", + "imakane.hokkaido.jp", + "ishikari.hokkaido.jp", + "iwamizawa.hokkaido.jp", + "iwanai.hokkaido.jp", + "kamifurano.hokkaido.jp", + "kamikawa.hokkaido.jp", + "kamishihoro.hokkaido.jp", + "kamisunagawa.hokkaido.jp", + "kamoenai.hokkaido.jp", + "kayabe.hokkaido.jp", + "kembuchi.hokkaido.jp", + "kikonai.hokkaido.jp", + "kimobetsu.hokkaido.jp", + "kitahiroshima.hokkaido.jp", + "kitami.hokkaido.jp", + "kiyosato.hokkaido.jp", + "koshimizu.hokkaido.jp", + "kunneppu.hokkaido.jp", + "kuriyama.hokkaido.jp", + "kuromatsunai.hokkaido.jp", + "kushiro.hokkaido.jp", + "kutchan.hokkaido.jp", + "kyowa.hokkaido.jp", + "mashike.hokkaido.jp", + "matsumae.hokkaido.jp", + "mikasa.hokkaido.jp", + "minamifurano.hokkaido.jp", + "mombetsu.hokkaido.jp", + "moseushi.hokkaido.jp", + "mukawa.hokkaido.jp", + "muroran.hokkaido.jp", + "naie.hokkaido.jp", + "nakagawa.hokkaido.jp", + "nakasatsunai.hokkaido.jp", + "nakatombetsu.hokkaido.jp", + "nanae.hokkaido.jp", + "nanporo.hokkaido.jp", + "nayoro.hokkaido.jp", + "nemuro.hokkaido.jp", + "niikappu.hokkaido.jp", + "niki.hokkaido.jp", + "nishiokoppe.hokkaido.jp", + "noboribetsu.hokkaido.jp", + "numata.hokkaido.jp", + "obihiro.hokkaido.jp", + "obira.hokkaido.jp", + "oketo.hokkaido.jp", + "okoppe.hokkaido.jp", + "otaru.hokkaido.jp", + "otobe.hokkaido.jp", + "otofuke.hokkaido.jp", + "otoineppu.hokkaido.jp", + "oumu.hokkaido.jp", + "ozora.hokkaido.jp", + "pippu.hokkaido.jp", + "rankoshi.hokkaido.jp", + "rebun.hokkaido.jp", + "rikubetsu.hokkaido.jp", + "rishiri.hokkaido.jp", + "rishirifuji.hokkaido.jp", + "saroma.hokkaido.jp", + "sarufutsu.hokkaido.jp", + "shakotan.hokkaido.jp", + "shari.hokkaido.jp", + "shibecha.hokkaido.jp", + "shibetsu.hokkaido.jp", + "shikabe.hokkaido.jp", + "shikaoi.hokkaido.jp", + "shimamaki.hokkaido.jp", + "shimizu.hokkaido.jp", + "shimokawa.hokkaido.jp", + "shinshinotsu.hokkaido.jp", + "shintoku.hokkaido.jp", + "shiranuka.hokkaido.jp", + "shiraoi.hokkaido.jp", + "shiriuchi.hokkaido.jp", + "sobetsu.hokkaido.jp", + "sunagawa.hokkaido.jp", + "taiki.hokkaido.jp", + "takasu.hokkaido.jp", + "takikawa.hokkaido.jp", + "takinoue.hokkaido.jp", + "teshikaga.hokkaido.jp", + "tobetsu.hokkaido.jp", + "tohma.hokkaido.jp", + "tomakomai.hokkaido.jp", + "tomari.hokkaido.jp", + "toya.hokkaido.jp", + "toyako.hokkaido.jp", + "toyotomi.hokkaido.jp", + "toyoura.hokkaido.jp", + "tsubetsu.hokkaido.jp", + "tsukigata.hokkaido.jp", + "urakawa.hokkaido.jp", + "urausu.hokkaido.jp", + "uryu.hokkaido.jp", + "utashinai.hokkaido.jp", + "wakkanai.hokkaido.jp", + "wassamu.hokkaido.jp", + "yakumo.hokkaido.jp", + "yoichi.hokkaido.jp", + "aioi.hyogo.jp", + "akashi.hyogo.jp", + "ako.hyogo.jp", + "amagasaki.hyogo.jp", + "aogaki.hyogo.jp", + "asago.hyogo.jp", + "ashiya.hyogo.jp", + "awaji.hyogo.jp", + "fukusaki.hyogo.jp", + "goshiki.hyogo.jp", + "harima.hyogo.jp", + "himeji.hyogo.jp", + "ichikawa.hyogo.jp", + "inagawa.hyogo.jp", + "itami.hyogo.jp", + "kakogawa.hyogo.jp", + "kamigori.hyogo.jp", + "kamikawa.hyogo.jp", + "kasai.hyogo.jp", + "kasuga.hyogo.jp", + "kawanishi.hyogo.jp", + "miki.hyogo.jp", + "minamiawaji.hyogo.jp", + "nishinomiya.hyogo.jp", + "nishiwaki.hyogo.jp", + "ono.hyogo.jp", + "sanda.hyogo.jp", + "sannan.hyogo.jp", + "sasayama.hyogo.jp", + "sayo.hyogo.jp", + "shingu.hyogo.jp", + "shinonsen.hyogo.jp", + "shiso.hyogo.jp", + "sumoto.hyogo.jp", + "taishi.hyogo.jp", + "taka.hyogo.jp", + "takarazuka.hyogo.jp", + "takasago.hyogo.jp", + "takino.hyogo.jp", + "tamba.hyogo.jp", + "tatsuno.hyogo.jp", + "toyooka.hyogo.jp", + "yabu.hyogo.jp", + "yashiro.hyogo.jp", + "yoka.hyogo.jp", + "yokawa.hyogo.jp", + "ami.ibaraki.jp", + "asahi.ibaraki.jp", + "bando.ibaraki.jp", + "chikusei.ibaraki.jp", + "daigo.ibaraki.jp", + "fujishiro.ibaraki.jp", + "hitachi.ibaraki.jp", + "hitachinaka.ibaraki.jp", + "hitachiomiya.ibaraki.jp", + "hitachiota.ibaraki.jp", + "ibaraki.ibaraki.jp", + "ina.ibaraki.jp", + "inashiki.ibaraki.jp", + "itako.ibaraki.jp", + "iwama.ibaraki.jp", + "joso.ibaraki.jp", + "kamisu.ibaraki.jp", + "kasama.ibaraki.jp", + "kashima.ibaraki.jp", + "kasumigaura.ibaraki.jp", + "koga.ibaraki.jp", + "miho.ibaraki.jp", + "mito.ibaraki.jp", + "moriya.ibaraki.jp", + "naka.ibaraki.jp", + "namegata.ibaraki.jp", + "oarai.ibaraki.jp", + "ogawa.ibaraki.jp", + "omitama.ibaraki.jp", + "ryugasaki.ibaraki.jp", + "sakai.ibaraki.jp", + "sakuragawa.ibaraki.jp", + "shimodate.ibaraki.jp", + "shimotsuma.ibaraki.jp", + "shirosato.ibaraki.jp", + "sowa.ibaraki.jp", + "suifu.ibaraki.jp", + "takahagi.ibaraki.jp", + "tamatsukuri.ibaraki.jp", + "tokai.ibaraki.jp", + "tomobe.ibaraki.jp", + "tone.ibaraki.jp", + "toride.ibaraki.jp", + "tsuchiura.ibaraki.jp", + "tsukuba.ibaraki.jp", + "uchihara.ibaraki.jp", + "ushiku.ibaraki.jp", + "yachiyo.ibaraki.jp", + "yamagata.ibaraki.jp", + "yawara.ibaraki.jp", + "yuki.ibaraki.jp", + "anamizu.ishikawa.jp", + "hakui.ishikawa.jp", + "hakusan.ishikawa.jp", + "kaga.ishikawa.jp", + "kahoku.ishikawa.jp", + "kanazawa.ishikawa.jp", + "kawakita.ishikawa.jp", + "komatsu.ishikawa.jp", + "nakanoto.ishikawa.jp", + "nanao.ishikawa.jp", + "nomi.ishikawa.jp", + "nonoichi.ishikawa.jp", + "noto.ishikawa.jp", + "shika.ishikawa.jp", + "suzu.ishikawa.jp", + "tsubata.ishikawa.jp", + "tsurugi.ishikawa.jp", + "uchinada.ishikawa.jp", + "wajima.ishikawa.jp", + "fudai.iwate.jp", + "fujisawa.iwate.jp", + "hanamaki.iwate.jp", + "hiraizumi.iwate.jp", + "hirono.iwate.jp", + "ichinohe.iwate.jp", + "ichinoseki.iwate.jp", + "iwaizumi.iwate.jp", + "iwate.iwate.jp", + "joboji.iwate.jp", + "kamaishi.iwate.jp", + "kanegasaki.iwate.jp", + "karumai.iwate.jp", + "kawai.iwate.jp", + "kitakami.iwate.jp", + "kuji.iwate.jp", + "kunohe.iwate.jp", + "kuzumaki.iwate.jp", + "miyako.iwate.jp", + "mizusawa.iwate.jp", + "morioka.iwate.jp", + "ninohe.iwate.jp", + "noda.iwate.jp", + "ofunato.iwate.jp", + "oshu.iwate.jp", + "otsuchi.iwate.jp", + "rikuzentakata.iwate.jp", + "shiwa.iwate.jp", + "shizukuishi.iwate.jp", + "sumita.iwate.jp", + "tanohata.iwate.jp", + "tono.iwate.jp", + "yahaba.iwate.jp", + "yamada.iwate.jp", + "ayagawa.kagawa.jp", + "higashikagawa.kagawa.jp", + "kanonji.kagawa.jp", + "kotohira.kagawa.jp", + "manno.kagawa.jp", + "marugame.kagawa.jp", + "mitoyo.kagawa.jp", + "naoshima.kagawa.jp", + "sanuki.kagawa.jp", + "tadotsu.kagawa.jp", + "takamatsu.kagawa.jp", + "tonosho.kagawa.jp", + "uchinomi.kagawa.jp", + "utazu.kagawa.jp", + "zentsuji.kagawa.jp", + "akune.kagoshima.jp", + "amami.kagoshima.jp", + "hioki.kagoshima.jp", + "isa.kagoshima.jp", + "isen.kagoshima.jp", + "izumi.kagoshima.jp", + "kagoshima.kagoshima.jp", + "kanoya.kagoshima.jp", + "kawanabe.kagoshima.jp", + "kinko.kagoshima.jp", + "kouyama.kagoshima.jp", + "makurazaki.kagoshima.jp", + "matsumoto.kagoshima.jp", + "minamitane.kagoshima.jp", + "nakatane.kagoshima.jp", + "nishinoomote.kagoshima.jp", + "satsumasendai.kagoshima.jp", + "soo.kagoshima.jp", + "tarumizu.kagoshima.jp", + "yusui.kagoshima.jp", + "aikawa.kanagawa.jp", + "atsugi.kanagawa.jp", + "ayase.kanagawa.jp", + "chigasaki.kanagawa.jp", + "ebina.kanagawa.jp", + "fujisawa.kanagawa.jp", + "hadano.kanagawa.jp", + "hakone.kanagawa.jp", + "hiratsuka.kanagawa.jp", + "isehara.kanagawa.jp", + "kaisei.kanagawa.jp", + "kamakura.kanagawa.jp", + "kiyokawa.kanagawa.jp", + "matsuda.kanagawa.jp", + "minamiashigara.kanagawa.jp", + "miura.kanagawa.jp", + "nakai.kanagawa.jp", + "ninomiya.kanagawa.jp", + "odawara.kanagawa.jp", + "oi.kanagawa.jp", + "oiso.kanagawa.jp", + "sagamihara.kanagawa.jp", + "samukawa.kanagawa.jp", + "tsukui.kanagawa.jp", + "yamakita.kanagawa.jp", + "yamato.kanagawa.jp", + "yokosuka.kanagawa.jp", + "yugawara.kanagawa.jp", + "zama.kanagawa.jp", + "zushi.kanagawa.jp", + "aki.kochi.jp", + "geisei.kochi.jp", + "hidaka.kochi.jp", + "higashitsuno.kochi.jp", + "ino.kochi.jp", + "kagami.kochi.jp", + "kami.kochi.jp", + "kitagawa.kochi.jp", + "kochi.kochi.jp", + "mihara.kochi.jp", + "motoyama.kochi.jp", + "muroto.kochi.jp", + "nahari.kochi.jp", + "nakamura.kochi.jp", + "nankoku.kochi.jp", + "nishitosa.kochi.jp", + "niyodogawa.kochi.jp", + "ochi.kochi.jp", + "okawa.kochi.jp", + "otoyo.kochi.jp", + "otsuki.kochi.jp", + "sakawa.kochi.jp", + "sukumo.kochi.jp", + "susaki.kochi.jp", + "tosa.kochi.jp", + "tosashimizu.kochi.jp", + "toyo.kochi.jp", + "tsuno.kochi.jp", + "umaji.kochi.jp", + "yasuda.kochi.jp", + "yusuhara.kochi.jp", + "amakusa.kumamoto.jp", + "arao.kumamoto.jp", + "aso.kumamoto.jp", + "choyo.kumamoto.jp", + "gyokuto.kumamoto.jp", + "kamiamakusa.kumamoto.jp", + "kikuchi.kumamoto.jp", + "kumamoto.kumamoto.jp", + "mashiki.kumamoto.jp", + "mifune.kumamoto.jp", + "minamata.kumamoto.jp", + "minamioguni.kumamoto.jp", + "nagasu.kumamoto.jp", + "nishihara.kumamoto.jp", + "oguni.kumamoto.jp", + "ozu.kumamoto.jp", + "sumoto.kumamoto.jp", + "takamori.kumamoto.jp", + "uki.kumamoto.jp", + "uto.kumamoto.jp", + "yamaga.kumamoto.jp", + "yamato.kumamoto.jp", + "yatsushiro.kumamoto.jp", + "ayabe.kyoto.jp", + "fukuchiyama.kyoto.jp", + "higashiyama.kyoto.jp", + "ide.kyoto.jp", + "ine.kyoto.jp", + "joyo.kyoto.jp", + "kameoka.kyoto.jp", + "kamo.kyoto.jp", + "kita.kyoto.jp", + "kizu.kyoto.jp", + "kumiyama.kyoto.jp", + "kyotamba.kyoto.jp", + "kyotanabe.kyoto.jp", + "kyotango.kyoto.jp", + "maizuru.kyoto.jp", + "minami.kyoto.jp", + "minamiyamashiro.kyoto.jp", + "miyazu.kyoto.jp", + "muko.kyoto.jp", + "nagaokakyo.kyoto.jp", + "nakagyo.kyoto.jp", + "nantan.kyoto.jp", + "oyamazaki.kyoto.jp", + "sakyo.kyoto.jp", + "seika.kyoto.jp", + "tanabe.kyoto.jp", + "uji.kyoto.jp", + "ujitawara.kyoto.jp", + "wazuka.kyoto.jp", + "yamashina.kyoto.jp", + "yawata.kyoto.jp", + "asahi.mie.jp", + "inabe.mie.jp", + "ise.mie.jp", + "kameyama.mie.jp", + "kawagoe.mie.jp", + "kiho.mie.jp", + "kisosaki.mie.jp", + "kiwa.mie.jp", + "komono.mie.jp", + "kumano.mie.jp", + "kuwana.mie.jp", + "matsusaka.mie.jp", + "meiwa.mie.jp", + "mihama.mie.jp", + "minamiise.mie.jp", + "misugi.mie.jp", + "miyama.mie.jp", + "nabari.mie.jp", + "shima.mie.jp", + "suzuka.mie.jp", + "tado.mie.jp", + "taiki.mie.jp", + "taki.mie.jp", + "tamaki.mie.jp", + "toba.mie.jp", + "tsu.mie.jp", + "udono.mie.jp", + "ureshino.mie.jp", + "watarai.mie.jp", + "yokkaichi.mie.jp", + "furukawa.miyagi.jp", + "higashimatsushima.miyagi.jp", + "ishinomaki.miyagi.jp", + "iwanuma.miyagi.jp", + "kakuda.miyagi.jp", + "kami.miyagi.jp", + "kawasaki.miyagi.jp", + "marumori.miyagi.jp", + "matsushima.miyagi.jp", + "minamisanriku.miyagi.jp", + "misato.miyagi.jp", + "murata.miyagi.jp", + "natori.miyagi.jp", + "ogawara.miyagi.jp", + "ohira.miyagi.jp", + "onagawa.miyagi.jp", + "osaki.miyagi.jp", + "rifu.miyagi.jp", + "semine.miyagi.jp", + "shibata.miyagi.jp", + "shichikashuku.miyagi.jp", + "shikama.miyagi.jp", + "shiogama.miyagi.jp", + "shiroishi.miyagi.jp", + "tagajo.miyagi.jp", + "taiwa.miyagi.jp", + "tome.miyagi.jp", + "tomiya.miyagi.jp", + "wakuya.miyagi.jp", + "watari.miyagi.jp", + "yamamoto.miyagi.jp", + "zao.miyagi.jp", + "aya.miyazaki.jp", + "ebino.miyazaki.jp", + "gokase.miyazaki.jp", + "hyuga.miyazaki.jp", + "kadogawa.miyazaki.jp", + "kawaminami.miyazaki.jp", + "kijo.miyazaki.jp", + "kitagawa.miyazaki.jp", + "kitakata.miyazaki.jp", + "kitaura.miyazaki.jp", + "kobayashi.miyazaki.jp", + "kunitomi.miyazaki.jp", + "kushima.miyazaki.jp", + "mimata.miyazaki.jp", + "miyakonojo.miyazaki.jp", + "miyazaki.miyazaki.jp", + "morotsuka.miyazaki.jp", + "nichinan.miyazaki.jp", + "nishimera.miyazaki.jp", + "nobeoka.miyazaki.jp", + "saito.miyazaki.jp", + "shiiba.miyazaki.jp", + "shintomi.miyazaki.jp", + "takaharu.miyazaki.jp", + "takanabe.miyazaki.jp", + "takazaki.miyazaki.jp", + "tsuno.miyazaki.jp", + "achi.nagano.jp", + "agematsu.nagano.jp", + "anan.nagano.jp", + "aoki.nagano.jp", + "asahi.nagano.jp", + "azumino.nagano.jp", + "chikuhoku.nagano.jp", + "chikuma.nagano.jp", + "chino.nagano.jp", + "fujimi.nagano.jp", + "hakuba.nagano.jp", + "hara.nagano.jp", + "hiraya.nagano.jp", + "iida.nagano.jp", + "iijima.nagano.jp", + "iiyama.nagano.jp", + "iizuna.nagano.jp", + "ikeda.nagano.jp", + "ikusaka.nagano.jp", + "ina.nagano.jp", + "karuizawa.nagano.jp", + "kawakami.nagano.jp", + "kiso.nagano.jp", + "kisofukushima.nagano.jp", + "kitaaiki.nagano.jp", + "komagane.nagano.jp", + "komoro.nagano.jp", + "matsukawa.nagano.jp", + "matsumoto.nagano.jp", + "miasa.nagano.jp", + "minamiaiki.nagano.jp", + "minamimaki.nagano.jp", + "minamiminowa.nagano.jp", + "minowa.nagano.jp", + "miyada.nagano.jp", + "miyota.nagano.jp", + "mochizuki.nagano.jp", + "nagano.nagano.jp", + "nagawa.nagano.jp", + "nagiso.nagano.jp", + "nakagawa.nagano.jp", + "nakano.nagano.jp", + "nozawaonsen.nagano.jp", + "obuse.nagano.jp", + "ogawa.nagano.jp", + "okaya.nagano.jp", + "omachi.nagano.jp", + "omi.nagano.jp", + "ookuwa.nagano.jp", + "ooshika.nagano.jp", + "otaki.nagano.jp", + "otari.nagano.jp", + "sakae.nagano.jp", + "sakaki.nagano.jp", + "saku.nagano.jp", + "sakuho.nagano.jp", + "shimosuwa.nagano.jp", + "shinanomachi.nagano.jp", + "shiojiri.nagano.jp", + "suwa.nagano.jp", + "suzaka.nagano.jp", + "takagi.nagano.jp", + "takamori.nagano.jp", + "takayama.nagano.jp", + "tateshina.nagano.jp", + "tatsuno.nagano.jp", + "togakushi.nagano.jp", + "togura.nagano.jp", + "tomi.nagano.jp", + "ueda.nagano.jp", + "wada.nagano.jp", + "yamagata.nagano.jp", + "yamanouchi.nagano.jp", + "yasaka.nagano.jp", + "yasuoka.nagano.jp", + "chijiwa.nagasaki.jp", + "futsu.nagasaki.jp", + "goto.nagasaki.jp", + "hasami.nagasaki.jp", + "hirado.nagasaki.jp", + "iki.nagasaki.jp", + "isahaya.nagasaki.jp", + "kawatana.nagasaki.jp", + "kuchinotsu.nagasaki.jp", + "matsuura.nagasaki.jp", + "nagasaki.nagasaki.jp", + "obama.nagasaki.jp", + "omura.nagasaki.jp", + "oseto.nagasaki.jp", + "saikai.nagasaki.jp", + "sasebo.nagasaki.jp", + "seihi.nagasaki.jp", + "shimabara.nagasaki.jp", + "shinkamigoto.nagasaki.jp", + "togitsu.nagasaki.jp", + "tsushima.nagasaki.jp", + "unzen.nagasaki.jp", + "ando.nara.jp", + "gose.nara.jp", + "heguri.nara.jp", + "higashiyoshino.nara.jp", + "ikaruga.nara.jp", + "ikoma.nara.jp", + "kamikitayama.nara.jp", + "kanmaki.nara.jp", + "kashiba.nara.jp", + "kashihara.nara.jp", + "katsuragi.nara.jp", + "kawai.nara.jp", + "kawakami.nara.jp", + "kawanishi.nara.jp", + "koryo.nara.jp", + "kurotaki.nara.jp", + "mitsue.nara.jp", + "miyake.nara.jp", + "nara.nara.jp", + "nosegawa.nara.jp", + "oji.nara.jp", + "ouda.nara.jp", + "oyodo.nara.jp", + "sakurai.nara.jp", + "sango.nara.jp", + "shimoichi.nara.jp", + "shimokitayama.nara.jp", + "shinjo.nara.jp", + "soni.nara.jp", + "takatori.nara.jp", + "tawaramoto.nara.jp", + "tenkawa.nara.jp", + "tenri.nara.jp", + "uda.nara.jp", + "yamatokoriyama.nara.jp", + "yamatotakada.nara.jp", + "yamazoe.nara.jp", + "yoshino.nara.jp", + "aga.niigata.jp", + "agano.niigata.jp", + "gosen.niigata.jp", + "itoigawa.niigata.jp", + "izumozaki.niigata.jp", + "joetsu.niigata.jp", + "kamo.niigata.jp", + "kariwa.niigata.jp", + "kashiwazaki.niigata.jp", + "minamiuonuma.niigata.jp", + "mitsuke.niigata.jp", + "muika.niigata.jp", + "murakami.niigata.jp", + "myoko.niigata.jp", + "nagaoka.niigata.jp", + "niigata.niigata.jp", + "ojiya.niigata.jp", + "omi.niigata.jp", + "sado.niigata.jp", + "sanjo.niigata.jp", + "seiro.niigata.jp", + "seirou.niigata.jp", + "sekikawa.niigata.jp", + "shibata.niigata.jp", + "tagami.niigata.jp", + "tainai.niigata.jp", + "tochio.niigata.jp", + "tokamachi.niigata.jp", + "tsubame.niigata.jp", + "tsunan.niigata.jp", + "uonuma.niigata.jp", + "yahiko.niigata.jp", + "yoita.niigata.jp", + "yuzawa.niigata.jp", + "beppu.oita.jp", + "bungoono.oita.jp", + "bungotakada.oita.jp", + "hasama.oita.jp", + "hiji.oita.jp", + "himeshima.oita.jp", + "hita.oita.jp", + "kamitsue.oita.jp", + "kokonoe.oita.jp", + "kuju.oita.jp", + "kunisaki.oita.jp", + "kusu.oita.jp", + "oita.oita.jp", + "saiki.oita.jp", + "taketa.oita.jp", + "tsukumi.oita.jp", + "usa.oita.jp", + "usuki.oita.jp", + "yufu.oita.jp", + "akaiwa.okayama.jp", + "asakuchi.okayama.jp", + "bizen.okayama.jp", + "hayashima.okayama.jp", + "ibara.okayama.jp", + "kagamino.okayama.jp", + "kasaoka.okayama.jp", + "kibichuo.okayama.jp", + "kumenan.okayama.jp", + "kurashiki.okayama.jp", + "maniwa.okayama.jp", + "misaki.okayama.jp", + "nagi.okayama.jp", + "niimi.okayama.jp", + "nishiawakura.okayama.jp", + "okayama.okayama.jp", + "satosho.okayama.jp", + "setouchi.okayama.jp", + "shinjo.okayama.jp", + "shoo.okayama.jp", + "soja.okayama.jp", + "takahashi.okayama.jp", + "tamano.okayama.jp", + "tsuyama.okayama.jp", + "wake.okayama.jp", + "yakage.okayama.jp", + "aguni.okinawa.jp", + "ginowan.okinawa.jp", + "ginoza.okinawa.jp", + "gushikami.okinawa.jp", + "haebaru.okinawa.jp", + "higashi.okinawa.jp", + "hirara.okinawa.jp", + "iheya.okinawa.jp", + "ishigaki.okinawa.jp", + "ishikawa.okinawa.jp", + "itoman.okinawa.jp", + "izena.okinawa.jp", + "kadena.okinawa.jp", + "kin.okinawa.jp", + "kitadaito.okinawa.jp", + "kitanakagusuku.okinawa.jp", + "kumejima.okinawa.jp", + "kunigami.okinawa.jp", + "minamidaito.okinawa.jp", + "motobu.okinawa.jp", + "nago.okinawa.jp", + "naha.okinawa.jp", + "nakagusuku.okinawa.jp", + "nakijin.okinawa.jp", + "nanjo.okinawa.jp", + "nishihara.okinawa.jp", + "ogimi.okinawa.jp", + "okinawa.okinawa.jp", + "onna.okinawa.jp", + "shimoji.okinawa.jp", + "taketomi.okinawa.jp", + "tarama.okinawa.jp", + "tokashiki.okinawa.jp", + "tomigusuku.okinawa.jp", + "tonaki.okinawa.jp", + "urasoe.okinawa.jp", + "uruma.okinawa.jp", + "yaese.okinawa.jp", + "yomitan.okinawa.jp", + "yonabaru.okinawa.jp", + "yonaguni.okinawa.jp", + "zamami.okinawa.jp", + "abeno.osaka.jp", + "chihayaakasaka.osaka.jp", + "chuo.osaka.jp", + "daito.osaka.jp", + "fujiidera.osaka.jp", + "habikino.osaka.jp", + "hannan.osaka.jp", + "higashiosaka.osaka.jp", + "higashisumiyoshi.osaka.jp", + "higashiyodogawa.osaka.jp", + "hirakata.osaka.jp", + "ibaraki.osaka.jp", + "ikeda.osaka.jp", + "izumi.osaka.jp", + "izumiotsu.osaka.jp", + "izumisano.osaka.jp", + "kadoma.osaka.jp", + "kaizuka.osaka.jp", + "kanan.osaka.jp", + "kashiwara.osaka.jp", + "katano.osaka.jp", + "kawachinagano.osaka.jp", + "kishiwada.osaka.jp", + "kita.osaka.jp", + "kumatori.osaka.jp", + "matsubara.osaka.jp", + "minato.osaka.jp", + "minoh.osaka.jp", + "misaki.osaka.jp", + "moriguchi.osaka.jp", + "neyagawa.osaka.jp", + "nishi.osaka.jp", + "nose.osaka.jp", + "osakasayama.osaka.jp", + "sakai.osaka.jp", + "sayama.osaka.jp", + "sennan.osaka.jp", + "settsu.osaka.jp", + "shijonawate.osaka.jp", + "shimamoto.osaka.jp", + "suita.osaka.jp", + "tadaoka.osaka.jp", + "taishi.osaka.jp", + "tajiri.osaka.jp", + "takaishi.osaka.jp", + "takatsuki.osaka.jp", + "tondabayashi.osaka.jp", + "toyonaka.osaka.jp", + "toyono.osaka.jp", + "yao.osaka.jp", + "ariake.saga.jp", + "arita.saga.jp", + "fukudomi.saga.jp", + "genkai.saga.jp", + "hamatama.saga.jp", + "hizen.saga.jp", + "imari.saga.jp", + "kamimine.saga.jp", + "kanzaki.saga.jp", + "karatsu.saga.jp", + "kashima.saga.jp", + "kitagata.saga.jp", + "kitahata.saga.jp", + "kiyama.saga.jp", + "kouhoku.saga.jp", + "kyuragi.saga.jp", + "nishiarita.saga.jp", + "ogi.saga.jp", + "omachi.saga.jp", + "ouchi.saga.jp", + "saga.saga.jp", + "shiroishi.saga.jp", + "taku.saga.jp", + "tara.saga.jp", + "tosu.saga.jp", + "yoshinogari.saga.jp", + "arakawa.saitama.jp", + "asaka.saitama.jp", + "chichibu.saitama.jp", + "fujimi.saitama.jp", + "fujimino.saitama.jp", + "fukaya.saitama.jp", + "hanno.saitama.jp", + "hanyu.saitama.jp", + "hasuda.saitama.jp", + "hatogaya.saitama.jp", + "hatoyama.saitama.jp", + "hidaka.saitama.jp", + "higashichichibu.saitama.jp", + "higashimatsuyama.saitama.jp", + "honjo.saitama.jp", + "ina.saitama.jp", + "iruma.saitama.jp", + "iwatsuki.saitama.jp", + "kamiizumi.saitama.jp", + "kamikawa.saitama.jp", + "kamisato.saitama.jp", + "kasukabe.saitama.jp", + "kawagoe.saitama.jp", + "kawaguchi.saitama.jp", + "kawajima.saitama.jp", + "kazo.saitama.jp", + "kitamoto.saitama.jp", + "koshigaya.saitama.jp", + "kounosu.saitama.jp", + "kuki.saitama.jp", + "kumagaya.saitama.jp", + "matsubushi.saitama.jp", + "minano.saitama.jp", + "misato.saitama.jp", + "miyashiro.saitama.jp", + "miyoshi.saitama.jp", + "moroyama.saitama.jp", + "nagatoro.saitama.jp", + "namegawa.saitama.jp", + "niiza.saitama.jp", + "ogano.saitama.jp", + "ogawa.saitama.jp", + "ogose.saitama.jp", + "okegawa.saitama.jp", + "omiya.saitama.jp", + "otaki.saitama.jp", + "ranzan.saitama.jp", + "ryokami.saitama.jp", + "saitama.saitama.jp", + "sakado.saitama.jp", + "satte.saitama.jp", + "sayama.saitama.jp", + "shiki.saitama.jp", + "shiraoka.saitama.jp", + "soka.saitama.jp", + "sugito.saitama.jp", + "toda.saitama.jp", + "tokigawa.saitama.jp", + "tokorozawa.saitama.jp", + "tsurugashima.saitama.jp", + "urawa.saitama.jp", + "warabi.saitama.jp", + "yashio.saitama.jp", + "yokoze.saitama.jp", + "yono.saitama.jp", + "yorii.saitama.jp", + "yoshida.saitama.jp", + "yoshikawa.saitama.jp", + "yoshimi.saitama.jp", + "aisho.shiga.jp", + "gamo.shiga.jp", + "higashiomi.shiga.jp", + "hikone.shiga.jp", + "koka.shiga.jp", + "konan.shiga.jp", + "kosei.shiga.jp", + "koto.shiga.jp", + "kusatsu.shiga.jp", + "maibara.shiga.jp", + "moriyama.shiga.jp", + "nagahama.shiga.jp", + "nishiazai.shiga.jp", + "notogawa.shiga.jp", + "omihachiman.shiga.jp", + "otsu.shiga.jp", + "ritto.shiga.jp", + "ryuoh.shiga.jp", + "takashima.shiga.jp", + "takatsuki.shiga.jp", + "torahime.shiga.jp", + "toyosato.shiga.jp", + "yasu.shiga.jp", + "akagi.shimane.jp", + "ama.shimane.jp", + "gotsu.shimane.jp", + "hamada.shimane.jp", + "higashiizumo.shimane.jp", + "hikawa.shimane.jp", + "hikimi.shimane.jp", + "izumo.shimane.jp", + "kakinoki.shimane.jp", + "masuda.shimane.jp", + "matsue.shimane.jp", + "misato.shimane.jp", + "nishinoshima.shimane.jp", + "ohda.shimane.jp", + "okinoshima.shimane.jp", + "okuizumo.shimane.jp", + "shimane.shimane.jp", + "tamayu.shimane.jp", + "tsuwano.shimane.jp", + "unnan.shimane.jp", + "yakumo.shimane.jp", + "yasugi.shimane.jp", + "yatsuka.shimane.jp", + "arai.shizuoka.jp", + "atami.shizuoka.jp", + "fuji.shizuoka.jp", + "fujieda.shizuoka.jp", + "fujikawa.shizuoka.jp", + "fujinomiya.shizuoka.jp", + "fukuroi.shizuoka.jp", + "gotemba.shizuoka.jp", + "haibara.shizuoka.jp", + "hamamatsu.shizuoka.jp", + "higashiizu.shizuoka.jp", + "ito.shizuoka.jp", + "iwata.shizuoka.jp", + "izu.shizuoka.jp", + "izunokuni.shizuoka.jp", + "kakegawa.shizuoka.jp", + "kannami.shizuoka.jp", + "kawanehon.shizuoka.jp", + "kawazu.shizuoka.jp", + "kikugawa.shizuoka.jp", + "kosai.shizuoka.jp", + "makinohara.shizuoka.jp", + "matsuzaki.shizuoka.jp", + "minamiizu.shizuoka.jp", + "mishima.shizuoka.jp", + "morimachi.shizuoka.jp", + "nishiizu.shizuoka.jp", + "numazu.shizuoka.jp", + "omaezaki.shizuoka.jp", + "shimada.shizuoka.jp", + "shimizu.shizuoka.jp", + "shimoda.shizuoka.jp", + "shizuoka.shizuoka.jp", + "susono.shizuoka.jp", + "yaizu.shizuoka.jp", + "yoshida.shizuoka.jp", + "ashikaga.tochigi.jp", + "bato.tochigi.jp", + "haga.tochigi.jp", + "ichikai.tochigi.jp", + "iwafune.tochigi.jp", + "kaminokawa.tochigi.jp", + "kanuma.tochigi.jp", + "karasuyama.tochigi.jp", + "kuroiso.tochigi.jp", + "mashiko.tochigi.jp", + "mibu.tochigi.jp", + "moka.tochigi.jp", + "motegi.tochigi.jp", + "nasu.tochigi.jp", + "nasushiobara.tochigi.jp", + "nikko.tochigi.jp", + "nishikata.tochigi.jp", + "nogi.tochigi.jp", + "ohira.tochigi.jp", + "ohtawara.tochigi.jp", + "oyama.tochigi.jp", + "sakura.tochigi.jp", + "sano.tochigi.jp", + "shimotsuke.tochigi.jp", + "shioya.tochigi.jp", + "takanezawa.tochigi.jp", + "tochigi.tochigi.jp", + "tsuga.tochigi.jp", + "ujiie.tochigi.jp", + "utsunomiya.tochigi.jp", + "yaita.tochigi.jp", + "aizumi.tokushima.jp", + "anan.tokushima.jp", + "ichiba.tokushima.jp", + "itano.tokushima.jp", + "kainan.tokushima.jp", + "komatsushima.tokushima.jp", + "matsushige.tokushima.jp", + "mima.tokushima.jp", + "minami.tokushima.jp", + "miyoshi.tokushima.jp", + "mugi.tokushima.jp", + "nakagawa.tokushima.jp", + "naruto.tokushima.jp", + "sanagochi.tokushima.jp", + "shishikui.tokushima.jp", + "tokushima.tokushima.jp", + "wajiki.tokushima.jp", + "adachi.tokyo.jp", + "akiruno.tokyo.jp", + "akishima.tokyo.jp", + "aogashima.tokyo.jp", + "arakawa.tokyo.jp", + "bunkyo.tokyo.jp", + "chiyoda.tokyo.jp", + "chofu.tokyo.jp", + "chuo.tokyo.jp", + "edogawa.tokyo.jp", + "fuchu.tokyo.jp", + "fussa.tokyo.jp", + "hachijo.tokyo.jp", + "hachioji.tokyo.jp", + "hamura.tokyo.jp", + "higashikurume.tokyo.jp", + "higashimurayama.tokyo.jp", + "higashiyamato.tokyo.jp", + "hino.tokyo.jp", + "hinode.tokyo.jp", + "hinohara.tokyo.jp", + "inagi.tokyo.jp", + "itabashi.tokyo.jp", + "katsushika.tokyo.jp", + "kita.tokyo.jp", + "kiyose.tokyo.jp", + "kodaira.tokyo.jp", + "koganei.tokyo.jp", + "kokubunji.tokyo.jp", + "komae.tokyo.jp", + "koto.tokyo.jp", + "kouzushima.tokyo.jp", + "kunitachi.tokyo.jp", + "machida.tokyo.jp", + "meguro.tokyo.jp", + "minato.tokyo.jp", + "mitaka.tokyo.jp", + "mizuho.tokyo.jp", + "musashimurayama.tokyo.jp", + "musashino.tokyo.jp", + "nakano.tokyo.jp", + "nerima.tokyo.jp", + "ogasawara.tokyo.jp", + "okutama.tokyo.jp", + "ome.tokyo.jp", + "oshima.tokyo.jp", + "ota.tokyo.jp", + "setagaya.tokyo.jp", + "shibuya.tokyo.jp", + "shinagawa.tokyo.jp", + "shinjuku.tokyo.jp", + "suginami.tokyo.jp", + "sumida.tokyo.jp", + "tachikawa.tokyo.jp", + "taito.tokyo.jp", + "tama.tokyo.jp", + "toshima.tokyo.jp", + "chizu.tottori.jp", + "hino.tottori.jp", + "kawahara.tottori.jp", + "koge.tottori.jp", + "kotoura.tottori.jp", + "misasa.tottori.jp", + "nanbu.tottori.jp", + "nichinan.tottori.jp", + "sakaiminato.tottori.jp", + "tottori.tottori.jp", + "wakasa.tottori.jp", + "yazu.tottori.jp", + "yonago.tottori.jp", + "asahi.toyama.jp", + "fuchu.toyama.jp", + "fukumitsu.toyama.jp", + "funahashi.toyama.jp", + "himi.toyama.jp", + "imizu.toyama.jp", + "inami.toyama.jp", + "johana.toyama.jp", + "kamiichi.toyama.jp", + "kurobe.toyama.jp", + "nakaniikawa.toyama.jp", + "namerikawa.toyama.jp", + "nanto.toyama.jp", + "nyuzen.toyama.jp", + "oyabe.toyama.jp", + "taira.toyama.jp", + "takaoka.toyama.jp", + "tateyama.toyama.jp", + "toga.toyama.jp", + "tonami.toyama.jp", + "toyama.toyama.jp", + "unazuki.toyama.jp", + "uozu.toyama.jp", + "yamada.toyama.jp", + "arida.wakayama.jp", + "aridagawa.wakayama.jp", + "gobo.wakayama.jp", + "hashimoto.wakayama.jp", + "hidaka.wakayama.jp", + "hirogawa.wakayama.jp", + "inami.wakayama.jp", + "iwade.wakayama.jp", + "kainan.wakayama.jp", + "kamitonda.wakayama.jp", + "katsuragi.wakayama.jp", + "kimino.wakayama.jp", + "kinokawa.wakayama.jp", + "kitayama.wakayama.jp", + "koya.wakayama.jp", + "koza.wakayama.jp", + "kozagawa.wakayama.jp", + "kudoyama.wakayama.jp", + "kushimoto.wakayama.jp", + "mihama.wakayama.jp", + "misato.wakayama.jp", + "nachikatsuura.wakayama.jp", + "shingu.wakayama.jp", + "shirahama.wakayama.jp", + "taiji.wakayama.jp", + "tanabe.wakayama.jp", + "wakayama.wakayama.jp", + "yuasa.wakayama.jp", + "yura.wakayama.jp", + "asahi.yamagata.jp", + "funagata.yamagata.jp", + "higashine.yamagata.jp", + "iide.yamagata.jp", + "kahoku.yamagata.jp", + "kaminoyama.yamagata.jp", + "kaneyama.yamagata.jp", + "kawanishi.yamagata.jp", + "mamurogawa.yamagata.jp", + "mikawa.yamagata.jp", + "murayama.yamagata.jp", + "nagai.yamagata.jp", + "nakayama.yamagata.jp", + "nanyo.yamagata.jp", + "nishikawa.yamagata.jp", + "obanazawa.yamagata.jp", + "oe.yamagata.jp", + "oguni.yamagata.jp", + "ohkura.yamagata.jp", + "oishida.yamagata.jp", + "sagae.yamagata.jp", + "sakata.yamagata.jp", + "sakegawa.yamagata.jp", + "shinjo.yamagata.jp", + "shirataka.yamagata.jp", + "shonai.yamagata.jp", + "takahata.yamagata.jp", + "tendo.yamagata.jp", + "tozawa.yamagata.jp", + "tsuruoka.yamagata.jp", + "yamagata.yamagata.jp", + "yamanobe.yamagata.jp", + "yonezawa.yamagata.jp", + "yuza.yamagata.jp", + "abu.yamaguchi.jp", + "hagi.yamaguchi.jp", + "hikari.yamaguchi.jp", + "hofu.yamaguchi.jp", + "iwakuni.yamaguchi.jp", + "kudamatsu.yamaguchi.jp", + "mitou.yamaguchi.jp", + "nagato.yamaguchi.jp", + "oshima.yamaguchi.jp", + "shimonoseki.yamaguchi.jp", + "shunan.yamaguchi.jp", + "tabuse.yamaguchi.jp", + "tokuyama.yamaguchi.jp", + "toyota.yamaguchi.jp", + "ube.yamaguchi.jp", + "yuu.yamaguchi.jp", + "chuo.yamanashi.jp", + "doshi.yamanashi.jp", + "fuefuki.yamanashi.jp", + "fujikawa.yamanashi.jp", + "fujikawaguchiko.yamanashi.jp", + "fujiyoshida.yamanashi.jp", + "hayakawa.yamanashi.jp", + "hokuto.yamanashi.jp", + "ichikawamisato.yamanashi.jp", + "kai.yamanashi.jp", + "kofu.yamanashi.jp", + "koshu.yamanashi.jp", + "kosuge.yamanashi.jp", + "minami-alps.yamanashi.jp", + "minobu.yamanashi.jp", + "nakamichi.yamanashi.jp", + "nanbu.yamanashi.jp", + "narusawa.yamanashi.jp", + "nirasaki.yamanashi.jp", + "nishikatsura.yamanashi.jp", + "oshino.yamanashi.jp", + "otsuki.yamanashi.jp", + "showa.yamanashi.jp", + "tabayama.yamanashi.jp", + "tsuru.yamanashi.jp", + "uenohara.yamanashi.jp", + "yamanakako.yamanashi.jp", + "yamanashi.yamanashi.jp", + "ke", + "ac.ke", + "co.ke", + "go.ke", + "info.ke", + "me.ke", + "mobi.ke", + "ne.ke", + "or.ke", + "sc.ke", + "kg", + "com.kg", + "edu.kg", + "gov.kg", + "mil.kg", + "net.kg", + "org.kg", + "*.kh", + "ki", + "biz.ki", + "com.ki", + "edu.ki", + "gov.ki", + "info.ki", + "net.ki", + "org.ki", + "km", + "ass.km", + "com.km", + "edu.km", + "gov.km", + "mil.km", + "nom.km", + "org.km", + "prd.km", + "tm.km", + "asso.km", + "coop.km", + "gouv.km", + "medecin.km", + "notaires.km", + "pharmaciens.km", + "presse.km", + "veterinaire.km", + "kn", + "edu.kn", + "gov.kn", + "net.kn", + "org.kn", + "kp", + "com.kp", + "edu.kp", + "gov.kp", + "org.kp", + "rep.kp", + "tra.kp", + "kr", + "ac.kr", + "co.kr", + "es.kr", + "go.kr", + "hs.kr", + "kg.kr", + "mil.kr", + "ms.kr", + "ne.kr", + "or.kr", + "pe.kr", + "re.kr", + "sc.kr", + "busan.kr", + "chungbuk.kr", + "chungnam.kr", + "daegu.kr", + "daejeon.kr", + "gangwon.kr", + "gwangju.kr", + "gyeongbuk.kr", + "gyeonggi.kr", + "gyeongnam.kr", + "incheon.kr", + "jeju.kr", + "jeonbuk.kr", + "jeonnam.kr", + "seoul.kr", + "ulsan.kr", + "kw", + "com.kw", + "edu.kw", + "emb.kw", + "gov.kw", + "ind.kw", + "net.kw", + "org.kw", + "ky", + "com.ky", + "edu.ky", + "net.ky", + "org.ky", + "kz", + "com.kz", + "edu.kz", + "gov.kz", + "mil.kz", + "net.kz", + "org.kz", + "la", + "com.la", + "edu.la", + "gov.la", + "info.la", + "int.la", + "net.la", + "org.la", + "per.la", + "lb", + "com.lb", + "edu.lb", + "gov.lb", + "net.lb", + "org.lb", + "lc", + "co.lc", + "com.lc", + "edu.lc", + "gov.lc", + "net.lc", + "org.lc", + "li", + "lk", + "ac.lk", + "assn.lk", + "com.lk", + "edu.lk", + "gov.lk", + "grp.lk", + "hotel.lk", + "int.lk", + "ltd.lk", + "net.lk", + "ngo.lk", + "org.lk", + "sch.lk", + "soc.lk", + "web.lk", + "lr", + "com.lr", + "edu.lr", + "gov.lr", + "net.lr", + "org.lr", + "ls", + "ac.ls", + "biz.ls", + "co.ls", + "edu.ls", + "gov.ls", + "info.ls", + "net.ls", + "org.ls", + "sc.ls", + "lt", + "gov.lt", + "lu", + "lv", + "asn.lv", + "com.lv", + "conf.lv", + "edu.lv", + "gov.lv", + "id.lv", + "mil.lv", + "net.lv", + "org.lv", + "ly", + "com.ly", + "edu.ly", + "gov.ly", + "id.ly", + "med.ly", + "net.ly", + "org.ly", + "plc.ly", + "sch.ly", + "ma", + "ac.ma", + "co.ma", + "gov.ma", + "net.ma", + "org.ma", + "press.ma", + "mc", + "asso.mc", + "tm.mc", + "md", + "me", + "ac.me", + "co.me", + "edu.me", + "gov.me", + "its.me", + "net.me", + "org.me", + "priv.me", + "mg", + "co.mg", + "com.mg", + "edu.mg", + "gov.mg", + "mil.mg", + "nom.mg", + "org.mg", + "prd.mg", + "mh", + "mil", + "mk", + "com.mk", + "edu.mk", + "gov.mk", + "inf.mk", + "name.mk", + "net.mk", + "org.mk", + "ml", + "com.ml", + "edu.ml", + "gouv.ml", + "gov.ml", + "net.ml", + "org.ml", + "presse.ml", + "*.mm", + "mn", + "edu.mn", + "gov.mn", + "org.mn", + "mo", + "com.mo", + "edu.mo", + "gov.mo", + "net.mo", + "org.mo", + "mobi", + "mp", + "mq", + "mr", + "gov.mr", + "ms", + "com.ms", + "edu.ms", + "gov.ms", + "net.ms", + "org.ms", + "mt", + "com.mt", + "edu.mt", + "net.mt", + "org.mt", + "mu", + "ac.mu", + "co.mu", + "com.mu", + "gov.mu", + "net.mu", + "or.mu", + "org.mu", + "museum", + "mv", + "aero.mv", + "biz.mv", + "com.mv", + "coop.mv", + "edu.mv", + "gov.mv", + "info.mv", + "int.mv", + "mil.mv", + "museum.mv", + "name.mv", + "net.mv", + "org.mv", + "pro.mv", + "mw", + "ac.mw", + "biz.mw", + "co.mw", + "com.mw", + "coop.mw", + "edu.mw", + "gov.mw", + "int.mw", + "net.mw", + "org.mw", + "mx", + "com.mx", + "edu.mx", + "gob.mx", + "net.mx", + "org.mx", + "my", + "biz.my", + "com.my", + "edu.my", + "gov.my", + "mil.my", + "name.my", + "net.my", + "org.my", + "mz", + "ac.mz", + "adv.mz", + "co.mz", + "edu.mz", + "gov.mz", + "mil.mz", + "net.mz", + "org.mz", + "na", + "alt.na", + "co.na", + "com.na", + "gov.na", + "net.na", + "org.na", + "name", + "nc", + "asso.nc", + "nom.nc", + "ne", + "net", + "nf", + "arts.nf", + "com.nf", + "firm.nf", + "info.nf", + "net.nf", + "other.nf", + "per.nf", + "rec.nf", + "store.nf", + "web.nf", + "ng", + "com.ng", + "edu.ng", + "gov.ng", + "i.ng", + "mil.ng", + "mobi.ng", + "name.ng", + "net.ng", + "org.ng", + "sch.ng", + "ni", + "ac.ni", + "biz.ni", + "co.ni", + "com.ni", + "edu.ni", + "gob.ni", + "in.ni", + "info.ni", + "int.ni", + "mil.ni", + "net.ni", + "nom.ni", + "org.ni", + "web.ni", + "nl", + "no", + "fhs.no", + "folkebibl.no", + "fylkesbibl.no", + "idrett.no", + "museum.no", + "priv.no", + "vgs.no", + "dep.no", + "herad.no", + "kommune.no", + "mil.no", + "stat.no", + "aa.no", + "ah.no", + "bu.no", + "fm.no", + "hl.no", + "hm.no", + "jan-mayen.no", + "mr.no", + "nl.no", + "nt.no", + "of.no", + "ol.no", + "oslo.no", + "rl.no", + "sf.no", + "st.no", + "svalbard.no", + "tm.no", + "tr.no", + "va.no", + "vf.no", + "gs.aa.no", + "gs.ah.no", + "gs.bu.no", + "gs.fm.no", + "gs.hl.no", + "gs.hm.no", + "gs.jan-mayen.no", + "gs.mr.no", + "gs.nl.no", + "gs.nt.no", + "gs.of.no", + "gs.ol.no", + "gs.oslo.no", + "gs.rl.no", + "gs.sf.no", + "gs.st.no", + "gs.svalbard.no", + "gs.tm.no", + "gs.tr.no", + "gs.va.no", + "gs.vf.no", + "akrehamn.no", + "åkrehamn.no", + "algard.no", + "ålgård.no", + "arna.no", + "bronnoysund.no", + "brønnøysund.no", + "brumunddal.no", + "bryne.no", + "drobak.no", + "drøbak.no", + "egersund.no", + "fetsund.no", + "floro.no", + "florø.no", + "fredrikstad.no", + "hokksund.no", + "honefoss.no", + "hønefoss.no", + "jessheim.no", + "jorpeland.no", + "jørpeland.no", + "kirkenes.no", + "kopervik.no", + "krokstadelva.no", + "langevag.no", + "langevåg.no", + "leirvik.no", + "mjondalen.no", + "mjøndalen.no", + "mo-i-rana.no", + "mosjoen.no", + "mosjøen.no", + "nesoddtangen.no", + "orkanger.no", + "osoyro.no", + "osøyro.no", + "raholt.no", + "råholt.no", + "sandnessjoen.no", + "sandnessjøen.no", + "skedsmokorset.no", + "slattum.no", + "spjelkavik.no", + "stathelle.no", + "stavern.no", + "stjordalshalsen.no", + "stjørdalshalsen.no", + "tananger.no", + "tranby.no", + "vossevangen.no", + "aarborte.no", + "aejrie.no", + "afjord.no", + "åfjord.no", + "agdenes.no", + "nes.akershus.no", + "aknoluokta.no", + "ákŋoluokta.no", + "al.no", + "ål.no", + "alaheadju.no", + "álaheadju.no", + "alesund.no", + "ålesund.no", + "alstahaug.no", + "alta.no", + "áltá.no", + "alvdal.no", + "amli.no", + "åmli.no", + "amot.no", + "åmot.no", + "andasuolo.no", + "andebu.no", + "andoy.no", + "andøy.no", + "ardal.no", + "årdal.no", + "aremark.no", + "arendal.no", + "ås.no", + "aseral.no", + "åseral.no", + "asker.no", + "askim.no", + "askoy.no", + "askøy.no", + "askvoll.no", + "asnes.no", + "åsnes.no", + "audnedaln.no", + "aukra.no", + "aure.no", + "aurland.no", + "aurskog-holand.no", + "aurskog-høland.no", + "austevoll.no", + "austrheim.no", + "averoy.no", + "averøy.no", + "badaddja.no", + "bådåddjå.no", + "bærum.no", + "bahcavuotna.no", + "báhcavuotna.no", + "bahccavuotna.no", + "báhccavuotna.no", + "baidar.no", + "báidár.no", + "bajddar.no", + "bájddar.no", + "balat.no", + "bálát.no", + "balestrand.no", + "ballangen.no", + "balsfjord.no", + "bamble.no", + "bardu.no", + "barum.no", + "batsfjord.no", + "båtsfjord.no", + "bearalvahki.no", + "bearalváhki.no", + "beardu.no", + "beiarn.no", + "berg.no", + "bergen.no", + "berlevag.no", + "berlevåg.no", + "bievat.no", + "bievát.no", + "bindal.no", + "birkenes.no", + "bjarkoy.no", + "bjarkøy.no", + "bjerkreim.no", + "bjugn.no", + "bodo.no", + "bodø.no", + "bokn.no", + "bomlo.no", + "bømlo.no", + "bremanger.no", + "bronnoy.no", + "brønnøy.no", + "budejju.no", + "nes.buskerud.no", + "bygland.no", + "bykle.no", + "cahcesuolo.no", + "čáhcesuolo.no", + "davvenjarga.no", + "davvenjárga.no", + "davvesiida.no", + "deatnu.no", + "dielddanuorri.no", + "divtasvuodna.no", + "divttasvuotna.no", + "donna.no", + "dønna.no", + "dovre.no", + "drammen.no", + "drangedal.no", + "dyroy.no", + "dyrøy.no", + "eid.no", + "eidfjord.no", + "eidsberg.no", + "eidskog.no", + "eidsvoll.no", + "eigersund.no", + "elverum.no", + "enebakk.no", + "engerdal.no", + "etne.no", + "etnedal.no", + "evenassi.no", + "evenášši.no", + "evenes.no", + "evje-og-hornnes.no", + "farsund.no", + "fauske.no", + "fedje.no", + "fet.no", + "finnoy.no", + "finnøy.no", + "fitjar.no", + "fjaler.no", + "fjell.no", + "fla.no", + "flå.no", + "flakstad.no", + "flatanger.no", + "flekkefjord.no", + "flesberg.no", + "flora.no", + "folldal.no", + "forde.no", + "førde.no", + "forsand.no", + "fosnes.no", + "fræna.no", + "frana.no", + "frei.no", + "frogn.no", + "froland.no", + "frosta.no", + "froya.no", + "frøya.no", + "fuoisku.no", + "fuossko.no", + "fusa.no", + "fyresdal.no", + "gaivuotna.no", + "gáivuotna.no", + "galsa.no", + "gálsá.no", + "gamvik.no", + "gangaviika.no", + "gáŋgaviika.no", + "gaular.no", + "gausdal.no", + "giehtavuoatna.no", + "gildeskal.no", + "gildeskål.no", + "giske.no", + "gjemnes.no", + "gjerdrum.no", + "gjerstad.no", + "gjesdal.no", + "gjovik.no", + "gjøvik.no", + "gloppen.no", + "gol.no", + "gran.no", + "grane.no", + "granvin.no", + "gratangen.no", + "grimstad.no", + "grong.no", + "grue.no", + "gulen.no", + "guovdageaidnu.no", + "ha.no", + "hå.no", + "habmer.no", + "hábmer.no", + "hadsel.no", + "hægebostad.no", + "hagebostad.no", + "halden.no", + "halsa.no", + "hamar.no", + "hamaroy.no", + "hammarfeasta.no", + "hámmárfeasta.no", + "hammerfest.no", + "hapmir.no", + "hápmir.no", + "haram.no", + "hareid.no", + "harstad.no", + "hasvik.no", + "hattfjelldal.no", + "haugesund.no", + "os.hedmark.no", + "valer.hedmark.no", + "våler.hedmark.no", + "hemne.no", + "hemnes.no", + "hemsedal.no", + "hitra.no", + "hjartdal.no", + "hjelmeland.no", + "hobol.no", + "hobøl.no", + "hof.no", + "hol.no", + "hole.no", + "holmestrand.no", + "holtalen.no", + "holtålen.no", + "os.hordaland.no", + "hornindal.no", + "horten.no", + "hoyanger.no", + "høyanger.no", + "hoylandet.no", + "høylandet.no", + "hurdal.no", + "hurum.no", + "hvaler.no", + "hyllestad.no", + "ibestad.no", + "inderoy.no", + "inderøy.no", + "iveland.no", + "ivgu.no", + "jevnaker.no", + "jolster.no", + "jølster.no", + "jondal.no", + "kafjord.no", + "kåfjord.no", + "karasjohka.no", + "kárášjohka.no", + "karasjok.no", + "karlsoy.no", + "karmoy.no", + "karmøy.no", + "kautokeino.no", + "klabu.no", + "klæbu.no", + "klepp.no", + "kongsberg.no", + "kongsvinger.no", + "kraanghke.no", + "kråanghke.no", + "kragero.no", + "kragerø.no", + "kristiansand.no", + "kristiansund.no", + "krodsherad.no", + "krødsherad.no", + "kvæfjord.no", + "kvænangen.no", + "kvafjord.no", + "kvalsund.no", + "kvam.no", + "kvanangen.no", + "kvinesdal.no", + "kvinnherad.no", + "kviteseid.no", + "kvitsoy.no", + "kvitsøy.no", + "laakesvuemie.no", + "lærdal.no", + "lahppi.no", + "láhppi.no", + "lardal.no", + "larvik.no", + "lavagis.no", + "lavangen.no", + "leangaviika.no", + "leaŋgaviika.no", + "lebesby.no", + "leikanger.no", + "leirfjord.no", + "leka.no", + "leksvik.no", + "lenvik.no", + "lerdal.no", + "lesja.no", + "levanger.no", + "lier.no", + "lierne.no", + "lillehammer.no", + "lillesand.no", + "lindas.no", + "lindås.no", + "lindesnes.no", + "loabat.no", + "loabát.no", + "lodingen.no", + "lødingen.no", + "lom.no", + "loppa.no", + "lorenskog.no", + "lørenskog.no", + "loten.no", + "løten.no", + "lund.no", + "lunner.no", + "luroy.no", + "lurøy.no", + "luster.no", + "lyngdal.no", + "lyngen.no", + "malatvuopmi.no", + "málatvuopmi.no", + "malselv.no", + "målselv.no", + "malvik.no", + "mandal.no", + "marker.no", + "marnardal.no", + "masfjorden.no", + "masoy.no", + "måsøy.no", + "matta-varjjat.no", + "mátta-várjjat.no", + "meland.no", + "meldal.no", + "melhus.no", + "meloy.no", + "meløy.no", + "meraker.no", + "meråker.no", + "midsund.no", + "midtre-gauldal.no", + "moareke.no", + "moåreke.no", + "modalen.no", + "modum.no", + "molde.no", + "heroy.more-og-romsdal.no", + "sande.more-og-romsdal.no", + "herøy.møre-og-romsdal.no", + "sande.møre-og-romsdal.no", + "moskenes.no", + "moss.no", + "mosvik.no", + "muosat.no", + "muosát.no", + "naamesjevuemie.no", + "nååmesjevuemie.no", + "nærøy.no", + "namdalseid.no", + "namsos.no", + "namsskogan.no", + "nannestad.no", + "naroy.no", + "narviika.no", + "narvik.no", + "naustdal.no", + "navuotna.no", + "návuotna.no", + "nedre-eiker.no", + "nesna.no", + "nesodden.no", + "nesseby.no", + "nesset.no", + "nissedal.no", + "nittedal.no", + "nord-aurdal.no", + "nord-fron.no", + "nord-odal.no", + "norddal.no", + "nordkapp.no", + "bo.nordland.no", + "bø.nordland.no", + "heroy.nordland.no", + "herøy.nordland.no", + "nordre-land.no", + "nordreisa.no", + "nore-og-uvdal.no", + "notodden.no", + "notteroy.no", + "nøtterøy.no", + "odda.no", + "oksnes.no", + "øksnes.no", + "omasvuotna.no", + "oppdal.no", + "oppegard.no", + "oppegård.no", + "orkdal.no", + "orland.no", + "ørland.no", + "orskog.no", + "ørskog.no", + "orsta.no", + "ørsta.no", + "osen.no", + "osteroy.no", + "osterøy.no", + "valer.ostfold.no", + "våler.østfold.no", + "ostre-toten.no", + "østre-toten.no", + "overhalla.no", + "ovre-eiker.no", + "øvre-eiker.no", + "oyer.no", + "øyer.no", + "oygarden.no", + "øygarden.no", + "oystre-slidre.no", + "øystre-slidre.no", + "porsanger.no", + "porsangu.no", + "porsáŋgu.no", + "porsgrunn.no", + "rade.no", + "råde.no", + "radoy.no", + "radøy.no", + "rælingen.no", + "rahkkeravju.no", + "ráhkkerávju.no", + "raisa.no", + "ráisa.no", + "rakkestad.no", + "ralingen.no", + "rana.no", + "randaberg.no", + "rauma.no", + "rendalen.no", + "rennebu.no", + "rennesoy.no", + "rennesøy.no", + "rindal.no", + "ringebu.no", + "ringerike.no", + "ringsaker.no", + "risor.no", + "risør.no", + "rissa.no", + "roan.no", + "rodoy.no", + "rødøy.no", + "rollag.no", + "romsa.no", + "romskog.no", + "rømskog.no", + "roros.no", + "røros.no", + "rost.no", + "røst.no", + "royken.no", + "røyken.no", + "royrvik.no", + "røyrvik.no", + "ruovat.no", + "rygge.no", + "salangen.no", + "salat.no", + "sálat.no", + "sálát.no", + "saltdal.no", + "samnanger.no", + "sandefjord.no", + "sandnes.no", + "sandoy.no", + "sandøy.no", + "sarpsborg.no", + "sauda.no", + "sauherad.no", + "sel.no", + "selbu.no", + "selje.no", + "seljord.no", + "siellak.no", + "sigdal.no", + "siljan.no", + "sirdal.no", + "skanit.no", + "skánit.no", + "skanland.no", + "skånland.no", + "skaun.no", + "skedsmo.no", + "ski.no", + "skien.no", + "skierva.no", + "skiervá.no", + "skiptvet.no", + "skjak.no", + "skjåk.no", + "skjervoy.no", + "skjervøy.no", + "skodje.no", + "smola.no", + "smøla.no", + "snaase.no", + "snåase.no", + "snasa.no", + "snåsa.no", + "snillfjord.no", + "snoasa.no", + "sogndal.no", + "sogne.no", + "søgne.no", + "sokndal.no", + "sola.no", + "solund.no", + "somna.no", + "sømna.no", + "sondre-land.no", + "søndre-land.no", + "songdalen.no", + "sor-aurdal.no", + "sør-aurdal.no", + "sor-fron.no", + "sør-fron.no", + "sor-odal.no", + "sør-odal.no", + "sor-varanger.no", + "sør-varanger.no", + "sorfold.no", + "sørfold.no", + "sorreisa.no", + "sørreisa.no", + "sortland.no", + "sorum.no", + "sørum.no", + "spydeberg.no", + "stange.no", + "stavanger.no", + "steigen.no", + "steinkjer.no", + "stjordal.no", + "stjørdal.no", + "stokke.no", + "stor-elvdal.no", + "stord.no", + "stordal.no", + "storfjord.no", + "strand.no", + "stranda.no", + "stryn.no", + "sula.no", + "suldal.no", + "sund.no", + "sunndal.no", + "surnadal.no", + "sveio.no", + "svelvik.no", + "sykkylven.no", + "tana.no", + "bo.telemark.no", + "bø.telemark.no", + "time.no", + "tingvoll.no", + "tinn.no", + "tjeldsund.no", + "tjome.no", + "tjøme.no", + "tokke.no", + "tolga.no", + "tonsberg.no", + "tønsberg.no", + "torsken.no", + "træna.no", + "trana.no", + "tranoy.no", + "tranøy.no", + "troandin.no", + "trogstad.no", + "trøgstad.no", + "tromsa.no", + "tromso.no", + "tromsø.no", + "trondheim.no", + "trysil.no", + "tvedestrand.no", + "tydal.no", + "tynset.no", + "tysfjord.no", + "tysnes.no", + "tysvær.no", + "tysvar.no", + "ullensaker.no", + "ullensvang.no", + "ulvik.no", + "unjarga.no", + "unjárga.no", + "utsira.no", + "vaapste.no", + "vadso.no", + "vadsø.no", + "værøy.no", + "vaga.no", + "vågå.no", + "vagan.no", + "vågan.no", + "vagsoy.no", + "vågsøy.no", + "vaksdal.no", + "valle.no", + "vang.no", + "vanylven.no", + "vardo.no", + "vardø.no", + "varggat.no", + "várggát.no", + "varoy.no", + "vefsn.no", + "vega.no", + "vegarshei.no", + "vegårshei.no", + "vennesla.no", + "verdal.no", + "verran.no", + "vestby.no", + "sande.vestfold.no", + "vestnes.no", + "vestre-slidre.no", + "vestre-toten.no", + "vestvagoy.no", + "vestvågøy.no", + "vevelstad.no", + "vik.no", + "vikna.no", + "vindafjord.no", + "voagat.no", + "volda.no", + "voss.no", + "*.np", + "nr", + "biz.nr", + "com.nr", + "edu.nr", + "gov.nr", + "info.nr", + "net.nr", + "org.nr", + "nu", + "nz", + "ac.nz", + "co.nz", + "cri.nz", + "geek.nz", + "gen.nz", + "govt.nz", + "health.nz", + "iwi.nz", + "kiwi.nz", + "maori.nz", + "māori.nz", + "mil.nz", + "net.nz", + "org.nz", + "parliament.nz", + "school.nz", + "om", + "co.om", + "com.om", + "edu.om", + "gov.om", + "med.om", + "museum.om", + "net.om", + "org.om", + "pro.om", + "onion", + "org", + "pa", + "abo.pa", + "ac.pa", + "com.pa", + "edu.pa", + "gob.pa", + "ing.pa", + "med.pa", + "net.pa", + "nom.pa", + "org.pa", + "sld.pa", + "pe", + "com.pe", + "edu.pe", + "gob.pe", + "mil.pe", + "net.pe", + "nom.pe", + "org.pe", + "pf", + "com.pf", + "edu.pf", + "org.pf", + "*.pg", + "ph", + "com.ph", + "edu.ph", + "gov.ph", + "i.ph", + "mil.ph", + "net.ph", + "ngo.ph", + "org.ph", + "pk", + "ac.pk", + "biz.pk", + "com.pk", + "edu.pk", + "fam.pk", + "gkp.pk", + "gob.pk", + "gog.pk", + "gok.pk", + "gon.pk", + "gop.pk", + "gos.pk", + "gov.pk", + "net.pk", + "org.pk", + "web.pk", + "pl", + "com.pl", + "net.pl", + "org.pl", + "agro.pl", + "aid.pl", + "atm.pl", + "auto.pl", + "biz.pl", + "edu.pl", + "gmina.pl", + "gsm.pl", + "info.pl", + "mail.pl", + "media.pl", + "miasta.pl", + "mil.pl", + "nieruchomosci.pl", + "nom.pl", + "pc.pl", + "powiat.pl", + "priv.pl", + "realestate.pl", + "rel.pl", + "sex.pl", + "shop.pl", + "sklep.pl", + "sos.pl", + "szkola.pl", + "targi.pl", + "tm.pl", + "tourism.pl", + "travel.pl", + "turystyka.pl", + "gov.pl", + "ap.gov.pl", + "griw.gov.pl", + "ic.gov.pl", + "is.gov.pl", + "kmpsp.gov.pl", + "konsulat.gov.pl", + "kppsp.gov.pl", + "kwp.gov.pl", + "kwpsp.gov.pl", + "mup.gov.pl", + "mw.gov.pl", + "oia.gov.pl", + "oirm.gov.pl", + "oke.gov.pl", + "oow.gov.pl", + "oschr.gov.pl", + "oum.gov.pl", + "pa.gov.pl", + "pinb.gov.pl", + "piw.gov.pl", + "po.gov.pl", + "pr.gov.pl", + "psp.gov.pl", + "psse.gov.pl", + "pup.gov.pl", + "rzgw.gov.pl", + "sa.gov.pl", + "sdn.gov.pl", + "sko.gov.pl", + "so.gov.pl", + "sr.gov.pl", + "starostwo.gov.pl", + "ug.gov.pl", + "ugim.gov.pl", + "um.gov.pl", + "umig.gov.pl", + "upow.gov.pl", + "uppo.gov.pl", + "us.gov.pl", + "uw.gov.pl", + "uzs.gov.pl", + "wif.gov.pl", + "wiih.gov.pl", + "winb.gov.pl", + "wios.gov.pl", + "witd.gov.pl", + "wiw.gov.pl", + "wkz.gov.pl", + "wsa.gov.pl", + "wskr.gov.pl", + "wsse.gov.pl", + "wuoz.gov.pl", + "wzmiuw.gov.pl", + "zp.gov.pl", + "zpisdn.gov.pl", + "augustow.pl", + "babia-gora.pl", + "bedzin.pl", + "beskidy.pl", + "bialowieza.pl", + "bialystok.pl", + "bielawa.pl", + "bieszczady.pl", + "boleslawiec.pl", + "bydgoszcz.pl", + "bytom.pl", + "cieszyn.pl", + "czeladz.pl", + "czest.pl", + "dlugoleka.pl", + "elblag.pl", + "elk.pl", + "glogow.pl", + "gniezno.pl", + "gorlice.pl", + "grajewo.pl", + "ilawa.pl", + "jaworzno.pl", + "jelenia-gora.pl", + "jgora.pl", + "kalisz.pl", + "karpacz.pl", + "kartuzy.pl", + "kaszuby.pl", + "katowice.pl", + "kazimierz-dolny.pl", + "kepno.pl", + "ketrzyn.pl", + "klodzko.pl", + "kobierzyce.pl", + "kolobrzeg.pl", + "konin.pl", + "konskowola.pl", + "kutno.pl", + "lapy.pl", + "lebork.pl", + "legnica.pl", + "lezajsk.pl", + "limanowa.pl", + "lomza.pl", + "lowicz.pl", + "lubin.pl", + "lukow.pl", + "malbork.pl", + "malopolska.pl", + "mazowsze.pl", + "mazury.pl", + "mielec.pl", + "mielno.pl", + "mragowo.pl", + "naklo.pl", + "nowaruda.pl", + "nysa.pl", + "olawa.pl", + "olecko.pl", + "olkusz.pl", + "olsztyn.pl", + "opoczno.pl", + "opole.pl", + "ostroda.pl", + "ostroleka.pl", + "ostrowiec.pl", + "ostrowwlkp.pl", + "pila.pl", + "pisz.pl", + "podhale.pl", + "podlasie.pl", + "polkowice.pl", + "pomorskie.pl", + "pomorze.pl", + "prochowice.pl", + "pruszkow.pl", + "przeworsk.pl", + "pulawy.pl", + "radom.pl", + "rawa-maz.pl", + "rybnik.pl", + "rzeszow.pl", + "sanok.pl", + "sejny.pl", + "skoczow.pl", + "slask.pl", + "slupsk.pl", + "sosnowiec.pl", + "stalowa-wola.pl", + "starachowice.pl", + "stargard.pl", + "suwalki.pl", + "swidnica.pl", + "swiebodzin.pl", + "swinoujscie.pl", + "szczecin.pl", + "szczytno.pl", + "tarnobrzeg.pl", + "tgory.pl", + "turek.pl", + "tychy.pl", + "ustka.pl", + "walbrzych.pl", + "warmia.pl", + "warszawa.pl", + "waw.pl", + "wegrow.pl", + "wielun.pl", + "wlocl.pl", + "wloclawek.pl", + "wodzislaw.pl", + "wolomin.pl", + "wroclaw.pl", + "zachpomor.pl", + "zagan.pl", + "zarow.pl", + "zgora.pl", + "zgorzelec.pl", + "pm", + "pn", + "co.pn", + "edu.pn", + "gov.pn", + "net.pn", + "org.pn", + "post", + "pr", + "biz.pr", + "com.pr", + "edu.pr", + "gov.pr", + "info.pr", + "isla.pr", + "name.pr", + "net.pr", + "org.pr", + "pro.pr", + "ac.pr", + "est.pr", + "prof.pr", + "pro", + "aaa.pro", + "aca.pro", + "acct.pro", + "avocat.pro", + "bar.pro", + "cpa.pro", + "eng.pro", + "jur.pro", + "law.pro", + "med.pro", + "recht.pro", + "ps", + "com.ps", + "edu.ps", + "gov.ps", + "net.ps", + "org.ps", + "plo.ps", + "sec.ps", + "pt", + "com.pt", + "edu.pt", + "gov.pt", + "int.pt", + "net.pt", + "nome.pt", + "org.pt", + "publ.pt", + "pw", + "belau.pw", + "co.pw", + "ed.pw", + "go.pw", + "or.pw", + "py", + "com.py", + "coop.py", + "edu.py", + "gov.py", + "mil.py", + "net.py", + "org.py", + "qa", + "com.qa", + "edu.qa", + "gov.qa", + "mil.qa", + "name.qa", + "net.qa", + "org.qa", + "sch.qa", + "re", + "asso.re", + "com.re", + "ro", + "arts.ro", + "com.ro", + "firm.ro", + "info.ro", + "nom.ro", + "nt.ro", + "org.ro", + "rec.ro", + "store.ro", + "tm.ro", + "www.ro", + "rs", + "ac.rs", + "co.rs", + "edu.rs", + "gov.rs", + "in.rs", + "org.rs", + "ru", + "rw", + "ac.rw", + "co.rw", + "coop.rw", + "gov.rw", + "mil.rw", + "net.rw", + "org.rw", + "sa", + "com.sa", + "edu.sa", + "gov.sa", + "med.sa", + "net.sa", + "org.sa", + "pub.sa", + "sch.sa", + "sb", + "com.sb", + "edu.sb", + "gov.sb", + "net.sb", + "org.sb", + "sc", + "com.sc", + "edu.sc", + "gov.sc", + "net.sc", + "org.sc", + "sd", + "com.sd", + "edu.sd", + "gov.sd", + "info.sd", + "med.sd", + "net.sd", + "org.sd", + "tv.sd", + "se", + "a.se", + "ac.se", + "b.se", + "bd.se", + "brand.se", + "c.se", + "d.se", + "e.se", + "f.se", + "fh.se", + "fhsk.se", + "fhv.se", + "g.se", + "h.se", + "i.se", + "k.se", + "komforb.se", + "kommunalforbund.se", + "komvux.se", + "l.se", + "lanbib.se", + "m.se", + "n.se", + "naturbruksgymn.se", + "o.se", + "org.se", + "p.se", + "parti.se", + "pp.se", + "press.se", + "r.se", + "s.se", + "t.se", + "tm.se", + "u.se", + "w.se", + "x.se", + "y.se", + "z.se", + "sg", + "com.sg", + "edu.sg", + "gov.sg", + "net.sg", + "org.sg", + "sh", + "com.sh", + "gov.sh", + "mil.sh", + "net.sh", + "org.sh", + "si", + "sj", + "sk", + "sl", + "com.sl", + "edu.sl", + "gov.sl", + "net.sl", + "org.sl", + "sm", + "sn", + "art.sn", + "com.sn", + "edu.sn", + "gouv.sn", + "org.sn", + "perso.sn", + "univ.sn", + "so", + "com.so", + "edu.so", + "gov.so", + "me.so", + "net.so", + "org.so", + "sr", + "ss", + "biz.ss", + "co.ss", + "com.ss", + "edu.ss", + "gov.ss", + "me.ss", + "net.ss", + "org.ss", + "sch.ss", + "st", + "co.st", + "com.st", + "consulado.st", + "edu.st", + "embaixada.st", + "mil.st", + "net.st", + "org.st", + "principe.st", + "saotome.st", + "store.st", + "su", + "sv", + "com.sv", + "edu.sv", + "gob.sv", + "org.sv", + "red.sv", + "sx", + "gov.sx", + "sy", + "com.sy", + "edu.sy", + "gov.sy", + "mil.sy", + "net.sy", + "org.sy", + "sz", + "ac.sz", + "co.sz", + "org.sz", + "tc", + "td", + "tel", + "tf", + "tg", + "th", + "ac.th", + "co.th", + "go.th", + "in.th", + "mi.th", + "net.th", + "or.th", + "tj", + "ac.tj", + "biz.tj", + "co.tj", + "com.tj", + "edu.tj", + "go.tj", + "gov.tj", + "int.tj", + "mil.tj", + "name.tj", + "net.tj", + "nic.tj", + "org.tj", + "test.tj", + "web.tj", + "tk", + "tl", + "gov.tl", + "tm", + "co.tm", + "com.tm", + "edu.tm", + "gov.tm", + "mil.tm", + "net.tm", + "nom.tm", + "org.tm", + "tn", + "com.tn", + "ens.tn", + "fin.tn", + "gov.tn", + "ind.tn", + "info.tn", + "intl.tn", + "mincom.tn", + "nat.tn", + "net.tn", + "org.tn", + "perso.tn", + "tourism.tn", + "to", + "com.to", + "edu.to", + "gov.to", + "mil.to", + "net.to", + "org.to", + "tr", + "av.tr", + "bbs.tr", + "bel.tr", + "biz.tr", + "com.tr", + "dr.tr", + "edu.tr", + "gen.tr", + "gov.tr", + "info.tr", + "k12.tr", + "kep.tr", + "mil.tr", + "name.tr", + "net.tr", + "org.tr", + "pol.tr", + "tel.tr", + "tsk.tr", + "tv.tr", + "web.tr", + "nc.tr", + "gov.nc.tr", + "tt", + "biz.tt", + "co.tt", + "com.tt", + "edu.tt", + "gov.tt", + "info.tt", + "mil.tt", + "name.tt", + "net.tt", + "org.tt", + "pro.tt", + "tv", + "tw", + "club.tw", + "com.tw", + "ebiz.tw", + "edu.tw", + "game.tw", + "gov.tw", + "idv.tw", + "mil.tw", + "net.tw", + "org.tw", + "tz", + "ac.tz", + "co.tz", + "go.tz", + "hotel.tz", + "info.tz", + "me.tz", + "mil.tz", + "mobi.tz", + "ne.tz", + "or.tz", + "sc.tz", + "tv.tz", + "ua", + "com.ua", + "edu.ua", + "gov.ua", + "in.ua", + "net.ua", + "org.ua", + "cherkassy.ua", + "cherkasy.ua", + "chernigov.ua", + "chernihiv.ua", + "chernivtsi.ua", + "chernovtsy.ua", + "ck.ua", + "cn.ua", + "cr.ua", + "crimea.ua", + "cv.ua", + "dn.ua", + "dnepropetrovsk.ua", + "dnipropetrovsk.ua", + "donetsk.ua", + "dp.ua", + "if.ua", + "ivano-frankivsk.ua", + "kh.ua", + "kharkiv.ua", + "kharkov.ua", + "kherson.ua", + "khmelnitskiy.ua", + "khmelnytskyi.ua", + "kiev.ua", + "kirovograd.ua", + "km.ua", + "kr.ua", + "kropyvnytskyi.ua", + "krym.ua", + "ks.ua", + "kv.ua", + "kyiv.ua", + "lg.ua", + "lt.ua", + "lugansk.ua", + "luhansk.ua", + "lutsk.ua", + "lv.ua", + "lviv.ua", + "mk.ua", + "mykolaiv.ua", + "nikolaev.ua", + "od.ua", + "odesa.ua", + "odessa.ua", + "pl.ua", + "poltava.ua", + "rivne.ua", + "rovno.ua", + "rv.ua", + "sb.ua", + "sebastopol.ua", + "sevastopol.ua", + "sm.ua", + "sumy.ua", + "te.ua", + "ternopil.ua", + "uz.ua", + "uzhgorod.ua", + "uzhhorod.ua", + "vinnica.ua", + "vinnytsia.ua", + "vn.ua", + "volyn.ua", + "yalta.ua", + "zakarpattia.ua", + "zaporizhzhe.ua", + "zaporizhzhia.ua", + "zhitomir.ua", + "zhytomyr.ua", + "zp.ua", + "zt.ua", + "ug", + "ac.ug", + "co.ug", + "com.ug", + "go.ug", + "ne.ug", + "or.ug", + "org.ug", + "sc.ug", + "uk", + "ac.uk", + "co.uk", + "gov.uk", + "ltd.uk", + "me.uk", + "net.uk", + "nhs.uk", + "org.uk", + "plc.uk", + "police.uk", + "*.sch.uk", + "us", + "dni.us", + "fed.us", + "isa.us", + "kids.us", + "nsn.us", + "ak.us", + "al.us", + "ar.us", + "as.us", + "az.us", + "ca.us", + "co.us", + "ct.us", + "dc.us", + "de.us", + "fl.us", + "ga.us", + "gu.us", + "hi.us", + "ia.us", + "id.us", + "il.us", + "in.us", + "ks.us", + "ky.us", + "la.us", + "ma.us", + "md.us", + "me.us", + "mi.us", + "mn.us", + "mo.us", + "ms.us", + "mt.us", + "nc.us", + "nd.us", + "ne.us", + "nh.us", + "nj.us", + "nm.us", + "nv.us", + "ny.us", + "oh.us", + "ok.us", + "or.us", + "pa.us", + "pr.us", + "ri.us", + "sc.us", + "sd.us", + "tn.us", + "tx.us", + "ut.us", + "va.us", + "vi.us", + "vt.us", + "wa.us", + "wi.us", + "wv.us", + "wy.us", + "k12.ak.us", + "k12.al.us", + "k12.ar.us", + "k12.as.us", + "k12.az.us", + "k12.ca.us", + "k12.co.us", + "k12.ct.us", + "k12.dc.us", + "k12.fl.us", + "k12.ga.us", + "k12.gu.us", + "k12.ia.us", + "k12.id.us", + "k12.il.us", + "k12.in.us", + "k12.ks.us", + "k12.ky.us", + "k12.la.us", + "k12.ma.us", + "k12.md.us", + "k12.me.us", + "k12.mi.us", + "k12.mn.us", + "k12.mo.us", + "k12.ms.us", + "k12.mt.us", + "k12.nc.us", + "k12.ne.us", + "k12.nh.us", + "k12.nj.us", + "k12.nm.us", + "k12.nv.us", + "k12.ny.us", + "k12.oh.us", + "k12.ok.us", + "k12.or.us", + "k12.pa.us", + "k12.pr.us", + "k12.sc.us", + "k12.tn.us", + "k12.tx.us", + "k12.ut.us", + "k12.va.us", + "k12.vi.us", + "k12.vt.us", + "k12.wa.us", + "k12.wi.us", + "cc.ak.us", + "lib.ak.us", + "cc.al.us", + "lib.al.us", + "cc.ar.us", + "lib.ar.us", + "cc.as.us", + "lib.as.us", + "cc.az.us", + "lib.az.us", + "cc.ca.us", + "lib.ca.us", + "cc.co.us", + "lib.co.us", + "cc.ct.us", + "lib.ct.us", + "cc.dc.us", + "lib.dc.us", + "cc.de.us", + "cc.fl.us", + "cc.ga.us", + "cc.gu.us", + "cc.hi.us", + "cc.ia.us", + "cc.id.us", + "cc.il.us", + "cc.in.us", + "cc.ks.us", + "cc.ky.us", + "cc.la.us", + "cc.ma.us", + "cc.md.us", + "cc.me.us", + "cc.mi.us", + "cc.mn.us", + "cc.mo.us", + "cc.ms.us", + "cc.mt.us", + "cc.nc.us", + "cc.nd.us", + "cc.ne.us", + "cc.nh.us", + "cc.nj.us", + "cc.nm.us", + "cc.nv.us", + "cc.ny.us", + "cc.oh.us", + "cc.ok.us", + "cc.or.us", + "cc.pa.us", + "cc.pr.us", + "cc.ri.us", + "cc.sc.us", + "cc.sd.us", + "cc.tn.us", + "cc.tx.us", + "cc.ut.us", + "cc.va.us", + "cc.vi.us", + "cc.vt.us", + "cc.wa.us", + "cc.wi.us", + "cc.wv.us", + "cc.wy.us", + "k12.wy.us", + "lib.fl.us", + "lib.ga.us", + "lib.gu.us", + "lib.hi.us", + "lib.ia.us", + "lib.id.us", + "lib.il.us", + "lib.in.us", + "lib.ks.us", + "lib.ky.us", + "lib.la.us", + "lib.ma.us", + "lib.md.us", + "lib.me.us", + "lib.mi.us", + "lib.mn.us", + "lib.mo.us", + "lib.ms.us", + "lib.mt.us", + "lib.nc.us", + "lib.nd.us", + "lib.ne.us", + "lib.nh.us", + "lib.nj.us", + "lib.nm.us", + "lib.nv.us", + "lib.ny.us", + "lib.oh.us", + "lib.ok.us", + "lib.or.us", + "lib.pa.us", + "lib.pr.us", + "lib.ri.us", + "lib.sc.us", + "lib.sd.us", + "lib.tn.us", + "lib.tx.us", + "lib.ut.us", + "lib.va.us", + "lib.vi.us", + "lib.vt.us", + "lib.wa.us", + "lib.wi.us", + "lib.wy.us", + "chtr.k12.ma.us", + "paroch.k12.ma.us", + "pvt.k12.ma.us", + "ann-arbor.mi.us", + "cog.mi.us", + "dst.mi.us", + "eaton.mi.us", + "gen.mi.us", + "mus.mi.us", + "tec.mi.us", + "washtenaw.mi.us", + "uy", + "com.uy", + "edu.uy", + "gub.uy", + "mil.uy", + "net.uy", + "org.uy", + "uz", + "co.uz", + "com.uz", + "net.uz", + "org.uz", + "va", + "vc", + "com.vc", + "edu.vc", + "gov.vc", + "mil.vc", + "net.vc", + "org.vc", + "ve", + "arts.ve", + "bib.ve", + "co.ve", + "com.ve", + "e12.ve", + "edu.ve", + "firm.ve", + "gob.ve", + "gov.ve", + "info.ve", + "int.ve", + "mil.ve", + "net.ve", + "nom.ve", + "org.ve", + "rar.ve", + "rec.ve", + "store.ve", + "tec.ve", + "web.ve", + "vg", + "vi", + "co.vi", + "com.vi", + "k12.vi", + "net.vi", + "org.vi", + "vn", + "ac.vn", + "ai.vn", + "biz.vn", + "com.vn", + "edu.vn", + "gov.vn", + "health.vn", + "id.vn", + "info.vn", + "int.vn", + "io.vn", + "name.vn", + "net.vn", + "org.vn", + "pro.vn", + "angiang.vn", + "bacgiang.vn", + "backan.vn", + "baclieu.vn", + "bacninh.vn", + "baria-vungtau.vn", + "bentre.vn", + "binhdinh.vn", + "binhduong.vn", + "binhphuoc.vn", + "binhthuan.vn", + "camau.vn", + "cantho.vn", + "caobang.vn", + "daklak.vn", + "daknong.vn", + "danang.vn", + "dienbien.vn", + "dongnai.vn", + "dongthap.vn", + "gialai.vn", + "hagiang.vn", + "haiduong.vn", + "haiphong.vn", + "hanam.vn", + "hanoi.vn", + "hatinh.vn", + "haugiang.vn", + "hoabinh.vn", + "hungyen.vn", + "khanhhoa.vn", + "kiengiang.vn", + "kontum.vn", + "laichau.vn", + "lamdong.vn", + "langson.vn", + "laocai.vn", + "longan.vn", + "namdinh.vn", + "nghean.vn", + "ninhbinh.vn", + "ninhthuan.vn", + "phutho.vn", + "phuyen.vn", + "quangbinh.vn", + "quangnam.vn", + "quangngai.vn", + "quangninh.vn", + "quangtri.vn", + "soctrang.vn", + "sonla.vn", + "tayninh.vn", + "thaibinh.vn", + "thainguyen.vn", + "thanhhoa.vn", + "thanhphohochiminh.vn", + "thuathienhue.vn", + "tiengiang.vn", + "travinh.vn", + "tuyenquang.vn", + "vinhlong.vn", + "vinhphuc.vn", + "yenbai.vn", + "vu", + "com.vu", + "edu.vu", + "net.vu", + "org.vu", + "wf", + "ws", + "com.ws", + "edu.ws", + "gov.ws", + "net.ws", + "org.ws", + "yt", + "امارات", + "հայ", + "বাংলা", + "бг", + "البحرين", + "бел", + "中国", + "中國", + "الجزائر", + "مصر", + "ею", + "ευ", + "موريتانيا", + "გე", + "ελ", + "香港", + "個人.香港", + "公司.香港", + "政府.香港", + "教育.香港", + "組織.香港", + "網絡.香港", + "ಭಾರತ", + "ଭାରତ", + "ভাৰত", + "भारतम्", + "भारोत", + "ڀارت", + "ഭാരതം", + "भारत", + "بارت", + "بھارت", + "భారత్", + "ભારત", + "ਭਾਰਤ", + "ভারত", + "இந்தியா", + "ایران", + "ايران", + "عراق", + "الاردن", + "한국", + "қаз", + "ລາວ", + "ලංකා", + "இலங்கை", + "المغرب", + "мкд", + "мон", + "澳門", + "澳门", + "مليسيا", + "عمان", + "پاکستان", + "پاكستان", + "فلسطين", + "срб", + "ак.срб", + "обр.срб", + "од.срб", + "орг.срб", + "пр.срб", + "упр.срб", + "рф", + "قطر", + "السعودية", + "السعودیة", + "السعودیۃ", + "السعوديه", + "سودان", + "新加坡", + "சிங்கப்பூர்", + "سورية", + "سوريا", + "ไทย", + "ทหาร.ไทย", + "ธุรกิจ.ไทย", + "เน็ต.ไทย", + "รัฐบาล.ไทย", + "ศึกษา.ไทย", + "องค์กร.ไทย", + "تونس", + "台灣", + "台湾", + "臺灣", + "укр", + "اليمن", + "xxx", + "ye", + "com.ye", + "edu.ye", + "gov.ye", + "mil.ye", + "net.ye", + "org.ye", + "ac.za", + "agric.za", + "alt.za", + "co.za", + "edu.za", + "gov.za", + "grondar.za", + "law.za", + "mil.za", + "net.za", + "ngo.za", + "nic.za", + "nis.za", + "nom.za", + "org.za", + "school.za", + "tm.za", + "web.za", + "zm", + "ac.zm", + "biz.zm", + "co.zm", + "com.zm", + "edu.zm", + "gov.zm", + "info.zm", + "mil.zm", + "net.zm", + "org.zm", + "sch.zm", + "zw", + "ac.zw", + "co.zw", + "gov.zw", + "mil.zw", + "org.zw", + "aaa", + "aarp", + "abb", + "abbott", + "abbvie", + "abc", + "able", + "abogado", + "abudhabi", + "academy", + "accenture", + "accountant", + "accountants", + "aco", + "actor", + "ads", + "adult", + "aeg", + "aetna", + "afl", + "africa", + "agakhan", + "agency", + "aig", + "airbus", + "airforce", + "airtel", + "akdn", + "alibaba", + "alipay", + "allfinanz", + "allstate", + "ally", + "alsace", + "alstom", + "amazon", + "americanexpress", + "americanfamily", + "amex", + "amfam", + "amica", + "amsterdam", + "analytics", + "android", + "anquan", + "anz", + "aol", + "apartments", + "app", + "apple", + "aquarelle", + "arab", + "aramco", + "archi", + "army", + "art", + "arte", + "asda", + "associates", + "athleta", + "attorney", + "auction", + "audi", + "audible", + "audio", + "auspost", + "author", + "auto", + "autos", + "aws", + "axa", + "azure", + "baby", + "baidu", + "banamex", + "band", + "bank", + "bar", + "barcelona", + "barclaycard", + "barclays", + "barefoot", + "bargains", + "baseball", + "basketball", + "bauhaus", + "bayern", + "bbc", + "bbt", + "bbva", + "bcg", + "bcn", + "beats", + "beauty", + "beer", + "bentley", + "berlin", + "best", + "bestbuy", + "bet", + "bharti", + "bible", + "bid", + "bike", + "bing", + "bingo", + "bio", + "black", + "blackfriday", + "blockbuster", + "blog", + "bloomberg", + "blue", + "bms", + "bmw", + "bnpparibas", + "boats", + "boehringer", + "bofa", + "bom", + "bond", + "boo", + "book", + "booking", + "bosch", + "bostik", + "boston", + "bot", + "boutique", + "box", + "bradesco", + "bridgestone", + "broadway", + "broker", + "brother", + "brussels", + "build", + "builders", + "business", + "buy", + "buzz", + "bzh", + "cab", + "cafe", + "cal", + "call", + "calvinklein", + "cam", + "camera", + "camp", + "canon", + "capetown", + "capital", + "capitalone", + "car", + "caravan", + "cards", + "care", + "career", + "careers", + "cars", + "casa", + "case", + "cash", + "casino", + "catering", + "catholic", + "cba", + "cbn", + "cbre", + "center", + "ceo", + "cern", + "cfa", + "cfd", + "chanel", + "channel", + "charity", + "chase", + "chat", + "cheap", + "chintai", + "christmas", + "chrome", + "church", + "cipriani", + "circle", + "cisco", + "citadel", + "citi", + "citic", + "city", + "claims", + "cleaning", + "click", + "clinic", + "clinique", + "clothing", + "cloud", + "club", + "clubmed", + "coach", + "codes", + "coffee", + "college", + "cologne", + "commbank", + "community", + "company", + "compare", + "computer", + "comsec", + "condos", + "construction", + "consulting", + "contact", + "contractors", + "cooking", + "cool", + "corsica", + "country", + "coupon", + "coupons", + "courses", + "cpa", + "credit", + "creditcard", + "creditunion", + "cricket", + "crown", + "crs", + "cruise", + "cruises", + "cuisinella", + "cymru", + "cyou", + "dad", + "dance", + "data", + "date", + "dating", + "datsun", + "day", + "dclk", + "dds", + "deal", + "dealer", + "deals", + "degree", + "delivery", + "dell", + "deloitte", + "delta", + "democrat", + "dental", + "dentist", + "desi", + "design", + "dev", + "dhl", + "diamonds", + "diet", + "digital", + "direct", + "directory", + "discount", + "discover", + "dish", + "diy", + "dnp", + "docs", + "doctor", + "dog", + "domains", + "dot", + "download", + "drive", + "dtv", + "dubai", + "dunlop", + "dupont", + "durban", + "dvag", + "dvr", + "earth", + "eat", + "eco", + "edeka", + "education", + "email", + "emerck", + "energy", + "engineer", + "engineering", + "enterprises", + "epson", + "equipment", + "ericsson", + "erni", + "esq", + "estate", + "eurovision", + "eus", + "events", + "exchange", + "expert", + "exposed", + "express", + "extraspace", + "fage", + "fail", + "fairwinds", + "faith", + "family", + "fan", + "fans", + "farm", + "farmers", + "fashion", + "fast", + "fedex", + "feedback", + "ferrari", + "ferrero", + "fidelity", + "fido", + "film", + "final", + "finance", + "financial", + "fire", + "firestone", + "firmdale", + "fish", + "fishing", + "fit", + "fitness", + "flickr", + "flights", + "flir", + "florist", + "flowers", + "fly", + "foo", + "food", + "football", + "ford", + "forex", + "forsale", + "forum", + "foundation", + "fox", + "free", + "fresenius", + "frl", + "frogans", + "frontier", + "ftr", + "fujitsu", + "fun", + "fund", + "furniture", + "futbol", + "fyi", + "gal", + "gallery", + "gallo", + "gallup", + "game", + "games", + "gap", + "garden", + "gay", + "gbiz", + "gdn", + "gea", + "gent", + "genting", + "george", + "ggee", + "gift", + "gifts", + "gives", + "giving", + "glass", + "gle", + "global", + "globo", + "gmail", + "gmbh", + "gmo", + "gmx", + "godaddy", + "gold", + "goldpoint", + "golf", + "goo", + "goodyear", + "goog", + "google", + "gop", + "got", + "grainger", + "graphics", + "gratis", + "green", + "gripe", + "grocery", + "group", + "gucci", + "guge", + "guide", + "guitars", + "guru", + "hair", + "hamburg", + "hangout", + "haus", + "hbo", + "hdfc", + "hdfcbank", + "health", + "healthcare", + "help", + "helsinki", + "here", + "hermes", + "hiphop", + "hisamitsu", + "hitachi", + "hiv", + "hkt", + "hockey", + "holdings", + "holiday", + "homedepot", + "homegoods", + "homes", + "homesense", + "honda", + "horse", + "hospital", + "host", + "hosting", + "hot", + "hotels", + "hotmail", + "house", + "how", + "hsbc", + "hughes", + "hyatt", + "hyundai", + "ibm", + "icbc", + "ice", + "icu", + "ieee", + "ifm", + "ikano", + "imamat", + "imdb", + "immo", + "immobilien", + "inc", + "industries", + "infiniti", + "ing", + "ink", + "institute", + "insurance", + "insure", + "international", + "intuit", + "investments", + "ipiranga", + "irish", + "ismaili", + "ist", + "istanbul", + "itau", + "itv", + "jaguar", + "java", + "jcb", + "jeep", + "jetzt", + "jewelry", + "jio", + "jll", + "jmp", + "jnj", + "joburg", + "jot", + "joy", + "jpmorgan", + "jprs", + "juegos", + "juniper", + "kaufen", + "kddi", + "kerryhotels", + "kerrylogistics", + "kerryproperties", + "kfh", + "kia", + "kids", + "kim", + "kindle", + "kitchen", + "kiwi", + "koeln", + "komatsu", + "kosher", + "kpmg", + "kpn", + "krd", + "kred", + "kuokgroup", + "kyoto", + "lacaixa", + "lamborghini", + "lamer", + "lancaster", + "land", + "landrover", + "lanxess", + "lasalle", + "lat", + "latino", + "latrobe", + "law", + "lawyer", + "lds", + "lease", + "leclerc", + "lefrak", + "legal", + "lego", + "lexus", + "lgbt", + "lidl", + "life", + "lifeinsurance", + "lifestyle", + "lighting", + "like", + "lilly", + "limited", + "limo", + "lincoln", + "link", + "lipsy", + "live", + "living", + "llc", + "llp", + "loan", + "loans", + "locker", + "locus", + "lol", + "london", + "lotte", + "lotto", + "love", + "lpl", + "lplfinancial", + "ltd", + "ltda", + "lundbeck", + "luxe", + "luxury", + "madrid", + "maif", + "maison", + "makeup", + "man", + "management", + "mango", + "map", + "market", + "marketing", + "markets", + "marriott", + "marshalls", + "mattel", + "mba", + "mckinsey", + "med", + "media", + "meet", + "melbourne", + "meme", + "memorial", + "men", + "menu", + "merck", + "merckmsd", + "miami", + "microsoft", + "mini", + "mint", + "mit", + "mitsubishi", + "mlb", + "mls", + "mma", + "mobile", + "moda", + "moe", + "moi", + "mom", + "monash", + "money", + "monster", + "mormon", + "mortgage", + "moscow", + "moto", + "motorcycles", + "mov", + "movie", + "msd", + "mtn", + "mtr", + "music", + "nab", + "nagoya", + "navy", + "nba", + "nec", + "netbank", + "netflix", + "network", + "neustar", + "new", + "news", + "next", + "nextdirect", + "nexus", + "nfl", + "ngo", + "nhk", + "nico", + "nike", + "nikon", + "ninja", + "nissan", + "nissay", + "nokia", + "norton", + "now", + "nowruz", + "nowtv", + "nra", + "nrw", + "ntt", + "nyc", + "obi", + "observer", + "office", + "okinawa", + "olayan", + "olayangroup", + "ollo", + "omega", + "one", + "ong", + "onl", + "online", + "ooo", + "open", + "oracle", + "orange", + "organic", + "origins", + "osaka", + "otsuka", + "ott", + "ovh", + "page", + "panasonic", + "paris", + "pars", + "partners", + "parts", + "party", + "pay", + "pccw", + "pet", + "pfizer", + "pharmacy", + "phd", + "philips", + "phone", + "photo", + "photography", + "photos", + "physio", + "pics", + "pictet", + "pictures", + "pid", + "pin", + "ping", + "pink", + "pioneer", + "pizza", + "place", + "play", + "playstation", + "plumbing", + "plus", + "pnc", + "pohl", + "poker", + "politie", + "porn", + "pramerica", + "praxi", + "press", + "prime", + "prod", + "productions", + "prof", + "progressive", + "promo", + "properties", + "property", + "protection", + "pru", + "prudential", + "pub", + "pwc", + "qpon", + "quebec", + "quest", + "racing", + "radio", + "read", + "realestate", + "realtor", + "realty", + "recipes", + "red", + "redstone", + "redumbrella", + "rehab", + "reise", + "reisen", + "reit", + "reliance", + "ren", + "rent", + "rentals", + "repair", + "report", + "republican", + "rest", + "restaurant", + "review", + "reviews", + "rexroth", + "rich", + "richardli", + "ricoh", + "ril", + "rio", + "rip", + "rocks", + "rodeo", + "rogers", + "room", + "rsvp", + "rugby", + "ruhr", + "run", + "rwe", + "ryukyu", + "saarland", + "safe", + "safety", + "sakura", + "sale", + "salon", + "samsclub", + "samsung", + "sandvik", + "sandvikcoromant", + "sanofi", + "sap", + "sarl", + "sas", + "save", + "saxo", + "sbi", + "sbs", + "scb", + "schaeffler", + "schmidt", + "scholarships", + "school", + "schule", + "schwarz", + "science", + "scot", + "search", + "seat", + "secure", + "security", + "seek", + "select", + "sener", + "services", + "seven", + "sew", + "sex", + "sexy", + "sfr", + "shangrila", + "sharp", + "shell", + "shia", + "shiksha", + "shoes", + "shop", + "shopping", + "shouji", + "show", + "silk", + "sina", + "singles", + "site", + "ski", + "skin", + "sky", + "skype", + "sling", + "smart", + "smile", + "sncf", + "soccer", + "social", + "softbank", + "software", + "sohu", + "solar", + "solutions", + "song", + "sony", + "soy", + "spa", + "space", + "sport", + "spot", + "srl", + "stada", + "staples", + "star", + "statebank", + "statefarm", + "stc", + "stcgroup", + "stockholm", + "storage", + "store", + "stream", + "studio", + "study", + "style", + "sucks", + "supplies", + "supply", + "support", + "surf", + "surgery", + "suzuki", + "swatch", + "swiss", + "sydney", + "systems", + "tab", + "taipei", + "talk", + "taobao", + "target", + "tatamotors", + "tatar", + "tattoo", + "tax", + "taxi", + "tci", + "tdk", + "team", + "tech", + "technology", + "temasek", + "tennis", + "teva", + "thd", + "theater", + "theatre", + "tiaa", + "tickets", + "tienda", + "tips", + "tires", + "tirol", + "tjmaxx", + "tjx", + "tkmaxx", + "tmall", + "today", + "tokyo", + "tools", + "top", + "toray", + "toshiba", + "total", + "tours", + "town", + "toyota", + "toys", + "trade", + "trading", + "training", + "travel", + "travelers", + "travelersinsurance", + "trust", + "trv", + "tube", + "tui", + "tunes", + "tushu", + "tvs", + "ubank", + "ubs", + "unicom", + "university", + "uno", + "uol", + "ups", + "vacations", + "vana", + "vanguard", + "vegas", + "ventures", + "verisign", + "versicherung", + "vet", + "viajes", + "video", + "vig", + "viking", + "villas", + "vin", + "vip", + "virgin", + "visa", + "vision", + "viva", + "vivo", + "vlaanderen", + "vodka", + "volvo", + "vote", + "voting", + "voto", + "voyage", + "wales", + "walmart", + "walter", + "wang", + "wanggou", + "watch", + "watches", + "weather", + "weatherchannel", + "webcam", + "weber", + "website", + "wed", + "wedding", + "weibo", + "weir", + "whoswho", + "wien", + "wiki", + "williamhill", + "win", + "windows", + "wine", + "winners", + "wme", + "wolterskluwer", + "woodside", + "work", + "works", + "world", + "wow", + "wtc", + "wtf", + "xbox", + "xerox", + "xihuan", + "xin", + "कॉम", + "セール", + "佛山", + "慈善", + "集团", + "在线", + "点看", + "คอม", + "八卦", + "موقع", + "公益", + "公司", + "香格里拉", + "网站", + "移动", + "我爱你", + "москва", + "католик", + "онлайн", + "сайт", + "联通", + "קום", + "时尚", + "微博", + "淡马锡", + "ファッション", + "орг", + "नेट", + "ストア", + "アマゾン", + "삼성", + "商标", + "商店", + "商城", + "дети", + "ポイント", + "新闻", + "家電", + "كوم", + "中文网", + "中信", + "娱乐", + "谷歌", + "電訊盈科", + "购物", + "クラウド", + "通販", + "网店", + "संगठन", + "餐厅", + "网络", + "ком", + "亚马逊", + "食品", + "飞利浦", + "手机", + "ارامكو", + "العليان", + "بازار", + "ابوظبي", + "كاثوليك", + "همراه", + "닷컴", + "政府", + "شبكة", + "بيتك", + "عرب", + "机构", + "组织机构", + "健康", + "招聘", + "рус", + "大拿", + "みんな", + "グーグル", + "世界", + "書籍", + "网址", + "닷넷", + "コム", + "天主教", + "游戏", + "vermögensberater", + "vermögensberatung", + "企业", + "信息", + "嘉里大酒店", + "嘉里", + "广东", + "政务", + "xyz", + "yachts", + "yahoo", + "yamaxun", + "yandex", + "yodobashi", + "yoga", + "yokohama", + "you", + "youtube", + "yun", + "zappos", + "zara", + "zero", + "zip", + "zone", + "zuerich", + "co.krd", + "edu.krd", + "art.pl", + "gliwice.pl", + "krakow.pl", + "poznan.pl", + "wroc.pl", + "zakopane.pl", + "lib.de.us", + "12chars.dev", + "12chars.it", + "12chars.pro", + "cc.ua", + "inf.ua", + "ltd.ua", + "611.to", + "a2hosted.com", + "cpserver.com", + "aaa.vodka", + "*.on-acorn.io", + "activetrail.biz", + "adaptable.app", + "adobeaemcloud.com", + "*.dev.adobeaemcloud.com", + "aem.live", + "hlx.live", + "adobeaemcloud.net", + "aem.page", + "hlx.page", + "hlx3.page", + "adobeio-static.net", + "adobeioruntime.net", + "africa.com", + "beep.pl", + "airkitapps.com", + "airkitapps-au.com", + "airkitapps.eu", + "aivencloud.com", + "akadns.net", + "akamai.net", + "akamai-staging.net", + "akamaiedge.net", + "akamaiedge-staging.net", + "akamaihd.net", + "akamaihd-staging.net", + "akamaiorigin.net", + "akamaiorigin-staging.net", + "akamaized.net", + "akamaized-staging.net", + "edgekey.net", + "edgekey-staging.net", + "edgesuite.net", + "edgesuite-staging.net", + "barsy.ca", + "*.compute.estate", + "*.alces.network", + "kasserver.com", + "altervista.org", + "alwaysdata.net", + "myamaze.net", + "execute-api.cn-north-1.amazonaws.com.cn", + "execute-api.cn-northwest-1.amazonaws.com.cn", + "execute-api.af-south-1.amazonaws.com", + "execute-api.ap-east-1.amazonaws.com", + "execute-api.ap-northeast-1.amazonaws.com", + "execute-api.ap-northeast-2.amazonaws.com", + "execute-api.ap-northeast-3.amazonaws.com", + "execute-api.ap-south-1.amazonaws.com", + "execute-api.ap-south-2.amazonaws.com", + "execute-api.ap-southeast-1.amazonaws.com", + "execute-api.ap-southeast-2.amazonaws.com", + "execute-api.ap-southeast-3.amazonaws.com", + "execute-api.ap-southeast-4.amazonaws.com", + "execute-api.ap-southeast-5.amazonaws.com", + "execute-api.ca-central-1.amazonaws.com", + "execute-api.ca-west-1.amazonaws.com", + "execute-api.eu-central-1.amazonaws.com", + "execute-api.eu-central-2.amazonaws.com", + "execute-api.eu-north-1.amazonaws.com", + "execute-api.eu-south-1.amazonaws.com", + "execute-api.eu-south-2.amazonaws.com", + "execute-api.eu-west-1.amazonaws.com", + "execute-api.eu-west-2.amazonaws.com", + "execute-api.eu-west-3.amazonaws.com", + "execute-api.il-central-1.amazonaws.com", + "execute-api.me-central-1.amazonaws.com", + "execute-api.me-south-1.amazonaws.com", + "execute-api.sa-east-1.amazonaws.com", + "execute-api.us-east-1.amazonaws.com", + "execute-api.us-east-2.amazonaws.com", + "execute-api.us-gov-east-1.amazonaws.com", + "execute-api.us-gov-west-1.amazonaws.com", + "execute-api.us-west-1.amazonaws.com", + "execute-api.us-west-2.amazonaws.com", + "cloudfront.net", + "auth.af-south-1.amazoncognito.com", + "auth.ap-east-1.amazoncognito.com", + "auth.ap-northeast-1.amazoncognito.com", + "auth.ap-northeast-2.amazoncognito.com", + "auth.ap-northeast-3.amazoncognito.com", + "auth.ap-south-1.amazoncognito.com", + "auth.ap-south-2.amazoncognito.com", + "auth.ap-southeast-1.amazoncognito.com", + "auth.ap-southeast-2.amazoncognito.com", + "auth.ap-southeast-3.amazoncognito.com", + "auth.ap-southeast-4.amazoncognito.com", + "auth.ca-central-1.amazoncognito.com", + "auth.ca-west-1.amazoncognito.com", + "auth.eu-central-1.amazoncognito.com", + "auth.eu-central-2.amazoncognito.com", + "auth.eu-north-1.amazoncognito.com", + "auth.eu-south-1.amazoncognito.com", + "auth.eu-south-2.amazoncognito.com", + "auth.eu-west-1.amazoncognito.com", + "auth.eu-west-2.amazoncognito.com", + "auth.eu-west-3.amazoncognito.com", + "auth.il-central-1.amazoncognito.com", + "auth.me-central-1.amazoncognito.com", + "auth.me-south-1.amazoncognito.com", + "auth.sa-east-1.amazoncognito.com", + "auth.us-east-1.amazoncognito.com", + "auth-fips.us-east-1.amazoncognito.com", + "auth.us-east-2.amazoncognito.com", + "auth-fips.us-east-2.amazoncognito.com", + "auth-fips.us-gov-west-1.amazoncognito.com", + "auth.us-west-1.amazoncognito.com", + "auth-fips.us-west-1.amazoncognito.com", + "auth.us-west-2.amazoncognito.com", + "auth-fips.us-west-2.amazoncognito.com", + "*.compute.amazonaws.com.cn", + "*.compute.amazonaws.com", + "*.compute-1.amazonaws.com", + "us-east-1.amazonaws.com", + "emrappui-prod.cn-north-1.amazonaws.com.cn", + "emrnotebooks-prod.cn-north-1.amazonaws.com.cn", + "emrstudio-prod.cn-north-1.amazonaws.com.cn", + "emrappui-prod.cn-northwest-1.amazonaws.com.cn", + "emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn", + "emrstudio-prod.cn-northwest-1.amazonaws.com.cn", + "emrappui-prod.af-south-1.amazonaws.com", + "emrnotebooks-prod.af-south-1.amazonaws.com", + "emrstudio-prod.af-south-1.amazonaws.com", + "emrappui-prod.ap-east-1.amazonaws.com", + "emrnotebooks-prod.ap-east-1.amazonaws.com", + "emrstudio-prod.ap-east-1.amazonaws.com", + "emrappui-prod.ap-northeast-1.amazonaws.com", + "emrnotebooks-prod.ap-northeast-1.amazonaws.com", + "emrstudio-prod.ap-northeast-1.amazonaws.com", + "emrappui-prod.ap-northeast-2.amazonaws.com", + "emrnotebooks-prod.ap-northeast-2.amazonaws.com", + "emrstudio-prod.ap-northeast-2.amazonaws.com", + "emrappui-prod.ap-northeast-3.amazonaws.com", + "emrnotebooks-prod.ap-northeast-3.amazonaws.com", + "emrstudio-prod.ap-northeast-3.amazonaws.com", + "emrappui-prod.ap-south-1.amazonaws.com", + "emrnotebooks-prod.ap-south-1.amazonaws.com", + "emrstudio-prod.ap-south-1.amazonaws.com", + "emrappui-prod.ap-south-2.amazonaws.com", + "emrnotebooks-prod.ap-south-2.amazonaws.com", + "emrstudio-prod.ap-south-2.amazonaws.com", + "emrappui-prod.ap-southeast-1.amazonaws.com", + "emrnotebooks-prod.ap-southeast-1.amazonaws.com", + "emrstudio-prod.ap-southeast-1.amazonaws.com", + "emrappui-prod.ap-southeast-2.amazonaws.com", + "emrnotebooks-prod.ap-southeast-2.amazonaws.com", + "emrstudio-prod.ap-southeast-2.amazonaws.com", + "emrappui-prod.ap-southeast-3.amazonaws.com", + "emrnotebooks-prod.ap-southeast-3.amazonaws.com", + "emrstudio-prod.ap-southeast-3.amazonaws.com", + "emrappui-prod.ap-southeast-4.amazonaws.com", + "emrnotebooks-prod.ap-southeast-4.amazonaws.com", + "emrstudio-prod.ap-southeast-4.amazonaws.com", + "emrappui-prod.ca-central-1.amazonaws.com", + "emrnotebooks-prod.ca-central-1.amazonaws.com", + "emrstudio-prod.ca-central-1.amazonaws.com", + "emrappui-prod.ca-west-1.amazonaws.com", + "emrnotebooks-prod.ca-west-1.amazonaws.com", + "emrstudio-prod.ca-west-1.amazonaws.com", + "emrappui-prod.eu-central-1.amazonaws.com", + "emrnotebooks-prod.eu-central-1.amazonaws.com", + "emrstudio-prod.eu-central-1.amazonaws.com", + "emrappui-prod.eu-central-2.amazonaws.com", + "emrnotebooks-prod.eu-central-2.amazonaws.com", + "emrstudio-prod.eu-central-2.amazonaws.com", + "emrappui-prod.eu-north-1.amazonaws.com", + "emrnotebooks-prod.eu-north-1.amazonaws.com", + "emrstudio-prod.eu-north-1.amazonaws.com", + "emrappui-prod.eu-south-1.amazonaws.com", + "emrnotebooks-prod.eu-south-1.amazonaws.com", + "emrstudio-prod.eu-south-1.amazonaws.com", + "emrappui-prod.eu-south-2.amazonaws.com", + "emrnotebooks-prod.eu-south-2.amazonaws.com", + "emrstudio-prod.eu-south-2.amazonaws.com", + "emrappui-prod.eu-west-1.amazonaws.com", + "emrnotebooks-prod.eu-west-1.amazonaws.com", + "emrstudio-prod.eu-west-1.amazonaws.com", + "emrappui-prod.eu-west-2.amazonaws.com", + "emrnotebooks-prod.eu-west-2.amazonaws.com", + "emrstudio-prod.eu-west-2.amazonaws.com", + "emrappui-prod.eu-west-3.amazonaws.com", + "emrnotebooks-prod.eu-west-3.amazonaws.com", + "emrstudio-prod.eu-west-3.amazonaws.com", + "emrappui-prod.il-central-1.amazonaws.com", + "emrnotebooks-prod.il-central-1.amazonaws.com", + "emrstudio-prod.il-central-1.amazonaws.com", + "emrappui-prod.me-central-1.amazonaws.com", + "emrnotebooks-prod.me-central-1.amazonaws.com", + "emrstudio-prod.me-central-1.amazonaws.com", + "emrappui-prod.me-south-1.amazonaws.com", + "emrnotebooks-prod.me-south-1.amazonaws.com", + "emrstudio-prod.me-south-1.amazonaws.com", + "emrappui-prod.sa-east-1.amazonaws.com", + "emrnotebooks-prod.sa-east-1.amazonaws.com", + "emrstudio-prod.sa-east-1.amazonaws.com", + "emrappui-prod.us-east-1.amazonaws.com", + "emrnotebooks-prod.us-east-1.amazonaws.com", + "emrstudio-prod.us-east-1.amazonaws.com", + "emrappui-prod.us-east-2.amazonaws.com", + "emrnotebooks-prod.us-east-2.amazonaws.com", + "emrstudio-prod.us-east-2.amazonaws.com", + "emrappui-prod.us-gov-east-1.amazonaws.com", + "emrnotebooks-prod.us-gov-east-1.amazonaws.com", + "emrstudio-prod.us-gov-east-1.amazonaws.com", + "emrappui-prod.us-gov-west-1.amazonaws.com", + "emrnotebooks-prod.us-gov-west-1.amazonaws.com", + "emrstudio-prod.us-gov-west-1.amazonaws.com", + "emrappui-prod.us-west-1.amazonaws.com", + "emrnotebooks-prod.us-west-1.amazonaws.com", + "emrstudio-prod.us-west-1.amazonaws.com", + "emrappui-prod.us-west-2.amazonaws.com", + "emrnotebooks-prod.us-west-2.amazonaws.com", + "emrstudio-prod.us-west-2.amazonaws.com", + "*.cn-north-1.airflow.amazonaws.com.cn", + "*.cn-northwest-1.airflow.amazonaws.com.cn", + "*.af-south-1.airflow.amazonaws.com", + "*.ap-east-1.airflow.amazonaws.com", + "*.ap-northeast-1.airflow.amazonaws.com", + "*.ap-northeast-2.airflow.amazonaws.com", + "*.ap-northeast-3.airflow.amazonaws.com", + "*.ap-south-1.airflow.amazonaws.com", + "*.ap-south-2.airflow.amazonaws.com", + "*.ap-southeast-1.airflow.amazonaws.com", + "*.ap-southeast-2.airflow.amazonaws.com", + "*.ap-southeast-3.airflow.amazonaws.com", + "*.ap-southeast-4.airflow.amazonaws.com", + "*.ca-central-1.airflow.amazonaws.com", + "*.ca-west-1.airflow.amazonaws.com", + "*.eu-central-1.airflow.amazonaws.com", + "*.eu-central-2.airflow.amazonaws.com", + "*.eu-north-1.airflow.amazonaws.com", + "*.eu-south-1.airflow.amazonaws.com", + "*.eu-south-2.airflow.amazonaws.com", + "*.eu-west-1.airflow.amazonaws.com", + "*.eu-west-2.airflow.amazonaws.com", + "*.eu-west-3.airflow.amazonaws.com", + "*.il-central-1.airflow.amazonaws.com", + "*.me-central-1.airflow.amazonaws.com", + "*.me-south-1.airflow.amazonaws.com", + "*.sa-east-1.airflow.amazonaws.com", + "*.us-east-1.airflow.amazonaws.com", + "*.us-east-2.airflow.amazonaws.com", + "*.us-west-1.airflow.amazonaws.com", + "*.us-west-2.airflow.amazonaws.com", + "s3.dualstack.cn-north-1.amazonaws.com.cn", + "s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn", + "s3-website.dualstack.cn-north-1.amazonaws.com.cn", + "s3.cn-north-1.amazonaws.com.cn", + "s3-accesspoint.cn-north-1.amazonaws.com.cn", + "s3-deprecated.cn-north-1.amazonaws.com.cn", + "s3-object-lambda.cn-north-1.amazonaws.com.cn", + "s3-website.cn-north-1.amazonaws.com.cn", + "s3.dualstack.cn-northwest-1.amazonaws.com.cn", + "s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn", + "s3.cn-northwest-1.amazonaws.com.cn", + "s3-accesspoint.cn-northwest-1.amazonaws.com.cn", + "s3-object-lambda.cn-northwest-1.amazonaws.com.cn", + "s3-website.cn-northwest-1.amazonaws.com.cn", + "s3.dualstack.af-south-1.amazonaws.com", + "s3-accesspoint.dualstack.af-south-1.amazonaws.com", + "s3-website.dualstack.af-south-1.amazonaws.com", + "s3.af-south-1.amazonaws.com", + "s3-accesspoint.af-south-1.amazonaws.com", + "s3-object-lambda.af-south-1.amazonaws.com", + "s3-website.af-south-1.amazonaws.com", + "s3.dualstack.ap-east-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-east-1.amazonaws.com", + "s3.ap-east-1.amazonaws.com", + "s3-accesspoint.ap-east-1.amazonaws.com", + "s3-object-lambda.ap-east-1.amazonaws.com", + "s3-website.ap-east-1.amazonaws.com", + "s3.dualstack.ap-northeast-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com", + "s3-website.dualstack.ap-northeast-1.amazonaws.com", + "s3.ap-northeast-1.amazonaws.com", + "s3-accesspoint.ap-northeast-1.amazonaws.com", + "s3-object-lambda.ap-northeast-1.amazonaws.com", + "s3-website.ap-northeast-1.amazonaws.com", + "s3.dualstack.ap-northeast-2.amazonaws.com", + "s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com", + "s3-website.dualstack.ap-northeast-2.amazonaws.com", + "s3.ap-northeast-2.amazonaws.com", + "s3-accesspoint.ap-northeast-2.amazonaws.com", + "s3-object-lambda.ap-northeast-2.amazonaws.com", + "s3-website.ap-northeast-2.amazonaws.com", + "s3.dualstack.ap-northeast-3.amazonaws.com", + "s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com", + "s3-website.dualstack.ap-northeast-3.amazonaws.com", + "s3.ap-northeast-3.amazonaws.com", + "s3-accesspoint.ap-northeast-3.amazonaws.com", + "s3-object-lambda.ap-northeast-3.amazonaws.com", + "s3-website.ap-northeast-3.amazonaws.com", + "s3.dualstack.ap-south-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-south-1.amazonaws.com", + "s3-website.dualstack.ap-south-1.amazonaws.com", + "s3.ap-south-1.amazonaws.com", + "s3-accesspoint.ap-south-1.amazonaws.com", + "s3-object-lambda.ap-south-1.amazonaws.com", + "s3-website.ap-south-1.amazonaws.com", + "s3.dualstack.ap-south-2.amazonaws.com", + "s3-accesspoint.dualstack.ap-south-2.amazonaws.com", + "s3-website.dualstack.ap-south-2.amazonaws.com", + "s3.ap-south-2.amazonaws.com", + "s3-accesspoint.ap-south-2.amazonaws.com", + "s3-object-lambda.ap-south-2.amazonaws.com", + "s3-website.ap-south-2.amazonaws.com", + "s3.dualstack.ap-southeast-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com", + "s3-website.dualstack.ap-southeast-1.amazonaws.com", + "s3.ap-southeast-1.amazonaws.com", + "s3-accesspoint.ap-southeast-1.amazonaws.com", + "s3-object-lambda.ap-southeast-1.amazonaws.com", + "s3-website.ap-southeast-1.amazonaws.com", + "s3.dualstack.ap-southeast-2.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com", + "s3-website.dualstack.ap-southeast-2.amazonaws.com", + "s3.ap-southeast-2.amazonaws.com", + "s3-accesspoint.ap-southeast-2.amazonaws.com", + "s3-object-lambda.ap-southeast-2.amazonaws.com", + "s3-website.ap-southeast-2.amazonaws.com", + "s3.dualstack.ap-southeast-3.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com", + "s3-website.dualstack.ap-southeast-3.amazonaws.com", + "s3.ap-southeast-3.amazonaws.com", + "s3-accesspoint.ap-southeast-3.amazonaws.com", + "s3-object-lambda.ap-southeast-3.amazonaws.com", + "s3-website.ap-southeast-3.amazonaws.com", + "s3.dualstack.ap-southeast-4.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com", + "s3-website.dualstack.ap-southeast-4.amazonaws.com", + "s3.ap-southeast-4.amazonaws.com", + "s3-accesspoint.ap-southeast-4.amazonaws.com", + "s3-object-lambda.ap-southeast-4.amazonaws.com", + "s3-website.ap-southeast-4.amazonaws.com", + "s3.dualstack.ap-southeast-5.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com", + "s3-website.dualstack.ap-southeast-5.amazonaws.com", + "s3.ap-southeast-5.amazonaws.com", + "s3-accesspoint.ap-southeast-5.amazonaws.com", + "s3-deprecated.ap-southeast-5.amazonaws.com", + "s3-object-lambda.ap-southeast-5.amazonaws.com", + "s3-website.ap-southeast-5.amazonaws.com", + "s3.dualstack.ca-central-1.amazonaws.com", + "s3-accesspoint.dualstack.ca-central-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com", + "s3-fips.dualstack.ca-central-1.amazonaws.com", + "s3-website.dualstack.ca-central-1.amazonaws.com", + "s3.ca-central-1.amazonaws.com", + "s3-accesspoint.ca-central-1.amazonaws.com", + "s3-accesspoint-fips.ca-central-1.amazonaws.com", + "s3-fips.ca-central-1.amazonaws.com", + "s3-object-lambda.ca-central-1.amazonaws.com", + "s3-website.ca-central-1.amazonaws.com", + "s3.dualstack.ca-west-1.amazonaws.com", + "s3-accesspoint.dualstack.ca-west-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.ca-west-1.amazonaws.com", + "s3-fips.dualstack.ca-west-1.amazonaws.com", + "s3-website.dualstack.ca-west-1.amazonaws.com", + "s3.ca-west-1.amazonaws.com", + "s3-accesspoint.ca-west-1.amazonaws.com", + "s3-accesspoint-fips.ca-west-1.amazonaws.com", + "s3-fips.ca-west-1.amazonaws.com", + "s3-object-lambda.ca-west-1.amazonaws.com", + "s3-website.ca-west-1.amazonaws.com", + "s3.dualstack.eu-central-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-central-1.amazonaws.com", + "s3-website.dualstack.eu-central-1.amazonaws.com", + "s3.eu-central-1.amazonaws.com", + "s3-accesspoint.eu-central-1.amazonaws.com", + "s3-object-lambda.eu-central-1.amazonaws.com", + "s3-website.eu-central-1.amazonaws.com", + "s3.dualstack.eu-central-2.amazonaws.com", + "s3-accesspoint.dualstack.eu-central-2.amazonaws.com", + "s3-website.dualstack.eu-central-2.amazonaws.com", + "s3.eu-central-2.amazonaws.com", + "s3-accesspoint.eu-central-2.amazonaws.com", + "s3-object-lambda.eu-central-2.amazonaws.com", + "s3-website.eu-central-2.amazonaws.com", + "s3.dualstack.eu-north-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-north-1.amazonaws.com", + "s3.eu-north-1.amazonaws.com", + "s3-accesspoint.eu-north-1.amazonaws.com", + "s3-object-lambda.eu-north-1.amazonaws.com", + "s3-website.eu-north-1.amazonaws.com", + "s3.dualstack.eu-south-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-south-1.amazonaws.com", + "s3-website.dualstack.eu-south-1.amazonaws.com", + "s3.eu-south-1.amazonaws.com", + "s3-accesspoint.eu-south-1.amazonaws.com", + "s3-object-lambda.eu-south-1.amazonaws.com", + "s3-website.eu-south-1.amazonaws.com", + "s3.dualstack.eu-south-2.amazonaws.com", + "s3-accesspoint.dualstack.eu-south-2.amazonaws.com", + "s3-website.dualstack.eu-south-2.amazonaws.com", + "s3.eu-south-2.amazonaws.com", + "s3-accesspoint.eu-south-2.amazonaws.com", + "s3-object-lambda.eu-south-2.amazonaws.com", + "s3-website.eu-south-2.amazonaws.com", + "s3.dualstack.eu-west-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-west-1.amazonaws.com", + "s3-website.dualstack.eu-west-1.amazonaws.com", + "s3.eu-west-1.amazonaws.com", + "s3-accesspoint.eu-west-1.amazonaws.com", + "s3-deprecated.eu-west-1.amazonaws.com", + "s3-object-lambda.eu-west-1.amazonaws.com", + "s3-website.eu-west-1.amazonaws.com", + "s3.dualstack.eu-west-2.amazonaws.com", + "s3-accesspoint.dualstack.eu-west-2.amazonaws.com", + "s3.eu-west-2.amazonaws.com", + "s3-accesspoint.eu-west-2.amazonaws.com", + "s3-object-lambda.eu-west-2.amazonaws.com", + "s3-website.eu-west-2.amazonaws.com", + "s3.dualstack.eu-west-3.amazonaws.com", + "s3-accesspoint.dualstack.eu-west-3.amazonaws.com", + "s3-website.dualstack.eu-west-3.amazonaws.com", + "s3.eu-west-3.amazonaws.com", + "s3-accesspoint.eu-west-3.amazonaws.com", + "s3-object-lambda.eu-west-3.amazonaws.com", + "s3-website.eu-west-3.amazonaws.com", + "s3.dualstack.il-central-1.amazonaws.com", + "s3-accesspoint.dualstack.il-central-1.amazonaws.com", + "s3-website.dualstack.il-central-1.amazonaws.com", + "s3.il-central-1.amazonaws.com", + "s3-accesspoint.il-central-1.amazonaws.com", + "s3-object-lambda.il-central-1.amazonaws.com", + "s3-website.il-central-1.amazonaws.com", + "s3.dualstack.me-central-1.amazonaws.com", + "s3-accesspoint.dualstack.me-central-1.amazonaws.com", + "s3-website.dualstack.me-central-1.amazonaws.com", + "s3.me-central-1.amazonaws.com", + "s3-accesspoint.me-central-1.amazonaws.com", + "s3-object-lambda.me-central-1.amazonaws.com", + "s3-website.me-central-1.amazonaws.com", + "s3.dualstack.me-south-1.amazonaws.com", + "s3-accesspoint.dualstack.me-south-1.amazonaws.com", + "s3.me-south-1.amazonaws.com", + "s3-accesspoint.me-south-1.amazonaws.com", + "s3-object-lambda.me-south-1.amazonaws.com", + "s3-website.me-south-1.amazonaws.com", + "s3.amazonaws.com", + "s3-1.amazonaws.com", + "s3-ap-east-1.amazonaws.com", + "s3-ap-northeast-1.amazonaws.com", + "s3-ap-northeast-2.amazonaws.com", + "s3-ap-northeast-3.amazonaws.com", + "s3-ap-south-1.amazonaws.com", + "s3-ap-southeast-1.amazonaws.com", + "s3-ap-southeast-2.amazonaws.com", + "s3-ca-central-1.amazonaws.com", + "s3-eu-central-1.amazonaws.com", + "s3-eu-north-1.amazonaws.com", + "s3-eu-west-1.amazonaws.com", + "s3-eu-west-2.amazonaws.com", + "s3-eu-west-3.amazonaws.com", + "s3-external-1.amazonaws.com", + "s3-fips-us-gov-east-1.amazonaws.com", + "s3-fips-us-gov-west-1.amazonaws.com", + "mrap.accesspoint.s3-global.amazonaws.com", + "s3-me-south-1.amazonaws.com", + "s3-sa-east-1.amazonaws.com", + "s3-us-east-2.amazonaws.com", + "s3-us-gov-east-1.amazonaws.com", + "s3-us-gov-west-1.amazonaws.com", + "s3-us-west-1.amazonaws.com", + "s3-us-west-2.amazonaws.com", + "s3-website-ap-northeast-1.amazonaws.com", + "s3-website-ap-southeast-1.amazonaws.com", + "s3-website-ap-southeast-2.amazonaws.com", + "s3-website-eu-west-1.amazonaws.com", + "s3-website-sa-east-1.amazonaws.com", + "s3-website-us-east-1.amazonaws.com", + "s3-website-us-gov-west-1.amazonaws.com", + "s3-website-us-west-1.amazonaws.com", + "s3-website-us-west-2.amazonaws.com", + "s3.dualstack.sa-east-1.amazonaws.com", + "s3-accesspoint.dualstack.sa-east-1.amazonaws.com", + "s3-website.dualstack.sa-east-1.amazonaws.com", + "s3.sa-east-1.amazonaws.com", + "s3-accesspoint.sa-east-1.amazonaws.com", + "s3-object-lambda.sa-east-1.amazonaws.com", + "s3-website.sa-east-1.amazonaws.com", + "s3.dualstack.us-east-1.amazonaws.com", + "s3-accesspoint.dualstack.us-east-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com", + "s3-fips.dualstack.us-east-1.amazonaws.com", + "s3-website.dualstack.us-east-1.amazonaws.com", + "s3.us-east-1.amazonaws.com", + "s3-accesspoint.us-east-1.amazonaws.com", + "s3-accesspoint-fips.us-east-1.amazonaws.com", + "s3-deprecated.us-east-1.amazonaws.com", + "s3-fips.us-east-1.amazonaws.com", + "s3-object-lambda.us-east-1.amazonaws.com", + "s3-website.us-east-1.amazonaws.com", + "s3.dualstack.us-east-2.amazonaws.com", + "s3-accesspoint.dualstack.us-east-2.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com", + "s3-fips.dualstack.us-east-2.amazonaws.com", + "s3-website.dualstack.us-east-2.amazonaws.com", + "s3.us-east-2.amazonaws.com", + "s3-accesspoint.us-east-2.amazonaws.com", + "s3-accesspoint-fips.us-east-2.amazonaws.com", + "s3-deprecated.us-east-2.amazonaws.com", + "s3-fips.us-east-2.amazonaws.com", + "s3-object-lambda.us-east-2.amazonaws.com", + "s3-website.us-east-2.amazonaws.com", + "s3.dualstack.us-gov-east-1.amazonaws.com", + "s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com", + "s3-fips.dualstack.us-gov-east-1.amazonaws.com", + "s3.us-gov-east-1.amazonaws.com", + "s3-accesspoint.us-gov-east-1.amazonaws.com", + "s3-accesspoint-fips.us-gov-east-1.amazonaws.com", + "s3-fips.us-gov-east-1.amazonaws.com", + "s3-object-lambda.us-gov-east-1.amazonaws.com", + "s3-website.us-gov-east-1.amazonaws.com", + "s3.dualstack.us-gov-west-1.amazonaws.com", + "s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com", + "s3-fips.dualstack.us-gov-west-1.amazonaws.com", + "s3.us-gov-west-1.amazonaws.com", + "s3-accesspoint.us-gov-west-1.amazonaws.com", + "s3-accesspoint-fips.us-gov-west-1.amazonaws.com", + "s3-fips.us-gov-west-1.amazonaws.com", + "s3-object-lambda.us-gov-west-1.amazonaws.com", + "s3-website.us-gov-west-1.amazonaws.com", + "s3.dualstack.us-west-1.amazonaws.com", + "s3-accesspoint.dualstack.us-west-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com", + "s3-fips.dualstack.us-west-1.amazonaws.com", + "s3-website.dualstack.us-west-1.amazonaws.com", + "s3.us-west-1.amazonaws.com", + "s3-accesspoint.us-west-1.amazonaws.com", + "s3-accesspoint-fips.us-west-1.amazonaws.com", + "s3-fips.us-west-1.amazonaws.com", + "s3-object-lambda.us-west-1.amazonaws.com", + "s3-website.us-west-1.amazonaws.com", + "s3.dualstack.us-west-2.amazonaws.com", + "s3-accesspoint.dualstack.us-west-2.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com", + "s3-fips.dualstack.us-west-2.amazonaws.com", + "s3-website.dualstack.us-west-2.amazonaws.com", + "s3.us-west-2.amazonaws.com", + "s3-accesspoint.us-west-2.amazonaws.com", + "s3-accesspoint-fips.us-west-2.amazonaws.com", + "s3-deprecated.us-west-2.amazonaws.com", + "s3-fips.us-west-2.amazonaws.com", + "s3-object-lambda.us-west-2.amazonaws.com", + "s3-website.us-west-2.amazonaws.com", + "labeling.ap-northeast-1.sagemaker.aws", + "labeling.ap-northeast-2.sagemaker.aws", + "labeling.ap-south-1.sagemaker.aws", + "labeling.ap-southeast-1.sagemaker.aws", + "labeling.ap-southeast-2.sagemaker.aws", + "labeling.ca-central-1.sagemaker.aws", + "labeling.eu-central-1.sagemaker.aws", + "labeling.eu-west-1.sagemaker.aws", + "labeling.eu-west-2.sagemaker.aws", + "labeling.us-east-1.sagemaker.aws", + "labeling.us-east-2.sagemaker.aws", + "labeling.us-west-2.sagemaker.aws", + "notebook.af-south-1.sagemaker.aws", + "notebook.ap-east-1.sagemaker.aws", + "notebook.ap-northeast-1.sagemaker.aws", + "notebook.ap-northeast-2.sagemaker.aws", + "notebook.ap-northeast-3.sagemaker.aws", + "notebook.ap-south-1.sagemaker.aws", + "notebook.ap-south-2.sagemaker.aws", + "notebook.ap-southeast-1.sagemaker.aws", + "notebook.ap-southeast-2.sagemaker.aws", + "notebook.ap-southeast-3.sagemaker.aws", + "notebook.ap-southeast-4.sagemaker.aws", + "notebook.ca-central-1.sagemaker.aws", + "notebook-fips.ca-central-1.sagemaker.aws", + "notebook.ca-west-1.sagemaker.aws", + "notebook-fips.ca-west-1.sagemaker.aws", + "notebook.eu-central-1.sagemaker.aws", + "notebook.eu-central-2.sagemaker.aws", + "notebook.eu-north-1.sagemaker.aws", + "notebook.eu-south-1.sagemaker.aws", + "notebook.eu-south-2.sagemaker.aws", + "notebook.eu-west-1.sagemaker.aws", + "notebook.eu-west-2.sagemaker.aws", + "notebook.eu-west-3.sagemaker.aws", + "notebook.il-central-1.sagemaker.aws", + "notebook.me-central-1.sagemaker.aws", + "notebook.me-south-1.sagemaker.aws", + "notebook.sa-east-1.sagemaker.aws", + "notebook.us-east-1.sagemaker.aws", + "notebook-fips.us-east-1.sagemaker.aws", + "notebook.us-east-2.sagemaker.aws", + "notebook-fips.us-east-2.sagemaker.aws", + "notebook.us-gov-east-1.sagemaker.aws", + "notebook-fips.us-gov-east-1.sagemaker.aws", + "notebook.us-gov-west-1.sagemaker.aws", + "notebook-fips.us-gov-west-1.sagemaker.aws", + "notebook.us-west-1.sagemaker.aws", + "notebook-fips.us-west-1.sagemaker.aws", + "notebook.us-west-2.sagemaker.aws", + "notebook-fips.us-west-2.sagemaker.aws", + "notebook.cn-north-1.sagemaker.com.cn", + "notebook.cn-northwest-1.sagemaker.com.cn", + "studio.af-south-1.sagemaker.aws", + "studio.ap-east-1.sagemaker.aws", + "studio.ap-northeast-1.sagemaker.aws", + "studio.ap-northeast-2.sagemaker.aws", + "studio.ap-northeast-3.sagemaker.aws", + "studio.ap-south-1.sagemaker.aws", + "studio.ap-southeast-1.sagemaker.aws", + "studio.ap-southeast-2.sagemaker.aws", + "studio.ap-southeast-3.sagemaker.aws", + "studio.ca-central-1.sagemaker.aws", + "studio.eu-central-1.sagemaker.aws", + "studio.eu-north-1.sagemaker.aws", + "studio.eu-south-1.sagemaker.aws", + "studio.eu-south-2.sagemaker.aws", + "studio.eu-west-1.sagemaker.aws", + "studio.eu-west-2.sagemaker.aws", + "studio.eu-west-3.sagemaker.aws", + "studio.il-central-1.sagemaker.aws", + "studio.me-central-1.sagemaker.aws", + "studio.me-south-1.sagemaker.aws", + "studio.sa-east-1.sagemaker.aws", + "studio.us-east-1.sagemaker.aws", + "studio.us-east-2.sagemaker.aws", + "studio.us-gov-east-1.sagemaker.aws", + "studio-fips.us-gov-east-1.sagemaker.aws", + "studio.us-gov-west-1.sagemaker.aws", + "studio-fips.us-gov-west-1.sagemaker.aws", + "studio.us-west-1.sagemaker.aws", + "studio.us-west-2.sagemaker.aws", + "studio.cn-north-1.sagemaker.com.cn", + "studio.cn-northwest-1.sagemaker.com.cn", + "*.experiments.sagemaker.aws", + "analytics-gateway.ap-northeast-1.amazonaws.com", + "analytics-gateway.ap-northeast-2.amazonaws.com", + "analytics-gateway.ap-south-1.amazonaws.com", + "analytics-gateway.ap-southeast-1.amazonaws.com", + "analytics-gateway.ap-southeast-2.amazonaws.com", + "analytics-gateway.eu-central-1.amazonaws.com", + "analytics-gateway.eu-west-1.amazonaws.com", + "analytics-gateway.us-east-1.amazonaws.com", + "analytics-gateway.us-east-2.amazonaws.com", + "analytics-gateway.us-west-2.amazonaws.com", + "amplifyapp.com", + "*.awsapprunner.com", + "webview-assets.aws-cloud9.af-south-1.amazonaws.com", + "vfs.cloud9.af-south-1.amazonaws.com", + "webview-assets.cloud9.af-south-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-east-1.amazonaws.com", + "vfs.cloud9.ap-east-1.amazonaws.com", + "webview-assets.cloud9.ap-east-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com", + "vfs.cloud9.ap-northeast-1.amazonaws.com", + "webview-assets.cloud9.ap-northeast-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com", + "vfs.cloud9.ap-northeast-2.amazonaws.com", + "webview-assets.cloud9.ap-northeast-2.amazonaws.com", + "webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com", + "vfs.cloud9.ap-northeast-3.amazonaws.com", + "webview-assets.cloud9.ap-northeast-3.amazonaws.com", + "webview-assets.aws-cloud9.ap-south-1.amazonaws.com", + "vfs.cloud9.ap-south-1.amazonaws.com", + "webview-assets.cloud9.ap-south-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com", + "vfs.cloud9.ap-southeast-1.amazonaws.com", + "webview-assets.cloud9.ap-southeast-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com", + "vfs.cloud9.ap-southeast-2.amazonaws.com", + "webview-assets.cloud9.ap-southeast-2.amazonaws.com", + "webview-assets.aws-cloud9.ca-central-1.amazonaws.com", + "vfs.cloud9.ca-central-1.amazonaws.com", + "webview-assets.cloud9.ca-central-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-central-1.amazonaws.com", + "vfs.cloud9.eu-central-1.amazonaws.com", + "webview-assets.cloud9.eu-central-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-north-1.amazonaws.com", + "vfs.cloud9.eu-north-1.amazonaws.com", + "webview-assets.cloud9.eu-north-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-south-1.amazonaws.com", + "vfs.cloud9.eu-south-1.amazonaws.com", + "webview-assets.cloud9.eu-south-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-west-1.amazonaws.com", + "vfs.cloud9.eu-west-1.amazonaws.com", + "webview-assets.cloud9.eu-west-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-west-2.amazonaws.com", + "vfs.cloud9.eu-west-2.amazonaws.com", + "webview-assets.cloud9.eu-west-2.amazonaws.com", + "webview-assets.aws-cloud9.eu-west-3.amazonaws.com", + "vfs.cloud9.eu-west-3.amazonaws.com", + "webview-assets.cloud9.eu-west-3.amazonaws.com", + "webview-assets.aws-cloud9.il-central-1.amazonaws.com", + "vfs.cloud9.il-central-1.amazonaws.com", + "webview-assets.aws-cloud9.me-south-1.amazonaws.com", + "vfs.cloud9.me-south-1.amazonaws.com", + "webview-assets.cloud9.me-south-1.amazonaws.com", + "webview-assets.aws-cloud9.sa-east-1.amazonaws.com", + "vfs.cloud9.sa-east-1.amazonaws.com", + "webview-assets.cloud9.sa-east-1.amazonaws.com", + "webview-assets.aws-cloud9.us-east-1.amazonaws.com", + "vfs.cloud9.us-east-1.amazonaws.com", + "webview-assets.cloud9.us-east-1.amazonaws.com", + "webview-assets.aws-cloud9.us-east-2.amazonaws.com", + "vfs.cloud9.us-east-2.amazonaws.com", + "webview-assets.cloud9.us-east-2.amazonaws.com", + "webview-assets.aws-cloud9.us-west-1.amazonaws.com", + "vfs.cloud9.us-west-1.amazonaws.com", + "webview-assets.cloud9.us-west-1.amazonaws.com", + "webview-assets.aws-cloud9.us-west-2.amazonaws.com", + "vfs.cloud9.us-west-2.amazonaws.com", + "webview-assets.cloud9.us-west-2.amazonaws.com", + "awsapps.com", + "cn-north-1.eb.amazonaws.com.cn", + "cn-northwest-1.eb.amazonaws.com.cn", + "elasticbeanstalk.com", + "af-south-1.elasticbeanstalk.com", + "ap-east-1.elasticbeanstalk.com", + "ap-northeast-1.elasticbeanstalk.com", + "ap-northeast-2.elasticbeanstalk.com", + "ap-northeast-3.elasticbeanstalk.com", + "ap-south-1.elasticbeanstalk.com", + "ap-southeast-1.elasticbeanstalk.com", + "ap-southeast-2.elasticbeanstalk.com", + "ap-southeast-3.elasticbeanstalk.com", + "ca-central-1.elasticbeanstalk.com", + "eu-central-1.elasticbeanstalk.com", + "eu-north-1.elasticbeanstalk.com", + "eu-south-1.elasticbeanstalk.com", + "eu-west-1.elasticbeanstalk.com", + "eu-west-2.elasticbeanstalk.com", + "eu-west-3.elasticbeanstalk.com", + "il-central-1.elasticbeanstalk.com", + "me-south-1.elasticbeanstalk.com", + "sa-east-1.elasticbeanstalk.com", + "us-east-1.elasticbeanstalk.com", + "us-east-2.elasticbeanstalk.com", + "us-gov-east-1.elasticbeanstalk.com", + "us-gov-west-1.elasticbeanstalk.com", + "us-west-1.elasticbeanstalk.com", + "us-west-2.elasticbeanstalk.com", + "*.elb.amazonaws.com.cn", + "*.elb.amazonaws.com", + "awsglobalaccelerator.com", + "*.private.repost.aws", + "eero.online", + "eero-stage.online", + "apigee.io", + "panel.dev", + "siiites.com", + "appspacehosted.com", + "appspaceusercontent.com", + "appudo.net", + "on-aptible.com", + "f5.si", + "arvanedge.ir", + "user.aseinet.ne.jp", + "gv.vc", + "d.gv.vc", + "user.party.eus", + "pimienta.org", + "poivron.org", + "potager.org", + "sweetpepper.org", + "myasustor.com", + "cdn.prod.atlassian-dev.net", + "translated.page", + "myfritz.link", + "myfritz.net", + "onavstack.net", + "*.awdev.ca", + "*.advisor.ws", + "ecommerce-shop.pl", + "b-data.io", + "balena-devices.com", + "base.ec", + "official.ec", + "buyshop.jp", + "fashionstore.jp", + "handcrafted.jp", + "kawaiishop.jp", + "supersale.jp", + "theshop.jp", + "shopselect.net", + "base.shop", + "beagleboard.io", + "*.beget.app", + "pages.gay", + "bnr.la", + "bitbucket.io", + "blackbaudcdn.net", + "of.je", + "bluebite.io", + "boomla.net", + "boutir.com", + "boxfuse.io", + "square7.ch", + "bplaced.com", + "bplaced.de", + "square7.de", + "bplaced.net", + "square7.net", + "*.s.brave.io", + "shop.brendly.hr", + "shop.brendly.rs", + "browsersafetymark.io", + "radio.am", + "radio.fm", + "uk0.bigv.io", + "dh.bytemark.co.uk", + "vm.bytemark.co.uk", + "cafjs.com", + "canva-apps.cn", + "*.my.canvasite.cn", + "canva-apps.com", + "*.my.canva.site", + "drr.ac", + "uwu.ai", + "carrd.co", + "crd.co", + "ju.mp", + "api.gov.uk", + "cdn77-storage.com", + "rsc.contentproxy9.cz", + "r.cdn77.net", + "cdn77-ssl.net", + "c.cdn77.org", + "rsc.cdn77.org", + "ssl.origin.cdn77-secure.org", + "za.bz", + "br.com", + "cn.com", + "de.com", + "eu.com", + "jpn.com", + "mex.com", + "ru.com", + "sa.com", + "uk.com", + "us.com", + "za.com", + "com.de", + "gb.net", + "hu.net", + "jp.net", + "se.net", + "uk.net", + "ae.org", + "com.se", + "cx.ua", + "discourse.group", + "discourse.team", + "clerk.app", + "clerkstage.app", + "*.lcl.dev", + "*.lclstage.dev", + "*.stg.dev", + "*.stgstage.dev", + "cleverapps.cc", + "*.services.clever-cloud.com", + "cleverapps.io", + "cleverapps.tech", + "clickrising.net", + "cloudns.asia", + "cloudns.be", + "cloud-ip.biz", + "cloudns.biz", + "cloudns.cc", + "cloudns.ch", + "cloudns.cl", + "cloudns.club", + "dnsabr.com", + "ip-ddns.com", + "cloudns.cx", + "cloudns.eu", + "cloudns.in", + "cloudns.info", + "ddns-ip.net", + "dns-cloud.net", + "dns-dynamic.net", + "cloudns.nz", + "cloudns.org", + "ip-dynamic.org", + "cloudns.ph", + "cloudns.pro", + "cloudns.pw", + "cloudns.us", + "c66.me", + "cloud66.ws", + "cloud66.zone", + "jdevcloud.com", + "wpdevcloud.com", + "cloudaccess.host", + "freesite.host", + "cloudaccess.net", + "*.cloudera.site", + "cf-ipfs.com", + "cloudflare-ipfs.com", + "trycloudflare.com", + "pages.dev", + "r2.dev", + "workers.dev", + "cloudflare.net", + "cdn.cloudflare.net", + "cdn.cloudflareanycast.net", + "cdn.cloudflarecn.net", + "cdn.cloudflareglobal.net", + "cust.cloudscale.ch", + "objects.lpg.cloudscale.ch", + "objects.rma.cloudscale.ch", + "wnext.app", + "cnpy.gdn", + "*.otap.co", + "co.ca", + "co.com", + "codeberg.page", + "csb.app", + "preview.csb.app", + "co.nl", + "co.no", + "webhosting.be", + "hosting-cluster.nl", + "ctfcloud.net", + "convex.site", + "ac.ru", + "edu.ru", + "gov.ru", + "int.ru", + "mil.ru", + "test.ru", + "dyn.cosidns.de", + "dnsupdater.de", + "dynamisches-dns.de", + "internet-dns.de", + "l-o-g-i-n.de", + "dynamic-dns.info", + "feste-ip.net", + "knx-server.net", + "static-access.net", + "craft.me", + "realm.cz", + "on.crisp.email", + "*.cryptonomic.net", + "curv.dev", + "cfolks.pl", + "cyon.link", + "cyon.site", + "platform0.app", + "fnwk.site", + "folionetwork.site", + "biz.dk", + "co.dk", + "firm.dk", + "reg.dk", + "store.dk", + "dyndns.dappnode.io", + "builtwithdark.com", + "darklang.io", + "demo.datadetect.com", + "instance.datadetect.com", + "edgestack.me", + "dattolocal.com", + "dattorelay.com", + "dattoweb.com", + "mydatto.com", + "dattolocal.net", + "mydatto.net", + "ddnss.de", + "dyn.ddnss.de", + "dyndns.ddnss.de", + "dyn-ip24.de", + "dyndns1.de", + "home-webserver.de", + "dyn.home-webserver.de", + "myhome-server.de", + "ddnss.org", + "debian.net", + "definima.io", + "definima.net", + "deno.dev", + "deno-staging.dev", + "dedyn.io", + "deta.app", + "deta.dev", + "dfirma.pl", + "dkonto.pl", + "you2.pl", + "ondigitalocean.app", + "*.digitaloceanspaces.com", + "us.kg", + "rss.my.id", + "diher.solutions", + "discordsays.com", + "discordsez.com", + "jozi.biz", + "dnshome.de", + "online.th", + "shop.th", + "drayddns.com", + "shoparena.pl", + "dreamhosters.com", + "durumis.com", + "mydrobo.com", + "drud.io", + "drud.us", + "duckdns.org", + "dy.fi", + "tunk.org", + "dyndns.biz", + "for-better.biz", + "for-more.biz", + "for-some.biz", + "for-the.biz", + "selfip.biz", + "webhop.biz", + "ftpaccess.cc", + "game-server.cc", + "myphotos.cc", + "scrapping.cc", + "blogdns.com", + "cechire.com", + "dnsalias.com", + "dnsdojo.com", + "doesntexist.com", + "dontexist.com", + "doomdns.com", + "dyn-o-saur.com", + "dynalias.com", + "dyndns-at-home.com", + "dyndns-at-work.com", + "dyndns-blog.com", + "dyndns-free.com", + "dyndns-home.com", + "dyndns-ip.com", + "dyndns-mail.com", + "dyndns-office.com", + "dyndns-pics.com", + "dyndns-remote.com", + "dyndns-server.com", + "dyndns-web.com", + "dyndns-wiki.com", + "dyndns-work.com", + "est-a-la-maison.com", + "est-a-la-masion.com", + "est-le-patron.com", + "est-mon-blogueur.com", + "from-ak.com", + "from-al.com", + "from-ar.com", + "from-ca.com", + "from-ct.com", + "from-dc.com", + "from-de.com", + "from-fl.com", + "from-ga.com", + "from-hi.com", + "from-ia.com", + "from-id.com", + "from-il.com", + "from-in.com", + "from-ks.com", + "from-ky.com", + "from-ma.com", + "from-md.com", + "from-mi.com", + "from-mn.com", + "from-mo.com", + "from-ms.com", + "from-mt.com", + "from-nc.com", + "from-nd.com", + "from-ne.com", + "from-nh.com", + "from-nj.com", + "from-nm.com", + "from-nv.com", + "from-oh.com", + "from-ok.com", + "from-or.com", + "from-pa.com", + "from-pr.com", + "from-ri.com", + "from-sc.com", + "from-sd.com", + "from-tn.com", + "from-tx.com", + "from-ut.com", + "from-va.com", + "from-vt.com", + "from-wa.com", + "from-wi.com", + "from-wv.com", + "from-wy.com", + "getmyip.com", + "gotdns.com", + "hobby-site.com", + "homelinux.com", + "homeunix.com", + "iamallama.com", + "is-a-anarchist.com", + "is-a-blogger.com", + "is-a-bookkeeper.com", + "is-a-bulls-fan.com", + "is-a-caterer.com", + "is-a-chef.com", + "is-a-conservative.com", + "is-a-cpa.com", + "is-a-cubicle-slave.com", + "is-a-democrat.com", + "is-a-designer.com", + "is-a-doctor.com", + "is-a-financialadvisor.com", + "is-a-geek.com", + "is-a-green.com", + "is-a-guru.com", + "is-a-hard-worker.com", + "is-a-hunter.com", + "is-a-landscaper.com", + "is-a-lawyer.com", + "is-a-liberal.com", + "is-a-libertarian.com", + "is-a-llama.com", + "is-a-musician.com", + "is-a-nascarfan.com", + "is-a-nurse.com", + "is-a-painter.com", + "is-a-personaltrainer.com", + "is-a-photographer.com", + "is-a-player.com", + "is-a-republican.com", + "is-a-rockstar.com", + "is-a-socialist.com", + "is-a-student.com", + "is-a-teacher.com", + "is-a-techie.com", + "is-a-therapist.com", + "is-an-accountant.com", + "is-an-actor.com", + "is-an-actress.com", + "is-an-anarchist.com", + "is-an-artist.com", + "is-an-engineer.com", + "is-an-entertainer.com", + "is-certified.com", + "is-gone.com", + "is-into-anime.com", + "is-into-cars.com", + "is-into-cartoons.com", + "is-into-games.com", + "is-leet.com", + "is-not-certified.com", + "is-slick.com", + "is-uberleet.com", + "is-with-theband.com", + "isa-geek.com", + "isa-hockeynut.com", + "issmarterthanyou.com", + "likes-pie.com", + "likescandy.com", + "neat-url.com", + "saves-the-whales.com", + "selfip.com", + "sells-for-less.com", + "sells-for-u.com", + "servebbs.com", + "simple-url.com", + "space-to-rent.com", + "teaches-yoga.com", + "writesthisblog.com", + "ath.cx", + "fuettertdasnetz.de", + "isteingeek.de", + "istmein.de", + "lebtimnetz.de", + "leitungsen.de", + "traeumtgerade.de", + "barrel-of-knowledge.info", + "barrell-of-knowledge.info", + "dyndns.info", + "for-our.info", + "groks-the.info", + "groks-this.info", + "here-for-more.info", + "knowsitall.info", + "selfip.info", + "webhop.info", + "forgot.her.name", + "forgot.his.name", + "at-band-camp.net", + "blogdns.net", + "broke-it.net", + "buyshouses.net", + "dnsalias.net", + "dnsdojo.net", + "does-it.net", + "dontexist.net", + "dynalias.net", + "dynathome.net", + "endofinternet.net", + "from-az.net", + "from-co.net", + "from-la.net", + "from-ny.net", + "gets-it.net", + "ham-radio-op.net", + "homeftp.net", + "homeip.net", + "homelinux.net", + "homeunix.net", + "in-the-band.net", + "is-a-chef.net", + "is-a-geek.net", + "isa-geek.net", + "kicks-ass.net", + "office-on-the.net", + "podzone.net", + "scrapper-site.net", + "selfip.net", + "sells-it.net", + "servebbs.net", + "serveftp.net", + "thruhere.net", + "webhop.net", + "merseine.nu", + "mine.nu", + "shacknet.nu", + "blogdns.org", + "blogsite.org", + "boldlygoingnowhere.org", + "dnsalias.org", + "dnsdojo.org", + "doesntexist.org", + "dontexist.org", + "doomdns.org", + "dvrdns.org", + "dynalias.org", + "dyndns.org", + "go.dyndns.org", + "home.dyndns.org", + "endofinternet.org", + "endoftheinternet.org", + "from-me.org", + "game-host.org", + "gotdns.org", + "hobby-site.org", + "homedns.org", + "homeftp.org", + "homelinux.org", + "homeunix.org", + "is-a-bruinsfan.org", + "is-a-candidate.org", + "is-a-celticsfan.org", + "is-a-chef.org", + "is-a-geek.org", + "is-a-knight.org", + "is-a-linux-user.org", + "is-a-patsfan.org", + "is-a-soxfan.org", + "is-found.org", + "is-lost.org", + "is-saved.org", + "is-very-bad.org", + "is-very-evil.org", + "is-very-good.org", + "is-very-nice.org", + "is-very-sweet.org", + "isa-geek.org", + "kicks-ass.org", + "misconfused.org", + "podzone.org", + "readmyblog.org", + "selfip.org", + "sellsyourhome.org", + "servebbs.org", + "serveftp.org", + "servegame.org", + "stuff-4-sale.org", + "webhop.org", + "better-than.tv", + "dyndns.tv", + "on-the-web.tv", + "worse-than.tv", + "is-by.us", + "land-4-sale.us", + "stuff-4-sale.us", + "dyndns.ws", + "mypets.ws", + "ddnsfree.com", + "ddnsgeek.com", + "giize.com", + "gleeze.com", + "kozow.com", + "loseyourip.com", + "ooguy.com", + "theworkpc.com", + "casacam.net", + "dynu.net", + "accesscam.org", + "camdvr.org", + "freeddns.org", + "mywire.org", + "webredirect.org", + "myddns.rocks", + "dynv6.net", + "e4.cz", + "easypanel.app", + "easypanel.host", + "*.ewp.live", + "twmail.cc", + "twmail.net", + "twmail.org", + "mymailer.com.tw", + "url.tw", + "at.emf.camp", + "rt.ht", + "elementor.cloud", + "elementor.cool", + "en-root.fr", + "mytuleap.com", + "tuleap-partners.com", + "encr.app", + "encoreapi.com", + "eu.encoway.cloud", + "eu.org", + "al.eu.org", + "asso.eu.org", + "at.eu.org", + "au.eu.org", + "be.eu.org", + "bg.eu.org", + "ca.eu.org", + "cd.eu.org", + "ch.eu.org", + "cn.eu.org", + "cy.eu.org", + "cz.eu.org", + "de.eu.org", + "dk.eu.org", + "edu.eu.org", + "ee.eu.org", + "es.eu.org", + "fi.eu.org", + "fr.eu.org", + "gr.eu.org", + "hr.eu.org", + "hu.eu.org", + "ie.eu.org", + "il.eu.org", + "in.eu.org", + "int.eu.org", + "is.eu.org", + "it.eu.org", + "jp.eu.org", + "kr.eu.org", + "lt.eu.org", + "lu.eu.org", + "lv.eu.org", + "me.eu.org", + "mk.eu.org", + "mt.eu.org", + "my.eu.org", + "net.eu.org", + "ng.eu.org", + "nl.eu.org", + "no.eu.org", + "nz.eu.org", + "pl.eu.org", + "pt.eu.org", + "ro.eu.org", + "ru.eu.org", + "se.eu.org", + "si.eu.org", + "sk.eu.org", + "tr.eu.org", + "uk.eu.org", + "us.eu.org", + "eurodir.ru", + "eu-1.evennode.com", + "eu-2.evennode.com", + "eu-3.evennode.com", + "eu-4.evennode.com", + "us-1.evennode.com", + "us-2.evennode.com", + "us-3.evennode.com", + "us-4.evennode.com", + "relay.evervault.app", + "relay.evervault.dev", + "expo.app", + "staging.expo.app", + "onfabrica.com", + "ru.net", + "adygeya.ru", + "bashkiria.ru", + "bir.ru", + "cbg.ru", + "com.ru", + "dagestan.ru", + "grozny.ru", + "kalmykia.ru", + "kustanai.ru", + "marine.ru", + "mordovia.ru", + "msk.ru", + "mytis.ru", + "nalchik.ru", + "nov.ru", + "pyatigorsk.ru", + "spb.ru", + "vladikavkaz.ru", + "vladimir.ru", + "abkhazia.su", + "adygeya.su", + "aktyubinsk.su", + "arkhangelsk.su", + "armenia.su", + "ashgabad.su", + "azerbaijan.su", + "balashov.su", + "bashkiria.su", + "bryansk.su", + "bukhara.su", + "chimkent.su", + "dagestan.su", + "east-kazakhstan.su", + "exnet.su", + "georgia.su", + "grozny.su", + "ivanovo.su", + "jambyl.su", + "kalmykia.su", + "kaluga.su", + "karacol.su", + "karaganda.su", + "karelia.su", + "khakassia.su", + "krasnodar.su", + "kurgan.su", + "kustanai.su", + "lenug.su", + "mangyshlak.su", + "mordovia.su", + "msk.su", + "murmansk.su", + "nalchik.su", + "navoi.su", + "north-kazakhstan.su", + "nov.su", + "obninsk.su", + "penza.su", + "pokrovsk.su", + "sochi.su", + "spb.su", + "tashkent.su", + "termez.su", + "togliatti.su", + "troitsk.su", + "tselinograd.su", + "tula.su", + "tuva.su", + "vladikavkaz.su", + "vladimir.su", + "vologda.su", + "channelsdvr.net", + "u.channelsdvr.net", + "edgecompute.app", + "fastly-edge.com", + "fastly-terrarium.com", + "freetls.fastly.net", + "map.fastly.net", + "a.prod.fastly.net", + "global.prod.fastly.net", + "a.ssl.fastly.net", + "b.ssl.fastly.net", + "global.ssl.fastly.net", + "fastlylb.net", + "map.fastlylb.net", + "*.user.fm", + "fastvps-server.com", + "fastvps.host", + "myfast.host", + "fastvps.site", + "myfast.space", + "conn.uk", + "copro.uk", + "hosp.uk", + "fedorainfracloud.org", + "fedorapeople.org", + "cloud.fedoraproject.org", + "app.os.fedoraproject.org", + "app.os.stg.fedoraproject.org", + "mydobiss.com", + "fh-muenster.io", + "filegear.me", + "firebaseapp.com", + "fldrv.com", + "flutterflow.app", + "fly.dev", + "shw.io", + "edgeapp.net", + "forgeblocks.com", + "id.forgerock.io", + "framer.ai", + "framer.app", + "framercanvas.com", + "framer.media", + "framer.photos", + "framer.website", + "framer.wiki", + "0e.vc", + "freebox-os.com", + "freeboxos.com", + "fbx-os.fr", + "fbxos.fr", + "freebox-os.fr", + "freeboxos.fr", + "freedesktop.org", + "freemyip.com", + "*.frusky.de", + "wien.funkfeuer.at", + "daemon.asia", + "dix.asia", + "mydns.bz", + "0am.jp", + "0g0.jp", + "0j0.jp", + "0t0.jp", + "mydns.jp", + "pgw.jp", + "wjg.jp", + "keyword-on.net", + "live-on.net", + "server-on.net", + "mydns.tw", + "mydns.vc", + "*.futurecms.at", + "*.ex.futurecms.at", + "*.in.futurecms.at", + "futurehosting.at", + "futuremailing.at", + "*.ex.ortsinfo.at", + "*.kunden.ortsinfo.at", + "*.statics.cloud", + "aliases121.com", + "campaign.gov.uk", + "service.gov.uk", + "independent-commission.uk", + "independent-inquest.uk", + "independent-inquiry.uk", + "independent-panel.uk", + "independent-review.uk", + "public-inquiry.uk", + "royal-commission.uk", + "gehirn.ne.jp", + "usercontent.jp", + "gentapps.com", + "gentlentapis.com", + "lab.ms", + "cdn-edges.net", + "localcert.net", + "localhostcert.net", + "gsj.bz", + "githubusercontent.com", + "githubpreview.dev", + "github.io", + "gitlab.io", + "gitapp.si", + "gitpage.si", + "glitch.me", + "nog.community", + "co.ro", + "shop.ro", + "lolipop.io", + "angry.jp", + "babyblue.jp", + "babymilk.jp", + "backdrop.jp", + "bambina.jp", + "bitter.jp", + "blush.jp", + "boo.jp", + "boy.jp", + "boyfriend.jp", + "but.jp", + "candypop.jp", + "capoo.jp", + "catfood.jp", + "cheap.jp", + "chicappa.jp", + "chillout.jp", + "chips.jp", + "chowder.jp", + "chu.jp", + "ciao.jp", + "cocotte.jp", + "coolblog.jp", + "cranky.jp", + "cutegirl.jp", + "daa.jp", + "deca.jp", + "deci.jp", + "digick.jp", + "egoism.jp", + "fakefur.jp", + "fem.jp", + "flier.jp", + "floppy.jp", + "fool.jp", + "frenchkiss.jp", + "girlfriend.jp", + "girly.jp", + "gloomy.jp", + "gonna.jp", + "greater.jp", + "hacca.jp", + "heavy.jp", + "her.jp", + "hiho.jp", + "hippy.jp", + "holy.jp", + "hungry.jp", + "icurus.jp", + "itigo.jp", + "jellybean.jp", + "kikirara.jp", + "kill.jp", + "kilo.jp", + "kuron.jp", + "littlestar.jp", + "lolipopmc.jp", + "lolitapunk.jp", + "lomo.jp", + "lovepop.jp", + "lovesick.jp", + "main.jp", + "mods.jp", + "mond.jp", + "mongolian.jp", + "moo.jp", + "namaste.jp", + "nikita.jp", + "nobushi.jp", + "noor.jp", + "oops.jp", + "parallel.jp", + "parasite.jp", + "pecori.jp", + "peewee.jp", + "penne.jp", + "pepper.jp", + "perma.jp", + "pigboat.jp", + "pinoko.jp", + "punyu.jp", + "pupu.jp", + "pussycat.jp", + "pya.jp", + "raindrop.jp", + "readymade.jp", + "sadist.jp", + "schoolbus.jp", + "secret.jp", + "staba.jp", + "stripper.jp", + "sub.jp", + "sunnyday.jp", + "thick.jp", + "tonkotsu.jp", + "under.jp", + "upper.jp", + "velvet.jp", + "verse.jp", + "versus.jp", + "vivian.jp", + "watson.jp", + "weblike.jp", + "whitesnow.jp", + "zombie.jp", + "heteml.net", + "graphic.design", + "goip.de", + "blogspot.ae", + "blogspot.al", + "blogspot.am", + "*.hosted.app", + "*.run.app", + "web.app", + "blogspot.com.ar", + "blogspot.co.at", + "blogspot.com.au", + "blogspot.ba", + "blogspot.be", + "blogspot.bg", + "blogspot.bj", + "blogspot.com.br", + "blogspot.com.by", + "blogspot.ca", + "blogspot.cf", + "blogspot.ch", + "blogspot.cl", + "blogspot.com.co", + "*.0emm.com", + "appspot.com", + "*.r.appspot.com", + "blogspot.com", + "codespot.com", + "googleapis.com", + "googlecode.com", + "pagespeedmobilizer.com", + "withgoogle.com", + "withyoutube.com", + "blogspot.cv", + "blogspot.com.cy", + "blogspot.cz", + "blogspot.de", + "*.gateway.dev", + "blogspot.dk", + "blogspot.com.ee", + "blogspot.com.eg", + "blogspot.com.es", + "blogspot.fi", + "blogspot.fr", + "cloud.goog", + "translate.goog", + "*.usercontent.goog", + "blogspot.gr", + "blogspot.hk", + "blogspot.hr", + "blogspot.hu", + "blogspot.co.id", + "blogspot.ie", + "blogspot.co.il", + "blogspot.in", + "blogspot.is", + "blogspot.it", + "blogspot.jp", + "blogspot.co.ke", + "blogspot.kr", + "blogspot.li", + "blogspot.lt", + "blogspot.lu", + "blogspot.md", + "blogspot.mk", + "blogspot.com.mt", + "blogspot.mx", + "blogspot.my", + "cloudfunctions.net", + "blogspot.com.ng", + "blogspot.nl", + "blogspot.no", + "blogspot.co.nz", + "blogspot.pe", + "blogspot.pt", + "blogspot.qa", + "blogspot.re", + "blogspot.ro", + "blogspot.rs", + "blogspot.ru", + "blogspot.se", + "blogspot.sg", + "blogspot.si", + "blogspot.sk", + "blogspot.sn", + "blogspot.td", + "blogspot.com.tr", + "blogspot.tw", + "blogspot.ug", + "blogspot.co.uk", + "blogspot.com.uy", + "blogspot.vn", + "blogspot.co.za", + "goupile.fr", + "pymnt.uk", + "cloudapps.digital", + "london.cloudapps.digital", + "gov.nl", + "grafana-dev.net", + "grayjayleagues.com", + "günstigbestellen.de", + "günstigliefern.de", + "fin.ci", + "free.hr", + "caa.li", + "ua.rs", + "conf.se", + "häkkinen.fi", + "hrsn.dev", + "hashbang.sh", + "hasura.app", + "hasura-app.io", + "hatenablog.com", + "hatenadiary.com", + "hateblo.jp", + "hatenablog.jp", + "hatenadiary.jp", + "hatenadiary.org", + "pages.it.hs-heilbronn.de", + "pages-research.it.hs-heilbronn.de", + "heiyu.space", + "helioho.st", + "heliohost.us", + "hepforge.org", + "herokuapp.com", + "herokussl.com", + "heyflow.page", + "heyflow.site", + "ravendb.cloud", + "ravendb.community", + "development.run", + "ravendb.run", + "homesklep.pl", + "*.kin.one", + "*.id.pub", + "*.kin.pub", + "secaas.hk", + "hoplix.shop", + "orx.biz", + "biz.gl", + "biz.ng", + "co.biz.ng", + "dl.biz.ng", + "go.biz.ng", + "lg.biz.ng", + "on.biz.ng", + "col.ng", + "firm.ng", + "gen.ng", + "ltd.ng", + "ngo.ng", + "plc.ng", + "ie.ua", + "hostyhosting.io", + "hf.space", + "static.hf.space", + "hypernode.io", + "iobb.net", + "co.cz", + "*.moonscale.io", + "moonscale.net", + "gr.com", + "iki.fi", + "ibxos.it", + "iliadboxos.it", + "smushcdn.com", + "wphostedmail.com", + "wpmucdn.com", + "tempurl.host", + "wpmudev.host", + "dyn-berlin.de", + "in-berlin.de", + "in-brb.de", + "in-butter.de", + "in-dsl.de", + "in-vpn.de", + "in-dsl.net", + "in-vpn.net", + "in-dsl.org", + "in-vpn.org", + "biz.at", + "info.at", + "info.cx", + "ac.leg.br", + "al.leg.br", + "am.leg.br", + "ap.leg.br", + "ba.leg.br", + "ce.leg.br", + "df.leg.br", + "es.leg.br", + "go.leg.br", + "ma.leg.br", + "mg.leg.br", + "ms.leg.br", + "mt.leg.br", + "pa.leg.br", + "pb.leg.br", + "pe.leg.br", + "pi.leg.br", + "pr.leg.br", + "rj.leg.br", + "rn.leg.br", + "ro.leg.br", + "rr.leg.br", + "rs.leg.br", + "sc.leg.br", + "se.leg.br", + "sp.leg.br", + "to.leg.br", + "pixolino.com", + "na4u.ru", + "apps-1and1.com", + "live-website.com", + "apps-1and1.net", + "websitebuilder.online", + "app-ionos.space", + "iopsys.se", + "*.dweb.link", + "ipifony.net", + "ir.md", + "is-a-good.dev", + "is-a.dev", + "iservschule.de", + "mein-iserv.de", + "schulplattform.de", + "schulserver.de", + "test-iserv.de", + "iserv.dev", + "mel.cloudlets.com.au", + "cloud.interhostsolutions.be", + "alp1.ae.flow.ch", + "appengine.flow.ch", + "es-1.axarnet.cloud", + "diadem.cloud", + "vip.jelastic.cloud", + "jele.cloud", + "it1.eur.aruba.jenv-aruba.cloud", + "it1.jenv-aruba.cloud", + "keliweb.cloud", + "cs.keliweb.cloud", + "oxa.cloud", + "tn.oxa.cloud", + "uk.oxa.cloud", + "primetel.cloud", + "uk.primetel.cloud", + "ca.reclaim.cloud", + "uk.reclaim.cloud", + "us.reclaim.cloud", + "ch.trendhosting.cloud", + "de.trendhosting.cloud", + "jele.club", + "dopaas.com", + "paas.hosted-by-previder.com", + "rag-cloud.hosteur.com", + "rag-cloud-ch.hosteur.com", + "jcloud.ik-server.com", + "jcloud-ver-jpc.ik-server.com", + "demo.jelastic.com", + "paas.massivegrid.com", + "jed.wafaicloud.com", + "ryd.wafaicloud.com", + "j.scaleforce.com.cy", + "jelastic.dogado.eu", + "fi.cloudplatform.fi", + "demo.datacenter.fi", + "paas.datacenter.fi", + "jele.host", + "mircloud.host", + "paas.beebyte.io", + "sekd1.beebyteapp.io", + "jele.io", + "jc.neen.it", + "jcloud.kz", + "cloudjiffy.net", + "fra1-de.cloudjiffy.net", + "west1-us.cloudjiffy.net", + "jls-sto1.elastx.net", + "jls-sto2.elastx.net", + "jls-sto3.elastx.net", + "fr-1.paas.massivegrid.net", + "lon-1.paas.massivegrid.net", + "lon-2.paas.massivegrid.net", + "ny-1.paas.massivegrid.net", + "ny-2.paas.massivegrid.net", + "sg-1.paas.massivegrid.net", + "jelastic.saveincloud.net", + "nordeste-idc.saveincloud.net", + "j.scaleforce.net", + "sdscloud.pl", + "unicloud.pl", + "mircloud.ru", + "enscaled.sg", + "jele.site", + "jelastic.team", + "orangecloud.tn", + "j.layershift.co.uk", + "phx.enscaled.us", + "mircloud.us", + "myjino.ru", + "*.hosting.myjino.ru", + "*.landing.myjino.ru", + "*.spectrum.myjino.ru", + "*.vps.myjino.ru", + "jotelulu.cloud", + "webadorsite.com", + "jouwweb.site", + "*.cns.joyent.com", + "*.triton.zone", + "js.org", + "kaas.gg", + "khplay.nl", + "kapsi.fi", + "ezproxy.kuleuven.be", + "kuleuven.cloud", + "keymachine.de", + "kinghost.net", + "uni5.net", + "knightpoint.systems", + "koobin.events", + "webthings.io", + "krellian.net", + "oya.to", + "git-repos.de", + "lcube-server.de", + "svn-repos.de", + "leadpages.co", + "lpages.co", + "lpusercontent.com", + "lelux.site", + "libp2p.direct", + "runcontainers.dev", + "co.business", + "co.education", + "co.events", + "co.financial", + "co.network", + "co.place", + "co.technology", + "linkyard-cloud.ch", + "linkyard.cloud", + "members.linode.com", + "*.nodebalancer.linode.com", + "*.linodeobjects.com", + "ip.linodeusercontent.com", + "we.bs", + "filegear-sg.me", + "ggff.net", + "*.user.localcert.dev", + "lodz.pl", + "pabianice.pl", + "plock.pl", + "sieradz.pl", + "skierniewice.pl", + "zgierz.pl", + "loginline.app", + "loginline.dev", + "loginline.io", + "loginline.services", + "loginline.site", + "lohmus.me", + "servers.run", + "krasnik.pl", + "leczna.pl", + "lubartow.pl", + "lublin.pl", + "poniatowa.pl", + "swidnik.pl", + "glug.org.uk", + "lug.org.uk", + "lugs.org.uk", + "barsy.bg", + "barsy.club", + "barsycenter.com", + "barsyonline.com", + "barsy.de", + "barsy.dev", + "barsy.eu", + "barsy.gr", + "barsy.in", + "barsy.info", + "barsy.io", + "barsy.me", + "barsy.menu", + "barsyonline.menu", + "barsy.mobi", + "barsy.net", + "barsy.online", + "barsy.org", + "barsy.pro", + "barsy.pub", + "barsy.ro", + "barsy.rs", + "barsy.shop", + "barsyonline.shop", + "barsy.site", + "barsy.store", + "barsy.support", + "barsy.uk", + "barsy.co.uk", + "barsyonline.co.uk", + "*.magentosite.cloud", + "hb.cldmail.ru", + "matlab.cloud", + "modelscape.com", + "mwcloudnonprod.com", + "polyspace.com", + "mayfirst.info", + "mayfirst.org", + "mazeplay.com", + "mcdir.me", + "mcdir.ru", + "vps.mcdir.ru", + "mcpre.ru", + "mediatech.by", + "mediatech.dev", + "hra.health", + "medusajs.app", + "miniserver.com", + "memset.net", + "messerli.app", + "atmeta.com", + "apps.fbsbx.com", + "*.cloud.metacentrum.cz", + "custom.metacentrum.cz", + "flt.cloud.muni.cz", + "usr.cloud.muni.cz", + "meteorapp.com", + "eu.meteorapp.com", + "co.pl", + "*.azurecontainer.io", + "azure-api.net", + "azure-mobile.net", + "azureedge.net", + "azurefd.net", + "azurestaticapps.net", + "1.azurestaticapps.net", + "2.azurestaticapps.net", + "3.azurestaticapps.net", + "4.azurestaticapps.net", + "5.azurestaticapps.net", + "6.azurestaticapps.net", + "7.azurestaticapps.net", + "centralus.azurestaticapps.net", + "eastasia.azurestaticapps.net", + "eastus2.azurestaticapps.net", + "westeurope.azurestaticapps.net", + "westus2.azurestaticapps.net", + "azurewebsites.net", + "cloudapp.net", + "trafficmanager.net", + "blob.core.windows.net", + "servicebus.windows.net", + "routingthecloud.com", + "sn.mynetname.net", + "routingthecloud.net", + "routingthecloud.org", + "csx.cc", + "mydbserver.com", + "webspaceconfig.de", + "mittwald.info", + "mittwaldserver.info", + "typo3server.info", + "project.space", + "modx.dev", + "bmoattachments.org", + "net.ru", + "org.ru", + "pp.ru", + "hostedpi.com", + "caracal.mythic-beasts.com", + "customer.mythic-beasts.com", + "fentiger.mythic-beasts.com", + "lynx.mythic-beasts.com", + "ocelot.mythic-beasts.com", + "oncilla.mythic-beasts.com", + "onza.mythic-beasts.com", + "sphinx.mythic-beasts.com", + "vs.mythic-beasts.com", + "x.mythic-beasts.com", + "yali.mythic-beasts.com", + "cust.retrosnub.co.uk", + "ui.nabu.casa", + "cloud.nospamproxy.com", + "netfy.app", + "netlify.app", + "4u.com", + "nfshost.com", + "ipfs.nftstorage.link", + "ngo.us", + "ngrok.app", + "ngrok-free.app", + "ngrok.dev", + "ngrok-free.dev", + "ngrok.io", + "ap.ngrok.io", + "au.ngrok.io", + "eu.ngrok.io", + "in.ngrok.io", + "jp.ngrok.io", + "sa.ngrok.io", + "us.ngrok.io", + "ngrok.pizza", + "ngrok.pro", + "torun.pl", + "nh-serv.co.uk", + "nimsite.uk", + "mmafan.biz", + "myftp.biz", + "no-ip.biz", + "no-ip.ca", + "fantasyleague.cc", + "gotdns.ch", + "3utilities.com", + "blogsyte.com", + "ciscofreak.com", + "damnserver.com", + "ddnsking.com", + "ditchyourip.com", + "dnsiskinky.com", + "dynns.com", + "geekgalaxy.com", + "health-carereform.com", + "homesecuritymac.com", + "homesecuritypc.com", + "myactivedirectory.com", + "mysecuritycamera.com", + "myvnc.com", + "net-freaks.com", + "onthewifi.com", + "point2this.com", + "quicksytes.com", + "securitytactics.com", + "servebeer.com", + "servecounterstrike.com", + "serveexchange.com", + "serveftp.com", + "servegame.com", + "servehalflife.com", + "servehttp.com", + "servehumour.com", + "serveirc.com", + "servemp3.com", + "servep2p.com", + "servepics.com", + "servequake.com", + "servesarcasm.com", + "stufftoread.com", + "unusualperson.com", + "workisboring.com", + "dvrcam.info", + "ilovecollege.info", + "no-ip.info", + "brasilia.me", + "ddns.me", + "dnsfor.me", + "hopto.me", + "loginto.me", + "noip.me", + "webhop.me", + "bounceme.net", + "ddns.net", + "eating-organic.net", + "mydissent.net", + "myeffect.net", + "mymediapc.net", + "mypsx.net", + "mysecuritycamera.net", + "nhlfan.net", + "no-ip.net", + "pgafan.net", + "privatizehealthinsurance.net", + "redirectme.net", + "serveblog.net", + "serveminecraft.net", + "sytes.net", + "cable-modem.org", + "collegefan.org", + "couchpotatofries.org", + "hopto.org", + "mlbfan.org", + "myftp.org", + "mysecuritycamera.org", + "nflfan.org", + "no-ip.org", + "read-books.org", + "ufcfan.org", + "zapto.org", + "no-ip.co.uk", + "golffan.us", + "noip.us", + "pointto.us", + "stage.nodeart.io", + "*.developer.app", + "noop.app", + "*.northflank.app", + "*.build.run", + "*.code.run", + "*.database.run", + "*.migration.run", + "noticeable.news", + "notion.site", + "dnsking.ch", + "mypi.co", + "n4t.co", + "001www.com", + "myiphost.com", + "forumz.info", + "soundcast.me", + "tcp4.me", + "dnsup.net", + "hicam.net", + "now-dns.net", + "ownip.net", + "vpndns.net", + "dynserv.org", + "now-dns.org", + "x443.pw", + "now-dns.top", + "ntdll.top", + "freeddns.us", + "nsupdate.info", + "nerdpol.ovh", + "nyc.mn", + "prvcy.page", + "obl.ong", + "observablehq.cloud", + "static.observableusercontent.com", + "omg.lol", + "cloudycluster.net", + "omniwe.site", + "123webseite.at", + "123website.be", + "simplesite.com.br", + "123website.ch", + "simplesite.com", + "123webseite.de", + "123hjemmeside.dk", + "123miweb.es", + "123kotisivu.fi", + "123siteweb.fr", + "simplesite.gr", + "123homepage.it", + "123website.lu", + "123website.nl", + "123hjemmeside.no", + "service.one", + "simplesite.pl", + "123paginaweb.pt", + "123minsida.se", + "is-a-fullstack.dev", + "is-cool.dev", + "is-not-a.dev", + "localplayer.dev", + "is-local.org", + "opensocial.site", + "opencraft.hosting", + "16-b.it", + "32-b.it", + "64-b.it", + "orsites.com", + "operaunite.com", + "*.customer-oci.com", + "*.oci.customer-oci.com", + "*.ocp.customer-oci.com", + "*.ocs.customer-oci.com", + "*.oraclecloudapps.com", + "*.oraclegovcloudapps.com", + "*.oraclegovcloudapps.uk", + "tech.orange", + "can.re", + "authgear-staging.com", + "authgearapps.com", + "skygearapp.com", + "outsystemscloud.com", + "*.hosting.ovh.net", + "*.webpaas.ovh.net", + "ownprovider.com", + "own.pm", + "*.owo.codes", + "ox.rs", + "oy.lc", + "pgfog.com", + "pagexl.com", + "gotpantheon.com", + "pantheonsite.io", + "*.paywhirl.com", + "*.xmit.co", + "xmit.dev", + "madethis.site", + "srv.us", + "gh.srv.us", + "gl.srv.us", + "lk3.ru", + "mypep.link", + "perspecta.cloud", + "on-web.fr", + "*.upsun.app", + "upsunapp.com", + "ent.platform.sh", + "eu.platform.sh", + "us.platform.sh", + "*.platformsh.site", + "*.tst.site", + "platter-app.com", + "platter-app.dev", + "platterp.us", + "pley.games", + "onporter.run", + "co.bn", + "postman-echo.com", + "pstmn.io", + "mock.pstmn.io", + "httpbin.org", + "prequalifyme.today", + "xen.prgmr.com", + "priv.at", + "protonet.io", + "chirurgiens-dentistes-en-france.fr", + "byen.site", + "pubtls.org", + "pythonanywhere.com", + "eu.pythonanywhere.com", + "qa2.com", + "qcx.io", + "*.sys.qcx.io", + "myqnapcloud.cn", + "alpha-myqnapcloud.com", + "dev-myqnapcloud.com", + "mycloudnas.com", + "mynascloud.com", + "myqnapcloud.com", + "qoto.io", + "qualifioapp.com", + "ladesk.com", + "qbuser.com", + "*.quipelements.com", + "vapor.cloud", + "vaporcloud.io", + "rackmaze.com", + "rackmaze.net", + "cloudsite.builders", + "myradweb.net", + "servername.us", + "web.in", + "in.net", + "myrdbx.io", + "site.rb-hosting.io", + "*.on-rancher.cloud", + "*.on-k3s.io", + "*.on-rio.io", + "ravpage.co.il", + "readthedocs-hosted.com", + "readthedocs.io", + "rhcloud.com", + "instances.spawn.cc", + "onrender.com", + "app.render.com", + "replit.app", + "id.replit.app", + "firewalledreplit.co", + "id.firewalledreplit.co", + "repl.co", + "id.repl.co", + "replit.dev", + "archer.replit.dev", + "bones.replit.dev", + "canary.replit.dev", + "global.replit.dev", + "hacker.replit.dev", + "id.replit.dev", + "janeway.replit.dev", + "kim.replit.dev", + "kira.replit.dev", + "kirk.replit.dev", + "odo.replit.dev", + "paris.replit.dev", + "picard.replit.dev", + "pike.replit.dev", + "prerelease.replit.dev", + "reed.replit.dev", + "riker.replit.dev", + "sisko.replit.dev", + "spock.replit.dev", + "staging.replit.dev", + "sulu.replit.dev", + "tarpit.replit.dev", + "teams.replit.dev", + "tucker.replit.dev", + "wesley.replit.dev", + "worf.replit.dev", + "repl.run", + "resindevice.io", + "devices.resinstaging.io", + "hzc.io", + "adimo.co.uk", + "itcouldbewor.se", + "aus.basketball", + "nz.basketball", + "git-pages.rit.edu", + "rocky.page", + "rub.de", + "ruhr-uni-bochum.de", + "io.noc.ruhr-uni-bochum.de", + "биз.рус", + "ком.рус", + "крым.рус", + "мир.рус", + "мск.рус", + "орг.рус", + "самара.рус", + "сочи.рус", + "спб.рус", + "я.рус", + "ras.ru", + "nyat.app", + "180r.com", + "dojin.com", + "sakuratan.com", + "sakuraweb.com", + "x0.com", + "2-d.jp", + "bona.jp", + "crap.jp", + "daynight.jp", + "eek.jp", + "flop.jp", + "halfmoon.jp", + "jeez.jp", + "matrix.jp", + "mimoza.jp", + "ivory.ne.jp", + "mail-box.ne.jp", + "mints.ne.jp", + "mokuren.ne.jp", + "opal.ne.jp", + "sakura.ne.jp", + "sumomo.ne.jp", + "topaz.ne.jp", + "netgamers.jp", + "nyanta.jp", + "o0o0.jp", + "rdy.jp", + "rgr.jp", + "rulez.jp", + "s3.isk01.sakurastorage.jp", + "s3.isk02.sakurastorage.jp", + "saloon.jp", + "sblo.jp", + "skr.jp", + "tank.jp", + "uh-oh.jp", + "undo.jp", + "rs.webaccel.jp", + "user.webaccel.jp", + "websozai.jp", + "xii.jp", + "squares.net", + "jpn.org", + "kirara.st", + "x0.to", + "from.tv", + "sakura.tv", + "*.builder.code.com", + "*.dev-builder.code.com", + "*.stg-builder.code.com", + "*.001.test.code-builder-stg.platform.salesforce.com", + "*.d.crm.dev", + "*.w.crm.dev", + "*.wa.crm.dev", + "*.wb.crm.dev", + "*.wc.crm.dev", + "*.wd.crm.dev", + "*.we.crm.dev", + "*.wf.crm.dev", + "sandcats.io", + "logoip.com", + "logoip.de", + "fr-par-1.baremetal.scw.cloud", + "fr-par-2.baremetal.scw.cloud", + "nl-ams-1.baremetal.scw.cloud", + "cockpit.fr-par.scw.cloud", + "fnc.fr-par.scw.cloud", + "functions.fnc.fr-par.scw.cloud", + "k8s.fr-par.scw.cloud", + "nodes.k8s.fr-par.scw.cloud", + "s3.fr-par.scw.cloud", + "s3-website.fr-par.scw.cloud", + "whm.fr-par.scw.cloud", + "priv.instances.scw.cloud", + "pub.instances.scw.cloud", + "k8s.scw.cloud", + "cockpit.nl-ams.scw.cloud", + "k8s.nl-ams.scw.cloud", + "nodes.k8s.nl-ams.scw.cloud", + "s3.nl-ams.scw.cloud", + "s3-website.nl-ams.scw.cloud", + "whm.nl-ams.scw.cloud", + "cockpit.pl-waw.scw.cloud", + "k8s.pl-waw.scw.cloud", + "nodes.k8s.pl-waw.scw.cloud", + "s3.pl-waw.scw.cloud", + "s3-website.pl-waw.scw.cloud", + "scalebook.scw.cloud", + "smartlabeling.scw.cloud", + "dedibox.fr", + "schokokeks.net", + "gov.scot", + "service.gov.scot", + "scrysec.com", + "client.scrypted.io", + "firewall-gateway.com", + "firewall-gateway.de", + "my-gateway.de", + "my-router.de", + "spdns.de", + "spdns.eu", + "firewall-gateway.net", + "my-firewall.org", + "myfirewall.org", + "spdns.org", + "seidat.net", + "sellfy.store", + "minisite.ms", + "senseering.net", + "servebolt.cloud", + "biz.ua", + "co.ua", + "pp.ua", + "as.sh.cn", + "sheezy.games", + "shiftedit.io", + "myshopblocks.com", + "myshopify.com", + "shopitsite.com", + "shopware.shop", + "shopware.store", + "mo-siemens.io", + "1kapp.com", + "appchizi.com", + "applinzi.com", + "sinaapp.com", + "vipsinaapp.com", + "siteleaf.net", + "small-web.org", + "aeroport.fr", + "avocat.fr", + "chambagri.fr", + "chirurgiens-dentistes.fr", + "experts-comptables.fr", + "medecin.fr", + "notaires.fr", + "pharmacien.fr", + "port.fr", + "veterinaire.fr", + "vp4.me", + "*.snowflake.app", + "*.privatelink.snowflake.app", + "streamlit.app", + "streamlitapp.com", + "try-snowplow.com", + "mafelo.net", + "playstation-cloud.com", + "srht.site", + "apps.lair.io", + "*.stolos.io", + "spacekit.io", + "ind.mom", + "customer.speedpartner.de", + "myspreadshop.at", + "myspreadshop.com.au", + "myspreadshop.be", + "myspreadshop.ca", + "myspreadshop.ch", + "myspreadshop.com", + "myspreadshop.de", + "myspreadshop.dk", + "myspreadshop.es", + "myspreadshop.fi", + "myspreadshop.fr", + "myspreadshop.ie", + "myspreadshop.it", + "myspreadshop.net", + "myspreadshop.nl", + "myspreadshop.no", + "myspreadshop.pl", + "myspreadshop.se", + "myspreadshop.co.uk", + "w-corp-staticblitz.com", + "w-credentialless-staticblitz.com", + "w-staticblitz.com", + "stackhero-network.com", + "runs.onstackit.cloud", + "stackit.gg", + "stackit.rocks", + "stackit.run", + "stackit.zone", + "musician.io", + "novecore.site", + "api.stdlib.com", + "feedback.ac", + "forms.ac", + "assessments.cx", + "calculators.cx", + "funnels.cx", + "paynow.cx", + "quizzes.cx", + "researched.cx", + "tests.cx", + "surveys.so", + "storebase.store", + "storipress.app", + "storj.farm", + "strapiapp.com", + "media.strapiapp.com", + "vps-host.net", + "atl.jelastic.vps-host.net", + "njs.jelastic.vps-host.net", + "ric.jelastic.vps-host.net", + "streak-link.com", + "streaklinks.com", + "streakusercontent.com", + "soc.srcf.net", + "user.srcf.net", + "utwente.io", + "temp-dns.com", + "supabase.co", + "supabase.in", + "supabase.net", + "syncloud.it", + "dscloud.biz", + "direct.quickconnect.cn", + "dsmynas.com", + "familyds.com", + "diskstation.me", + "dscloud.me", + "i234.me", + "myds.me", + "synology.me", + "dscloud.mobi", + "dsmynas.net", + "familyds.net", + "dsmynas.org", + "familyds.org", + "direct.quickconnect.to", + "vpnplus.to", + "mytabit.com", + "mytabit.co.il", + "tabitorder.co.il", + "taifun-dns.de", + "ts.net", + "*.c.ts.net", + "gda.pl", + "gdansk.pl", + "gdynia.pl", + "med.pl", + "sopot.pl", + "taveusercontent.com", + "p.tawk.email", + "p.tawkto.email", + "site.tb-hosting.com", + "edugit.io", + "s3.teckids.org", + "telebit.app", + "telebit.io", + "*.telebit.xyz", + "*.firenet.ch", + "*.svc.firenet.ch", + "reservd.com", + "thingdustdata.com", + "cust.dev.thingdust.io", + "reservd.dev.thingdust.io", + "cust.disrec.thingdust.io", + "reservd.disrec.thingdust.io", + "cust.prod.thingdust.io", + "cust.testing.thingdust.io", + "reservd.testing.thingdust.io", + "tickets.io", + "arvo.network", + "azimuth.network", + "tlon.network", + "torproject.net", + "pages.torproject.net", + "townnews-staging.com", + "12hp.at", + "2ix.at", + "4lima.at", + "lima-city.at", + "12hp.ch", + "2ix.ch", + "4lima.ch", + "lima-city.ch", + "trafficplex.cloud", + "de.cool", + "12hp.de", + "2ix.de", + "4lima.de", + "lima-city.de", + "1337.pictures", + "clan.rip", + "lima-city.rocks", + "webspace.rocks", + "lima.zone", + "*.transurl.be", + "*.transurl.eu", + "site.transip.me", + "*.transurl.nl", + "tuxfamily.org", + "dd-dns.de", + "dray-dns.de", + "draydns.de", + "dyn-vpn.de", + "dynvpn.de", + "mein-vigor.de", + "my-vigor.de", + "my-wan.de", + "syno-ds.de", + "synology-diskstation.de", + "synology-ds.de", + "diskstation.eu", + "diskstation.org", + "typedream.app", + "pro.typeform.com", + "*.uberspace.de", + "uber.space", + "hk.com", + "inc.hk", + "ltd.hk", + "hk.org", + "it.com", + "unison-services.cloud", + "virtual-user.de", + "virtualuser.de", + "name.pm", + "sch.tf", + "biz.wf", + "sch.wf", + "org.yt", + "rs.ba", + "bielsko.pl", + "upli.io", + "urown.cloud", + "dnsupdate.info", + "us.org", + "v.ua", + "express.val.run", + "web.val.run", + "vercel.app", + "v0.build", + "vercel.dev", + "vusercontent.net", + "now.sh", + "2038.io", + "router.management", + "v-info.info", + "voorloper.cloud", + "*.vultrobjects.com", + "wafflecell.com", + "webflow.io", + "webflowtest.io", + "*.webhare.dev", + "bookonline.app", + "hotelwithflight.com", + "reserve-online.com", + "reserve-online.net", + "cprapid.com", + "pleskns.com", + "wp2.host", + "pdns.page", + "plesk.page", + "wpsquared.site", + "*.wadl.top", + "remotewd.com", + "box.ca", + "pages.wiardweb.com", + "toolforge.org", + "wmcloud.org", + "wmflabs.org", + "wdh.app", + "panel.gg", + "daemon.panel.gg", + "wixsite.com", + "wixstudio.com", + "editorx.io", + "wixstudio.io", + "wix.run", + "messwithdns.com", + "woltlab-demo.com", + "myforum.community", + "community-pro.de", + "diskussionsbereich.de", + "community-pro.net", + "meinforum.net", + "affinitylottery.org.uk", + "raffleentry.org.uk", + "weeklylottery.org.uk", + "wpenginepowered.com", + "js.wpenginepowered.com", + "half.host", + "xnbay.com", + "u2.xnbay.com", + "u2-local.xnbay.com", + "cistron.nl", + "demon.nl", + "xs4all.space", + "yandexcloud.net", + "storage.yandexcloud.net", + "website.yandexcloud.net", + "official.academy", + "yolasite.com", + "yombo.me", + "ynh.fr", + "nohost.me", + "noho.st", + "za.net", + "za.org", + "zap.cloud", + "zeabur.app", + "bss.design", + "basicserver.io", + "virtualserver.io", + "enterprisecloud.nu" +]; \ No newline at end of file diff --git a/test-eol-project/node_modules/psl/dist/psl.cjs b/test-eol-project/node_modules/psl/dist/psl.cjs new file mode 100644 index 00000000..a84438ad --- /dev/null +++ b/test-eol-project/node_modules/psl/dist/psl.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function K(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,F;function Q(){if(F)return O;F=1;const e=2147483647,s=36,c=1,o=26,t=38,d=700,z=72,y=128,g="-",P=/^xn--/,V=/[^\0-\x7F]/,G=/[\x2E\u3002\uFF0E\uFF61]/g,W={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=s-c,h=Math.floor,I=String.fromCharCode;function v(a){throw new RangeError(W[a])}function U(a,i){const m=[];let n=a.length;for(;n--;)m[n]=i(a[n]);return m}function S(a,i){const m=a.split("@");let n="";m.length>1&&(n=m[0]+"@",a=m[1]),a=a.replace(G,".");const r=a.split("."),p=U(r,i).join(".");return n+p}function L(a){const i=[];let m=0;const n=a.length;for(;m=55296&&r<=56319&&mString.fromCodePoint(...a),J=function(a){return a>=48&&a<58?26+(a-48):a>=65&&a<91?a-65:a>=97&&a<123?a-97:s},D=function(a,i){return a+22+75*(a<26)-((i!=0)<<5)},T=function(a,i,m){let n=0;for(a=m?h(a/d):a>>1,a+=h(a/i);a>C*o>>1;n+=s)a=h(a/C);return h(n+(C+1)*a/(a+t))},E=function(a){const i=[],m=a.length;let n=0,r=y,p=z,j=a.lastIndexOf(g);j<0&&(j=0);for(let u=0;u=128&&v("not-basic"),i.push(a.charCodeAt(u));for(let u=j>0?j+1:0;u=m&&v("invalid-input");const w=J(a.charCodeAt(u++));w>=s&&v("invalid-input"),w>h((e-n)/l)&&v("overflow"),n+=w*l;const x=b<=p?c:b>=p+o?o:b-p;if(wh(e/q)&&v("overflow"),l*=q}const f=i.length+1;p=T(n-k,f,k==0),h(n/f)>e-r&&v("overflow"),r+=h(n/f),n%=f,i.splice(n++,0,r)}return String.fromCodePoint(...i)},B=function(a){const i=[];a=L(a);const m=a.length;let n=y,r=0,p=z;for(const k of a)k<128&&i.push(I(k));const j=i.length;let u=j;for(j&&i.push(g);u=n&&lh((e-r)/f)&&v("overflow"),r+=(k-n)*f,n=k;for(const l of a)if(le&&v("overflow"),l===n){let b=r;for(let w=s;;w+=s){const x=w<=p?c:w>=p+o?o:w-p;if(b{const c=s.replace(/^(\*\.|\!)/,""),o=A.toASCII(c),t=s.charAt(0);if(e.has(o))throw new Error(`Multiple rules found for ${s} (${o})`);return e.set(o,{rule:s,suffix:c,punySuffix:o,wildcard:t==="*",exception:t==="!"}),e},new Map),aa=e=>{const c=A.toASCII(e).split(".");for(let o=0;o{const s=A.toASCII(e);if(s.length<1)return"DOMAIN_TOO_SHORT";if(s.length>255)return"DOMAIN_TOO_LONG";const c=s.split(".");let o;for(let t=0;t63)return"LABEL_TOO_LONG";if(o.charAt(0)==="-")return"LABEL_STARTS_WITH_DASH";if(o.charAt(o.length-1)==="-")return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-_]+$/.test(o))return"LABEL_INVALID_CHARS"}},_=e=>{if(typeof e!="string")throw new TypeError("Domain name must be a string.");let s=e.slice(0).toLowerCase();s.charAt(s.length-1)==="."&&(s=s.slice(0,s.length-1));const c=oa(s);if(c)return{input:e,error:{message:H[c],code:c}};const o={input:e,tld:null,sld:null,domain:null,subdomain:null,listed:!1},t=s.split(".");if(t[t.length-1]==="local")return o;const d=()=>(/xn--/.test(s)&&(o.domain&&(o.domain=A.toASCII(o.domain)),o.subdomain&&(o.subdomain=A.toASCII(o.subdomain))),o),z=aa(s);if(!z)return t.length<2?o:(o.tld=t.pop(),o.sld=t.pop(),o.domain=[o.sld,o.tld].join("."),t.length&&(o.subdomain=t.pop()),d());o.listed=!0;const y=z.suffix.split("."),g=t.slice(0,t.length-y.length);return z.exception&&g.push(y.shift()),o.tld=y.join("."),!g.length||(z.wildcard&&(y.unshift(g.pop()),o.tld=y.join(".")),!g.length)||(o.sld=g.pop(),o.domain=[o.sld,o.tld].join("."),g.length&&(o.subdomain=g.join("."))),d()},N=e=>e&&_(e).domain||null,R=e=>{const s=_(e);return!!(s.domain&&s.listed)},sa={parse:_,get:N,isValid:R};exports.default=sa;exports.errorCodes=H;exports.get=N;exports.isValid=R;exports.parse=_; diff --git a/test-eol-project/node_modules/psl/dist/psl.mjs b/test-eol-project/node_modules/psl/dist/psl.mjs new file mode 100644 index 00000000..07758bb0 --- /dev/null +++ b/test-eol-project/node_modules/psl/dist/psl.mjs @@ -0,0 +1,10008 @@ +function U(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +var C, F; +function $() { + if (F) return C; + F = 1; + const e = 2147483647, s = 36, c = 1, o = 26, t = 38, d = 700, z = 72, y = 128, g = "-", H = /^xn--/, N = /[^\0-\x7F]/, R = /[\x2E\u3002\uFF0E\uFF61]/g, P = { + overflow: "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }, _ = s - c, h = Math.floor, I = String.fromCharCode; + function v(a) { + throw new RangeError(P[a]); + } + function V(a, i) { + const m = []; + let n = a.length; + for (; n--; ) + m[n] = i(a[n]); + return m; + } + function L(a, i) { + const m = a.split("@"); + let n = ""; + m.length > 1 && (n = m[0] + "@", a = m[1]), a = a.replace(R, "."); + const r = a.split("."), p = V(r, i).join("."); + return n + p; + } + function S(a) { + const i = []; + let m = 0; + const n = a.length; + for (; m < n; ) { + const r = a.charCodeAt(m++); + if (r >= 55296 && r <= 56319 && m < n) { + const p = a.charCodeAt(m++); + (p & 64512) == 56320 ? i.push(((r & 1023) << 10) + (p & 1023) + 65536) : (i.push(r), m--); + } else + i.push(r); + } + return i; + } + const G = (a) => String.fromCodePoint(...a), W = function(a) { + return a >= 48 && a < 58 ? 26 + (a - 48) : a >= 65 && a < 91 ? a - 65 : a >= 97 && a < 123 ? a - 97 : s; + }, D = function(a, i) { + return a + 22 + 75 * (a < 26) - ((i != 0) << 5); + }, T = function(a, i, m) { + let n = 0; + for (a = m ? h(a / d) : a >> 1, a += h(a / i); a > _ * o >> 1; n += s) + a = h(a / _); + return h(n + (_ + 1) * a / (a + t)); + }, E = function(a) { + const i = [], m = a.length; + let n = 0, r = y, p = z, j = a.lastIndexOf(g); + j < 0 && (j = 0); + for (let u = 0; u < j; ++u) + a.charCodeAt(u) >= 128 && v("not-basic"), i.push(a.charCodeAt(u)); + for (let u = j > 0 ? j + 1 : 0; u < m; ) { + const k = n; + for (let l = 1, b = s; ; b += s) { + u >= m && v("invalid-input"); + const w = W(a.charCodeAt(u++)); + w >= s && v("invalid-input"), w > h((e - n) / l) && v("overflow"), n += w * l; + const x = b <= p ? c : b >= p + o ? o : b - p; + if (w < x) + break; + const q = s - x; + l > h(e / q) && v("overflow"), l *= q; + } + const f = i.length + 1; + p = T(n - k, f, k == 0), h(n / f) > e - r && v("overflow"), r += h(n / f), n %= f, i.splice(n++, 0, r); + } + return String.fromCodePoint(...i); + }, B = function(a) { + const i = []; + a = S(a); + const m = a.length; + let n = y, r = 0, p = z; + for (const k of a) + k < 128 && i.push(I(k)); + const j = i.length; + let u = j; + for (j && i.push(g); u < m; ) { + let k = e; + for (const l of a) + l >= n && l < k && (k = l); + const f = u + 1; + k - n > h((e - r) / f) && v("overflow"), r += (k - n) * f, n = k; + for (const l of a) + if (l < n && ++r > e && v("overflow"), l === n) { + let b = r; + for (let w = s; ; w += s) { + const x = w <= p ? c : w >= p + o ? o : w - p; + if (b < x) + break; + const q = b - x, M = s - x; + i.push( + I(D(x + q % M, 0)) + ), b = h(q / M); + } + i.push(I(D(b, 0))), p = T(r, f, u === j), r = 0, ++u; + } + ++r, ++n; + } + return i.join(""); + }; + return C = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + version: "2.3.1", + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + ucs2: { + decode: S, + encode: G + }, + decode: E, + encode: B, + toASCII: function(a) { + return L(a, function(i) { + return N.test(i) ? "xn--" + B(i) : i; + }); + }, + toUnicode: function(a) { + return L(a, function(i) { + return H.test(i) ? E(i.slice(4).toLowerCase()) : i; + }); + } + }, C; +} +var J = $(); +const A = /* @__PURE__ */ U(J), K = [ + "ac", + "com.ac", + "edu.ac", + "gov.ac", + "mil.ac", + "net.ac", + "org.ac", + "ad", + "ae", + "ac.ae", + "co.ae", + "gov.ae", + "mil.ae", + "net.ae", + "org.ae", + "sch.ae", + "aero", + "airline.aero", + "airport.aero", + "accident-investigation.aero", + "accident-prevention.aero", + "aerobatic.aero", + "aeroclub.aero", + "aerodrome.aero", + "agents.aero", + "air-surveillance.aero", + "air-traffic-control.aero", + "aircraft.aero", + "airtraffic.aero", + "ambulance.aero", + "association.aero", + "author.aero", + "ballooning.aero", + "broker.aero", + "caa.aero", + "cargo.aero", + "catering.aero", + "certification.aero", + "championship.aero", + "charter.aero", + "civilaviation.aero", + "club.aero", + "conference.aero", + "consultant.aero", + "consulting.aero", + "control.aero", + "council.aero", + "crew.aero", + "design.aero", + "dgca.aero", + "educator.aero", + "emergency.aero", + "engine.aero", + "engineer.aero", + "entertainment.aero", + "equipment.aero", + "exchange.aero", + "express.aero", + "federation.aero", + "flight.aero", + "freight.aero", + "fuel.aero", + "gliding.aero", + "government.aero", + "groundhandling.aero", + "group.aero", + "hanggliding.aero", + "homebuilt.aero", + "insurance.aero", + "journal.aero", + "journalist.aero", + "leasing.aero", + "logistics.aero", + "magazine.aero", + "maintenance.aero", + "marketplace.aero", + "media.aero", + "microlight.aero", + "modelling.aero", + "navigation.aero", + "parachuting.aero", + "paragliding.aero", + "passenger-association.aero", + "pilot.aero", + "press.aero", + "production.aero", + "recreation.aero", + "repbody.aero", + "res.aero", + "research.aero", + "rotorcraft.aero", + "safety.aero", + "scientist.aero", + "services.aero", + "show.aero", + "skydiving.aero", + "software.aero", + "student.aero", + "taxi.aero", + "trader.aero", + "trading.aero", + "trainer.aero", + "union.aero", + "workinggroup.aero", + "works.aero", + "af", + "com.af", + "edu.af", + "gov.af", + "net.af", + "org.af", + "ag", + "co.ag", + "com.ag", + "net.ag", + "nom.ag", + "org.ag", + "ai", + "com.ai", + "net.ai", + "off.ai", + "org.ai", + "al", + "com.al", + "edu.al", + "gov.al", + "mil.al", + "net.al", + "org.al", + "am", + "co.am", + "com.am", + "commune.am", + "net.am", + "org.am", + "ao", + "co.ao", + "ed.ao", + "edu.ao", + "gov.ao", + "gv.ao", + "it.ao", + "og.ao", + "org.ao", + "pb.ao", + "aq", + "ar", + "bet.ar", + "com.ar", + "coop.ar", + "edu.ar", + "gob.ar", + "gov.ar", + "int.ar", + "mil.ar", + "musica.ar", + "mutual.ar", + "net.ar", + "org.ar", + "senasa.ar", + "tur.ar", + "arpa", + "e164.arpa", + "home.arpa", + "in-addr.arpa", + "ip6.arpa", + "iris.arpa", + "uri.arpa", + "urn.arpa", + "as", + "gov.as", + "asia", + "at", + "ac.at", + "sth.ac.at", + "co.at", + "gv.at", + "or.at", + "au", + "asn.au", + "com.au", + "edu.au", + "gov.au", + "id.au", + "net.au", + "org.au", + "conf.au", + "oz.au", + "act.au", + "nsw.au", + "nt.au", + "qld.au", + "sa.au", + "tas.au", + "vic.au", + "wa.au", + "act.edu.au", + "catholic.edu.au", + "nsw.edu.au", + "nt.edu.au", + "qld.edu.au", + "sa.edu.au", + "tas.edu.au", + "vic.edu.au", + "wa.edu.au", + "qld.gov.au", + "sa.gov.au", + "tas.gov.au", + "vic.gov.au", + "wa.gov.au", + "schools.nsw.edu.au", + "aw", + "com.aw", + "ax", + "az", + "biz.az", + "com.az", + "edu.az", + "gov.az", + "info.az", + "int.az", + "mil.az", + "name.az", + "net.az", + "org.az", + "pp.az", + "pro.az", + "ba", + "com.ba", + "edu.ba", + "gov.ba", + "mil.ba", + "net.ba", + "org.ba", + "bb", + "biz.bb", + "co.bb", + "com.bb", + "edu.bb", + "gov.bb", + "info.bb", + "net.bb", + "org.bb", + "store.bb", + "tv.bb", + "*.bd", + "be", + "ac.be", + "bf", + "gov.bf", + "bg", + "0.bg", + "1.bg", + "2.bg", + "3.bg", + "4.bg", + "5.bg", + "6.bg", + "7.bg", + "8.bg", + "9.bg", + "a.bg", + "b.bg", + "c.bg", + "d.bg", + "e.bg", + "f.bg", + "g.bg", + "h.bg", + "i.bg", + "j.bg", + "k.bg", + "l.bg", + "m.bg", + "n.bg", + "o.bg", + "p.bg", + "q.bg", + "r.bg", + "s.bg", + "t.bg", + "u.bg", + "v.bg", + "w.bg", + "x.bg", + "y.bg", + "z.bg", + "bh", + "com.bh", + "edu.bh", + "gov.bh", + "net.bh", + "org.bh", + "bi", + "co.bi", + "com.bi", + "edu.bi", + "or.bi", + "org.bi", + "biz", + "bj", + "africa.bj", + "agro.bj", + "architectes.bj", + "assur.bj", + "avocats.bj", + "co.bj", + "com.bj", + "eco.bj", + "econo.bj", + "edu.bj", + "info.bj", + "loisirs.bj", + "money.bj", + "net.bj", + "org.bj", + "ote.bj", + "restaurant.bj", + "resto.bj", + "tourism.bj", + "univ.bj", + "bm", + "com.bm", + "edu.bm", + "gov.bm", + "net.bm", + "org.bm", + "bn", + "com.bn", + "edu.bn", + "gov.bn", + "net.bn", + "org.bn", + "bo", + "com.bo", + "edu.bo", + "gob.bo", + "int.bo", + "mil.bo", + "net.bo", + "org.bo", + "tv.bo", + "web.bo", + "academia.bo", + "agro.bo", + "arte.bo", + "blog.bo", + "bolivia.bo", + "ciencia.bo", + "cooperativa.bo", + "democracia.bo", + "deporte.bo", + "ecologia.bo", + "economia.bo", + "empresa.bo", + "indigena.bo", + "industria.bo", + "info.bo", + "medicina.bo", + "movimiento.bo", + "musica.bo", + "natural.bo", + "nombre.bo", + "noticias.bo", + "patria.bo", + "plurinacional.bo", + "politica.bo", + "profesional.bo", + "pueblo.bo", + "revista.bo", + "salud.bo", + "tecnologia.bo", + "tksat.bo", + "transporte.bo", + "wiki.bo", + "br", + "9guacu.br", + "abc.br", + "adm.br", + "adv.br", + "agr.br", + "aju.br", + "am.br", + "anani.br", + "aparecida.br", + "app.br", + "arq.br", + "art.br", + "ato.br", + "b.br", + "barueri.br", + "belem.br", + "bet.br", + "bhz.br", + "bib.br", + "bio.br", + "blog.br", + "bmd.br", + "boavista.br", + "bsb.br", + "campinagrande.br", + "campinas.br", + "caxias.br", + "cim.br", + "cng.br", + "cnt.br", + "com.br", + "contagem.br", + "coop.br", + "coz.br", + "cri.br", + "cuiaba.br", + "curitiba.br", + "def.br", + "des.br", + "det.br", + "dev.br", + "ecn.br", + "eco.br", + "edu.br", + "emp.br", + "enf.br", + "eng.br", + "esp.br", + "etc.br", + "eti.br", + "far.br", + "feira.br", + "flog.br", + "floripa.br", + "fm.br", + "fnd.br", + "fortal.br", + "fot.br", + "foz.br", + "fst.br", + "g12.br", + "geo.br", + "ggf.br", + "goiania.br", + "gov.br", + "ac.gov.br", + "al.gov.br", + "am.gov.br", + "ap.gov.br", + "ba.gov.br", + "ce.gov.br", + "df.gov.br", + "es.gov.br", + "go.gov.br", + "ma.gov.br", + "mg.gov.br", + "ms.gov.br", + "mt.gov.br", + "pa.gov.br", + "pb.gov.br", + "pe.gov.br", + "pi.gov.br", + "pr.gov.br", + "rj.gov.br", + "rn.gov.br", + "ro.gov.br", + "rr.gov.br", + "rs.gov.br", + "sc.gov.br", + "se.gov.br", + "sp.gov.br", + "to.gov.br", + "gru.br", + "imb.br", + "ind.br", + "inf.br", + "jab.br", + "jampa.br", + "jdf.br", + "joinville.br", + "jor.br", + "jus.br", + "leg.br", + "leilao.br", + "lel.br", + "log.br", + "londrina.br", + "macapa.br", + "maceio.br", + "manaus.br", + "maringa.br", + "mat.br", + "med.br", + "mil.br", + "morena.br", + "mp.br", + "mus.br", + "natal.br", + "net.br", + "niteroi.br", + "*.nom.br", + "not.br", + "ntr.br", + "odo.br", + "ong.br", + "org.br", + "osasco.br", + "palmas.br", + "poa.br", + "ppg.br", + "pro.br", + "psc.br", + "psi.br", + "pvh.br", + "qsl.br", + "radio.br", + "rec.br", + "recife.br", + "rep.br", + "ribeirao.br", + "rio.br", + "riobranco.br", + "riopreto.br", + "salvador.br", + "sampa.br", + "santamaria.br", + "santoandre.br", + "saobernardo.br", + "saogonca.br", + "seg.br", + "sjc.br", + "slg.br", + "slz.br", + "sorocaba.br", + "srv.br", + "taxi.br", + "tc.br", + "tec.br", + "teo.br", + "the.br", + "tmp.br", + "trd.br", + "tur.br", + "tv.br", + "udi.br", + "vet.br", + "vix.br", + "vlog.br", + "wiki.br", + "zlg.br", + "bs", + "com.bs", + "edu.bs", + "gov.bs", + "net.bs", + "org.bs", + "bt", + "com.bt", + "edu.bt", + "gov.bt", + "net.bt", + "org.bt", + "bv", + "bw", + "co.bw", + "org.bw", + "by", + "gov.by", + "mil.by", + "com.by", + "of.by", + "bz", + "co.bz", + "com.bz", + "edu.bz", + "gov.bz", + "net.bz", + "org.bz", + "ca", + "ab.ca", + "bc.ca", + "mb.ca", + "nb.ca", + "nf.ca", + "nl.ca", + "ns.ca", + "nt.ca", + "nu.ca", + "on.ca", + "pe.ca", + "qc.ca", + "sk.ca", + "yk.ca", + "gc.ca", + "cat", + "cc", + "cd", + "gov.cd", + "cf", + "cg", + "ch", + "ci", + "ac.ci", + "aéroport.ci", + "asso.ci", + "co.ci", + "com.ci", + "ed.ci", + "edu.ci", + "go.ci", + "gouv.ci", + "int.ci", + "net.ci", + "or.ci", + "org.ci", + "*.ck", + "!www.ck", + "cl", + "co.cl", + "gob.cl", + "gov.cl", + "mil.cl", + "cm", + "co.cm", + "com.cm", + "gov.cm", + "net.cm", + "cn", + "ac.cn", + "com.cn", + "edu.cn", + "gov.cn", + "mil.cn", + "net.cn", + "org.cn", + "公司.cn", + "網絡.cn", + "网络.cn", + "ah.cn", + "bj.cn", + "cq.cn", + "fj.cn", + "gd.cn", + "gs.cn", + "gx.cn", + "gz.cn", + "ha.cn", + "hb.cn", + "he.cn", + "hi.cn", + "hk.cn", + "hl.cn", + "hn.cn", + "jl.cn", + "js.cn", + "jx.cn", + "ln.cn", + "mo.cn", + "nm.cn", + "nx.cn", + "qh.cn", + "sc.cn", + "sd.cn", + "sh.cn", + "sn.cn", + "sx.cn", + "tj.cn", + "tw.cn", + "xj.cn", + "xz.cn", + "yn.cn", + "zj.cn", + "co", + "com.co", + "edu.co", + "gov.co", + "mil.co", + "net.co", + "nom.co", + "org.co", + "com", + "coop", + "cr", + "ac.cr", + "co.cr", + "ed.cr", + "fi.cr", + "go.cr", + "or.cr", + "sa.cr", + "cu", + "com.cu", + "edu.cu", + "gob.cu", + "inf.cu", + "nat.cu", + "net.cu", + "org.cu", + "cv", + "com.cv", + "edu.cv", + "id.cv", + "int.cv", + "net.cv", + "nome.cv", + "org.cv", + "publ.cv", + "cw", + "com.cw", + "edu.cw", + "net.cw", + "org.cw", + "cx", + "gov.cx", + "cy", + "ac.cy", + "biz.cy", + "com.cy", + "ekloges.cy", + "gov.cy", + "ltd.cy", + "mil.cy", + "net.cy", + "org.cy", + "press.cy", + "pro.cy", + "tm.cy", + "cz", + "de", + "dj", + "dk", + "dm", + "co.dm", + "com.dm", + "edu.dm", + "gov.dm", + "net.dm", + "org.dm", + "do", + "art.do", + "com.do", + "edu.do", + "gob.do", + "gov.do", + "mil.do", + "net.do", + "org.do", + "sld.do", + "web.do", + "dz", + "art.dz", + "asso.dz", + "com.dz", + "edu.dz", + "gov.dz", + "net.dz", + "org.dz", + "pol.dz", + "soc.dz", + "tm.dz", + "ec", + "com.ec", + "edu.ec", + "fin.ec", + "gob.ec", + "gov.ec", + "info.ec", + "k12.ec", + "med.ec", + "mil.ec", + "net.ec", + "org.ec", + "pro.ec", + "edu", + "ee", + "aip.ee", + "com.ee", + "edu.ee", + "fie.ee", + "gov.ee", + "lib.ee", + "med.ee", + "org.ee", + "pri.ee", + "riik.ee", + "eg", + "ac.eg", + "com.eg", + "edu.eg", + "eun.eg", + "gov.eg", + "info.eg", + "me.eg", + "mil.eg", + "name.eg", + "net.eg", + "org.eg", + "sci.eg", + "sport.eg", + "tv.eg", + "*.er", + "es", + "com.es", + "edu.es", + "gob.es", + "nom.es", + "org.es", + "et", + "biz.et", + "com.et", + "edu.et", + "gov.et", + "info.et", + "name.et", + "net.et", + "org.et", + "eu", + "fi", + "aland.fi", + "fj", + "ac.fj", + "biz.fj", + "com.fj", + "gov.fj", + "info.fj", + "mil.fj", + "name.fj", + "net.fj", + "org.fj", + "pro.fj", + "*.fk", + "fm", + "com.fm", + "edu.fm", + "net.fm", + "org.fm", + "fo", + "fr", + "asso.fr", + "com.fr", + "gouv.fr", + "nom.fr", + "prd.fr", + "tm.fr", + "avoues.fr", + "cci.fr", + "greta.fr", + "huissier-justice.fr", + "ga", + "gb", + "gd", + "edu.gd", + "gov.gd", + "ge", + "com.ge", + "edu.ge", + "gov.ge", + "net.ge", + "org.ge", + "pvt.ge", + "school.ge", + "gf", + "gg", + "co.gg", + "net.gg", + "org.gg", + "gh", + "com.gh", + "edu.gh", + "gov.gh", + "mil.gh", + "org.gh", + "gi", + "com.gi", + "edu.gi", + "gov.gi", + "ltd.gi", + "mod.gi", + "org.gi", + "gl", + "co.gl", + "com.gl", + "edu.gl", + "net.gl", + "org.gl", + "gm", + "gn", + "ac.gn", + "com.gn", + "edu.gn", + "gov.gn", + "net.gn", + "org.gn", + "gov", + "gp", + "asso.gp", + "com.gp", + "edu.gp", + "mobi.gp", + "net.gp", + "org.gp", + "gq", + "gr", + "com.gr", + "edu.gr", + "gov.gr", + "net.gr", + "org.gr", + "gs", + "gt", + "com.gt", + "edu.gt", + "gob.gt", + "ind.gt", + "mil.gt", + "net.gt", + "org.gt", + "gu", + "com.gu", + "edu.gu", + "gov.gu", + "guam.gu", + "info.gu", + "net.gu", + "org.gu", + "web.gu", + "gw", + "gy", + "co.gy", + "com.gy", + "edu.gy", + "gov.gy", + "net.gy", + "org.gy", + "hk", + "com.hk", + "edu.hk", + "gov.hk", + "idv.hk", + "net.hk", + "org.hk", + "个人.hk", + "個人.hk", + "公司.hk", + "政府.hk", + "敎育.hk", + "教育.hk", + "箇人.hk", + "組織.hk", + "組织.hk", + "網絡.hk", + "網络.hk", + "组織.hk", + "组织.hk", + "网絡.hk", + "网络.hk", + "hm", + "hn", + "com.hn", + "edu.hn", + "gob.hn", + "mil.hn", + "net.hn", + "org.hn", + "hr", + "com.hr", + "from.hr", + "iz.hr", + "name.hr", + "ht", + "adult.ht", + "art.ht", + "asso.ht", + "com.ht", + "coop.ht", + "edu.ht", + "firm.ht", + "gouv.ht", + "info.ht", + "med.ht", + "net.ht", + "org.ht", + "perso.ht", + "pol.ht", + "pro.ht", + "rel.ht", + "shop.ht", + "hu", + "2000.hu", + "agrar.hu", + "bolt.hu", + "casino.hu", + "city.hu", + "co.hu", + "erotica.hu", + "erotika.hu", + "film.hu", + "forum.hu", + "games.hu", + "hotel.hu", + "info.hu", + "ingatlan.hu", + "jogasz.hu", + "konyvelo.hu", + "lakas.hu", + "media.hu", + "news.hu", + "org.hu", + "priv.hu", + "reklam.hu", + "sex.hu", + "shop.hu", + "sport.hu", + "suli.hu", + "szex.hu", + "tm.hu", + "tozsde.hu", + "utazas.hu", + "video.hu", + "id", + "ac.id", + "biz.id", + "co.id", + "desa.id", + "go.id", + "mil.id", + "my.id", + "net.id", + "or.id", + "ponpes.id", + "sch.id", + "web.id", + "ie", + "gov.ie", + "il", + "ac.il", + "co.il", + "gov.il", + "idf.il", + "k12.il", + "muni.il", + "net.il", + "org.il", + "ישראל", + "אקדמיה.ישראל", + "ישוב.ישראל", + "צהל.ישראל", + "ממשל.ישראל", + "im", + "ac.im", + "co.im", + "ltd.co.im", + "plc.co.im", + "com.im", + "net.im", + "org.im", + "tt.im", + "tv.im", + "in", + "5g.in", + "6g.in", + "ac.in", + "ai.in", + "am.in", + "bihar.in", + "biz.in", + "business.in", + "ca.in", + "cn.in", + "co.in", + "com.in", + "coop.in", + "cs.in", + "delhi.in", + "dr.in", + "edu.in", + "er.in", + "firm.in", + "gen.in", + "gov.in", + "gujarat.in", + "ind.in", + "info.in", + "int.in", + "internet.in", + "io.in", + "me.in", + "mil.in", + "net.in", + "nic.in", + "org.in", + "pg.in", + "post.in", + "pro.in", + "res.in", + "travel.in", + "tv.in", + "uk.in", + "up.in", + "us.in", + "info", + "int", + "eu.int", + "io", + "co.io", + "com.io", + "edu.io", + "gov.io", + "mil.io", + "net.io", + "nom.io", + "org.io", + "iq", + "com.iq", + "edu.iq", + "gov.iq", + "mil.iq", + "net.iq", + "org.iq", + "ir", + "ac.ir", + "co.ir", + "gov.ir", + "id.ir", + "net.ir", + "org.ir", + "sch.ir", + "ایران.ir", + "ايران.ir", + "is", + "it", + "edu.it", + "gov.it", + "abr.it", + "abruzzo.it", + "aosta-valley.it", + "aostavalley.it", + "bas.it", + "basilicata.it", + "cal.it", + "calabria.it", + "cam.it", + "campania.it", + "emilia-romagna.it", + "emiliaromagna.it", + "emr.it", + "friuli-v-giulia.it", + "friuli-ve-giulia.it", + "friuli-vegiulia.it", + "friuli-venezia-giulia.it", + "friuli-veneziagiulia.it", + "friuli-vgiulia.it", + "friuliv-giulia.it", + "friulive-giulia.it", + "friulivegiulia.it", + "friulivenezia-giulia.it", + "friuliveneziagiulia.it", + "friulivgiulia.it", + "fvg.it", + "laz.it", + "lazio.it", + "lig.it", + "liguria.it", + "lom.it", + "lombardia.it", + "lombardy.it", + "lucania.it", + "mar.it", + "marche.it", + "mol.it", + "molise.it", + "piedmont.it", + "piemonte.it", + "pmn.it", + "pug.it", + "puglia.it", + "sar.it", + "sardegna.it", + "sardinia.it", + "sic.it", + "sicilia.it", + "sicily.it", + "taa.it", + "tos.it", + "toscana.it", + "trentin-sud-tirol.it", + "trentin-süd-tirol.it", + "trentin-sudtirol.it", + "trentin-südtirol.it", + "trentin-sued-tirol.it", + "trentin-suedtirol.it", + "trentino.it", + "trentino-a-adige.it", + "trentino-aadige.it", + "trentino-alto-adige.it", + "trentino-altoadige.it", + "trentino-s-tirol.it", + "trentino-stirol.it", + "trentino-sud-tirol.it", + "trentino-süd-tirol.it", + "trentino-sudtirol.it", + "trentino-südtirol.it", + "trentino-sued-tirol.it", + "trentino-suedtirol.it", + "trentinoa-adige.it", + "trentinoaadige.it", + "trentinoalto-adige.it", + "trentinoaltoadige.it", + "trentinos-tirol.it", + "trentinostirol.it", + "trentinosud-tirol.it", + "trentinosüd-tirol.it", + "trentinosudtirol.it", + "trentinosüdtirol.it", + "trentinosued-tirol.it", + "trentinosuedtirol.it", + "trentinsud-tirol.it", + "trentinsüd-tirol.it", + "trentinsudtirol.it", + "trentinsüdtirol.it", + "trentinsued-tirol.it", + "trentinsuedtirol.it", + "tuscany.it", + "umb.it", + "umbria.it", + "val-d-aosta.it", + "val-daosta.it", + "vald-aosta.it", + "valdaosta.it", + "valle-aosta.it", + "valle-d-aosta.it", + "valle-daosta.it", + "valleaosta.it", + "valled-aosta.it", + "valledaosta.it", + "vallee-aoste.it", + "vallée-aoste.it", + "vallee-d-aoste.it", + "vallée-d-aoste.it", + "valleeaoste.it", + "valléeaoste.it", + "valleedaoste.it", + "valléedaoste.it", + "vao.it", + "vda.it", + "ven.it", + "veneto.it", + "ag.it", + "agrigento.it", + "al.it", + "alessandria.it", + "alto-adige.it", + "altoadige.it", + "an.it", + "ancona.it", + "andria-barletta-trani.it", + "andria-trani-barletta.it", + "andriabarlettatrani.it", + "andriatranibarletta.it", + "ao.it", + "aosta.it", + "aoste.it", + "ap.it", + "aq.it", + "aquila.it", + "ar.it", + "arezzo.it", + "ascoli-piceno.it", + "ascolipiceno.it", + "asti.it", + "at.it", + "av.it", + "avellino.it", + "ba.it", + "balsan.it", + "balsan-sudtirol.it", + "balsan-südtirol.it", + "balsan-suedtirol.it", + "bari.it", + "barletta-trani-andria.it", + "barlettatraniandria.it", + "belluno.it", + "benevento.it", + "bergamo.it", + "bg.it", + "bi.it", + "biella.it", + "bl.it", + "bn.it", + "bo.it", + "bologna.it", + "bolzano.it", + "bolzano-altoadige.it", + "bozen.it", + "bozen-sudtirol.it", + "bozen-südtirol.it", + "bozen-suedtirol.it", + "br.it", + "brescia.it", + "brindisi.it", + "bs.it", + "bt.it", + "bulsan.it", + "bulsan-sudtirol.it", + "bulsan-südtirol.it", + "bulsan-suedtirol.it", + "bz.it", + "ca.it", + "cagliari.it", + "caltanissetta.it", + "campidano-medio.it", + "campidanomedio.it", + "campobasso.it", + "carbonia-iglesias.it", + "carboniaiglesias.it", + "carrara-massa.it", + "carraramassa.it", + "caserta.it", + "catania.it", + "catanzaro.it", + "cb.it", + "ce.it", + "cesena-forli.it", + "cesena-forlì.it", + "cesenaforli.it", + "cesenaforlì.it", + "ch.it", + "chieti.it", + "ci.it", + "cl.it", + "cn.it", + "co.it", + "como.it", + "cosenza.it", + "cr.it", + "cremona.it", + "crotone.it", + "cs.it", + "ct.it", + "cuneo.it", + "cz.it", + "dell-ogliastra.it", + "dellogliastra.it", + "en.it", + "enna.it", + "fc.it", + "fe.it", + "fermo.it", + "ferrara.it", + "fg.it", + "fi.it", + "firenze.it", + "florence.it", + "fm.it", + "foggia.it", + "forli-cesena.it", + "forlì-cesena.it", + "forlicesena.it", + "forlìcesena.it", + "fr.it", + "frosinone.it", + "ge.it", + "genoa.it", + "genova.it", + "go.it", + "gorizia.it", + "gr.it", + "grosseto.it", + "iglesias-carbonia.it", + "iglesiascarbonia.it", + "im.it", + "imperia.it", + "is.it", + "isernia.it", + "kr.it", + "la-spezia.it", + "laquila.it", + "laspezia.it", + "latina.it", + "lc.it", + "le.it", + "lecce.it", + "lecco.it", + "li.it", + "livorno.it", + "lo.it", + "lodi.it", + "lt.it", + "lu.it", + "lucca.it", + "macerata.it", + "mantova.it", + "massa-carrara.it", + "massacarrara.it", + "matera.it", + "mb.it", + "mc.it", + "me.it", + "medio-campidano.it", + "mediocampidano.it", + "messina.it", + "mi.it", + "milan.it", + "milano.it", + "mn.it", + "mo.it", + "modena.it", + "monza.it", + "monza-brianza.it", + "monza-e-della-brianza.it", + "monzabrianza.it", + "monzaebrianza.it", + "monzaedellabrianza.it", + "ms.it", + "mt.it", + "na.it", + "naples.it", + "napoli.it", + "no.it", + "novara.it", + "nu.it", + "nuoro.it", + "og.it", + "ogliastra.it", + "olbia-tempio.it", + "olbiatempio.it", + "or.it", + "oristano.it", + "ot.it", + "pa.it", + "padova.it", + "padua.it", + "palermo.it", + "parma.it", + "pavia.it", + "pc.it", + "pd.it", + "pe.it", + "perugia.it", + "pesaro-urbino.it", + "pesarourbino.it", + "pescara.it", + "pg.it", + "pi.it", + "piacenza.it", + "pisa.it", + "pistoia.it", + "pn.it", + "po.it", + "pordenone.it", + "potenza.it", + "pr.it", + "prato.it", + "pt.it", + "pu.it", + "pv.it", + "pz.it", + "ra.it", + "ragusa.it", + "ravenna.it", + "rc.it", + "re.it", + "reggio-calabria.it", + "reggio-emilia.it", + "reggiocalabria.it", + "reggioemilia.it", + "rg.it", + "ri.it", + "rieti.it", + "rimini.it", + "rm.it", + "rn.it", + "ro.it", + "roma.it", + "rome.it", + "rovigo.it", + "sa.it", + "salerno.it", + "sassari.it", + "savona.it", + "si.it", + "siena.it", + "siracusa.it", + "so.it", + "sondrio.it", + "sp.it", + "sr.it", + "ss.it", + "südtirol.it", + "suedtirol.it", + "sv.it", + "ta.it", + "taranto.it", + "te.it", + "tempio-olbia.it", + "tempioolbia.it", + "teramo.it", + "terni.it", + "tn.it", + "to.it", + "torino.it", + "tp.it", + "tr.it", + "trani-andria-barletta.it", + "trani-barletta-andria.it", + "traniandriabarletta.it", + "tranibarlettaandria.it", + "trapani.it", + "trento.it", + "treviso.it", + "trieste.it", + "ts.it", + "turin.it", + "tv.it", + "ud.it", + "udine.it", + "urbino-pesaro.it", + "urbinopesaro.it", + "va.it", + "varese.it", + "vb.it", + "vc.it", + "ve.it", + "venezia.it", + "venice.it", + "verbania.it", + "vercelli.it", + "verona.it", + "vi.it", + "vibo-valentia.it", + "vibovalentia.it", + "vicenza.it", + "viterbo.it", + "vr.it", + "vs.it", + "vt.it", + "vv.it", + "je", + "co.je", + "net.je", + "org.je", + "*.jm", + "jo", + "agri.jo", + "ai.jo", + "com.jo", + "edu.jo", + "eng.jo", + "fm.jo", + "gov.jo", + "mil.jo", + "net.jo", + "org.jo", + "per.jo", + "phd.jo", + "sch.jo", + "tv.jo", + "jobs", + "jp", + "ac.jp", + "ad.jp", + "co.jp", + "ed.jp", + "go.jp", + "gr.jp", + "lg.jp", + "ne.jp", + "or.jp", + "aichi.jp", + "akita.jp", + "aomori.jp", + "chiba.jp", + "ehime.jp", + "fukui.jp", + "fukuoka.jp", + "fukushima.jp", + "gifu.jp", + "gunma.jp", + "hiroshima.jp", + "hokkaido.jp", + "hyogo.jp", + "ibaraki.jp", + "ishikawa.jp", + "iwate.jp", + "kagawa.jp", + "kagoshima.jp", + "kanagawa.jp", + "kochi.jp", + "kumamoto.jp", + "kyoto.jp", + "mie.jp", + "miyagi.jp", + "miyazaki.jp", + "nagano.jp", + "nagasaki.jp", + "nara.jp", + "niigata.jp", + "oita.jp", + "okayama.jp", + "okinawa.jp", + "osaka.jp", + "saga.jp", + "saitama.jp", + "shiga.jp", + "shimane.jp", + "shizuoka.jp", + "tochigi.jp", + "tokushima.jp", + "tokyo.jp", + "tottori.jp", + "toyama.jp", + "wakayama.jp", + "yamagata.jp", + "yamaguchi.jp", + "yamanashi.jp", + "三重.jp", + "京都.jp", + "佐賀.jp", + "兵庫.jp", + "北海道.jp", + "千葉.jp", + "和歌山.jp", + "埼玉.jp", + "大分.jp", + "大阪.jp", + "奈良.jp", + "宮城.jp", + "宮崎.jp", + "富山.jp", + "山口.jp", + "山形.jp", + "山梨.jp", + "岐阜.jp", + "岡山.jp", + "岩手.jp", + "島根.jp", + "広島.jp", + "徳島.jp", + "愛媛.jp", + "愛知.jp", + "新潟.jp", + "東京.jp", + "栃木.jp", + "沖縄.jp", + "滋賀.jp", + "熊本.jp", + "石川.jp", + "神奈川.jp", + "福井.jp", + "福岡.jp", + "福島.jp", + "秋田.jp", + "群馬.jp", + "茨城.jp", + "長崎.jp", + "長野.jp", + "青森.jp", + "静岡.jp", + "香川.jp", + "高知.jp", + "鳥取.jp", + "鹿児島.jp", + "*.kawasaki.jp", + "!city.kawasaki.jp", + "*.kitakyushu.jp", + "!city.kitakyushu.jp", + "*.kobe.jp", + "!city.kobe.jp", + "*.nagoya.jp", + "!city.nagoya.jp", + "*.sapporo.jp", + "!city.sapporo.jp", + "*.sendai.jp", + "!city.sendai.jp", + "*.yokohama.jp", + "!city.yokohama.jp", + "aisai.aichi.jp", + "ama.aichi.jp", + "anjo.aichi.jp", + "asuke.aichi.jp", + "chiryu.aichi.jp", + "chita.aichi.jp", + "fuso.aichi.jp", + "gamagori.aichi.jp", + "handa.aichi.jp", + "hazu.aichi.jp", + "hekinan.aichi.jp", + "higashiura.aichi.jp", + "ichinomiya.aichi.jp", + "inazawa.aichi.jp", + "inuyama.aichi.jp", + "isshiki.aichi.jp", + "iwakura.aichi.jp", + "kanie.aichi.jp", + "kariya.aichi.jp", + "kasugai.aichi.jp", + "kira.aichi.jp", + "kiyosu.aichi.jp", + "komaki.aichi.jp", + "konan.aichi.jp", + "kota.aichi.jp", + "mihama.aichi.jp", + "miyoshi.aichi.jp", + "nishio.aichi.jp", + "nisshin.aichi.jp", + "obu.aichi.jp", + "oguchi.aichi.jp", + "oharu.aichi.jp", + "okazaki.aichi.jp", + "owariasahi.aichi.jp", + "seto.aichi.jp", + "shikatsu.aichi.jp", + "shinshiro.aichi.jp", + "shitara.aichi.jp", + "tahara.aichi.jp", + "takahama.aichi.jp", + "tobishima.aichi.jp", + "toei.aichi.jp", + "togo.aichi.jp", + "tokai.aichi.jp", + "tokoname.aichi.jp", + "toyoake.aichi.jp", + "toyohashi.aichi.jp", + "toyokawa.aichi.jp", + "toyone.aichi.jp", + "toyota.aichi.jp", + "tsushima.aichi.jp", + "yatomi.aichi.jp", + "akita.akita.jp", + "daisen.akita.jp", + "fujisato.akita.jp", + "gojome.akita.jp", + "hachirogata.akita.jp", + "happou.akita.jp", + "higashinaruse.akita.jp", + "honjo.akita.jp", + "honjyo.akita.jp", + "ikawa.akita.jp", + "kamikoani.akita.jp", + "kamioka.akita.jp", + "katagami.akita.jp", + "kazuno.akita.jp", + "kitaakita.akita.jp", + "kosaka.akita.jp", + "kyowa.akita.jp", + "misato.akita.jp", + "mitane.akita.jp", + "moriyoshi.akita.jp", + "nikaho.akita.jp", + "noshiro.akita.jp", + "odate.akita.jp", + "oga.akita.jp", + "ogata.akita.jp", + "semboku.akita.jp", + "yokote.akita.jp", + "yurihonjo.akita.jp", + "aomori.aomori.jp", + "gonohe.aomori.jp", + "hachinohe.aomori.jp", + "hashikami.aomori.jp", + "hiranai.aomori.jp", + "hirosaki.aomori.jp", + "itayanagi.aomori.jp", + "kuroishi.aomori.jp", + "misawa.aomori.jp", + "mutsu.aomori.jp", + "nakadomari.aomori.jp", + "noheji.aomori.jp", + "oirase.aomori.jp", + "owani.aomori.jp", + "rokunohe.aomori.jp", + "sannohe.aomori.jp", + "shichinohe.aomori.jp", + "shingo.aomori.jp", + "takko.aomori.jp", + "towada.aomori.jp", + "tsugaru.aomori.jp", + "tsuruta.aomori.jp", + "abiko.chiba.jp", + "asahi.chiba.jp", + "chonan.chiba.jp", + "chosei.chiba.jp", + "choshi.chiba.jp", + "chuo.chiba.jp", + "funabashi.chiba.jp", + "futtsu.chiba.jp", + "hanamigawa.chiba.jp", + "ichihara.chiba.jp", + "ichikawa.chiba.jp", + "ichinomiya.chiba.jp", + "inzai.chiba.jp", + "isumi.chiba.jp", + "kamagaya.chiba.jp", + "kamogawa.chiba.jp", + "kashiwa.chiba.jp", + "katori.chiba.jp", + "katsuura.chiba.jp", + "kimitsu.chiba.jp", + "kisarazu.chiba.jp", + "kozaki.chiba.jp", + "kujukuri.chiba.jp", + "kyonan.chiba.jp", + "matsudo.chiba.jp", + "midori.chiba.jp", + "mihama.chiba.jp", + "minamiboso.chiba.jp", + "mobara.chiba.jp", + "mutsuzawa.chiba.jp", + "nagara.chiba.jp", + "nagareyama.chiba.jp", + "narashino.chiba.jp", + "narita.chiba.jp", + "noda.chiba.jp", + "oamishirasato.chiba.jp", + "omigawa.chiba.jp", + "onjuku.chiba.jp", + "otaki.chiba.jp", + "sakae.chiba.jp", + "sakura.chiba.jp", + "shimofusa.chiba.jp", + "shirako.chiba.jp", + "shiroi.chiba.jp", + "shisui.chiba.jp", + "sodegaura.chiba.jp", + "sosa.chiba.jp", + "tako.chiba.jp", + "tateyama.chiba.jp", + "togane.chiba.jp", + "tohnosho.chiba.jp", + "tomisato.chiba.jp", + "urayasu.chiba.jp", + "yachimata.chiba.jp", + "yachiyo.chiba.jp", + "yokaichiba.chiba.jp", + "yokoshibahikari.chiba.jp", + "yotsukaido.chiba.jp", + "ainan.ehime.jp", + "honai.ehime.jp", + "ikata.ehime.jp", + "imabari.ehime.jp", + "iyo.ehime.jp", + "kamijima.ehime.jp", + "kihoku.ehime.jp", + "kumakogen.ehime.jp", + "masaki.ehime.jp", + "matsuno.ehime.jp", + "matsuyama.ehime.jp", + "namikata.ehime.jp", + "niihama.ehime.jp", + "ozu.ehime.jp", + "saijo.ehime.jp", + "seiyo.ehime.jp", + "shikokuchuo.ehime.jp", + "tobe.ehime.jp", + "toon.ehime.jp", + "uchiko.ehime.jp", + "uwajima.ehime.jp", + "yawatahama.ehime.jp", + "echizen.fukui.jp", + "eiheiji.fukui.jp", + "fukui.fukui.jp", + "ikeda.fukui.jp", + "katsuyama.fukui.jp", + "mihama.fukui.jp", + "minamiechizen.fukui.jp", + "obama.fukui.jp", + "ohi.fukui.jp", + "ono.fukui.jp", + "sabae.fukui.jp", + "sakai.fukui.jp", + "takahama.fukui.jp", + "tsuruga.fukui.jp", + "wakasa.fukui.jp", + "ashiya.fukuoka.jp", + "buzen.fukuoka.jp", + "chikugo.fukuoka.jp", + "chikuho.fukuoka.jp", + "chikujo.fukuoka.jp", + "chikushino.fukuoka.jp", + "chikuzen.fukuoka.jp", + "chuo.fukuoka.jp", + "dazaifu.fukuoka.jp", + "fukuchi.fukuoka.jp", + "hakata.fukuoka.jp", + "higashi.fukuoka.jp", + "hirokawa.fukuoka.jp", + "hisayama.fukuoka.jp", + "iizuka.fukuoka.jp", + "inatsuki.fukuoka.jp", + "kaho.fukuoka.jp", + "kasuga.fukuoka.jp", + "kasuya.fukuoka.jp", + "kawara.fukuoka.jp", + "keisen.fukuoka.jp", + "koga.fukuoka.jp", + "kurate.fukuoka.jp", + "kurogi.fukuoka.jp", + "kurume.fukuoka.jp", + "minami.fukuoka.jp", + "miyako.fukuoka.jp", + "miyama.fukuoka.jp", + "miyawaka.fukuoka.jp", + "mizumaki.fukuoka.jp", + "munakata.fukuoka.jp", + "nakagawa.fukuoka.jp", + "nakama.fukuoka.jp", + "nishi.fukuoka.jp", + "nogata.fukuoka.jp", + "ogori.fukuoka.jp", + "okagaki.fukuoka.jp", + "okawa.fukuoka.jp", + "oki.fukuoka.jp", + "omuta.fukuoka.jp", + "onga.fukuoka.jp", + "onojo.fukuoka.jp", + "oto.fukuoka.jp", + "saigawa.fukuoka.jp", + "sasaguri.fukuoka.jp", + "shingu.fukuoka.jp", + "shinyoshitomi.fukuoka.jp", + "shonai.fukuoka.jp", + "soeda.fukuoka.jp", + "sue.fukuoka.jp", + "tachiarai.fukuoka.jp", + "tagawa.fukuoka.jp", + "takata.fukuoka.jp", + "toho.fukuoka.jp", + "toyotsu.fukuoka.jp", + "tsuiki.fukuoka.jp", + "ukiha.fukuoka.jp", + "umi.fukuoka.jp", + "usui.fukuoka.jp", + "yamada.fukuoka.jp", + "yame.fukuoka.jp", + "yanagawa.fukuoka.jp", + "yukuhashi.fukuoka.jp", + "aizubange.fukushima.jp", + "aizumisato.fukushima.jp", + "aizuwakamatsu.fukushima.jp", + "asakawa.fukushima.jp", + "bandai.fukushima.jp", + "date.fukushima.jp", + "fukushima.fukushima.jp", + "furudono.fukushima.jp", + "futaba.fukushima.jp", + "hanawa.fukushima.jp", + "higashi.fukushima.jp", + "hirata.fukushima.jp", + "hirono.fukushima.jp", + "iitate.fukushima.jp", + "inawashiro.fukushima.jp", + "ishikawa.fukushima.jp", + "iwaki.fukushima.jp", + "izumizaki.fukushima.jp", + "kagamiishi.fukushima.jp", + "kaneyama.fukushima.jp", + "kawamata.fukushima.jp", + "kitakata.fukushima.jp", + "kitashiobara.fukushima.jp", + "koori.fukushima.jp", + "koriyama.fukushima.jp", + "kunimi.fukushima.jp", + "miharu.fukushima.jp", + "mishima.fukushima.jp", + "namie.fukushima.jp", + "nango.fukushima.jp", + "nishiaizu.fukushima.jp", + "nishigo.fukushima.jp", + "okuma.fukushima.jp", + "omotego.fukushima.jp", + "ono.fukushima.jp", + "otama.fukushima.jp", + "samegawa.fukushima.jp", + "shimogo.fukushima.jp", + "shirakawa.fukushima.jp", + "showa.fukushima.jp", + "soma.fukushima.jp", + "sukagawa.fukushima.jp", + "taishin.fukushima.jp", + "tamakawa.fukushima.jp", + "tanagura.fukushima.jp", + "tenei.fukushima.jp", + "yabuki.fukushima.jp", + "yamato.fukushima.jp", + "yamatsuri.fukushima.jp", + "yanaizu.fukushima.jp", + "yugawa.fukushima.jp", + "anpachi.gifu.jp", + "ena.gifu.jp", + "gifu.gifu.jp", + "ginan.gifu.jp", + "godo.gifu.jp", + "gujo.gifu.jp", + "hashima.gifu.jp", + "hichiso.gifu.jp", + "hida.gifu.jp", + "higashishirakawa.gifu.jp", + "ibigawa.gifu.jp", + "ikeda.gifu.jp", + "kakamigahara.gifu.jp", + "kani.gifu.jp", + "kasahara.gifu.jp", + "kasamatsu.gifu.jp", + "kawaue.gifu.jp", + "kitagata.gifu.jp", + "mino.gifu.jp", + "minokamo.gifu.jp", + "mitake.gifu.jp", + "mizunami.gifu.jp", + "motosu.gifu.jp", + "nakatsugawa.gifu.jp", + "ogaki.gifu.jp", + "sakahogi.gifu.jp", + "seki.gifu.jp", + "sekigahara.gifu.jp", + "shirakawa.gifu.jp", + "tajimi.gifu.jp", + "takayama.gifu.jp", + "tarui.gifu.jp", + "toki.gifu.jp", + "tomika.gifu.jp", + "wanouchi.gifu.jp", + "yamagata.gifu.jp", + "yaotsu.gifu.jp", + "yoro.gifu.jp", + "annaka.gunma.jp", + "chiyoda.gunma.jp", + "fujioka.gunma.jp", + "higashiagatsuma.gunma.jp", + "isesaki.gunma.jp", + "itakura.gunma.jp", + "kanna.gunma.jp", + "kanra.gunma.jp", + "katashina.gunma.jp", + "kawaba.gunma.jp", + "kiryu.gunma.jp", + "kusatsu.gunma.jp", + "maebashi.gunma.jp", + "meiwa.gunma.jp", + "midori.gunma.jp", + "minakami.gunma.jp", + "naganohara.gunma.jp", + "nakanojo.gunma.jp", + "nanmoku.gunma.jp", + "numata.gunma.jp", + "oizumi.gunma.jp", + "ora.gunma.jp", + "ota.gunma.jp", + "shibukawa.gunma.jp", + "shimonita.gunma.jp", + "shinto.gunma.jp", + "showa.gunma.jp", + "takasaki.gunma.jp", + "takayama.gunma.jp", + "tamamura.gunma.jp", + "tatebayashi.gunma.jp", + "tomioka.gunma.jp", + "tsukiyono.gunma.jp", + "tsumagoi.gunma.jp", + "ueno.gunma.jp", + "yoshioka.gunma.jp", + "asaminami.hiroshima.jp", + "daiwa.hiroshima.jp", + "etajima.hiroshima.jp", + "fuchu.hiroshima.jp", + "fukuyama.hiroshima.jp", + "hatsukaichi.hiroshima.jp", + "higashihiroshima.hiroshima.jp", + "hongo.hiroshima.jp", + "jinsekikogen.hiroshima.jp", + "kaita.hiroshima.jp", + "kui.hiroshima.jp", + "kumano.hiroshima.jp", + "kure.hiroshima.jp", + "mihara.hiroshima.jp", + "miyoshi.hiroshima.jp", + "naka.hiroshima.jp", + "onomichi.hiroshima.jp", + "osakikamijima.hiroshima.jp", + "otake.hiroshima.jp", + "saka.hiroshima.jp", + "sera.hiroshima.jp", + "seranishi.hiroshima.jp", + "shinichi.hiroshima.jp", + "shobara.hiroshima.jp", + "takehara.hiroshima.jp", + "abashiri.hokkaido.jp", + "abira.hokkaido.jp", + "aibetsu.hokkaido.jp", + "akabira.hokkaido.jp", + "akkeshi.hokkaido.jp", + "asahikawa.hokkaido.jp", + "ashibetsu.hokkaido.jp", + "ashoro.hokkaido.jp", + "assabu.hokkaido.jp", + "atsuma.hokkaido.jp", + "bibai.hokkaido.jp", + "biei.hokkaido.jp", + "bifuka.hokkaido.jp", + "bihoro.hokkaido.jp", + "biratori.hokkaido.jp", + "chippubetsu.hokkaido.jp", + "chitose.hokkaido.jp", + "date.hokkaido.jp", + "ebetsu.hokkaido.jp", + "embetsu.hokkaido.jp", + "eniwa.hokkaido.jp", + "erimo.hokkaido.jp", + "esan.hokkaido.jp", + "esashi.hokkaido.jp", + "fukagawa.hokkaido.jp", + "fukushima.hokkaido.jp", + "furano.hokkaido.jp", + "furubira.hokkaido.jp", + "haboro.hokkaido.jp", + "hakodate.hokkaido.jp", + "hamatonbetsu.hokkaido.jp", + "hidaka.hokkaido.jp", + "higashikagura.hokkaido.jp", + "higashikawa.hokkaido.jp", + "hiroo.hokkaido.jp", + "hokuryu.hokkaido.jp", + "hokuto.hokkaido.jp", + "honbetsu.hokkaido.jp", + "horokanai.hokkaido.jp", + "horonobe.hokkaido.jp", + "ikeda.hokkaido.jp", + "imakane.hokkaido.jp", + "ishikari.hokkaido.jp", + "iwamizawa.hokkaido.jp", + "iwanai.hokkaido.jp", + "kamifurano.hokkaido.jp", + "kamikawa.hokkaido.jp", + "kamishihoro.hokkaido.jp", + "kamisunagawa.hokkaido.jp", + "kamoenai.hokkaido.jp", + "kayabe.hokkaido.jp", + "kembuchi.hokkaido.jp", + "kikonai.hokkaido.jp", + "kimobetsu.hokkaido.jp", + "kitahiroshima.hokkaido.jp", + "kitami.hokkaido.jp", + "kiyosato.hokkaido.jp", + "koshimizu.hokkaido.jp", + "kunneppu.hokkaido.jp", + "kuriyama.hokkaido.jp", + "kuromatsunai.hokkaido.jp", + "kushiro.hokkaido.jp", + "kutchan.hokkaido.jp", + "kyowa.hokkaido.jp", + "mashike.hokkaido.jp", + "matsumae.hokkaido.jp", + "mikasa.hokkaido.jp", + "minamifurano.hokkaido.jp", + "mombetsu.hokkaido.jp", + "moseushi.hokkaido.jp", + "mukawa.hokkaido.jp", + "muroran.hokkaido.jp", + "naie.hokkaido.jp", + "nakagawa.hokkaido.jp", + "nakasatsunai.hokkaido.jp", + "nakatombetsu.hokkaido.jp", + "nanae.hokkaido.jp", + "nanporo.hokkaido.jp", + "nayoro.hokkaido.jp", + "nemuro.hokkaido.jp", + "niikappu.hokkaido.jp", + "niki.hokkaido.jp", + "nishiokoppe.hokkaido.jp", + "noboribetsu.hokkaido.jp", + "numata.hokkaido.jp", + "obihiro.hokkaido.jp", + "obira.hokkaido.jp", + "oketo.hokkaido.jp", + "okoppe.hokkaido.jp", + "otaru.hokkaido.jp", + "otobe.hokkaido.jp", + "otofuke.hokkaido.jp", + "otoineppu.hokkaido.jp", + "oumu.hokkaido.jp", + "ozora.hokkaido.jp", + "pippu.hokkaido.jp", + "rankoshi.hokkaido.jp", + "rebun.hokkaido.jp", + "rikubetsu.hokkaido.jp", + "rishiri.hokkaido.jp", + "rishirifuji.hokkaido.jp", + "saroma.hokkaido.jp", + "sarufutsu.hokkaido.jp", + "shakotan.hokkaido.jp", + "shari.hokkaido.jp", + "shibecha.hokkaido.jp", + "shibetsu.hokkaido.jp", + "shikabe.hokkaido.jp", + "shikaoi.hokkaido.jp", + "shimamaki.hokkaido.jp", + "shimizu.hokkaido.jp", + "shimokawa.hokkaido.jp", + "shinshinotsu.hokkaido.jp", + "shintoku.hokkaido.jp", + "shiranuka.hokkaido.jp", + "shiraoi.hokkaido.jp", + "shiriuchi.hokkaido.jp", + "sobetsu.hokkaido.jp", + "sunagawa.hokkaido.jp", + "taiki.hokkaido.jp", + "takasu.hokkaido.jp", + "takikawa.hokkaido.jp", + "takinoue.hokkaido.jp", + "teshikaga.hokkaido.jp", + "tobetsu.hokkaido.jp", + "tohma.hokkaido.jp", + "tomakomai.hokkaido.jp", + "tomari.hokkaido.jp", + "toya.hokkaido.jp", + "toyako.hokkaido.jp", + "toyotomi.hokkaido.jp", + "toyoura.hokkaido.jp", + "tsubetsu.hokkaido.jp", + "tsukigata.hokkaido.jp", + "urakawa.hokkaido.jp", + "urausu.hokkaido.jp", + "uryu.hokkaido.jp", + "utashinai.hokkaido.jp", + "wakkanai.hokkaido.jp", + "wassamu.hokkaido.jp", + "yakumo.hokkaido.jp", + "yoichi.hokkaido.jp", + "aioi.hyogo.jp", + "akashi.hyogo.jp", + "ako.hyogo.jp", + "amagasaki.hyogo.jp", + "aogaki.hyogo.jp", + "asago.hyogo.jp", + "ashiya.hyogo.jp", + "awaji.hyogo.jp", + "fukusaki.hyogo.jp", + "goshiki.hyogo.jp", + "harima.hyogo.jp", + "himeji.hyogo.jp", + "ichikawa.hyogo.jp", + "inagawa.hyogo.jp", + "itami.hyogo.jp", + "kakogawa.hyogo.jp", + "kamigori.hyogo.jp", + "kamikawa.hyogo.jp", + "kasai.hyogo.jp", + "kasuga.hyogo.jp", + "kawanishi.hyogo.jp", + "miki.hyogo.jp", + "minamiawaji.hyogo.jp", + "nishinomiya.hyogo.jp", + "nishiwaki.hyogo.jp", + "ono.hyogo.jp", + "sanda.hyogo.jp", + "sannan.hyogo.jp", + "sasayama.hyogo.jp", + "sayo.hyogo.jp", + "shingu.hyogo.jp", + "shinonsen.hyogo.jp", + "shiso.hyogo.jp", + "sumoto.hyogo.jp", + "taishi.hyogo.jp", + "taka.hyogo.jp", + "takarazuka.hyogo.jp", + "takasago.hyogo.jp", + "takino.hyogo.jp", + "tamba.hyogo.jp", + "tatsuno.hyogo.jp", + "toyooka.hyogo.jp", + "yabu.hyogo.jp", + "yashiro.hyogo.jp", + "yoka.hyogo.jp", + "yokawa.hyogo.jp", + "ami.ibaraki.jp", + "asahi.ibaraki.jp", + "bando.ibaraki.jp", + "chikusei.ibaraki.jp", + "daigo.ibaraki.jp", + "fujishiro.ibaraki.jp", + "hitachi.ibaraki.jp", + "hitachinaka.ibaraki.jp", + "hitachiomiya.ibaraki.jp", + "hitachiota.ibaraki.jp", + "ibaraki.ibaraki.jp", + "ina.ibaraki.jp", + "inashiki.ibaraki.jp", + "itako.ibaraki.jp", + "iwama.ibaraki.jp", + "joso.ibaraki.jp", + "kamisu.ibaraki.jp", + "kasama.ibaraki.jp", + "kashima.ibaraki.jp", + "kasumigaura.ibaraki.jp", + "koga.ibaraki.jp", + "miho.ibaraki.jp", + "mito.ibaraki.jp", + "moriya.ibaraki.jp", + "naka.ibaraki.jp", + "namegata.ibaraki.jp", + "oarai.ibaraki.jp", + "ogawa.ibaraki.jp", + "omitama.ibaraki.jp", + "ryugasaki.ibaraki.jp", + "sakai.ibaraki.jp", + "sakuragawa.ibaraki.jp", + "shimodate.ibaraki.jp", + "shimotsuma.ibaraki.jp", + "shirosato.ibaraki.jp", + "sowa.ibaraki.jp", + "suifu.ibaraki.jp", + "takahagi.ibaraki.jp", + "tamatsukuri.ibaraki.jp", + "tokai.ibaraki.jp", + "tomobe.ibaraki.jp", + "tone.ibaraki.jp", + "toride.ibaraki.jp", + "tsuchiura.ibaraki.jp", + "tsukuba.ibaraki.jp", + "uchihara.ibaraki.jp", + "ushiku.ibaraki.jp", + "yachiyo.ibaraki.jp", + "yamagata.ibaraki.jp", + "yawara.ibaraki.jp", + "yuki.ibaraki.jp", + "anamizu.ishikawa.jp", + "hakui.ishikawa.jp", + "hakusan.ishikawa.jp", + "kaga.ishikawa.jp", + "kahoku.ishikawa.jp", + "kanazawa.ishikawa.jp", + "kawakita.ishikawa.jp", + "komatsu.ishikawa.jp", + "nakanoto.ishikawa.jp", + "nanao.ishikawa.jp", + "nomi.ishikawa.jp", + "nonoichi.ishikawa.jp", + "noto.ishikawa.jp", + "shika.ishikawa.jp", + "suzu.ishikawa.jp", + "tsubata.ishikawa.jp", + "tsurugi.ishikawa.jp", + "uchinada.ishikawa.jp", + "wajima.ishikawa.jp", + "fudai.iwate.jp", + "fujisawa.iwate.jp", + "hanamaki.iwate.jp", + "hiraizumi.iwate.jp", + "hirono.iwate.jp", + "ichinohe.iwate.jp", + "ichinoseki.iwate.jp", + "iwaizumi.iwate.jp", + "iwate.iwate.jp", + "joboji.iwate.jp", + "kamaishi.iwate.jp", + "kanegasaki.iwate.jp", + "karumai.iwate.jp", + "kawai.iwate.jp", + "kitakami.iwate.jp", + "kuji.iwate.jp", + "kunohe.iwate.jp", + "kuzumaki.iwate.jp", + "miyako.iwate.jp", + "mizusawa.iwate.jp", + "morioka.iwate.jp", + "ninohe.iwate.jp", + "noda.iwate.jp", + "ofunato.iwate.jp", + "oshu.iwate.jp", + "otsuchi.iwate.jp", + "rikuzentakata.iwate.jp", + "shiwa.iwate.jp", + "shizukuishi.iwate.jp", + "sumita.iwate.jp", + "tanohata.iwate.jp", + "tono.iwate.jp", + "yahaba.iwate.jp", + "yamada.iwate.jp", + "ayagawa.kagawa.jp", + "higashikagawa.kagawa.jp", + "kanonji.kagawa.jp", + "kotohira.kagawa.jp", + "manno.kagawa.jp", + "marugame.kagawa.jp", + "mitoyo.kagawa.jp", + "naoshima.kagawa.jp", + "sanuki.kagawa.jp", + "tadotsu.kagawa.jp", + "takamatsu.kagawa.jp", + "tonosho.kagawa.jp", + "uchinomi.kagawa.jp", + "utazu.kagawa.jp", + "zentsuji.kagawa.jp", + "akune.kagoshima.jp", + "amami.kagoshima.jp", + "hioki.kagoshima.jp", + "isa.kagoshima.jp", + "isen.kagoshima.jp", + "izumi.kagoshima.jp", + "kagoshima.kagoshima.jp", + "kanoya.kagoshima.jp", + "kawanabe.kagoshima.jp", + "kinko.kagoshima.jp", + "kouyama.kagoshima.jp", + "makurazaki.kagoshima.jp", + "matsumoto.kagoshima.jp", + "minamitane.kagoshima.jp", + "nakatane.kagoshima.jp", + "nishinoomote.kagoshima.jp", + "satsumasendai.kagoshima.jp", + "soo.kagoshima.jp", + "tarumizu.kagoshima.jp", + "yusui.kagoshima.jp", + "aikawa.kanagawa.jp", + "atsugi.kanagawa.jp", + "ayase.kanagawa.jp", + "chigasaki.kanagawa.jp", + "ebina.kanagawa.jp", + "fujisawa.kanagawa.jp", + "hadano.kanagawa.jp", + "hakone.kanagawa.jp", + "hiratsuka.kanagawa.jp", + "isehara.kanagawa.jp", + "kaisei.kanagawa.jp", + "kamakura.kanagawa.jp", + "kiyokawa.kanagawa.jp", + "matsuda.kanagawa.jp", + "minamiashigara.kanagawa.jp", + "miura.kanagawa.jp", + "nakai.kanagawa.jp", + "ninomiya.kanagawa.jp", + "odawara.kanagawa.jp", + "oi.kanagawa.jp", + "oiso.kanagawa.jp", + "sagamihara.kanagawa.jp", + "samukawa.kanagawa.jp", + "tsukui.kanagawa.jp", + "yamakita.kanagawa.jp", + "yamato.kanagawa.jp", + "yokosuka.kanagawa.jp", + "yugawara.kanagawa.jp", + "zama.kanagawa.jp", + "zushi.kanagawa.jp", + "aki.kochi.jp", + "geisei.kochi.jp", + "hidaka.kochi.jp", + "higashitsuno.kochi.jp", + "ino.kochi.jp", + "kagami.kochi.jp", + "kami.kochi.jp", + "kitagawa.kochi.jp", + "kochi.kochi.jp", + "mihara.kochi.jp", + "motoyama.kochi.jp", + "muroto.kochi.jp", + "nahari.kochi.jp", + "nakamura.kochi.jp", + "nankoku.kochi.jp", + "nishitosa.kochi.jp", + "niyodogawa.kochi.jp", + "ochi.kochi.jp", + "okawa.kochi.jp", + "otoyo.kochi.jp", + "otsuki.kochi.jp", + "sakawa.kochi.jp", + "sukumo.kochi.jp", + "susaki.kochi.jp", + "tosa.kochi.jp", + "tosashimizu.kochi.jp", + "toyo.kochi.jp", + "tsuno.kochi.jp", + "umaji.kochi.jp", + "yasuda.kochi.jp", + "yusuhara.kochi.jp", + "amakusa.kumamoto.jp", + "arao.kumamoto.jp", + "aso.kumamoto.jp", + "choyo.kumamoto.jp", + "gyokuto.kumamoto.jp", + "kamiamakusa.kumamoto.jp", + "kikuchi.kumamoto.jp", + "kumamoto.kumamoto.jp", + "mashiki.kumamoto.jp", + "mifune.kumamoto.jp", + "minamata.kumamoto.jp", + "minamioguni.kumamoto.jp", + "nagasu.kumamoto.jp", + "nishihara.kumamoto.jp", + "oguni.kumamoto.jp", + "ozu.kumamoto.jp", + "sumoto.kumamoto.jp", + "takamori.kumamoto.jp", + "uki.kumamoto.jp", + "uto.kumamoto.jp", + "yamaga.kumamoto.jp", + "yamato.kumamoto.jp", + "yatsushiro.kumamoto.jp", + "ayabe.kyoto.jp", + "fukuchiyama.kyoto.jp", + "higashiyama.kyoto.jp", + "ide.kyoto.jp", + "ine.kyoto.jp", + "joyo.kyoto.jp", + "kameoka.kyoto.jp", + "kamo.kyoto.jp", + "kita.kyoto.jp", + "kizu.kyoto.jp", + "kumiyama.kyoto.jp", + "kyotamba.kyoto.jp", + "kyotanabe.kyoto.jp", + "kyotango.kyoto.jp", + "maizuru.kyoto.jp", + "minami.kyoto.jp", + "minamiyamashiro.kyoto.jp", + "miyazu.kyoto.jp", + "muko.kyoto.jp", + "nagaokakyo.kyoto.jp", + "nakagyo.kyoto.jp", + "nantan.kyoto.jp", + "oyamazaki.kyoto.jp", + "sakyo.kyoto.jp", + "seika.kyoto.jp", + "tanabe.kyoto.jp", + "uji.kyoto.jp", + "ujitawara.kyoto.jp", + "wazuka.kyoto.jp", + "yamashina.kyoto.jp", + "yawata.kyoto.jp", + "asahi.mie.jp", + "inabe.mie.jp", + "ise.mie.jp", + "kameyama.mie.jp", + "kawagoe.mie.jp", + "kiho.mie.jp", + "kisosaki.mie.jp", + "kiwa.mie.jp", + "komono.mie.jp", + "kumano.mie.jp", + "kuwana.mie.jp", + "matsusaka.mie.jp", + "meiwa.mie.jp", + "mihama.mie.jp", + "minamiise.mie.jp", + "misugi.mie.jp", + "miyama.mie.jp", + "nabari.mie.jp", + "shima.mie.jp", + "suzuka.mie.jp", + "tado.mie.jp", + "taiki.mie.jp", + "taki.mie.jp", + "tamaki.mie.jp", + "toba.mie.jp", + "tsu.mie.jp", + "udono.mie.jp", + "ureshino.mie.jp", + "watarai.mie.jp", + "yokkaichi.mie.jp", + "furukawa.miyagi.jp", + "higashimatsushima.miyagi.jp", + "ishinomaki.miyagi.jp", + "iwanuma.miyagi.jp", + "kakuda.miyagi.jp", + "kami.miyagi.jp", + "kawasaki.miyagi.jp", + "marumori.miyagi.jp", + "matsushima.miyagi.jp", + "minamisanriku.miyagi.jp", + "misato.miyagi.jp", + "murata.miyagi.jp", + "natori.miyagi.jp", + "ogawara.miyagi.jp", + "ohira.miyagi.jp", + "onagawa.miyagi.jp", + "osaki.miyagi.jp", + "rifu.miyagi.jp", + "semine.miyagi.jp", + "shibata.miyagi.jp", + "shichikashuku.miyagi.jp", + "shikama.miyagi.jp", + "shiogama.miyagi.jp", + "shiroishi.miyagi.jp", + "tagajo.miyagi.jp", + "taiwa.miyagi.jp", + "tome.miyagi.jp", + "tomiya.miyagi.jp", + "wakuya.miyagi.jp", + "watari.miyagi.jp", + "yamamoto.miyagi.jp", + "zao.miyagi.jp", + "aya.miyazaki.jp", + "ebino.miyazaki.jp", + "gokase.miyazaki.jp", + "hyuga.miyazaki.jp", + "kadogawa.miyazaki.jp", + "kawaminami.miyazaki.jp", + "kijo.miyazaki.jp", + "kitagawa.miyazaki.jp", + "kitakata.miyazaki.jp", + "kitaura.miyazaki.jp", + "kobayashi.miyazaki.jp", + "kunitomi.miyazaki.jp", + "kushima.miyazaki.jp", + "mimata.miyazaki.jp", + "miyakonojo.miyazaki.jp", + "miyazaki.miyazaki.jp", + "morotsuka.miyazaki.jp", + "nichinan.miyazaki.jp", + "nishimera.miyazaki.jp", + "nobeoka.miyazaki.jp", + "saito.miyazaki.jp", + "shiiba.miyazaki.jp", + "shintomi.miyazaki.jp", + "takaharu.miyazaki.jp", + "takanabe.miyazaki.jp", + "takazaki.miyazaki.jp", + "tsuno.miyazaki.jp", + "achi.nagano.jp", + "agematsu.nagano.jp", + "anan.nagano.jp", + "aoki.nagano.jp", + "asahi.nagano.jp", + "azumino.nagano.jp", + "chikuhoku.nagano.jp", + "chikuma.nagano.jp", + "chino.nagano.jp", + "fujimi.nagano.jp", + "hakuba.nagano.jp", + "hara.nagano.jp", + "hiraya.nagano.jp", + "iida.nagano.jp", + "iijima.nagano.jp", + "iiyama.nagano.jp", + "iizuna.nagano.jp", + "ikeda.nagano.jp", + "ikusaka.nagano.jp", + "ina.nagano.jp", + "karuizawa.nagano.jp", + "kawakami.nagano.jp", + "kiso.nagano.jp", + "kisofukushima.nagano.jp", + "kitaaiki.nagano.jp", + "komagane.nagano.jp", + "komoro.nagano.jp", + "matsukawa.nagano.jp", + "matsumoto.nagano.jp", + "miasa.nagano.jp", + "minamiaiki.nagano.jp", + "minamimaki.nagano.jp", + "minamiminowa.nagano.jp", + "minowa.nagano.jp", + "miyada.nagano.jp", + "miyota.nagano.jp", + "mochizuki.nagano.jp", + "nagano.nagano.jp", + "nagawa.nagano.jp", + "nagiso.nagano.jp", + "nakagawa.nagano.jp", + "nakano.nagano.jp", + "nozawaonsen.nagano.jp", + "obuse.nagano.jp", + "ogawa.nagano.jp", + "okaya.nagano.jp", + "omachi.nagano.jp", + "omi.nagano.jp", + "ookuwa.nagano.jp", + "ooshika.nagano.jp", + "otaki.nagano.jp", + "otari.nagano.jp", + "sakae.nagano.jp", + "sakaki.nagano.jp", + "saku.nagano.jp", + "sakuho.nagano.jp", + "shimosuwa.nagano.jp", + "shinanomachi.nagano.jp", + "shiojiri.nagano.jp", + "suwa.nagano.jp", + "suzaka.nagano.jp", + "takagi.nagano.jp", + "takamori.nagano.jp", + "takayama.nagano.jp", + "tateshina.nagano.jp", + "tatsuno.nagano.jp", + "togakushi.nagano.jp", + "togura.nagano.jp", + "tomi.nagano.jp", + "ueda.nagano.jp", + "wada.nagano.jp", + "yamagata.nagano.jp", + "yamanouchi.nagano.jp", + "yasaka.nagano.jp", + "yasuoka.nagano.jp", + "chijiwa.nagasaki.jp", + "futsu.nagasaki.jp", + "goto.nagasaki.jp", + "hasami.nagasaki.jp", + "hirado.nagasaki.jp", + "iki.nagasaki.jp", + "isahaya.nagasaki.jp", + "kawatana.nagasaki.jp", + "kuchinotsu.nagasaki.jp", + "matsuura.nagasaki.jp", + "nagasaki.nagasaki.jp", + "obama.nagasaki.jp", + "omura.nagasaki.jp", + "oseto.nagasaki.jp", + "saikai.nagasaki.jp", + "sasebo.nagasaki.jp", + "seihi.nagasaki.jp", + "shimabara.nagasaki.jp", + "shinkamigoto.nagasaki.jp", + "togitsu.nagasaki.jp", + "tsushima.nagasaki.jp", + "unzen.nagasaki.jp", + "ando.nara.jp", + "gose.nara.jp", + "heguri.nara.jp", + "higashiyoshino.nara.jp", + "ikaruga.nara.jp", + "ikoma.nara.jp", + "kamikitayama.nara.jp", + "kanmaki.nara.jp", + "kashiba.nara.jp", + "kashihara.nara.jp", + "katsuragi.nara.jp", + "kawai.nara.jp", + "kawakami.nara.jp", + "kawanishi.nara.jp", + "koryo.nara.jp", + "kurotaki.nara.jp", + "mitsue.nara.jp", + "miyake.nara.jp", + "nara.nara.jp", + "nosegawa.nara.jp", + "oji.nara.jp", + "ouda.nara.jp", + "oyodo.nara.jp", + "sakurai.nara.jp", + "sango.nara.jp", + "shimoichi.nara.jp", + "shimokitayama.nara.jp", + "shinjo.nara.jp", + "soni.nara.jp", + "takatori.nara.jp", + "tawaramoto.nara.jp", + "tenkawa.nara.jp", + "tenri.nara.jp", + "uda.nara.jp", + "yamatokoriyama.nara.jp", + "yamatotakada.nara.jp", + "yamazoe.nara.jp", + "yoshino.nara.jp", + "aga.niigata.jp", + "agano.niigata.jp", + "gosen.niigata.jp", + "itoigawa.niigata.jp", + "izumozaki.niigata.jp", + "joetsu.niigata.jp", + "kamo.niigata.jp", + "kariwa.niigata.jp", + "kashiwazaki.niigata.jp", + "minamiuonuma.niigata.jp", + "mitsuke.niigata.jp", + "muika.niigata.jp", + "murakami.niigata.jp", + "myoko.niigata.jp", + "nagaoka.niigata.jp", + "niigata.niigata.jp", + "ojiya.niigata.jp", + "omi.niigata.jp", + "sado.niigata.jp", + "sanjo.niigata.jp", + "seiro.niigata.jp", + "seirou.niigata.jp", + "sekikawa.niigata.jp", + "shibata.niigata.jp", + "tagami.niigata.jp", + "tainai.niigata.jp", + "tochio.niigata.jp", + "tokamachi.niigata.jp", + "tsubame.niigata.jp", + "tsunan.niigata.jp", + "uonuma.niigata.jp", + "yahiko.niigata.jp", + "yoita.niigata.jp", + "yuzawa.niigata.jp", + "beppu.oita.jp", + "bungoono.oita.jp", + "bungotakada.oita.jp", + "hasama.oita.jp", + "hiji.oita.jp", + "himeshima.oita.jp", + "hita.oita.jp", + "kamitsue.oita.jp", + "kokonoe.oita.jp", + "kuju.oita.jp", + "kunisaki.oita.jp", + "kusu.oita.jp", + "oita.oita.jp", + "saiki.oita.jp", + "taketa.oita.jp", + "tsukumi.oita.jp", + "usa.oita.jp", + "usuki.oita.jp", + "yufu.oita.jp", + "akaiwa.okayama.jp", + "asakuchi.okayama.jp", + "bizen.okayama.jp", + "hayashima.okayama.jp", + "ibara.okayama.jp", + "kagamino.okayama.jp", + "kasaoka.okayama.jp", + "kibichuo.okayama.jp", + "kumenan.okayama.jp", + "kurashiki.okayama.jp", + "maniwa.okayama.jp", + "misaki.okayama.jp", + "nagi.okayama.jp", + "niimi.okayama.jp", + "nishiawakura.okayama.jp", + "okayama.okayama.jp", + "satosho.okayama.jp", + "setouchi.okayama.jp", + "shinjo.okayama.jp", + "shoo.okayama.jp", + "soja.okayama.jp", + "takahashi.okayama.jp", + "tamano.okayama.jp", + "tsuyama.okayama.jp", + "wake.okayama.jp", + "yakage.okayama.jp", + "aguni.okinawa.jp", + "ginowan.okinawa.jp", + "ginoza.okinawa.jp", + "gushikami.okinawa.jp", + "haebaru.okinawa.jp", + "higashi.okinawa.jp", + "hirara.okinawa.jp", + "iheya.okinawa.jp", + "ishigaki.okinawa.jp", + "ishikawa.okinawa.jp", + "itoman.okinawa.jp", + "izena.okinawa.jp", + "kadena.okinawa.jp", + "kin.okinawa.jp", + "kitadaito.okinawa.jp", + "kitanakagusuku.okinawa.jp", + "kumejima.okinawa.jp", + "kunigami.okinawa.jp", + "minamidaito.okinawa.jp", + "motobu.okinawa.jp", + "nago.okinawa.jp", + "naha.okinawa.jp", + "nakagusuku.okinawa.jp", + "nakijin.okinawa.jp", + "nanjo.okinawa.jp", + "nishihara.okinawa.jp", + "ogimi.okinawa.jp", + "okinawa.okinawa.jp", + "onna.okinawa.jp", + "shimoji.okinawa.jp", + "taketomi.okinawa.jp", + "tarama.okinawa.jp", + "tokashiki.okinawa.jp", + "tomigusuku.okinawa.jp", + "tonaki.okinawa.jp", + "urasoe.okinawa.jp", + "uruma.okinawa.jp", + "yaese.okinawa.jp", + "yomitan.okinawa.jp", + "yonabaru.okinawa.jp", + "yonaguni.okinawa.jp", + "zamami.okinawa.jp", + "abeno.osaka.jp", + "chihayaakasaka.osaka.jp", + "chuo.osaka.jp", + "daito.osaka.jp", + "fujiidera.osaka.jp", + "habikino.osaka.jp", + "hannan.osaka.jp", + "higashiosaka.osaka.jp", + "higashisumiyoshi.osaka.jp", + "higashiyodogawa.osaka.jp", + "hirakata.osaka.jp", + "ibaraki.osaka.jp", + "ikeda.osaka.jp", + "izumi.osaka.jp", + "izumiotsu.osaka.jp", + "izumisano.osaka.jp", + "kadoma.osaka.jp", + "kaizuka.osaka.jp", + "kanan.osaka.jp", + "kashiwara.osaka.jp", + "katano.osaka.jp", + "kawachinagano.osaka.jp", + "kishiwada.osaka.jp", + "kita.osaka.jp", + "kumatori.osaka.jp", + "matsubara.osaka.jp", + "minato.osaka.jp", + "minoh.osaka.jp", + "misaki.osaka.jp", + "moriguchi.osaka.jp", + "neyagawa.osaka.jp", + "nishi.osaka.jp", + "nose.osaka.jp", + "osakasayama.osaka.jp", + "sakai.osaka.jp", + "sayama.osaka.jp", + "sennan.osaka.jp", + "settsu.osaka.jp", + "shijonawate.osaka.jp", + "shimamoto.osaka.jp", + "suita.osaka.jp", + "tadaoka.osaka.jp", + "taishi.osaka.jp", + "tajiri.osaka.jp", + "takaishi.osaka.jp", + "takatsuki.osaka.jp", + "tondabayashi.osaka.jp", + "toyonaka.osaka.jp", + "toyono.osaka.jp", + "yao.osaka.jp", + "ariake.saga.jp", + "arita.saga.jp", + "fukudomi.saga.jp", + "genkai.saga.jp", + "hamatama.saga.jp", + "hizen.saga.jp", + "imari.saga.jp", + "kamimine.saga.jp", + "kanzaki.saga.jp", + "karatsu.saga.jp", + "kashima.saga.jp", + "kitagata.saga.jp", + "kitahata.saga.jp", + "kiyama.saga.jp", + "kouhoku.saga.jp", + "kyuragi.saga.jp", + "nishiarita.saga.jp", + "ogi.saga.jp", + "omachi.saga.jp", + "ouchi.saga.jp", + "saga.saga.jp", + "shiroishi.saga.jp", + "taku.saga.jp", + "tara.saga.jp", + "tosu.saga.jp", + "yoshinogari.saga.jp", + "arakawa.saitama.jp", + "asaka.saitama.jp", + "chichibu.saitama.jp", + "fujimi.saitama.jp", + "fujimino.saitama.jp", + "fukaya.saitama.jp", + "hanno.saitama.jp", + "hanyu.saitama.jp", + "hasuda.saitama.jp", + "hatogaya.saitama.jp", + "hatoyama.saitama.jp", + "hidaka.saitama.jp", + "higashichichibu.saitama.jp", + "higashimatsuyama.saitama.jp", + "honjo.saitama.jp", + "ina.saitama.jp", + "iruma.saitama.jp", + "iwatsuki.saitama.jp", + "kamiizumi.saitama.jp", + "kamikawa.saitama.jp", + "kamisato.saitama.jp", + "kasukabe.saitama.jp", + "kawagoe.saitama.jp", + "kawaguchi.saitama.jp", + "kawajima.saitama.jp", + "kazo.saitama.jp", + "kitamoto.saitama.jp", + "koshigaya.saitama.jp", + "kounosu.saitama.jp", + "kuki.saitama.jp", + "kumagaya.saitama.jp", + "matsubushi.saitama.jp", + "minano.saitama.jp", + "misato.saitama.jp", + "miyashiro.saitama.jp", + "miyoshi.saitama.jp", + "moroyama.saitama.jp", + "nagatoro.saitama.jp", + "namegawa.saitama.jp", + "niiza.saitama.jp", + "ogano.saitama.jp", + "ogawa.saitama.jp", + "ogose.saitama.jp", + "okegawa.saitama.jp", + "omiya.saitama.jp", + "otaki.saitama.jp", + "ranzan.saitama.jp", + "ryokami.saitama.jp", + "saitama.saitama.jp", + "sakado.saitama.jp", + "satte.saitama.jp", + "sayama.saitama.jp", + "shiki.saitama.jp", + "shiraoka.saitama.jp", + "soka.saitama.jp", + "sugito.saitama.jp", + "toda.saitama.jp", + "tokigawa.saitama.jp", + "tokorozawa.saitama.jp", + "tsurugashima.saitama.jp", + "urawa.saitama.jp", + "warabi.saitama.jp", + "yashio.saitama.jp", + "yokoze.saitama.jp", + "yono.saitama.jp", + "yorii.saitama.jp", + "yoshida.saitama.jp", + "yoshikawa.saitama.jp", + "yoshimi.saitama.jp", + "aisho.shiga.jp", + "gamo.shiga.jp", + "higashiomi.shiga.jp", + "hikone.shiga.jp", + "koka.shiga.jp", + "konan.shiga.jp", + "kosei.shiga.jp", + "koto.shiga.jp", + "kusatsu.shiga.jp", + "maibara.shiga.jp", + "moriyama.shiga.jp", + "nagahama.shiga.jp", + "nishiazai.shiga.jp", + "notogawa.shiga.jp", + "omihachiman.shiga.jp", + "otsu.shiga.jp", + "ritto.shiga.jp", + "ryuoh.shiga.jp", + "takashima.shiga.jp", + "takatsuki.shiga.jp", + "torahime.shiga.jp", + "toyosato.shiga.jp", + "yasu.shiga.jp", + "akagi.shimane.jp", + "ama.shimane.jp", + "gotsu.shimane.jp", + "hamada.shimane.jp", + "higashiizumo.shimane.jp", + "hikawa.shimane.jp", + "hikimi.shimane.jp", + "izumo.shimane.jp", + "kakinoki.shimane.jp", + "masuda.shimane.jp", + "matsue.shimane.jp", + "misato.shimane.jp", + "nishinoshima.shimane.jp", + "ohda.shimane.jp", + "okinoshima.shimane.jp", + "okuizumo.shimane.jp", + "shimane.shimane.jp", + "tamayu.shimane.jp", + "tsuwano.shimane.jp", + "unnan.shimane.jp", + "yakumo.shimane.jp", + "yasugi.shimane.jp", + "yatsuka.shimane.jp", + "arai.shizuoka.jp", + "atami.shizuoka.jp", + "fuji.shizuoka.jp", + "fujieda.shizuoka.jp", + "fujikawa.shizuoka.jp", + "fujinomiya.shizuoka.jp", + "fukuroi.shizuoka.jp", + "gotemba.shizuoka.jp", + "haibara.shizuoka.jp", + "hamamatsu.shizuoka.jp", + "higashiizu.shizuoka.jp", + "ito.shizuoka.jp", + "iwata.shizuoka.jp", + "izu.shizuoka.jp", + "izunokuni.shizuoka.jp", + "kakegawa.shizuoka.jp", + "kannami.shizuoka.jp", + "kawanehon.shizuoka.jp", + "kawazu.shizuoka.jp", + "kikugawa.shizuoka.jp", + "kosai.shizuoka.jp", + "makinohara.shizuoka.jp", + "matsuzaki.shizuoka.jp", + "minamiizu.shizuoka.jp", + "mishima.shizuoka.jp", + "morimachi.shizuoka.jp", + "nishiizu.shizuoka.jp", + "numazu.shizuoka.jp", + "omaezaki.shizuoka.jp", + "shimada.shizuoka.jp", + "shimizu.shizuoka.jp", + "shimoda.shizuoka.jp", + "shizuoka.shizuoka.jp", + "susono.shizuoka.jp", + "yaizu.shizuoka.jp", + "yoshida.shizuoka.jp", + "ashikaga.tochigi.jp", + "bato.tochigi.jp", + "haga.tochigi.jp", + "ichikai.tochigi.jp", + "iwafune.tochigi.jp", + "kaminokawa.tochigi.jp", + "kanuma.tochigi.jp", + "karasuyama.tochigi.jp", + "kuroiso.tochigi.jp", + "mashiko.tochigi.jp", + "mibu.tochigi.jp", + "moka.tochigi.jp", + "motegi.tochigi.jp", + "nasu.tochigi.jp", + "nasushiobara.tochigi.jp", + "nikko.tochigi.jp", + "nishikata.tochigi.jp", + "nogi.tochigi.jp", + "ohira.tochigi.jp", + "ohtawara.tochigi.jp", + "oyama.tochigi.jp", + "sakura.tochigi.jp", + "sano.tochigi.jp", + "shimotsuke.tochigi.jp", + "shioya.tochigi.jp", + "takanezawa.tochigi.jp", + "tochigi.tochigi.jp", + "tsuga.tochigi.jp", + "ujiie.tochigi.jp", + "utsunomiya.tochigi.jp", + "yaita.tochigi.jp", + "aizumi.tokushima.jp", + "anan.tokushima.jp", + "ichiba.tokushima.jp", + "itano.tokushima.jp", + "kainan.tokushima.jp", + "komatsushima.tokushima.jp", + "matsushige.tokushima.jp", + "mima.tokushima.jp", + "minami.tokushima.jp", + "miyoshi.tokushima.jp", + "mugi.tokushima.jp", + "nakagawa.tokushima.jp", + "naruto.tokushima.jp", + "sanagochi.tokushima.jp", + "shishikui.tokushima.jp", + "tokushima.tokushima.jp", + "wajiki.tokushima.jp", + "adachi.tokyo.jp", + "akiruno.tokyo.jp", + "akishima.tokyo.jp", + "aogashima.tokyo.jp", + "arakawa.tokyo.jp", + "bunkyo.tokyo.jp", + "chiyoda.tokyo.jp", + "chofu.tokyo.jp", + "chuo.tokyo.jp", + "edogawa.tokyo.jp", + "fuchu.tokyo.jp", + "fussa.tokyo.jp", + "hachijo.tokyo.jp", + "hachioji.tokyo.jp", + "hamura.tokyo.jp", + "higashikurume.tokyo.jp", + "higashimurayama.tokyo.jp", + "higashiyamato.tokyo.jp", + "hino.tokyo.jp", + "hinode.tokyo.jp", + "hinohara.tokyo.jp", + "inagi.tokyo.jp", + "itabashi.tokyo.jp", + "katsushika.tokyo.jp", + "kita.tokyo.jp", + "kiyose.tokyo.jp", + "kodaira.tokyo.jp", + "koganei.tokyo.jp", + "kokubunji.tokyo.jp", + "komae.tokyo.jp", + "koto.tokyo.jp", + "kouzushima.tokyo.jp", + "kunitachi.tokyo.jp", + "machida.tokyo.jp", + "meguro.tokyo.jp", + "minato.tokyo.jp", + "mitaka.tokyo.jp", + "mizuho.tokyo.jp", + "musashimurayama.tokyo.jp", + "musashino.tokyo.jp", + "nakano.tokyo.jp", + "nerima.tokyo.jp", + "ogasawara.tokyo.jp", + "okutama.tokyo.jp", + "ome.tokyo.jp", + "oshima.tokyo.jp", + "ota.tokyo.jp", + "setagaya.tokyo.jp", + "shibuya.tokyo.jp", + "shinagawa.tokyo.jp", + "shinjuku.tokyo.jp", + "suginami.tokyo.jp", + "sumida.tokyo.jp", + "tachikawa.tokyo.jp", + "taito.tokyo.jp", + "tama.tokyo.jp", + "toshima.tokyo.jp", + "chizu.tottori.jp", + "hino.tottori.jp", + "kawahara.tottori.jp", + "koge.tottori.jp", + "kotoura.tottori.jp", + "misasa.tottori.jp", + "nanbu.tottori.jp", + "nichinan.tottori.jp", + "sakaiminato.tottori.jp", + "tottori.tottori.jp", + "wakasa.tottori.jp", + "yazu.tottori.jp", + "yonago.tottori.jp", + "asahi.toyama.jp", + "fuchu.toyama.jp", + "fukumitsu.toyama.jp", + "funahashi.toyama.jp", + "himi.toyama.jp", + "imizu.toyama.jp", + "inami.toyama.jp", + "johana.toyama.jp", + "kamiichi.toyama.jp", + "kurobe.toyama.jp", + "nakaniikawa.toyama.jp", + "namerikawa.toyama.jp", + "nanto.toyama.jp", + "nyuzen.toyama.jp", + "oyabe.toyama.jp", + "taira.toyama.jp", + "takaoka.toyama.jp", + "tateyama.toyama.jp", + "toga.toyama.jp", + "tonami.toyama.jp", + "toyama.toyama.jp", + "unazuki.toyama.jp", + "uozu.toyama.jp", + "yamada.toyama.jp", + "arida.wakayama.jp", + "aridagawa.wakayama.jp", + "gobo.wakayama.jp", + "hashimoto.wakayama.jp", + "hidaka.wakayama.jp", + "hirogawa.wakayama.jp", + "inami.wakayama.jp", + "iwade.wakayama.jp", + "kainan.wakayama.jp", + "kamitonda.wakayama.jp", + "katsuragi.wakayama.jp", + "kimino.wakayama.jp", + "kinokawa.wakayama.jp", + "kitayama.wakayama.jp", + "koya.wakayama.jp", + "koza.wakayama.jp", + "kozagawa.wakayama.jp", + "kudoyama.wakayama.jp", + "kushimoto.wakayama.jp", + "mihama.wakayama.jp", + "misato.wakayama.jp", + "nachikatsuura.wakayama.jp", + "shingu.wakayama.jp", + "shirahama.wakayama.jp", + "taiji.wakayama.jp", + "tanabe.wakayama.jp", + "wakayama.wakayama.jp", + "yuasa.wakayama.jp", + "yura.wakayama.jp", + "asahi.yamagata.jp", + "funagata.yamagata.jp", + "higashine.yamagata.jp", + "iide.yamagata.jp", + "kahoku.yamagata.jp", + "kaminoyama.yamagata.jp", + "kaneyama.yamagata.jp", + "kawanishi.yamagata.jp", + "mamurogawa.yamagata.jp", + "mikawa.yamagata.jp", + "murayama.yamagata.jp", + "nagai.yamagata.jp", + "nakayama.yamagata.jp", + "nanyo.yamagata.jp", + "nishikawa.yamagata.jp", + "obanazawa.yamagata.jp", + "oe.yamagata.jp", + "oguni.yamagata.jp", + "ohkura.yamagata.jp", + "oishida.yamagata.jp", + "sagae.yamagata.jp", + "sakata.yamagata.jp", + "sakegawa.yamagata.jp", + "shinjo.yamagata.jp", + "shirataka.yamagata.jp", + "shonai.yamagata.jp", + "takahata.yamagata.jp", + "tendo.yamagata.jp", + "tozawa.yamagata.jp", + "tsuruoka.yamagata.jp", + "yamagata.yamagata.jp", + "yamanobe.yamagata.jp", + "yonezawa.yamagata.jp", + "yuza.yamagata.jp", + "abu.yamaguchi.jp", + "hagi.yamaguchi.jp", + "hikari.yamaguchi.jp", + "hofu.yamaguchi.jp", + "iwakuni.yamaguchi.jp", + "kudamatsu.yamaguchi.jp", + "mitou.yamaguchi.jp", + "nagato.yamaguchi.jp", + "oshima.yamaguchi.jp", + "shimonoseki.yamaguchi.jp", + "shunan.yamaguchi.jp", + "tabuse.yamaguchi.jp", + "tokuyama.yamaguchi.jp", + "toyota.yamaguchi.jp", + "ube.yamaguchi.jp", + "yuu.yamaguchi.jp", + "chuo.yamanashi.jp", + "doshi.yamanashi.jp", + "fuefuki.yamanashi.jp", + "fujikawa.yamanashi.jp", + "fujikawaguchiko.yamanashi.jp", + "fujiyoshida.yamanashi.jp", + "hayakawa.yamanashi.jp", + "hokuto.yamanashi.jp", + "ichikawamisato.yamanashi.jp", + "kai.yamanashi.jp", + "kofu.yamanashi.jp", + "koshu.yamanashi.jp", + "kosuge.yamanashi.jp", + "minami-alps.yamanashi.jp", + "minobu.yamanashi.jp", + "nakamichi.yamanashi.jp", + "nanbu.yamanashi.jp", + "narusawa.yamanashi.jp", + "nirasaki.yamanashi.jp", + "nishikatsura.yamanashi.jp", + "oshino.yamanashi.jp", + "otsuki.yamanashi.jp", + "showa.yamanashi.jp", + "tabayama.yamanashi.jp", + "tsuru.yamanashi.jp", + "uenohara.yamanashi.jp", + "yamanakako.yamanashi.jp", + "yamanashi.yamanashi.jp", + "ke", + "ac.ke", + "co.ke", + "go.ke", + "info.ke", + "me.ke", + "mobi.ke", + "ne.ke", + "or.ke", + "sc.ke", + "kg", + "com.kg", + "edu.kg", + "gov.kg", + "mil.kg", + "net.kg", + "org.kg", + "*.kh", + "ki", + "biz.ki", + "com.ki", + "edu.ki", + "gov.ki", + "info.ki", + "net.ki", + "org.ki", + "km", + "ass.km", + "com.km", + "edu.km", + "gov.km", + "mil.km", + "nom.km", + "org.km", + "prd.km", + "tm.km", + "asso.km", + "coop.km", + "gouv.km", + "medecin.km", + "notaires.km", + "pharmaciens.km", + "presse.km", + "veterinaire.km", + "kn", + "edu.kn", + "gov.kn", + "net.kn", + "org.kn", + "kp", + "com.kp", + "edu.kp", + "gov.kp", + "org.kp", + "rep.kp", + "tra.kp", + "kr", + "ac.kr", + "co.kr", + "es.kr", + "go.kr", + "hs.kr", + "kg.kr", + "mil.kr", + "ms.kr", + "ne.kr", + "or.kr", + "pe.kr", + "re.kr", + "sc.kr", + "busan.kr", + "chungbuk.kr", + "chungnam.kr", + "daegu.kr", + "daejeon.kr", + "gangwon.kr", + "gwangju.kr", + "gyeongbuk.kr", + "gyeonggi.kr", + "gyeongnam.kr", + "incheon.kr", + "jeju.kr", + "jeonbuk.kr", + "jeonnam.kr", + "seoul.kr", + "ulsan.kr", + "kw", + "com.kw", + "edu.kw", + "emb.kw", + "gov.kw", + "ind.kw", + "net.kw", + "org.kw", + "ky", + "com.ky", + "edu.ky", + "net.ky", + "org.ky", + "kz", + "com.kz", + "edu.kz", + "gov.kz", + "mil.kz", + "net.kz", + "org.kz", + "la", + "com.la", + "edu.la", + "gov.la", + "info.la", + "int.la", + "net.la", + "org.la", + "per.la", + "lb", + "com.lb", + "edu.lb", + "gov.lb", + "net.lb", + "org.lb", + "lc", + "co.lc", + "com.lc", + "edu.lc", + "gov.lc", + "net.lc", + "org.lc", + "li", + "lk", + "ac.lk", + "assn.lk", + "com.lk", + "edu.lk", + "gov.lk", + "grp.lk", + "hotel.lk", + "int.lk", + "ltd.lk", + "net.lk", + "ngo.lk", + "org.lk", + "sch.lk", + "soc.lk", + "web.lk", + "lr", + "com.lr", + "edu.lr", + "gov.lr", + "net.lr", + "org.lr", + "ls", + "ac.ls", + "biz.ls", + "co.ls", + "edu.ls", + "gov.ls", + "info.ls", + "net.ls", + "org.ls", + "sc.ls", + "lt", + "gov.lt", + "lu", + "lv", + "asn.lv", + "com.lv", + "conf.lv", + "edu.lv", + "gov.lv", + "id.lv", + "mil.lv", + "net.lv", + "org.lv", + "ly", + "com.ly", + "edu.ly", + "gov.ly", + "id.ly", + "med.ly", + "net.ly", + "org.ly", + "plc.ly", + "sch.ly", + "ma", + "ac.ma", + "co.ma", + "gov.ma", + "net.ma", + "org.ma", + "press.ma", + "mc", + "asso.mc", + "tm.mc", + "md", + "me", + "ac.me", + "co.me", + "edu.me", + "gov.me", + "its.me", + "net.me", + "org.me", + "priv.me", + "mg", + "co.mg", + "com.mg", + "edu.mg", + "gov.mg", + "mil.mg", + "nom.mg", + "org.mg", + "prd.mg", + "mh", + "mil", + "mk", + "com.mk", + "edu.mk", + "gov.mk", + "inf.mk", + "name.mk", + "net.mk", + "org.mk", + "ml", + "com.ml", + "edu.ml", + "gouv.ml", + "gov.ml", + "net.ml", + "org.ml", + "presse.ml", + "*.mm", + "mn", + "edu.mn", + "gov.mn", + "org.mn", + "mo", + "com.mo", + "edu.mo", + "gov.mo", + "net.mo", + "org.mo", + "mobi", + "mp", + "mq", + "mr", + "gov.mr", + "ms", + "com.ms", + "edu.ms", + "gov.ms", + "net.ms", + "org.ms", + "mt", + "com.mt", + "edu.mt", + "net.mt", + "org.mt", + "mu", + "ac.mu", + "co.mu", + "com.mu", + "gov.mu", + "net.mu", + "or.mu", + "org.mu", + "museum", + "mv", + "aero.mv", + "biz.mv", + "com.mv", + "coop.mv", + "edu.mv", + "gov.mv", + "info.mv", + "int.mv", + "mil.mv", + "museum.mv", + "name.mv", + "net.mv", + "org.mv", + "pro.mv", + "mw", + "ac.mw", + "biz.mw", + "co.mw", + "com.mw", + "coop.mw", + "edu.mw", + "gov.mw", + "int.mw", + "net.mw", + "org.mw", + "mx", + "com.mx", + "edu.mx", + "gob.mx", + "net.mx", + "org.mx", + "my", + "biz.my", + "com.my", + "edu.my", + "gov.my", + "mil.my", + "name.my", + "net.my", + "org.my", + "mz", + "ac.mz", + "adv.mz", + "co.mz", + "edu.mz", + "gov.mz", + "mil.mz", + "net.mz", + "org.mz", + "na", + "alt.na", + "co.na", + "com.na", + "gov.na", + "net.na", + "org.na", + "name", + "nc", + "asso.nc", + "nom.nc", + "ne", + "net", + "nf", + "arts.nf", + "com.nf", + "firm.nf", + "info.nf", + "net.nf", + "other.nf", + "per.nf", + "rec.nf", + "store.nf", + "web.nf", + "ng", + "com.ng", + "edu.ng", + "gov.ng", + "i.ng", + "mil.ng", + "mobi.ng", + "name.ng", + "net.ng", + "org.ng", + "sch.ng", + "ni", + "ac.ni", + "biz.ni", + "co.ni", + "com.ni", + "edu.ni", + "gob.ni", + "in.ni", + "info.ni", + "int.ni", + "mil.ni", + "net.ni", + "nom.ni", + "org.ni", + "web.ni", + "nl", + "no", + "fhs.no", + "folkebibl.no", + "fylkesbibl.no", + "idrett.no", + "museum.no", + "priv.no", + "vgs.no", + "dep.no", + "herad.no", + "kommune.no", + "mil.no", + "stat.no", + "aa.no", + "ah.no", + "bu.no", + "fm.no", + "hl.no", + "hm.no", + "jan-mayen.no", + "mr.no", + "nl.no", + "nt.no", + "of.no", + "ol.no", + "oslo.no", + "rl.no", + "sf.no", + "st.no", + "svalbard.no", + "tm.no", + "tr.no", + "va.no", + "vf.no", + "gs.aa.no", + "gs.ah.no", + "gs.bu.no", + "gs.fm.no", + "gs.hl.no", + "gs.hm.no", + "gs.jan-mayen.no", + "gs.mr.no", + "gs.nl.no", + "gs.nt.no", + "gs.of.no", + "gs.ol.no", + "gs.oslo.no", + "gs.rl.no", + "gs.sf.no", + "gs.st.no", + "gs.svalbard.no", + "gs.tm.no", + "gs.tr.no", + "gs.va.no", + "gs.vf.no", + "akrehamn.no", + "åkrehamn.no", + "algard.no", + "ålgård.no", + "arna.no", + "bronnoysund.no", + "brønnøysund.no", + "brumunddal.no", + "bryne.no", + "drobak.no", + "drøbak.no", + "egersund.no", + "fetsund.no", + "floro.no", + "florø.no", + "fredrikstad.no", + "hokksund.no", + "honefoss.no", + "hønefoss.no", + "jessheim.no", + "jorpeland.no", + "jørpeland.no", + "kirkenes.no", + "kopervik.no", + "krokstadelva.no", + "langevag.no", + "langevåg.no", + "leirvik.no", + "mjondalen.no", + "mjøndalen.no", + "mo-i-rana.no", + "mosjoen.no", + "mosjøen.no", + "nesoddtangen.no", + "orkanger.no", + "osoyro.no", + "osøyro.no", + "raholt.no", + "råholt.no", + "sandnessjoen.no", + "sandnessjøen.no", + "skedsmokorset.no", + "slattum.no", + "spjelkavik.no", + "stathelle.no", + "stavern.no", + "stjordalshalsen.no", + "stjørdalshalsen.no", + "tananger.no", + "tranby.no", + "vossevangen.no", + "aarborte.no", + "aejrie.no", + "afjord.no", + "åfjord.no", + "agdenes.no", + "nes.akershus.no", + "aknoluokta.no", + "ákŋoluokta.no", + "al.no", + "ål.no", + "alaheadju.no", + "álaheadju.no", + "alesund.no", + "ålesund.no", + "alstahaug.no", + "alta.no", + "áltá.no", + "alvdal.no", + "amli.no", + "åmli.no", + "amot.no", + "åmot.no", + "andasuolo.no", + "andebu.no", + "andoy.no", + "andøy.no", + "ardal.no", + "årdal.no", + "aremark.no", + "arendal.no", + "ås.no", + "aseral.no", + "åseral.no", + "asker.no", + "askim.no", + "askoy.no", + "askøy.no", + "askvoll.no", + "asnes.no", + "åsnes.no", + "audnedaln.no", + "aukra.no", + "aure.no", + "aurland.no", + "aurskog-holand.no", + "aurskog-høland.no", + "austevoll.no", + "austrheim.no", + "averoy.no", + "averøy.no", + "badaddja.no", + "bådåddjå.no", + "bærum.no", + "bahcavuotna.no", + "báhcavuotna.no", + "bahccavuotna.no", + "báhccavuotna.no", + "baidar.no", + "báidár.no", + "bajddar.no", + "bájddar.no", + "balat.no", + "bálát.no", + "balestrand.no", + "ballangen.no", + "balsfjord.no", + "bamble.no", + "bardu.no", + "barum.no", + "batsfjord.no", + "båtsfjord.no", + "bearalvahki.no", + "bearalváhki.no", + "beardu.no", + "beiarn.no", + "berg.no", + "bergen.no", + "berlevag.no", + "berlevåg.no", + "bievat.no", + "bievát.no", + "bindal.no", + "birkenes.no", + "bjarkoy.no", + "bjarkøy.no", + "bjerkreim.no", + "bjugn.no", + "bodo.no", + "bodø.no", + "bokn.no", + "bomlo.no", + "bømlo.no", + "bremanger.no", + "bronnoy.no", + "brønnøy.no", + "budejju.no", + "nes.buskerud.no", + "bygland.no", + "bykle.no", + "cahcesuolo.no", + "čáhcesuolo.no", + "davvenjarga.no", + "davvenjárga.no", + "davvesiida.no", + "deatnu.no", + "dielddanuorri.no", + "divtasvuodna.no", + "divttasvuotna.no", + "donna.no", + "dønna.no", + "dovre.no", + "drammen.no", + "drangedal.no", + "dyroy.no", + "dyrøy.no", + "eid.no", + "eidfjord.no", + "eidsberg.no", + "eidskog.no", + "eidsvoll.no", + "eigersund.no", + "elverum.no", + "enebakk.no", + "engerdal.no", + "etne.no", + "etnedal.no", + "evenassi.no", + "evenášši.no", + "evenes.no", + "evje-og-hornnes.no", + "farsund.no", + "fauske.no", + "fedje.no", + "fet.no", + "finnoy.no", + "finnøy.no", + "fitjar.no", + "fjaler.no", + "fjell.no", + "fla.no", + "flå.no", + "flakstad.no", + "flatanger.no", + "flekkefjord.no", + "flesberg.no", + "flora.no", + "folldal.no", + "forde.no", + "førde.no", + "forsand.no", + "fosnes.no", + "fræna.no", + "frana.no", + "frei.no", + "frogn.no", + "froland.no", + "frosta.no", + "froya.no", + "frøya.no", + "fuoisku.no", + "fuossko.no", + "fusa.no", + "fyresdal.no", + "gaivuotna.no", + "gáivuotna.no", + "galsa.no", + "gálsá.no", + "gamvik.no", + "gangaviika.no", + "gáŋgaviika.no", + "gaular.no", + "gausdal.no", + "giehtavuoatna.no", + "gildeskal.no", + "gildeskål.no", + "giske.no", + "gjemnes.no", + "gjerdrum.no", + "gjerstad.no", + "gjesdal.no", + "gjovik.no", + "gjøvik.no", + "gloppen.no", + "gol.no", + "gran.no", + "grane.no", + "granvin.no", + "gratangen.no", + "grimstad.no", + "grong.no", + "grue.no", + "gulen.no", + "guovdageaidnu.no", + "ha.no", + "hå.no", + "habmer.no", + "hábmer.no", + "hadsel.no", + "hægebostad.no", + "hagebostad.no", + "halden.no", + "halsa.no", + "hamar.no", + "hamaroy.no", + "hammarfeasta.no", + "hámmárfeasta.no", + "hammerfest.no", + "hapmir.no", + "hápmir.no", + "haram.no", + "hareid.no", + "harstad.no", + "hasvik.no", + "hattfjelldal.no", + "haugesund.no", + "os.hedmark.no", + "valer.hedmark.no", + "våler.hedmark.no", + "hemne.no", + "hemnes.no", + "hemsedal.no", + "hitra.no", + "hjartdal.no", + "hjelmeland.no", + "hobol.no", + "hobøl.no", + "hof.no", + "hol.no", + "hole.no", + "holmestrand.no", + "holtalen.no", + "holtålen.no", + "os.hordaland.no", + "hornindal.no", + "horten.no", + "hoyanger.no", + "høyanger.no", + "hoylandet.no", + "høylandet.no", + "hurdal.no", + "hurum.no", + "hvaler.no", + "hyllestad.no", + "ibestad.no", + "inderoy.no", + "inderøy.no", + "iveland.no", + "ivgu.no", + "jevnaker.no", + "jolster.no", + "jølster.no", + "jondal.no", + "kafjord.no", + "kåfjord.no", + "karasjohka.no", + "kárášjohka.no", + "karasjok.no", + "karlsoy.no", + "karmoy.no", + "karmøy.no", + "kautokeino.no", + "klabu.no", + "klæbu.no", + "klepp.no", + "kongsberg.no", + "kongsvinger.no", + "kraanghke.no", + "kråanghke.no", + "kragero.no", + "kragerø.no", + "kristiansand.no", + "kristiansund.no", + "krodsherad.no", + "krødsherad.no", + "kvæfjord.no", + "kvænangen.no", + "kvafjord.no", + "kvalsund.no", + "kvam.no", + "kvanangen.no", + "kvinesdal.no", + "kvinnherad.no", + "kviteseid.no", + "kvitsoy.no", + "kvitsøy.no", + "laakesvuemie.no", + "lærdal.no", + "lahppi.no", + "láhppi.no", + "lardal.no", + "larvik.no", + "lavagis.no", + "lavangen.no", + "leangaviika.no", + "leaŋgaviika.no", + "lebesby.no", + "leikanger.no", + "leirfjord.no", + "leka.no", + "leksvik.no", + "lenvik.no", + "lerdal.no", + "lesja.no", + "levanger.no", + "lier.no", + "lierne.no", + "lillehammer.no", + "lillesand.no", + "lindas.no", + "lindås.no", + "lindesnes.no", + "loabat.no", + "loabát.no", + "lodingen.no", + "lødingen.no", + "lom.no", + "loppa.no", + "lorenskog.no", + "lørenskog.no", + "loten.no", + "løten.no", + "lund.no", + "lunner.no", + "luroy.no", + "lurøy.no", + "luster.no", + "lyngdal.no", + "lyngen.no", + "malatvuopmi.no", + "málatvuopmi.no", + "malselv.no", + "målselv.no", + "malvik.no", + "mandal.no", + "marker.no", + "marnardal.no", + "masfjorden.no", + "masoy.no", + "måsøy.no", + "matta-varjjat.no", + "mátta-várjjat.no", + "meland.no", + "meldal.no", + "melhus.no", + "meloy.no", + "meløy.no", + "meraker.no", + "meråker.no", + "midsund.no", + "midtre-gauldal.no", + "moareke.no", + "moåreke.no", + "modalen.no", + "modum.no", + "molde.no", + "heroy.more-og-romsdal.no", + "sande.more-og-romsdal.no", + "herøy.møre-og-romsdal.no", + "sande.møre-og-romsdal.no", + "moskenes.no", + "moss.no", + "mosvik.no", + "muosat.no", + "muosát.no", + "naamesjevuemie.no", + "nååmesjevuemie.no", + "nærøy.no", + "namdalseid.no", + "namsos.no", + "namsskogan.no", + "nannestad.no", + "naroy.no", + "narviika.no", + "narvik.no", + "naustdal.no", + "navuotna.no", + "návuotna.no", + "nedre-eiker.no", + "nesna.no", + "nesodden.no", + "nesseby.no", + "nesset.no", + "nissedal.no", + "nittedal.no", + "nord-aurdal.no", + "nord-fron.no", + "nord-odal.no", + "norddal.no", + "nordkapp.no", + "bo.nordland.no", + "bø.nordland.no", + "heroy.nordland.no", + "herøy.nordland.no", + "nordre-land.no", + "nordreisa.no", + "nore-og-uvdal.no", + "notodden.no", + "notteroy.no", + "nøtterøy.no", + "odda.no", + "oksnes.no", + "øksnes.no", + "omasvuotna.no", + "oppdal.no", + "oppegard.no", + "oppegård.no", + "orkdal.no", + "orland.no", + "ørland.no", + "orskog.no", + "ørskog.no", + "orsta.no", + "ørsta.no", + "osen.no", + "osteroy.no", + "osterøy.no", + "valer.ostfold.no", + "våler.østfold.no", + "ostre-toten.no", + "østre-toten.no", + "overhalla.no", + "ovre-eiker.no", + "øvre-eiker.no", + "oyer.no", + "øyer.no", + "oygarden.no", + "øygarden.no", + "oystre-slidre.no", + "øystre-slidre.no", + "porsanger.no", + "porsangu.no", + "porsáŋgu.no", + "porsgrunn.no", + "rade.no", + "råde.no", + "radoy.no", + "radøy.no", + "rælingen.no", + "rahkkeravju.no", + "ráhkkerávju.no", + "raisa.no", + "ráisa.no", + "rakkestad.no", + "ralingen.no", + "rana.no", + "randaberg.no", + "rauma.no", + "rendalen.no", + "rennebu.no", + "rennesoy.no", + "rennesøy.no", + "rindal.no", + "ringebu.no", + "ringerike.no", + "ringsaker.no", + "risor.no", + "risør.no", + "rissa.no", + "roan.no", + "rodoy.no", + "rødøy.no", + "rollag.no", + "romsa.no", + "romskog.no", + "rømskog.no", + "roros.no", + "røros.no", + "rost.no", + "røst.no", + "royken.no", + "røyken.no", + "royrvik.no", + "røyrvik.no", + "ruovat.no", + "rygge.no", + "salangen.no", + "salat.no", + "sálat.no", + "sálát.no", + "saltdal.no", + "samnanger.no", + "sandefjord.no", + "sandnes.no", + "sandoy.no", + "sandøy.no", + "sarpsborg.no", + "sauda.no", + "sauherad.no", + "sel.no", + "selbu.no", + "selje.no", + "seljord.no", + "siellak.no", + "sigdal.no", + "siljan.no", + "sirdal.no", + "skanit.no", + "skánit.no", + "skanland.no", + "skånland.no", + "skaun.no", + "skedsmo.no", + "ski.no", + "skien.no", + "skierva.no", + "skiervá.no", + "skiptvet.no", + "skjak.no", + "skjåk.no", + "skjervoy.no", + "skjervøy.no", + "skodje.no", + "smola.no", + "smøla.no", + "snaase.no", + "snåase.no", + "snasa.no", + "snåsa.no", + "snillfjord.no", + "snoasa.no", + "sogndal.no", + "sogne.no", + "søgne.no", + "sokndal.no", + "sola.no", + "solund.no", + "somna.no", + "sømna.no", + "sondre-land.no", + "søndre-land.no", + "songdalen.no", + "sor-aurdal.no", + "sør-aurdal.no", + "sor-fron.no", + "sør-fron.no", + "sor-odal.no", + "sør-odal.no", + "sor-varanger.no", + "sør-varanger.no", + "sorfold.no", + "sørfold.no", + "sorreisa.no", + "sørreisa.no", + "sortland.no", + "sorum.no", + "sørum.no", + "spydeberg.no", + "stange.no", + "stavanger.no", + "steigen.no", + "steinkjer.no", + "stjordal.no", + "stjørdal.no", + "stokke.no", + "stor-elvdal.no", + "stord.no", + "stordal.no", + "storfjord.no", + "strand.no", + "stranda.no", + "stryn.no", + "sula.no", + "suldal.no", + "sund.no", + "sunndal.no", + "surnadal.no", + "sveio.no", + "svelvik.no", + "sykkylven.no", + "tana.no", + "bo.telemark.no", + "bø.telemark.no", + "time.no", + "tingvoll.no", + "tinn.no", + "tjeldsund.no", + "tjome.no", + "tjøme.no", + "tokke.no", + "tolga.no", + "tonsberg.no", + "tønsberg.no", + "torsken.no", + "træna.no", + "trana.no", + "tranoy.no", + "tranøy.no", + "troandin.no", + "trogstad.no", + "trøgstad.no", + "tromsa.no", + "tromso.no", + "tromsø.no", + "trondheim.no", + "trysil.no", + "tvedestrand.no", + "tydal.no", + "tynset.no", + "tysfjord.no", + "tysnes.no", + "tysvær.no", + "tysvar.no", + "ullensaker.no", + "ullensvang.no", + "ulvik.no", + "unjarga.no", + "unjárga.no", + "utsira.no", + "vaapste.no", + "vadso.no", + "vadsø.no", + "værøy.no", + "vaga.no", + "vågå.no", + "vagan.no", + "vågan.no", + "vagsoy.no", + "vågsøy.no", + "vaksdal.no", + "valle.no", + "vang.no", + "vanylven.no", + "vardo.no", + "vardø.no", + "varggat.no", + "várggát.no", + "varoy.no", + "vefsn.no", + "vega.no", + "vegarshei.no", + "vegårshei.no", + "vennesla.no", + "verdal.no", + "verran.no", + "vestby.no", + "sande.vestfold.no", + "vestnes.no", + "vestre-slidre.no", + "vestre-toten.no", + "vestvagoy.no", + "vestvågøy.no", + "vevelstad.no", + "vik.no", + "vikna.no", + "vindafjord.no", + "voagat.no", + "volda.no", + "voss.no", + "*.np", + "nr", + "biz.nr", + "com.nr", + "edu.nr", + "gov.nr", + "info.nr", + "net.nr", + "org.nr", + "nu", + "nz", + "ac.nz", + "co.nz", + "cri.nz", + "geek.nz", + "gen.nz", + "govt.nz", + "health.nz", + "iwi.nz", + "kiwi.nz", + "maori.nz", + "māori.nz", + "mil.nz", + "net.nz", + "org.nz", + "parliament.nz", + "school.nz", + "om", + "co.om", + "com.om", + "edu.om", + "gov.om", + "med.om", + "museum.om", + "net.om", + "org.om", + "pro.om", + "onion", + "org", + "pa", + "abo.pa", + "ac.pa", + "com.pa", + "edu.pa", + "gob.pa", + "ing.pa", + "med.pa", + "net.pa", + "nom.pa", + "org.pa", + "sld.pa", + "pe", + "com.pe", + "edu.pe", + "gob.pe", + "mil.pe", + "net.pe", + "nom.pe", + "org.pe", + "pf", + "com.pf", + "edu.pf", + "org.pf", + "*.pg", + "ph", + "com.ph", + "edu.ph", + "gov.ph", + "i.ph", + "mil.ph", + "net.ph", + "ngo.ph", + "org.ph", + "pk", + "ac.pk", + "biz.pk", + "com.pk", + "edu.pk", + "fam.pk", + "gkp.pk", + "gob.pk", + "gog.pk", + "gok.pk", + "gon.pk", + "gop.pk", + "gos.pk", + "gov.pk", + "net.pk", + "org.pk", + "web.pk", + "pl", + "com.pl", + "net.pl", + "org.pl", + "agro.pl", + "aid.pl", + "atm.pl", + "auto.pl", + "biz.pl", + "edu.pl", + "gmina.pl", + "gsm.pl", + "info.pl", + "mail.pl", + "media.pl", + "miasta.pl", + "mil.pl", + "nieruchomosci.pl", + "nom.pl", + "pc.pl", + "powiat.pl", + "priv.pl", + "realestate.pl", + "rel.pl", + "sex.pl", + "shop.pl", + "sklep.pl", + "sos.pl", + "szkola.pl", + "targi.pl", + "tm.pl", + "tourism.pl", + "travel.pl", + "turystyka.pl", + "gov.pl", + "ap.gov.pl", + "griw.gov.pl", + "ic.gov.pl", + "is.gov.pl", + "kmpsp.gov.pl", + "konsulat.gov.pl", + "kppsp.gov.pl", + "kwp.gov.pl", + "kwpsp.gov.pl", + "mup.gov.pl", + "mw.gov.pl", + "oia.gov.pl", + "oirm.gov.pl", + "oke.gov.pl", + "oow.gov.pl", + "oschr.gov.pl", + "oum.gov.pl", + "pa.gov.pl", + "pinb.gov.pl", + "piw.gov.pl", + "po.gov.pl", + "pr.gov.pl", + "psp.gov.pl", + "psse.gov.pl", + "pup.gov.pl", + "rzgw.gov.pl", + "sa.gov.pl", + "sdn.gov.pl", + "sko.gov.pl", + "so.gov.pl", + "sr.gov.pl", + "starostwo.gov.pl", + "ug.gov.pl", + "ugim.gov.pl", + "um.gov.pl", + "umig.gov.pl", + "upow.gov.pl", + "uppo.gov.pl", + "us.gov.pl", + "uw.gov.pl", + "uzs.gov.pl", + "wif.gov.pl", + "wiih.gov.pl", + "winb.gov.pl", + "wios.gov.pl", + "witd.gov.pl", + "wiw.gov.pl", + "wkz.gov.pl", + "wsa.gov.pl", + "wskr.gov.pl", + "wsse.gov.pl", + "wuoz.gov.pl", + "wzmiuw.gov.pl", + "zp.gov.pl", + "zpisdn.gov.pl", + "augustow.pl", + "babia-gora.pl", + "bedzin.pl", + "beskidy.pl", + "bialowieza.pl", + "bialystok.pl", + "bielawa.pl", + "bieszczady.pl", + "boleslawiec.pl", + "bydgoszcz.pl", + "bytom.pl", + "cieszyn.pl", + "czeladz.pl", + "czest.pl", + "dlugoleka.pl", + "elblag.pl", + "elk.pl", + "glogow.pl", + "gniezno.pl", + "gorlice.pl", + "grajewo.pl", + "ilawa.pl", + "jaworzno.pl", + "jelenia-gora.pl", + "jgora.pl", + "kalisz.pl", + "karpacz.pl", + "kartuzy.pl", + "kaszuby.pl", + "katowice.pl", + "kazimierz-dolny.pl", + "kepno.pl", + "ketrzyn.pl", + "klodzko.pl", + "kobierzyce.pl", + "kolobrzeg.pl", + "konin.pl", + "konskowola.pl", + "kutno.pl", + "lapy.pl", + "lebork.pl", + "legnica.pl", + "lezajsk.pl", + "limanowa.pl", + "lomza.pl", + "lowicz.pl", + "lubin.pl", + "lukow.pl", + "malbork.pl", + "malopolska.pl", + "mazowsze.pl", + "mazury.pl", + "mielec.pl", + "mielno.pl", + "mragowo.pl", + "naklo.pl", + "nowaruda.pl", + "nysa.pl", + "olawa.pl", + "olecko.pl", + "olkusz.pl", + "olsztyn.pl", + "opoczno.pl", + "opole.pl", + "ostroda.pl", + "ostroleka.pl", + "ostrowiec.pl", + "ostrowwlkp.pl", + "pila.pl", + "pisz.pl", + "podhale.pl", + "podlasie.pl", + "polkowice.pl", + "pomorskie.pl", + "pomorze.pl", + "prochowice.pl", + "pruszkow.pl", + "przeworsk.pl", + "pulawy.pl", + "radom.pl", + "rawa-maz.pl", + "rybnik.pl", + "rzeszow.pl", + "sanok.pl", + "sejny.pl", + "skoczow.pl", + "slask.pl", + "slupsk.pl", + "sosnowiec.pl", + "stalowa-wola.pl", + "starachowice.pl", + "stargard.pl", + "suwalki.pl", + "swidnica.pl", + "swiebodzin.pl", + "swinoujscie.pl", + "szczecin.pl", + "szczytno.pl", + "tarnobrzeg.pl", + "tgory.pl", + "turek.pl", + "tychy.pl", + "ustka.pl", + "walbrzych.pl", + "warmia.pl", + "warszawa.pl", + "waw.pl", + "wegrow.pl", + "wielun.pl", + "wlocl.pl", + "wloclawek.pl", + "wodzislaw.pl", + "wolomin.pl", + "wroclaw.pl", + "zachpomor.pl", + "zagan.pl", + "zarow.pl", + "zgora.pl", + "zgorzelec.pl", + "pm", + "pn", + "co.pn", + "edu.pn", + "gov.pn", + "net.pn", + "org.pn", + "post", + "pr", + "biz.pr", + "com.pr", + "edu.pr", + "gov.pr", + "info.pr", + "isla.pr", + "name.pr", + "net.pr", + "org.pr", + "pro.pr", + "ac.pr", + "est.pr", + "prof.pr", + "pro", + "aaa.pro", + "aca.pro", + "acct.pro", + "avocat.pro", + "bar.pro", + "cpa.pro", + "eng.pro", + "jur.pro", + "law.pro", + "med.pro", + "recht.pro", + "ps", + "com.ps", + "edu.ps", + "gov.ps", + "net.ps", + "org.ps", + "plo.ps", + "sec.ps", + "pt", + "com.pt", + "edu.pt", + "gov.pt", + "int.pt", + "net.pt", + "nome.pt", + "org.pt", + "publ.pt", + "pw", + "belau.pw", + "co.pw", + "ed.pw", + "go.pw", + "or.pw", + "py", + "com.py", + "coop.py", + "edu.py", + "gov.py", + "mil.py", + "net.py", + "org.py", + "qa", + "com.qa", + "edu.qa", + "gov.qa", + "mil.qa", + "name.qa", + "net.qa", + "org.qa", + "sch.qa", + "re", + "asso.re", + "com.re", + "ro", + "arts.ro", + "com.ro", + "firm.ro", + "info.ro", + "nom.ro", + "nt.ro", + "org.ro", + "rec.ro", + "store.ro", + "tm.ro", + "www.ro", + "rs", + "ac.rs", + "co.rs", + "edu.rs", + "gov.rs", + "in.rs", + "org.rs", + "ru", + "rw", + "ac.rw", + "co.rw", + "coop.rw", + "gov.rw", + "mil.rw", + "net.rw", + "org.rw", + "sa", + "com.sa", + "edu.sa", + "gov.sa", + "med.sa", + "net.sa", + "org.sa", + "pub.sa", + "sch.sa", + "sb", + "com.sb", + "edu.sb", + "gov.sb", + "net.sb", + "org.sb", + "sc", + "com.sc", + "edu.sc", + "gov.sc", + "net.sc", + "org.sc", + "sd", + "com.sd", + "edu.sd", + "gov.sd", + "info.sd", + "med.sd", + "net.sd", + "org.sd", + "tv.sd", + "se", + "a.se", + "ac.se", + "b.se", + "bd.se", + "brand.se", + "c.se", + "d.se", + "e.se", + "f.se", + "fh.se", + "fhsk.se", + "fhv.se", + "g.se", + "h.se", + "i.se", + "k.se", + "komforb.se", + "kommunalforbund.se", + "komvux.se", + "l.se", + "lanbib.se", + "m.se", + "n.se", + "naturbruksgymn.se", + "o.se", + "org.se", + "p.se", + "parti.se", + "pp.se", + "press.se", + "r.se", + "s.se", + "t.se", + "tm.se", + "u.se", + "w.se", + "x.se", + "y.se", + "z.se", + "sg", + "com.sg", + "edu.sg", + "gov.sg", + "net.sg", + "org.sg", + "sh", + "com.sh", + "gov.sh", + "mil.sh", + "net.sh", + "org.sh", + "si", + "sj", + "sk", + "sl", + "com.sl", + "edu.sl", + "gov.sl", + "net.sl", + "org.sl", + "sm", + "sn", + "art.sn", + "com.sn", + "edu.sn", + "gouv.sn", + "org.sn", + "perso.sn", + "univ.sn", + "so", + "com.so", + "edu.so", + "gov.so", + "me.so", + "net.so", + "org.so", + "sr", + "ss", + "biz.ss", + "co.ss", + "com.ss", + "edu.ss", + "gov.ss", + "me.ss", + "net.ss", + "org.ss", + "sch.ss", + "st", + "co.st", + "com.st", + "consulado.st", + "edu.st", + "embaixada.st", + "mil.st", + "net.st", + "org.st", + "principe.st", + "saotome.st", + "store.st", + "su", + "sv", + "com.sv", + "edu.sv", + "gob.sv", + "org.sv", + "red.sv", + "sx", + "gov.sx", + "sy", + "com.sy", + "edu.sy", + "gov.sy", + "mil.sy", + "net.sy", + "org.sy", + "sz", + "ac.sz", + "co.sz", + "org.sz", + "tc", + "td", + "tel", + "tf", + "tg", + "th", + "ac.th", + "co.th", + "go.th", + "in.th", + "mi.th", + "net.th", + "or.th", + "tj", + "ac.tj", + "biz.tj", + "co.tj", + "com.tj", + "edu.tj", + "go.tj", + "gov.tj", + "int.tj", + "mil.tj", + "name.tj", + "net.tj", + "nic.tj", + "org.tj", + "test.tj", + "web.tj", + "tk", + "tl", + "gov.tl", + "tm", + "co.tm", + "com.tm", + "edu.tm", + "gov.tm", + "mil.tm", + "net.tm", + "nom.tm", + "org.tm", + "tn", + "com.tn", + "ens.tn", + "fin.tn", + "gov.tn", + "ind.tn", + "info.tn", + "intl.tn", + "mincom.tn", + "nat.tn", + "net.tn", + "org.tn", + "perso.tn", + "tourism.tn", + "to", + "com.to", + "edu.to", + "gov.to", + "mil.to", + "net.to", + "org.to", + "tr", + "av.tr", + "bbs.tr", + "bel.tr", + "biz.tr", + "com.tr", + "dr.tr", + "edu.tr", + "gen.tr", + "gov.tr", + "info.tr", + "k12.tr", + "kep.tr", + "mil.tr", + "name.tr", + "net.tr", + "org.tr", + "pol.tr", + "tel.tr", + "tsk.tr", + "tv.tr", + "web.tr", + "nc.tr", + "gov.nc.tr", + "tt", + "biz.tt", + "co.tt", + "com.tt", + "edu.tt", + "gov.tt", + "info.tt", + "mil.tt", + "name.tt", + "net.tt", + "org.tt", + "pro.tt", + "tv", + "tw", + "club.tw", + "com.tw", + "ebiz.tw", + "edu.tw", + "game.tw", + "gov.tw", + "idv.tw", + "mil.tw", + "net.tw", + "org.tw", + "tz", + "ac.tz", + "co.tz", + "go.tz", + "hotel.tz", + "info.tz", + "me.tz", + "mil.tz", + "mobi.tz", + "ne.tz", + "or.tz", + "sc.tz", + "tv.tz", + "ua", + "com.ua", + "edu.ua", + "gov.ua", + "in.ua", + "net.ua", + "org.ua", + "cherkassy.ua", + "cherkasy.ua", + "chernigov.ua", + "chernihiv.ua", + "chernivtsi.ua", + "chernovtsy.ua", + "ck.ua", + "cn.ua", + "cr.ua", + "crimea.ua", + "cv.ua", + "dn.ua", + "dnepropetrovsk.ua", + "dnipropetrovsk.ua", + "donetsk.ua", + "dp.ua", + "if.ua", + "ivano-frankivsk.ua", + "kh.ua", + "kharkiv.ua", + "kharkov.ua", + "kherson.ua", + "khmelnitskiy.ua", + "khmelnytskyi.ua", + "kiev.ua", + "kirovograd.ua", + "km.ua", + "kr.ua", + "kropyvnytskyi.ua", + "krym.ua", + "ks.ua", + "kv.ua", + "kyiv.ua", + "lg.ua", + "lt.ua", + "lugansk.ua", + "luhansk.ua", + "lutsk.ua", + "lv.ua", + "lviv.ua", + "mk.ua", + "mykolaiv.ua", + "nikolaev.ua", + "od.ua", + "odesa.ua", + "odessa.ua", + "pl.ua", + "poltava.ua", + "rivne.ua", + "rovno.ua", + "rv.ua", + "sb.ua", + "sebastopol.ua", + "sevastopol.ua", + "sm.ua", + "sumy.ua", + "te.ua", + "ternopil.ua", + "uz.ua", + "uzhgorod.ua", + "uzhhorod.ua", + "vinnica.ua", + "vinnytsia.ua", + "vn.ua", + "volyn.ua", + "yalta.ua", + "zakarpattia.ua", + "zaporizhzhe.ua", + "zaporizhzhia.ua", + "zhitomir.ua", + "zhytomyr.ua", + "zp.ua", + "zt.ua", + "ug", + "ac.ug", + "co.ug", + "com.ug", + "go.ug", + "ne.ug", + "or.ug", + "org.ug", + "sc.ug", + "uk", + "ac.uk", + "co.uk", + "gov.uk", + "ltd.uk", + "me.uk", + "net.uk", + "nhs.uk", + "org.uk", + "plc.uk", + "police.uk", + "*.sch.uk", + "us", + "dni.us", + "fed.us", + "isa.us", + "kids.us", + "nsn.us", + "ak.us", + "al.us", + "ar.us", + "as.us", + "az.us", + "ca.us", + "co.us", + "ct.us", + "dc.us", + "de.us", + "fl.us", + "ga.us", + "gu.us", + "hi.us", + "ia.us", + "id.us", + "il.us", + "in.us", + "ks.us", + "ky.us", + "la.us", + "ma.us", + "md.us", + "me.us", + "mi.us", + "mn.us", + "mo.us", + "ms.us", + "mt.us", + "nc.us", + "nd.us", + "ne.us", + "nh.us", + "nj.us", + "nm.us", + "nv.us", + "ny.us", + "oh.us", + "ok.us", + "or.us", + "pa.us", + "pr.us", + "ri.us", + "sc.us", + "sd.us", + "tn.us", + "tx.us", + "ut.us", + "va.us", + "vi.us", + "vt.us", + "wa.us", + "wi.us", + "wv.us", + "wy.us", + "k12.ak.us", + "k12.al.us", + "k12.ar.us", + "k12.as.us", + "k12.az.us", + "k12.ca.us", + "k12.co.us", + "k12.ct.us", + "k12.dc.us", + "k12.fl.us", + "k12.ga.us", + "k12.gu.us", + "k12.ia.us", + "k12.id.us", + "k12.il.us", + "k12.in.us", + "k12.ks.us", + "k12.ky.us", + "k12.la.us", + "k12.ma.us", + "k12.md.us", + "k12.me.us", + "k12.mi.us", + "k12.mn.us", + "k12.mo.us", + "k12.ms.us", + "k12.mt.us", + "k12.nc.us", + "k12.ne.us", + "k12.nh.us", + "k12.nj.us", + "k12.nm.us", + "k12.nv.us", + "k12.ny.us", + "k12.oh.us", + "k12.ok.us", + "k12.or.us", + "k12.pa.us", + "k12.pr.us", + "k12.sc.us", + "k12.tn.us", + "k12.tx.us", + "k12.ut.us", + "k12.va.us", + "k12.vi.us", + "k12.vt.us", + "k12.wa.us", + "k12.wi.us", + "cc.ak.us", + "lib.ak.us", + "cc.al.us", + "lib.al.us", + "cc.ar.us", + "lib.ar.us", + "cc.as.us", + "lib.as.us", + "cc.az.us", + "lib.az.us", + "cc.ca.us", + "lib.ca.us", + "cc.co.us", + "lib.co.us", + "cc.ct.us", + "lib.ct.us", + "cc.dc.us", + "lib.dc.us", + "cc.de.us", + "cc.fl.us", + "cc.ga.us", + "cc.gu.us", + "cc.hi.us", + "cc.ia.us", + "cc.id.us", + "cc.il.us", + "cc.in.us", + "cc.ks.us", + "cc.ky.us", + "cc.la.us", + "cc.ma.us", + "cc.md.us", + "cc.me.us", + "cc.mi.us", + "cc.mn.us", + "cc.mo.us", + "cc.ms.us", + "cc.mt.us", + "cc.nc.us", + "cc.nd.us", + "cc.ne.us", + "cc.nh.us", + "cc.nj.us", + "cc.nm.us", + "cc.nv.us", + "cc.ny.us", + "cc.oh.us", + "cc.ok.us", + "cc.or.us", + "cc.pa.us", + "cc.pr.us", + "cc.ri.us", + "cc.sc.us", + "cc.sd.us", + "cc.tn.us", + "cc.tx.us", + "cc.ut.us", + "cc.va.us", + "cc.vi.us", + "cc.vt.us", + "cc.wa.us", + "cc.wi.us", + "cc.wv.us", + "cc.wy.us", + "k12.wy.us", + "lib.fl.us", + "lib.ga.us", + "lib.gu.us", + "lib.hi.us", + "lib.ia.us", + "lib.id.us", + "lib.il.us", + "lib.in.us", + "lib.ks.us", + "lib.ky.us", + "lib.la.us", + "lib.ma.us", + "lib.md.us", + "lib.me.us", + "lib.mi.us", + "lib.mn.us", + "lib.mo.us", + "lib.ms.us", + "lib.mt.us", + "lib.nc.us", + "lib.nd.us", + "lib.ne.us", + "lib.nh.us", + "lib.nj.us", + "lib.nm.us", + "lib.nv.us", + "lib.ny.us", + "lib.oh.us", + "lib.ok.us", + "lib.or.us", + "lib.pa.us", + "lib.pr.us", + "lib.ri.us", + "lib.sc.us", + "lib.sd.us", + "lib.tn.us", + "lib.tx.us", + "lib.ut.us", + "lib.va.us", + "lib.vi.us", + "lib.vt.us", + "lib.wa.us", + "lib.wi.us", + "lib.wy.us", + "chtr.k12.ma.us", + "paroch.k12.ma.us", + "pvt.k12.ma.us", + "ann-arbor.mi.us", + "cog.mi.us", + "dst.mi.us", + "eaton.mi.us", + "gen.mi.us", + "mus.mi.us", + "tec.mi.us", + "washtenaw.mi.us", + "uy", + "com.uy", + "edu.uy", + "gub.uy", + "mil.uy", + "net.uy", + "org.uy", + "uz", + "co.uz", + "com.uz", + "net.uz", + "org.uz", + "va", + "vc", + "com.vc", + "edu.vc", + "gov.vc", + "mil.vc", + "net.vc", + "org.vc", + "ve", + "arts.ve", + "bib.ve", + "co.ve", + "com.ve", + "e12.ve", + "edu.ve", + "firm.ve", + "gob.ve", + "gov.ve", + "info.ve", + "int.ve", + "mil.ve", + "net.ve", + "nom.ve", + "org.ve", + "rar.ve", + "rec.ve", + "store.ve", + "tec.ve", + "web.ve", + "vg", + "vi", + "co.vi", + "com.vi", + "k12.vi", + "net.vi", + "org.vi", + "vn", + "ac.vn", + "ai.vn", + "biz.vn", + "com.vn", + "edu.vn", + "gov.vn", + "health.vn", + "id.vn", + "info.vn", + "int.vn", + "io.vn", + "name.vn", + "net.vn", + "org.vn", + "pro.vn", + "angiang.vn", + "bacgiang.vn", + "backan.vn", + "baclieu.vn", + "bacninh.vn", + "baria-vungtau.vn", + "bentre.vn", + "binhdinh.vn", + "binhduong.vn", + "binhphuoc.vn", + "binhthuan.vn", + "camau.vn", + "cantho.vn", + "caobang.vn", + "daklak.vn", + "daknong.vn", + "danang.vn", + "dienbien.vn", + "dongnai.vn", + "dongthap.vn", + "gialai.vn", + "hagiang.vn", + "haiduong.vn", + "haiphong.vn", + "hanam.vn", + "hanoi.vn", + "hatinh.vn", + "haugiang.vn", + "hoabinh.vn", + "hungyen.vn", + "khanhhoa.vn", + "kiengiang.vn", + "kontum.vn", + "laichau.vn", + "lamdong.vn", + "langson.vn", + "laocai.vn", + "longan.vn", + "namdinh.vn", + "nghean.vn", + "ninhbinh.vn", + "ninhthuan.vn", + "phutho.vn", + "phuyen.vn", + "quangbinh.vn", + "quangnam.vn", + "quangngai.vn", + "quangninh.vn", + "quangtri.vn", + "soctrang.vn", + "sonla.vn", + "tayninh.vn", + "thaibinh.vn", + "thainguyen.vn", + "thanhhoa.vn", + "thanhphohochiminh.vn", + "thuathienhue.vn", + "tiengiang.vn", + "travinh.vn", + "tuyenquang.vn", + "vinhlong.vn", + "vinhphuc.vn", + "yenbai.vn", + "vu", + "com.vu", + "edu.vu", + "net.vu", + "org.vu", + "wf", + "ws", + "com.ws", + "edu.ws", + "gov.ws", + "net.ws", + "org.ws", + "yt", + "امارات", + "հայ", + "বাংলা", + "бг", + "البحرين", + "бел", + "中国", + "中國", + "الجزائر", + "مصر", + "ею", + "ευ", + "موريتانيا", + "გე", + "ελ", + "香港", + "個人.香港", + "公司.香港", + "政府.香港", + "教育.香港", + "組織.香港", + "網絡.香港", + "ಭಾರತ", + "ଭାରତ", + "ভাৰত", + "भारतम्", + "भारोत", + "ڀارت", + "ഭാരതം", + "भारत", + "بارت", + "بھارت", + "భారత్", + "ભારત", + "ਭਾਰਤ", + "ভারত", + "இந்தியா", + "ایران", + "ايران", + "عراق", + "الاردن", + "한국", + "қаз", + "ລາວ", + "ලංකා", + "இலங்கை", + "المغرب", + "мкд", + "мон", + "澳門", + "澳门", + "مليسيا", + "عمان", + "پاکستان", + "پاكستان", + "فلسطين", + "срб", + "ак.срб", + "обр.срб", + "од.срб", + "орг.срб", + "пр.срб", + "упр.срб", + "рф", + "قطر", + "السعودية", + "السعودیة", + "السعودیۃ", + "السعوديه", + "سودان", + "新加坡", + "சிங்கப்பூர்", + "سورية", + "سوريا", + "ไทย", + "ทหาร.ไทย", + "ธุรกิจ.ไทย", + "เน็ต.ไทย", + "รัฐบาล.ไทย", + "ศึกษา.ไทย", + "องค์กร.ไทย", + "تونس", + "台灣", + "台湾", + "臺灣", + "укр", + "اليمن", + "xxx", + "ye", + "com.ye", + "edu.ye", + "gov.ye", + "mil.ye", + "net.ye", + "org.ye", + "ac.za", + "agric.za", + "alt.za", + "co.za", + "edu.za", + "gov.za", + "grondar.za", + "law.za", + "mil.za", + "net.za", + "ngo.za", + "nic.za", + "nis.za", + "nom.za", + "org.za", + "school.za", + "tm.za", + "web.za", + "zm", + "ac.zm", + "biz.zm", + "co.zm", + "com.zm", + "edu.zm", + "gov.zm", + "info.zm", + "mil.zm", + "net.zm", + "org.zm", + "sch.zm", + "zw", + "ac.zw", + "co.zw", + "gov.zw", + "mil.zw", + "org.zw", + "aaa", + "aarp", + "abb", + "abbott", + "abbvie", + "abc", + "able", + "abogado", + "abudhabi", + "academy", + "accenture", + "accountant", + "accountants", + "aco", + "actor", + "ads", + "adult", + "aeg", + "aetna", + "afl", + "africa", + "agakhan", + "agency", + "aig", + "airbus", + "airforce", + "airtel", + "akdn", + "alibaba", + "alipay", + "allfinanz", + "allstate", + "ally", + "alsace", + "alstom", + "amazon", + "americanexpress", + "americanfamily", + "amex", + "amfam", + "amica", + "amsterdam", + "analytics", + "android", + "anquan", + "anz", + "aol", + "apartments", + "app", + "apple", + "aquarelle", + "arab", + "aramco", + "archi", + "army", + "art", + "arte", + "asda", + "associates", + "athleta", + "attorney", + "auction", + "audi", + "audible", + "audio", + "auspost", + "author", + "auto", + "autos", + "aws", + "axa", + "azure", + "baby", + "baidu", + "banamex", + "band", + "bank", + "bar", + "barcelona", + "barclaycard", + "barclays", + "barefoot", + "bargains", + "baseball", + "basketball", + "bauhaus", + "bayern", + "bbc", + "bbt", + "bbva", + "bcg", + "bcn", + "beats", + "beauty", + "beer", + "bentley", + "berlin", + "best", + "bestbuy", + "bet", + "bharti", + "bible", + "bid", + "bike", + "bing", + "bingo", + "bio", + "black", + "blackfriday", + "blockbuster", + "blog", + "bloomberg", + "blue", + "bms", + "bmw", + "bnpparibas", + "boats", + "boehringer", + "bofa", + "bom", + "bond", + "boo", + "book", + "booking", + "bosch", + "bostik", + "boston", + "bot", + "boutique", + "box", + "bradesco", + "bridgestone", + "broadway", + "broker", + "brother", + "brussels", + "build", + "builders", + "business", + "buy", + "buzz", + "bzh", + "cab", + "cafe", + "cal", + "call", + "calvinklein", + "cam", + "camera", + "camp", + "canon", + "capetown", + "capital", + "capitalone", + "car", + "caravan", + "cards", + "care", + "career", + "careers", + "cars", + "casa", + "case", + "cash", + "casino", + "catering", + "catholic", + "cba", + "cbn", + "cbre", + "center", + "ceo", + "cern", + "cfa", + "cfd", + "chanel", + "channel", + "charity", + "chase", + "chat", + "cheap", + "chintai", + "christmas", + "chrome", + "church", + "cipriani", + "circle", + "cisco", + "citadel", + "citi", + "citic", + "city", + "claims", + "cleaning", + "click", + "clinic", + "clinique", + "clothing", + "cloud", + "club", + "clubmed", + "coach", + "codes", + "coffee", + "college", + "cologne", + "commbank", + "community", + "company", + "compare", + "computer", + "comsec", + "condos", + "construction", + "consulting", + "contact", + "contractors", + "cooking", + "cool", + "corsica", + "country", + "coupon", + "coupons", + "courses", + "cpa", + "credit", + "creditcard", + "creditunion", + "cricket", + "crown", + "crs", + "cruise", + "cruises", + "cuisinella", + "cymru", + "cyou", + "dad", + "dance", + "data", + "date", + "dating", + "datsun", + "day", + "dclk", + "dds", + "deal", + "dealer", + "deals", + "degree", + "delivery", + "dell", + "deloitte", + "delta", + "democrat", + "dental", + "dentist", + "desi", + "design", + "dev", + "dhl", + "diamonds", + "diet", + "digital", + "direct", + "directory", + "discount", + "discover", + "dish", + "diy", + "dnp", + "docs", + "doctor", + "dog", + "domains", + "dot", + "download", + "drive", + "dtv", + "dubai", + "dunlop", + "dupont", + "durban", + "dvag", + "dvr", + "earth", + "eat", + "eco", + "edeka", + "education", + "email", + "emerck", + "energy", + "engineer", + "engineering", + "enterprises", + "epson", + "equipment", + "ericsson", + "erni", + "esq", + "estate", + "eurovision", + "eus", + "events", + "exchange", + "expert", + "exposed", + "express", + "extraspace", + "fage", + "fail", + "fairwinds", + "faith", + "family", + "fan", + "fans", + "farm", + "farmers", + "fashion", + "fast", + "fedex", + "feedback", + "ferrari", + "ferrero", + "fidelity", + "fido", + "film", + "final", + "finance", + "financial", + "fire", + "firestone", + "firmdale", + "fish", + "fishing", + "fit", + "fitness", + "flickr", + "flights", + "flir", + "florist", + "flowers", + "fly", + "foo", + "food", + "football", + "ford", + "forex", + "forsale", + "forum", + "foundation", + "fox", + "free", + "fresenius", + "frl", + "frogans", + "frontier", + "ftr", + "fujitsu", + "fun", + "fund", + "furniture", + "futbol", + "fyi", + "gal", + "gallery", + "gallo", + "gallup", + "game", + "games", + "gap", + "garden", + "gay", + "gbiz", + "gdn", + "gea", + "gent", + "genting", + "george", + "ggee", + "gift", + "gifts", + "gives", + "giving", + "glass", + "gle", + "global", + "globo", + "gmail", + "gmbh", + "gmo", + "gmx", + "godaddy", + "gold", + "goldpoint", + "golf", + "goo", + "goodyear", + "goog", + "google", + "gop", + "got", + "grainger", + "graphics", + "gratis", + "green", + "gripe", + "grocery", + "group", + "gucci", + "guge", + "guide", + "guitars", + "guru", + "hair", + "hamburg", + "hangout", + "haus", + "hbo", + "hdfc", + "hdfcbank", + "health", + "healthcare", + "help", + "helsinki", + "here", + "hermes", + "hiphop", + "hisamitsu", + "hitachi", + "hiv", + "hkt", + "hockey", + "holdings", + "holiday", + "homedepot", + "homegoods", + "homes", + "homesense", + "honda", + "horse", + "hospital", + "host", + "hosting", + "hot", + "hotels", + "hotmail", + "house", + "how", + "hsbc", + "hughes", + "hyatt", + "hyundai", + "ibm", + "icbc", + "ice", + "icu", + "ieee", + "ifm", + "ikano", + "imamat", + "imdb", + "immo", + "immobilien", + "inc", + "industries", + "infiniti", + "ing", + "ink", + "institute", + "insurance", + "insure", + "international", + "intuit", + "investments", + "ipiranga", + "irish", + "ismaili", + "ist", + "istanbul", + "itau", + "itv", + "jaguar", + "java", + "jcb", + "jeep", + "jetzt", + "jewelry", + "jio", + "jll", + "jmp", + "jnj", + "joburg", + "jot", + "joy", + "jpmorgan", + "jprs", + "juegos", + "juniper", + "kaufen", + "kddi", + "kerryhotels", + "kerrylogistics", + "kerryproperties", + "kfh", + "kia", + "kids", + "kim", + "kindle", + "kitchen", + "kiwi", + "koeln", + "komatsu", + "kosher", + "kpmg", + "kpn", + "krd", + "kred", + "kuokgroup", + "kyoto", + "lacaixa", + "lamborghini", + "lamer", + "lancaster", + "land", + "landrover", + "lanxess", + "lasalle", + "lat", + "latino", + "latrobe", + "law", + "lawyer", + "lds", + "lease", + "leclerc", + "lefrak", + "legal", + "lego", + "lexus", + "lgbt", + "lidl", + "life", + "lifeinsurance", + "lifestyle", + "lighting", + "like", + "lilly", + "limited", + "limo", + "lincoln", + "link", + "lipsy", + "live", + "living", + "llc", + "llp", + "loan", + "loans", + "locker", + "locus", + "lol", + "london", + "lotte", + "lotto", + "love", + "lpl", + "lplfinancial", + "ltd", + "ltda", + "lundbeck", + "luxe", + "luxury", + "madrid", + "maif", + "maison", + "makeup", + "man", + "management", + "mango", + "map", + "market", + "marketing", + "markets", + "marriott", + "marshalls", + "mattel", + "mba", + "mckinsey", + "med", + "media", + "meet", + "melbourne", + "meme", + "memorial", + "men", + "menu", + "merck", + "merckmsd", + "miami", + "microsoft", + "mini", + "mint", + "mit", + "mitsubishi", + "mlb", + "mls", + "mma", + "mobile", + "moda", + "moe", + "moi", + "mom", + "monash", + "money", + "monster", + "mormon", + "mortgage", + "moscow", + "moto", + "motorcycles", + "mov", + "movie", + "msd", + "mtn", + "mtr", + "music", + "nab", + "nagoya", + "navy", + "nba", + "nec", + "netbank", + "netflix", + "network", + "neustar", + "new", + "news", + "next", + "nextdirect", + "nexus", + "nfl", + "ngo", + "nhk", + "nico", + "nike", + "nikon", + "ninja", + "nissan", + "nissay", + "nokia", + "norton", + "now", + "nowruz", + "nowtv", + "nra", + "nrw", + "ntt", + "nyc", + "obi", + "observer", + "office", + "okinawa", + "olayan", + "olayangroup", + "ollo", + "omega", + "one", + "ong", + "onl", + "online", + "ooo", + "open", + "oracle", + "orange", + "organic", + "origins", + "osaka", + "otsuka", + "ott", + "ovh", + "page", + "panasonic", + "paris", + "pars", + "partners", + "parts", + "party", + "pay", + "pccw", + "pet", + "pfizer", + "pharmacy", + "phd", + "philips", + "phone", + "photo", + "photography", + "photos", + "physio", + "pics", + "pictet", + "pictures", + "pid", + "pin", + "ping", + "pink", + "pioneer", + "pizza", + "place", + "play", + "playstation", + "plumbing", + "plus", + "pnc", + "pohl", + "poker", + "politie", + "porn", + "pramerica", + "praxi", + "press", + "prime", + "prod", + "productions", + "prof", + "progressive", + "promo", + "properties", + "property", + "protection", + "pru", + "prudential", + "pub", + "pwc", + "qpon", + "quebec", + "quest", + "racing", + "radio", + "read", + "realestate", + "realtor", + "realty", + "recipes", + "red", + "redstone", + "redumbrella", + "rehab", + "reise", + "reisen", + "reit", + "reliance", + "ren", + "rent", + "rentals", + "repair", + "report", + "republican", + "rest", + "restaurant", + "review", + "reviews", + "rexroth", + "rich", + "richardli", + "ricoh", + "ril", + "rio", + "rip", + "rocks", + "rodeo", + "rogers", + "room", + "rsvp", + "rugby", + "ruhr", + "run", + "rwe", + "ryukyu", + "saarland", + "safe", + "safety", + "sakura", + "sale", + "salon", + "samsclub", + "samsung", + "sandvik", + "sandvikcoromant", + "sanofi", + "sap", + "sarl", + "sas", + "save", + "saxo", + "sbi", + "sbs", + "scb", + "schaeffler", + "schmidt", + "scholarships", + "school", + "schule", + "schwarz", + "science", + "scot", + "search", + "seat", + "secure", + "security", + "seek", + "select", + "sener", + "services", + "seven", + "sew", + "sex", + "sexy", + "sfr", + "shangrila", + "sharp", + "shell", + "shia", + "shiksha", + "shoes", + "shop", + "shopping", + "shouji", + "show", + "silk", + "sina", + "singles", + "site", + "ski", + "skin", + "sky", + "skype", + "sling", + "smart", + "smile", + "sncf", + "soccer", + "social", + "softbank", + "software", + "sohu", + "solar", + "solutions", + "song", + "sony", + "soy", + "spa", + "space", + "sport", + "spot", + "srl", + "stada", + "staples", + "star", + "statebank", + "statefarm", + "stc", + "stcgroup", + "stockholm", + "storage", + "store", + "stream", + "studio", + "study", + "style", + "sucks", + "supplies", + "supply", + "support", + "surf", + "surgery", + "suzuki", + "swatch", + "swiss", + "sydney", + "systems", + "tab", + "taipei", + "talk", + "taobao", + "target", + "tatamotors", + "tatar", + "tattoo", + "tax", + "taxi", + "tci", + "tdk", + "team", + "tech", + "technology", + "temasek", + "tennis", + "teva", + "thd", + "theater", + "theatre", + "tiaa", + "tickets", + "tienda", + "tips", + "tires", + "tirol", + "tjmaxx", + "tjx", + "tkmaxx", + "tmall", + "today", + "tokyo", + "tools", + "top", + "toray", + "toshiba", + "total", + "tours", + "town", + "toyota", + "toys", + "trade", + "trading", + "training", + "travel", + "travelers", + "travelersinsurance", + "trust", + "trv", + "tube", + "tui", + "tunes", + "tushu", + "tvs", + "ubank", + "ubs", + "unicom", + "university", + "uno", + "uol", + "ups", + "vacations", + "vana", + "vanguard", + "vegas", + "ventures", + "verisign", + "versicherung", + "vet", + "viajes", + "video", + "vig", + "viking", + "villas", + "vin", + "vip", + "virgin", + "visa", + "vision", + "viva", + "vivo", + "vlaanderen", + "vodka", + "volvo", + "vote", + "voting", + "voto", + "voyage", + "wales", + "walmart", + "walter", + "wang", + "wanggou", + "watch", + "watches", + "weather", + "weatherchannel", + "webcam", + "weber", + "website", + "wed", + "wedding", + "weibo", + "weir", + "whoswho", + "wien", + "wiki", + "williamhill", + "win", + "windows", + "wine", + "winners", + "wme", + "wolterskluwer", + "woodside", + "work", + "works", + "world", + "wow", + "wtc", + "wtf", + "xbox", + "xerox", + "xihuan", + "xin", + "कॉम", + "セール", + "佛山", + "慈善", + "集团", + "在线", + "点看", + "คอม", + "八卦", + "موقع", + "公益", + "公司", + "香格里拉", + "网站", + "移动", + "我爱你", + "москва", + "католик", + "онлайн", + "сайт", + "联通", + "קום", + "时尚", + "微博", + "淡马锡", + "ファッション", + "орг", + "नेट", + "ストア", + "アマゾン", + "삼성", + "商标", + "商店", + "商城", + "дети", + "ポイント", + "新闻", + "家電", + "كوم", + "中文网", + "中信", + "娱乐", + "谷歌", + "電訊盈科", + "购物", + "クラウド", + "通販", + "网店", + "संगठन", + "餐厅", + "网络", + "ком", + "亚马逊", + "食品", + "飞利浦", + "手机", + "ارامكو", + "العليان", + "بازار", + "ابوظبي", + "كاثوليك", + "همراه", + "닷컴", + "政府", + "شبكة", + "بيتك", + "عرب", + "机构", + "组织机构", + "健康", + "招聘", + "рус", + "大拿", + "みんな", + "グーグル", + "世界", + "書籍", + "网址", + "닷넷", + "コム", + "天主教", + "游戏", + "vermögensberater", + "vermögensberatung", + "企业", + "信息", + "嘉里大酒店", + "嘉里", + "广东", + "政务", + "xyz", + "yachts", + "yahoo", + "yamaxun", + "yandex", + "yodobashi", + "yoga", + "yokohama", + "you", + "youtube", + "yun", + "zappos", + "zara", + "zero", + "zip", + "zone", + "zuerich", + "co.krd", + "edu.krd", + "art.pl", + "gliwice.pl", + "krakow.pl", + "poznan.pl", + "wroc.pl", + "zakopane.pl", + "lib.de.us", + "12chars.dev", + "12chars.it", + "12chars.pro", + "cc.ua", + "inf.ua", + "ltd.ua", + "611.to", + "a2hosted.com", + "cpserver.com", + "aaa.vodka", + "*.on-acorn.io", + "activetrail.biz", + "adaptable.app", + "adobeaemcloud.com", + "*.dev.adobeaemcloud.com", + "aem.live", + "hlx.live", + "adobeaemcloud.net", + "aem.page", + "hlx.page", + "hlx3.page", + "adobeio-static.net", + "adobeioruntime.net", + "africa.com", + "beep.pl", + "airkitapps.com", + "airkitapps-au.com", + "airkitapps.eu", + "aivencloud.com", + "akadns.net", + "akamai.net", + "akamai-staging.net", + "akamaiedge.net", + "akamaiedge-staging.net", + "akamaihd.net", + "akamaihd-staging.net", + "akamaiorigin.net", + "akamaiorigin-staging.net", + "akamaized.net", + "akamaized-staging.net", + "edgekey.net", + "edgekey-staging.net", + "edgesuite.net", + "edgesuite-staging.net", + "barsy.ca", + "*.compute.estate", + "*.alces.network", + "kasserver.com", + "altervista.org", + "alwaysdata.net", + "myamaze.net", + "execute-api.cn-north-1.amazonaws.com.cn", + "execute-api.cn-northwest-1.amazonaws.com.cn", + "execute-api.af-south-1.amazonaws.com", + "execute-api.ap-east-1.amazonaws.com", + "execute-api.ap-northeast-1.amazonaws.com", + "execute-api.ap-northeast-2.amazonaws.com", + "execute-api.ap-northeast-3.amazonaws.com", + "execute-api.ap-south-1.amazonaws.com", + "execute-api.ap-south-2.amazonaws.com", + "execute-api.ap-southeast-1.amazonaws.com", + "execute-api.ap-southeast-2.amazonaws.com", + "execute-api.ap-southeast-3.amazonaws.com", + "execute-api.ap-southeast-4.amazonaws.com", + "execute-api.ap-southeast-5.amazonaws.com", + "execute-api.ca-central-1.amazonaws.com", + "execute-api.ca-west-1.amazonaws.com", + "execute-api.eu-central-1.amazonaws.com", + "execute-api.eu-central-2.amazonaws.com", + "execute-api.eu-north-1.amazonaws.com", + "execute-api.eu-south-1.amazonaws.com", + "execute-api.eu-south-2.amazonaws.com", + "execute-api.eu-west-1.amazonaws.com", + "execute-api.eu-west-2.amazonaws.com", + "execute-api.eu-west-3.amazonaws.com", + "execute-api.il-central-1.amazonaws.com", + "execute-api.me-central-1.amazonaws.com", + "execute-api.me-south-1.amazonaws.com", + "execute-api.sa-east-1.amazonaws.com", + "execute-api.us-east-1.amazonaws.com", + "execute-api.us-east-2.amazonaws.com", + "execute-api.us-gov-east-1.amazonaws.com", + "execute-api.us-gov-west-1.amazonaws.com", + "execute-api.us-west-1.amazonaws.com", + "execute-api.us-west-2.amazonaws.com", + "cloudfront.net", + "auth.af-south-1.amazoncognito.com", + "auth.ap-east-1.amazoncognito.com", + "auth.ap-northeast-1.amazoncognito.com", + "auth.ap-northeast-2.amazoncognito.com", + "auth.ap-northeast-3.amazoncognito.com", + "auth.ap-south-1.amazoncognito.com", + "auth.ap-south-2.amazoncognito.com", + "auth.ap-southeast-1.amazoncognito.com", + "auth.ap-southeast-2.amazoncognito.com", + "auth.ap-southeast-3.amazoncognito.com", + "auth.ap-southeast-4.amazoncognito.com", + "auth.ca-central-1.amazoncognito.com", + "auth.ca-west-1.amazoncognito.com", + "auth.eu-central-1.amazoncognito.com", + "auth.eu-central-2.amazoncognito.com", + "auth.eu-north-1.amazoncognito.com", + "auth.eu-south-1.amazoncognito.com", + "auth.eu-south-2.amazoncognito.com", + "auth.eu-west-1.amazoncognito.com", + "auth.eu-west-2.amazoncognito.com", + "auth.eu-west-3.amazoncognito.com", + "auth.il-central-1.amazoncognito.com", + "auth.me-central-1.amazoncognito.com", + "auth.me-south-1.amazoncognito.com", + "auth.sa-east-1.amazoncognito.com", + "auth.us-east-1.amazoncognito.com", + "auth-fips.us-east-1.amazoncognito.com", + "auth.us-east-2.amazoncognito.com", + "auth-fips.us-east-2.amazoncognito.com", + "auth-fips.us-gov-west-1.amazoncognito.com", + "auth.us-west-1.amazoncognito.com", + "auth-fips.us-west-1.amazoncognito.com", + "auth.us-west-2.amazoncognito.com", + "auth-fips.us-west-2.amazoncognito.com", + "*.compute.amazonaws.com.cn", + "*.compute.amazonaws.com", + "*.compute-1.amazonaws.com", + "us-east-1.amazonaws.com", + "emrappui-prod.cn-north-1.amazonaws.com.cn", + "emrnotebooks-prod.cn-north-1.amazonaws.com.cn", + "emrstudio-prod.cn-north-1.amazonaws.com.cn", + "emrappui-prod.cn-northwest-1.amazonaws.com.cn", + "emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn", + "emrstudio-prod.cn-northwest-1.amazonaws.com.cn", + "emrappui-prod.af-south-1.amazonaws.com", + "emrnotebooks-prod.af-south-1.amazonaws.com", + "emrstudio-prod.af-south-1.amazonaws.com", + "emrappui-prod.ap-east-1.amazonaws.com", + "emrnotebooks-prod.ap-east-1.amazonaws.com", + "emrstudio-prod.ap-east-1.amazonaws.com", + "emrappui-prod.ap-northeast-1.amazonaws.com", + "emrnotebooks-prod.ap-northeast-1.amazonaws.com", + "emrstudio-prod.ap-northeast-1.amazonaws.com", + "emrappui-prod.ap-northeast-2.amazonaws.com", + "emrnotebooks-prod.ap-northeast-2.amazonaws.com", + "emrstudio-prod.ap-northeast-2.amazonaws.com", + "emrappui-prod.ap-northeast-3.amazonaws.com", + "emrnotebooks-prod.ap-northeast-3.amazonaws.com", + "emrstudio-prod.ap-northeast-3.amazonaws.com", + "emrappui-prod.ap-south-1.amazonaws.com", + "emrnotebooks-prod.ap-south-1.amazonaws.com", + "emrstudio-prod.ap-south-1.amazonaws.com", + "emrappui-prod.ap-south-2.amazonaws.com", + "emrnotebooks-prod.ap-south-2.amazonaws.com", + "emrstudio-prod.ap-south-2.amazonaws.com", + "emrappui-prod.ap-southeast-1.amazonaws.com", + "emrnotebooks-prod.ap-southeast-1.amazonaws.com", + "emrstudio-prod.ap-southeast-1.amazonaws.com", + "emrappui-prod.ap-southeast-2.amazonaws.com", + "emrnotebooks-prod.ap-southeast-2.amazonaws.com", + "emrstudio-prod.ap-southeast-2.amazonaws.com", + "emrappui-prod.ap-southeast-3.amazonaws.com", + "emrnotebooks-prod.ap-southeast-3.amazonaws.com", + "emrstudio-prod.ap-southeast-3.amazonaws.com", + "emrappui-prod.ap-southeast-4.amazonaws.com", + "emrnotebooks-prod.ap-southeast-4.amazonaws.com", + "emrstudio-prod.ap-southeast-4.amazonaws.com", + "emrappui-prod.ca-central-1.amazonaws.com", + "emrnotebooks-prod.ca-central-1.amazonaws.com", + "emrstudio-prod.ca-central-1.amazonaws.com", + "emrappui-prod.ca-west-1.amazonaws.com", + "emrnotebooks-prod.ca-west-1.amazonaws.com", + "emrstudio-prod.ca-west-1.amazonaws.com", + "emrappui-prod.eu-central-1.amazonaws.com", + "emrnotebooks-prod.eu-central-1.amazonaws.com", + "emrstudio-prod.eu-central-1.amazonaws.com", + "emrappui-prod.eu-central-2.amazonaws.com", + "emrnotebooks-prod.eu-central-2.amazonaws.com", + "emrstudio-prod.eu-central-2.amazonaws.com", + "emrappui-prod.eu-north-1.amazonaws.com", + "emrnotebooks-prod.eu-north-1.amazonaws.com", + "emrstudio-prod.eu-north-1.amazonaws.com", + "emrappui-prod.eu-south-1.amazonaws.com", + "emrnotebooks-prod.eu-south-1.amazonaws.com", + "emrstudio-prod.eu-south-1.amazonaws.com", + "emrappui-prod.eu-south-2.amazonaws.com", + "emrnotebooks-prod.eu-south-2.amazonaws.com", + "emrstudio-prod.eu-south-2.amazonaws.com", + "emrappui-prod.eu-west-1.amazonaws.com", + "emrnotebooks-prod.eu-west-1.amazonaws.com", + "emrstudio-prod.eu-west-1.amazonaws.com", + "emrappui-prod.eu-west-2.amazonaws.com", + "emrnotebooks-prod.eu-west-2.amazonaws.com", + "emrstudio-prod.eu-west-2.amazonaws.com", + "emrappui-prod.eu-west-3.amazonaws.com", + "emrnotebooks-prod.eu-west-3.amazonaws.com", + "emrstudio-prod.eu-west-3.amazonaws.com", + "emrappui-prod.il-central-1.amazonaws.com", + "emrnotebooks-prod.il-central-1.amazonaws.com", + "emrstudio-prod.il-central-1.amazonaws.com", + "emrappui-prod.me-central-1.amazonaws.com", + "emrnotebooks-prod.me-central-1.amazonaws.com", + "emrstudio-prod.me-central-1.amazonaws.com", + "emrappui-prod.me-south-1.amazonaws.com", + "emrnotebooks-prod.me-south-1.amazonaws.com", + "emrstudio-prod.me-south-1.amazonaws.com", + "emrappui-prod.sa-east-1.amazonaws.com", + "emrnotebooks-prod.sa-east-1.amazonaws.com", + "emrstudio-prod.sa-east-1.amazonaws.com", + "emrappui-prod.us-east-1.amazonaws.com", + "emrnotebooks-prod.us-east-1.amazonaws.com", + "emrstudio-prod.us-east-1.amazonaws.com", + "emrappui-prod.us-east-2.amazonaws.com", + "emrnotebooks-prod.us-east-2.amazonaws.com", + "emrstudio-prod.us-east-2.amazonaws.com", + "emrappui-prod.us-gov-east-1.amazonaws.com", + "emrnotebooks-prod.us-gov-east-1.amazonaws.com", + "emrstudio-prod.us-gov-east-1.amazonaws.com", + "emrappui-prod.us-gov-west-1.amazonaws.com", + "emrnotebooks-prod.us-gov-west-1.amazonaws.com", + "emrstudio-prod.us-gov-west-1.amazonaws.com", + "emrappui-prod.us-west-1.amazonaws.com", + "emrnotebooks-prod.us-west-1.amazonaws.com", + "emrstudio-prod.us-west-1.amazonaws.com", + "emrappui-prod.us-west-2.amazonaws.com", + "emrnotebooks-prod.us-west-2.amazonaws.com", + "emrstudio-prod.us-west-2.amazonaws.com", + "*.cn-north-1.airflow.amazonaws.com.cn", + "*.cn-northwest-1.airflow.amazonaws.com.cn", + "*.af-south-1.airflow.amazonaws.com", + "*.ap-east-1.airflow.amazonaws.com", + "*.ap-northeast-1.airflow.amazonaws.com", + "*.ap-northeast-2.airflow.amazonaws.com", + "*.ap-northeast-3.airflow.amazonaws.com", + "*.ap-south-1.airflow.amazonaws.com", + "*.ap-south-2.airflow.amazonaws.com", + "*.ap-southeast-1.airflow.amazonaws.com", + "*.ap-southeast-2.airflow.amazonaws.com", + "*.ap-southeast-3.airflow.amazonaws.com", + "*.ap-southeast-4.airflow.amazonaws.com", + "*.ca-central-1.airflow.amazonaws.com", + "*.ca-west-1.airflow.amazonaws.com", + "*.eu-central-1.airflow.amazonaws.com", + "*.eu-central-2.airflow.amazonaws.com", + "*.eu-north-1.airflow.amazonaws.com", + "*.eu-south-1.airflow.amazonaws.com", + "*.eu-south-2.airflow.amazonaws.com", + "*.eu-west-1.airflow.amazonaws.com", + "*.eu-west-2.airflow.amazonaws.com", + "*.eu-west-3.airflow.amazonaws.com", + "*.il-central-1.airflow.amazonaws.com", + "*.me-central-1.airflow.amazonaws.com", + "*.me-south-1.airflow.amazonaws.com", + "*.sa-east-1.airflow.amazonaws.com", + "*.us-east-1.airflow.amazonaws.com", + "*.us-east-2.airflow.amazonaws.com", + "*.us-west-1.airflow.amazonaws.com", + "*.us-west-2.airflow.amazonaws.com", + "s3.dualstack.cn-north-1.amazonaws.com.cn", + "s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn", + "s3-website.dualstack.cn-north-1.amazonaws.com.cn", + "s3.cn-north-1.amazonaws.com.cn", + "s3-accesspoint.cn-north-1.amazonaws.com.cn", + "s3-deprecated.cn-north-1.amazonaws.com.cn", + "s3-object-lambda.cn-north-1.amazonaws.com.cn", + "s3-website.cn-north-1.amazonaws.com.cn", + "s3.dualstack.cn-northwest-1.amazonaws.com.cn", + "s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn", + "s3.cn-northwest-1.amazonaws.com.cn", + "s3-accesspoint.cn-northwest-1.amazonaws.com.cn", + "s3-object-lambda.cn-northwest-1.amazonaws.com.cn", + "s3-website.cn-northwest-1.amazonaws.com.cn", + "s3.dualstack.af-south-1.amazonaws.com", + "s3-accesspoint.dualstack.af-south-1.amazonaws.com", + "s3-website.dualstack.af-south-1.amazonaws.com", + "s3.af-south-1.amazonaws.com", + "s3-accesspoint.af-south-1.amazonaws.com", + "s3-object-lambda.af-south-1.amazonaws.com", + "s3-website.af-south-1.amazonaws.com", + "s3.dualstack.ap-east-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-east-1.amazonaws.com", + "s3.ap-east-1.amazonaws.com", + "s3-accesspoint.ap-east-1.amazonaws.com", + "s3-object-lambda.ap-east-1.amazonaws.com", + "s3-website.ap-east-1.amazonaws.com", + "s3.dualstack.ap-northeast-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com", + "s3-website.dualstack.ap-northeast-1.amazonaws.com", + "s3.ap-northeast-1.amazonaws.com", + "s3-accesspoint.ap-northeast-1.amazonaws.com", + "s3-object-lambda.ap-northeast-1.amazonaws.com", + "s3-website.ap-northeast-1.amazonaws.com", + "s3.dualstack.ap-northeast-2.amazonaws.com", + "s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com", + "s3-website.dualstack.ap-northeast-2.amazonaws.com", + "s3.ap-northeast-2.amazonaws.com", + "s3-accesspoint.ap-northeast-2.amazonaws.com", + "s3-object-lambda.ap-northeast-2.amazonaws.com", + "s3-website.ap-northeast-2.amazonaws.com", + "s3.dualstack.ap-northeast-3.amazonaws.com", + "s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com", + "s3-website.dualstack.ap-northeast-3.amazonaws.com", + "s3.ap-northeast-3.amazonaws.com", + "s3-accesspoint.ap-northeast-3.amazonaws.com", + "s3-object-lambda.ap-northeast-3.amazonaws.com", + "s3-website.ap-northeast-3.amazonaws.com", + "s3.dualstack.ap-south-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-south-1.amazonaws.com", + "s3-website.dualstack.ap-south-1.amazonaws.com", + "s3.ap-south-1.amazonaws.com", + "s3-accesspoint.ap-south-1.amazonaws.com", + "s3-object-lambda.ap-south-1.amazonaws.com", + "s3-website.ap-south-1.amazonaws.com", + "s3.dualstack.ap-south-2.amazonaws.com", + "s3-accesspoint.dualstack.ap-south-2.amazonaws.com", + "s3-website.dualstack.ap-south-2.amazonaws.com", + "s3.ap-south-2.amazonaws.com", + "s3-accesspoint.ap-south-2.amazonaws.com", + "s3-object-lambda.ap-south-2.amazonaws.com", + "s3-website.ap-south-2.amazonaws.com", + "s3.dualstack.ap-southeast-1.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com", + "s3-website.dualstack.ap-southeast-1.amazonaws.com", + "s3.ap-southeast-1.amazonaws.com", + "s3-accesspoint.ap-southeast-1.amazonaws.com", + "s3-object-lambda.ap-southeast-1.amazonaws.com", + "s3-website.ap-southeast-1.amazonaws.com", + "s3.dualstack.ap-southeast-2.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com", + "s3-website.dualstack.ap-southeast-2.amazonaws.com", + "s3.ap-southeast-2.amazonaws.com", + "s3-accesspoint.ap-southeast-2.amazonaws.com", + "s3-object-lambda.ap-southeast-2.amazonaws.com", + "s3-website.ap-southeast-2.amazonaws.com", + "s3.dualstack.ap-southeast-3.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com", + "s3-website.dualstack.ap-southeast-3.amazonaws.com", + "s3.ap-southeast-3.amazonaws.com", + "s3-accesspoint.ap-southeast-3.amazonaws.com", + "s3-object-lambda.ap-southeast-3.amazonaws.com", + "s3-website.ap-southeast-3.amazonaws.com", + "s3.dualstack.ap-southeast-4.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com", + "s3-website.dualstack.ap-southeast-4.amazonaws.com", + "s3.ap-southeast-4.amazonaws.com", + "s3-accesspoint.ap-southeast-4.amazonaws.com", + "s3-object-lambda.ap-southeast-4.amazonaws.com", + "s3-website.ap-southeast-4.amazonaws.com", + "s3.dualstack.ap-southeast-5.amazonaws.com", + "s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com", + "s3-website.dualstack.ap-southeast-5.amazonaws.com", + "s3.ap-southeast-5.amazonaws.com", + "s3-accesspoint.ap-southeast-5.amazonaws.com", + "s3-deprecated.ap-southeast-5.amazonaws.com", + "s3-object-lambda.ap-southeast-5.amazonaws.com", + "s3-website.ap-southeast-5.amazonaws.com", + "s3.dualstack.ca-central-1.amazonaws.com", + "s3-accesspoint.dualstack.ca-central-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com", + "s3-fips.dualstack.ca-central-1.amazonaws.com", + "s3-website.dualstack.ca-central-1.amazonaws.com", + "s3.ca-central-1.amazonaws.com", + "s3-accesspoint.ca-central-1.amazonaws.com", + "s3-accesspoint-fips.ca-central-1.amazonaws.com", + "s3-fips.ca-central-1.amazonaws.com", + "s3-object-lambda.ca-central-1.amazonaws.com", + "s3-website.ca-central-1.amazonaws.com", + "s3.dualstack.ca-west-1.amazonaws.com", + "s3-accesspoint.dualstack.ca-west-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.ca-west-1.amazonaws.com", + "s3-fips.dualstack.ca-west-1.amazonaws.com", + "s3-website.dualstack.ca-west-1.amazonaws.com", + "s3.ca-west-1.amazonaws.com", + "s3-accesspoint.ca-west-1.amazonaws.com", + "s3-accesspoint-fips.ca-west-1.amazonaws.com", + "s3-fips.ca-west-1.amazonaws.com", + "s3-object-lambda.ca-west-1.amazonaws.com", + "s3-website.ca-west-1.amazonaws.com", + "s3.dualstack.eu-central-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-central-1.amazonaws.com", + "s3-website.dualstack.eu-central-1.amazonaws.com", + "s3.eu-central-1.amazonaws.com", + "s3-accesspoint.eu-central-1.amazonaws.com", + "s3-object-lambda.eu-central-1.amazonaws.com", + "s3-website.eu-central-1.amazonaws.com", + "s3.dualstack.eu-central-2.amazonaws.com", + "s3-accesspoint.dualstack.eu-central-2.amazonaws.com", + "s3-website.dualstack.eu-central-2.amazonaws.com", + "s3.eu-central-2.amazonaws.com", + "s3-accesspoint.eu-central-2.amazonaws.com", + "s3-object-lambda.eu-central-2.amazonaws.com", + "s3-website.eu-central-2.amazonaws.com", + "s3.dualstack.eu-north-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-north-1.amazonaws.com", + "s3.eu-north-1.amazonaws.com", + "s3-accesspoint.eu-north-1.amazonaws.com", + "s3-object-lambda.eu-north-1.amazonaws.com", + "s3-website.eu-north-1.amazonaws.com", + "s3.dualstack.eu-south-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-south-1.amazonaws.com", + "s3-website.dualstack.eu-south-1.amazonaws.com", + "s3.eu-south-1.amazonaws.com", + "s3-accesspoint.eu-south-1.amazonaws.com", + "s3-object-lambda.eu-south-1.amazonaws.com", + "s3-website.eu-south-1.amazonaws.com", + "s3.dualstack.eu-south-2.amazonaws.com", + "s3-accesspoint.dualstack.eu-south-2.amazonaws.com", + "s3-website.dualstack.eu-south-2.amazonaws.com", + "s3.eu-south-2.amazonaws.com", + "s3-accesspoint.eu-south-2.amazonaws.com", + "s3-object-lambda.eu-south-2.amazonaws.com", + "s3-website.eu-south-2.amazonaws.com", + "s3.dualstack.eu-west-1.amazonaws.com", + "s3-accesspoint.dualstack.eu-west-1.amazonaws.com", + "s3-website.dualstack.eu-west-1.amazonaws.com", + "s3.eu-west-1.amazonaws.com", + "s3-accesspoint.eu-west-1.amazonaws.com", + "s3-deprecated.eu-west-1.amazonaws.com", + "s3-object-lambda.eu-west-1.amazonaws.com", + "s3-website.eu-west-1.amazonaws.com", + "s3.dualstack.eu-west-2.amazonaws.com", + "s3-accesspoint.dualstack.eu-west-2.amazonaws.com", + "s3.eu-west-2.amazonaws.com", + "s3-accesspoint.eu-west-2.amazonaws.com", + "s3-object-lambda.eu-west-2.amazonaws.com", + "s3-website.eu-west-2.amazonaws.com", + "s3.dualstack.eu-west-3.amazonaws.com", + "s3-accesspoint.dualstack.eu-west-3.amazonaws.com", + "s3-website.dualstack.eu-west-3.amazonaws.com", + "s3.eu-west-3.amazonaws.com", + "s3-accesspoint.eu-west-3.amazonaws.com", + "s3-object-lambda.eu-west-3.amazonaws.com", + "s3-website.eu-west-3.amazonaws.com", + "s3.dualstack.il-central-1.amazonaws.com", + "s3-accesspoint.dualstack.il-central-1.amazonaws.com", + "s3-website.dualstack.il-central-1.amazonaws.com", + "s3.il-central-1.amazonaws.com", + "s3-accesspoint.il-central-1.amazonaws.com", + "s3-object-lambda.il-central-1.amazonaws.com", + "s3-website.il-central-1.amazonaws.com", + "s3.dualstack.me-central-1.amazonaws.com", + "s3-accesspoint.dualstack.me-central-1.amazonaws.com", + "s3-website.dualstack.me-central-1.amazonaws.com", + "s3.me-central-1.amazonaws.com", + "s3-accesspoint.me-central-1.amazonaws.com", + "s3-object-lambda.me-central-1.amazonaws.com", + "s3-website.me-central-1.amazonaws.com", + "s3.dualstack.me-south-1.amazonaws.com", + "s3-accesspoint.dualstack.me-south-1.amazonaws.com", + "s3.me-south-1.amazonaws.com", + "s3-accesspoint.me-south-1.amazonaws.com", + "s3-object-lambda.me-south-1.amazonaws.com", + "s3-website.me-south-1.amazonaws.com", + "s3.amazonaws.com", + "s3-1.amazonaws.com", + "s3-ap-east-1.amazonaws.com", + "s3-ap-northeast-1.amazonaws.com", + "s3-ap-northeast-2.amazonaws.com", + "s3-ap-northeast-3.amazonaws.com", + "s3-ap-south-1.amazonaws.com", + "s3-ap-southeast-1.amazonaws.com", + "s3-ap-southeast-2.amazonaws.com", + "s3-ca-central-1.amazonaws.com", + "s3-eu-central-1.amazonaws.com", + "s3-eu-north-1.amazonaws.com", + "s3-eu-west-1.amazonaws.com", + "s3-eu-west-2.amazonaws.com", + "s3-eu-west-3.amazonaws.com", + "s3-external-1.amazonaws.com", + "s3-fips-us-gov-east-1.amazonaws.com", + "s3-fips-us-gov-west-1.amazonaws.com", + "mrap.accesspoint.s3-global.amazonaws.com", + "s3-me-south-1.amazonaws.com", + "s3-sa-east-1.amazonaws.com", + "s3-us-east-2.amazonaws.com", + "s3-us-gov-east-1.amazonaws.com", + "s3-us-gov-west-1.amazonaws.com", + "s3-us-west-1.amazonaws.com", + "s3-us-west-2.amazonaws.com", + "s3-website-ap-northeast-1.amazonaws.com", + "s3-website-ap-southeast-1.amazonaws.com", + "s3-website-ap-southeast-2.amazonaws.com", + "s3-website-eu-west-1.amazonaws.com", + "s3-website-sa-east-1.amazonaws.com", + "s3-website-us-east-1.amazonaws.com", + "s3-website-us-gov-west-1.amazonaws.com", + "s3-website-us-west-1.amazonaws.com", + "s3-website-us-west-2.amazonaws.com", + "s3.dualstack.sa-east-1.amazonaws.com", + "s3-accesspoint.dualstack.sa-east-1.amazonaws.com", + "s3-website.dualstack.sa-east-1.amazonaws.com", + "s3.sa-east-1.amazonaws.com", + "s3-accesspoint.sa-east-1.amazonaws.com", + "s3-object-lambda.sa-east-1.amazonaws.com", + "s3-website.sa-east-1.amazonaws.com", + "s3.dualstack.us-east-1.amazonaws.com", + "s3-accesspoint.dualstack.us-east-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com", + "s3-fips.dualstack.us-east-1.amazonaws.com", + "s3-website.dualstack.us-east-1.amazonaws.com", + "s3.us-east-1.amazonaws.com", + "s3-accesspoint.us-east-1.amazonaws.com", + "s3-accesspoint-fips.us-east-1.amazonaws.com", + "s3-deprecated.us-east-1.amazonaws.com", + "s3-fips.us-east-1.amazonaws.com", + "s3-object-lambda.us-east-1.amazonaws.com", + "s3-website.us-east-1.amazonaws.com", + "s3.dualstack.us-east-2.amazonaws.com", + "s3-accesspoint.dualstack.us-east-2.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com", + "s3-fips.dualstack.us-east-2.amazonaws.com", + "s3-website.dualstack.us-east-2.amazonaws.com", + "s3.us-east-2.amazonaws.com", + "s3-accesspoint.us-east-2.amazonaws.com", + "s3-accesspoint-fips.us-east-2.amazonaws.com", + "s3-deprecated.us-east-2.amazonaws.com", + "s3-fips.us-east-2.amazonaws.com", + "s3-object-lambda.us-east-2.amazonaws.com", + "s3-website.us-east-2.amazonaws.com", + "s3.dualstack.us-gov-east-1.amazonaws.com", + "s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com", + "s3-fips.dualstack.us-gov-east-1.amazonaws.com", + "s3.us-gov-east-1.amazonaws.com", + "s3-accesspoint.us-gov-east-1.amazonaws.com", + "s3-accesspoint-fips.us-gov-east-1.amazonaws.com", + "s3-fips.us-gov-east-1.amazonaws.com", + "s3-object-lambda.us-gov-east-1.amazonaws.com", + "s3-website.us-gov-east-1.amazonaws.com", + "s3.dualstack.us-gov-west-1.amazonaws.com", + "s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com", + "s3-fips.dualstack.us-gov-west-1.amazonaws.com", + "s3.us-gov-west-1.amazonaws.com", + "s3-accesspoint.us-gov-west-1.amazonaws.com", + "s3-accesspoint-fips.us-gov-west-1.amazonaws.com", + "s3-fips.us-gov-west-1.amazonaws.com", + "s3-object-lambda.us-gov-west-1.amazonaws.com", + "s3-website.us-gov-west-1.amazonaws.com", + "s3.dualstack.us-west-1.amazonaws.com", + "s3-accesspoint.dualstack.us-west-1.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com", + "s3-fips.dualstack.us-west-1.amazonaws.com", + "s3-website.dualstack.us-west-1.amazonaws.com", + "s3.us-west-1.amazonaws.com", + "s3-accesspoint.us-west-1.amazonaws.com", + "s3-accesspoint-fips.us-west-1.amazonaws.com", + "s3-fips.us-west-1.amazonaws.com", + "s3-object-lambda.us-west-1.amazonaws.com", + "s3-website.us-west-1.amazonaws.com", + "s3.dualstack.us-west-2.amazonaws.com", + "s3-accesspoint.dualstack.us-west-2.amazonaws.com", + "s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com", + "s3-fips.dualstack.us-west-2.amazonaws.com", + "s3-website.dualstack.us-west-2.amazonaws.com", + "s3.us-west-2.amazonaws.com", + "s3-accesspoint.us-west-2.amazonaws.com", + "s3-accesspoint-fips.us-west-2.amazonaws.com", + "s3-deprecated.us-west-2.amazonaws.com", + "s3-fips.us-west-2.amazonaws.com", + "s3-object-lambda.us-west-2.amazonaws.com", + "s3-website.us-west-2.amazonaws.com", + "labeling.ap-northeast-1.sagemaker.aws", + "labeling.ap-northeast-2.sagemaker.aws", + "labeling.ap-south-1.sagemaker.aws", + "labeling.ap-southeast-1.sagemaker.aws", + "labeling.ap-southeast-2.sagemaker.aws", + "labeling.ca-central-1.sagemaker.aws", + "labeling.eu-central-1.sagemaker.aws", + "labeling.eu-west-1.sagemaker.aws", + "labeling.eu-west-2.sagemaker.aws", + "labeling.us-east-1.sagemaker.aws", + "labeling.us-east-2.sagemaker.aws", + "labeling.us-west-2.sagemaker.aws", + "notebook.af-south-1.sagemaker.aws", + "notebook.ap-east-1.sagemaker.aws", + "notebook.ap-northeast-1.sagemaker.aws", + "notebook.ap-northeast-2.sagemaker.aws", + "notebook.ap-northeast-3.sagemaker.aws", + "notebook.ap-south-1.sagemaker.aws", + "notebook.ap-south-2.sagemaker.aws", + "notebook.ap-southeast-1.sagemaker.aws", + "notebook.ap-southeast-2.sagemaker.aws", + "notebook.ap-southeast-3.sagemaker.aws", + "notebook.ap-southeast-4.sagemaker.aws", + "notebook.ca-central-1.sagemaker.aws", + "notebook-fips.ca-central-1.sagemaker.aws", + "notebook.ca-west-1.sagemaker.aws", + "notebook-fips.ca-west-1.sagemaker.aws", + "notebook.eu-central-1.sagemaker.aws", + "notebook.eu-central-2.sagemaker.aws", + "notebook.eu-north-1.sagemaker.aws", + "notebook.eu-south-1.sagemaker.aws", + "notebook.eu-south-2.sagemaker.aws", + "notebook.eu-west-1.sagemaker.aws", + "notebook.eu-west-2.sagemaker.aws", + "notebook.eu-west-3.sagemaker.aws", + "notebook.il-central-1.sagemaker.aws", + "notebook.me-central-1.sagemaker.aws", + "notebook.me-south-1.sagemaker.aws", + "notebook.sa-east-1.sagemaker.aws", + "notebook.us-east-1.sagemaker.aws", + "notebook-fips.us-east-1.sagemaker.aws", + "notebook.us-east-2.sagemaker.aws", + "notebook-fips.us-east-2.sagemaker.aws", + "notebook.us-gov-east-1.sagemaker.aws", + "notebook-fips.us-gov-east-1.sagemaker.aws", + "notebook.us-gov-west-1.sagemaker.aws", + "notebook-fips.us-gov-west-1.sagemaker.aws", + "notebook.us-west-1.sagemaker.aws", + "notebook-fips.us-west-1.sagemaker.aws", + "notebook.us-west-2.sagemaker.aws", + "notebook-fips.us-west-2.sagemaker.aws", + "notebook.cn-north-1.sagemaker.com.cn", + "notebook.cn-northwest-1.sagemaker.com.cn", + "studio.af-south-1.sagemaker.aws", + "studio.ap-east-1.sagemaker.aws", + "studio.ap-northeast-1.sagemaker.aws", + "studio.ap-northeast-2.sagemaker.aws", + "studio.ap-northeast-3.sagemaker.aws", + "studio.ap-south-1.sagemaker.aws", + "studio.ap-southeast-1.sagemaker.aws", + "studio.ap-southeast-2.sagemaker.aws", + "studio.ap-southeast-3.sagemaker.aws", + "studio.ca-central-1.sagemaker.aws", + "studio.eu-central-1.sagemaker.aws", + "studio.eu-north-1.sagemaker.aws", + "studio.eu-south-1.sagemaker.aws", + "studio.eu-south-2.sagemaker.aws", + "studio.eu-west-1.sagemaker.aws", + "studio.eu-west-2.sagemaker.aws", + "studio.eu-west-3.sagemaker.aws", + "studio.il-central-1.sagemaker.aws", + "studio.me-central-1.sagemaker.aws", + "studio.me-south-1.sagemaker.aws", + "studio.sa-east-1.sagemaker.aws", + "studio.us-east-1.sagemaker.aws", + "studio.us-east-2.sagemaker.aws", + "studio.us-gov-east-1.sagemaker.aws", + "studio-fips.us-gov-east-1.sagemaker.aws", + "studio.us-gov-west-1.sagemaker.aws", + "studio-fips.us-gov-west-1.sagemaker.aws", + "studio.us-west-1.sagemaker.aws", + "studio.us-west-2.sagemaker.aws", + "studio.cn-north-1.sagemaker.com.cn", + "studio.cn-northwest-1.sagemaker.com.cn", + "*.experiments.sagemaker.aws", + "analytics-gateway.ap-northeast-1.amazonaws.com", + "analytics-gateway.ap-northeast-2.amazonaws.com", + "analytics-gateway.ap-south-1.amazonaws.com", + "analytics-gateway.ap-southeast-1.amazonaws.com", + "analytics-gateway.ap-southeast-2.amazonaws.com", + "analytics-gateway.eu-central-1.amazonaws.com", + "analytics-gateway.eu-west-1.amazonaws.com", + "analytics-gateway.us-east-1.amazonaws.com", + "analytics-gateway.us-east-2.amazonaws.com", + "analytics-gateway.us-west-2.amazonaws.com", + "amplifyapp.com", + "*.awsapprunner.com", + "webview-assets.aws-cloud9.af-south-1.amazonaws.com", + "vfs.cloud9.af-south-1.amazonaws.com", + "webview-assets.cloud9.af-south-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-east-1.amazonaws.com", + "vfs.cloud9.ap-east-1.amazonaws.com", + "webview-assets.cloud9.ap-east-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com", + "vfs.cloud9.ap-northeast-1.amazonaws.com", + "webview-assets.cloud9.ap-northeast-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com", + "vfs.cloud9.ap-northeast-2.amazonaws.com", + "webview-assets.cloud9.ap-northeast-2.amazonaws.com", + "webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com", + "vfs.cloud9.ap-northeast-3.amazonaws.com", + "webview-assets.cloud9.ap-northeast-3.amazonaws.com", + "webview-assets.aws-cloud9.ap-south-1.amazonaws.com", + "vfs.cloud9.ap-south-1.amazonaws.com", + "webview-assets.cloud9.ap-south-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com", + "vfs.cloud9.ap-southeast-1.amazonaws.com", + "webview-assets.cloud9.ap-southeast-1.amazonaws.com", + "webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com", + "vfs.cloud9.ap-southeast-2.amazonaws.com", + "webview-assets.cloud9.ap-southeast-2.amazonaws.com", + "webview-assets.aws-cloud9.ca-central-1.amazonaws.com", + "vfs.cloud9.ca-central-1.amazonaws.com", + "webview-assets.cloud9.ca-central-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-central-1.amazonaws.com", + "vfs.cloud9.eu-central-1.amazonaws.com", + "webview-assets.cloud9.eu-central-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-north-1.amazonaws.com", + "vfs.cloud9.eu-north-1.amazonaws.com", + "webview-assets.cloud9.eu-north-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-south-1.amazonaws.com", + "vfs.cloud9.eu-south-1.amazonaws.com", + "webview-assets.cloud9.eu-south-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-west-1.amazonaws.com", + "vfs.cloud9.eu-west-1.amazonaws.com", + "webview-assets.cloud9.eu-west-1.amazonaws.com", + "webview-assets.aws-cloud9.eu-west-2.amazonaws.com", + "vfs.cloud9.eu-west-2.amazonaws.com", + "webview-assets.cloud9.eu-west-2.amazonaws.com", + "webview-assets.aws-cloud9.eu-west-3.amazonaws.com", + "vfs.cloud9.eu-west-3.amazonaws.com", + "webview-assets.cloud9.eu-west-3.amazonaws.com", + "webview-assets.aws-cloud9.il-central-1.amazonaws.com", + "vfs.cloud9.il-central-1.amazonaws.com", + "webview-assets.aws-cloud9.me-south-1.amazonaws.com", + "vfs.cloud9.me-south-1.amazonaws.com", + "webview-assets.cloud9.me-south-1.amazonaws.com", + "webview-assets.aws-cloud9.sa-east-1.amazonaws.com", + "vfs.cloud9.sa-east-1.amazonaws.com", + "webview-assets.cloud9.sa-east-1.amazonaws.com", + "webview-assets.aws-cloud9.us-east-1.amazonaws.com", + "vfs.cloud9.us-east-1.amazonaws.com", + "webview-assets.cloud9.us-east-1.amazonaws.com", + "webview-assets.aws-cloud9.us-east-2.amazonaws.com", + "vfs.cloud9.us-east-2.amazonaws.com", + "webview-assets.cloud9.us-east-2.amazonaws.com", + "webview-assets.aws-cloud9.us-west-1.amazonaws.com", + "vfs.cloud9.us-west-1.amazonaws.com", + "webview-assets.cloud9.us-west-1.amazonaws.com", + "webview-assets.aws-cloud9.us-west-2.amazonaws.com", + "vfs.cloud9.us-west-2.amazonaws.com", + "webview-assets.cloud9.us-west-2.amazonaws.com", + "awsapps.com", + "cn-north-1.eb.amazonaws.com.cn", + "cn-northwest-1.eb.amazonaws.com.cn", + "elasticbeanstalk.com", + "af-south-1.elasticbeanstalk.com", + "ap-east-1.elasticbeanstalk.com", + "ap-northeast-1.elasticbeanstalk.com", + "ap-northeast-2.elasticbeanstalk.com", + "ap-northeast-3.elasticbeanstalk.com", + "ap-south-1.elasticbeanstalk.com", + "ap-southeast-1.elasticbeanstalk.com", + "ap-southeast-2.elasticbeanstalk.com", + "ap-southeast-3.elasticbeanstalk.com", + "ca-central-1.elasticbeanstalk.com", + "eu-central-1.elasticbeanstalk.com", + "eu-north-1.elasticbeanstalk.com", + "eu-south-1.elasticbeanstalk.com", + "eu-west-1.elasticbeanstalk.com", + "eu-west-2.elasticbeanstalk.com", + "eu-west-3.elasticbeanstalk.com", + "il-central-1.elasticbeanstalk.com", + "me-south-1.elasticbeanstalk.com", + "sa-east-1.elasticbeanstalk.com", + "us-east-1.elasticbeanstalk.com", + "us-east-2.elasticbeanstalk.com", + "us-gov-east-1.elasticbeanstalk.com", + "us-gov-west-1.elasticbeanstalk.com", + "us-west-1.elasticbeanstalk.com", + "us-west-2.elasticbeanstalk.com", + "*.elb.amazonaws.com.cn", + "*.elb.amazonaws.com", + "awsglobalaccelerator.com", + "*.private.repost.aws", + "eero.online", + "eero-stage.online", + "apigee.io", + "panel.dev", + "siiites.com", + "appspacehosted.com", + "appspaceusercontent.com", + "appudo.net", + "on-aptible.com", + "f5.si", + "arvanedge.ir", + "user.aseinet.ne.jp", + "gv.vc", + "d.gv.vc", + "user.party.eus", + "pimienta.org", + "poivron.org", + "potager.org", + "sweetpepper.org", + "myasustor.com", + "cdn.prod.atlassian-dev.net", + "translated.page", + "myfritz.link", + "myfritz.net", + "onavstack.net", + "*.awdev.ca", + "*.advisor.ws", + "ecommerce-shop.pl", + "b-data.io", + "balena-devices.com", + "base.ec", + "official.ec", + "buyshop.jp", + "fashionstore.jp", + "handcrafted.jp", + "kawaiishop.jp", + "supersale.jp", + "theshop.jp", + "shopselect.net", + "base.shop", + "beagleboard.io", + "*.beget.app", + "pages.gay", + "bnr.la", + "bitbucket.io", + "blackbaudcdn.net", + "of.je", + "bluebite.io", + "boomla.net", + "boutir.com", + "boxfuse.io", + "square7.ch", + "bplaced.com", + "bplaced.de", + "square7.de", + "bplaced.net", + "square7.net", + "*.s.brave.io", + "shop.brendly.hr", + "shop.brendly.rs", + "browsersafetymark.io", + "radio.am", + "radio.fm", + "uk0.bigv.io", + "dh.bytemark.co.uk", + "vm.bytemark.co.uk", + "cafjs.com", + "canva-apps.cn", + "*.my.canvasite.cn", + "canva-apps.com", + "*.my.canva.site", + "drr.ac", + "uwu.ai", + "carrd.co", + "crd.co", + "ju.mp", + "api.gov.uk", + "cdn77-storage.com", + "rsc.contentproxy9.cz", + "r.cdn77.net", + "cdn77-ssl.net", + "c.cdn77.org", + "rsc.cdn77.org", + "ssl.origin.cdn77-secure.org", + "za.bz", + "br.com", + "cn.com", + "de.com", + "eu.com", + "jpn.com", + "mex.com", + "ru.com", + "sa.com", + "uk.com", + "us.com", + "za.com", + "com.de", + "gb.net", + "hu.net", + "jp.net", + "se.net", + "uk.net", + "ae.org", + "com.se", + "cx.ua", + "discourse.group", + "discourse.team", + "clerk.app", + "clerkstage.app", + "*.lcl.dev", + "*.lclstage.dev", + "*.stg.dev", + "*.stgstage.dev", + "cleverapps.cc", + "*.services.clever-cloud.com", + "cleverapps.io", + "cleverapps.tech", + "clickrising.net", + "cloudns.asia", + "cloudns.be", + "cloud-ip.biz", + "cloudns.biz", + "cloudns.cc", + "cloudns.ch", + "cloudns.cl", + "cloudns.club", + "dnsabr.com", + "ip-ddns.com", + "cloudns.cx", + "cloudns.eu", + "cloudns.in", + "cloudns.info", + "ddns-ip.net", + "dns-cloud.net", + "dns-dynamic.net", + "cloudns.nz", + "cloudns.org", + "ip-dynamic.org", + "cloudns.ph", + "cloudns.pro", + "cloudns.pw", + "cloudns.us", + "c66.me", + "cloud66.ws", + "cloud66.zone", + "jdevcloud.com", + "wpdevcloud.com", + "cloudaccess.host", + "freesite.host", + "cloudaccess.net", + "*.cloudera.site", + "cf-ipfs.com", + "cloudflare-ipfs.com", + "trycloudflare.com", + "pages.dev", + "r2.dev", + "workers.dev", + "cloudflare.net", + "cdn.cloudflare.net", + "cdn.cloudflareanycast.net", + "cdn.cloudflarecn.net", + "cdn.cloudflareglobal.net", + "cust.cloudscale.ch", + "objects.lpg.cloudscale.ch", + "objects.rma.cloudscale.ch", + "wnext.app", + "cnpy.gdn", + "*.otap.co", + "co.ca", + "co.com", + "codeberg.page", + "csb.app", + "preview.csb.app", + "co.nl", + "co.no", + "webhosting.be", + "hosting-cluster.nl", + "ctfcloud.net", + "convex.site", + "ac.ru", + "edu.ru", + "gov.ru", + "int.ru", + "mil.ru", + "test.ru", + "dyn.cosidns.de", + "dnsupdater.de", + "dynamisches-dns.de", + "internet-dns.de", + "l-o-g-i-n.de", + "dynamic-dns.info", + "feste-ip.net", + "knx-server.net", + "static-access.net", + "craft.me", + "realm.cz", + "on.crisp.email", + "*.cryptonomic.net", + "curv.dev", + "cfolks.pl", + "cyon.link", + "cyon.site", + "platform0.app", + "fnwk.site", + "folionetwork.site", + "biz.dk", + "co.dk", + "firm.dk", + "reg.dk", + "store.dk", + "dyndns.dappnode.io", + "builtwithdark.com", + "darklang.io", + "demo.datadetect.com", + "instance.datadetect.com", + "edgestack.me", + "dattolocal.com", + "dattorelay.com", + "dattoweb.com", + "mydatto.com", + "dattolocal.net", + "mydatto.net", + "ddnss.de", + "dyn.ddnss.de", + "dyndns.ddnss.de", + "dyn-ip24.de", + "dyndns1.de", + "home-webserver.de", + "dyn.home-webserver.de", + "myhome-server.de", + "ddnss.org", + "debian.net", + "definima.io", + "definima.net", + "deno.dev", + "deno-staging.dev", + "dedyn.io", + "deta.app", + "deta.dev", + "dfirma.pl", + "dkonto.pl", + "you2.pl", + "ondigitalocean.app", + "*.digitaloceanspaces.com", + "us.kg", + "rss.my.id", + "diher.solutions", + "discordsays.com", + "discordsez.com", + "jozi.biz", + "dnshome.de", + "online.th", + "shop.th", + "drayddns.com", + "shoparena.pl", + "dreamhosters.com", + "durumis.com", + "mydrobo.com", + "drud.io", + "drud.us", + "duckdns.org", + "dy.fi", + "tunk.org", + "dyndns.biz", + "for-better.biz", + "for-more.biz", + "for-some.biz", + "for-the.biz", + "selfip.biz", + "webhop.biz", + "ftpaccess.cc", + "game-server.cc", + "myphotos.cc", + "scrapping.cc", + "blogdns.com", + "cechire.com", + "dnsalias.com", + "dnsdojo.com", + "doesntexist.com", + "dontexist.com", + "doomdns.com", + "dyn-o-saur.com", + "dynalias.com", + "dyndns-at-home.com", + "dyndns-at-work.com", + "dyndns-blog.com", + "dyndns-free.com", + "dyndns-home.com", + "dyndns-ip.com", + "dyndns-mail.com", + "dyndns-office.com", + "dyndns-pics.com", + "dyndns-remote.com", + "dyndns-server.com", + "dyndns-web.com", + "dyndns-wiki.com", + "dyndns-work.com", + "est-a-la-maison.com", + "est-a-la-masion.com", + "est-le-patron.com", + "est-mon-blogueur.com", + "from-ak.com", + "from-al.com", + "from-ar.com", + "from-ca.com", + "from-ct.com", + "from-dc.com", + "from-de.com", + "from-fl.com", + "from-ga.com", + "from-hi.com", + "from-ia.com", + "from-id.com", + "from-il.com", + "from-in.com", + "from-ks.com", + "from-ky.com", + "from-ma.com", + "from-md.com", + "from-mi.com", + "from-mn.com", + "from-mo.com", + "from-ms.com", + "from-mt.com", + "from-nc.com", + "from-nd.com", + "from-ne.com", + "from-nh.com", + "from-nj.com", + "from-nm.com", + "from-nv.com", + "from-oh.com", + "from-ok.com", + "from-or.com", + "from-pa.com", + "from-pr.com", + "from-ri.com", + "from-sc.com", + "from-sd.com", + "from-tn.com", + "from-tx.com", + "from-ut.com", + "from-va.com", + "from-vt.com", + "from-wa.com", + "from-wi.com", + "from-wv.com", + "from-wy.com", + "getmyip.com", + "gotdns.com", + "hobby-site.com", + "homelinux.com", + "homeunix.com", + "iamallama.com", + "is-a-anarchist.com", + "is-a-blogger.com", + "is-a-bookkeeper.com", + "is-a-bulls-fan.com", + "is-a-caterer.com", + "is-a-chef.com", + "is-a-conservative.com", + "is-a-cpa.com", + "is-a-cubicle-slave.com", + "is-a-democrat.com", + "is-a-designer.com", + "is-a-doctor.com", + "is-a-financialadvisor.com", + "is-a-geek.com", + "is-a-green.com", + "is-a-guru.com", + "is-a-hard-worker.com", + "is-a-hunter.com", + "is-a-landscaper.com", + "is-a-lawyer.com", + "is-a-liberal.com", + "is-a-libertarian.com", + "is-a-llama.com", + "is-a-musician.com", + "is-a-nascarfan.com", + "is-a-nurse.com", + "is-a-painter.com", + "is-a-personaltrainer.com", + "is-a-photographer.com", + "is-a-player.com", + "is-a-republican.com", + "is-a-rockstar.com", + "is-a-socialist.com", + "is-a-student.com", + "is-a-teacher.com", + "is-a-techie.com", + "is-a-therapist.com", + "is-an-accountant.com", + "is-an-actor.com", + "is-an-actress.com", + "is-an-anarchist.com", + "is-an-artist.com", + "is-an-engineer.com", + "is-an-entertainer.com", + "is-certified.com", + "is-gone.com", + "is-into-anime.com", + "is-into-cars.com", + "is-into-cartoons.com", + "is-into-games.com", + "is-leet.com", + "is-not-certified.com", + "is-slick.com", + "is-uberleet.com", + "is-with-theband.com", + "isa-geek.com", + "isa-hockeynut.com", + "issmarterthanyou.com", + "likes-pie.com", + "likescandy.com", + "neat-url.com", + "saves-the-whales.com", + "selfip.com", + "sells-for-less.com", + "sells-for-u.com", + "servebbs.com", + "simple-url.com", + "space-to-rent.com", + "teaches-yoga.com", + "writesthisblog.com", + "ath.cx", + "fuettertdasnetz.de", + "isteingeek.de", + "istmein.de", + "lebtimnetz.de", + "leitungsen.de", + "traeumtgerade.de", + "barrel-of-knowledge.info", + "barrell-of-knowledge.info", + "dyndns.info", + "for-our.info", + "groks-the.info", + "groks-this.info", + "here-for-more.info", + "knowsitall.info", + "selfip.info", + "webhop.info", + "forgot.her.name", + "forgot.his.name", + "at-band-camp.net", + "blogdns.net", + "broke-it.net", + "buyshouses.net", + "dnsalias.net", + "dnsdojo.net", + "does-it.net", + "dontexist.net", + "dynalias.net", + "dynathome.net", + "endofinternet.net", + "from-az.net", + "from-co.net", + "from-la.net", + "from-ny.net", + "gets-it.net", + "ham-radio-op.net", + "homeftp.net", + "homeip.net", + "homelinux.net", + "homeunix.net", + "in-the-band.net", + "is-a-chef.net", + "is-a-geek.net", + "isa-geek.net", + "kicks-ass.net", + "office-on-the.net", + "podzone.net", + "scrapper-site.net", + "selfip.net", + "sells-it.net", + "servebbs.net", + "serveftp.net", + "thruhere.net", + "webhop.net", + "merseine.nu", + "mine.nu", + "shacknet.nu", + "blogdns.org", + "blogsite.org", + "boldlygoingnowhere.org", + "dnsalias.org", + "dnsdojo.org", + "doesntexist.org", + "dontexist.org", + "doomdns.org", + "dvrdns.org", + "dynalias.org", + "dyndns.org", + "go.dyndns.org", + "home.dyndns.org", + "endofinternet.org", + "endoftheinternet.org", + "from-me.org", + "game-host.org", + "gotdns.org", + "hobby-site.org", + "homedns.org", + "homeftp.org", + "homelinux.org", + "homeunix.org", + "is-a-bruinsfan.org", + "is-a-candidate.org", + "is-a-celticsfan.org", + "is-a-chef.org", + "is-a-geek.org", + "is-a-knight.org", + "is-a-linux-user.org", + "is-a-patsfan.org", + "is-a-soxfan.org", + "is-found.org", + "is-lost.org", + "is-saved.org", + "is-very-bad.org", + "is-very-evil.org", + "is-very-good.org", + "is-very-nice.org", + "is-very-sweet.org", + "isa-geek.org", + "kicks-ass.org", + "misconfused.org", + "podzone.org", + "readmyblog.org", + "selfip.org", + "sellsyourhome.org", + "servebbs.org", + "serveftp.org", + "servegame.org", + "stuff-4-sale.org", + "webhop.org", + "better-than.tv", + "dyndns.tv", + "on-the-web.tv", + "worse-than.tv", + "is-by.us", + "land-4-sale.us", + "stuff-4-sale.us", + "dyndns.ws", + "mypets.ws", + "ddnsfree.com", + "ddnsgeek.com", + "giize.com", + "gleeze.com", + "kozow.com", + "loseyourip.com", + "ooguy.com", + "theworkpc.com", + "casacam.net", + "dynu.net", + "accesscam.org", + "camdvr.org", + "freeddns.org", + "mywire.org", + "webredirect.org", + "myddns.rocks", + "dynv6.net", + "e4.cz", + "easypanel.app", + "easypanel.host", + "*.ewp.live", + "twmail.cc", + "twmail.net", + "twmail.org", + "mymailer.com.tw", + "url.tw", + "at.emf.camp", + "rt.ht", + "elementor.cloud", + "elementor.cool", + "en-root.fr", + "mytuleap.com", + "tuleap-partners.com", + "encr.app", + "encoreapi.com", + "eu.encoway.cloud", + "eu.org", + "al.eu.org", + "asso.eu.org", + "at.eu.org", + "au.eu.org", + "be.eu.org", + "bg.eu.org", + "ca.eu.org", + "cd.eu.org", + "ch.eu.org", + "cn.eu.org", + "cy.eu.org", + "cz.eu.org", + "de.eu.org", + "dk.eu.org", + "edu.eu.org", + "ee.eu.org", + "es.eu.org", + "fi.eu.org", + "fr.eu.org", + "gr.eu.org", + "hr.eu.org", + "hu.eu.org", + "ie.eu.org", + "il.eu.org", + "in.eu.org", + "int.eu.org", + "is.eu.org", + "it.eu.org", + "jp.eu.org", + "kr.eu.org", + "lt.eu.org", + "lu.eu.org", + "lv.eu.org", + "me.eu.org", + "mk.eu.org", + "mt.eu.org", + "my.eu.org", + "net.eu.org", + "ng.eu.org", + "nl.eu.org", + "no.eu.org", + "nz.eu.org", + "pl.eu.org", + "pt.eu.org", + "ro.eu.org", + "ru.eu.org", + "se.eu.org", + "si.eu.org", + "sk.eu.org", + "tr.eu.org", + "uk.eu.org", + "us.eu.org", + "eurodir.ru", + "eu-1.evennode.com", + "eu-2.evennode.com", + "eu-3.evennode.com", + "eu-4.evennode.com", + "us-1.evennode.com", + "us-2.evennode.com", + "us-3.evennode.com", + "us-4.evennode.com", + "relay.evervault.app", + "relay.evervault.dev", + "expo.app", + "staging.expo.app", + "onfabrica.com", + "ru.net", + "adygeya.ru", + "bashkiria.ru", + "bir.ru", + "cbg.ru", + "com.ru", + "dagestan.ru", + "grozny.ru", + "kalmykia.ru", + "kustanai.ru", + "marine.ru", + "mordovia.ru", + "msk.ru", + "mytis.ru", + "nalchik.ru", + "nov.ru", + "pyatigorsk.ru", + "spb.ru", + "vladikavkaz.ru", + "vladimir.ru", + "abkhazia.su", + "adygeya.su", + "aktyubinsk.su", + "arkhangelsk.su", + "armenia.su", + "ashgabad.su", + "azerbaijan.su", + "balashov.su", + "bashkiria.su", + "bryansk.su", + "bukhara.su", + "chimkent.su", + "dagestan.su", + "east-kazakhstan.su", + "exnet.su", + "georgia.su", + "grozny.su", + "ivanovo.su", + "jambyl.su", + "kalmykia.su", + "kaluga.su", + "karacol.su", + "karaganda.su", + "karelia.su", + "khakassia.su", + "krasnodar.su", + "kurgan.su", + "kustanai.su", + "lenug.su", + "mangyshlak.su", + "mordovia.su", + "msk.su", + "murmansk.su", + "nalchik.su", + "navoi.su", + "north-kazakhstan.su", + "nov.su", + "obninsk.su", + "penza.su", + "pokrovsk.su", + "sochi.su", + "spb.su", + "tashkent.su", + "termez.su", + "togliatti.su", + "troitsk.su", + "tselinograd.su", + "tula.su", + "tuva.su", + "vladikavkaz.su", + "vladimir.su", + "vologda.su", + "channelsdvr.net", + "u.channelsdvr.net", + "edgecompute.app", + "fastly-edge.com", + "fastly-terrarium.com", + "freetls.fastly.net", + "map.fastly.net", + "a.prod.fastly.net", + "global.prod.fastly.net", + "a.ssl.fastly.net", + "b.ssl.fastly.net", + "global.ssl.fastly.net", + "fastlylb.net", + "map.fastlylb.net", + "*.user.fm", + "fastvps-server.com", + "fastvps.host", + "myfast.host", + "fastvps.site", + "myfast.space", + "conn.uk", + "copro.uk", + "hosp.uk", + "fedorainfracloud.org", + "fedorapeople.org", + "cloud.fedoraproject.org", + "app.os.fedoraproject.org", + "app.os.stg.fedoraproject.org", + "mydobiss.com", + "fh-muenster.io", + "filegear.me", + "firebaseapp.com", + "fldrv.com", + "flutterflow.app", + "fly.dev", + "shw.io", + "edgeapp.net", + "forgeblocks.com", + "id.forgerock.io", + "framer.ai", + "framer.app", + "framercanvas.com", + "framer.media", + "framer.photos", + "framer.website", + "framer.wiki", + "0e.vc", + "freebox-os.com", + "freeboxos.com", + "fbx-os.fr", + "fbxos.fr", + "freebox-os.fr", + "freeboxos.fr", + "freedesktop.org", + "freemyip.com", + "*.frusky.de", + "wien.funkfeuer.at", + "daemon.asia", + "dix.asia", + "mydns.bz", + "0am.jp", + "0g0.jp", + "0j0.jp", + "0t0.jp", + "mydns.jp", + "pgw.jp", + "wjg.jp", + "keyword-on.net", + "live-on.net", + "server-on.net", + "mydns.tw", + "mydns.vc", + "*.futurecms.at", + "*.ex.futurecms.at", + "*.in.futurecms.at", + "futurehosting.at", + "futuremailing.at", + "*.ex.ortsinfo.at", + "*.kunden.ortsinfo.at", + "*.statics.cloud", + "aliases121.com", + "campaign.gov.uk", + "service.gov.uk", + "independent-commission.uk", + "independent-inquest.uk", + "independent-inquiry.uk", + "independent-panel.uk", + "independent-review.uk", + "public-inquiry.uk", + "royal-commission.uk", + "gehirn.ne.jp", + "usercontent.jp", + "gentapps.com", + "gentlentapis.com", + "lab.ms", + "cdn-edges.net", + "localcert.net", + "localhostcert.net", + "gsj.bz", + "githubusercontent.com", + "githubpreview.dev", + "github.io", + "gitlab.io", + "gitapp.si", + "gitpage.si", + "glitch.me", + "nog.community", + "co.ro", + "shop.ro", + "lolipop.io", + "angry.jp", + "babyblue.jp", + "babymilk.jp", + "backdrop.jp", + "bambina.jp", + "bitter.jp", + "blush.jp", + "boo.jp", + "boy.jp", + "boyfriend.jp", + "but.jp", + "candypop.jp", + "capoo.jp", + "catfood.jp", + "cheap.jp", + "chicappa.jp", + "chillout.jp", + "chips.jp", + "chowder.jp", + "chu.jp", + "ciao.jp", + "cocotte.jp", + "coolblog.jp", + "cranky.jp", + "cutegirl.jp", + "daa.jp", + "deca.jp", + "deci.jp", + "digick.jp", + "egoism.jp", + "fakefur.jp", + "fem.jp", + "flier.jp", + "floppy.jp", + "fool.jp", + "frenchkiss.jp", + "girlfriend.jp", + "girly.jp", + "gloomy.jp", + "gonna.jp", + "greater.jp", + "hacca.jp", + "heavy.jp", + "her.jp", + "hiho.jp", + "hippy.jp", + "holy.jp", + "hungry.jp", + "icurus.jp", + "itigo.jp", + "jellybean.jp", + "kikirara.jp", + "kill.jp", + "kilo.jp", + "kuron.jp", + "littlestar.jp", + "lolipopmc.jp", + "lolitapunk.jp", + "lomo.jp", + "lovepop.jp", + "lovesick.jp", + "main.jp", + "mods.jp", + "mond.jp", + "mongolian.jp", + "moo.jp", + "namaste.jp", + "nikita.jp", + "nobushi.jp", + "noor.jp", + "oops.jp", + "parallel.jp", + "parasite.jp", + "pecori.jp", + "peewee.jp", + "penne.jp", + "pepper.jp", + "perma.jp", + "pigboat.jp", + "pinoko.jp", + "punyu.jp", + "pupu.jp", + "pussycat.jp", + "pya.jp", + "raindrop.jp", + "readymade.jp", + "sadist.jp", + "schoolbus.jp", + "secret.jp", + "staba.jp", + "stripper.jp", + "sub.jp", + "sunnyday.jp", + "thick.jp", + "tonkotsu.jp", + "under.jp", + "upper.jp", + "velvet.jp", + "verse.jp", + "versus.jp", + "vivian.jp", + "watson.jp", + "weblike.jp", + "whitesnow.jp", + "zombie.jp", + "heteml.net", + "graphic.design", + "goip.de", + "blogspot.ae", + "blogspot.al", + "blogspot.am", + "*.hosted.app", + "*.run.app", + "web.app", + "blogspot.com.ar", + "blogspot.co.at", + "blogspot.com.au", + "blogspot.ba", + "blogspot.be", + "blogspot.bg", + "blogspot.bj", + "blogspot.com.br", + "blogspot.com.by", + "blogspot.ca", + "blogspot.cf", + "blogspot.ch", + "blogspot.cl", + "blogspot.com.co", + "*.0emm.com", + "appspot.com", + "*.r.appspot.com", + "blogspot.com", + "codespot.com", + "googleapis.com", + "googlecode.com", + "pagespeedmobilizer.com", + "withgoogle.com", + "withyoutube.com", + "blogspot.cv", + "blogspot.com.cy", + "blogspot.cz", + "blogspot.de", + "*.gateway.dev", + "blogspot.dk", + "blogspot.com.ee", + "blogspot.com.eg", + "blogspot.com.es", + "blogspot.fi", + "blogspot.fr", + "cloud.goog", + "translate.goog", + "*.usercontent.goog", + "blogspot.gr", + "blogspot.hk", + "blogspot.hr", + "blogspot.hu", + "blogspot.co.id", + "blogspot.ie", + "blogspot.co.il", + "blogspot.in", + "blogspot.is", + "blogspot.it", + "blogspot.jp", + "blogspot.co.ke", + "blogspot.kr", + "blogspot.li", + "blogspot.lt", + "blogspot.lu", + "blogspot.md", + "blogspot.mk", + "blogspot.com.mt", + "blogspot.mx", + "blogspot.my", + "cloudfunctions.net", + "blogspot.com.ng", + "blogspot.nl", + "blogspot.no", + "blogspot.co.nz", + "blogspot.pe", + "blogspot.pt", + "blogspot.qa", + "blogspot.re", + "blogspot.ro", + "blogspot.rs", + "blogspot.ru", + "blogspot.se", + "blogspot.sg", + "blogspot.si", + "blogspot.sk", + "blogspot.sn", + "blogspot.td", + "blogspot.com.tr", + "blogspot.tw", + "blogspot.ug", + "blogspot.co.uk", + "blogspot.com.uy", + "blogspot.vn", + "blogspot.co.za", + "goupile.fr", + "pymnt.uk", + "cloudapps.digital", + "london.cloudapps.digital", + "gov.nl", + "grafana-dev.net", + "grayjayleagues.com", + "günstigbestellen.de", + "günstigliefern.de", + "fin.ci", + "free.hr", + "caa.li", + "ua.rs", + "conf.se", + "häkkinen.fi", + "hrsn.dev", + "hashbang.sh", + "hasura.app", + "hasura-app.io", + "hatenablog.com", + "hatenadiary.com", + "hateblo.jp", + "hatenablog.jp", + "hatenadiary.jp", + "hatenadiary.org", + "pages.it.hs-heilbronn.de", + "pages-research.it.hs-heilbronn.de", + "heiyu.space", + "helioho.st", + "heliohost.us", + "hepforge.org", + "herokuapp.com", + "herokussl.com", + "heyflow.page", + "heyflow.site", + "ravendb.cloud", + "ravendb.community", + "development.run", + "ravendb.run", + "homesklep.pl", + "*.kin.one", + "*.id.pub", + "*.kin.pub", + "secaas.hk", + "hoplix.shop", + "orx.biz", + "biz.gl", + "biz.ng", + "co.biz.ng", + "dl.biz.ng", + "go.biz.ng", + "lg.biz.ng", + "on.biz.ng", + "col.ng", + "firm.ng", + "gen.ng", + "ltd.ng", + "ngo.ng", + "plc.ng", + "ie.ua", + "hostyhosting.io", + "hf.space", + "static.hf.space", + "hypernode.io", + "iobb.net", + "co.cz", + "*.moonscale.io", + "moonscale.net", + "gr.com", + "iki.fi", + "ibxos.it", + "iliadboxos.it", + "smushcdn.com", + "wphostedmail.com", + "wpmucdn.com", + "tempurl.host", + "wpmudev.host", + "dyn-berlin.de", + "in-berlin.de", + "in-brb.de", + "in-butter.de", + "in-dsl.de", + "in-vpn.de", + "in-dsl.net", + "in-vpn.net", + "in-dsl.org", + "in-vpn.org", + "biz.at", + "info.at", + "info.cx", + "ac.leg.br", + "al.leg.br", + "am.leg.br", + "ap.leg.br", + "ba.leg.br", + "ce.leg.br", + "df.leg.br", + "es.leg.br", + "go.leg.br", + "ma.leg.br", + "mg.leg.br", + "ms.leg.br", + "mt.leg.br", + "pa.leg.br", + "pb.leg.br", + "pe.leg.br", + "pi.leg.br", + "pr.leg.br", + "rj.leg.br", + "rn.leg.br", + "ro.leg.br", + "rr.leg.br", + "rs.leg.br", + "sc.leg.br", + "se.leg.br", + "sp.leg.br", + "to.leg.br", + "pixolino.com", + "na4u.ru", + "apps-1and1.com", + "live-website.com", + "apps-1and1.net", + "websitebuilder.online", + "app-ionos.space", + "iopsys.se", + "*.dweb.link", + "ipifony.net", + "ir.md", + "is-a-good.dev", + "is-a.dev", + "iservschule.de", + "mein-iserv.de", + "schulplattform.de", + "schulserver.de", + "test-iserv.de", + "iserv.dev", + "mel.cloudlets.com.au", + "cloud.interhostsolutions.be", + "alp1.ae.flow.ch", + "appengine.flow.ch", + "es-1.axarnet.cloud", + "diadem.cloud", + "vip.jelastic.cloud", + "jele.cloud", + "it1.eur.aruba.jenv-aruba.cloud", + "it1.jenv-aruba.cloud", + "keliweb.cloud", + "cs.keliweb.cloud", + "oxa.cloud", + "tn.oxa.cloud", + "uk.oxa.cloud", + "primetel.cloud", + "uk.primetel.cloud", + "ca.reclaim.cloud", + "uk.reclaim.cloud", + "us.reclaim.cloud", + "ch.trendhosting.cloud", + "de.trendhosting.cloud", + "jele.club", + "dopaas.com", + "paas.hosted-by-previder.com", + "rag-cloud.hosteur.com", + "rag-cloud-ch.hosteur.com", + "jcloud.ik-server.com", + "jcloud-ver-jpc.ik-server.com", + "demo.jelastic.com", + "paas.massivegrid.com", + "jed.wafaicloud.com", + "ryd.wafaicloud.com", + "j.scaleforce.com.cy", + "jelastic.dogado.eu", + "fi.cloudplatform.fi", + "demo.datacenter.fi", + "paas.datacenter.fi", + "jele.host", + "mircloud.host", + "paas.beebyte.io", + "sekd1.beebyteapp.io", + "jele.io", + "jc.neen.it", + "jcloud.kz", + "cloudjiffy.net", + "fra1-de.cloudjiffy.net", + "west1-us.cloudjiffy.net", + "jls-sto1.elastx.net", + "jls-sto2.elastx.net", + "jls-sto3.elastx.net", + "fr-1.paas.massivegrid.net", + "lon-1.paas.massivegrid.net", + "lon-2.paas.massivegrid.net", + "ny-1.paas.massivegrid.net", + "ny-2.paas.massivegrid.net", + "sg-1.paas.massivegrid.net", + "jelastic.saveincloud.net", + "nordeste-idc.saveincloud.net", + "j.scaleforce.net", + "sdscloud.pl", + "unicloud.pl", + "mircloud.ru", + "enscaled.sg", + "jele.site", + "jelastic.team", + "orangecloud.tn", + "j.layershift.co.uk", + "phx.enscaled.us", + "mircloud.us", + "myjino.ru", + "*.hosting.myjino.ru", + "*.landing.myjino.ru", + "*.spectrum.myjino.ru", + "*.vps.myjino.ru", + "jotelulu.cloud", + "webadorsite.com", + "jouwweb.site", + "*.cns.joyent.com", + "*.triton.zone", + "js.org", + "kaas.gg", + "khplay.nl", + "kapsi.fi", + "ezproxy.kuleuven.be", + "kuleuven.cloud", + "keymachine.de", + "kinghost.net", + "uni5.net", + "knightpoint.systems", + "koobin.events", + "webthings.io", + "krellian.net", + "oya.to", + "git-repos.de", + "lcube-server.de", + "svn-repos.de", + "leadpages.co", + "lpages.co", + "lpusercontent.com", + "lelux.site", + "libp2p.direct", + "runcontainers.dev", + "co.business", + "co.education", + "co.events", + "co.financial", + "co.network", + "co.place", + "co.technology", + "linkyard-cloud.ch", + "linkyard.cloud", + "members.linode.com", + "*.nodebalancer.linode.com", + "*.linodeobjects.com", + "ip.linodeusercontent.com", + "we.bs", + "filegear-sg.me", + "ggff.net", + "*.user.localcert.dev", + "lodz.pl", + "pabianice.pl", + "plock.pl", + "sieradz.pl", + "skierniewice.pl", + "zgierz.pl", + "loginline.app", + "loginline.dev", + "loginline.io", + "loginline.services", + "loginline.site", + "lohmus.me", + "servers.run", + "krasnik.pl", + "leczna.pl", + "lubartow.pl", + "lublin.pl", + "poniatowa.pl", + "swidnik.pl", + "glug.org.uk", + "lug.org.uk", + "lugs.org.uk", + "barsy.bg", + "barsy.club", + "barsycenter.com", + "barsyonline.com", + "barsy.de", + "barsy.dev", + "barsy.eu", + "barsy.gr", + "barsy.in", + "barsy.info", + "barsy.io", + "barsy.me", + "barsy.menu", + "barsyonline.menu", + "barsy.mobi", + "barsy.net", + "barsy.online", + "barsy.org", + "barsy.pro", + "barsy.pub", + "barsy.ro", + "barsy.rs", + "barsy.shop", + "barsyonline.shop", + "barsy.site", + "barsy.store", + "barsy.support", + "barsy.uk", + "barsy.co.uk", + "barsyonline.co.uk", + "*.magentosite.cloud", + "hb.cldmail.ru", + "matlab.cloud", + "modelscape.com", + "mwcloudnonprod.com", + "polyspace.com", + "mayfirst.info", + "mayfirst.org", + "mazeplay.com", + "mcdir.me", + "mcdir.ru", + "vps.mcdir.ru", + "mcpre.ru", + "mediatech.by", + "mediatech.dev", + "hra.health", + "medusajs.app", + "miniserver.com", + "memset.net", + "messerli.app", + "atmeta.com", + "apps.fbsbx.com", + "*.cloud.metacentrum.cz", + "custom.metacentrum.cz", + "flt.cloud.muni.cz", + "usr.cloud.muni.cz", + "meteorapp.com", + "eu.meteorapp.com", + "co.pl", + "*.azurecontainer.io", + "azure-api.net", + "azure-mobile.net", + "azureedge.net", + "azurefd.net", + "azurestaticapps.net", + "1.azurestaticapps.net", + "2.azurestaticapps.net", + "3.azurestaticapps.net", + "4.azurestaticapps.net", + "5.azurestaticapps.net", + "6.azurestaticapps.net", + "7.azurestaticapps.net", + "centralus.azurestaticapps.net", + "eastasia.azurestaticapps.net", + "eastus2.azurestaticapps.net", + "westeurope.azurestaticapps.net", + "westus2.azurestaticapps.net", + "azurewebsites.net", + "cloudapp.net", + "trafficmanager.net", + "blob.core.windows.net", + "servicebus.windows.net", + "routingthecloud.com", + "sn.mynetname.net", + "routingthecloud.net", + "routingthecloud.org", + "csx.cc", + "mydbserver.com", + "webspaceconfig.de", + "mittwald.info", + "mittwaldserver.info", + "typo3server.info", + "project.space", + "modx.dev", + "bmoattachments.org", + "net.ru", + "org.ru", + "pp.ru", + "hostedpi.com", + "caracal.mythic-beasts.com", + "customer.mythic-beasts.com", + "fentiger.mythic-beasts.com", + "lynx.mythic-beasts.com", + "ocelot.mythic-beasts.com", + "oncilla.mythic-beasts.com", + "onza.mythic-beasts.com", + "sphinx.mythic-beasts.com", + "vs.mythic-beasts.com", + "x.mythic-beasts.com", + "yali.mythic-beasts.com", + "cust.retrosnub.co.uk", + "ui.nabu.casa", + "cloud.nospamproxy.com", + "netfy.app", + "netlify.app", + "4u.com", + "nfshost.com", + "ipfs.nftstorage.link", + "ngo.us", + "ngrok.app", + "ngrok-free.app", + "ngrok.dev", + "ngrok-free.dev", + "ngrok.io", + "ap.ngrok.io", + "au.ngrok.io", + "eu.ngrok.io", + "in.ngrok.io", + "jp.ngrok.io", + "sa.ngrok.io", + "us.ngrok.io", + "ngrok.pizza", + "ngrok.pro", + "torun.pl", + "nh-serv.co.uk", + "nimsite.uk", + "mmafan.biz", + "myftp.biz", + "no-ip.biz", + "no-ip.ca", + "fantasyleague.cc", + "gotdns.ch", + "3utilities.com", + "blogsyte.com", + "ciscofreak.com", + "damnserver.com", + "ddnsking.com", + "ditchyourip.com", + "dnsiskinky.com", + "dynns.com", + "geekgalaxy.com", + "health-carereform.com", + "homesecuritymac.com", + "homesecuritypc.com", + "myactivedirectory.com", + "mysecuritycamera.com", + "myvnc.com", + "net-freaks.com", + "onthewifi.com", + "point2this.com", + "quicksytes.com", + "securitytactics.com", + "servebeer.com", + "servecounterstrike.com", + "serveexchange.com", + "serveftp.com", + "servegame.com", + "servehalflife.com", + "servehttp.com", + "servehumour.com", + "serveirc.com", + "servemp3.com", + "servep2p.com", + "servepics.com", + "servequake.com", + "servesarcasm.com", + "stufftoread.com", + "unusualperson.com", + "workisboring.com", + "dvrcam.info", + "ilovecollege.info", + "no-ip.info", + "brasilia.me", + "ddns.me", + "dnsfor.me", + "hopto.me", + "loginto.me", + "noip.me", + "webhop.me", + "bounceme.net", + "ddns.net", + "eating-organic.net", + "mydissent.net", + "myeffect.net", + "mymediapc.net", + "mypsx.net", + "mysecuritycamera.net", + "nhlfan.net", + "no-ip.net", + "pgafan.net", + "privatizehealthinsurance.net", + "redirectme.net", + "serveblog.net", + "serveminecraft.net", + "sytes.net", + "cable-modem.org", + "collegefan.org", + "couchpotatofries.org", + "hopto.org", + "mlbfan.org", + "myftp.org", + "mysecuritycamera.org", + "nflfan.org", + "no-ip.org", + "read-books.org", + "ufcfan.org", + "zapto.org", + "no-ip.co.uk", + "golffan.us", + "noip.us", + "pointto.us", + "stage.nodeart.io", + "*.developer.app", + "noop.app", + "*.northflank.app", + "*.build.run", + "*.code.run", + "*.database.run", + "*.migration.run", + "noticeable.news", + "notion.site", + "dnsking.ch", + "mypi.co", + "n4t.co", + "001www.com", + "myiphost.com", + "forumz.info", + "soundcast.me", + "tcp4.me", + "dnsup.net", + "hicam.net", + "now-dns.net", + "ownip.net", + "vpndns.net", + "dynserv.org", + "now-dns.org", + "x443.pw", + "now-dns.top", + "ntdll.top", + "freeddns.us", + "nsupdate.info", + "nerdpol.ovh", + "nyc.mn", + "prvcy.page", + "obl.ong", + "observablehq.cloud", + "static.observableusercontent.com", + "omg.lol", + "cloudycluster.net", + "omniwe.site", + "123webseite.at", + "123website.be", + "simplesite.com.br", + "123website.ch", + "simplesite.com", + "123webseite.de", + "123hjemmeside.dk", + "123miweb.es", + "123kotisivu.fi", + "123siteweb.fr", + "simplesite.gr", + "123homepage.it", + "123website.lu", + "123website.nl", + "123hjemmeside.no", + "service.one", + "simplesite.pl", + "123paginaweb.pt", + "123minsida.se", + "is-a-fullstack.dev", + "is-cool.dev", + "is-not-a.dev", + "localplayer.dev", + "is-local.org", + "opensocial.site", + "opencraft.hosting", + "16-b.it", + "32-b.it", + "64-b.it", + "orsites.com", + "operaunite.com", + "*.customer-oci.com", + "*.oci.customer-oci.com", + "*.ocp.customer-oci.com", + "*.ocs.customer-oci.com", + "*.oraclecloudapps.com", + "*.oraclegovcloudapps.com", + "*.oraclegovcloudapps.uk", + "tech.orange", + "can.re", + "authgear-staging.com", + "authgearapps.com", + "skygearapp.com", + "outsystemscloud.com", + "*.hosting.ovh.net", + "*.webpaas.ovh.net", + "ownprovider.com", + "own.pm", + "*.owo.codes", + "ox.rs", + "oy.lc", + "pgfog.com", + "pagexl.com", + "gotpantheon.com", + "pantheonsite.io", + "*.paywhirl.com", + "*.xmit.co", + "xmit.dev", + "madethis.site", + "srv.us", + "gh.srv.us", + "gl.srv.us", + "lk3.ru", + "mypep.link", + "perspecta.cloud", + "on-web.fr", + "*.upsun.app", + "upsunapp.com", + "ent.platform.sh", + "eu.platform.sh", + "us.platform.sh", + "*.platformsh.site", + "*.tst.site", + "platter-app.com", + "platter-app.dev", + "platterp.us", + "pley.games", + "onporter.run", + "co.bn", + "postman-echo.com", + "pstmn.io", + "mock.pstmn.io", + "httpbin.org", + "prequalifyme.today", + "xen.prgmr.com", + "priv.at", + "protonet.io", + "chirurgiens-dentistes-en-france.fr", + "byen.site", + "pubtls.org", + "pythonanywhere.com", + "eu.pythonanywhere.com", + "qa2.com", + "qcx.io", + "*.sys.qcx.io", + "myqnapcloud.cn", + "alpha-myqnapcloud.com", + "dev-myqnapcloud.com", + "mycloudnas.com", + "mynascloud.com", + "myqnapcloud.com", + "qoto.io", + "qualifioapp.com", + "ladesk.com", + "qbuser.com", + "*.quipelements.com", + "vapor.cloud", + "vaporcloud.io", + "rackmaze.com", + "rackmaze.net", + "cloudsite.builders", + "myradweb.net", + "servername.us", + "web.in", + "in.net", + "myrdbx.io", + "site.rb-hosting.io", + "*.on-rancher.cloud", + "*.on-k3s.io", + "*.on-rio.io", + "ravpage.co.il", + "readthedocs-hosted.com", + "readthedocs.io", + "rhcloud.com", + "instances.spawn.cc", + "onrender.com", + "app.render.com", + "replit.app", + "id.replit.app", + "firewalledreplit.co", + "id.firewalledreplit.co", + "repl.co", + "id.repl.co", + "replit.dev", + "archer.replit.dev", + "bones.replit.dev", + "canary.replit.dev", + "global.replit.dev", + "hacker.replit.dev", + "id.replit.dev", + "janeway.replit.dev", + "kim.replit.dev", + "kira.replit.dev", + "kirk.replit.dev", + "odo.replit.dev", + "paris.replit.dev", + "picard.replit.dev", + "pike.replit.dev", + "prerelease.replit.dev", + "reed.replit.dev", + "riker.replit.dev", + "sisko.replit.dev", + "spock.replit.dev", + "staging.replit.dev", + "sulu.replit.dev", + "tarpit.replit.dev", + "teams.replit.dev", + "tucker.replit.dev", + "wesley.replit.dev", + "worf.replit.dev", + "repl.run", + "resindevice.io", + "devices.resinstaging.io", + "hzc.io", + "adimo.co.uk", + "itcouldbewor.se", + "aus.basketball", + "nz.basketball", + "git-pages.rit.edu", + "rocky.page", + "rub.de", + "ruhr-uni-bochum.de", + "io.noc.ruhr-uni-bochum.de", + "биз.рус", + "ком.рус", + "крым.рус", + "мир.рус", + "мск.рус", + "орг.рус", + "самара.рус", + "сочи.рус", + "спб.рус", + "я.рус", + "ras.ru", + "nyat.app", + "180r.com", + "dojin.com", + "sakuratan.com", + "sakuraweb.com", + "x0.com", + "2-d.jp", + "bona.jp", + "crap.jp", + "daynight.jp", + "eek.jp", + "flop.jp", + "halfmoon.jp", + "jeez.jp", + "matrix.jp", + "mimoza.jp", + "ivory.ne.jp", + "mail-box.ne.jp", + "mints.ne.jp", + "mokuren.ne.jp", + "opal.ne.jp", + "sakura.ne.jp", + "sumomo.ne.jp", + "topaz.ne.jp", + "netgamers.jp", + "nyanta.jp", + "o0o0.jp", + "rdy.jp", + "rgr.jp", + "rulez.jp", + "s3.isk01.sakurastorage.jp", + "s3.isk02.sakurastorage.jp", + "saloon.jp", + "sblo.jp", + "skr.jp", + "tank.jp", + "uh-oh.jp", + "undo.jp", + "rs.webaccel.jp", + "user.webaccel.jp", + "websozai.jp", + "xii.jp", + "squares.net", + "jpn.org", + "kirara.st", + "x0.to", + "from.tv", + "sakura.tv", + "*.builder.code.com", + "*.dev-builder.code.com", + "*.stg-builder.code.com", + "*.001.test.code-builder-stg.platform.salesforce.com", + "*.d.crm.dev", + "*.w.crm.dev", + "*.wa.crm.dev", + "*.wb.crm.dev", + "*.wc.crm.dev", + "*.wd.crm.dev", + "*.we.crm.dev", + "*.wf.crm.dev", + "sandcats.io", + "logoip.com", + "logoip.de", + "fr-par-1.baremetal.scw.cloud", + "fr-par-2.baremetal.scw.cloud", + "nl-ams-1.baremetal.scw.cloud", + "cockpit.fr-par.scw.cloud", + "fnc.fr-par.scw.cloud", + "functions.fnc.fr-par.scw.cloud", + "k8s.fr-par.scw.cloud", + "nodes.k8s.fr-par.scw.cloud", + "s3.fr-par.scw.cloud", + "s3-website.fr-par.scw.cloud", + "whm.fr-par.scw.cloud", + "priv.instances.scw.cloud", + "pub.instances.scw.cloud", + "k8s.scw.cloud", + "cockpit.nl-ams.scw.cloud", + "k8s.nl-ams.scw.cloud", + "nodes.k8s.nl-ams.scw.cloud", + "s3.nl-ams.scw.cloud", + "s3-website.nl-ams.scw.cloud", + "whm.nl-ams.scw.cloud", + "cockpit.pl-waw.scw.cloud", + "k8s.pl-waw.scw.cloud", + "nodes.k8s.pl-waw.scw.cloud", + "s3.pl-waw.scw.cloud", + "s3-website.pl-waw.scw.cloud", + "scalebook.scw.cloud", + "smartlabeling.scw.cloud", + "dedibox.fr", + "schokokeks.net", + "gov.scot", + "service.gov.scot", + "scrysec.com", + "client.scrypted.io", + "firewall-gateway.com", + "firewall-gateway.de", + "my-gateway.de", + "my-router.de", + "spdns.de", + "spdns.eu", + "firewall-gateway.net", + "my-firewall.org", + "myfirewall.org", + "spdns.org", + "seidat.net", + "sellfy.store", + "minisite.ms", + "senseering.net", + "servebolt.cloud", + "biz.ua", + "co.ua", + "pp.ua", + "as.sh.cn", + "sheezy.games", + "shiftedit.io", + "myshopblocks.com", + "myshopify.com", + "shopitsite.com", + "shopware.shop", + "shopware.store", + "mo-siemens.io", + "1kapp.com", + "appchizi.com", + "applinzi.com", + "sinaapp.com", + "vipsinaapp.com", + "siteleaf.net", + "small-web.org", + "aeroport.fr", + "avocat.fr", + "chambagri.fr", + "chirurgiens-dentistes.fr", + "experts-comptables.fr", + "medecin.fr", + "notaires.fr", + "pharmacien.fr", + "port.fr", + "veterinaire.fr", + "vp4.me", + "*.snowflake.app", + "*.privatelink.snowflake.app", + "streamlit.app", + "streamlitapp.com", + "try-snowplow.com", + "mafelo.net", + "playstation-cloud.com", + "srht.site", + "apps.lair.io", + "*.stolos.io", + "spacekit.io", + "ind.mom", + "customer.speedpartner.de", + "myspreadshop.at", + "myspreadshop.com.au", + "myspreadshop.be", + "myspreadshop.ca", + "myspreadshop.ch", + "myspreadshop.com", + "myspreadshop.de", + "myspreadshop.dk", + "myspreadshop.es", + "myspreadshop.fi", + "myspreadshop.fr", + "myspreadshop.ie", + "myspreadshop.it", + "myspreadshop.net", + "myspreadshop.nl", + "myspreadshop.no", + "myspreadshop.pl", + "myspreadshop.se", + "myspreadshop.co.uk", + "w-corp-staticblitz.com", + "w-credentialless-staticblitz.com", + "w-staticblitz.com", + "stackhero-network.com", + "runs.onstackit.cloud", + "stackit.gg", + "stackit.rocks", + "stackit.run", + "stackit.zone", + "musician.io", + "novecore.site", + "api.stdlib.com", + "feedback.ac", + "forms.ac", + "assessments.cx", + "calculators.cx", + "funnels.cx", + "paynow.cx", + "quizzes.cx", + "researched.cx", + "tests.cx", + "surveys.so", + "storebase.store", + "storipress.app", + "storj.farm", + "strapiapp.com", + "media.strapiapp.com", + "vps-host.net", + "atl.jelastic.vps-host.net", + "njs.jelastic.vps-host.net", + "ric.jelastic.vps-host.net", + "streak-link.com", + "streaklinks.com", + "streakusercontent.com", + "soc.srcf.net", + "user.srcf.net", + "utwente.io", + "temp-dns.com", + "supabase.co", + "supabase.in", + "supabase.net", + "syncloud.it", + "dscloud.biz", + "direct.quickconnect.cn", + "dsmynas.com", + "familyds.com", + "diskstation.me", + "dscloud.me", + "i234.me", + "myds.me", + "synology.me", + "dscloud.mobi", + "dsmynas.net", + "familyds.net", + "dsmynas.org", + "familyds.org", + "direct.quickconnect.to", + "vpnplus.to", + "mytabit.com", + "mytabit.co.il", + "tabitorder.co.il", + "taifun-dns.de", + "ts.net", + "*.c.ts.net", + "gda.pl", + "gdansk.pl", + "gdynia.pl", + "med.pl", + "sopot.pl", + "taveusercontent.com", + "p.tawk.email", + "p.tawkto.email", + "site.tb-hosting.com", + "edugit.io", + "s3.teckids.org", + "telebit.app", + "telebit.io", + "*.telebit.xyz", + "*.firenet.ch", + "*.svc.firenet.ch", + "reservd.com", + "thingdustdata.com", + "cust.dev.thingdust.io", + "reservd.dev.thingdust.io", + "cust.disrec.thingdust.io", + "reservd.disrec.thingdust.io", + "cust.prod.thingdust.io", + "cust.testing.thingdust.io", + "reservd.testing.thingdust.io", + "tickets.io", + "arvo.network", + "azimuth.network", + "tlon.network", + "torproject.net", + "pages.torproject.net", + "townnews-staging.com", + "12hp.at", + "2ix.at", + "4lima.at", + "lima-city.at", + "12hp.ch", + "2ix.ch", + "4lima.ch", + "lima-city.ch", + "trafficplex.cloud", + "de.cool", + "12hp.de", + "2ix.de", + "4lima.de", + "lima-city.de", + "1337.pictures", + "clan.rip", + "lima-city.rocks", + "webspace.rocks", + "lima.zone", + "*.transurl.be", + "*.transurl.eu", + "site.transip.me", + "*.transurl.nl", + "tuxfamily.org", + "dd-dns.de", + "dray-dns.de", + "draydns.de", + "dyn-vpn.de", + "dynvpn.de", + "mein-vigor.de", + "my-vigor.de", + "my-wan.de", + "syno-ds.de", + "synology-diskstation.de", + "synology-ds.de", + "diskstation.eu", + "diskstation.org", + "typedream.app", + "pro.typeform.com", + "*.uberspace.de", + "uber.space", + "hk.com", + "inc.hk", + "ltd.hk", + "hk.org", + "it.com", + "unison-services.cloud", + "virtual-user.de", + "virtualuser.de", + "name.pm", + "sch.tf", + "biz.wf", + "sch.wf", + "org.yt", + "rs.ba", + "bielsko.pl", + "upli.io", + "urown.cloud", + "dnsupdate.info", + "us.org", + "v.ua", + "express.val.run", + "web.val.run", + "vercel.app", + "v0.build", + "vercel.dev", + "vusercontent.net", + "now.sh", + "2038.io", + "router.management", + "v-info.info", + "voorloper.cloud", + "*.vultrobjects.com", + "wafflecell.com", + "webflow.io", + "webflowtest.io", + "*.webhare.dev", + "bookonline.app", + "hotelwithflight.com", + "reserve-online.com", + "reserve-online.net", + "cprapid.com", + "pleskns.com", + "wp2.host", + "pdns.page", + "plesk.page", + "wpsquared.site", + "*.wadl.top", + "remotewd.com", + "box.ca", + "pages.wiardweb.com", + "toolforge.org", + "wmcloud.org", + "wmflabs.org", + "wdh.app", + "panel.gg", + "daemon.panel.gg", + "wixsite.com", + "wixstudio.com", + "editorx.io", + "wixstudio.io", + "wix.run", + "messwithdns.com", + "woltlab-demo.com", + "myforum.community", + "community-pro.de", + "diskussionsbereich.de", + "community-pro.net", + "meinforum.net", + "affinitylottery.org.uk", + "raffleentry.org.uk", + "weeklylottery.org.uk", + "wpenginepowered.com", + "js.wpenginepowered.com", + "half.host", + "xnbay.com", + "u2.xnbay.com", + "u2-local.xnbay.com", + "cistron.nl", + "demon.nl", + "xs4all.space", + "yandexcloud.net", + "storage.yandexcloud.net", + "website.yandexcloud.net", + "official.academy", + "yolasite.com", + "yombo.me", + "ynh.fr", + "nohost.me", + "noho.st", + "za.net", + "za.org", + "zap.cloud", + "zeabur.app", + "bss.design", + "basicserver.io", + "virtualserver.io", + "enterprisecloud.nu" +], Q = K.reduce( + (e, s) => { + const c = s.replace(/^(\*\.|\!)/, ""), o = A.toASCII(c), t = s.charAt(0); + if (e.has(o)) + throw new Error(`Multiple rules found for ${s} (${o})`); + return e.set(o, { + rule: s, + suffix: c, + punySuffix: o, + wildcard: t === "*", + exception: t === "!" + }), e; + }, + /* @__PURE__ */ new Map() +), X = (e) => { + const c = A.toASCII(e).split("."); + for (let o = 0; o < c.length; o++) { + const t = c.slice(o).join("."), d = Q.get(t); + if (d) + return d; + } + return null; +}, Y = { + DOMAIN_TOO_SHORT: "Domain name too short.", + DOMAIN_TOO_LONG: "Domain name too long. It should be no more than 255 chars.", + LABEL_STARTS_WITH_DASH: "Domain name label can not start with a dash.", + LABEL_ENDS_WITH_DASH: "Domain name label can not end with a dash.", + LABEL_TOO_LONG: "Domain name label should be at most 63 chars long.", + LABEL_TOO_SHORT: "Domain name label should be at least 1 character long.", + LABEL_INVALID_CHARS: "Domain name label can only contain alphanumeric characters or dashes." +}, Z = (e) => { + const s = A.toASCII(e); + if (s.length < 1) + return "DOMAIN_TOO_SHORT"; + if (s.length > 255) + return "DOMAIN_TOO_LONG"; + const c = s.split("."); + let o; + for (let t = 0; t < c.length; ++t) { + if (o = c[t], !o.length) + return "LABEL_TOO_SHORT"; + if (o.length > 63) + return "LABEL_TOO_LONG"; + if (o.charAt(0) === "-") + return "LABEL_STARTS_WITH_DASH"; + if (o.charAt(o.length - 1) === "-") + return "LABEL_ENDS_WITH_DASH"; + if (!/^[a-z0-9\-_]+$/.test(o)) + return "LABEL_INVALID_CHARS"; + } +}, O = (e) => { + if (typeof e != "string") + throw new TypeError("Domain name must be a string."); + let s = e.slice(0).toLowerCase(); + s.charAt(s.length - 1) === "." && (s = s.slice(0, s.length - 1)); + const c = Z(s); + if (c) + return { + input: e, + error: { + message: Y[c], + code: c + } + }; + const o = { + input: e, + tld: null, + sld: null, + domain: null, + subdomain: null, + listed: !1 + }, t = s.split("."); + if (t[t.length - 1] === "local") + return o; + const d = () => (/xn--/.test(s) && (o.domain && (o.domain = A.toASCII(o.domain)), o.subdomain && (o.subdomain = A.toASCII(o.subdomain))), o), z = X(s); + if (!z) + return t.length < 2 ? o : (o.tld = t.pop(), o.sld = t.pop(), o.domain = [o.sld, o.tld].join("."), t.length && (o.subdomain = t.pop()), d()); + o.listed = !0; + const y = z.suffix.split("."), g = t.slice(0, t.length - y.length); + return z.exception && g.push(y.shift()), o.tld = y.join("."), !g.length || (z.wildcard && (y.unshift(g.pop()), o.tld = y.join(".")), !g.length) || (o.sld = g.pop(), o.domain = [o.sld, o.tld].join("."), g.length && (o.subdomain = g.join("."))), d(); +}, aa = (e) => e && O(e).domain || null, oa = (e) => { + const s = O(e); + return !!(s.domain && s.listed); +}, na = { parse: O, get: aa, isValid: oa }; +export { + na as default, + Y as errorCodes, + aa as get, + oa as isValid, + O as parse +}; diff --git a/test-eol-project/node_modules/psl/dist/psl.umd.cjs b/test-eol-project/node_modules/psl/dist/psl.umd.cjs new file mode 100644 index 00000000..04de8b0a --- /dev/null +++ b/test-eol-project/node_modules/psl/dist/psl.umd.cjs @@ -0,0 +1 @@ +(function(g,A){typeof exports=="object"&&typeof module!="undefined"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(g=typeof globalThis!="undefined"?globalThis:g||self,A(g.psl={}))})(this,function(g){"use strict";function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,T;function G(){if(T)return O;T=1;const e=2147483647,s=36,c=1,o=26,t=38,j=700,x=72,v=128,h="-",Q=/^xn--/,X=/[^\0-\x7F]/,Y=/[\x2E\u3002\uFF0E\uFF61]/g,Z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=s-c,d=Math.floor,L=String.fromCharCode;function f(a){throw new RangeError(Z[a])}function aa(a,i){const m=[];let n=a.length;for(;n--;)m[n]=i(a[n]);return m}function M(a,i){const m=a.split("@");let n="";m.length>1&&(n=m[0]+"@",a=m[1]),a=a.replace(Y,".");const r=a.split("."),p=aa(r,i).join(".");return n+p}function F(a){const i=[];let m=0;const n=a.length;for(;m=55296&&r<=56319&&mString.fromCodePoint(...a),sa=function(a){return a>=48&&a<58?26+(a-48):a>=65&&a<91?a-65:a>=97&&a<123?a-97:s},H=function(a,i){return a+22+75*(a<26)-((i!=0)<<5)},N=function(a,i,m){let n=0;for(a=m?d(a/j):a>>1,a+=d(a/i);a>S*o>>1;n+=s)a=d(a/S);return d(n+(S+1)*a/(a+t))},R=function(a){const i=[],m=a.length;let n=0,r=v,p=x,b=a.lastIndexOf(h);b<0&&(b=0);for(let u=0;u=128&&f("not-basic"),i.push(a.charCodeAt(u));for(let u=b>0?b+1:0;u=m&&f("invalid-input");const y=sa(a.charCodeAt(u++));y>=s&&f("invalid-input"),y>d((e-n)/l)&&f("overflow"),n+=y*l;const q=w<=p?c:w>=p+o?o:w-p;if(yd(e/C)&&f("overflow"),l*=C}const z=i.length+1;p=N(n-k,z,k==0),d(n/z)>e-r&&f("overflow"),r+=d(n/z),n%=z,i.splice(n++,0,r)}return String.fromCodePoint(...i)},P=function(a){const i=[];a=F(a);const m=a.length;let n=v,r=0,p=x;for(const k of a)k<128&&i.push(L(k));const b=i.length;let u=b;for(b&&i.push(h);u=n&&ld((e-r)/z)&&f("overflow"),r+=(k-n)*z,n=k;for(const l of a)if(le&&f("overflow"),l===n){let w=r;for(let y=s;;y+=s){const q=y<=p?c:y>=p+o?o:y-p;if(w{const c=s.replace(/^(\*\.|\!)/,""),o=_.toASCII(c),t=s.charAt(0);if(e.has(o))throw new Error(`Multiple rules found for ${s} (${o})`);return e.set(o,{rule:s,suffix:c,punySuffix:o,wildcard:t==="*",exception:t==="!"}),e},new Map),$=e=>{const c=_.toASCII(e).split(".");for(let o=0;o{const s=_.toASCII(e);if(s.length<1)return"DOMAIN_TOO_SHORT";if(s.length>255)return"DOMAIN_TOO_LONG";const c=s.split(".");let o;for(let t=0;t63)return"LABEL_TOO_LONG";if(o.charAt(0)==="-")return"LABEL_STARTS_WITH_DASH";if(o.charAt(o.length-1)==="-")return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-_]+$/.test(o))return"LABEL_INVALID_CHARS"}},I=e=>{if(typeof e!="string")throw new TypeError("Domain name must be a string.");let s=e.slice(0).toLowerCase();s.charAt(s.length-1)==="."&&(s=s.slice(0,s.length-1));const c=J(s);if(c)return{input:e,error:{message:D[c],code:c}};const o={input:e,tld:null,sld:null,domain:null,subdomain:null,listed:!1},t=s.split(".");if(t[t.length-1]==="local")return o;const j=()=>(/xn--/.test(s)&&(o.domain&&(o.domain=_.toASCII(o.domain)),o.subdomain&&(o.subdomain=_.toASCII(o.subdomain))),o),x=$(s);if(!x)return t.length<2?o:(o.tld=t.pop(),o.sld=t.pop(),o.domain=[o.sld,o.tld].join("."),t.length&&(o.subdomain=t.pop()),j());o.listed=!0;const v=x.suffix.split("."),h=t.slice(0,t.length-v.length);return x.exception&&h.push(v.shift()),o.tld=v.join("."),!h.length||(x.wildcard&&(v.unshift(h.pop()),o.tld=v.join(".")),!h.length)||(o.sld=h.pop(),o.domain=[o.sld,o.tld].join("."),h.length&&(o.subdomain=h.join("."))),j()},E=e=>e&&I(e).domain||null,B=e=>{const s=I(e);return!!(s.domain&&s.listed)},K={parse:I,get:E,isValid:B};g.default=K,g.errorCodes=D,g.get=E,g.isValid=B,g.parse=I,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/test-eol-project/node_modules/psl/index.js b/test-eol-project/node_modules/psl/index.js new file mode 100644 index 00000000..e23601d4 --- /dev/null +++ b/test-eol-project/node_modules/psl/index.js @@ -0,0 +1,247 @@ +import punycode from 'punycode/punycode.js'; +import rules from './data/rules.js'; + +// +// Parse rules from file. +// +const rulesByPunySuffix = rules.reduce( + (map, rule) => { + const suffix = rule.replace(/^(\*\.|\!)/, ''); + const punySuffix = punycode.toASCII(suffix); + const firstChar = rule.charAt(0); + + if (map.has(punySuffix)) { + throw new Error(`Multiple rules found for ${rule} (${punySuffix})`); + } + + map.set(punySuffix, { + rule, + suffix, + punySuffix, + wildcard: firstChar === '*', + exception: firstChar === '!' + }); + + return map; + }, + new Map(), +); + +// +// Find rule for a given domain. +// +const findRule = (domain) => { + const punyDomain = punycode.toASCII(domain); + const punyDomainChunks = punyDomain.split('.'); + + for (let i = 0; i < punyDomainChunks.length; i++) { + const suffix = punyDomainChunks.slice(i).join('.'); + const matchingRules = rulesByPunySuffix.get(suffix); + if (matchingRules) { + return matchingRules; + } + } + + return null; +}; + +// +// Error codes and messages. +// +export const errorCodes = { + DOMAIN_TOO_SHORT: 'Domain name too short.', + DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', + LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', + LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', + LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', + LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', + LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' +}; + +// +// Validate domain name and throw if not valid. +// +// From wikipedia: +// +// Hostnames are composed of series of labels concatenated with dots, as are all +// domain names. Each label must be between 1 and 63 characters long, and the +// entire hostname (including the delimiting dots) has a maximum of 255 chars. +// +// Allowed chars: +// +// * `a-z` +// * `0-9` +// * `-` but not as a starting or ending character +// * `.` as a separator for the textual portions of a domain name +// +// * http://en.wikipedia.org/wiki/Domain_name +// * http://en.wikipedia.org/wiki/Hostname +// +const validate = (input) => { + // Before we can validate we need to take care of IDNs with unicode chars. + const ascii = punycode.toASCII(input); + + if (ascii.length < 1) { + return 'DOMAIN_TOO_SHORT'; + } + if (ascii.length > 255) { + return 'DOMAIN_TOO_LONG'; + } + + // Check each part's length and allowed chars. + const labels = ascii.split('.'); + let label; + + for (let i = 0; i < labels.length; ++i) { + label = labels[i]; + if (!label.length) { + return 'LABEL_TOO_SHORT'; + } + if (label.length > 63) { + return 'LABEL_TOO_LONG'; + } + if (label.charAt(0) === '-') { + return 'LABEL_STARTS_WITH_DASH'; + } + if (label.charAt(label.length - 1) === '-') { + return 'LABEL_ENDS_WITH_DASH'; + } + if (!/^[a-z0-9\-_]+$/.test(label)) { + return 'LABEL_INVALID_CHARS'; + } + } +}; + +// +// Public API +// + +// +// Parse domain. +// +export const parse = (input) => { + if (typeof input !== 'string') { + throw new TypeError('Domain name must be a string.'); + } + + // Force domain to lowercase. + let domain = input.slice(0).toLowerCase(); + + // Handle FQDN. + // TODO: Simply remove trailing dot? + if (domain.charAt(domain.length - 1) === '.') { + domain = domain.slice(0, domain.length - 1); + } + + // Validate and sanitise input. + const error = validate(domain); + if (error) { + return { + input: input, + error: { + message: errorCodes[error], + code: error + } + }; + } + + const parsed = { + input: input, + tld: null, + sld: null, + domain: null, + subdomain: null, + listed: false + }; + + const domainParts = domain.split('.'); + + // Non-Internet TLD + if (domainParts[domainParts.length - 1] === 'local') { + return parsed; + } + + const handlePunycode = () => { + if (!/xn--/.test(domain)) { + return parsed; + } + if (parsed.domain) { + parsed.domain = punycode.toASCII(parsed.domain); + } + if (parsed.subdomain) { + parsed.subdomain = punycode.toASCII(parsed.subdomain); + } + return parsed; + }; + + const rule = findRule(domain); + + // Unlisted tld. + if (!rule) { + if (domainParts.length < 2) { + return parsed; + } + parsed.tld = domainParts.pop(); + parsed.sld = domainParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + if (domainParts.length) { + parsed.subdomain = domainParts.pop(); + } + + return handlePunycode(); + } + + // At this point we know the public suffix is listed. + parsed.listed = true; + + const tldParts = rule.suffix.split('.'); + const privateParts = domainParts.slice(0, domainParts.length - tldParts.length); + + if (rule.exception) { + privateParts.push(tldParts.shift()); + } + + parsed.tld = tldParts.join('.'); + + if (!privateParts.length) { + return handlePunycode(); + } + + if (rule.wildcard) { + tldParts.unshift(privateParts.pop()); + parsed.tld = tldParts.join('.'); + } + + if (!privateParts.length) { + return handlePunycode(); + } + + parsed.sld = privateParts.pop(); + parsed.domain = [parsed.sld, parsed.tld].join('.'); + + if (privateParts.length) { + parsed.subdomain = privateParts.join('.'); + } + + return handlePunycode(); +}; + +// +// Get domain. +// +export const get = (domain) => { + if (!domain) { + return null; + } + return parse(domain).domain || null; +}; + +// +// Check whether domain belongs to a known public suffix. +// +export const isValid = (domain) => { + const parsed = parse(domain); + return Boolean(parsed.domain && parsed.listed); +}; + +export default { parse, get, isValid }; diff --git a/test-eol-project/node_modules/psl/package.json b/test-eol-project/node_modules/psl/package.json new file mode 100644 index 00000000..e0de4730 --- /dev/null +++ b/test-eol-project/node_modules/psl/package.json @@ -0,0 +1,51 @@ +{ + "name": "psl", + "version": "1.15.0", + "description": "Domain name parser based on the Public Suffix List", + "repository": { + "type": "git", + "url": "git@github.com:lupomontero/psl.git" + }, + "type": "module", + "main": "./dist/psl.cjs", + "exports": { + ".": { + "import": "./dist/psl.mjs", + "require": "./dist/psl.cjs" + } + }, + "types": "types/index.d.ts", + "scripts": { + "lint": "eslint .", + "test": "mocha test/*.spec.js", + "test:browserstack": "browserstack-node-sdk playwright test", + "watch": "mocha test/*.spec.js --watch", + "update-rules": "./scripts/update-rules.js", + "build": "vite build", + "postbuild": "ln -s ./psl.umd.cjs dist/psl.js && ln -s ./psl.umd.cjs dist/psl.min.js", + "benchmark": "node --experimental-vm-modules --no-warnings benchmark/suite.js", + "changelog": "git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=\"%h %s (%an <%ae>)\"" + }, + "keywords": [ + "publicsuffix", + "publicsuffixlist" + ], + "author": "Lupo Montero (https://lupomontero.com/)", + "funding": "https://github.com/sponsors/lupomontero", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "devDependencies": { + "@eslint/js": "^9.16.0", + "@playwright/test": "^1.49.0", + "@types/eslint__js": "^8.42.3", + "benchmark": "^2.1.4", + "browserstack-node-sdk": "^1.34.27", + "eslint": "^9.16.0", + "mocha": "^10.8.2", + "typescript": "^5.7.2", + "typescript-eslint": "^8.16.0", + "vite": "^6.0.2" + } +} diff --git a/test-eol-project/node_modules/psl/types/index.d.ts b/test-eol-project/node_modules/psl/types/index.d.ts new file mode 100644 index 00000000..15632c93 --- /dev/null +++ b/test-eol-project/node_modules/psl/types/index.d.ts @@ -0,0 +1,52 @@ +// TypeScript Version: 2.4 + +/** + * Result returned when a given domain name was not parsable (not exported) + */ +export type ErrorResult = { + input: string; + error: { + code: T; + message: errorCodes[T]; + }; +} + +/** + * Error codes and descriptions for domain name parsing errors + */ +export const enum errorCodes { + DOMAIN_TOO_SHORT = 'Domain name too short', + DOMAIN_TOO_LONG = 'Domain name too long. It should be no more than 255 chars.', + LABEL_STARTS_WITH_DASH = 'Domain name label can not start with a dash.', + LABEL_ENDS_WITH_DASH = 'Domain name label can not end with a dash.', + LABEL_TOO_LONG = 'Domain name label should be at most 63 chars long.', + LABEL_TOO_SHORT = 'Domain name label should be at least 1 character long.', + LABEL_INVALID_CHARS = 'Domain name label can only contain alphanumeric characters or dashes.' +} + +// Export the browser global variable name additionally to the CJS/AMD exports below +export as namespace psl; + +export type ParsedDomain = { + input: string; + tld: string | null; + sld: string | null; + domain: string | null; + subdomain: string | null; + listed: boolean; +} + +/** + * Parse a domain name and return its components + */ +export function parse(input: string): ParsedDomain | ErrorResult; + +/** + * Get the base domain for full domain name + */ +export function get(domain: string): string | null; + +/** + * Check whether the given domain belongs to a known public suffix + */ +export function isValid(domain: string): boolean; diff --git a/test-eol-project/node_modules/psl/types/test.ts b/test-eol-project/node_modules/psl/types/test.ts new file mode 100644 index 00000000..072f5249 --- /dev/null +++ b/test-eol-project/node_modules/psl/types/test.ts @@ -0,0 +1,14 @@ +import * as psl from 'psl'; +import type { ParsedDomain, ErrorResult, errorCodes } from './index.d.ts'; + +const x = (a: ParsedDomain | ErrorResult) => { + return a; +}; + +console.log(x(psl.parse(''))); + +// $ExpectType string | null +console.log(psl.get('example.com')); + +// $ExpectType boolean +console.log(psl.isValid('example.com')); diff --git a/test-eol-project/node_modules/psl/types/tsconfig.json b/test-eol-project/node_modules/psl/types/tsconfig.json new file mode 100644 index 00000000..2f1719c4 --- /dev/null +++ b/test-eol-project/node_modules/psl/types/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "lib": [ + "es5" + ], + "strict": true, + "noEmit": false, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + // Expose module under its CJS/AMD name + "baseUrl": ".", + "paths": { + "psl": [ + "./index.d.ts" + ] + } + } +} \ No newline at end of file diff --git a/test-eol-project/node_modules/psl/vite.config.js b/test-eol-project/node_modules/psl/vite.config.js new file mode 100644 index 00000000..0195416c --- /dev/null +++ b/test-eol-project/node_modules/psl/vite.config.js @@ -0,0 +1,20 @@ +import { resolve } from 'node:path'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + build: { + target: 'es2015', + lib: { + entry: resolve(__dirname, 'index.js'), + name: 'psl', + formats: ['es', 'cjs', 'umd'], + fileName: format => ( + format === 'umd' + ? 'psl.umd.cjs' + : format === 'cjs' + ? 'psl.cjs' + : 'psl.mjs' + ), + }, + }, +}); diff --git a/test-eol-project/node_modules/punycode/LICENSE-MIT.txt b/test-eol-project/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 00000000..a41e0a7e --- /dev/null +++ b/test-eol-project/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +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/test-eol-project/node_modules/punycode/README.md b/test-eol-project/node_modules/punycode/README.md new file mode 100644 index 00000000..f611016b --- /dev/null +++ b/test-eol-project/node_modules/punycode/README.md @@ -0,0 +1,148 @@ +# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) + +Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). + +This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: + +* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) +* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) +* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) +* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) +* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) + +This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). + +This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install punycode --save +``` + +In [Node.js](https://nodejs.org/): + +> ⚠️ Note that userland modules don't hide core modules. +> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. +> Use `require('punycode/')` to import userland modules rather than core modules. + +```js +const punycode = require('punycode/'); +``` + +## API + +### `punycode.decode(string)` + +Converts a Punycode string of ASCII symbols to a string of Unicode symbols. + +```js +// decode domain name parts +punycode.decode('maana-pta'); // 'mañana' +punycode.decode('--dqo34k'); // '☃-⌘' +``` + +### `punycode.encode(string)` + +Converts a string of Unicode symbols to a Punycode string of ASCII symbols. + +```js +// encode domain name parts +punycode.encode('mañana'); // 'maana-pta' +punycode.encode('☃-⌘'); // '--dqo34k' +``` + +### `punycode.toUnicode(input)` + +Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. + +```js +// decode domain names +punycode.toUnicode('xn--maana-pta.com'); +// → 'mañana.com' +punycode.toUnicode('xn----dqo34k.com'); +// → '☃-⌘.com' + +// decode email addresses +punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); +// → 'джумла@джpумлатест.bрфa' +``` + +### `punycode.toASCII(input)` + +Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. + +```js +// encode domain names +punycode.toASCII('mañana.com'); +// → 'xn--maana-pta.com' +punycode.toASCII('☃-⌘.com'); +// → 'xn----dqo34k.com' + +// encode email addresses +punycode.toASCII('джумла@джpумлатест.bрфa'); +// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' +``` + +### `punycode.ucs2` + +#### `punycode.ucs2.decode(string)` + +Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. + +```js +punycode.ucs2.decode('abc'); +// → [0x61, 0x62, 0x63] +// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: +punycode.ucs2.decode('\uD834\uDF06'); +// → [0x1D306] +``` + +#### `punycode.ucs2.encode(codePoints)` + +Creates a string based on an array of numeric code point values. + +```js +punycode.ucs2.encode([0x61, 0x62, 0x63]); +// → 'abc' +punycode.ucs2.encode([0x1D306]); +// → '\uD834\uDF06' +``` + +### `punycode.version` + +A string representing the current Punycode.js version number. + +## For maintainers + +### How to publish a new release + +1. On the `main` branch, bump the version number in `package.json`: + + ```sh + npm version patch -m 'Release v%s' + ``` + + Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). + + Note that this produces a Git commit + tag. + +1. Push the release commit and tag: + + ```sh + git push && git push --tags + ``` + + Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/test-eol-project/node_modules/punycode/package.json b/test-eol-project/node_modules/punycode/package.json new file mode 100644 index 00000000..b8b76fc7 --- /dev/null +++ b/test-eol-project/node_modules/punycode/package.json @@ -0,0 +1,58 @@ +{ + "name": "punycode", + "version": "2.3.1", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "https://mths.be/punycode", + "main": "punycode.js", + "jsnext:main": "punycode.es6.js", + "module": "punycode.es6.js", + "engines": { + "node": ">=6" + }, + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/punycode.js.git" + }, + "bugs": "https://github.com/mathiasbynens/punycode.js/issues", + "files": [ + "LICENSE-MIT.txt", + "punycode.js", + "punycode.es6.js" + ], + "scripts": { + "test": "mocha tests", + "build": "node scripts/prepublish.js" + }, + "devDependencies": { + "codecov": "^3.8.3", + "nyc": "^15.1.0", + "mocha": "^10.2.0" + }, + "jspm": { + "map": { + "./punycode.js": { + "node": "@node/punycode" + } + } + } +} diff --git a/test-eol-project/node_modules/punycode/punycode.es6.js b/test-eol-project/node_modules/punycode/punycode.es6.js new file mode 100644 index 00000000..dadece25 --- /dev/null +++ b/test-eol-project/node_modules/punycode/punycode.es6.js @@ -0,0 +1,444 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; +export default punycode; diff --git a/test-eol-project/node_modules/punycode/punycode.js b/test-eol-project/node_modules/punycode/punycode.js new file mode 100644 index 00000000..a1ef2519 --- /dev/null +++ b/test-eol-project/node_modules/punycode/punycode.js @@ -0,0 +1,443 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +module.exports = punycode; diff --git a/test-eol-project/node_modules/q/CHANGES.md b/test-eol-project/node_modules/q/CHANGES.md new file mode 100644 index 00000000..cd351fdb --- /dev/null +++ b/test-eol-project/node_modules/q/CHANGES.md @@ -0,0 +1,786 @@ + +## 1.4.1 + + - Address an issue that prevented Q from being used as a `")' + Response.Output.Write(""); + } +} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx new file mode 100644 index 00000000..52d2e678 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx @@ -0,0 +1,11 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Redirect.aspx.cs" Inherits="Redirect" %> + + + + + + Untitled Page + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs new file mode 100644 index 00000000..9e0650bf --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs @@ -0,0 +1,9 @@ +using System; + +public partial class Redirect : Page +{ + protected new void Page_Load(object sender, EventArgs e) + { + Response.Redirect("resultPage.html"); + } +} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop new file mode 100644 index 00000000..fc955f81 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop @@ -0,0 +1,759 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config new file mode 100644 index 00000000..68b648f8 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config @@ -0,0 +1,59 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml new file mode 100644 index 00000000..a0f54703 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml @@ -0,0 +1,14 @@ + + + + + + Title + + + +

+ Foo +

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html new file mode 100644 index 00000000..4b34031d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html @@ -0,0 +1,81 @@ + + + +
+ + +
+ + Red + Green +
+ +
+ + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html new file mode 100644 index 00000000..1add0db9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html @@ -0,0 +1,85 @@ + + + + + Testing Alerts + + + + + +

Testing Alerts and Stuff

+ +

This tests alerts: click me

+ +

This tests alerts: click me

+ +

Let's make the prompt happen

+ +

Let's make the prompt with default happen

+ +

Let's make TWO prompts happen

+ +

A SLOW alert

+ +

This is a test of a confirm: + test confirm

+ +

This is a test of showModalDialog: test dialog

+ +

This is a test of an alert in an iframe: + +

+ +

This is a test of an alert in a nested iframe: + +

+ +

This is a test of an alert open from onload event handler: open new page

+ +

This is a test of an alert open from onload event handler: open new window

+ +

This is a test of an alert open from onunload event handler: open new page

+ +

This is a test of an alert open from onclose event handler: open new window

+ +

This is a test of an alert open from onclose event handler: open new window

+ +
+
+
+ +

+

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/banner.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/banner.gif new file mode 100644 index 0000000000000000000000000000000000000000..3f3435401f878af30930bfb19ee1e340d823e706 GIT binary patch literal 2109 zcmeIx`BxJM0>E+bD*8|&JPjI1kjMrM8g;584s?(K1|8O+jxuP} z0iy5TvQK34$RI0^h!UJ2^Qi1chB)T>?Px z@#9B6!0+zvo}Qkrudkn(nK7HqJb)*Y%SZ{S)oImQwcel~9v;R>j014wYB@zy2#&Bo z7JvgXg-nPDAq*0L0)#*$5(yz8>&edT3|}A|OnR8JY}yh~M7cPD)8O z#O8n;0V0qqZG6_!M9EigM zc`{limWss^F&kuy|0EMjje-un92%5}-z_sW;S1Wm1_^CZQ!tr4m2@f+8Ri zf>21IP=FYy)F>&65}_iRrj=?XilchHUIdG@S}lShAP#CY8o69fQY0m#*f5)i@L&Qa zNJ6TRN@*!dqLh@v37l5YQn?gGQ5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aY1@HY;m!MMn)m$M8F=q?~Ydqo)xTaaJ=iZ@HpP94s1&h zOm)3*nKUv~XSs#A-*JocOI9zmA?OcnSjq#`xen7Rm8hAaXL^cJmxXQbfx&4;hmcC8 zWYrnF^-8M3?X0az-_{*@w3mv16!Y?eNP8(O-26;O-Q)o`c%%`oob7{9k+%l`yw_vQ zLXz7&=b>7-y0)F|YAoKfZRtlMhQ@7$NeCg-WfD=Oad?|;VY88Jeq{!K<%pzSgnQKL zD|EmIQ2?CqU|vrESSuoi(n*kV#Pvzj7&7Wi1x7W8iZ>)f?}|ayM;bHOwYQWEbni4F z@b(`v-wTU0d!?)s7wqhSO(u zOXoKP-kvwQQ(&N%blank diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html new file mode 100644 index 00000000..f2b1939f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html @@ -0,0 +1,41 @@ + + + + Testing Typing into body + + + + +

Type Stuff

+ +
+   +
+ +
+   +
+ + + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html new file mode 100644 index 00000000..16fbbe9f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html @@ -0,0 +1,19 @@ + + + Elements with boolean attributes + + +
+ + + + + +
+ + +
+ +
Unwrappable text
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html new file mode 100644 index 00000000..9192b54a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html @@ -0,0 +1,8 @@ + + + Depth one child page + + +

I'm a page in a child directory

+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html new file mode 100644 index 00000000..f52685e0 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html @@ -0,0 +1,8 @@ + + + Depth two child page + + +

I'm a page in a grandchild directory! How cute!

+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html new file mode 100644 index 00000000..8e0355d9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html @@ -0,0 +1,26 @@ + + + + Testing click events + + + +
+ Click me to view my coordinates +
+ +
+

 

+
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html new file mode 100644 index 00000000..bd055c7c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html @@ -0,0 +1,10 @@ + + + click frames + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html new file mode 100644 index 00000000..0ff3900e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html @@ -0,0 +1,38 @@ + + + + click-jacking + + + +
+
Click jacked!
+
Click Me
+ +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html new file mode 100644 index 00000000..8a51659b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html @@ -0,0 +1,23 @@ + + + + + + + + + + + +
+
+
+
+
+ +
+
+
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html new file mode 100644 index 00000000..15ac17f9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html @@ -0,0 +1,85 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
data
click me
+
+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html new file mode 100644 index 00000000..e84fffa9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html @@ -0,0 +1,19 @@ + + +RTL test + + + +
+ +
مفتاح معايير الويب
+ +
פעילות הבינאום
+ +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html new file mode 100644 index 00000000..22e9319a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html @@ -0,0 +1,18 @@ + + + Click Source + + + I go to a target + + + + + + Click Source + + + I go to a target + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html new file mode 100644 index 00000000..7b749bc0 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html @@ -0,0 +1,6 @@ + + + click iframe + +Click me + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html new file mode 100644 index 00000000..60b1ccab --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html @@ -0,0 +1,8 @@ + + + click in iframe + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html new file mode 100644 index 00000000..d6f4caf1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html @@ -0,0 +1 @@ +Continue \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html new file mode 100644 index 00000000..cbc16e85 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html @@ -0,0 +1,10 @@ + + + + Target page for issue 5237 + + +

Test passed

+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html new file mode 100644 index 00000000..04434364 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html @@ -0,0 +1,11 @@ + + + + Link that continues on next line + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html new file mode 100644 index 00000000..245f0385 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html @@ -0,0 +1,9 @@ + + + + Target Page 1 + + +
Target Page 1
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html new file mode 100644 index 00000000..6f9636c5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html @@ -0,0 +1,9 @@ + + + + Target Page 2 + + +
Target Page 2
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html new file mode 100644 index 00000000..87a35f38 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html @@ -0,0 +1,9 @@ + + + + Target Page 3 + + +
Target Page 3
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html new file mode 100644 index 00000000..6cfa56ad --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html @@ -0,0 +1,70 @@ + + + + An element that disappears on click + + + +

Hello

+

Hello

+
+
+

Log:

+

+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html new file mode 100644 index 00000000..2af62526 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html @@ -0,0 +1,124 @@ + + + + An element that disappears on click + + + +

Hello

+

Hello

+
+
+
+
+
+
+

Log:

+

+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html new file mode 100644 index 00000000..77a9d6d5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html @@ -0,0 +1,11 @@ + + + + Link that continues on next line + + +
+
placeholder
Span that continues on next line +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html new file mode 100644 index 00000000..0ed2cbac --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html @@ -0,0 +1,9 @@ + + + +Submitted Successfully! + + +

Submitted Successfully!

+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html new file mode 100644 index 00000000..1c0c3d03 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html @@ -0,0 +1,13 @@ + + + + A wrapped element with overlapped first part + + +
+
placeholder
+
Over
+ Link that continues on next line +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html new file mode 100644 index 00000000..568ee77e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html @@ -0,0 +1,10 @@ + + + + +
+       +
+
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html new file mode 100644 index 00000000..cda990ed --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html @@ -0,0 +1,11 @@ + + + This page has iframes + + +

This is the heading

+ + + + +
+I'm a normal link +
+I go to an anchor +
+I open a window with javascript +
+Click me +
+ +
+I'm a green link +

looooooooooong short looooooooooong +

+ +333333 +

I have a span

And another span

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html new file mode 100644 index 00000000..e64c599c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html @@ -0,0 +1,8 @@ + + +closeable window + + +This window can be closed by clicking on this. + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html new file mode 100644 index 00000000..df846ad4 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html @@ -0,0 +1,156 @@ + + + + + + + + + + +
+
+ + +

չ2008ƣӿ


+
+ 882008˻ᵹʱһף찲Ź㳡СͼΪףеݳ » + + ӿġҪһԤ⣬ҪԽһʶ
+
+й֮
+
+
+ +
+ +
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html new file mode 100644 index 00000000..0d1bfc0a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html @@ -0,0 +1,20 @@ + + + + Color Page + + +
namedColor
+
rgb
+
rgbpct
+
hex
+
hex
+
hsl
+
rgba
+
rgba
+
hsla
+ + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html new file mode 100644 index 00000000..7a7d5581 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html @@ -0,0 +1,10 @@ + + + + Testing content editable + + +
+ Why hello
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html new file mode 100644 index 00000000..7db5b493 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html @@ -0,0 +1,30 @@ + + + Testing cookies + + + + +

Cookie Mashing

+ .com Click
+ . Click
+ google.com Click
+ .google.com Click
+ 127.0.0.1 Click
+ localhost:3001 Click
+ .google:3001 Click
+ 172.16.12.225 Click
+ 172.16.12.225:port Click
+ Set on a different path + +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html new file mode 100644 index 00000000..7714a48a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html @@ -0,0 +1,9 @@ + + + + Welcome Page + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html new file mode 100644 index 00000000..b3143b0d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html @@ -0,0 +1,9 @@ + + + + Welcome Page + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html new file mode 100644 index 00000000..6f2bcd4f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html @@ -0,0 +1,11 @@ + + + + Page With Element Out Of View + + +
Placeholder
+
Red box
+
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html new file mode 100644 index 00000000..b07972ab --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html @@ -0,0 +1,10 @@ + + + + Page With Empty Element + + +
+
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html new file mode 100644 index 00000000..6cbb2738 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html @@ -0,0 +1,12 @@ + + + + Page With Fixed Element + + +
fixed red box
+
Placeholder
+
Element at the bottom
+
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html new file mode 100644 index 00000000..286b04b1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html @@ -0,0 +1,10 @@ + + + + Page With Hidden Element + + + +
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html new file mode 100644 index 00000000..dc33c718 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html @@ -0,0 +1,10 @@ + + + + Page With Invisible Element + + + +
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html new file mode 100644 index 00000000..d0090d92 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html @@ -0,0 +1,10 @@ + + + + Page With Transparent Element + + +
Hidden box
+
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html new file mode 100644 index 00000000..7b857b9d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html @@ -0,0 +1,10 @@ + + + + Simple Page + + +
Red box
+
Tex after box
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..954e22dbd99e8c6dd7091335599abf2d10bf8003 GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEr#)R9Ln2z=UU%d=WFXS=@V?HT z#xG*`>Yvsgk=}99w^d^D^d*@m74oMo<%#FcopJf?u00-~YVKV2wzrI*_R6;UORMea zBFVSEnN~eiVA6V&z`E)YLz5Aok^D)In}Yn=OzDpgR5Wv0XfT8pOkmV{sKAJ-PO9#T zZK}IXj&Q-V!U)!LcB_3K0&C*{ literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..64ece5707d91a6edf9fad4bfcce0c4dbcafcf58d GIT binary patch literal 251 zcmVbvPcjKS|RKP(6sDcCAB(_QB%0978a<$Ah$!b|E zwn;|HO0i8cQj@~)s!ajF0S002ovPDHLkV1oEp BYH0uf literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000000000000000000000000000000000000..abdc01082bf3534eafecc5819d28c9574d44ea89 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQY-ImG zFPf9b{J;c_6SHRK%WcbN_hZpM=(Ry;4Rxv2@@2Y=$K57eF$X$=!PC{xWt~$(69B)$ BI)4BF literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..9b383f4d2eab09c0f2a739d6b232c32934bc620b GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnour1U*q978O6-yYw{%b*}|_(02F z@qbE9)0CJMo;*v*PWv`Vh2h6EmG8IS-Cm{3U~` zFlmZ}YMcJY=eo?o%*@I?2`NblNeMudl#t?{+tN>ySr~=F{k$>;_x^_y?afmf9pRKH0)6?eSP?3s5hEr>mdKI;Vst E0O;M1& literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000000000000000000000000000000000000..39d5824d6af5456f1e89fc7847ea3599ea5fd815 GIT binary patch literal 3762 zcmb_eYgiKKwx-=Q?Pdi0+w!yaC|_1uvA>yaxz|iX3eBv#HR0ASmSVIKMS&kf`CSAV4g0DJLgPkRO79xj%J<(hH6`bTGj zrr^$JeiHJI?;s&<5pRw-^kj}=E;X0OX+pgz+f5GVt0NQv_gbu0>-8J+F$O>HpW?Lx z+YFO`CV&6VV9fsEwG#js0_-|v*!ujZ*M=jfo457?0Do-z<^}+8bI+qk+W~+$zz%Z& z;L7&@&ns`l8Ofh*WdU0pO%RP^?Xa_h7I}7K#}4Xt`s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sRXmj zfc}pI#oRCB7Y1;t=*58Gsv7x3PGuW^spn6V&dWf#?*TQ0(|*rr=EeE1o~y1wyQi%)e*oX6iX@$m0F1RtKUT0vgg!8^fWhYLqS zF@EOpFld7>f^kprb~YwMq=^<e|gw?QFyf8ck|ZC^>)3c`b$^C>jCB4Fne_1e$Cqt=4Ud#K~~8Nfa91W zwk17&D?X?4FRzR+5qCiIqPf0};K4$tW$}l~A?u_E=JSe;*f_DO>r{z=U4_<)dY)M! z7O#mizC+GN&#;)k)vkBUS@fZesb{v?YuFlCPRjsT5bxB4@+sqdq}xvvBhTngZ(N1LUCS-ei=5sgE-Tbc z7HK+A_O23MP@sUoc?I?*ZB|F)&%us|2O$#G7V$6z zq>G%6!cu7OEf+_#^A=23Hd6Db9-yK*NQ#S+kjJI7 zhLiLz{>zKKtHH>H;B-cALzj`>@+-~?X2aP7ypf9WMf8q0m)wS!Nkf+&R&&zEjFOUx zlq^>v#VAq}=)?dKRMe+010g9O;qAiaTA4dV+==mw%i3Re)DwZ$Wd5CK1m4Ivy&&Ef zO8W!SpcgA>zfTGAE!{IPJMhdZ`T4{K#7ndDT8K2&*jf=J8O>H*iDJ}ZK}z|$C3U62 z$nZhk4v$QIYzMaV+0`B8S!=9RSYzi*QG#tp>ZY|lY_`}A-zI7)(tV$B9G-tC#zt8m zre~pD7oIFkmIAM=s zw+Iili%nSC?yks)t~q4lTlZW(#5^yUV@+^KvIuQzZDO^*TBz!j#nX%*uiW|{x9q0w literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..f1273672d253263b7564e9e21d69d7d9d0b337d9 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l%l7LV~E7mxPQ=F85a&M@g_{ d|GeK{$Y5lo%PMu^>wln`44$rjF6*2UngE4^EGqy2 literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..b273ff111d219c9b9a8b96d57683d0075fb7871a GIT binary patch literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~GmPmYTG^FX}c% zlGE{DS1Q;~I7-6ze&TN@+F-xsI6sd%SwK#*O5K|pDRZqEy< zJg0Nd8F@!OxqElm`~U#piM22@u@8B<moyKE%ct`B(jysxK+1m?G)UyIFs1t0}L zemGR&?jGaM1YQblj?v&@0iXS#fi-VbR9zLEnHLP?xQ|=%Ihrc7^yPWR!tW$yH!zrw z#I2}_!JnT^(qk)VgJr`NGdPtT^dmQIZc%=6nTAyJDXk+^3}wUOilJuwq>s=T_!9V) zr1)DT6VQ2~rgd@!Jlrte3}}m~j}juCS`J4(d-5+e-3@EzzTJNCE2z)w(kJ90z*QE) zBtnV@4mM>jTrZZ*$01SnGov0&=A-JrX5Ge%Pce1Vj}=5YQqBD^W@n4KmFxxpFK`uH zP;(xKV+6VJ2|g+?_Lct7`uElL<&jzGS8Gfva2+=8A@#V+xsAj9|Dkg)vL5yhX@~B= zN2KZSAUD%QH`x>H+@Ou(D1~Pyv#0nc&$!1kI?IO01yw3jD0@80qvc?T*Nr8?-%rC8 z@5$|WY?Hqp`ixmEkzeJTz_`_wsSRi1%Zivd`#+T{Aib6-rf$}M8sz6v zb6ERbr-SniO2wbOv!M4)nb}6UVzoVZEh5kQWh_5x4rYy3c!871NeaM(_p=4(kbS6U#x<*k8Wg^KHs2ttCz<+pBxQ$Z zQMv;kVm5_fF_vH`Mzrq$Y&6u?j6~ftIV0Yg)Nw7JysI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im0 zdAQ(GyC^9ane7_KW*#^vMIoeQdpJqmPp%%px3GIftbwESu#+vPyI*YTuJ6+4`z{s? zpkv~0x4c_PFH`-tqafw5)>4AuQ78SkZ!$8}INLK;Egr;2tS18hEO5=t;QDmZ-qu?I zG+=DN`nR72Xto{{bJp||`k}-2G;5#xg8E~xgz22)^_Z;=K|4@(E&5J)SY2of=olcw z5)@L)_Ntcm!*5nEy0M9v0`S33;pO4TN;>4(Z+19p_0>u#e-vE zXCU(6gAvu~I7Cw(xd%0e59MNLw^U37ZDbsBrj%eDCexw8a3G`nTcXVNL6{B7Hj@i& zbVB{;ApEtHk76q08DJ48dSxd$C(;$K6=FpU<~l9pVoT9arW^Vu{%Bcn4`eIpkOVC| z$)AKYG_`ypM{0@BUb3^9lqi_c?ONH|4UJMJWDowMVjacycX7}9g={O7swOB+{;+?; zjBo!9?+nd)ie#x5IbFW-zBOo0c4q@9wGVt5;pNt`=-~Zgcw#*`m($6ibxtZ`H=e=} zF#GZ~5$%AUn};8U#tRem0J(JTR}d4vR(dgK2ML~lZsPhayJ2h1%sD4FVst| zKF)+@`iNzLRjg4=K8@**0=5cE>%?FDc({I^+g9USk<8$&^qD~@%W0i4b|yMG*p4`N zh}I!ltTRI8Ex$+@V{02Br%xq#O?UlhO{r8WsaZnZCZq0MK9%AXU%MDLT;3=0A9(BV z9VxxxJd7jo$hw3q;3o?yBLmA=azBUrd9>-<_ANs0n3?-Ic*6&ytb@H~?0E(*d>T5n z-HiH2jsDf6uWhID%#n>SzOqrFCPDfUcu5QPd?<(=w6pv1BE#nsxS{n!UnC9qAha1< z;3cpZ9A-e$+Y)%b;w@!!YRA9p%Kf9IHGGg^{+p`mh;q8i7}&e@V3EQaMsItEMS&=X plT@$;k0WcB_jb;cn%_Idz4HO$QU*abf4}+wi?e96N>fbq{{i|W0@(ln literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..a641a371afa0fbb08ba599dc7ddf14b9bfc3c84f GIT binary patch literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~Gmw z<@?HsG!Qg3zaV+-xQ3ldtad!U<6iGz_enGH*2akP_r)o1D&8p^5M)_c8IIj6Wy*7HJo&CBLuo~nj>(63pZzO(Vv^ZuB3 zMYigjkwA;FEy|G}1jpiMj6|NTm7Uyiw=@FDE*nX<>jR!W@9XIyf%$Fd*J5*D0Z0Lm z9}ZQxyT|x5ftNy?V>EbJz-K>bV9gs9RaXUP<^=;e?&Fqxj;6{ieR-a-@HycA1KMKhql8GOmcxwZ?_-(3hMK^^a*(gaFvBH ziIC!fgH4$W*NbKIaY&T?%&13``KbD@S-0`xQ%v3TV+B!;RC7O!+1a9QCA$H@3tR;k z)SSoR7(s4)f{zM}eWgFN{(ZH5d1O}l)f$ruT!)Q&NImXyZsTzOf9TwctcSfr+M)aJ z5otO+$jvm-P4)ykH)x|cO5xeb>?!`qGw$(>&axqLL6yoB${vsMXgL_-bz@2J_tS92 zdvZG-+vKl@K4Vr(EL{WQt@Z+Ea-hxX0}nTSZxnpi^#Kn8Ox8FgIS|hc}KJQ4tm*HO16ui{(O9} z1YN)GjiQt6fGq`Cj+^`zUf?8hk^(T{{cOQGWFP98am}is28A!5%{R#ENv8fCN!j69 zlMEK(2z?|BY=Je$XD9mB-Kkem*(d-j^9j$2#6r$Dz?s)-TCDCGCs z8>6Pvj{Y+YIeFA@qY22V$)awy@q!9A4rgk5b9TcC;s9Ig^G|6nDP+5=Fzg&?(L=vc zCbGd>fSu~@6!94td+o#d@sid!EIX$rx7*cawe6 z`dScJ+$HssdOjE)O#Ybs56vm-FQ$7yuJJD^Zqk%hMaIgAJ<2yb_MFQte_i;62ScT$ zpjifYyR_E=rQ+>H)pmlr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SH(vN-F(*e`l?c%+l$|y_AJJ zhcDGnwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h- zM@nxv590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39t zH>3Vhqkr}2Yul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm| zcnRzUhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@e{{5C=l}o! literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..85e63e9f604ce042d59eb06a8428eeb7cb7896c9 GIT binary patch literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~GmC-Ajq!3AfU8Dx90^_ zp3}MKjJzYC+`T(&egFXQ#9Ek{*oVAaa!zrZtmlRFnwQPRJXH<%pkK2*eP`pT=lwD7 zifq+4BY_rUTa+U|2#&?i7>PVvD?7R4ZfOLPT{e9G~G!Ls3s8JtQE`jMM9wl2V9&Q+K2DHW0M+uQmEr%nYJ^7cK?uIpU-)=wn71ZZ-=@ar0;3^AY z5+TI{2b(e%t{2PZ^HKF*vu@+Xr&BAc@2BC4 z_vCgww#i=)ea5Vo$glEEVBBg_VPBj!)OO>)f@}#dg6ULOeC>LBHz<;*5Y;YfE0lNx zg{N+4@lO~ozxpF69qV@VOGnc248Iuag4C1T)P^(hWkpP!{h!JekX}m^Q#b2B4f1oT zIjsGz)4}-$rQ*-tSuc%qG>%<4xM#E& zN)7lRK~^2VdiloY4>;#}A!yH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nU0 zJX~<8U6hoI%yx}qGY_1Tq7YKDJ)ETOCs&W)TiCrK*1%DE*vXdD-7hwE*LUgjeHRM` z&@pkhTi>m#Kc+QIK+2Ybn9-sFVKNHyIgfob4H_77yYh))Rq$7Pw|+aD6&yZ|ki9 z8Zb6s{oBt1G+PgfIcxd}{m@~1nzhe;LH)5;!gS8@ddyabpdBc?7JVl?tS+<#bPSMT z2@0uYdsWN(;Ww)n-PlA-0r+62@bYkEa`k{0s})fJgYZ#5=DmIdEvok7aZJRi{w-|} zkea&6X}ZA3b7&vbDb7)v8CuI(+zzSf3z&P2eOrPNP?D~ zf zn0@)0h;~5F&BG5vOFU!=woW&ZSl~nrs{?1w>nWfW_dnpTd z4qvLDYJ*ft>Sp%M(^_xCZpNBnc66JX}A|ZL9IENM`U>`ph7d<+RQiI}@E8Y)70s zMC*_&))}GlmR}@{v9*nm)29-=rn`Q$rc^4G)GVQHlTr6BpGxtHuU(8AF7Ffh54?5w zj+EYT9>x)PWL-iQ@RNmT?R+|c@=FOmj)5Za6_ z@DkVy4l^L>Z3#SI@s_eVwd3D)<^Ivq8a~J{|4mhOL^<7M4D8){ut;GIqqn`oqCk|x pNh;Wa$C0(mdpqYz&F>xK-uVD=DT5%Jzh8ZT#aXmjr70%*{{RacS`YvL literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..e117effa3dca24e7978cfc5f8b967f661e81044f GIT binary patch literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcwz5Nh&g=McJ3E!;CE1E0ryV5Ro;>nvtvt zk&I==Xd;cVGZ@>q_xtnx{1u%7-D)N|5YqOB>i;(bZ#o62{J2Y9&^D3~R^$o+X? zwbxAEIb)xwCwK3TSR4QVym6N1rVgPmmt0ca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@h6^?-cvD>ySwVLl2m7=gERtEn>Fw_@ND%pO oiVC*mbz<%I+0K1Z`+LWvZ$3~$+A!Gm?^hpSc@||}WrmLVKLvuzv;Y7A literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css new file mode 100644 index 00000000..1706e220 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css @@ -0,0 +1,573 @@ +/* + * jQuery UI CSS Framework 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } +.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Resizable 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Accordion 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +/* + * jQuery UI Autocomplete 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.10 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/* + * jQuery UI Button 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/* + * jQuery UI Dialog 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* + * jQuery UI Slider 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* + * jQuery UI Tabs 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* + * jQuery UI Datepicker 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* + * jQuery UI Progressbar 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html new file mode 100644 index 00000000..c3b99648 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html @@ -0,0 +1,61 @@ + + +
+You shouldn't see anything other than this sentence on the page +
+
+ I have a hidden child +
+ I am a hidden child +
+
+
+ I have a hidden child +
+ I am a hidden child +
+
+
I am a hidden element
+
I am a hidden element
diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html new file mode 100644 index 00000000..602924bf --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html @@ -0,0 +1,20 @@ + + +
+
+
+
+
+
+
I am not a hidden element
diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html new file mode 100644 index 00000000..a15fc479 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html @@ -0,0 +1,13 @@ + + + Document Write In Onload + + + +

hello world

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html new file mode 100644 index 00000000..0b2ee9a2 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html @@ -0,0 +1,67 @@ + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html new file mode 100644 index 00000000..fdee16b0 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html @@ -0,0 +1,102 @@ + + + + + + + + +
+
+"Hi there +
+
+
+
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html new file mode 100644 index 00000000..ecb25625 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html @@ -0,0 +1,104 @@ + + + + + + +
+
+
+
+
12am
+
1am
+
2am
+
3am
+
4am
+
5am
+
6am
+
7am
+
8am
+
9am
+
10am
+
11am
+
12pm
+
1pm
+
2pm
+
3pm
+
4pm
+
5pm
+
6pm
+
7pm
+
8pm
+
9pm
+
10pm
+
11pm
+
+
+
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html new file mode 100644 index 00000000..f7e0dcac --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html @@ -0,0 +1,67 @@ + + + + + jQuery UI Sortable - Connect lists + + + + + + + + + +
+
    +
  • LeftItem 1
  • +
  • LeftItem 2
  • +
  • LeftItem 3
  • +
  • LeftItem 4
  • +
  • LeftItem 5
  • +
+ +
    +
  • RightItem 1
  • +
  • RightItem 2
  • +
  • RightItem 3
  • +
  • RightItem 4
  • +
  • RightItem 5
  • +
+ +
+ +
+
+

Nothing happened.

+
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html new file mode 100644 index 00000000..fc850ac9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html @@ -0,0 +1,65 @@ + + + + + jQuery UI Droppable - Default Demo + + + + + + + +
+ +
+

Drag me to my target

+
+ +
+

Drop here

+
+ +
+

start

+
+ +
+ +
+ +

Taken from the JQuery demo.

+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html new file mode 100644 index 00000000..b9e60678 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html new file mode 100644 index 00000000..ed7c7ed2 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html @@ -0,0 +1,42 @@ + + + + Delayed remove of an element + + + + + +
+ +
+

element

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html new file mode 100644 index 00000000..78fb9020 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/jetpack-sample.xpi b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/jetpack-sample.xpi new file mode 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1BTPBX}&xo%qfs2_rWoGJv^iR?DJ8W z8dWQ4LJKS|f_G}I?u946bysW2Vck~>@|=o^ZfN-&O7KF}&OBrjE{Whpe^X+i#$dT> zq?0A`^ya~Pk_TtuqKGOQm$|r9-Qae00U1~M^Q$}?@@>bLHU`&jaQ>BWvPiE~;F1_R zMFj8aM_#aGW?kY$+ouIXtN@Me^v%AUgtrjNm*2szXc#OJKkHzn8t%_Q85~C51Y`8_ zq^$wsqjldkhO}*6T)6C8D)M&mR1{$0@ZtaW8A(*{dcNI!hgEzkG+rB7Yleu^)HY8*TNr%{?lcD?0rN&Y{9=sf7JZ%>HfRR z{s-@2y1=Ce=AS+H-^|CDzb^DqnSWtlZ2e(Je+%5-@gBGS7xu+42>#6bvu^+OX@4;u zuaC<83;SXs|0Ba6s`|gPJSzDw?2EbmCCk4F^xr+sqq6_PzF67crTOcM{=3ruN|hhD p`TwQ*r|$n=+<#ZW-x(>0{<|isC?Fy|Mxj4^@Ze!!RQ|Cw{|5j(nlu0a literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/sample.xpi b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/sample.xpi new file mode 100644 index 0000000000000000000000000000000000000000..062f9a1722450df325576503b0722dcdca842141 GIT binary patch literal 1551 zcmWIWW@Zs#U|`^2kSY*#Eoi*G+6lz$0pb~u38{RaY;OWhNCP@i2+4%}vecrS#7e!aVz^mY z{FB@7n9XD;(E9$b=uTB`(+%k_mxkRs)FuAk;f|!Q!a1FrD`KzwzvmgABW@*7!E=B1 z_aZ))nr(aul}@L8Ul2uS|q2=Xrb0qT(mM}rFiSK;2Z2kg^wpKS@k-!?5F#A^*!rZ z#V6+q@9Ozp<@P%&eE*X5xeSb@@A+bnNY;7IjpI5~c1CjYyhSQ|?afv%v$!`i(fWb> zq9wVKY})tTn_Bq=d)CVrng>3uWkv*27%-3=9oUa43~vk9FN% zZ@$9{JTBkoF#TjG+r7474y$XJ(_#M^W($|=cc01nGS4J=nzrlTr)mpRxczGmJes08 z*~R|Llt`U7d#{UMteiLFl>U(y8@KfG$({6m?l${@{k_0x z%elg<^Zx&@I``9gS6=1Ax~7mdBHH<8U-z08UYdS(^KDM2wR@Vcg*FvlHo2@eXIfEz zdZA3R{Q<{@CwlI$G)!_Q1_-}DqH;jDXL|e^jTMQ^_xlY#$jzxZQn*|HZo?^+)g|VQ z-rG~xhR5l;8YOTFdtF}SFo$be^CjlAfCrqn1zjsc4>UJ1v8?|2aB=?BN0T#Vw!3<6 zUw-lU?$ldzpDV6^mMI>^yQp01)un`qGg(%7d&VS7=TCE$*H&n}c=qDX*Q=X~B&uyA z_x2?14e0Jld+%~uswa7eb(yr*_XYB+S0zYpW#4;lkMzSlj!)8?mdgM7$&}jYA868F zB$8k2uz5n8Nn3@W-s1W8C*#bX`RwUc)Nh-jpS4}`R^P80yS?^?&u7_M-n-)?|9}4% z(MgZqy;nP@AK=Z%B*%=aRFME@YG8CRENKKWG0GTLNEw3`TM$EWl@Aa@85jf@-a2-J z4272#K+`~_1y<8=l@-WNJd0!+a>+s1T+Hl+Z0;vu2*6wkGZ&oMfChsy8y*K^rg>z8 gw*hkjN)7-Th$Zz0c(byBf}a%#mjc}q!UEy}0BE8O*Z=?k literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/webextension.xpi b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/webextension.xpi new file mode 100644 index 0000000000000000000000000000000000000000..34b0ae3913f78f6d184a3114cd2fc91561a32105 GIT binary patch literal 4692 zcmZ`-by!sWwjR1c35S%DX6TRx=^m7BBot&oT4ZRD24N&*2th&wM1-NFB!nRbB&Aat z=^WyW-*?aP9`ASee%5dAXFqGL{k|*ySPQI;gG&tn00;q2O0TpO+NSx5$N+%HHvoWN zUv*Utl|Y($YJw2==gzLKb^@MWb~7gacVBH!<;eA!cFo%EQhwd-V~H2Pe@9zo(sek3 z-(K>ju!H`+IE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t`JOm{sAgxt?`!!!2jRRf7@gB zA^;go(f?C-V-Wmh|IhvXxBaj43C8|E-TwQx|J+=^%{a*aXth5%|5<|nHVwg&rug5S le;4GR9{x<}Zx8$!;{T9fur?n4FC~1;?S~0%*RS{h{sjiDbXoua literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html new file mode 100644 index 00000000..ca65d1fe --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html @@ -0,0 +1,13 @@ + + + + Fixed footer with no scrollbar + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html new file mode 100644 index 00000000..2593bf35 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html @@ -0,0 +1,12 @@ + + + Fixed footer with no scrollbar + + +
+
+ Click me +
+
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html new file mode 100644 index 00000000..45ae2b7d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html @@ -0,0 +1,175 @@ + + + We Leave From Here + + + + +There should be a form here: + +
+ + + +
+ +
+ +
+ +
+ Here's a checkbox: + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + Cheese
+ Peas
+ Cheese and peas
+ Not a sausage
+ Not another sausage + + + +

I like cheese

+ + + Cumberland sausage +
+ +
+ + + + + + + + +
+ +
+ + + + + + + +
+ +
+ + + + + + + +
+ + +
+
+ +
+ +
+ + +
+

+ + + +

+
+ +
+ + + +
+

+ +

+
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html new file mode 100644 index 00000000..4890c08e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html @@ -0,0 +1,46 @@ + + + + Testing Typing into body + + + + +

Type Stuff

+ +
+   +
+ +
+ +
+ + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html new file mode 100644 index 00000000..30231439 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html @@ -0,0 +1,30 @@ + + + + + + Form with JS action + + +
+ +
+ +

+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html new file mode 100644 index 00000000..3e62e455 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html @@ -0,0 +1,7 @@ + + + inner + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html new file mode 100644 index 00000000..3eb3bf47 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html @@ -0,0 +1,26 @@ + + + + Child frame + + +

This is a scrolling frame test

+
+ + + + + + + + + + + + + +
First row
Second row
Third row
Fourth row
+
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html new file mode 100644 index 00000000..b7fb8f24 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html @@ -0,0 +1,14 @@ + + + + Welcome Page + + +
+ +
+
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html new file mode 100644 index 00000000..8fccb6d3 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html @@ -0,0 +1,11 @@ + + + + Welcome Page + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html new file mode 100644 index 00000000..1e0dc870 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html @@ -0,0 +1,11 @@ + + + This page has iframes + + +

This is the heading

+ + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html new file mode 100644 index 00000000..57d47d84 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html @@ -0,0 +1,9 @@ + + + +
+ + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html new file mode 100644 index 00000000..9c27e04c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html @@ -0,0 +1,29 @@ + + + Deleting frame: main page + + + + +
+ + +
+
+ +
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html new file mode 100644 index 00000000..e4b9723e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html @@ -0,0 +1,8 @@ + + + Deleting frame: iframe + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html new file mode 100644 index 00000000..47764eb3 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html @@ -0,0 +1,7 @@ + + + Deleting frame: iframe 2 + + +
Added back
+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html new file mode 100644 index 00000000..039c5f21 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html @@ -0,0 +1,14 @@ + + + Unique title + + + + + + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html new file mode 100644 index 00000000..4ea35ff7 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html new file mode 100644 index 00000000..42a93007 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html new file mode 100644 index 00000000..e4ca97ab --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html @@ -0,0 +1,15 @@ + + + + Global scope + + + +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html new file mode 100644 index 00000000..0e8097e9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html new file mode 100644 index 00000000..f0f9fe5b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html @@ -0,0 +1,45 @@ + + + + + + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/blue.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/blue.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8ea27c42faa7b5e56c43d3db317d5e4ecf1cb613 GIT binary patch literal 92 zcmZ?wbhEHbG-5DfXkcJaWSGJLB!991Nd^WT5CM{5U@~s$UwQg1|Kd4YZgp?Ix92y1 s+ar%@&pMaAI<@T`_wi3Y*T3~X|8?&BKYkvr_9KfvcKB$ivocr%04xP0fB*mh literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js new file mode 100644 index 00000000..c6333be8 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js @@ -0,0 +1,84 @@ +var database={}; +database.db={}; + +database.onError = function(tx, e) { + var log = document.createElement('div'); + log.setAttribute('name','error'); + log.setAttribute('style','background-color:red'); + log.innerText = e.message; + document.getElementById('logs').appendChild(log); +} + +database.onSuccess = function(tx, r) { + if (r.rows.length) { + var ol; + for (var i = 0; i < r.rows.length; i++) { + ol = document.createElement('ol'); + ol.innerHTML = r.rows.item(i).ID + ": " + r.rows.item(i).docname + " (" + r.rows.item(i).created + ")"; + document.getElementById('logs').appendChild(ol); + } + + } +} + +database.open=function(){ + database.db=openDatabase('HTML5', '1.0', 'Offline document storage', 100*1024); +} + +database.create=function(){ + database.db.transaction(function(tx) { + tx.executeSql("CREATE TABLE IF NOT EXISTS docs(ID INTEGER PRIMARY KEY ASC, docname TEXT, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP)", + [], + database.onSuccess, + database.onError); + });} + +database.add = function(message) { + database.db.transaction(function(tx){ + tx.executeSql("INSERT INTO docs(docname) VALUES (?)", + [message], database.onSuccess, database.onError); + }); +} + +database.selectAll = function() { + database.db.transaction(function(tx) { + tx.executeSql("SELECT * FROM docs", [], database.onSuccess, + database.onError); + }); +} + +database.onDeleteAllSuccess = function(tx, r) { + var doc = document.documentElement; + var db_completed = document.createElement("div"); + db_completed.setAttribute("id", "db_completed"); + db_completed.innerText = "db operation completed"; + doc.appendChild(db_completed); +} + +database.deleteAll = function() { + database.db.transaction(function(tx) { + tx.executeSql("delete from docs", [], database.onDeleteAllSuccess, + database.onError); + }); +} + +var log = document.createElement('div'); +log.setAttribute('name','notice'); +log.setAttribute('style','background-color:yellow'); +log.innerText = typeof window.openDatabase == "function" ? "Web Database is supported." : "Web Database is not supported."; +document.getElementById('logs').appendChild(log); + +try { + database.open(); + database.create(); + database.add('Doc 1'); + database.add('Doc 2'); + database.selectAll(); + database.deleteAll(); +} catch(error) { + var log = document.createElement('div'); + log.setAttribute('name','critical'); + log.setAttribute('style','background-color:pink'); + log.innerText = error; + document.getElementById('logs').appendChild(log); +} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js new file mode 100644 index 00000000..f07af148 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js @@ -0,0 +1,18 @@ +function success(position) { + var message = document.getElementById("status"); + message.innerHTML =""; + message.innerHTML += "

Longitude: " + position.coords.longitude + "

"; + message.innerHTML += "

Latitude: " + position.coords.latitude + "

"; + message.innerHTML += "

Altitude: " + position.coords.altitude + "

"; +} + +function error(msg) { + var message = document.getElementById("status"); + message.innerHTML = "Failed to get geolocation."; +} + +if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(success, error); +} else { + error('Geolocation is not supported.'); +} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/green.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/green.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6a0d3bea4793a5fe3a3a36e29ba174540540513d GIT binary patch literal 92 zcmZ?wbhEHbG-5DfXkcJqT;s&Rz@Ye(1xPY5=zs{23bCU^SwR4 t`P&|OOncV3?A57l@3@bD^11%4_xZ1L-~aLRaJ3&<^s&Q7OP!U$8UQ`xB)R|q literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/red.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/red.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f296e271956d5d4e0939b9706e86b2c2bc0d65b7 GIT binary patch literal 92 zcmZ?wbhEHbG-5DfXkcLY$H2kBz@Ye(1xPY5=zs{23bCU^SwR4 t`P&|OOncV3?A57l@3@bD^11%4_xZ1L-~aLRaJ3&<^s&Q7OP!U$8URKdB+&o> literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html new file mode 100644 index 00000000..394116a5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html @@ -0,0 +1 @@ +Online diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache new file mode 100644 index 00000000..3bc4e002 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache @@ -0,0 +1,11 @@ +CACHE MANIFEST + +CACHE: +# Additional items to cache. +yellow.jpg +red.jpg +blue.jpg +green.jpg + +FALLBACK: +status.html offline.html diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/yellow.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/yellow.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7c609b371291aeb672feb6bc24497d5f64d20288 GIT binary patch literal 92 zcmZ?wbhEHbG-5DfXkcLYcZ>lD6o0aSC0GH&T#dHOB?;yGJxb#K16=Qn@b rBadm%I+wjVwe21E@lQV2zx6) + +HTML5 + + + +

Geolocation Test

+
Location unknown
+ + +

Web SQL Database Test

+
+ + +

Application Cache Test

+
+

Current network status:

+ + + + + +
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/icon.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/icon.gif new file mode 100644 index 0000000000000000000000000000000000000000..bb994619275674a361f092333cbfa122209d6546 GIT binary patch literal 127 zcmZ?wbh9u|6k-r!Si}GX|AAob+W$d8|1~xLfB*iUgX2F?R0kvlQp3RPBO#^gd~AZ^ zsa&ybSCl~e@% literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html new file mode 100644 index 00000000..47f0834c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html @@ -0,0 +1,2 @@ + +
Element with a dot in the id
diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html new file mode 100644 index 00000000..a686ba31 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html @@ -0,0 +1,15 @@ + + + This page has iframes + + +

This is the heading

+ +
+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html new file mode 100644 index 00000000..e00b482a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html @@ -0,0 +1,11 @@ + + + This page has iframes + + +

This is the heading

+ +':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
', +o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& +l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
";return k},_adjustInstDate:function(a,b,c){var e= +a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, +"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); +c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, +"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= +function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, +[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.10";window["DP_jQuery_"+y]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery); +;/* + * jQuery UI Effects 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0]; +h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c, +a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent", +border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); +return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); +else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), +b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, +a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, +a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== +e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h
").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css new file mode 100644 index 00000000..9f194f6a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css @@ -0,0 +1 @@ +.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css new file mode 100644 index 00000000..ea08c689 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css @@ -0,0 +1 @@ +body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md new file mode 100644 index 00000000..fa5d6394 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md @@ -0,0 +1 @@ +Icons are generated and provided by the http://icomoon.io service. diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg new file mode 100644 index 00000000..578b8695 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg @@ -0,0 +1,175 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot new file mode 100644 index 0000000000000000000000000000000000000000..60e2d2e5c747caf9d41310976af96c75c696b448 GIT binary patch literal 10316 zcmd5?U2GiJb-s80_iuKWyR$<|i^wk26^Xemt$M6rkdH=-X_ zc2hfUn@JD@L0c3`fwZn+6!X$TeJRuwZ4Vb8MX*7Hq~O^r8=LG0(H0twqkQSbjaN32 zmr#BUx$)xV*I(Fp`X?t)4jF6Sdg=L%=eBPB+fNvqqF1lJgbMk`(iqAwp*;1{l~-ST znP;8=`FkjLFJF6h;}@5H{vl)2G_31aHeTCgXZQmscTsk(Zd`f(ZR_|&#%56D*EX-c z@+#!S<&qo@lO@J)Fcr_v^A}L_Xg~jmjj?Z0yP=Ci?46en5!$@Fg+JZ}H?SFMKxHNt zl-^jyd+BMFDeMe#lNorXq0Z^fc9*;Dt^eD?JmGS>tUK3T5oNyhQ%7-RN9y+$4f;3E zIC>O^-U;RD92FvL%dvNz!W;hN~?WD zUhIgC-(x2tCo7A*-W6cU!l0lxA%H=cg3YENMT|@`lDaSF%}y zKWJpL3JQ3;VoQ?Dr7v@?$?EBR?>$tf*L(aMee%Uq3PeSLy7#`(@2(knjhD5OX(}~I zRu!3lN#@Gw-jDjdzMkY?=UalHabdN#y3olk#z$+>#<1LutIx{|yrr8MqHddVky|zf zrrVvmJjuPzn%uEF?wb4{clDOr?s&E(v30H}s=RW_;a@9Yw0!b9U{t1sG zUtHh+l-+i5H4-iiI`1$CdPXRr11*Y-RT`G~Yxi@9$30&pr`P3_LO=8)B+Sbm{X4t+ z2b^tTQy^_K_%!_^@$#Jl?9u;j`O|T1zaH|RW>x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cHcOMAK{zUryuw^Av`h-ycIX=o{_5h&_Y3Y>@}sk4BKq@`jyS;o2|OmTOBbtC6_$ z!j!dyuS&C@Du{>g*KcC&MhoS7tx%}d%jQ0-s2t&X&dg-3(S3!&zELZiEzt+vQWi0% zH#y5eU-oQ@FFeW%T|KMInPN4Us}?f|e`Ye3a#2ftO1*+*%GIn9gL6mDnnmOO&EP}l zHOxHC!8+!E)~X8RPR+4}<0bvITQMmKsSE9POcjw-718++SVTM|F^{p}0srV8TyTo& z?qC!n;CvUaUYOt+o#B#osgl2S4}Pj{M?3g&iiY3C5b#U#3BN?_>nyNx1lZWbz*}vX zKD9U6u4RL!B!IUpzWETzfv<7Qoxt;A&jV6n{9V8Zlol2u=mv*9FZ8@ZfHu9*kAsNe zJ8Z~&%xAz7EH1)>wqX?~fyOR72n*)nbO~!tXiV5EupT)f8qq1TrS)kY)u)Mv4&YQ= zBEu~fCEP#{{&|23x&m>J#C`jQsbO@s%U}=0n59Yf2>TMv46JnnfxAWpdtl%`jw33q z+xRFh%xS7Ar1=OMFC&UA;?wTX782meZ{IH6a(Mi}p;FIxzE^FG7Od&z@$uzp3+K@C zDST3w(z6%kdLf_JI!Z2|SMXh3)xKM(QN)F|Qj!BX5T58FEZ()v7Ceo#{O~rHcskEzICVnD+r28Cyzxx`mGIZ;KcF?PShp6@ZDtlqSv6SgX9y7 zK27B`ogSj84W;xMOK z{HyW5nQv#$Wq&*S!|XrhjNE+g^SO8O59R+b|M!K}!jpw}3m=>3&B*+|`QOE_7T+qy z#ScpL(pO9WQ+^U}q=`JjkI`>7a6y#2E|dL*Xhm&trtQ;ocKo$IEu((1Pb;9m-ltXk z@N8e7CXf7FpU&b;_Q${^u4GU{JQF(Mna~N(gid%Sbiy;CHT3;rzi-0x{y&Sm_YdIi z+y2#;ufBfe+2;?xa%JQ4 + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf new file mode 100644 index 0000000000000000000000000000000000000000..afc6ec458b5c032f104c12318ff721d31d9dab8e GIT binary patch literal 10128 zcmd5?U2GiJb-s80_iuKWyR$<|i^wk6wXXemexM6rkdH=-X_ zc2g^E>q*c6L0c3`fh4YB6!X$TeJRuwMH9d%#xF%43RKBM;r5}~B0%A`2r3wLP!#U6 z-?_81T#*tDBQKuioqO(`d(WJE@44SO_Y4_ljOAF!WVZDA3yUj8^OygLnsK5`6%C93gUb=Ms#m#4ab`s@~vF5FpU)X$p`_{kyjIpUDJYRbm z74lD|F_d3MdFtiMuf6^X&pZk84^Zx2y87JaFE9S$L&l~rp?vM~=IdMREPnvyF3Qf8 z&C4&mZJoHl*bIvN>ekg)UxS>uT$00Kvc&iersCNX{6*9}+Rr~?W9)aS-O$A$_T85c z5!$@FjUVrV8`umrpfY0;61}mCJ3Xy3g`GuiG6T;v)H&VR?n<}4{eRn-CtOaKb?3XQ zqRh8{?kJAzNd4ZTLI1`XM~~vrJMpg0F(JZ^9Q)TP%z@Bd9z(7%Hp|Xo=E`oPX-ZbP zT9>@W%DU8+J*(BOwAx4IWe>^nTJ6;Z=@3V&3EnDu7FwR*XnB&`7VmEL-ZzRlP0JMx zzC~2*IDQ=aj+)8ov7XDQjvyl<{aHS{MNNA*2A!S?f?gbkAw8!)A@_rn{^F^RX!tVo zA$JV9>+CRl2(-H(>#ix=a$UBkYwJ=+UR#h{9VNH3QkRzPiaJx9sks$#w{=@bX~yP% zep)fjlJ*lVZ)luzC7U()gGM&1pn$h4wj{}1`U>Zote(mD-a~bIy~n@NCto_PKvWc{ zd+!_l?wXO;cv&l%rc#q+Rgw9ZWv-m*{iNUP%_M)5ZwrFPh1J^bLMOWzAFV|j!*V;W zz9291mTqE*x^2ouZrK=^Zg=YPB=wqt>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)YG z3EwCi<-MOM$pM2EC9?#pi4u(I{XbShtzsW1o|yaHZd@ukqZ^}6skGlGOAaeaO9|}j z#?V13_>i9`>FTlnn181Dz(*`6p@Ol0*tm_8dXjJ7>Hil5MWvI+q96UQ4Q=4W@(E7V zCB5+7WapySpsR!A6N^4go=7T z5D=Ksru4tn|JhhFe$V(9<9{>X&OVm?o$QaZ|Clp!3%M`k-pN0d|6cy@3TuU@3hx#^ zHlHvf^M~et7r$0~s~8tQDAh|}EB#OTDZG&;@+dz}|FeM$qU^a$_7|cRwZ)mXPt)1) z*ZZ`L`lUXtfPS-2tE`3+y@7n^0=~m0bQWi_KL#doC4(B`na~N(gid%Sbiy;C6P^jJ zq3@UaeG{Iqu~*m?cAZ^j&#@QS5&SR4WwyyK;rB(9uc7=3yNVVLVw?+*`M&L6d*#aY z%g?=V@3u!&YL;Df#cLw_Cja}f0^KJi}_ Kf?+iKUjGk9se#1+ literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff new file mode 100644 index 0000000000000000000000000000000000000000..fa72c74b45ba3725a6ff7d8d0901c538467c64e2 GIT binary patch literal 7848 zcmeHMdwf$>oU`L(I}xEJxM+1g4pdMw3}~}JN5NL8w5Fw{q_m|E z8k(j}e|@BBTKb?5Yk9_^bt(u>!4KslxpUZCddu|e1 zP#D+!cW-je{hi0}dtSfCIp-EFU%Ys^)w-Oqd-t;G49~skOefx7e-KX0=gW2!}+crC=Dgz5E6r_&ki*&9o8*JaM$oSTu8!*nqyc_egq zOz5uI(D(KCPG@(dP7p=kGj1rgg?u49zXu2xZWi&MZ$Zp%M0DpZx3Y%?zk%Jw?qNS* zKV%8)0hWk?C9}ub6KpA4&a5nrt!3+27RzM?tcaB{2XirE9@fe_SuY!4``7{Y3-%Tp zVaM4?c8dKY`-Gjwp#P2ift|<1|C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5(%CEzHRAC}@vf_Uv}>>0prV1;NP1Mt^`V@ptPqt=BC)XHS*(S;Y# U(RlV0x|+w9A&8D)G}nFp2i)urJpcdz literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg new file mode 100644 index 00000000..c87b8cd1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg @@ -0,0 +1,153 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.eot b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.eot new file mode 100644 index 0000000000000000000000000000000000000000..c1085bfd295abcf940871c863165656df8b094c2 GIT binary patch literal 10024 zcmb_idyE~|SwCmqckcT+`@B2%UhmGX?d*DY_WJq}Z^o7FP$zcQ&Z`O}8OL@WPMj=> zX&ludQze2_M97p%L@J=0qE;YOND)O<70MvspZ)=+f~u-oxQHUC5Wzf(3Ke(xeP?Fw z-re;hshE4uobSB8^PO|P^F7X)S%!*Ks2}Pel`qITSm)F=w*|!**HjuWTKXdW?J@r56Aw7#e_OHG0(k0M|XXYH0Gg)H% zDpOH*F9#Lu?l}Gd8)a`$y`hJL?9GqISg*}{>-g~=umR0b1xhoqaMWW3{ZeU#Da=Eh zVFt<+y7?zod=56 zdl-8UV>dw))h;)RZne>Nts)Qmp2WP+^TK{$b9;K6_xg+@9R&S=2i@*? z|FfXartt$;o$Y4#0+%x{JNisc(#u+1>ZmKSQ>L6fwMuPKcWQfTd!~3-JH)W4>38I^Ocn+2W!v|ccEB;-^|uSwD=F3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O|wi6i_LuQDO z4e|Y2;|AAj(4R%l3I%&)ZNx@I7dmPeOf9DTaT0#b6f3f<_JCk_*I;;l{>k8k|u&7wHq3=;>W1@Ur!uc1~ zAA0E2eeh5rHAS%FI7uh*-YsQY>rwi31S@Xu$8pl0%E#lpr?-^lkfxB-O=4=3z=+qc zBkd!2ag02+ieMuY5GWlWcrk1vi~QRPPWO(muksmu)$<}eE#H@I{GOYy+O>lK literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg new file mode 100644 index 00000000..feb9ba38 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg @@ -0,0 +1,63 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf new file mode 100644 index 0000000000000000000000000000000000000000..58103c2b6287fa209bf1e62c7ea107fd65a351f1 GIT binary patch literal 9860 zcmb_idyE~|SwCmqckcT!ch>v3JNI7i&aUn3dUy8v`jKqLmF-X`cGgasRDmSp*v`X= zlO-`tqB>-%R3#M=3Z)W}3h1V&6$lklL=mb&83g>(KfqK_RaFZYQ3Mqtm`72e;x51M z%*@@pUO$qG*?Z=E=k=ZMobx@;EaQx^EDM>;_TGEn;-}#q z#wSs}|A{j%tRpX>Ou6yIGcP}W`M%4Kqx=$M&F?&U{>-_JFaJx2vG)CF-}fXc7}Q+^0z3zgYx&DdG73)tEYc>2~D3x`O?KRFRil=vu`mrW1#Fjd*vuN(cVh#!3?@trA zzQp{<_oG4RaA#(M_Xmul9EO9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B>T J6}@lx{2vuDq_zM6 literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.woff b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.woff new file mode 100644 index 0000000000000000000000000000000000000000..ad1ae396a88239278653cf63ac3630b6b8360102 GIT binary patch literal 7664 zcmd^EeRNbsmah&e@&s&y^qUz5ok?6)9a_|cMi+4QpfEvgMU=(><57@+KF#`x8}ikUk8}tz0ZB*)RLsFoKnEOk8;=~ek7wPC4(je%+1AzZBv$Wvy@&nP>uv}t zjywLjue<8qx^?UK>f_#9x85szASdSmhvNapuKkLQW4NyEVCP#89(-W&E!m9yvIYDVGAY-66IoTTvKYLtPxvOOUUlWnDE09h0U(IIA_6oa-O=OeU&)5_^ z>hIY!b_=tyS?nL#Ja#v`pFPBK*&}QvTf>~Jn7P@L>?!7BTUitHvt6u{^{`$xz@BGE z*sJVy_9pu$_8tqf57di=o$JP2)}JCe`#y)2|c#Pu$$My0hHbx4M6K z>#atXC8=zg&5)T*W;11Wo6K&P*+0l^mdx&y*AgG@v5MIAP*lS5LUwef7|!S(AQ0sn3#SdDPNw39GZz zu=<}r+w${UVwySr*EMt05p}6C2T@FmYD7_oJ;Zf~T@4ZG7CVu!aN&qq)R+a8mLRw` zF$lKpIoe-L`hRnCbZInQo%heYGLXN^O^WU#?xyl`aw`;@&&l0c-c3q0m3TLGc2c)O z;v}c;&Ha@D#pPDFZEf7TZL2bi=tI73>$V2aXXf)g`qwJe;UXo5mUUFuOw9^Kf!B*j+f>Pd3keXD}S1_svi+JYTV?BCGi>U(NGbyHVcAaL+t&D)Q^py*F8Q0qK3UZ2nF_11doymj6N zFL`N8qu1}%8n%<4+8VWHf3w!&_qVmR`CGMS#owfD1D|#@_&t8_wra@xwtDKl%D?`* zT0&)Aw2$_6bs?j!GAf~xva%8=;#_@_>h*3h;JuCBW>2%X#q0OA)%feQdjD1pfc|aU z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j@e|K3zZP5m@6Cnj}>cR zjmSlbSqvYDGb9#r5HU18svcX4^*x3l8>4LYp6^;C}N|F;$-`e8OiB z>GSpZbB562JVgC^9#sVO`OsUq0bYdI`+4dXF05=&4~tsjxqDV0r9aa9Z@>LMy-#m1 zq`9=EVM~3r^4fLkjh}EW(6Sru_4O4;9;SzB#R_CbwAM+xTLPN$$&GwRRae8#T}o3E z-?g)$t7?a$-}An@j*5EeARX-OMMk|vw2syl6|IvRqQU8qy@NV}m^j^1iWwF1Jr@YL z9_ny*zyrK!?*ciO6Z($tYSne~e z!8eu#iTenfjL#*PUZ(U*%Z$xs?Cea_+4K0B&Kh5QOru0H3_1llz5+1|a#?G^$AP)H zPrxUf6woG?arVZuGtd9e`Saj1l-Sv6M#*&k(~Q)NF^P6YrIDGK39?riXh3{viEq+=B_THlR??~Rye|7$BiV1y_-@)S5@`DtUeZ~h1hWhgU&!AxFeb|^6iCeX$VAx{ClAi*C4dTN4B1-&Feb9{g^ zC+M;G=#!nG$FUpPD!Fp0SAZii<8&M|PRB9hbR08I$1&sdShSs$XdB0Lv30DFm9qli zuVxP;m9SFqionfaS?p$ZE4xG{`PuOjCcY1@W>4U|U_QPPmR#BZgI*0V3A_?Dt63g^ ZAIBpz*gbe?5xy=K8ILnYh3xXz{{ll7??M0o literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/anchor.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/anchor.gif new file mode 100644 index 0000000000000000000000000000000000000000..606348c7f53dba169a9aca7279a2a973f4b07bdb GIT binary patch literal 53 zcmZ?wbhEHbWM^P!XkcUjg8%>jEB<5wG8q|kKzxu40~1eAV&{y5e`l1KFoiKNSOWkz C+YCGa literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/loader.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img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v zi*?7KCXQHkD)O6!0Q%4N+HTODHxJ{kQSuQX$l-rSwkwh(zMkdfzxyGwl@yHC)C4p< z&n2%8#M?)Q@mgHL1ot8`SFdSEj9ye|jHy+U8#@HoUExG=@AVkRAe_qYm4EpzK6L*& zh`)26?V#f4#_h^P9G^%>h2-H3)$QP zQovu6J9qDvsxqweDdNNa!Lb?L4_UF{tLX_nN7r0U_vF14YKcGR-*Gl} zx3oG)bzf|65dBxD-;2ZCp??K;+TuQ9onnK?==5hzbkb^r_g>z4#D8mcv8(+XdoszA zCx-qhdgxMNMotj}SiL_6V(tLcsK7(M(r(%u<}QrVfOvyK6_;~NOTlPGfX@M7S5YQF z&*$(ylJMHJt^_aQeu{C6NaTE$G3HNN@_SnN8YcaKn%`)F@~L1x+ah7-gEJPpc6w%3 zyX}r+Qk$4RHZzfH){e~F*qJ{d*L8a6n4;U?+{de0-t)mal#TVxe)3F}^UBh+zd T)6_**#cgp_+?JL9(ew3BlNF>u literal 0 HcmV?d00001 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/object.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/object.gif new file mode 100644 index 0000000000000000000000000000000000000000..cccd7f023fb80908cb33bb7d9604236cd21b7ae7 GIT binary patch literal 152 zcmV;J0B8S4Nk%w1VG#fg0J9GO<>lo+KR<78Z?v?uS65g4{r%Y3*xlXT%F4>`@9+2b z_ww@cot>Tk|Nk>HGXMYpA^8LW000jFEC2ui01*HU000C<(8)=wd#<&tyXIMjHBV`d zBSi|xsj3(;nD0kQ0aJq8eLH~x02P|t2!_J&Wqb%0io?#xD.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css new file mode 100644 index 00000000..284ac1de --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css @@ -0,0 +1 @@ +.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td div{border:1px solid #d6d6d6;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:focus{border-color:#a1a1a1}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js new file mode 100644 index 00000000..e25849df --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js @@ -0,0 +1 @@ +tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var n,o=[];if(t)return d(t.split(/[ ,]/),function(t){function i(){var i=e.selection;"bullist"==r&&i.selectorChanged("ul > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"UL"==n)}),"numlist"==r&&i.selectorChanged("ol > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"OL"==n)}),t.settings.stateSelector&&i.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&i.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?n=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_size),o.push(t),n=null):(n||(n={type:"buttongroup",items:[]},o.push(n)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),n.items.push(t),e.initialized?i():e.on("init",i)))}),i.push({type:"toolbar",layout:"flow",items:o}),!0}var i=[];if(tinymce.isArray(u.toolbar)){if(0===u.toolbar.length)return;tinymce.each(u.toolbar,function(e,t){u["toolbar"+(t+1)]=e}),delete u.toolbar}for(var n=1;10>n&&t(u["toolbar"+n]);n++);return i.length||u.toolbar===!1||t(u.toolbar||f),i.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}:void 0}function i(){function t(t){var i;return"|"==t?{text:"|"}:i=e.menuItems[t]}function i(i){var n,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").split(/[ ,]/)),u.menu?(o=u.menu[i],a=!0):o=h[i],o){n={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var i=t(e);i&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==i&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;lr;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var a=this,s={},l,c,u,d,f;c=o+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,a.domLoaded=!1,a.events=s,a.bind=function(t,o,p,h){function m(e){i(n(e||_.event),g)}var g,v,y,b,C,x,w,_=window;if(t&&3!==t.nodeType&&8!==t.nodeType){for(t[c]?g=t[c]:(g=l++,t[c]=g,s[g]={}),h=h||t,o=o.split(" "),y=o.length;y--;)b=o[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),a.domLoaded&&"ready"===b&&"complete"==t.readyState?p.call(h,n({type:b})):(d||(C=f[b],C&&(x=function(e){var t,r;if(t=e.currentTarget,r=e.relatedTarget,r&&t.contains)r=t.contains(r);else for(;r&&r!==t;)r=r.parentNode;r||(e=n(e||_.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,i(e,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(e){e=n(e||_.event),e.type="focus"===e.type?"focusin":"focusout",i(e,g)}),v=s[g][b],v?"ready"===b&&a.domLoaded?p({type:b}):v.push({func:p,scope:h}):(s[g][b]=v=[{func:p,scope:h}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?r(t,x,a):e(t,C||b,x,w)));return t=v=0,p}},a.unbind=function(e,n,r){var i,o,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return a;if(i=e[c]){if(f=s[i],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],o=f[d]){if(r)for(u=o.length;u--;)if(o[u].func===r){var p=o.nativeHandler,h=o.fakeName,m=o.capture;o=o.slice(0,u).concat(o.slice(u+1)),o.nativeHandler=p,o.fakeName=h,o.capture=m,f[d]=o}r&&0!==o.length||(delete f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture))}}else{for(d in f)o=f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture);f={}}for(d in f)return a;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return a},a.fire=function(e,t,r){var o;if(!e||3===e.nodeType||8===e.nodeType)return a;r=n(null,r),r.type=t,r.target=e;do o=e[c],o&&i(r,o),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!r.isPropagationStopped());return a},a.clean=function(e){var t,n,r=a.unbind;if(!e||3===e.nodeType||8===e.nodeType)return a;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return a},a.destroy=function(){s={}},a.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var o="mce-data-",a=/^(?:mouse|contextmenu)|click/,s={keyLocation:1,layerX:1,layerY:1,returnValue:1};return i.Event=new i,i.Event.bind(window,"ready",function(){}),i}),r(c,[],function(){function e(e){return mt.test(e+"")}function n(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>_.cacheLength&&delete e[t.shift()],e[n]=r,r}}function r(e){return e[I]=!0,e}function i(e){var t=B.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t=null}}function o(e,t,n,r){var i,o,a,s,l,c,f,p,h,m;if((t?t.ownerDocument||t:F)!==B&&A(t),t=t||B,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(L&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&z.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(z.qsa&&!M.test(e)){if(f=!0,p=I,h=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=u(e),(f=t.getAttribute("id"))?p=f.replace(bt,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",l=c.length;l--;)c[l]=p+d(c[l]);h=ht.test(e)&&t.parentNode||t,m=c.join(",")}if(m)try{return Z.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{f||t.removeAttribute("id")}}}return b(e.replace(lt,"$1"),t,n,r)}function a(e,t){var n=t&&e,r=n&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e,t){var n,r,i,a,s,l,c,u=q[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=_.preFilter;s;){(!n||(r=ct.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=ut.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(lt," ")}),s=s.slice(n.length));for(a in _.filter)!(r=pt[a].exec(s))||c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?o.error(e):q(e,l).slice(0)}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function f(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c,u=W+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(c=t[I]||(t[I]={}),(l=c[r])&&l[0]===u){if((s=l[1])===!0||s===w)return s===!0}else if(l=c[r]=[u],l[1]=e(t,n,a)||w,l[1]===!0)return!0}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function m(e,t,n,i,o,a){return i&&!i[I]&&(i=m(i)),o&&!o[I]&&(o=m(o,a)),r(function(r,a,s,l){var c,u,d,f=[],p=[],m=a.length,g=r||y(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?g:h(g,f,e,s,l),b=n?o||(r?e:m||i)?[]:a:v;if(n&&n(v,b,s,l),i)for(c=h(b,p),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[p[u]]=!(v[p[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?tt.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=h(b===a?b.splice(m,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function g(e){for(var t,n,r,i=e.length,o=_.relative[e[0].type],a=o||_.relative[" "],s=o?1:0,l=f(function(e){return e===t},a,!0),c=f(function(e){return tt.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==k)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=_.relative[e[s].type])u=[f(p(u),n)];else{if(n=_.filter[e[s].type].apply(null,e[s].matches),n[I]){for(r=++s;i>r&&!_.relative[e[r].type];r++);return m(s>1&&p(u),s>1&&d(e.slice(0,s-1)).replace(lt,"$1"),n,r>s&&g(e.slice(s,r)),i>r&&g(e=e.slice(r)),i>r&&d(e))}u.push(n)}return p(u)}function v(e,t){var n=0,i=t.length>0,a=e.length>0,s=function(r,s,l,c,u){var d,f,p,m=[],g=0,v="0",y=r&&[],b=null!=u,C=k,x=r||a&&_.find.TAG("*",u&&s.parentNode||s),N=W+=null==C?1:Math.random()||.1;for(b&&(k=s!==B&&s,w=n);null!=(d=x[v]);v++){if(a&&d){for(f=0;p=e[f++];)if(p(d,s,l)){c.push(d);break}b&&(W=N,w=++n)}i&&((d=!p&&d)&&g--,r&&y.push(d))}if(g+=v,i&&v!==g){for(f=0;p=t[f++];)p(y,m,s,l);if(r){if(g>0)for(;v--;)y[v]||m[v]||(m[v]=J.call(c));m=h(m)}Z.apply(c,m),b&&!r&&m.length>0&&g+t.length>1&&o.uniqueSort(c)}return b&&(W=N,k=C),y};return i?r(s):s}function y(e,t,n){for(var r=0,i=t.length;i>r;r++)o(e,t[r],n);return n}function b(e,t,n,r){var i,o,a,s,l,c=u(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&_.relative[o[1].type]){if(t=(_.find.ID(a.matches[0].replace(xt,wt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?0:o.length;i--&&(a=o[i],!_.relative[s=a.type]);)if((l=_.find[s])&&(r=l(a.matches[0].replace(xt,wt),ht.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Z.apply(n,r),n;break}}return S(e,c)(r,t,!L,n,ht.test(e)),n}function C(){}var x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I="sizzle"+-new Date,F=window.document,z={},W=0,V=0,U=n(),q=n(),$=n(),j=!1,K=function(){return 0},G=typeof t,Y=1<<31,X=[],J=X.pop,Q=X.push,Z=X.push,et=X.slice,tt=X.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",it=rt.replace("w","w#"),ot="([*^$|!~]?=)",at="\\["+nt+"*("+rt+")"+nt+"*(?:"+ot+nt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+it+")|)|)"+nt+"*\\]",st=":("+rt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ct=new RegExp("^"+nt+"*,"+nt+"*"),ut=new RegExp("^"+nt+"*([\\x20\\t\\r\\n\\f>+~])"+nt+"*"),dt=new RegExp(st),ft=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),NAME:new RegExp("^\\[name=['\"]?("+rt+")['\"]?\\]"),TAG:new RegExp("^("+rt.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ht=/[\x20\t\r\n\f]*[+~]/,mt=/^[^{]+\{\s*\[native code/,gt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/'|\\/g,Ct=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,wt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{Z.apply(X=et.call(F.childNodes),F.childNodes),X[F.childNodes.length].nodeType}catch(_t){Z={apply:X.length?function(e,t){Q.apply(e,et.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}E=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},A=o.setDocument=function(n){var r=n?n.ownerDocument||n:F;return r!==B&&9===r.nodeType&&r.documentElement?(B=r,D=r.documentElement,L=!E(r),z.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),z.attributes=i(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),z.getElementsByClassName=i(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),z.getByName=i(function(e){e.id=I+0,e.appendChild(B.createElement("a")).setAttribute("name",I),e.appendChild(B.createElement("i")).setAttribute("name",I),D.appendChild(e);var t=r.getElementsByName&&r.getElementsByName(I).length===2+r.getElementsByName(I+0).length;return D.removeChild(e),t}),z.sortDetached=i(function(e){return e.compareDocumentPosition&&1&e.compareDocumentPosition(B.createElement("div"))}),_.attrHandle=i(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==G&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},z.getByName?(_.find.ID=function(e,t){if(typeof t.getElementById!==G&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(e){var t=e.replace(xt,wt);return function(e){return e.getAttribute("id")===t}}):(_.find.ID=function(e,n){if(typeof n.getElementById!==G&&L){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==G&&r.getAttributeNode("id").value===e?[r]:t:[]}},_.filter.ID=function(e){var t=e.replace(xt,wt);return function(e){var n=typeof e.getAttributeNode!==G&&e.getAttributeNode("id");return n&&n.value===t}}),_.find.TAG=z.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==G?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},_.find.NAME=z.getByName&&function(e,t){return typeof t.getElementsByName!==G?t.getElementsByName(name):void 0},_.find.CLASS=z.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==G&&L?t.getElementsByClassName(e):void 0},H=[],M=[":focus"],(z.qsa=e(r.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||M.push("\\["+nt+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||M.push(":checked")}),i(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&M.push("[*^$]="+nt+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(z.matchesSelector=e(P=D.matchesSelector||D.mozMatchesSelector||D.webkitMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&i(function(e){z.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),H.push("!=",st)}),M=new RegExp(M.join("|")),H=H.length&&new RegExp(H.join("|")),O=e(D.contains)||D.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},K=D.compareDocumentPosition?function(e,t){if(e===t)return j=!0,0;var n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return n?1&n||T&&t.compareDocumentPosition(e)===n?e===r||O(F,e)?-1:t===r||O(F,t)?1:R?tt.call(R,e)-tt.call(R,t):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(e===t)return j=!0,0;if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===F?-1:c[i]===F?1:0},B):B},o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){if((e.ownerDocument||e)!==B&&A(e),t=t.replace(Ct,"='$1']"),z.matchesSelector&&L&&(!H||!H.test(t))&&!M.test(t))try{var n=P.call(e,t);if(n||z.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return o(t,B,null,[e]).length>0},o.contains=function(e,t){return(e.ownerDocument||e)!==B&&A(e),O(e,t)},o.attr=function(e,t){var n;return(e.ownerDocument||e)!==B&&A(e),L&&(t=t.toLowerCase()),(n=_.attrHandle[t])?n(e):!L||z.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},o.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},o.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!z.detectDuplicates,T=!z.sortDetached,R=!z.sortStable&&e.slice(0),e.sort(K),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},N=o.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=N(t);return n},_=o.selectors={cacheLength:50,createPseudo:r,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,wt),e[3]=(e[4]||e[5]||"").replace(xt,wt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||o.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&o.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&dt.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,wt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&U(e,function(e){return t.test(e.className||typeof e.getAttribute!==G&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=o.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(u=g[I]||(g[I]={}),c=u[e]||[],p=c[0]===W&&c[1],f=c[0]===W&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(f=p=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,p,f];break}}else if(y&&(c=(t[I]||(t[I]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++p&&d&&d[m]||(f=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[I]||(d[I]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(e,t){var n,i=_.pseudos[e]||_.setFilters[e.toLowerCase()]||o.error("unsupported pseudo: "+e);return i[I]?i(t):i.length>1?(n=[e,e,"",t],_.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=tt.call(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(lt,"$1"));return i[I]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(t){return o(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(e){return ft.test(e||"")||o.error("unsupported lang: "+e),e=e.replace(xt,wt).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===D},focus:function(e){return e===B.activeElement&&(!B.hasFocus||B.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!_.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++rn;n++)t[n]=e[n];return t}function f(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===t?"":(""+e).replace(N,"")}function h(e,t){var n,r,i,o,a;if(e)if(n=e.length,n===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],t.call(a,a,r)===!1))break}else for(i=0;n>i&&(a=e[i],t.call(a,a,r)!==!1);i++);return e}function m(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!c(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i}function g(e,t,n,r){for(var i=[];e;e=e[n])r&&e.nodeType!==r||e===t||i.push(e);return i}var v=document,y=Array.prototype.push,b=Array.prototype.slice,C=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,x=e.Event,w=l("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"),_=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},N=/^\s*|\s*$/g;return c.fn=c.prototype={constructor:c,selector:"",length:0,init:function(e,t){var n=this,r,a;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(i(e)){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:C.exec(e),!r)return c(t||document).find(e);if(r[1])for(a=o(e).firstChild;a;)this.add(a),a=a.nextSibling;else{if(a=v.getElementById(r[2]),a.id!==r[2])return n.find(e);n.length=1,n[0]=a}}else this.add(e);return n},toArray:function(){return d(this)},add:function(e){var t=this;return _(e)?y.apply(t,e):e instanceof c?t.add(e.toArray()):y.call(t,e),t},attr:function(e,n){var i=this;if("object"==typeof e)h(e,function(e,t){i.attr(t,e)});else{if(!r(n))return i[0]&&1===i[0].nodeType?i[0].getAttribute(e):t;this.each(function(){1===this.nodeType&&this.setAttribute(e,n)})}return i},css:function(e,n){var i=this;if("object"==typeof e)h(e,function(e,t){i.css(t,e)});else{if(e=e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),!r(n))return i[0]?i[0].style[e]:t;"number"!=typeof n||w[e]||(n+="px"),i.each(function(){var t=this.style;"opacity"===e&&this.runtimeStyle&&"undefined"==typeof this.runtimeStyle.opacity&&(t.filter=""===n?"":"alpha(opacity="+100*n+")");try{t[e]=n}catch(r){}})}return i},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],x.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(r(e)){for(n=t.length;n--;)t[n].innerHTML=e;return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(r(e)){for(n=t.length;n--;)t[n].innerText=t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return a(this,arguments,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return a(this,arguments,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){var e=this;return e[0]&&e[0].parentNode?a(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?a(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},appendTo:function(e){return c(e).append(this),this},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return-1!==e.indexOf(" ")?h(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n){var r;s(n,e)!==t&&(r=n.className,t?n.className+=r?" "+e:e:n.className=p((" "+r+" ").replace(" "+e+" "," ")))}),n},hasClass:function(e){return s(this[0],e)},each:function(e){return h(this,e)},on:function(e,t){return this.each(function(){x.bind(this,e,t)})},off:function(e,t){return this.each(function(){x.unbind(this,e,t)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new c(b.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},replaceWith:function(e){var t=this;return t[0]&&t[0].parentNode.replaceChild(c(e)[0],t[0]),t},wrap:function(e){return e=c(e)[0],this.each(function(){var t=this,n=e.cloneNode(!1);t.parentNode.insertBefore(n,t),n.appendChild(t)})},unwrap:function(){return this.each(function(){for(var e=this,t=e.firstChild,n;t;)n=t,t=t.nextSibling,e.parentNode.insertBefore(n,e)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),c(e)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)c.find(e,this[t],r);return c(r)},push:y,sort:[].sort,splice:[].splice},u(c,{extend:u,toArray:d,inArray:f,isArray:_,each:h,trim:p,makeMap:l,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,isXMLDoc:n.isXML,contains:n.contains,filter:function(e,t,n){return n&&(e=":not("+e+")"),t=1===t.length?c.find.matchesSelector(t[0],e)?[t[0]]:[]:c.find.matches(e,t)}}),h({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return m(e,"parentNode")},parentsUntil:function(e,t){return m(e,"parentNode",t)},next:function(e){return g(e,"nextSibling",1)},prev:function(e){return g(e,"previousSibling",1)},nextNodes:function(e){return g(e,"nextSibling")},prevNodes:function(e){return g(e,"previousSibling")},children:function(e){return g(e.firstChild,"nextSibling",1)},contents:function(e){return d(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){c.fn[e]=function(n){var r=this,i;if(r.length>1)throw new Error("DomQuery only supports traverse functions on a single node.");return r[0]&&(i=t(r[0],n)),i=c(i),n&&"parentsUntil"!==e?i.filter(n):i}}),c.fn.filter=function(e){return c.filter(e)},c.fn.is=function(e){return!!e&&this.filter(e).length>0},c.fn.init.prototype=c.fn,c}),r(d,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e +}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d="\ufeff";for(e=e||{},u=("\\\" \\' \\; \\: ; : "+d).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function p(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function h(t,n,r,i,o,a){if(o=o||a)return o=p(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=p(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":("color"===v||"background-color"===v)&&(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,h),m[v]=b?p(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,n){function r(n){var r,o,a,l;if(r=t.styles[n])for(o=0,a=r.length;a>o;o++)n=r[o],l=e[n],l!==s&&l.length>0&&(i+=(i.length>0?" ":"")+n+": "+l+";")}var i="",o,a;if(n&&t&&t.styles)r("*"),r(n);else for(o in e)a=e[o],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+o+": "+a+";");return i}}}}),r(f,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}var r=e;this.current=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=function(e){return r=n(r,"lastChild","previousSibling",e)}}}),r(p,[],function(){function e(e){return null===e||e===t?"":(""+e).replace(m,"")}function n(e,n){return n?"array"==n&&g(e)?!0:typeof e==n:e!==t}function r(e){var t=[],n,r;for(n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function i(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function o(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function a(e,t){var n=[];return o(e,function(e){n.push(t(e))}),n}function s(e,t){var n=[];return o(e,function(e){(!t||t(e))&&n.push(e)}),n}function l(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],o[a]=c?function(){return i[s].apply(this,arguments)}:function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function c(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function u(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function d(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),o(e,function(e,i){return t.call(r,e,i,n)===!1?!1:void d(e,t,n,r)}))}function f(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function h(t,r){return!t||n(t,"array")?t:a(t.split(r||","),e)}var m=/^\s*|\s*$/g,g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{trim:e,isArray:g,is:n,toArray:r,makeMap:i,each:o,map:a,grep:s,inArray:c,extend:u,create:l,walk:d,createNS:f,resolve:p,explode:h}}),r(h,[p],function(e){function t(n){function r(){return H.createDocumentFragment()}function i(e,t){_(F,e,t)}function o(e,t){_(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[U]=M[V],M[q]=M[W]):(M[V]=M[U],M[W]=M[q]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function p(e,t){var n=M[V],r=M[W],i=M[U],o=M[q],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function h(){N(I)}function m(){return N(P)}function g(){return N(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return $(new t(n),{startContainer:M[V],startOffset:M[W],endContainer:M[U],endOffset:M[q],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return M[V]==M[U]&&M[W]==M[q]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function _(e,t,r){var i,o;for(e?(M[V]=t,M[W]=r):(M[U]=t,M[q]=r),i=M[U];i.parentNode;)i=i.parentNode;for(o=M[V];o.parentNode;)o=o.parentNode;o==i?w(M[V],M[W],M[U],M[q])>0&&M.collapse(e):M.collapse(e),M.collapsed=x(),M.commonAncestorContainer=n.findCommonAncestor(M[V],M[U])}function N(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[V]==M[U])return E(e);for(t=M[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return S(t,e);++n}for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[U])return k(t,e);++r}for(o=r-n,a=M[V];o>0;)a=a.parentNode,o--;for(s=M[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function E(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[W]==M[q])return t;if(3==M[V].nodeType){if(n=M[V].nodeValue,i=n.substring(M[W],M[q]),e!=O&&(o=M[V],c=M[W],u=M[q]-M[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(H.createTextNode(i)),t}for(o=C(M[V],M[W]),a=M[q]-M[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&M.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[W],0>=a)return t!=O&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(M.setEndBefore(e),M.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[q]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(M.setStartAfter(e),M.collapse(F)),o}function R(e,t){var n=C(M[U],M[q]-1),r,i,o,a,s,l=n!=M[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(M[V],M[W]),r=n!=M[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[W],a=o.substring(l),s=o.substring(0,l)):(l=M[q],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var M=this,H=n.doc,P=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",q="endOffset",$=e.extend,j=n.nodeIndex;return $(M,{startContainer:H,startOffset:0,endContainer:H,endOffset:0,collapsed:F,commonAncestorContainer:H,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:p,deleteContents:h,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(m,[p],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&(#x|#)?([\w]+);/g,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):d[r]||String.fromCharCode(r)):a[e]||i[e]||t(e)})}};return f}),r(g,[],function(){var e=navigator,t=e.userAgent,n,r,i,o,a,s,l;n=window.opera&&window.opera.buildNumber,r=/WebKit/.test(t),i=!r&&!n&&/MSIE/gi.test(t)&&/Explorer/gi.test(e.appName),i=i&&/MSIE (\w+)\./.exec(t)[1],o=-1==t.indexOf("Trident/")||-1==t.indexOf("rv:")&&-1==e.appName.indexOf("Netscape")?!1:11,i=i||o,a=!r&&!o&&/Gecko/.test(t),s=-1!=t.indexOf("Mac"),l=/(iPad|iPhone)/.test(t);var c=!l||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:a,mac:s,iOS:l,contentEditable:c,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window,documentMode:i?document.documentMode||7:10}}),r(v,[],function(){return function(e,t){function n(t){e.getElementsByTagName("head")[0].appendChild(t)}function r(t,r,s){function l(){for(var e=v.passed,t=e.length;t--;)e[t]();v.status=2,v.passed=[],v.failed=[]}function c(){for(var e=v.failed,t=e.length;t--;)e[t]();v.status=3,v.passed=[],v.failed=[]}function u(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function d(e,t){e()||((new Date).getTime()-g0)return m=e.createElement("style"),m.textContent='@import "'+t+'"',p(),void n(m);f()}n(h),h.href=t}}var i=0,o={},a;t=t||{},a=t.maxLoadTime||5e3,this.load=r}}),r(y,[c,d,l,f,h,m,g,p,v],function(e,n,r,i,o,a,s,l,c){function u(e,t){var i=this,o;i.doc=e,i.win=window,i.files={},i.counter=0,i.stdMode=!v||e.documentMode>=8,i.boxModel=!v||"CSS1Compat"==e.compatMode||i.stdMode,i.hasOuterHTML="outerHTML"in e.createElement("a"),i.styleSheetLoader=new c(e),this.boundEvents=[],i.settings=t=m({keep_values:!1,hex_colors:1},t),i.schema=t.schema,i.styles=new n({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),i.fixDoc(e),i.events=t.ownEvents?new r(t.proxy):r.Event,o=t.schema?t.schema.getBlockElements():{},i.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var d=l.each,f=l.is,p=l.grep,h=l.trim,m=l.extend,g=s.webkit,v=s.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/,C=l.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," ");return u.prototype={root:null,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},fixDoc:function(e){var t=this.settings,n;if(v&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!v||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.get(e.settings.root_element)||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),f(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.get(r.settings.root_element)||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(y.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=f(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return this.run(e,function(e){var n,r=e.parentNode;if(!r)return null;if(t)for(;n=e.firstChild;)!v||3!==n.nodeType||n.nodeValue?r.insertBefore(n,e):e.removeChild(n);return r.removeChild(e)})},setStyle:function(e,t,n){return this.run(e,function(e){var r=this,i,o;if(t)if("string"==typeof t){i=e.style,t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"number"!=typeof n||C[t]||(n+="px"),"opacity"===t&&e.runtimeStyle&&"undefined"==typeof e.runtimeStyle.opacity&&(i.filter=""===n?"":"alpha(opacity="+100*n+")"),"float"==t&&(t="cssFloat"in e.style?"cssFloat":"styleFloat");try{i[t]=n}catch(a){}r.settings.update_styles&&e.removeAttribute("data-mce-style")}else for(o in t)r.setStyle(e,o,t[o])})},getStyle:function(e,n,r){if(e=this.get(e)){if(this.doc.defaultView&&r){n=n.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(n)}catch(i){return null}}return n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=v?"styleFloat":"cssFloat"),e.currentStyle&&r?e.currentStyle[n]:e.style?e.style[n]:t}},setStyles:function(e,t){this.setStyle(e,t)},css:function(e,t,n){this.setStyle(e,t,n)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this;if(e&&t)return this.run(e,function(e){var i=r.settings,o=e.getAttribute(t);if(null!==n)switch(t){case"style":if(!f(n,"string"))return void d(n,function(t,n){r.setStyle(e,n,t)});i.keep_values&&(n?e.setAttribute("data-mce-style",n,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=n;break;case"class":e.className=n||"";break;case"src":case"href":i.keep_values&&(i.url_converter&&(n=i.url_converter.call(i.url_converter_scope||r,n,t,e)),r.setAttrib(e,"data-mce-"+t,n,2));break;case"shape":e.setAttribute("data-mce-style",n)}f(n)&&null!==n&&0!==n.length?e.setAttribute(t,""+n,2):e.removeAttribute(t,2),o!=n&&i.onSetAttrib&&i.onSetAttrib({attrElm:e,attrName:t,attrValue:n})})},setAttribs:function(e,t){var n=this;return this.run(e,function(e){d(t,function(t,r){n.setAttrib(e,r,t)})})},getAttrib:function(e,t,n){var r,i=this,o;if(e=i.get(e),!e||1!==e.nodeType)return n===o?!1:n;if(f(n)||(n=""),/^(src|href|style|coords|shape)$/.test(t)&&(r=e.getAttribute("data-mce-"+t)))return r;if(v&&i.props[t]&&(r=e[i.props[t]],r=r&&r.nodeValue?r.nodeValue:r),r||(r=e.getAttribute(t,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(t))return e[i.props[t]]===!0&&""===r?t:r?t:"";if("FORM"===e.nodeName&&e.getAttributeNode(t))return e.getAttributeNode(t).nodeValue;if("style"===t&&(r=r||e.style.cssText,r&&(r=i.serializeStyle(i.parseStyle(r),e.nodeName),i.settings.keep_values&&e.setAttribute("data-mce-style",r))),g&&"class"===t&&r&&(r=r.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),v)switch(t){case"rowspan":case"colspan":1===r&&(r="");break;case"size":("+0"===r||20===r||0===r)&&(r="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===r&&(r="");break;case"hspace":-1===r&&(r="");break;case"maxlength":case"tabindex":(32768===r||2147483647===r||"32768"===r)&&(r="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===r?t:n;case"shape":r=r.toLowerCase();break;default:0===t.indexOf("on")&&r&&(r=(""+r).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1"))}return r!==o&&null!==r&&""!==r?""+r:n},getPos:function(e,t){var n=this,r=0,i=0,o,a=n.doc,s;if(e=n.get(e),t=t||a.body,e){if(t===a.body&&e.getBoundingClientRect)return s=e.getBoundingClientRect(),t=n.boxModel?a.documentElement:a.body,r=s.left+(a.documentElement.scrollLeft||a.body.scrollLeft)-t.clientLeft,i=s.top+(a.documentElement.scrollTop||a.body.scrollTop)-t.clientTop,{x:r,y:i};for(o=e;o&&o!=t&&o.nodeType;)r+=o.offsetLeft||0,i+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)r-=o.scrollLeft||0,i-=o.scrollTop||0,o=o.parentNode}return{x:r,y:i}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==u.DOM&&n===document){var o=u.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,u.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==u.DOM&&n===document?void u.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void d(e.split(","),function(e){var i;t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),v&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){return this.run(e,function(e){var n;return t?this.hasClass(e,t)?e.className:(n=this.removeClass(e,t),e.className=n=(""!==n?n+" ":"")+t,n):0})},removeClass:function(e,t){var n=this,r;return n.run(e,function(e){var i;return n.hasClass(e,t)?(r||(r=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g")),i=e.className.replace(r," "),i=h(" "!=i?i:""),e.className=i,i||(e.removeAttribute("class"),e.removeAttribute("className")),i):e.className})},hasClass:function(e,t){return e=this.get(e),e&&t?-1!==(" "+e.className+" ").indexOf(" "+t+" "):!1},toggleClass:function(e,n,r){r=r===t?!this.hasClass(e,n):r,this.hasClass(e,n)!==r&&(r?this.addClass(e,n):this.removeClass(e,n))},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){var n=this;return n.run(e,function(e){if(v){for(;e.firstChild;)e.removeChild(e.firstChild);try{e.innerHTML="
"+t,e.removeChild(e.firstChild)}catch(r){var i=n.create("div");i.innerHTML="
"+t,d(p(i.childNodes),function(t,n){n&&e.canHaveHTML&&e.appendChild(t)})}}else e.innerHTML=t;return t})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){var r=this;return r.run(e,function(e){function i(){var i,o;for(o=n.createElement("body"),o.innerHTML=t,i=o.lastChild;i;)r.insertAfter(i.cloneNode(!0),e),i=i.previousSibling;r.remove(e)}if(1==e.nodeType)if(n=n||e.ownerDocument||r.doc,v)try{1==e.nodeType&&r.hasOuterHTML?e.outerHTML=t:i()}catch(o){i()}else i()})},decode:a.decode,encode:a.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return f(t,"array")&&(e=e.cloneNode(!0)),n&&d(p(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(l.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],d(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,o,a,s,l,c=0;if(e=e.firstChild){s=new i(e,e.parentNode),t=t||n.schema?n.schema.getNonEmptyElements():null;do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(o=n.getAttribs(e),r=o.length;r--;)if(l=o[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!b.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new o(this)},nodeIndex:function(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n},split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=h(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.replaceChild(n,t):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(l.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(l.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n]; +this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},u.DOM=new u(document),u}),r(b,[y,p],function(e,t){function n(){function e(e,t){function n(){o.remove(s),a&&(a.onreadystatechange=a.onload=a=null),t()}function i(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var o=r,a,s;s=o.uniqueId(),a=document.createElement("script"),a.id=s,a.type="text/javascript",a.src=e,"onreadystatechange"in a?a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&n()}:a.onload=n,a.onerror=i,(document.getElementsByTagName("head")[0]||document.body).appendChild(a)}var t=0,n=1,a=2,s={},l=[],c={},u=[],d=0,f;this.isDone=function(e){return s[e]==a},this.markDone=function(e){s[e]=a},this.add=this.load=function(e,n,r){var i=s[e];i==f&&(l.push(e),s[e]=t),n&&(c[e]||(c[e]=[]),c[e].push({func:n,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(l,e,t)},this.loadScripts=function(t,r,l){function p(e){i(c[e],function(e){e.func.call(e.scope)}),c[e]=f}var h;u.push({func:r,scope:l||this}),(h=function(){var r=o(t);t.length=0,i(r,function(t){return s[t]==a?void p(t):void(s[t]!=n&&(s[t]=n,d++,e(t,function(){s[t]=a,d--,p(t),h()})))}),d||(i(u,function(e){e.func.call(e.scope)}),u.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(C,[b,p],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&a.call(s?s:e)}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(x,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(w,[p],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e){var t={},n,r;for(n=0,r=e.length;r>n;n++)t[e[n]]={};return t}var o,l,c,u=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),l=3;lo;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},s,l,c,u,d,f;return r[e]?r[e]:(s=t("id accesskey class dir lang style tabindex title"),l=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),c=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(s.push.apply(s,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),l.push.apply(l,t("article aside details dialog figure header footer hgroup section nav")),c.push.apply(c,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(s.push("xml:lang"),f=t("acronym applet basefont big font strike tt"),c.push.apply(c,f),o(f,function(e){n(e,"",c)}),d=t("center dir isindex noframes"),l.push.apply(l,d),u=[].concat(l,c),o(d,function(e){n(e,"",u)})),u=u||[].concat(l,c),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),n("address dt dd div caption","",u),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),n("blockquote","cite",u),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",u),n("dl","","dt dd"),n("a","href target rel media hreflang type",c),n("q","cite",c),n("ins del","cite datetime",u),n("img","src alt usemap ismap width height"),n("iframe","src name width height",u),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",u,"param"),n("param","name value"),n("map","name",u,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",u),n("th","colspan rowspan headers scope abbr",u),n("form","accept-charset action autocomplete enctype method name novalidate target",u),n("fieldset","disabled form name",u,"legend"),n("label","form for",c),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?u:c),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",u,"li"),n("noscript","",u),"html4"!=e&&(n("wbr"),n("ruby","",c,"rt rp"),n("figcaption","",u),n("mark rt rp summary bdi","",c),n("canvas","width height",u),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",u,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",u,"track source"),n("source","src type media"),n("track","kind src srclang label default"),n("datalist","",c,"option"),n("article section nav aside header footer","",u),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",u,"figcaption"),n("time","datetime",c),n("dialog","open",u),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",c),n("progress","value max",c),n("meter","value min max low high optimum",c),n("details","open",u,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid codebase codetype archive standby align border hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select","onchange"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!=e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("iframe","sandbox seamless allowfullscreen")),o(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,r[e]=a,a)}var r={},i=e.makeMap,o=e.each,a=e.extend,s=e.explode,l=e.inArray;return function(e){function c(t,n,o){var s=e[t];return s?s=i(s,/[, ]/,i(s.toUpperCase(),/[, ]/)):(s=r[t],s||(s=i(n," ",i(n.toUpperCase()," ")),s=a(s,o),r[t]=s)),s}function u(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function d(e){var n,r,o,a,s,c,d,f,p,h,m,g,y,C,x,w,_,N,E,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),v["@"]&&(w=v["@"].attributes,_=v["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(C=s[1],p=s[2],x=s[3],f=s[5],g={},y=[],c={attributes:g,attributesOrder:y},"#"===C&&(c.paddEmpty=!0),"-"===C&&(c.removeEmpty=!0),"!"===s[4]&&(c.removeEmptyAttrs=!0),w){for(N in w)g[N]=w[N];y.push.apply(y,_)}if(f)for(f=t(f,"|"),o=0,a=f.length;a>o;o++)if(s=k.exec(f[o])){if(d={},m=s[1],h=s[2].replace(/::/g,":"),C=s[3],E=s[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(h),d.required=!0),"-"===m){delete g[h],y.splice(l(y,h),1);continue}C&&("="===C&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:h,value:E}),d.defaultValue=E),":"===C&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:h,value:E}),d.forcedValue=E),"<"===C&&(d.validValues=i(E,"?"))),T.test(h)?(c.attributePatterns=c.attributePatterns||[],d.pattern=u(h),c.attributePatterns.push(d)):(g[h]||y.push(h),g[h]=d)}w||"@"!=p||(w=g,_=y),x&&(c.outputName=p,v[x]=c),T.test(p)?(c.pattern=u(p),b.push(c)):v[p]=c}}function f(e){v={},b=[],d(e),o(x,function(e,t){y[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(r.text_block_elements=r.block_elements=null,o(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",s=t[2];if(y[s]=y[i],R[s]=i,r||(S[s.toUpperCase()]={},S[s]={}),!v[s]){var l=v[i];l=a({},l),delete l.removeEmptyAttrs,delete l.removeEmpty,v[s]=l}o(y,function(e,t){e[i]&&(y[t]=e=a({},y[t]),e[s]=e[i])})}))}function h(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&o(t(e,","),function(e){var r=n.exec(e),i,s;r&&(s=r[1],i=s?y[r[2]]:y[r[2]]={"#comment":{}},i=y[r[2]],o(t(r[3],"|"),function(e){"-"===s?(y[r[2]]=i=a({},y[r[2]]),delete i[e]):i[e]={}}))})}function m(e){var t=v[e],n;if(t)return t;for(n=b.length;n--;)if(t=b[n],t.pattern.test(e))return t}var g=this,v={},y={},b=[],C,x,w,_,N,E,S,k,T,R={},A={};e=e||{},x=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),e.valid_styles&&(C={},o(e.valid_styles,function(e,t){C[t]=s(e)})),w=c("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=c("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),N=c("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),E=c("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),k=c("non_empty_elements","td th iframe video audio object script",N),T=c("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),S=c("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",T),o((e.special||"script noscript style textarea").split(" "),function(e){A[e]=new RegExp("]*>","gi")}),e.valid_elements?f(e.valid_elements):(o(x,function(e,t){v[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},y[t]=e.children}),"html5"!=e.schema&&o(t("strong/b em/i"),function(e){e=t(e,"/"),v[e[1]].outputName=e[0]}),v.img.attributesDefault=[{name:"alt",value:""}],o(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){v[e]&&(v[e].removeEmpty=!0)}),o(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){v[e].paddEmpty=!0}),o(t("span"),function(e){v[e].removeEmptyAttrs=!0})),p(e.custom_elements),h(e.valid_children),d(e.extended_valid_elements),h("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&o(s(e.invalid_elements),function(e){v[e]&&delete v[e]}),m("span")||d("span[!data-mce-type|*]"),g.children=y,g.styles=C,g.getBoolAttrs=function(){return E},g.getBlockElements=function(){return S},g.getTextBlockElements=function(){return T},g.getShortEndedElements=function(){return N},g.getSelfClosingElements=function(){return _},g.getNonEmptyElements=function(){return k},g.getWhiteSpaceElements=function(){return w},g.getSpecialElements=function(){return A},g.isValidChild=function(e,t){var n=y[e];return!(!n||!n[t])},g.isValid=function(e,t){var n,r,i=m(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},g.getElementRule=m,g.getCustomElements=function(){return R},g.addValidElements=d,g.setValidElements=f,g.addCustomElements=p,g.addValidChildren=h,g.elements=v}}),r(_,[w,m,p],function(e,t,n){var r=n.each;return function(i,o){function a(){}var s=this;i=i||{},s.schema=o=o||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),r("comment cdata text start end pi doctype".split(" "),function(e){e&&(s[e]=i[e]||a)}),s.parse=function(e){function r(e){var t,n;for(t=f.length;t--&&f[t].name!==e;);if(t>=0){for(n=f.length-1;n>=t;n--)e=f[n],e.valid&&s.end(e.name);f.length=t}}function a(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in C?t:F(n||r||o||""),w&&!v&&0!==t.indexOf("data-")){if(a=k[t],!a&&T){for(s=T.length;s--&&(a=T[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(W[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(V.test(c))return;if(!i.allow_html_data_urls&&U.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var s=this,l,c=0,u,d,f=[],p,h,m,g,v,y,b,C,x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I=0,F=t.decode,z,W=n.makeMap("src,href,data,background,formaction,poster"),V=/((java|vb)script|mhtml):/i,U=/^data:/i;for(M=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,b=o.getShortEndedElements(),L=i.self_closing_elements||o.getSelfClosingElements(),C=o.getBoolAttrs(),w=i.validate,y=i.remove_internals,z=i.fix_self_closing,P=o.getSpecialElements();l=M.exec(e);){if(c0&&f[f.length-1].name===u&&r(u),!w||(_=o.getElementRule(u))){if(N=!0,w&&(k=_.attributes,T=_.attributePatterns),(S=l[8])?(v=-1!==S.indexOf("data-mce-type"),v&&y&&(N=!1),p=[],p.map={},S.replace(H,a)):(p=[],p.map={}),w&&!v){if(R=_.attributesRequired,A=_.attributesDefault,B=_.attributesForced,D=_.removeEmptyAttrs,D&&!p.length&&(N=!1),B)for(h=B.length;h--;)E=B[h],g=E.name,O=E.value,"{$uid}"===O&&(O="mce_"+I++),p.map[g]=O,p.push({name:g,value:O});if(A)for(h=A.length;h--;)E=A[h],g=E.name,g in p.map||(O=E.value,"{$uid}"===O&&(O="mce_"+I++),p.map[g]=O,p.push({name:g,value:O}));if(R){for(h=R.length;h--&&!(R[h]in p.map););-1===h&&(N=!1)}p.map["data-mce-bogus"]&&(N=!1)}N&&s.start(u,p,x)}else N=!1;if(d=P[u]){d.lastIndex=c=l.index+l[0].length,(l=d.exec(e))?(N&&(m=e.substr(c,l.index-c)),c=l.index+l[0].length):(m=e.substr(c),c=e.length),N&&(m.length>0&&s.text(m,!0),s.end(u)),M.lastIndex=c;continue}x||(S&&S.indexOf("/")==S.length-1?N&&s.end(u):f.push({name:u,valid:N}))}else(u=l[1])?(">"===u.charAt(0)&&(u=" "+u),i.allow_conditional_comments||"[if"!==u.substr(0,3)||(u=" "+u),s.comment(u)):(u=l[2])?s.cdata(u):(u=l[3])?s.doctype(u):(u=l[4])&&s.pi(u,l[5]);c=l.index+l[0].length}for(c=0;h--)u=f[h],u.valid&&s.end(u.name)}}}),r(N,[x,w,_,p],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,p,h,m,g,v,y;for(m=i("tr,td,th,tbody,thead,tfoot,table"),h=l.getNonEmptyElements(),g=l.getTextBlockElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),p=0;p0?(t.value=n,t=t.prev):(r=t.prev,t.remove(),t=r)}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,_,N,E,S,k,T,R,A=[],B,D,L,M,H,P,O,I;if(o=o||{},p={},h={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),P=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,H=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=P[b.name],s&&P[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(E=h[a],E?E.push(r):h[a]=[r]);T[e]&&m(r),n||(b=r),!B&&H[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&H[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,b.empty().remove(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in p){for(E=d[S],C=p[S],_=C.length;_--;)C[_].parent||C.splice(_,1);for(x=0,w=E.length;w>x;x++)E[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(E=f[x],E.name in h){for(C=h[E.name],_=C.length;_--;)C[_].parent||C.splice(_,1);for(_=0,N=E.callbacks.length;N>_;_++)E.callbacks[_](C,E.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,p,h;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(p=l.getElementRule(c.name),p&&(p.removeEmpty?c.remove():p.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(h=new e("#text",3),h.value="\xa0",i.replace(h))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}})}}),r(E,[m,p],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');r[r.length]=!n||l?">":" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push(""),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push(""):r.push(""),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(S,[E,w],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,p,h,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(f=[],f.map={},m=r.getElementRule(e.name),p=0,h=m.attributesOrder.length;h>p;p++)u=m.attributesOrder[p],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(p=0,h=c.length;h>p;p++)u=c[p].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(k,[y,N,m,S,x,w,g,p],function(e,t,n,r,i,o,a,s){var l=s.each,c=s.trim,u=e.DOM;return function(e,i){var s,d,f;return i&&(s=i.dom,d=i.schema),s=s||u,d=d||new o(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,f=new t(e,d),f.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),f.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope,u;r--;)i=t[r],o=i.attributes.map[a],o!==u?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=s.serializeStyle(s.parseStyle(o),i.name):l&&(o=l.call(c,o,n,i.name)),i.attr(n,o.length>0?o:null))}),f.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null)}),f.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),f.addAttributeFilter("data-mce-expando",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),f.addNodeFilter("noscript",function(e){for(var t=e.length,r;t--;)r=e[t].firstChild,r&&(r.value=n.decode(r.value))}),f.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o;r--;)if(i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t){var a=(i.attr("type")||"text/javascript").replace(/^mce\-/,"");i.attr("type","text/javascript"===a?null:a),o.length>0&&(i.firstChild.value="// ")}else o.length>0&&(i.firstChild.value="")}),f.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),f.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&f.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,("ul"===r.name||"ol"===r.name)&&n.prev&&"li"===n.prev.name&&n.prev.append(n)}),f.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:d,addNodeFilter:f.addNodeFilter,addAttributeFilter:f.addAttributeFilter,serialize:function(t,n){var i=this,o,u,p,h,m;return a.ie&&s.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),s.setHTML(t,m)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(u=o.createHTMLDocument(""),l("BODY"==t.nodeName?t.childNodes:[t],function(e){u.body.appendChild(u.importNode(e,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,p=s.doc,s.doc=u),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,i.onPreProcess(n)),h=new r(e,d),n.content=h.serialize(f.parse(c(n.getInner?t.innerHTML:s.getOuterHTML(t)),n)),n.cleanup||(n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||i.onPostProcess(n),p&&(s.doc=p),n.node=null,n.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.setValidElements(e)},onPreProcess:function(e){i&&i.fire("PreProcess",e)},onPostProcess:function(e){i&&i.fire("PostProcess",e)}}}}),r(T,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode; +if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(u=l.nodeValue,s+=u.length,s>=i){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(s+=l.nodeValue.length,s>=i){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,h;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),(t==f||t==f.documentElement)&&(t=p,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(h=t.childNodes,h.length?(n>=h.length?i.insertAfter(a,h[h.length-1]):t.insertBefore(a,h[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,p=f.body,h,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=p.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=p.createControlRange(),a.addElement(m),a.select(),h=e.getRng(),h.item&&m===h.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(R,[g],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return(e.mac?t.metaKey:t.ctrlKey)&&!t.altKey}}}),r(A,[R,p,g],function(e,t,n){return function(r,i){function o(e){var t=i.settings.object_resizing;return t===!1||n.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:i.dom.is(e,t))}function a(t){var n,r;n=t.screenX-k,r=t.screenY-T,H=n*E[2]+B,P=r*E[3]+D,H=5>H?5:H,P=5>P?5:P,(e.modifierPressed(t)||"IMG"==w.nodeName&&E[2]*E[3]!==0)&&(H=Math.round(P/L),P=Math.round(H*L)),C.setStyles(_,{width:H,height:P}),E[2]<0&&_.clientWidth<=H&&C.setStyle(_,"left",R+(B-H)),E[3]<0&&_.clientHeight<=P&&C.setStyle(_,"top",A+(D-P)),M||(i.fire("ObjectResizeStart",{target:w,width:B,height:D}),M=!0)}function s(){function e(e,t){t&&(w.style[e]||!i.schema.isValid(w.nodeName.toLowerCase(),e)?C.setStyle(w,e,t):C.setAttrib(w,e,t))}M=!1,e("width",H),e("height",P),C.unbind(O,"mousemove",a),C.unbind(O,"mouseup",s),I!=O&&(C.unbind(I,"mousemove",a),C.unbind(I,"mouseup",s)),C.remove(_),F&&"TABLE"!=w.nodeName||l(w),i.fire("ObjectResized",{target:w,width:H,height:P}),i.nodeChanged()}function l(e,t,r){var l,u,d,f,p,h=i.getBody();g(),l=C.getPos(e,h),R=l.x,A=l.y,p=e.getBoundingClientRect(),u=p.width||p.right-p.left,d=p.height||p.bottom-p.top,w!=e&&(m(),w=e,H=P=0),f=i.fire("ObjectSelected",{target:e}),o(e)&&!f.isDefaultPrevented()?x(N,function(e,o){function l(t){k=t.screenX,T=t.screenY,B=w.clientWidth,D=w.clientHeight,L=D/B,E=e,_=w.cloneNode(!0),C.addClass(_,"mce-clonedresizable"),_.contentEditable=!1,_.unSelectabe=!0,C.setStyles(_,{left:R,top:A,margin:0}),_.removeAttribute("data-mce-selected"),i.getBody().appendChild(_),C.bind(O,"mousemove",a),C.bind(O,"mouseup",s),I!=O&&(C.bind(I,"mousemove",a),C.bind(I,"mouseup",s))}var c,f;return t?void(o==t&&l(r)):(c=C.get("mceResizeHandle"+o),c?C.show(c):(f=i.getBody(),c=C.add(f,"div",{id:"mceResizeHandle"+o,"data-mce-bogus":!0,"class":"mce-resizehandle",unselectable:!0,style:"cursor:"+o+"-resize; margin:0; padding:0"}),n.ie&&(c.contentEditable=!1)),e.elm||(C.bind(c,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),l(e)}),e.elm=c),void C.setStyles(c,{left:u*e[0]+R-c.offsetWidth/2,top:d*e[1]+A-c.offsetHeight/2}))}):c(),w.setAttribute("data-mce-selected","1")}function c(){var e,t;g(),w&&w.removeAttribute("data-mce-selected");for(e in N)t=C.get("mceResizeHandle"+e),t&&(C.unbind(t),C.remove(t))}function u(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n;return x(C.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"==e.type?e.target:r.getNode(),n=C.getParent(n,F?"table":"table,img,hr"),t(n,i.getBody())&&(v(),t(r.getStart(),n)&&t(r.getEnd(),n)&&(!F||n!=r.getStart()&&"IMG"!==r.getStart().nodeName))?void l(n):void c()}function d(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function f(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function p(e){var t=e.srcElement,n,r,o,a,s,c,u;n=t.getBoundingClientRect(),c=S.clientX-n.left,u=S.clientY-n.top;for(r in N)if(o=N[r],a=t.offsetWidth*o[0],s=t.offsetHeight*o[1],Math.abs(a-c)<8&&Math.abs(s-u)<8){E=o;break}M=!0,i.getDoc().selection.empty(),l(t,r,S)}function h(e){var t=e.srcElement;if(t!=w){if(m(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);("IMG"==t.nodeName||"TABLE"==t.nodeName)&&(c(),w=t,d(t,"resizestart",p))}}function m(){f(w,"resizestart",p)}function g(){for(var e in N){var t=N[e];t.elm&&(C.unbind(t.elm),delete t.elm)}}function v(){try{i.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function y(e){var t;if(F){t=O.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function b(){w=_=null,F&&(m(),f(i.getBody(),"controlselect",h))}var C=i.dom,x=t.each,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O=i.getDoc(),I=document,F=n.ie&&n.ie<11;N={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var z=".mce-content-body";return i.contentStyles.push(z+" div.mce-resizehandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}"+z+" .mce-resizehandle:hover {background: #000}"+z+" img[data-mce-selected], hr[data-mce-selected] {outline: 1px solid black;resize: none}"+z+" .mce-clonedresizable {position: absolute;"+(n.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"),i.on("init",function(){F?(i.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(c(),y(e.target))}),d(i.getBody(),"controlselect",h),i.on("mousedown",function(e){S=e})):(v(),n.ie>=11&&(i.on("mouseup",function(e){var t=e.target.nodeName;/^(TABLE|IMG|HR)$/.test(t)&&(i.selection.select(e.target,"TABLE"==t),i.nodeChanged())}),i.dom.bind(i.getBody(),"mscontrolselect",function(e){/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&window.setTimeout(function(){i.selection.select(e.target)},0))}))),i.on("nodechange mousedown mouseup ResizeEditor",u),i.on("keydown keyup",function(e){w&&"TABLE"==w.nodeName&&u(e)}),i.on("hide",c)}),i.on("remove",g),{isResizable:o,showResizeRect:l,hideResizeRect:c,updateResizeRect:u,controlSelect:y,destroy:b}}}),r(B,[p,f],function(e,t){function n(e){this.walk=function(t,n){function i(e){var t;return t=e[0],3===t.nodeType&&t===l&&c>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===d&&e.length>0&&t===u&&3===t.nodeType&&e.splice(e.length-1,1),e}function o(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,r){var a=r?"nextSibling":"previousSibling";for(m=e,g=m.parentNode;m&&m!=t;m=g)g=m.parentNode,v=o(m==e?m:m[a],a),v.length&&(r||v.reverse(),n(i(v)))}var l=t.startContainer,c=t.startOffset,u=t.endContainer,d=t.endOffset,f,p,h,m,g,v,y;if(y=e.select("td.mce-item-selected,th.mce-item-selected"),y.length>0)return void r(y,function(e){n([e])});if(1==l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[c]),1==u.nodeType&&u.hasChildNodes()&&(u=u.childNodes[Math.min(d-1,u.childNodes.length-1)]),l==u)return n(i([l]));for(f=e.findCommonAncestor(l,u),m=l;m;m=m.parentNode){if(m===u)return s(l,f,!0);if(m===f)break}for(m=u;m;m=m.parentNode){if(m===l)return s(u,f);if(m===f)break}p=a(l,f)||l,h=a(u,f)||u,s(l,p,!0),v=o(p==l?p:p.nextSibling,"nextSibling",h==u?h.nextSibling:h),v.length&&n(i(v)),s(u,h)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return c=p,u=n?p.nodeValue.length:0,void(i=!0);if(e.isBlock(p)||h[p.nodeName.toLowerCase()])return;s=p}o&&s&&(c=s,i=!0,u=0)}var c,u,d,f=e.getRoot(),p,h,m,g;if(c=n[(r?"start":"end")+"Container"],u=n[(r?"start":"end")+"Offset"],g=1==c.nodeType&&u===c.childNodes.length,h=e.schema.getNonEmptyElements(),m=r,1==c.nodeType&&u>c.childNodes.length-1&&(m=!1),9===c.nodeType&&(c=e.getRoot(),u=0),c===f){if(m&&(p=c.childNodes[u>0?u-1:0],p&&(h[p.nodeName]||"TABLE"==p.nodeName)))return;if(c.hasChildNodes()&&(u=Math.min(!m&&u>0?u-1:u,c.childNodes.length-1),c=c.childNodes[u],u=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){p=c,d=new t(c,f);do{if(3===p.nodeType&&p.nodeValue.length>0){u=m?0:p.nodeValue.length,c=p,i=!0;break}if(h[p.nodeName.toLowerCase()]){u=e.nodeIndex(p),c=p.parentNode,"IMG"!=p.nodeName||m||u++,i=!0;break}}while(p=m?d.next():d.prev())}}o&&(3===c.nodeType&&0===u&&l(!0),1===c.nodeType&&(p=c.childNodes[u],p||(p=c.childNodes[u-1]),!p||"BR"!==p.nodeName||s(p,"A")||a(p)||a(p,!0)||l(!0,p))),m&&!o&&3===c.nodeType&&u===c.nodeValue.length&&l(!1),i&&n["set"+(r?"Start":"End")](c,u)}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}var r=e.each;return n.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},n}),r(D,[f,T,A,B,g,p],function(e,n,r,i,o,a){function s(e,t,i,o){var a=this;a.dom=e,a.win=t,a.serializer=i,a.editor=o,a.controlSelection=new r(a,o),a.win.getSelection||(a.tridentSel=new n(a))}var l=a.each,c=a.grep,u=a.trim,d=o.ie,f=o.opera;return s.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(){var e=this,t=e.getRng(),n,r,i,o;if(t.duplicate||t.item){if(t.item)return t.item(0);for(i=t.duplicate(),i.collapse(1),n=i.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),r=o=t.parentElement();o=o.parentNode;)if(o==n){n=r;break}return n}return n=t.startContainer,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&3==n.nodeType?n.parentNode:n},getEnd:function(){var e=this,t=e.getRng(),n,r;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collapse(0),n=t.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),n&&"BODY"==n.nodeName?n.lastChild||n:n):(n=t.endContainer,r=t.endOffset,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[r>0?r-1:r]),n&&3==n.nodeType?n.parentNode:n)},getBookmark:function(e,t){function n(e,t){var n=0;return l(a.select(e),function(e,r){e==t&&(n=r)}),n}function r(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function i(){function e(e,n){var i=e[n?"startContainer":"endContainer"],a=e[n?"startOffset":"endOffset"],s=[],l,c,u=0;if(3==i.nodeType){if(t)for(l=i.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=i.childNodes,a>=c.length&&c.length&&(u=1,a=Math.max(0,c.length-1)),s.push(o.dom.nodeIndex(c[a],t)+u);for(;i&&i!=r;i=i.parentNode)s.push(o.dom.nodeIndex(i,t));return s}var n=o.getRng(!0),r=a.getRoot(),i={};return i.start=e(n,!0),o.isCollapsed()||(i.end=e(n)),i}var o=this,a=o.dom,s,c,u,d,f,p,h="",m;if(2==e)return p=o.getNode(),f=p?p.nodeName:null,"IMG"==f?{name:f,index:n(f,p)}:o.tridentSel?o.tridentSel.getBookmark(e):i();if(e)return{rng:o.getRng()};if(s=o.getRng(),u=a.uniqueId(),d=o.isCollapsed(),m="overflow:hidden;line-height:0px",s.duplicate||s.item){if(s.item)return p=s.item(0),f=p.nodeName,{name:f,index:n(f,p)};c=s.duplicate();try{s.collapse(),s.pasteHTML(''+h+""),d||(c.collapse(!1),s.moveToElementText(c.parentElement()),0===s.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML(''+h+""))}catch(g){return null}}else{if(p=o.getNode(),f=p.nodeName,"IMG"==f)return{name:f,index:n(f,p)};c=r(s.cloneRange()),d||(c.collapse(!1),c.insertNode(a.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:m},h))),s=r(s),s.collapse(!0),s.insertNode(a.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:m},h))}return o.moveToBookmark({id:u,keep:1}),{id:u}},moveToBookmark:function(e){function t(t){var n=e[t?"start":"end"],r,i,o,l;if(n){for(o=n[0],i=s,r=n.length-1;r>=1;r--){if(l=i.childNodes,n[r]>l.length-1)return;i=l[n[r]]}3===i.nodeType&&(o=Math.min(n[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(n[0],i.childNodes.length)),t?a.setStart(i,o):a.setEnd(i,o)}return!0}function n(t){var n=o.get(e.id+"_"+t),r,i,a,s,d=e.keep;if(n&&(r=n.parentNode,"start"==t?(d?(r=n.firstChild,i=1):i=o.nodeIndex(n),u=p=r,h=m=i):(d?(r=n.firstChild,i=1):i=o.nodeIndex(n),p=r,m=i),!d)){for(s=n.previousSibling,a=n.nextSibling,l(c(n.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});n=o.get(e.id+"_"+t);)o.remove(n,1);s&&a&&s.nodeType==a.nodeType&&3==s.nodeType&&!f&&(i=s.nodeValue.length,s.appendData(a.nodeValue),o.remove(a),"start"==t?(u=p=s,h=m=i):(p=s,m=i))}}function r(e){return!o.isBlock(e)||e.innerHTML||d||(e.innerHTML='
'),e}var i=this,o=i.dom,a,s,u,p,h,m;if(e)if(e.start){if(a=o.createRng(),s=o.getRoot(),i.tridentSel)return i.tridentSel.moveToBookmark(e);t(!0)&&t()&&i.setRng(a)}else e.id?(n("start"),n("end"),u&&(a=o.createRng(),a.setStart(r(u),h),a.setEnd(r(p),m),i.setRng(a))):e.name?i.select(o.select(e.name)[e.index]):e.rng&&i.setRng(e.rng)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a=n.win.document,s;if(!e&&n.lastFocusBookmark){var l=n.lastFocusBookmark;return l.startContainer?(i=a.createRange(),i.setStart(l.startContainer,l.startOffset),i.setEnd(l.endContainer,l.endOffset)):i=l,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(c){}if(d&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(c){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r;if(e.select)try{e.select()}catch(i){}else if(n.tridentSel){if(e.cloneRange)try{return void n.tridentSel.addRange(e)}catch(i){}}else if(r=n.getSel()){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(i){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,l=t.dom.getRoot();return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return!d&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};l(n.selectorChangedData,function(e,t){l(o,function(n){return i.is(n,t)?(r[t]||(l(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),l(r,function(e,n){a[n]||(delete r[n],l(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e){function t(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var n,r,i=this,o=i.dom,a=o.getRoot(),s,l;if("BODY"!=a.nodeName){var c=i.getScrollContainer();if(c)return n=t(e).y-t(c).y,l=c.clientHeight,s=c.scrollTop,void((s>n||n+25>s+l)&&(c.scrollTop=s>n?n:n-l+25))}r=o.getViewPort(i.editor.getWin()),n=o.getPos(e).y,s=r.y,l=r.h,(ns+l)&&i.editor.getWin().scrollTo(0,s>n?n:n-l+25)},_moveEndPoint:function(t,n,r){var i=n,a=new e(n,i),s=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==u(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(s[n.nodeName])return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(o.ie&&o.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?a.next():a.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},s}),r(L,[p],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(M,[f,B,p,L],function(e,t,n,r){return function(i){function o(e){return e.nodeType&&(e=e.nodeName),!!i.schema.getTextBlockElements()[e.toLowerCase()]}function a(e,t){return z.getParents(e,t,z.getRoot())}function s(e){return 1===e.nodeType&&"_mce_caret"===e.id}function l(){d({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){nt(n,function(t,n){z.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),nt("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){d(e,{block:e,remove:"all"})}),d(i.settings.formats)}function c(){i.addShortcut("ctrl+b","bold_desc","Bold"),i.addShortcut("ctrl+i","italic_desc","Italic"),i.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)i.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);i.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),i.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),i.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function u(e){return e?F[e]:F}function d(e,t){e&&("string"!=typeof e?nt(e,function(e,t){d(t,e)}):(t=t.length?t:[t],nt(t,function(e){e.deep===Q&&(e.deep=!e.selector),e.split===Q&&(e.split=!e.selector||e.inline),e.remove===Q&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),F[e]=t))}function f(e){var t;return i.dom.getParent(e,function(e){return t=i.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function p(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=f(e.parentNode),i.dom.getStyle(e,"color")&&t?i.dom.setStyle(e,"text-decoration",t):i.dom.getStyle(e,"textdecoration")===t&&i.dom.setStyle(e,"text-decoration",null))}function h(t,n,r){function a(e,t){if(t=t||m,e){if(t.onformat&&t.onformat(e,t,n,r),nt(t.styles,function(t,r){z.setStyle(e,r,k(t,n))}),t.styles){var i=z.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}nt(t.attributes,function(t,r){z.setAttrib(e,r,k(t,n))}),nt(t.classes,function(t){t=k(t,n),z.hasClass(e,t)||z.addClass(e,t)})}}function l(){function t(t,n){var i=new e(n);for(r=i.current();r;r=i.prev())if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}var n=i.selection.getRng(),o=n.startContainer,a=n.endContainer;if(o!=a&&0===n.endOffset){var s=t(o,a),l=3==s.nodeType?s.length:s.childNodes.length;n.setEnd(s,l)}return n}function c(e,t,n,r,i){var o=[],a=-1,s,l=-1,c=-1,u;return nt(e.childNodes,function(e,t){return"UL"===e.nodeName||"OL"===e.nodeName?(a=t,s=e,!1):void 0}),nt(e.childNodes,function(e,n){"SPAN"===e.nodeName&&"bookmark"==z.getAttrib(e,"data-mce-type")&&(e.id==t.id+"_start"?l=n:e.id==t.id+"_end"&&(c=n))}),0>=a||a>l&&c>a?(nt(rt(e.childNodes),i),0):(u=z.clone(n,Y),nt(rt(e.childNodes),function(e,t){(a>l&&a>t||l>a&&t>a)&&(o.push(e),e.parentNode.removeChild(e))}),a>l?e.insertBefore(u,s):l>a&&e.insertBefore(u,s.nextSibling),r.push(u),nt(o,function(e){u.appendChild(e)}),u)}function d(e,r,i){var l=[],u,d,p=!0;u=m.inline||m.block,d=z.create(u),a(d),V.walk(e,function(e){function h(e){var y,C,x,w,_;return _=p,y=e.nodeName.toLowerCase(),C=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&Z(e)&&(_=p,p="true"===Z(e),w=!0),N(y,"br")?(g=0,void(m.block&&z.remove(e))):m.wrapper&&v(e,t,n)?void(g=0):p&&!w&&m.block&&!m.wrapper&&o(y)&&U(C,u)?(e=z.rename(e,u),a(e),l.push(e),void(g=0)):m.selector&&(nt(f,function(t){"collapsed"in t&&t.collapsed!==b||z.is(e,t.selector)&&!s(e)&&(a(e,t),x=!0)}),!m.inline||x)?void(g=0):void(!p||w||!U(u,y)||!U(C,u)||!i&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||s(e)||m.inline&&q(e)?"li"==y&&r?g=c(e,r,d,l,h):(g=0,nt(rt(e.childNodes),h),w&&(p=_),g=0):(g||(g=z.clone(d,Y),e.parentNode.insertBefore(g,e),l.push(g)),g.appendChild(e)))}var g;nt(e,h)}),m.wrap_links===!1&&nt(l,function(e){function t(e){var n,r,i;if("A"===e.nodeName){for(r=z.clone(d,Y),l.push(r),i=rt(e.childNodes),n=0;n1||!q(e))&&0===o)return void z.remove(e,1);if(m.inline||m.wrapper){if(m.exact||1!==o||(e=i(e)),nt(f,function(t){nt(z.select(t.inline,e),function(e){var r;if(!M(e)){if(t.wrap_links===!1){r=e.parentNode;do if("A"===r.nodeName)return;while(r=r.parentNode)}B(t,n,e,t.exact?e:null)}})}),v(e.parentNode,t,n))return z.remove(e,1),e=0,X;m.merge_with_parents&&z.getParent(e.parentNode,function(r){return v(r,t,n)?(z.remove(e,1),e=0,X):void 0}),e&&m.merge_siblings!==!1&&(e=H(L(e),e),e=H(e,L(e,X)))}})}var f=u(t),m=f[0],g,y,b=!r&&W.isCollapsed();if(m)if(r)r.nodeType?(y=z.createRng(),y.setStartBefore(r),y.setEndAfter(r),d(A(y,f),null,!0)):d(r,null,!0);else if(b&&m.inline&&!z.select("td.mce-item-selected,th.mce-item-selected").length)O("apply",t,n);else{var C=i.selection.getNode();$||!f[0].defaultBlock||z.getParent(C,z.isBlock)||h(f[0].defaultBlock),i.selection.setRng(l()),g=W.getBookmark(),d(A(W.getRng(X),f),g),m.styles&&(m.styles.color||m.styles.textDecoration)&&(it(C,p,"childNodes"),p(C)),W.moveToBookmark(g),I(W.getRng(X)),i.nodeChanged()}}function m(e,t,n){function r(e){var n,i,o,a,s;if(1===e.nodeType&&Z(e)&&(a=b,b="true"===Z(e),s=!0),n=rt(e.childNodes),b&&!s)for(i=0,o=p.length;o>i&&!B(p[i],t,e,e);i++);if(h.deep&&n.length){for(i=0,o=n.length;o>i;i++)r(n[i]);s&&(b=a)}}function o(n){var r;return nt(a(n.parentNode).reverse(),function(n){var i;r||"_start"==n.id||"_end"==n.id||(i=v(n,e,t),i&&i.split!==!1&&(r=n))}),r}function s(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=z.clone(o,Y),c=0;c=0;o--){if(s=t[o].selector,!s||t[o].defaultBlock)return X;for(i=r.length-1;i>=0;i--)if(z.is(r[i],s))return X}return Y}function x(e,t,n){var r;return J||(J={},r={},i.on("NodeChange",function(e){var t=a(e.element),n={};nt(J,function(e,i){nt(t,function(o){return v(o,i,{},e.similar)?(r[i]||(nt(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):void 0})}),nt(r,function(i,o){n[o]||(delete r[o],nt(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),nt(e.split(","),function(e){J[e]||(J[e]=[],J[e].similar=n),J[e].push(t)}),this}function w(e){return r.getCssText(i,e)}function _(e,t){return N(e,t.inline)?X:N(e,t.block)?X:t.selector?1==e.nodeType&&z.is(e,t.selector):void 0}function N(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function E(e,t){return S(z.getStyle(e,t),t)}function S(e,t){return("color"==t||"backgroundColor"==t)&&(e=z.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function k(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function T(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function R(e,t,n){var r=z.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function A(t,n,r){function s(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=z.getRoot(),3==r.nodeType&&!T(r)&&(e?v>0:bi?n:i,-1===n||r||n++):(n=a.indexOf(" ",t),i=a.indexOf("\xa0",t),n=-1!==n&&(-1===i||i>n)?n:i),n}var s,l,c,u;if(3===t.nodeType){if(c=a(t,n),-1!==c)return{container:t,offset:c};u=t}for(s=new e(t,z.getParent(t,q)||i.getBody());l=s[o?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=a(l),-1!==c)return{container:l,offset:c}}else if(q(l))break;return u?(n=o?0:u.length,{container:u,offset:n}):void 0}function d(e,r){var i,o,s,l;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=a(e),o=0;op?p:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(p=y.childNodes.length-1,y=y.childNodes[b>p?p:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=c(g),y=c(y),(M(g.parentNode)||M(g))&&(g=M(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(M(y.parentNode)||M(y))&&(y=M(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=u(g,v,!0),m&&(g=m.container,v=m.offset),m=u(y,b),m&&(y=m.container,b=m.offset)),h=l(y,b),h.node)){for(;h.node&&0===h.offset&&h.node.previousSibling;)h=l(h.node.previousSibling);h.node&&h.offset>0&&3===h.node.nodeType&&" "===h.node.nodeValue.charAt(h.offset-1)&&h.offset>1&&(y=h.node,y.splitText(h.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=s(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=s())),n[0].selector&&n[0].expand!==Y&&!n[0].inline&&(g=d(g,"previousSibling"),y=d(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(q(g)||(g=s(!0)),q(y)||(y=s()))),1==g.nodeType&&(v=j(g),g=g.parentNode),1==y.nodeType&&(b=j(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function B(e,t,n,r){var i,o,a;if(!_(n,e))return Y;if("all"!=e.remove)for(nt(e.styles,function(e,i){e=S(k(e,t),i),"number"==typeof i&&(i=e,r=0),(!r||N(E(r,i),e))&&z.setStyle(n,i,""),a=1}),a&&""===z.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),nt(e.attributes,function(e,i){var o;if(e=k(e,t),"number"==typeof i&&(i=e,r=0),!r||N(z.getAttrib(r,i),e)){if("class"==i&&(e=z.getAttrib(n,i),e&&(o="",nt(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void z.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),G.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),nt(e.classes,function(e){e=k(e,t),(!r||z.hasClass(r,e))&&z.removeClass(n,e)}),o=z.getAttribs(n),i=0;ia?a:o]),3===r.nodeType&&n&&o>=r.nodeValue.length&&(r=new e(r,i.getBody()).next()||r),3!==r.nodeType||n||0!==o||(r=new e(r,i.getBody()).prev()||r),r}function O(t,n,r){function a(e){var t=z.create("span",{id:y,"data-mce-bogus":!0,style:b?"color:red":""});return e&&t.appendChild(i.getDoc().createTextNode(K)),t}function s(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==K||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function l(e){for(;e;){if(e.id===y)return e;e=e.parentNode}}function c(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=W.getRng(!0),s(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),z.remove(e)):(n=c(e),n.nodeValue.charAt(0)===K&&(n=n.deleteData(0,1)),z.remove(e,1)),W.setRng(r);else if(e=l(W.getStart()),!e)for(;e=z.get(y);)d(e,!1)}function f(){var e,t,i,o,s,d,f;e=W.getRng(!0),o=e.startOffset,d=e.startContainer,f=d.nodeValue,t=l(W.getStart()),t&&(i=c(t)),f&&o>0&&o=0;p--)c.appendChild(z.clone(f[p],!1)),c=c.firstChild;c.appendChild(z.doc.createTextNode(K)),c=c.firstChild;var g=z.getParent(d,o);g&&z.isEmpty(g)?d.parentNode.replaceChild(h,d):z.insertAfter(h,d),W.setCursorLocation(c,1),z.isEmpty(d)&&z.remove(d)}}function g(){var e;e=l(W.getStart()),e&&!z.isEmpty(e)&&it(e,function(e){1!=e.nodeType||e.id===y||z.isEmpty(e)||z.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var y="_mce_caret",b=i.settings.caret_debug;i._hasCaretEvents||(tt=function(){var e=[],t;if(s(l(W.getStart()),e))for(t=e.length;t--;)z.setAttrib(e[t],"data-mce-bogus","1")},et=function(e){var t=e.keyCode;d(),(8==t||37==t||39==t)&&d(l(W.getStart())),g()},i.on("SetContent",function(e){e.selection&&g()}),i._hasCaretEvents=!0),"apply"==t?f():p()}function I(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if(3==n.nodeType&&r>=n.nodeValue.length&&(r=j(n),n=n.parentNode,i=!0),1==n.nodeType)for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,z.getParent(n,z.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!T(a))return l=z.create("a",null,K),a.parentNode.insertBefore(l,a),t.setStart(a,0),W.setRng(t),void z.remove(l)}var F={},z=i.dom,W=i.selection,V=new t(z),U=i.schema.isValidChild,q=z.isBlock,$=i.settings.forced_root_block,j=z.nodeIndex,K="\ufeff",G=/^(src|href|style)$/,Y=!1,X=!0,J,Q,Z=z.getContentEditable,et,tt,nt=n.each,rt=n.grep,it=n.walk,ot=n.extend;ot(this,{get:u,register:d,apply:h,remove:m,toggle:g,match:y,matchAll:b,matchNode:v,canApply:C,formatChanged:x,getCssText:w}),l(),c(),i.on("BeforeGetContent",function(){tt&&tt()}),i.on("mouseup keydown",function(e){et&&et(e)})}}),r(H,[g,p],function(e,t){var n=t.trim,r;return r=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","]+data-mce-bogus[^>]+><\\/div>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(t){function i(){return n(t.getContent({format:"raw",no_events:1}).replace(r,""))}function o(e){a.typing=!1,a.add({},e)}var a=this,s=0,l=[],c,u,d=0;return t.on("init",function(){a.add()}),t.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&a.beforeChange()}),t.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o(e)}),t.on("ObjectResizeStart",function(){a.beforeChange()}),t.on("SaveContent ObjectResized blur",o),t.on("DragEnd",o),t.on("KeyUp",function(n){var r=n.keyCode;(r>=33&&36>=r||r>=37&&40>=r||45==r||13==r||n.ctrlKey)&&(o(),t.nodeChanged()),(46==r||8==r||e.mac&&(91==r||93==r))&&t.nodeChanged(),u&&a.typing&&(t.isDirty()||(t.isNotDirty=!l[0]||i()==l[0].content,t.isNotDirty||t.fire("change",{level:l[0],lastLevel:null})),t.fire("TypingUndo"),u=!1,t.nodeChanged())}),t.on("KeyDown",function(e){var t=e.keyCode;return t>=33&&36>=t||t>=37&&40>=t||45==t?void(a.typing&&o(e)):void((16>t||t>20)&&224!=t&&91!=t&&!a.typing&&(a.beforeChange(),a.typing=!0,a.add({},e),u=!0))}),t.on("MouseDown",function(e){a.typing&&o(e)}),t.addShortcut("ctrl+z","","Undo"),t.addShortcut("ctrl+y,ctrl+shift+z","","Redo"),t.on("AddUndo Undo Redo ClearUndos MouseUp",function(e){e.isDefaultPrevented()||t.nodeChanged()}),a={data:l,typing:!1,beforeChange:function(){d||(c=t.selection.getBookmark(2,!0))},add:function(e,n){var r,o=t.settings,a;if(e=e||{},e.content=i(),d||t.removed)return null;if(a=l[s],t.fire("BeforeAddUndo",{level:e,lastLevel:a,originalEvent:n}).isDefaultPrevented())return null;if(a&&a.content==e.content)return null;if(l[s]&&(l[s].beforeBookmark=c),o.custom_undo_redo_levels&&l.length>o.custom_undo_redo_levels){for(r=0;r0&&(t.isNotDirty=!1,t.fire("change",u)),e},undo:function(){var e;return a.typing&&(a.add(),a.typing=!1),s>0&&(e=l[--s],0===s&&(t.isNotDirty=!0),t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(e.beforeBookmark),t.fire("undo",{level:e})),e},redo:function(){var e;return s0||a.typing&&l[0]&&i()!=l[0].content},hasRedo:function(){return sD)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}function g(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function v(e){var t=R,n,i,o;if(e||"TABLE"==O?(n=a.create(e||F),g(n)):n=B.cloneNode(!1),o=n,l.keep_styles!==!1)do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U|VAR|CITE|DFN|CODE|MARK|Q|SUP|SUB|SAMP)$/.test(t.nodeName)){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while(t=t.parentNode);return r||(o.innerHTML='
'),n}function y(t){var n,r,i;if(3==R.nodeType&&(t?A>0:A0)return!0}function w(){var e,t,n;R&&3==R.nodeType&&A>=R.nodeValue.length&&(r||x()||(e=a.create("br"),S.insertNode(e),S.setStartAfter(e),S.setEndAfter(e),t=!0)),e=a.create("br"),S.insertNode(e),r&&"PRE"==O&&(!D||8>D)&&e.parentNode.insertBefore(a.doc.createTextNode("\r"),e),n=a.create("span",{}," "),e.parentNode.insertBefore(n,e),s.scrollIntoView(n),a.remove(n),t?(S.setStartBefore(e),S.setEndBefore(e)):(S.setStartAfter(e),S.setEndAfter(e)),s.setRng(S),c.add()}function _(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function N(e){var t=a.getRoot(),n,r;for(n=e;n!==t&&"false"!==a.getContentEditable(n);)"true"===a.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==t?r:t}function E(e){var t;r||(e.normalize(),t=e.lastChild,(!t||/^(left|right)$/gi.test(a.getStyle(t,"float",!0)))&&a.add(e,"br"))}var S,k,T,R,A,B,D,L,M,H,P,O,I,F,z;if(S=s.getRng(!0),!o.isDefaultPrevented()){if(!S.collapsed)return void i.execCommand("Delete");if(new t(a).normalize(S),R=S.startContainer,A=S.startOffset,F=(l.force_p_newlines?"p":"")||l.forced_root_block,F=F?F.toUpperCase():"",D=a.doc.documentMode,L=o.shiftKey,1==R.nodeType&&R.hasChildNodes()&&(z=A>R.childNodes.length-1,R=R.childNodes[Math.min(A,R.childNodes.length-1)]||R,A=z&&3==R.nodeType?R.nodeValue.length:0),T=N(R)){if(c.beforeChange(),!a.isBlock(T)&&T!=a.getRoot())return void((!F||L)&&w());if((F&&!L||!F&&L)&&(R=b(R,A)),B=a.getParent(R,a.isBlock),P=B?a.getParent(B.parentNode,a.isBlock):null,O=B?B.nodeName.toUpperCase():"",I=P?P.nodeName.toUpperCase():"","LI"!=I||o.ctrlKey||(B=P,O=I),"LI"==O){if(!F&&L)return void w();if(a.isEmpty(B))return void C()}if("PRE"==O&&l.br_in_pre!==!1){if(!L)return void w()}else if(!F&&!L&&"LI"!=O||F&&L)return void w();F&&B===i.getBody()||(F=F||"P",y()?(M=/^(H[1-6]|PRE|FIGURE)$/.test(O)&&"HGROUP"!=I?v(F):v(),l.end_container_on_empty_block&&f(P)&&a.isEmpty(B)?M=a.split(P,B):a.insertAfter(M,B),m(M)):y(!0)?(M=B.parentNode.insertBefore(v(),B),p(M),m(B)):(k=S.cloneRange(),k.setEndAfter(B),H=k.extractContents(),_(H),M=H.firstChild,a.insertAfter(H,B),h(M),E(B),m(M)),a.setAttrib(M,"id",""),i.fire("NewBlock",{newBlock:M}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(O,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,p,h,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){h=t,t=t.nextSibling,r.remove(h);continue}p||(p=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(p,t),g=!0),h=t,t=t.nextSibling,p.appendChild(h)}else p=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(I,[S,g,p],function(e,n,r){var i=r.each,o=r.extend,a=r.map,s=r.inArray,l=r.explode,c=n.gecko,u=n.ie,d=!0,f=!1;return function(r){function p(e,t,n){var r;return e=e.toLowerCase(),(r=N.exec[e])?(r(e,t,n),d):f}function h(e){var t;return e=e.toLowerCase(),(t=N.state[e])?t(e):-1}function m(e){var t;return e=e.toLowerCase(),(t=N.value[e])?t(e):f}function g(e,t){t=t||"exec",i(e,function(e,n){i(n.toLowerCase().split(","),function(n){N[t][n]=e})})}function v(e,n,i){return n===t&&(n=f),i===t&&(i=null),r.getDoc().execCommand(e,n,i)}function y(e){return S.match(e)}function b(e,n){S.toggle(e,n?{value:n}:t),r.nodeChanged()}function C(e){k=_.getBookmark(e)}function x(){_.moveToBookmark(k)}var w=r.dom,_=r.selection,N={state:{},exec:{},value:{}},E=r.settings,S=r.formatter,k;o(this,{execCommand:p,queryCommandState:h,queryCommandValue:m,addCommands:g}),g({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{v(e)}catch(o){i=d}if(i||!t.queryCommandSupported(e)){var a=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");n.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),r.windowManager.alert(a)}},unlink:function(){if(_.isCollapsed()){var e=_.getNode();return void("A"==e.tagName&&r.dom.remove(e,!0))}S.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);"full"==t&&(t="justify"),i("left,center,right,justify".split(","),function(e){t!=e&&S.remove("align"+e)}),b("align"+t),p("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;v(e),t=w.getParent(_.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(C(),w.split(n,t),x()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){b(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){b(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=l(E.font_size_style_values),r=l(E.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),b(e,n)},RemoveFormat:function(e){S.remove(e)},mceBlockQuote:function(){b("blockquote")},FormatBlock:function(e,t,n){return b(n||"p")},mceCleanup:function(){var e=_.getBookmark();r.setContent(r.getContent({cleanup:d}),{cleanup:d}),_.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||_.getNode();i!=r.getBody()&&(C(),r.dom.remove(i,d),x())},mceSelectNodeDepth:function(e,t,n){var i=0;w.getParent(_.getNode(),function(e){return 1==e.nodeType&&i++==n?(_.select(e),f):void 0},r.getBody())},mceSelectNode:function(e,t,n){_.select(n)},mceInsertContent:function(t,n,i){function o(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=_.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
|)$/," "))),e}var a,s,l,c,d,f,p,h,m,g,v;/^ | $/.test(i)&&(i=o(i)),a=r.parser,s=new e({},r.schema),v='ÈB;',f={content:i,format:"html",selection:!0},r.fire("BeforeSetContent",f),i=f.content,-1==i.indexOf("{$caret}")&&(i+="{$caret}"),i=i.replace(/\{\$caret\}/,v),h=_.getRng();var y=h.startContainer||(h.parentElement?h.parentElement():null),b=r.getBody();y===b&&_.isCollapsed()&&w.isBlock(b.firstChild)&&w.isEmpty(b.firstChild)&&(h=w.createRng(),h.setStart(b.firstChild,0),h.setEnd(b.firstChild,0),_.setRng(h)),_.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),l=_.getNode();var C={context:l.nodeName.toLowerCase()};if(d=a.parse(i,C),m=d.lastChild,"mce_marker"==m.attr("id"))for(p=m,m=m.prev;m;m=m.walk(!0))if(3==m.type||!w.isBlock(m.name)){m.parent.insert(p,m,"br"===m.name);break}if(C.invalid){for(_.setContent(v),l=_.getNode(),c=r.getBody(),9==l.nodeType?l=m=c:m=l;m!==c;)l=m,m=m.parentNode;i=l==c?c.innerHTML:w.getOuterHTML(l),i=s.serialize(a.parse(i.replace(//i,function(){return s.serialize(d)}))),l==c?w.setHTML(c,i):w.setOuterHTML(l,i)}else i=s.serialize(d),m=l.firstChild,g=l.lastChild,!m||m===g&&"BR"===m.nodeName?w.setHTML(l,i):_.setContent(i);p=w.get("mce_marker"),_.scrollIntoView(p),h=w.createRng(),m=p.previousSibling,m&&3==m.nodeType?(h.setStart(m,m.nodeValue.length),u||(g=p.nextSibling,g&&3==g.nodeType&&(m.appendData(g.data),g.parentNode.removeChild(g)))):(h.setStartBefore(p),h.setEndBefore(p)),w.remove(p),_.setRng(h),r.fire("SetContent",f),r.addVisual()},mceInsertRawHTML:function(e,t,n){_.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){b(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,o;t=E.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),h("InsertUnorderedList")||h("InsertOrderedList")?v(e):(E.forced_root_block||w.getParent(_.getNode(),w.isBlock)||S.apply("div"),i(_.getSelectedBlocks(),function(i){if("LI"!=i.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==w.getStyle(i,"direction",!0)?"Right":"Left","outdent"==e?(o=Math.max(0,parseInt(i.style[a]||0,10)-t),w.setStyle(i,a,o?o+n:"")):(o=parseInt(i.style[a]||0,10)+t+n,w.setStyle(i,a,o))}}))},mceRepaint:function(){if(c)try{C(d),_.getSel()&&_.getSel().selectAllChildren(r.getBody()),_.collapse(d),x()}catch(e){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"
")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,_.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=w.getParent(_.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||S.remove("link"),n.href&&S.apply("link",n,r)},selectAll:function(){var e=w.getRoot(),t;_.getRng().setStart?(t=w.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),_.setRng(t)):(t=_.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){v("Delete");var e=r.getBody();w.isEmpty(e)&&(r.setContent(""),e.firstChild&&w.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")}}),g({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=_.isCollapsed()?[w.getParent(_.getNode(),w.isBlock)]:_.getSelectedBlocks(),r=a(n,function(e){return!!S.matchNode(e,t)});return-1!==s(r,d)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return y(e)},mceBlockQuote:function(){return y("blockquote")},Outdent:function(){var e;if(E.inline_styles){if((e=w.getParent(_.getStart(),w.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return d;if((e=w.getParent(_.getEnd(),w.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return d +}return h("InsertUnorderedList")||h("InsertOrderedList")||!E.inline_styles&&!!w.getParent(_.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=w.getParent(_.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),g({"FontSize,FontName":function(e){var t=0,n;return(n=w.getParent(_.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),g({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(F,[p],function(e){function t(e,i){var o=this,a,s;if(e=r(e),i=o.settings=i||{},/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(o.source=e);var l=0===e.indexOf("//");0!==e.indexOf("/")||l||(e=(i.base_uri?i.base_uri.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(s=i.base_uri?i.base_uri.path:new t(location.href).directory,e=""===i.base_uri.protocol?"//mce_host"+o.toAbsPath(s,e):(i.base_uri&&i.base_uri.protocol||"http")+"://mce_host"+o.toAbsPath(s,e)),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),o[t]=r}),a=i.base_uri,a&&(o.protocol||(o.protocol=a.protocol),o.userInfo||(o.userInfo=a.userInfo),o.port||"mce_host"!==o.host||(o.port=a.port),o.host&&"mce_host"!==o.host||(o.host=a.host),o.source=""),l&&(o.protocol="")}var n=e.each,r=e.trim,i={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=i[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t}),r(z,[p],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){t=t;for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],u[d]="function"==typeof f&&c[d]?s(d,f):f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(W,[p],function(e){function t(e){function t(){return!1}function n(){return!0}function r(r,i){var o,a,s,u;if(r=r.toLowerCase(),i=i||{},i.type=r,i.target||(i.target=l),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=n},i.stopPropagation=function(){i.isPropagationStopped=n},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=n},i.isDefaultPrevented=t,i.isPropagationStopped=t,i.isImmediatePropagationStopped=t),e.beforeFire&&e.beforeFire(i),o=c[r])for(a=0,s=o.length;s>a;a++){if(o[a]=u=o[a],i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(u.call(l,i)===!1)return i.preventDefault(),i}return i}function i(e,n,r){var i,o,a;if(n===!1&&(n=t),n)for(o=e.toLowerCase().split(" "),a=o.length;a--;)e=o[a],i=c[e],i||(i=c[e]=[],u(e,!0)),r?i.unshift(n):i.push(n);return s}function o(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=c[e],!e){for(i in c)u(i,!1),delete c[i];return s}if(r){if(t)for(a=r.length;a--;)r[a]===t&&r.splice(a,1);else r.length=0;r.length||(u(e,!1),delete c[e])}}else{for(e in c)u(e,!1);c={}}return s}function a(e){return e=e.toLowerCase(),!(!c[e]||0===c[e].length)}var s=this,l,c={},u;e=e||{},l=e.scope||s,u=e.toggleEvent||t,s.fire=r,s.on=i,s.off=o,s.has=a}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(V,[z],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.hasClass(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.psuedo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,p,h;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,h=e,p=0,i=o-1;i>=0;i--)for(c=a[i];h;){if(c.psuedo)for(f=h.parent().items(),u=d=f.length;u--&&f[u]!==h;);for(s=0,l=c.length;l>s;s++)if(!c[s](h,u,d)){s=l+1;break}if(s===l){p++;break}if(i===o-1)break;h=h.parent()}if(p===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(U,[p,V,z],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].hasClass(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this}},e.each("fire on off show hide addClass removeClass append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(q,[p,y],function(e,t){return{id:function(){return t.DOM.uniqueId()},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r($,[z,p,W,U,q],function(e,t,n,r,i){function o(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e._rendered&&e.bindPendingEvents())}})),e._eventDispatcher}var a={},s="onmousewheel"in document,l=!1,c="mce-",u=e.extend({Statics:{elementIdCache:a,classPrefix:c},isRtl:function(){return u.rtl},classPrefix:c,init:function(e){var n=this,r,o;if(n.settings=e=t.extend({},n.Defaults,e),n._id=e.id||i.id(),n._text=n._name="",n._width=n._height=0,n._aria={role:e.role},r=e.classes)for(r=r.split(" "),r.map={},o=r.length;o--;)r.map[r[o]]=!0;n._classes=r||[],n.visible(!0),t.each("title text width height name classes visible disabled active value".split(" "),function(t){var r=e[t],i;r!==i?n[t](r):n["_"+t]===i&&(n["_"+t]=!1)}),n.on("click",function(){return n.disabled()?!1:void 0}),e.classes&&t.each(e.classes.split(" "),function(e){n.addClass(e)}),n.settings=e,n._borderBox=n.parseBox(e.border),n._paddingBox=n.parseBox(e.padding),n._marginBox=n.parseBox(e.margin),e.hidden&&n.hide()},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},borderBox:function(){return this._borderBox},paddingBox:function(){return this._paddingBox},marginBox:function(){return this._marginBox},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}},initLayoutRect:function(){var e=this,t=e.settings,n,r,o=e.getEl(),a,s,l,c,u,d,f,p;n=e._borderBox=e._borderBox||e.measureBox(o,"border"),e._paddingBox=e._paddingBox||e.measureBox(o,"padding"),e._marginBox=e._marginBox||e.measureBox(o,"margin"),p=i.getSize(o),d=t.minWidth,f=t.minHeight,l=d||p.width,c=f||p.height,a=t.width,s=t.height,u=t.autoResize,u="undefined"!=typeof u?u:!a&&!s,a=a||l,s=s||c;var h=n.left+n.right,m=n.top+n.bottom,g=t.maxWidth||65535,v=t.maxHeight||65535;return e._layoutRect=r={x:t.x||0,y:t.y||0,w:a,h:s,deltaW:h,deltaH:m,contentW:a-h,contentH:s-m,innerW:a-h,innerH:s-m,startMinWidth:d||0,startMinHeight:f||0,minW:Math.min(l,g),minH:Math.min(c,v),maxW:g,maxH:v,autoResize:u,scrollW:0},e._lastLayoutRect={},r},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=in.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h)&&(l=u.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o=0,a=0,s,l;l=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,r=e._layoutRect,s=e._lastRepaintRect||{},i=e._borderBox,o=i.left+i.right,a=i.top+i.bottom,r.x!==s.x&&(t.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(t.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(t.width=l(r.w-o)+"px",s.w=r.w),r.h!==s.h&&(t.height=l(r.h-a)+"px",s.h=r.h),e._hasBody&&r.innerW!==s.innerW&&(n=e.getEl("body").style,n.width=l(r.innerW)+"px",s.innerW=r.innerW),e._hasBody&&r.innerH!==s.innerH&&(n=n||e.getEl("body").style,n.height=l(r.innerH)+"px",s.innerH=r.innerH),e._lastRepaintRect=s,e.fire("repaint",{},!1)},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t.call(n,i)}}var r=this;return o(r).on(e,n(t)),r},off:function(e,t){return o(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=o(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return o(this).has(e)},parents:function(e){var t=this,n,i=new r;for(n=t.parent();n;n=n.parent())i.add(n);return e&&(i=i.filter(e)),i},parentsAndSelf:function(e){return new r(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},findCommonAncestor:function(e,t){for(var n;e;){for(n=t;n&&e!=n;)n=n.parent();if(e==n)break;e=e.parent()}return e},hasClass:function(e,t){var n=this._classes[t||"control"];return e=this.classPrefix+e,n&&!!n.map[e]},addClass:function(e,t){var n=this,r,i;return e=this.classPrefix+e,r=n._classes[t||"control"],r||(r=[],r.map={},n._classes[t||"control"]=r),r.map[e]||(r.map[e]=e,r.push(e),n._rendered&&(i=n.getEl(t),i&&(i.className=r.join(" ")))),n},removeClass:function(e,t){var n=this,r,i,o;if(e=this.classPrefix+e,r=n._classes[t||"control"],r&&r.map[e])for(delete r.map[e],i=r.length;i--;)r[i]===e&&r.splice(i,1);return n._rendered&&(o=n.getEl(t),o&&(o.className=r.join(" "))),n},toggleClass:function(e,t,n){var r=this;return t?r.addClass(e,n):r.removeClass(e,n),r},classes:function(e){var t=this._classes[e||"control"];return t?t.join(" "):""},innerHtml:function(e){return i.innerHtml(this.getEl(),e),this},getEl:function(e,t){var n,r=e?this._id+"-"+e:this._id;return n=a[r]=(t===!0?null:a[r])||i.get(r)},visible:function(e){var t=this,n;return"undefined"!=typeof e?(t._visible!==e&&(t._rendered&&(t.getEl().style.display=e?"":"none"),t._visible=e,n=t.parent(),n&&(n._lastRect=null),t.fire(e?"show":"hide")),t):t._visible},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n._rendered&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return u.translate?u.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,o;if(e.items){var s=e.items().toArray();for(o=s.length;o--;)s[o].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&i.off(t);var l=e.getRoot().controlIdLookup;if(l&&delete l[e._id],delete a[e._id],t&&t.parentNode){var c=t.getElementsByTagName("*");for(o=c.length;o--;)delete a[c[o].id];t.parentNode.removeChild(t)}return e._rendered=!1,e},renderBefore:function(e){var t=this;return e.parentNode.insertBefore(i.createFragment(t.renderHtml()),e),t.postRender(),t},renderTo:function(e){var t=this;return e=e||t.getContainerElm(),e.appendChild(i.createFragment(t.renderHtml())),t.postRender(),t},postRender:function(){var e=this,t=e.settings,n,r,o,a,s;for(a in t)0===a.indexOf("on")&&e.on(a.substr(2),t[a]);if(e._eventsRoot){for(o=e.parent();!s&&o;o=o.parent())s=o._eventsRoot;if(s)for(a in s._nativeEvents)e._nativeEvents[a]=!0}e.bindPendingEvents(),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e._visible||i.css(e.getEl(),"display","none"),e.settings.border&&(r=e.borderBox(),i.css(e.getEl(),{"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var c in e._aria)e.aria(c,e._aria[c]);e.fire("postrender",{},!1)},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},bindPendingEvents:function(){function e(e){var t=o.getParentCtrl(e.target);t&&t.fire(e.type,e)}function t(){var e=d._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),d._lastHoverCtrl=null)}function n(e){var t=o.getParentCtrl(e.target),n=d._lastHoverCtrl,r=0,i,a,s;if(t!==n){if(d._lastHoverCtrl=t,a=t.parents().toArray().reverse(),a.push(t),n){for(s=n.parents().toArray().reverse(),s.push(n),r=0;r=r;i--)n=s[i],n.fire("mouseleave",{target:n.getEl()})}for(i=r;ia;a++)d=u[a]._eventsRoot;for(d||(d=u[u.length-1]||o),o._eventsRoot=d,c=a,a=0;c>a;a++)u[a]._eventsRoot=d;var h=d._delegates;h||(h=d._delegates={});for(p in f){if(!f)return!1;"wheel"!==p||l?("mouseenter"===p||"mouseleave"===p?d._hasMouseEnter||(i.on(d.getEl(),"mouseleave",t),i.on(d.getEl(),"mouseover",n),d._hasMouseEnter=1):h[p]||(i.on(d.getEl(),p,e),h[p]=!0),f[p]=!1):s?i.on(o.getEl(),"mousewheel",r):i.on(o.getEl(),"DOMMouseScroll",r)}}},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){return this.repaint(),this}});return u}),r(j,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(K,[],function(){return function(e){function t(e){return e=e||b,e&&e.getAttribute("role")}function n(e){for(var n,r=e||b;r=r.parentNode;)if(n=t(r))return n}function r(e){var t=b;return t?t.getAttribute("aria-"+e):void 0}function i(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t}function o(e){return i(e)&&!e.hidden?!0:/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(t(e))?!0:!1}function a(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){o(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function u(e,t){var n=-1,r=s();t=t||a(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r,i;t.parent(e),t._rendered||(r=e.getEl("body"),i=a.createFragment(t.renderHtml()),r.hasChildNodes()&&n<=r.childNodes.length-1?r.insertBefore(i,r.childNodes[n]):r.appendChild(i),t.postRender())}),e._layout.applyClasses(e),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t
'+(e.settings.html||"")+t.renderHtml(e)+"
"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e._rendered=!0,e.settings.style&&a.css(e.getEl(),e.settings.style),e.settings.border&&(t=e.borderBox(),a.css(e.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(Y,[q],function(e){function t(){var e=document,t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}return function(n,r){function i(){return a.getElementById(r.handle||n)}var o,a=document,s,l,c,u,d,f;r=r||{},l=function(n){var l=t(),p,h;n.preventDefault(),s=n.button,p=i(),d=n.screenX,f=n.screenY,h=window.getComputedStyle?window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,o=a.createElement("div"),e.css(o,{position:"absolute",top:0,left:0,width:l.width,height:l.height,zIndex:2147483647,opacity:1e-4,background:"red",cursor:h}),a.body.appendChild(o),e.on(a,"mousemove",u),e.on(a,"mouseup",c),r.start(n)},u=function(e){return e.button!==s?c(e):(e.deltaX=e.screenX-d,e.deltaY=e.screenY-f,e.preventDefault(),void r.drag(e))},c=function(t){e.off(a,"mousemove",u),e.off(a,"mouseup",c),o.parentNode.removeChild(o),r.stop&&r.stop(t)},this.destroy=function(){e.off(i())},e.on(i(),"mousedown",l)}}),r(X,[q,Y],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,p,h,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),i.getEl("absend")&&e.css(i.getEl("absend"),y,i.layoutRect()[l]-1),!c)return void e.css(f,"display","none");e.css(f,"display","block"),d=i.getEl("body"),p=i.getEl("scroll"+t+"t"),h=d["client"+s]-2*o,h-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=h/m,v={},v[y]=d["offset"+a]+o,v[b]=h,e.css(f,v),v={},v[y]=d["scroll"+a]*g,v[b]=h*g,e.css(p,v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;i.getEl().appendChild(e.createFragment('
')),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e.addClass(e.get(u),d+"active")},drag:function(e){var t,u,d,f,p=i.layoutRect();u=p.contentW>p.innerW,d=p.contentH>p.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e.removeClass(e.get(u),d+"active")}})}i.addClass("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e.on(i.getEl("body"),"scroll",n)),n())}}}),r(J,[G,X],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='
'+t.renderHtml(e)+"
":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
'+(e._preBodyHtml||"")+n+"
"}})}),r(Q,[q],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,p;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t._fixed&&(a-=f.x,s-=f.y),i=t.getEl(),p=e.getSize(i),l=p.width,c=p.height,p=e.getSize(n),u=p.width,d=p.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i._rendered?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Z,[q],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(et,[J,Q,Z,q],function(e,t,n,r){function i(e){var t;for(t=s.length;t--;)s[t]===e&&s.splice(t,1);for(t=l.length;t--;)l[t]===e&&l.splice(t,1)}var o,a,s=[],l=[],c,u=e.extend({Mixins:[t,n],init:function(e){function t(){var e,t=u.zIndex||65535,n;if(l.length)for(e=0;en&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY'),n=n.firstChild,d.getContainerElm().appendChild(n),setTimeout(function(){r.addClass(n,i+"in"),r.addClass(d.getEl(),i+"in")},0),c=!0),l.push(d),t()}}),d.on("close hide",function(e){if(e.control==d){for(var n=l.length;n--;)l[n]===d&&l.splice(n,1);t()}}),d.on("show",function(){d.parents().each(function(e){return e._fixed?(d.fixed(!0),!1):void 0})}),e.popover&&(d._preBodyHtml='
',d.addClass("popover").addClass("bottom").addClass(d.isRtl()?"end":"start"))},fixed:function(e){var t=this;if(t._fixed!=e){if(t._rendered){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.toggleClass("fixed",e),t._fixed=e}return t},show:function(){var e=this,t,n=e._super();for(t=s.length;t--&&s[t]!==e;);return-1===t&&s.push(e),n},hide:function(){return i(this),this._super()},hideAll:function(){u.hideAll()},close:function(){var e=this;return e.fire("close"),e.remove()},remove:function(){i(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return u.hideAll=function(){for(var e=s.length;e--;){var t=s[e];t&&t.settings.autohide&&(t.hide(),s.splice(e,1))}},u}),r(tt,[et,J,q,Y],function(e,t,n,r){var i=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.addClass("rtl"),n.addClass("window"),n._fixed=!0,e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.addClass("foot"),n.statusbar.parent(n)),n.on("click",function(e){-1!=e.target.className.indexOf(n.classPrefix+"close")&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,r,i,o,a;e._fullscreen&&(e.layoutRect(n.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),r=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=r.headerW,i>r.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=Math.max(0,a.w/2-t.w/2),t.y=Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='
'+e.encode(i.title)+'
'),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
'+o+'
'+s+"
"+a+"
"},fullscreen:function(e){var t=this,r=document.documentElement,i,o=t.classPrefix,a;if(e!=t._fullscreen)if(n.on(window,"resize",function(){var e;if(t._fullscreen)if(i)t._timer||(t._timer=setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(i=!0)}}),a=t.layoutRect(),t._fullscreen=e,e){t._initial={x:a.x,y:a.y,w:a.w,h:a.h},t._borderBox=t.parseBox("0"),t.getEl("head").style.display="none",a.deltaH-=a.headerH+2,n.addClass(r,o+"fullscreen"),n.addClass(document.body,o+"fullscreen"),t.addClass("fullscreen");var s=n.getWindowSize();t.moveTo(0,0).resizeTo(s.w,s.h)}else t._borderBox=t.parseBox(t.settings.border),t.getEl("head").style.display="",a.deltaH+=a.headerH,n.removeClass(r,o+"fullscreen"),n.removeClass(document.body,o+"fullscreen"),t.removeClass("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.addClass("in")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new r(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t=e.classPrefix;e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),e._fullscreen&&(n.removeClass(document.documentElement,t+"fullscreen"),n.removeClass(document.body,t+"fullscreen"))},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return i}),r(nt,[tt],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){var r,i=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}},{type:"button",text:"Cancel",onClick:function(e){e.control.parents()[1].close(),i(!1)}}];break;case t.YES_NO:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}];break;case t.YES_NO_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close()}}];break;default:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:r,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){i(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(rt,[tt,nt],function(e,t){return function(n){function r(){return o.length?o[o.length-1]:void 0}var i=this,o=[];i.windows=o,i.open=function(t,r){var i;return n.editorManager.activeEditor=n,t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),i=new e(t),o.push(i),i.on("close",function(){for(var e=o.length;e--;)o[e]===i&&o.splice(e,1);n.focus()}),t.data&&i.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),i.features=t||{},i.params=r||{},n.nodeChanged(),i.renderTo().reflow()},i.alert=function(e,r,i){t.alert(e,function(){r?r.call(i||this):n.focus()})},i.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})},i.close=function(){r()&&r().close()},i.getParams=function(){return r()?r().params:null},i.setParams=function(e){r()&&(r().params=e)},i.getWindows=function(){return o}}}),r(it,[R,B,x,m,g,p],function(e,t,n,r,i,o){return function(a){function s(e,t){try{a.getDoc().execCommand(e,!1,t)}catch(n){}}function l(){var e=a.getDoc().documentMode;return e?e:6}function c(e){return e.isDefaultPrevented()}function u(){function t(e){var t=new i(function(){});o.each(a.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&a.dom.setAttrib(e,"style",e.getAttribute("style"))}),t.observe(a.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),a.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null);var n=a.selection.getRng(),r=n.startContainer.parentNode;o.each(t.takeRecords(),function(e){if(q.isChildOf(e.target,a.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}o.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),q.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),a.selection.setRng(n))}})}}),t.disconnect(),o.each(a.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")})}var n=a.getDoc(),r="data:text/mce-internal,",i=window.MutationObserver,s,l;i||(s=!0,i=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),a.on("keydown",function(n){var r=n.keyCode==U,i=e.metaKeyPressed(n);if(!c(n)&&(r||n.keyCode==V)){var o=a.selection.getRng(),s=o.startContainer,l=o.startOffset;if(!i&&o.collapsed&&3==s.nodeType&&(r?l0))return;n.preventDefault(),i&&a.selection.getSel().modify("extend",r?"forward":"backward","word"),t(r)}}),a.on("keypress",function(n){c(n)||$.isCollapsed()||!n.charCode||e.metaKeyPressed(n)||(n.preventDefault(),t(!0),a.selection.setContent(String.fromCharCode(n.charCode)))}),a.addCommand("Delete",function(){t()}),a.addCommand("ForwardDelete",function(){t(!0)}),s||(a.on("dragstart",function(e){var t;a.selection.isCollapsed()&&"IMG"==e.target.tagName&&$.select(e.target),l=$.getRng(),t=a.selection.getContent(),t.length>0&&e.dataTransfer.setData("URL","data:text/mce-internal,"+escape(t))}),a.on("drop",function(e){if(!c(e)){var i=e.dataTransfer.getData("URL");if(!i||-1==i.indexOf(r)||!n.caretRangeFromPoint)return;i=unescape(i.substr(r.length)),n.caretRangeFromPoint&&(e.preventDefault(),window.setTimeout(function(){var r=n.caretRangeFromPoint(e.x,e.y);l&&($.setRng(l),l=null),t(),$.setRng(r),a.insertContent(i)},0))}}),a.on("cut",function(e){!c(e)&&e.clipboardData&&(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",a.selection.getContent()),e.clipboardData.setData("text/plain",a.selection.getContent({format:"text"})),t(!0))}))}function d(){function e(e){var t=q.create("body"),n=e.cloneContents();return t.appendChild(n),$.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(a.getBody()),t.compareRanges(n,r)}var i=e(n),o=q.createRng();o.selectNode(a.getBody());var s=e(o);return i===s}a.on("keydown",function(e){var t=e.keyCode,r,i;if(!c(e)&&(t==U||t==V)){if(r=a.selection.isCollapsed(),i=a.getBody(),r&&!q.isEmpty(i))return;if(!r&&!n(a.selection.getRng()))return;e.preventDefault(),a.setContent(""),i.firstChild&&q.isBlock(i.firstChild)?a.selection.setCursorLocation(i.firstChild,0):a.selection.setCursorLocation(i,0),a.nodeChanged()}})}function f(){a.on("keydown",function(t){!c(t)&&65==t.keyCode&&e.metaKeyPressed(t)&&(t.preventDefault(),a.execCommand("SelectAll"))})}function p(){a.settings.content_editable||(q.bind(a.getDoc(),"focusin",function(){$.setRng($.getRng())}),q.bind(a.getDoc(),"mousedown",function(e){e.target==a.getDoc().documentElement&&(a.getBody().focus(),$.setRng($.getRng()))}))}function h(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===V&&$.isCollapsed()&&0===$.getRng(!0).startOffset){var t=$.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return q.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(q.remove(n),e.preventDefault())}})}function m(){window.Range.prototype.getClientRects||a.on("mousedown",function(e){if(!c(e)&&"HTML"===e.target.nodeName){var t=a.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function g(){a.on("click",function(e){e=e.target,/^(IMG|HR)$/.test(e.nodeName)&&$.getSel().setBaseAndExtent(e,0,e,1),"A"==e.nodeName&&q.hasClass(e,"mce-item-anchor")&&$.select(e),a.nodeChanged()})}function v(){function e(){var e=q.getAttribs($.getStart().cloneNode(!1));return function(){var t=$.getStart();t!==a.getBody()&&(q.setAttrib(t,"style",null),W(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!$.isCollapsed()&&q.getParent($.getStart(),q.isBlock)!=q.getParent($.getEnd(),q.isBlock)}a.on("keypress",function(n){var r;return c(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),a.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),q.bind(a.getDoc(),"cut",function(n){var r;!c(n)&&t()&&(r=e(),setTimeout(function(){r()},0))})}function y(){var e,n;a.on("selectionchange",function(){n&&(clearTimeout(n),n=0),n=window.setTimeout(function(){if(!a.removed){var n=$.getRng();e&&t.compareRanges(n,e)||(a.nodeChanged(),e=n)}},50)})}function b(){document.body.setAttribute("role","application")}function C(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===V&&$.isCollapsed()&&0===$.getRng(!0).startOffset){var t=$.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function x(){l()>7||(s("RespectVisibilityInDesign",!0),a.contentStyles.push(".mceHideBrInPre pre br {display: none}"),q.addClass(a.getBody(),"mceHideBrInPre"),K.addNodeFilter("pre",function(e){for(var t=e.length,r,i,o,a;t--;)for(r=e[t].getAll("br"),i=r.length;i--;)o=r[i],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new n("#text",3),o,!0).value="\n"}),G.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function w(){q.bind(a.getBody(),"mouseup",function(){var e,t=$.getNode();"IMG"==t.nodeName&&((e=q.getStyle(t,"width"))&&(q.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"width","")),(e=q.getStyle(t,"height"))&&(q.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"height","")))})}function _(){a.on("keydown",function(t){var n,r,i,o,s;if(!c(t)&&t.keyCode==e.BACKSPACE&&(n=$.getRng(),r=n.startContainer,i=n.startOffset,o=q.getRoot(),s=r,n.collapsed&&0===i)){for(;s&&s.parentNode&&s.parentNode.firstChild==s&&s.parentNode!=o;)s=s.parentNode;"BLOCKQUOTE"===s.tagName&&(a.formatter.toggle("blockquote",null,s),n=q.createRng(),n.setStart(r,0),n.setEnd(r,0),$.setRng(n))}})}function N(){function e(){a._refreshContentEditable(),s("StyleWithCSS",!1),s("enableInlineTableEditing",!1),j.object_resizing||s("enableObjectResizing",!1)}j.readonly||a.on("BeforeExecCommand MouseDown",e)}function E(){function e(){W(q.select("a"),function(e){var t=e.parentNode,n=q.getRoot();if(t.lastChild===e){for(;t&&!q.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}q.add(t,"br",{"data-mce-bogus":1})}})}a.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&e()})}function S(){j.forced_root_block&&a.on("init",function(){s("DefaultParagraphSeparator",j.forced_root_block)})}function k(){a.on("Undo Redo SetContent",function(e){e.initial||a.execCommand("mceRepaint")})}function T(){a.on("keydown",function(e){var t;c(e)||e.keyCode!=V||(t=a.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),a.undoManager.beforeChange(),q.remove(t.item(0)),a.undoManager.add()))})}function R(){var e;l()>=10&&(e="",W("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),a.contentStyles.push(e+"{padding-right: 1px !important}"))}function A(){l()<9&&(K.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),G.addNodeFilter("noscript",function(e){for(var t=e.length,i,o,a;t--;)i=e[t],o=e[t].firstChild,o?o.value=r.decode(o.value):(a=i.attributes.map["data-mce-innertext"],a&&(i.attr("data-mce-innertext",null),o=new n("#text",3),o.value=a,o.raw=!0,i.append(o)))}))}function B(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),q.unbind(r,"mouseup",n),q.unbind(r,"mousemove",t),a=o=0}var r=q.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,q.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(q.bind(r,"mouseup",n),q.bind(r,"mousemove",t),q.getRoot().focus(),a.select())}})}function D(){a.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||$.normalize()},!0)}function L(){a.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function M(){a.inline||a.on("keydown",function(){document.activeElement==document.body&&a.getWin().focus()})}function H(){a.inline||(a.contentStyles.push("body {min-height: 150px}"),a.on("click",function(e){"HTML"==e.target.nodeName&&(a.getBody().focus(),a.selection.normalize(),a.nodeChanged())}))}function P(){i.mac&&a.on("keydown",function(t){!e.metaKeyPressed(t)||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),a.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","word"))})}function O(){s("AutoUrlDetect",!1)}function I(){a.inline||a.on("focus blur beforegetcontent",function(){var e=a.dom.create("br");a.getBody().appendChild(e),e.parentNode.removeChild(e)},!0)}function F(){a.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),a.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function z(){a.on("init",function(){a.dom.bind(a.getBody(),"submit",function(e){e.preventDefault()})})}var W=o.each,V=e.BACKSPACE,U=e.DELETE,q=a.dom,$=a.selection,j=a.settings,K=a.parser,G=a.serializer,Y=i.gecko,X=i.ie,J=i.webkit;C(),_(),d(),D(),J&&(u(),p(),g(),S(),z(),i.iOS?(y(),M(),H(),F()):f()),X&&i.ie<11&&(h(),b(),x(),w(),T(),R(),A(),B()),i.ie>=11&&(H(),I()),i.ie&&(f(),O()),Y&&(h(),m(),v(),N(),E(),k(),L(),P())}}),r(ot,[W],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(at,[ot,y,p],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop/.test(t)?e.getDoc():e.getBody()}function i(e,t){var n=e.settings.event_root,i=e.editorManager,a=i.eventRootElm||r(e,t);if(n){if(i.rootEvents||(i.rootEvents={},i.on("RemoveEditor",function(){i.activeEditor||(o.unbind(a),delete i.rootEvents)})),i.rootEvents[t])return;a==e.getBody()&&(a=o.select(n)[0],i.eventRootElm=a),i.rootEvents[t]=!0,o.bind(a,t,function(e){for(var n=e.target,r=i.editors,a=r.length;a--;){var s=r[a].getBody();(s===n||o.isChildOf(n,s))&&(r[a].hidden||r[a].fire(t,e))}})}else e.dom.bind(a,t,function(n){e.hidden||e.fire(t,n)})}var o=t.DOM,a={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;n.settings.readonly||"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.dom.unbind(r(n,e),e))}};return a=n.extend({},e,a)}),r(st,[p,g],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122};return function(o){var a=this,s={};o.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&n(s,function(n){var r=t.mac?e.metaKey:e.ctrlKey;if(n.ctrl==r&&n.alt==e.altKey&&n.shift==e.shiftKey)return e.keyCode==n.keyCode||e.charCode&&e.charCode==n.charCode?(e.preventDefault(),"keydown"==e.type&&n.func.call(n.scope),!0):void 0})}),a.add=function(t,a,l,c){var u;return u=l,"string"==typeof l?l=function(){o.execCommand(u,!1,null)}:e.isArray(u)&&(l=function(){o.execCommand(u[0],u[1],u[2])}),n(r(t.toLowerCase()),function(e){var t={func:l,scope:c||o,desc:o.translate(a),alt:!1,ctrl:!1,shift:!1};n(r(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":t[e]=!0;break;default:t.charCode=e.charCodeAt(0),t.keyCode=i[e]||e.toUpperCase().charCodeAt(0)}}),s[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t}),!0}}}),r(lt,[y,C,x,k,S,D,M,H,P,O,I,F,b,l,rt,w,N,it,g,p,at,st],function(e,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w){function _(e,t,r){var i=this,o,a;o=i.documentBaseUrl=r.documentBaseURL,a=r.baseURI,i.settings=t=k({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:i.convertURL,url_converter_scope:i,ie7_compat:!0},t),n.language=t.language||"en",n.languageLoad=t.language_load,n.baseURL=r.baseURL,i.id=t.id=e,i.isNotDirty=!0,i.plugins={},i.documentBaseURI=new f(t.document_base_url||o,{base_uri:a}),i.baseURI=a,i.contentCSS=[],i.contentStyles=[],i.shortcuts=new w(i),i.execCommands={},i.queryStateCommands={},i.queryValueCommands={},i.loadedCSS={},i.suffix=r.suffix,i.editorManager=r,i.inline=t.inline,r.fire("SetupEditor",i),i.execCallback("setup",i)}var N=e.DOM,E=n.ThemeManager,S=n.PluginManager,k=C.extend,T=C.each,R=C.explode,A=C.inArray,B=C.trim,D=C.resolve,L=h.Event,M=b.gecko,H=b.ie;return _.prototype={render:function(){function e(){N.unbind(window,"ready",e),n.render()}function t(){var e=p.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!E.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",E.load(r.theme,t)}C.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),T(r.external_plugins,function(e,t){S.load(t,e),r.plugins+=" "+t}),T(r.plugins.split(/[ ,]/),function(e){if(e=B(e),e&&!S.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=S.dependencies(e);T(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=S.createUrl(t,e),S.load(e.resource,e)})}else S.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!L.domLoaded)return void N.bind(window,"ready",e);if(n.getElement()&&b.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||N.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(N.insertAfter(N.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},N.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=!0,a._mceOldSubmit(a)})),n.windowManager=new m(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=N.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=S.get(n),i,o;i=S.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=B(n),r&&-1===A(m,n)&&(T(S.dependencies(n),function(t){e(t)}),o=new r(t,i),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n)))}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,p,h,m=[];if(t.rtl=this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||N.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=E.get(n.theme),t.theme=new c(t,E.urls[n.theme]),t.theme.init&&t.theme.init(t,E.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""))):t.theme=n.theme),T(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,p=/^[0-9\.]+(|px)$/i,p.test(""+i)&&(i=Math.max(parseInt(i,10),100)),p.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(N.setStyles(l.sizeContainer||l.editorContainer,{wi2dth:i,h2eight:o}),o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&T(R(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();for(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!b.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',h=0;h',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),t.iframeHTML+='
";var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';if(document.domain!=location.hostname&&(u=v),s=N.add(l.iframeContainer,"iframe",{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}}),H)try{t.getDoc()}catch(y){s.src=u=v}t.contentAreaContainer=l.iframeContainer,l.editorContainer&&(N.get(l.editorContainer).style.display=t.orgDisplay),N.get(t.id).style.display="none",N.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,o=n.settings,f=N.get(n.id),p=n.getDoc(),h,m;o.inline||(n.getElement().style.visibility=n.orgVisibility),t||o.content_editable||(p.open(),p.write(n.iframeHTML),p.close()),o.content_editable&&(n.on("remove",function(){var e=this.getBody();N.removeClass(e,"mce-content-body"),N.removeClass(e,"mce-edit-focus"),N.setAttrib(e,"contentEditable",null)}),N.addClass(f,"mce-content-body"),n.contentDocument=p=o.content_document||document,n.contentWindow=o.content_window||window,n.bodyElement=f,o.content_document=o.content_window=null,o.root_name=f.nodeName.toLowerCase()),h=n.getBody(),h.disabled=!0,o.readonly||(n.inline&&"static"==N.getStyle(h,"position",!0)&&(h.style.position="relative"),h.contentEditable=n.getParam("content_editable_state",!0)),h.disabled=!1,n.schema=new g(o),n.dom=new e(p,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:o.force_hex_style_colors,class_filter:o.class_filter,update_styles:!0,root_element:o.content_editable?n.id:null,collect:o.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e) +}}),n.parser=new v(o,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)i=e[r],a=i.attr(t),s="data-mce-"+t,i.attributes.map[s]||("style"===t?i.attr(s,o.serializeStyle(o.parseStyle(a),i.name)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name)))}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"text/javascript"))}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,i,o=n.schema.getNonEmptyElements();t--;)i=e[t],i.isEmpty(o)&&(i.empty().append(new r("br",1)).shortEnded=!0)}),n.serializer=new i(o,n),n.selection=new a(n.dom,n.getWin(),n.serializer,n),n.formatter=new s(n),n.undoManager=new l(n),n.forceBlocks=new u(n),n.enterKey=new c(n),n.editorCommands=new d(n),n.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(p.body.spellcheck=!1,N.setAttrib(h,"spellcheck","false")),n.fire("PostRender"),n.quirks=y(n),o.directionality&&(h.dir=o.directionality),o.nowrap&&(h.style.whiteSpace="nowrap"),o.protect&&n.on("BeforeSetContent",function(e){T(o.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),o.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.contentStyles.length>0&&(m="",T(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),T(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),o.auto_focus&&setTimeout(function(){var e=n.editorManager.get(o.auto_focus);e.selection.select(e.getBody(),1),e.selection.collapse(1),e.getBody().focus(),e.getWin().focus()},100),f=p=h=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n._refreshContentEditable(),i||(b.opera||n.getBody().focus(),n.getWin().focus()),M||i){if(l=n.getBody(),l.setActive)try{l.setActive()}catch(c){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.activeEditor!=n&&((t=n.editorManager.activeEditor)&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),n.editorManager.activeEditor=n},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?D(r):0,n=D(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?T(r.split(r.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){e=e.split("="),i[B(e[0])]=B(e.length>1?e[1]:e)}):i=r,i):r},nodeChanged:function(){var e=this,t=e.selection,n,r,i;!e.initialized||e.settings.disable_nodechange||e.settings.readonly||(i=e.getBody(),n=t.getStart()||i,n=H&&n.ownerDocument!=e.getDoc()?e.getBody():n,"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),r=[],e.dom.getParent(n,function(e){return e===i?!0:void r.push(e)}),e.fire("NodeChange",{element:n,parents:r}))},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){var i=this,o=0,a;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus||i.focus(),r=k({},r),r=i.fire("BeforeExecCommand",{command:e,ui:t,value:n}),r.isDefaultPrevented()?!1:(a=i.execCommands[e])&&a.func.call(a.scope,t,n)!==!0?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):(T(i.plugins,function(r){return r.execCommand&&r.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),o=!0,!1):void 0}),o?o:i.theme&&i.theme.execCommand&&i.theme.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):i.editorCommands.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):(i.getDoc().execCommand(e,t,n),void i.fire("ExecCommand",{command:e,ui:t,value:n})))},queryCommandState:function(e){var t=this,n,r;if(!t._isHidden()){if((n=t.queryStateCommands[e])&&(r=n.func.call(n.scope),r!==!0))return r;if(r=t.editorCommands.queryCommandState(e),-1!==r)return r;try{return t.getDoc().queryCommandState(e)}catch(i){}}},queryCommandValue:function(e){var n=this,r,i;if(!n._isHidden()){if((r=n.queryValueCommands[e])&&(i=r.func.call(r.scope),i!==!0))return i;if(i=n.editorCommands.queryCommandValue(e),i!==t)return i;try{return n.getDoc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(N.show(e.getContainer()),N.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(e.hidden=!0,H&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(N.hide(e.getContainer()),N.setStyle(e.id,"display",e.orgDisplay)),e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=N.getParent(t.id,"form"))&&T(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&(t.isNotDirty=!0),r},setContent:function(e,t){var n=this,r=n.getBody(),i;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=H&&11>H?"":'
',e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):H||(e='
'),r.innerHTML=e,n.fire("SetContent",t)):("raw"!==t.format&&(e=new o({},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=B(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),e.content="text"!=e.format?B(n):n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e){this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=N.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return N.get(this.settings.content_element||this.id)},getWin:function(){var e=this,t;return e.contentWindow||(t=N.get(e.id+"_ifr"),t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),T(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||(n.hasVisual?i.addClass(e,o):i.removeClass(e,o)));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&(n.hasVisual?i.addClass(e,o):i.removeClass(e,o))))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;if(!e.removed){e.removed=1,e.save(),e.hasHiddenInput&&N.remove(e.getElement().nextSibling),e.inline||(H&&10>H&&e.getDoc().execCommand("SelectAll",!1,null),N.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null,L.unbind(e.getWin()),L.unbind(e.getDoc()));var t=e.getContainer();L.unbind(e.getBody()),L.unbind(t),e.fire("remove"),e.editorManager.remove(e),N.remove(t),e.destroy()}},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e&&M&&(L.unbind(t.getDoc()),L.unbind(t.getWin()),L.unbind(t.getBody())),e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),N.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return M?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}},k(_.prototype,x),_}),r(ct,[],function(){var e={};return{rtl:!1,add:function(t,n){for(var r in n)e[r]=n[r];this.rtl=this.rtl||"rtl"===e._dir},translate:function(t){if("undefined"==typeof t)return t;if("string"!=typeof t&&t.raw)return t.raw;if(t.push){var n=t.slice(1);t=(e[t[0]]||t[0]).replace(/\{([^\}]+)\}/g,function(e,t){return n[t]})}return e[t]||t},data:e}}),r(ut,[y,g],function(e,t){function n(e){function s(){try{return document.activeElement}catch(e){return document.body}}function l(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function c(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function u(e){return!!a.getParent(e,n.isEditorUIElement)}function d(n){var d=n.editor;d.on("init",function(){(d.inline||t.ie)&&(d.on("nodechange keyup",function(){var e=document.activeElement;e&&e.id==d.id+"_ifr"&&(e=d.getBody()),d.dom.isChildOf(e,d.getBody())&&(d.lastRng=d.selection.getRng())}),t.webkit&&!r&&(r=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(d.lastRng=n)}},a.bind(document,"selectionchange",r)))}),d.on("setcontent",function(){d.lastRng=null}),d.on("mousedown",function(){d.selection.lastFocusBookmark=null}),d.on("focusin",function(){var t=e.focusedEditor;d.selection.lastFocusBookmark&&(d.selection.setRng(c(d,d.selection.lastFocusBookmark)),d.selection.lastFocusBookmark=null),t!=d&&(t&&t.fire("blur",{focusedEditor:d}),e.activeEditor=d,e.focusedEditor=d,d.fire("focus",{blurredEditor:t}),d.focus(!0)),d.lastRng=null}),d.on("focusout",function(){window.setTimeout(function(){var t=e.focusedEditor;u(s())||t!=d||(d.fire("blur",{focusedEditor:null}),e.focusedEditor=null,d.selection&&(d.selection.lastFocusBookmark=null))},0)}),i||(i=function(t){var n=e.activeEditor;n&&t.target.ownerDocument==document&&(n.selection&&(n.selection.lastFocusBookmark=l(n.dom,n.lastRng)),u(t.target)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},a.bind(document,"focusin",i)),d.inline&&!o&&(o=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},a.bind(document,"mouseup",o))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(a.unbind(document,"selectionchange",r),a.unbind(document,"focusin",i),a.unbind(document,"mouseup",o),r=i=o=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var r,i,o,a=e.DOM;return n.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},n}),r(dt,[lt,y,F,g,p,ot,ct,ut],function(e,t,n,r,i,o,a,s){function l(e){var t=g.editors,n;delete t[e.id];for(var r=0;r0&&f(d(c),function(n){u.get(n)?(m=new e(n,t,s),l.push(m),m.render()):f(document.forms,function(e){f(e.elements,function(e){e.name===n&&(n="mce_editor_"+h++,u.setAttrib(e,"id",n),r(n,t))})})});break;case"textareas":case"specific_textareas":f(u.select("textarea"),function(e){t.editor_deselector&&o(e,t.editor_deselector)||(!t.editor_selector||o(e,t.editor_selector))&&r(n(e),t)})}t.oninit&&(c=g=0,f(l,function(e){g++,e.initialized?c++:e.on("init",function(){c++,c==g&&i(t,"oninit")}),c==g&&i(t,"oninit")}))}var s=this,l=[],m;s.settings=t,u.bind(window,"ready",a)},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t.activeEditor=e,t.fire("AddEditor",{editor:e}),m||(m=function(){t.fire("BeforeUnload")},u.bind(window,"beforeunload",m)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void f(u.select(e),function(e){t.remove(r[e.id])})):(i=e,r[i.id]?(l(i)&&t.fire("RemoveEditor",{editor:i}),r.length||u.unbind(window,"beforeunload",m),i.remove(),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){f(this.editors,function(e){e.save()})},addI18n:function(e,t){a.add(e,t)},translate:function(e){return a.translate(e)}},p(g,o),g.setup(),window.tinymce=window.tinyMCE=g,g}),r(ft,[dt,p],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(t,n){e(n,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(pt,[],function(){return{send:function(e){function t(){!e.async||4==n.readyState||r++>1e4?(e.success&&1e4>r&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,r>1e4?"TIMED_OUT":"GENERAL",n,e),n=null):setTimeout(t,10)}var n,r=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",n=new XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(e.data),!e.async)return t();setTimeout(t,10)}}}}),r(ht,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(mt,[ht,pt,p],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(gt,[y],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(vt,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(yt,[y,l,b,C,p,g],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(bt,[z,p],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.addClass(this.settings.containerClass,"body")},applyClasses:function(e){var t=this,n=t.settings,r,i,o;r=e.items().filter(":visible"),i=n.firstControlClass,o=n.lastControlClass,r.each(function(e){e.removeClass(i).removeClass(o),n.controlClass&&e.addClass(n.controlClass)}),r.eq(0).addClass(i),r.eq(-1).addClass(o)},renderHtml:function(e){var t=this,n=t.settings,r,i="";return r=e.items(),r.eq(0).addClass(n.firstControlClass),r.eq(-1).addClass(n.lastControlClass),r.each(function(e){n.controlClass&&e.addClass(n.controlClass),i+=e.renderHtml()}),i},recalc:function(){},postRender:function(){}})}),r(Ct,[bt],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
'+this._super(e)}})}),r(xt,[$,Q],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().lastChild.innerHTML=t.encode(e)),t):t._value},renderHtml:function(){var e=this,t=e.classPrefix;return'"},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(wt,[$,xt],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.toggleClass("tooltip-n","bc-tc"==i),r.toggleClass("tooltip-nw","bc-tl"==i),r.toggleClass("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},active:function(e){var t=this,n;return e!==n&&(t.aria("pressed",e),t.toggleClass("active",e)),t._super(e)},disabled:function(e){var t=this,n;return e!==n&&(t.aria("disabled",e),t.toggleClass("disabled",e)),t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=!0,e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(_t,[wt],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t.on("click mousedown",function(e){e.preventDefault()}),t._super(e),n=e.size,e.subtype&&t.addClass(e.subtype),n&&t.addClass("btn-"+n)},icon:function(e){var t=this,n=t.classPrefix;if("undefined"==typeof e)return t.settings.icon;if(t.settings.icon=e,e=e?n+"ico "+n+"i-"+t.settings.icon:"",t._rendered){var r=t.getEl().firstChild,i=r.getElementsByTagName("i")[0];e?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=e):i&&r.removeChild(i),t.text(t._text)}return t},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},text:function(e){var t=this;if(t._rendered){var n=t.getEl().lastChild.lastChild;n&&(n.data=t.translate(e))}return t._super(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon,i;return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",r=e.settings.icon?n+"ico "+n+"i-"+r:"",'
"}})}),r(Nt,[G],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.addClass("btn-group"),e.preRender(),t.preRender(e),'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),r(Et,[wt],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){var t=this;return"undefined"!=typeof e?(e?t.addClass("checked"):t.removeClass("checked"),t._checked=e,t.aria("checked",e),t):t._checked},value:function(e){return this.checked(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
'+e.encode(e._text)+"
"}})}),r(St,[_t,et],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()}})}),r(kt,[St,y],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.addClass("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'
'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(Tt,[wt,j,q],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("combobox"),t.subinput=!0,t.ariaTarget="inp",e=t.settings,e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){for(var r=n.target,i=t.getEl();r&&r!=i;)r.id&&-1!=r.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){return e.preventDefault(),t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),e.placeholder&&(t.addClass("placeholder"),t.on("focusin",function(){t._hasOnChange||(n.on(t.getEl("inp"),"change",function(){t.fire("change")}),t._hasOnChange=!0),t.hasClass("placeholder")&&(t.getEl("inp").value="",t.removeClass("placeholder"))}),t.on("focusout",function(){0===t.value().length&&(t.getEl("inp").value=e.placeholder,t.addClass("placeholder"))}))},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t.removeClass("placeholder"),t._rendered&&(t.getEl("inp").value=e),t):t._rendered?(e=t.getEl("inp").value,e!=t.settings.placeholder?e:""):t._value},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl("inp").disabled=e),t._super(e)},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),r=e.getEl("open"),i=e.layoutRect(),o,a;o=r?i.w-n.getSize(r).width-10:i.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(a=e.layoutRect().h-2+"px"),n.css(t.firstChild,{width:o,lineHeight:a}),e._super(),e},postRender:function(){var e=this;return n.on(this.getEl("inp"),"change",function(){e.fire("change")}),e._super()},remove:function(){n.off(this.getEl("inp")),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=n.value||n.placeholder||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e._text,(o||a)&&(s='
",e.addClass("has-open")),'
"+s+"
" +}})}),r(Rt,[wt],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.addClass("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.data()[n],index:n})})},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},data:function(e){var t=this;return"undefined"!=typeof e?(t._data=e,t.update(),t):t._data},update:function(){this.innerHtml(this._getPathHtml())},postRender:function(){var e=this;e._super(),e.data(e.settings.data)},renderHtml:function(){var e=this;return'
'+e._getPathHtml()+"
"},_getPathHtml:function(){var e=this,t=e._data||[],n,r,i="",o=e.classPrefix;for(n=0,r=t.length;r>n;n++)i+=(n>0?'":"")+'
'+t[n].name+"
";return i||(i='
\xa0
'),i}})}),r(At,[Rt,dt],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return n.on("select",function(t){var n=[],i,o=r.getBody();for(r.focus(),i=r.selection.getStart();i&&i!=o;)e(i)||n.push(i),i=i.parentNode;r.selection.select(n[n.length-1-t.index]),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});i.push({name:s.name})}n.data(i)}),n._super()}})}),r(Bt,[G],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.addClass("formitem"),t.preRender(e),'
'+(e.settings.title?'
'+e.settings.title+"
":"")+'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),r(Dt,[G,Bt],function(e,t){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,n=e.items();n.each(function(n){var r,i=n.settings.label;i&&(r=new t({layout:"flex",autoResize:"overflow",defaults:{flex:1},items:[{type:"label",id:n._id+"-l",text:i,flex:0,forId:n._id,disabled:n.disabled()}]}),r.type="formitem",n.aria("labelledby",n._id+"-l"),"undefined"==typeof n.settings.flex&&(n.settings.flex=1),e.replace(n,r),r.add(n))})},recalcLabels:function(){var e=this,t=0,n=[],r,i;if(e.settings.labelGapCalc!==!1)for(e.items().filter("formitem").each(function(e){var r=e.items()[0],i=r.getEl().clientWidth;t=i>t?i:t,n.push(r)}),i=e.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=t+i},visible:function(e){var t=this._super(e);return e===!0&&this._rendered&&this.recalcLabels(),t},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.recalcLabels(),e.fromJSON(e.settings.data)}})}),r(Lt,[Dt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
'+(e.settings.title?''+e.settings.title+"":"")+'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),r(Mt,[Tt],function(e){return e.extend({init:function(e){var t=this,n=tinymce.activeEditor,r;e.spellcheck=!1,r=n.settings.file_browser_callback,r&&(e.icon="browse",e.onaction=function(){r(t.getEl("inp").id,t.getEl("inp").value,e.filetype,window)}),t._super(e)}})}),r(Ht,[Ct],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox();e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Pt,[Ct],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v=[],y,b,C,x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e._paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,("row-reversed"==f||"column-reverse"==f)&&(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",N="h",E="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",P="left",M="w",D="x",L="innerW",H="minW",O="right",I="deltaW",F="contentW"):(S="x",N="w",E="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",P="top",M="h",D="y",L="innerH",H="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],_=u=0,t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),m=p.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,h[k]&&v.push(p),h.flex=g),d-=h[E],y=o[P]+h[H]+o[O],y>_&&(_=y);if(x={},x[E]=0>d?i[E]-d+i[A]:i[R]-d+i[A],x[H]=_+i[I],x[B]=i[R]-d,x[F]=_,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)p=v[t],h=p.layoutRect(),b=h[k],y=h[E]+h.flex*C,y>b?(d-=h[k]-h[E],u-=h.flex,h.flex=0,h.maxFlexSize=b):h.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[P],t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),y=h.maxFlexSize||h[E],"center"===s?x[D]=Math.round(i[L]/2-h[M]/2):"stretch"===s?(x[M]=z(h[H]||0,i[L]-o[P]-o[O]),x[D]=o[P]):"end"===s&&(x[D]=i[L]-h[M]-o.top),h.flex>0&&(y+=h.flex*C),x[N]=y,x[S]=w,p.layoutRect(x),p.recalc&&p.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(Ot,[bt],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})}})}),r(It,[$,wt,et,p,dt,g],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this,n=this.settings.format;n&&t.parent().on("show",function(){t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))})},onclick:function(){this.settings.format&&d(this.settings.format)}}}}function o(){return e.undoManager?e.undoManager.hasUndo():!1}function a(){return e.undoManager?e.undoManager.hasRedo():!1}function l(){var t=this;t.disabled(!o()),e.on("Undo Redo AddUndo TypingUndo",function(){t.disabled(!o())})}function c(){var t=this;t.disabled(!a()),e.on("Undo Redo AddUndo TypingUndo",function(){t.disabled(!a())})}function u(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function d(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var f;f=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})},onclick:function(){d(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],hr:["Insert horizontal rule","InsertHorizontalRule"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}})}),e.addButton("undo",{tooltip:"Undo",onPostRender:l,cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:c,cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",shortcut:"Ctrl+N",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Ctrl+Z",onPostRender:l,cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ctrl+Y",onPostRender:c,cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:u,cmd:"mceToggleVisualAid"}),s({cut:["Cut","Cut","Ctrl+X"],copy:["Copy","Copy","Ctrl+C"],paste:["Paste","Paste","Ctrl+V"],selectall:["Select all","SelectAll","Ctrl+A"],bold:["Bold","Bold","Ctrl+B"],italic:["Italic","Italic","Ctrl+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:f}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Address=address;Pre=pre;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:d,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){n.push({text:e,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:f})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Ft,[Ct],function(e){return e.extend({recalc:function(e){var t=e.settings,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,N=[],E=[],S,k,T,R;for(t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e._paddingBox,C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]),d=0;r>d;d++)N.push(0);for(f=0;n>f;f++)E.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,N[d]=S>N[d]?S:N[d],E[f]=k>E[f]?k:E[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=N[d]+(d>0?y:0),T-=(d>0?y:0)+N[d];for(R=o.innerH-g.top-g.bottom,_=0,f=0;n>f;f++)_+=E[f]+(f>0?b:0),R-=(f>0?b:0)+E[f];if(w+=g.left+g.right,_+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=_+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var A;A="start"==t.packV?0:R>0?Math.floor(R/n):0;var B=0,D=t.flexWidths;if(D)for(d=0;dd;d++)N[d]+=D?D[d]*L:L;for(h=g.top,f=0;n>f;f++){for(p=g.left,s=E[f]+A,d=0;r>d&&(u=i[f*r+d],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(N[d],c.startMinWidth),c.x=p,c.y=h,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=p+a/2-c.w/2:"right"==v?c.x=p+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=h+s/2-c.h/2:"bottom"==v?c.y=h+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),p+=a+y,u.recalc&&u.recalc();h+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var M=e.parent();M&&(M._lastRect=null,M.recalc())}}})}),r(zt,[wt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):setTimeout(function(){n.html(e)},0),this}})}),r(Wt,[wt,q],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,e.multiline&&t.addClass("autoscroll"),e.strong&&t.addClass("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.addClass("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},text:function(e){var t=this;return t._rendered&&e&&this.innerHtml(t.encode(e)),t._super(e)},renderHtml:function(){var e=this,t=e.settings.forId;return'"}})}),r(Vt,[G],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.addClass("toolbar")},postRender:function(){var e=this;return e.items().addClass("toolbar-item"),e._super()}})}),r(Ut,[Vt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(qt,[_t,j,Ut],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),t.addClass("menubtn"),e.fixedWidth&&t.addClass("fixed-width"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var e=this,n=e.settings,r;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon?r+"ico "+r+"i-"+e.settings.icon:"";return e.aria("role",e.parent()instanceof n?"menuitem":"button"),'
'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},text:function(e){var t=this,n,r;if(t._rendered)for(r=t.getEl("open").getElementsByTagName("span"),n=0;n0&&(o=n[0].text,t._value=n[0].value),e.menu=n}e.text=e.text||o||n[0].text,t._super(e),t.addClass("listbox"),t.on("select",function(n){var r=n.control;a&&(n.lastControl=a),e.multiple?r.active(!r.active()):t.value(n.control.settings.value),a=r})},value:function(e){function t(e,n){e.items().each(function(e){r=e.value()===n,r&&(i=i||e.text()),e.active(r),e.menu&&t(e.menu,n)})}var n=this,r,i,o,a;if("undefined"!=typeof e){if(n.menu)t(n.menu,e);else for(o=n.settings.menu,a=0;a'+("-"!==o?'\xa0":"")+("-"!==o?''+o+"":"")+(l?'
'+l+"
":"")+(r.menu?'
':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),e.parent().hideAll()))}),e._super(),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Kt,[et,jt,p],function(e,t,n){var r=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,e.itemDefaults)for(var r=e.items,i=r.length;i--;)r[i]=n.extend({},e.itemDefaults,r[i]);t._super(e),t.addClass("menu")},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.selectable?(e._hasIcons=!0,!1):void 0}),e._super()}});return r}),r(Gt,[Et],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r(Yt,[wt,Y],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.addClass("resizehandle"),"both"==e.settings.direction&&e.addClass("resizehandle-both"),e.canFocus=!1,'
'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(Xt,[wt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("spacer"),e.canFocus=!1,'
'}})}),r(Jt,[qt,q],function(e,t){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,n=e.getEl(),r=e.layoutRect(),i,o;return e._super(),i=n.firstChild,o=n.lastChild,t.css(i,{width:r.w-t.getSize(o).width,height:r.h-2}),t.css(o,{height:r.h-2}),e},activeMenu:function(e){var n=this;t.toggleClass(n.getEl().lastChild,n.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";return'
'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void t.call(this,e);n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(Qt,[Ot],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),r(Zt,[J,q],function(e,t){return e.extend({lastIdx:0,Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t.removeClass(n,this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t.addClass(n,this.classPrefix+"active"),e!=this.lastIdx&&(this.items()[this.lastIdx].hide(),this.lastIdx=e),this.items()[e].show().fire("showtab"),this.reflow()},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
'+n+'
'+t.renderHtml(e)+"
"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,n,r,i;r=t.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(t,n){r=Math.max(r,t.layoutRect().minW),i=Math.max(i,t.layoutRect().minH),e.settings.activeTab!=n&&t.hide()}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=t.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,n=e._super(),n.deltaH+=o,n.innerH=n.h-n.deltaH,n}})}),r(en,[wt,q],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t._value=e.value||"",t.addClass("textbox"),e.multiline?t.addClass("multiline"):t.on("keydown",function(e){13==e.keyCode&&t.parents().reverse().each(function(t){return e.preventDefault(),t.hasEventListeners("submit")&&t.toJSON?(t.fire("submit",{data:t.toJSON()}),!1):void 0})})},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl().disabled=e),t._super(e)},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().value=e),t):t._rendered?t.getEl().value:t._value},repaint:function(){var e=this,t,n,r,i=0,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e._borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e._value,!1),i="";return"spellcheck"in n&&(i+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(i+=' maxlength="'+n.maxLength+'"'),n.size&&(i+=' size="'+n.size+'"'),n.subtype&&(i+=' type="'+n.subtype+'"'),e.disabled()&&(i+=' disabled="disabled"'),n.multiline?'":'"},postRender:function(){var e=this;return t.on(e.getEl(),"change",function(t){e.fire("change",t)}),e._super()},remove:function(){t.off(this.getEl()),this._super()}})}),r(tn,[q,$],function(e,t){return function(n,r){var i=this,o,a=t.classPrefix;i.show=function(t){return i.hide(),o=!0,window.setTimeout(function(){o&&n.appendChild(e.createFragment('
'))},t||0),i},i.hide=function(){var e=n.lastChild;return e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,i}}}),a([l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I,F,z,W,V,U,q,$,j,K,G,Y,X,J,Q,Z,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,pt,ht,mt,gt,vt,yt,bt,Ct,xt,wt,_t,Nt,Et,St,kt,Tt,Rt,At,Bt,Dt,Lt,Mt,Ht,Pt,Ot,It,Ft,zt,Wt,Vt,Ut,qt,$t,jt,Kt,Gt,Yt,Xt,Jt,Qt,Zt,en,tn])}(this);tinymce.PluginManager.add("advlist",function(t){function e(t,e){var n=[];return tinymce.each(e.split(/[ ,]/),function(t){n.push({text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"==t?"":t})}),n}function n(e,n){var o,l=t.dom,a=t.selection;o=l.getParent(a.getNode(),"ol,ul"),o&&o.nodeName==e&&n!==!1||t.execCommand("UL"==e?"InsertUnorderedList":"InsertOrderedList"),n=n===!1?i[e]:n,i[e]=n,o=l.getParent(a.getNode(),"ol,ul"),o&&(l.setStyle(o,"listStyleType",n),o.removeAttribute("data-mce-style")),t.focus()}function o(e){var n=t.dom.getStyle(t.dom.getParent(t.selection.getNode(),"ol,ul"),"listStyleType")||"";e.control.items().each(function(t){t.active(t.settings.data===n)})}var l,a,i={};l=e("OL",t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),a=e("UL",t.getParam("advlist_bullet_styles","default,circle,disc,square")),t.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:l,onshow:o,onselect:function(t){n("OL",t.control.settings.data)},onclick:function(){n("OL",!1)}}),t.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:a,onshow:o,onselect:function(t){n("UL",t.control.settings.data)},onclick:function(){n("UL",!1)}})});tinymce.PluginManager.add("anchor",function(n){function e(){var e=n.selection.getNode();n.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.name||e.id},onsubmit:function(e){n.execCommand("mceInsertContent",!1,n.dom.createHTML("a",{id:e.data.name}))}})}n.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:e,stateSelector:"a:not([href])"}),n.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:e})});tinymce.PluginManager.add("autolink",function(t){function n(t){o(t,-1,"(",!0)}function e(t){o(t,0,"",!0)}function i(t){o(t,-1,"",!1)}function o(t,n,e){function i(t,n){if(0>n&&(n=0),3==t.nodeType){var e=t.data.length;n>e&&(n=e)}return n}function o(t,n){f.setStart(t,i(t,n))}function r(t,n){f.setEnd(t,i(t,n))}var f,d,a,s,c,l,u,g,h;if(f=t.selection.getRng(!0).cloneRange(),f.startOffset<5){if(g=f.endContainer.previousSibling,!g){if(!f.endContainer.firstChild||!f.endContainer.firstChild.nextSibling)return;g=f.endContainer.firstChild.nextSibling}if(h=g.length,o(g,h),r(g,h),f.endOffset<5)return;d=f.endOffset,s=g}else{if(s=f.endContainer,3!=s.nodeType&&s.firstChild){for(;3!=s.nodeType&&s.firstChild;)s=s.firstChild;3==s.nodeType&&(o(s,0),r(s,s.nodeValue.length))}d=1==f.endOffset?2:f.endOffset-1-n}a=d;do o(s,d>=2?d-2:0),r(s,d>=1?d-1:0),d-=1;while(" "!=f.toString()&&""!==f.toString()&&160!=f.toString().charCodeAt(0)&&d-2>=0&&f.toString()!=e);f.toString()==e||160==f.toString().charCodeAt(0)?(o(s,d),r(s,a),d+=1):0===f.startOffset?(o(s,0),r(s,a)):(o(s,d),r(s,a)),l=f.toString(),"."==l.charAt(l.length-1)&&r(s,a-1),l=f.toString(),u=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),u&&("www."==u[1]?u[1]="http://www.":/@$/.test(u[1])&&!/^mailto:/.test(u[1])&&(u[1]="mailto:"+u[1]),c=t.selection.getBookmark(),t.selection.setRng(f),t.execCommand("createlink",!1,u[1]+u[2]),t.selection.moveToBookmark(c),t.nodeChanged())}var r;return t.on("keydown",function(n){return 13==n.keyCode?i(t):void 0}),tinymce.Env.ie?void t.on("focus",function(){if(!r){r=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}}):(t.on("keypress",function(e){return 41==e.keyCode?n(t):void 0}),void t.on("keyup",function(n){return 32==n.keyCode?e(t):void 0}))});tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function i(n){var s,r,g,u,l,m,h,d,f=tinymce.DOM;if(r=e.getDoc()){if(g=r.body,u=r.documentElement,l=o.autoresize_min_height,!g||n&&"setcontent"===n.type&&n.initial||t())return void(g&&u&&(g.style.overflowY="auto",u.style.overflowY="auto"));h=e.dom.getStyle(g,"margin-top",!0),d=e.dom.getStyle(g,"margin-bottom",!0),m=g.offsetHeight+parseInt(h,10)+parseInt(d,10),(isNaN(m)||0>=m)&&(m=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight),m>o.autoresize_min_height&&(l=m),o.autoresize_max_height&&m>o.autoresize_max_height?(l=o.autoresize_max_height,g.style.overflowY="auto",u.style.overflowY="auto"):(g.style.overflowY="hidden",u.style.overflowY="hidden",g.scrollTop=0),l!==a&&(s=l-a,f.setStyle(f.get(e.id+"_ifr"),"height",l+"px"),a=l,tinymce.isWebKit&&0>s&&i(n))}}function n(e,t,o){setTimeout(function(){i({}),e--?n(e,t,o):o&&o()},t)}var o=e.settings,a=0;e.settings.inline||(o.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),o.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t=e.getParam("autoresize_overflow_padding",1);e.dom.setStyles(e.getBody(),{paddingBottom:e.getParam("autoresize_bottom_margin",50),paddingLeft:t,paddingRight:t})}),e.on("nodechange setcontent keyup FullscreenStateChanged",i),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){n(20,100,function(){n(5,1e3)})}),e.addCommand("mceAutoResize",i))});tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(l.getItem(d+"time"),10)||0;return(new Date).getTime()-e>v.autosave_retention?(a(!1),!1):!0}function a(t){l.removeItem(d+"draft"),l.removeItem(d+"time"),t!==!1&&e.fire("RemoveDraft")}function r(){!c()&&e.isDirty()&&(l.setItem(d+"draft",e.getContent({format:"raw",no_events:!0})),l.setItem(d+"time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(l.getItem(d+"draft"),{format:"raw"}),e.fire("RestoreDraft"))}function i(){m||(setInterval(function(){e.removed||r()},v.autosave_interval),m=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),i()}function u(){e.undoManager.beforeChange(),o(),a(),e.undoManager.add()}function f(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+"[^>]*>(( | |[ ]|]*>)+?|)|
$","i").test(t)}var d,m,v=e.settings,l=tinymce.util.LocalStorage;d=v.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",d=d.replace(/\{path\}/g,document.location.pathname),d=d.replace(/\{query\}/g,document.location.search),d=d.replace(/\{id\}/g,e.id),v.autosave_interval=t(v.autosave_interval,"30s"),v.autosave_retention=t(v.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:u,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:u,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&o()}),e.on("saveContent",function(){a()})),window.onbeforeunload=f,this.hasDraft=n,this.storeDraft=r,this.restoreDraft=o,this.removeDraft=a,this.isEmpty=c});!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(o){var e=this,t=o.getParam("bbcode_dialect","punbb").toLowerCase();o.on("beforeSetContent",function(o){o.content=e["_"+t+"_bbcode2html"](o.content)}),o.on("postProcess",function(o){o.set&&(o.content=e["_"+t+"_bbcode2html"](o.content)),o.get&&(o.content=e["_"+t+"_html2bbcode"](o.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(o){function e(e,t){o=o.replace(e,t)}return o=tinymce.trim(o),e(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),e(/(.*?)<\/font>/gi,"$1"),e(//gi,"[img]$1[/img]"),e(/(.*?)<\/span>/gi,"[code]$1[/code]"),e(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),e(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),e(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),e(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),e(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),e(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),e(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),e(/<\/(strong|b)>/gi,"[/b]"),e(/<(strong|b)>/gi,"[b]"),e(/<\/(em|i)>/gi,"[/i]"),e(/<(em|i)>/gi,"[i]"),e(/<\/u>/gi,"[/u]"),e(/(.*?)<\/span>/gi,"[u]$1[/u]"),e(//gi,"[u]"),e(/]*>/gi,"[quote]"),e(/<\/blockquote>/gi,"[/quote]"),e(/
/gi,"\n"),e(//gi,"\n"),e(/
/gi,"\n"),e(/

/gi,""),e(/<\/p>/gi,"\n"),e(/ |\u00a0/gi," "),e(/"/gi,'"'),e(/</gi,"<"),e(/>/gi,">"),e(/&/gi,"&"),o},_punbb_bbcode2html:function(o){function e(e,t){o=o.replace(e,t)}return o=tinymce.trim(o),e(/\n/gi,"
"),e(/\[b\]/gi,""),e(/\[\/b\]/gi,""),e(/\[i\]/gi,""),e(/\[\/i\]/gi,""),e(/\[u\]/gi,""),e(/\[\/u\]/gi,""),e(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),e(/\[url\](.*?)\[\/url\]/gi,'$1'),e(/\[img\](.*?)\[\/img\]/gi,''),e(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),e(/\[code\](.*?)\[\/code\]/gi,'$1 '),e(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),o}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();tinymce.PluginManager.add("charmap",function(e){function a(){function a(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var t,r,o,n;t='';var l=25;for(o=0;10>o;o++){for(t+="",r=0;l>r;r++){var s=i[o*l+r];t+='"}t+=""}t+="";var c={type:"container",html:t,onclick:function(a){var i=a.target;"TD"==i.tagName&&(i=i.firstChild),"DIV"==i.tagName&&(e.execCommand("mceInsertContent",!1,i.firstChild.data),a.ctrlKey||n.close())},onmouseover:function(e){var i=a(e.target);i&&n.find("#preview").text(i.firstChild.firstChild.data)}};n=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[c,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){n.close()}}]})}var i=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];e.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:a}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:a,context:"insert"})});tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})});tinymce.PluginManager.add("contextmenu",function(e){var n,t=e.settings.contextmenu_never_use_native;e.on("contextmenu",function(i){var o;if(!i.ctrlKey||t){if(i.preventDefault(),o=e.settings.contextmenu||"link image inserttable | cell row column deletetable",n)n.show();else{var c=[];tinymce.each(o.split(/[ ,]/),function(n){var t=e.menuItems[n];"|"==n&&(t={text:n}),t&&(t.shortcut="",c.push(t))});for(var a=0;a'}),t+=""}),t+=""}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];t.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:a,onclick:function(e){var a=t.dom.getParent(e.target,"a");a&&(t.insertContent(''+a.getAttribute('),this.hide())}},tooltip:"Emoticons"})});tinymce.PluginManager.add("fullpage",function(e){function t(){var t=n();e.windowManager.open({title:"Document properties",data:t,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){l(tinymce.extend(t,e.data))}})}function n(){function t(e,t){var n=e.attr(t);return n||""}var n,l,a=i(),r={};return r.fontface=e.getParam("fullpage_default_fontface",""),r.fontsize=e.getParam("fullpage_default_fontsize",""),n=a.firstChild,7==n.type&&(r.xml_pi=!0,l=/encoding="([^"]+)"/.exec(n.value),l&&(r.docencoding=l[1])),n=a.getAll("#doctype")[0],n&&(r.doctype=""),n=a.getAll("title")[0],n&&n.firstChild&&(r.title=n.firstChild.value),s(a.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?r[n.toLowerCase()]=e.attr("content"):"Content-Type"==l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")),t&&(r.docencoding=t[1]))}),n=a.getAll("html")[0],n&&(r.langcode=t(n,"lang")||t(n,"xml:lang")),r.stylesheets=[],tinymce.each(a.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&r.stylesheets.push(e.attr("href"))}),n=a.getAll("body")[0],n&&(r.langdir=t(n,"dir"),r.style=t(n,"style"),r.visited_color=t(n,"vlink"),r.link_color=t(n,"link"),r.active_color=t(n,"alink")),r}function l(t){function n(e,t,n){e.attr(t,n?n:void 0)}function l(e){r.firstChild?r.insert(e,r.firstChild):r.append(e)}var a,r,o,c,u,f=e.dom;a=i(),r=a.getAll("head")[0],r||(c=a.getAll("html")[0],r=new m("head",1),c.firstChild?c.insert(r,c.firstChild,!0):c.append(r)),c=a.firstChild,t.xml_pi?(u='version="1.0"',t.docencoding&&(u+=' encoding="'+t.docencoding+'"'),7!=c.type&&(c=new m("xml",7),a.insert(c,a.firstChild,!0)),c.value=u):c&&7==c.type&&c.remove(),c=a.getAll("#doctype")[0],t.doctype?(c||(c=new m("#doctype",10),t.xml_pi?a.insert(c,a.firstChild):l(c)),c.value=t.doctype.substring(9,t.doctype.length-1)):c&&c.remove(),c=null,s(a.getAll("meta"),function(e){"Content-Type"==e.attr("http-equiv")&&(c=e)}),t.docencoding?(c||(c=new m("meta",1),c.attr("http-equiv","Content-Type"),c.shortEnded=!0,l(c)),c.attr("content","text/html; charset="+t.docencoding)):c.remove(),c=a.getAll("title")[0],t.title?(c?c.empty():(c=new m("title",1),l(c)),c.append(new m("#text",3)).value=t.title):c&&c.remove(),s("keywords,description,author,copyright,robots".split(","),function(e){var n,i,r=a.getAll("meta"),o=t[e];for(n=0;n"))}function i(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(d)}function a(t){function n(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}var l,a,o,m,u=t.content,f="",g=e.dom;if(!t.selection&&!("raw"==t.format&&d||t.source_view&&e.getParam("fullpage_hide_in_source_view"))){u=u.replace(/<(\/?)BODY/gi,"<$1body"),l=u.indexOf("",l),d=n(u.substring(0,l+1)),a=u.indexOf("\n"),o=i(),s(o.getAll("style"),function(e){e.firstChild&&(f+=e.firstChild.value)}),m=o.getAll("body")[0],m&&g.setAttribs(e.getBody(),{style:m.attr("style")||"",dir:m.attr("dir")||"",vLink:m.attr("vlink")||"",link:m.attr("link")||"",aLink:m.attr("alink")||""}),g.remove("fullpage_styles");var y=e.getDoc().getElementsByTagName("head")[0];f&&(g.add(y,"style",{id:"fullpage_styles"},f),m=g.get("fullpage_styles"),m.styleSheet&&(m.styleSheet.cssText=f));var h={};tinymce.each(y.getElementsByTagName("link"),function(e){"stylesheet"==e.rel&&e.getAttribute("data-mce-fullpage")&&(h[e.href]=e)}),tinymce.each(o.getAll("link"),function(e){var t=e.attr("href");h[t]||"stylesheet"!=e.attr("rel")||g.add(y,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete h[t]}),tinymce.each(h,function(e){e.parentNode.removeChild(e)})}}function r(){var t,n="",l="";return e.getParam("fullpage_default_xml_pi")&&(n+='\n'),n+=e.getParam("fullpage_default_doctype",""),n+="\n\n\n",(t=e.getParam("fullpage_default_title"))&&(n+=""+t+"\n"),(t=e.getParam("fullpage_default_encoding"))&&(n+='\n'),(t=e.getParam("fullpage_default_font_family"))&&(l+="font-family: "+t+";"),(t=e.getParam("fullpage_default_font_size"))&&(l+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(l+="color: "+t+";"),n+="\n\n"}function o(t){t.selection||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(t.content=tinymce.trim(d)+"\n"+tinymce.trim(t.content)+"\n"+tinymce.trim(c))}var d,c,s=tinymce.each,m=tinymce.html.Node;e.addCommand("mceFullPageProperties",t),e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),e.on("BeforeSetContent",a),e.on("GetContent",o)});tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,l=i.body;return l.offsetWidth&&(e=l.offsetWidth,t=l.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){d.setStyle(a,"height",t().h-(h.clientHeight-a.clientHeight))}var u,h,a,f,m=document.body,g=document.documentElement;s=!s,h=e.getContainer(),u=h.style,a=e.getContentAreaContainer().firstChild,f=a.style,s?(i=f.width,l=f.height,f.width=f.height="100%",c=u.width,o=u.height,u.width=u.height="",d.addClass(m,"mce-fullscreen"),d.addClass(g,"mce-fullscreen"),d.addClass(h,"mce-fullscreen"),d.bind(window,"resize",n),n(),r=n):(f.width=i,f.height=l,c&&(u.width=c),o&&(u.height=o),d.removeClass(m,"mce-fullscreen"),d.removeClass(g,"mce-fullscreen"),d.removeClass(h,"mce-fullscreen"),d.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:s})}var i,l,r,c,o,s=!1,d=tinymce.DOM;return e.settings.inline?void 0:(e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&d.unbind(window,"resize",r)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return s}})});tinymce.PluginManager.add("hr",function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"


")}),n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});tinymce.PluginManager.add("image",function(e){function t(e,t){function i(e,i){n.parentNode&&n.parentNode.removeChild(n),t({width:e,height:i})}var n=document.createElement("img");n.onload=function(){i(n.clientWidth,n.clientHeight)},n.onerror=function(){i()};var a=n.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(n),n.src=e}function i(t){return tinymce.each(t,function(t){t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})}}),t}function n(t){return function(){var i=e.settings.image_list;"string"==typeof i?tinymce.util.XHR.send({url:i,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof i?i(t):t(i)}}function a(n){function a(t,i,n){var a,l=[];return tinymce.each(e.settings[t]||n,function(e){var t={text:e.text||e.title,value:e.value};l.push(t),(f[i]===e.value||!a&&e.selected)&&(a=t)}),a&&!f[i]&&(f[i]=a.value,a.selected=!0),l}function l(){var t=[{text:"None",value:""}];return tinymce.each(n,function(i){t.push({text:i.text||i.title,value:e.convertURL(i.value||i.url,"src"),menu:i.menu})}),t}function o(){var e,t,i,n;e=u.find("#width")[0],t=u.find("#height")[0],i=e.value(),n=t.value(),u.find("#constrain")[0].checked()&&g&&h&&i&&n&&(g!=i?(n=Math.round(i/g*n),t.value(n)):(i=Math.round(n/h*i),e.value(i))),g=i,h=n}function s(){function t(t){function i(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}t.onload=function(){f.width||f.height||y.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),i()},t.onerror=i}d(),o(),f=tinymce.extend(f,u.toJSON()),f.alt||(f.alt=""),""===f.width&&(f.width=null),""===f.height&&(f.height=null),f.style||(f.style=null),f={src:f.src,alt:f.alt,width:f.width,height:f.height,style:f.style,"class":f["class"]},f["class"]||delete f["class"],e.undoManager.transact(function(){return f.src?(v?y.setAttribs(v,f):(f.id="__mcenew",e.focus(),e.selection.setContent(y.createHTML("img",f)),v=y.get("__mcenew"),y.setAttrib(v,"id",null)),void t(v)):void(v&&(y.remove(v),e.focus(),e.nodeChanged()))})}function r(e){return e&&(e=e.replace(/px$/,"")),e}function c(){m&&m.value(e.convertURL(this.value(),"src")),t(this.value(),function(e){e.width&&e.height&&(g=e.width,h=e.height,u.find("#width").value(g),u.find("#height").value(h))})}function d(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}if(e.settings.image_advtab){var i=u.toJSON(),n=y.parseStyle(i.style);delete n.margin,n["margin-top"]=n["margin-bottom"]=t(i.vspace),n["margin-left"]=n["margin-right"]=t(i.hspace),n["border-width"]=t(i.border),u.find("#style").value(y.serializeStyle(y.parseStyle(y.serializeStyle(n))))}}var u,g,h,m,p,f={},y=e.dom,v=e.selection.getNode();g=y.getAttrib(v,"width"),h=y.getAttrib(v,"height"),"IMG"!=v.nodeName||v.getAttribute("data-mce-object")||v.getAttribute("data-mce-placeholder")?v=null:f={src:y.getAttrib(v,"src"),alt:y.getAttrib(v,"alt"),"class":y.getAttrib(v,"class"),width:g,height:h},n&&(m={type:"listbox",label:"Image list",values:l(),value:f.src&&e.convertURL(f.src,"src"),onselect:function(e){var t=u.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),u.find("#src").value(e.control.value())},onPostRender:function(){m=this}}),e.settings.image_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("image_class_list","class"))});var b=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:c},m];e.settings.image_description!==!1&&b.push({name:"alt",type:"textbox",label:"Image description"}),e.settings.image_dimensions!==!1&&b.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),b.push(p),e.settings.image_advtab?(v&&(f.hspace=r(v.style.marginLeft||v.style.marginRight),f.vspace=r(v.style.marginTop||v.style.marginBottom),f.border=r(v.style.borderWidth),f.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(v,"style")))),u=e.windowManager.open({title:"Insert/edit image",data:f,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:d},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:s})):u=e.windowManager.open({title:"Insert/edit image",data:f,body:b,onSubmit:s})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(a),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(a),context:"insert",prependToContext:!0})});tinymce.PluginManager.add("importcss",function(t){function e(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t}function n(e,n){function i(t,e){var c,o=t.href;if(o&&n(o,e)){s(t.imports,function(t){i(t,!0)});try{c=t.cssRules||t.rules}catch(a){}s(c,function(t){t.styleSheet?i(t.styleSheet,!0):t.selectorText&&s(t.selectorText.split(","),function(t){r.push(tinymce.trim(t))})})}}var r=[],c={};s(t.contentCSS,function(t){c[t]=!0}),n||(n=function(t,e){return e||c[t]});try{s(e.styleSheets,function(t){i(t)})}catch(o){}return r}function i(e){var n,i=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(i){var r=i[1],s=i[2].substr(1).split(".").join(" "),c=tinymce.makeMap("a,img");return i[1]?(n={title:e},t.schema.getTextBlockElements()[r]?n.block=r:t.schema.getBlockElements()[r]||c[r.toLowerCase()]?n.selector=r:n.inline=r):i[2]&&(n={inline:"span",title:e.substr(1),classes:s}),t.settings.importcss_merge_classes!==!1?n.classes=s:n.attributes={"class":s},n}}var r=this,s=tinymce.each;t.on("renderFormatsMenu",function(c){var o=t.settings,a={},l=o.importcss_selector_converter||i,f=e(o.importcss_selector_filter),m=c.control;t.settings.importcss_append||m.items().remove();var u=[];tinymce.each(o.importcss_groups,function(t){t=tinymce.extend({},t),t.filter=e(t.filter),u.push(t)}),s(n(c.doc||t.getDoc(),e(o.importcss_file_filter)),function(e){if(-1===e.indexOf(".mce-")&&!a[e]&&(!f||f(e))){var n,i=l.call(r,e);if(i){var s=i.name||tinymce.DOM.uniqueId();if(u)for(var c=0;c'+n+"";var i=e.dom.getParent(e.selection.getStart(),"time");if(i)return void e.dom.setOuterHTML(i,n)}e.insertContent(n)}var n,r,i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),u=[];e.addCommand("mceInsertDate",function(){a(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){a(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){a(n||r)},menu:u}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){r||(r=e),u.push({text:t(e),onclick:function(){n=e,a(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:u,context:"insert"})});!function(e){e.on("AddEditor",function(e){e.editor.settings.inline_styles=!1}),e.PluginManager.add("legacyoutput",function(t){t.on("init",function(){var i="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=e.explode(t.settings.font_size_style_values),l=t.schema;t.formatter.register({alignleft:{selector:i,attributes:{align:"left"}},aligncenter:{selector:i,attributes:{align:"center"}},alignright:{selector:i,attributes:{align:"right"}},alignjustify:{selector:i,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(n,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){l.addValidElements(e+"[*]")}),l.getElementRule("font")||l.addValidElements("font[face|size|color|style]"),e.each(i.split(","),function(e){var t=l.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}(tinymce);tinymce.PluginManager.add("link",function(t){function e(e){return function(){var n=t.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(t){e(tinymce.util.JSON.parse(t))}}):"function"==typeof n?n(e):e(n)}}function n(e){function n(t){var e=d.find("#text");(!e.value()||t.lastControl&&e.value()==t.lastControl.text())&&e.value(t.control.text()),d.find("#href").value(t.control.value())}function l(){var n=[{text:"None",value:""}];return tinymce.each(e,function(e){n.push({text:e.text||e.title,value:t.convertURL(e.value||e.url,"href"),menu:e.menu})}),n}function i(e){return tinymce.each(e,function(e){e.textStyle=function(){return t.formatter.getCssText({inline:"a",classes:[e.value]})}}),e}function a(e,n,l){var i,a=[];return tinymce.each(t.settings[e]||l,function(t){var e={text:t.text||t.title,value:t.value};a.push(e),(b[n]===t.value||!i&&t.selected)&&(i=e)}),i&&!b[n]&&(b[n]=i.value,i.selected=!0),a}function r(e){var l=[];return tinymce.each(t.dom.select("a:not([href])"),function(t){var n=t.name||t.id;n&&l.push({text:n,value:"#"+n,selected:-1!=e.indexOf("#"+n)})}),l.length?(l.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:l,onselect:n}):void 0}function o(){h&&h.value(t.convertURL(this.value(),"href")),!f&&0===b.text.length&&x&&this.parent().parent().find("#text")[0].value(this.value())}function s(t){var e=k.getContent();if(/]+>[^<]+<\/a>$/.test(e)||-1==e.indexOf("href=")))return!1;if(t){var n,l=t.childNodes;if(0===l.length)return!1;for(n=l.length-1;n>=0;n--)if(3!=l[n].nodeType)return!1}return!0}var u,c,f,d,x,v,h,g,m,p,y,b={},k=t.selection,w=t.dom;u=k.getNode(),c=w.getParent(u,"a[href]"),x=s(),b.text=f=c?c.innerText||c.textContent:k.getContent({format:"text"}),b.href=c?w.getAttrib(c,"href"):"",b.target=c?w.getAttrib(c,"target"):t.settings.default_link_target||null,b.rel=c?w.getAttrib(c,"rel"):null,b["class"]=c?w.getAttrib(c,"class"):null,b.title=c?w.getAttrib(c,"title"):"",x&&(v={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){b.text=this.value()}}),e&&(h={type:"listbox",label:"Link list",values:l(),onselect:n,value:t.convertURL(b.href,"href"),onPostRender:function(){h=this}}),t.settings.target_list!==!1&&(m={name:"target",type:"listbox",label:"Target",values:a("target_list","target",[{text:"None",value:""},{text:"New window",value:"_blank"}])}),t.settings.rel_list&&(g={name:"rel",type:"listbox",label:"Rel",values:a("rel_list","rel",[{text:"None",value:""}])}),t.settings.link_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("link_class_list","class"))}),t.settings.link_title!==!1&&(y={name:"title",type:"textbox",label:"Title",value:b.title}),d=t.windowManager.open({title:"Insert link",data:b,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:o},v,y,r(b.href),h,g,m,p],onSubmit:function(e){function n(e,n){var l=t.selection.getRng();window.setTimeout(function(){t.windowManager.confirm(e,function(e){t.selection.setRng(l),n(e)})},0)}function l(){var e={href:i,target:b.target?b.target:null,rel:b.rel?b.rel:null,"class":b["class"]?b["class"]:null,title:b.title?b.title:null};c?(t.focus(),x&&b.text!=f&&("innerText"in c?c.innerText=b.text:c.textContent=b.text),w.setAttribs(c,e),k.select(c),t.undoManager.add()):x?t.insertContent(w.createHTML("a",e,w.encode(b.text))):t.execCommand("mceInsertLink",!1,e)}var i;return b=tinymce.extend(b,e.data),(i=b.href)?i.indexOf("@")>0&&-1==i.indexOf("//")&&-1==i.indexOf("mailto:")?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i="mailto:"+i),l()}):/^\s*www\./i.test(i)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i="http://"+i),l()}):void l():void t.execCommand("unlink")}})}t.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]"}),t.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),t.addShortcut("Ctrl+K","",e(n)),this.showDialog=n,t.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});tinymce.PluginManager.add("lists",function(e){function t(e){return e&&/^(OL|UL)$/.test(e.nodeName)}function n(e){return e.parentNode.firstChild==e}function r(e){return e.parentNode.lastChild==e}function o(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function i(e){return e&&"SPAN"===e.nodeName&&"bookmark"===e.getAttribute("data-mce-type")}var a=this;e.on("init",function(){function d(e){function t(t){var r,o,i;o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],1==o.nodeType&&(r=b.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),t?o.insertBefore(r,o.childNodes[i]):b.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),n[t?"startContainer":"endContainer"]=o,n[t?"startOffset":"endOffset"]=i}var n={};return t(!0),e.collapsed||t(),n}function s(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var r,o,i;r=i=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],r&&(1==r.nodeType&&(o=n(r),r=r.parentNode,b.remove(i)),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=o)}t(!0),t();var n=b.createRng();n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),k.setRng(n)}function f(t,n){var r,o,i,a=b.createFragment(),d=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&(o=b.create(n),o.tagName===e.settings.forced_root_block&&b.setAttribs(o,e.settings.forced_root_block_attrs),a.appendChild(o)),t)for(;r=t.firstChild;){var s=r.nodeName;i||"SPAN"==s&&"bookmark"==r.getAttribute("data-mce-type")||(i=!0),d[s]?(a.appendChild(r),o=null):n?(o||(o=b.create(n),a.appendChild(o)),o.appendChild(r)):a.appendChild(r)}return e.settings.forced_root_block?i||tinymce.Env.ie&&!(tinymce.Env.ie>10)||o.appendChild(b.create("br",{"data-mce-bogus":"1"})):a.appendChild(b.create("br")),a}function l(){return tinymce.grep(k.getSelectedBlocks(),function(e){return"LI"==e.nodeName})}function c(e,t,n){var r,o,i=b.select('span[data-mce-type="bookmark"]',e);n=n||f(t),r=b.createRng(),r.setStartAfter(t),r.setEndAfter(e),o=r.extractContents(),b.isEmpty(o)||b.insertAfter(o,e),b.insertAfter(n,e),b.isEmpty(t.parentNode)&&(tinymce.each(i,function(e){t.parentNode.parentNode.insertBefore(e,t.parentNode)}),b.remove(t.parentNode)),b.remove(t)}function p(e){var n,r;if(n=e.nextSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.appendChild(r);b.remove(n)}if(n=e.previousSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.insertBefore(r,e.firstChild);b.remove(n)}}function u(e){tinymce.each(tinymce.grep(b.select("ol,ul",e)),function(e){var n,r=e.parentNode;"LI"==r.nodeName&&r.firstChild==e&&(n=r.previousSibling,n&&"LI"==n.nodeName&&(n.appendChild(e),b.isEmpty(r)&&b.remove(r))),t(r)&&(n=r.previousSibling,n&&"LI"==n.nodeName&&n.appendChild(e))})}function m(e){function o(e){b.isEmpty(e)&&b.remove(e)}var i,a=e.parentNode,d=a.parentNode;return n(e)&&r(e)?("LI"==d.nodeName?(b.insertAfter(e,d),o(d),b.remove(a)):t(d)?b.remove(a,!0):(d.insertBefore(f(e),a),b.remove(a)),!0):n(e)?("LI"==d.nodeName?(b.insertAfter(e,d),e.appendChild(a),o(d)):t(d)?d.insertBefore(e,a):(d.insertBefore(f(e),a),b.remove(e)),!0):r(e)?("LI"==d.nodeName?b.insertAfter(e,d):t(d)?b.insertAfter(e,a):(b.insertAfter(f(e),a),b.remove(e)),!0):("LI"==d.nodeName?(a=d,i=f(e,"LI")):i=t(d)?f(e,"LI"):f(e),c(a,e,i),u(a.parentNode),!0)}function h(e){function n(n,r){var o;if(t(n)){for(;o=e.lastChild.firstChild;)r.appendChild(o);b.remove(n)}}var r,o;return r=e.previousSibling,r&&t(r)?(r.appendChild(e),!0):r&&"LI"==r.nodeName&&t(r.lastChild)?(r.lastChild.appendChild(e),n(e.lastChild,r.lastChild),!0):(r=e.nextSibling,r&&t(r)?(r.insertBefore(e,r.firstChild),!0):r&&"LI"==r.nodeName&&t(e.lastChild)?!1:(r=e.previousSibling,r&&"LI"==r.nodeName?(o=b.create(e.parentNode.nodeName),r.appendChild(o),o.appendChild(e),n(e.lastChild,o),!0):!1))}function v(){var t=l();if(t.length){for(var n=d(k.getRng(!0)),r=0;r0))return n;for(var o=new tinymce.dom.TreeWalker(e.startContainer);n=o[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function r(e,n){var r,o,i=e.parentNode;for(t(n.lastChild)&&(o=n.lastChild),r=n.lastChild,r&&"BR"==r.nodeName&&e.hasChildNodes()&&b.remove(r);r=e.firstChild;)n.appendChild(r);o&&n.appendChild(o),b.remove(e),b.isEmpty(i)&&b.remove(i)}if(k.isCollapsed()){var o=b.getParent(k.getStart(),"LI");if(o){var i=k.getRng(!0),a=b.getParent(n(i,e),"LI");if(a&&a!=o){var f=d(i);return e?r(a,o):r(o,a),s(f),!0}if(!a&&!e&&N(o.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return v()?void 0:!0}),e.addCommand("Outdent",function(){return C()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){y("UL")}),e.addCommand("InsertOrderedList",function(){y("OL")}),e.on("keydown",function(t){9==t.keyCode&&e.dom.getParent(e.selection.getStart(),"LI")&&(t.preventDefault(),t.shiftKey?C():v())})}),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var t=this;e.on("nodechange",function(){for(var r=e.selection.getSelectedBlocks(),o=!1,i=0,a=r.length;!o&&a>i;i++){var d=r[i].nodeName;o="LI"==d&&n(r[i])||"UL"==d||"OL"==d}t.disabled(o)})}}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?a.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&a.backspaceDelete(!0)&&e.preventDefault()})});tinymce.PluginManager.add("media",function(e,t){function i(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":-1!=e.indexOf(".swf")?"application/x-shockwave-flash":""}function r(t){var i=e.settings.media_scripts;if(i)for(var r=0;r':"application/x-shockwave-flash"==o.source1mime?(a+='',o.poster&&(a+=''),a+=""):-1!=o.source1mime.indexOf("audio")?e.settings.audio_template_callback?a=e.settings.audio_template_callback(o):a+='":"script"==o.type?a+='':a=e.settings.video_template_callback?e.settings.video_template_callback(o):'"}return a}function s(e){var t={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,i){if(t.source1||"param"!=e||(t.source1=i.map.movie),("iframe"==e||"object"==e||"embed"==e||"video"==e||"audio"==e)&&(t.type||(t.type=e),t=tinymce.extend(i.map,t)),"script"==e){var o=r(i.map.src);if(!o)return;t={type:"script",source1:i.map.src,width:o.width,height:o.height}}"source"==e&&(t.source1?t.source2||(t.source2=i.map.src):t.source1=i.map.src),"img"!=e||t.poster||(t.poster=i.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function n(t){return t.getAttribute("data-mce-object")?s(e.serializer.serialize(t,{selection:!0})):{}}function m(e,t,i){function r(e,t){var i,r,o,a;for(i in t)if(o=""+t[i],e.map[i])for(r=e.length;r--;)a=e[r],a.name==i&&(o?(e.map[i]=o,a.value=o):(delete e.map[i],e.splice(r,1)));else o&&(e.push({name:i,value:o}),e.map[i]=o)}var o,a=new tinymce.html.Writer,c=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,s,n){switch(e){case"video":case"object":case"embed":case"img":case"iframe":r(s,{width:t.width,height:t.height})}if(i)switch(e){case"video":r(s,{poster:t.poster,src:""}),t.source2&&r(s,{src:""});break;case"iframe":r(s,{src:t.source1});break;case"source":if(c++,2>=c&&(r(s,{src:t["source"+c],type:t["source"+c+"mime"]}),!t["source"+c]))return;break;case"img":if(!t.poster)return;o=!0}a.start(e,s,n)},end:function(e){if("video"==e&&i)for(var s=1;2>=s;s++)if(t["source"+s]){var n=[];n.map={},s>c&&(r(n,{src:t["source"+s],type:t["source"+s+"mime"]}),a.start("source",n,!0))}if(t.poster&&"object"==e&&i&&!o){var m=[];m.map={},r(m,{src:t.poster,width:t.width,height:t.height}),a.start("img",m,!0)}a.end(e)}},new tinymce.html.Schema({})).parse(e),a.getContent()}var u=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}];e.on("ResolveName",function(e){var t;1==e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("]*>","gi")});var i=e.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){i[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(t,i){for(var o,a,c,s,n,m,u,d,l=t.length;l--;)if(a=t[l],a.parent&&("script"!=a.name||(d=r(a.attr("src"))))){for(c=new tinymce.html.Node("img",1),c.shortEnded=!0,d&&(d.width&&a.attr("width",d.width.toString()),d.height&&a.attr("height",d.height.toString())),m=a.attributes,o=m.length;o--;)s=m[o].name,n=m[o].value,"width"!==s&&"height"!==s&&"style"!==s&&(("data"==s||"src"==s)&&(n=e.convertURL(n,s)),c.attr("data-mce-p-"+s,n));u=a.firstChild&&a.firstChild.value,u&&(c.attr("data-mce-html",escape(u)),c.firstChild=null),c.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==i?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":i,"class":"mce-object mce-object-"+i}),a.replace(c)}}),e.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var i,r,o,a,c,s,n,m=e.length;m--;)if(i=e[m],i.parent){for(n=i.attr(t),r=new tinymce.html.Node(n,1),"audio"!=n&&"script"!=n&&r.attr({width:i.attr("width"),height:i.attr("height")}),r.attr({style:i.attr("style")}),a=i.attributes,o=a.length;o--;){var u=a[o].name;0===u.indexOf("data-mce-p-")&&r.attr(u.substr(11),a[o].value)}"script"==n&&r.attr("type","text/javascript"),c=i.attr("data-mce-html"),c&&(s=new tinymce.html.Node("#text",3),s.raw=!0,s.value=unescape(c),r.append(s)),i.replace(r)}})}),e.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");("audio"==t||"script"==t)&&e.preventDefault()}),e.on("objectResized",function(e){var t,i=e.target;i.getAttribute("data-mce-object")&&(t=i.getAttribute("data-mce-html"),t&&(t=unescape(t),i.setAttribute("data-mce-html",escape(m(t,{width:e.width,height:e.height})))))}),e.addButton("media",{tooltip:"Insert/edit video",onclick:o,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),e.addMenuItem("media",{icon:"media",text:"Insert video",onclick:o,context:"insert",prependToContext:!0})});tinymce.PluginManager.add("nonbreaking",function(n){var e=n.getParam("nonbreaking_force_tab");if(n.addCommand("mceNonBreaking",function(){n.insertContent(n.plugins.visualchars&&n.plugins.visualchars.state?' ':" "),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),n.addButton("nonbreaking",{title:"Insert nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),e){var a=+e>1?+e:3;n.on("keydown",function(e){if(9==e.keyCode){if(e.shiftKey)return;e.preventDefault();for(var t=0;a>t;t++)n.execCommand("mceNonBreaking")}})}});tinymce.PluginManager.add("noneditable",function(e){function t(e){var t;if(1===e.nodeType){if(t=e.getAttribute(u),t&&"inherit"!==t)return t;if(t=e.contentEditable,"inherit"!==t)return t}return null}function n(e){for(var n;e;){if(n=t(e))return"false"===n?e:null;e=e.parentNode}}function r(){function r(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function a(e){var t;if(e)for(t=new f(e,e),e=t.current();e;e=t.next())if(3===e.nodeType)return e}function i(n,r){var a,i;return"false"===t(n)&&u.isBlock(n)?void s.select(n):(i=u.createRng(),"true"===t(n)&&(n.firstChild||n.appendChild(e.getDoc().createTextNode(" ")),n=n.firstChild,r=!0),a=u.create("span",{id:g,"data-mce-bogus":!0},m),r?n.parentNode.insertBefore(a,n):u.insertAfter(a,n),i.setStart(a.firstChild,1),i.collapse(!0),s.setRng(i),a)}function o(e){var t,n,i,o;if(e)t=s.getRng(!0),t.setStartBefore(e),t.setEndBefore(e),n=a(e),n&&n.nodeValue.charAt(0)==m&&(n=n.deleteData(0,1)),u.remove(e,!0),s.setRng(t);else for(i=r(s.getStart());(e=u.get(g))&&e!==o;)i!==e&&(n=a(e),n&&n.nodeValue.charAt(0)==m&&(n=n.deleteData(0,1)),u.remove(e,!0)),o=e}function l(){function e(e,n){var r,a,i,o,l;if(r=d.startContainer,a=d.startOffset,3==r.nodeType){if(l=r.nodeValue.length,a>0&&l>a||(n?a==l:0===a))return}else{if(!(a0?a-1:a;r=r.childNodes[u],r.hasChildNodes()&&(r=r.firstChild)}for(i=new f(r,e);o=i[n?"prev":"next"]();){if(3===o.nodeType&&o.nodeValue.length>0)return;if("true"===t(o))return o}return e}var r,a,l,d,u;o(),l=s.isCollapsed(),r=n(s.getStart()),a=n(s.getEnd()),(r||a)&&(d=s.getRng(!0),l?(r=r||a,(u=e(r,!0))?i(u,!0):(u=e(r,!1))?i(u,!1):s.select(r)):(d=s.getRng(!0),r&&d.setStartBefore(r),a&&d.setEndAfter(a),s.setRng(d)))}function d(a){function i(e,t){for(;e=e[t?"previousSibling":"nextSibling"];)if(3!==e.nodeType||e.nodeValue.length>0)return e}function d(e,t){s.select(e),s.collapse(t)}function g(a){function i(e){for(var t=d;t;){if(t===e)return;t=t.parentNode}u.remove(e),l()}function o(){var r,o,l=e.schema.getNonEmptyElements();for(o=new tinymce.dom.TreeWalker(d,e.getBody());(r=a?o.prev():o.next())&&!l[r.nodeName.toLowerCase()]&&!(3===r.nodeType&&tinymce.trim(r.nodeValue).length>0);)if("false"===t(r))return i(r),!0;return n(r)?!0:!1}var f,d,c,g;if(s.isCollapsed()){if(f=s.getRng(!0),d=f.startContainer,c=f.startOffset,d=r(d)||d,g=n(d))return i(g),!1;if(3==d.nodeType&&(a?c>0:ch||h>124)&&h!=c.DELETE&&h!=c.BACKSPACE){if((tinymce.isMac?a.metaKey:a.ctrlKey)&&(67==h||88==h||86==h))return;if(a.preventDefault(),h==c.LEFT||h==c.RIGHT){var y=h==c.LEFT;if(e.dom.isBlock(m)){var T=y?m.previousSibling:m.nextSibling,C=new f(T,T),b=y?C.prev():C.next();d(b,!y)}else d(m,y)}}else if(h==c.LEFT||h==c.RIGHT||h==c.BACKSPACE||h==c.DELETE){if(p=r(v)){if(h==c.LEFT||h==c.BACKSPACE)if(m=i(p,!0),m&&"false"===t(m)){if(a.preventDefault(),h!=c.LEFT)return void u.remove(m);d(m,!0)}else o(p);if(h==c.RIGHT||h==c.DELETE)if(m=i(p),m&&"false"===t(m)){if(a.preventDefault(),h!=c.RIGHT)return void u.remove(m);d(m,!1)}else o(p)}if((h==c.BACKSPACE||h==c.DELETE)&&!g(h==c.BACKSPACE))return a.preventDefault(),!1}}var u=e.dom,s=e.selection,g="mce_noneditablecaret",m="";e.on("mousedown",function(n){var r=e.selection.getNode();"false"===t(r)&&r==n.target&&l()}),e.on("mouseup keyup",l),e.on("keydown",d)}function a(t){var n=l.length,r=t.content,a=tinymce.trim(o);if("raw"!=t.format){for(;n--;)r=r.replace(l[n],function(t){var n=arguments,i=n[n.length-2];return i>0&&'"'==r.charAt(i-1)?t:''+e.dom.encode("string"==typeof n[1]?n[1]:n[0])+""});t.content=r}}var i,o,l,f=tinymce.dom.TreeWalker,d="contenteditable",u="data-mce-"+d,c=tinymce.util.VK;i=" "+tinymce.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",o=" "+tinymce.trim(e.getParam("noneditable_noneditable_class","mceNonEditable"))+" ",l=e.getParam("noneditable_regexp"),l&&!l.length&&(l=[l]),e.on("PreInit",function(){r(),l&&e.on("BeforeSetContent",a),e.parser.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=e[r],t=" "+n.attr("class")+" ",-1!==t.indexOf(i)?n.attr(u,"true"):-1!==t.indexOf(o)&&n.attr(u,"false")}),e.serializer.addAttributeFilter(u,function(e){for(var t,n=e.length;n--;)t=e[n],l&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):(t.attr(d,null),t.attr(u,null))}),e.parser.addAttributeFilter(d,function(e){for(var t,n=e.length;n--;)t=e[n],t.attr(u,t.attr(d)),t.attr(d,null)})}),e.on("drop",function(e){n(e.target)&&e.preventDefault()})});tinymce.PluginManager.add("pagebreak",function(e){var a="mce-pagebreak",t=e.getParam("pagebreak_separator",""),n=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),r='';e.addCommand("mcePageBreak",function(){e.insertContent(e.settings.pagebreak_split_block?"

"+r+"

":r)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,a)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,a)&&e.selection.select(t)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(a){for(var n,r,c=a.length;c--;)if(n=a[c],r=n.attr("class"),r&&-1!==r.indexOf("mce-pagebreak")){var o=n.parent;if(e.schema.getBlockElements()[o.name]&&e.settings.pagebreak_split_block){o.type=3,o.value=t,o.raw=!0,n.remove();continue}n.type=3,n.value=t,n.raw=!0}})})});!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!o?e=n.filter(e,[[/\n/g,"
"]]):(e=n.filter(e,[[/\n\n/g,"

"+a],[/^(.*<\/p>)(

)$/,a+"$1"],[/\n/g,"
"]]),-1!=e.indexOf("

")&&(e=a+e)),r(e)}function a(){var t=i.dom,n=i.getBody(),r=i.dom.getViewPort(i.getWin()),o=r.y,a=20,s;if(v=i.selection.getRng(),i.inline&&(s=i.selection.getScrollContainer(),s&&s.scrollTop>0&&(o=s.scrollTop)),v.getClientRects){var l=v.getClientRects();if(l.length)a=o+(l[0].top-t.getPos(n).y);else{a=o;var c=v.startContainer;c&&(3==c.nodeType&&c.parentNode!=n&&(c=c.parentNode),1==c.nodeType&&(a=t.getPos(c,s||n).y))}}h=t.add(i.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: absolute; top: "+a+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},y),(e.ie||e.gecko)&&t.setStyle(h,"left","rtl"==t.getStyle(n,"direction",!0)?65535:-65535),t.bind(h,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),h.focus(),i.selection.select(h,!0)}function s(){if(h){for(var e;e=i.dom.get("mcepastebin");)i.dom.remove(e),i.dom.unbind(e);v&&i.selection.setRng(v)}x=!1,h=v=null}function l(){var e=y,t,n;for(t=i.dom.select("div[id=mcepastebin]"),n=t.length;n--;){var r=t[n].innerHTML;e==y&&(e=""),r.length>e.length&&(e=r)}return e}function c(e){var t={};if(e&&e.types){var n=e.getData("Text");n&&n.length>0&&(t["text/plain"]=n);for(var i=0;i')},t.readAsDataURL(e.getAsFile()),!0}}if(!(!i.settings.paste_data_images||"text/html"in t||"text/plain"in t)&&e.clipboardData){var o=e.clipboardData.items;if(o)for(var a=0;a0}function p(){i.on("keydown",function(n){if(!n.isDefaultPrevented()&&(t.metaKeyPressed(n)&&86==n.keyCode||n.shiftKey&&45==n.keyCode)){if(x=n.shiftKey&&86==n.keyCode,n.stopImmediatePropagation(),b=(new Date).getTime(),e.ie&&x)return n.preventDefault(),void i.fire("paste",{ieFake:!0});s(),a()}}),i.on("paste",function(t){var c=d(t),f=(new Date).getTime()-b<1e3,p="text"==g.pasteFormat||x;return t.isDefaultPrevented()?void s():u(t,c)?void s():(f||t.preventDefault(),!e.ie||f&&!t.ieFake||(a(),i.dom.bind(h,"paste",function(e){e.stopPropagation()}),i.getDoc().execCommand("Paste",!1,null),c["text/html"]=l()),void setTimeout(function(){var e=l();return h&&h.firstChild&&"mcepastebin"===h.firstChild.id&&(p=!0),s(),!p&&f&&e&&e!=y&&(c["text/html"]=e),e!=y&&f||(e=c["text/html"]||c["text/plain"]||y,e!=y)?(!m(c,"text/html")&&m(c,"text/plain")&&(p=!0),void(p?o(c["text/plain"]||n.innerText(e)):r(e))):void(f||i.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."))},0))}),i.on("dragstart",function(e){if(e.dataTransfer.types)try{e.dataTransfer.setData("mce-internal",i.selection.getContent())}catch(t){}}),i.on("drop",function(e){var t=f(e);if(t&&!e.isDefaultPrevented()){var n=c(e.dataTransfer),a=n["mce-internal"]||n["text/html"]||n["text/plain"];a&&(e.preventDefault(),i.undoManager.transact(function(){n["mce-internal"]&&i.execCommand("Delete"),i.selection.setRng(t),n["text/html"]?r(a):o(a)}))}})}var g=this,h,v,b=0,y="%MCEPASTEBIN%",x;g.pasteHtml=r,g.pasteText=o,i.on("preInit",function(){p(),i.parser.addNodeFilter("img",function(t){if(!i.settings.paste_data_images)for(var n=t.length;n--;){var r=t[n].attributes.map.src;r&&0===r.indexOf("data:image")&&(t[n].attr("data-mce-object")||r===e.transparentSrc||t[n].remove())}})}),i.on("PreProcess",function(){i.dom.remove(i.dom.get("mcepastebin"))})}}),i(g,[c,d,u,h,v,l],function(e,t,n,i,r,o){function a(e){return/l?n&&(n=n.parent.parent):(i=n,n=null)),n&&n.name==a?n.append(e):(i=i||n,n=new r(a,1),s>1&&n.attr("start",""+s),e.wrap(n)),e.name="li",t.value="";var c=t.next;c&&3==c.type&&(c.value=c.value.replace(/^\u00a0+/,"")),l>o&&i&&i.lastChild.append(n),o=l}for(var n,i,o=1,a=e.getAll("p"),s=0;s/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var g=l.paste_word_valid_elements;g||(g="-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-table[width],-tr,-td[colspan|rowspan|width],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,del");var h=new n({valid_elements:g,valid_children:"-li[p]"});e.each(h.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var v=new t({},h);v.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",u(n,n.attr("style"))),"span"==n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),v.addAttributeFilter("class",function(e){for(var t=e.length,n,i;t--;)n=e[t],i=n.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(i)&&n.remove(),n.attr("class",null)}),v.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),v.addNodeFilter("a",function(e){for(var t=e.length,n,i,r;t--;)if(n=e[t],i=n.attr("href"),r=n.attr("name"),i&&-1!=i.indexOf("#_msocom_"))n.remove();else if(i&&0===i.indexOf("file://")&&(i=i.split("#")[1],i&&(i="#"+i)),i||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){n.unwrap();continue}n.attr({href:i,name:r})}else n.unwrap()});var b=v.parse(f);d(b),c.content=new i({},h).serialize(b)}})}return s.isWordContent=a,s}),i(b,[m,c,g,l],function(e,t,n,i){return function(r){function o(e){r.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){return e=i.filter(e,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/|/g,[/\u00a0<\/span>/g,"\xa0"],/
$/i])}function s(e){if(!n.isWordContent(e))return e;var o=[];t.each(r.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:
 [\\s\\r\\n]+|
)*(<\\/?("+o.join("|")+")[^>]*>)(?:
 [\\s\\r\\n]+|
)*","g");return e=i.filter(e,[[a,"$1"]]),e=i.filter(e,[[/

/g,"

"],[/
/g," "],[/

/g,"
"]])}function l(e){if(n.isWordContent(e))return e;var t=r.settings.paste_webkit_styles;if(r.settings.paste_remove_styles_if_webkit===!1||"all"==t)return e;if(t&&(t=t.split(/[, ]/)),t){var i=r.dom,o=r.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,r,a){var s=i.parseStyle(r,"span"),l={};if("none"===t)return n+a;for(var c=0;c]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,i){return t+' style="'+n+'"'+i})}e.webkit&&(o(l),o(a)),e.ie&&o(s)}}),i(y,[x,f,g,b],function(e,t,n,i){var r;e.add("paste",function(e){function o(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),r||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),r=!0))}var a=this,s,l=e.settings;a.clipboard=s=new t(e),a.quirks=new i(e),a.wordFilter=new n(e),e.settings.paste_as_text&&(a.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(a,a,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(a,a,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&a.clipboard.pasteHtml(t.content),t.text&&a.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:o,active:"text"==a.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:o})})}),a([l,f,g,b,y])}(this);tinymce.PluginManager.add("preview",function(e){var t=e.settings,i=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var n,a="";a+='',tinymce.each(e.contentCSS,function(t){a+=''});var r=t.body_id||"tinymce";-1!=r.indexOf("=")&&(r=e.getParam("body_id","","hash"),r=r[e.id]||r);var d=t.body_class||"";-1!=d.indexOf("=")&&(d=e.getParam("body_class","","hash"),d=d[e.id]||"");var o=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(n=""+a+'"+e.getContent()+"",i)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(n);else{var s=this.getEl("body").firstChild.contentWindow.document;s.open(),s.write(n),s.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})});tinymce.PluginManager.add("print",function(t){t.addCommand("mcePrint",function(){t.getWin().print()}),t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addShortcut("Ctrl+P","","mcePrint"),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})});tinymce.PluginManager.add("save",function(e){function a(){var a;return a=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty",!0)||e.isDirty()?(tinymce.triggerSave(),e.getParam("save_onsavecallback")?void(e.execCallback("save_onsavecallback",e)&&(e.startContent=tinymce.trim(e.getContent({format:"raw"})),e.nodeChanged())):void(a?(e.isNotDirty=!0,(!a.onsubmit||a.onsubmit())&&("function"==typeof a.submit?a.submit():e.windowManager.alert("Error: Form submit field collision.")),e.nodeChanged()):e.windowManager.alert("Error: No form element found."))):void 0}function n(){var a=tinymce.trim(e.startContent);return e.getParam("save_oncancelcallback")?void e.execCallback("save_oncancelcallback",e):(e.setContent(a),e.undoManager.clear(),void e.nodeChanged())}function t(){var a=this;e.on("nodeChange",function(){a.disabled(e.getParam("save_enablewhendirty",!0)&&!e.isDirty())})}e.addCommand("mceSave",a),e.addCommand("mceCancel",n),e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:t}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:t}),e.addShortcut("ctrl+s","","mceSave")});!function(){function e(e,t,n,a,r){function i(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var a=e[t];if(!a)throw"Invalid capture group";n+=e[0].indexOf(a),e[0]=a}return[n,n+e[0].length,[e[0]]]}function d(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!u[e.nodeName])return"";if(t="",(u[e.nodeName]||m[e.nodeName])&&(t+="\n"),e=e.firstChild)do t+=d(e);while(e=e.nextSibling);return t}function o(e,t,n){var a,r,i,d,o=[],l=0,c=e,s=t.shift(),f=0;e:for(;;){if((u[c.nodeName]||m[c.nodeName])&&l++,3===c.nodeType&&(!r&&c.length+l>=s[1]?(r=c,d=s[1]-l):a&&o.push(c),!a&&c.length+l>s[0]&&(a=c,i=s[0]-l),l+=c.length),a&&r){if(c=n({startNode:a,startNodeIndex:i,endNode:r,endNodeIndex:d,innerNodes:o,match:s[2],matchIndex:f}),l-=r.length-d,a=null,r=null,o=[],s=t.shift(),f++,!s)break}else{if((!h[c.nodeName]||u[c.nodeName])&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function l(e){var t;if("function"!=typeof e){var n=e.nodeType?e:f.createElement(e);t=function(e,t){var a=n.cloneNode(!1);return a.setAttribute("data-mce-index",t),e&&a.appendChild(f.createTextNode(e)),a}}else t=e;return function(e){var n,a,r,i=e.startNode,d=e.endNode,o=e.matchIndex;if(i===d){var l=i;r=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),r.insertBefore(n,l));var c=t(e.match[0],o);return r.insertBefore(c,l),e.endNodeIndexh;++h){var g=e.innerNodes[h],p=t(g.data,o);g.parentNode.replaceChild(p,g),u.push(p)}var x=t(d.data.substring(0,e.endNodeIndex),o);return r=i.parentNode,r.insertBefore(n,i),r.insertBefore(s,i),r.removeChild(i),r=d.parentNode,r.insertBefore(x,d),r.insertBefore(a,d),r.removeChild(d),x}}var c,s,f,u,h,m,g=[],p=0;if(f=t.ownerDocument,u=r.getBlockElements(),h=r.getWhiteSpaceElements(),m=r.getShortEndedElements(),s=d(t)){if(e.global)for(;c=e.exec(s);)g.push(i(c,a));else c=s.match(e),g.push(i(c,a));return g.length&&(p=g.length,o(t,g,l(n))),p}}function t(t){function n(){function e(){r.statusbar.find("#next").disabled(!d(s+1).length),r.statusbar.find("#prev").disabled(!d(s-1).length)}function n(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){r.find("#find")[0].focus()})}var a={},r=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){t.focus(),c.done()},onSubmit:function(t){var i,o,l,f;return t.preventDefault(),o=r.find("#case").checked(),f=r.find("#words").checked(),l=r.find("#find").value(),l.length?a.text==l&&a.caseState==o&&a.wholeWord==f?0===d(s+1).length?void n():(c.next(),void e()):(i=c.find(l,o,f),i||n(),r.statusbar.items().slice(1).disabled(0===i),e(),void(a={text:l,caseState:o,wholeWord:f})):(c.done(!1),void r.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",onclick:function(){r.submit()}},{text:"Replace",disabled:!0,onclick:function(){c.replace(r.find("#replace").value())||(r.statusbar.items().slice(1).disabled(!0),s=-1,a={})}},{text:"Replace all",disabled:!0,onclick:function(){c.replace(r.find("#replace").value(),!0,!0),r.statusbar.items().slice(1).disabled(!0),a={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){c.prev(),e()}},{text:"Next",name:"next",disabled:!0,onclick:function(){c.next(),e()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:t.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function a(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function r(n){var a,r;return r=t.dom.create("span",{"data-mce-bogus":1}),r.className="mce-match-marker",a=t.getBody(),c.done(!1),e(n,a,r,!1,t.schema)}function i(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function d(e){var n,r=[];if(n=tinymce.toArray(t.getBody().getElementsByTagName("span")),n.length)for(var i=0;is&&f[o].setAttribute("data-mce-index",m-1)}return t.undoManager.add(),s=p,n?(g=d(p+1).length>0,c.next()):(g=d(p-1).length>0,c.prev()),!r&&g},c.done=function(e){var n,r,d,o;for(r=tinymce.toArray(t.getBody().getElementsByTagName("span")),n=0;n=d.end?(r=c,a=d.end-s):o&&l.push(c),!o&&c.length+s>d.start&&(o=c,i=d.start-s),s+=c.length),o&&r){if(c=n({startNode:o,startNodeIndex:i,endNode:r,endNodeIndex:a,innerNodes:l,match:d.text,matchIndex:u}),s-=r.length-a,o=null,r=null,l=[],d=t.shift(),u++,!d)break}else{if((!P[c.nodeName]||S[c.nodeName])&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function i(e){function t(t,n){var o=w[n];o.stencil||(o.stencil=e(o));var r=o.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",n),t&&r.appendChild(k.doc.createTextNode(t)),r}return function(e){var n,o,r,i=e.startNode,a=e.endNode,l=e.matchIndex,s=k.doc;if(i===a){var c=i;r=c.parentNode,e.startNodeIndex>0&&(n=s.createTextNode(c.data.substring(0,e.startNodeIndex)),r.insertBefore(n,c));var d=t(e.match,l);return r.insertBefore(d,c),e.endNodeIndexm;++m){var g=e.innerNodes[m],h=t(g.data,l);g.parentNode.replaceChild(h,g),f.push(h)}var v=t(a.data.substring(0,e.endNodeIndex),l);return r=i.parentNode,r.insertBefore(n,i),r.insertBefore(u,i),r.removeChild(i),r=a.parentNode,r.insertBefore(v,a),r.insertBefore(o,a),r.removeChild(a),v}}function a(e){var t=e.parentNode;t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function l(t){var n=e.getElementsByTagName("*"),o=[];t="number"==typeof t?""+t:null;for(var r=0;rt&&e(w[t],t)!==!1;t++);return this}function u(t){return w.length&&r(e,w,i(t)),this}function f(e,t){if(C&&e.global)for(;x=e.exec(C);)w.push(n(x,t));return this}function m(e){var t,n=l(e?s(e):null);for(t=n.length;t--;)a(n[t]);return this}function p(e){return w[e.getAttribute("data-mce-index")]}function g(e){return l(s(e))[0]}function h(e,t,n){return w.push({start:e,end:e+t,text:C.substr(e,t),data:n}),this}function v(e){var n=l(s(e)),o=t.dom.createRng();return o.setStartBefore(n[0]),o.setEndAfter(n[n.length-1]),o}function b(e,n){var o=v(e);return o.deleteContents(),n.length>0&&o.insertNode(t.dom.doc.createTextNode(n)),o}function y(){return w.splice(0,w.length),m(),this}var x,w=[],C,k=t.dom,S,P,N;return S=t.schema.getBlockElements(),P=t.schema.getWhiteSpaceElements(),N=t.schema.getShortEndedElements(),C=o(e),{text:C,matches:w,each:d,filter:c,reset:y,matchFromElement:p,elementFromMatch:g,find:f,add:h,wrap:u,unwrap:m,replace:b,rangeFromMatch:v,indexOf:s}}}),o(c,[s,d,u,f,m,p,g,h],function(e,t,n,o,r,i,a,l){t.add("spellchecker",function(t,s){function c(){return C.textMatcher||(C.textMatcher=new e(t.getBody(),t)),C.textMatcher}function d(e,t){var o=[];return n.each(t,function(e){o.push({selectable:!0,text:e.name,data:e.value})}),o}function u(e){for(var t in e)return!1;return!0}function f(e,i){var a=[],l=k[e];n.each(l,function(e){a.push({text:e,onclick:function(){t.insertContent(t.dom.encode(e)),t.dom.remove(i),g()}})}),a.push.apply(a,[{text:"-"},{text:"Ignore",onclick:function(){h(e,i)}},{text:"Ignore all",onclick:function(){h(e,i,!0)}},{text:"Finish",onclick:v}]),P=new o({items:a,context:"contextmenu",onautohide:function(e){-1!=e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){P.remove(),P=null}}),P.renderTo(document.body);var s=r.DOM.getPos(t.getContentAreaContainer()),c=t.dom.getPos(i[0]),d=t.dom.getRoot();"BODY"==d.nodeName?(c.x-=d.ownerDocument.documentElement.scrollLeft||d.scrollLeft,c.y-=d.ownerDocument.documentElement.scrollTop||d.scrollTop):(c.x-=d.scrollLeft,c.y-=d.scrollTop),s.x+=c.x,s.y+=c.y,P.moveTo(s.x,s.y+i[0].offsetHeight)}function m(){return t.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e]+',"g")}function p(){function e(e){return t.setProgressState(!1),u(e)?(t.windowManager.alert("No misspellings found"),void(S=!1)):(k=e,c().find(m()).filter(function(t){return!!e[t.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":e.text})}),void t.fire("SpellcheckStart"))}function n(e){t.windowManager.alert(e),t.setProgressState(!1),v()}function o(e,t,o){i.send({url:new a(s).toAbsolute(N.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:"text="+encodeURIComponent(t)+"&lang="+N.spellchecker_language,success:function(e){e=l.parse(e),e?e.error?n(e.error):o(e.words):n("Sever response wasn't proper JSON.")},error:function(e,t){n("Spellchecker request error: "+t.status)}})}if(S)return void v();v(),S=!0,t.setProgressState(!0);var r=N.spellchecker_callback||o;r.call(C,"spellcheck",c().text,e,n),t.focus()}function g(){t.dom.select("span.mce-spellchecker-word").length||v()}function h(e,o,r){t.selection.collapse(),r?n.each(t.dom.select("span.mce-spellchecker-word"),function(n){n.getAttribute("data-mce-word")==e&&t.dom.remove(n,!0)}):t.dom.remove(o,!0),g()}function v(){c().reset(),C.textMatcher=null,S&&(S=!1,t.fire("SpellcheckEnd"))}function b(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function y(e){var o,r=[];if(o=n.toArray(t.getBody().getElementsByTagName("span")),o.length)for(var i=0;i0){var r=t.dom.createRng();r.setStartBefore(o[0]),r.setEndAfter(o[o.length-1]),t.selection.setRng(r),f(n.getAttribute("data-mce-word"),o)}}}),t.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:p,selectable:!0,onPostRender:function(){var e=this;t.on("SpellcheckStart SpellcheckEnd",function(){e.active(S)})}});var T={tooltip:"Spellcheck",onclick:p,onPostRender:function(){var e=this;t.on("SpellcheckStart SpellcheckEnd",function(){e.active(S)})}};w.length>1&&(T.type="splitbutton",T.menu=w,T.onshow=x,T.onselect=function(e){N.spellchecker_language=e.control.settings.data}),t.addButton("spellchecker",T),t.addCommand("mceSpellCheck",p),t.on("remove",function(){P&&(P.remove(),P=null)}),t.on("change",g),this.getTextMatcher=c,this.getWordCharPattern=m,this.getLanguage=function(){return N.spellchecker_language},N.spellchecker_language=N.spellchecker_language||N.language||"en"})}),a([s,c])}(this);tinymce.PluginManager.add("tabfocus",function(e){function n(e){9!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}function t(n){function t(n){function t(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&t(e.parentNode)}function r(e){return e.tabIndex||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function c(e){return!r(e)&&"-1"!=e.getAttribute("tabindex")&&t(e)}if(u=i.select(":input:enabled,*[tabindex]:not(iframe)"),o(u,function(n,t){return n.id==e.id?(a=t,!1):void 0}),n>0){for(d=a+1;d=0;d--)if(c(u[d]))return u[d];return null}var a,u,c,d;if(!(9!==n.keyCode||n.ctrlKey||n.altKey||n.metaKey)&&(c=r(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==c.length&&(c[1]=c[0],c[0]=":prev"),u=n.shiftKey?":prev"==c[0]?t(-1):i.get(c[0]):":next"==c[1]?t(1):i.get(c[1]))){var y=tinymce.get(u.id||u.name);u.id&&y?y.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),u.focus()},10),n.preventDefault()}}var i=tinymce.DOM,o=tinymce.each,r=tinymce.explode;e.on("init",function(){e.inline&&tinymce.DOM.setAttrib(e.getBody(),"tabIndex",null)}),e.on("keyup",n),tinymce.Env.gecko?e.on("keypress keydown",t):e.on("keydown",t)});!function(e,t){"use strict";function n(e,t){for(var n,o=[],i=0;i "+t+" tr",a);i(n,function(n,r){r+=e,i(I.select("> td, > th",n),function(e,n){var i,a,l,s;if(A[r])for(;A[r][n];)n++;for(l=o(e,"rowspan"),s=o(e,"colspan"),a=r;r+l>a;a++)for(A[a]||(A[a]=[]),i=n;n+s>i;i++)A[a][i]={part:t,real:a==r&&i==n,elm:e,rowspan:l,colspan:s}})}),e+=n.length})}function s(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function c(e,t){var n;return n=A[t],n?n[e]:void 0}function d(e,t,n){e&&(n=parseInt(n,10),1===n?e.removeAttribute(t,1):e.setAttribute(t,n,1))}function u(e){return e&&(I.hasClass(e.elm,"mce-item-selected")||e==M)}function f(){var e=[];return i(a.rows,function(t){i(t.cells,function(n){return I.hasClass(n,"mce-item-selected")||M&&n==M.elm?(e.push(t),!1):void 0})}),e}function m(){var e=I.createRng();e.setStartAfter(a),e.setEndAfter(a),E.setRng(e),I.remove(a)}function p(t){var o,a={};return r.settings.table_clone_elements!==!1&&(a=e.makeMap((r.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),e.walk(t,function(e){var r;return 3==e.nodeType?(i(I.getParents(e.parentNode,null,t).reverse(),function(e){a[e.nodeName]&&(e=s(e,!1),o?r&&r.appendChild(e):o=r=e,r=e)}),r&&(r.innerHTML=n.ie?" ":'
'),!1):void 0},"childNodes"),t=s(t,!1),d(t,"rowSpan",1),d(t,"colSpan",1),o?t.appendChild(o):n.ie||(t.innerHTML='
'),t}function g(){var e=I.createRng(),t;return i(I.select("tr",a),function(e){0===e.cells.length&&I.remove(e)}),0===I.select("tr",a).length?(e.setStartBefore(a),e.setEndBefore(a),E.setRng(e),void I.remove(a)):(i(I.select("thead,tbody,tfoot",a),function(e){0===e.rows.length&&I.remove(e)}),l(),void(B&&(t=A[Math.min(A.length-1,B.y)],t&&(E.select(t[Math.min(t.length-1,B.x)].elm,!0),E.collapse(!0)))))}function h(e,t,n,o){var i,r,a,l,s;for(i=A[t][e].elm.parentNode,a=1;n>=a;a++)if(i=I.getNext(i,"tr")){for(r=e;r>=0;r--)if(s=A[t+a][r].elm,s.parentNode==i){for(l=1;o>=l;l++)I.insertAfter(p(s),s);break}if(-1==r)for(l=1;o>=l;l++)i.insertBefore(p(i.cells[0]),i.cells[0])}}function v(){i(A,function(e,t){i(e,function(e,n){var i,r,a;if(u(e)&&(e=e.elm,i=o(e,"colspan"),r=o(e,"rowspan"),i>1||r>1)){for(d(e,"rowSpan",1),d(e,"colSpan",1),a=0;i-1>a;a++)I.insertAfter(p(e),e);h(n,t,r-1,i)}})})}function b(t,n,o){var r,a,s,f,m,p,h,b,y,w,x;if(t?(r=T(t),a=r.x,s=r.y,f=a+(n-1),m=s+(o-1)):(B=D=null,i(A,function(e,t){i(e,function(e,n){u(e)&&(B||(B={x:n,y:t}),D={x:n,y:t})})}),B&&(a=B.x,s=B.y,f=D.x,m=D.y)),b=c(a,s),y=c(f,m),b&&y&&b.part==y.part){for(v(),l(),b=c(a,s).elm,d(b,"colSpan",f-a+1),d(b,"rowSpan",m-s+1),h=s;m>=h;h++)for(p=a;f>=p;p++)A[h]&&A[h][p]&&(t=A[h][p].elm,t!=b&&(w=e.grep(t.childNodes),i(w,function(e){b.appendChild(e)}),w.length&&(w=e.grep(b.childNodes),x=0,i(w,function(e){"BR"==e.nodeName&&I.getAttrib(e,"data-mce-bogus")&&x++0&&A[n-1][l]&&(g=A[n-1][l].elm,h=o(g,"rowSpan"),h>1)){d(g,"rowSpan",h+1);continue}}else if(h=o(r,"rowspan"),h>1){d(r,"rowSpan",h+1);continue}m=p(r),d(m,"colSpan",r.colSpan),f.appendChild(m),a=r}f.hasChildNodes()&&(e?c.parentNode.insertBefore(f,c):I.insertAfter(f,c))}}function w(e){var t,n;i(A,function(n){return i(n,function(n,o){return u(n)&&(t=o,e)?!1:void 0}),e?!t:void 0}),i(A,function(i,r){var a,l,s;i[t]&&(a=i[t].elm,a!=n&&(s=o(a,"colspan"),l=o(a,"rowspan"),1==s?e?(a.parentNode.insertBefore(p(a),a),h(t,r,l-1,s)):(I.insertAfter(p(a),a),h(t,r,l-1,s)):d(a,"colSpan",a.colSpan+1),n=a))})}function x(){var t=[];i(A,function(n){i(n,function(n,r){u(n)&&-1===e.inArray(t,r)&&(i(A,function(e){var t=e[r].elm,n;n=o(t,"colSpan"),n>1?d(t,"colSpan",n-1):I.remove(t)}),t.push(r))})}),g()}function C(){function e(e){var t,n,r;t=I.getNext(e,"tr"),i(e.cells,function(e){var t=o(e,"rowSpan");t>1&&(d(e,"rowSpan",t-1),n=T(e),h(n.x,n.y,1,1))}),n=T(e.cells[0]),i(A[n.y],function(e){var t;e=e.elm,e!=r&&(t=o(e,"rowSpan"),1>=t?I.remove(e):d(e,"rowSpan",t-1),r=e)})}var t;t=f(),i(t.reverse(),function(t){e(t)}),g()}function P(){var e=f();return I.remove(e),g(),e}function S(){var e=f();return i(e,function(t,n){e[n]=s(t,!0)}),e}function R(e,t){var n=f(),o=n[t?0:n.length-1],r=o.cells.length;e&&(i(A,function(e){var t;return r=0,i(e,function(e){e.real&&(r+=e.colspan),e.elm.parentNode==o&&(t=1)}),t?!1:void 0}),t||e.reverse(),i(e,function(e){var n,i=e.cells.length,a;for(n=0;i>n;n++)a=e.cells[n],d(a,"colSpan",1),d(a,"rowSpan",1);for(n=i;r>n;n++)e.appendChild(p(e.cells[i-1]));for(n=r;i>n;n++)I.remove(e.cells[n]);t?o.parentNode.insertBefore(e,o):I.insertAfter(e,o)}),I.removeClass(I.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function T(e){var t;return i(A,function(n,o){return i(n,function(n,i){return n.elm==e?(t={x:i,y:o},!1):void 0}),!t}),t}function k(e){B=T(e)}function N(){var e,t;return e=t=0,i(A,function(n,o){i(n,function(n,i){var r,a;u(n)&&(n=A[o][i],i>e&&(e=i),o>t&&(t=o),n.real&&(r=n.colspan-1,a=n.rowspan-1,r&&i+r>e&&(e=i+r),a&&o+a>t&&(t=o+a)))})}),{x:e,y:t}}function _(e){var t,n,o,i,r,a,l,s,c,d;if(D=T(e),B&&D){for(t=Math.min(B.x,D.x),n=Math.min(B.y,D.y),o=Math.max(B.x,D.x),i=Math.max(B.y,D.y),r=o,a=i,d=n;a>=d;d++)e=A[d][t],e.real||t-(e.colspan-1)=c;c++)e=A[n][c],e.real||n-(e.rowspan-1)=d;d++)for(c=t;o>=c;c++)e=A[d][c],e.real&&(l=e.colspan-1,s=e.rowspan-1,l&&c+l>r&&(r=c+l),s&&d+s>a&&(a=d+s));for(I.removeClass(I.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),d=n;a>=d;d++)for(c=t;r>=c;c++)A[d][c]&&I.addClass(A[d][c].elm,"mce-item-selected")}}var A,B,D,M,E=r.selection,I=E.dom;a=a||I.getParent(E.getStart(),"table"),l(),M=I.getParent(E.getStart(),"th,td"),M&&(B=T(M),D=N(),M=c(B.x,B.y)),e.extend(this,{deleteTable:m,split:v,merge:b,insertRow:y,insertCol:w,deleteCols:x,deleteRows:C,cutRows:P,copyRows:S,pasteRows:R,getPos:T,setStartCell:k,setEndCell:_})}}),o(u,[f,d,c],function(e,t,n){function o(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=n.each;return function(n){function r(){function t(t){function r(e,o){var i=e?"previousSibling":"nextSibling",r=n.dom.getParent(o,"tr"),l=r[i];if(l)return h(n,o,l,e),t.preventDefault(),!0;var d=n.dom.getParent(r,"table"),u=r.parentNode,f=u.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var m=a(e,d,u,"tbody");if(null!==m)return s(e,m,o)}return c(e,r,i,d)}function a(e,t,o,i){var r=n.dom.select(">"+i,t),a=r.indexOf(o);if(e&&0===a||!e&&a===r.length-1)return l(e,t);if(-1===a){var s="thead"===o.tagName.toLowerCase()?0:r.length-1;return r[s]}return r[a+(e?-1:1)]}function l(e,t){var o=e?"thead":"tfoot",i=n.dom.select(">"+o,t);return 0!==i.length?i[0]:null}function s(e,o,i){var r=d(o,e);return r&&h(n,i,r,e),t.preventDefault(),!0}function c(e,o,i,a){var l=a[i];if(l)return u(l),!0;var s=n.dom.getParent(a,"td,th");if(s)return r(e,s,t);var c=d(o,!e);return u(c),t.preventDefault(),!1}function d(e,t){var o=e&&e[t?"lastChild":"firstChild"];return o&&"BR"===o.nodeName?n.dom.getParent(o,"td,th"):o}function u(e){n.selection.setCursorLocation(e,0)}function f(){return y==e.UP||y==e.DOWN}function m(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"tr");return null!==n}function p(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=o(n,"colspan");return t}function g(e,t){var n=0,r=0;return i(e.children,function(e,i){return n+=o(e,"colspan"),r=i,n>t?!1:void 0}),r}function h(e,t,o,i){var r=p(n.dom.getParent(t,"td,th")),a=g(o,r),l=o.childNodes[a],s=d(l,i);u(s||l)}function v(e){var t=n.selection.getNode(),o=n.dom.getParent(t,"td,th"),i=n.dom.getParent(e,"td,th");return o&&o!==i&&b(o,i)}function b(e,t){return n.dom.getParent(e,"TABLE")===n.dom.getParent(t,"TABLE")}var y=t.keyCode;if(f()&&m(n)){var w=n.selection.getNode();setTimeout(function(){v(w)&&r(!t.shiftKey&&y===e.UP,w,t)},0)}}n.on("KeyDown",function(e){t(e)})}function a(){function e(e,t){var n=t.ownerDocument,o=n.createRange(),i;return o.setStartBefore(t),o.setEnd(e.endContainer,e.endOffset),i=n.createElement("body"),i.appendChild(o.cloneContents()),0===i.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}n.on("KeyDown",function(t){var o,i,r=n.dom;(37==t.keyCode||38==t.keyCode)&&(o=n.selection.getRng(),i=r.getParent(o.startContainer,"table"),i&&n.getBody().firstChild==i&&e(o,i)&&(o=r.createRng(),o.setStartBefore(i),o.setEndBefore(i),n.selection.setRng(o),t.preventDefault()))})}function l(){n.on("KeyDown SetContent VisualAid",function(){var e;for(e=n.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&!e.getAttribute("data-mce-bogus"))break;e&&"TABLE"==e.nodeName&&(n.settings.forced_root_block?n.dom.add(n.getBody(),n.settings.forced_root_block,n.settings.forced_root_block_attrs,t.ie&&t.ie<11?" ":'
'):n.dom.add(n.getBody(),"br",{"data-mce-bogus":"1"}))}),n.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||"\xa0"==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&n.dom.remove(t)})}function s(){function e(e,t,n,o){var i=3,r=e.dom.getParent(t.startContainer,"TABLE"),a,l,s;return r&&(a=r.parentNode),l=t.startContainer.nodeType==i&&0===t.startOffset&&0===t.endOffset&&o&&("TR"==n.nodeName||n==a),s=("TD"==n.nodeName||"TH"==n.nodeName)&&!o,l||s}function t(){var t=n.selection.getRng(),o=n.selection.getNode(),i=n.dom.getParent(t.startContainer,"TD,TH");if(e(n,t,o,i)){i||(i=o);for(var r=i.lastChild;r.lastChild;)r=r.lastChild;t.setEnd(r,r.nodeValue.length),n.selection.setRng(t)}}n.on("KeyDown",function(){t()}),n.on("MouseDown",function(e){2!=e.button&&t()})}function c(){n.on("keydown",function(t){if((t.keyCode==e.DELETE||t.keyCode==e.BACKSPACE)&&!t.isDefaultPrevented()){var o=n.dom.getParent(n.selection.getStart(),"table");if(o){for(var i=n.dom.select("td,th",o),r=i.length;r--;)if(!n.dom.hasClass(i[r],"mce-item-selected"))return;t.preventDefault(),n.execCommand("mceTableDelete")}}})}c(),t.webkit&&(r(),s()),t.gecko&&(a(),l()),t.ie>10&&(a(),l())}}),o(m,[s,p,c],function(e,t,n){return function(o){function i(){o.getBody().style.webkitUserSelect="",d&&(o.dom.removeClass(o.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),d=!1)}function r(t){var n,i,r=t.target;if(s&&(l||r!=s)&&("TD"==r.nodeName||"TH"==r.nodeName)){i=a.getParent(r,"table"),i==c&&(l||(l=new e(o,i),l.setStartCell(s),o.getBody().style.webkitUserSelect="none"),l.setEndCell(r),d=!0),n=o.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(u){}t.preventDefault()}}var a=o.dom,l,s,c,d=!0;return o.on("MouseDown",function(e){2!=e.button&&(i(),s=a.getParent(e.target,"td,th"),c=a.getParent(s,"table"))}),o.on("mouseover",r),o.on("remove",function(){a.unbind(o.getDoc(),"mouseover",r)}),o.on("MouseUp",function(){function e(e,o){var r=new t(e,e);do{if(3==e.nodeType&&0!==n.trim(e.nodeValue).length)return void(o?i.setStart(e,0):i.setEnd(e,e.nodeValue.length));if("BR"==e.nodeName)return void(o?i.setStartBefore(e):i.setEndBefore(e))}while(e=o?r.next():r.prev())}var i,r=o.selection,d,u,f,m,p;if(s){if(l&&(o.getBody().style.webkitUserSelect=""),d=a.select("td.mce-item-selected,th.mce-item-selected"),d.length>0){i=a.createRng(),f=d[0],p=d[d.length-1],i.setStartBefore(f),i.setEndAfter(f),e(f,1),u=new t(f,a.getParent(d[0],"table"));do if("TD"==f.nodeName||"TH"==f.nodeName){if(!a.hasClass(f,"mce-item-selected"))break;m=f}while(f=u.next());e(m),r.setRng(i)}o.nodeChanged(),s=l=c=null}}),o.on("KeyUp Drop",function(){i(),s=l=c=null}),{clear:i}}}),o(g,[s,u,m,c,p,d,h],function(e,t,n,o,i,r,a){function l(o){function i(e){return e?e.replace(/px$/,""):""}function a(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(e){s("left center right".split(" "),function(t){o.formatter.remove("align"+t,{},e)})}function c(e){s("top middle bottom".split(" "),function(t){o.formatter.remove("valign"+t,{},e)})}function d(){var e=o.dom,t,n,c,d;t=e.getParent(o.selection.getStart(),"table"),d={width:i(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:i(e.getStyle(t,"height")||e.getAttrib(t,"height")),cellspacing:t?e.getAttrib(t,"cellspacing"):"",cellpadding:t?e.getAttrib(t,"cellpadding"):"",border:t?e.getAttrib(t,"border"):"",caption:!!e.select("caption",t)[0]},s("left center right".split(" "),function(e){o.formatter.matchNode(t,"align"+e)&&(d.align=e)}),t||(n={label:"Cols",name:"cols"},c={label:"Rows",name:"rows"}),o.windowManager.open({title:"Table properties",items:{type:"form",layout:"grid",columns:2,data:d,defaults:{type:"textbox",maxWidth:50},items:[n,c,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"},{label:"Alignment",minWidth:90,name:"align",type:"listbox",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]},onsubmit:function(){var n=this.toJSON(),i;o.undoManager.transact(function(){t||(t=g(n.cols||1,n.rows||1)),o.dom.setAttribs(t,{cellspacing:n.cellspacing,cellpadding:n.cellpadding,border:n.border}),o.dom.setStyles(t,{width:a(n.width),height:a(n.height)}),i=e.select("caption",t)[0],i&&!n.caption&&e.remove(i),!i&&n.caption&&(i=e.create("caption"),i.innerHTML=r.ie?"\xa0":'
',t.insertBefore(i,t.firstChild)),l(t),n.align&&o.formatter.apply("align"+n.align,{},t),o.focus(),o.addVisual()})}})}function u(e,t){o.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",size:10},{label:"Rows",name:"rows",type:"textbox",size:10}],onsubmit:function(){var n=this.toJSON();o.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})}function f(){var e=o.dom,t,n,r=[];r=o.dom.select("td.mce-item-selected,th.mce-item-selected"),t=o.dom.getParent(o.selection.getStart(),"td,th"),!r.length&&t&&r.push(t),t=t||r[0],t&&(n={width:i(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:i(e.getStyle(t,"height")||e.getAttrib(t,"height")),scope:e.getAttrib(t,"scope")},n.type=t.nodeName.toLowerCase(),s("left center right".split(" "),function(e){o.formatter.matchNode(t,"align"+e)&&(n.align=e)}),s("top middle bottom".split(" "),function(e){o.formatter.matchNode(t,"valign"+e)&&(n.valign=e)}),o.windowManager.open({title:"Cell properties",items:{type:"form",data:n,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},onsubmit:function(){var t=this.toJSON();o.undoManager.transact(function(){s(r,function(n){o.dom.setAttrib(n,"scope",t.scope),o.dom.setStyles(n,{width:a(t.width),height:a(t.height)}),t.type&&n.nodeName.toLowerCase()!=t.type&&(n=e.rename(n,t.type)),l(n),t.align&&o.formatter.apply("align"+t.align,{},n),c(n),t.valign&&o.formatter.apply("valign"+t.valign,{},n)}),o.focus()})}}))}function m(){var e=o.dom,t,n,r,c,d=[];t=o.dom.getParent(o.selection.getStart(),"table"),n=o.dom.getParent(o.selection.getStart(),"td,th"),s(t.rows,function(t){s(t.cells,function(o){return e.hasClass(o,"mce-item-selected")||o==n?(d.push(t),!1):void 0})}),r=d[0],r&&(c={height:i(e.getStyle(r,"height")||e.getAttrib(r,"height")),scope:e.getAttrib(r,"scope")},c.type=r.parentNode.nodeName.toLowerCase(),s("left center right".split(" "),function(e){o.formatter.matchNode(r,"align"+e)&&(c.align=e)}),o.windowManager.open({title:"Row properties",items:{type:"form",data:c,columns:2,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"}]},onsubmit:function(){var t=this.toJSON(),n,i,r;o.undoManager.transact(function(){var c=t.type;s(d,function(s){o.dom.setAttrib(s,"scope",t.scope),o.dom.setStyles(s,{height:a(t.height)}),c!=s.parentNode.nodeName.toLowerCase()&&(n=e.getParent(s,"table"),i=s.parentNode,r=e.select(c,n)[0],r||(r=e.create(c),n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)),r.appendChild(s),i.hasChildNodes()||e.remove(i)),l(s),t.align&&o.formatter.apply("align"+t.align,{},s)}),o.focus()})}}))}function p(e){return function(){o.execCommand(e)}}function g(e,t){var n,i,a;for(a='',n=0;t>n;n++){for(a+="",i=0;e>i;i++)a+="";a+=""}a+="
"+(r.ie?" ":"
")+"
",o.insertContent(a);var l=o.dom.get("__mce");return o.dom.setAttrib(l,"id",null),l}function h(e,t){function n(){e.disabled(!o.dom.getParent(o.selection.getStart(),t)),o.selection.selectorChanged(t,function(t){e.disabled(!t)})}o.initialized?n():o.on("init",n)}function v(){h(this,"table")}function b(){h(this,"td,th")}function y(){var e="";e='';for(var t=0;10>t;t++){e+="";for(var n=0;10>n;n++)e+='';e+=""}return e+="
",e+='

'}function w(e,t,n){var i=n.getEl().getElementsByTagName("table")[0],r,a,l,s,c,d=n.isRtl()||"tl-tr"==n.parent().rel;for(i.nextSibling.innerHTML=e+1+" x "+(t+1),d&&(e=9-e),a=0;10>a;a++)for(r=0;10>r;r++)s=i.rows[a].childNodes[r].firstChild,c=(d?r>=e:e>=r)&&t>=a,o.dom.toggleClass(s,"mce-active",c),c&&(l=s);return l.parentNode}var x,C,P=this;o.settings.table_grid===!1?o.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:d}):o.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),d())},onshow:function(){w(0,0,this.menu.items()[0])},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(e,"mce-active"),o.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:y(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t=e.target,n,o;"A"==t.tagName.toUpperCase()&&(n=parseInt(t.getAttribute("data-mce-x"),10),o=parseInt(t.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(n=9-n),(n!==this.lastX||o!==this.lastY)&&(w(n,o,e.control),this.lastX=n,this.lastY=o))},onkeydown:function(e){var t=this.lastX,n=this.lastY,o;switch(e.keyCode){case 37:t>0&&(t--,o=!0);break;case 39:o=!0,9>t&&t++;break;case 38:o=!0,n>0&&n--;break;case 40:o=!0,9>n&&n++}o&&(e.preventDefault(),e.stopPropagation(),w(t,n,e.control).focus(),this.lastX=t,this.lastY=n)},onclick:function(e){"A"==e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),this.parent().cancel(),g(this.lastX+1,this.lastY+1))}}]}),o.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:v,onclick:d}),o.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:v,cmd:"mceTableDelete"}),o.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:p("mceTableCellProps"),onPostRender:b},{text:"Merge cells",onclick:p("mceTableMergeCells"),onPostRender:b},{text:"Split cell",onclick:p("mceTableSplitCells"),onPostRender:b}]}),o.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:p("mceTableInsertRowBefore"),onPostRender:b},{text:"Insert row after",onclick:p("mceTableInsertRowAfter"),onPostRender:b},{text:"Delete row",onclick:p("mceTableDeleteRow"),onPostRender:b},{text:"Row properties",onclick:p("mceTableRowProps"),onPostRender:b},{text:"-"},{text:"Cut row",onclick:p("mceTableCutRow"),onPostRender:b},{text:"Copy row",onclick:p("mceTableCopyRow"),onPostRender:b},{text:"Paste row before",onclick:p("mceTablePasteRowBefore"),onPostRender:b},{text:"Paste row after",onclick:p("mceTablePasteRowAfter"),onPostRender:b}]}),o.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:p("mceTableInsertColBefore"),onPostRender:b},{text:"Insert column after",onclick:p("mceTableInsertColAfter"),onPostRender:b},{text:"Delete column",onclick:p("mceTableDeleteCol"),onPostRender:b}]});var S=[];s("inserttable tableprops deletetable | cell row column".split(" "),function(e){S.push("|"==e?{text:"-"}:o.menuItems[e])}),o.addButton("table",{type:"menubutton",title:"Table",menu:S}),r.isIE||o.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(o.selection.select(e),o.nodeChanged())}),P.quirks=new t(o),o.on("Init",function(){x=o.windowManager,P.cellSelection=new n(o)}),s({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t,n,i;i=o.dom.getParent(o.selection.getStart(),"th,td"),i&&(t=i.rowSpan,n=i.colSpan),o.dom.select("td.mce-item-selected,th.mce-item-selected").length?e.merge():u(e,i)},mceTableInsertRowBefore:function(e){e.insertRow(!0)},mceTableInsertRowAfter:function(e){e.insertRow()},mceTableInsertColBefore:function(e){e.insertCol(!0)},mceTableInsertColAfter:function(e){e.insertCol()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){C=e.cutRows()},mceTableCopyRow:function(e){C=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(C,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(C)},mceTableDelete:function(e){e.deleteTable()}},function(t,n){o.addCommand(n,function(){var n=new e(o);n&&(t(n),o.execCommand("mceRepaint"),P.cellSelection.clear())})}),s({mceInsertTable:function(){d()},mceTableRowProps:m,mceTableCellProps:f},function(e,t){o.addCommand(t,function(t,n){e(n)})})}var s=o.each;a.add("table",l)}),a([s,u,m,g])}(this);tinymce.PluginManager.add("template",function(e){function t(t){return function(){var a=e.settings.templates;"string"==typeof a?tinymce.util.XHR.send({url:a,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(a)}}function a(t){function a(t){function a(t){if(-1==t.indexOf("")){var a="";tinymce.each(e.contentCSS,function(t){a+=''}),t=""+a+""+t+""}t=r(t,"template_preview_replace_values");var l=n.find("iframe")[0].getEl().contentWindow.document;l.open(),l.write(t),l.close()}var c=t.control.value();c.url?tinymce.util.XHR.send({url:c.url,success:function(e){l=e,a(l)}}):(l=c.content,a(l)),n.find("#description")[0].text(t.control.value().description)}var n,l,i=[];return t&&0!==t.length?(tinymce.each(t,function(e){i.push({selected:!i.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),n=e.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:i,onselect:a}}]},{type:"label",name:"description",label:"Description",text:" "},{type:"iframe",flex:1,border:1}],onsubmit:function(){c(!1,l)},width:e.getParam("template_popup_width",600),height:e.getParam("template_popup_height",500)}),void n.find("listbox")[0].fire("select")):void e.windowManager.alert("No templates defined")}function n(t,a){function n(e,t){if(e=""+e,e.length0&&(o=p.create("div",null),o.appendChild(s[0].cloneNode(!0))),i(p.select("*",o),function(t){c(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),c(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),c(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=m)}),l(o),e.execCommand("mceInsertContent",!1,o.innerHTML),e.addVisual()}var i=tinymce.each;e.addCommand("mceInsertTemplate",c),e.addButton("template",{title:"Insert template",onclick:t(a)}),e.addMenuItem("template",{text:"Insert template",onclick:t(a),context:"insert"}),e.on("PreProcess",function(t){var a=e.dom;i(a.select("div",t.node),function(t){a.hasClass(t,"mceTmpl")&&(i(a.select("*",t),function(t){a.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),l(t))})})});tinymce.PluginManager.add("textcolor",function(e){function t(){var t,o,l=[];for(o=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],t=0;t',a=o.length-1,c=e.settings.textcolor_rows||5,i=e.settings.textcolor_cols||8,F=0;c>F;F++){for(r+="",n=0;i>n;n++)d=F*i+n,d>a?r+="":(l=o[d],r+='
');r+=""}return r+=""}function l(t){var o,l=this.parent();(o=t.target.getAttribute("data-mce-color"))&&(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,l.hidePanel(),o="#"+o,l.color(o),e.execCommand(l.settings.selectcmd,!1,o))}function r(){var t=this;t._color&&e.execCommand(t.settings.selectcmd,!1,t._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",selectcmd:"ForeColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:l},onclick:r}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",selectcmd:"HiliteColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:l},onclick:r})});tinymce.PluginManager.add("visualblocks",function(e,s){function o(){var s=this;s.active(a),e.on("VisualBlocks",function(){s.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))})}var l,t,a;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var o,c=e.dom;l||(l=c.uniqueId(),o=c.create("link",{id:l,rel:"stylesheet",href:s+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(o)),e.on("PreviewFormats AfterPreviewFormats",function(s){a&&c.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==s.type)}),c.toggleClass(e.getBody(),"mce-visualblocks"),a=e.dom.hasClass(e.getBody(),"mce-visualblocks"),t&&t.active(c.hasClass(e.getBody(),"mce-visualblocks")),e.fire("VisualBlocks")}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o,selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))});tinymce.PluginManager.add("visualchars",function(e){function a(a){var t,s,i,r,c,d,l=e.getBody(),m=e.selection;if(n=!n,o.state=n,e.fire("VisualChars",{state:n}),a&&(d=m.getBookmark()),n)for(s=[],tinymce.walk(l,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&s.push(e)},"childNodes"),i=0;i$1
'),c=e.dom.create("div",null,r);t=c.lastChild;)e.dom.insertAfter(t,s[i]);e.dom.remove(s[i])}else for(s=e.dom.select("span.mce-nbsp",l),i=s.length-1;i>=0;i--)e.dom.remove(s[i],1);m.moveToBookmark(d)}function t(){var a=this;e.on("VisualChars",function(e){a.active(e.state)})}var n,o=this;e.addCommand("mceVisualChars",a),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t,selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,a(!1))})});tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,o,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),o=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount",disabled:e.settings.readonly},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),t=t.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),t=t.replace(o,"");var r=t.match(n);r&&(a=r.length)}return a}});tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var n,o=[];if(t)return d(t.split(/[ ,]/),function(t){function i(){var i=e.selection;"bullist"==r&&i.selectorChanged("ul > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"UL"==n)}),"numlist"==r&&i.selectorChanged("ol > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"OL"==n)}),t.settings.stateSelector&&i.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&i.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?n=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_size),o.push(t),n=null):(n||(n={type:"buttongroup",items:[]},o.push(n)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),n.items.push(t),e.initialized?i():e.on("init",i)))}),i.push({type:"toolbar",layout:"flow",items:o}),!0}var i=[];if(tinymce.isArray(u.toolbar)){if(0===u.toolbar.length)return;tinymce.each(u.toolbar,function(e,t){u["toolbar"+(t+1)]=e}),delete u.toolbar}for(var n=1;10>n&&t(u["toolbar"+n]);n++);return i.length||u.toolbar===!1||t(u.toolbar||f),i.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}:void 0}function i(){function t(t){var i;return"|"==t?{text:"|"}:i=e.menuItems[t]}function i(i){var n,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").split(/[ ,]/)),u.menu?(o=u.menu[i],a=!0):o=h[i],o){n={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var i=t(e);i&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==i&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;l + + + + Testing Key Events + + + +
  +
+

 

+
+
+ +
+ + + +
+ + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html new file mode 100644 index 00000000..c0f3aab4 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html @@ -0,0 +1,36 @@ + +
Pressing "a" while this checkbox is + focused will remove it from the DOM.
+
+
+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html new file mode 100644 index 00000000..741d7f4b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html @@ -0,0 +1,36 @@ + + +
CTRL + 1: red
+
SHIFT + 1: green
+
CTRL + SHIFT + 1: yellow
+
ALT + 1: lightblue
+
CTRL + ALT + 1: lightgreen
+
SHIFT + ALT + 1: silver
+
CTRL + SHIFT + ALT + 1: magenta
+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html new file mode 100644 index 00000000..7c8df003 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html @@ -0,0 +1,16 @@ + + + + +Linking with an image + + +banner
+Click here for next page
+
+link to other link
+Just another link.
+

+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html new file mode 100644 index 00000000..42b0442b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html @@ -0,0 +1,13 @@ + + + Boolean Attribute Selected + + +
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html new file mode 100644 index 00000000..60cd0338 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html @@ -0,0 +1,13 @@ + + + Boolean Attribute Selected + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html new file mode 100644 index 00000000..99a45e77 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html @@ -0,0 +1,55 @@ + + + TouchLongContent + + + +

Touch API

+

Page with long content

+
                   



+

Long text:                                                                                                                          This is a very long text to make the screen horizontally movable, to test the flick gesture at a long horizontal distance Normal link                                                                                                                                           at normal and fast speeds to see results of it Normal link end

+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+ Middle of the screen Normal link +










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+










+ Bottom of the screen Normal link


+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html new file mode 100644 index 00000000..9fa39d56 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html @@ -0,0 +1,5255 @@ + + + + Macbeth: Entire Play + + + + + + + +Quick link to last speech + +

ACT I

+

SCENE I. A desert place.

+

+Thunder and lightning. Enter three Witches +
+ +First Witch +
+When shall we three meet again
+In thunder, lightning, or in rain?
+
+ +Second Witch +
+When the hurlyburly's done,
+When the battle's lost and won.
+
+ +Third Witch +
+That will be ere the set of sun.
+
+ +First Witch +
+Where the place?
+
+ +Second Witch +
+ Upon the heath.
+
+ +Third Witch +
+There to meet with Macbeth.
+
+ +First Witch +
+I come, Graymalkin!
+
+ +Second Witch +
+Paddock calls.
+
+ +Third Witch +
+Anon.
+
+ +ALL +
+Fair is foul, and foul is fair:
+Hover through the fog and filthy air.
+

Exeunt

+
+

SCENE II. A camp near Forres.

+

+Alarum within. Enter DUNCAN, MALCOLM, DONALBAIN, LENNOX, with Attendants, meeting a bleeding Sergeant +
+ +DUNCAN +
+What bloody man is that? He can report,
+As seemeth by his plight, of the revolt
+The newest state.
+
+ +MALCOLM +
+ This is the sergeant
+Who like a good and hardy soldier fought
+'Gainst my captivity. Hail, brave friend!
+Say to the king the knowledge of the broil
+As thou didst leave it.
+
+ +Sergeant +
+Doubtful it stood;
+As two spent swimmers, that do cling together
+And choke their art. The merciless Macdonwald--
+Worthy to be a rebel, for to that
+The multiplying villanies of nature
+Do swarm upon him--from the western isles
+Of kerns and gallowglasses is supplied;
+And fortune, on his damned quarrel smiling,
+Show'd like a rebel's whore: but all's too weak:
+For brave Macbeth--well he deserves that name--
+Disdaining fortune, with his brandish'd steel,
+Which smoked with bloody execution,
+Like valour's minion carved out his passage
+Till he faced the slave;
+Which ne'er shook hands, nor bade farewell to him,
+Till he unseam'd him from the nave to the chaps,
+And fix'd his head upon our battlements.
+
+ +DUNCAN +
+O valiant cousin! worthy gentleman!
+
+ +Sergeant +
+As whence the sun 'gins his reflection
+Shipwrecking storms and direful thunders break,
+So from that spring whence comfort seem'd to come
+Discomfort swells. Mark, king of Scotland, mark:
+No sooner justice had with valour arm'd
+Compell'd these skipping kerns to trust their heels,
+But the Norweyan lord surveying vantage,
+With furbish'd arms and new supplies of men
+Began a fresh assault.
+
+ +DUNCAN +
+Dismay'd not this
+Our captains, Macbeth and Banquo?
+
+ +Sergeant +
+Yes;
+As sparrows eagles, or the hare the lion.
+If I say sooth, I must report they were
+As cannons overcharged with double cracks, so they
+Doubly redoubled strokes upon the foe:
+Except they meant to bathe in reeking wounds,
+Or memorise another Golgotha,
+I cannot tell.
+But I am faint, my gashes cry for help.
+
+ +DUNCAN +
+So well thy words become thee as thy wounds;
+They smack of honour both. Go get him surgeons.
+

Exit Sergeant, attended

+Who comes here?
+

Enter ROSS

+
+ +MALCOLM +
+ The worthy thane of Ross.
+
+ +LENNOX +
+What a haste looks through his eyes! So should he look
+That seems to speak things strange.
+
+ +ROSS +
+God save the king!
+
+ +DUNCAN +
+Whence camest thou, worthy thane?
+
+ +ROSS +
+From Fife, great king;
+Where the Norweyan banners flout the sky
+And fan our people cold. Norway himself,
+With terrible numbers,
+Assisted by that most disloyal traitor
+The thane of Cawdor, began a dismal conflict;
+Till that Bellona's bridegroom, lapp'd in proof,
+Confronted him with self-comparisons,
+Point against point rebellious, arm 'gainst arm.
+Curbing his lavish spirit: and, to conclude,
+The victory fell on us.
+
+ +DUNCAN +
+Great happiness!
+
+ +ROSS +
+That now
+Sweno, the Norways' king, craves composition:
+Nor would we deign him burial of his men
+Till he disbursed at Saint Colme's inch
+Ten thousand dollars to our general use.
+
+ +DUNCAN +
+No more that thane of Cawdor shall deceive
+Our bosom interest: go pronounce his present death,
+And with his former title greet Macbeth.
+
+ +ROSS +
+I'll see it done.
+
+ +DUNCAN +
+What he hath lost noble Macbeth hath won.
+

Exeunt

+
+

SCENE III. A heath near Forres.

+

+Thunder. Enter the three Witches +
+ +First Witch +
+Where hast thou been, sister?
+
+ +Second Witch +
+Killing swine.
+
+ +Third Witch +
+Sister, where thou?
+
+ +First Witch +
+A sailor's wife had chestnuts in her lap,
+And munch'd, and munch'd, and munch'd:--
+'Give me,' quoth I:
+'Aroint thee, witch!' the rump-fed ronyon cries.
+Her husband's to Aleppo gone, master o' the Tiger:
+But in a sieve I'll thither sail,
+And, like a rat without a tail,
+I'll do, I'll do, and I'll do.
+
+ +Second Witch +
+I'll give thee a wind.
+
+ +First Witch +
+Thou'rt kind.
+
+ +Third Witch +
+And I another.
+
+ +First Witch +
+I myself have all the other,
+And the very ports they blow,
+All the quarters that they know
+I' the shipman's card.
+I will drain him dry as hay:
+Sleep shall neither night nor day
+Hang upon his pent-house lid;
+He shall live a man forbid:
+Weary se'nnights nine times nine
+Shall he dwindle, peak and pine:
+Though his bark cannot be lost,
+Yet it shall be tempest-tost.
+Look what I have.
+
+ +Second Witch +
+Show me, show me.
+
+ +First Witch +
+Here I have a pilot's thumb,
+Wreck'd as homeward he did come.
+

Drum within

+
+ +Third Witch +
+A drum, a drum!
+Macbeth doth come.
+
+ +ALL +
+The weird sisters, hand in hand,
+Posters of the sea and land,
+Thus do go about, about:
+Thrice to thine and thrice to mine
+And thrice again, to make up nine.
+Peace! the charm's wound up.
+

Enter MACBETH and BANQUO

+
+ +MACBETH +
+So foul and fair a day I have not seen.
+
+ +BANQUO +
+How far is't call'd to Forres? What are these
+So wither'd and so wild in their attire,
+That look not like the inhabitants o' the earth,
+And yet are on't? Live you? or are you aught
+That man may question? You seem to understand me,
+By each at once her chappy finger laying
+Upon her skinny lips: you should be women,
+And yet your beards forbid me to interpret
+That you are so.
+
+ +MACBETH +
+ Speak, if you can: what are you?
+
+ +First Witch +
+All hail, Macbeth! hail to thee, thane of Glamis!
+
+ +Second Witch +
+All hail, Macbeth, hail to thee, thane of Cawdor!
+
+ +Third Witch +
+All hail, Macbeth, thou shalt be king hereafter!
+
+ +BANQUO +
+Good sir, why do you start; and seem to fear
+Things that do sound so fair? I' the name of truth,
+Are ye fantastical, or that indeed
+Which outwardly ye show? My noble partner
+You greet with present grace and great prediction
+Of noble having and of royal hope,
+That he seems rapt withal: to me you speak not.
+If you can look into the seeds of time,
+And say which grain will grow and which will not,
+Speak then to me, who neither beg nor fear
+Your favours nor your hate.
+
+ +First Witch +
+Hail!
+
+ +Second Witch +
+Hail!
+
+ +Third Witch +
+Hail!
+
+ +First Witch +
+Lesser than Macbeth, and greater.
+
+ +Second Witch +
+Not so happy, yet much happier.
+
+ +Third Witch +
+Thou shalt get kings, though thou be none:
+So all hail, Macbeth and Banquo!
+
+ +First Witch +
+Banquo and Macbeth, all hail!
+
+ +MACBETH +
+Stay, you imperfect speakers, tell me more:
+By Sinel's death I know I am thane of Glamis;
+But how of Cawdor? the thane of Cawdor lives,
+A prosperous gentleman; and to be king
+Stands not within the prospect of belief,
+No more than to be Cawdor. Say from whence
+You owe this strange intelligence? or why
+Upon this blasted heath you stop our way
+With such prophetic greeting? Speak, I charge you.
+

Witches vanish

+
+ +BANQUO +
+The earth hath bubbles, as the water has,
+And these are of them. Whither are they vanish'd?
+
+ +MACBETH +
+Into the air; and what seem'd corporal melted
+As breath into the wind. Would they had stay'd!
+
+ +BANQUO +
+Were such things here as we do speak about?
+Or have we eaten on the insane root
+That takes the reason prisoner?
+
+ +MACBETH +
+Your children shall be kings.
+
+ +BANQUO +
+You shall be king.
+
+ +MACBETH +
+And thane of Cawdor too: went it not so?
+
+ +BANQUO +
+To the selfsame tune and words. Who's here?
+

Enter ROSS and ANGUS

+
+ +ROSS +
+The king hath happily received, Macbeth,
+The news of thy success; and when he reads
+Thy personal venture in the rebels' fight,
+His wonders and his praises do contend
+Which should be thine or his: silenced with that,
+In viewing o'er the rest o' the selfsame day,
+He finds thee in the stout Norweyan ranks,
+Nothing afeard of what thyself didst make,
+Strange images of death. As thick as hail
+Came post with post; and every one did bear
+Thy praises in his kingdom's great defence,
+And pour'd them down before him.
+
+ +ANGUS +
+We are sent
+To give thee from our royal master thanks;
+Only to herald thee into his sight,
+Not pay thee.
+
+ +ROSS +
+And, for an earnest of a greater honour,
+He bade me, from him, call thee thane of Cawdor:
+In which addition, hail, most worthy thane!
+For it is thine.
+
+ +BANQUO +
+ What, can the devil speak true?
+
+ +MACBETH +
+The thane of Cawdor lives: why do you dress me
+In borrow'd robes?
+
+ +ANGUS +
+ Who was the thane lives yet;
+But under heavy judgment bears that life
+Which he deserves to lose. Whether he was combined
+With those of Norway, or did line the rebel
+With hidden help and vantage, or that with both
+He labour'd in his country's wreck, I know not;
+But treasons capital, confess'd and proved,
+Have overthrown him.
+
+ +MACBETH +
+[Aside] Glamis, and thane of Cawdor!
+The greatest is behind.
+

To ROSS and ANGUS

+Thanks for your pains.
+

To BANQUO

+Do you not hope your children shall be kings,
+When those that gave the thane of Cawdor to me
+Promised no less to them?
+
+ +BANQUO +
+That trusted home
+Might yet enkindle you unto the crown,
+Besides the thane of Cawdor. But 'tis strange:
+And oftentimes, to win us to our harm,
+The instruments of darkness tell us truths,
+Win us with honest trifles, to betray's
+In deepest consequence.
+Cousins, a word, I pray you.
+
+ +MACBETH +
+[Aside] Two truths are told,
+As happy prologues to the swelling act
+Of the imperial theme.--I thank you, gentlemen.
+

Aside

+Cannot be ill, cannot be good: if ill,
+Why hath it given me earnest of success,
+Commencing in a truth? I am thane of Cawdor:
+If good, why do I yield to that suggestion
+Whose horrid image doth unfix my hair
+And make my seated heart knock at my ribs,
+Against the use of nature? Present fears
+Are less than horrible imaginings:
+My thought, whose murder yet is but fantastical,
+Shakes so my single state of man that function
+Is smother'd in surmise, and nothing is
+But what is not.
+
+ +BANQUO +
+ Look, how our partner's rapt.
+
+ +MACBETH +
+[Aside] If chance will have me king, why, chance may crown me,
+Without my stir.
+
+ +BANQUO +
+ New horrors come upon him,
+Like our strange garments, cleave not to their mould
+But with the aid of use.
+
+ +MACBETH +
+[Aside] Come what come may,
+Time and the hour runs through the roughest day.
+
+ +BANQUO +
+Worthy Macbeth, we stay upon your leisure.
+
+ +MACBETH +
+Give me your favour: my dull brain was wrought
+With things forgotten. Kind gentlemen, your pains
+Are register'd where every day I turn
+The leaf to read them. Let us toward the king.
+Think upon what hath chanced, and, at more time,
+The interim having weigh'd it, let us speak
+Our free hearts each to other.
+
+ +BANQUO +
+Very gladly.
+
+ +MACBETH +
+Till then, enough. Come, friends.
+

Exeunt

+
+

SCENE IV. Forres. The palace.

+

+Flourish. Enter DUNCAN, MALCOLM, DONALBAIN, LENNOX, and Attendants +
+ +DUNCAN +
+Is execution done on Cawdor? Are not
+Those in commission yet return'd?
+
+ +MALCOLM +
+My liege,
+They are not yet come back. But I have spoke
+With one that saw him die: who did report
+That very frankly he confess'd his treasons,
+Implored your highness' pardon and set forth
+A deep repentance: nothing in his life
+Became him like the leaving it; he died
+As one that had been studied in his death
+To throw away the dearest thing he owed,
+As 'twere a careless trifle.
+
+ +DUNCAN +
+There's no art
+To find the mind's construction in the face:
+He was a gentleman on whom I built
+An absolute trust.
+

Enter MACBETH, BANQUO, ROSS, and ANGUS

+O worthiest cousin!
+The sin of my ingratitude even now
+Was heavy on me: thou art so far before
+That swiftest wing of recompense is slow
+To overtake thee. Would thou hadst less deserved,
+That the proportion both of thanks and payment
+Might have been mine! only I have left to say,
+More is thy due than more than all can pay.
+
+ +MACBETH +
+The service and the loyalty I owe,
+In doing it, pays itself. Your highness' part
+Is to receive our duties; and our duties
+Are to your throne and state children and servants,
+Which do but what they should, by doing every thing
+Safe toward your love and honour.
+
+ +DUNCAN +
+Welcome hither:
+I have begun to plant thee, and will labour
+To make thee full of growing. Noble Banquo,
+That hast no less deserved, nor must be known
+No less to have done so, let me enfold thee
+And hold thee to my heart.
+
+ +BANQUO +
+There if I grow,
+The harvest is your own.
+
+ +DUNCAN +
+My plenteous joys,
+Wanton in fulness, seek to hide themselves
+In drops of sorrow. Sons, kinsmen, thanes,
+And you whose places are the nearest, know
+We will establish our estate upon
+Our eldest, Malcolm, whom we name hereafter
+The Prince of Cumberland; which honour must
+Not unaccompanied invest him only,
+But signs of nobleness, like stars, shall shine
+On all deservers. From hence to Inverness,
+And bind us further to you.
+
+ +MACBETH +
+The rest is labour, which is not used for you:
+I'll be myself the harbinger and make joyful
+The hearing of my wife with your approach;
+So humbly take my leave.
+
+ +DUNCAN +
+My worthy Cawdor!
+
+ +MACBETH +
+[Aside] The Prince of Cumberland! that is a step
+On which I must fall down, or else o'erleap,
+For in my way it lies. Stars, hide your fires;
+Let not light see my black and deep desires:
+The eye wink at the hand; yet let that be,
+Which the eye fears, when it is done, to see.
+

Exit

+
+ +DUNCAN +
+True, worthy Banquo; he is full so valiant,
+And in his commendations I am fed;
+It is a banquet to me. Let's after him,
+Whose care is gone before to bid us welcome:
+It is a peerless kinsman.
+

Flourish. Exeunt

+
+

SCENE V. Inverness. Macbeth's castle.

+

+Enter LADY MACBETH, reading a letter +
+ +LADY MACBETH +
+'They met me in the day of success: and I have
+learned by the perfectest report, they have more in
+them than mortal knowledge. When I burned in desire
+to question them further, they made themselves air,
+into which they vanished. Whiles I stood rapt in
+the wonder of it, came missives from the king, who
+all-hailed me 'Thane of Cawdor;' by which title,
+before, these weird sisters saluted me, and referred
+me to the coming on of time, with 'Hail, king that
+shalt be!' This have I thought good to deliver
+thee, my dearest partner of greatness, that thou
+mightst not lose the dues of rejoicing, by being
+ignorant of what greatness is promised thee. Lay it
+to thy heart, and farewell.'
+Glamis thou art, and Cawdor; and shalt be
+What thou art promised: yet do I fear thy nature;
+It is too full o' the milk of human kindness
+To catch the nearest way: thou wouldst be great;
+Art not without ambition, but without
+The illness should attend it: what thou wouldst highly,
+That wouldst thou holily; wouldst not play false,
+And yet wouldst wrongly win: thou'ldst have, great Glamis,
+That which cries 'Thus thou must do, if thou have it;
+And that which rather thou dost fear to do
+Than wishest should be undone.' Hie thee hither,
+That I may pour my spirits in thine ear;
+And chastise with the valour of my tongue
+All that impedes thee from the golden round,
+Which fate and metaphysical aid doth seem
+To have thee crown'd withal.
+

Enter a Messenger

+What is your tidings?
+
+ +Messenger +
+The king comes here to-night.
+
+ +LADY MACBETH +
+Thou'rt mad to say it:
+Is not thy master with him? who, were't so,
+Would have inform'd for preparation.
+
+ +Messenger +
+So please you, it is true: our thane is coming:
+One of my fellows had the speed of him,
+Who, almost dead for breath, had scarcely more
+Than would make up his message.
+
+ +LADY MACBETH +
+Give him tending;
+He brings great news.
+

Exit Messenger

+The raven himself is hoarse
+That croaks the fatal entrance of Duncan
+Under my battlements. Come, you spirits
+That tend on mortal thoughts, unsex me here,
+And fill me from the crown to the toe top-full
+Of direst cruelty! make thick my blood;
+Stop up the access and passage to remorse,
+That no compunctious visitings of nature
+Shake my fell purpose, nor keep peace between
+The effect and it! Come to my woman's breasts,
+And take my milk for gall, you murdering ministers,
+Wherever in your sightless substances
+You wait on nature's mischief! Come, thick night,
+And pall thee in the dunnest smoke of hell,
+That my keen knife see not the wound it makes,
+Nor heaven peep through the blanket of the dark,
+To cry 'Hold, hold!'
+

Enter MACBETH

+Great Glamis! worthy Cawdor!
+Greater than both, by the all-hail hereafter!
+Thy letters have transported me beyond
+This ignorant present, and I feel now
+The future in the instant.
+
+ +MACBETH +
+My dearest love,
+Duncan comes here to-night.
+
+ +LADY MACBETH +
+And when goes hence?
+
+ +MACBETH +
+To-morrow, as he purposes.
+
+ +LADY MACBETH +
+O, never
+Shall sun that morrow see!
+Your face, my thane, is as a book where men
+May read strange matters. To beguile the time,
+Look like the time; bear welcome in your eye,
+Your hand, your tongue: look like the innocent flower,
+But be the serpent under't. He that's coming
+Must be provided for: and you shall put
+This night's great business into my dispatch;
+Which shall to all our nights and days to come
+Give solely sovereign sway and masterdom.
+
+ +MACBETH +
+We will speak further.
+
+ +LADY MACBETH +
+Only look up clear;
+To alter favour ever is to fear:
+Leave all the rest to me.
+

Exeunt

+
+

SCENE VI. Before Macbeth's castle.

+

+Hautboys and torches. Enter DUNCAN, MALCOLM, DONALBAIN, BANQUO, LENNOX, MACDUFF, ROSS, ANGUS, and Attendants +
+ +DUNCAN +
+This castle hath a pleasant seat; the air
+Nimbly and sweetly recommends itself
+Unto our gentle senses.
+
+ +BANQUO +
+This guest of summer,
+The temple-haunting martlet, does approve,
+By his loved mansionry, that the heaven's breath
+Smells wooingly here: no jutty, frieze,
+Buttress, nor coign of vantage, but this bird
+Hath made his pendent bed and procreant cradle:
+Where they most breed and haunt, I have observed,
+The air is delicate.
+

Enter LADY MACBETH

+
+ +DUNCAN +
+See, see, our honour'd hostess!
+The love that follows us sometime is our trouble,
+Which still we thank as love. Herein I teach you
+How you shall bid God 'ild us for your pains,
+And thank us for your trouble.
+
+ +LADY MACBETH +
+All our service
+In every point twice done and then done double
+Were poor and single business to contend
+Against those honours deep and broad wherewith
+Your majesty loads our house: for those of old,
+And the late dignities heap'd up to them,
+We rest your hermits.
+
+ +DUNCAN +
+Where's the thane of Cawdor?
+We coursed him at the heels, and had a purpose
+To be his purveyor: but he rides well;
+And his great love, sharp as his spur, hath holp him
+To his home before us. Fair and noble hostess,
+We are your guest to-night.
+
+ +LADY MACBETH +
+Your servants ever
+Have theirs, themselves and what is theirs, in compt,
+To make their audit at your highness' pleasure,
+Still to return your own.
+
+ +DUNCAN +
+Give me your hand;
+Conduct me to mine host: we love him highly,
+And shall continue our graces towards him.
+By your leave, hostess.
+

Exeunt

+
+

SCENE VII. Macbeth's castle.

+

+Hautboys and torches. Enter a Sewer, and divers Servants with dishes and service, and pass over the stage. Then enter MACBETH +
+ +MACBETH +
+If it were done when 'tis done, then 'twere well
+It were done quickly: if the assassination
+Could trammel up the consequence, and catch
+With his surcease success; that but this blow
+Might be the be-all and the end-all here,
+But here, upon this bank and shoal of time,
+We'ld jump the life to come. But in these cases
+We still have judgment here; that we but teach
+Bloody instructions, which, being taught, return
+To plague the inventor: this even-handed justice
+Commends the ingredients of our poison'd chalice
+To our own lips. He's here in double trust;
+First, as I am his kinsman and his subject,
+Strong both against the deed; then, as his host,
+Who should against his murderer shut the door,
+Not bear the knife myself. Besides, this Duncan
+Hath borne his faculties so meek, hath been
+So clear in his great office, that his virtues
+Will plead like angels, trumpet-tongued, against
+The deep damnation of his taking-off;
+And pity, like a naked new-born babe,
+Striding the blast, or heaven's cherubim, horsed
+Upon the sightless couriers of the air,
+Shall blow the horrid deed in every eye,
+That tears shall drown the wind. I have no spur
+To prick the sides of my intent, but only
+Vaulting ambition, which o'erleaps itself
+And falls on the other.
+

Enter LADY MACBETH

+How now! what news?
+
+ +LADY MACBETH +
+He has almost supp'd: why have you left the chamber?
+
+ +MACBETH +
+Hath he ask'd for me?
+
+ +LADY MACBETH +
+Know you not he has?
+
+ +MACBETH +
+We will proceed no further in this business:
+He hath honour'd me of late; and I have bought
+Golden opinions from all sorts of people,
+Which would be worn now in their newest gloss,
+Not cast aside so soon.
+
+ +LADY MACBETH +
+Was the hope drunk
+Wherein you dress'd yourself? hath it slept since?
+And wakes it now, to look so green and pale
+At what it did so freely? From this time
+Such I account thy love. Art thou afeard
+To be the same in thine own act and valour
+As thou art in desire? Wouldst thou have that
+Which thou esteem'st the ornament of life,
+And live a coward in thine own esteem,
+Letting 'I dare not' wait upon 'I would,'
+Like the poor cat i' the adage?
+
+ +MACBETH +
+Prithee, peace:
+I dare do all that may become a man;
+Who dares do more is none.
+
+ +LADY MACBETH +
+What beast was't, then,
+That made you break this enterprise to me?
+When you durst do it, then you were a man;
+And, to be more than what you were, you would
+Be so much more the man. Nor time nor place
+Did then adhere, and yet you would make both:
+They have made themselves, and that their fitness now
+Does unmake you. I have given suck, and know
+How tender 'tis to love the babe that milks me:
+I would, while it was smiling in my face,
+Have pluck'd my nipple from his boneless gums,
+And dash'd the brains out, had I so sworn as you
+Have done to this.
+
+ +MACBETH +
+ If we should fail?
+
+ +LADY MACBETH +
+We fail!
+But screw your courage to the sticking-place,
+And we'll not fail. When Duncan is asleep--
+Whereto the rather shall his day's hard journey
+Soundly invite him--his two chamberlains
+Will I with wine and wassail so convince
+That memory, the warder of the brain,
+Shall be a fume, and the receipt of reason
+A limbeck only: when in swinish sleep
+Their drenched natures lie as in a death,
+What cannot you and I perform upon
+The unguarded Duncan? what not put upon
+His spongy officers, who shall bear the guilt
+Of our great quell?
+
+ +MACBETH +
+Bring forth men-children only;
+For thy undaunted mettle should compose
+Nothing but males. Will it not be received,
+When we have mark'd with blood those sleepy two
+Of his own chamber and used their very daggers,
+That they have done't?
+
+ +LADY MACBETH +
+Who dares receive it other,
+As we shall make our griefs and clamour roar
+Upon his death?
+
+ +MACBETH +
+ I am settled, and bend up
+Each corporal agent to this terrible feat.
+Away, and mock the time with fairest show:
+False face must hide what the false heart doth know.
+

Exeunt

+

+

ACT II

+

SCENE I. Court of Macbeth's castle.

+

+Enter BANQUO, and FLEANCE bearing a torch before him +
+ +BANQUO +
+How goes the night, boy?
+
+ +FLEANCE +
+The moon is down; I have not heard the clock.
+
+ +BANQUO +
+And she goes down at twelve.
+
+ +FLEANCE +
+I take't, 'tis later, sir.
+
+ +BANQUO +
+Hold, take my sword. There's husbandry in heaven;
+Their candles are all out. Take thee that too.
+A heavy summons lies like lead upon me,
+And yet I would not sleep: merciful powers,
+Restrain in me the cursed thoughts that nature
+Gives way to in repose!
+

Enter MACBETH, and a Servant with a torch

+Give me my sword.
+Who's there?
+
+ +MACBETH +
+A friend.
+
+ +BANQUO +
+What, sir, not yet at rest? The king's a-bed:
+He hath been in unusual pleasure, and
+Sent forth great largess to your offices.
+This diamond he greets your wife withal,
+By the name of most kind hostess; and shut up
+In measureless content.
+
+ +MACBETH +
+Being unprepared,
+Our will became the servant to defect;
+Which else should free have wrought.
+
+ +BANQUO +
+All's well.
+I dreamt last night of the three weird sisters:
+To you they have show'd some truth.
+
+ +MACBETH +
+I think not of them:
+Yet, when we can entreat an hour to serve,
+We would spend it in some words upon that business,
+If you would grant the time.
+
+ +BANQUO +
+At your kind'st leisure.
+
+ +MACBETH +
+If you shall cleave to my consent, when 'tis,
+It shall make honour for you.
+
+ +BANQUO +
+So I lose none
+In seeking to augment it, but still keep
+My bosom franchised and allegiance clear,
+I shall be counsell'd.
+
+ +MACBETH +
+Good repose the while!
+
+ +BANQUO +
+Thanks, sir: the like to you!
+

Exeunt BANQUO and FLEANCE

+
+ +MACBETH +
+Go bid thy mistress, when my drink is ready,
+She strike upon the bell. Get thee to bed.
+

Exit Servant

+Is this a dagger which I see before me,
+The handle toward my hand? Come, let me clutch thee.
+I have thee not, and yet I see thee still.
+Art thou not, fatal vision, sensible
+To feeling as to sight? or art thou but
+A dagger of the mind, a false creation,
+Proceeding from the heat-oppressed brain?
+I see thee yet, in form as palpable
+As this which now I draw.
+Thou marshall'st me the way that I was going;
+And such an instrument I was to use.
+Mine eyes are made the fools o' the other senses,
+Or else worth all the rest; I see thee still,
+And on thy blade and dudgeon gouts of blood,
+Which was not so before. There's no such thing:
+It is the bloody business which informs
+Thus to mine eyes. Now o'er the one halfworld
+Nature seems dead, and wicked dreams abuse
+The curtain'd sleep; witchcraft celebrates
+Pale Hecate's offerings, and wither'd murder,
+Alarum'd by his sentinel, the wolf,
+Whose howl's his watch, thus with his stealthy pace.
+With Tarquin's ravishing strides, towards his design
+Moves like a ghost. Thou sure and firm-set earth,
+Hear not my steps, which way they walk, for fear
+Thy very stones prate of my whereabout,
+And take the present horror from the time,
+Which now suits with it. Whiles I threat, he lives:
+Words to the heat of deeds too cold breath gives.
+

A bell rings

+I go, and it is done; the bell invites me.
+Hear it not, Duncan; for it is a knell
+That summons thee to heaven or to hell.
+

Exit

+
+

SCENE II. The same.

+

+Enter LADY MACBETH +
+ +LADY MACBETH +
+That which hath made them drunk hath made me bold;
+What hath quench'd them hath given me fire.
+Hark! Peace!
+It was the owl that shriek'd, the fatal bellman,
+Which gives the stern'st good-night. He is about it:
+The doors are open; and the surfeited grooms
+Do mock their charge with snores: I have drugg'd
+their possets,
+That death and nature do contend about them,
+Whether they live or die.
+
+ +MACBETH +
+[Within] Who's there? what, ho!
+
+ +LADY MACBETH +
+Alack, I am afraid they have awaked,
+And 'tis not done. The attempt and not the deed
+Confounds us. Hark! I laid their daggers ready;
+He could not miss 'em. Had he not resembled
+My father as he slept, I had done't.
+

Enter MACBETH

+My husband!
+
+ +MACBETH +
+I have done the deed. Didst thou not hear a noise?
+
+ +LADY MACBETH +
+I heard the owl scream and the crickets cry.
+Did not you speak?
+
+ +MACBETH +
+ When?
+
+ +LADY MACBETH +
+Now.
+
+ +MACBETH +
+As I descended?
+
+ +LADY MACBETH +
+Ay.
+
+ +MACBETH +
+Hark!
+Who lies i' the second chamber?
+
+ +LADY MACBETH +
+Donalbain.
+
+ +MACBETH +
+This is a sorry sight.
+

Looking on his hands

+
+ +LADY MACBETH +
+A foolish thought, to say a sorry sight.
+
+ +MACBETH +
+There's one did laugh in's sleep, and one cried
+'Murder!'
+That they did wake each other: I stood and heard them:
+But they did say their prayers, and address'd them
+Again to sleep.
+
+ +LADY MACBETH +
+ There are two lodged together.
+
+ +MACBETH +
+One cried 'God bless us!' and 'Amen' the other;
+As they had seen me with these hangman's hands.
+Listening their fear, I could not say 'Amen,'
+When they did say 'God bless us!'
+
+ +LADY MACBETH +
+Consider it not so deeply.
+
+ +MACBETH +
+But wherefore could not I pronounce 'Amen'?
+I had most need of blessing, and 'Amen'
+Stuck in my throat.
+
+ +LADY MACBETH +
+These deeds must not be thought
+After these ways; so, it will make us mad.
+
+ +MACBETH +
+Methought I heard a voice cry 'Sleep no more!
+Macbeth does murder sleep', the innocent sleep,
+Sleep that knits up the ravell'd sleeve of care,
+The death of each day's life, sore labour's bath,
+Balm of hurt minds, great nature's second course,
+Chief nourisher in life's feast,--
+
+ +LADY MACBETH +
+What do you mean?
+
+ +MACBETH +
+Still it cried 'Sleep no more!' to all the house:
+'Glamis hath murder'd sleep, and therefore Cawdor
+Shall sleep no more; Macbeth shall sleep no more.'
+
+ +LADY MACBETH +
+Who was it that thus cried? Why, worthy thane,
+You do unbend your noble strength, to think
+So brainsickly of things. Go get some water,
+And wash this filthy witness from your hand.
+Why did you bring these daggers from the place?
+They must lie there: go carry them; and smear
+The sleepy grooms with blood.
+
+ +MACBETH +
+I'll go no more:
+I am afraid to think what I have done;
+Look on't again I dare not.
+
+ +LADY MACBETH +
+Infirm of purpose!
+Give me the daggers: the sleeping and the dead
+Are but as pictures: 'tis the eye of childhood
+That fears a painted devil. If he do bleed,
+I'll gild the faces of the grooms withal;
+For it must seem their guilt.
+

Exit. Knocking within

+
+ +MACBETH +
+Whence is that knocking?
+How is't with me, when every noise appals me?
+What hands are here? ha! they pluck out mine eyes.
+Will all great Neptune's ocean wash this blood
+Clean from my hand? No, this my hand will rather
+The multitudinous seas in incarnadine,
+Making the green one red.
+

Re-enter LADY MACBETH

+
+ +LADY MACBETH +
+My hands are of your colour; but I shame
+To wear a heart so white.
+

Knocking within

+I hear a knocking
+At the south entry: retire we to our chamber;
+A little water clears us of this deed:
+How easy is it, then! Your constancy
+Hath left you unattended.
+

Knocking within

+Hark! more knocking.
+Get on your nightgown, lest occasion call us,
+And show us to be watchers. Be not lost
+So poorly in your thoughts.
+
+ +MACBETH +
+To know my deed, 'twere best not know myself.
+

Knocking within

+Wake Duncan with thy knocking! I would thou couldst!
+

Exeunt

+
+

SCENE III. The same.

+

+Knocking within. Enter a Porter +
+ +Porter +
+Here's a knocking indeed! If a
+man were porter of hell-gate, he should have
+old turning the key.
+

Knocking within

+Knock,
+knock, knock! Who's there, i' the name of
+Beelzebub? Here's a farmer, that hanged
+himself on the expectation of plenty: come in
+time; have napkins enow about you; here
+you'll sweat for't.
+

Knocking within

+Knock,
+knock! Who's there, in the other devil's
+name? Faith, here's an equivocator, that could
+swear in both the scales against either scale;
+who committed treason enough for God's sake,
+yet could not equivocate to heaven: O, come
+in, equivocator.
+

Knocking within

+Knock,
+knock, knock! Who's there? Faith, here's an
+English tailor come hither, for stealing out of
+a French hose: come in, tailor; here you may
+roast your goose.
+

Knocking within

+Knock,
+knock; never at quiet! What are you? But
+this place is too cold for hell. I'll devil-porter
+it no further: I had thought to have let in
+some of all professions that go the primrose
+way to the everlasting bonfire.
+

Knocking within

+Anon, anon! I pray you, remember the porter.
+

Opens the gate

+

Enter MACDUFF and LENNOX

+
+ +MACDUFF +
+Was it so late, friend, ere you went to bed,
+That you do lie so late?
+
+ +Porter +
+'Faith sir, we were carousing till the
+second cock: and drink, sir, is a great
+provoker of three things.
+
+ +MACDUFF +
+What three things does drink especially provoke?
+
+ +Porter +
+Marry, sir, nose-painting, sleep, and
+urine. Lechery, sir, it provokes, and unprovokes;
+it provokes the desire, but it takes
+away the performance: therefore, much drink
+may be said to be an equivocator with lechery:
+it makes him, and it mars him; it sets
+him on, and it takes him off; it persuades him,
+and disheartens him; makes him stand to, and
+not stand to; in conclusion, equivocates him
+in a sleep, and, giving him the lie, leaves him.
+
+ +MACDUFF +
+I believe drink gave thee the lie last night.
+
+ +Porter +
+That it did, sir, i' the very throat on
+me: but I requited him for his lie; and, I
+think, being too strong for him, though he took
+up my legs sometime, yet I made a shift to cast
+him.
+
+ +MACDUFF +
+Is thy master stirring?
+

Enter MACBETH

+Our knocking has awaked him; here he comes.
+
+ +LENNOX +
+Good morrow, noble sir.
+
+ +MACBETH +
+Good morrow, both.
+
+ +MACDUFF +
+Is the king stirring, worthy thane?
+
+ +MACBETH +
+Not yet.
+
+ +MACDUFF +
+He did command me to call timely on him:
+I have almost slipp'd the hour.
+
+ +MACBETH +
+I'll bring you to him.
+
+ +MACDUFF +
+I know this is a joyful trouble to you;
+But yet 'tis one.
+
+ +MACBETH +
+The labour we delight in physics pain.
+This is the door.
+
+ +MACDUFF +
+ I'll make so bold to call,
+For 'tis my limited service.
+

Exit

+
+ +LENNOX +
+Goes the king hence to-day?
+
+ +MACBETH +
+He does: he did appoint so.
+
+ +LENNOX +
+The night has been unruly: where we lay,
+Our chimneys were blown down; and, as they say,
+Lamentings heard i' the air; strange screams of death,
+And prophesying with accents terrible
+Of dire combustion and confused events
+New hatch'd to the woeful time: the obscure bird
+Clamour'd the livelong night: some say, the earth
+Was feverous and did shake.
+
+ +MACBETH +
+'Twas a rough night.
+
+ +LENNOX +
+My young remembrance cannot parallel
+A fellow to it.
+

Re-enter MACDUFF

+
+ +MACDUFF +
+O horror, horror, horror! Tongue nor heart
+Cannot conceive nor name thee!
+
+ +MACBETH + +LENNOX +
+What's the matter.
+
+ +MACDUFF +
+Confusion now hath made his masterpiece!
+Most sacrilegious murder hath broke ope
+The Lord's anointed temple, and stole thence
+The life o' the building!
+
+ +MACBETH +
+What is 't you say? the life?
+
+ +LENNOX +
+Mean you his majesty?
+
+ +MACDUFF +
+Approach the chamber, and destroy your sight
+With a new Gorgon: do not bid me speak;
+See, and then speak yourselves.
+

Exeunt MACBETH and LENNOX

+Awake, awake!
+Ring the alarum-bell. Murder and treason!
+Banquo and Donalbain! Malcolm! awake!
+Shake off this downy sleep, death's counterfeit,
+And look on death itself! up, up, and see
+The great doom's image! Malcolm! Banquo!
+As from your graves rise up, and walk like sprites,
+To countenance this horror! Ring the bell.
+

Bell rings

+

Enter LADY MACBETH

+
+ +LADY MACBETH +
+What's the business,
+That such a hideous trumpet calls to parley
+The sleepers of the house? speak, speak!
+
+ +MACDUFF +
+O gentle lady,
+'Tis not for you to hear what I can speak:
+The repetition, in a woman's ear,
+Would murder as it fell.
+

Enter BANQUO

+O Banquo, Banquo,
+Our royal master 's murder'd!
+
+ +LADY MACBETH +
+Woe, alas!
+What, in our house?
+
+ +BANQUO +
+Too cruel any where.
+Dear Duff, I prithee, contradict thyself,
+And say it is not so.
+

Re-enter MACBETH and LENNOX, with ROSS

+
+ +MACBETH +
+Had I but died an hour before this chance,
+I had lived a blessed time; for, from this instant,
+There 's nothing serious in mortality:
+All is but toys: renown and grace is dead;
+The wine of life is drawn, and the mere lees
+Is left this vault to brag of.
+

Enter MALCOLM and DONALBAIN

+
+ +DONALBAIN +
+What is amiss?
+
+ +MACBETH +
+ You are, and do not know't:
+The spring, the head, the fountain of your blood
+Is stopp'd; the very source of it is stopp'd.
+
+ +MACDUFF +
+Your royal father 's murder'd.
+
+ +MALCOLM +
+O, by whom?
+
+ +LENNOX +
+Those of his chamber, as it seem'd, had done 't:
+Their hands and faces were an badged with blood;
+So were their daggers, which unwiped we found
+Upon their pillows:
+They stared, and were distracted; no man's life
+Was to be trusted with them.
+
+ +MACBETH +
+O, yet I do repent me of my fury,
+That I did kill them.
+
+ +MACDUFF +
+Wherefore did you so?
+
+ +MACBETH +
+Who can be wise, amazed, temperate and furious,
+Loyal and neutral, in a moment? No man:
+The expedition my violent love
+Outrun the pauser, reason. Here lay Duncan,
+His silver skin laced with his golden blood;
+And his gash'd stabs look'd like a breach in nature
+For ruin's wasteful entrance: there, the murderers,
+Steep'd in the colours of their trade, their daggers
+Unmannerly breech'd with gore: who could refrain,
+That had a heart to love, and in that heart
+Courage to make 's love kno wn?
+
+ +LADY MACBETH +
+Help me hence, ho!
+
+ +MACDUFF +
+Look to the lady.
+
+ +MALCOLM +
+[Aside to DONALBAIN] Why do we hold our tongues,
+That most may claim this argument for ours?
+
+ +DONALBAIN +
+[Aside to MALCOLM] What should be spoken here,
+where our fate,
+Hid in an auger-hole, may rush, and seize us?
+Let 's away;
+Our tears are not yet brew'd.
+
+ +MALCOLM +
+[Aside to DONALBAIN] Nor our strong sorrow
+Upon the foot of motion.
+
+ +BANQUO +
+Look to the lady:
+

LADY MACBETH is carried out

+And when we have our naked frailties hid,
+That suffer in exposure, let us meet,
+And question this most bloody piece of work,
+To know it further. Fears and scruples shake us:
+In the great hand of God I stand; and thence
+Against the undivulged pretence I fight
+Of treasonous malice.
+
+ +MACDUFF +
+And so do I.
+
+ +ALL +
+So all.
+
+ +MACBETH +
+Let's briefly put on manly readiness,
+And meet i' the hall together.
+
+ +ALL +
+Well contented.
+

Exeunt all but Malcolm and Donalbain.

+
+ +MALCOLM +
+What will you do? Let's not consort with them:
+To show an unfelt sorrow is an office
+Which the false man does easy. I'll to England.
+
+ +DONALBAIN +
+To Ireland, I; our separated fortune
+Shall keep us both the safer: where we are,
+There's daggers in men's smiles: the near in blood,
+The nearer bloody.
+
+ +MALCOLM +
+ This murderous shaft that's shot
+Hath not yet lighted, and our safest way
+Is to avoid the aim. Therefore, to horse;
+And let us not be dainty of leave-taking,
+But shift away: there's warrant in that theft
+Which steals itself, when there's no mercy left.
+

Exeunt

+
+

SCENE IV. Outside Macbeth's castle.

+

+Enter ROSS and an old Man +
+ +Old Man +
+Threescore and ten I can remember well:
+Within the volume of which time I have seen
+Hours dreadful and things strange; but this sore night
+Hath trifled former knowings.
+
+ +ROSS +
+Ah, good father,
+Thou seest, the heavens, as troubled with man's act,
+Threaten his bloody stage: by the clock, 'tis day,
+And yet dark night strangles the travelling lamp:
+Is't night's predominance, or the day's shame,
+That darkness does the face of earth entomb,
+When living light should kiss it?
+
+ +Old Man +
+'Tis unnatural,
+Even like the deed that's done. On Tuesday last,
+A falcon, towering in her pride of place,
+Was by a mousing owl hawk'd at and kill'd.
+
+ +ROSS +
+And Duncan's horses--a thing most strange and certain--
+Beauteous and swift, the minions of their race,
+Turn'd wild in nature, broke their stalls, flung out,
+Contending 'gainst obedience, as they would make
+War with mankind.
+
+ +Old Man +
+'Tis said they eat each other.
+
+ +ROSS +
+They did so, to the amazement of mine eyes
+That look'd upon't. Here comes the good Macduff.
+

Enter MACDUFF

+How goes the world, sir, now?
+
+ +MACDUFF +
+Why, see you not?
+
+ +ROSS +
+Is't known who did this more than bloody deed?
+
+ +MACDUFF +
+Those that Macbeth hath slain.
+
+ +ROSS +
+Alas, the day!
+What good could they pretend?
+
+ +MACDUFF +
+They were suborn'd:
+Malcolm and Donalbain, the king's two sons,
+Are stol'n away and fled; which puts upon them
+Suspicion of the deed.
+
+ +ROSS +
+'Gainst nature still!
+Thriftless ambition, that wilt ravin up
+Thine own life's means! Then 'tis most like
+The sovereignty will fall upon Macbeth.
+
+ +MACDUFF +
+He is already named, and gone to Scone
+To be invested.
+
+ +ROSS +
+ Where is Duncan's body?
+
+ +MACDUFF +
+Carried to Colmekill,
+The sacred storehouse of his predecessors,
+And guardian of their bones.
+
+ +ROSS +
+Will you to Scone?
+
+ +MACDUFF +
+No, cousin, I'll to Fife.
+
+ +ROSS +
+Well, I will thither.
+
+ +MACDUFF +
+Well, may you see things well done there: adieu!
+Lest our old robes sit easier than our new!
+
+ +ROSS +
+Farewell, father.
+
+ +Old Man +
+God's benison go with you; and with those
+That would make good of bad, and friends of foes!
+

Exeunt

+

+

ACT III

+

SCENE I. Forres. The palace.

+

+Enter BANQUO +
+ +BANQUO +
+Thou hast it now: king, Cawdor, Glamis, all,
+As the weird women promised, and, I fear,
+Thou play'dst most foully for't: yet it was said
+It should not stand in thy posterity,
+But that myself should be the root and father
+Of many kings. If there come truth from them--
+As upon thee, Macbeth, their speeches shine--
+Why, by the verities on thee made good,
+May they not be my oracles as well,
+And set me up in hope? But hush! no more.
+

Sennet sounded. Enter MACBETH, as king, LADY MACBETH, as queen, LENNOX, ROSS, Lords, Ladies, and Attendants

+
+ +MACBETH +
+Here's our chief guest.
+
+ +LADY MACBETH +
+If he had been forgotten,
+It had been as a gap in our great feast,
+And all-thing unbecoming.
+
+ +MACBETH +
+To-night we hold a solemn supper sir,
+And I'll request your presence.
+
+ +BANQUO +
+Let your highness
+Command upon me; to the which my duties
+Are with a most indissoluble tie
+For ever knit.
+
+ +MACBETH +
+ Ride you this afternoon?
+
+ +BANQUO +
+Ay, my good lord.
+
+ +MACBETH +
+We should have else desired your good advice,
+Which still hath been both grave and prosperous,
+In this day's council; but we'll take to-morrow.
+Is't far you ride?
+
+ +BANQUO +
+As far, my lord, as will fill up the time
+'Twixt this and supper: go not my horse the better,
+I must become a borrower of the night
+For a dark hour or twain.
+
+ +MACBETH +
+Fail not our feast.
+
+ +BANQUO +
+My lord, I will not.
+
+ +MACBETH +
+We hear, our bloody cousins are bestow'd
+In England and in Ireland, not confessing
+Their cruel parricide, filling their hearers
+With strange invention: but of that to-morrow,
+When therewithal we shall have cause of state
+Craving us jointly. Hie you to horse: adieu,
+Till you return at night. Goes Fleance with you?
+
+ +BANQUO +
+Ay, my good lord: our time does call upon 's.
+
+ +MACBETH +
+I wish your horses swift and sure of foot;
+And so I do commend you to their backs. Farewell.
+

Exit BANQUO

+Let every man be master of his time
+Till seven at night: to make society
+The sweeter welcome, we will keep ourself
+Till supper-time alone: while then, God be with you!
+

Exeunt all but MACBETH, and an attendant

+Sirrah, a word with you: attend those men
+Our pleasure?
+
+ +ATTENDANT +
+They are, my lord, without the palace gate.
+
+ +MACBETH +
+Bring them before us.
+

Exit Attendant

+To be thus is nothing;
+But to be safely thus.--Our fears in Banquo
+Stick deep; and in his royalty of nature
+Reigns that which would be fear'd: 'tis much he dares;
+And, to that dauntless temper of his mind,
+He hath a wisdom that doth guide his valour
+To act in safety. There is none but he
+Whose being I do fear: and, under him,
+My Genius is rebuked; as, it is said,
+Mark Antony's was by Caesar. He chid the sisters
+When first they put the name of king upon me,
+And bade them speak to him: then prophet-like
+They hail'd him father to a line of kings:
+Upon my head they placed a fruitless crown,
+And put a barren sceptre in my gripe,
+Thence to be wrench'd with an unlineal hand,
+No son of mine succeeding. If 't be so,
+For Banquo's issue have I filed my mind;
+For them the gracious Duncan have I murder'd;
+Put rancours in the vessel of my peace
+Only for them; and mine eternal jewel
+Given to the common enemy of man,
+To make them kings, the seed of Banquo kings!
+Rather than so, come fate into the list.
+And champion me to the utterance! Who's there!
+

Re-enter Attendant, with two Murderers

+Now go to the door, and stay there till we call.
+

Exit Attendant

+Was it not yesterday we spoke together?
+
+ +First Murderer +
+It was, so please your highness.
+
+ +MACBETH +
+Well then, now
+Have you consider'd of my speeches? Know
+That it was he in the times past which held you
+So under fortune, which you thought had been
+Our innocent self: this I made good to you
+In our last conference, pass'd in probation with you,
+How you were borne in hand, how cross'd,
+the instruments,
+Who wrought with them, and all things else that might
+To half a soul and to a notion crazed
+Say 'Thus did Banquo.'
+
+ +First Murderer +
+You made it known to us.
+
+ +MACBETH +
+I did so, and went further, which is now
+Our point of second meeting. Do you find
+Your patience so predominant in your nature
+That you can let this go? Are you so gospell'd
+To pray for this good man and for his issue,
+Whose heavy hand hath bow'd you to the grave
+And beggar'd yours for ever?
+
+ +First Murderer +
+We are men, my liege.
+
+ +MACBETH +
+Ay, in the catalogue ye go for men;
+As hounds and greyhounds, mongrels, spaniels, curs,
+Shoughs, water-rugs and demi-wolves, are clept
+All by the name of dogs: the valued file
+Distinguishes the swift, the slow, the subtle,
+The housekeeper, the hunter, every one
+According to the gift which bounteous nature
+Hath in him closed; whereby he does receive
+Particular addition. from the bill
+That writes them all alike: and so of men.
+Now, if you have a station in the file,
+Not i' the worst rank of manhood, say 't;
+And I will put that business in your bosoms,
+Whose execution takes your enemy off,
+Grapples you to the heart and love of us,
+Who wear our health but sickly in his life,
+Which in his death were perfect.
+
+ +Second Murderer +
+I am one, my liege,
+Whom the vile blows and buffets of the world
+Have so incensed that I am reckless what
+I do to spite the world.
+
+ +First Murderer +
+And I another
+So weary with disasters, tugg'd with fortune,
+That I would set my lie on any chance,
+To mend it, or be rid on't.
+
+ +MACBETH +
+Both of you
+Know Banquo was your enemy.
+
+ +Both Murderers +
+True, my lord.
+
+ +MACBETH +
+So is he mine; and in such bloody distance,
+That every minute of his being thrusts
+Against my near'st of life: and though I could
+With barefaced power sweep him from my sight
+And bid my will avouch it, yet I must not,
+For certain friends that are both his and mine,
+Whose loves I may not drop, but wail his fall
+Who I myself struck down; and thence it is,
+That I to your assistance do make love,
+Masking the business from the common eye
+For sundry weighty reasons.
+
+ +Second Murderer +
+We shall, my lord,
+Perform what you command us.
+
+ +First Murderer +
+Though our lives--
+
+ +MACBETH +
+Your spirits shine through you. Within this hour at most
+I will advise you where to plant yourselves;
+Acquaint you with the perfect spy o' the time,
+The moment on't; for't must be done to-night,
+And something from the palace; always thought
+That I require a clearness: and with him--
+To leave no rubs nor botches in the work--
+Fleance his son, that keeps him company,
+Whose absence is no less material to me
+Than is his father's, must embrace the fate
+Of that dark hour. Resolve yourselves apart:
+I'll come to you anon.
+
+ +Both Murderers +
+We are resolved, my lord.
+
+ +MACBETH +
+I'll call upon you straight: abide within.
+

Exeunt Murderers

+It is concluded. Banquo, thy soul's flight,
+If it find heaven, must find it out to-night.
+

Exit

+
+

SCENE II. The palace.

+

+Enter LADY MACBETH and a Servant +
+ +LADY MACBETH +
+Is Banquo gone from court?
+
+ +Servant +
+Ay, madam, but returns again to-night.
+
+ +LADY MACBETH +
+Say to the king, I would attend his leisure
+For a few words.
+
+ +Servant +
+ Madam, I will.
+

Exit

+
+ +LADY MACBETH +
+Nought's had, all's spent,
+Where our desire is got without content:
+'Tis safer to be that which we destroy
+Than by destruction dwell in doubtful joy.
+

Enter MACBETH

+How now, my lord! why do you keep alone,
+Of sorriest fancies your companions making,
+Using those thoughts which should indeed have died
+With them they think on? Things without all remedy
+Should be without regard: what's done is done.
+
+ +MACBETH +
+We have scotch'd the snake, not kill'd it:
+She'll close and be herself, whilst our poor malice
+Remains in danger of her former tooth.
+But let the frame of things disjoint, both the
+worlds suffer,
+Ere we will eat our meal in fear and sleep
+In the affliction of these terrible dreams
+That shake us nightly: better be with the dead,
+Whom we, to gain our peace, have sent to peace,
+Than on the torture of the mind to lie
+In restless ecstasy. Duncan is in his grave;
+After life's fitful fever he sleeps well;
+Treason has done his worst: nor steel, nor poison,
+Malice domestic, foreign levy, nothing,
+Can touch him further.
+
+ +LADY MACBETH +
+Come on;
+Gentle my lord, sleek o'er your rugged looks;
+Be bright and jovial among your guests to-night.
+
+ +MACBETH +
+So shall I, love; and so, I pray, be you:
+Let your remembrance apply to Banquo;
+Present him eminence, both with eye and tongue:
+Unsafe the while, that we
+Must lave our honours in these flattering streams,
+And make our faces vizards to our hearts,
+Disguising what they are.
+
+ +LADY MACBETH +
+You must leave this.
+
+ +MACBETH +
+O, full of scorpions is my mind, dear wife!
+Thou know'st that Banquo, and his Fleance, lives.
+
+ +LADY MACBETH +
+But in them nature's copy's not eterne.
+
+ +MACBETH +
+There's comfort yet; they are assailable;
+Then be thou jocund: ere the bat hath flown
+His cloister'd flight, ere to black Hecate's summons
+The shard-borne beetle with his drowsy hums
+Hath rung night's yawning peal, there shall be done
+A deed of dreadful note.
+
+ +LADY MACBETH +
+What's to be done?
+
+ +MACBETH +
+Be innocent of the knowledge, dearest chuck,
+Till thou applaud the deed. Come, seeling night,
+Scarf up the tender eye of pitiful day;
+And with thy bloody and invisible hand
+Cancel and tear to pieces that great bond
+Which keeps me pale! Light thickens; and the crow
+Makes wing to the rooky wood:
+Good things of day begin to droop and drowse;
+While night's black agents to their preys do rouse.
+Thou marvell'st at my words: but hold thee still;
+Things bad begun make strong themselves by ill.
+So, prithee, go with me.
+

Exeunt

+
+

SCENE III. A park near the palace.

+

+Enter three Murderers +
+ +First Murderer +
+But who did bid thee join with us?
+
+ +Third Murderer +
+Macbeth.
+
+ +Second Murderer +
+He needs not our mistrust, since he delivers
+Our offices and what we have to do
+To the direction just.
+
+ +First Murderer +
+Then stand with us.
+The west yet glimmers with some streaks of day:
+Now spurs the lated traveller apace
+To gain the timely inn; and near approaches
+The subject of our watch.
+
+ +Third Murderer +
+Hark! I hear horses.
+
+ +BANQUO +
+[Within] Give us a light there, ho!
+
+ +Second Murderer +
+Then 'tis he: the rest
+That are within the note of expectation
+Already are i' the court.
+
+ +First Murderer +
+His horses go about.
+
+ +Third Murderer +
+Almost a mile: but he does usually,
+So all men do, from hence to the palace gate
+Make it their walk.
+
+ +Second Murderer +
+A light, a light!
+

Enter BANQUO, and FLEANCE with a torch

+
+ +Third Murderer +
+'Tis he.
+
+ +First Murderer +
+Stand to't.
+
+ +BANQUO +
+It will be rain to-night.
+
+ +First Murderer +
+Let it come down.
+

They set upon BANQUO

+
+ +BANQUO +
+O, treachery! Fly, good Fleance, fly, fly, fly!
+Thou mayst revenge. O slave!
+

Dies. FLEANCE escapes

+
+ +Third Murderer +
+Who did strike out the light?
+
+ +First Murderer +
+Wast not the way?
+
+ +Third Murderer +
+There's but one down; the son is fled.
+
+ +Second Murderer +
+We have lost
+Best half of our affair.
+
+ +First Murderer +
+Well, let's away, and say how much is done.
+

Exeunt

+
+

SCENE IV. The same. Hall in the palace.

+

+A banquet prepared. Enter MACBETH, LADY MACBETH, ROSS, LENNOX, Lords, and Attendants +
+ +MACBETH +
+You know your own degrees; sit down: at first
+And last the hearty welcome.
+
+ +Lords +
+Thanks to your majesty.
+
+ +MACBETH +
+Ourself will mingle with society,
+And play the humble host.
+Our hostess keeps her state, but in best time
+We will require her welcome.
+
+ +LADY MACBETH +
+Pronounce it for me, sir, to all our friends;
+For my heart speaks they are welcome.
+

First Murderer appears at the door

+
+ +MACBETH +
+See, they encounter thee with their hearts' thanks.
+Both sides are even: here I'll sit i' the midst:
+Be large in mirth; anon we'll drink a measure
+The table round.
+

Approaching the door

+There's blood on thy face.
+
+ +First Murderer +
+'Tis Banquo's then.
+
+ +MACBETH +
+'Tis better thee without than he within.
+Is he dispatch'd?
+
+ +First Murderer +
+My lord, his throat is cut; that I did for him.
+
+ +MACBETH +
+Thou art the best o' the cut-throats: yet he's good
+That did the like for Fleance: if thou didst it,
+Thou art the nonpareil.
+
+ +First Murderer +
+Most royal sir,
+Fleance is 'scaped.
+
+ +MACBETH +
+Then comes my fit again: I had else been perfect,
+Whole as the marble, founded as the rock,
+As broad and general as the casing air:
+But now I am cabin'd, cribb'd, confined, bound in
+To saucy doubts and fears. But Banquo's safe?
+
+ +First Murderer +
+Ay, my good lord: safe in a ditch he bides,
+With twenty trenched gashes on his head;
+The least a death to nature.
+
+ +MACBETH +
+Thanks for that:
+There the grown serpent lies; the worm that's fled
+Hath nature that in time will venom breed,
+No teeth for the present. Get thee gone: to-morrow
+We'll hear, ourselves, again.
+

Exit Murderer

+
+ +LADY MACBETH +
+My royal lord,
+You do not give the cheer: the feast is sold
+That is not often vouch'd, while 'tis a-making,
+'Tis given with welcome: to feed were best at home;
+From thence the sauce to meat is ceremony;
+Meeting were bare without it.
+
+ +MACBETH +
+Sweet remembrancer!
+Now, good digestion wait on appetite,
+And health on both!
+
+ +LENNOX +
+May't please your highness sit.
+

The GHOST OF BANQUO enters, and sits in MACBETH's place

+
+ +MACBETH +
+Here had we now our country's honour roof'd,
+Were the graced person of our Banquo present;
+Who may I rather challenge for unkindness
+Than pity for mischance!
+
+ +ROSS +
+His absence, sir,
+Lays blame upon his promise. Please't your highness
+To grace us with your royal company.
+
+ +MACBETH +
+The table's full.
+
+ +LENNOX +
+ Here is a place reserved, sir.
+
+ +MACBETH +
+Where?
+
+ +LENNOX +
+Here, my good lord. What is't that moves your highness?
+
+ +MACBETH +
+Which of you have done this?
+
+ +Lords +
+What, my good lord?
+
+ +MACBETH +
+Thou canst not say I did it: never shake
+Thy gory locks at me.
+
+ +ROSS +
+Gentlemen, rise: his highness is not well.
+
+ +LADY MACBETH +
+Sit, worthy friends: my lord is often thus,
+And hath been from his youth: pray you, keep seat;
+The fit is momentary; upon a thought
+He will again be well: if much you note him,
+You shall offend him and extend his passion:
+Feed, and regard him not. Are you a man?
+
+ +MACBETH +
+Ay, and a bold one, that dare look on that
+Which might appal the devil.
+
+ +LADY MACBETH +
+O proper stuff!
+This is the very painting of your fear:
+This is the air-drawn dagger which, you said,
+Led you to Duncan. O, these flaws and starts,
+Impostors to true fear, would well become
+A woman's story at a winter's fire,
+Authorized by her grandam. Shame itself!
+Why do you make such faces? When all's done,
+You look but on a stool.
+
+ +MACBETH +
+Prithee, see there! behold! look! lo!
+how say you?
+Why, what care I? If thou canst nod, speak too.
+If charnel-houses and our graves must send
+Those that we bury back, our monuments
+Shall be the maws of kites.
+

GHOST OF BANQUO vanishes

+
+ +LADY MACBETH +
+What, quite unmann'd in folly?
+
+ +MACBETH +
+If I stand here, I saw him.
+
+ +LADY MACBETH +
+Fie, for shame!
+
+ +MACBETH +
+Blood hath been shed ere now, i' the olden time,
+Ere human statute purged the gentle weal;
+Ay, and since too, murders have been perform'd
+Too terrible for the ear: the times have been,
+That, when the brains were out, the man would die,
+And there an end; but now they rise again,
+With twenty mortal murders on their crowns,
+And push us from our stools: this is more strange
+Than such a murder is.
+
+ +LADY MACBETH +
+My worthy lord,
+Your noble friends do lack you.
+
+ +MACBETH +
+I do forget.
+Do not muse at me, my most worthy friends,
+I have a strange infirmity, which is nothing
+To those that know me. Come, love and health to all;
+Then I'll sit down. Give me some wine; fill full.
+I drink to the general joy o' the whole table,
+And to our dear friend Banquo, whom we miss;
+Would he were here! to all, and him, we thirst,
+And all to all.
+
+ +Lords +
+ Our duties, and the pledge.
+

Re-enter GHOST OF BANQUO

+
+ +MACBETH +
+Avaunt! and quit my sight! let the earth hide thee!
+Thy bones are marrowless, thy blood is cold;
+Thou hast no speculation in those eyes
+Which thou dost glare with!
+
+ +LADY MACBETH +
+Think of this, good peers,
+But as a thing of custom: 'tis no other;
+Only it spoils the pleasure of the time.
+
+ +MACBETH +
+What man dare, I dare:
+Approach thou like the rugged Russian bear,
+The arm'd rhinoceros, or the Hyrcan tiger;
+Take any shape but that, and my firm nerves
+Shall never tremble: or be alive again,
+And dare me to the desert with thy sword;
+If trembling I inhabit then, protest me
+The baby of a girl. Hence, horrible shadow!
+Unreal mockery, hence!
+

GHOST OF BANQUO vanishes

+Why, so: being gone,
+I am a man again. Pray you, sit still.
+
+ +LADY MACBETH +
+You have displaced the mirth, broke the good meeting,
+With most admired disorder.
+
+ +MACBETH +
+Can such things be,
+And overcome us like a summer's cloud,
+Without our special wonder? You make me strange
+Even to the disposition that I owe,
+When now I think you can behold such sights,
+And keep the natural ruby of your cheeks,
+When mine is blanched with fear.
+
+ +ROSS +
+What sights, my lord?
+
+ +LADY MACBETH +
+I pray you, speak not; he grows worse and worse;
+Question enrages him. At once, good night:
+Stand not upon the order of your going,
+But go at once.
+
+ +LENNOX +
+ Good night; and better health
+Attend his majesty!
+
+ +LADY MACBETH +
+A kind good night to all!
+

Exeunt all but MACBETH and LADY MACBETH

+
+ +MACBETH +
+It will have blood; they say, blood will have blood:
+Stones have been known to move and trees to speak;
+Augurs and understood relations have
+By magot-pies and choughs and rooks brought forth
+The secret'st man of blood. What is the night?
+
+ +LADY MACBETH +
+Almost at odds with morning, which is which.
+
+ +MACBETH +
+How say'st thou, that Macduff denies his person
+At our great bidding?
+
+ +LADY MACBETH +
+Did you send to him, sir?
+
+ +MACBETH +
+I hear it by the way; but I will send:
+There's not a one of them but in his house
+I keep a servant fee'd. I will to-morrow,
+And betimes I will, to the weird sisters:
+More shall they speak; for now I am bent to know,
+By the worst means, the worst. For mine own good,
+All causes shall give way: I am in blood
+Stepp'd in so far that, should I wade no more,
+Returning were as tedious as go o'er:
+Strange things I have in head, that will to hand;
+Which must be acted ere they may be scann'd.
+
+ +LADY MACBETH +
+You lack the season of all natures, sleep.
+
+ +MACBETH +
+Come, we'll to sleep. My strange and self-abuse
+Is the initiate fear that wants hard use:
+We are yet but young in deed.
+

Exeunt

+
+

SCENE V. A Heath.

+

+Thunder. Enter the three Witches meeting HECATE +
+ +First Witch +
+Why, how now, Hecate! you look angerly.
+
+ +HECATE +
+Have I not reason, beldams as you are,
+Saucy and overbold? How did you dare
+To trade and traffic with Macbeth
+In riddles and affairs of death;
+And I, the mistress of your charms,
+The close contriver of all harms,
+Was never call'd to bear my part,
+Or show the glory of our art?
+And, which is worse, all you have done
+Hath been but for a wayward son,
+Spiteful and wrathful, who, as others do,
+Loves for his own ends, not for you.
+But make amends now: get you gone,
+And at the pit of Acheron
+Meet me i' the morning: thither he
+Will come to know his destiny:
+Your vessels and your spells provide,
+Your charms and every thing beside.
+I am for the air; this night I'll spend
+Unto a dismal and a fatal end:
+Great business must be wrought ere noon:
+Upon the corner of the moon
+There hangs a vaporous drop profound;
+I'll catch it ere it come to ground:
+And that distill'd by magic sleights
+Shall raise such artificial sprites
+As by the strength of their illusion
+Shall draw him on to his confusion:
+He shall spurn fate, scorn death, and bear
+He hopes 'bove wisdom, grace and fear:
+And you all know, security
+Is mortals' chiefest enemy.
+

Music and a song within: 'Come away, come away,' & c

+Hark! I am call'd; my little spirit, see,
+Sits in a foggy cloud, and stays for me.
+

Exit

+
+ +First Witch +
+Come, let's make haste; she'll soon be back again.
+

Exeunt

+
+

SCENE VI. Forres. The palace.

+

+Enter LENNOX and another Lord +
+ +LENNOX +
+My former speeches have but hit your thoughts,
+Which can interpret further: only, I say,
+Things have been strangely borne. The
+gracious Duncan
+Was pitied of Macbeth: marry, he was dead:
+And the right-valiant Banquo walk'd too late;
+Whom, you may say, if't please you, Fleance kill'd,
+For Fleance fled: men must not walk too late.
+Who cannot want the thought how monstrous
+It was for Malcolm and for Donalbain
+To kill their gracious father? damned fact!
+How it did grieve Macbeth! did he not straight
+In pious rage the two delinquents tear,
+That were the slaves of drink and thralls of sleep?
+Was not that nobly done? Ay, and wisely too;
+For 'twould have anger'd any heart alive
+To hear the men deny't. So that, I say,
+He has borne all things well: and I do think
+That had he Duncan's sons under his key--
+As, an't please heaven, he shall not--they
+should find
+What 'twere to kill a father; so should Fleance.
+But, peace! for from broad words and 'cause he fail'd
+His presence at the tyrant's feast, I hear
+Macduff lives in disgrace: sir, can you tell
+Where he bestows himself?
+
+ +Lord +
+The son of Duncan,
+From whom this tyrant holds the due of birth
+Lives in the English court, and is received
+Of the most pious Edward with such grace
+That the malevolence of fortune nothing
+Takes from his high respect: thither Macduff
+Is gone to pray the holy king, upon his aid
+To wake Northumberland and warlike Siward:
+That, by the help of these--with Him above
+To ratify the work--we may again
+Give to our tables meat, sleep to our nights,
+Free from our feasts and banquets bloody knives,
+Do faithful homage and receive free honours:
+All which we pine for now: and this report
+Hath so exasperate the king that he
+Prepares for some attempt of war.
+
+ +LENNOX +
+Sent he to Macduff?
+
+ +Lord +
+He did: and with an absolute 'Sir, not I,'
+The cloudy messenger turns me his back,
+And hums, as who should say 'You'll rue the time
+That clogs me with this answer.'
+
+ +LENNOX +
+And that well might
+Advise him to a caution, to hold what distance
+His wisdom can provide. Some holy angel
+Fly to the court of England and unfold
+His message ere he come, that a swift blessing
+May soon return to this our suffering country
+Under a hand accursed!
+
+ +Lord +
+I'll send my prayers with him.
+

Exeunt

+

+

ACT IV

+

SCENE I. A cavern. In the middle, a boiling cauldron.

+

+Thunder. Enter the three Witches +
+ +First Witch +
+Thrice the brinded cat hath mew'd.
+
+ +Second Witch +
+Thrice and once the hedge-pig whined.
+
+ +Third Witch +
+Harpier cries 'Tis time, 'tis time.
+
+ +First Witch +
+Round about the cauldron go;
+In the poison'd entrails throw.
+Toad, that under cold stone
+Days and nights has thirty-one
+Swelter'd venom sleeping got,
+Boil thou first i' the charmed pot.
+
+ +ALL +
+Double, double toil and trouble;
+Fire burn, and cauldron bubble.
+
+ +Second Witch +
+Fillet of a fenny snake,
+In the cauldron boil and bake;
+Eye of newt and toe of frog,
+Wool of bat and tongue of dog,
+Adder's fork and blind-worm's sting,
+Lizard's leg and owlet's wing,
+For a charm of powerful trouble,
+Like a hell-broth boil and bubble.
+
+ +ALL +
+Double, double toil and trouble;
+Fire burn and cauldron bubble.
+
+ +Third Witch +
+Scale of dragon, tooth of wolf,
+Witches' mummy, maw and gulf
+Of the ravin'd salt-sea shark,
+Root of hemlock digg'd i' the dark,
+Liver of blaspheming Jew,
+Gall of goat, and slips of yew
+Silver'd in the moon's eclipse,
+Nose of Turk and Tartar's lips,
+Finger of birth-strangled babe
+Ditch-deliver'd by a drab,
+Make the gruel thick and slab:
+Add thereto a tiger's chaudron,
+For the ingredients of our cauldron.
+
+ +ALL +
+Double, double toil and trouble;
+Fire burn and cauldron bubble.
+
+ +Second Witch +
+Cool it with a baboon's blood,
+Then the charm is firm and good.
+

Enter HECATE to the other three Witches

+
+ +HECATE +
+O well done! I commend your pains;
+And every one shall share i' the gains;
+And now about the cauldron sing,
+Live elves and fairies in a ring,
+Enchanting all that you put in.
+

Music and a song: 'Black spirits,' & c

+

HECATE retires

+
+ +Second Witch +
+By the pricking of my thumbs,
+Something wicked this way comes.
+Open, locks,
+Whoever knocks!
+

Enter MACBETH

+
+ +MACBETH +
+How now, you secret, black, and midnight hags!
+What is't you do?
+
+ +ALL +
+ A deed without a name.
+
+ +MACBETH +
+I conjure you, by that which you profess,
+Howe'er you come to know it, answer me:
+Though you untie the winds and let them fight
+Against the churches; though the yesty waves
+Confound and swallow navigation up;
+Though bladed corn be lodged and trees blown down;
+Though castles topple on their warders' heads;
+Though palaces and pyramids do slope
+Their heads to their foundations; though the treasure
+Of nature's germens tumble all together,
+Even till destruction sicken; answer me
+To what I ask you.
+
+ +First Witch +
+ Speak.
+
+ +Second Witch +
+Demand.
+
+ +Third Witch +
+We'll answer.
+
+ +First Witch +
+Say, if thou'dst rather hear it from our mouths,
+Or from our masters?
+
+ +MACBETH +
+Call 'em; let me see 'em.
+
+ +First Witch +
+Pour in sow's blood, that hath eaten
+Her nine farrow; grease that's sweaten
+From the murderer's gibbet throw
+Into the flame.
+
+ +ALL +
+ Come, high or low;
+Thyself and office deftly show!
+

Thunder. First Apparition: an armed Head

+
+ +MACBETH +
+Tell me, thou unknown power,--
+
+ +First Witch +
+He knows thy thought:
+Hear his speech, but say thou nought.
+
+ +First Apparition +
+Macbeth! Macbeth! Macbeth! beware Macduff;
+Beware the thane of Fife. Dismiss me. Enough.
+

Descends

+
+ +MACBETH +
+Whate'er thou art, for thy good caution, thanks;
+Thou hast harp'd my fear aright: but one
+word more,--
+
+ +First Witch +
+He will not be commanded: here's another,
+More potent than the first.
+

Thunder. Second Apparition: A bloody Child

+
+ +Second Apparition +
+Macbeth! Macbeth! Macbeth!
+
+ +MACBETH +
+Had I three ears, I'ld hear thee.
+
+ +Second Apparition +
+Be bloody, bold, and resolute; laugh to scorn
+The power of man, for none of woman born
+Shall harm Macbeth.
+

Descends

+
+ +MACBETH +
+Then live, Macduff: what need I fear of thee?
+But yet I'll make assurance double sure,
+And take a bond of fate: thou shalt not live;
+That I may tell pale-hearted fear it lies,
+And sleep in spite of thunder.
+

Thunder. Third Apparition: a Child crowned, with a tree in his hand

+What is this
+That rises like the issue of a king,
+And wears upon his baby-brow the round
+And top of sovereignty?
+
+ +ALL +
+Listen, but speak not to't.
+
+ +Third Apparition +
+Be lion-mettled, proud; and take no care
+Who chafes, who frets, or where conspirers are:
+Macbeth shall never vanquish'd be until
+Great Birnam wood to high Dunsinane hill
+Shall come against him.
+

Descends

+
+ +MACBETH +
+That will never be
+Who can impress the forest, bid the tree
+Unfix his earth-bound root? Sweet bodements! good!
+Rebellion's head, rise never till the wood
+Of Birnam rise, and our high-placed Macbeth
+Shall live the lease of nature, pay his breath
+To time and mortal custom. Yet my heart
+Throbs to know one thing: tell me, if your art
+Can tell so much: shall Banquo's issue ever
+Reign in this kingdom?
+
+ +ALL +
+Seek to know no more.
+
+ +MACBETH +
+I will be satisfied: deny me this,
+And an eternal curse fall on you! Let me know.
+Why sinks that cauldron? and what noise is this?
+

Hautboys

+
+ +First Witch +
+Show!
+
+ +Second Witch +
+Show!
+
+ +Third Witch +
+Show!
+
+ +ALL +
+Show his eyes, and grieve his heart;
+Come like shadows, so depart!
+

A show of Eight Kings, the last with a glass in his hand; GHOST OF BANQUO following

+
+ +MACBETH +
+Thou art too like the spirit of Banquo: down!
+Thy crown does sear mine eye-balls. And thy hair,
+Thou other gold-bound brow, is like the first.
+A third is like the former. Filthy hags!
+Why do you show me this? A fourth! Start, eyes!
+What, will the line stretch out to the crack of doom?
+Another yet! A seventh! I'll see no more:
+And yet the eighth appears, who bears a glass
+Which shows me many more; and some I see
+That two-fold balls and treble scepters carry:
+Horrible sight! Now, I see, 'tis true;
+For the blood-bolter'd Banquo smiles upon me,
+And points at them for his.
+

Apparitions vanish

+What, is this so?
+
+ +First Witch +
+Ay, sir, all this is so: but why
+Stands Macbeth thus amazedly?
+Come, sisters, cheer we up his sprites,
+And show the best of our delights:
+I'll charm the air to give a sound,
+While you perform your antic round:
+That this great king may kindly say,
+Our duties did his welcome pay.
+

Music. The witches dance and then vanish, with HECATE

+
+ +MACBETH +
+Where are they? Gone? Let this pernicious hour
+Stand aye accursed in the calendar!
+Come in, without there!
+

Enter LENNOX

+
+ +LENNOX +
+What's your grace's will?
+
+ +MACBETH +
+Saw you the weird sisters?
+
+ +LENNOX +
+No, my lord.
+
+ +MACBETH +
+Came they not by you?
+
+ +LENNOX +
+No, indeed, my lord.
+
+ +MACBETH +
+Infected be the air whereon they ride;
+And damn'd all those that trust them! I did hear
+The galloping of horse: who was't came by?
+
+ +LENNOX +
+'Tis two or three, my lord, that bring you word
+Macduff is fled to England.
+
+ +MACBETH +
+Fled to England!
+
+ +LENNOX +
+Ay, my good lord.
+
+ +MACBETH +
+Time, thou anticipatest my dread exploits:
+The flighty purpose never is o'ertook
+Unless the deed go with it; from this moment
+The very firstlings of my heart shall be
+The firstlings of my hand. And even now,
+To crown my thoughts with acts, be it thought and done:
+The castle of Macduff I will surprise;
+Seize upon Fife; give to the edge o' the sword
+His wife, his babes, and all unfortunate souls
+That trace him in his line. No boasting like a fool;
+This deed I'll do before this purpose cool.
+But no more sights!--Where are these gentlemen?
+Come, bring me where they are.
+

Exeunt

+
+

SCENE II. Fife. Macduff's castle.

+

+Enter LADY MACDUFF, her Son, and ROSS +
+ +LADY MACDUFF +
+What had he done, to make him fly the land?
+
+ +ROSS +
+You must have patience, madam.
+
+ +LADY MACDUFF +
+He had none:
+His flight was madness: when our actions do not,
+Our fears do make us traitors.
+
+ +ROSS +
+You know not
+Whether it was his wisdom or his fear.
+
+ +LADY MACDUFF +
+Wisdom! to leave his wife, to leave his babes,
+His mansion and his titles in a place
+From whence himself does fly? He loves us not;
+He wants the natural touch: for the poor wren,
+The most diminutive of birds, will fight,
+Her young ones in her nest, against the owl.
+All is the fear and nothing is the love;
+As little is the wisdom, where the flight
+So runs against all reason.
+
+ +ROSS +
+My dearest coz,
+I pray you, school yourself: but for your husband,
+He is noble, wise, judicious, and best knows
+The fits o' the season. I dare not speak
+much further;
+But cruel are the times, when we are traitors
+And do not know ourselves, when we hold rumour
+From what we fear, yet know not what we fear,
+But float upon a wild and violent sea
+Each way and move. I take my leave of you:
+Shall not be long but I'll be here again:
+Things at the worst will cease, or else climb upward
+To what they were before. My pretty cousin,
+Blessing upon you!
+
+ +LADY MACDUFF +
+Father'd he is, and yet he's fatherless.
+
+ +ROSS +
+I am so much a fool, should I stay longer,
+It would be my disgrace and your discomfort:
+I take my leave at once.
+

Exit

+
+ +LADY MACDUFF +
+Sirrah, your father's dead;
+And what will you do now? How will you live?
+
+ +Son +
+As birds do, mother.
+
+ +LADY MACDUFF +
+What, with worms and flies?
+
+ +Son +
+With what I get, I mean; and so do they.
+
+ +LADY MACDUFF +
+Poor bird! thou'ldst never fear the net nor lime,
+The pitfall nor the gin.
+
+ +Son +
+Why should I, mother? Poor birds they are not set for.
+My father is not dead, for all your saying.
+
+ +LADY MACDUFF +
+Yes, he is dead; how wilt thou do for a father?
+
+ +Son +
+Nay, how will you do for a husband?
+
+ +LADY MACDUFF +
+Why, I can buy me twenty at any market.
+
+ +Son +
+Then you'll buy 'em to sell again.
+
+ +LADY MACDUFF +
+Thou speak'st with all thy wit: and yet, i' faith,
+With wit enough for thee.
+
+ +Son +
+Was my father a traitor, mother?
+
+ +LADY MACDUFF +
+Ay, that he was.
+
+ +Son +
+What is a traitor?
+
+ +LADY MACDUFF +
+Why, one that swears and lies.
+
+ +Son +
+And be all traitors that do so?
+
+ +LADY MACDUFF +
+Every one that does so is a traitor, and must be hanged.
+
+ +Son +
+And must they all be hanged that swear and lie?
+
+ +LADY MACDUFF +
+Every one.
+
+ +Son +
+Who must hang them?
+
+ +LADY MACDUFF +
+Why, the honest men.
+
+ +Son +
+Then the liars and swearers are fools,
+for there are liars and swearers enow to beat
+the honest men and hang up them.
+
+ +LADY MACDUFF +
+Now, God help thee, poor monkey!
+But how wilt thou do for a father?
+
+ +Son +
+If he were dead, you'ld weep for
+him: if you would not, it were a good sign
+that I should quickly have a new father.
+
+ +LADY MACDUFF +
+Poor prattler, how thou talk'st!
+

Enter a Messenger

+
+ +Messenger +
+Bless you, fair dame! I am not to you known,
+Though in your state of honour I am perfect.
+I doubt some danger does approach you nearly:
+If you will take a homely man's advice,
+Be not found here; hence, with your little ones.
+To fright you thus, methinks, I am too savage;
+To do worse to you were fell cruelty,
+Which is too nigh your person. Heaven preserve you!
+I dare abide no longer.
+

Exit

+
+ +LADY MACDUFF +
+Whither should I fly?
+I have done no harm. But I remember now
+I am in this earthly world; where to do harm
+Is often laudable, to do good sometime
+Accounted dangerous folly: why then, alas,
+Do I put up that womanly defence,
+To say I have done no harm?
+

Enter Murderers

+What are these faces?
+
+ +First Murderer +
+Where is your husband?
+
+ +LADY MACDUFF +
+I hope, in no place so unsanctified
+Where such as thou mayst find him.
+
+ +First Murderer +
+He's a traitor.
+
+ +Son +
+Thou liest, thou shag-hair'd villain!
+
+ +First Murderer +
+What, you egg!
+

Stabbing him

+Young fry of treachery!
+
+ +Son +
+He has kill'd me, mother:
+Run away, I pray you!
+

Dies

+

Exit LADY MACDUFF, crying 'Murder!' Exeunt Murderers, following her

+
+

SCENE III. England. Before the King's palace.

+

+Enter MALCOLM and MACDUFF +
+ +MALCOLM +
+Let us seek out some desolate shade, and there
+Weep our sad bosoms empty.
+
+ +MACDUFF +
+Let us rather
+Hold fast the mortal sword, and like good men
+Bestride our down-fall'n birthdom: each new morn
+New widows howl, new orphans cry, new sorrows
+Strike heaven on the face, that it resounds
+As if it felt with Scotland and yell'd out
+Like syllable of dolour.
+
+ +MALCOLM +
+What I believe I'll wail,
+What know believe, and what I can redress,
+As I shall find the time to friend, I will.
+What you have spoke, it may be so perchance.
+This tyrant, whose sole name blisters our tongues,
+Was once thought honest: you have loved him well.
+He hath not touch'd you yet. I am young;
+but something
+You may deserve of him through me, and wisdom
+To offer up a weak poor innocent lamb
+To appease an angry god.
+
+ +MACDUFF +
+I am not treacherous.
+
+ +MALCOLM +
+But Macbeth is.
+A good and virtuous nature may recoil
+In an imperial charge. But I shall crave
+your pardon;
+That which you are my thoughts cannot transpose:
+Angels are bright still, though the brightest fell;
+Though all things foul would wear the brows of grace,
+Yet grace must still look so.
+
+ +MACDUFF +
+I have lost my hopes.
+
+ +MALCOLM +
+Perchance even there where I did find my doubts.
+Why in that rawness left you wife and child,
+Those precious motives, those strong knots of love,
+Without leave-taking? I pray you,
+Let not my jealousies be your dishonours,
+But mine own safeties. You may be rightly just,
+Whatever I shall think.
+
+ +MACDUFF +
+Bleed, bleed, poor country!
+Great tyranny! lay thou thy basis sure,
+For goodness dare not cheque thee: wear thou
+thy wrongs;
+The title is affeer'd! Fare thee well, lord:
+I would not be the villain that thou think'st
+For the whole space that's in the tyrant's grasp,
+And the rich East to boot.
+
+ +MALCOLM +
+Be not offended:
+I speak not as in absolute fear of you.
+I think our country sinks beneath the yoke;
+It weeps, it bleeds; and each new day a gash
+Is added to her wounds: I think withal
+There would be hands uplifted in my right;
+And here from gracious England have I offer
+Of goodly thousands: but, for all this,
+When I shall tread upon the tyrant's head,
+Or wear it on my sword, yet my poor country
+Shall have more vices than it had before,
+More suffer and more sundry ways than ever,
+By him that shall succeed.
+
+ +MACDUFF +
+What should he be?
+
+ +MALCOLM +
+It is myself I mean: in whom I know
+All the particulars of vice so grafted
+That, when they shall be open'd, black Macbeth
+Will seem as pure as snow, and the poor state
+Esteem him as a lamb, being compared
+With my confineless harms.
+
+ +MACDUFF +
+Not in the legions
+Of horrid hell can come a devil more damn'd
+In evils to top Macbeth.
+
+ +MALCOLM +
+I grant him bloody,
+Luxurious, avaricious, false, deceitful,
+Sudden, malicious, smacking of every sin
+That has a name: but there's no bottom, none,
+In my voluptuousness: your wives, your daughters,
+Your matrons and your maids, could not fill up
+The cistern of my lust, and my desire
+All continent impediments would o'erbear
+That did oppose my will: better Macbeth
+Than such an one to reign.
+
+ +MACDUFF +
+Boundless intemperance
+In nature is a tyranny; it hath been
+The untimely emptying of the happy throne
+And fall of many kings. But fear not yet
+To take upon you what is yours: you may
+Convey your pleasures in a spacious plenty,
+And yet seem cold, the time you may so hoodwink.
+We have willing dames enough: there cannot be
+That vulture in you, to devour so many
+As will to greatness dedicate themselves,
+Finding it so inclined.
+
+ +MALCOLM +
+With this there grows
+In my most ill-composed affection such
+A stanchless avarice that, were I king,
+I should cut off the nobles for their lands,
+Desire his jewels and this other's house:
+And my more-having would be as a sauce
+To make me hunger more; that I should forge
+Quarrels unjust against the good and loyal,
+Destroying them for wealth.
+
+ +MACDUFF +
+This avarice
+Sticks deeper, grows with more pernicious root
+Than summer-seeming lust, and it hath been
+The sword of our slain kings: yet do not fear;
+Scotland hath foisons to fill up your will.
+Of your mere own: all these are portable,
+With other graces weigh'd.
+
+ +MALCOLM +
+But I have none: the king-becoming graces,
+As justice, verity, temperance, stableness,
+Bounty, perseverance, mercy, lowliness,
+Devotion, patience, courage, fortitude,
+I have no relish of them, but abound
+In the division of each several crime,
+Acting it many ways. Nay, had I power, I should
+Pour the sweet milk of concord into hell,
+Uproar the universal peace, confound
+All unity on earth.
+
+ +MACDUFF +
+O Scotland, Scotland!
+
+ +MALCOLM +
+If such a one be fit to govern, speak:
+I am as I have spoken.
+
+ +MACDUFF +
+Fit to govern!
+No, not to live. O nation miserable,
+With an untitled tyrant bloody-scepter'd,
+When shalt thou see thy wholesome days again,
+Since that the truest issue of thy throne
+By his own interdiction stands accursed,
+And does blaspheme his breed? Thy royal father
+Was a most sainted king: the queen that bore thee,
+Oftener upon her knees than on her feet,
+Died every day she lived. Fare thee well!
+These evils thou repeat'st upon thyself
+Have banish'd me from Scotland. O my breast,
+Thy hope ends here!
+
+ +MALCOLM +
+Macduff, this noble passion,
+Child of integrity, hath from my soul
+Wiped the black scruples, reconciled my thoughts
+To thy good truth and honour. Devilish Macbeth
+By many of these trains hath sought to win me
+Into his power, and modest wisdom plucks me
+From over-credulous haste: but God above
+Deal between thee and me! for even now
+I put myself to thy direction, and
+Unspeak mine own detraction, here abjure
+The taints and blames I laid upon myself,
+For strangers to my nature. I am yet
+Unknown to woman, never was forsworn,
+Scarcely have coveted what was mine own,
+At no time broke my faith, would not betray
+The devil to his fellow and delight
+No less in truth than life: my first false speaking
+Was this upon myself: what I am truly,
+Is thine and my poor country's to command:
+Whither indeed, before thy here-approach,
+Old Siward, with ten thousand warlike men,
+Already at a point, was setting forth.
+Now we'll together; and the chance of goodness
+Be like our warranted quarrel! Why are you silent?
+
+ +MACDUFF +
+Such welcome and unwelcome things at once
+'Tis hard to reconcile.
+

Enter a Doctor

+
+ +MALCOLM +
+Well; more anon.--Comes the king forth, I pray you?
+
+ +Doctor +
+Ay, sir; there are a crew of wretched souls
+That stay his cure: their malady convinces
+The great assay of art; but at his touch--
+Such sanctity hath heaven given his hand--
+They presently amend.
+
+ +MALCOLM +
+I thank you, doctor.
+

Exit Doctor

+
+ +MACDUFF +
+What's the disease he means?
+
+ +MALCOLM +
+'Tis call'd the evil:
+A most miraculous work in this good king;
+Which often, since my here-remain in England,
+I have seen him do. How he solicits heaven,
+Himself best knows: but strangely-visited people,
+All swoln and ulcerous, pitiful to the eye,
+The mere despair of surgery, he cures,
+Hanging a golden stamp about their necks,
+Put on with holy prayers: and 'tis spoken,
+To the succeeding royalty he leaves
+The healing benediction. With this strange virtue,
+He hath a heavenly gift of prophecy,
+And sundry blessings hang about his throne,
+That speak him full of grace.
+

Enter ROSS

+
+ +MACDUFF +
+See, who comes here?
+
+ +MALCOLM +
+My countryman; but yet I know him not.
+
+ +MACDUFF +
+My ever-gentle cousin, welcome hither.
+
+ +MALCOLM +
+I know him now. Good God, betimes remove
+The means that makes us strangers!
+
+ +ROSS +
+Sir, amen.
+
+ +MACDUFF +
+Stands Scotland where it did?
+
+ +ROSS +
+Alas, poor country!
+Almost afraid to know itself. It cannot
+Be call'd our mother, but our grave; where nothing,
+But who knows nothing, is once seen to smile;
+Where sighs and groans and shrieks that rend the air
+Are made, not mark'd; where violent sorrow seems
+A modern ecstasy; the dead man's knell
+Is there scarce ask'd for who; and good men's lives
+Expire before the flowers in their caps,
+Dying or ere they sicken.
+
+ +MACDUFF +
+O, relation
+Too nice, and yet too true!
+
+ +MALCOLM +
+What's the newest grief?
+
+ +ROSS +
+That of an hour's age doth hiss the speaker:
+Each minute teems a new one.
+
+ +MACDUFF +
+How does my wife?
+
+ +ROSS +
+Why, well.
+
+ +MACDUFF +
+ And all my children?
+
+ +ROSS +
+Well too.
+
+ +MACDUFF +
+The tyrant has not batter'd at their peace?
+
+ +ROSS +
+No; they were well at peace when I did leave 'em.
+
+ +MACDUFF +
+But not a niggard of your speech: how goes't?
+
+ +ROSS +
+When I came hither to transport the tidings,
+Which I have heavily borne, there ran a rumour
+Of many worthy fellows that were out;
+Which was to my belief witness'd the rather,
+For that I saw the tyrant's power a-foot:
+Now is the time of help; your eye in Scotland
+Would create soldiers, make our women fight,
+To doff their dire distresses.
+
+ +MALCOLM +
+Be't their comfort
+We are coming thither: gracious England hath
+Lent us good Siward and ten thousand men;
+An older and a better soldier none
+That Christendom gives out.
+
+ +ROSS +
+Would I could answer
+This comfort with the like! But I have words
+That would be howl'd out in the desert air,
+Where hearing should not latch them.
+
+ +MACDUFF +
+What concern they?
+The general cause? or is it a fee-grief
+Due to some single breast?
+
+ +ROSS +
+No mind that's honest
+But in it shares some woe; though the main part
+Pertains to you alone.
+
+ +MACDUFF +
+If it be mine,
+Keep it not from me, quickly let me have it.
+
+ +ROSS +
+Let not your ears despise my tongue for ever,
+Which shall possess them with the heaviest sound
+That ever yet they heard.
+
+ +MACDUFF +
+Hum! I guess at it.
+
+ +ROSS +
+Your castle is surprised; your wife and babes
+Savagely slaughter'd: to relate the manner,
+Were, on the quarry of these murder'd deer,
+To add the death of you.
+
+ +MALCOLM +
+Merciful heaven!
+What, man! ne'er pull your hat upon your brows;
+Give sorrow words: the grief that does not speak
+Whispers the o'er-fraught heart and bids it break.
+
+ +MACDUFF +
+My children too?
+
+ +ROSS +
+ Wife, children, servants, all
+That could be found.
+
+ +MACDUFF +
+And I must be from thence!
+My wife kill'd too?
+
+ +ROSS +
+I have said.
+
+ +MALCOLM +
+Be comforted:
+Let's make us medicines of our great revenge,
+To cure this deadly grief.
+
+ +MACDUFF +
+He has no children. All my pretty ones?
+Did you say all? O hell-kite! All?
+What, all my pretty chickens and their dam
+At one fell swoop?
+
+ +MALCOLM +
+Dispute it like a man.
+
+ +MACDUFF +
+I shall do so;
+But I must also feel it as a man:
+I cannot but remember such things were,
+That were most precious to me. Did heaven look on,
+And would not take their part? Sinful Macduff,
+They were all struck for thee! naught that I am,
+Not for their own demerits, but for mine,
+Fell slaughter on their souls. Heaven rest them now!
+
+ +MALCOLM +
+Be this the whetstone of your sword: let grief
+Convert to anger; blunt not the heart, enrage it.
+
+ +MACDUFF +
+O, I could play the woman with mine eyes
+And braggart with my tongue! But, gentle heavens,
+Cut short all intermission; front to front
+Bring thou this fiend of Scotland and myself;
+Within my sword's length set him; if he 'scape,
+Heaven forgive him too!
+
+ +MALCOLM +
+This tune goes manly.
+Come, go we to the king; our power is ready;
+Our lack is nothing but our leave; Macbeth
+Is ripe for shaking, and the powers above
+Put on their instruments. Receive what cheer you may:
+The night is long that never finds the day.
+

Exeunt

+

+

ACT V

+

SCENE I. Dunsinane. Ante-room in the castle.

+

+Enter a Doctor of Physic and a Waiting-Gentlewoman +
+ +Doctor +
+I have two nights watched with you, but can perceive
+no truth in your report. When was it she last walked?
+
+ +Gentlewoman +
+Since his majesty went into the field, I have seen
+her rise from her bed, throw her night-gown upon
+her, unlock her closet, take forth paper, fold it,
+write upon't, read it, afterwards seal it, and again
+return to bed; yet all this while in a most fast sleep.
+
+ +Doctor +
+A great perturbation in nature, to receive at once
+the benefit of sleep, and do the effects of
+watching! In this slumbery agitation, besides her
+walking and other actual performances, what, at any
+time, have you heard her say?
+
+ +Gentlewoman +
+That, sir, which I will not report after her.
+
+ +Doctor +
+You may to me: and 'tis most meet you should.
+
+ +Gentlewoman +
+Neither to you nor any one; having no witness to
+confirm my speech.
+

Enter LADY MACBETH, with a taper

+Lo you, here she comes! This is her very guise;
+and, upon my life, fast asleep. Observe her; stand close.
+
+ +Doctor +
+How came she by that light?
+
+ +Gentlewoman +
+Why, it stood by her: she has light by her
+continually; 'tis her command.
+
+ +Doctor +
+You see, her eyes are open.
+
+ +Gentlewoman +
+Ay, but their sense is shut.
+
+ +Doctor +
+What is it she does now? Look, how she rubs her hands.
+
+ +Gentlewoman +
+It is an accustomed action with her, to seem thus
+washing her hands: I have known her continue in
+this a quarter of an hour.
+
+ +LADY MACBETH +
+Yet here's a spot.
+
+ +Doctor +
+Hark! she speaks: I will set down what comes from
+her, to satisfy my remembrance the more strongly.
+
+ +LADY MACBETH +
+Out, damned spot! out, I say!--One: two: why,
+then, 'tis time to do't.--Hell is murky!--Fie, my
+lord, fie! a soldier, and afeard? What need we
+fear who knows it, when none can call our power to
+account?--Yet who would have thought the old man
+to have had so much blood in him.
+
+ +Doctor +
+Do you mark that?
+
+ +LADY MACBETH +
+The thane of Fife had a wife: where is she now?--
+What, will these hands ne'er be clean?--No more o'
+that, my lord, no more o' that: you mar all with
+this starting.
+
+ +Doctor +
+Go to, go to; you have known what you should not.
+
+ +Gentlewoman +
+She has spoke what she should not, I am sure of
+that: heaven knows what she has known.
+
+ +LADY MACBETH +
+Here's the smell of the blood still: all the
+perfumes of Arabia will not sweeten this little
+hand. Oh, oh, oh!
+
+ +Doctor +
+What a sigh is there! The heart is sorely charged.
+
+ +Gentlewoman +
+I would not have such a heart in my bosom for the
+dignity of the whole body.
+
+ +Doctor +
+Well, well, well,--
+
+ +Gentlewoman +
+Pray God it be, sir.
+
+ +Doctor +
+This disease is beyond my practise: yet I have known
+those which have walked in their sleep who have died
+holily in their beds.
+
+ +LADY MACBETH +
+Wash your hands, put on your nightgown; look not so
+pale.--I tell you yet again, Banquo's buried; he
+cannot come out on's grave.
+
+ +Doctor +
+Even so?
+
+ +LADY MACBETH +
+To bed, to bed! there's knocking at the gate:
+come, come, come, come, give me your hand. What's
+done cannot be undone.--To bed, to bed, to bed!
+

Exit

+
+ +Doctor +
+Will she go now to bed?
+
+ +Gentlewoman +
+Directly.
+
+ +Doctor +
+Foul whisperings are abroad: unnatural deeds
+Do breed unnatural troubles: infected minds
+To their deaf pillows will discharge their secrets:
+More needs she the divine than the physician.
+God, God forgive us all! Look after her;
+Remove from her the means of all annoyance,
+And still keep eyes upon her. So, good night:
+My mind she has mated, and amazed my sight.
+I think, but dare not speak.
+
+ +Gentlewoman +
+Good night, good doctor.
+

Exeunt

+
+

SCENE II. The country near Dunsinane.

+

+Drum and colours. Enter MENTEITH, CAITHNESS, ANGUS, LENNOX, and Soldiers +
+ +MENTEITH +
+The English power is near, led on by Malcolm,
+His uncle Siward and the good Macduff:
+Revenges burn in them; for their dear causes
+Would to the bleeding and the grim alarm
+Excite the mortified man.
+
+ +ANGUS +
+Near Birnam wood
+Shall we well meet them; that way are they coming.
+
+ +CAITHNESS +
+Who knows if Donalbain be with his brother?
+
+ +LENNOX +
+For certain, sir, he is not: I have a file
+Of all the gentry: there is Siward's son,
+And many unrough youths that even now
+Protest their first of manhood.
+
+ +MENTEITH +
+What does the tyrant?
+
+ +CAITHNESS +
+Great Dunsinane he strongly fortifies:
+Some say he's mad; others that lesser hate him
+Do call it valiant fury: but, for certain,
+He cannot buckle his distemper'd cause
+Within the belt of rule.
+
+ +ANGUS +
+Now does he feel
+His secret murders sticking on his hands;
+Now minutely revolts upbraid his faith-breach;
+Those he commands move only in command,
+Nothing in love: now does he feel his title
+Hang loose about him, like a giant's robe
+Upon a dwarfish thief.
+
+ +MENTEITH +
+Who then shall blame
+His pester'd senses to recoil and start,
+When all that is within him does condemn
+Itself for being there?
+
+ +CAITHNESS +
+Well, march we on,
+To give obedience where 'tis truly owed:
+Meet we the medicine of the sickly weal,
+And with him pour we in our country's purge
+Each drop of us.
+
+ +LENNOX +
+ Or so much as it needs,
+To dew the sovereign flower and drown the weeds.
+Make we our march towards Birnam.
+

Exeunt, marching

+
+

SCENE III. Dunsinane. A room in the castle.

+

+Enter MACBETH, Doctor, and Attendants +
+ +MACBETH +
+Bring me no more reports; let them fly all:
+Till Birnam wood remove to Dunsinane,
+I cannot taint with fear. What's the boy Malcolm?
+Was he not born of woman? The spirits that know
+All mortal consequences have pronounced me thus:
+'Fear not, Macbeth; no man that's born of woman
+Shall e'er have power upon thee.' Then fly,
+false thanes,
+And mingle with the English epicures:
+The mind I sway by and the heart I bear
+Shall never sag with doubt nor shake with fear.
+

Enter a Servant

+The devil damn thee black, thou cream-faced loon!
+Where got'st thou that goose look?
+
+ +Servant +
+There is ten thousand--
+
+ +MACBETH +
+Geese, villain!
+
+ +Servant +
+Soldiers, sir.
+
+ +MACBETH +
+Go prick thy face, and over-red thy fear,
+Thou lily-liver'd boy. What soldiers, patch?
+Death of thy soul! those linen cheeks of thine
+Are counsellors to fear. What soldiers, whey-face?
+
+ +Servant +
+The English force, so please you.
+
+ +MACBETH +
+Take thy face hence.
+

Exit Servant

+Seyton!--I am sick at heart,
+When I behold--Seyton, I say!--This push
+Will cheer me ever, or disseat me now.
+I have lived long enough: my way of life
+Is fall'n into the sear, the yellow leaf;
+And that which should accompany old age,
+As honour, love, obedience, troops of friends,
+I must not look to have; but, in their stead,
+Curses, not loud but deep, mouth-honour, breath,
+Which the poor heart would fain deny, and dare not. Seyton!
+

Enter SEYTON

+
+ +SEYTON +
+What is your gracious pleasure?
+
+ +MACBETH +
+What news more?
+
+ +SEYTON +
+All is confirm'd, my lord, which was reported.
+
+ +MACBETH +
+I'll fight till from my bones my flesh be hack'd.
+Give me my armour.
+
+ +SEYTON +
+'Tis not needed yet.
+
+ +MACBETH +
+I'll put it on.
+Send out more horses; skirr the country round;
+Hang those that talk of fear. Give me mine armour.
+How does your patient, doctor?
+
+ +Doctor +
+Not so sick, my lord,
+As she is troubled with thick coming fancies,
+That keep her from her rest.
+
+ +MACBETH +
+Cure her of that.
+Canst thou not minister to a mind diseased,
+Pluck from the memory a rooted sorrow,
+Raze out the written troubles of the brain
+And with some sweet oblivious antidote
+Cleanse the stuff'd bosom of that perilous stuff
+Which weighs upon the heart?
+
+ +Doctor +
+Therein the patient
+Must minister to himself.
+
+ +MACBETH +
+Throw physic to the dogs; I'll none of it.
+Come, put mine armour on; give me my staff.
+Seyton, send out. Doctor, the thanes fly from me.
+Come, sir, dispatch. If thou couldst, doctor, cast
+The water of my land, find her disease,
+And purge it to a sound and pristine health,
+I would applaud thee to the very echo,
+That should applaud again.--Pull't off, I say.--
+What rhubarb, cyme, or what purgative drug,
+Would scour these English hence? Hear'st thou of them?
+
+ +Doctor +
+Ay, my good lord; your royal preparation
+Makes us hear something.
+
+ +MACBETH +
+Bring it after me.
+I will not be afraid of death and bane,
+Till Birnam forest come to Dunsinane.
+
+ +Doctor +
+[Aside] Were I from Dunsinane away and clear,
+Profit again should hardly draw me here.
+

Exeunt

+
+

SCENE IV. Country near Birnam wood.

+

+Drum and colours. Enter MALCOLM, SIWARD and YOUNG SIWARD, MACDUFF, MENTEITH, CAITHNESS, ANGUS, LENNOX, ROSS, and Soldiers, marching +
+ +MALCOLM +
+Cousins, I hope the days are near at hand
+That chambers will be safe.
+
+ +MENTEITH +
+We doubt it nothing.
+
+ +SIWARD +
+What wood is this before us?
+
+ +MENTEITH +
+The wood of Birnam.
+
+ +MALCOLM +
+Let every soldier hew him down a bough
+And bear't before him: thereby shall we shadow
+The numbers of our host and make discovery
+Err in report of us.
+
+ +Soldiers +
+It shall be done.
+
+ +SIWARD +
+We learn no other but the confident tyrant
+Keeps still in Dunsinane, and will endure
+Our setting down before 't.
+
+ +MALCOLM +
+'Tis his main hope:
+For where there is advantage to be given,
+Both more and less have given him the revolt,
+And none serve with him but constrained things
+Whose hearts are absent too.
+
+ +MACDUFF +
+Let our just censures
+Attend the true event, and put we on
+Industrious soldiership.
+
+ +SIWARD +
+The time approaches
+That will with due decision make us know
+What we shall say we have and what we owe.
+Thoughts speculative their unsure hopes relate,
+But certain issue strokes must arbitrate:
+Towards which advance the war.
+

Exeunt, marching

+
+

SCENE V. Dunsinane. Within the castle.

+

+Enter MACBETH, SEYTON, and Soldiers, with drum and colours +
+ +MACBETH +
+Hang out our banners on the outward walls;
+The cry is still 'They come:' our castle's strength
+Will laugh a siege to scorn: here let them lie
+Till famine and the ague eat them up:
+Were they not forced with those that should be ours,
+We might have met them dareful, beard to beard,
+And beat them backward home.
+

A cry of women within

+What is that noise?
+
+ +SEYTON +
+It is the cry of women, my good lord.
+

Exit

+
+ +MACBETH +
+I have almost forgot the taste of fears;
+The time has been, my senses would have cool'd
+To hear a night-shriek; and my fell of hair
+Would at a dismal treatise rouse and stir
+As life were in't: I have supp'd full with horrors;
+Direness, familiar to my slaughterous thoughts
+Cannot once start me.
+

Re-enter SEYTON

+Wherefore was that cry?
+
+ +SEYTON +
+The queen, my lord, is dead.
+
+ +MACBETH +
+She should have died hereafter;
+There would have been a time for such a word.
+To-morrow, and to-morrow, and to-morrow,
+Creeps in this petty pace from day to day
+To the last syllable of recorded time,
+And all our yesterdays have lighted fools
+The way to dusty death. Out, out, brief candle!
+Life's but a walking shadow, a poor player
+That struts and frets his hour upon the stage
+And then is heard no more: it is a tale
+Told by an idiot, full of sound and fury,
+Signifying nothing.
+

Enter a Messenger

+Thou comest to use thy tongue; thy story quickly.
+
+ +Messenger +
+Gracious my lord,
+I should report that which I say I saw,
+But know not how to do it.
+
+ +MACBETH +
+Well, say, sir.
+
+ +Messenger +
+As I did stand my watch upon the hill,
+I look'd toward Birnam, and anon, methought,
+The wood began to move.
+
+ +MACBETH +
+Liar and slave!
+
+ +Messenger +
+Let me endure your wrath, if't be not so:
+Within this three mile may you see it coming;
+I say, a moving grove.
+
+ +MACBETH +
+If thou speak'st false,
+Upon the next tree shalt thou hang alive,
+Till famine cling thee: if thy speech be sooth,
+I care not if thou dost for me as much.
+I pull in resolution, and begin
+To doubt the equivocation of the fiend
+That lies like truth: 'Fear not, till Birnam wood
+Do come to Dunsinane:' and now a wood
+Comes toward Dunsinane. Arm, arm, and out!
+If this which he avouches does appear,
+There is nor flying hence nor tarrying here.
+I gin to be aweary of the sun,
+And wish the estate o' the world were now undone.
+Ring the alarum-bell! Blow, wind! come, wrack!
+At least we'll die with harness on our back.
+

Exeunt

+
+

SCENE VI. Dunsinane. Before the castle.

+

+Drum and colours. Enter MALCOLM, SIWARD, MACDUFF, and their Army, with boughs +
+ +MALCOLM +
+Now near enough: your leafy screens throw down.
+And show like those you are. You, worthy uncle,
+Shall, with my cousin, your right-noble son,
+Lead our first battle: worthy Macduff and we
+Shall take upon 's what else remains to do,
+According to our order.
+
+ +SIWARD +
+Fare you well.
+Do we but find the tyrant's power to-night,
+Let us be beaten, if we cannot fight.
+
+ +MACDUFF +
+Make all our trumpets speak; give them all breath,
+Those clamorous harbingers of blood and death.
+

Exeunt

+
+

SCENE VII. Another part of the field.

+

+Alarums. Enter MACBETH +
+ +MACBETH +
+They have tied me to a stake; I cannot fly,
+But, bear-like, I must fight the course. What's he
+That was not born of woman? Such a one
+Am I to fear, or none.
+

Enter YOUNG SIWARD

+
+ +YOUNG SIWARD +
+What is thy name?
+
+ +MACBETH +
+ Thou'lt be afraid to hear it.
+
+ +YOUNG SIWARD +
+No; though thou call'st thyself a hotter name
+Than any is in hell.
+
+ +MACBETH +
+My name's Macbeth.
+
+ +YOUNG SIWARD +
+The devil himself could not pronounce a title
+More hateful to mine ear.
+
+ +MACBETH +
+No, nor more fearful.
+
+ +YOUNG SIWARD +
+Thou liest, abhorred tyrant; with my sword
+I'll prove the lie thou speak'st.
+

They fight and YOUNG SIWARD is slain

+
+ +MACBETH +
+Thou wast born of woman
+But swords I smile at, weapons laugh to scorn,
+Brandish'd by man that's of a woman born.
+

Exit

+

Alarums. Enter MACDUFF

+
+ +MACDUFF +
+That way the noise is. Tyrant, show thy face!
+If thou be'st slain and with no stroke of mine,
+My wife and children's ghosts will haunt me still.
+I cannot strike at wretched kerns, whose arms
+Are hired to bear their staves: either thou, Macbeth,
+Or else my sword with an unbatter'd edge
+I sheathe again undeeded. There thou shouldst be;
+By this great clatter, one of greatest note
+Seems bruited. Let me find him, fortune!
+And more I beg not.
+

Exit. Alarums

+

Enter MALCOLM and SIWARD

+
+ +SIWARD +
+This way, my lord; the castle's gently render'd:
+The tyrant's people on both sides do fight;
+The noble thanes do bravely in the war;
+The day almost itself professes yours,
+And little is to do.
+
+ +MALCOLM +
+We have met with foes
+That strike beside us.
+
+ +SIWARD +
+Enter, sir, the castle.
+

Exeunt. Alarums

+
+

SCENE VIII. Another part of the field.

+

+Enter MACBETH +
+ +MACBETH +
+Why should I play the Roman fool, and die
+On mine own sword? whiles I see lives, the gashes
+Do better upon them.
+

Enter MACDUFF

+
+ +MACDUFF +
+Turn, hell-hound, turn!
+
+ +MACBETH +
+Of all men else I have avoided thee:
+But get thee back; my soul is too much charged
+With blood of thine already.
+
+ +MACDUFF +
+I have no words:
+My voice is in my sword: thou bloodier villain
+Than terms can give thee out!
+

They fight

+
+ +MACBETH +
+Thou losest labour:
+As easy mayst thou the intrenchant air
+With thy keen sword impress as make me bleed:
+Let fall thy blade on vulnerable crests;
+I bear a charmed life, which must not yield,
+To one of woman born.
+
+ +MACDUFF +
+Despair thy charm;
+And let the angel whom thou still hast served
+Tell thee, Macduff was from his mother's womb
+Untimely ripp'd.
+
+ +MACBETH +
+Accursed be that tongue that tells me so,
+For it hath cow'd my better part of man!
+And be these juggling fiends no more believed,
+That palter with us in a double sense;
+That keep the word of promise to our ear,
+And break it to our hope. I'll not fight with thee.
+
+ +MACDUFF +
+Then yield thee, coward,
+And live to be the show and gaze o' the time:
+We'll have thee, as our rarer monsters are,
+Painted on a pole, and underwrit,
+'Here may you see the tyrant.'
+
+ +MACBETH +
+I will not yield,
+To kiss the ground before young Malcolm's feet,
+And to be baited with the rabble's curse.
+Though Birnam wood be come to Dunsinane,
+And thou opposed, being of no woman born,
+Yet I will try the last. Before my body
+I throw my warlike shield. Lay on, Macduff,
+And damn'd be him that first cries, 'Hold, enough!'
+

Exeunt, fighting. Alarums

+

Retreat. Flourish. Enter, with drum and colours, MALCOLM, SIWARD, ROSS, the other Thanes, and Soldiers

+
+ +MALCOLM +
+I would the friends we miss were safe arrived.
+
+ +SIWARD +
+Some must go off: and yet, by these I see,
+So great a day as this is cheaply bought.
+
+ +MALCOLM +
+Macduff is missing, and your noble son.
+
+ +ROSS +
+Your son, my lord, has paid a soldier's debt:
+He only lived but till he was a man;
+The which no sooner had his prowess confirm'd
+In the unshrinking station where he fought,
+But like a man he died.
+
+ +SIWARD +
+Then he is dead?
+
+ +ROSS +
+Ay, and brought off the field: your cause of sorrow
+Must not be measured by his worth, for then
+It hath no end.
+
+ +SIWARD +
+ Had he his hurts before?
+
+ +ROSS +
+Ay, on the front.
+
+ +SIWARD +
+ Why then, God's soldier be he!
+Had I as many sons as I have hairs,
+I would not wish them to a fairer death:
+And so, his knell is knoll'd.
+
+ +MALCOLM +
+He's worth more sorrow,
+And that I'll spend for him.
+
+ +SIWARD +
+He's worth no more
+They say he parted well, and paid his score:
+And so, God be with him! Here comes newer comfort.
+

Re-enter MACDUFF, with MACBETH's head

+
+ +MACDUFF +
+Hail, king! for so thou art: behold, where stands
+The usurper's cursed head: the time is free:
+I see thee compass'd with thy kingdom's pearl,
+That speak my salutation in their minds;
+Whose voices I desire aloud with mine:
+Hail, King of Scotland!
+
+ +ALL +
+Hail, King of Scotland!
+

Flourish

+
+ +MALCOLM +
+We shall not spend a large expense of time
+Before we reckon with your several loves,
+And make us even with you. My thanes and kinsmen,
+Henceforth be earls, the first that ever Scotland
+In such an honour named. What's more to do,
+Which would be planted newly with the time,
+As calling home our exiled friends abroad
+That fled the snares of watchful tyranny;
+Producing forth the cruel ministers
+Of this dead butcher and his fiend-like queen,
+Who, as 'tis thought, by self and violent hands
+Took off her life; this, and what needful else
+That calls upon us, by the grace of Grace,
+We will perform in measure, time and place:
+So, thanks to all at once and to each one,
+Whom we invite to see us crown'd at Scone.
+

Flourish. Exeunt

+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/map.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/map.png new file mode 100644 index 0000000000000000000000000000000000000000..763f5627995f6f178e8ea78e37f32c80b35f5e2b GIT binary patch literal 26209 zcmW(+WmH?;5)HvpG-%NhT#CCC2$bRu#ob!mrMMF)?(SOLiaW)vxI>Xr+}&QjH!Joh zcinT&T{C<3-V?5@D20hef(8HpFlD4AQ~>}48~ATu5D@+ulh{52|9ayft?di|uu}i` zM(`*Sbprq_@MI*!)IFAuJKQsAHC^d_Cptb~UmPw7gzd|W5X(ToM%_q=H@K0G6E}hZ zwnvS(O+U}8W|j}Tt7>Z<0g)VZ)KLH6U>aqpfSfc}fsF7>i(%CduTz1&+d-c-E|MY{ zVObxMf@E&4=T^J9%2VO<$4@u`m@74yLQ5L%QPs=_Jl1+zslu;mD@A4UEaV#sCS9yEo+M~1aNGOxR^)bWw_In|O@gXac`wkLkwJ>7M41bn z1E_~v>poGbi*I&Oi8kzte-!K$EqPw)xURnHE6P)KQ?q| z+smXi0#X482dM&k10g^Fs2d1^0T|H4tdYP)%6ZqDfiSe9M9l(Wt3tlicUVm^pFRqc zIxd9@3(Xhb?0pe^Eep!&{IdHJQGS&k!7&ksSR~K8rnamf+3Lg;QyM<}rpU(1vawM$ z<+*H3t71e+|Ed7S&(6*+BC5da7{VtL}~BuOZhP}EYyDYOQZ?vI*P(1-UASLbJel}om!Dw<;U zM@N`K<`#=%znnkm>KW){XJqJVYg;zz$i#zj0PRhO?m;GWq&tmhX-jnq3_Ojg*hFcy z?ItB78Lyj98{`xe8$WGz{rvohLMPjV94@fWiUc=)_N`vP)`X?zBV?AeAbs;_c=fb& zF+)gW{#0WOR1g3#kQ{`7r0)MtT-ma+K^5(DX~O_}FhrtK%=-1#*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*wqk}nCs;P=t8m7itUNNQ(c5-S{mry zyCdA+-;Q^#O;@T+W27yx{-9BB+*dbhG5-k|E3iEI>=}Av9DoaaBdOUx# z-f(t4BE1Oh0Bh3W`b^81iven0G${pW-SgsTlfHsU1vE7g7E$bV*ZV{tm9V=;s zu&@BC*pGUPqx18POyu={i>jOulZlB*@aBTT`#R+A?8SHf@C7pu=NRNKVp?%VlsV0( zSSVtSC@$csynl5qQ=nj25R@b9q5|a}eKqb6h<%pY_CM_3N~QJfLJSF8oWhD;hOgDe z)8&C~F<=h@Xd3WE$N!F+Yr4Xu41h?dKhWXX7^vOika1sU2jo6JfDvzx-c|^MZ)HKyF;i`^(AMm+HA@XecBc z`aqn@X%o&u5jZINaKL(uiw&rJb+$&SMKLP1+z>DPX?++B) zdv?5`*{Ev(Zx%TI8d&Y4DFH7n3!pk+)03txIk z$cO2#6T!~nus%={zBqRE9eR?_GhJs6ncJ;eKml|PcrAeb7Vt31P9-EZBqXiYWg()- z=7~7DeY*NL?8;Qbc6j7w;+lUHZ`lzOTCRo0RhclcW%>XfqD;kXjBJrB4d(YnN;Yv= zxYa}^#IT|`pMeae`o9dNuqr?iWltJ~_xQI{+H|rg-IzJHjnUwW>x+(wiA8aE1ju)i|6|(qm^L&FrX6HX>rRg3GrT`;gs( + + Map test page + + +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/markerTransparent.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/markerTransparent.png new file mode 100644 index 0000000000000000000000000000000000000000..ed4e5e7f4d63fe103983cf3bfa53733a0089ba51 GIT binary patch literal 260 zcmV+f0sH=mP)6Xw+2uq_(M`6dHE24R1_~SA2W)sEi((o#t%gC<}F#-mygTf~{1syRj83 z$v~+4?^7VUur4s{YzK(ScPqf9AN{Mq%K}&hLakp1D8YW + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html new file mode 100644 index 00000000..9d9c2f0c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html @@ -0,0 +1,11 @@ + + + Some test page + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html new file mode 100644 index 00000000..61677527 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html @@ -0,0 +1,11 @@ + + + + Example page + + +

This page contains a nested iframe. Execute some JS to locate a reference to an element in this + frame and return it. You should need to switch to that frame in order to use that element.

+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html new file mode 100644 index 00000000..4eff01ac --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html @@ -0,0 +1,21 @@ + + +First Modal + + + + +

Modal dialog sample

+ + + +lnk2 +
+ +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html new file mode 100644 index 00000000..cec3f3f1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html @@ -0,0 +1,21 @@ + + +Second Modal + + + + +

Modal dialog sample

+ + + +lnk3 +
+ +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html new file mode 100644 index 00000000..6c5eb723 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html @@ -0,0 +1,15 @@ + + +Third Modal + + + + +

Modal dialog sample

+ + +
+ +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html new file mode 100644 index 00000000..0a1c4c94 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html @@ -0,0 +1,21 @@ + + +Main window + + + + +

Modal dialog sample

+ + + +lnk1 +
+ +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html new file mode 100644 index 00000000..d4751bfd --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html @@ -0,0 +1,17 @@ + + +
+
+
+ +
diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html new file mode 100644 index 00000000..39a31cda --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html @@ -0,0 +1,33 @@ + + + + + + + + + Div tracking mouse position. +
+
+ Move mouse here. +
+

+0, 0 +

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html new file mode 100644 index 00000000..88eda51f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html @@ -0,0 +1,164 @@ + + +

outside

+

outside

+
+

inside

+
+
+

space

+

css escapes

+
+
+

second copy for testing plural findElements

+

second copy

+
+ + + Here's a checkbox:
+ + + +
+ Here's a checkbox:
+ + +
+ +hello world + + + + + + +
+ Here's a checkbox:
+ +
+ +
+ Here's a checkbox:
+ + +
+ +hello world + + + + + + +
+ Here's a checkbox:
+ +
+ +
+ Here's a checkbox:
+ + +
+ +hello world + + + + + + +
+ Here's a checkbox:
+ +
+ +
+ Here's a checkbox:
+ + +
+ +hello world + + +Span with class of one +
+ Find me + Also me + But not me +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html new file mode 100644 index 00000000..2d2264ce --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html @@ -0,0 +1,15 @@ + + + + The Visibility of Everyday Things + + + +

This image is copyright Simon Stewart and donated to the Selenium project for use in its test suites. +

+a nice beach + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html new file mode 100644 index 00000000..cf8a6471 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html new file mode 100644 index 00000000..96fd750a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html new file mode 100644 index 00000000..6f1d90b6 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html new file mode 100644 index 00000000..24dd1928 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html new file mode 100644 index 00000000..cae56657 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html new file mode 100644 index 00000000..d4ffa397 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html new file mode 100644 index 00000000..d425a2a8 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html new file mode 100644 index 00000000..4a6ff595 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html new file mode 100644 index 00000000..efa80742 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html @@ -0,0 +1,30 @@ + + + + Page with overflow + + + +
+ +
+ Right clicked:
+ Bottom clicked:
+ Bottom-right clicked:
+
+ + Click bottom +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html new file mode 100644 index 00000000..cb59707e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html @@ -0,0 +1,20 @@ + + + + + + Page with OnBeforeUnload handler + + +

Page with onbeforeunload event handler. Click here to navigate to another page.

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html new file mode 100644 index 00000000..2c644ff9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html @@ -0,0 +1,6 @@ + + + +

Page with onload event handler

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html new file mode 100644 index 00000000..6070341e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html @@ -0,0 +1,6 @@ + + + +

Page with onunload event handler

+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html new file mode 100644 index 00000000..ea94f8ec --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html @@ -0,0 +1,6 @@ + + + +load a slow page + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt new file mode 100644 index 00000000..8318c86b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt @@ -0,0 +1 @@ +Test \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html new file mode 100644 index 00000000..1810f1cd --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html @@ -0,0 +1,20 @@ + + + +Page 1 +

The next query param must be the URL for the next page to +link to. + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html new file mode 100644 index 00000000..d826f174 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html @@ -0,0 +1,24 @@ + + + +Page 2 +This page is a middle man for referrer tests. +This page will include a link to a "next" page if the next query +parameter, or the document.referrer is set. +

+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html new file mode 100644 index 00000000..27048f72 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html @@ -0,0 +1,5 @@ + + + +Page 3 +

diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html new file mode 100644 index 00000000..8f257fdc --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + +

This

is a

contentEditable area

+ +
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html new file mode 100644 index 00000000..8ba23398 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html @@ -0,0 +1,40 @@ + + + + Rectangles + + + +
r1
+
r2
+
r3
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html new file mode 100644 index 00000000..94f3e246 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html @@ -0,0 +1,25 @@ + + + We Arrive Here + + + +

Success!

+ +
+

List of stuff

+
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
+
+
+

Almost empty

+
+ + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html new file mode 100644 index 00000000..a42e43aa --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html @@ -0,0 +1,161 @@ + + + + + + +
+
+
+ + + + + +
+
IFRAME
+ +
+
frame.contentWindow.document.designMode: on
frame.contentWindow.document.body.contentEditable: false
+
+
DIV
+
+
+
+
div.ownerDocument.designMode: off
div.ownerDocument.body.contentEditable: false
div.contentEditable: true
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
type:[]
tagName:[]
id:[]
keyIdentifier:[]
keyLocation:[]
keyCode:[]
charCode:[]
which:[]
isTrusted:[]
---------------------
Modifiers
alt:[]
ctrl:[]
shift:[]
meta:[]
+
+ + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html new file mode 100644 index 00000000..8a059255 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css new file mode 100644 index 00000000..81526185 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css @@ -0,0 +1,19 @@ +* { + margin: 0; +} +html, body, #output { + width: 100%; + height: 100%; +} +table { + border: 0px; + border-collapse: collapse; + border-spacing: 0px; + display: table; +} +table td { + padding: 0px; +} +.cell { + color: black; +} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html new file mode 100644 index 00000000..166665da --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html @@ -0,0 +1,72 @@ + + +screen test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js new file mode 100644 index 00000000..1d168598 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js @@ -0,0 +1,7 @@ +function toColor(num) { + num >>>= 0; + var b = num & 0xFF, + g = (num & 0xFF00) >>> 8, + r = (num & 0xFF0000) >>> 16; + return "rgb(" + [r, g, b].join(",") + ")"; +} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html new file mode 100644 index 00000000..35b03ae1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html @@ -0,0 +1,72 @@ + + +screen frame1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html new file mode 100644 index 00000000..e6e17e63 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html @@ -0,0 +1,72 @@ + + +screen frame2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html new file mode 100644 index 00000000..46852dcf --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html @@ -0,0 +1,11 @@ + + + screen test + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html new file mode 100644 index 00000000..ae3ea1e2 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html @@ -0,0 +1,12 @@ + + +Screen test + + +
+ + + +
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html new file mode 100644 index 00000000..4d00f027 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html @@ -0,0 +1,68 @@ + + +screen test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html new file mode 100644 index 00000000..1a6a1002 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html @@ -0,0 +1,72 @@ + + +screen test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html new file mode 100644 index 00000000..3fee005d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html @@ -0,0 +1,72 @@ + + +screen test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html new file mode 100644 index 00000000..31733e07 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html @@ -0,0 +1,72 @@ + + +screen test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html new file mode 100644 index 00000000..dbef9361 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html @@ -0,0 +1,72 @@ + + +screen test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html new file mode 100644 index 00000000..cd5214f1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html @@ -0,0 +1,27 @@ + + + + + +
+
    +
  • line1
  • +
  • line2
  • +
  • line3
  • +
  • line4
  • +
  • line5
  • +
  • line6
  • +
  • line7
  • +
  • line8
  • +
  • line9
  • +
+
+Clicked: +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html new file mode 100644 index 00000000..0ea66d37 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html @@ -0,0 +1,21 @@ + + + + +
    +
  • +
  • +
  • Text
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html new file mode 100644 index 00000000..1aa17092 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html @@ -0,0 +1,8 @@ + + +



























































































































































+ +



+ +                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 +
























































































































































\ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html new file mode 100644 index 00000000..652a778e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html @@ -0,0 +1,7 @@ + + +


































































































+ +


































































































+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html new file mode 100644 index 00000000..b345a8c3 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html @@ -0,0 +1,18 @@ + + + + + +
+
+
+
+
+Clicked: +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html new file mode 100644 index 00000000..3eb3bf47 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html @@ -0,0 +1,26 @@ + + + + Child frame + + +

This is a scrolling frame test

+
+ + + + + + + + + + + + + +
First row
Second row
Third row
Fourth row
+
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html new file mode 100644 index 00000000..61ffe85d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html @@ -0,0 +1,26 @@ + + + + Child frame + + +

This is a tall frame test

+
+ + + + + + + + + + + + + +
First row
Second row
Third row
Fourth row
+
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html new file mode 100644 index 00000000..15301386 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html @@ -0,0 +1,11 @@ + + + + Welcome Page + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html new file mode 100644 index 00000000..5781aeb9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html @@ -0,0 +1,12 @@ + + + + Welcome Page + + +
Placeholder
+
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html new file mode 100644 index 00000000..047de0f1 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html @@ -0,0 +1,10 @@ + + + + Child frame + + +

This is a non-scrolling frame test

+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html new file mode 100644 index 00000000..01b7c305 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html @@ -0,0 +1,19 @@ + + + + Page with overflow: auto + + + +
Placeholder
+
+ Click me! +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html new file mode 100644 index 00000000..c536e41d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html @@ -0,0 +1,12 @@ + + + + Welcome Page + + +
Placeholder
+
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html new file mode 100644 index 00000000..e5b76022 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html @@ -0,0 +1,11 @@ + + + + Welcome Page + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html new file mode 100644 index 00000000..f79f7c84 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html @@ -0,0 +1,12 @@ + + + + Welcome Page + + +
Placeholder
+
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html new file mode 100644 index 00000000..0a493fa5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html @@ -0,0 +1,11 @@ + + + + Welcome Page + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html new file mode 100644 index 00000000..ca5f7151 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html @@ -0,0 +1,14 @@ + + + + Page with partially hidden element + + +
+
Placeholder
+
+ +
+
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html new file mode 100644 index 00000000..cb5d53a4 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html @@ -0,0 +1,11 @@ + + + + Welcome Page + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html new file mode 100644 index 00000000..5df1115c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html @@ -0,0 +1,12 @@ + + + + Welcome Page + + +
Placeholder
+
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html new file mode 100644 index 00000000..b7cfaf5a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html @@ -0,0 +1,11 @@ + + + + Welcome Page + + +
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html new file mode 100644 index 00000000..b5716e73 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html @@ -0,0 +1,14 @@ + + + + Page with overflow: auto + + +
+
Placeholder
+
+ Click me! +
+
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html new file mode 100644 index 00000000..0457a822 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html @@ -0,0 +1,9 @@ + + + +Clicked Successfully! + + +

Clicked Successfully!

+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html new file mode 100644 index 00000000..4028414c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html @@ -0,0 +1,58 @@ + + + + +Multiple Selection test page + + + + + + + + + + + + + + + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html new file mode 100644 index 00000000..190b2ada --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html @@ -0,0 +1,65 @@ + + + + + jQuery UI Selectable - Default functionality + + + + + + + + +
+ +
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
  5. Item 3
  6. +
  7. Item 4
  8. +
  9. Item 5
  10. +
  11. Item 6
  12. +
  13. Item 7
  14. +
+ +
+ +
+ +

Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections.

+ + + +
+

no info

+
+ + +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html new file mode 100644 index 00000000..0ada24ed --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html new file mode 100644 index 00000000..f5e2ef2e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html @@ -0,0 +1,34 @@ + + + + + Session cookie destination + + + +This is the cookie destination page. + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml new file mode 100644 index 00000000..01f4c87c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml @@ -0,0 +1,5 @@ + + + baz + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html new file mode 100644 index 00000000..38210b9d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html @@ -0,0 +1,98 @@ + + + Hello WebDriver + + +

Heading

+ +

A single line of text

+ + +
+

A div containing

+ More than one line of text
+ +
and block level elements
+
+ +An inline element + +

This line has lots + + of spaces. +

+ +

This line has a non-breaking space

+ +

This line has a   non-breaking space and spaces

+ +

These lines  
  have leading and trailing NBSPs  

+ +

This line has text within elements that are meant to be displayed + inline

+ +
+

before pre

+
   This section has a preformatted
+    text block    
+  split in four lines
+         
+

after pre

+
+ +

Some text

Some more text

+ +
Cheese

Some text

Some more text

and also

Brie
+ +
Hello, world
+ +
+ +
+ +
+

+ + +

+
+ + + + + +
Top level
+
+
Nested
+
+ + + + + +
beforeSpace afterSpace
+ + + + + +a link to an icon + +{a="b", c=1, d=true} +{a="\\b\\\"'\'"} + +            ​‌‍  ⁠ test            ​‌‍  ⁠  + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html new file mode 100644 index 00000000..9f583005 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html @@ -0,0 +1,12 @@ + + + BasicKeyboardInterfaceTest + + +
+ +
+ + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html new file mode 100644 index 00000000..a6216e37 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html @@ -0,0 +1,10 @@ + + + +slowLoadingAlert + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html new file mode 100644 index 00000000..02796c34 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html @@ -0,0 +1,12 @@ + + + This page loads something slowly + + +

Simulate the situation where a web-bug or analytics script takes waaay + too long to respond. Normally these things are loaded in an iframe, which is + what we're doing here.

+ + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html new file mode 100644 index 00000000..d007248e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html @@ -0,0 +1,14 @@ + + + + Page with slow loading iFrames + + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html new file mode 100644 index 00000000..30810f09 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html @@ -0,0 +1,28 @@ + + + + Styled Page + + + + +
+ +
+ + +
+ +
+ +
Content
+ + + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml new file mode 100644 index 00000000..bf060fde --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml @@ -0,0 +1,81 @@ + + + + + Pie Chart Test + + + +
+ Some text for the chart. +
+
Nothing.
+
+ + + + + Test Chart + + + Apple + + Orange + + Banana + + Orange + + + + + + + + Example RotateScale - Rotate and scale transforms + + + + + + + + + + + + + + ABC (rotate) + + + + + + + + + + + + ABC (scale) + + + + +
WOrange
+
+
WOrange
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg new file mode 100644 index 00000000..c6cc2839 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg @@ -0,0 +1,4 @@ + + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html new file mode 100644 index 00000000..a2bc957b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html @@ -0,0 +1,36 @@ + + + + Here be tables + + + + + + + + + +
HelloWorld(Cheese!)
+ + + + + +
some text +
some more text
+
+ + + + + + + + + +
Heading
Data 1Data 2
+ + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html new file mode 100644 index 00000000..067b66cd --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html @@ -0,0 +1,10 @@ + + + + TinyMCE + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml new file mode 100644 index 00000000..0b7e7fd5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml @@ -0,0 +1,11 @@ + + + ]> + + +

Click the button.

+ + Go to another page + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl new file mode 100644 index 00000000..53db9fde --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl @@ -0,0 +1,37 @@ + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html new file mode 100644 index 00000000..87b02bfb --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html @@ -0,0 +1,70 @@ + + + + Upload Form + + + + +
+
+
+ Upload + +
+
+
+ + +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html new file mode 100644 index 00000000..904a4441 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html new file mode 100644 index 00000000..245acc74 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html @@ -0,0 +1,8 @@ + + + + + +
‎Some notes‎
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html new file mode 100644 index 00000000..aca398ab --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html @@ -0,0 +1,45 @@ + + + + Upload Form + + + +
+
+ Enter a file to upload: +
+
+
+ + +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html new file mode 100644 index 00000000..2453e692 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html @@ -0,0 +1,8 @@ + + +
+ + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html new file mode 100644 index 00000000..54a2aba4 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html @@ -0,0 +1,81 @@ + + + + Rectangles + + + + +
+
First Target
+
Second Target
+
Third Target
+
Fourth Target
+
Not a Target
+
Not a Target
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html new file mode 100644 index 00000000..80cc649c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html @@ -0,0 +1,21 @@ + + + + +Visibility test via CSS + +
+

Hello world. I like cheese.

+
+ + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html new file mode 100644 index 00000000..108b80f8 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html new file mode 100644 index 00000000..b94733b5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html @@ -0,0 +1,12 @@ + + + + Test page for WindowSwitchingTest.testShouldFocusOnTheTopMostFrameAfterSwitchingToAWindow + + +

Open new window

+
+ +
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html new file mode 100644 index 00000000..52c163cb --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html @@ -0,0 +1,9 @@ + + + + Simple Page + + +
Simple page with simple test.
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml new file mode 100644 index 00000000..aca53d34 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml @@ -0,0 +1,17 @@ + + + + XHTML + + + +
+ + +
+ +

Here is some content that should not be in the previous p tag + + + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html new file mode 100644 index 00000000..d2f3a5da --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html @@ -0,0 +1,76 @@ + + + + XHTML Test Page + + +

+ + + +
+

XHTML Might Be The Future

+ +

If you'd like to go elsewhere then click me.

+ +

Alternatively, this goes to the same place.

+ +
+ +
+ + This link has the same text as another link: click me. +
+ +
Another div starts here.

+

An H2 title

+

Some more text

+
+ +
+ Foo +
    + +
+ +
+
+
+ + +
+
+
+ + I have width +
+
+
+
+ + +

+

+
Link=equalssign + +

Spaced out

+ + +
first_div
+
second_div
+ first_span + second_span +
+ +
I'm a parent +
I'm a child
+
+ +
Woo woo
+ + diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js new file mode 100644 index 00000000..8194778e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js @@ -0,0 +1,321 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fs = require('fs'), + http = require('http'), + path = require('path'), + url = require('url'); + +var express = require('express'); +var multer = require('multer'); +var serveIndex = require('serve-index'); + +var Server = require('./httpserver').Server, + resources = require('./resources'), + isDevMode = require('../devmode'); + +var WEB_ROOT = '/common'; +var JS_ROOT = '/javascript'; + +var baseDirectory = resources.locate(isDevMode ? 'common/src/web' : '.'); +var jsDirectory = resources.locate(isDevMode ? 'javascript' : '..'); + +var Pages = (function() { + var pages = {}; + function addPage(page, path) { + pages.__defineGetter__(page, function() { + return exports.whereIs(path); + }); + } + + addPage('ajaxyPage', 'ajaxy_page.html'); + addPage('alertsPage', 'alerts.html'); + addPage('bodyTypingPage', 'bodyTypingTest.html'); + addPage('booleanAttributes', 'booleanAttributes.html'); + addPage('childPage', 'child/childPage.html'); + addPage('chinesePage', 'cn-test.html'); + addPage('clickJacker', 'click_jacker.html'); + addPage('clickEventPage', 'clickEventPage.html'); + addPage('clicksPage', 'clicks.html'); + addPage('colorPage', 'colorPage.html'); + addPage('deletingFrame', 'deletingFrame.htm'); + addPage('draggableLists', 'draggableLists.html'); + addPage('dragAndDropPage', 'dragAndDropTest.html'); + addPage('droppableItems', 'droppableItems.html'); + addPage('documentWrite', 'document_write_in_onload.html'); + addPage('dynamicallyModifiedPage', 'dynamicallyModifiedPage.html'); + addPage('dynamicPage', 'dynamic.html'); + addPage('echoPage', 'echo'); + addPage('errorsPage', 'errors.html'); + addPage('xhtmlFormPage', 'xhtmlFormPage.xhtml'); + addPage('formPage', 'formPage.html'); + addPage('formSelectionPage', 'formSelectionPage.html'); + addPage('framesetPage', 'frameset.html'); + addPage('grandchildPage', 'child/grandchild/grandchildPage.html'); + addPage('html5Page', 'html5Page.html'); + addPage('html5OfflinePage', 'html5/offline.html'); + addPage('iframePage', 'iframes.html'); + addPage('javascriptEnhancedForm', 'javascriptEnhancedForm.html'); + addPage('javascriptPage', 'javascriptPage.html'); + addPage('linkedImage', 'linked_image.html'); + addPage('longContentPage', 'longContentPage.html'); + addPage('macbethPage', 'macbeth.html'); + addPage('mapVisibilityPage', 'map_visibility.html'); + addPage('metaRedirectPage', 'meta-redirect.html'); + addPage('missedJsReferencePage', 'missedJsReference.html'); + addPage('mouseTrackerPage', 'mousePositionTracker.html'); + addPage('nestedPage', 'nestedElements.html'); + addPage('readOnlyPage', 'readOnlyPage.html'); + addPage('rectanglesPage', 'rectangles.html'); + addPage('redirectPage', 'redirect'); + addPage('resultPage', 'resultPage.html'); + addPage('richTextPage', 'rich_text.html'); + addPage('selectableItemsPage', 'selectableItems.html'); + addPage('selectPage', 'selectPage.html'); + addPage('simpleTestPage', 'simpleTest.html'); + addPage('simpleXmlDocument', 'simple.xml'); + addPage('sleepingPage', 'sleep'); + addPage('slowIframes', 'slow_loading_iframes.html'); + addPage('slowLoadingAlertPage', 'slowLoadingAlert.html'); + addPage('svgPage', 'svgPiechart.xhtml'); + addPage('tables', 'tables.html'); + addPage('underscorePage', 'underscore.html'); + addPage('unicodeLtrPage', 'utf8/unicode_ltr.html'); + addPage('uploadPage', 'upload.html'); + addPage('veryLargeCanvas', 'veryLargeCanvas.html'); + addPage('xhtmlTestPage', 'xhtmlTest.html'); + + return pages; +})(); + + +var Path = { + BASIC_AUTH: WEB_ROOT + '/basicAuth', + ECHO: WEB_ROOT + '/echo', + GENERATED: WEB_ROOT + '/generated', + MANIFEST: WEB_ROOT + '/manifest', + REDIRECT: WEB_ROOT + '/redirect', + PAGE: WEB_ROOT + '/page', + SLEEP: WEB_ROOT + '/sleep', + UPLOAD: WEB_ROOT + '/upload' +}; + +var app = express(); + +app.get('/', sendIndex) +.get('/favicon.ico', function(req, res) { + res.writeHead(204); + res.end(); +}) +.use(JS_ROOT, serveIndex(jsDirectory), express.static(jsDirectory)) +.post(Path.UPLOAD, handleUpload) +.use(WEB_ROOT, serveIndex(baseDirectory), express.static(baseDirectory)) +.get(Path.ECHO, sendEcho) +.get(Path.PAGE, sendInifinitePage) +.get(Path.PAGE + '/*', sendInifinitePage) +.get(Path.REDIRECT, redirectToResultPage) +.get(Path.SLEEP, sendDelayedResponse) + +if (isDevMode) { + var closureDir = resources.locate('third_party/closure/goog'); + app.use('/third_party/closure/goog', + serveIndex(closureDir), express.static(closureDir)); +} +var server = new Server(app); + + +function redirectToResultPage(_, response) { + response.writeHead(303, { + Location: Pages.resultPage + }); + return response.end(); +} + + +function sendInifinitePage(request, response) { + var pathname = url.parse(request.url).pathname; + var lastIndex = pathname.lastIndexOf('/'); + var pageNumber = + (lastIndex == -1 ? 'Unknown' : pathname.substring(lastIndex + 1)); + var body = [ + '', + 'Page', pageNumber, '', + 'Page number ', pageNumber, '', + '

top' + ].join(''); + response.writeHead(200, { + 'Content-Length': Buffer.byteLength(body, 'utf8'), + 'Content-Type': 'text/html; charset=utf-8' + }); + response.end(body); +} + + +function sendDelayedResponse(request, response) { + var duration = 0; + var query = url.parse(request.url).query || ''; + var match = query.match(/\btime=(\d+)/); + if (match) { + duration = parseInt(match[1], 10); + } + + setTimeout(function() { + var body = [ + '', + 'Done', + 'Slept for ', duration, 's' + ].join(''); + response.writeHead(200, { + 'Content-Length': Buffer.byteLength(body, 'utf8'), + 'Content-Type': 'text/html; charset=utf-8', + 'Cache-Control': 'no-cache', + 'Pragma': 'no-cache', + 'Expires': 0 + }); + response.end(body); + }, duration * 1000); +} + + +function handleUpload(request, response) { + let upload = multer({storage: multer.memoryStorage()}).any(); + upload(request, response, function(err) { + if (err) { + response.writeHead(500); + response.end(err + ''); + } else { + response.writeHead(200); + response.write(request.files[0].buffer); + response.end(''); + } + }); +} + + +function sendEcho(request, response) { + var body = [ + '', + 'Echo', + '

', + request.method, ' ', request.url, ' ', 'HTTP/', request.httpVersion, + '
' + ]; + for (var name in request.headers) { + body.push('
', + name, ': ', request.headers[name], '
'); + } + body = body.join(''); + response.writeHead(200, { + 'Content-Length': Buffer.byteLength(body, 'utf8'), + 'Content-Type': 'text/html; charset=utf-8' + }); + response.end(body); +} + + +/** + * Responds to a request for the file server's main index. + * @param {!http.ServerRequest} request The request object. + * @param {!http.ServerResponse} response The response object. + */ +function sendIndex(request, response) { + var pathname = url.parse(request.url).pathname; + + var host = request.headers.host; + if (!host) { + host = server.host(); + } + + var requestUrl = ['http://' + host + pathname].join(''); + + function createListEntry(path) { + var url = requestUrl + path; + return ['
  • ', path, ''].join(''); + } + + var data = ['

    /


      ', + createListEntry('common')]; + if (isDevMode) { + data.push(createListEntry('javascript')); + } + data.push('
    '); + data = data.join(''); + + response.writeHead(200, { + 'Content-Type': 'text/html; charset=UTF-8', + 'Content-Length': Buffer.byteLength(data, 'utf8') + }); + response.end(data); +} + + +// PUBLIC application + + +/** + * Starts the server on the specified port. + * @param {number=} opt_port The port to use, or 0 for any free port. + * @return {!Promise} A promise that will resolve + * with the server host when it has fully started. + */ +exports.start = server.start.bind(server); + + +/** + * Stops the server. + * @return {!Promise} A promise that will resolve when the + * server has closed all connections. + */ +exports.stop = server.stop.bind(server); + + +/** + * Formats a URL for this server. + * @param {string=} opt_pathname The desired pathname on the server. + * @return {string} The formatted URL. + * @throws {Error} If the server is not running. + */ +exports.url = server.url.bind(server); + + +/** + * Builds the URL for a file in the //common/src/web directory of the + * Selenium client. + * @param {string} filePath A path relative to //common/src/web to compute a + * URL for. + * @return {string} The formatted URL. + * @throws {Error} If the server is not running. + */ +exports.whereIs = function(filePath) { + filePath = filePath.replace(/\\/g, '/'); + if (!filePath.startsWith('/')) { + filePath = '/' + filePath; + } + return server.url(WEB_ROOT + filePath); +}; + + +exports.Pages = Pages; + + +if (require.main === module) { + server.start(2310).then(function() { + console.log('Server running at ' + server.url()); + }); +} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js new file mode 100644 index 00000000..f7847f73 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js @@ -0,0 +1,120 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + http = require('http'), + url = require('url'); + +var net = require('../../net'), + portprober = require('../../net/portprober'), + promise = require('../..').promise; + + + +/** + * Encapsulates a simple HTTP server for testing. The {@code onrequest} + * function should be overridden to define request handling behavior. + * @param {function(!http.ServerRequest, !http.ServerResponse)} requestHandler + * The request handler for the server. + * @constructor + */ +var Server = function(requestHandler) { + var server = http.createServer(function(req, res) { + requestHandler(req, res); + }); + + server.on('connection', function(stream) { + stream.setTimeout(4000); + }); + + /** @typedef {{port: number, address: string, family: string}} */ + var Host; + + /** + * Starts the server on the given port. If no port, or 0, is provided, + * the server will be started on a random port. + * @param {number=} opt_port The port to start on. + * @return {!Promise} A promise that will resolve + * with the server host when it has fully started. + */ + this.start = function(opt_port) { + assert(typeof opt_port !== 'function', + "start invoked with function, not port (mocha callback)?"); + var port = opt_port || portprober.findFreePort('localhost'); + return Promise.resolve(port).then(port => { + return promise.checkedNodeCall( + server.listen.bind(server, port, 'localhost')); + }).then(function() { + return server.address(); + }); + }; + + /** + * Stops the server. + * @return {!Promise} A promise that will resolve when the + * server has closed all connections. + */ + this.stop = function() { + return new Promise(resolve => server.close(resolve)); + }; + + /** + * @return {Host} This server's host info. + * @throws {Error} If the server is not running. + */ + this.address = function() { + var addr = server.address(); + if (!addr) { + throw Error('There server is not running!'); + } + return addr; + }; + + /** + * return {string} The host:port of this server. + * @throws {Error} If the server is not running. + */ + this.host = function() { + return net.getLoopbackAddress() + ':' + + this.address().port; + }; + + /** + * Formats a URL for this server. + * @param {string=} opt_pathname The desired pathname on the server. + * @return {string} The formatted URL. + * @throws {Error} If the server is not running. + */ + this.url = function(opt_pathname) { + var addr = this.address(); + var pathname = opt_pathname || ''; + return url.format({ + protocol: 'http', + hostname: net.getLoopbackAddress(), + port: addr.port, + pathname: pathname + }); + }; +}; + + +// PUBLIC API + + +exports.Server = Server; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/index.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/index.js new file mode 100644 index 00000000..bcfb0eab --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/index.js @@ -0,0 +1,270 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'); + +var build = require('./build'), + isDevMode = require('../devmode'), + webdriver = require('../../'), + flow = webdriver.promise.controlFlow(), + firefox = require('../../firefox'), + logging = require('../../lib/logging'), + safari = require('../../safari'), + remote = require('../../remote'), + testing = require('../../testing'), + fileserver = require('./fileserver'); + + +/** + * Browsers with native support. + * @type {!Array.} + */ +var NATIVE_BROWSERS = [ + webdriver.Browser.CHROME, + webdriver.Browser.EDGE, + webdriver.Browser.FIREFOX, + webdriver.Browser.IE, + webdriver.Browser.OPERA, + webdriver.Browser.PHANTOM_JS, + webdriver.Browser.SAFARI +]; + + +var noBuild = /^1|true$/i.test(process.env['SELENIUM_NO_BUILD']); +var serverJar = process.env['SELENIUM_SERVER_JAR']; +var remoteUrl = process.env['SELENIUM_REMOTE_URL']; +var useLoopback = process.env['SELENIUM_USE_LOOP_BACK'] == '1'; +var startServer = !!serverJar && !remoteUrl; +var nativeRun = !serverJar && !remoteUrl; + +if (/^1|true$/i.test(process.env['SELENIUM_VERBOSE'])) { + logging.installConsoleHandler(); + logging.getLogger('webdriver.http').setLevel(logging.Level.ALL); +} + +var browsersToTest = (function() { + var permitRemoteBrowsers = !!remoteUrl || !!serverJar; + var permitUnknownBrowsers = !nativeRun; + var browsers = process.env['SELENIUM_BROWSER'] || webdriver.Browser.FIREFOX; + + browsers = browsers.split(',').map(function(browser) { + var parts = browser.split(/:/); + if (parts[0] === 'ie') { + parts[0] = webdriver.Browser.IE; + } + if (parts[0] === 'edge') { + parts[0] = webdriver.Browser.EDGE; + } + return parts.join(':'); + }); + + browsers.forEach(function(browser) { + var parts = browser.split(/:/, 3); + if (parts[0] === 'ie') { + parts[0] = webdriver.Browser.IE; + } + + if (NATIVE_BROWSERS.indexOf(parts[0]) == -1 && !permitRemoteBrowsers) { + throw Error('Browser ' + parts[0] + ' requires a WebDriver server and ' + + 'neither the SELENIUM_REMOTE_URL nor the SELENIUM_SERVER_JAR ' + + 'environment variables have been set.'); + } + + var recognized = false; + for (var prop in webdriver.Browser) { + if (webdriver.Browser.hasOwnProperty(prop) && + webdriver.Browser[prop] === parts[0]) { + recognized = true; + break; + } + } + + if (!recognized && !permitUnknownBrowsers) { + throw Error('Unrecognized browser: ' + browser); + } + }); + + console.log('Running tests against [' + browsers.join(',') + ']'); + if (remoteUrl) { + console.log('Using remote server ' + remoteUrl); + } else if (serverJar) { + console.log('Using standalone Selenium server ' + serverJar); + if (useLoopback) { + console.log('Running tests using loopback address') + } + } + console.log( + 'Promise manager is enabled? ' + webdriver.promise.USE_PROMISE_MANAGER); + + return browsers; +})(); + + +/** + * Creates a predicate function that ignores tests for specific browsers. + * @param {string} currentBrowser The name of the current browser. + * @param {!Array.} browsersToIgnore The browsers to ignore. + * @return {function(): boolean} The predicate function. + */ +function browsers(currentBrowser, browsersToIgnore) { + return function() { + return browsersToIgnore.indexOf(currentBrowser) != -1; + }; +} + + +/** + * @param {string} browserName The name to use. + * @param {remote.DriverService} server The server to use, if any. + * @constructor + */ +function TestEnvironment(browserName, server) { + var name = browserName; + + this.currentBrowser = function() { + return browserName; + }; + + this.isRemote = function() { + return server || remoteUrl; + }; + + this.browsers = function(var_args) { + var browsersToIgnore = Array.prototype.slice.apply(arguments, [0]); + return browsers(browserName, browsersToIgnore); + }; + + this.builder = function() { + var builder = new webdriver.Builder(); + var realBuild = builder.build; + + builder.build = function() { + let parts = browserName.split(/:/, 3); + + builder.forBrowser(parts[0], parts[1], parts[2]); + if (server) { + builder.usingServer(server.address()); + } else if (remoteUrl) { + builder.usingServer(remoteUrl); + } + + builder.disableEnvironmentOverrides(); + return realBuild.call(builder); + }; + + return builder; + }; +} + + +var seleniumServer; +var inSuite = false; + + +/** + * Expands a function to cover each of the target browsers. + * @param {function(!TestEnvironment)} fn The top level suite + * function. + * @param {{browsers: !Array.}=} opt_options Suite specific options. + */ +function suite(fn, opt_options) { + assert.ok(!inSuite, 'You may not nest suite calls'); + inSuite = true; + + var suiteOptions = opt_options || {}; + var browsers = suiteOptions.browsers; + if (browsers) { + // Filter out browser specific tests when that browser is not currently + // selected for testing. + browsers = browsers.filter(function(browser) { + return browsersToTest.indexOf(browser) != -1; + }); + } else { + browsers = browsersToTest; + } + + try { + + before(function() { + if (isDevMode && !noBuild) { + return build.of( + '//javascript/atoms/fragments:is-displayed', + '//javascript/webdriver/atoms:get-attribute') + .onlyOnce().go(); + } + }); + + // Server is only started if required for a specific config. + after(function() { + if (seleniumServer) { + return seleniumServer.stop(); + } + }); + + browsers.forEach(function(browser) { + describe('[' + browser + ']', function() { + + var serverToUse = null; + + if (!!serverJar && !remoteUrl) { + if (!(serverToUse = seleniumServer)) { + serverToUse = seleniumServer = new remote.SeleniumServer( + serverJar, {loopback: useLoopback}); + } + + before(function() { + this.timeout(0); + return seleniumServer.start(60 * 1000); + }); + } + fn(new TestEnvironment(browser, serverToUse)); + }); + }); + } finally { + inSuite = false; + } +} + + +// GLOBAL TEST SETUP + +before(function() { + // Do not pass register fileserver.start directly with testing.before, + // as start takes an optional port, which before assumes is an async + // callback. + return fileserver.start(); +}); + +after(function() { + return fileserver.stop(); +}); + +// PUBLIC API + + +exports.suite = suite; +exports.after = testing.after; +exports.afterEach = testing.afterEach; +exports.before = testing.before; +exports.beforeEach = testing.beforeEach; +exports.it = testing.it; +exports.ignore = testing.ignore; + +exports.Pages = fileserver.Pages; +exports.whereIs = fileserver.whereIs; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js new file mode 100644 index 00000000..073e21d6 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js @@ -0,0 +1,79 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + + +/** + * Configures a block of mocha tests, ensuring the promise manager is either + * enabled or disabled for the tests' execution. + * for their execution. + */ +function withPromiseManager(enabled, fn) { + describe(`SELENIUM_PROMISE_MANAGER=${enabled}`, function() { + let saved; + + function changeState() { + saved = process.env.SELENIUM_PROMISE_MANAGER; + process.env.SELENIUM_PROMISE_MANAGER = enabled; + } + + function restoreState() { + if (saved === undefined) { + delete process.env.SELENIUM_PROMISE_MANAGER; + } else { + process.env.SELENIUM_PROMISE_MANAGER = saved; + } + } + + before(changeState); + after(restoreState); + + try { + changeState(); + fn(); + } finally { + restoreState(); + } + }); +}; + + +/** + * Defines a set of tests to run both with and without the promise manager + * enabled. + */ +exports.promiseManagerSuite = function(fn) { + withPromiseManager(true, fn); + withPromiseManager(false, fn); +}; + + +/** + * Ensures the promise manager is enabled when the provided tests run. + */ +exports.enablePromiseManager = function(fn) { + withPromiseManager(true, fn); +}; + + +/** + * Ensures the promise manager is disabled when the provided tests run. + */ +exports.disablePromiseManager = function(fn) { + withPromiseManager(false, fn); +}; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js new file mode 100644 index 00000000..8e9cceb4 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js @@ -0,0 +1,44 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fs = require('fs'), + path = require('path'); + +var resourceRoot = require('../devmode') ? + require('./build').projectRoot() : + path.join(__dirname, 'data'); + + +// PUBLIC API + + +/** + * Locates a test resource. + * @param {string} resourcePath Path of the resource to locate. + * @param {string} filePath The file to locate from the root of the project. + * @return {string} The full path for the file, if it exists. + * @throws {Error} If the file does not exist. + */ +exports.locate = function(filePath) { + var fullPath = path.normalize(path.join(resourceRoot, filePath)); + if (!fs.existsSync(fullPath)) { + throw Error('File does not exist: ' + filePath); + } + return fullPath; +}; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/until.js b/test-eol-project/node_modules/selenium-webdriver/lib/until.js new file mode 100644 index 00000000..b0e68b88 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/until.js @@ -0,0 +1,427 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Defines common conditions for use with + * {@link webdriver.WebDriver#wait WebDriver wait}. + * + * Sample usage: + * + * driver.get('http://www.google.com/ncr'); + * + * var query = driver.wait(until.elementLocated(By.name('q'))); + * query.sendKeys('webdriver\n'); + * + * driver.wait(until.titleIs('webdriver - Google Search')); + * + * To define a custom condition, simply call WebDriver.wait with a function + * that will eventually return a truthy-value (neither null, undefined, false, + * 0, or the empty string): + * + * driver.wait(function() { + * return driver.getTitle().then(function(title) { + * return title === 'webdriver - Google Search'; + * }); + * }, 1000); + */ + +'use strict'; + +const by = require('./by'); +const By = require('./by').By; +const error = require('./error'); +const webdriver = require('./webdriver'), + Condition = webdriver.Condition, + WebElementCondition = webdriver.WebElementCondition; + + +/** + * Creates a condition that will wait until the input driver is able to switch + * to the designated frame. The target frame may be specified as + * + * 1. a numeric index into + * [window.frames](https://developer.mozilla.org/en-US/docs/Web/API/Window.frames) + * for the currently selected frame. + * 2. a {@link ./webdriver.WebElement}, which must reference a FRAME or IFRAME + * element on the current page. + * 3. a locator which may be used to first locate a FRAME or IFRAME on the + * current page before attempting to switch to it. + * + * Upon successful resolution of this condition, the driver will be left + * focused on the new frame. + * + * @param {!(number|./webdriver.WebElement|By| + * function(!./webdriver.WebDriver): !./webdriver.WebElement)} frame + * The frame identifier. + * @return {!Condition} A new condition. + */ +exports.ableToSwitchToFrame = function ableToSwitchToFrame(frame) { + var condition; + if (typeof frame === 'number' || frame instanceof webdriver.WebElement) { + condition = driver => attemptToSwitchFrames(driver, frame); + } else { + condition = function(driver) { + let locator = /** @type {!(By|Function)} */(frame); + return driver.findElements(locator).then(function(els) { + if (els.length) { + return attemptToSwitchFrames(driver, els[0]); + } + }); + }; + } + + return new Condition('to be able to switch to frame', condition); + + function attemptToSwitchFrames(driver, frame) { + return driver.switchTo().frame(frame).then( + function() { return true; }, + function(e) { + if (!(e instanceof error.NoSuchFrameError)) { + throw e; + } + }); + } +}; + + +/** + * Creates a condition that waits for an alert to be opened. Upon success, the + * returned promise will be fulfilled with the handle for the opened alert. + * + * @return {!Condition} The new condition. + */ +exports.alertIsPresent = function alertIsPresent() { + return new Condition('for alert to be present', function(driver) { + return driver.switchTo().alert().catch(function(e) { + if (!(e instanceof error.NoSuchAlertError + // XXX: Workaround for GeckoDriver error `TypeError: can't convert null + // to object`. For more details, see + // https://github.com/SeleniumHQ/selenium/pull/2137 + || (e instanceof error.WebDriverError + && e.message === `can't convert null to object`) + )) { + throw e; + } + }); + }); +}; + + +/** + * Creates a condition that will wait for the current page's title to match the + * given value. + * + * @param {string} title The expected page title. + * @return {!Condition} The new condition. + */ +exports.titleIs = function titleIs(title) { + return new Condition( + 'for title to be ' + JSON.stringify(title), + function(driver) { + return driver.getTitle().then(function(t) { + return t === title; + }); + }); +}; + + +/** + * Creates a condition that will wait for the current page's title to contain + * the given substring. + * + * @param {string} substr The substring that should be present in the page + * title. + * @return {!Condition} The new condition. + */ +exports.titleContains = function titleContains(substr) { + return new Condition( + 'for title to contain ' + JSON.stringify(substr), + function(driver) { + return driver.getTitle().then(function(title) { + return title.indexOf(substr) !== -1; + }); + }); +}; + + +/** + * Creates a condition that will wait for the current page's title to match the + * given regular expression. + * + * @param {!RegExp} regex The regular expression to test against. + * @return {!Condition} The new condition. + */ +exports.titleMatches = function titleMatches(regex) { + return new Condition('for title to match ' + regex, function(driver) { + return driver.getTitle().then(function(title) { + return regex.test(title); + }); + }); +}; + + +/** + * Creates a condition that will wait for the current page's url to match the + * given value. + * + * @param {string} url The expected page url. + * @return {!Condition} The new condition. + */ +exports.urlIs = function urlIs(url) { + return new Condition( + 'for URL to be ' + JSON.stringify(url), + function(driver) { + return driver.getCurrentUrl().then(function(u) { + return u === url; + }); + }); +}; + + +/** + * Creates a condition that will wait for the current page's url to contain + * the given substring. + * + * @param {string} substrUrl The substring that should be present in the current + * URL. + * @return {!Condition} The new condition. + */ +exports.urlContains = function urlContains(substrUrl) { + return new Condition( + 'for URL to contain ' + JSON.stringify(substrUrl), + function(driver) { + return driver.getCurrentUrl().then(function(url) { + return url.indexOf(substrUrl) !== -1; + }); + }); +}; + + +/** + * Creates a condition that will wait for the current page's url to match the + * given regular expression. + * + * @param {!RegExp} regex The regular expression to test against. + * @return {!Condition} The new condition. + */ +exports.urlMatches = function urlMatches(regex) { + return new Condition('for URL to match ' + regex, function(driver) { + return driver.getCurrentUrl().then(function(url) { + return regex.test(url); + }); + }); +}; + + +/** + * Creates a condition that will loop until an element is + * {@link ./webdriver.WebDriver#findElement found} with the given locator. + * + * @param {!(By|Function)} locator The locator to use. + * @return {!WebElementCondition} The new condition. + */ +exports.elementLocated = function elementLocated(locator) { + locator = by.checkedLocator(locator); + let locatorStr = + typeof locator === 'function' ? 'by function()' : locator + ''; + return new WebElementCondition('for element to be located ' + locatorStr, + function(driver) { + return driver.findElements(locator).then(function(elements) { + return elements[0]; + }); + }); +}; + + +/** + * Creates a condition that will loop until at least one element is + * {@link ./webdriver.WebDriver#findElement found} with the given locator. + * + * @param {!(By|Function)} locator The locator to use. + * @return {!Condition>} The new + * condition. + */ +exports.elementsLocated = function elementsLocated(locator) { + locator = by.checkedLocator(locator); + let locatorStr = + typeof locator === 'function' ? 'by function()' : locator + ''; + return new Condition( + 'for at least one element to be located ' + locatorStr, + function(driver) { + return driver.findElements(locator).then(function(elements) { + return elements.length > 0 ? elements : null; + }); + }); +}; + + +/** + * Creates a condition that will wait for the given element to become stale. An + * element is considered stale once it is removed from the DOM, or a new page + * has loaded. + * + * @param {!./webdriver.WebElement} element The element that should become stale. + * @return {!Condition} The new condition. + */ +exports.stalenessOf = function stalenessOf(element) { + return new Condition('element to become stale', function() { + return element.getTagName().then( + function() { return false; }, + function(e) { + if (e instanceof error.StaleElementReferenceError) { + return true; + } + throw e; + }); + }); +}; + + +/** + * Creates a condition that will wait for the given element to become visible. + * + * @param {!./webdriver.WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see ./webdriver.WebDriver#isDisplayed + */ +exports.elementIsVisible = function elementIsVisible(element) { + return new WebElementCondition('until element is visible', function() { + return element.isDisplayed().then(v => v ? element : null); + }); +}; + + +/** + * Creates a condition that will wait for the given element to be in the DOM, + * yet not visible to the user. + * + * @param {!./webdriver.WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see ./webdriver.WebDriver#isDisplayed + */ +exports.elementIsNotVisible = function elementIsNotVisible(element) { + return new WebElementCondition('until element is not visible', function() { + return element.isDisplayed().then(v => v ? null : element); + }); +}; + + +/** + * Creates a condition that will wait for the given element to be enabled. + * + * @param {!./webdriver.WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#isEnabled + */ +exports.elementIsEnabled = function elementIsEnabled(element) { + return new WebElementCondition('until element is enabled', function() { + return element.isEnabled().then(v => v ? element : null); + }); +}; + + +/** + * Creates a condition that will wait for the given element to be disabled. + * + * @param {!./webdriver.WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#isEnabled + */ +exports.elementIsDisabled = function elementIsDisabled(element) { + return new WebElementCondition('until element is disabled', function() { + return element.isEnabled().then(v => v ? null : element); + }); +}; + + +/** + * Creates a condition that will wait for the given element to be selected. + * @param {!./webdriver.WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#isSelected + */ +exports.elementIsSelected = function elementIsSelected(element) { + return new WebElementCondition('until element is selected', function() { + return element.isSelected().then(v => v ? element : null); + }); +}; + + +/** + * Creates a condition that will wait for the given element to be deselected. + * + * @param {!./webdriver.WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#isSelected + */ +exports.elementIsNotSelected = function elementIsNotSelected(element) { + return new WebElementCondition('until element is not selected', function() { + return element.isSelected().then(v => v ? null : element); + }); +}; + + +/** + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to match the given + * {@code text} exactly. + * + * @param {!./webdriver.WebElement} element The element to test. + * @param {string} text The expected text. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#getText + */ +exports.elementTextIs = function elementTextIs(element, text) { + return new WebElementCondition('until element text is', function() { + return element.getText().then(t => t === text ? element : null); + }); +}; + + +/** + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to contain the given + * substring. + * + * @param {!./webdriver.WebElement} element The element to test. + * @param {string} substr The substring to search for. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#getText + */ +exports.elementTextContains = function elementTextContains(element, substr) { + return new WebElementCondition('until element text contains', function() { + return element.getText() + .then(t => t.indexOf(substr) != -1 ? element : null); + }); +}; + + +/** + * Creates a condition that will wait for the given element's + * {@link webdriver.WebDriver#getText visible text} to match a regular + * expression. + * + * @param {!./webdriver.WebElement} element The element to test. + * @param {!RegExp} regex The regular expression to test against. + * @return {!WebElementCondition} The new condition. + * @see webdriver.WebDriver#getText + */ +exports.elementTextMatches = function elementTextMatches(element, regex) { + return new WebElementCondition('until element text matches', function() { + return element.getText().then(t => regex.test(t) ? element : null); + }); +}; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js b/test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js new file mode 100644 index 00000000..5df84a15 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js @@ -0,0 +1,2656 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview The heart of the WebDriver JavaScript API. + */ + +'use strict'; + +const actions = require('./actions'); +const by = require('./by'); +const Capabilities = require('./capabilities').Capabilities; +const command = require('./command'); +const error = require('./error'); +const input = require('./input'); +const logging = require('./logging'); +const {Session} = require('./session'); +const Symbols = require('./symbols'); +const promise = require('./promise'); + + +/** + * Defines a condition for use with WebDriver's {@linkplain WebDriver#wait wait + * command}. + * + * @template OUT + */ +class Condition { + /** + * @param {string} message A descriptive error message. Should complete the + * sentence "Waiting [...]" + * @param {function(!WebDriver): OUT} fn The condition function to + * evaluate on each iteration of the wait loop. + */ + constructor(message, fn) { + /** @private {string} */ + this.description_ = 'Waiting ' + message; + + /** @type {function(!WebDriver): OUT} */ + this.fn = fn; + } + + /** @return {string} A description of this condition. */ + description() { + return this.description_; + } +} + + +/** + * Defines a condition that will result in a {@link WebElement}. + * + * @extends {Condition)>} + */ +class WebElementCondition extends Condition { + /** + * @param {string} message A descriptive error message. Should complete the + * sentence "Waiting [...]" + * @param {function(!WebDriver): !(WebElement|IThenable)} + * fn The condition function to evaluate on each iteration of the wait + * loop. + */ + constructor(message, fn) { + super(message, fn); + } +} + + +////////////////////////////////////////////////////////////////////////////// +// +// WebDriver +// +////////////////////////////////////////////////////////////////////////////// + + +/** + * Translates a command to its wire-protocol representation before passing it + * to the given `executor` for execution. + * @param {!command.Executor} executor The executor to use. + * @param {!command.Command} command The command to execute. + * @return {!Promise} A promise that will resolve with the command response. + */ +function executeCommand(executor, command) { + return toWireValue(command.getParameters()). + then(function(parameters) { + command.setParameters(parameters); + return executor.execute(command); + }); +} + + +/** + * Converts an object to its JSON representation in the WebDriver wire protocol. + * When converting values of type object, the following steps will be taken: + *
      + *
    1. if the object is a WebElement, the return value will be the element's + * server ID + *
    2. if the object defines a {@link Symbols.serialize} method, this algorithm + * will be recursively applied to the object's serialized representation + *
    3. if the object provides a "toJSON" function, this algorithm will + * recursively be applied to the result of that function + *
    4. otherwise, the value of each key will be recursively converted according + * to the rules above. + *
    + * + * @param {*} obj The object to convert. + * @return {!Promise} A promise that will resolve to the input value's JSON + * representation. + */ +function toWireValue(obj) { + if (promise.isPromise(obj)) { + return Promise.resolve(obj).then(toWireValue); + } + return Promise.resolve(convertValue(obj)); +} + + +function convertValue(value) { + if (value === void 0 || value === null) { + return value; + } + + if (typeof value === 'boolean' + || typeof value === 'number' + || typeof value === 'string') { + return value; + } + + if (Array.isArray(value)) { + return convertKeys(value); + } + + if (typeof value === 'function') { + return '' + value; + } + + if (typeof value[Symbols.serialize] === 'function') { + return toWireValue(value[Symbols.serialize]()); + } else if (typeof value.toJSON === 'function') { + return toWireValue(value.toJSON()); + } + return convertKeys(value); +} + + +function convertKeys(obj) { + const isArray = Array.isArray(obj); + const numKeys = isArray ? obj.length : Object.keys(obj).length; + const ret = isArray ? new Array(numKeys) : {}; + if (!numKeys) { + return Promise.resolve(ret); + } + + let numResolved = 0; + + function forEachKey(obj, fn) { + if (Array.isArray(obj)) { + for (let i = 0, n = obj.length; i < n; i++) { + fn(obj[i], i); + } + } else { + for (let key in obj) { + fn(obj[key], key); + } + } + } + + return new Promise(function(done, reject) { + forEachKey(obj, function(value, key) { + if (promise.isPromise(value)) { + value.then(toWireValue).then(setValue, reject); + } else { + value = convertValue(value); + if (promise.isPromise(value)) { + value.then(toWireValue).then(setValue, reject); + } else { + setValue(value); + } + } + + function setValue(value) { + ret[key] = value; + maybeFulfill(); + } + }); + + function maybeFulfill() { + if (++numResolved === numKeys) { + done(ret); + } + } + }); +} + + +/** + * Converts a value from its JSON representation according to the WebDriver wire + * protocol. Any JSON object that defines a WebElement ID will be decoded to a + * {@link WebElement} object. All other values will be passed through as is. + * + * @param {!WebDriver} driver The driver to use as the parent of any unwrapped + * {@link WebElement} values. + * @param {*} value The value to convert. + * @return {*} The converted value. + */ +function fromWireValue(driver, value) { + if (Array.isArray(value)) { + value = value.map(v => fromWireValue(driver, v)); + } else if (WebElement.isId(value)) { + let id = WebElement.extractId(value); + value = new WebElement(driver, id); + } else if (value && typeof value === 'object') { + let result = {}; + for (let key in value) { + if (value.hasOwnProperty(key)) { + result[key] = fromWireValue(driver, value[key]); + } + } + value = result; + } + return value; +} + + +/** + * Structural interface for a WebDriver client. + * + * @record + */ +class IWebDriver { + + /** @return {!promise.ControlFlow} The control flow used by this instance. */ + controlFlow() {} + + /** + * Schedules a {@link command.Command} to be executed by this driver's + * {@link command.Executor}. + * + * @param {!command.Command} command The command to schedule. + * @param {string} description A description of the command for debugging. + * @return {!promise.Thenable} A promise that will be resolved + * with the command result. + * @template T + */ + schedule(command, description) {} + + /** + * Sets the {@linkplain input.FileDetector file detector} that should be + * used with this instance. + * @param {input.FileDetector} detector The detector to use or {@code null}. + */ + setFileDetector(detector) {} + + /** + * @return {!command.Executor} The command executor used by this instance. + */ + getExecutor() {} + + /** + * @return {!promise.Thenable} A promise for this client's session. + */ + getSession() {} + + /** + * @return {!promise.Thenable} A promise that will resolve with + * the this instance's capabilities. + */ + getCapabilities() {} + + /** + * Terminates the browser session. After calling quit, this instance will be + * invalidated and may no longer be used to issue commands against the + * browser. + * + * @return {!promise.Thenable} A promise that will be resolved when the + * command has completed. + */ + quit() {} + + /** + * Creates a new action sequence using this driver. The sequence will not be + * scheduled for execution until {@link actions.ActionSequence#perform} is + * called. Example: + * + * driver.actions(). + * mouseDown(element1). + * mouseMove(element2). + * mouseUp(). + * perform(); + * + * @return {!actions.ActionSequence} A new action sequence for this instance. + */ + actions() {} + + /** + * Creates a new touch sequence using this driver. The sequence will not be + * scheduled for execution until {@link actions.TouchSequence#perform} is + * called. Example: + * + * driver.touchActions(). + * tap(element1). + * doubleTap(element2). + * perform(); + * + * @return {!actions.TouchSequence} A new touch sequence for this instance. + */ + touchActions() {} + + /** + * Schedules a command to execute JavaScript in the context of the currently + * selected frame or window. The script fragment will be executed as the body + * of an anonymous function. If the script is provided as a function object, + * that function will be converted to a string for injection into the target + * window. + * + * Any arguments provided in addition to the script will be included as script + * arguments and may be referenced using the {@code arguments} object. + * Arguments may be a boolean, number, string, or {@linkplain WebElement}. + * Arrays and objects may also be used as script arguments as long as each item + * adheres to the types previously mentioned. + * + * The script may refer to any variables accessible from the current window. + * Furthermore, the script will execute in the window's context, thus + * {@code document} may be used to refer to the current document. Any local + * variables will not be available once the script has finished executing, + * though global variables will persist. + * + * If the script has a return value (i.e. if the script contains a return + * statement), then the following steps will be taken for resolving this + * functions return value: + * + * - For a HTML element, the value will resolve to a {@linkplain WebElement} + * - Null and undefined return values will resolve to null
  • + * - Booleans, numbers, and strings will resolve as is + * - Functions will resolve to their string representation + * - For arrays and objects, each member item will be converted according to + * the rules above + * + * @param {!(string|Function)} script The script to execute. + * @param {...*} var_args The arguments to pass to the script. + * @return {!promise.Thenable} A promise that will resolve to the + * scripts return value. + * @template T + */ + executeScript(script, var_args) {} + + /** + * Schedules a command to execute asynchronous JavaScript in the context of the + * currently selected frame or window. The script fragment will be executed as + * the body of an anonymous function. If the script is provided as a function + * object, that function will be converted to a string for injection into the + * target window. + * + * Any arguments provided in addition to the script will be included as script + * arguments and may be referenced using the {@code arguments} object. + * Arguments may be a boolean, number, string, or {@code WebElement}. + * Arrays and objects may also be used as script arguments as long as each item + * adheres to the types previously mentioned. + * + * Unlike executing synchronous JavaScript with {@link #executeScript}, + * scripts executed with this function must explicitly signal they are finished + * by invoking the provided callback. This callback will always be injected + * into the executed function as the last argument, and thus may be referenced + * with {@code arguments[arguments.length - 1]}. The following steps will be + * taken for resolving this functions return value against the first argument + * to the script's callback function: + * + * - For a HTML element, the value will resolve to a + * {@link WebElement} + * - Null and undefined return values will resolve to null + * - Booleans, numbers, and strings will resolve as is + * - Functions will resolve to their string representation + * - For arrays and objects, each member item will be converted according to + * the rules above + * + * __Example #1:__ Performing a sleep that is synchronized with the currently + * selected window: + * + * var start = new Date().getTime(); + * driver.executeAsyncScript( + * 'window.setTimeout(arguments[arguments.length - 1], 500);'). + * then(function() { + * console.log( + * 'Elapsed time: ' + (new Date().getTime() - start) + ' ms'); + * }); + * + * __Example #2:__ Synchronizing a test with an AJAX application: + * + * var button = driver.findElement(By.id('compose-button')); + * button.click(); + * driver.executeAsyncScript( + * 'var callback = arguments[arguments.length - 1];' + + * 'mailClient.getComposeWindowWidget().onload(callback);'); + * driver.switchTo().frame('composeWidget'); + * driver.findElement(By.id('to')).sendKeys('dog@example.com'); + * + * __Example #3:__ Injecting a XMLHttpRequest and waiting for the result. In + * this example, the inject script is specified with a function literal. When + * using this format, the function is converted to a string for injection, so it + * should not reference any symbols not defined in the scope of the page under + * test. + * + * driver.executeAsyncScript(function() { + * var callback = arguments[arguments.length - 1]; + * var xhr = new XMLHttpRequest(); + * xhr.open("GET", "/resource/data.json", true); + * xhr.onreadystatechange = function() { + * if (xhr.readyState == 4) { + * callback(xhr.responseText); + * } + * }; + * xhr.send(''); + * }).then(function(str) { + * console.log(JSON.parse(str)['food']); + * }); + * + * @param {!(string|Function)} script The script to execute. + * @param {...*} var_args The arguments to pass to the script. + * @return {!promise.Thenable} A promise that will resolve to the + * scripts return value. + * @template T + */ + executeAsyncScript(script, var_args) {} + + /** + * Schedules a command to execute a custom function. + * @param {function(...): (T|IThenable)} fn The function to execute. + * @param {Object=} opt_scope The object in whose scope to execute the function. + * @param {...*} var_args Any arguments to pass to the function. + * @return {!promise.Thenable} A promise that will be resolved' + * with the function's result. + * @template T + */ + call(fn, opt_scope, var_args) {} + + /** + * Schedules a command to wait for a condition to hold. The condition may be + * specified by a {@link Condition}, as a custom function, or as any + * promise-like thenable. + * + * For a {@link Condition} or function, the wait will repeatedly + * evaluate the condition until it returns a truthy value. If any errors occur + * while evaluating the condition, they will be allowed to propagate. In the + * event a condition returns a {@link promise.Promise promise}, the polling + * loop will wait for it to be resolved and use the resolved value for whether + * the condition has been satisfied. Note the resolution time for a promise + * is factored into whether a wait has timed out. + * + * Note, if the provided condition is a {@link WebElementCondition}, then + * the wait will return a {@link WebElementPromise} that will resolve to the + * element that satisfied the condition. + * + * _Example:_ waiting up to 10 seconds for an element to be present on the + * page. + * + * var button = driver.wait(until.elementLocated(By.id('foo')), 10000); + * button.click(); + * + * This function may also be used to block the command flow on the resolution + * of any thenable promise object. When given a promise, the command will + * simply wait for its resolution before completing. A timeout may be provided + * to fail the command if the promise does not resolve before the timeout + * expires. + * + * _Example:_ Suppose you have a function, `startTestServer`, that returns a + * promise for when a server is ready for requests. You can block a WebDriver + * client on this promise with: + * + * var started = startTestServer(); + * driver.wait(started, 5 * 1000, 'Server should start within 5 seconds'); + * driver.get(getServerUrl()); + * + * @param {!(IThenable| + * Condition| + * function(!WebDriver): T)} condition The condition to + * wait on, defined as a promise, condition object, or a function to + * evaluate as a condition. + * @param {number=} opt_timeout How long to wait for the condition to be true. + * @param {string=} opt_message An optional message to use if the wait times + * out. + * @return {!(promise.Thenable|WebElementPromise)} A promise that will be + * resolved with the first truthy value returned by the condition + * function, or rejected if the condition times out. If the input + * input condition is an instance of a {@link WebElementCondition}, + * the returned value will be a {@link WebElementPromise}. + * @throws {TypeError} if the provided `condition` is not a valid type. + * @template T + */ + wait(condition, opt_timeout, opt_message) {} + + /** + * Schedules a command to make the driver sleep for the given amount of time. + * @param {number} ms The amount of time, in milliseconds, to sleep. + * @return {!promise.Thenable} A promise that will be resolved + * when the sleep has finished. + */ + sleep(ms) {} + + /** + * Schedules a command to retrieve the current window handle. + * @return {!promise.Thenable} A promise that will be + * resolved with the current window handle. + */ + getWindowHandle() {} + + /** + * Schedules a command to retrieve the current list of available window handles. + * @return {!promise.Thenable>} A promise that will + * be resolved with an array of window handles. + */ + getAllWindowHandles() {} + + /** + * Schedules a command to retrieve the current page's source. The page source + * returned is a representation of the underlying DOM: do not expect it to be + * formatted or escaped in the same way as the response sent from the web + * server. + * @return {!promise.Thenable} A promise that will be + * resolved with the current page source. + */ + getPageSource() {} + + /** + * Schedules a command to close the current window. + * @return {!promise.Thenable} A promise that will be resolved + * when this command has completed. + */ + close() {} + + /** + * Schedules a command to navigate to the given URL. + * @param {string} url The fully qualified URL to open. + * @return {!promise.Thenable} A promise that will be resolved + * when the document has finished loading. + */ + get(url) {} + + /** + * Schedules a command to retrieve the URL of the current page. + * @return {!promise.Thenable} A promise that will be + * resolved with the current URL. + */ + getCurrentUrl() {} + + /** + * Schedules a command to retrieve the current page's title. + * @return {!promise.Thenable} A promise that will be + * resolved with the current page's title. + */ + getTitle() {} + + /** + * Schedule a command to find an element on the page. If the element cannot be + * found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned + * by the driver. Unlike other commands, this error cannot be suppressed. In + * other words, scheduling a command to find an element doubles as an assert + * that the element is present on the page. To test whether an element is + * present on the page, use {@link #findElements}: + * + * driver.findElements(By.id('foo')) + * .then(found => console.log('Element found? %s', !!found.length)); + * + * The search criteria for an element may be defined using one of the + * factories in the {@link webdriver.By} namespace, or as a short-hand + * {@link webdriver.By.Hash} object. For example, the following two statements + * are equivalent: + * + * var e1 = driver.findElement(By.id('foo')); + * var e2 = driver.findElement({id:'foo'}); + * + * You may also provide a custom locator function, which takes as input this + * instance and returns a {@link WebElement}, or a promise that will resolve + * to a WebElement. If the returned promise resolves to an array of + * WebElements, WebDriver will use the first element. For example, to find the + * first visible link on a page, you could write: + * + * var link = driver.findElement(firstVisibleLink); + * + * function firstVisibleLink(driver) { + * var links = driver.findElements(By.tagName('a')); + * return promise.filter(links, function(link) { + * return link.isDisplayed(); + * }); + * } + * + * @param {!(by.By|Function)} locator The locator to use. + * @return {!WebElementPromise} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator) {} + + /** + * Schedule a command to search for multiple elements on the page. + * + * @param {!(by.By|Function)} locator The locator to use. + * @return {!promise.Thenable>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator) {} + + /** + * Schedule a command to take a screenshot. The driver makes a best effort to + * return a screenshot of the following, in order of preference: + * + * 1. Entire page + * 2. Current window + * 3. Visible portion of the current frame + * 4. The entire display containing the browser + * + * @return {!promise.Thenable} A promise that will be + * resolved to the screenshot as a base-64 encoded PNG. + */ + takeScreenshot() {} + + /** + * @return {!Options} The options interface for this instance. + */ + manage() {} + + /** + * @return {!Navigation} The navigation interface for this instance. + */ + navigate() {} + + /** + * @return {!TargetLocator} The target locator interface for this + * instance. + */ + switchTo() {} +} + + +/** + * Each WebDriver instance provides automated control over a browser session. + * + * @implements {IWebDriver} + */ +class WebDriver { + /** + * @param {!(Session|IThenable)} session Either a known session or a + * promise that will be resolved to a session. + * @param {!command.Executor} executor The executor to use when sending + * commands to the browser. + * @param {promise.ControlFlow=} opt_flow The flow to + * schedule commands through. Defaults to the active flow object. + * @param {(function(this: void): ?)=} opt_onQuit A function to call, if any, + * when the session is terminated. + */ + constructor(session, executor, opt_flow, opt_onQuit) { + /** @private {!promise.ControlFlow} */ + this.flow_ = opt_flow || promise.controlFlow(); + + /** @private {!promise.Thenable} */ + this.session_ = this.flow_.promise(resolve => resolve(session)); + + /** @private {!command.Executor} */ + this.executor_ = executor; + + /** @private {input.FileDetector} */ + this.fileDetector_ = null; + + /** @private @const {(function(this: void): ?|undefined)} */ + this.onQuit_ = opt_onQuit; + } + + /** + * Creates a new WebDriver client for an existing session. + * @param {!command.Executor} executor Command executor to use when querying + * for session details. + * @param {string} sessionId ID of the session to attach to. + * @param {promise.ControlFlow=} opt_flow The control flow all + * driver commands should execute under. Defaults to the + * {@link promise.controlFlow() currently active} control flow. + * @return {!WebDriver} A new client for the specified session. + */ + static attachToSession(executor, sessionId, opt_flow) { + let flow = opt_flow || promise.controlFlow(); + let cmd = new command.Command(command.Name.DESCRIBE_SESSION) + .setParameter('sessionId', sessionId); + let session = flow.execute( + () => executeCommand(executor, cmd).catch(err => { + // The DESCRIBE_SESSION command is not supported by the W3C spec, so + // if we get back an unknown command, just return a session with + // unknown capabilities. + if (err instanceof error.UnknownCommandError) { + return new Session(sessionId, new Capabilities); + } + throw err; + }), + 'WebDriver.attachToSession()'); + return new WebDriver(session, executor, flow); + } + + /** + * Creates a new WebDriver session. + * + * By default, the requested session `capabilities` are merely "desired" and + * the remote end will still create a new session even if it cannot satisfy + * all of the requested capabilities. You can query which capabilities a + * session actually has using the + * {@linkplain #getCapabilities() getCapabilities()} method on the returned + * WebDriver instance. + * + * To define _required capabilities_, provide the `capabilities` as an object + * literal with `required` and `desired` keys. The `desired` key may be + * omitted if all capabilities are required, and vice versa. If the server + * cannot create a session with all of the required capabilities, it will + * return an {@linkplain error.SessionNotCreatedError}. + * + * let required = new Capabilities().set('browserName', 'firefox'); + * let desired = new Capabilities().set('version', '45'); + * let driver = WebDriver.createSession(executor, {required, desired}); + * + * This function will always return a WebDriver instance. If there is an error + * creating the session, such as the aforementioned SessionNotCreatedError, + * the driver will have a rejected {@linkplain #getSession session} promise. + * It is recommended that this promise is left _unhandled_ so it will + * propagate through the {@linkplain promise.ControlFlow control flow} and + * cause subsequent commands to fail. + * + * let required = Capabilities.firefox(); + * let driver = WebDriver.createSession(executor, {required}); + * + * // If the createSession operation failed, then this command will also + * // also fail, propagating the creation failure. + * driver.get('http://www.google.com').catch(e => console.log(e)); + * + * @param {!command.Executor} executor The executor to create the new session + * with. + * @param {(!Capabilities| + * {desired: (Capabilities|undefined), + * required: (Capabilities|undefined)})} capabilities The desired + * capabilities for the new session. + * @param {promise.ControlFlow=} opt_flow The control flow all driver + * commands should execute under, including the initial session creation. + * Defaults to the {@link promise.controlFlow() currently active} + * control flow. + * @param {(function(this: void): ?)=} opt_onQuit A callback to invoke when + * the newly created session is terminated. This should be used to clean + * up any resources associated with the session. + * @return {!WebDriver} The driver for the newly created session. + */ + static createSession(executor, capabilities, opt_flow, opt_onQuit) { + let flow = opt_flow || promise.controlFlow(); + let cmd = new command.Command(command.Name.NEW_SESSION); + + if (capabilities && (capabilities.desired || capabilities.required)) { + cmd.setParameter('desiredCapabilities', capabilities.desired); + cmd.setParameter('requiredCapabilities', capabilities.required); + } else { + cmd.setParameter('desiredCapabilities', capabilities); + } + + let session = flow.execute( + () => executeCommand(executor, cmd), + 'WebDriver.createSession()'); + if (typeof opt_onQuit === 'function') { + session = session.catch(err => { + return Promise.resolve(opt_onQuit.call(void 0)).then(_ => {throw err;}); + }); + } + return new this(session, executor, flow, opt_onQuit); + } + + /** @override */ + controlFlow() { + return this.flow_; + } + + /** @override */ + schedule(command, description) { + command.setParameter('sessionId', this.session_); + + // If any of the command parameters are rejected promises, those + // rejections may be reported as unhandled before the control flow + // attempts to execute the command. To ensure parameters errors + // propagate through the command itself, we resolve all of the + // command parameters now, but suppress any errors until the ControlFlow + // actually executes the command. This addresses scenarios like catching + // an element not found error in: + // + // driver.findElement(By.id('foo')).click().catch(function(e) { + // if (e instanceof NoSuchElementError) { + // // Do something. + // } + // }); + var prepCommand = toWireValue(command.getParameters()); + prepCommand.catch(function() {}); + + var flow = this.flow_; + var executor = this.executor_; + return flow.execute(() => { + // Retrieve resolved command parameters; any previously suppressed errors + // will now propagate up through the control flow as part of the command + // execution. + return prepCommand.then(function(parameters) { + command.setParameters(parameters); + return executor.execute(command); + }).then(value => fromWireValue(this, value)); + }, description); + } + + /** @override */ + setFileDetector(detector) { + this.fileDetector_ = detector; + } + + /** @override */ + getExecutor() { + return this.executor_; + } + + /** @override */ + getSession() { + return this.session_; + } + + /** @override */ + getCapabilities() { + return this.session_.then(s => s.getCapabilities()); + } + + /** @override */ + quit() { + var result = this.schedule( + new command.Command(command.Name.QUIT), + 'WebDriver.quit()'); + // Delete our session ID when the quit command finishes; this will allow us + // to throw an error when attempting to use a driver post-quit. + return /** @type {!promise.Thenable} */(promise.finally(result, () => { + this.session_ = this.flow_.promise((_, reject) => { + reject(new error.NoSuchSessionError( + 'This driver instance does not have a valid session ID ' + + '(did you call WebDriver.quit()?) and may no longer be used.')); + }); + + // Only want the session rejection to bubble if accessed. + this.session_.catch(function() {}); + + if (this.onQuit_) { + return this.onQuit_.call(void 0); + } + })); + } + + /** @override */ + actions() { + return new actions.ActionSequence(this); + } + + /** @override */ + touchActions() { + return new actions.TouchSequence(this); + } + + /** @override */ + executeScript(script, var_args) { + if (typeof script === 'function') { + script = 'return (' + script + ').apply(null, arguments);'; + } + let args = + arguments.length > 1 ? Array.prototype.slice.call(arguments, 1) : []; + return this.schedule( + new command.Command(command.Name.EXECUTE_SCRIPT). + setParameter('script', script). + setParameter('args', args), + 'WebDriver.executeScript()'); + } + + /** @override */ + executeAsyncScript(script, var_args) { + if (typeof script === 'function') { + script = 'return (' + script + ').apply(null, arguments);'; + } + let args = Array.prototype.slice.call(arguments, 1); + return this.schedule( + new command.Command(command.Name.EXECUTE_ASYNC_SCRIPT). + setParameter('script', script). + setParameter('args', args), + 'WebDriver.executeScript()'); + } + + /** @override */ + call(fn, opt_scope, var_args) { + let args = Array.prototype.slice.call(arguments, 2); + return this.flow_.execute(function() { + return promise.fullyResolved(args).then(function(args) { + if (promise.isGenerator(fn)) { + args.unshift(fn, opt_scope); + return promise.consume.apply(null, args); + } + return fn.apply(opt_scope, args); + }); + }, 'WebDriver.call(' + (fn.name || 'function') + ')'); + } + + /** @override */ + wait(condition, opt_timeout, opt_message) { + if (promise.isPromise(condition)) { + return this.flow_.wait( + /** @type {!IThenable} */(condition), + opt_timeout, opt_message); + } + + var message = opt_message; + var fn = /** @type {!Function} */(condition); + if (condition instanceof Condition) { + message = message || condition.description(); + fn = condition.fn; + } + + if (typeof fn !== 'function') { + throw TypeError( + 'Wait condition must be a promise-like object, function, or a ' + + 'Condition object'); + } + + var driver = this; + var result = this.flow_.wait(function() { + if (promise.isGenerator(fn)) { + return promise.consume(fn, null, [driver]); + } + return fn(driver); + }, opt_timeout, message); + + if (condition instanceof WebElementCondition) { + result = new WebElementPromise(this, result.then(function(value) { + if (!(value instanceof WebElement)) { + throw TypeError( + 'WebElementCondition did not resolve to a WebElement: ' + + Object.prototype.toString.call(value)); + } + return value; + })); + } + return result; + } + + /** @override */ + sleep(ms) { + return this.flow_.timeout(ms, 'WebDriver.sleep(' + ms + ')'); + } + + /** @override */ + getWindowHandle() { + return this.schedule( + new command.Command(command.Name.GET_CURRENT_WINDOW_HANDLE), + 'WebDriver.getWindowHandle()'); + } + + /** @override */ + getAllWindowHandles() { + return this.schedule( + new command.Command(command.Name.GET_WINDOW_HANDLES), + 'WebDriver.getAllWindowHandles()'); + } + + /** @override */ + getPageSource() { + return this.schedule( + new command.Command(command.Name.GET_PAGE_SOURCE), + 'WebDriver.getPageSource()'); + } + + /** @override */ + close() { + return this.schedule(new command.Command(command.Name.CLOSE), + 'WebDriver.close()'); + } + + /** @override */ + get(url) { + return this.navigate().to(url); + } + + /** @override */ + getCurrentUrl() { + return this.schedule( + new command.Command(command.Name.GET_CURRENT_URL), + 'WebDriver.getCurrentUrl()'); + } + + /** @override */ + getTitle() { + return this.schedule(new command.Command(command.Name.GET_TITLE), + 'WebDriver.getTitle()'); + } + + /** @override */ + findElement(locator) { + let id; + locator = by.checkedLocator(locator); + if (typeof locator === 'function') { + id = this.findElementInternal_(locator, this); + } else { + let cmd = new command.Command(command.Name.FIND_ELEMENT). + setParameter('using', locator.using). + setParameter('value', locator.value); + id = this.schedule(cmd, 'WebDriver.findElement(' + locator + ')'); + } + return new WebElementPromise(this, id); + } + + /** + * @param {!Function} locatorFn The locator function to use. + * @param {!(WebDriver|WebElement)} context The search + * context. + * @return {!promise.Thenable} A + * promise that will resolve to a list of WebElements. + * @private + */ + findElementInternal_(locatorFn, context) { + return this.call(() => locatorFn(context)).then(function(result) { + if (Array.isArray(result)) { + result = result[0]; + } + if (!(result instanceof WebElement)) { + throw new TypeError('Custom locator did not return a WebElement'); + } + return result; + }); + } + + /** @override */ + findElements(locator) { + locator = by.checkedLocator(locator); + if (typeof locator === 'function') { + return this.findElementsInternal_(locator, this); + } else { + let cmd = new command.Command(command.Name.FIND_ELEMENTS). + setParameter('using', locator.using). + setParameter('value', locator.value); + return this.schedule(cmd, 'WebDriver.findElements(' + locator + ')') + .then( + (res) => Array.isArray(res) ? res : [], + (e) => { + if (e instanceof error.NoSuchElementError) { + return []; + } + throw e; + }); + } + } + + /** + * @param {!Function} locatorFn The locator function to use. + * @param {!(WebDriver|WebElement)} context The search context. + * @return {!promise.Thenable>} A promise that + * will resolve to an array of WebElements. + * @private + */ + findElementsInternal_(locatorFn, context) { + return this.call(() => locatorFn(context)).then(function(result) { + if (result instanceof WebElement) { + return [result]; + } + + if (!Array.isArray(result)) { + return []; + } + + return result.filter(function(item) { + return item instanceof WebElement; + }); + }); + } + + /** @override */ + takeScreenshot() { + return this.schedule(new command.Command(command.Name.SCREENSHOT), + 'WebDriver.takeScreenshot()'); + } + + /** @override */ + manage() { + return new Options(this); + } + + /** @override */ + navigate() { + return new Navigation(this); + } + + /** @override */ + switchTo() { + return new TargetLocator(this); + } +} + + +/** + * Interface for navigating back and forth in the browser history. + * + * This class should never be instantiated directly. Instead, obtain an instance + * with + * + * webdriver.navigate() + * + * @see WebDriver#navigate() + */ +class Navigation { + /** + * @param {!WebDriver} driver The parent driver. + * @private + */ + constructor(driver) { + /** @private {!WebDriver} */ + this.driver_ = driver; + } + + /** + * Schedules a command to navigate to a new URL. + * @param {string} url The URL to navigate to. + * @return {!promise.Thenable} A promise that will be resolved + * when the URL has been loaded. + */ + to(url) { + return this.driver_.schedule( + new command.Command(command.Name.GET). + setParameter('url', url), + 'WebDriver.navigate().to(' + url + ')'); + } + + /** + * Schedules a command to move backwards in the browser history. + * @return {!promise.Thenable} A promise that will be resolved + * when the navigation event has completed. + */ + back() { + return this.driver_.schedule( + new command.Command(command.Name.GO_BACK), + 'WebDriver.navigate().back()'); + } + + /** + * Schedules a command to move forwards in the browser history. + * @return {!promise.Thenable} A promise that will be resolved + * when the navigation event has completed. + */ + forward() { + return this.driver_.schedule( + new command.Command(command.Name.GO_FORWARD), + 'WebDriver.navigate().forward()'); + } + + /** + * Schedules a command to refresh the current page. + * @return {!promise.Thenable} A promise that will be resolved + * when the navigation event has completed. + */ + refresh() { + return this.driver_.schedule( + new command.Command(command.Name.REFRESH), + 'WebDriver.navigate().refresh()'); + } +} + + +/** + * Provides methods for managing browser and driver state. + * + * This class should never be instantiated directly. Instead, obtain an instance + * with {@linkplain WebDriver#manage() webdriver.manage()}. + */ +class Options { + /** + * @param {!WebDriver} driver The parent driver. + * @private + */ + constructor(driver) { + /** @private {!WebDriver} */ + this.driver_ = driver; + } + + /** + * Schedules a command to add a cookie. + * + * __Sample Usage:__ + * + * // Set a basic cookie. + * driver.manage().addCookie({name: 'foo', value: 'bar'}); + * + * // Set a cookie that expires in 10 minutes. + * let expiry = new Date(Date.now() + (10 * 60 * 1000)); + * driver.manage().addCookie({name: 'foo', value: 'bar', expiry}); + * + * // The cookie expiration may also be specified in seconds since epoch. + * driver.manage().addCookie({ + * name: 'foo', + * value: 'bar', + * expiry: Math.floor(Date.now() / 1000) + * }); + * + * @param {!Options.Cookie} spec Defines the cookie to add. + * @return {!promise.Thenable} A promise that will be resolved + * when the cookie has been added to the page. + * @throws {error.InvalidArgumentError} if any of the cookie parameters are + * invalid. + * @throws {TypeError} if `spec` is not a cookie object. + */ + addCookie({name, value, path, domain, secure, httpOnly, expiry}) { + // We do not allow '=' or ';' in the name. + if (/[;=]/.test(name)) { + throw new error.InvalidArgumentError( + 'Invalid cookie name "' + name + '"'); + } + + // We do not allow ';' in value. + if (/;/.test(value)) { + throw new error.InvalidArgumentError( + 'Invalid cookie value "' + value + '"'); + } + + let cookieString = name + '=' + value + + (domain ? ';domain=' + domain : '') + + (path ? ';path=' + path : '') + + (secure ? ';secure' : ''); + + if (typeof expiry === 'number') { + expiry = Math.floor(expiry); + cookieString += ';expires=' + new Date(expiry * 1000).toUTCString(); + } else if (expiry instanceof Date) { + let date = /** @type {!Date} */(expiry); + expiry = Math.floor(date.getTime() / 1000); + cookieString += ';expires=' + date.toUTCString(); + } + + return this.driver_.schedule( + new command.Command(command.Name.ADD_COOKIE). + setParameter('cookie', { + 'name': name, + 'value': value, + 'path': path, + 'domain': domain, + 'secure': !!secure, + 'httpOnly': !!httpOnly, + 'expiry': expiry + }), + 'WebDriver.manage().addCookie(' + cookieString + ')'); + } + + /** + * Schedules a command to delete all cookies visible to the current page. + * @return {!promise.Thenable} A promise that will be resolved + * when all cookies have been deleted. + */ + deleteAllCookies() { + return this.driver_.schedule( + new command.Command(command.Name.DELETE_ALL_COOKIES), + 'WebDriver.manage().deleteAllCookies()'); + } + + /** + * Schedules a command to delete the cookie with the given name. This command + * is a no-op if there is no cookie with the given name visible to the current + * page. + * @param {string} name The name of the cookie to delete. + * @return {!promise.Thenable} A promise that will be resolved + * when the cookie has been deleted. + */ + deleteCookie(name) { + return this.driver_.schedule( + new command.Command(command.Name.DELETE_COOKIE). + setParameter('name', name), + 'WebDriver.manage().deleteCookie(' + name + ')'); + } + + /** + * Schedules a command to retrieve all cookies visible to the current page. + * Each cookie will be returned as a JSON object as described by the WebDriver + * wire protocol. + * @return {!promise.Thenable>} A promise that will be + * resolved with the cookies visible to the current browsing context. + */ + getCookies() { + return this.driver_.schedule( + new command.Command(command.Name.GET_ALL_COOKIES), + 'WebDriver.manage().getCookies()'); + } + + /** + * Schedules a command to retrieve the cookie with the given name. Returns null + * if there is no such cookie. The cookie will be returned as a JSON object as + * described by the WebDriver wire protocol. + * + * @param {string} name The name of the cookie to retrieve. + * @return {!promise.Thenable} A promise that will be resolved + * with the named cookie, or `null` if there is no such cookie. + */ + getCookie(name) { + return this.getCookies().then(function(cookies) { + for (let cookie of cookies) { + if (cookie && cookie['name'] === name) { + return cookie; + } + } + return null; + }); + } + + /** + * Schedules a command to fetch the timeouts currently configured for the + * current session. + * + * @return {!promise.Thenable<{script: number, + * pageLoad: number, + * implicit: number}>} A promise that will be + * resolved with the timeouts currently configured for the current + * session. + * @see #setTimeouts() + */ + getTimeouts() { + return this.driver_.schedule( + new command.Command(command.Name.GET_TIMEOUT), + `WebDriver.manage().getTimeouts()`) + } + + /** + * Schedules a command to set timeout durations associated with the current + * session. + * + * The following timeouts are supported (all timeouts are specified in + * milliseconds): + * + * - `implicit` specifies the maximum amount of time to wait for an element + * locator to succeed when {@linkplain WebDriver#findElement locating} + * {@linkplain WebDriver#findElements elements} on the page. + * Defaults to 0 milliseconds. + * + * - `pageLoad` specifies the maximum amount of time to wait for a page to + * finishing loading. Defaults to 300000 milliseconds. + * + * - `script` specifies the maximum amount of time to wait for an + * {@linkplain WebDriver#executeScript evaluated script} to run. If set to + * `null`, the script timeout will be indefinite. + * Defaults to 30000 milliseconds. + * + * @param {{script: (number|null|undefined), + * pageLoad: (number|null|undefined), + * implicit: (number|null|undefined)}} conf + * The desired timeout configuration. + * @return {!promise.Thenable} A promise that will be resolved when the + * timeouts have been set. + * @throws {!TypeError} if an invalid options object is provided. + * @see #getTimeouts() + * @see + */ + setTimeouts({script, pageLoad, implicit} = {}) { + let cmd = new command.Command(command.Name.SET_TIMEOUT); + + let valid = false; + function setParam(key, value) { + if (value === null || typeof value === 'number') { + valid = true; + cmd.setParameter(key, value); + } else if (typeof value !== 'undefined') { + throw TypeError( + 'invalid timeouts configuration:' + + ` expected "${key}" to be a number, got ${typeof value}`); + } + } + setParam('implicit', implicit); + setParam('pageLoad', pageLoad); + setParam('script', script); + + if (valid) { + return this.driver_.schedule(cmd, `WebDriver.manage().setTimeouts()`) + .catch(() => { + // Fallback to the legacy method. + let cmds = []; + if (typeof script === 'number') { + cmds.push(legacyTimeout(this.driver_, 'script', script)); + } + if (typeof implicit === 'number') { + cmds.push(legacyTimeout(this.driver_, 'implicit', implicit)); + } + if (typeof pageLoad === 'number') { + cmds.push(legacyTimeout(this.driver_, 'page load', pageLoad)); + } + return Promise.all(cmds); + }); + } + throw TypeError('no timeouts specified'); + } + + /** + * @return {!Logs} The interface for managing driver + * logs. + */ + logs() { + return new Logs(this.driver_); + } + + /** + * @return {!Timeouts} The interface for managing driver timeouts. + * @deprecated Use {@link #setTimeouts()} instead. + */ + timeouts() { + return new Timeouts(this.driver_); + } + + /** + * @return {!Window} The interface for managing the current window. + */ + window() { + return new Window(this.driver_); + } +} + + +/** + * @param {!WebDriver} driver + * @param {string} type + * @param {number} ms + * @return {!promise.Thenable} + */ +function legacyTimeout(driver, type, ms) { + return driver.schedule( + new command.Command(command.Name.SET_TIMEOUT) + .setParameter('type', type) + .setParameter('ms', ms), + `WebDriver.manage().setTimeouts({${type}: ${ms}})`); +} + + + +/** + * A record object describing a browser cookie. + * + * @record + */ +Options.Cookie = function() {}; + + +/** + * The name of the cookie. + * + * @type {string} + */ +Options.Cookie.prototype.name; + + +/** + * The cookie value. + * + * @type {string} + */ +Options.Cookie.prototype.value; + + +/** + * The cookie path. Defaults to "/" when adding a cookie. + * + * @type {(string|undefined)} + */ +Options.Cookie.prototype.path; + + +/** + * The domain the cookie is visible to. Defaults to the current browsing + * context's document's URL when adding a cookie. + * + * @type {(string|undefined)} + */ +Options.Cookie.prototype.domain; + + +/** + * Whether the cookie is a secure cookie. Defaults to false when adding a new + * cookie. + * + * @type {(boolean|undefined)} + */ +Options.Cookie.prototype.secure; + + +/** + * Whether the cookie is an HTTP only cookie. Defaults to false when adding a + * new cookie. + * + * @type {(boolean|undefined)} + */ +Options.Cookie.prototype.httpOnly; + + +/** + * When the cookie expires. + * + * When {@linkplain Options#addCookie() adding a cookie}, this may be specified + * as a {@link Date} object, or in _seconds_ since Unix epoch (January 1, 1970). + * + * The expiry is always returned in seconds since epoch when + * {@linkplain Options#getCookies() retrieving cookies} from the browser. + * + * @type {(!Date|number|undefined)} + */ +Options.Cookie.prototype.expiry; + + +/** + * An interface for managing timeout behavior for WebDriver instances. + * + * This class should never be instantiated directly. Instead, obtain an instance + * with + * + * webdriver.manage().timeouts() + * + * @deprecated This has been deprecated in favor of + * {@link Options#setTimeouts()}, which supports setting multiple timeouts + * at once. + * @see WebDriver#manage() + * @see Options#timeouts() + */ +class Timeouts { + /** + * @param {!WebDriver} driver The parent driver. + * @private + */ + constructor(driver) { + /** @private {!WebDriver} */ + this.driver_ = driver; + } + + /** + * Specifies the amount of time the driver should wait when searching for an + * element if it is not immediately present. + * + * When searching for a single element, the driver should poll the page + * until the element has been found, or this timeout expires before failing + * with a {@link bot.ErrorCode.NO_SUCH_ELEMENT} error. When searching + * for multiple elements, the driver should poll the page until at least one + * element has been found or this timeout has expired. + * + * Setting the wait timeout to 0 (its default value), disables implicit + * waiting. + * + * Increasing the implicit wait timeout should be used judiciously as it + * will have an adverse effect on test run time, especially when used with + * slower location strategies like XPath. + * + * @param {number} ms The amount of time to wait, in milliseconds. + * @return {!promise.Thenable} A promise that will be resolved + * when the implicit wait timeout has been set. + * @deprecated Use {@link Options#setTimeouts() + * driver.manage().setTimeouts({implicit: ms})}. + */ + implicitlyWait(ms) { + return this.driver_.manage().setTimeouts({implicit: ms}); + } + + /** + * Sets the amount of time to wait, in milliseconds, for an asynchronous + * script to finish execution before returning an error. If the timeout is + * less than or equal to 0, the script will be allowed to run indefinitely. + * + * @param {number} ms The amount of time to wait, in milliseconds. + * @return {!promise.Thenable} A promise that will be resolved + * when the script timeout has been set. + * @deprecated Use {@link Options#setTimeouts() + * driver.manage().setTimeouts({script: ms})}. + */ + setScriptTimeout(ms) { + return this.driver_.manage().setTimeouts({script: ms}); + } + + /** + * Sets the amount of time to wait for a page load to complete before + * returning an error. If the timeout is negative, page loads may be + * indefinite. + * + * @param {number} ms The amount of time to wait, in milliseconds. + * @return {!promise.Thenable} A promise that will be resolved + * when the timeout has been set. + * @deprecated Use {@link Options#setTimeouts() + * driver.manage().setTimeouts({pageLoad: ms})}. + */ + pageLoadTimeout(ms) { + return this.driver_.manage().setTimeouts({pageLoad: ms}); + } +} + + +/** + * An interface for managing the current window. + * + * This class should never be instantiated directly. Instead, obtain an instance + * with + * + * webdriver.manage().window() + * + * @see WebDriver#manage() + * @see Options#window() + */ +class Window { + /** + * @param {!WebDriver} driver The parent driver. + * @private + */ + constructor(driver) { + /** @private {!WebDriver} */ + this.driver_ = driver; + } + + /** + * Retrieves the window's current position, relative to the top left corner of + * the screen. + * @return {!promise.Thenable<{x: number, y: number}>} A promise + * that will be resolved with the window's position in the form of a + * {x:number, y:number} object literal. + */ + getPosition() { + return this.driver_.schedule( + new command.Command(command.Name.GET_WINDOW_POSITION). + setParameter('windowHandle', 'current'), + 'WebDriver.manage().window().getPosition()'); + } + + /** + * Repositions the current window. + * @param {number} x The desired horizontal position, relative to the left + * side of the screen. + * @param {number} y The desired vertical position, relative to the top of the + * of the screen. + * @return {!promise.Thenable} A promise that will be resolved + * when the command has completed. + */ + setPosition(x, y) { + return this.driver_.schedule( + new command.Command(command.Name.SET_WINDOW_POSITION). + setParameter('windowHandle', 'current'). + setParameter('x', x). + setParameter('y', y), + 'WebDriver.manage().window().setPosition(' + x + ', ' + y + ')'); + } + + /** + * Retrieves the window's current size. + * @return {!promise.Thenable<{width: number, height: number}>} A + * promise that will be resolved with the window's size in the form of a + * {width:number, height:number} object literal. + */ + getSize() { + return this.driver_.schedule( + new command.Command(command.Name.GET_WINDOW_SIZE). + setParameter('windowHandle', 'current'), + 'WebDriver.manage().window().getSize()'); + } + + /** + * Resizes the current window. + * @param {number} width The desired window width. + * @param {number} height The desired window height. + * @return {!promise.Thenable} A promise that will be resolved + * when the command has completed. + */ + setSize(width, height) { + return this.driver_.schedule( + new command.Command(command.Name.SET_WINDOW_SIZE). + setParameter('windowHandle', 'current'). + setParameter('width', width). + setParameter('height', height), + 'WebDriver.manage().window().setSize(' + width + ', ' + height + ')'); + } + + /** + * Maximizes the current window. + * @return {!promise.Thenable} A promise that will be resolved + * when the command has completed. + */ + maximize() { + return this.driver_.schedule( + new command.Command(command.Name.MAXIMIZE_WINDOW). + setParameter('windowHandle', 'current'), + 'WebDriver.manage().window().maximize()'); + } +} + + +/** + * Interface for managing WebDriver log records. + * + * This class should never be instantiated directly. Instead, obtain an + * instance with + * + * webdriver.manage().logs() + * + * @see WebDriver#manage() + * @see Options#logs() + */ +class Logs { + /** + * @param {!WebDriver} driver The parent driver. + * @private + */ + constructor(driver) { + /** @private {!WebDriver} */ + this.driver_ = driver; + } + + /** + * Fetches available log entries for the given type. + * + * Note that log buffers are reset after each call, meaning that available + * log entries correspond to those entries not yet returned for a given log + * type. In practice, this means that this call will return the available log + * entries since the last call, or from the start of the session. + * + * @param {!logging.Type} type The desired log type. + * @return {!promise.Thenable>} A + * promise that will resolve to a list of log entries for the specified + * type. + */ + get(type) { + let cmd = new command.Command(command.Name.GET_LOG). + setParameter('type', type); + return this.driver_.schedule( + cmd, 'WebDriver.manage().logs().get(' + type + ')'). + then(function(entries) { + return entries.map(function(entry) { + if (!(entry instanceof logging.Entry)) { + return new logging.Entry( + entry['level'], entry['message'], entry['timestamp'], + entry['type']); + } + return entry; + }); + }); + } + + /** + * Retrieves the log types available to this driver. + * @return {!promise.Thenable>} A + * promise that will resolve to a list of available log types. + */ + getAvailableLogTypes() { + return this.driver_.schedule( + new command.Command(command.Name.GET_AVAILABLE_LOG_TYPES), + 'WebDriver.manage().logs().getAvailableLogTypes()'); + } +} + + +/** + * An interface for changing the focus of the driver to another frame or window. + * + * This class should never be instantiated directly. Instead, obtain an + * instance with + * + * webdriver.switchTo() + * + * @see WebDriver#switchTo() + */ +class TargetLocator { + /** + * @param {!WebDriver} driver The parent driver. + * @private + */ + constructor(driver) { + /** @private {!WebDriver} */ + this.driver_ = driver; + } + + /** + * Schedules a command retrieve the {@code document.activeElement} element on + * the current document, or {@code document.body} if activeElement is not + * available. + * @return {!WebElementPromise} The active element. + */ + activeElement() { + var id = this.driver_.schedule( + new command.Command(command.Name.GET_ACTIVE_ELEMENT), + 'WebDriver.switchTo().activeElement()'); + return new WebElementPromise(this.driver_, id); + } + + /** + * Schedules a command to switch focus of all future commands to the topmost + * frame on the page. + * @return {!promise.Thenable} A promise that will be resolved + * when the driver has changed focus to the default content. + */ + defaultContent() { + return this.driver_.schedule( + new command.Command(command.Name.SWITCH_TO_FRAME). + setParameter('id', null), + 'WebDriver.switchTo().defaultContent()'); + } + + /** + * Schedules a command to switch the focus of all future commands to another + * frame on the page. The target frame may be specified as one of the + * following: + * + * - A number that specifies a (zero-based) index into [window.frames]( + * https://developer.mozilla.org/en-US/docs/Web/API/Window.frames). + * - A {@link WebElement} reference, which correspond to a `frame` or `iframe` + * DOM element. + * - The `null` value, to select the topmost frame on the page. Passing `null` + * is the same as calling {@link #defaultContent defaultContent()}. + * + * If the specified frame can not be found, the returned promise will be + * rejected with a {@linkplain error.NoSuchFrameError}. + * + * @param {(number|WebElement|null)} id The frame locator. + * @return {!promise.Thenable} A promise that will be resolved + * when the driver has changed focus to the specified frame. + */ + frame(id) { + return this.driver_.schedule( + new command.Command(command.Name.SWITCH_TO_FRAME). + setParameter('id', id), + 'WebDriver.switchTo().frame(' + id + ')'); + } + + /** + * Schedules a command to switch the focus of all future commands to another + * window. Windows may be specified by their {@code window.name} attribute or + * by its handle (as returned by {@link WebDriver#getWindowHandles}). + * + * If the specified window cannot be found, the returned promise will be + * rejected with a {@linkplain error.NoSuchWindowError}. + * + * @param {string} nameOrHandle The name or window handle of the window to + * switch focus to. + * @return {!promise.Thenable} A promise that will be resolved + * when the driver has changed focus to the specified window. + */ + window(nameOrHandle) { + return this.driver_.schedule( + new command.Command(command.Name.SWITCH_TO_WINDOW). + // "name" supports the legacy drivers. "handle" is the W3C + // compliant parameter. + setParameter('name', nameOrHandle). + setParameter('handle', nameOrHandle), + 'WebDriver.switchTo().window(' + nameOrHandle + ')'); + } + + /** + * Schedules a command to change focus to the active modal dialog, such as + * those opened by `window.alert()`, `window.confirm()`, and + * `window.prompt()`. The returned promise will be rejected with a + * {@linkplain error.NoSuchAlertError} if there are no open alerts. + * + * @return {!AlertPromise} The open alert. + */ + alert() { + var text = this.driver_.schedule( + new command.Command(command.Name.GET_ALERT_TEXT), + 'WebDriver.switchTo().alert()'); + var driver = this.driver_; + return new AlertPromise(driver, text.then(function(text) { + return new Alert(driver, text); + })); + } +} + + +////////////////////////////////////////////////////////////////////////////// +// +// WebElement +// +////////////////////////////////////////////////////////////////////////////// + + +const LEGACY_ELEMENT_ID_KEY = 'ELEMENT'; +const ELEMENT_ID_KEY = 'element-6066-11e4-a52e-4f735466cecf'; + + +/** + * Represents a DOM element. WebElements can be found by searching from the + * document root using a {@link WebDriver} instance, or by searching + * under another WebElement: + * + * driver.get('http://www.google.com'); + * var searchForm = driver.findElement(By.tagName('form')); + * var searchBox = searchForm.findElement(By.name('q')); + * searchBox.sendKeys('webdriver'); + */ +class WebElement { + /** + * @param {!WebDriver} driver the parent WebDriver instance for this element. + * @param {(!IThenable|string)} id The server-assigned opaque ID for + * the underlying DOM element. + */ + constructor(driver, id) { + /** @private {!WebDriver} */ + this.driver_ = driver; + + /** @private {!promise.Thenable} */ + this.id_ = driver.controlFlow().promise(resolve => resolve(id)); + } + + /** + * @param {string} id The raw ID. + * @param {boolean=} opt_noLegacy Whether to exclude the legacy element key. + * @return {!Object} The element ID for use with WebDriver's wire protocol. + */ + static buildId(id, opt_noLegacy) { + return opt_noLegacy + ? {[ELEMENT_ID_KEY]: id} + : {[ELEMENT_ID_KEY]: id, [LEGACY_ELEMENT_ID_KEY]: id}; + } + + /** + * Extracts the encoded WebElement ID from the object. + * + * @param {?} obj The object to extract the ID from. + * @return {string} the extracted ID. + * @throws {TypeError} if the object is not a valid encoded ID. + */ + static extractId(obj) { + if (obj && typeof obj === 'object') { + if (typeof obj[ELEMENT_ID_KEY] === 'string') { + return obj[ELEMENT_ID_KEY]; + } else if (typeof obj[LEGACY_ELEMENT_ID_KEY] === 'string') { + return obj[LEGACY_ELEMENT_ID_KEY]; + } + } + throw new TypeError('object is not a WebElement ID'); + } + + /** + * @param {?} obj the object to test. + * @return {boolean} whether the object is a valid encoded WebElement ID. + */ + static isId(obj) { + return obj && typeof obj === 'object' + && (typeof obj[ELEMENT_ID_KEY] === 'string' + || typeof obj[LEGACY_ELEMENT_ID_KEY] === 'string'); + } + + /** + * Compares two WebElements for equality. + * + * @param {!WebElement} a A WebElement. + * @param {!WebElement} b A WebElement. + * @return {!promise.Thenable} A promise that will be + * resolved to whether the two WebElements are equal. + */ + static equals(a, b) { + if (a === b) { + return a.driver_.controlFlow().promise(resolve => resolve(true)); + } + let ids = [a.getId(), b.getId()]; + return promise.all(ids).then(function(ids) { + // If the two element's have the same ID, they should be considered + // equal. Otherwise, they may still be equivalent, but we'll need to + // ask the server to check for us. + if (ids[0] === ids[1]) { + return true; + } + + let cmd = new command.Command(command.Name.ELEMENT_EQUALS); + cmd.setParameter('id', ids[0]); + cmd.setParameter('other', ids[1]); + return a.driver_.schedule(cmd, 'WebElement.equals()'); + }); + } + + /** @return {!WebDriver} The parent driver for this instance. */ + getDriver() { + return this.driver_; + } + + /** + * @return {!promise.Thenable} A promise that resolves to + * the server-assigned opaque ID assigned to this element. + */ + getId() { + return this.id_; + } + + /** + * @return {!Object} Returns the serialized representation of this WebElement. + */ + [Symbols.serialize]() { + return this.getId().then(WebElement.buildId); + } + + /** + * Schedules a command that targets this element with the parent WebDriver + * instance. Will ensure this element's ID is included in the command + * parameters under the "id" key. + * + * @param {!command.Command} command The command to schedule. + * @param {string} description A description of the command for debugging. + * @return {!promise.Thenable} A promise that will be resolved + * with the command result. + * @template T + * @see WebDriver#schedule + * @private + */ + schedule_(command, description) { + command.setParameter('id', this); + return this.driver_.schedule(command, description); + } + + /** + * Schedule a command to find a descendant of this element. If the element + * cannot be found, the returned promise will be rejected with a + * {@linkplain error.NoSuchElementError NoSuchElementError}. + * + * The search criteria for an element may be defined using one of the static + * factories on the {@link by.By} class, or as a short-hand + * {@link ./by.ByHash} object. For example, the following two statements + * are equivalent: + * + * var e1 = element.findElement(By.id('foo')); + * var e2 = element.findElement({id:'foo'}); + * + * You may also provide a custom locator function, which takes as input this + * instance and returns a {@link WebElement}, or a promise that will resolve + * to a WebElement. If the returned promise resolves to an array of + * WebElements, WebDriver will use the first element. For example, to find the + * first visible link on a page, you could write: + * + * var link = element.findElement(firstVisibleLink); + * + * function firstVisibleLink(element) { + * var links = element.findElements(By.tagName('a')); + * return promise.filter(links, function(link) { + * return link.isDisplayed(); + * }); + * } + * + * @param {!(by.By|Function)} locator The locator strategy to use when + * searching for the element. + * @return {!WebElementPromise} A WebElement that can be used to issue + * commands against the located element. If the element is not found, the + * element will be invalidated and all scheduled commands aborted. + */ + findElement(locator) { + locator = by.checkedLocator(locator); + let id; + if (typeof locator === 'function') { + id = this.driver_.findElementInternal_(locator, this); + } else { + let cmd = new command.Command( + command.Name.FIND_CHILD_ELEMENT). + setParameter('using', locator.using). + setParameter('value', locator.value); + id = this.schedule_(cmd, 'WebElement.findElement(' + locator + ')'); + } + return new WebElementPromise(this.driver_, id); + } + + /** + * Schedules a command to find all of the descendants of this element that + * match the given search criteria. + * + * @param {!(by.By|Function)} locator The locator strategy to use when + * searching for the element. + * @return {!promise.Thenable>} A + * promise that will resolve to an array of WebElements. + */ + findElements(locator) { + locator = by.checkedLocator(locator); + let id; + if (typeof locator === 'function') { + return this.driver_.findElementsInternal_(locator, this); + } else { + var cmd = new command.Command( + command.Name.FIND_CHILD_ELEMENTS). + setParameter('using', locator.using). + setParameter('value', locator.value); + return this.schedule_(cmd, 'WebElement.findElements(' + locator + ')') + .then(result => Array.isArray(result) ? result : []); + } + } + + /** + * Schedules a command to click on this element. + * @return {!promise.Thenable} A promise that will be resolved + * when the click command has completed. + */ + click() { + return this.schedule_( + new command.Command(command.Name.CLICK_ELEMENT), + 'WebElement.click()'); + } + + /** + * Schedules a command to type a sequence on the DOM element represented by + * this instance. + * + * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is + * processed in the key sequence, that key state is toggled until one of the + * following occurs: + * + * - The modifier key is encountered again in the sequence. At this point the + * state of the key is toggled (along with the appropriate keyup/down + * events). + * - The {@link input.Key.NULL} key is encountered in the sequence. When + * this key is encountered, all modifier keys current in the down state are + * released (with accompanying keyup events). The NULL key can be used to + * simulate common keyboard shortcuts: + * + * element.sendKeys("text was", + * Key.CONTROL, "a", Key.NULL, + * "now text is"); + * // Alternatively: + * element.sendKeys("text was", + * Key.chord(Key.CONTROL, "a"), + * "now text is"); + * + * - The end of the key sequence is encountered. When there are no more keys + * to type, all depressed modifier keys are released (with accompanying + * keyup events). + * + * If this element is a file input ({@code }), the + * specified key sequence should specify the path to the file to attach to + * the element. This is analogous to the user clicking "Browse..." and entering + * the path into the file select dialog. + * + * var form = driver.findElement(By.css('form')); + * var element = form.findElement(By.css('input[type=file]')); + * element.sendKeys('/path/to/file.txt'); + * form.submit(); + * + * For uploads to function correctly, the entered path must reference a file + * on the _browser's_ machine, not the local machine running this script. When + * running against a remote Selenium server, a {@link input.FileDetector} + * may be used to transparently copy files to the remote machine before + * attempting to upload them in the browser. + * + * __Note:__ On browsers where native keyboard events are not supported + * (e.g. Firefox on OS X), key events will be synthesized. Special + * punctuation keys will be synthesized according to a standard QWERTY en-us + * keyboard layout. + * + * @param {...(number|string|!IThenable<(number|string)>)} var_args The + * sequence of keys to type. Number keys may be referenced numerically or + * by string (1 or '1'). All arguments will be joined into a single + * sequence. + * @return {!promise.Thenable} A promise that will be resolved + * when all keys have been typed. + */ + sendKeys(var_args) { + let keys = Promise.all(Array.prototype.slice.call(arguments, 0)). + then(keys => { + let ret = []; + keys.forEach(key => { + let type = typeof key; + if (type === 'number') { + key = String(key); + } else if (type !== 'string') { + throw TypeError( + 'each key must be a number of string; got ' + type); + } + + // The W3C protocol requires keys to be specified as an array where + // each element is a single key. + ret.push.apply(ret, key.split('')); + }); + return ret; + }); + + if (!this.driver_.fileDetector_) { + return this.schedule_( + new command.Command(command.Name.SEND_KEYS_TO_ELEMENT). + setParameter('text', keys.then(keys => keys.join(''))). + setParameter('value', keys), + 'WebElement.sendKeys()'); + } + + // Suppress unhandled rejection errors until the flow executes the command. + keys.catch(function() {}); + + var element = this; + return this.getDriver().controlFlow().execute(function() { + return keys.then(function(keys) { + return element.driver_.fileDetector_ + .handleFile(element.driver_, keys.join('')); + }).then(function(keys) { + return element.schedule_( + new command.Command(command.Name.SEND_KEYS_TO_ELEMENT). + setParameter('text', keys). + setParameter('value', keys.split('')), + 'WebElement.sendKeys()'); + }); + }, 'WebElement.sendKeys()'); + } + + /** + * Schedules a command to query for the tag/node name of this element. + * @return {!promise.Thenable} A promise that will be + * resolved with the element's tag name. + */ + getTagName() { + return this.schedule_( + new command.Command(command.Name.GET_ELEMENT_TAG_NAME), + 'WebElement.getTagName()'); + } + + /** + * Schedules a command to query for the computed style of the element + * represented by this instance. If the element inherits the named style from + * its parent, the parent will be queried for its value. Where possible, color + * values will be converted to their hex representation (e.g. #00ff00 instead + * of rgb(0, 255, 0)). + * + * _Warning:_ the value returned will be as the browser interprets it, so + * it may be tricky to form a proper assertion. + * + * @param {string} cssStyleProperty The name of the CSS style property to look + * up. + * @return {!promise.Thenable} A promise that will be + * resolved with the requested CSS value. + */ + getCssValue(cssStyleProperty) { + var name = command.Name.GET_ELEMENT_VALUE_OF_CSS_PROPERTY; + return this.schedule_( + new command.Command(name). + setParameter('propertyName', cssStyleProperty), + 'WebElement.getCssValue(' + cssStyleProperty + ')'); + } + + /** + * Schedules a command to query for the value of the given attribute of the + * element. Will return the current value, even if it has been modified after + * the page has been loaded. More exactly, this method will return the value + * of the given attribute, unless that attribute is not present, in which case + * the value of the property with the same name is returned. If neither value + * is set, null is returned (for example, the "value" property of a textarea + * element). The "style" attribute is converted as best can be to a + * text representation with a trailing semi-colon. The following are deemed to + * be "boolean" attributes and will return either "true" or null: + * + * async, autofocus, autoplay, checked, compact, complete, controls, declare, + * defaultchecked, defaultselected, defer, disabled, draggable, ended, + * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, + * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, + * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, + * selected, spellcheck, truespeed, willvalidate + * + * Finally, the following commonly mis-capitalized attribute/property names + * are evaluated as expected: + * + * - "class" + * - "readonly" + * + * @param {string} attributeName The name of the attribute to query. + * @return {!promise.Thenable} A promise that will be + * resolved with the attribute's value. The returned value will always be + * either a string or null. + */ + getAttribute(attributeName) { + return this.schedule_( + new command.Command(command.Name.GET_ELEMENT_ATTRIBUTE). + setParameter('name', attributeName), + 'WebElement.getAttribute(' + attributeName + ')'); + } + + /** + * Get the visible (i.e. not hidden by CSS) innerText of this element, + * including sub-elements, without any leading or trailing whitespace. + * + * @return {!promise.Thenable} A promise that will be + * resolved with the element's visible text. + */ + getText() { + return this.schedule_( + new command.Command(command.Name.GET_ELEMENT_TEXT), + 'WebElement.getText()'); + } + + /** + * Schedules a command to compute the size of this element's bounding box, in + * pixels. + * @return {!promise.Thenable<{width: number, height: number}>} A + * promise that will be resolved with the element's size as a + * {@code {width:number, height:number}} object. + */ + getSize() { + return this.schedule_( + new command.Command(command.Name.GET_ELEMENT_SIZE), + 'WebElement.getSize()'); + } + + /** + * Schedules a command to compute the location of this element in page space. + * @return {!promise.Thenable<{x: number, y: number}>} A promise that + * will be resolved to the element's location as a + * {@code {x:number, y:number}} object. + */ + getLocation() { + return this.schedule_( + new command.Command(command.Name.GET_ELEMENT_LOCATION), + 'WebElement.getLocation()'); + } + + /** + * Schedules a command to query whether the DOM element represented by this + * instance is enabled, as dictated by the {@code disabled} attribute. + * @return {!promise.Thenable} A promise that will be + * resolved with whether this element is currently enabled. + */ + isEnabled() { + return this.schedule_( + new command.Command(command.Name.IS_ELEMENT_ENABLED), + 'WebElement.isEnabled()'); + } + + /** + * Schedules a command to query whether this element is selected. + * @return {!promise.Thenable} A promise that will be + * resolved with whether this element is currently selected. + */ + isSelected() { + return this.schedule_( + new command.Command(command.Name.IS_ELEMENT_SELECTED), + 'WebElement.isSelected()'); + } + + /** + * Schedules a command to submit the form containing this element (or this + * element if it is a FORM element). This command is a no-op if the element is + * not contained in a form. + * @return {!promise.Thenable} A promise that will be resolved + * when the form has been submitted. + */ + submit() { + return this.schedule_( + new command.Command(command.Name.SUBMIT_ELEMENT), + 'WebElement.submit()'); + } + + /** + * Schedules a command to clear the `value` of this element. This command has + * no effect if the underlying DOM element is neither a text INPUT element + * nor a TEXTAREA element. + * @return {!promise.Thenable} A promise that will be resolved + * when the element has been cleared. + */ + clear() { + return this.schedule_( + new command.Command(command.Name.CLEAR_ELEMENT), + 'WebElement.clear()'); + } + + /** + * Schedules a command to test whether this element is currently displayed. + * @return {!promise.Thenable} A promise that will be + * resolved with whether this element is currently visible on the page. + */ + isDisplayed() { + return this.schedule_( + new command.Command(command.Name.IS_ELEMENT_DISPLAYED), + 'WebElement.isDisplayed()'); + } + + /** + * Take a screenshot of the visible region encompassed by this element's + * bounding rectangle. + * + * @param {boolean=} opt_scroll Optional argument that indicates whether the + * element should be scrolled into view before taking a screenshot. + * Defaults to false. + * @return {!promise.Thenable} A promise that will be + * resolved to the screenshot as a base-64 encoded PNG. + */ + takeScreenshot(opt_scroll) { + var scroll = !!opt_scroll; + return this.schedule_( + new command.Command(command.Name.TAKE_ELEMENT_SCREENSHOT) + .setParameter('scroll', scroll), + 'WebElement.takeScreenshot(' + scroll + ')'); + } +} + + +/** + * WebElementPromise is a promise that will be fulfilled with a WebElement. + * This serves as a forward proxy on WebElement, allowing calls to be + * scheduled without directly on this instance before the underlying + * WebElement has been fulfilled. In other words, the following two statements + * are equivalent: + * + * driver.findElement({id: 'my-button'}).click(); + * driver.findElement({id: 'my-button'}).then(function(el) { + * return el.click(); + * }); + * + * @implements {promise.CancellableThenable} + * @final + */ +class WebElementPromise extends WebElement { + /** + * @param {!WebDriver} driver The parent WebDriver instance for this + * element. + * @param {!promise.Thenable} el A promise + * that will resolve to the promised element. + */ + constructor(driver, el) { + super(driver, 'unused'); + + /** + * Cancel operation is only supported if the wrapped thenable is also + * cancellable. + * @param {(string|Error)=} opt_reason + * @override + */ + this.cancel = function(opt_reason) { + if (promise.CancellableThenable.isImplementation(el)) { + /** @type {!promise.CancellableThenable} */(el).cancel(opt_reason); + } + }; + + /** @override */ + this.then = el.then.bind(el); + + /** @override */ + this.catch = el.catch.bind(el); + + /** + * Defers returning the element ID until the wrapped WebElement has been + * resolved. + * @override + */ + this.getId = function() { + return el.then(function(el) { + return el.getId(); + }); + }; + } +} +promise.CancellableThenable.addImplementation(WebElementPromise); + + +////////////////////////////////////////////////////////////////////////////// +// +// Alert +// +////////////////////////////////////////////////////////////////////////////// + + +/** + * Represents a modal dialog such as {@code alert}, {@code confirm}, or + * {@code prompt}. Provides functions to retrieve the message displayed with + * the alert, accept or dismiss the alert, and set the response text (in the + * case of {@code prompt}). + */ +class Alert { + /** + * @param {!WebDriver} driver The driver controlling the browser this alert + * is attached to. + * @param {string} text The message text displayed with this alert. + */ + constructor(driver, text) { + /** @private {!WebDriver} */ + this.driver_ = driver; + + /** @private {!promise.Thenable} */ + this.text_ = driver.controlFlow().promise(resolve => resolve(text)); + } + + /** + * Retrieves the message text displayed with this alert. For instance, if the + * alert were opened with alert("hello"), then this would return "hello". + * + * @return {!promise.Thenable} A promise that will be + * resolved to the text displayed with this alert. + */ + getText() { + return this.text_; + } + + /** + * Sets the username and password in an alert prompting for credentials (such + * as a Basic HTTP Auth prompt). This method will implicitly + * {@linkplain #accept() submit} the dialog. + * + * @param {string} username The username to send. + * @param {string} password The password to send. + * @return {!promise.Thenable} A promise that will be resolved when this + * command has completed. + */ + authenticateAs(username, password) { + return this.driver_.schedule( + new command.Command(command.Name.SET_ALERT_CREDENTIALS), + 'WebDriver.switchTo().alert()' + + `.authenticateAs("${username}", "${password}")`); + } + + /** + * Accepts this alert. + * + * @return {!promise.Thenable} A promise that will be resolved + * when this command has completed. + */ + accept() { + return this.driver_.schedule( + new command.Command(command.Name.ACCEPT_ALERT), + 'WebDriver.switchTo().alert().accept()'); + } + + /** + * Dismisses this alert. + * + * @return {!promise.Thenable} A promise that will be resolved + * when this command has completed. + */ + dismiss() { + return this.driver_.schedule( + new command.Command(command.Name.DISMISS_ALERT), + 'WebDriver.switchTo().alert().dismiss()'); + } + + /** + * Sets the response text on this alert. This command will return an error if + * the underlying alert does not support response text (e.g. window.alert and + * window.confirm). + * + * @param {string} text The text to set. + * @return {!promise.Thenable} A promise that will be resolved + * when this command has completed. + */ + sendKeys(text) { + return this.driver_.schedule( + new command.Command(command.Name.SET_ALERT_TEXT). + setParameter('text', text), + 'WebDriver.switchTo().alert().sendKeys(' + text + ')'); + } +} + + +/** + * AlertPromise is a promise that will be fulfilled with an Alert. This promise + * serves as a forward proxy on an Alert, allowing calls to be scheduled + * directly on this instance before the underlying Alert has been fulfilled. In + * other words, the following two statements are equivalent: + * + * driver.switchTo().alert().dismiss(); + * driver.switchTo().alert().then(function(alert) { + * return alert.dismiss(); + * }); + * + * @implements {promise.CancellableThenable} + * @final + */ +class AlertPromise extends Alert { + /** + * @param {!WebDriver} driver The driver controlling the browser this + * alert is attached to. + * @param {!promise.Thenable} alert A thenable + * that will be fulfilled with the promised alert. + */ + constructor(driver, alert) { + super(driver, 'unused'); + + /** + * Cancel operation is only supported if the wrapped thenable is also + * cancellable. + * @param {(string|Error)=} opt_reason + * @override + */ + this.cancel = function(opt_reason) { + if (promise.CancellableThenable.isImplementation(alert)) { + /** @type {!promise.CancellableThenable} */(alert).cancel(opt_reason); + } + }; + + /** @override */ + this.then = alert.then.bind(alert); + + /** @override */ + this.catch = alert.catch.bind(alert); + + /** + * Defer returning text until the promised alert has been resolved. + * @override + */ + this.getText = function() { + return alert.then(function(alert) { + return alert.getText(); + }); + }; + + /** + * Defers action until the alert has been located. + * @override + */ + this.authenticateAs = function(username, password) { + return alert.then(function(alert) { + return alert.authenticateAs(username, password); + }); + }; + + /** + * Defers action until the alert has been located. + * @override + */ + this.accept = function() { + return alert.then(function(alert) { + return alert.accept(); + }); + }; + + /** + * Defers action until the alert has been located. + * @override + */ + this.dismiss = function() { + return alert.then(function(alert) { + return alert.dismiss(); + }); + }; + + /** + * Defers action until the alert has been located. + * @override + */ + this.sendKeys = function(text) { + return alert.then(function(alert) { + return alert.sendKeys(text); + }); + }; + } +} +promise.CancellableThenable.addImplementation(AlertPromise); + + +// PUBLIC API + + +module.exports = { + Alert: Alert, + AlertPromise: AlertPromise, + Condition: Condition, + Logs: Logs, + Navigation: Navigation, + Options: Options, + TargetLocator: TargetLocator, + Timeouts: Timeouts, + IWebDriver: IWebDriver, + WebDriver: WebDriver, + WebElement: WebElement, + WebElementCondition: WebElementCondition, + WebElementPromise: WebElementPromise, + Window: Window +}; diff --git a/test-eol-project/node_modules/selenium-webdriver/net/index.js b/test-eol-project/node_modules/selenium-webdriver/net/index.js new file mode 100644 index 00000000..6c193db5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/net/index.js @@ -0,0 +1,117 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var os = require('os'); + + +function getLoInterface() { + var name; + if (process.platform === 'darwin') { + name = 'lo0'; + } else if (process.platform === 'linux') { + name = 'lo'; + } + return name ? os.networkInterfaces()[name] : null; +} + + +/** + * Queries the system network interfaces for an IP address. + * @param {boolean} loopback Whether to find a loopback address. + * @param {string=} opt_family The IP family (IPv4 or IPv6). Defaults to IPv4. + * @return {string} The located IP address or undefined. + */ +function getAddress(loopback, opt_family) { + var family = opt_family || 'IPv4'; + var addresses = []; + + var interfaces; + if (loopback) { + var lo = getLoInterface(); + interfaces = lo ? [lo] : null; + } + interfaces = interfaces || os.networkInterfaces(); + for (var key in interfaces) { + if (!interfaces.hasOwnProperty(key)) { + continue; + } + + interfaces[key].forEach(function(ipAddress) { + if (ipAddress.family === family && + ipAddress.internal === loopback) { + addresses.push(ipAddress.address); + } + }); + } + return addresses[0]; +} + + +// PUBLIC API + + +/** + * Retrieves the external IP address for this host. + * @param {string=} opt_family The IP family to retrieve. Defaults to "IPv4". + * @return {string} The IP address or undefined if not available. + */ +exports.getAddress = function(opt_family) { + return getAddress(false, opt_family); +}; + + +/** + * Retrieves a loopback address for this machine. + * @param {string=} opt_family The IP family to retrieve. Defaults to "IPv4". + * @return {string} The IP address or undefined if not available. + */ +exports.getLoopbackAddress = function(opt_family) { + return getAddress(true, opt_family); +}; + + +/** + * Splits a hostport string, e.g. "www.example.com:80", into its component + * parts. + * + * @param {string} hostport The string to split. + * @return {{host: string, port: ?number}} A host and port. If no port is + * present in the argument `hostport`, port is null. + */ +exports.splitHostAndPort = function(hostport) { + let lastIndex = hostport.lastIndexOf(':'); + if (lastIndex < 0) { + return {host: hostport, port: null}; + } + + let firstIndex = hostport.indexOf(':'); + if (firstIndex != lastIndex && !hostport.includes('[')) { + // Multiple colons but no brackets, so assume the string is an IPv6 address + // with no port (e.g. "1234:5678:9:0:1234:5678:9:0"). + return {host: hostport, port: null}; + } + + let host = hostport.slice(0, lastIndex); + if (host.startsWith('[') && host.endsWith(']')) { + host = host.slice(1, -1); + } + + let port = parseInt(hostport.slice(lastIndex + 1), 10); + return {host, port}; +}; diff --git a/test-eol-project/node_modules/selenium-webdriver/net/portprober.js b/test-eol-project/node_modules/selenium-webdriver/net/portprober.js new file mode 100644 index 00000000..311077b6 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/net/portprober.js @@ -0,0 +1,205 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var exec = require('child_process').exec, + fs = require('fs'), + net = require('net'); + + +/** + * The IANA suggested ephemeral port range. + * @type {{min: number, max: number}} + * @const + * @see http://en.wikipedia.org/wiki/Ephemeral_ports + */ +const DEFAULT_IANA_RANGE = {min: 49152, max: 65535}; + + +/** + * The epheremal port range for the current system. Lazily computed on first + * access. + * @type {Promise.<{min: number, max: number}>} + */ +var systemRange = null; + + +/** + * Computes the ephemeral port range for the current system. This is based on + * http://stackoverflow.com/a/924337. + * @return {!Promise<{min: number, max: number}>} A promise that will resolve to + * the ephemeral port range of the current system. + */ +function findSystemPortRange() { + if (systemRange) { + return systemRange; + } + var range = process.platform === 'win32' ? + findWindowsPortRange() : findUnixPortRange(); + return systemRange = range.catch(function() { + return DEFAULT_IANA_RANGE; + }); +} + + +/** + * Executes a command and returns its output if it succeeds. + * @param {string} cmd The command to execute. + * @return {!Promise} A promise that will resolve with the command's + * stdout data. + */ +function execute(cmd) { + return new Promise((resolve, reject) => { + exec(cmd, function(err, stdout) { + if (err) { + reject(err); + } else { + resolve(stdout); + } + }); + }); +} + + +/** + * Computes the ephemeral port range for a Unix-like system. + * @return {!Promise<{min: number, max: number}>} A promise that will resolve + * with the ephemeral port range on the current system. + */ +function findUnixPortRange() { + var cmd; + if (process.platform === 'sunos') { + cmd = + '/usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port'; + } else if (fs.existsSync('/proc/sys/net/ipv4/ip_local_port_range')) { + // Linux + cmd = 'cat /proc/sys/net/ipv4/ip_local_port_range'; + } else { + cmd = 'sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last' + + ' | sed -e "s/.*:\\s*//"'; + } + + return execute(cmd).then(function(stdout) { + if (!stdout || !stdout.length) return DEFAULT_IANA_RANGE; + var range = stdout.trim().split(/\s+/).map(Number); + if (range.some(isNaN)) return DEFAULT_IANA_RANGE; + return {min: range[0], max: range[1]}; + }); +} + + +/** + * Computes the ephemeral port range for a Windows system. + * @return {!Promise<{min: number, max: number}>} A promise that will resolve + * with the ephemeral port range on the current system. + */ +function findWindowsPortRange() { + // First, check if we're running on XP. If this initial command fails, + // we just fallback on the default IANA range. + return execute('cmd.exe /c ver').then(function(stdout) { + if (/Windows XP/.test(stdout)) { + // TODO: Try to read these values from the registry. + return {min: 1025, max: 5000}; + } else { + return execute('netsh int ipv4 show dynamicport tcp'). + then(function(stdout) { + /* > netsh int ipv4 show dynamicport tcp + Protocol tcp Dynamic Port Range + --------------------------------- + Start Port : 49152 + Number of Ports : 16384 + */ + var range = stdout.split(/\n/).filter(function(line) { + return /.*:\s*\d+/.test(line); + }).map(function(line) { + return Number(line.split(/:\s*/)[1]); + }); + + return { + min: range[0], + max: range[0] + range[1] + }; + }); + } + }); +} + + +/** + * Tests if a port is free. + * @param {number} port The port to test. + * @param {string=} opt_host The bound host to test the {@code port} against. + * Defaults to {@code INADDR_ANY}. + * @return {!Promise} A promise that will resolve with whether the port + * is free. + */ +function isFree(port, opt_host) { + return new Promise((resolve, reject) => { + let server = net.createServer().on('error', function(e) { + if (e.code === 'EADDRINUSE') { + resolve(false); + } else { + reject(e); + } + }); + + server.listen(port, opt_host, function() { + server.close(() => resolve(true)); + }); + }); +} + + +/** + * @param {string=} opt_host The bound host to test the {@code port} against. + * Defaults to {@code INADDR_ANY}. + * @return {!Promise} A promise that will resolve to a free port. If a + * port cannot be found, the promise will be rejected. + */ +function findFreePort(opt_host) { + return findSystemPortRange().then(function(range) { + var attempts = 0; + return new Promise((resolve, reject) => { + findPort(); + + function findPort() { + attempts += 1; + if (attempts > 10) { + reject(Error('Unable to find a free port')); + } + + var port = Math.floor( + Math.random() * (range.max - range.min) + range.min); + isFree(port, opt_host).then(function(isFree) { + if (isFree) { + resolve(port); + } else { + findPort(); + } + }, findPort); + } + }); + }); +} + + +// PUBLIC API + + +exports.findFreePort = findFreePort; +exports.isFree = isFree; diff --git a/test-eol-project/node_modules/selenium-webdriver/opera.js b/test-eol-project/node_modules/selenium-webdriver/opera.js new file mode 100644 index 00000000..3cc06ae6 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/opera.js @@ -0,0 +1,405 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Defines a {@linkplain Driver WebDriver} client for the + * Opera web browser (v26+). Before using this module, you must download the + * latest OperaDriver + * [release](https://github.com/operasoftware/operachromiumdriver/releases) and + * ensure it can be found on your system + * [PATH](http://en.wikipedia.org/wiki/PATH_%28variable%29). + * + * There are three primary classes exported by this module: + * + * 1. {@linkplain ServiceBuilder}: configures the + * {@link selenium-webdriver/remote.DriverService remote.DriverService} + * that manages the + * [OperaDriver](https://github.com/operasoftware/operachromiumdriver) + * child process. + * + * 2. {@linkplain Options}: defines configuration options for each new Opera + * session, such as which {@linkplain Options#setProxy proxy} to use, + * what {@linkplain Options#addExtensions extensions} to install, or + * what {@linkplain Options#addArguments command-line switches} to use when + * starting the browser. + * + * 3. {@linkplain Driver}: the WebDriver client; each new instance will control + * a unique browser session with a clean user profile (unless otherwise + * configured through the {@link Options} class). + * + * By default, every Opera session will use a single driver service, which is + * started the first time a {@link Driver} instance is created and terminated + * when this process exits. The default service will inherit its environment + * from the current process and direct all output to /dev/null. You may obtain + * a handle to this default service using + * {@link #getDefaultService getDefaultService()} and change its configuration + * with {@link #setDefaultService setDefaultService()}. + * + * You may also create a {@link Driver} with its own driver service. This is + * useful if you need to capture the server's log output for a specific session: + * + * var opera = require('selenium-webdriver/opera'); + * + * var service = new opera.ServiceBuilder() + * .loggingTo('/my/log/file.txt') + * .enableVerboseLogging() + * .build(); + * + * var options = new opera.Options(); + * // configure browser options ... + * + * var driver = opera.Driver.createSession(options, service); + * + * Users should only instantiate the {@link Driver} class directly when they + * need a custom driver service configuration (as shown above). For normal + * operation, users should start Opera using the + * {@link selenium-webdriver.Builder}. + */ + +'use strict'; + +const fs = require('fs'); + +const http = require('./http'), + io = require('./io'), + capabilities = require('./lib/capabilities'), + promise = require('./lib/promise'), + Symbols = require('./lib/symbols'), + webdriver = require('./lib/webdriver'), + portprober = require('./net/portprober'), + remote = require('./remote'); + + +/** + * Name of the OperaDriver executable. + * @type {string} + * @const + */ +const OPERADRIVER_EXE = + process.platform === 'win32' ? 'operadriver.exe' : 'operadriver'; + + +/** + * Creates {@link remote.DriverService} instances that manages an + * [OperaDriver](https://github.com/operasoftware/operachromiumdriver) + * server in a child process. + */ +class ServiceBuilder extends remote.DriverService.Builder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the operadriver on the current + * PATH. + * @throws {Error} If provided executable does not exist, or the operadriver + * cannot be found on the PATH. + */ + constructor(opt_exe) { + let exe = opt_exe || io.findInPath(OPERADRIVER_EXE, true); + if (!exe) { + throw Error( + 'The OperaDriver could not be found on the current PATH. Please ' + + 'download the latest version of the OperaDriver from ' + + 'https://github.com/operasoftware/operachromiumdriver/releases and ' + + 'ensure it can be found on your PATH.'); + } + + super(exe); + this.setLoopback(true); + } + + /** + * Sets the path of the log file the driver should log to. If a log file is + * not specified, the driver will log to stderr. + * @param {string} path Path of the log file to use. + * @return {!ServiceBuilder} A self reference. + */ + loggingTo(path) { + return this.addArguments('--log-path=' + path); + } + + /** + * Enables verbose logging. + * @return {!ServiceBuilder} A self reference. + */ + enableVerboseLogging() { + return this.addArguments('--verbose'); + } + + /** + * Silence sthe drivers output. + * @return {!ServiceBuilder} A self reference. + */ + silent() { + return this.addArguments('--silent'); + } +} + + + +/** @type {remote.DriverService} */ +var defaultService = null; + + +/** + * Sets the default service to use for new OperaDriver instances. + * @param {!remote.DriverService} service The service to use. + * @throws {Error} If the default service is currently running. + */ +function setDefaultService(service) { + if (defaultService && defaultService.isRunning()) { + throw Error( + 'The previously configured OperaDriver service is still running. ' + + 'You must shut it down before you may adjust its configuration.'); + } + defaultService = service; +} + + +/** + * Returns the default OperaDriver service. If such a service has not been + * configured, one will be constructed using the default configuration for + * a OperaDriver executable found on the system PATH. + * @return {!remote.DriverService} The default OperaDriver service. + */ +function getDefaultService() { + if (!defaultService) { + defaultService = new ServiceBuilder().build(); + } + return defaultService; +} + + +/** + * @type {string} + * @const + */ +var OPTIONS_CAPABILITY_KEY = 'chromeOptions'; + + +/** + * Class for managing {@linkplain Driver OperaDriver} specific options. + */ +class Options { + constructor() { + /** @private {!Array.} */ + this.args_ = []; + + /** @private {?string} */ + this.binary_ = null; + + /** @private {!Array.<(string|!Buffer)>} */ + this.extensions_ = []; + + /** @private {./lib/logging.Preferences} */ + this.logPrefs_ = null; + + /** @private {?capabilities.ProxyConfig} */ + this.proxy_ = null; + } + + /** + * Extracts the OperaDriver specific options from the given capabilities + * object. + * @param {!capabilities.Capabilities} caps The capabilities object. + * @return {!Options} The OperaDriver options. + */ + static fromCapabilities(caps) { + var options; + var o = caps.get(OPTIONS_CAPABILITY_KEY); + if (o instanceof Options) { + options = o; + } else if (o) { + options = new Options() + .addArguments(o.args || []) + .addExtensions(o.extensions || []) + .setOperaBinaryPath(o.binary); + } else { + options = new Options; + } + + if (caps.has(capabilities.Capability.PROXY)) { + options.setProxy(caps.get(capabilities.Capability.PROXY)); + } + + if (caps.has(capabilities.Capability.LOGGING_PREFS)) { + options.setLoggingPrefs( + caps.get(capabilities.Capability.LOGGING_PREFS)); + } + + return options; + } + + /** + * Add additional command line arguments to use when launching the Opera + * browser. Each argument may be specified with or without the "--" prefix + * (e.g. "--foo" and "foo"). Arguments with an associated value should be + * delimited by an "=": "foo=bar". + * @param {...(string|!Array.)} var_args The arguments to add. + * @return {!Options} A self reference. + */ + addArguments(var_args) { + this.args_ = this.args_.concat.apply(this.args_, arguments); + return this; + } + + /** + * Add additional extensions to install when launching Opera. Each extension + * should be specified as the path to the packed CRX file, or a Buffer for an + * extension. + * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The + * extensions to add. + * @return {!Options} A self reference. + */ + addExtensions(var_args) { + this.extensions_ = this.extensions_.concat.apply( + this.extensions_, arguments); + return this; + } + + /** + * Sets the path to the Opera binary to use. On Mac OS X, this path should + * reference the actual Opera executable, not just the application binary. The + * binary path be absolute or relative to the operadriver server executable, but + * it must exist on the machine that will launch Opera. + * + * @param {string} path The path to the Opera binary to use. + * @return {!Options} A self reference. + */ + setOperaBinaryPath(path) { + this.binary_ = path; + return this; + } + + /** + * Sets the logging preferences for the new session. + * @param {!./lib/logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPrefs(prefs) { + this.logPrefs_ = prefs; + return this; + } + + /** + * Sets the proxy settings for the new session. + * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy) { + this.proxy_ = proxy; + return this; + } + + /** + * Converts this options instance to a {@link capabilities.Capabilities} + * object. + * @param {capabilities.Capabilities=} opt_capabilities The capabilities to + * merge these options into, if any. + * @return {!capabilities.Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities) { + var caps = opt_capabilities || capabilities.Capabilities.opera(); + caps. + set(capabilities.Capability.PROXY, this.proxy_). + set(capabilities.Capability.LOGGING_PREFS, this.logPrefs_). + set(OPTIONS_CAPABILITY_KEY, this); + return caps; + } + + /** + * Converts this instance to its JSON wire protocol representation. Note this + * function is an implementation not intended for general use. + * @return {!Object} The JSON wire protocol representation of this instance. + */ + [Symbols.serialize]() { + var json = { + args: this.args_, + extensions: this.extensions_.map(function(extension) { + if (Buffer.isBuffer(extension)) { + return extension.toString('base64'); + } + return io.read(/** @type {string} */(extension)) + .then(buffer => buffer.toString('base64')); + }) + }; + if (this.binary_) { + json.binary = this.binary_; + } + return json; + } +} + + +/** + * Creates a new WebDriver client for Opera. + */ +class Driver extends webdriver.WebDriver { + /** + * Creates a new session for Opera. + * + * @param {(capabilities.Capabilities|Options)=} opt_config The configuration + * options. + * @param {remote.DriverService=} opt_service The session to use; will use + * the {@link getDefaultService default service} by default. + * @param {promise.ControlFlow=} opt_flow The control flow to use, + * or {@code null} to use the currently active flow. + * @return {!Driver} A new driver instance. + */ + static createSession(opt_config, opt_service, opt_flow) { + var service = opt_service || getDefaultService(); + var client = service.start().then(url => new http.HttpClient(url)); + var executor = new http.Executor(client); + + var caps = + opt_config instanceof Options ? opt_config.toCapabilities() : + (opt_config || capabilities.Capabilities.opera()); + + // On Linux, the OperaDriver does not look for Opera on the PATH, so we + // must explicitly find it. See: operachromiumdriver #9. + if (process.platform === 'linux') { + var options = Options.fromCapabilities(caps); + if (!options.binary_) { + let exe = io.findInPath('opera', true); + if (!exe) { + throw Error( + 'The opera executable could not be found on the current PATH'); + } + options.setOperaBinaryPath(exe); + } + caps = options.toCapabilities(caps); + } + + return /** @type {!Driver} */( + super.createSession(executor, caps, opt_flow)); + } + + /** + * This function is a no-op as file detectors are not supported by this + * implementation. + * @override + */ + setFileDetector() {} +} + + +// PUBLIC API + + +exports.Driver = Driver; +exports.Options = Options; +exports.ServiceBuilder = ServiceBuilder; +exports.getDefaultService = getDefaultService; +exports.setDefaultService = setDefaultService; diff --git a/test-eol-project/node_modules/selenium-webdriver/package.json b/test-eol-project/node_modules/selenium-webdriver/package.json new file mode 100644 index 00000000..d9506121 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/package.json @@ -0,0 +1,42 @@ +{ + "name": "selenium-webdriver", + "version": "3.6.0", + "description": "The official WebDriver JavaScript bindings from the Selenium project", + "license": "Apache-2.0", + "keywords": [ + "automation", + "selenium", + "testing", + "webdriver", + "webdriverjs" + ], + "homepage": "https://github.com/SeleniumHQ/selenium", + "bugs": { + "url": "https://github.com/SeleniumHQ/selenium/issues" + }, + "main": "./index", + "repository": { + "type": "git", + "url": "https://github.com/SeleniumHQ/selenium.git" + }, + "engines": { + "node": ">= 6.9.0" + }, + "dependencies": { + "jszip": "^3.1.3", + "rimraf": "^2.5.4", + "tmp": "0.0.30", + "xml2js": "^0.4.17" + }, + "devDependencies": { + "express": "^4.14.0", + "mocha": "^3.1.2", + "multer": "^1.2.0", + "promises-aplus-tests": "^2.1.2", + "serve-index": "^1.8.0", + "sinon": "^1.17.6" + }, + "scripts": { + "test": "mocha -t 600000 --recursive test" + } +} diff --git a/test-eol-project/node_modules/selenium-webdriver/phantomjs.js b/test-eol-project/node_modules/selenium-webdriver/phantomjs.js new file mode 100644 index 00000000..89720a50 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/phantomjs.js @@ -0,0 +1,282 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Defines a {@linkplain Driver WebDriver} client for the + * PhantomJS web browser. By default, it is expected that the PhantomJS + * executable can be located on your + * [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) + * + * __Using a Custom PhantomJS Binary__ + * + * If you have PhantomJS.exe placed somewhere other than the root of your + * working directory, you can build a custom Capability and attach the + * executable's location to the Capability + * + * For example, if you're using the + * [phantomjs-prebuilt](https://www.npmjs.com/package/phantomjs-prebuilt) module + * from npm: + * + * //setup custom phantomJS capability + * var phantomjs_exe = require('phantomjs-prebuilt').path; + * var customPhantom = selenium.Capabilities.phantomjs(); + * customPhantom.set("phantomjs.binary.path", phantomjs_exe); + * //build custom phantomJS driver + * var driver = new selenium.Builder(). + * withCapabilities(customPhantom). + * build(); + * + */ + +'use strict'; + +const fs = require('fs'); + +const http = require('./http'), + io = require('./io'), + capabilities = require('./lib/capabilities'), + command = require('./lib/command'), + logging = require('./lib/logging'), + promise = require('./lib/promise'), + webdriver = require('./lib/webdriver'), + portprober = require('./net/portprober'), + remote = require('./remote'); + + +/** + * Name of the PhantomJS executable. + * @type {string} + * @const + */ +const PHANTOMJS_EXE = + process.platform === 'win32' ? 'phantomjs.exe' : 'phantomjs'; + + +/** + * Capability that designates the location of the PhantomJS executable to use. + * @type {string} + * @const + */ +const BINARY_PATH_CAPABILITY = 'phantomjs.binary.path'; + + +/** + * Capability that designates the CLI arguments to pass to PhantomJS. + * @type {string} + * @const + */ +const CLI_ARGS_CAPABILITY = 'phantomjs.cli.args'; + + +/** + * Custom command names supported by PhantomJS. + * @enum {string} + */ +const Command = { + EXECUTE_PHANTOM_SCRIPT: 'executePhantomScript' +}; + + +/** + * Finds the PhantomJS executable. + * @param {string=} opt_exe Path to the executable to use. + * @return {string} The located executable. + * @throws {Error} If the executable cannot be found on the PATH, or if the + * provided executable path does not exist. + */ +function findExecutable(opt_exe) { + var exe = opt_exe || io.findInPath(PHANTOMJS_EXE, true); + if (!exe) { + throw Error( + 'The PhantomJS executable could not be found on the current PATH. ' + + 'Please download the latest version from ' + + 'http://phantomjs.org/download.html and ensure it can be found on ' + + 'your PATH. For more information, see ' + + 'https://github.com/ariya/phantomjs/wiki'); + } + if (!fs.existsSync(exe)) { + throw Error('File does not exist: ' + exe); + } + return exe; +} + + +/** + * Maps WebDriver logging level name to those recognised by PhantomJS. + * @const {!Map} + */ +const WEBDRIVER_TO_PHANTOMJS_LEVEL = new Map([ + [logging.Level.ALL.name, 'DEBUG'], + [logging.Level.DEBUG.name, 'DEBUG'], + [logging.Level.INFO.name, 'INFO'], + [logging.Level.WARNING.name, 'WARN'], + [logging.Level.SEVERE.name, 'ERROR']]); + + +/** + * Creates a command executor with support for PhantomJS' custom commands. + * @param {!Promise} url The server's URL. + * @return {!command.Executor} The new command executor. + */ +function createExecutor(url) { + let client = url.then(url => new http.HttpClient(url)); + let executor = new http.Executor(client); + + executor.defineCommand( + Command.EXECUTE_PHANTOM_SCRIPT, + 'POST', '/session/:sessionId/phantom/execute'); + + return executor; +} + +/** + * Creates a new WebDriver client for PhantomJS. + */ +class Driver extends webdriver.WebDriver { + /** + * Creates a new PhantomJS session. + * + * @param {capabilities.Capabilities=} opt_capabilities The desired + * capabilities. + * @param {promise.ControlFlow=} opt_flow The control flow to use, + * or {@code null} to use the currently active flow. + * @param {string=} opt_logFile Path to the log file for the phantomjs + * executable's output. For convenience, this may be set at runtime with + * the `SELENIUM_PHANTOMJS_LOG` environment variable. + * @return {!Driver} A new driver reference. + */ + static createSession(opt_capabilities, opt_flow, opt_logFile) { + // TODO: add an Options class for consistency with the other driver types. + + var caps = opt_capabilities || capabilities.Capabilities.phantomjs(); + var exe = findExecutable(caps.get(BINARY_PATH_CAPABILITY)); + var args = []; + + var logPrefs = caps.get(capabilities.Capability.LOGGING_PREFS); + if (logPrefs instanceof logging.Preferences) { + logPrefs = logPrefs.toJSON(); + } + + if (logPrefs && logPrefs[logging.Type.DRIVER]) { + let level = WEBDRIVER_TO_PHANTOMJS_LEVEL.get( + logPrefs[logging.Type.DRIVER]); + if (level) { + args.push('--webdriver-loglevel=' + level); + } + } + + opt_logFile = process.env['SELENIUM_PHANTOMJS_LOG'] || opt_logFile; + if (typeof opt_logFile === 'string') { + args.push('--webdriver-logfile=' + opt_logFile); + } + + var proxy = caps.get(capabilities.Capability.PROXY); + if (proxy) { + switch (proxy.proxyType) { + case 'manual': + if (proxy.httpProxy) { + args.push( + '--proxy-type=http', + '--proxy=' + proxy.httpProxy); + console.log(args); + } + break; + case 'pac': + throw Error('PhantomJS does not support Proxy PAC files'); + case 'system': + args.push('--proxy-type=system'); + break; + case 'direct': + args.push('--proxy-type=none'); + break; + } + } + args = args.concat(caps.get(CLI_ARGS_CAPABILITY) || []); + + var port = portprober.findFreePort(); + var service = new remote.DriverService(exe, { + port: port, + args: Promise.resolve(port).then(function(port) { + args.push('--webdriver=' + port); + return args; + }) + }); + + var executor = createExecutor(service.start()); + return /** @type {!Driver} */(super.createSession( + executor, caps, opt_flow, () => service.kill())); + } + + /** + * This function is a no-op as file detectors are not supported by this + * implementation. + * @override + */ + setFileDetector() {} + + /** + * Executes a PhantomJS fragment. This method is similar to + * {@link #executeScript}, except it exposes the + * PhantomJS API to the injected + * script. + * + *

    The injected script will execute in the context of PhantomJS's + * {@code page} variable. If a page has not been loaded before calling this + * method, one will be created.

    + * + *

    Be sure to wrap callback definitions in a try/catch block, as failures + * may cause future WebDriver calls to fail.

    + * + *

    Certain callbacks are used by GhostDriver (the PhantomJS WebDriver + * implementation) and overriding these may cause the script to fail. It is + * recommended that you check for existing callbacks before defining your own. + *

    + * + * As with {@link #executeScript}, the injected script may be defined as + * a string for an anonymous function body (e.g. "return 123;"), or as a + * function. If a function is provided, it will be decompiled to its original + * source. Note that injecting functions is provided as a convenience to + * simplify defining complex scripts. Care must be taken that the function + * only references variables that will be defined in the page's scope and + * that the function does not override {@code Function.prototype.toString} + * (overriding toString() will interfere with how the function is + * decompiled. + * + * @param {(string|!Function)} script The script to execute. + * @param {...*} var_args The arguments to pass to the script. + * @return {!promise.Thenable} A promise that resolve to the + * script's return value. + * @template T + */ + executePhantomJS(script, var_args) { + if (typeof script === 'function') { + script = 'return (' + script + ').apply(this, arguments);'; + } + var args = arguments.length > 1 + ? Array.prototype.slice.call(arguments, 1) : []; + return this.schedule( + new command.Command(Command.EXECUTE_PHANTOM_SCRIPT) + .setParameter('script', script) + .setParameter('args', args), + 'Driver.executePhantomJS()'); + } +} + + +// PUBLIC API + +exports.Driver = Driver; diff --git a/test-eol-project/node_modules/selenium-webdriver/proxy.js b/test-eol-project/node_modules/selenium-webdriver/proxy.js new file mode 100644 index 00000000..80e52a7a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/proxy.js @@ -0,0 +1,32 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Proxy module alias. + * + * var webdriver = require('selenium-webdriver'), + * proxy = require('selenium-webdriver/proxy'); + * + * var driver = new webdriver.Builder() + * .withCapabilities(webdriver.Capabilities.chrome()) + * .setProxy(proxy.manual({http: 'host:1234'})) + * .build(); + */ + +'use strict'; + +module.exports = require('./lib/proxy'); diff --git a/test-eol-project/node_modules/selenium-webdriver/remote/index.js b/test-eol-project/node_modules/selenium-webdriver/remote/index.js new file mode 100644 index 00000000..04f0e13f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/remote/index.js @@ -0,0 +1,604 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const url = require('url'); +const util = require('util'); + +const httpUtil = require('../http/util'); +const io = require('../io'); +const exec = require('../io/exec'); +const {Zip} = require('../io/zip'); +const cmd = require('../lib/command'); +const input = require('../lib/input'); +const promise = require('../lib/promise'); +const webdriver = require('../lib/webdriver'); +const net = require('../net'); +const portprober = require('../net/portprober'); + + +/** + * @typedef {(string|!Array)} + */ +var StdIoOptions; + + +/** + * @typedef {(string|!IThenable)} + */ +var CommandLineFlag; + + +/** + * A record object that defines the configuration options for a DriverService + * instance. + * + * @record + */ +function ServiceOptions() {} + +/** + * Whether the service should only be accessed on this host's loopback address. + * + * @type {(boolean|undefined)} + */ +ServiceOptions.prototype.loopback; + +/** + * The host name to access the server on. If this option is specified, the + * {@link #loopback} option will be ignored. + * + * @type {(string|undefined)} + */ +ServiceOptions.prototype.hostname; + +/** + * The port to start the server on (must be > 0). If the port is provided as a + * promise, the service will wait for the promise to resolve before starting. + * + * @type {(number|!IThenable)} + */ +ServiceOptions.prototype.port; + +/** + * The arguments to pass to the service. If a promise is provided, the service + * will wait for it to resolve before starting. + * + * @type {!(Array|IThenable>)} + */ +ServiceOptions.prototype.args; + +/** + * The base path on the server for the WebDriver wire protocol (e.g. '/wd/hub'). + * Defaults to '/'. + * + * @type {(string|undefined|null)} + */ +ServiceOptions.prototype.path; + +/** + * The environment variables that should be visible to the server process. + * Defaults to inheriting the current process's environment. + * + * @type {(Object|undefined)} + */ +ServiceOptions.prototype.env; + +/** + * IO configuration for the spawned server process. For more information, refer + * to the documentation of `child_process.spawn`. + * + * @type {(StdIoOptions|undefined)} + * @see https://nodejs.org/dist/latest-v4.x/docs/api/child_process.html#child_process_options_stdio + */ +ServiceOptions.prototype.stdio; + + +/** + * Manages the life and death of a native executable WebDriver server. + * + * It is expected that the driver server implements the + * https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. + * Furthermore, the managed server should support multiple concurrent sessions, + * so that this class may be reused for multiple clients. + */ +class DriverService { + /** + * @param {string} executable Path to the executable to run. + * @param {!ServiceOptions} options Configuration options for the service. + */ + constructor(executable, options) { + /** @private {string} */ + this.executable_ = executable; + + /** @private {boolean} */ + this.loopbackOnly_ = !!options.loopback; + + /** @private {(string|undefined)} */ + this.hostname_ = options.hostname; + + /** @private {(number|!IThenable)} */ + this.port_ = options.port; + + /** + * @private {!(Array| + * IThenable>)} + */ + this.args_ = options.args; + + /** @private {string} */ + this.path_ = options.path || '/'; + + /** @private {!Object} */ + this.env_ = options.env || process.env; + + /** + * @private {(string|!Array)} + */ + this.stdio_ = options.stdio || 'ignore'; + + /** + * A promise for the managed subprocess, or null if the server has not been + * started yet. This promise will never be rejected. + * @private {Promise} + */ + this.command_ = null; + + /** + * Promise that resolves to the server's address or null if the server has + * not been started. This promise will be rejected if the server terminates + * before it starts accepting WebDriver requests. + * @private {Promise} + */ + this.address_ = null; + } + + /** + * @return {!Promise} A promise that resolves to the server's address. + * @throws {Error} If the server has not been started. + */ + address() { + if (this.address_) { + return this.address_; + } + throw Error('Server has not been started.'); + } + + /** + * Returns whether the underlying process is still running. This does not take + * into account whether the process is in the process of shutting down. + * @return {boolean} Whether the underlying service process is running. + */ + isRunning() { + return !!this.address_; + } + + /** + * Starts the server if it is not already running. + * @param {number=} opt_timeoutMs How long to wait, in milliseconds, for the + * server to start accepting requests. Defaults to 30 seconds. + * @return {!Promise} A promise that will resolve to the server's base + * URL when it has started accepting requests. If the timeout expires + * before the server has started, the promise will be rejected. + */ + start(opt_timeoutMs) { + if (this.address_) { + return this.address_; + } + + var timeout = opt_timeoutMs || DriverService.DEFAULT_START_TIMEOUT_MS; + var self = this; + + let resolveCommand; + this.command_ = new Promise(resolve => resolveCommand = resolve); + + this.address_ = new Promise((resolveAddress, rejectAddress) => { + resolveAddress(Promise.resolve(this.port_).then(port => { + if (port <= 0) { + throw Error('Port must be > 0: ' + port); + } + + return resolveCommandLineFlags(this.args_).then(args => { + var command = exec(self.executable_, { + args: args, + env: self.env_, + stdio: self.stdio_ + }); + + resolveCommand(command); + + var earlyTermination = command.result().then(function(result) { + var error = result.code == null ? + Error('Server was killed with ' + result.signal) : + Error('Server terminated early with status ' + result.code); + rejectAddress(error); + self.address_ = null; + self.command_ = null; + throw error; + }); + + var hostname = self.hostname_; + if (!hostname) { + hostname = !self.loopbackOnly_ && net.getAddress() + || net.getLoopbackAddress(); + } + + var serverUrl = url.format({ + protocol: 'http', + hostname: hostname, + port: port + '', + pathname: self.path_ + }); + + return new Promise((fulfill, reject) => { + let cancelToken = + earlyTermination.catch(e => reject(Error(e.message))); + + httpUtil.waitForServer(serverUrl, timeout, cancelToken) + .then(_ => fulfill(serverUrl), err => { + if (err instanceof promise.CancellationError) { + fulfill(serverUrl); + } else { + reject(err); + } + }); + }); + }); + })); + }); + + return this.address_; + } + + /** + * Stops the service if it is not currently running. This function will kill + * the server immediately. To synchronize with the active control flow, use + * {@link #stop()}. + * @return {!Promise} A promise that will be resolved when the server has been + * stopped. + */ + kill() { + if (!this.address_ || !this.command_) { + return Promise.resolve(); // Not currently running. + } + let cmd = this.command_; + this.address_ = null; + this.command_ = null; + return cmd.then(c => c.kill('SIGTERM')); + } + + /** + * Schedules a task in the current control flow to stop the server if it is + * currently running. + * @return {!promise.Thenable} A promise that will be resolved when + * the server has been stopped. + */ + stop() { + return promise.controlFlow().execute(this.kill.bind(this)); + } +} + + +/** + * @param {!(Array|IThenable>)} args + * @return {!Promise>} + */ +function resolveCommandLineFlags(args) { + // Resolve the outer array, then the individual flags. + return Promise.resolve(args) + .then(/** !Array */args => Promise.all(args)); +} + + +/** + * The default amount of time, in milliseconds, to wait for the server to + * start. + * @const {number} + */ +DriverService.DEFAULT_START_TIMEOUT_MS = 30 * 1000; + + +/** + * Creates {@link DriverService} objects that manage a WebDriver server in a + * child process. + */ +DriverService.Builder = class { + /** + * @param {string} exe Path to the executable to use. This executable must + * accept the `--port` flag for defining the port to start the server on. + * @throws {Error} If the provided executable path does not exist. + */ + constructor(exe) { + if (!fs.existsSync(exe)) { + throw Error(`The specified executable path does not exist: ${exe}`); + } + + /** @private @const {string} */ + this.exe_ = exe; + + /** @private {!ServiceOptions} */ + this.options_ = { + args: [], + port: 0, + env: null, + stdio: 'ignore' + }; + } + + /** + * Define additional command line arguments to use when starting the server. + * + * @param {...CommandLineFlag} var_args The arguments to include. + * @return {!THIS} A self reference. + * @this {THIS} + * @template THIS + */ + addArguments(var_args) { + let args = Array.prototype.slice.call(arguments, 0); + this.options_.args = this.options_.args.concat(args); + return this; + } + + /** + * Sets the host name to access the server on. If specified, the + * {@linkplain #setLoopback() loopback} setting will be ignored. + * + * @param {string} hostname + * @return {!DriverService.Builder} A self reference. + */ + setHostname(hostname) { + this.options_.hostname = hostname; + return this; + } + + /** + * Sets whether the service should be accessed at this host's loopback + * address. + * + * @param {boolean} loopback + * @return {!DriverService.Builder} A self reference. + */ + setLoopback(loopback) { + this.options_.loopback = loopback; + return this; + } + + /** + * Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). + * By default, the driver will accept commands relative to "/". + * + * @param {?string} basePath The base path to use, or `null` to use the + * default. + * @return {!DriverService.Builder} A self reference. + */ + setPath(basePath) { + this.options_.path = basePath; + return this; + } + + /** + * Sets the port to start the server on. + * + * @param {number} port The port to use, or 0 for any free port. + * @return {!DriverService.Builder} A self reference. + * @throws {Error} If an invalid port is specified. + */ + setPort(port) { + if (port < 0) { + throw Error(`port must be >= 0: ${port}`); + } + this.options_.port = port; + return this; + } + + /** + * Defines the environment to start the server under. This setting will be + * inherited by every browser session started by the server. By default, the + * server will inherit the enviroment of the current process. + * + * @param {(Map|Object|null)} env The desired + * environment to use, or `null` if the server should inherit the + * current environment. + * @return {!DriverService.Builder} A self reference. + */ + setEnvironment(env) { + if (env instanceof Map) { + let tmp = {}; + env.forEach((value, key) => tmp[key] = value); + env = tmp; + } + this.options_.env = env; + return this; + } + + /** + * IO configuration for the spawned server process. For more information, + * refer to the documentation of `child_process.spawn`. + * + * @param {StdIoOptions} config The desired IO configuration. + * @return {!DriverService.Builder} A self reference. + * @see https://nodejs.org/dist/latest-v4.x/docs/api/child_process.html#child_process_options_stdio + */ + setStdio(config) { + this.options_.stdio = config; + return this; + } + + /** + * Creates a new DriverService using this instance's current configuration. + * + * @return {!DriverService} A new driver service. + */ + build() { + let port = this.options_.port || portprober.findFreePort(); + let args = Promise.resolve(port).then(port => { + return this.options_.args.concat('--port=' + port); + }); + + let options = + /** @type {!ServiceOptions} */ + (Object.assign({}, this.options_, {args, port})); + return new DriverService(this.exe_, options); + } +}; + + +/** + * Manages the life and death of the + * + * standalone Selenium server. + */ +class SeleniumServer extends DriverService { + /** + * @param {string} jar Path to the Selenium server jar. + * @param {SeleniumServer.Options=} opt_options Configuration options for the + * server. + * @throws {Error} If the path to the Selenium jar is not specified or if an + * invalid port is specified. + */ + constructor(jar, opt_options) { + if (!jar) { + throw Error('Path to the Selenium jar not specified'); + } + + var options = opt_options || {}; + + if (options.port < 0) { + throw Error('Port must be >= 0: ' + options.port); + } + + let port = options.port || portprober.findFreePort(); + let args = Promise.all([port, options.jvmArgs || [], options.args || []]) + .then(resolved => { + let port = resolved[0]; + let jvmArgs = resolved[1]; + let args = resolved[2]; + return jvmArgs.concat('-jar', jar, '-port', port).concat(args); + }); + + let java = 'java'; + if (process.env['JAVA_HOME']) { + java = path.join(process.env['JAVA_HOME'], 'bin/java'); + } + + super(java, { + loopback: options.loopback, + port: port, + args: args, + path: '/wd/hub', + env: options.env, + stdio: options.stdio + }); + } +} + + +/** + * Options for the Selenium server: + * + * - `loopback` - Whether the server should only be accessed on this host's + * loopback address. + * - `port` - The port to start the server on (must be > 0). If the port is + * provided as a promise, the service will wait for the promise to resolve + * before starting. + * - `args` - The arguments to pass to the service. If a promise is provided, + * the service will wait for it to resolve before starting. + * - `jvmArgs` - The arguments to pass to the JVM. If a promise is provided, + * the service will wait for it to resolve before starting. + * - `env` - The environment variables that should be visible to the server + * process. Defaults to inheriting the current process's environment. + * - `stdio` - IO configuration for the spawned server process. For more + * information, refer to the documentation of `child_process.spawn`. + * + * @typedef {{ + * loopback: (boolean|undefined), + * port: (number|!promise.Promise), + * args: !(Array|promise.Promise>), + * jvmArgs: (!Array| + * !promise.Promise>| + * undefined), + * env: (!Object|undefined), + * stdio: (string|!Array| + * undefined) + * }} + */ +SeleniumServer.Options; + + + +/** + * A {@link webdriver.FileDetector} that may be used when running + * against a remote + * [Selenium server](http://selenium-release.storage.googleapis.com/index.html). + * + * When a file path on the local machine running this script is entered with + * {@link webdriver.WebElement#sendKeys WebElement#sendKeys}, this file detector + * will transfer the specified file to the Selenium server's host; the sendKeys + * command will be updated to use the transfered file's path. + * + * __Note:__ This class depends on a non-standard command supported on the + * Java Selenium server. The file detector will fail if used with a server that + * only supports standard WebDriver commands (such as the ChromeDriver). + * + * @final + */ +class FileDetector extends input.FileDetector { + /** + * Prepares a `file` for use with the remote browser. If the provided path + * does not reference a normal file (i.e. it does not exist or is a + * directory), then the promise returned by this method will be resolved with + * the original file path. Otherwise, this method will upload the file to the + * remote server, which will return the file's path on the remote system so + * it may be referenced in subsequent commands. + * + * @override + */ + handleFile(driver, file) { + return io.stat(file).then(function(stats) { + if (stats.isDirectory()) { + return file; // Not a valid file, return original input. + } + + let zip = new Zip; + return zip.addFile(file) + .then(() => zip.toBuffer()) + .then(buf => buf.toString('base64')) + .then(encodedZip => { + let command = new cmd.Command(cmd.Name.UPLOAD_FILE) + .setParameter('file', encodedZip); + return driver.schedule(command, + 'remote.FileDetector.handleFile(' + file + ')'); + }); + }, function(err) { + if (err.code === 'ENOENT') { + return file; // Not a file; return original input. + } + throw err; + }); + } +} + + +// PUBLIC API + +exports.DriverService = DriverService; +exports.FileDetector = FileDetector; +exports.SeleniumServer = SeleniumServer; +exports.ServiceOptions = ServiceOptions; // Exported for API docs. diff --git a/test-eol-project/node_modules/selenium-webdriver/safari.js b/test-eol-project/node_modules/selenium-webdriver/safari.js new file mode 100644 index 00000000..38c10544 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/safari.js @@ -0,0 +1,264 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Defines a WebDriver client for Safari. + */ + +'use strict'; + +const http = require('./http'); +const io = require('./io'); +const {Capabilities, Capability} = require('./lib/capabilities'); +const command = require('./lib/command'); +const error = require('./lib/error'); +const logging = require('./lib/logging'); +const promise = require('./lib/promise'); +const Symbols = require('./lib/symbols'); +const webdriver = require('./lib/webdriver'); +const portprober = require('./net/portprober'); +const remote = require('./remote'); + + +/** + * @return {string} . + * @throws {Error} + */ +function findSafariDriver() { + let exe = io.findInPath('safaridriver', true); + if (!exe) { + throw Error( + `The safaridriver executable could not be found on the current PATH. + Please ensure you are using Safari 10.0 or above.`); + } + return exe; +} + + +/** + * Creates {@link selenium-webdriver/remote.DriverService} instances that manage + * a [safaridriver] server in a child process. + * + * [safaridriver]: https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html#//apple_ref/doc/uid/TP40014305-CH11-DontLinkElementID_28 + */ +class ServiceBuilder extends remote.DriverService.Builder { + /** + * @param {string=} opt_exe Path to the server executable to use. If omitted, + * the builder will attempt to locate the safaridriver on the system PATH. + */ + constructor(opt_exe) { + super(opt_exe || findSafariDriver()); + this.setLoopback(true); // Required. + } +} + + +const OPTIONS_CAPABILITY_KEY = 'safari.options'; +const TECHNOLOGY_PREVIEW_OPTIONS_KEY = 'technologyPreview'; + +/** + * Configuration options specific to the {@link Driver SafariDriver}. + */ +class Options { + constructor() { + /** @private {Object} */ + this.options_ = null; + + /** @private {./lib/logging.Preferences} */ + this.logPrefs_ = null; + + /** @private {?./lib/capabilities.ProxyConfig} */ + this.proxy_ = null; + } + + /** + * Extracts the SafariDriver specific options from the given capabilities + * object. + * @param {!Capabilities} capabilities The capabilities object. + * @return {!Options} The SafariDriver options. + */ + static fromCapabilities(capabilities) { + var options = new Options(); + var o = capabilities.get(OPTIONS_CAPABILITY_KEY); + + if (o instanceof Options) { + options = o; + } else if (o) { + options.setCleanSession(o.cleanSession); + options.setTechnologyPreview(o[TECHNOLOGY_PREVIEW_OPTIONS_KEY]); + } + + if (capabilities.has(Capability.PROXY)) { + options.setProxy(capabilities.get(Capability.PROXY)); + } + + if (capabilities.has(Capability.LOGGING_PREFS)) { + options.setLoggingPrefs(capabilities.get(Capability.LOGGING_PREFS)); + } + + return options; + } + + /** + * Sets whether to force Safari to start with a clean session. Enabling this + * option will cause all global browser data to be deleted. + * @param {boolean} clean Whether to make sure the session has no cookies, + * cache entries, local storage, or databases. + * @return {!Options} A self reference. + */ + setCleanSession(clean) { + if (!this.options_) { + this.options_ = {}; + } + this.options_['cleanSession'] = clean; + return this; + } + + /** + * Sets the logging preferences for the new session. + * @param {!./lib/logging.Preferences} prefs The logging preferences. + * @return {!Options} A self reference. + */ + setLoggingPrefs(prefs) { + this.logPrefs_ = prefs; + return this; + } + + /** + * Sets the proxy to use. + * + * @param {./lib/capabilities.ProxyConfig} proxy The proxy configuration to use. + * @return {!Options} A self reference. + */ + setProxy(proxy) { + this.proxy_ = proxy; + return this; + } + + /** + * Instruct the SafariDriver to use the Safari Technology Preview if true. + * Otherwise, use the release version of Safari. Defaults to using the release version of Safari. + * + * @param {boolean} useTechnologyPreview + * @return {!Options} A self reference. + */ + setTechnologyPreview(useTechnologyPreview) { + if (!this.options_) { + this.options_ = {}; + } + + this.options_[TECHNOLOGY_PREVIEW_OPTIONS_KEY] = !!useTechnologyPreview; + return this; + } + + /** + * Converts this options instance to a {@link Capabilities} object. + * @param {Capabilities=} opt_capabilities The capabilities to + * merge these options into, if any. + * @return {!Capabilities} The capabilities. + */ + toCapabilities(opt_capabilities) { + var caps = opt_capabilities || Capabilities.safari(); + if (this.logPrefs_) { + caps.set(Capability.LOGGING_PREFS, this.logPrefs_); + } + if (this.proxy_) { + caps.set(Capability.PROXY, this.proxy_); + } + if (this.options_) { + caps.set(OPTIONS_CAPABILITY_KEY, this); + } + return caps; + } + + /** + * Converts this instance to its JSON wire protocol representation. Note this + * function is an implementation detail not intended for general use. + * @return {!Object} The JSON wire protocol representation of this + * instance. + */ + [Symbols.serialize]() { + return this.options_ || {}; + } +} + +/** + * @param {(Options|Object)=} o The options object + * @return {boolean} + */ +function useTechnologyPreview(o) { + if (o instanceof Options) { + return !!(o.options_ && o.options_[TECHNOLOGY_PREVIEW_OPTIONS_KEY]); + } + + if (o && typeof o === 'object') { + return !!o[TECHNOLOGY_PREVIEW_OPTIONS_KEY]; + } + + return false; +} + +const SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE = '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'; + +/** + * A WebDriver client for Safari. This class should never be instantiated + * directly; instead, use the {@linkplain ./builder.Builder Builder}: + * + * var driver = new Builder() + * .forBrowser('safari') + * .build(); + * + */ +class Driver extends webdriver.WebDriver { + /** + * Creates a new Safari session. + * + * @param {(Options|Capabilities)=} opt_config The configuration + * options for the new session. + * @param {promise.ControlFlow=} opt_flow The control flow to create + * the driver under. + * @return {!Driver} A new driver instance. + */ + static createSession(opt_config, opt_flow) { + let caps, exe; + + if (opt_config instanceof Options) { + caps = opt_config.toCapabilities(); + } else { + caps = opt_config || Capabilities.safari(); + } + + if (useTechnologyPreview(caps.get(OPTIONS_CAPABILITY_KEY))) { + exe = SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE; + } + + let service = new ServiceBuilder(exe).build(); + let executor = new http.Executor( + service.start().then(url => new http.HttpClient(url))); + + return /** @type {!Driver} */(super.createSession( + executor, caps, opt_flow, () => service.kill())); + } +} + + +// Public API + + +exports.Driver = Driver; +exports.Options = Options; +exports.ServiceBuilder = ServiceBuilder; diff --git a/test-eol-project/node_modules/selenium-webdriver/test/actions_test.js b/test-eol-project/node_modules/selenium-webdriver/test/actions_test.js new file mode 100644 index 00000000..ef218f7d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/actions_test.js @@ -0,0 +1,52 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var Browser = require('..').Browser, + By = require('..').By, + until = require('..').until, + test = require('../lib/test'), + fileServer = require('../lib/test/fileserver'); + + +test.suite(function(env) { + var driver; + test.beforeEach(function*() { driver = yield env.builder().build(); }); + test.afterEach(function() { return driver.quit(); }); + + test.ignore( + env.browsers(Browser.FIREFOX, Browser.PHANTOM_JS, Browser.SAFARI)). + describe('WebDriver.actions()', function() { + + test.it('can move to and click element in an iframe', function*() { + yield driver.get(fileServer.whereIs('click_tests/click_in_iframe.html')); + + yield driver.wait(until.elementLocated(By.id('ifr')), 5000) + .then(frame => driver.switchTo().frame(frame)); + + let link = yield driver.findElement(By.id('link')); + yield driver.actions() + .mouseMove(link) + .click() + .perform(); + + return driver.wait(until.titleIs('Submitted Successfully!'), 5000); + }); + + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js b/test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js new file mode 100644 index 00000000..d36a044e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js @@ -0,0 +1,227 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fs = require('fs'); + +var webdriver = require('../..'), + chrome = require('../../chrome'), + symbols = require('../../lib/symbols'), + proxy = require('../../proxy'), + assert = require('../../testing/assert'); + +var test = require('../../lib/test'); + + +describe('chrome.Options', function() { + describe('fromCapabilities', function() { + + it('should return a new Options instance if none were defined', + function() { + var options = chrome.Options.fromCapabilities( + new webdriver.Capabilities()); + assert(options).instanceOf(chrome.Options); + }); + + it('should return options instance if present', function() { + var options = new chrome.Options(); + var caps = options.toCapabilities(); + assert(caps).instanceOf(webdriver.Capabilities); + assert(chrome.Options.fromCapabilities(caps)).equalTo(options); + }); + + it('should rebuild options from wire representation', function() { + var expectedExtension = fs.readFileSync(__filename, 'base64'); + var caps = webdriver.Capabilities.chrome().set('chromeOptions', { + args: ['a', 'b'], + extensions: [__filename], + binary: 'binaryPath', + logPath: 'logFilePath', + detach: true, + localState: 'localStateValue', + prefs: 'prefsValue' + }); + + var options = chrome.Options.fromCapabilities(caps); + var json = options[symbols.serialize](); + + assert(json.args.length).equalTo(2); + assert(json.args[0]).equalTo('a'); + assert(json.args[1]).equalTo('b'); + assert(json.extensions.length).equalTo(1); + assert(json.extensions[0]).equalTo(expectedExtension); + assert(json.binary).equalTo('binaryPath'); + assert(json.logPath).equalTo('logFilePath'); + assert(json.detach).equalTo(true); + assert(json.localState).equalTo('localStateValue'); + assert(json.prefs).equalTo('prefsValue'); + }); + + it('should rebuild options from incomplete wire representation', + function() { + var caps = webdriver.Capabilities.chrome().set('chromeOptions', { + logPath: 'logFilePath' + }); + + var options = chrome.Options.fromCapabilities(caps); + var json = options[symbols.serialize](); + assert(json.args).isUndefined(); + assert(json.binary).isUndefined(); + assert(json.detach).isUndefined(); + assert(json.excludeSwitches).isUndefined(); + assert(json.extensions).isUndefined(); + assert(json.localState).isUndefined(); + assert(json.logPath).equalTo('logFilePath'); + assert(json.prefs).isUndefined(); + assert(json.minidumpPath).isUndefined(); + assert(json.mobileEmulation).isUndefined(); + assert(json.perfLoggingPrefs).isUndefined(); + }); + + it('should extract supported WebDriver capabilities', function() { + var proxyPrefs = proxy.direct(); + var logPrefs = {}; + var caps = webdriver.Capabilities.chrome(). + set(webdriver.Capability.PROXY, proxyPrefs). + set(webdriver.Capability.LOGGING_PREFS, logPrefs); + + var options = chrome.Options.fromCapabilities(caps); + assert(options.proxy_).equalTo(proxyPrefs); + assert(options.logPrefs_).equalTo(logPrefs); + }); + }); + + describe('addArguments', function() { + it('takes var_args', function() { + var options = new chrome.Options(); + assert(options[symbols.serialize]().args).isUndefined(); + + options.addArguments('a', 'b'); + var json = options[symbols.serialize](); + assert(json.args.length).equalTo(2); + assert(json.args[0]).equalTo('a'); + assert(json.args[1]).equalTo('b'); + }); + + it('flattens input arrays', function() { + var options = new chrome.Options(); + assert(options[symbols.serialize]().args).isUndefined(); + + options.addArguments(['a', 'b'], 'c', [1, 2], 3); + var json = options[symbols.serialize](); + assert(json.args.length).equalTo(6); + assert(json.args[0]).equalTo('a'); + assert(json.args[1]).equalTo('b'); + assert(json.args[2]).equalTo('c'); + assert(json.args[3]).equalTo(1); + assert(json.args[4]).equalTo(2); + assert(json.args[5]).equalTo(3); + }); + }); + + describe('addExtensions', function() { + it('takes var_args', function() { + var options = new chrome.Options(); + assert(options.extensions_.length).equalTo(0); + + options.addExtensions('a', 'b'); + assert(options.extensions_.length).equalTo(2); + assert(options.extensions_[0]).equalTo('a'); + assert(options.extensions_[1]).equalTo('b'); + }); + + it('flattens input arrays', function() { + var options = new chrome.Options(); + assert(options.extensions_.length).equalTo(0); + + options.addExtensions(['a', 'b'], 'c', [1, 2], 3); + assert(options.extensions_.length).equalTo(6); + assert(options.extensions_[0]).equalTo('a'); + assert(options.extensions_[1]).equalTo('b'); + assert(options.extensions_[2]).equalTo('c'); + assert(options.extensions_[3]).equalTo(1); + assert(options.extensions_[4]).equalTo(2); + assert(options.extensions_[5]).equalTo(3); + }); + }); + + describe('serialize', function() { + it('base64 encodes extensions', function() { + var expected = fs.readFileSync(__filename, 'base64'); + var wire = new chrome.Options() + .addExtensions(__filename) + [symbols.serialize](); + assert(wire.extensions.length).equalTo(1); + assert(wire.extensions[0]).equalTo(expected); + }); + }); + + describe('toCapabilities', function() { + it('returns a new capabilities object if one is not provided', function() { + var options = new chrome.Options(); + var caps = options.toCapabilities(); + assert(caps.get('browserName')).equalTo('chrome'); + assert(caps.get('chromeOptions')).equalTo(options); + }); + + it('adds to input capabilities object', function() { + var caps = webdriver.Capabilities.firefox(); + var options = new chrome.Options(); + assert(options.toCapabilities(caps)).equalTo(caps); + assert(caps.get('browserName')).equalTo('firefox'); + assert(caps.get('chromeOptions')).equalTo(options); + }); + + it('sets generic driver capabilities', function() { + var proxyPrefs = {}; + var loggingPrefs = {}; + var options = new chrome.Options(). + setLoggingPrefs(loggingPrefs). + setProxy(proxyPrefs); + + var caps = options.toCapabilities(); + assert(caps.get('proxy')).equalTo(proxyPrefs); + assert(caps.get('loggingPrefs')).equalTo(loggingPrefs); + }); + }); +}); + +test.suite(function(env) { + var driver; + + test.afterEach(function() { + return driver.quit(); + }); + + describe('Chrome options', function() { + test.it('can start Chrome with custom args', function*() { + var options = new chrome.Options(). + addArguments('user-agent=foo;bar'); + + driver = yield env.builder() + .setChromeOptions(options) + .build(); + + yield driver.get(test.Pages.ajaxyPage); + + var userAgent = + yield driver.executeScript('return window.navigator.userAgent'); + assert(userAgent).equalTo('foo;bar'); + }); + }); +}, {browsers: ['chrome']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js b/test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js new file mode 100644 index 00000000..0ccc93b5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js @@ -0,0 +1,45 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var webdriver = require('../..'), + chrome = require('../../chrome'), + assert = require('../../testing/assert'); + +var test = require('../../lib/test'); + + +test.suite(function(env) { + describe('chromedriver', function() { + var service; + test.afterEach(function() { + if (service) { + return service.kill(); + } + }); + + test.it('can be started on a custom path', function() { + service = new chrome.ServiceBuilder() + .setPath('/foo/bar/baz') + .build(); + return service.start().then(function(url) { + assert(url).endsWith('/foo/bar/baz'); + }); + }); + }); +}, {browsers: ['chrome']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js b/test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js new file mode 100644 index 00000000..40f7d9b5 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js @@ -0,0 +1,214 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + url = require('url'); + +var test = require('../lib/test'), + fileserver = require('../lib/test/fileserver'), + Browser = require('..').Browser, + Pages = test.Pages; + + +test.suite(function(env) { + var driver; + + test.before(function*() { + driver = yield env.builder().build(); + }); + + test.after(function() { + return driver.quit(); + }); + + // Cookie handling is broken. + test.ignore(env.browsers(Browser.PHANTOM_JS, Browser.SAFARI)). + describe('Cookie Management;', function() { + + test.beforeEach(function*() { + yield driver.get(fileserver.Pages.ajaxyPage); + yield driver.manage().deleteAllCookies(); + return assertHasCookies(); + }); + + test.it('can add new cookies', function*() { + var cookie = createCookieSpec(); + + yield driver.manage().addCookie(cookie); + yield driver.manage().getCookie(cookie.name).then(function(actual) { + assert.equal(actual.value, cookie.value); + }); + }); + + test.it('can get all cookies', function*() { + var cookie1 = createCookieSpec(); + var cookie2 = createCookieSpec(); + + yield driver.manage().addCookie(cookie1); + yield driver.manage().addCookie(cookie2); + + return assertHasCookies(cookie1, cookie2); + }); + + test.ignore(env.browsers(Browser.IE)). + it('only returns cookies visible to the current page', function*() { + var cookie1 = createCookieSpec(); + + yield driver.manage().addCookie(cookie1); + + var pageUrl = fileserver.whereIs('page/1'); + var cookie2 = createCookieSpec({ + path: url.parse(pageUrl).pathname + }); + yield driver.get(pageUrl); + yield driver.manage().addCookie(cookie2); + yield assertHasCookies(cookie1, cookie2); + + yield driver.get(fileserver.Pages.ajaxyPage); + yield assertHasCookies(cookie1); + + yield driver.get(pageUrl); + yield assertHasCookies(cookie1, cookie2); + }); + + test.it('can delete all cookies', function*() { + var cookie1 = createCookieSpec(); + var cookie2 = createCookieSpec(); + + yield driver.executeScript( + 'document.cookie = arguments[0] + "=" + arguments[1];' + + 'document.cookie = arguments[2] + "=" + arguments[3];', + cookie1.name, cookie1.value, cookie2.name, cookie2.value); + yield assertHasCookies(cookie1, cookie2); + + yield driver.manage().deleteAllCookies(); + yield assertHasCookies(); + }); + + test.it('can delete cookies by name', function*() { + var cookie1 = createCookieSpec(); + var cookie2 = createCookieSpec(); + + yield driver.executeScript( + 'document.cookie = arguments[0] + "=" + arguments[1];' + + 'document.cookie = arguments[2] + "=" + arguments[3];', + cookie1.name, cookie1.value, cookie2.name, cookie2.value); + yield assertHasCookies(cookie1, cookie2); + + yield driver.manage().deleteCookie(cookie1.name); + yield assertHasCookies(cookie2); + }); + + test.it('should only delete cookie with exact name', function*() { + var cookie1 = createCookieSpec(); + var cookie2 = createCookieSpec(); + var cookie3 = {name: cookie1.name + 'xx', value: cookie1.value}; + + yield driver.executeScript( + 'document.cookie = arguments[0] + "=" + arguments[1];' + + 'document.cookie = arguments[2] + "=" + arguments[3];' + + 'document.cookie = arguments[4] + "=" + arguments[5];', + cookie1.name, cookie1.value, cookie2.name, cookie2.value, + cookie3.name, cookie3.value); + yield assertHasCookies(cookie1, cookie2, cookie3); + + yield driver.manage().deleteCookie(cookie1.name); + yield assertHasCookies(cookie2, cookie3); + }); + + test.it('can delete cookies set higher in the path', function*() { + var cookie = createCookieSpec(); + var childUrl = fileserver.whereIs('child/childPage.html'); + var grandchildUrl = fileserver.whereIs( + 'child/grandchild/grandchildPage.html'); + + yield driver.get(childUrl); + yield driver.manage().addCookie(cookie); + yield assertHasCookies(cookie); + + yield driver.get(grandchildUrl); + yield assertHasCookies(cookie); + + yield driver.manage().deleteCookie(cookie.name); + yield assertHasCookies(); + + yield driver.get(childUrl); + yield assertHasCookies(); + }); + + test.ignore(env.browsers( + Browser.ANDROID, + Browser.FIREFOX, + 'legacy-' + Browser.FIREFOX, + Browser.IE)). + it('should retain cookie expiry', function*() { + let expirationDelay = 5 * 1000; + let expiry = new Date(Date.now() + expirationDelay); + let cookie = createCookieSpec({expiry}); + + yield driver.manage().addCookie(cookie); + yield driver.manage().getCookie(cookie.name).then(function(actual) { + assert.equal(actual.value, cookie.value); + // expiry times are exchanged in seconds since January 1, 1970 UTC. + assert.equal(actual.expiry, Math.floor(expiry.getTime() / 1000)); + }); + + yield driver.sleep(expirationDelay); + yield assertHasCookies(); + }); + }); + + function createCookieSpec(opt_options) { + let spec = { + name: getRandomString(), + value: getRandomString() + }; + if (opt_options) { + spec = Object.assign(spec, opt_options); + } + return spec; + } + + function buildCookieMap(cookies) { + var map = {}; + cookies.forEach(function(cookie) { + map[cookie.name] = cookie; + }); + return map; + } + + function assertHasCookies(...expected) { + return driver.manage().getCookies().then(function(cookies) { + assert.equal(cookies.length, expected.length, + 'Wrong # of cookies.' + + '\n Expected: ' + JSON.stringify(expected) + + '\n Was : ' + JSON.stringify(cookies)); + + var map = buildCookieMap(cookies); + for (var i = 0; i < expected.length; ++i) { + assert.equal(expected[i].value, map[expected[i].name].value); + } + }); + } + + function getRandomString() { + var x = 1234567890; + return Math.floor(Math.random() * x).toString(36); + } +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js b/test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js new file mode 100644 index 00000000..9f4568b8 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js @@ -0,0 +1,426 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fail = require('assert').fail; + +var Browser = require('..').Browser, + By = require('..').By, + error = require('..').error, + until = require('..').until, + promise = require('../lib/promise'), + test = require('../lib/test'), + assert = require('../testing/assert'), + Pages = test.Pages; + + +test.suite(function(env) { + var browsers = env.browsers; + + var driver; + + test.before(function*() { + driver = yield env.builder().build(); + }); + + after(function() { + return driver.quit(); + }); + + describe('finding elements', function() { + test.it( + 'should work after loading multiple pages in a row', + function*() { + yield driver.get(Pages.formPage); + yield driver.get(Pages.xhtmlTestPage); + yield driver.findElement(By.linkText('click me')).click(); + yield driver.wait(until.titleIs('We Arrive Here'), 5000); + }); + + describe('By.id()', function() { + test.it('should work', function*() { + yield driver.get(Pages.xhtmlTestPage); + yield driver.findElement(By.id('linkId')).click(); + yield driver.wait(until.titleIs('We Arrive Here'), 5000); + }); + + test.it('should fail if ID not present on page', function*() { + yield driver.get(Pages.formPage); + return driver.findElement(By.id('nonExistantButton')). + then(fail, function(e) { + assert(e).instanceOf(error.NoSuchElementError); + }); + }); + + test.it( + 'should find multiple elements by ID even though that is ' + + 'malformed HTML', + function*() { + yield driver.get(Pages.nestedPage); + + let elements = yield driver.findElements(By.id('2')); + assert(elements.length).equalTo(8); + }); + }); + + describe('By.linkText()', function() { + test.it('should be able to click on link identified by text', function*() { + yield driver.get(Pages.xhtmlTestPage); + yield driver.findElement(By.linkText('click me')).click(); + yield driver.wait(until.titleIs('We Arrive Here'), 5000); + }); + + test.it( + 'should be able to find elements by partial link text', + function*() { + yield driver.get(Pages.xhtmlTestPage); + yield driver.findElement(By.partialLinkText('ick me')).click(); + yield driver.wait(until.titleIs('We Arrive Here'), 5000); + }); + + test.it('should work when link text contains equals sign', function*() { + yield driver.get(Pages.xhtmlTestPage); + let el = yield driver.findElement(By.linkText('Link=equalssign')); + + let id = yield el.getAttribute('id'); + assert(id).equalTo('linkWithEqualsSign'); + }); + + test.it('matches by partial text when containing equals sign', + function*() { + yield driver.get(Pages.xhtmlTestPage); + let link = yield driver.findElement(By.partialLinkText('Link=')); + + let id = yield link.getAttribute('id'); + assert(id).equalTo('linkWithEqualsSign'); + }); + + test.it('works when searching for multiple and text contains =', + function*() { + yield driver.get(Pages.xhtmlTestPage); + let elements = + yield driver.findElements(By.linkText('Link=equalssign')); + + assert(elements.length).equalTo(1); + + let id = yield elements[0].getAttribute('id'); + assert(id).equalTo('linkWithEqualsSign'); + }); + + test.it( + 'works when searching for multiple with partial text containing =', + function*() { + yield driver.get(Pages.xhtmlTestPage); + let elements = + yield driver.findElements(By.partialLinkText('Link=')); + + assert(elements.length).equalTo(1); + + let id = yield elements[0].getAttribute('id'); + assert(id).equalTo('linkWithEqualsSign'); + }); + + test.it('should be able to find multiple exact matches', + function*() { + yield driver.get(Pages.xhtmlTestPage); + let elements = yield driver.findElements(By.linkText('click me')); + assert(elements.length).equalTo(2); + }); + + test.it('should be able to find multiple partial matches', + function*() { + yield driver.get(Pages.xhtmlTestPage); + let elements = + yield driver.findElements(By.partialLinkText('ick me')); + assert(elements.length).equalTo(2); + }); + + test.ignore(browsers(Browser.SAFARI)). + it('works on XHTML pages', function*() { + yield driver.get(test.whereIs('actualXhtmlPage.xhtml')); + + let el = yield driver.findElement(By.linkText('Foo')); + return assert(el.getText()).equalTo('Foo'); + }); + }); + + describe('By.name()', function() { + test.it('should work', function*() { + yield driver.get(Pages.formPage); + + let el = yield driver.findElement(By.name('checky')); + yield assert(el.getAttribute('value')).equalTo('furrfu'); + }); + + test.it('should find multiple elements with same name', function*() { + yield driver.get(Pages.nestedPage); + + let elements = yield driver.findElements(By.name('checky')); + assert(elements.length).greaterThan(1); + }); + + test.it( + 'should be able to find elements that do not support name property', + function*() { + yield driver.get(Pages.nestedPage); + yield driver.findElement(By.name('div1')); + // Pass if this does not return an error. + }); + + test.it('shoudl be able to find hidden elements by name', function*() { + yield driver.get(Pages.formPage); + yield driver.findElement(By.name('hidden')); + // Pass if this does not return an error. + }); + }); + + describe('By.className()', function() { + test.it('should work', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let el = yield driver.findElement(By.className('extraDiv')); + yield assert(el.getText()).startsWith('Another div starts here.'); + }); + + test.it('should work when name is first name among many', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let el = yield driver.findElement(By.className('nameA')); + yield assert(el.getText()).equalTo('An H2 title'); + }); + + test.it('should work when name is last name among many', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let el = yield driver.findElement(By.className('nameC')); + yield assert(el.getText()).equalTo('An H2 title'); + }); + + test.it('should work when name is middle of many', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let el = yield driver.findElement(By.className('nameBnoise')); + yield assert(el.getText()).equalTo('An H2 title'); + }); + + test.it('should work when name surrounded by whitespace', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let el = yield driver.findElement(By.className('spaceAround')); + yield assert(el.getText()).equalTo('Spaced out'); + }); + + test.it('should fail if queried name only partially matches', function*() { + yield driver.get(Pages.xhtmlTestPage); + return driver.findElement(By.className('nameB')). + then(fail, function(e) { + assert(e).instanceOf(error.NoSuchElementError); + }); + }); + + test.it('should implicitly wait', function*() { + var TIMEOUT_IN_MS = 1000; + var EPSILON = TIMEOUT_IN_MS / 2; + + yield driver.manage().timeouts().implicitlyWait(TIMEOUT_IN_MS); + yield driver.get(Pages.formPage); + + var start = new Date(); + return driver.findElement(By.id('nonExistantButton')). + then(fail, function(e) { + var end = new Date(); + assert(e).instanceOf(error.NoSuchElementError); + assert(end - start).closeTo(TIMEOUT_IN_MS, EPSILON); + }); + }); + + test.it('should be able to find multiple matches', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let elements = yield driver.findElements(By.className('nameC')); + assert(elements.length).greaterThan(1); + }); + + test.it('permits compound class names', function() { + return driver.get(Pages.xhtmlTestPage) + .then(() => driver.findElement(By.className('nameA nameC'))) + .then(el => el.getText()) + .then(text => assert(text).equalTo('An H2 title')); + }); + }); + + describe('By.xpath()', function() { + test.it('should work with multiple matches', function*() { + yield driver.get(Pages.xhtmlTestPage); + let elements = yield driver.findElements(By.xpath('//div')); + assert(elements.length).greaterThan(1); + }); + + test.it('should work for selectors using contains keyword', function*() { + yield driver.get(Pages.nestedPage); + yield driver.findElement(By.xpath('//a[contains(., "hello world")]')); + // Pass if no error. + }); + }); + + describe('By.tagName()', function() { + test.it('works', function*() { + yield driver.get(Pages.formPage); + + let el = yield driver.findElement(By.tagName('input')); + yield assert(el.getTagName()).equalTo('input'); + }); + + test.it('can find multiple elements', function*() { + yield driver.get(Pages.formPage); + + let elements = yield driver.findElements(By.tagName('input')); + assert(elements.length).greaterThan(1); + }); + }); + + describe('By.css()', function() { + test.it('works', function*() { + yield driver.get(Pages.xhtmlTestPage); + yield driver.findElement(By.css('div.content')); + // Pass if no error. + }); + + test.it('can find multiple elements', function*() { + yield driver.get(Pages.xhtmlTestPage); + + let elements = yield driver.findElements(By.css('p')); + assert(elements.length).greaterThan(1); + // Pass if no error. + }); + + test.it( + 'should find first matching element when searching by ' + + 'compound CSS selector', + function*() { + yield driver.get(Pages.xhtmlTestPage); + + let el = + yield driver.findElement(By.css('div.extraDiv, div.content')); + yield assert(el.getAttribute('class')).equalTo('content'); + }); + + test.it('should be able to find multiple elements by compound selector', + function*() { + yield driver.get(Pages.xhtmlTestPage); + let elements = + yield driver.findElements(By.css('div.extraDiv, div.content')); + + return Promise.all([ + assertClassIs(elements[0], 'content'), + assertClassIs(elements[1], 'extraDiv') + ]); + + function assertClassIs(el, expected) { + return assert(el.getAttribute('class')).equalTo(expected); + } + }); + + // IE only supports short version option[selected]. + test.ignore(browsers(Browser.IE)). + it('should be able to find element by boolean attribute', function*() { + yield driver.get(test.whereIs( + 'locators_tests/boolean_attribute_selected.html')); + + let el = yield driver.findElement(By.css('option[selected="selected"]')); + yield assert(el.getAttribute('value')).equalTo('two'); + }); + + test.it( + 'should be able to find element with short ' + + 'boolean attribute selector', + function*() { + yield driver.get(test.whereIs( + 'locators_tests/boolean_attribute_selected.html')); + + let el = yield driver.findElement(By.css('option[selected]')); + yield assert(el.getAttribute('value')).equalTo('two'); + }); + + test.it( + 'should be able to find element with short boolean attribute ' + + 'selector on HTML4 page', + function*() { + yield driver.get(test.whereIs( + 'locators_tests/boolean_attribute_selected_html4.html')); + + let el = yield driver.findElement(By.css('option[selected]')); + yield assert(el.getAttribute('value')).equalTo('two'); + }); + }); + + describe('by custom locator', function() { + test.it('handles single element result', function*() { + yield driver.get(Pages.javascriptPage); + + let link = yield driver.findElement(function(driver) { + let links = driver.findElements(By.tagName('a')); + return promise.filter(links, function(link) { + return link.getAttribute('id').then(id => id === 'updatediv'); + }).then(links => links[0]); + }); + + yield assert(link.getText()).matches(/Update\s+a\s+div/); + }); + + test.it('uses first element if locator resolves to list', function*() { + yield driver.get(Pages.javascriptPage); + + let link = yield driver.findElement(function() { + return driver.findElements(By.tagName('a')); + }); + + yield assert(link.getText()).isEqualTo('Change the page title!'); + }); + + test.it('fails if locator returns non-webelement value', function*() { + yield driver.get(Pages.javascriptPage); + + let link = driver.findElement(function() { + return driver.getTitle(); + }); + + return link.then( + () => fail('Should have failed'), + (e) => assert(e).instanceOf(TypeError)); + }); + }); + + describe('switchTo().activeElement()', function() { + // SAFARI's new session response does not identify it as a W3C browser, + // so the command is sent in the unsupported wire protocol format. + test.ignore(browsers(Browser.SAFARI)). + it('returns document.activeElement', function*() { + yield driver.get(Pages.formPage); + + let email = yield driver.findElement(By.css('#email')); + yield driver.executeScript('arguments[0].focus()', email); + + let ae = yield driver.switchTo().activeElement(); + let equal = yield driver.executeScript( + 'return arguments[0] === arguments[1]', email, ae); + assert(equal).isTrue(); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js b/test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js new file mode 100644 index 00000000..97eaa1ed --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js @@ -0,0 +1,350 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fail = require('assert').fail; + +var webdriver = require('..'), + Browser = webdriver.Browser, + By = webdriver.By, + assert = require('../testing/assert'), + test = require('../lib/test'); + + +test.suite(function(env) { + var driver; + + test.before(function*() { + driver = yield env.builder().build(); + }); + + test.after(function() { + return driver.quit(); + }); + + test.beforeEach(function() { + return driver.get(test.Pages.echoPage); + }); + + describe('executeScript;', function() { + var shouldHaveFailed = new Error('Should have failed'); + + test.it('fails if script throws', function() { + return execute('throw new Error("boom")') + .then(function() { throw shouldHaveFailed; }) + .catch(function(e) { + // The java WebDriver server adds a bunch of crap to error messages. + // Error message will just be "JavaScript error" for IE. + assert(e.message).matches(/.*(JavaScript error|boom).*/); + }); + }); + + test.it('fails if script does not parse', function() { + return execute('throw function\\*') + .then(function() { throw shouldHaveFailed; }) + .catch(function(e) { + assert(e).notEqualTo(shouldHaveFailed); + }); + }); + + describe('scripts;', function() { + test.it('do not pollute the global scope', function*() { + yield execute('var x = 1;'); + yield assert(execute('return typeof x;')).equalTo('undefined'); + }); + + test.it('can set global variables', function*() { + yield execute('window.x = 1234;'); + yield assert(execute('return x;')).equalTo(1234); + }); + + test.it('may be defined as a function expression', function*() { + let result = yield execute(function() { + return 1234 + 'abc'; + }); + assert(result).equalTo('1234abc'); + }); + }); + + describe('return values;', function() { + + test.it('returns undefined as null', function() { + return assert(execute('var x; return x;')).isNull(); + }); + + test.it('can return null', function() { + return assert(execute('return null;')).isNull(); + }); + + test.it('can return numbers', function*() { + yield assert(execute('return 1234')).equalTo(1234); + yield assert(execute('return 3.1456')).equalTo(3.1456); + }); + + test.it('can return strings', function() { + return assert(execute('return "hello"')).equalTo('hello'); + }); + + test.it('can return booleans', function*() { + yield assert(execute('return true')).equalTo(true); + yield assert(execute('return false')).equalTo(false); + }); + + test.it('can return an array of primitives', function() { + return execute('var x; return [1, false, null, 3.14, x]') + .then(verifyJson([1, false, null, 3.14, null])); + }); + + test.it('can return nested arrays', function() { + return execute('return [[1, 2, [3]]]').then(verifyJson([[1, 2, [3]]])); + }); + + test.ignore(env.browsers(Browser.IE)). + it('can return empty object literal', function() { + return execute('return {}').then(verifyJson({})); + }); + + test.it('can return object literals', function() { + return execute('return {a: 1, b: false, c: null}').then(result => { + verifyJson(['a', 'b', 'c'])(Object.keys(result).sort()); + assert(result.a).equalTo(1); + assert(result.b).equalTo(false); + assert(result.c).isNull(); + }); + }); + + test.it('can return complex object literals', function() { + return execute('return {a:{b: "hello"}}') + .then(verifyJson({a:{b: 'hello'}})); + }); + + test.it('can return dom elements as web elements', function*() { + let result = + yield execute('return document.querySelector(".header.host")'); + assert(result).instanceOf(webdriver.WebElement); + + return assert(result.getText()).startsWith('host: '); + }); + + test.it('can return array of dom elements', function*() { + let result = yield execute( + 'var nodes = document.querySelectorAll(".request,.host");' + + 'return [nodes[0], nodes[1]];'); + assert(result.length).equalTo(2); + + assert(result[0]).instanceOf(webdriver.WebElement); + yield assert(result[0].getText()).startsWith('GET '); + + assert(result[1]).instanceOf(webdriver.WebElement); + yield assert(result[1].getText()).startsWith('host: '); + }); + + test.it('can return a NodeList as an array of web elements', function*() { + let result = + yield execute('return document.querySelectorAll(".request,.host");') + + assert(result.length).equalTo(2); + + assert(result[0]).instanceOf(webdriver.WebElement); + yield assert(result[0].getText()).startsWith('GET '); + + assert(result[1]).instanceOf(webdriver.WebElement); + yield assert(result[1].getText()).startsWith('host: '); + }); + + test.it('can return object literal with element property', function*() { + let result = yield execute('return {a: document.body}'); + + assert(result.a).instanceOf(webdriver.WebElement); + yield assert(result.a.getTagName()).equalTo('body'); + }); + }); + + describe('parameters;', function() { + test.it('can pass numeric arguments', function*() { + yield assert(execute('return arguments[0]', 12)).equalTo(12); + yield assert(execute('return arguments[0]', 3.14)).equalTo(3.14); + }); + + test.it('can pass boolean arguments', function*() { + yield assert(execute('return arguments[0]', true)).equalTo(true); + yield assert(execute('return arguments[0]', false)).equalTo(false); + }); + + test.it('can pass string arguments', function*() { + yield assert(execute('return arguments[0]', 'hi')).equalTo('hi'); + }); + + test.it('can pass null arguments', function*() { + yield assert(execute('return arguments[0] === null', null)).equalTo(true); + yield assert(execute('return arguments[0]', null)).equalTo(null); + }); + + test.it('passes undefined as a null argument', function*() { + var x; + yield assert(execute('return arguments[0] === null', x)).equalTo(true); + yield assert(execute('return arguments[0]', x)).equalTo(null); + }); + + test.it('can pass multiple arguments', function*() { + yield assert(execute('return arguments.length')).equalTo(0); + yield assert(execute('return arguments.length', 1, 'a', false)).equalTo(3); + }); + + test.ignore(env.browsers(Browser.FIREFOX, Browser.SAFARI)). + it('can return arguments object as array', function*() { + let val = yield execute('return arguments', 1, 'a', false); + + assert(val.length).equalTo(3); + assert(val[0]).equalTo(1); + assert(val[1]).equalTo('a'); + assert(val[2]).equalTo(false); + }); + + test.it('can pass object literal', function*() { + let result = yield execute( + 'return [typeof arguments[0], arguments[0].a]', {a: 'hello'}) + assert(result[0]).equalTo('object'); + assert(result[1]).equalTo('hello'); + }); + + test.it('WebElement arguments are passed as DOM elements', function*() { + let el = yield driver.findElement(By.tagName('div')); + let result = + yield execute('return arguments[0].tagName.toLowerCase();', el); + assert(result).equalTo('div'); + }); + + test.it('can pass array containing object literals', function*() { + let result = yield execute('return arguments[0]', [{color: "red"}]); + assert(result.length).equalTo(1); + assert(result[0].color).equalTo('red'); + }); + + test.it('does not modify object literal parameters', function() { + var input = {color: 'red'}; + return execute('return arguments[0];', input).then(verifyJson(input)); + }); + }); + + // See https://code.google.com/p/selenium/issues/detail?id=8223. + describe('issue 8223;', function() { + describe('using for..in loops;', function() { + test.it('can return array built from for-loop index', function() { + return execute(function() { + var ret = []; + for (var i = 0; i < 3; i++) { + ret.push(i); + } + return ret; + }).then(verifyJson[0, 1, 2]); + }); + + test.it('can copy input array contents', function() { + return execute(function(input) { + var ret = []; + for (var i in input) { + ret.push(input[i]); + } + return ret; + }, ['fa', 'fe', 'fi']).then(verifyJson(['fa', 'fe', 'fi'])); + }); + + test.it('can iterate over input object keys', function() { + return execute(function(thing) { + var ret = []; + for (var w in thing.words) { + ret.push(thing.words[w].word); + } + return ret; + }, {words: [{word: 'fa'}, {word: 'fe'}, {word: 'fi'}]}) + .then(verifyJson(['fa', 'fe', 'fi'])); + }); + + describe('recursive functions;', function() { + test.it('can build array from input', function() { + var input = ['fa', 'fe', 'fi']; + return execute(function(thearray) { + var ret = []; + function build_response(thearray, ret) { + ret.push(thearray.shift()); + return (!thearray.length && ret + || build_response(thearray, ret)); + } + return build_response(thearray, ret); + }, input).then(verifyJson(input)); + }); + + test.it('can build array from elements in object', function() { + var input = {words: [{word: 'fa'}, {word: 'fe'}, {word: 'fi'}]}; + return execute(function(thing) { + var ret = []; + function build_response(thing, ret) { + var item = thing.words.shift(); + ret.push(item.word); + return (!thing.words.length && ret + || build_response(thing, ret)); + } + return build_response(thing, ret); + }, input).then(verifyJson(['fa', 'fe', 'fi'])); + }); + }); + }); + }); + + describe('async timeouts', function() { + var TIMEOUT_IN_MS = 200; + var ACCEPTABLE_WAIT = TIMEOUT_IN_MS / 10; + var TOO_LONG_WAIT = TIMEOUT_IN_MS * 10; + + before(function() { + return driver.manage().timeouts().setScriptTimeout(TIMEOUT_IN_MS) + }); + + test.it('does not fail if script execute in time', function() { + return executeTimeOutScript(ACCEPTABLE_WAIT); + }); + + test.it('fails if script took too long', function() { + return executeTimeOutScript(TOO_LONG_WAIT) + .then(function() { + fail('it should have timed out'); + }).catch(function(e) { + assert(e.name).equalTo('ScriptTimeoutError'); + }); + }); + + function executeTimeOutScript(sleepTime) { + return driver.executeAsyncScript(function(sleepTime) { + var callback = arguments[arguments.length - 1]; + setTimeout(callback, sleepTime) + }, sleepTime); + } + }) + }); + + function verifyJson(expected) { + return function(actual) { + return assert(JSON.stringify(actual)).equalTo(JSON.stringify(expected)); + }; + } + + function execute() { + return driver.executeScript.apply(driver, arguments); + } +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js b/test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js new file mode 100644 index 00000000..0a13dd74 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js @@ -0,0 +1,62 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('../testing/assert'), + test = require('../lib/test'), + Pages = test.Pages; + + +test.suite(function(env) { + var browsers = env.browsers; + + var driver; + test.before(function() { + driver = env.builder().build(); + }); + + test.after(function() { + driver.quit(); + }); + + describe('fingerprinting', function() { + test.it('it should fingerprint the navigator object', function*() { + yield driver.get(Pages.simpleTestPage); + + let wd = yield driver.executeScript('return navigator.webdriver'); + assert(wd).equalTo(true); + }); + + test.it('fingerprint must not be writable', function*() { + yield driver.get(Pages.simpleTestPage); + + let wd = yield driver.executeScript( + 'navigator.webdriver = "ohai"; return navigator.webdriver'); + assert(wd).equalTo(true); + }); + + test.it('leaves fingerprint on svg pages', function*() { + yield driver.get(Pages.svgPage); + + let wd = yield driver.executeScript('return navigator.webdriver'); + assert(wd).equalTo(true); + }); + }); + +// Currently only implemented in legacy firefox. +}, {browsers: ['legacy-firefox']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js b/test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js new file mode 100644 index 00000000..cacb2b18 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js @@ -0,0 +1,120 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + crypto = require('crypto'), + fs = require('fs'), + path = require('path'); + +var extension = require('../../firefox/extension'), + io = require('../../io'), + zip = require('../../io/zip'), + it = require('../../testing').it; + + +var JETPACK_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/jetpack-sample.xpi'); +var NORMAL_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/sample.xpi'); +var WEBEXTENSION_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/webextension.xpi'); + +var JETPACK_EXTENSION_ID = 'jid1-EaXX7k0wwiZR7w@jetpack'; +var NORMAL_EXTENSION_ID = 'sample@seleniumhq.org'; +var WEBEXTENSION_EXTENSION_ID = 'webextensions-selenium-example@example.com'; + + +describe('extension', function() { + it('can install a jetpack xpi file', function() { + return io.tmpDir().then(function(dir) { + return extension.install(JETPACK_EXTENSION, dir).then(function(id) { + assert.equal(JETPACK_EXTENSION_ID, id); + var file = path.join(dir, id + '.xpi'); + assert.ok(fs.existsSync(file), 'no such file: ' + file); + assert.ok(!fs.statSync(file).isDirectory()); + + var copiedSha1 = crypto.createHash('sha1') + .update(fs.readFileSync(file)) + .digest('hex'); + + var goldenSha1 = crypto.createHash('sha1') + .update(fs.readFileSync(JETPACK_EXTENSION)) + .digest('hex'); + + assert.equal(copiedSha1, goldenSha1); + }); + }); + }); + + it('can install a normal xpi file', function() { + return io.tmpDir().then(function(dir) { + return extension.install(NORMAL_EXTENSION, dir).then(function(id) { + assert.equal(NORMAL_EXTENSION_ID, id); + + var file = path.join(dir, NORMAL_EXTENSION_ID); + assert.ok(fs.statSync(file).isDirectory()); + + assert.ok(fs.existsSync(path.join(file, 'chrome.manifest'))); + assert.ok(fs.existsSync(path.join(file, 'content/overlay.xul'))); + assert.ok(fs.existsSync(path.join(file, 'content/overlay.js'))); + assert.ok(fs.existsSync(path.join(file, 'install.rdf'))); + }); + }); + }); + + it('can install a webextension xpi file', function() { + return io.tmpDir().then(function(dir) { + return extension.install(WEBEXTENSION_EXTENSION, dir).then(function(id) { + assert.equal(WEBEXTENSION_EXTENSION_ID, id); + var file = path.join(dir, id + '.xpi'); + assert.ok(fs.existsSync(file), 'no such file: ' + file); + assert.ok(!fs.statSync(file).isDirectory()); + + var copiedSha1 = crypto.createHash('sha1') + .update(fs.readFileSync(file)) + .digest('hex'); + + var goldenSha1 = crypto.createHash('sha1') + .update(fs.readFileSync(WEBEXTENSION_EXTENSION)) + .digest('hex'); + + assert.equal(copiedSha1, goldenSha1); + }); + }); + }); + + it('can install an extension from a directory', function() { + return io.tmpDir().then(function(srcDir) { + return zip.unzip(NORMAL_EXTENSION, srcDir) + .then(() => io.tmpDir()) + .then(dstDir => { + return extension.install(srcDir, dstDir).then(function(id) { + assert.equal(NORMAL_EXTENSION_ID, id); + + var dir = path.join(dstDir, NORMAL_EXTENSION_ID); + + assert.ok(fs.existsSync(path.join(dir, 'chrome.manifest'))); + assert.ok(fs.existsSync(path.join(dir, 'content/overlay.xul'))); + assert.ok(fs.existsSync(path.join(dir, 'content/overlay.js'))); + assert.ok(fs.existsSync(path.join(dir, 'install.rdf'))); + }); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js b/test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js new file mode 100644 index 00000000..6262fd3d --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js @@ -0,0 +1,244 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var path = require('path'); + +var firefox = require('../../firefox'), + io = require('../../io'), + test = require('../../lib/test'), + assert = require('../../testing/assert'), + Context = require('../../firefox').Context, + error = require('../..').error; + +var {consume} = require('../../lib/promise'); + + +var JETPACK_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/jetpack-sample.xpi'); +var NORMAL_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/sample.xpi'); +var WEBEXTENSION_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/webextension.xpi'); + + +test.suite(function(env) { + describe('firefox', function() { + describe('Options', function() { + let driver; + + beforeEach(function() { + driver = null; + }); + + afterEach(function() { + if (driver) { + return driver.quit(); + } + }); + + /** + * @param {...string} extensions the extensions to install. + * @return {!firefox.Profile} a new profile. + */ + function profileWithExtensions(...extensions) { + let profile = new firefox.Profile(); + profile.setPreference('xpinstall.signatures.required', false); + extensions.forEach(ext => profile.addExtension(ext)); + return profile; + } + + /** + * Runs a test that requires Firefox Developer Edition. The test will be + * skipped if dev cannot be found on the current system. + */ + function runWithFirefoxDev(options, testFn) { + return firefox.Channel.AURORA.locate().then(exe => { + options.setBinary(exe); + driver = env.builder() + .setFirefoxOptions(options) + .build(); + return driver.call(testFn); + }, err => { + console.warn( + 'Skipping test: could not find Firefox Dev Edition: ' + err); + }); + } + + describe('can start Firefox with custom preferences', function() { + function runTest(opt_dir) { + return consume(function*() { + let profile = new firefox.Profile(opt_dir); + profile.setPreference('general.useragent.override', 'foo;bar'); + + let options = new firefox.Options().setProfile(profile); + + driver = env.builder(). + setFirefoxOptions(options). + build(); + + yield driver.get('data:text/html,
    content
    '); + + var userAgent = yield driver.executeScript( + 'return window.navigator.userAgent'); + assert(userAgent).equalTo('foo;bar'); + }); + } + + test.it('profile created from scratch', function() { + return runTest(); + }); + + test.it('profile created from template', function() { + return io.tmpDir().then(runTest); + }); + }); + + test.it('can start Firefox with a jetpack extension', function() { + let profile = profileWithExtensions(JETPACK_EXTENSION); + let options = new firefox.Options().setProfile(profile); + + return runWithFirefoxDev(options, function*() { + yield loadJetpackPage(driver, + 'data:text/html;charset=UTF-8,
    content
    '); + + let text = + yield driver.findElement({id: 'jetpack-sample-banner'}).getText(); + assert(text).equalTo('Hello, world!'); + }); + }); + + test.it('can start Firefox with a normal extension', function() { + let profile = profileWithExtensions(NORMAL_EXTENSION); + let options = new firefox.Options().setProfile(profile); + + return runWithFirefoxDev(options, function*() { + yield driver.get('data:text/html,
    content
    '); + + let footer = + yield driver.findElement({id: 'sample-extension-footer'}); + let text = yield footer.getText(); + assert(text).equalTo('Goodbye'); + }); + }); + + test.it('can start Firefox with a webextension extension', function() { + let profile = profileWithExtensions(WEBEXTENSION_EXTENSION); + let options = new firefox.Options().setProfile(profile); + + return runWithFirefoxDev(options, function*() { + yield driver.get(test.Pages.echoPage); + + let footer = + yield driver.findElement({id: 'webextensions-selenium-example'}); + let text = yield footer.getText(); + assert(text).equalTo('Content injected by webextensions-selenium-example'); + }); + }); + + test.it('can start Firefox with multiple extensions', function() { + let profile = + profileWithExtensions(JETPACK_EXTENSION, NORMAL_EXTENSION); + let options = new firefox.Options().setProfile(profile); + + return runWithFirefoxDev(options, function*() { + yield loadJetpackPage(driver, + 'data:text/html;charset=UTF-8,
    content
    '); + + let banner = + yield driver.findElement({id: 'jetpack-sample-banner'}).getText(); + assert(banner).equalTo('Hello, world!'); + + let footer = + yield driver.findElement({id: 'sample-extension-footer'}) + .getText(); + assert(footer).equalTo('Goodbye'); + }); + }); + + function loadJetpackPage(driver, url) { + // On linux the jetpack extension does not always run the first time + // we load a page. If this happens, just reload the page (a simple + // refresh doesn't appear to work). + return driver.wait(function() { + driver.get(url); + return driver.findElements({id: 'jetpack-sample-banner'}) + .then(found => found.length > 0); + }, 3000); + } + }); + + describe('binary management', function() { + var driver1, driver2; + + test.ignore(env.isRemote). + it('can start multiple sessions with single binary instance', function*() { + var options = new firefox.Options().setBinary(new firefox.Binary); + env.builder().setFirefoxOptions(options); + driver1 = yield env.builder().build(); + driver2 = yield env.builder().build(); + // Ok if this doesn't fail. + }); + + test.afterEach(function*() { + if (driver1) { + yield driver1.quit(); + } + + if (driver2) { + yield driver2.quit(); + } + }); + }); + + describe('context switching', function() { + var driver; + + test.beforeEach(function*() { + driver = yield env.builder().build(); + }); + + test.afterEach(function() { + if (driver) { + return driver.quit(); + } + }); + + test.it('can get context', function() { + return assert(driver.getContext()).equalTo(Context.CONTENT); + }); + + test.it('can set context', function*() { + yield driver.setContext(Context.CHROME); + let ctxt = yield driver.getContext(); + assert(ctxt).equalTo(Context.CHROME); + + yield driver.setContext(Context.CONTENT); + ctxt = yield driver.getContext(); + assert(ctxt).equalTo(Context.CONTENT); + }); + + test.it('throws on unknown context', function() { + return driver.setContext("foo").then(assert.fail, function(e) { + assert(e).instanceOf(error.InvalidArgumentError); + }); + }); + }); + + }); +}, {browsers: ['firefox']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js b/test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js new file mode 100644 index 00000000..7e7e331e --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js @@ -0,0 +1,140 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + fs = require('fs'), + path = require('path'); + +var promise = require('../..').promise, + Profile = require('../../firefox/profile').Profile, + decode = require('../../firefox/profile').decode, + loadUserPrefs = require('../../firefox/profile').loadUserPrefs, + io = require('../../io'); + + +var JETPACK_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/jetpack-sample.xpi'); +var NORMAL_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/sample.xpi'); +var WEBEXTENSION_EXTENSION = path.join(__dirname, + '../../lib/test/data/firefox/webextension.xpi'); + +var JETPACK_EXTENSION_ID = 'jid1-EaXX7k0wwiZR7w@jetpack.xpi'; +var NORMAL_EXTENSION_ID = 'sample@seleniumhq.org'; +var WEBEXTENSION_EXTENSION_ID = 'webextensions-selenium-example@example.com'; + + + +describe('Profile', function() { + describe('setPreference', function() { + it('allows setting custom properties', function() { + var profile = new Profile(); + assert.equal(undefined, profile.getPreference('foo')); + + profile.setPreference('foo', 'bar'); + assert.equal('bar', profile.getPreference('foo')); + }); + + it('allows overriding mutable properties', function() { + var profile = new Profile(); + + profile.setPreference('browser.newtab.url', 'http://www.example.com'); + assert.equal('http://www.example.com', + profile.getPreference('browser.newtab.url')); + }); + }); + + describe('writeToDisk', function() { + it('copies template directory recursively', function() { + var templateDir; + return io.tmpDir().then(function(td) { + templateDir = td; + var foo = path.join(templateDir, 'foo'); + fs.writeFileSync(foo, 'Hello, world'); + + var bar = path.join(templateDir, 'subfolder/bar'); + fs.mkdirSync(path.dirname(bar)); + fs.writeFileSync(bar, 'Goodbye, world!'); + + return new Profile(templateDir).writeToDisk(); + }).then(function(profileDir) { + assert.notEqual(profileDir, templateDir); + + assert.equal('Hello, world', + fs.readFileSync(path.join(profileDir, 'foo'))); + assert.equal('Goodbye, world!', + fs.readFileSync(path.join(profileDir, 'subfolder/bar'))); + }); + }); + + it('does not copy lock files', function() { + return io.tmpDir().then(function(dir) { + fs.writeFileSync(path.join(dir, 'parent.lock'), 'lock'); + fs.writeFileSync(path.join(dir, 'lock'), 'lock'); + fs.writeFileSync(path.join(dir, '.parentlock'), 'lock'); + return new Profile(dir).writeToDisk(); + }).then(function(dir) { + assert.ok(fs.existsSync(dir)); + assert.ok(!fs.existsSync(path.join(dir, 'parent.lock'))); + assert.ok(!fs.existsSync(path.join(dir, 'lock'))); + assert.ok(!fs.existsSync(path.join(dir, '.parentlock'))); + }); + }); + + describe('user.js', function() { + it('merges template user.js into preferences', function() { + return io.tmpDir().then(function(dir) { + fs.writeFileSync(path.join(dir, 'user.js'), [ + 'user_pref("browser.newtab.url", "http://www.example.com")', + 'user_pref("dom.max_script_run_time", 1234)' + ].join('\n')); + + return new Profile(dir).writeToDisk(); + }).then(function(profile) { + return loadUserPrefs(path.join(profile, 'user.js')); + }).then(function(prefs) { + assert.equal('http://www.example.com', prefs['browser.newtab.url']); + assert.equal(1234, prefs['dom.max_script_run_time']); + }); + }); + }); + + describe('extensions', function() { + it('are copied into new profile directory', function() { + var profile = new Profile(); + profile.addExtension(JETPACK_EXTENSION); + profile.addExtension(NORMAL_EXTENSION); + profile.addExtension(WEBEXTENSION_EXTENSION); + + return profile.writeToDisk().then(function(dir) { + dir = path.join(dir, 'extensions'); + assertExists(JETPACK_EXTENSION_ID); + assertExists(NORMAL_EXTENSION_ID); + assertExists(WEBEXTENSION_EXTENSION_ID + '.xpi'); + + function assertExists(file) { + assert.ok( + fs.existsSync(path.join(dir, file)), + `expected ${file} to exist`); + } + }); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js b/test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js new file mode 100644 index 00000000..558cd552 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js @@ -0,0 +1,223 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + http = require('http'), + url = require('url'); + +var HttpClient = require('../../http').HttpClient, + HttpRequest = require('../../lib/http').Request, + HttpResponse = require('../../lib/http').Response, + Server = require('../../lib/test/httpserver').Server; + +describe('HttpClient', function() { + this.timeout(4 * 1000); + + var server = new Server(function(req, res) { + let parsedUrl = url.parse(req.url); + + if (req.method == 'GET' && req.url == '/echo') { + res.writeHead(200, req.headers); + res.end(); + + } else if (req.method == 'GET' && req.url == '/redirect') { + res.writeHead(303, {'Location': server.url('/hello')}); + res.end(); + + } else if (req.method == 'GET' && req.url == '/hello') { + res.writeHead(200, {'content-type': 'text/plain'}); + res.end('hello, world!'); + + } else if (req.method == 'GET' && req.url == '/chunked') { + res.writeHead(200, { + 'content-type': 'text/html; charset=utf-8', + 'transfer-encoding': 'chunked' + }); + res.write(''); + setTimeout(() => res.end('

    Hello, world!

    '), 20); + + } else if (req.method == 'GET' && req.url == '/badredirect') { + res.writeHead(303, {}); + res.end(); + + } else if (req.method == 'GET' && req.url == '/protected') { + var denyAccess = function() { + res.writeHead(401, {'WWW-Authenticate': 'Basic realm="test"'}); + res.end('Access denied'); + }; + + var basicAuthRegExp = /^\s*basic\s+([a-z0-9\-\._~\+\/]+)=*\s*$/i + var auth = req.headers.authorization; + var match = basicAuthRegExp.exec(auth || ''); + if (!match) { + denyAccess(); + return; + } + + var userNameAndPass = new Buffer(match[1], 'base64').toString(); + var parts = userNameAndPass.split(':', 2); + if (parts[0] !== 'genie' && parts[1] !== 'bottle') { + denyAccess(); + return; + } + + res.writeHead(200, {'content-type': 'text/plain'}); + res.end('Access granted!'); + + } else if (req.method == 'GET' + && parsedUrl.pathname + && parsedUrl.pathname.endsWith('/proxy')) { + let headers = Object.assign({}, req.headers); + headers['x-proxy-request-uri'] = req.url; + res.writeHead(200, headers); + res.end(); + + } else if (req.method == 'GET' + && parsedUrl.pathname + && parsedUrl.pathname.endsWith('/proxy/redirect')) { + let path = `/proxy${parsedUrl.search || ''}${parsedUrl.hash || ''}`; + res.writeHead(303, {'Location': path}); + res.end(); + + } else { + res.writeHead(404, {}); + res.end(); + } + }); + + before(function() { + return server.start(); + }); + + after(function() { + return server.stop(); + }); + + it('can send a basic HTTP request', function() { + var request = new HttpRequest('GET', '/echo'); + request.headers.set('Foo', 'Bar'); + + var agent = new http.Agent(); + agent.maxSockets = 1; // Only making 1 request. + + var client = new HttpClient(server.url(), agent); + return client.send(request).then(function(response) { + assert.equal(200, response.status); + assert.equal(response.headers.get('content-length'), '0'); + assert.equal(response.headers.get('connection'), 'keep-alive'); + assert.equal(response.headers.get('host'), server.host()); + + assert.equal(request.headers.get('Foo'), 'Bar'); + assert.equal( + request.headers.get('Accept'), 'application/json; charset=utf-8'); + }); + }); + + it('handles chunked responses', function() { + let request = new HttpRequest('GET', '/chunked'); + + let client = new HttpClient(server.url()); + return client.send(request).then(response => { + assert.equal(200, response.status); + assert.equal(response.body, '

    Hello, world!

    '); + }); + }); + + it('can use basic auth', function() { + var parsed = url.parse(server.url()); + parsed.auth = 'genie:bottle'; + + var client = new HttpClient(url.format(parsed)); + var request = new HttpRequest('GET', '/protected'); + return client.send(request).then(function(response) { + assert.equal(200, response.status); + assert.equal(response.headers.get('content-type'), 'text/plain'); + assert.equal(response.body, 'Access granted!'); + }); + }); + + it('fails requests missing required basic auth', function() { + var client = new HttpClient(server.url()); + var request = new HttpRequest('GET', '/protected'); + return client.send(request).then(function(response) { + assert.equal(401, response.status); + assert.equal(response.body, 'Access denied'); + }); + }); + + it('automatically follows redirects', function() { + var request = new HttpRequest('GET', '/redirect'); + var client = new HttpClient(server.url()); + return client.send(request).then(function(response) { + assert.equal(200, response.status); + assert.equal(response.headers.get('content-type'), 'text/plain'); + assert.equal(response.body, 'hello, world!'); + }); + }); + + it('handles malformed redirect responses', function() { + var request = new HttpRequest('GET', '/badredirect'); + var client = new HttpClient(server.url()); + return client.send(request).then(assert.fail, function(err) { + assert.ok(/Failed to parse "Location"/.test(err.message), + 'Not the expected error: ' + err.message); + }); + }); + + describe('with proxy', function() { + it('sends request to proxy with absolute URI', function() { + var request = new HttpRequest('GET', '/proxy'); + var client = new HttpClient( + 'http://another.server.com', undefined, server.url()); + return client.send(request).then(function(response) { + assert.equal(200, response.status); + assert.equal(response.headers.get('host'), 'another.server.com'); + assert.equal( + response.headers.get('x-proxy-request-uri'), + 'http://another.server.com/proxy'); + }); + }); + + it('uses proxy when following redirects', function() { + var request = new HttpRequest('GET', '/proxy/redirect'); + var client = new HttpClient( + 'http://another.server.com', undefined, server.url()); + return client.send(request).then(function(response) { + assert.equal(200, response.status); + assert.equal(response.headers.get('host'), 'another.server.com'); + assert.equal( + response.headers.get('x-proxy-request-uri'), + 'http://another.server.com/proxy'); + }); + }); + + it('includes search and hash in redirect URI', function() { + var request = new HttpRequest('GET', '/proxy/redirect?foo#bar'); + var client = new HttpClient( + 'http://another.server.com', undefined, server.url()); + return client.send(request).then(function(response) { + assert.equal(200, response.status); + assert.equal(response.headers.get('host'), 'another.server.com'); + assert.equal( + response.headers.get('x-proxy-request-uri'), + 'http://another.server.com/proxy?foo#bar'); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js b/test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js new file mode 100644 index 00000000..6361c065 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js @@ -0,0 +1,178 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const http = require('http'); + +const error = require('../../lib/error'); +const util = require('../../http/util'); +const promise = require('../../lib/promise'); + +describe('selenium-webdriver/http/util', function() { + + var server, baseUrl; + + var status, value, responseCode; + + function startServer(done) { + if (server) return done(); + + server = http.createServer(function(req, res) { + var data = JSON.stringify({status: status, value: value}); + res.writeHead(responseCode, { + 'Content-Type': 'application/json; charset=utf-8', + 'Content-Length': Buffer.byteLength(data, 'utf8') + }); + res.end(data); + }); + + server.listen(0, '127.0.0.1', function(e) { + if (e) return done(e); + + var addr = server.address(); + baseUrl = 'http://' + addr.address + ':' + addr.port; + done(); + }); + } + + function killServer(done) { + if (!server) return done(); + server.close(done); + server = null; + } + + after(killServer); + + beforeEach(function(done) { + status = 0; + value = 'abc123'; + responseCode = 200; + startServer(done); + }); + + describe('#getStatus', function() { + it('should return value field on success', function() { + return util.getStatus(baseUrl).then(function(response) { + assert.equal('abc123', response); + }); + }); + + it('should fail if response object is not success', function() { + status = 1; + return util.getStatus(baseUrl).then(function() { + throw Error('expected a failure'); + }, function(err) { + assert.ok(err instanceof error.WebDriverError); + assert.equal(err.code, error.WebDriverError.code); + assert.equal(err.message, value); + }); + }); + + it('should fail if the server is not listening', function(done) { + killServer(function(e) { + if(e) return done(e); + + util.getStatus(baseUrl).then(function() { + done(Error('expected a failure')); + }, function() { + // Expected. + done(); + }); + }); + }); + + it('should fail if HTTP status is not 200', function() { + status = 1; + responseCode = 404; + return util.getStatus(baseUrl).then(function() { + throw Error('expected a failure'); + }, function(err) { + assert.ok(err instanceof error.WebDriverError); + assert.equal(err.code, error.WebDriverError.code); + assert.equal(err.message, value); + }); + }); + }); + + describe('#waitForServer', function() { + it('resolves when server is ready', function() { + status = 1; + setTimeout(function() { status = 0; }, 50); + return util.waitForServer(baseUrl, 100); + }); + + it('should fail if server does not become ready', function() { + status = 1; + return util.waitForServer(baseUrl, 50). + then(function() {throw Error('Expected to time out')}, + function() {}); + }); + + it('can cancel wait', function() { + status = 1; + let cancel = new Promise(resolve => { + setTimeout(_ => resolve(), 50) + }); + return util.waitForServer(baseUrl, 200, cancel) + .then( + () => { throw Error('Did not expect to succeed!'); }, + (e) => assert.ok(e instanceof promise.CancellationError)); + }); + }); + + describe('#waitForUrl', function() { + it('succeeds when URL returns 2xx', function() { + responseCode = 404; + setTimeout(function() { responseCode = 200; }, 50); + + return util.waitForUrl(baseUrl, 200); + }); + + it('fails if URL always returns 4xx', function() { + responseCode = 404; + + return util.waitForUrl(baseUrl, 50) + .then(() => assert.fail('Expected to time out'), + () => true); + }); + + it('fails if cannot connect to server', function() { + return new Promise((resolve, reject) => { + killServer(function(e) { + if (e) return reject(e); + + util.waitForUrl(baseUrl, 50). + then(function() { reject(Error('Expected to time out')); }, + function() { resolve(); }); + }); + }); + }); + + it('can cancel wait', function() { + responseCode = 404; + let cancel = new Promise(resolve => { + setTimeout(_ => resolve(), 50); + }); + return util.waitForUrl(baseUrl, 200, cancel) + .then( + () => { throw Error('Did not expect to succeed!'); }, + (e) => assert.ok(e instanceof promise.CancellationError)); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js b/test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js new file mode 100644 index 00000000..40dedc65 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js @@ -0,0 +1,360 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + fs = require('fs'), + path = require('path'), + tmp = require('tmp'); + +var io = require('../../io'); + + +describe('io', function() { + describe('copy', function() { + var tmpDir; + + before(function() { + return io.tmpDir().then(function(d) { + tmpDir = d; + + fs.writeFileSync(path.join(d, 'foo'), 'Hello, world'); + }); + }); + + it('can copy one file to another', function() { + return io.tmpFile().then(function(f) { + return io.copy(path.join(tmpDir, 'foo'), f).then(function(p) { + assert.equal(p, f); + assert.equal('Hello, world', fs.readFileSync(p)); + }); + }); + }); + + it('can copy symlink to destination', function() { + if (process.platform === 'win32') { + return; // No symlinks on windows. + } + fs.symlinkSync( + path.join(tmpDir, 'foo'), + path.join(tmpDir, 'symlinked-foo')); + return io.tmpFile().then(function(f) { + return io.copy(path.join(tmpDir, 'symlinked-foo'), f).then(function(p) { + assert.equal(p, f); + assert.equal('Hello, world', fs.readFileSync(p)); + }); + }); + }); + + it('fails if given a directory as a source', function() { + return io.tmpFile().then(function(f) { + return io.copy(tmpDir, f); + }).then(function() { + throw Error('Should have failed with a type error'); + }, function() { + // Do nothing; expected. + }); + }); + }); + + describe('copyDir', function() { + it('copies recursively', function() { + return io.tmpDir().then(function(dir) { + fs.writeFileSync(path.join(dir, 'file1'), 'hello'); + fs.mkdirSync(path.join(dir, 'sub')); + fs.mkdirSync(path.join(dir, 'sub/folder')); + fs.writeFileSync(path.join(dir, 'sub/folder/file2'), 'goodbye'); + + return io.tmpDir().then(function(dst) { + return io.copyDir(dir, dst).then(function(ret) { + assert.equal(dst, ret); + + assert.equal('hello', + fs.readFileSync(path.join(dst, 'file1'))); + assert.equal('goodbye', + fs.readFileSync(path.join(dst, 'sub/folder/file2'))); + }); + }); + }); + }); + + it('creates destination dir if necessary', function() { + return io.tmpDir().then(function(srcDir) { + fs.writeFileSync(path.join(srcDir, 'foo'), 'hi'); + return io.tmpDir().then(function(dstDir) { + return io.copyDir(srcDir, path.join(dstDir, 'sub')); + }); + }).then(function(p) { + assert.equal('sub', path.basename(p)); + assert.equal('hi', fs.readFileSync(path.join(p, 'foo'))); + }); + }); + + it('supports regex exclusion filter', function() { + return io.tmpDir().then(function(src) { + fs.writeFileSync(path.join(src, 'foo'), 'a'); + fs.writeFileSync(path.join(src, 'bar'), 'b'); + fs.writeFileSync(path.join(src, 'baz'), 'c'); + fs.mkdirSync(path.join(src, 'sub')); + fs.writeFileSync(path.join(src, 'sub/quux'), 'd'); + fs.writeFileSync(path.join(src, 'sub/quot'), 'e'); + + return io.tmpDir().then(function(dst) { + return io.copyDir(src, dst, /(bar|quux)/); + }); + }).then(function(dir) { + assert.equal('a', fs.readFileSync(path.join(dir, 'foo'))); + assert.equal('c', fs.readFileSync(path.join(dir, 'baz'))); + assert.equal('e', fs.readFileSync(path.join(dir, 'sub/quot'))); + + assert.ok(!fs.existsSync(path.join(dir, 'bar'))); + assert.ok(!fs.existsSync(path.join(dir, 'sub/quux'))); + }); + }); + + it('supports exclusion filter function', function() { + return io.tmpDir().then(function(src) { + fs.writeFileSync(path.join(src, 'foo'), 'a'); + fs.writeFileSync(path.join(src, 'bar'), 'b'); + fs.writeFileSync(path.join(src, 'baz'), 'c'); + fs.mkdirSync(path.join(src, 'sub')); + fs.writeFileSync(path.join(src, 'sub/quux'), 'd'); + fs.writeFileSync(path.join(src, 'sub/quot'), 'e'); + + return io.tmpDir().then(function(dst) { + return io.copyDir(src, dst, function(f) { + return f !== path.join(src, 'foo') + && f !== path.join(src, 'sub/quot'); + }); + }); + }).then(function(dir) { + assert.equal('b', fs.readFileSync(path.join(dir, 'bar'))); + assert.equal('c', fs.readFileSync(path.join(dir, 'baz'))); + assert.equal('d', fs.readFileSync(path.join(dir, 'sub/quux'))); + + assert.ok(!fs.existsSync(path.join(dir, 'foo'))); + assert.ok(!fs.existsSync(path.join(dir, 'sub/quot'))); + }); + }); + }); + + describe('exists', function() { + var dir; + + before(function() { + return io.tmpDir().then(function(d) { + dir = d; + }); + }); + + it('returns a rejected promise if input value is invalid', function() { + return io.exists(undefined).then( + () => assert.fail('should have failed'), + e => assert.ok(e instanceof TypeError)); + }); + + it('works for directories', function() { + return io.exists(dir).then(assert.ok); + }); + + it('works for files', function() { + var file = path.join(dir, 'foo'); + fs.writeFileSync(file, ''); + return io.exists(file).then(assert.ok); + }); + + it('does not return a rejected promise if file does not exist', function() { + return io.exists(path.join(dir, 'not-there')).then(function(exists) { + assert.ok(!exists); + }); + }); + }); + + describe('unlink', function() { + var dir; + + before(function() { + return io.tmpDir().then(function(d) { + dir = d; + }); + }); + + it('silently succeeds if the path does not exist', function() { + return io.unlink(path.join(dir, 'not-there')); + }); + + it('deletes files', function() { + var file = path.join(dir, 'foo'); + fs.writeFileSync(file, ''); + return io.exists(file).then(assert.ok).then(function() { + return io.unlink(file); + }).then(function() { + return io.exists(file); + }).then(function(exists) { + return assert.ok(!exists); + }); + }); + }); + + describe('rmDir', function() { + it('succeeds if the designated directory does not exist', function() { + return io.tmpDir().then(function(d) { + return io.rmDir(path.join(d, 'i/do/not/exist')); + }); + }); + + it('deletes recursively', function() { + return io.tmpDir().then(function(dir) { + fs.writeFileSync(path.join(dir, 'file1'), 'hello'); + fs.mkdirSync(path.join(dir, 'sub')); + fs.mkdirSync(path.join(dir, 'sub/folder')); + fs.writeFileSync(path.join(dir, 'sub/folder/file2'), 'goodbye'); + + return io.rmDir(dir).then(function() { + assert.ok(!fs.existsSync(dir)); + assert.ok(!fs.existsSync(path.join(dir, 'sub/folder/file2'))); + }); + }); + }); + }); + + describe('findInPath', function() { + const savedPathEnv = process.env['PATH']; + afterEach(() => process.env['PATH'] = savedPathEnv); + + const cwd = process.cwd; + afterEach(() => process.cwd = cwd); + + let dirs; + beforeEach(() => { + return Promise.all([io.tmpDir(), io.tmpDir(), io.tmpDir()]).then(arr => { + dirs = arr; + process.env['PATH'] = arr.join(path.delimiter); + }); + }); + + it('returns null if file cannot be found', () => { + assert.strictEqual(io.findInPath('foo.txt'), null); + }); + + it('can find file on path', () => { + let filePath = path.join(dirs[1], 'foo.txt'); + fs.writeFileSync(filePath, 'hi'); + + assert.strictEqual(io.findInPath('foo.txt'), filePath); + }); + + it('returns null if file is in a subdir of a directory on the path', () => { + let subDir = path.join(dirs[2], 'sub'); + fs.mkdirSync(subDir); + + let filePath = path.join(subDir, 'foo.txt'); + fs.writeFileSync(filePath, 'hi'); + + assert.strictEqual(io.findInPath('foo.txt'), null); + }); + + it('does not match on directories', () => { + fs.mkdirSync(path.join(dirs[2], 'sub')); + assert.strictEqual(io.findInPath('sub'), null); + }); + + it('will look in cwd first if requested', () => { + return io.tmpDir().then(fakeCwd => { + process.cwd = () => fakeCwd; + + let theFile = path.join(fakeCwd, 'foo.txt'); + + fs.writeFileSync(path.join(dirs[1], 'foo.txt'), 'hi'); + fs.writeFileSync(theFile, 'bye'); + + assert.strictEqual(io.findInPath('foo.txt', true), theFile); + }); + }); + }); + + describe('read', function() { + var tmpDir; + + before(function() { + return io.tmpDir().then(function(d) { + tmpDir = d; + + fs.writeFileSync(path.join(d, 'foo'), 'Hello, world'); + }); + }); + + it('can read a file', function() { + return io.read(path.join(tmpDir, 'foo')).then(buff => { + assert.ok(buff instanceof Buffer); + assert.equal('Hello, world', buff.toString()); + }); + }); + + it('catches errors from invalid input', function() { + return io.read({}) + .then(() => assert.fail('should have failed'), + (e) => assert.ok(e instanceof TypeError)); + }); + + it('rejects returned promise if file does not exist', function() { + return io.read(path.join(tmpDir, 'not-there')) + .then(() => assert.fail('should have failed'), + (e) => assert.equal('ENOENT', e.code)); + }); + }); + + describe('mkdirp', function() { + it('recursively creates entire directory path', function() { + return io.tmpDir().then(root => { + let dst = path.join(root, 'foo/bar/baz'); + return io.mkdirp(dst).then(d => { + assert.strictEqual(d, dst); + return io.stat(d).then(stats => { + assert.ok(stats.isDirectory()); + }); + }); + }); + }); + + it('does nothing if the directory already exists', function() { + return io.tmpDir() + .then(dir => io.mkdirp(dir).then(d => assert.strictEqual(d, dir))); + }); + }); + + describe('walkDir', function() { + it('walk directory', function() { + return io.tmpDir().then(dir => { + fs.writeFileSync(path.join(dir, 'file1'), 'hello'); + fs.mkdirSync(path.join(dir, 'sub')); + fs.mkdirSync(path.join(dir, 'sub/folder')); + fs.writeFileSync(path.join(dir, 'sub/folder/file2'), 'goodbye'); + + return io.walkDir(dir).then(seen => { + assert.deepStrictEqual( + seen, + [{path: 'file1', dir: false}, + {path: 'sub', dir: true}, + {path: 'sub/folder', dir: true}, + {path: 'sub/folder/file2', dir: false}]); + }); + }); + }); + }) +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js b/test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js new file mode 100644 index 00000000..9d64778c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js @@ -0,0 +1,128 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +const io = require('../../io'); +const devmode = require('../../lib/devmode'); +const zip = require('../../io/zip'); +const {InvalidArgumentError} = require('../../lib/error'); + + +const SAMPLE_XPI_PATH = + path.join(__dirname, '../../lib/test/data/firefox/sample.xpi'); + +describe('io/zip', function() { + describe('unzip', function() { + it('creates destination dir if necessary', function() { + return io.tmpDir() + .then(dir => zip.unzip(SAMPLE_XPI_PATH, dir)) + .then(dir => { + assertExists(path.join(dir, 'chrome.manifest')); + assertExists(path.join(dir, 'content/overlay.js')); + assertExists(path.join(dir, 'content/overlay.xul')); + assertExists(path.join(dir, 'install.rdf')); + }); + }); + }); + + describe('Zip', function() { + let dir; + + beforeEach(function() { + return io.tmpDir().then(d => dir = d); + }); + + it('can convert an archive to a buffer', function() { + let z = new zip.Zip; + return io.mkdirp(path.join(dir, 'a/b/c/d/e')).then(() => { + return Promise.all([ + io.write(path.join(dir, 'foo'), 'a file'), + io.write(path.join(dir, 'a/b/c/carrot'), 'an orange carrot'), + io.write(path.join(dir, 'a/b/c/d/e/elephant'), 'e is for elephant') + ]); + }) + .then(() => z.addDir(dir)) + .then(() => Promise.all([io.tmpDir(), z.toBuffer()])) + .then(([outDir, buf]) => { + let output = path.join(outDir, 'out.zip'); + return io.write(output, buf) + .then(() => io.tmpDir()) + .then(d => zip.unzip(output, d)) + .then(d => { + assertContents(path.join(d, 'foo'), 'a file'); + assertContents(path.join(d, 'a/b/c/carrot'), 'an orange carrot'); + assertContents( + path.join(d, 'a/b/c/d/e/elephant'), + 'e is for elephant'); + }); + }); + }); + + describe('getFile', function() { + it('returns archive file contents as a buffer', function() { + let foo = path.join(dir, 'foo'); + fs.writeFileSync(foo, 'hello, world!'); + + let z = new zip.Zip; + return z.addFile(foo).then(() => { + assert.ok(z.has('foo')); + return z.getFile('foo'); + }).then( + buffer => assert.equal(buffer.toString('utf8'), 'hello, world!')); + }); + + it('returns an error if file is not in archive', function() { + let z = new zip.Zip; + assert.ok(!z.has('some-file')); + return z.getFile('some-file') + .then(() => assert.fail('should have failed'), + e => assert.strictEqual(e.constructor, InvalidArgumentError)); + }); + + it( + 'returns a rejected promise if the requested path is a directory', + function() { + let file = path.join(dir, 'aFile'); + fs.writeFileSync(file, 'hello, world!'); + + let z = new zip.Zip; + return z.addDir(dir, 'foo') + .then(() => z.getFile('foo')) + .then( + () => assert.fail('should have failed'), + e => assert.strictEqual( + e.constructor, InvalidArgumentError)) + .then(() => z.getFile('foo/aFile')) + .then(b => assert.equal(b.toString('utf8'), 'hello, world!')); + }); + }); + }); + + function assertExists(p) { + assert.ok(fs.existsSync(p), `expected ${p} to exist`); + } + + function assertContents(p, c) { + assert.strictEqual( + fs.readFileSync(p, 'utf8'), c, `unexpected file contents for ${p}`); + } +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js new file mode 100644 index 00000000..34314fbf --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js @@ -0,0 +1,160 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'); +var by = require('../../lib/by'); + +describe('by', function() { + describe('By', function() { + describe('className', function() { + it('delegates to By.css', function() { + let locator = by.By.className('foo'); + assert.equal('css selector', locator.using); + assert.equal('.foo', locator.value); + }); + + it('escapes class name', function() { + let locator = by.By.className('foo#bar'); + assert.equal('css selector', locator.using); + assert.equal('.foo\\#bar', locator.value); + }); + + it('translates compound class names', function() { + let locator = by.By.className('a b'); + assert.equal('css selector', locator.using); + assert.equal('.a.b', locator.value); + + locator = by.By.className(' x y z-1 "g" '); + assert.equal('css selector', locator.using); + assert.equal('.x.y.z-1.\\"g\\"', locator.value); + }); + }); + + describe('id', function() { + it('delegates to By.css', function() { + let locator = by.By.id('foo'); + assert.equal('css selector', locator.using); + assert.equal('*[id="foo"]', locator.value); + }); + + it('escapes the ID', function() { + let locator = by.By.id('foo#bar'); + assert.equal('css selector', locator.using); + assert.equal('*[id="foo\\#bar"]', locator.value); + }); + }); + + describe('name', function() { + it('delegates to By.css', function() { + let locator = by.By.name('foo') + assert.equal('css selector', locator.using); + assert.equal('*[name="foo"]', locator.value); + }); + + it('escapes the name', function() { + let locator = by.By.name('foo"bar"') + assert.equal('css selector', locator.using); + assert.equal('*[name="foo\\"bar\\""]', locator.value); + }); + + it('escapes the name when it starts with a number', function() { + let locator = by.By.name('123foo"bar"') + assert.equal('css selector', locator.using); + assert.equal('*[name="\\31 23foo\\"bar\\""]', locator.value); + }); + + it('escapes the name when it starts with a negative number', function() { + let locator = by.By.name('-123foo"bar"') + assert.equal('css selector', locator.using); + assert.equal('*[name="-\\31 23foo\\"bar\\""]', locator.value); + }); + }); + }); + + describe('checkedLocator', function() { + it('accepts a By instance', function() { + let original = by.By.name('foo'); + let locator = by.checkedLocator(original); + assert.strictEqual(locator, original); + }); + + it('accepts custom locator functions', function() { + let original = function() {}; + let locator = by.checkedLocator(original); + assert.strictEqual(locator, original); + }); + + // See https://github.com/SeleniumHQ/selenium/issues/3056 + it('accepts By-like objects', function() { + let fakeBy = {using: 'id', value: 'foo'}; + let locator = by.checkedLocator(fakeBy); + assert.strictEqual(locator.constructor, by.By); + assert.equal(locator.using, 'id'); + assert.equal(locator.value, 'foo'); + }); + + it('accepts class name', function() { + let locator = by.checkedLocator({className: 'foo'}); + assert.equal('css selector', locator.using); + assert.equal('.foo', locator.value); + }); + + it('accepts css', function() { + let locator = by.checkedLocator({css: 'a > b'}); + assert.equal('css selector', locator.using); + assert.equal('a > b', locator.value); + }); + + it('accepts id', function() { + let locator = by.checkedLocator({id: 'foobar'}); + assert.equal('css selector', locator.using); + assert.equal('*[id="foobar"]', locator.value); + }); + + it('accepts linkText', function() { + let locator = by.checkedLocator({linkText: 'hello'}); + assert.equal('link text', locator.using); + assert.equal('hello', locator.value); + }); + + it('accepts name', function() { + let locator = by.checkedLocator({name: 'foobar'}); + assert.equal('css selector', locator.using); + assert.equal('*[name="foobar"]', locator.value); + }); + + it('accepts partialLinkText', function() { + let locator = by.checkedLocator({partialLinkText: 'hello'}); + assert.equal('partial link text', locator.using); + assert.equal('hello', locator.value); + }); + + it('accepts tagName', function() { + let locator = by.checkedLocator({tagName: 'div'}); + assert.equal('css selector', locator.using); + assert.equal('div', locator.value); + }); + + it('accepts xpath', function() { + let locator = by.checkedLocator({xpath: '//div[1]'}); + assert.equal('xpath', locator.using); + assert.equal('//div[1]', locator.value); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js new file mode 100644 index 00000000..0d0c67c9 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js @@ -0,0 +1,111 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const Capabilities = require('../../lib/capabilities').Capabilities; +const Symbols = require('../../lib/symbols'); + +const assert = require('assert'); + +describe('Capabilities', function() { + it('can set and unset a capability', function() { + let caps = new Capabilities(); + assert.equal(undefined, caps.get('foo')); + assert.ok(!caps.has('foo')); + + caps.set('foo', 'bar'); + assert.equal('bar', caps.get('foo')); + assert.ok(caps.has('foo')); + + caps.set('foo', null); + assert.equal(null, caps.get('foo')); + assert.ok(caps.has('foo')); + }); + + it('requires string capability keys', function() { + let caps = new Capabilities(); + assert.throws(() => caps.set({}, 'hi')); + }); + + it('can merge capabilities', function() { + let caps1 = new Capabilities() + .set('foo', 'bar') + .set('color', 'red'); + + let caps2 = new Capabilities() + .set('color', 'green'); + + assert.equal('bar', caps1.get('foo')); + assert.equal('red', caps1.get('color')); + assert.equal('green', caps2.get('color')); + assert.equal(undefined, caps2.get('foo')); + + caps2.merge(caps1); + assert.equal('bar', caps1.get('foo')); + assert.equal('red', caps1.get('color')); + assert.equal('red', caps2.get('color')); + assert.equal('bar', caps2.get('foo')); + }); + + it('can be initialized from a hash object', function() { + let caps = new Capabilities({'one': 123, 'abc': 'def'}); + assert.equal(123, caps.get('one')); + assert.equal('def', caps.get('abc')); + }); + + it('can be initialized from a map', function() { + let m = new Map([['one', 123], ['abc', 'def']]); + + let caps = new Capabilities(m); + assert.equal(123, caps.get('one')); + assert.equal('def', caps.get('abc')); + }); + + describe('serialize', function() { + it('works for simple capabilities', function() { + let m = new Map([['one', 123], ['abc', 'def']]); + let caps = new Capabilities(m); + assert.deepEqual({one: 123, abc: 'def'}, caps[Symbols.serialize]()); + }); + + it('does not omit capabilities set to a false-like value', function() { + let caps = new Capabilities; + caps.set('bool', false); + caps.set('number', 0); + caps.set('string', ''); + + assert.deepEqual( + {bool: false, number: 0, string: ''}, + caps[Symbols.serialize]()); + }); + + it('omits capabilities with a null value', function() { + let caps = new Capabilities; + caps.set('foo', null); + caps.set('bar', 123); + assert.deepEqual({bar: 123}, caps[Symbols.serialize]()); + }); + + it('omits capabilities with an undefined value', function() { + let caps = new Capabilities; + caps.set('foo', undefined); + caps.set('bar', 123); + assert.deepEqual({bar: 123}, caps[Symbols.serialize]()); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js new file mode 100644 index 00000000..b92052f4 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js @@ -0,0 +1,306 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +describe('error', function() { + let assert = require('assert'); + let error = require('../../lib/error'); + + describe('checkResponse', function() { + it('defaults to WebDriverError if type is unrecognized', function() { + assert.throws( + () => error.checkResponse({error: 'foo', message: 'hi there'}), + (e) => { + assert.equal(e.constructor, error.WebDriverError); + return true; + }); + }); + + it('does not throw if error property is not a string', function() { + let resp = {error: 123, message: 'abc123'}; + let out = error.checkResponse(resp); + assert.strictEqual(out, resp); + }); + + test('unknown error', error.WebDriverError); + test('element not interactable', error.ElementNotInteractableError); + test('element not selectable', error.ElementNotSelectableError); + test('element not visible', error.ElementNotVisibleError); + test('invalid argument', error.InvalidArgumentError); + test('invalid cookie domain', error.InvalidCookieDomainError); + test('invalid element coordinates', error.InvalidElementCoordinatesError); + test('invalid element state', error.InvalidElementStateError); + test('invalid selector', error.InvalidSelectorError); + test('invalid session id', error.NoSuchSessionError); + test('javascript error', error.JavascriptError); + test('move target out of bounds', error.MoveTargetOutOfBoundsError); + test('no such alert', error.NoSuchAlertError); + test('no such element', error.NoSuchElementError); + test('no such frame', error.NoSuchFrameError); + test('no such window', error.NoSuchWindowError); + test('script timeout', error.ScriptTimeoutError); + test('session not created', error.SessionNotCreatedError); + test('stale element reference', error.StaleElementReferenceError); + test('timeout', error.TimeoutError); + test('unable to set cookie', error.UnableToSetCookieError); + test('unable to capture screen', error.UnableToCaptureScreenError); + test('unexpected alert open', error.UnexpectedAlertOpenError); + test('unknown command', error.UnknownCommandError); + test('unknown method', error.UnknownMethodError); + test('unsupported operation', error.UnsupportedOperationError); + + function test(status, expectedType) { + it(`"${status}" => ${expectedType.name}`, function() { + assert.throws( + () => error.checkResponse({error: status, message: 'oops'}), + (e) => { + assert.equal(expectedType, e.constructor); + assert.equal(e.message, 'oops'); + return true; + }); + }); + } + }); + + describe('encodeError', function() { + describe('defaults to an unknown error', function() { + it('for a generic error value', function() { + runTest('hi', 'unknown error', 'hi'); + runTest(1, 'unknown error', '1'); + runTest({}, 'unknown error', '[object Object]'); + }); + + it('for a generic Error object', function() { + runTest(Error('oops'), 'unknown error', 'oops'); + runTest(TypeError('bad value'), 'unknown error', 'bad value'); + }); + }); + + test(error.WebDriverError, 'unknown error'); + test(error.ElementNotSelectableError, 'element not selectable'); + test(error.ElementNotVisibleError, 'element not visible'); + test(error.InvalidArgumentError, 'invalid argument'); + test(error.InvalidCookieDomainError, 'invalid cookie domain'); + test(error.InvalidElementStateError, 'invalid element state'); + test(error.InvalidSelectorError, 'invalid selector'); + test(error.NoSuchSessionError, 'invalid session id'); + test(error.JavascriptError, 'javascript error'); + test(error.MoveTargetOutOfBoundsError, 'move target out of bounds'); + test(error.NoSuchAlertError, 'no such alert'); + test(error.NoSuchElementError, 'no such element'); + test(error.NoSuchFrameError, 'no such frame'); + test(error.NoSuchWindowError, 'no such window'); + test(error.ScriptTimeoutError, 'script timeout'); + test(error.SessionNotCreatedError, 'session not created'); + test(error.StaleElementReferenceError, 'stale element reference'); + test(error.TimeoutError, 'timeout'); + test(error.UnableToSetCookieError, 'unable to set cookie'); + test(error.UnableToCaptureScreenError, 'unable to capture screen'); + test(error.UnexpectedAlertOpenError, 'unexpected alert open'); + test(error.UnknownCommandError, 'unknown command'); + test(error.UnknownMethodError, 'unknown method'); + test(error.UnsupportedOperationError, 'unsupported operation'); + + function test(ctor, code) { + it(`${ctor.name} => "${code}"`, () => { + runTest(new ctor('oops'), code, 'oops'); + }); + } + + function runTest(err, code, message) { + let obj = error.encodeError(err); + assert.strictEqual(obj['error'], code); + assert.strictEqual(obj['message'], message); + } + }); + + describe('throwDecodedError', function() { + it('defaults to WebDriverError if type is unrecognized', function() { + assert.throws( + () => error.throwDecodedError({error: 'foo', message: 'hi there'}), + (e) => { + assert.equal(e.constructor, error.WebDriverError); + return true; + }); + }); + + it('throws generic error if encoded data is not valid', function() { + assert.throws( + () => error.throwDecodedError({error: 123, message: 'abc123'}), + (e) => { + assert.strictEqual(e.constructor, error.WebDriverError); + return true; + }); + + assert.throws( + () => error.throwDecodedError('null'), + (e) => { + assert.strictEqual(e.constructor, error.WebDriverError); + return true; + }); + + assert.throws( + () => error.throwDecodedError(''), + (e) => { + assert.strictEqual(e.constructor, error.WebDriverError); + return true; + }); + }); + + test('unknown error', error.WebDriverError); + test('element not selectable', error.ElementNotSelectableError); + test('element not visible', error.ElementNotVisibleError); + test('invalid argument', error.InvalidArgumentError); + test('invalid cookie domain', error.InvalidCookieDomainError); + test('invalid element coordinates', error.InvalidElementCoordinatesError); + test('invalid element state', error.InvalidElementStateError); + test('invalid selector', error.InvalidSelectorError); + test('invalid session id', error.NoSuchSessionError); + test('javascript error', error.JavascriptError); + test('move target out of bounds', error.MoveTargetOutOfBoundsError); + test('no such alert', error.NoSuchAlertError); + test('no such element', error.NoSuchElementError); + test('no such frame', error.NoSuchFrameError); + test('no such window', error.NoSuchWindowError); + test('script timeout', error.ScriptTimeoutError); + test('session not created', error.SessionNotCreatedError); + test('stale element reference', error.StaleElementReferenceError); + test('timeout', error.TimeoutError); + test('unable to set cookie', error.UnableToSetCookieError); + test('unable to capture screen', error.UnableToCaptureScreenError); + test('unexpected alert open', error.UnexpectedAlertOpenError); + test('unknown command', error.UnknownCommandError); + test('unknown method', error.UnknownMethodError); + test('unsupported operation', error.UnsupportedOperationError); + + it('leaves remoteStacktrace empty if not in encoding', function() { + assert.throws( + () => error.throwDecodedError({ + error: 'session not created', + message: 'oops' + }), + (e) => { + assert.strictEqual(e.constructor, error.SessionNotCreatedError); + assert.strictEqual(e.message, 'oops'); + assert.strictEqual(e.remoteStacktrace, ''); + return true; + }); + }); + + function test(status, expectedType) { + it(`"${status}" => ${expectedType.name}`, function() { + assert.throws( + () => error.throwDecodedError({ + error: status, + message: 'oops', + stacktrace: 'some-stacktrace' + }), + (e) => { + assert.strictEqual(e.constructor, expectedType); + assert.strictEqual(e.message, 'oops'); + assert.strictEqual(e.remoteStacktrace, 'some-stacktrace'); + return true; + }); + }); + } + }); + + describe('checkLegacyResponse', function() { + it('does not throw for success', function() { + let resp = {status: error.ErrorCode.SUCCESS}; + assert.strictEqual(resp, error.checkLegacyResponse(resp)); + }); + + test('NO_SUCH_ELEMENT', error.NoSuchElementError); + test('NO_SUCH_FRAME', error.NoSuchFrameError); + test('UNKNOWN_COMMAND', error.UnsupportedOperationError); + test('UNSUPPORTED_OPERATION', error.UnsupportedOperationError); + test('STALE_ELEMENT_REFERENCE', error.StaleElementReferenceError); + test('ELEMENT_NOT_VISIBLE', error.ElementNotVisibleError); + test('INVALID_ELEMENT_STATE', error.InvalidElementStateError); + test('UNKNOWN_ERROR', error.WebDriverError); + test('ELEMENT_NOT_SELECTABLE', error.ElementNotSelectableError); + test('JAVASCRIPT_ERROR', error.JavascriptError); + test('XPATH_LOOKUP_ERROR', error.InvalidSelectorError); + test('TIMEOUT', error.TimeoutError); + test('NO_SUCH_WINDOW', error.NoSuchWindowError); + test('INVALID_COOKIE_DOMAIN', error.InvalidCookieDomainError); + test('UNABLE_TO_SET_COOKIE', error.UnableToSetCookieError); + test('UNEXPECTED_ALERT_OPEN', error.UnexpectedAlertOpenError); + test('NO_SUCH_ALERT', error.NoSuchAlertError); + test('SCRIPT_TIMEOUT', error.ScriptTimeoutError); + test('INVALID_ELEMENT_COORDINATES', error.InvalidElementCoordinatesError); + test('INVALID_SELECTOR_ERROR', error.InvalidSelectorError); + test('SESSION_NOT_CREATED', error.SessionNotCreatedError); + test('MOVE_TARGET_OUT_OF_BOUNDS', error.MoveTargetOutOfBoundsError); + test('INVALID_XPATH_SELECTOR', error.InvalidSelectorError); + test('INVALID_XPATH_SELECTOR_RETURN_TYPE', error.InvalidSelectorError); + test('METHOD_NOT_ALLOWED', error.UnsupportedOperationError); + + describe('UnexpectedAlertOpenError', function() { + it('includes alert text from the response object', function() { + let response = { + status: error.ErrorCode.UNEXPECTED_ALERT_OPEN, + value: { + message: 'hi', + alert: {text: 'alert text here'} + } + }; + assert.throws( + () => error.checkLegacyResponse(response), + (e) => { + assert.equal(error.UnexpectedAlertOpenError, e.constructor); + assert.equal(e.message, 'hi'); + assert.equal(e.getAlertText(), 'alert text here'); + return true; + }); + }); + + it('uses an empty string if alert text omitted', function() { + let response = { + status: error.ErrorCode.UNEXPECTED_ALERT_OPEN, + value: { + message: 'hi' + } + }; + assert.throws( + () => error.checkLegacyResponse(response), + (e) => { + assert.equal(error.UnexpectedAlertOpenError, e.constructor); + assert.equal(e.message, 'hi'); + assert.equal(e.getAlertText(), ''); + return true; + }); + }); + }); + + function test(codeKey, expectedType) { + it(`${codeKey} => ${expectedType.name}`, function() { + let code = error.ErrorCode[codeKey]; + let resp = {status: code, value: {message: 'hi'}}; + assert.throws( + () => error.checkLegacyResponse(resp), + (e) => { + assert.equal(expectedType, e.constructor); + assert.equal(e.message, 'hi'); + return true; + }); + }); + } + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js new file mode 100644 index 00000000..a02da974 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js @@ -0,0 +1,177 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const EventEmitter = require('../../lib/events').EventEmitter; + +const assert = require('assert'); +const sinon = require('sinon'); + +describe('EventEmitter', function() { + describe('#emit()', function() { + it('can emit events when nothing is registered', function() { + let emitter = new EventEmitter; + emitter.emit('foo'); + // Ok if no errors are thrown. + }); + + it('can pass args to listeners on emit', function() { + let emitter = new EventEmitter; + let now = Date.now(); + + let messages = []; + emitter.on('foo', (arg) => messages.push(arg)); + + emitter.emit('foo', now); + assert.deepEqual([now], messages); + + emitter.emit('foo', now + 15); + assert.deepEqual([now, now + 15], messages); + }); + }); + + describe('#addListener()', function() { + it('can add multiple listeners for one event', function() { + let emitter = new EventEmitter; + let count = 0; + emitter.addListener('foo', () => count++); + emitter.addListener('foo', () => count++); + emitter.addListener('foo', () => count++); + emitter.emit('foo'); + assert.equal(3, count); + }); + + it('only registers each listener function once', function() { + let emitter = new EventEmitter; + let count = 0; + let onFoo = () => count++; + emitter.addListener('foo', onFoo); + emitter.addListener('foo', onFoo); + emitter.addListener('foo', onFoo); + + emitter.emit('foo'); + assert.equal(1, count); + + emitter.emit('foo'); + assert.equal(2, count); + }); + + it('allows users to specify a custom scope', function() { + let obj = { + count: 0, + inc: function() { + this.count++; + } + }; + let emitter = new EventEmitter; + emitter.addListener('foo', obj.inc, obj); + + emitter.emit('foo'); + assert.equal(1, obj.count); + + emitter.emit('foo'); + assert.equal(2, obj.count); + }); + }); + + describe('#once()', function() { + it('only calls registered callback once', function() { + let emitter = new EventEmitter; + let count = 0; + emitter.once('foo', () => count++); + emitter.once('foo', () => count++); + emitter.once('foo', () => count++); + + emitter.emit('foo'); + assert.equal(3, count); + + emitter.emit('foo'); + assert.equal(3, count); + + emitter.emit('foo'); + assert.equal(3, count); + }); + }); + + describe('#removeListeners()', function() { + it('only removes the given listener function', function() { + let emitter = new EventEmitter; + let count = 0; + emitter.addListener('foo', () => count++); + emitter.addListener('foo', () => count++); + + let toRemove = () => count++; + emitter.addListener('foo', toRemove); + + emitter.emit('foo'); + assert.equal(3, count); + + emitter.removeListener('foo', toRemove); + emitter.emit('foo'); + assert.equal(5, count); + }); + }); + + describe('#removeAllListeners()', function() { + it('only removes listeners for type if specified', function() { + let emitter = new EventEmitter; + let count = 0; + emitter.addListener('foo', () => count++); + emitter.addListener('foo', () => count++); + emitter.addListener('foo', () => count++); + emitter.addListener('bar', () => count++); + + emitter.emit('foo'); + assert.equal(3, count); + + emitter.removeAllListeners('foo'); + + emitter.emit('foo'); + assert.equal(3, count); + + emitter.emit('bar'); + assert.equal(4, count); + }); + + it('removes absolutely all listeners if no type specified', function() { + let emitter = new EventEmitter; + let count = 0; + emitter.addListener('foo', () => count++); + emitter.addListener('bar', () => count++); + emitter.addListener('baz', () => count++); + emitter.addListener('baz', () => count++); + + emitter.emit('foo'); + assert.equal(1, count); + + emitter.emit('baz'); + assert.equal(3, count); + + emitter.removeAllListeners(); + + emitter.emit('foo'); + assert.equal(3, count); + + emitter.emit('bar'); + assert.equal(3, count); + + emitter.emit('baz'); + assert.equal(3, count); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js new file mode 100644 index 00000000..7cb0050f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js @@ -0,0 +1,696 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + sinon = require('sinon'); + +var Capabilities = require('../../lib/capabilities').Capabilities, + Command = require('../../lib/command').Command, + CommandName = require('../../lib/command').Name, + error = require('../../lib/error'), + http = require('../../lib/http'), + Session = require('../../lib/session').Session, + promise = require('../../lib/promise'), + WebElement = require('../../lib/webdriver').WebElement; + +describe('http', function() { + describe('buildPath', function() { + it('properly replaces path segments with command parameters', function() { + var parameters = {'sessionId':'foo', 'url':'http://www.google.com'}; + var finalPath = http.buildPath('/session/:sessionId/url', parameters); + assert.equal(finalPath, '/session/foo/url'); + assert.deepEqual(parameters, {'url':'http://www.google.com'}); + }); + + it('handles web element references', function() { + var parameters = {'sessionId':'foo', 'id': WebElement.buildId('bar')}; + + var finalPath = http.buildPath( + '/session/:sessionId/element/:id/click', parameters); + assert.equal(finalPath, '/session/foo/element/bar/click'); + assert.deepEqual(parameters, {}); + }); + + it('throws if missing a parameter', function() { + assert.throws( + () => http.buildPath('/session/:sessionId', {}), + function(err) { + return err instanceof error.InvalidArgumentError + && 'Missing required parameter: sessionId' === err.message; + }); + + assert.throws( + () => http.buildPath( + '/session/:sessionId/element/:id', {'sessionId': 'foo'}), + function(err) { + return err instanceof error.InvalidArgumentError + && 'Missing required parameter: id' === err.message; + }); + }); + + it('does not match on segments that do not start with a colon', function() { + assert.equal( + http.buildPath('/session/foo:bar/baz', {}), + '/session/foo:bar/baz'); + }); + }); + + describe('Executor', function() { + let executor; + let client; + let send; + + beforeEach(function setUp() { + client = new http.Client; + send = sinon.stub(client, 'send'); + executor = new http.Executor(client); + }); + + describe('command routing', function() { + it('rejects unrecognized commands', function() { + return executor.execute(new Command('fake-name')) + .then(assert.fail, err => { + if (err instanceof error.UnknownCommandError + && 'Unrecognized command: fake-name' === err.message) { + return; + } + throw err; + }) + }); + + it('rejects promise if client fails to send request', function() { + let error = new Error('boom'); + send.returns(Promise.reject(error)); + return assertFailsToSend(new Command(CommandName.NEW_SESSION)) + .then(function(e) { + assert.strictEqual(error, e); + assertSent( + 'POST', '/session', {}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + + it('can execute commands with no URL parameters', function() { + var resp = JSON.stringify({sessionId: 'abc123'}); + send.returns(Promise.resolve(new http.Response(200, {}, resp))); + + let command = new Command(CommandName.NEW_SESSION); + return assertSendsSuccessfully(command).then(function(response) { + assertSent( + 'POST', '/session', {}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + + it('rejects commands missing URL parameters', function() { + let command = + new Command(CommandName.FIND_CHILD_ELEMENT). + setParameter('sessionId', 's123'). + // Let this be missing: setParameter('id', {'ELEMENT': 'e456'}). + setParameter('using', 'id'). + setParameter('value', 'foo'); + + assert.throws( + () => executor.execute(command), + function(err) { + return err instanceof error.InvalidArgumentError + && 'Missing required parameter: id' === err.message; + }); + assert.ok(!send.called); + }); + + it('replaces URL parameters with command parameters', function() { + var command = new Command(CommandName.GET). + setParameter('sessionId', 's123'). + setParameter('url', 'http://www.google.com'); + + send.returns(Promise.resolve(new http.Response(200, {}, ''))); + + return assertSendsSuccessfully(command).then(function(response) { + assertSent( + 'POST', '/session/s123/url', {'url': 'http://www.google.com'}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + + describe('uses correct URL', function() { + beforeEach(() => executor = new http.Executor(client)); + + describe('in legacy mode', function() { + test(CommandName.GET_WINDOW_SIZE, {sessionId:'s123'}, false, + 'GET', '/session/s123/window/current/size'); + + test(CommandName.SET_WINDOW_SIZE, + {sessionId:'s123', width: 1, height: 1}, false, + 'POST', '/session/s123/window/current/size', + {width: 1, height: 1}); + + test(CommandName.MAXIMIZE_WINDOW, {sessionId:'s123'}, false, + 'POST', '/session/s123/window/current/maximize'); + + // This is consistent b/w legacy and W3C, just making sure. + test(CommandName.GET, + {sessionId:'s123', url: 'http://www.example.com'}, false, + 'POST', '/session/s123/url', {url: 'http://www.example.com'}); + }); + + describe('in W3C mode', function() { + test(CommandName.GET_WINDOW_SIZE, + {sessionId:'s123'}, true, + 'GET', '/session/s123/window/size'); + + test(CommandName.SET_WINDOW_SIZE, + {sessionId:'s123', width: 1, height: 1}, true, + 'POST', '/session/s123/window/size', {width: 1, height: 1}); + + test(CommandName.MAXIMIZE_WINDOW, {sessionId:'s123'}, true, + 'POST', '/session/s123/window/maximize'); + + // This is consistent b/w legacy and W3C, just making sure. + test(CommandName.GET, + {sessionId:'s123', url: 'http://www.example.com'}, true, + 'POST', '/session/s123/url', {url: 'http://www.example.com'}); + }); + + function test(command, parameters, w3c, + expectedMethod, expectedUrl, opt_expectedParams) { + it(`command=${command}`, function() { + var resp = JSON.stringify({sessionId: 'abc123'}); + send.returns(Promise.resolve(new http.Response(200, {}, resp))); + + let cmd = new Command(command).setParameters(parameters); + executor.w3c = w3c; + return executor.execute(cmd).then(function() { + assertSent( + expectedMethod, expectedUrl, opt_expectedParams || {}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + } + }); + }); + + describe('response parsing', function() { + it('extracts value from JSON response', function() { + var responseObj = { + 'status': error.ErrorCode.SUCCESS, + 'value': 'http://www.google.com' + }; + + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(responseObj)))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, 'http://www.google.com'); + }); + }); + + describe('extracts Session from NEW_SESSION response', function() { + beforeEach(() => executor = new http.Executor(client)); + + const command = new Command(CommandName.NEW_SESSION); + + describe('fails if server returns invalid response', function() { + describe('(empty response)', function() { + test(true); + test(false); + + function test(w3c) { + it('w3c === ' + w3c, function() { + send.returns(Promise.resolve(new http.Response(200, {}, ''))); + executor.w3c = w3c; + return executor.execute(command).then( + () => assert.fail('expected to fail'), + (e) => { + if (!e.message.startsWith('Unable to parse')) { + throw e; + } + }); + }); + } + }); + + describe('(no session ID)', function() { + test(true); + test(false); + + function test(w3c) { + it('w3c === ' + w3c, function() { + let resp = {value:{name: 'Bob'}}; + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(resp)))); + executor.w3c = w3c; + return executor.execute(command).then( + () => assert.fail('expected to fail'), + (e) => { + if (!e.message.startsWith('Unable to parse')) { + throw e; + } + }); + }); + } + }); + }); + + it('handles legacy response', function() { + var rawResponse = {sessionId: 's123', status: 0, value: {name: 'Bob'}}; + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(rawResponse)))); + + assert.ok(!executor.w3c); + return executor.execute(command).then(function(response) { + assert.ok(response instanceof Session); + assert.equal(response.getId(), 's123'); + + let caps = response.getCapabilities(); + assert.ok(caps instanceof Capabilities); + assert.equal(caps.get('name'), 'Bob'); + + assert.ok(!executor.w3c); + }); + }); + + it('auto-upgrades on W3C response', function() { + let rawResponse = { + value: { + sessionId: 's123', + value: { + name: 'Bob' + } + } + }; + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(rawResponse)))); + + assert.ok(!executor.w3c); + return executor.execute(command).then(function(response) { + assert.ok(response instanceof Session); + assert.equal(response.getId(), 's123'); + + let caps = response.getCapabilities(); + assert.ok(caps instanceof Capabilities); + assert.equal(caps.get('name'), 'Bob'); + + assert.ok(executor.w3c); + }); + }); + + it('if w3c, does not downgrade on legacy response', function() { + var rawResponse = {sessionId: 's123', status: 0, value: null}; + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(rawResponse)))); + + executor.w3c = true; + return executor.execute(command).then(function(response) { + assert.ok(response instanceof Session); + assert.equal(response.getId(), 's123'); + assert.equal(response.getCapabilities().size, 0); + assert.ok(executor.w3c, 'should never downgrade'); + }); + }); + + it('handles legacy new session failures', function() { + let rawResponse = { + status: error.ErrorCode.NO_SUCH_ELEMENT, + value: {message: 'hi'} + }; + + send.returns(Promise.resolve( + new http.Response(500, {}, JSON.stringify(rawResponse)))); + + return executor.execute(command) + .then(() => assert.fail('should have failed'), + e => { + assert.ok(e instanceof error.NoSuchElementError); + assert.equal(e.message, 'hi'); + }); + }); + + it('handles w3c new session failures', function() { + let rawResponse = + {value: {error: 'no such element', message: 'oops'}}; + + send.returns(Promise.resolve( + new http.Response(500, {}, JSON.stringify(rawResponse)))); + + return executor.execute(command) + .then(() => assert.fail('should have failed'), + e => { + assert.ok(e instanceof error.NoSuchElementError); + assert.equal(e.message, 'oops'); + }); + }); + }); + + describe('extracts Session from DESCRIBE_SESSION response', function() { + let command; + + beforeEach(function() { + executor = new http.Executor(client); + command = new Command(CommandName.DESCRIBE_SESSION) + .setParameter('sessionId', 'foo'); + }); + + describe('fails if server returns invalid response', function() { + describe('(empty response)', function() { + test(true); + test(false); + + function test(w3c) { + it('w3c === ' + w3c, function() { + send.returns(Promise.resolve(new http.Response(200, {}, ''))); + executor.w3c = w3c; + return executor.execute(command).then( + () => assert.fail('expected to fail'), + (e) => { + if (!e.message.startsWith('Unable to parse')) { + throw e; + } + }); + }); + } + }); + + describe('(no session ID)', function() { + test(true); + test(false); + + function test(w3c) { + it('w3c === ' + w3c, function() { + let resp = {value:{name: 'Bob'}}; + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(resp)))); + executor.w3c = w3c; + return executor.execute(command).then( + () => assert.fail('expected to fail'), + (e) => { + if (!e.message.startsWith('Unable to parse')) { + throw e; + } + }); + }); + } + }); + }); + + it('handles legacy response', function() { + var rawResponse = {sessionId: 's123', status: 0, value: {name: 'Bob'}}; + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(rawResponse)))); + + assert.ok(!executor.w3c); + return executor.execute(command).then(function(response) { + assert.ok(response instanceof Session); + assert.equal(response.getId(), 's123'); + + let caps = response.getCapabilities(); + assert.ok(caps instanceof Capabilities); + assert.equal(caps.get('name'), 'Bob'); + + assert.ok(!executor.w3c); + }); + }); + + it('does not auto-upgrade on W3C response', function() { + var rawResponse = {value: {sessionId: 's123', value: {name: 'Bob'}}}; + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(rawResponse)))); + + assert.ok(!executor.w3c); + return executor.execute(command).then(function(response) { + assert.ok(response instanceof Session); + assert.equal(response.getId(), 's123'); + + let caps = response.getCapabilities(); + assert.ok(caps instanceof Capabilities); + assert.equal(caps.get('name'), 'Bob'); + + assert.ok(!executor.w3c); + }); + }); + + it('if w3c, does not downgrade on legacy response', function() { + var rawResponse = {sessionId: 's123', status: 0, value: null}; + + send.returns(Promise.resolve( + new http.Response(200, {}, JSON.stringify(rawResponse)))); + + executor.w3c = true; + return executor.execute(command).then(function(response) { + assert.ok(response instanceof Session); + assert.equal(response.getId(), 's123'); + assert.equal(response.getCapabilities().size, 0); + assert.ok(executor.w3c, 'should never downgrade'); + }); + }); + }); + + it('handles JSON null', function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve(new http.Response(200, {}, 'null'))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, null); + }); + }); + + describe('falsy values', function() { + test(0); + test(false); + test(''); + + function test(value) { + it(`value=${value}`, function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve( + new http.Response(200, {}, + JSON.stringify({status: 0, value: value})))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, value); + }); + }); + } + }); + + it('handles non-object JSON', function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve(new http.Response(200, {}, '123'))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, 123); + }); + }); + + it('returns body text when 2xx but not JSON', function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve( + new http.Response(200, {}, 'hello, world\r\ngoodbye, world!'))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, 'hello, world\ngoodbye, world!'); + }); + }); + + it('returns body text when 2xx but invalid JSON', function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve( + new http.Response(200, {}, '['))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, '['); + }); + }); + + it('returns null if no body text and 2xx', function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve(new http.Response(200, {}, ''))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, null); + }); + }); + + it('returns normalized body text when 2xx but not JSON', function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve(new http.Response(200, {}, '\r\n\n\n\r\n'))); + + return executor.execute(command).then(function(response) { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + assert.strictEqual(response, '\n\n\n\n'); + }); + }); + + it('throws UnsupportedOperationError for 404 and body not JSON', + function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve( + new http.Response(404, {}, 'hello, world\r\ngoodbye, world!'))); + + return executor.execute(command) + .then( + () => assert.fail('should have failed'), + checkError( + error.UnsupportedOperationError, + 'hello, world\ngoodbye, world!')); + }); + + it('throws WebDriverError for generic 4xx when body not JSON', + function() { + var command = new Command(CommandName.GET_CURRENT_URL) + .setParameter('sessionId', 's123'); + + send.returns(Promise.resolve( + new http.Response(500, {}, 'hello, world\r\ngoodbye, world!'))); + + return executor.execute(command) + .then( + () => assert.fail('should have failed'), + checkError( + error.WebDriverError, + 'hello, world\ngoodbye, world!')) + .then(function() { + assertSent('GET', '/session/s123/url', {}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + }); + + it('canDefineNewCommands', function() { + executor.defineCommand('greet', 'GET', '/person/:name'); + + var command = new Command('greet'). + setParameter('name', 'Bob'); + + send.returns(Promise.resolve(new http.Response(200, {}, ''))); + + return assertSendsSuccessfully(command).then(function(response) { + assertSent('GET', '/person/Bob', {}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + + it('canRedefineStandardCommands', function() { + executor.defineCommand(CommandName.GO_BACK, 'POST', '/custom/back'); + + var command = new Command(CommandName.GO_BACK). + setParameter('times', 3); + + send.returns(Promise.resolve(new http.Response(200, {}, ''))); + + return assertSendsSuccessfully(command).then(function(response) { + assertSent('POST', '/custom/back', {'times': 3}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + + it('accepts promised http clients', function() { + executor = new http.Executor(Promise.resolve(client)); + + var resp = JSON.stringify({sessionId: 'abc123'}); + send.returns(Promise.resolve(new http.Response(200, {}, resp))); + + let command = new Command(CommandName.NEW_SESSION); + return executor.execute(command).then(response => { + assertSent( + 'POST', '/session', {}, + [['Accept', 'application/json; charset=utf-8']]); + }); + }); + + function entries(map) { + let entries = []; + for (let e of map.entries()) { + entries.push(e); + } + return entries; + } + + function checkError(type, message) { + return function(e) { + if (e instanceof type) { + assert.strictEqual(e.message, message); + } else { + throw e; + } + }; + } + + function assertSent(method, path, data, headers) { + assert.ok(send.calledWith(sinon.match(function(value) { + assert.equal(value.method, method); + assert.equal(value.path, path); + assert.deepEqual(value.data, data); + assert.deepEqual(entries(value.headers), headers); + return true; + }))); + } + + function assertSendsSuccessfully(command) { + return executor.execute(command).then(function(response) { + return response; + }); + } + + function assertFailsToSend(command, opt_onError) { + return executor.execute(command).then( + () => {throw Error('should have failed')}, + (e) => {return e}); + } + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js new file mode 100644 index 00000000..29d2af40 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js @@ -0,0 +1,272 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const sinon = require('sinon'); +const logging = require('../../lib/logging'); + +describe('logging', function() { + let mgr, root, clock; + + beforeEach(function setUp() { + mgr = new logging.LogManager; + root = mgr.getLogger(''); + + clock = sinon.useFakeTimers(); + }); + + afterEach(function tearDown() { + clock.restore(); + }); + + describe('LogManager', function() { + describe('getLogger()', function() { + it('handles falsey input', function() { + assert.strictEqual(root, mgr.getLogger()); + assert.strictEqual(root, mgr.getLogger('')); + assert.strictEqual(root, mgr.getLogger(null)); + assert.strictEqual(root, mgr.getLogger(0)); + }); + + it('creates parent loggers', function() { + let logger = mgr.getLogger('foo.bar.baz'); + assert.strictEqual(logger.parent_, mgr.getLogger('foo.bar')); + + logger = logger.parent_; + assert.strictEqual(logger.parent_, mgr.getLogger('foo')); + + logger = logger.parent_; + assert.strictEqual(logger.parent_, mgr.getLogger('')); + + assert.strictEqual(logger.parent_.parent_, null); + }); + }); + }); + + describe('Logger', function() { + describe('getEffectiveLevel()', function() { + it('defaults to OFF', function() { + assert.strictEqual(root.getLevel(), logging.Level.OFF); + assert.strictEqual(root.getEffectiveLevel(), logging.Level.OFF); + + root.setLevel(null); + assert.strictEqual(root.getLevel(), null); + assert.strictEqual(root.getEffectiveLevel(), logging.Level.OFF); + }); + + it('uses own level if set', function() { + let logger = mgr.getLogger('foo.bar.baz'); + assert.strictEqual(logger.getLevel(), null); + assert.strictEqual(logger.getEffectiveLevel(), logging.Level.OFF); + + logger.setLevel(logging.Level.INFO); + assert.strictEqual(logger.getLevel(), logging.Level.INFO); + assert.strictEqual(logger.getEffectiveLevel(), logging.Level.INFO); + }); + + it('uses level from set on nearest parent', function() { + let ancestor = mgr.getLogger('foo'); + ancestor.setLevel(logging.Level.SEVERE); + + let logger = mgr.getLogger('foo.bar.baz'); + assert.strictEqual(logger.getLevel(), null); + assert.strictEqual(logger.getEffectiveLevel(), logging.Level.SEVERE); + }); + }); + + describe('isLoggable()', function() { + it('compares level against logger\'s effective level', function() { + const log1 = mgr.getLogger('foo'); + log1.setLevel(logging.Level.WARNING); + + const log2 = mgr.getLogger('foo.bar.baz'); + + assert(!log2.isLoggable(logging.Level.FINEST)); + assert(!log2.isLoggable(logging.Level.INFO)); + assert(log2.isLoggable(logging.Level.WARNING)); + assert(log2.isLoggable(logging.Level.SEVERE)); + + log2.setLevel(logging.Level.INFO); + + assert(!log2.isLoggable(logging.Level.FINEST)); + assert(log2.isLoggable(logging.Level.INFO)); + assert(log2.isLoggable(logging.Level.WARNING)); + assert(log2.isLoggable(logging.Level.SEVERE)); + + log2.setLevel(logging.Level.ALL); + + assert(log2.isLoggable(logging.Level.FINEST)); + assert(log2.isLoggable(logging.Level.INFO)); + assert(log2.isLoggable(logging.Level.WARNING)); + assert(log2.isLoggable(logging.Level.SEVERE)); + }); + + it('Level.OFF is never loggable', function() { + function test(level) { + root.setLevel(level); + assert(!root.isLoggable(logging.Level.OFF), + 'OFF should not be loggable at ' + level); + } + + test(logging.Level.ALL); + test(logging.Level.INFO); + test(logging.Level.OFF); + }); + }); + + describe('log()', function() { + it('does not invoke loggable if message is not loggable', function() { + const log = mgr.getLogger('foo'); + log.setLevel(logging.Level.OFF); + + let callback = sinon.spy(); + log.addHandler(callback); + root.addHandler(callback); + + assert(!callback.called); + }); + + it('invokes handlers for each parent logger', function() { + const cb1 = sinon.spy(); + const cb2 = sinon.spy(); + const cb3 = sinon.spy(); + const cb4 = sinon.spy(); + + const log1 = mgr.getLogger('foo'); + const log2 = mgr.getLogger('foo.bar'); + const log3 = mgr.getLogger('foo.bar.baz'); + const log4 = mgr.getLogger('foo.bar.baz.quot'); + + log1.addHandler(cb1); + log1.setLevel(logging.Level.INFO); + + log2.addHandler(cb2); + log2.setLevel(logging.Level.WARNING); + + log3.addHandler(cb3); + log3.setLevel(logging.Level.FINER); + + clock.tick(123456); + + log4.finest('this is the finest message'); + log4.finer('this is a finer message'); + log4.info('this is an info message'); + log4.warning('this is a warning message'); + log4.severe('this is a severe message'); + + assert.equal(4, cb1.callCount); + assert.equal(4, cb2.callCount); + assert.equal(4, cb3.callCount); + + const entry1 = new logging.Entry( + logging.Level.FINER, + '[foo.bar.baz.quot] this is a finer message', + 123456); + const entry2 = new logging.Entry( + logging.Level.INFO, + '[foo.bar.baz.quot] this is an info message', + 123456); + const entry3 = new logging.Entry( + logging.Level.WARNING, + '[foo.bar.baz.quot] this is a warning message', + 123456); + const entry4 = new logging.Entry( + logging.Level.SEVERE, + '[foo.bar.baz.quot] this is a severe message', + 123456); + + check(cb1.getCall(0).args[0], entry1); + check(cb1.getCall(1).args[0], entry2); + check(cb1.getCall(2).args[0], entry3); + check(cb1.getCall(3).args[0], entry4); + + check(cb2.getCall(0).args[0], entry1); + check(cb2.getCall(1).args[0], entry2); + check(cb2.getCall(2).args[0], entry3); + check(cb2.getCall(3).args[0], entry4); + + check(cb3.getCall(0).args[0], entry1); + check(cb3.getCall(1).args[0], entry2); + check(cb3.getCall(2).args[0], entry3); + check(cb3.getCall(3).args[0], entry4); + + function check(entry, expected) { + assert.equal(entry.level, expected.level, 'wrong level'); + assert.equal(entry.message, expected.message, 'wrong message'); + assert.equal(entry.timestamp, expected.timestamp, 'wrong time'); + } + }); + + it('does not invoke removed handler', function() { + root.setLevel(logging.Level.INFO); + const cb = sinon.spy(); + + root.addHandler(cb); + root.info('hi'); + assert.equal(1, cb.callCount); + + assert(root.removeHandler(cb)); + root.info('bye'); + assert.equal(1, cb.callCount); + + assert(!root.removeHandler(cb)); + }); + }); + }); + + describe('getLevel()', function() { + it('converts named levels', function() { + assert.strictEqual(logging.Level.DEBUG, logging.getLevel('DEBUG')); + assert.strictEqual(logging.Level.ALL, logging.getLevel('FAKE')); + }); + + it('converts numeric levels', function() { + assert.strictEqual( + logging.Level.DEBUG, + logging.getLevel(logging.Level.DEBUG.value)); + }); + + it('normalizes numeric levels', function() { + assert.strictEqual( + logging.Level.OFF, + logging.getLevel(logging.Level.OFF.value * 2)); + + let diff = logging.Level.SEVERE.value - logging.Level.WARNING.value; + assert.strictEqual( + logging.Level.WARNING, + logging.getLevel(logging.Level.WARNING.value + (diff * .5))); + + assert.strictEqual(logging.Level.ALL, logging.getLevel(0)); + assert.strictEqual(logging.Level.ALL, logging.getLevel(-1)); + }); + }); + + describe('Preferences', function() { + it('can be converted to JSON', function() { + let prefs = new logging.Preferences; + assert.equal('{}', JSON.stringify(prefs)); + + prefs.setLevel('foo', logging.Level.DEBUG); + assert.equal('{"foo":"DEBUG"}', JSON.stringify(prefs)); + + prefs.setLevel(logging.Type.BROWSER, logging.Level.FINE); + assert.equal('{"foo":"DEBUG","browser":"FINE"}', JSON.stringify(prefs)); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js new file mode 100644 index 00000000..207f490a --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js @@ -0,0 +1,78 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const promise = require('../../lib/promise'); +const {enablePromiseManager} = require('../../lib/test/promise'); + +describe('Promises/A+ Compliance Tests', function() { + enablePromiseManager(() => { + // The promise spec does not define behavior for unhandled rejections and + // assumes they are effectively swallowed. This is not the case with our + // implementation, so we have to disable error propagation to test that the + // rest of our behavior is compliant. + // We run the tests with a separate instance of the control flow to ensure + // disablign error propagation does not impact other tests. + var flow = new promise.ControlFlow(); + flow.setPropagateUnhandledRejections(false); + + // Skip the tests in 2.2.6.1/2. We are not compliant in these scenarios. + var realDescribe = global.describe; + global.describe = function(name, fn) { + realDescribe(name, function() { + var prefix = 'Promises/A+ Compliance Tests ' + + 'SELENIUM_PROMISE_MANAGER=true 2.2.6: ' + + '`then` may be called multiple times on the same promise.'; + var suffix = 'even when one handler is added inside another handler'; + if (this.fullTitle().startsWith(prefix) + && this.fullTitle().endsWith(suffix)) { + var realSpecify = global.specify; + try { + global.specify = function(name) { + realSpecify(name); + }; + fn(); + } finally { + global.specify = realSpecify; + } + } else { + fn(); + } + }); + }; + + require('promises-aplus-tests').mocha({ + resolved: function(value) { + return new promise.Promise((fulfill) => fulfill(value), flow); + }, + rejected: function(error) { + return new promise.Promise((_, reject) => reject(error), flow); + }, + deferred: function() { + var d = new promise.Deferred(flow); + return { + resolve: d.fulfill, + reject: d.reject, + promise: d.promise + }; + } + }); + + global.describe = realDescribe; + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js new file mode 100644 index 00000000..b89a2f87 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js @@ -0,0 +1,884 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Contains tests against promise error handling. Many tests use + * NativePromise to control test termination independent of promise + * (and notably promise.ControlFlow). + */ + +'use strict'; + +const testutil = require('./testutil'); + +const assert = require('assert'); +const promise = require('../../lib/promise'); +const {enablePromiseManager} = require('../../lib/test/promise'); + +const NativePromise = Promise; +const StubError = testutil.StubError; +const throwStubError = testutil.throwStubError; +const assertIsStubError = testutil.assertIsStubError; + +describe('promise error handling', function() { + enablePromiseManager(() => { + var flow, uncaughtExceptions; + + beforeEach(function setUp() { + if (promise.USE_PROMISE_MANAGER) { + flow = promise.controlFlow(); + uncaughtExceptions = []; + flow.on('uncaughtException', onUncaughtException); + } + }); + + afterEach(function tearDown() { + if (promise.USE_PROMISE_MANAGER) { + return waitForIdle(flow).then(function() { + assert.deepEqual( + [], uncaughtExceptions, 'There were uncaught exceptions'); + flow.reset(); + }); + } + }); + + function onUncaughtException(e) { + uncaughtExceptions.push(e); + } + + function waitForAbort(opt_flow, opt_n) { + var n = opt_n || 1; + var theFlow = opt_flow || flow; + theFlow.removeAllListeners( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); + return new NativePromise(function(fulfill, reject) { + theFlow.once('idle', function() { + reject(Error('expected flow to report an unhandled error')); + }); + + var errors = []; + theFlow.on('uncaughtException', onError); + function onError(e) { + errors.push(e); + if (errors.length === n) { + theFlow.removeListener('uncaughtException', onError); + fulfill(n === 1 ? errors[0] : errors); + } + } + }); + } + + function waitForIdle(opt_flow) { + var theFlow = opt_flow || flow; + return new NativePromise(function(fulfill, reject) { + if (theFlow.isIdle()) { + fulfill(); + return; + } + theFlow.once('idle', fulfill); + theFlow.once('uncaughtException', reject); + }); + } + + it('testRejectedPromiseTriggersErrorCallback', function() { + return promise.rejected(new StubError). + then(assert.fail, assertIsStubError); + }); + + describe('callback throws trigger subsequent error callback', function() { + it('fulfilled promise', function() { + return promise.fulfilled(). + then(throwStubError). + then(assert.fail, assertIsStubError); + }); + + it('rejected promise', function() { + var e = Error('not the droids you are looking for'); + return promise.rejected(e). + then(assert.fail, throwStubError). + then(assert.fail, assertIsStubError); + }); + }); + + describe('callback returns rejected promise triggers subsequent errback', function() { + it('from fulfilled callback', function() { + return promise.fulfilled().then(function() { + return promise.rejected(new StubError); + }).then(assert.fail, assertIsStubError); + }); + + it('from rejected callback', function() { + var e = Error('not the droids you are looking for'); + return promise.rejected(e). + then(assert.fail, function() { + return promise.rejected(new StubError); + }). + then(assert.fail, assertIsStubError); + }); + }); + + it('testReportsUnhandledRejectionsThroughTheControlFlow', function() { + promise.rejected(new StubError); + return waitForAbort().then(assertIsStubError); + }); + + describe('multiple unhandled rejections outside a task', function() { + it('are reported in order they occurred', function() { + var e1 = Error('error 1'); + var e2 = Error('error 2'); + + promise.rejected(e1); + promise.rejected(e2); + + return waitForAbort(flow).then(function(error) { + assert.ok( + error instanceof promise.MultipleUnhandledRejectionError); + // TODO: switch to Array.from when we drop node 0.12.x + var errors = []; + for (var e of error.errors) { + errors.push(e); + } + assert.deepEqual([e1, e2], errors); + }); + }); + }); + + describe('does not report unhandled rejection when', function() { + it('handler added before next tick', function() { + promise.rejected(new StubError).then(assert.fail, assertIsStubError); + return waitForIdle(); + }); + + it('added async but before next tick', function() { + var called = false; + return new NativePromise(function(fulfill, reject) { + var aPromise; + NativePromise.resolve().then(function() { + aPromise.then(assert.fail, function(e) { + called = true; + assertIsStubError(e); + }); + waitForIdle().then(fulfill, reject); + }); + aPromise = promise.rejected(new StubError); + }).then(function() { + assert.ok(called); + }) + }); + }); + + it('testTaskThrows', function() { + return flow.execute(throwStubError).then(assert.fail, assertIsStubError); + }); + + it('testTaskReturnsRejectedPromise', function() { + return flow.execute(function() { + return promise.rejected(new StubError) + }).then(assert.fail, assertIsStubError); + }); + + it('testTaskHasUnhandledRejection', function() { + return flow.execute(function() { + promise.rejected(new StubError) + }).then(assert.fail, assertIsStubError); + }); + + it('testTaskfails_returnedPromiseIsUnhandled', function() { + flow.execute(throwStubError); + return waitForAbort().then(assertIsStubError); + }); + + it('testTaskHasUnhandledRejection_cancelsRemainingSubTasks', function() { + var seen = []; + flow.execute(function() { + promise.rejected(new StubError); + + flow.execute(() => seen.push('a')) + .then(() => seen.push('b'), (e) => seen.push(e)); + flow.execute(() => seen.push('c')) + .then(() => seen.push('b'), (e) => seen.push(e)); + }); + + return waitForAbort() + .then(assertIsStubError) + .then(() => assert.deepEqual([], seen)); + }); + + describe('nested task failures', function() { + it('returns up to paren', function() { + return flow.execute(function() { + return flow.execute(function() { + return flow.execute(throwStubError); + }); + }).then(assert.fail, assertIsStubError); + }); + + it('task throws; uncaught error bubbles up', function() { + flow.execute(function() { + flow.execute(function() { + flow.execute(throwStubError); + }); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('task throws; uncaught error bubbles up; is caught at root', function() { + flow.execute(function() { + flow.execute(function() { + flow.execute(throwStubError); + }); + }).then(assert.fail, assertIsStubError); + return waitForIdle(); + }); + + it('unhandled rejection bubbles up', function() { + flow.execute(function() { + flow.execute(function() { + flow.execute(function() { + promise.rejected(new StubError); + }); + }); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('unhandled rejection bubbles up; caught at root', function() { + flow.execute(function() { + flow.execute(function() { + promise.rejected(new StubError); + }); + }).then(assert.fail, assertIsStubError); + return waitForIdle(); + }); + + it('mixtureof hanging and free subtasks', function() { + flow.execute(function() { + return flow.execute(function() { + flow.execute(throwStubError); + }); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('cancels remaining tasks', function() { + var seen = []; + flow.execute(function() { + flow.execute(() => promise.rejected(new StubError)); + flow.execute(() => seen.push('a')) + .then(() => seen.push('b'), (e) => seen.push(e)); + flow.execute(() => seen.push('c')) + .then(() => seen.push('b'), (e) => seen.push(e)); + }); + + return waitForAbort() + .then(assertIsStubError) + .then(() => assert.deepEqual([], seen)); + }); + }); + + it('testTaskReturnsPromiseLikeObjectThatInvokesErrback', function() { + return flow.execute(function() { + return { + 'then': function(_, errback) { + errback('abc123'); + } + }; + }).then(assert.fail, function(value) { + assert.equal('abc123', value); + }); + }); + + describe('ControlFlow#wait();', function() { + describe('condition throws;', function() { + it('failure is caught', function() { + return flow.wait(throwStubError, 50).then(assert.fail, assertIsStubError); + }); + + it('failure is not caught', function() { + flow.wait(throwStubError, 50); + return waitForAbort().then(assertIsStubError); + }); + }); + + describe('condition returns promise', function() { + it('failure is caught', function() { + return flow.wait(function() { + return promise.rejected(new StubError); + }, 50).then(assert.fail, assertIsStubError); + }); + + it('failure is not caught', function() { + flow.wait(function() { + return promise.rejected(new StubError); + }, 50); + return waitForAbort().then(assertIsStubError); + }); + }); + + describe('condition has unhandled promise rejection', function() { + it('failure is caught', function() { + return flow.wait(function() { + promise.rejected(new StubError); + }, 50).then(assert.fail, assertIsStubError); + }); + + it('failure is not caught', function() { + flow.wait(function() { + promise.rejected(new StubError); + }, 50); + return waitForAbort().then(assertIsStubError); + }); + }); + + describe('condition has subtask failure', function() { + it('failure is caught', function() { + return flow.wait(function() { + flow.execute(function() { + flow.execute(throwStubError); + }); + }, 50).then(assert.fail, assertIsStubError); + }); + + it('failure is not caught', function() { + flow.wait(function() { + flow.execute(function() { + flow.execute(throwStubError); + }); + }, 50); + return waitForAbort().then(assertIsStubError); + }); + }); + }); + + describe('errback throws a new error', function() { + it('start with normal promise', function() { + var error = Error('an error'); + return promise.rejected(error). + catch(function(e) { + assert.equal(e, error); + throw new StubError; + }). + catch(assertIsStubError); + }); + + it('start with task result', function() { + var error = Error('an error'); + return flow.execute(function() { + throw error; + }). + catch(function(e) { + assert.equal(e, error); + throw new StubError; + }). + catch(assertIsStubError); + }); + + it('start with normal promise; uncaught error', function() { + var error = Error('an error'); + promise.rejected(error). + catch(function(e) { + assert.equal(e, error); + throw new StubError; + }); + return waitForAbort().then(assertIsStubError); + }); + + it('start with task result; uncaught error', function() { + var error = Error('an error'); + flow.execute(function() { + throw error; + }). + catch(function(e) { + assert.equal(e, error); + throw new StubError; + }); + return waitForAbort().then(assertIsStubError); + }); + }); + + it('thrownPromiseCausesCallbackRejection', function() { + let p = promise.fulfilled(1234); + return promise.fulfilled().then(function() { + throw p; + }).then(assert.fail, function(value) { + assert.strictEqual(p, value); + }); + }); + + describe('task throws promise', function() { + it('promise was fulfilled', function() { + var toThrow = promise.fulfilled(1234); + flow.execute(function() { + throw toThrow; + }).then(assert.fail, function(value) { + assert.equal(toThrow, value); + return toThrow; + }).then(function(value) { + assert.equal(1234, value); + }); + return waitForIdle(); + }); + + it('promise was rejected', function() { + var toThrow = promise.rejected(new StubError); + toThrow.catch(function() {}); // For tearDown. + flow.execute(function() { + throw toThrow; + }).then(assert.fail, function(e) { + assert.equal(toThrow, e); + return e; + }).then(assert.fail, assertIsStubError); + return waitForIdle(); + }); + }); + + it('testFailsTaskIfThereIsAnUnhandledErrorWhileWaitingOnTaskResult', function() { + var d = promise.defer(); + flow.execute(function() { + promise.rejected(new StubError); + return d.promise; + }).then(assert.fail, assertIsStubError); + + return waitForIdle().then(function() { + return d.promise; + }).then(assert.fail, function(e) { + assert.equal('CancellationError: StubError', e.toString()); + }); + }); + + it('testFailsParentTaskIfAsyncScheduledTaskFails', function() { + var d = promise.defer(); + flow.execute(function() { + flow.execute(throwStubError); + return d.promise; + }).then(assert.fail, assertIsStubError); + + return waitForIdle().then(function() { + return d.promise; + }).then(assert.fail, function(e) { + assert.equal('CancellationError: StubError', e.toString()); + }); + }); + + describe('long stack traces', function() { + afterEach(() => promise.LONG_STACK_TRACES = false); + + it('always includes task stacks in failures', function() { + promise.LONG_STACK_TRACES = false; + flow.execute(function() { + flow.execute(function() { + flow.execute(throwStubError, 'throw error'); + }, 'two'); + }, 'three'). + then(assert.fail, function(e) { + assertIsStubError(e); + if (typeof e.stack !== 'string') { + return; + } + var messages = e.stack.split(/\n/).filter(function(line, index) { + return /^From: /.test(line); + }); + assert.deepEqual([ + 'From: Task: throw error', + 'From: Task: two', + 'From: Task: three' + ], messages); + }); + return waitForIdle(); + }); + + it('does not include completed tasks', function () { + flow.execute(function() {}, 'succeeds'); + flow.execute(throwStubError, 'kaboom').then(assert.fail, function(e) { + assertIsStubError(e); + if (typeof e.stack !== 'string') { + return; + } + var messages = e.stack.split(/\n/).filter(function(line, index) { + return /^From: /.test(line); + }); + assert.deepEqual(['From: Task: kaboom'], messages); + }); + return waitForIdle(); + }); + + it('does not include promise chain when disabled', function() { + promise.LONG_STACK_TRACES = false; + flow.execute(function() { + flow.execute(function() { + return promise.fulfilled(). + then(function() {}). + then(function() {}). + then(throwStubError); + }, 'eventually assert.fails'); + }, 'start'). + then(assert.fail, function(e) { + assertIsStubError(e); + if (typeof e.stack !== 'string') { + return; + } + var messages = e.stack.split(/\n/).filter(function(line, index) { + return /^From: /.test(line); + }); + assert.deepEqual([ + 'From: Task: eventually assert.fails', + 'From: Task: start' + ], messages); + }); + return waitForIdle(); + }); + + it('includes promise chain when enabled', function() { + promise.LONG_STACK_TRACES = true; + flow.execute(function() { + flow.execute(function() { + return promise.fulfilled(). + then(function() {}). + then(function() {}). + then(throwStubError); + }, 'eventually assert.fails'); + }, 'start'). + then(assert.fail, function(e) { + assertIsStubError(e); + if (typeof e.stack !== 'string') { + return; + } + var messages = e.stack.split(/\n/).filter(function(line, index) { + return /^From: /.test(line); + }); + assert.deepEqual([ + 'From: Promise: then', + 'From: Task: eventually assert.fails', + 'From: Task: start' + ], messages); + }); + return waitForIdle(); + }); + }); + + describe('frame cancels remaining tasks', function() { + it('on unhandled task failure', function() { + var run = false; + return flow.execute(function() { + flow.execute(throwStubError); + flow.execute(function() { run = true; }); + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.ok(!run); + }); + }); + + it('on unhandled promise rejection', function() { + var run = false; + return flow.execute(function() { + promise.rejected(new StubError); + flow.execute(function() { run = true; }); + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.ok(!run); + }); + }); + + it('if task throws', function() { + var run = false; + return flow.execute(function() { + flow.execute(function() { run = true; }); + throw new StubError; + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.ok(!run); + }); + }); + + describe('task callbacks scheduled in another frame', function() { + flow = promise.controlFlow(); + function noop() {} + + let subTask; + + before(function() { + flow.execute(function() { + // This task will be discarded and never run because of the error below. + subTask = flow.execute(() => 'abc'); + throw new StubError('stub'); + }).catch(noop); + }); + + function assertCancellation(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal( + 'Task was discarded due to a previous failure: stub', e.message); + } + + it('are rejected with cancellation error', function() { + let result; + return Promise.resolve().then(function() { + return flow.execute(function() { + result = subTask.then(assert.fail); + }); + }) + .then(() => result) + .then(assert.fail, assertCancellation); + }); + + it('cancellation errors propagate through callbacks (1)', function() { + let result; + return Promise.resolve().then(function() { + return flow.execute(function() { + result = subTask + .then(assert.fail, assertCancellation) + .then(() => 'abc123'); + }); + }) + .then(() => result) + .then(value => assert.equal('abc123', value)); + }); + + it('cancellation errors propagate through callbacks (2)', function() { + let result; + return Promise.resolve().then(function() { + return flow.execute(function() { + result = subTask.then(assert.fail) + .then(noop, assertCancellation) + .then(() => 'fin'); + }); + }) + // Verify result actually computed successfully all the way through. + .then(() => result) + .then(value => assert.equal('fin', value)); + }); + }); + }); + + it('testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_return', function() { + var seen = []; + return flow.execute(function() { + flow.execute(throwStubError); + + flow.execute(function() { + seen.push(1); + }).then(function() { + seen.push(2); + }, function() { + seen.push(3); + }); + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.deepEqual([], seen); + }); + }); + + it('testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_withReturn', function() { + var seen = []; + return flow.execute(function() { + flow.execute(throwStubError); + + return flow.execute(function() { + seen.push(1); + }).then(function() { + seen.push(2); + }, function() { + seen.push(3); + }); + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.deepEqual([], seen); + }); + }); + + it('testTasksWithinACallbackAreDroppedIfContainingTaskIsAborted', function() { + var seen = []; + return flow.execute(function() { + flow.execute(throwStubError); + + // None of the callbacks on this promise should execute because the + // task assert.failure above is never handled, causing the containing task to + // abort. + promise.fulfilled().then(function() { + seen.push(1); + return flow.execute(function() { + seen.push(2); + }); + }).finally(function() { + seen.push(3); + }); + + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.deepEqual([], seen); + }); + }); + + it('testTaskIsCancelledAfterWaitTimeout', function() { + var seen = []; + return flow.execute(function() { + flow.wait(function() { + return promise.delayed(50); + }, 5); + + return flow.execute(function() { + seen.push(1); + }).then(function() { + seen.push(2); + }, function() { + seen.push(3); + }); + }).then(assert.fail, function() { + assert.deepEqual([], seen); + }); + }); + + describe('task callbacks get cancellation error if registered after task was cancelled', function() { + it('(a)', function() { + var task; + flow.execute(function() { + flow.execute(throwStubError); + task = flow.execute(function() {}); + }).then(assert.fail, assertIsStubError); + return waitForIdle().then(function() { + return task.then(assert.fail, function(e) { + assert.ok(e instanceof promise.CancellationError); + }); + }); + }); + + it('(b)', function() { + var seen = []; + + var task; + flow.execute(function() { + flow.execute(throwStubError); + task = flow.execute(function() {}); + + task.then(() => seen.push(1)) + .then(() => seen.push(2)); + task.then(() => seen.push(3)) + .then(() => seen.push(4)); + + }).then(assert.fail, assertIsStubError); + + return waitForIdle().then(function() { + return task.then(assert.fail, function(e) { + seen.push(5); + assert.ok(e instanceof promise.CancellationError); + }); + }).then(() => assert.deepEqual([5], seen)); + }); + }); + + it('unhandledRejectionInParallelTaskQueue', function() { + var seen = []; + function schedule(name) { + return flow.execute(() => seen.push(name), name); + } + + flow.async(function() { + schedule('a.1'); + flow.execute(throwStubError, 'a.2 (throws)'); + }); + + var b3; + flow.async(function() { + schedule('b.1'); + schedule('b.2'); + b3 = schedule('b.3'); + }); + + var c3; + flow.async(function() { + schedule('c.1'); + schedule('c.2'); + c3 = schedule('c.3'); + }); + + function assertWasCancelled(p) { + return p.then(assert.fail, function(e) { + assert.ok(e instanceof promise.CancellationError); + }); + } + + return waitForAbort() + .then(function() { + assert.deepEqual(['a.1', 'b.1', 'c.1', 'b.2', 'c.2'], seen); + }) + .then(() => assertWasCancelled(b3)) + .then(() => assertWasCancelled(c3)); + }); + + it('errorsInAsyncFunctionsAreReportedAsUnhandledRejection', function() { + flow.removeAllListeners(); // For tearDown. + + var task; + return new Promise(function(fulfill) { + flow.once('uncaughtException', fulfill); + flow.async(function() { + task = flow.execute(function() {}); + throw Error('boom'); + }); + }).then(function(error) { + assert.ok(error instanceof promise.CancellationError); + return task.catch(function(error) { + assert.ok(error instanceof promise.CancellationError); + }); + }); + }); + + describe('does not wait for values thrown from callbacks to be resolved', function() { + it('(a)', function() { + var p1 = promise.fulfilled(); + var reason = promise.fulfilled('should not see me'); + return p1.then(function() { + throw reason; + }).then(assert.fail, function(e) { + assert.equal(reason, e); + }); + }); + + it('(b)', function() { + var p1 = promise.fulfilled(); + var reason = promise.rejected('should not see me'); + reason.catch(function() {}); // For tearDown. + return p1.then(function() { + throw reason; + }).then(assert.fail, function(e) { + assert.equal(reason, e); + }); + }); + + it('(c)', function() { + var p1 = promise.fulfilled(); + var reason = promise.defer(); + setTimeout(() => reason.fulfill('should not see me'), 100); + return p1.then(function() { + throw reason.promise; + }).then(assert.fail, function(e) { + assert.equal(reason.promise, e); + }); + }); + + it('(d)', function() { + var p1 = promise.fulfilled(); + var reason = {then: function() {}}; // A thenable like object. + return p1.then(function() { + throw reason; + }).then(assert.fail, function(e) { + assert.equal(reason, e); + }); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js new file mode 100644 index 00000000..407fd547 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js @@ -0,0 +1,2288 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const fail = assert.fail; +const sinon = require('sinon'); + +const testutil = require('./testutil'); +const {TimeoutError} = require('../../lib/error'); +const promise = require('../../lib/promise'); +const {enablePromiseManager} = require('../../lib/test/promise'); + +const NativePromise = Promise; + +// Aliases for readability. +const StubError = testutil.StubError; +const assertIsStubError = testutil.assertIsStubError; +const callbackPair = testutil.callbackPair; +const throwStubError = testutil.throwStubError; + +describe('promise control flow', function() { + enablePromiseManager(() => { + let flow, flowHistory, messages, uncaughtExceptions; + + beforeEach(function setUp() { + promise.LONG_STACK_TRACES = false; + flow = new promise.ControlFlow(); + promise.setDefaultFlow(flow); + messages = []; + flowHistory = []; + + uncaughtExceptions = []; + flow.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, + onUncaughtException); + }); + + afterEach(function tearDown() { + flow.removeAllListeners( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); + assert.deepEqual([], uncaughtExceptions, + 'There were uncaught exceptions'); + flow.reset(); + promise.LONG_STACK_TRACES = false; + }); + + function onUncaughtException(e) { + uncaughtExceptions.push(e); + } + + function defer() { + let d = {}; + let promise = new Promise((resolve, reject) => { + Object.assign(d, {resolve, reject}); + }); + d.promise = promise; + return d; + } + + function waitForAbort(opt_flow) { + var theFlow = opt_flow || flow; + theFlow.removeAllListeners( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); + return new NativePromise(function(fulfill, reject) { + theFlow.once(promise.ControlFlow.EventType.IDLE, function() { + reject(Error('expected flow to report an unhandled error')); + }); + theFlow.once( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, + fulfill); + }); + } + + function waitForIdle(opt_flow) { + var theFlow = opt_flow || flow; + return new NativePromise(function(fulfill, reject) { + theFlow.once(promise.ControlFlow.EventType.IDLE, fulfill); + theFlow.once( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, reject); + }); + } + + function timeout(ms) { + return new NativePromise(function(fulfill) { + setTimeout(fulfill, ms); + }); + } + + + function schedule(msg, opt_return) { + return scheduleAction(msg, function() { + return opt_return; + }); + } + + /** + * @param {string} value The value to push. + * @param {promise.Promise=} opt_taskPromise Promise to return from + * the task. + * @return {!promise.Promise} The result. + */ + function schedulePush(value, opt_taskPromise) { + return scheduleAction(value, function() { + messages.push(value); + return opt_taskPromise; + }); + } + + /** + * @param {string} msg Debug message. + * @param {!Function} actionFn The function. + * @return {!promise.Promise} The function result. + */ + function scheduleAction(msg, actionFn) { + return promise.controlFlow().execute(function() { + flowHistory.push(msg); + return actionFn(); + }, msg); + } + + /** + * @param {!Function} condition The condition function. + * @param {number=} opt_timeout The timeout. + * @param {string=} opt_message Optional message. + * @return {!promise.Promise} The wait result. + */ + function scheduleWait(condition, opt_timeout, opt_message) { + var msg = opt_message || ''; + // It's not possible to hook into when the wait itself is scheduled, so + // we record each iteration of the wait loop. + var count = 0; + return promise.controlFlow().wait(function() { + flowHistory.push((count++) + ': ' + msg); + return condition(); + }, opt_timeout, msg); + } + + function asyncRun(fn, opt_self) { + NativePromise.resolve().then(() => fn.call(opt_self)); + } + + function assertFlowHistory(var_args) { + var expected = Array.prototype.slice.call(arguments, 0); + assert.deepEqual(expected, flowHistory); + } + + function assertMessages(var_args) { + var expected = Array.prototype.slice.call(arguments, 0); + assert.deepEqual(expected, messages); + } + + function assertingMessages(var_args) { + var args = Array.prototype.slice.call(arguments, 0); + return () => assertMessages.apply(null, args); + } + + function assertFlowIs(flow) { + assert.equal(flow, promise.controlFlow()); + } + + describe('testScheduling', function() { + it('aSimpleFunction', function() { + schedule('go'); + return waitForIdle().then(function() { + assertFlowHistory('go'); + }); + }); + + it('aSimpleFunctionWithANonPromiseReturnValue', function() { + schedule('go', 123).then(function(value) { + assert.equal(123, value); + }); + return waitForIdle().then(function() { + assertFlowHistory('go'); + }); + }); + + it('aSimpleSequence', function() { + schedule('a'); + schedule('b'); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('invokesCallbacksWhenTaskIsDone', function() { + var d = new promise.Deferred(); + var called = false; + var done = schedule('a', d.promise).then(function(value) { + called = true; + assert.equal(123, value); + }); + return timeout(5).then(function() { + assert.ok(!called); + d.fulfill(123); + return done; + }). + then(function() { + assertFlowHistory('a'); + }); + }); + + it('blocksUntilPromiseReturnedByTaskIsResolved', function() { + var done = promise.defer(); + schedulePush('a', done.promise); + schedulePush('b'); + setTimeout(function() { + done.fulfill(); + messages.push('c'); + }, 25); + return waitForIdle().then(assertingMessages('a', 'c', 'b')); + }); + + it('waitsForReturnedPromisesToResolve', function() { + var d1 = new promise.Deferred(); + var d2 = new promise.Deferred(); + + var callback = sinon.spy(); + schedule('a', d1.promise).then(callback); + + return timeout(5).then(function() { + assert(!callback.called); + d1.fulfill(d2.promise); + return timeout(5); + }).then(function() { + assert(!callback.called); + d2.fulfill('fluffy bunny'); + return waitForIdle(); + }).then(function() { + assert(callback.called); + assert.equal('fluffy bunny', callback.getCall(0).args[0]); + assertFlowHistory('a'); + }); + }); + + it('executesTasksInAFutureTurnAfterTheyAreScheduled', function() { + var count = 0; + function incr() { count++; } + + scheduleAction('', incr); + assert.equal(0, count); + return waitForIdle().then(function() { + assert.equal(1, count); + }); + }); + + it('executesOneTaskPerTurnOfTheEventLoop', function() { + var order = []; + function go() { + order.push(order.length / 2); + asyncRun(function() { + order.push('-'); + }); + } + + scheduleAction('', go); + scheduleAction('', go); + return waitForIdle().then(function() { + assert.deepEqual([0, '-', 1, '-'], order); + }) + }); + + it('firstScheduledTaskIsWithinACallback', function() { + promise.fulfilled().then(function() { + schedule('a'); + schedule('b'); + schedule('c'); + }).then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + return waitForIdle(); + }); + + it('newTasksAddedWhileWaitingOnTaskReturnedPromise1', function() { + scheduleAction('a', function() { + var d = promise.defer(); + setTimeout(function() { + schedule('c'); + d.fulfill(); + }, 10); + return d.promise; + }); + schedule('b'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('newTasksAddedWhileWaitingOnTaskReturnedPromise2', function() { + scheduleAction('a', function() { + var d = promise.defer(); + setTimeout(function() { + schedule('c'); + asyncRun(d.fulfill); + }, 10); + return d.promise; + }); + schedule('b'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'c', 'b'); + }); + }); + }); + + describe('testFraming', function() { + it('callbacksRunInANewFrame', function() { + schedule('a').then(function() { + schedule('c'); + }); + schedule('b'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'c', 'b'); + }); + }); + + it('lotsOfNesting', function() { + schedule('a').then(function() { + schedule('c').then(function() { + schedule('e').then(function() { + schedule('g'); + }); + schedule('f'); + }); + schedule('d'); + }); + schedule('b'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'c', 'e', 'g', 'f', 'd', 'b'); + }); + }); + + it('callbackReturnsPromiseThatDependsOnATask_1', function() { + schedule('a').then(function() { + schedule('b'); + return promise.delayed(5).then(function() { + return schedule('c'); + }); + }); + schedule('d'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd'); + }); + }); + + it('callbackReturnsPromiseThatDependsOnATask_2', function() { + schedule('a').then(function() { + schedule('b'); + return promise.delayed(5). + then(function() { return promise.delayed(5) }). + then(function() { return promise.delayed(5) }). + then(function() { return promise.delayed(5) }). + then(function() { return schedule('c'); }); + }); + schedule('d'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd'); + }); + }); + + it('eachCallbackWaitsForAllScheduledTasksToComplete', function() { + schedule('a'). + then(function() { + schedule('b'); + schedule('c'); + }). + then(function() { + schedule('d'); + }); + schedule('e'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e'); + }); + }); + + it('eachCallbackWaitsForReturnTasksToComplete', function() { + schedule('a'). + then(function() { + schedule('b'); + return schedule('c'); + }). + then(function() { + schedule('d'); + }); + schedule('e'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e'); + }); + }); + + it('callbacksOnAResolvedPromiseInsertIntoTheCurrentFlow', function() { + promise.fulfilled().then(function() { + schedule('b'); + }); + schedule('a'); + + return waitForIdle().then(function() { + assertFlowHistory('b', 'a'); + }); + }); + + it('callbacksInterruptTheFlowWhenPromiseIsResolved', function() { + schedule('a').then(function() { + schedule('c'); + }); + schedule('b'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'c', 'b'); + }); + }); + + it('allCallbacksInAFrameAreScheduledWhenPromiseIsResolved', function() { + var a = schedule('a'); + a.then(function() { schedule('b'); }); + schedule('c'); + a.then(function() { schedule('d'); }); + schedule('e'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e'); + }); + }); + + it('tasksScheduledInInActiveFrameDoNotGetPrecedence', function() { + var d = promise.fulfilled(); + schedule('a'); + schedule('b'); + d.then(function() { schedule('c'); }); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('tasksScheduledInAFrameGetPrecedence_1', function() { + var a = schedule('a'); + schedule('b').then(function() { + a.then(function() { + schedule('c'); + schedule('d'); + }); + var e = schedule('e'); + a.then(function() { + schedule('f'); + e.then(function() { + schedule('g'); + }); + schedule('h'); + }); + schedule('i'); + }); + schedule('j'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'); + }); + }); + }); + + describe('testErrorHandling', function() { + it('thrownErrorsArePassedToTaskErrback', function() { + scheduleAction('function that throws', throwStubError). + then(fail, assertIsStubError); + return waitForIdle(); + }); + + it('thrownErrorsPropagateThroughPromiseChain', function() { + scheduleAction('function that throws', throwStubError). + then(fail). + then(fail, assertIsStubError); + return waitForIdle(); + }); + + it('catchesErrorsFromFailedTasksInAFrame', function() { + schedule('a').then(function() { + schedule('b'); + scheduleAction('function that throws', throwStubError); + }). + then(fail, assertIsStubError); + return waitForIdle(); + }); + + it('abortsIfOnlyTaskReturnsAnUnhandledRejection', function() { + scheduleAction('function that returns rejected promise', function() { + return promise.rejected(new StubError); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('abortsIfThereIsAnUnhandledRejection', function() { + promise.rejected(new StubError); + schedule('this should not run'); + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory(/* none */); + }); + }); + + it('abortsSequenceIfATaskFails', function() { + schedule('a'); + schedule('b'); + scheduleAction('c', throwStubError); + schedule('d'); // Should never execute. + + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('abortsFromUnhandledFramedTaskFailures_1', function() { + schedule('outer task').then(function() { + scheduleAction('inner task', throwStubError); + }); + schedule('this should not run'); + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('outer task', 'inner task'); + }); + }); + + it('abortsFromUnhandledFramedTaskFailures_2', function() { + schedule('a').then(function() { + schedule('b').then(function() { + scheduleAction('c', throwStubError); + // This should not execute. + schedule('d'); + }); + }); + + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('abortsWhenErrorBubblesUpFromFullyResolvingAnObject', function() { + var callback = sinon.spy(); + + scheduleAction('', function() { + var obj = {'foo': promise.rejected(new StubError)}; + return promise.fullyResolved(obj).then(callback); + }); + + return waitForAbort(). + then(assertIsStubError). + then(() => assert(!callback.called)); + }); + + it('abortsWhenErrorBubblesUpFromFullyResolvingAnObject_withCallback', function() { + var callback1 = sinon.spy(); + var callback2 = sinon.spy(); + + scheduleAction('', function() { + var obj = {'foo': promise.rejected(new StubError)}; + return promise.fullyResolved(obj).then(callback1); + }).then(callback2); + + return waitForAbort(). + then(assertIsStubError). + then(() => assert(!callback1.called)). + then(() => assert(!callback2.called)); + }); + + it('canCatchErrorsFromNestedTasks', function() { + var errback = sinon.spy(); + schedule('a'). + then(function() { + return scheduleAction('b', throwStubError); + }). + catch(errback); + return waitForIdle().then(function() { + assert(errback.called); + assertIsStubError(errback.getCall(0).args[0]); + }); + }); + + it('nestedCommandFailuresCanBeCaughtAndSuppressed', function() { + var errback = sinon.spy(); + schedule('a').then(function() { + return schedule('b').then(function() { + return schedule('c').then(function() { + throw new StubError; + }); + }); + }).catch(errback); + schedule('d'); + return waitForIdle(). + then(function() { + assert(errback.called); + assertIsStubError(errback.getCall(0).args[0]); + assertFlowHistory('a', 'b', 'c', 'd'); + }); + }); + + it('aTaskWithAnUnhandledPromiseRejection', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + promise.rejected(new StubError); + }); + schedule('should never run'); + + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('a', 'sub-tasks'); + }); + }); + + it('aTaskThatReutrnsARejectedPromise', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + return promise.rejected(new StubError); + }); + schedule('should never run'); + + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('a', 'sub-tasks'); + }); + }); + + it('discardsSubtasksIfTaskThrows', function() { + var pair = callbackPair(null, assertIsStubError); + scheduleAction('a', function() { + schedule('b'); + schedule('c'); + throwStubError(); + }).then(pair.callback, pair.errback); + schedule('d'); + + return waitForIdle(). + then(pair.assertErrback). + then(function() { + assertFlowHistory('a', 'd'); + }); + }); + + it('discardsRemainingSubtasksIfASubtaskFails', function() { + var pair = callbackPair(null, assertIsStubError); + scheduleAction('a', function() { + schedule('b'); + scheduleAction('c', throwStubError); + schedule('d'); + }).then(pair.callback, pair.errback); + schedule('e'); + + return waitForIdle(). + then(pair.assertErrback). + then(function() { + assertFlowHistory('a', 'b', 'c', 'e'); + }); + }); + }); + + describe('testTryModelingFinally', function() { + it('happyPath', function() { + /* Model: + try { + doFoo(); + doBar(); + } finally { + doBaz(); + } + */ + schedulePush('foo'). + then(() => schedulePush('bar')). + finally(() => schedulePush('baz')); + return waitForIdle().then(assertingMessages('foo', 'bar', 'baz')); + }); + + it('firstTryFails', function() { + /* Model: + try { + doFoo(); + doBar(); + } finally { + doBaz(); + } + */ + + scheduleAction('doFoo and throw', function() { + messages.push('foo'); + throw new StubError; + }). + then(function() { schedulePush('bar'); }). + finally(function() { schedulePush('baz'); }); + + return waitForAbort(). + then(assertIsStubError). + then(assertingMessages('foo', 'baz')); + }); + + it('secondTryFails', function() { + /* Model: + try { + doFoo(); + doBar(); + } finally { + doBaz(); + } + */ + + schedulePush('foo'). + then(function() { + return scheduleAction('doBar and throw', function() { + messages.push('bar'); + throw new StubError; + }); + }). + finally(function() { + return schedulePush('baz'); + }); + return waitForAbort(). + then(assertIsStubError). + then(assertingMessages('foo', 'bar', 'baz')); + }); + }); + + describe('testTaskCallbacksInterruptFlow', function() { + it('(base case)', function() { + schedule('a').then(function() { + schedule('b'); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskDependsOnImmediatelyFulfilledPromise', function() { + scheduleAction('a', function() { + return promise.fulfilled(); + }).then(function() { + schedule('b'); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskDependsOnPreviouslyFulfilledPromise', function() { + var aPromise = promise.fulfilled(123); + scheduleAction('a', function() { + return aPromise; + }).then(function(value) { + assert.equal(123, value); + schedule('b'); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskDependsOnAsyncPromise', function() { + scheduleAction('a', function() { + return promise.delayed(25); + }).then(function() { + schedule('b'); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('promiseChainedToTaskInterruptFlow', function() { + schedule('a').then(function() { + return promise.fulfilled(); + }).then(function() { + return promise.fulfilled(); + }).then(function() { + schedule('b'); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('nestedTaskCallbacksInterruptFlowWhenResolved', function() { + schedule('a').then(function() { + schedule('b').then(function() { + schedule('c'); + }); + }); + schedule('d'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd'); + }); + }); + }); + + describe('testDelayedNesting', function() { + + it('1', function() { + var a = schedule('a'); + schedule('b').then(function() { + a.then(function() { schedule('c'); }); + schedule('d'); + }); + schedule('e'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e'); + }); + }); + + it('2', function() { + var a = schedule('a'); + schedule('b').then(function() { + a.then(function() { schedule('c'); }); + schedule('d'); + a.then(function() { schedule('e'); }); + }); + schedule('f'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f'); + }); + }); + + it('3', function() { + var a = schedule('a'); + schedule('b').then(function() { + a.then(function() { schedule('c'); }); + a.then(function() { schedule('d'); }); + }); + schedule('e'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e'); + }); + }); + + it('4', function() { + var a = schedule('a'); + schedule('b').then(function() { + a.then(function() { schedule('c'); }).then(function() { + schedule('d'); + }); + a.then(function() { schedule('e'); }); + }); + schedule('f'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f'); + }); + }); + + it('5', function() { + var a = schedule('a'); + schedule('b').then(function() { + var c; + a.then(function() { c = schedule('c'); }).then(function() { + schedule('d'); + a.then(function() { schedule('e'); }); + c.then(function() { schedule('f'); }); + schedule('g'); + }); + a.then(function() { schedule('h'); }); + }); + schedule('i'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'); + }); + }); + }); + + describe('testWaiting', function() { + it('onAConditionThatIsAlwaysTrue', function() { + scheduleWait(function() { return true;}, 0, 'waiting on true'); + return waitForIdle().then(function() { + assertFlowHistory('0: waiting on true'); + }); + }); + + it('aSimpleCountingCondition', function() { + var count = 0; + scheduleWait(function() { + return ++count == 3; + }, 100, 'counting to 3'); + + return waitForIdle().then(function() { + assert.equal(3, count); + }); + }); + + it('aConditionThatReturnsAPromise', function() { + var d = new promise.Deferred(); + var count = 0; + + scheduleWait(function() { + count += 1; + return d.promise; + }, 0, 'waiting for promise'); + + return timeout(50).then(function() { + assert.equal(1, count); + d.fulfill(123); + return waitForIdle(); + }); + }); + + it('aConditionThatReturnsAPromise_2', function() { + var count = 0; + scheduleWait(function() { + return promise.fulfilled(++count == 3); + }, 100, 'waiting for promise'); + + return waitForIdle().then(function() { + assert.equal(3, count); + }); + }); + + it('aConditionThatReturnsATaskResult', function() { + var count = 0; + scheduleWait(function() { + return scheduleAction('increment count', function() { + return ++count == 3; + }); + }, 100, 'counting to 3'); + schedule('post wait'); + + return waitForIdle().then(function() { + assert.equal(3, count); + assertFlowHistory( + '0: counting to 3', 'increment count', + '1: counting to 3', 'increment count', + '2: counting to 3', 'increment count', + 'post wait'); + }); + }); + + it('conditionContainsASubtask', function() { + var count = 0; + scheduleWait(function() { + schedule('sub task'); + return ++count == 3; + }, 100, 'counting to 3'); + schedule('post wait'); + + return waitForIdle().then(function() { + assert.equal(3, count); + assertFlowHistory( + '0: counting to 3', 'sub task', + '1: counting to 3', 'sub task', + '2: counting to 3', 'sub task', + 'post wait'); + }); + }); + + it('cancelsWaitIfScheduledTaskFails', function() { + var pair = callbackPair(null, assertIsStubError); + scheduleWait(function() { + scheduleAction('boom', throwStubError); + schedule('this should not run'); + return true; + }, 100, 'waiting to go boom').then(pair.callback, pair.errback); + schedule('post wait'); + + return waitForIdle(). + then(pair.assertErrback). + then(function() { + assertFlowHistory( + '0: waiting to go boom', 'boom', + 'post wait'); + }); + }); + + it('failsIfConditionThrows', function() { + var callbacks = callbackPair(null, assertIsStubError); + scheduleWait(throwStubError, 0, 'goes boom'). + then(callbacks.callback, callbacks.errback); + schedule('post wait'); + + return waitForIdle(). + then(callbacks.assertErrback). + then(function() { + assertFlowHistory('0: goes boom', 'post wait'); + }); + }); + + it('failsIfConditionReturnsARejectedPromise', function() { + var callbacks = callbackPair(null, assertIsStubError); + scheduleWait(function() { + return promise.rejected(new StubError); + }, 0, 'goes boom').then(callbacks.callback, callbacks.errback); + schedule('post wait'); + + return waitForIdle(). + then(callbacks.assertErrback). + then(function() { + assertFlowHistory('0: goes boom', 'post wait'); + }); + }); + + it('failsIfConditionHasUnhandledRejection', function() { + var callbacks = callbackPair(null, assertIsStubError); + scheduleWait(function() { + promise.controlFlow().execute(throwStubError); + }, 0, 'goes boom').then(callbacks.callback, callbacks.errback); + schedule('post wait'); + + return waitForIdle(). + then(callbacks.assertErrback). + then(function() { + assertFlowHistory('0: goes boom', 'post wait'); + }); + }); + + it('failsIfConditionHasAFailedSubtask', function() { + var callbacks = callbackPair(null, assertIsStubError); + var count = 0; + scheduleWait(function() { + scheduleAction('maybe throw', function() { + if (++count == 2) { + throw new StubError; + } + }); + }, 100, 'waiting').then(callbacks.callback, callbacks.errback); + schedule('post wait'); + + return waitForIdle().then(function() { + assert.equal(2, count); + assertFlowHistory( + '0: waiting', 'maybe throw', + '1: waiting', 'maybe throw', + 'post wait'); + }); + }); + + it('pollingLoopWaitsForAllScheduledTasksInCondition', function() { + var count = 0; + scheduleWait(function() { + scheduleAction('increment count', function() { ++count; }); + return count >= 3; + }, 100, 'counting to 3'); + schedule('post wait'); + + return waitForIdle().then(function() { + assert.equal(4, count); + assertFlowHistory( + '0: counting to 3', 'increment count', + '1: counting to 3', 'increment count', + '2: counting to 3', 'increment count', + '3: counting to 3', 'increment count', + 'post wait'); + }); + }); + + it('waitsForeverOnAZeroTimeout', function() { + var done = false; + setTimeout(function() { + done = true; + }, 150); + var waitResult = scheduleWait(function() { + return done; + }, 0); + + return timeout(75).then(function() { + assert.ok(!done); + return timeout(100); + }).then(function() { + assert.ok(done); + return waitResult; + }); + }); + + it('waitsForeverIfTimeoutOmitted', function() { + var done = false; + setTimeout(function() { + done = true; + }, 150); + var waitResult = scheduleWait(function() { + return done; + }); + + return timeout(75).then(function() { + assert.ok(!done); + return timeout(100); + }).then(function() { + assert.ok(done); + return waitResult; + }); + }); + + it('timesOut_nonZeroTimeout', function() { + var count = 0; + scheduleWait(function() { + count += 1; + var ms = count === 2 ? 65 : 5; + return promise.delayed(ms).then(function() { + return false; + }); + }, 60, 'counting to 3'); + return waitForAbort().then(function(e) { + switch (count) { + case 1: + assertFlowHistory('0: counting to 3'); + break; + case 2: + assertFlowHistory('0: counting to 3', '1: counting to 3'); + break; + default: + fail('unexpected polling count: ' + count); + } + assert.ok(e instanceof TimeoutError, 'Unexpected error: ' + e); + assert.ok( + /^counting to 3\nWait timed out after \d+ms$/.test(e.message)); + }); + }); + + it('shouldFailIfConditionReturnsARejectedPromise', function() { + scheduleWait(function() { + return promise.rejected(new StubError); + }, 100, 'returns rejected promise on first pass'); + return waitForAbort().then(assertIsStubError); + }); + + it('scheduleWithIntermittentWaits', function() { + schedule('a'); + scheduleWait(function() { return true; }, 0, 'wait 1'); + schedule('b'); + scheduleWait(function() { return true; }, 0, 'wait 2'); + schedule('c'); + scheduleWait(function() { return true; }, 0, 'wait 3'); + + return waitForIdle().then(function() { + assertFlowHistory('a', '0: wait 1', 'b', '0: wait 2', 'c', '0: wait 3'); + }); + }); + + it('scheduleWithIntermittentAndNestedWaits', function() { + schedule('a'); + scheduleWait(function() { return true; }, 0, 'wait 1'). + then(function() { + schedule('d'); + scheduleWait(function() { return true; }, 0, 'wait 2'); + schedule('e'); + }); + schedule('b'); + scheduleWait(function() { return true; }, 0, 'wait 3'); + schedule('c'); + scheduleWait(function() { return true; }, 0, 'wait 4'); + + return waitForIdle().then(function() { + assertFlowHistory( + 'a', '0: wait 1', 'd', '0: wait 2', 'e', 'b', '0: wait 3', 'c', + '0: wait 4'); + }); + }); + + it('requiresConditionToBeAPromiseOrFunction', function() { + assert.throws(function() { + flow.wait(1234, 0); + }); + flow.wait(function() { return true;}, 0); + flow.wait(promise.fulfilled(), 0); + return waitForIdle(); + }); + + it('promiseThatDoesNotResolveBeforeTimeout', function() { + var d = promise.defer(); + flow.wait(d.promise, 5).then(fail, function(e) { + assert.ok(e instanceof TimeoutError, 'Unexpected error: ' + e); + assert.ok( + /Timed out waiting for promise to resolve after \d+ms/ + .test(e.message), + 'unexpected error message: ' + e.message); + }); + return waitForIdle(); + }); + + it('unboundedWaitOnPromiseResolution', function() { + var messages = []; + var d = promise.defer(); + var waitResult = flow.wait(d.promise).then(function(value) { + messages.push('b'); + assert.equal(1234, value); + }); + setTimeout(function() { + messages.push('a'); + }, 5); + + timeout(10).then(function() { + assert.deepEqual(['a'], messages); + d.fulfill(1234); + return waitResult; + }).then(function() { + assert.deepEqual(['a', 'b'], messages); + }); + + return waitForIdle(); + }); + }); + + describe('testSubtasks', function() { + it('(base case)', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + schedule('c'); + schedule('d'); + }); + schedule('b'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'sub-tasks', 'c', 'd', 'b'); + }); + }); + + it('nesting', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + schedule('b'); + scheduleAction('sub-sub-tasks', function() { + schedule('c'); + schedule('d'); + }); + schedule('e'); + }); + schedule('f'); + + return waitForIdle().then(function() { + assertFlowHistory( + 'a', 'sub-tasks', 'b', 'sub-sub-tasks', 'c', 'd', 'e', 'f'); + }); + }); + + it('taskReturnsSubTaskResult_1', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + return schedule('c'); + }); + schedule('b'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'sub-tasks', 'c', 'b'); + }); + }); + + it('taskReturnsSubTaskResult_2', function() { + let pair = callbackPair((value) => assert.equal(123, value)); + schedule('a'); + schedule('sub-tasks', promise.fulfilled(123)).then(pair.callback); + schedule('b'); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'sub-tasks','b'); + pair.assertCallback(); + }); + }); + + it('taskReturnsPromiseThatDependsOnSubtask_1', function() { + scheduleAction('a', function() { + return promise.delayed(10).then(function() { + schedule('b'); + }); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskReturnsPromiseThatDependsOnSubtask_2', function() { + scheduleAction('a', function() { + return promise.fulfilled().then(function() { + schedule('b'); + }); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskReturnsPromiseThatDependsOnSubtask_3', function() { + scheduleAction('a', function() { + return promise.delayed(10).then(function() { + return schedule('b'); + }); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskReturnsPromiseThatDependsOnSubtask_4', function() { + scheduleAction('a', function() { + return promise.delayed(5).then(function() { + return promise.delayed(5).then(function() { + return schedule('b'); + }); + }); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskReturnsPromiseThatDependsOnSubtask_5', function() { + scheduleAction('a', function() { + return promise.delayed(5).then(function() { + return promise.delayed(5).then(function() { + return promise.delayed(5).then(function() { + return promise.delayed(5).then(function() { + return schedule('b'); + }); + }); + }); + }); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('taskReturnsPromiseThatDependsOnSubtask_6', function() { + scheduleAction('a', function() { + return promise.delayed(5). + then(function() { return promise.delayed(5) }). + then(function() { return promise.delayed(5) }). + then(function() { return promise.delayed(5) }). + then(function() { return schedule('b'); }); + }); + schedule('c'); + return waitForIdle().then(function() { + assertFlowHistory('a', 'b', 'c'); + }); + }); + + it('subTaskFails_1', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + scheduleAction('sub-task that fails', throwStubError); + }); + schedule('should never execute'); + + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('a', 'sub-tasks', 'sub-task that fails'); + }); + }); + + it('subTaskFails_2', function() { + schedule('a'); + scheduleAction('sub-tasks', function() { + return promise.rejected(new StubError); + }); + schedule('should never execute'); + + return waitForAbort(). + then(assertIsStubError). + then(function() { + assertFlowHistory('a', 'sub-tasks'); + }); + }); + + it('subTaskFails_3', function() { + var callbacks = callbackPair(null, assertIsStubError); + + schedule('a'); + scheduleAction('sub-tasks', function() { + return promise.rejected(new StubError); + }).then(callbacks.callback, callbacks.errback); + schedule('b'); + + return waitForIdle(). + then(function() { + assertFlowHistory('a', 'sub-tasks', 'b'); + callbacks.assertErrback(); + }); + }); + }); + + describe('testEventLoopWaitsOnPendingPromiseRejections', function() { + it('oneRejection', function() { + var d = new promise.Deferred; + scheduleAction('one', function() { + return d.promise; + }); + scheduleAction('two', function() {}); + + return timeout(50).then(function() { + assertFlowHistory('one'); + d.reject(new StubError); + return waitForAbort(); + }). + then(assertIsStubError). + then(function() { + assertFlowHistory('one'); + }); + }); + + it('multipleRejections', function() { + var once = Error('once'); + var twice = Error('twice'); + + scheduleAction('one', function() { + promise.rejected(once); + promise.rejected(twice); + }); + var twoResult = scheduleAction('two', function() {}); + + flow.removeAllListeners( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); + return new NativePromise(function(fulfill, reject) { + setTimeout(function() { + reject(Error('Should have reported the two errors by now')); + }, 50); + flow.on( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, + fulfill); + }).then(function(e) { + assert.ok(e instanceof promise.MultipleUnhandledRejectionError, + 'Not a MultipleUnhandledRejectionError'); + let errors = Array.from(e.errors); + assert.deepEqual([once, twice], errors); + assertFlowHistory('one'); + }); + }); + }); + + describe('testCancelsPromiseReturnedByCallbackIfFrameFails', function() { + it('promiseCallback', function() { + var chainPair = callbackPair(null, assertIsStubError); + var deferredPair = callbackPair(null, function(e) { + assert.equal('CancellationError: StubError', e.toString(), + 'callback result should be cancelled'); + }); + + var d = new promise.Deferred(); + d.promise.then(deferredPair.callback, deferredPair.errback); + + promise.fulfilled(). + then(function() { + scheduleAction('boom', throwStubError); + schedule('this should not run'); + return d.promise; + }). + then(chainPair.callback, chainPair.errback); + + return waitForIdle().then(function() { + assertFlowHistory('boom'); + chainPair.assertErrback('chain errback not invoked'); + deferredPair.assertErrback('deferred errback not invoked'); + }); + }); + + it('taskCallback', function() { + var chainPair = callbackPair(null, assertIsStubError); + var deferredPair = callbackPair(null, function(e) { + assert.equal('CancellationError: StubError', e.toString(), + 'callback result should be cancelled'); + }); + + var d = new promise.Deferred(); + d.promise.then(deferredPair.callback, deferredPair.errback); + + schedule('a'). + then(function() { + scheduleAction('boom', throwStubError); + schedule('this should not run'); + return d.promise; + }). + then(chainPair.callback, chainPair.errback); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'boom'); + chainPair.assertErrback('chain errback not invoked'); + deferredPair.assertErrback('deferred errback not invoked'); + }); + }); + }); + + it('testMaintainsOrderInCallbacksWhenATaskReturnsAPromise', function() { + schedule('__start__', promise.fulfilled()). + then(function() { + messages.push('a'); + schedulePush('b'); + messages.push('c'); + }). + then(function() { + messages.push('d'); + }); + schedulePush('e'); + + return waitForIdle().then(function() { + assertFlowHistory('__start__', 'b', 'e'); + assertMessages('a', 'c', 'b', 'd', 'e'); + }); + }); + + it('testOwningFlowIsActivatedForExecutingTasks', function() { + var defaultFlow = promise.controlFlow(); + var order = []; + + promise.createFlow(function(flow) { + assertFlowIs(flow); + order.push(0); + + defaultFlow.execute(function() { + assertFlowIs(defaultFlow); + order.push(1); + }); + }); + + return waitForIdle().then(function() { + assertFlowIs(defaultFlow); + assert.deepEqual([0, 1], order); + }); + }); + + it('testCreateFlowReturnsPromisePairedWithCreatedFlow', function() { + return new NativePromise(function(fulfill, reject) { + var newFlow; + promise.createFlow(function(flow) { + newFlow = flow; + assertFlowIs(newFlow); + }).then(function() { + assertFlowIs(newFlow); + waitForIdle(newFlow).then(fulfill, reject); + }); + }); + }); + + it('testDeferredFactoriesCreateForActiveFlow_defaultFlow', function() { + var e = Error(); + var defaultFlow = promise.controlFlow(); + promise.fulfilled().then(function() { + assertFlowIs(defaultFlow); + }); + promise.rejected(e).then(null, function(err) { + assert.equal(e, err); + assertFlowIs(defaultFlow); + }); + promise.defer().promise.then(function() { + assertFlowIs(defaultFlow); + }); + + return waitForIdle(); + }); + + it('testDeferredFactoriesCreateForActiveFlow_newFlow', function() { + var e = Error(); + var newFlow = new promise.ControlFlow; + newFlow.execute(function() { + promise.fulfilled().then(function() { + assertFlowIs(newFlow); + }); + + promise.rejected(e).then(null, function(err) { + assert.equal(e, err); + assertFlowIs(newFlow); + }); + + let d = promise.defer(); + d.promise.then(function() { + assertFlowIs(newFlow); + }); + d.fulfill(); + }).then(function() { + assertFlowIs(newFlow); + }); + + return waitForIdle(newFlow); + }); + + it('testFlowsSynchronizeWithThemselvesNotEachOther', function() { + var defaultFlow = promise.controlFlow(); + schedulePush('a', 'a'); + promise.controlFlow().timeout(500); + schedulePush('b', 'b'); + + promise.createFlow(function(flow2) { + assertFlowIs(flow2); + schedulePush('c', 'c'); + schedulePush('d', 'd'); + }); + + return waitForIdle().then(function() { + assertMessages('a', 'c', 'd', 'b'); + }); + }); + + it('testUnhandledErrorsAreReportedToTheOwningFlow', function() { + var error1 = Error('e1'); + var error2 = Error('e2'); + + var defaultFlow = promise.controlFlow(); + defaultFlow.removeAllListeners('uncaughtException'); + + var flow1Error = defer(); + flow1Error.promise.then(function(value) { + assert.equal(error2, value); + }); + + var flow2Error = defer(); + flow2Error.promise.then(function(value) { + assert.equal(error1, value); + }); + + promise.createFlow(function(flow) { + flow.once('uncaughtException', flow2Error.resolve); + promise.rejected(error1); + + defaultFlow.once('uncaughtException', flow1Error.resolve); + defaultFlow.execute(function() { + promise.rejected(error2); + }); + }); + + return NativePromise.all([flow1Error.promise, flow2Error.promise]); + }); + + it('testCanSynchronizeFlowsByReturningPromiseFromOneToAnother', function() { + var flow1 = new promise.ControlFlow; + var flow1Done = defer(); + flow1.once('idle', flow1Done.resolve); + flow1.once('uncaughtException', flow1Done.reject); + + var flow2 = new promise.ControlFlow; + var flow2Done = defer(); + flow2.once('idle', flow2Done.resolve); + flow2.once('uncaughtException', flow2Done.reject); + + flow1.execute(function() { + schedulePush('a', 'a'); + return promise.delayed(25); + }, 'start flow 1'); + + flow2.execute(function() { + schedulePush('b', 'b'); + schedulePush('c', 'c'); + flow2.execute(function() { + return flow1.execute(function() { + schedulePush('d', 'd'); + }, 'flow 1 task'); + }, 'inject flow1 result into flow2'); + schedulePush('e', 'e'); + }, 'start flow 2'); + + return NativePromise.all([flow1Done.promise, flow2Done.promise]). + then(function() { + assertMessages('a', 'b', 'c', 'd', 'e'); + }); + }); + + it('testFramesWaitToCompleteForPendingRejections', function() { + return new NativePromise(function(fulfill, reject) { + + promise.controlFlow().execute(function() { + promise.rejected(new StubError); + }).then(fulfill, reject); + + }). + then(() => fail('expected to fail'), assertIsStubError); + }); + + it('testSynchronizeErrorsPropagateToOuterFlow', function() { + var outerFlow = new promise.ControlFlow; + var innerFlow = new promise.ControlFlow; + + var block = defer(); + innerFlow.execute(function() { + return block.promise; + }, 'block inner flow'); + + outerFlow.execute(function() { + block.resolve(); + return innerFlow.execute(function() { + promise.rejected(new StubError); + }, 'trigger unhandled rejection error'); + }, 'run test'); + + return NativePromise.all([ + waitForIdle(innerFlow), + waitForAbort(outerFlow).then(assertIsStubError) + ]); + }); + + it('testFailsIfErrbackThrows', function() { + promise.rejected('').then(null, throwStubError); + return waitForAbort().then(assertIsStubError); + }); + + it('testFailsIfCallbackReturnsRejectedPromise', function() { + promise.fulfilled().then(function() { + return promise.rejected(new StubError); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('testAbortsFrameIfTaskFails', function() { + promise.fulfilled().then(function() { + promise.controlFlow().execute(throwStubError); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('testAbortsFramePromisedChainedFromTaskIsNotHandled', function() { + promise.fulfilled().then(function() { + promise.controlFlow().execute(function() {}). + then(throwStubError); + }); + return waitForAbort().then(assertIsStubError); + }); + + it('testTrapsChainedUnhandledRejectionsWithinAFrame', function() { + var pair = callbackPair(null, assertIsStubError); + promise.fulfilled().then(function() { + promise.controlFlow().execute(function() {}). + then(throwStubError); + }).then(pair.callback, pair.errback); + + return waitForIdle().then(pair.assertErrback); + }); + + it('testCancelsRemainingTasksIfFrameThrowsDuringScheduling', function() { + var task1, task2; + var pair = callbackPair(null, assertIsStubError); + var flow = promise.controlFlow(); + flow.execute(function() { + task1 = flow.execute(function() {}); + task2 = flow.execute(function() {}); + throw new StubError; + }).then(pair.callback, pair.errback); + + return waitForIdle(). + then(pair.assertErrback). + then(function() { + pair = callbackPair(); + return task1.then(pair.callback, pair.errback); + }). + then(function() { + pair.assertErrback(); + pair = callbackPair(); + return task2.then(pair.callback, pair.errback); + }). + then(function() { + pair.assertErrback(); + }); + }); + + it('testCancelsRemainingTasksInFrameIfATaskFails', function() { + var task; + var pair = callbackPair(null, assertIsStubError); + var flow = promise.controlFlow(); + flow.execute(function() { + flow.execute(throwStubError); + task = flow.execute(function() {}); + }).then(pair.callback, pair.errback); + + return waitForIdle().then(pair.assertErrback).then(function() { + pair = callbackPair(); + task.then(pair.callback, pair.errback); + }).then(function() { + pair.assertErrback(); + }); + }); + + it('testDoesNotModifyRejectionErrorIfPromiseNotInsideAFlow', function() { + var error = Error('original message'); + var originalStack = error.stack; + var originalStr = error.toString(); + + var pair = callbackPair(null, function(e) { + assert.equal(error, e); + assert.equal('original message', e.message); + assert.equal(originalStack, e.stack); + assert.equal(originalStr, e.toString()); + }); + + promise.rejected(error).then(pair.callback, pair.errback); + return waitForIdle().then(pair.assertErrback); + }); + + /** See https://github.com/SeleniumHQ/selenium/issues/444 */ + it('testMaintainsOrderWithPromiseChainsCreatedWithinAForeach_1', function() { + var messages = []; + flow.execute(function() { + return promise.fulfilled(['a', 'b', 'c', 'd']); + }, 'start').then(function(steps) { + steps.forEach(function(step) { + promise.fulfilled(step) + .then(function() { + messages.push(step + '.1'); + }).then(function() { + messages.push(step + '.2'); + }); + }) + }); + return waitForIdle().then(function() { + assert.deepEqual( + ['a.1', 'a.2', 'b.1', 'b.2', 'c.1', 'c.2', 'd.1', 'd.2'], + messages); + }); + }); + + /** See https://github.com/SeleniumHQ/selenium/issues/444 */ + it('testMaintainsOrderWithPromiseChainsCreatedWithinAForeach_2', function() { + var messages = []; + flow.execute(function() { + return promise.fulfilled(['a', 'b', 'c', 'd']); + }, 'start').then(function(steps) { + steps.forEach(function(step) { + promise.fulfilled(step) + .then(function() { + messages.push(step + '.1'); + }).then(function() { + flow.execute(function() {}, step + '.2').then(function() { + messages.push(step + '.2'); + }); + }); + }) + }); + return waitForIdle().then(function() { + assert.deepEqual( + ['a.1', 'a.2', 'b.1', 'b.2', 'c.1', 'c.2', 'd.1', 'd.2'], + messages); + }); + }); + + /** See https://github.com/SeleniumHQ/selenium/issues/444 */ + it('testMaintainsOrderWithPromiseChainsCreatedWithinAForeach_3', function() { + var messages = []; + flow.execute(function() { + return promise.fulfilled(['a', 'b', 'c', 'd']); + }, 'start').then(function(steps) { + steps.forEach(function(step) { + promise.fulfilled(step) + .then(function(){}) + .then(function() { + messages.push(step + '.1'); + return flow.execute(function() {}, step + '.1'); + }).then(function() { + flow.execute(function() {}, step + '.2').then(function(text) { + messages.push(step + '.2'); + }); + }); + }) + }); + return waitForIdle().then(function() { + assert.deepEqual( + ['a.1', 'a.2', 'b.1', 'b.2', 'c.1', 'c.2', 'd.1', 'd.2'], + messages); + }); + }); + + /** See https://github.com/SeleniumHQ/selenium/issues/363 */ + it('testTasksScheduledInASeparateTurnOfTheEventLoopGetASeparateTaskQueue_2', function() { + scheduleAction('a', () => promise.delayed(10)); + schedule('b'); + setTimeout(() => schedule('c'), 0); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'c', 'b'); + }); + }); + + /** See https://github.com/SeleniumHQ/selenium/issues/363 */ + it('testTasksScheduledInASeparateTurnOfTheEventLoopGetASeparateTaskQueue_2', function() { + scheduleAction('a', () => promise.delayed(10)); + schedule('b'); + schedule('c'); + setTimeout(function() { + schedule('d'); + scheduleAction('e', () => promise.delayed(10)); + schedule('f'); + }, 0); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'd', 'e', 'b', 'c', 'f'); + }); + }); + + /** See https://github.com/SeleniumHQ/selenium/issues/363 */ + it('testCanSynchronizeTasksFromAdjacentTaskQueues', function() { + var task1 = scheduleAction('a', () => promise.delayed(10)); + schedule('b'); + setTimeout(function() { + scheduleAction('c', () => task1); + schedule('d'); + }, 0); + + return waitForIdle().then(function() { + assertFlowHistory('a', 'c', 'd', 'b'); + }); + }); + + describe('testCancellingAScheduledTask', function() { + it('1', function() { + var called = false; + var task1 = scheduleAction('a', () => called = true); + task1.cancel('no soup for you'); + + return waitForIdle().then(function() { + assert.ok(!called); + assertFlowHistory(); + return task1.catch(function(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal('no soup for you', e.message); + }); + }); + }); + + it('2', function() { + schedule('a'); + var called = false; + var task2 = scheduleAction('b', () => called = true); + schedule('c'); + + task2.cancel('no soup for you'); + + return waitForIdle().then(function() { + assert.ok(!called); + assertFlowHistory('a', 'c'); + return task2.catch(function(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal('no soup for you', e.message); + }); + }); + }); + + it('3', function() { + var called = false; + var task = scheduleAction('a', () => called = true); + task.cancel(new StubError); + + return waitForIdle().then(function() { + assert.ok(!called); + assertFlowHistory(); + return task.catch(function(e) { + assert.ok(e instanceof promise.CancellationError); + }); + }); + }); + + it('4', function() { + var seen = []; + var task = scheduleAction('a', () => seen.push(1)) + .then(() => seen.push(2)) + .then(() => seen.push(3)) + .then(() => seen.push(4)) + .then(() => seen.push(5)); + task.cancel(new StubError); + + return waitForIdle().then(function() { + assert.deepEqual([], seen); + assertFlowHistory(); + return task.catch(function(e) { + assert.ok(e instanceof promise.CancellationError); + }); + }); + }); + + it('fromWithinAnExecutingTask', function() { + var called = false; + var task; + scheduleAction('a', function() { + task.cancel('no soup for you'); + }); + task = scheduleAction('b', () => called = true); + schedule('c'); + + return waitForIdle().then(function() { + assert.ok(!called); + assertFlowHistory('a', 'c'); + return task.catch(function(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal('no soup for you', e.message); + }); + }); + }); + }); + + it('testCancellingAPendingTask', function() { + var order = []; + var unresolved = promise.defer(); + + var innerTask; + var outerTask = scheduleAction('a', function() { + order.push(1); + + // Schedule a task that will never finish. + innerTask = scheduleAction('a.1', function() { + return unresolved.promise; + }); + + // Since the outerTask is cancelled below, innerTask should be cancelled + // with a DiscardedTaskError, which means its callbacks are silently + // dropped - so this should never execute. + innerTask.catch(function(e) { + order.push(2); + }); + }); + schedule('b'); + + outerTask.catch(function(e) { + order.push(3); + assert.ok(e instanceof promise.CancellationError); + assert.equal('no soup for you', e.message); + }); + + unresolved.promise.catch(function(e) { + order.push(4); + assert.ok(e instanceof promise.CancellationError); + }); + + return timeout(10).then(function() { + assert.deepEqual([1], order); + + outerTask.cancel('no soup for you'); + return waitForIdle(); + }).then(function() { + assertFlowHistory('a', 'a.1', 'b'); + assert.deepEqual([1, 3, 4], order); + }); + }); + + it('testCancellingAPendingPromiseCallback', function() { + var called = false; + + var root = promise.fulfilled(); + root.then(function() { + cb2.cancel('no soup for you'); + }); + + var cb2 = root.then(fail, fail); // These callbacks should never be called. + cb2.then(fail, function(e) { + called = true; + assert.ok(e instanceof promise.CancellationError); + assert.equal('no soup for you', e.message); + }); + + return waitForIdle().then(function() { + assert.ok(called); + }); + }); + + describe('testResetFlow', function() { + it('1', function() { + var called = 0; + var task = flow.execute(() => called++); + task.finally(() => called++); + + return new Promise(function(fulfill) { + flow.once('reset', fulfill); + flow.reset(); + + }).then(function() { + assert.equal(0, called); + return task; + + }).then(fail, function(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal('ControlFlow was reset', e.message); + }); + }); + + it('2', function() { + var called = 0; + var task1 = flow.execute(() => called++); + task1.finally(() => called++); + + var task2 = flow.execute(() => called++); + task2.finally(() => called++); + + var task3 = flow.execute(() => called++); + task3.finally(() => called++); + + return new Promise(function(fulfill) { + flow.once('reset', fulfill); + flow.reset(); + + }).then(function() { + assert.equal(0, called); + }); + }); + }); + + describe('testPromiseFulfilledInsideTask', function() { + it('1', function() { + var order = []; + + flow.execute(function() { + var d = promise.defer(); + + d.promise.then(() => order.push('a')); + d.promise.then(() => order.push('b')); + d.promise.then(() => order.push('c')); + d.fulfill(); + + flow.execute(() => order.push('d')); + + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['a', 'b', 'c', 'd', 'fin'], order); + }); + }); + + it('2', function() { + var order = []; + + flow.execute(function() { + flow.execute(() => order.push('a')); + flow.execute(() => order.push('b')); + + var d = promise.defer(); + d.promise.then(() => order.push('c')); + d.promise.then(() => order.push('d')); + d.fulfill(); + + flow.execute(() => order.push('e')); + + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['a', 'b', 'c', 'd', 'e', 'fin'], order); + }); + }); + + it('3', function() { + var order = []; + var d = promise.defer(); + d.promise.then(() => order.push('c')); + d.promise.then(() => order.push('d')); + + flow.execute(function() { + flow.execute(() => order.push('a')); + flow.execute(() => order.push('b')); + + d.promise.then(() => order.push('e')); + d.fulfill(); + + flow.execute(() => order.push('f')); + + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['c', 'd', 'a', 'b', 'e', 'f', 'fin'], order); + }); + }); + + it('4', function() { + var order = []; + var d = promise.defer(); + d.promise.then(() => order.push('a')); + d.promise.then(() => order.push('b')); + + flow.execute(function() { + flow.execute(function() { + order.push('c'); + flow.execute(() => order.push('d')); + d.promise.then(() => order.push('e')); + }); + flow.execute(() => order.push('f')); + + d.promise.then(() => order.push('g')); + d.fulfill(); + + flow.execute(() => order.push('h')); + + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'fin'], order); + }); + }); + }); + + describe('testSettledPromiseCallbacksInsideATask', function() { + it('1', function() { + var order = []; + var p = promise.fulfilled(); + + flow.execute(function() { + flow.execute(() => order.push('a')); + p.then(() => order.push('b')); + flow.execute(() => order.push('c')); + p.then(() => order.push('d')); + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['a', 'b', 'c', 'd', 'fin'], order); + }); + }); + + it('2', function() { + var order = []; + + flow.execute(function() { + flow.execute(() => order.push('a')) + .then( () => order.push('c')); + flow.execute(() => order.push('b')); + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['a', 'c', 'b', 'fin'], order); + }); + }); + }); + + it('testTasksDoNotWaitForNewlyCreatedPromises', function() { + var order = []; + + flow.execute(function() { + var d = promise.defer(); + + // This is a normal promise, not a task, so the task for this callback is + // considered volatile. Volatile tasks should be skipped when they reach + // the front of the task queue. + d.promise.then(() => order.push('a')); + + flow.execute(() => order.push('b')); + flow.execute(function() { + flow.execute(() => order.push('c')); + d.promise.then(() => order.push('d')); + d.fulfill(); + }); + flow.execute(() => order.push('e')); + + }).then(() => order.push('fin')); + + return waitForIdle().then(function() { + assert.deepEqual(['b', 'a', 'c', 'd', 'e', 'fin'], order); + }); + }); + + it('testCallbackDependenciesDoNotDeadlock', function() { + var order = []; + var root = promise.defer(); + var dep = promise.fulfilled().then(function() { + order.push('a'); + return root.promise.then(function() { + order.push('b'); + }); + }); + // This callback depends on |dep|, which depends on another callback + // attached to |root| via a chain. + root.promise.then(function() { + order.push('c'); + return dep.then(() => order.push('d')); + }).then(() => order.push('fin')); + + setTimeout(() => root.fulfill(), 20); + + return waitForIdle().then(function() { + assert.deepEqual(['a', 'b', 'c', 'd', 'fin'], order); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js new file mode 100644 index 00000000..b3388da7 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js @@ -0,0 +1,310 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const promise = require('../../lib/promise'); +const {enablePromiseManager, promiseManagerSuite} = require('../../lib/test/promise'); + +describe('promise.consume()', function() { + promiseManagerSuite(() => { + it('requires inputs to be generator functions', function() { + assert.throws(function() { + promise.consume(function() {}); + }); + }); + + it('handles a basic generator with no yielded promises', function() { + var values = []; + return promise.consume(function* () { + var i = 0; + while (i < 4) { + i = yield i + 1; + values.push(i); + } + }).then(function() { + assert.deepEqual([1, 2, 3, 4], values); + }); + }); + + it('handles a promise yielding generator', function() { + var values = []; + return promise.consume(function* () { + var i = 0; + while (i < 4) { + // Test that things are actually async here. + setTimeout(function() { + values.push(i * 2); + }, 10); + + yield promise.delayed(10).then(function() { + values.push(i++); + }); + } + }).then(function() { + assert.deepEqual([0, 0, 2, 1, 4, 2, 6, 3], values); + }); + }); + + it('assignments to yielded promises get fulfilled value', function() { + return promise.consume(function* () { + let x = yield Promise.resolve(2); + assert.equal(2, x); + }); + }); + + it('uses final return value as fulfillment value', function() { + return promise.consume(function* () { + yield 1; + yield 2; + return 3; + }).then(function(value) { + assert.equal(3, value); + }); + }); + + it('throws rejected promise errors within the generator', function() { + var values = []; + return promise.consume(function* () { + values.push('a'); + var e = Error('stub error'); + try { + yield Promise.reject(e); + values.push('b'); + } catch (ex) { + assert.equal(e, ex); + values.push('c'); + } + values.push('d'); + }).then(function() { + assert.deepEqual(['a', 'c', 'd'], values); + }); + }); + + it('aborts the generator if there is an unhandled rejection', function() { + var values = []; + var e = Error('stub error'); + return promise.consume(function* () { + values.push(1); + yield promise.rejected(e); + values.push(2); + }).catch(function() { + assert.deepEqual([1], values); + }); + }); + + it('yield waits for promises', function() { + let values = []; + let blocker = promise.delayed(100).then(() => { + assert.deepEqual([1], values); + return 2; + }); + + return promise.consume(function* () { + values.push(1); + values.push(yield blocker, 3); + }).then(function() { + assert.deepEqual([1, 2, 3], values); + }); + }); + + it('accepts custom scopes', function() { + return promise.consume(function* () { + return this.name; + }, {name: 'Bob'}).then(function(value) { + assert.equal('Bob', value); + }); + }); + + it('accepts initial generator arguments', function() { + return promise.consume(function* (a, b) { + assert.equal('red', a); + assert.equal('apples', b); + }, null, 'red', 'apples'); + }); + }); + + enablePromiseManager(() => { + it('is possible to cancel promise generators', function() { + var values = []; + var p = promise.consume(function* () { + var i = 0; + while (i < 3) { + yield promise.delayed(100).then(function() { + values.push(i++); + }); + } + }); + return promise.delayed(75).then(function() { + p.cancel(); + return p.catch(function() { + return promise.delayed(300); + }); + }).then(function() { + assert.deepEqual([0], values); + }); + }); + + it('executes generator within the control flow', function() { + var promises = [ + promise.defer(), + promise.defer() + ]; + var values = []; + + setTimeout(function() { + assert.deepEqual([], values); + promises[0].fulfill(1); + }, 100); + + setTimeout(function() { + assert.deepEqual([1], values); + promises[1].fulfill(2); + }, 200); + + return promise.controlFlow().execute(function* () { + values.push(yield promises[0].promise); + values.push(yield promises[1].promise); + values.push('fin'); + }).then(function() { + assert.deepEqual([1, 2, 'fin'], values); + }); + }); + + it('handles tasks scheduled in generator', function() { + var flow = promise.controlFlow(); + return flow.execute(function* () { + var x = yield flow.execute(function() { + return promise.delayed(10).then(function() { + return 1; + }); + }); + + var y = yield flow.execute(function() { + return 2; + }); + + return x + y; + }).then(function(value) { + assert.equal(3, value); + }); + }); + + it('blocks the control flow while processing generator', function() { + var values = []; + return promise.controlFlow().wait(function* () { + yield values.push(1); + values.push(yield promise.delayed(10).then(function() { + return 2; + })); + yield values.push(3); + return values.length === 6; + }, 250).then(function() { + assert.deepEqual([1, 2, 3, 1, 2, 3], values); + }); + }); + + it('ControlFlow.wait() will timeout on long generator', function() { + var values = []; + return promise.controlFlow().wait(function* () { + var i = 0; + while (i < 3) { + yield promise.delayed(100).then(function() { + values.push(i++); + }); + } + }, 75).catch(function() { + assert.deepEqual( + [0, 1, 2], values, 'Should complete one loop of wait condition'); + }); + }); + + describe('generators in promise callbacks', function() { + it('works with no initial value', function() { + var promises = [ + promise.defer(), + promise.defer() + ]; + var values = []; + + setTimeout(function() { + promises[0].fulfill(1); + }, 50); + + setTimeout(function() { + promises[1].fulfill(2); + }, 100); + + return promise.fulfilled().then(function*() { + values.push(yield promises[0].promise); + values.push(yield promises[1].promise); + values.push('fin'); + }).then(function() { + assert.deepEqual([1, 2, 'fin'], values); + }); + }); + + it('starts the generator with promised value', function() { + var promises = [ + promise.defer(), + promise.defer() + ]; + var values = []; + + setTimeout(function() { + promises[0].fulfill(1); + }, 50); + + setTimeout(function() { + promises[1].fulfill(2); + }, 100); + + return promise.fulfilled(3).then(function*(value) { + var p1 = yield promises[0].promise; + var p2 = yield promises[1].promise; + values.push(value + p1); + values.push(value + p2); + values.push('fin'); + }).then(function() { + assert.deepEqual([4, 5, 'fin'], values); + }); + }); + + it('throws yielded rejections within the generator callback', function() { + var d = promise.defer(); + var e = Error('stub'); + + setTimeout(function() { + d.reject(e); + }, 50); + + return promise.fulfilled().then(function*() { + var threw = false; + try { + yield d.promise; + } catch (ex) { + threw = true; + assert.equal(e, ex); + } + assert.ok(threw); + }); + }); + }); + }); +}); + diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js new file mode 100644 index 00000000..8da1cd89 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js @@ -0,0 +1,1109 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); + +const testutil = require('./testutil'); +const promise = require('../../lib/promise'); +const {enablePromiseManager, promiseManagerSuite} = require('../../lib/test/promise'); + +// Aliases for readability. +const NativePromise = Promise; +const StubError = testutil.StubError; +const assertIsStubError = testutil.assertIsStubError; +const callbackHelper = testutil.callbackHelper; +const callbackPair = testutil.callbackPair; +const throwStubError = testutil.throwStubError; +const fail = () => assert.fail(); + +// Refer to promise_aplus_test for promise compliance with standard behavior. +describe('promise', function() { + var app, uncaughtExceptions; + + beforeEach(function setUp() { + if (promise.USE_PROMISE_MANAGER) { + promise.LONG_STACK_TRACES = false; + uncaughtExceptions = []; + + app = promise.controlFlow(); + app.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, + (e) => uncaughtExceptions.push(e)); + } + }); + + afterEach(function tearDown() { + if (promise.USE_PROMISE_MANAGER) { + app.reset(); + promise.setDefaultFlow(new promise.ControlFlow); + assert.deepEqual([], uncaughtExceptions, + 'Did not expect any uncaught exceptions'); + promise.LONG_STACK_TRACES = false; + } + }); + + const assertIsPromise = (p) => assert.ok(promise.isPromise(p)); + const assertNotPromise = (v) => assert.ok(!promise.isPromise(v)); + + function defer() { + let d = {}; + let promise = new Promise((resolve, reject) => { + Object.assign(d, {resolve, reject}); + }); + d.promise = promise; + return d; + } + + function createRejectedPromise(reason) { + var p = Promise.reject(reason); + p.catch(function() {}); // Silence unhandled rejection handlers. + return p; + } + + enablePromiseManager(() => { + it('testCanDetectPromiseLikeObjects', function() { + assertIsPromise(new promise.Promise(function(fulfill) { + fulfill(); + })); + assertIsPromise(new promise.Deferred().promise); + assertIsPromise(Promise.resolve(123)); + assertIsPromise({then:function() {}}); + + assertNotPromise(new promise.Deferred()); + assertNotPromise(undefined); + assertNotPromise(null); + assertNotPromise(''); + assertNotPromise(true); + assertNotPromise(false); + assertNotPromise(1); + assertNotPromise({}); + assertNotPromise({then:1}); + assertNotPromise({then:true}); + assertNotPromise({then:''}); + }); + + describe('then', function() { + it('returnsOwnPromiseIfNoCallbacksWereGiven', function() { + var deferred = new promise.Deferred(); + assert.equal(deferred.promise, deferred.promise.then()); + assert.equal(deferred.promise, deferred.promise.catch()); + assert.equal(deferred.promise, promise.when(deferred.promise)); + }); + + it('stillConsideredUnHandledIfNoCallbacksWereGivenOnCallsToThen', function() { + promise.rejected(new StubError).then(); + var handler = callbackHelper(assertIsStubError); + + // so tearDown() doesn't throw + app.removeAllListeners(); + app.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, handler); + return NativePromise.resolve() + // Macro yield so the uncaught exception has a chance to trigger. + .then(() => new NativePromise(resolve => setTimeout(resolve, 0))) + .then(() => handler.assertCalled()); + }); + }); + + describe('finally', function() { + it('nonFailingCallbackDoesNotSuppressOriginalError', function() { + var done = callbackHelper(assertIsStubError); + return promise.rejected(new StubError). + finally(function() {}). + catch(done). + finally(done.assertCalled); + }); + + it('failingCallbackSuppressesOriginalError', function() { + var done = callbackHelper(assertIsStubError); + return promise.rejected(new Error('original')). + finally(throwStubError). + catch(done). + finally(done.assertCalled); + }); + + it('callbackThrowsAfterFulfilledPromise', function() { + var done = callbackHelper(assertIsStubError); + return promise.fulfilled(). + finally(throwStubError). + catch(done). + finally(done.assertCalled); + }); + + it('callbackReturnsRejectedPromise', function() { + var done = callbackHelper(assertIsStubError); + return promise.fulfilled(). + finally(function() { + return promise.rejected(new StubError); + }). + catch(done). + finally(done.assertCalled); + }); + }); + + describe('cancel', function() { + it('passesTheCancellationReasonToReject', function() { + var d = new promise.Deferred(); + var res = d.promise.then(assert.fail, function(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal('because i said so', e.message); + }); + d.promise.cancel('because i said so'); + return res; + }); + + describe('can cancel original promise from its child;', function() { + it('child created by then()', function() { + var d = new promise.Deferred(); + var p = d.promise.then(assert.fail, function(e) { + assert.ok(e instanceof promise.CancellationError); + assert.equal('because i said so', e.message); + return 123; + }); + + p.cancel('because i said so'); + return p.then(v => assert.equal(123, v)); + }); + + it('child linked by resolving with parent', function() { + let parent = promise.defer(); + let child = new promise.Promise(resolve => resolve(parent.promise)); + child.cancel('all done'); + + return parent.promise.then( + () => assert.fail('expected a cancellation'), + e => { + assert.ok(e instanceof promise.CancellationError); + assert.equal('all done', e.message); + }); + }); + + it('grand child through thenable chain', function() { + let p = new promise.Promise(function() {/* never resolve*/}); + + let noop = function() {}; + let gc = p.then(noop).then(noop).then(noop); + gc.cancel('stop!'); + + return p.then( + () => assert.fail('expected to be cancelled'), + (e) => { + assert.ok(e instanceof promise.CancellationError); + assert.equal('stop!', e.message); + }); + }); + + it('grand child through thenable chain started at resolve', function() { + function noop() {} + + let parent = promise.defer(); + let child = new promise.Promise(resolve => resolve(parent.promise)); + let grandChild = child.then(noop).then(noop).then(noop); + grandChild.cancel('all done'); + + return parent.promise.then( + () => assert.fail('expected a cancellation'), + e => { + assert.ok(e instanceof promise.CancellationError); + assert.equal('all done', e.message); + }); + }); + + it('"parent" is a CancellableThenable', function() { + function noop() {} + + class FakeThenable { + constructor(p) { + this.promise = p; + } + + cancel(reason) { + this.promise.cancel(reason); + } + + then(cb, eb) { + let result = this.promise.then(cb, eb); + return new FakeThenable(result); + } + } + promise.CancellableThenable.addImplementation(FakeThenable); + + let root = new promise.Promise(noop); + let thenable = new FakeThenable(root); + assert.ok(promise.Thenable.isImplementation(thenable)); + assert.ok(promise.CancellableThenable.isImplementation(thenable)); + + let child = new promise.Promise(resolve => resolve(thenable)); + assert.ok(child instanceof promise.Promise); + child.cancel('stop!'); + + function assertStopped(p) { + return p.then( + () => assert.fail('not stopped!'), + (e) => { + assert.ok(e instanceof promise.CancellationError); + assert.equal('stop!', e.message); + }); + } + + return assertStopped(child).then(() => assertStopped(root)); + }); + }); + + it('canCancelATimeout', function() { + var p = promise.delayed(25) + .then(assert.fail, (e) => e instanceof promise.CancellationError); + setTimeout(() => p.cancel(), 20); + p.cancel(); + return p; + }); + + it('can cancel timeout from grandchild', function() { + }); + + it('cancelIsANoopOnceAPromiseHasBeenFulfilled', function() { + var p = promise.fulfilled(123); + p.cancel(); + return p.then((v) => assert.equal(123, v)); + }); + + it('cancelIsANoopOnceAPromiseHasBeenRejected', function() { + var p = promise.rejected(new StubError); + p.cancel(); + + var pair = callbackPair(null, assertIsStubError); + return p.then(assert.fail, assertIsStubError); + }); + + it('noopCancelTriggeredOnCallbackOfResolvedPromise', function() { + var d = promise.defer(); + var p = d.promise.then(); + + d.fulfill(); + p.cancel(); // This should not throw. + return p; // This should not trigger a failure. + }); + }); + }); + + promiseManagerSuite(() => { + describe('fulfilled', function() { + it('returns input value if it is already a valid promise', function() { + let p = promise.createPromise(function() {}); + let r = promise.fulfilled(p); + assert.strictEqual(p, r); + }); + + it('creates a new promise fulfilled with input', function() { + return promise.fulfilled(1234).then(v => assert.equal(1234, v)); + }); + + it('can convert thenables to valid promise', function() { + let thenable = {then: function(cb) {cb(1234)}}; + let p = promise.fulfilled(thenable); + assert.notStrictEqual(thenable, p); + return p.then(v => assert.equal(1234, v)); + }); + }); + + describe('when', function() { + it('ReturnsAResolvedPromiseIfGivenANonPromiseValue', function() { + var ret = promise.when('abc'); + assertIsPromise(ret); + return ret.then((value) => assert.equal('abc', value)); + }); + + it('PassesRawErrorsToCallbacks', function() { + var error = new Error('boo!'); + return promise.when(error, function(value) { + assert.equal(error, value); + }); + }); + + it('WaitsForValueToBeResolvedBeforeInvokingCallback', function() { + let d = defer(); + let callback; + let result = promise.when(d.promise, callback = callbackHelper(function(value) { + assert.equal('hi', value); + })); + callback.assertNotCalled(); + d.resolve('hi'); + return result.then(callback.assertCalled); + }); + }); + + describe('fullyResolved', function() { + it('primitives', function() { + function runTest(value) { + var callback, errback; + return promise.fullyResolved(value) + .then((resolved) => assert.equal(value, resolved)); + } + return runTest(true) + .then(() => runTest(function() {})) + .then(() => runTest(null)) + .then(() => runTest(123)) + .then(() => runTest('foo bar')) + .then(() => runTest(undefined)); + }); + + it('arrayOfPrimitives', function() { + var fn = function() {}; + var array = [true, fn, null, 123, '', undefined, 1]; + return promise.fullyResolved(array).then(function(resolved) { + assert.equal(array, resolved); + assert.deepEqual([true, fn, null, 123, '', undefined, 1], + resolved); + }); + }); + + it('nestedArrayOfPrimitives', function() { + var fn = function() {}; + var array = [true, [fn, null, 123], '', undefined]; + return promise.fullyResolved(array) + .then(function(resolved) { + assert.equal(array, resolved); + assert.deepEqual([true, [fn, null, 123], '', undefined], resolved); + assert.deepEqual([fn, null, 123], resolved[1]); + }); + }); + + it('arrayWithPromisedPrimitive', function() { + return promise.fullyResolved([Promise.resolve(123)]) + .then(function(resolved) { + assert.deepEqual([123], resolved); + }); + }); + + it('promiseResolvesToPrimitive', function() { + return promise.fullyResolved(Promise.resolve(123)) + .then((resolved) => assert.equal(123, resolved)); + }); + + it('promiseResolvesToArray', function() { + var fn = function() {}; + var array = [true, [fn, null, 123], '', undefined]; + var aPromise = Promise.resolve(array); + + var result = promise.fullyResolved(aPromise); + return result.then(function(resolved) { + assert.equal(array, resolved); + assert.deepEqual([true, [fn, null, 123], '', undefined], + resolved); + assert.deepEqual([fn, null, 123], resolved[1]); + }); + }); + + it('promiseResolvesToArrayWithPromises', function() { + var nestedPromise = Promise.resolve(123); + var aPromise = Promise.resolve([true, nestedPromise]); + return promise.fullyResolved(aPromise) + .then(function(resolved) { + assert.deepEqual([true, 123], resolved); + }); + }); + + it('rejectsIfArrayPromiseRejects', function() { + var nestedPromise = createRejectedPromise(new StubError); + var aPromise = Promise.resolve([true, nestedPromise]); + + var pair = callbackPair(null, assertIsStubError); + return promise.fullyResolved(aPromise) + .then(assert.fail, assertIsStubError); + }); + + it('rejectsOnFirstArrayRejection', function() { + var e1 = new Error('foo'); + var e2 = new Error('bar'); + var aPromise = Promise.resolve([ + createRejectedPromise(e1), + createRejectedPromise(e2) + ]); + + return promise.fullyResolved(aPromise) + .then(assert.fail, function(error) { + assert.strictEqual(e1, error); + }); + }); + + it('rejectsIfNestedArrayPromiseRejects', function() { + var aPromise = Promise.resolve([ + Promise.resolve([ + createRejectedPromise(new StubError) + ]) + ]); + + return promise.fullyResolved(aPromise) + .then(assert.fail, assertIsStubError); + }); + + it('simpleHash', function() { + var hash = {'a': 123}; + return promise.fullyResolved(hash) + .then(function(resolved) { + assert.strictEqual(hash, resolved); + assert.deepEqual(hash, {'a': 123}); + }); + }); + + it('nestedHash', function() { + var nestedHash = {'foo':'bar'}; + var hash = {'a': 123, 'b': nestedHash}; + + return promise.fullyResolved(hash) + .then(function(resolved) { + assert.strictEqual(hash, resolved); + assert.deepEqual({'a': 123, 'b': {'foo': 'bar'}}, resolved); + assert.strictEqual(nestedHash, resolved['b']); + }); + }); + + it('promiseResolvesToSimpleHash', function() { + var hash = {'a': 123}; + var aPromise = Promise.resolve(hash); + + return promise.fullyResolved(aPromise) + .then((resolved) => assert.strictEqual(hash, resolved)); + }); + + it('promiseResolvesToNestedHash', function() { + var nestedHash = {'foo':'bar'}; + var hash = {'a': 123, 'b': nestedHash}; + var aPromise = Promise.resolve(hash); + + return promise.fullyResolved(aPromise) + .then(function(resolved) { + assert.strictEqual(hash, resolved); + assert.strictEqual(nestedHash, resolved['b']); + assert.deepEqual(hash, {'a': 123, 'b': {'foo': 'bar'}}); + }); + }); + + it('promiseResolvesToHashWithPromises', function() { + var aPromise = Promise.resolve({ + 'a': Promise.resolve(123) + }); + + return promise.fullyResolved(aPromise) + .then(function(resolved) { + assert.deepEqual({'a': 123}, resolved); + }); + }); + + it('rejectsIfHashPromiseRejects', function() { + var aPromise = Promise.resolve({ + 'a': createRejectedPromise(new StubError) + }); + + return promise.fullyResolved(aPromise) + .then(assert.fail, assertIsStubError); + }); + + it('rejectsIfNestedHashPromiseRejects', function() { + var aPromise = Promise.resolve({ + 'a': {'b': createRejectedPromise(new StubError)} + }); + + return promise.fullyResolved(aPromise) + .then(assert.fail, assertIsStubError); + }); + + it('instantiatedObject', function() { + function Foo() { + this.bar = 'baz'; + } + var foo = new Foo; + + return promise.fullyResolved(foo).then(function(resolvedFoo) { + assert.equal(foo, resolvedFoo); + assert.ok(resolvedFoo instanceof Foo); + assert.deepEqual(new Foo, resolvedFoo); + }); + }); + + it('withEmptyArray', function() { + return promise.fullyResolved([]).then(function(resolved) { + assert.deepEqual([], resolved); + }); + }); + + it('withEmptyHash', function() { + return promise.fullyResolved({}).then(function(resolved) { + assert.deepEqual({}, resolved); + }); + }); + + it('arrayWithPromisedHash', function() { + var obj = {'foo': 'bar'}; + var array = [Promise.resolve(obj)]; + + return promise.fullyResolved(array).then(function(resolved) { + assert.deepEqual(resolved, [obj]); + }); + }); + }); + + describe('checkedNodeCall', function() { + it('functionThrows', function() { + return promise.checkedNodeCall(throwStubError) + .then(assert.fail, assertIsStubError); + }); + + it('functionReturnsAnError', function() { + return promise.checkedNodeCall(function(callback) { + callback(new StubError); + }).then(assert.fail, assertIsStubError); + }); + + it('functionReturnsSuccess', function() { + var success = 'success!'; + return promise.checkedNodeCall(function(callback) { + callback(null, success); + }).then((value) => assert.equal(success, value)); + }); + + it('functionReturnsAndThrows', function() { + var error = new Error('boom'); + var error2 = new Error('boom again'); + return promise.checkedNodeCall(function(callback) { + callback(error); + throw error2; + }).then(assert.fail, (e) => assert.equal(error, e)); + }); + + it('functionThrowsAndReturns', function() { + var error = new Error('boom'); + var error2 = new Error('boom again'); + return promise.checkedNodeCall(function(callback) { + setTimeout(() => callback(error), 10); + throw error2; + }).then(assert.fail, (e) => assert.equal(error2, e)); + }); + }); + + describe('all', function() { + it('(base case)', function() { + let deferredObjs = [defer(), defer()]; + var a = [ + 0, 1, + deferredObjs[0].promise, + deferredObjs[1].promise, + 4, 5, 6 + ]; + delete a[5]; + + var pair = callbackPair(function(value) { + assert.deepEqual([0, 1, 2, 3, 4, undefined, 6], value); + }); + + var result = promise.all(a).then(pair.callback, pair.errback); + pair.assertNeither(); + + deferredObjs[0].resolve(2); + pair.assertNeither(); + + deferredObjs[1].resolve(3); + return result.then(() => pair.assertCallback()); + }); + + it('empty array', function() { + return promise.all([]).then((a) => assert.deepEqual([], a)); + }); + + it('usesFirstRejection', function() { + let deferredObjs = [defer(), defer()]; + let a = [deferredObjs[0].promise, deferredObjs[1].promise]; + + var result = promise.all(a).then(assert.fail, assertIsStubError); + deferredObjs[1].reject(new StubError); + setTimeout(() => deferredObjs[0].reject(Error('ignored')), 0); + return result; + }); + }); + + describe('map', function() { + it('(base case)', function() { + var a = [1, 2, 3]; + return promise.map(a, function(value, index, a2) { + assert.equal(a, a2); + assert.equal('number', typeof index, 'not a number'); + return value + 1; + }).then(function(value) { + assert.deepEqual([2, 3, 4], value); + }); + }); + + it('omitsDeleted', function() { + var a = [0, 1, 2, 3, 4, 5, 6]; + delete a[1]; + delete a[3]; + delete a[4]; + delete a[6]; + + var expected = [0, 1, 4, 9, 16, 25, 36]; + delete expected[1]; + delete expected[3]; + delete expected[4]; + delete expected[6]; + + return promise.map(a, function(value) { + return value * value; + }).then(function(value) { + assert.deepEqual(expected, value); + }); + }); + + it('emptyArray', function() { + return promise.map([], function(value) { + return value + 1; + }).then(function(value) { + assert.deepEqual([], value); + }); + }); + + it('inputIsPromise', function() { + var input = defer(); + var result = promise.map(input.promise, function(value) { + return value + 1; + }); + + var pair = callbackPair(function(value) { + assert.deepEqual([2, 3, 4], value); + }); + result = result.then(pair.callback, pair.errback); + + setTimeout(function() { + pair.assertNeither(); + input.resolve([1, 2, 3]); + }, 10); + + return result; + }); + + it('waitsForFunctionResultToResolve', function() { + var innerResults = [ + defer(), + defer() + ]; + + var result = promise.map([1, 2], function(value, index) { + return innerResults[index].promise; + }); + + var pair = callbackPair(function(value) { + assert.deepEqual(['a', 'b'], value); + }); + result = result.then(pair.callback, pair.errback); + + return NativePromise.resolve() + .then(function() { + pair.assertNeither(); + innerResults[0].resolve('a'); + }) + .then(function() { + pair.assertNeither(); + innerResults[1].resolve('b'); + return result; + }) + .then(pair.assertCallback); + }); + + it('rejectsPromiseIfFunctionThrows', function() { + return promise.map([1], throwStubError) + .then(assert.fail, assertIsStubError); + }); + + it('rejectsPromiseIfFunctionReturnsRejectedPromise', function() { + return promise.map([1], function() { + return createRejectedPromise(new StubError); + }).then(assert.fail, assertIsStubError); + }); + + it('stopsCallingFunctionIfPreviousIterationFailed', function() { + var count = 0; + return promise.map([1, 2, 3, 4], function() { + count++; + if (count == 3) { + throw new StubError; + } + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.equal(3, count); + }); + }); + + it('rejectsWithFirstRejectedPromise', function() { + var innerResult = [ + Promise.resolve(), + createRejectedPromise(new StubError), + createRejectedPromise(Error('should be ignored')) + ]; + var count = 0; + return promise.map([1, 2, 3, 4], function(value, index) { + count += 1; + return innerResult[index]; + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.equal(2, count); + }); + }); + + it('preservesOrderWhenMapReturnsPromise', function() { + var deferreds = [ + defer(), + defer(), + defer(), + defer() + ]; + var result = promise.map(deferreds, function(value) { + return value.promise; + }); + + var pair = callbackPair(function(value) { + assert.deepEqual([0, 1, 2, 3], value); + }); + result = result.then(pair.callback, pair.errback); + + return Promise.resolve() + .then(function() { + pair.assertNeither(); + for (let i = deferreds.length; i > 0; i -= 1) { + deferreds[i - 1].resolve(i - 1); + } + return result; + }).then(pair.assertCallback); + }); + }); + + describe('filter', function() { + it('basicFiltering', function() { + var a = [0, 1, 2, 3]; + return promise.filter(a, function(val, index, a2) { + assert.equal(a, a2); + assert.equal('number', typeof index, 'not a number'); + return val > 1; + }).then(function(val) { + assert.deepEqual([2, 3], val); + }); + }); + + it('omitsDeleted', function() { + var a = [0, 1, 2, 3, 4, 5, 6]; + delete a[3]; + delete a[4]; + + return promise.filter(a, function(value) { + return value > 1 && value < 6; + }).then(function(val) { + assert.deepEqual([2, 5], val); + }); + }); + + it('preservesInputs', function() { + var a = [0, 1, 2, 3]; + + return promise.filter(a, function(value, i, a2) { + assert.equal(a, a2); + // Even if a function modifies the input array, the original value + // should be inserted into the new array. + a2[i] = a2[i] - 1; + return a2[i] >= 1; + }).then(function(val) { + assert.deepEqual([2, 3], val); + }); + }); + + it('inputIsPromise', function() { + var input = defer(); + var result = promise.filter(input.promise, function(value) { + return value > 1 && value < 3; + }); + + var pair = callbackPair(function(value) { + assert.deepEqual([2], value); + }); + result = result.then(pair.callback, pair.errback); + return NativePromise.resolve() + .then(function() { + pair.assertNeither(); + input.resolve([1, 2, 3]); + return result; + }) + .then(pair.assertCallback); + }); + + it('waitsForFunctionResultToResolve', function() { + var innerResults = [ + defer(), + defer() + ]; + + var result = promise.filter([1, 2], function(value, index) { + return innerResults[index].promise; + }); + + var pair = callbackPair(function(value) { + assert.deepEqual([2], value); + }); + result = result.then(pair.callback, pair.errback); + return NativePromise.resolve() + .then(function() { + pair.assertNeither(); + innerResults[0].resolve(false); + }) + .then(function() { + pair.assertNeither(); + innerResults[1].resolve(true); + return result; + }) + .then(pair.assertCallback); + }); + + it('rejectsPromiseIfFunctionReturnsRejectedPromise', function() { + return promise.filter([1], function() { + return createRejectedPromise(new StubError); + }).then(assert.fail, assertIsStubError); + }); + + it('stopsCallingFunctionIfPreviousIterationFailed', function() { + var count = 0; + return promise.filter([1, 2, 3, 4], function() { + count++; + if (count == 3) { + throw new StubError; + } + }).then(assert.fail, function(e) { + assertIsStubError(e); + assert.equal(3, count); + }); + }); + + it('rejectsWithFirstRejectedPromise', function() { + var innerResult = [ + Promise.resolve(), + createRejectedPromise(new StubError), + createRejectedPromise(Error('should be ignored')) + ]; + + return promise.filter([1, 2, 3, 4], function(value, index) { + assert.ok(index < innerResult.length); + return innerResult[index]; + }).then(assert.fail, assertIsStubError); + }); + + it('preservesOrderWhenFilterReturnsPromise', function() { + var deferreds = [ + defer(), + defer(), + defer(), + defer() + ]; + var result = promise.filter([0, 1, 2, 3], function(value, index) { + return deferreds[index].promise; + }); + + var pair = callbackPair(function(value) { + assert.deepEqual([1, 2], value); + }); + result = result.then(pair.callback, pair.errback); + + return NativePromise.resolve() + .then(function() { + pair.assertNeither(); + for (let i = deferreds.length - 1; i >= 0; i -= 1) { + deferreds[i].resolve(i > 0 && i < 3); + } + return result; + }).then(pair.assertCallback); + }); + }); + }); + + enablePromiseManager(() => { + it('firesUncaughtExceptionEventIfRejectionNeverHandled', function() { + promise.rejected(new StubError); + var handler = callbackHelper(assertIsStubError); + + // so tearDown() doesn't throw + app.removeAllListeners(); + app.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, handler); + + return NativePromise.resolve() + // Macro yield so the uncaught exception has a chance to trigger. + .then(() => new NativePromise(resolve => setTimeout(resolve, 0))) + .then(handler.assertCalled); + }); + + it('cannotResolveADeferredWithItself', function() { + var deferred = new promise.Deferred(); + assert.throws(() => deferred.fulfill(deferred)); + assert.throws(() => deferred.reject(deferred)); + }); + + describe('testLongStackTraces', function() { + beforeEach(() => promise.LONG_STACK_TRACES = false); + afterEach(() => promise.LONG_STACK_TRACES = false); + + it('doesNotAppendStackIfFeatureDisabled', function() { + promise.LONG_STACK_TRACES = false; + + var error = Error('hello'); + var originalStack = error.stack; + return promise.rejected(error). + then(fail). + then(fail). + then(fail). + then(fail, function(e) { + assert.equal(error, e); + assert.equal(originalStack, e.stack); + }); + }); + + function getStackMessages(error) { + return error.stack.split(/\n/).filter(function(line) { + return /^From: /.test(line); + }); + } + + it('appendsInitialPromiseCreation_resolverThrows', function() { + promise.LONG_STACK_TRACES = true; + + var error = Error('hello'); + var originalStack = '(placeholder; will be overwritten later)'; + + return new promise.Promise(function() { + try { + throw error; + } catch (e) { + originalStack = e.stack; + throw e; + } + }).then(fail, function(e) { + assert.strictEqual(error, e); + if (typeof originalStack !== 'string') { + return; + } + assert.notEqual(originalStack, e.stack); + assert.equal(e.stack.indexOf(originalStack), 0, + 'should start with original stack'); + assert.deepEqual(['From: ManagedPromise: new'], getStackMessages(e)); + }); + }); + + it('appendsInitialPromiseCreation_rejectCalled', function() { + promise.LONG_STACK_TRACES = true; + + var error = Error('hello'); + var originalStack = error.stack; + + return new promise.Promise(function(_, reject) { + reject(error); + }).then(fail, function(e) { + assert.equal(error, e); + if (typeof originalStack !== 'string') { + return; + } + assert.notEqual(originalStack, e.stack); + assert.equal(e.stack.indexOf(originalStack), 0, + 'should start with original stack'); + assert.deepEqual(['From: ManagedPromise: new'], getStackMessages(e)); + }); + }); + + it('appendsEachStepToRejectionError', function() { + promise.LONG_STACK_TRACES = true; + + var error = Error('hello'); + var originalStack = '(placeholder; will be overwritten later)'; + + return new promise.Promise(function() { + try { + throw error; + } catch (e) { + originalStack = e.stack; + throw e; + } + }). + then(fail). + catch(function(e) { throw e; }). + then(fail). + catch(function(e) { throw e; }). + then(fail, function(e) { + assert.equal(error, e); + if (typeof originalStack !== 'string') { + return; + } + assert.notEqual(originalStack, e.stack); + assert.equal(e.stack.indexOf(originalStack), 0, + 'should start with original stack'); + assert.deepEqual([ + 'From: ManagedPromise: new', + 'From: Promise: then', + 'From: Promise: catch', + 'From: Promise: then', + 'From: Promise: catch', + ], getStackMessages(e)); + }); + }); + + it('errorOccursInCallbackChain', function() { + promise.LONG_STACK_TRACES = true; + + var error = Error('hello'); + var originalStack = '(placeholder; will be overwritten later)'; + + return promise.fulfilled(). + then(function() {}). + then(function() {}). + then(function() { + try { + throw error; + } catch (e) { + originalStack = e.stack; + throw e; + } + }). + catch(function(e) { throw e; }). + then(fail, function(e) { + assert.equal(error, e); + if (typeof originalStack !== 'string') { + return; + } + assert.notEqual(originalStack, e.stack); + assert.equal(e.stack.indexOf(originalStack), 0, + 'should start with original stack'); + assert.deepEqual([ + 'From: Promise: then', + 'From: Promise: catch', + ], getStackMessages(e)); + }); + }); + }); + }); + + it('testAddThenableImplementation', function() { + function tmp() {} + assert.ok(!promise.Thenable.isImplementation(new tmp())); + promise.Thenable.addImplementation(tmp); + assert.ok(promise.Thenable.isImplementation(new tmp())); + + class tmpClass {} + assert.ok(!promise.Thenable.isImplementation(new tmpClass())); + promise.Thenable.addImplementation(tmpClass); + assert.ok(promise.Thenable.isImplementation(new tmpClass())); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js new file mode 100644 index 00000000..e68ca28b --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js @@ -0,0 +1,90 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const sinon = require('sinon'); + + +class StubError extends Error { + constructor(opt_msg) { + super(opt_msg); + this.name = this.constructor.name; + } +} +exports.StubError = StubError; + +exports.throwStubError = function() { + throw new StubError; +}; + +exports.assertIsStubError = function(value) { + assert.ok(value instanceof StubError, value + ' is not a ' + StubError.name); +}; + +exports.assertIsInstance = function(ctor, value) { + assert.ok(value instanceof ctor, 'Not a ' + ctor.name + ': ' + value); +}; + +function callbackPair(cb, eb) { + if (cb && eb) { + throw new TypeError('can only specify one of callback or errback'); + } + + let callback = cb ? sinon.spy(cb) : sinon.spy(); + let errback = eb ? sinon.spy(eb) : sinon.spy(); + + function assertCallback() { + assert.ok(callback.called, 'callback not called'); + assert.ok(!errback.called, 'errback called'); + if (callback.threw()) { + throw callback.exceptions[0]; + } + } + + function assertErrback() { + assert.ok(!callback.called, 'callback called'); + assert.ok(errback.called, 'errback not called'); + if (errback.threw()) { + throw errback.exceptions[0]; + } + } + + function assertNeither() { + assert.ok(!callback.called, 'callback called'); + assert.ok(!errback.called, 'errback called'); + } + + return { + callback, + errback, + assertCallback, + assertErrback, + assertNeither + }; +} +exports.callbackPair = callbackPair; + + +exports.callbackHelper = function(cb) { + let pair = callbackPair(cb); + let wrapped = pair.callback.bind(null); + wrapped.assertCalled = () => pair.assertCallback(); + wrapped.assertNotCalled = () => pair.assertNeither(); + return wrapped; +}; diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js new file mode 100644 index 00000000..3226a467 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js @@ -0,0 +1,478 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); + +const By = require('../../lib/by').By; +const CommandName = require('../../lib/command').Name; +const error = require('../../lib/error'); +const promise = require('../../lib/promise'); +const until = require('../../lib/until'); +const webdriver = require('../../lib/webdriver'), + WebElement = webdriver.WebElement; + +describe('until', function() { + let driver, executor; + + class TestExecutor { + constructor() { + this.handlers_ = {}; + } + + on(cmd, handler) { + this.handlers_[cmd] = handler; + return this; + } + + execute(cmd) { + let self = this; + return Promise.resolve().then(function() { + if (!self.handlers_[cmd.getName()]) { + throw new error.UnknownCommandError(cmd.getName()); + } + return self.handlers_[cmd.getName()](cmd); + }); + } + } + + function fail(opt_msg) { + throw new assert.AssertionError({message: opt_msg}); + } + + beforeEach(function setUp() { + executor = new TestExecutor(); + driver = new webdriver.WebDriver('session-id', executor); + }); + + describe('ableToSwitchToFrame', function() { + it('failsFastForNonSwitchErrors', function() { + let e = Error('boom'); + executor.on(CommandName.SWITCH_TO_FRAME, function() { + throw e; + }); + return driver.wait(until.ableToSwitchToFrame(0), 100) + .then(fail, (e2) => assert.strictEqual(e2, e)); + }); + + const ELEMENT_ID = 'some-element-id'; + const ELEMENT_INDEX = 1234; + + function onSwitchFrame(expectedId) { + if (typeof expectedId === 'string') { + expectedId = WebElement.buildId(expectedId); + } else { + assert.equal(typeof expectedId, 'number', 'must be string or number'); + } + return cmd => { + assert.deepEqual( + cmd.getParameter('id'), expectedId, 'frame ID not specified'); + return true; + }; + } + + it('byIndex', function() { + executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_INDEX)); + return driver.wait(until.ableToSwitchToFrame(ELEMENT_INDEX), 100); + }); + + it('byWebElement', function() { + executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); + + var el = new webdriver.WebElement(driver, ELEMENT_ID); + return driver.wait(until.ableToSwitchToFrame(el), 100); + }); + + it('byWebElementPromise', function() { + executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); + var el = new webdriver.WebElementPromise(driver, + Promise.resolve(new webdriver.WebElement(driver, ELEMENT_ID))); + return driver.wait(until.ableToSwitchToFrame(el), 100); + }); + + it('byLocator', function() { + executor.on(CommandName.FIND_ELEMENTS, () => [WebElement.buildId(ELEMENT_ID)]); + executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); + return driver.wait(until.ableToSwitchToFrame(By.id('foo')), 100); + }); + + it('byLocator_elementNotInitiallyFound', function() { + let foundResponses = [[], [], [WebElement.buildId(ELEMENT_ID)]]; + executor.on(CommandName.FIND_ELEMENTS, () => foundResponses.shift()); + executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); + + return driver.wait(until.ableToSwitchToFrame(By.id('foo')), 2000) + .then(() => assert.deepEqual(foundResponses, [])); + }); + + it('timesOutIfNeverAbletoSwitchFrames', function() { + var count = 0; + executor.on(CommandName.SWITCH_TO_FRAME, function() { + count += 1; + throw new error.NoSuchFrameError; + }); + + return driver.wait(until.ableToSwitchToFrame(0), 100) + .then(fail, function(e) { + assert.ok(count > 0); + assert.ok( + e.message.startsWith('Waiting to be able to switch to frame'), + 'Wrong message: ' + e.message); + }); + }); + }); + + describe('alertIsPresent', function() { + it('failsFastForNonAlertSwitchErrors', function() { + return driver.wait(until.alertIsPresent(), 100).then(fail, function(e) { + assert.ok(e instanceof error.UnknownCommandError); + assert.equal(e.message, CommandName.GET_ALERT_TEXT); + }); + }); + + it('waitsForAlert', function() { + var count = 0; + executor.on(CommandName.GET_ALERT_TEXT, function() { + if (count++ < 3) { + throw new error.NoSuchAlertError; + } else { + return true; + } + }).on(CommandName.DISMISS_ALERT, () => true); + + return driver.wait(until.alertIsPresent(), 1000).then(function(alert) { + assert.equal(count, 4); + return alert.dismiss(); + }); + }); + + // TODO: Remove once GeckoDriver doesn't throw this unwanted error. + // See https://github.com/SeleniumHQ/selenium/pull/2137 + describe('workaround for GeckoDriver', function() { + it('doesNotFailWhenCannotConvertNullToObject', function() { + var count = 0; + executor.on(CommandName.GET_ALERT_TEXT, function() { + if (count++ < 3) { + throw new error.WebDriverError(`can't convert null to object`); + } else { + return true; + } + }).on(CommandName.DISMISS_ALERT, () => true); + + return driver.wait(until.alertIsPresent(), 1000).then(function(alert) { + assert.equal(count, 4); + return alert.dismiss(); + }); + }); + + it('keepsRaisingRegularWebdriverError', function() { + var webDriverError = new error.WebDriverError; + + executor.on(CommandName.GET_ALERT_TEXT, function() { + throw webDriverError; + }); + + return driver.wait(until.alertIsPresent(), 1000).then(function() { + throw new Error('driver did not fail against WebDriverError'); + }, function(error) { + assert.equal(error, webDriverError); + }); + }) + }); + }); + + it('testUntilTitleIs', function() { + var titles = ['foo', 'bar', 'baz']; + executor.on(CommandName.GET_TITLE, () => titles.shift()); + + return driver.wait(until.titleIs('bar'), 3000).then(function() { + assert.deepStrictEqual(titles, ['baz']); + }); + }); + + it('testUntilTitleContains', function() { + var titles = ['foo', 'froogle', 'google']; + executor.on(CommandName.GET_TITLE, () => titles.shift()); + + return driver.wait(until.titleContains('oogle'), 3000).then(function() { + assert.deepStrictEqual(titles, ['google']); + }); + }); + + it('testUntilTitleMatches', function() { + var titles = ['foo', 'froogle', 'aaaabc', 'aabbbc', 'google']; + executor.on(CommandName.GET_TITLE, () => titles.shift()); + + return driver.wait(until.titleMatches(/^a{2,3}b+c$/), 3000) + .then(function() { + assert.deepStrictEqual(titles, ['google']); + }); + }); + + it('testUntilUrlIs', function() { + var urls = ['http://www.foo.com', 'https://boo.com', 'http://docs.yes.com']; + executor.on(CommandName.GET_CURRENT_URL, () => urls.shift()); + + return driver.wait(until.urlIs('https://boo.com'), 3000).then(function() { + assert.deepStrictEqual(urls, ['http://docs.yes.com']); + }); + }); + + it('testUntilUrlContains', function() { + var urls = + ['http://foo.com', 'https://groups.froogle.com', 'http://google.com']; + executor.on(CommandName.GET_CURRENT_URL, () => urls.shift()); + + return driver.wait(until.urlContains('oogle.com'), 3000).then(function() { + assert.deepStrictEqual(urls, ['http://google.com']); + }); + }); + + it('testUntilUrlMatches', function() { + var urls = ['foo', 'froogle', 'aaaabc', 'aabbbc', 'google']; + executor.on(CommandName.GET_CURRENT_URL, () => urls.shift()); + + return driver.wait(until.urlMatches(/^a{2,3}b+c$/), 3000) + .then(function() { + assert.deepStrictEqual(urls, ['google']); + }); + }); + + it('testUntilElementLocated', function() { + var responses = [ + [], + [WebElement.buildId('abc123'), WebElement.buildId('foo')], + ['end'] + ]; + executor.on(CommandName.FIND_ELEMENTS, () => responses.shift()); + + let element = driver.wait(until.elementLocated(By.id('quux')), 2000); + assert.ok(element instanceof webdriver.WebElementPromise); + return element.getId().then(function(id) { + assert.deepStrictEqual(responses, [['end']]); + assert.equal(id, 'abc123'); + }); + }); + + describe('untilElementLocated, elementNeverFound', function() { + function runNoElementFoundTest(locator, locatorStr) { + executor.on(CommandName.FIND_ELEMENTS, () => []); + + function expectedFailure() { + fail('expected condition to timeout'); + } + + return driver.wait(until.elementLocated(locator), 100) + .then(expectedFailure, function(error) { + var expected = 'Waiting for element to be located ' + locatorStr; + var lines = error.message.split(/\n/, 2); + assert.equal(lines[0], expected); + + let regex = /^Wait timed out after \d+ms$/; + assert.ok(regex.test(lines[1]), + `Lines <${lines[1]}> does not match ${regex}`); + }); + } + + it('byLocator', function() { + return runNoElementFoundTest( + By.id('quux'), 'By(css selector, *[id="quux"])'); + }); + + it('byHash', function() { + return runNoElementFoundTest( + {id: 'quux'}, 'By(css selector, *[id="quux"])'); + }); + + it('byFunction', function() { + return runNoElementFoundTest(function() {}, 'by function()'); + }); + }); + + it('testUntilElementsLocated', function() { + var responses = [ + [], + [WebElement.buildId('abc123'), WebElement.buildId('foo')], + ['end'] + ]; + executor.on(CommandName.FIND_ELEMENTS, () => responses.shift()); + + return driver.wait(until.elementsLocated(By.id('quux')), 2000) + .then(function(els) { + return Promise.all(els.map(e => e.getId())); + }).then(function(ids) { + assert.deepStrictEqual(responses, [['end']]); + assert.equal(ids.length, 2); + assert.equal(ids[0], 'abc123'); + assert.equal(ids[1], 'foo'); + }); + }); + + describe('untilElementsLocated, noElementsFound', function() { + function runNoElementsFoundTest(locator, locatorStr) { + executor.on(CommandName.FIND_ELEMENTS, () => []); + + function expectedFailure() { + fail('expected condition to timeout'); + } + + return driver.wait(until.elementsLocated(locator), 100) + .then(expectedFailure, function(error) { + var expected = + 'Waiting for at least one element to be located ' + locatorStr; + var lines = error.message.split(/\n/, 2); + assert.equal(lines[0], expected); + + let regex = /^Wait timed out after \d+ms$/; + assert.ok(regex.test(lines[1]), + `Lines <${lines[1]}> does not match ${regex}`); + }); + } + + it('byLocator', function() { + return runNoElementsFoundTest( + By.id('quux'), 'By(css selector, *[id="quux"])'); + }); + + it('byHash', function() { + return runNoElementsFoundTest( + {id: 'quux'}, 'By(css selector, *[id="quux"])'); + }); + + it('byFunction', function() { + return runNoElementsFoundTest(function() {}, 'by function()'); + }); + }); + + it('testUntilStalenessOf', function() { + let count = 0; + executor.on(CommandName.GET_ELEMENT_TAG_NAME, function() { + while (count < 3) { + count += 1; + return 'body'; + } + throw new error.StaleElementReferenceError('now stale'); + }); + + var el = new webdriver.WebElement(driver, {ELEMENT: 'foo'}); + return driver.wait(until.stalenessOf(el), 2000) + .then(() => assert.equal(count, 3)); + }); + + describe('element state conditions', function() { + function runElementStateTest(predicate, command, responses, var_args) { + let original = new webdriver.WebElement(driver, 'foo'); + let predicateArgs = [original]; + if (arguments.length > 3) { + predicateArgs = predicateArgs.concat(arguments[1]); + command = arguments[2]; + responses = arguments[3]; + } + + assert.ok(responses.length > 1); + + responses = responses.concat(['end']); + executor.on(command, () => responses.shift()); + + let result = driver.wait(predicate.apply(null, predicateArgs), 2000); + assert.ok(result instanceof webdriver.WebElementPromise); + return result.then(function(value) { + assert.ok(value instanceof webdriver.WebElement); + assert.ok(!(value instanceof webdriver.WebElementPromise)); + return value.getId(); + }).then(function(id) { + assert.equal('foo', id); + assert.deepStrictEqual(responses, ['end']); + }); + } + + it('elementIsVisible', function() { + return runElementStateTest( + until.elementIsVisible, + CommandName.IS_ELEMENT_DISPLAYED, [false, false, true]); + }); + + it('elementIsNotVisible', function() { + return runElementStateTest( + until.elementIsNotVisible, + CommandName.IS_ELEMENT_DISPLAYED, [true, true, false]); + }); + + it('elementIsEnabled', function() { + return runElementStateTest( + until.elementIsEnabled, + CommandName.IS_ELEMENT_ENABLED, [false, false, true]); + }); + + it('elementIsDisabled', function() { + return runElementStateTest( + until.elementIsDisabled, + CommandName.IS_ELEMENT_ENABLED, [true, true, false]); + }); + + it('elementIsSelected', function() { + return runElementStateTest( + until.elementIsSelected, + CommandName.IS_ELEMENT_SELECTED, [false, false, true]); + }); + + it('elementIsNotSelected', function() { + return runElementStateTest( + until.elementIsNotSelected, + CommandName.IS_ELEMENT_SELECTED, [true, true, false]); + }); + + it('elementTextIs', function() { + return runElementStateTest( + until.elementTextIs, 'foobar', + CommandName.GET_ELEMENT_TEXT, + ['foo', 'fooba', 'foobar']); + }); + + it('elementTextContains', function() { + return runElementStateTest( + until.elementTextContains, 'bar', + CommandName.GET_ELEMENT_TEXT, + ['foo', 'foobaz', 'foobarbaz']); + }); + + it('elementTextMatches', function() { + return runElementStateTest( + until.elementTextMatches, /fo+bar{3}/, + CommandName.GET_ELEMENT_TEXT, + ['foo', 'foobar', 'fooobarrr']); + }); + }); + + describe('WebElementCondition', function() { + it('fails if wait completes with a non-WebElement value', function() { + let result = driver.wait( + new webdriver.WebElementCondition('testing', () => 123), 1000); + + return result.then( + () => assert.fail('expected to fail'), + function(e) { + assert.ok(e instanceof TypeError); + assert.equal( + 'WebElementCondition did not resolve to a WebElement: ' + + '[object Number]', + e.message); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js new file mode 100644 index 00000000..cdb0aef7 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js @@ -0,0 +1,2311 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const testutil = require('./testutil'); + +const By = require('../../lib/by').By; +const Capabilities = require('../../lib/capabilities').Capabilities; +const Executor = require('../../lib/command').Executor; +const CName = require('../../lib/command').Name; +const error = require('../../lib/error'); +const Button = require('../../lib/input').Button; +const Key = require('../../lib/input').Key; +const logging = require('../../lib/logging'); +const Session = require('../../lib/session').Session; +const promise = require('../../lib/promise'); +const {enablePromiseManager, promiseManagerSuite} = require('../../lib/test/promise'); +const until = require('../../lib/until'); +const Alert = require('../../lib/webdriver').Alert; +const AlertPromise = require('../../lib/webdriver').AlertPromise; +const UnhandledAlertError = require('../../lib/webdriver').UnhandledAlertError; +const WebDriver = require('../../lib/webdriver').WebDriver; +const WebElement = require('../../lib/webdriver').WebElement; +const WebElementPromise = require('../../lib/webdriver').WebElementPromise; + +const assert = require('assert'); +const sinon = require('sinon'); + +const SESSION_ID = 'test_session_id'; + +// Aliases for readability. +const NativePromise = Promise; +const StubError = testutil.StubError; +const assertIsInstance = testutil.assertIsInstance; +const assertIsStubError = testutil.assertIsStubError; +const throwStubError = testutil.throwStubError; +const fail = (msg) => assert.fail(msg); + +describe('WebDriver', function() { + const LOG = logging.getLogger('webdriver.test'); + + // before(function() { + // logging.getLogger('webdriver').setLevel(logging.Level.ALL); + // logging.installConsoleHandler(); + // }); + + // after(function() { + // logging.getLogger('webdriver').setLevel(null); + // logging.removeConsoleHandler(); + // }); + + var driver; + var flow; + var uncaughtExceptions; + + beforeEach(function setUp() { + flow = promise.controlFlow(); + uncaughtExceptions = []; + flow.on('uncaughtException', onUncaughtException); + }); + + afterEach(function tearDown() { + if (!promise.USE_PROMISE_MANAGER) { + return; + } + return waitForIdle(flow).then(function() { + assert.deepEqual([], uncaughtExceptions); + flow.reset(); + }); + }); + + function onUncaughtException(e) { + uncaughtExceptions.push(e); + } + + function defer() { + let d = {}; + let promise = new Promise((resolve, reject) => { + Object.assign(d, {resolve, reject}); + }); + d.promise = promise; + return d; + } + + function waitForIdle(opt_flow) { + if (!promise.USE_PROMISE_MANAGER) { + return Promise.resolve(); + } + var theFlow = opt_flow || flow; + return new Promise(function(fulfill, reject) { + if (theFlow.isIdle()) { + fulfill(); + return; + } + theFlow.once('idle', fulfill); + theFlow.once('uncaughtException', reject); + }); + } + + function waitForAbort(opt_flow, opt_n) { + var n = opt_n || 1; + var theFlow = opt_flow || flow; + theFlow.removeAllListeners( + promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); + return new Promise(function(fulfill, reject) { + theFlow.once('idle', function() { + reject(Error('expected flow to report an unhandled error')); + }); + + var errors = []; + theFlow.on('uncaughtException', onError); + function onError(e) { + errors.push(e); + if (errors.length === n) { + theFlow.removeListener('uncaughtException', onError); + fulfill(n === 1 ? errors[0] : errors); + } + } + }); + } + + function expectedError(ctor, message) { + return function(e) { + assertIsInstance(ctor, e); + assert.equal(message, e.message); + }; + } + + class Expectation { + constructor(executor, name, opt_parameters) { + this.executor_ = executor; + this.name_ = name; + this.times_ = 1; + this.sessionId_ = SESSION_ID; + this.check_ = null; + this.toDo_ = null; + this.withParameters(opt_parameters || {}); + } + + anyTimes() { + this.times_ = Infinity; + return this; + } + + times(n) { + this.times_ = n; + return this; + } + + withParameters(parameters) { + this.parameters_ = parameters; + if (this.name_ !== CName.NEW_SESSION) { + this.parameters_['sessionId'] = this.sessionId_; + } + return this; + } + + andReturn(code, opt_value) { + this.toDo_ = function(command) { + LOG.info('executing ' + command.getName() + '; returning ' + code); + return Promise.resolve(opt_value !== void(0) ? opt_value : null); + }; + return this; + } + + andReturnSuccess(opt_value) { + this.toDo_ = function(command) { + LOG.info('executing ' + command.getName() + '; returning success'); + return Promise.resolve(opt_value !== void(0) ? opt_value : null); + }; + return this; + } + + andReturnError(error) { + if (typeof error === 'number') { + throw Error('need error type'); + } + this.toDo_ = function(command) { + LOG.info('executing ' + command.getName() + '; returning failure'); + return Promise.reject(error); + }; + return this; + } + + expect(name, opt_parameters) { + this.end(); + return this.executor_.expect(name, opt_parameters); + } + + end() { + if (!this.toDo_) { + this.andReturnSuccess(null); + } + return this.executor_; + } + + execute(command) { + assert.deepEqual(this.parameters_, command.getParameters()); + return this.toDo_(command); + } + } + + class FakeExecutor { + constructor() { + this.commands_ = new Map; + } + + execute(command) { + let expectations = this.commands_.get(command.getName()); + if (!expectations || !expectations.length) { + assert.fail('unexpected command: ' + command.getName()); + return; + } + + let next = expectations[0]; + let result = next.execute(command); + if (next.times_ != Infinity) { + next.times_ -= 1; + if (!next.times_) { + expectations.shift(); + } + } + return result; + } + + expect(commandName, opt_parameters) { + if (!this.commands_.has(commandName)) { + this.commands_.set(commandName, []); + } + let e = new Expectation(this, commandName, opt_parameters); + this.commands_.get(commandName).push(e); + return e; + } + + createDriver(opt_session) { + let session = opt_session || new Session(SESSION_ID, {}); + return new WebDriver(session, this); + } + } + + + ///////////////////////////////////////////////////////////////////////////// + // + // Tests + // + ///////////////////////////////////////////////////////////////////////////// + + + describe('testAttachToSession', function() { + it('sessionIsAvailable', function() { + let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); + let executor = new FakeExecutor(). + expect(CName.DESCRIBE_SESSION). + withParameters({'sessionId': SESSION_ID}). + andReturnSuccess(aSession). + end(); + + let driver = WebDriver.attachToSession(executor, SESSION_ID); + return driver.getSession().then(v => assert.strictEqual(v, aSession)); + }); + + it('failsToGetSessionInfo', function() { + let e = new Error('boom'); + let executor = new FakeExecutor(). + expect(CName.DESCRIBE_SESSION). + withParameters({'sessionId': SESSION_ID}). + andReturnError(e). + end(); + + let driver = WebDriver.attachToSession(executor, SESSION_ID); + return driver.getSession() + .then(() => assert.fail('should have failed!'), + (actual) => assert.strictEqual(actual, e)); + }); + + it('remote end does not recognize DESCRIBE_SESSION command', function() { + let e = new error.UnknownCommandError; + let executor = new FakeExecutor(). + expect(CName.DESCRIBE_SESSION). + withParameters({'sessionId': SESSION_ID}). + andReturnError(e). + end(); + + let driver = WebDriver.attachToSession(executor, SESSION_ID); + return driver.getSession().then(session => { + assert.ok(session instanceof Session); + assert.strictEqual(session.getId(), SESSION_ID); + assert.equal(session.getCapabilities().size, 0); + }); + }); + + it('usesActiveFlowByDefault', function() { + let executor = new FakeExecutor(). + expect(CName.DESCRIBE_SESSION). + withParameters({'sessionId': SESSION_ID}). + andReturnSuccess({}). + end(); + + var driver = WebDriver.attachToSession(executor, SESSION_ID); + assert.equal(driver.controlFlow(), promise.controlFlow()); + + return waitForIdle(driver.controlFlow()); + }); + + enablePromiseManager(() => { + it('canAttachInCustomFlow', function() { + let executor = new FakeExecutor(). + expect(CName.DESCRIBE_SESSION). + withParameters({'sessionId': SESSION_ID}). + andReturnSuccess({}). + end(); + + var otherFlow = new promise.ControlFlow(); + var driver = WebDriver.attachToSession(executor, SESSION_ID, otherFlow); + assert.equal(otherFlow, driver.controlFlow()); + assert.notEqual(otherFlow, promise.controlFlow()); + + return waitForIdle(otherFlow); + }); + }); + }); + + describe('testCreateSession', function() { + it('happyPathWithCapabilitiesHashObject', function() { + let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({ + 'desiredCapabilities': {'browserName': 'firefox'} + }). + andReturnSuccess(aSession). + end(); + + var driver = WebDriver.createSession(executor, { + 'browserName': 'firefox' + }); + return driver.getSession().then(v => assert.strictEqual(v, aSession)); + }); + + it('happyPathWithCapabilitiesInstance', function() { + let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({'desiredCapabilities': {'browserName': 'firefox'}}). + andReturnSuccess(aSession). + end(); + + var driver = WebDriver.createSession(executor, Capabilities.firefox()); + return driver.getSession().then(v => assert.strictEqual(v, aSession)); + }); + + it('handles desired and required capabilities', function() { + let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({ + 'desiredCapabilities': {'foo': 'bar'}, + 'requiredCapabilities': {'bim': 'baz'} + }). + andReturnSuccess(aSession). + end(); + + let desired = new Capabilities().set('foo', 'bar'); + let required = new Capabilities().set('bim', 'baz'); + var driver = WebDriver.createSession(executor, {desired, required}); + return driver.getSession().then(v => assert.strictEqual(v, aSession)); + }); + + it('failsToCreateSession', function() { + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({'desiredCapabilities': {'browserName': 'firefox'}}). + andReturnError(new StubError()). + end(); + + var driver = + WebDriver.createSession(executor, {'browserName': 'firefox'}); + return driver.getSession().then(fail, assertIsStubError); + }); + + it('invokes quit callback if it fails to create a session', function() { + let called = false; + let executor = new FakeExecutor() + .expect(CName.NEW_SESSION) + .withParameters({'desiredCapabilities': {'browserName': 'firefox'}}) + .andReturnError(new StubError()) + .end(); + + var driver = + WebDriver.createSession(executor, {'browserName': 'firefox'}, + null, () => called = true); + return driver.getSession().then(fail, err => { + assert.ok(called); + assertIsStubError(err); + }); + }); + + it('usesActiveFlowByDefault', function() { + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({'desiredCapabilities': {}}). + andReturnSuccess(new Session(SESSION_ID)). + end(); + + var driver = WebDriver.createSession(executor, {}); + assert.equal(promise.controlFlow(), driver.controlFlow()); + + return waitForIdle(driver.controlFlow()); + }); + + enablePromiseManager(() => { + it('canCreateInCustomFlow', function() { + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({'desiredCapabilities': {}}). + andReturnSuccess({}). + end(); + + var otherFlow = new promise.ControlFlow(); + var driver = WebDriver.createSession(executor, {}, otherFlow); + assert.equal(otherFlow, driver.controlFlow()); + assert.notEqual(otherFlow, promise.controlFlow()); + + return waitForIdle(otherFlow); + }); + + describe('creation failures bubble up in control flow', function() { + function runTest(...args) { + let executor = new FakeExecutor() + .expect(CName.NEW_SESSION) + .withParameters({'desiredCapabilities': {'browserName': 'firefox'}}) + .andReturnError(new StubError()) + .end(); + + WebDriver.createSession( + executor, {'browserName': 'firefox'}, ...args); + return waitForAbort().then(assertIsStubError); + } + + it('no onQuit callback', () => runTest()); + it('has onQuit callback', () => runTest(null, null, function() {})); + + it('onQuit callback failure suppress creation failure', function() { + let e = new Error('hi!'); + let executor = new FakeExecutor() + .expect(CName.NEW_SESSION) + .withParameters({'desiredCapabilities': {'browserName': 'firefox'}}) + .andReturnError(new StubError()) + .end(); + + WebDriver.createSession( + executor, {'browserName': 'firefox'}, null, () => {throw e}); + return waitForAbort().then(err => assert.strictEqual(err, e)); + }); + }); + }); + }); + + it('testDoesNotExecuteCommandIfSessionDoesNotResolve', function() { + var session = Promise.reject(new StubError); + return new FakeExecutor().createDriver(session) + .getTitle() + .then(_ => assert.fail('should have failed'), assertIsStubError); + }); + + it('testCommandReturnValuesArePassedToFirstCallback', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE).andReturnSuccess('Google Search'). + end(); + + var driver = executor.createDriver(); + return driver.getTitle() + .then(title => assert.equal('Google Search', title)); + }); + + it('testStopsCommandExecutionWhenAnErrorOccurs', function() { + let e = new error.NoSuchWindowError('window not found'); + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW). + withParameters({ + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(e). + end(); + + let driver = executor.createDriver(); + return driver.switchTo().window('foo') + .then( + _ => driver.getTitle(), // mock should blow if this gets executed + v => assert.strictEqual(v, e)); + }); + + it('testCanSuppressCommandFailures', function() { + let e = new error.NoSuchWindowError('window not found'); + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW). + withParameters({ + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(e). + expect(CName.GET_TITLE). + andReturnSuccess('Google Search'). + end(); + + var driver = executor.createDriver(); + driver.switchTo().window('foo') + .catch(v => assert.strictEqual(v, e)); + driver.getTitle(); + return waitForIdle(); + }); + + it('testErrorsPropagateUpToTheRunningApplication', function() { + let e = new error.NoSuchWindowError('window not found'); + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW). + withParameters({ + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(e). + end(); + + return executor.createDriver() + .switchTo().window('foo') + .then(_ => assert.fail(), v => assert.strictEqual(v, e)); + }); + + it('testErrbacksThatReturnErrorsStillSwitchToCallbackChain', function() { + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW). + withParameters({ + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(new error.NoSuchWindowError('window not found')). + end(); + + var driver = executor.createDriver(); + return driver.switchTo().window('foo'). + catch(function() { return new StubError; }); + then(assertIsStubError, () => assert.fail()); + }); + + it('testErrbacksThrownCanOverrideOriginalError', function() { + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW, { + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(new error.NoSuchWindowError('window not found')). + end(); + + var driver = executor.createDriver(); + return driver.switchTo().window('foo') + .catch(throwStubError) + .then(assert.fail, assertIsStubError); + }); + + it('testReportsErrorWhenExecutingCommandsAfterExecutingAQuit', function() { + let executor = new FakeExecutor(). + expect(CName.QUIT). + end(); + + let verifyError = expectedError( + error.NoSuchSessionError, + 'This driver instance does not have a valid session ID ' + + '(did you call WebDriver.quit()?) and may no longer be used.'); + + let driver = executor.createDriver(); + return driver.quit() + .then(_ => driver.get('http://www.google.com')) + .then(assert.fail, verifyError); + }); + + it('testCallbackCommandsExecuteBeforeNextCommand', function() { + let executor = new FakeExecutor(). + expect(CName.GET_CURRENT_URL). + expect(CName.GET, {'url': 'http://www.google.com'}). + expect(CName.CLOSE). + expect(CName.GET_TITLE). + end(); + + var driver = executor.createDriver(); + driver.getCurrentUrl().then(function() { + driver.get('http://www.google.com').then(function() { + driver.close(); + }); + }); + driver.getTitle(); + + return waitForIdle(); + }); + + enablePromiseManager(() => { + it('testEachCallbackFrameRunsToCompletionBeforeTheNext', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE). + expect(CName.GET_CURRENT_URL). + expect(CName.GET_CURRENT_WINDOW_HANDLE). + expect(CName.CLOSE). + expect(CName.QUIT). + end(); + + var driver = executor.createDriver(); + driver.getTitle(). + // Everything in this callback... + then(function() { + driver.getCurrentUrl(); + driver.getWindowHandle(); + }). + // ...should execute before everything in this callback. + then(function() { + driver.close(); + }); + // This should execute after everything above + driver.quit(); + + return waitForIdle(); + }); + }); + + describe('returningAPromise', function() { + it('fromACallback', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE). + expect(CName.GET_CURRENT_URL). + andReturnSuccess('http://www.google.com'). + end(); + + var driver = executor.createDriver(); + return driver.getTitle(). + then(function() { + return driver.getCurrentUrl(); + }). + then(function(value) { + assert.equal('http://www.google.com', value); + }); + }); + + it('fromAnErrbackSuppressesTheError', function() { + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW, { + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(new StubError()). + expect(CName.GET_CURRENT_URL). + andReturnSuccess('http://www.google.com'). + end(); + + var driver = executor.createDriver(); + return driver.switchTo().window('foo'). + catch(function(e) { + assertIsStubError(e); + return driver.getCurrentUrl(); + }). + then(url => assert.equal('http://www.google.com', url)); + }); + }); + + describe('customFunctions', function() { + it('returnsANonPromiseValue', function() { + var driver = new FakeExecutor().createDriver(); + return driver.call(() => 'abc123').then(function(value) { + assert.equal('abc123', value); + }); + }); + + enablePromiseManager(() => { + it('executionOrderWithCustomFunctions', function() { + var msg = []; + let executor = new FakeExecutor(). + expect(CName.GET_TITLE).andReturnSuccess('cheese '). + expect(CName.GET_CURRENT_URL).andReturnSuccess('tasty'). + end(); + + var driver = executor.createDriver(); + + var pushMsg = msg.push.bind(msg); + driver.getTitle().then(pushMsg); + driver.call(() => 'is ').then(pushMsg); + driver.getCurrentUrl().then(pushMsg); + driver.call(() => '!').then(pushMsg); + + return waitForIdle().then(function() { + assert.equal('cheese is tasty!', msg.join('')); + }); + }); + }); + + it('passingArgumentsToACustomFunction', function() { + var add = function(a, b) { + return a + b; + }; + var driver = new FakeExecutor().createDriver(); + return driver.call(add, null, 1, 2).then(function(value) { + assert.equal(3, value); + }); + }); + + it('passingPromisedArgumentsToACustomFunction', function() { + var promisedArg = Promise.resolve(2); + var add = function(a, b) { + return a + b; + }; + var driver = new FakeExecutor().createDriver(); + return driver.call(add, null, 1, promisedArg).then(function(value) { + assert.equal(3, value); + }); + }); + + it('passingArgumentsAndScopeToACustomFunction', function() { + function Foo(name) { + this.name = name; + } + Foo.prototype.getName = function() { + return this.name; + }; + var foo = new Foo('foo'); + + var driver = new FakeExecutor().createDriver(); + return driver.call(foo.getName, foo).then(function(value) { + assert.equal('foo', value); + }); + }); + + it('customFunctionThrowsAnError', function() { + var driver = new FakeExecutor().createDriver(); + return driver.call(throwStubError).then(fail, assertIsStubError); + }); + + it('customFunctionSchedulesCommands', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE). + expect(CName.CLOSE). + expect(CName.QUIT). + end(); + + var driver = executor.createDriver(); + driver.call(function() { + driver.getTitle(); + driver.close(); + }); + driver.quit(); + return waitForIdle(); + }); + + it('returnsATaskResultAfterSchedulingAnother', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE). + andReturnSuccess('Google Search'). + expect(CName.CLOSE). + end(); + + var driver = executor.createDriver(); + return driver.call(function() { + var title = driver.getTitle(); + driver.close(); + return title; + }).then(function(title) { + assert.equal('Google Search', title); + }); + }); + + it('hasANestedCommandThatFails', function() { + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW, { + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(new StubError()). + end(); + + var driver = executor.createDriver(); + return driver.call(function() { + return driver.switchTo().window('foo'); + }).then(fail, assertIsStubError); + }); + + enablePromiseManager(() => { + it('doesNotCompleteUntilReturnedPromiseIsResolved', function() { + var order = []; + var driver = new FakeExecutor().createDriver(); + + var d = promise.defer(); + d.promise.then(function() { + order.push('b'); + }); + + driver.call(function() { + order.push('a'); + return d.promise; + }); + driver.call(function() { + order.push('c'); + }); + + // timeout to ensure the first function starts its execution before we + // trigger d's callbacks. + return new Promise(f => setTimeout(f, 0)).then(function() { + assert.deepEqual(['a'], order); + d.fulfill(); + return waitForIdle().then(function() { + assert.deepEqual(['a', 'b', 'c'], order); + }); + }); + }); + }); + + it('returnsADeferredAction', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE).andReturnSuccess('Google'). + end(); + + var driver = executor.createDriver(); + driver.call(function() { + return driver.getTitle(); + }).then(function(title) { + assert.equal('Google', title); + }); + return waitForIdle(); + }); + }); + + describe('nestedCommands', function() { + enablePromiseManager(() => { + it('commandExecutionOrder', function() { + var msg = []; + var driver = new FakeExecutor().createDriver(); + driver.call(msg.push, msg, 'a'); + driver.call(function() { + driver.call(msg.push, msg, 'c'); + driver.call(function() { + driver.call(msg.push, msg, 'e'); + driver.call(msg.push, msg, 'f'); + }); + driver.call(msg.push, msg, 'd'); + }); + driver.call(msg.push, msg, 'b'); + return waitForIdle().then(function() { + assert.equal('acefdb', msg.join('')); + }); + }); + + it('basicUsage', function() { + var msg = []; + var driver = new FakeExecutor().createDriver(); + var pushMsg = msg.push.bind(msg); + driver.call(() => 'cheese ').then(pushMsg); + driver.call(function() { + driver.call(() => 'is ').then(pushMsg); + driver.call(() => 'tasty').then(pushMsg); + }); + driver.call(() => '!').then(pushMsg); + return waitForIdle().then(function() { + assert.equal('cheese is tasty!', msg.join('')); + }); + }); + + it('normalCommandAfterNestedCommandThatReturnsAnAction', function() { + var msg = []; + let executor = new FakeExecutor(). + expect(CName.CLOSE). + end(); + var driver = executor.createDriver(); + driver.call(function() { + return driver.call(function() { + msg.push('a'); + return driver.call(() => 'foobar'); + }); + }); + driver.close().then(function() { + msg.push('b'); + }); + return waitForIdle().then(function() { + assert.equal('ab', msg.join('')); + }); + }); + }); + + it('canReturnValueFromNestedFunction', function() { + var driver = new FakeExecutor().createDriver(); + return driver.call(function() { + return driver.call(function() { + return driver.call(() => 'foobar'); + }); + }).then(function(value) { + assert.equal('foobar', value); + }); + }); + + it('errorsBubbleUp_caught', function() { + var driver = new FakeExecutor().createDriver(); + var result = driver.call(function() { + return driver.call(function() { + return driver.call(throwStubError); + }); + }).then(fail, assertIsStubError); + return Promise.all([waitForIdle(), result]); + }); + + it('errorsBubbleUp_uncaught', function() { + var driver = new FakeExecutor().createDriver(); + return driver.call(function() { + return driver.call(function() { + return driver.call(throwStubError); + }); + }) + .then(_ => assert.fail('should have failed'), assertIsStubError); + }); + + it('canScheduleCommands', function() { + let executor = new FakeExecutor(). + expect(CName.GET_TITLE). + expect(CName.CLOSE). + end(); + + var driver = executor.createDriver(); + driver.call(function() { + driver.call(function() { + driver.getTitle(); + }); + driver.close(); + }); + return waitForIdle(); + }); + }); + + describe('WebElementPromise', function() { + let driver = new FakeExecutor().createDriver(); + + it('resolvesWhenUnderlyingElementDoes', function() { + let el = new WebElement(driver, {'ELEMENT': 'foo'}); + return new WebElementPromise(driver, Promise.resolve(el)) + .then(e => assert.strictEqual(e, el)); + }); + + it('resolvesBeforeCallbacksOnWireValueTrigger', function() { + var el = defer(); + + var element = new WebElementPromise(driver, el.promise); + var messages = []; + + let steps = [ + element.then(_ => messages.push('element resolved')), + element.getId().then(_ => messages.push('wire value resolved')) + ]; + + el.resolve(new WebElement(driver, {'ELEMENT': 'foo'})); + return Promise.all(steps).then(function() { + assert.deepEqual([ + 'element resolved', + 'wire value resolved' + ], messages); + }); + }); + + it('isRejectedIfUnderlyingIdIsRejected', function() { + let element = + new WebElementPromise(driver, Promise.reject(new StubError)); + return element.then(fail, assertIsStubError); + }); + }); + + describe('executeScript', function() { + it('nullReturnValue', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return document.body;', + 'args': [] + }). + andReturnSuccess(null). + end(); + + var driver = executor.createDriver(); + return driver.executeScript('return document.body;') + .then((result) => assert.equal(null, result)); + }); + + it('primitiveReturnValue', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return document.body;', + 'args': [] + }). + andReturnSuccess(123). + end(); + + var driver = executor.createDriver(); + return driver.executeScript('return document.body;') + .then((result) => assert.equal(123, result)); + }); + + it('webElementReturnValue', function() { + var json = WebElement.buildId('foo'); + + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return document.body;', + 'args': [] + }). + andReturnSuccess(json). + end(); + + var driver = executor.createDriver(); + return driver.executeScript('return document.body;') + .then((element) => element.getId()) + .then((id) => assert.equal(id, 'foo')); + }); + + it('arrayReturnValue', function() { + var json = [WebElement.buildId('foo')]; + + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return document.body;', + 'args': [] + }). + andReturnSuccess(json). + end(); + + var driver = executor.createDriver(); + return driver.executeScript('return document.body;') + .then(function(array) { + assert.equal(1, array.length); + return array[0].getId(); + }) + .then((id) => assert.equal('foo', id)); + }); + + it('objectReturnValue', function() { + var json = {'foo': WebElement.buildId('foo')}; + + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return document.body;', + 'args': [] + }). + andReturnSuccess(json). + end(); + + var driver = executor.createDriver(); + var callback; + return driver.executeScript('return document.body;') + .then((obj) => obj['foo'].getId()) + .then((id) => assert.equal(id, 'foo')); + }); + + it('scriptAsFunction', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return (' + function() {} + + ').apply(null, arguments);', + 'args': [] + }). + andReturnSuccess(null). + end(); + + var driver = executor.createDriver(); + return driver.executeScript(function() {}); + }); + + it('simpleArgumentConversion', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return 1;', + 'args': ['abc', 123, true, [123, {'foo': 'bar'}]] + }). + andReturnSuccess(null). + end(); + + var driver = executor.createDriver(); + return driver.executeScript( + 'return 1;', 'abc', 123, true, [123, {'foo': 'bar'}]); + }); + + it('webElementArgumentConversion', function() { + var elementJson = WebElement.buildId('fefifofum'); + + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return 1;', + 'args': [elementJson] + }). + andReturnSuccess(null). + end(); + + var driver = executor.createDriver(); + return driver.executeScript('return 1;', + new WebElement(driver, 'fefifofum')); + }); + + it('webElementPromiseArgumentConversion', function() { + var elementJson = WebElement.buildId('bar'); + + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {'using': 'css selector', 'value': '*[id="foo"]'}). + andReturnSuccess(elementJson). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return 1;', + 'args': [elementJson] + }). + andReturnSuccess(null). + end(); + + var driver = executor.createDriver(); + var element = driver.findElement(By.id('foo')); + return driver.executeScript('return 1;', element); + }); + + it('argumentConversion', function() { + var elementJson = WebElement.buildId('fefifofum'); + + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'return 1;', + 'args': ['abc', 123, true, elementJson, [123, {'foo': 'bar'}]] + }). + andReturnSuccess(null). + end(); + + var driver = executor.createDriver(); + var element = new WebElement(driver, 'fefifofum'); + return driver.executeScript('return 1;', + 'abc', 123, true, element, [123, {'foo': 'bar'}]); + }); + + it('scriptReturnsAnError', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT). + withParameters({ + 'script': 'throw Error(arguments[0]);', + 'args': ['bam'] + }). + andReturnError(new StubError). + end(); + var driver = executor.createDriver(); + return driver.executeScript('throw Error(arguments[0]);', 'bam'). + then(fail, assertIsStubError); + }); + + it('failsIfArgumentIsARejectedPromise', function() { + let executor = new FakeExecutor(); + + var arg = Promise.reject(new StubError); + arg.catch(function() {}); // Suppress default handler. + + var driver = executor.createDriver(); + return driver.executeScript(function() {}, arg). + then(fail, assertIsStubError); + }); + }); + + describe('executeAsyncScript', function() { + it('failsIfArgumentIsARejectedPromise', function() { + var arg = Promise.reject(new StubError); + arg.catch(function() {}); // Suppress default handler. + + var driver = new FakeExecutor().createDriver(); + return driver.executeAsyncScript(function() {}, arg). + then(fail, assertIsStubError); + }); + }); + + describe('findElement', function() { + it('elementNotFound', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnError(new StubError). + end(); + + var driver = executor.createDriver(); + return driver.findElement(By.id('foo')) + .then(assert.fail, assertIsStubError); + }); + + it('elementNotFoundInACallback', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnError(new StubError). + end(); + + var driver = executor.createDriver(); + return Promise.resolve() + .then(_ => driver.findElement(By.id('foo'))) + .then(assert.fail, assertIsStubError); + }); + + it('elementFound', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnSuccess(WebElement.buildId('bar')). + expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('bar')}). + andReturnSuccess(). + end(); + + var driver = executor.createDriver(); + var element = driver.findElement(By.id('foo')); + element.click(); + return waitForIdle(); + }); + + it('canUseElementInCallback', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnSuccess(WebElement.buildId('bar')). + expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('bar')}). + andReturnSuccess(). + end(); + + var driver = executor.createDriver(); + driver.findElement(By.id('foo')).then(function(element) { + element.click(); + }); + return waitForIdle(); + }); + + it('byJs', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, { + 'script': 'return document.body', + 'args': [] + }). + andReturnSuccess(WebElement.buildId('bar')). + expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('bar')}). + end(); + + var driver = executor.createDriver(); + var element = driver.findElement(By.js('return document.body')); + element.click(); // just to make sure + return waitForIdle(); + }); + + it('byJs_returnsNonWebElementValue', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, {'script': 'return 123', 'args': []}). + andReturnSuccess(123). + end(); + + var driver = executor.createDriver(); + return driver.findElement(By.js('return 123')) + .then(assert.fail, function(e) { + assertIsInstance(TypeError, e); + assert.equal( + 'Custom locator did not return a WebElement', e.message); + }); + }); + + it('byJs_canPassArguments', function() { + var script = 'return document.getElementsByTagName(arguments[0]);'; + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, { + 'script': script, + 'args': ['div'] + }). + andReturnSuccess(WebElement.buildId('one')). + end(); + var driver = executor.createDriver(); + driver.findElement(By.js(script, 'div')); + return waitForIdle(); + }); + + it('customLocator', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENTS, {'using': 'css selector', 'value': 'a'}). + andReturnSuccess([ + WebElement.buildId('foo'), + WebElement.buildId('bar')]). + expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('foo')}). + andReturnSuccess(). + end(); + + var driver = executor.createDriver(); + var element = driver.findElement(function(d) { + assert.equal(driver, d); + return d.findElements(By.tagName('a')); + }); + return element.click(); + }); + + it('customLocatorThrowsIfresultIsNotAWebElement', function() { + var driver = new FakeExecutor().createDriver(); + return driver.findElement(_ => 1) + .then(assert.fail, function(e) { + assertIsInstance(TypeError, e); + assert.equal( + 'Custom locator did not return a WebElement', e.message); + }); + }); + }); + + describe('findElements', function() { + it('returnsMultipleElements', function() { + var ids = ['foo', 'bar', 'baz']; + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENTS, {'using':'css selector', 'value':'a'}). + andReturnSuccess(ids.map(WebElement.buildId)). + end(); + + var driver = executor.createDriver(); + return driver.findElements(By.tagName('a')) + .then(function(elements) { + return promise.all(elements.map(function(e) { + assert.ok(e instanceof WebElement); + return e.getId(); + })); + }) + .then((actual) => assert.deepEqual(ids, actual)); + }); + + it('byJs', function() { + var ids = ['foo', 'bar', 'baz']; + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, { + 'script': 'return document.getElementsByTagName("div");', + 'args': [] + }). + andReturnSuccess(ids.map(WebElement.buildId)). + end(); + + var driver = executor.createDriver(); + + return driver. + findElements(By.js('return document.getElementsByTagName("div");')). + then(function(elements) { + return promise.all(elements.map(function(e) { + assert.ok(e instanceof WebElement); + return e.getId(); + })); + }). + then((actual) => assert.deepEqual(ids, actual)); + }); + + it('byJs_filtersOutNonWebElementResponses', function() { + var ids = ['foo', 'bar', 'baz']; + var json = [ + WebElement.buildId(ids[0]), + 123, + 'a', + false, + WebElement.buildId(ids[1]), + {'not a web element': 1}, + WebElement.buildId(ids[2]) + ]; + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, { + 'script': 'return document.getElementsByTagName("div");', + 'args': [] + }). + andReturnSuccess(json). + end(); + + var driver = executor.createDriver(); + driver.findElements(By.js('return document.getElementsByTagName("div");')). + then(function(elements) { + return promise.all(elements.map(function(e) { + assert.ok(e instanceof WebElement); + return e.getId(); + })); + }). + then((actual) => assert.deepEqual(ids, actual)); + return waitForIdle(); + }); + + it('byJs_convertsSingleWebElementResponseToArray', function() { + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, { + 'script': 'return document.getElementsByTagName("div");', + 'args': [] + }). + andReturnSuccess(WebElement.buildId('foo')). + end(); + + var driver = executor.createDriver(); + return driver. + findElements(By.js('return document.getElementsByTagName("div");')). + then(function(elements) { + return promise.all(elements.map(function(e) { + assert.ok(e instanceof WebElement); + return e.getId(); + })); + }). + then((actual) => assert.deepEqual(['foo'], actual)); + }); + + it('byJs_canPassScriptArguments', function() { + var script = 'return document.getElementsByTagName(arguments[0]);'; + let executor = new FakeExecutor(). + expect(CName.EXECUTE_SCRIPT, { + 'script': script, + 'args': ['div'] + }). + andReturnSuccess([ + WebElement.buildId('one'), + WebElement.buildId('two') + ]). + end(); + + var driver = executor.createDriver(); + return driver.findElements(By.js(script, 'div')) + then(function(elements) { + return promise.all(elements.map(function(e) { + assert.ok(e instanceof WebElement); + return e.getId(); + })); + }). + then((actual) => assert.deepEqual(['one', 'two'], actual)); + }); + }); + + describe('sendKeys', function() { + it('convertsVarArgsIntoStrings_simpleArgs', function() { + let executor = new FakeExecutor(). + expect(CName.SEND_KEYS_TO_ELEMENT, + {'id': WebElement.buildId('one'), + 'text': '12abc3', + 'value':'12abc3'.split('')}). + andReturnSuccess(). + end(); + + var driver = executor.createDriver(); + var element = new WebElement(driver, 'one'); + element.sendKeys(1, 2, 'abc', 3); + return waitForIdle(); + }); + + it('convertsVarArgsIntoStrings_promisedArgs', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {'using':'css selector', 'value':'*[id="foo"]'}). + andReturnSuccess(WebElement.buildId('one')). + expect(CName.SEND_KEYS_TO_ELEMENT, + {'id':WebElement.buildId('one'), + 'text': 'abc123def', + 'value':'abc123def'.split('')}). + andReturnSuccess(). + end(); + + var driver = executor.createDriver(); + var element = driver.findElement(By.id('foo')); + return element.sendKeys( + Promise.resolve('abc'), + 123, + Promise.resolve('def')); + }); + + it('sendKeysWithAFileDetector', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {'using':'css selector', 'value':'*[id="foo"]'}). + andReturnSuccess(WebElement.buildId('one')). + expect(CName.SEND_KEYS_TO_ELEMENT, + {'id': WebElement.buildId('one'), + 'text': 'modified/path', + 'value':'modified/path'.split('')}). + andReturnSuccess(). + end(); + + let driver = executor.createDriver(); + let handleFile = function(d, path) { + assert.strictEqual(driver, d); + assert.equal(path, 'original/path'); + return Promise.resolve('modified/path'); + }; + driver.setFileDetector({handleFile}); + + return driver.findElement(By.id('foo')).sendKeys('original/', 'path'); + }); + }); + + describe("switchTo()", function() { + describe("window", function() { + it('should return a resolved promise when the window is found', function() { + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW). + withParameters({ + 'name': 'foo', + 'handle': 'foo' + }). + andReturnSuccess(). + end(); + + executor.createDriver().switchTo().window('foo'); + return waitForIdle(); + }); + + it('should propagate exceptions', function() { + let e = new error.NoSuchWindowError('window not found'); + let executor = new FakeExecutor(). + expect(CName.SWITCH_TO_WINDOW). + withParameters({ + 'name': 'foo', + 'handle': 'foo' + }). + andReturnError(e). + end(); + + return executor.createDriver() + .switchTo().window('foo') + .then(assert.fail, v => assert.strictEqual(v, e)); + }); + }); + }); + + describe('elementEquality', function() { + it('isReflexive', function() { + var a = new WebElement(new FakeExecutor().createDriver(), 'foo'); + return WebElement.equals(a, a).then(assert.ok); + }); + + it('failsIfAnInputElementCouldNotBeFound', function() { + let id = Promise.reject(new StubError); + + var driver = new FakeExecutor().createDriver(); + var a = new WebElement(driver, 'foo'); + var b = new WebElementPromise(driver, id); + + return WebElement.equals(a, b).then(fail, assertIsStubError); + }); + }); + + describe('waiting', function() { + describe('supports custom wait functions', function() { + it('waitSucceeds', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnSuccess([]). + times(2). + expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnSuccess([WebElement.buildId('bar')]). + end(); + + var driver = executor.createDriver(); + driver.wait(function() { + return driver.findElements(By.id('foo')).then(els => els.length > 0); + }, 200); + return waitForIdle(); + }); + + it('waitTimesout_timeoutCaught', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnSuccess([]). + anyTimes(). + end(); + + var driver = executor.createDriver(); + return driver.wait(function() { + return driver.findElements(By.id('foo')).then(els => els.length > 0); + }, 25).then(fail, function(e) { + assert.equal('Wait timed out after ', + e.message.substring(0, 'Wait timed out after '.length)); + }); + }); + + enablePromiseManager(() => { + it('waitTimesout_timeoutNotCaught', function() { + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnSuccess([]). + anyTimes(). + end(); + + var driver = executor.createDriver(); + driver.wait(function() { + return driver.findElements(By.id('foo')).then(els => els.length > 0); + }, 25); + return waitForAbort().then(function(e) { + assert.equal('Wait timed out after ', + e.message.substring(0, 'Wait timed out after '.length)); + }); + }); + }); + }); + + describe('supports condition objects', function() { + it('wait succeeds', function() { + let executor = new FakeExecutor() + .expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}) + .andReturnSuccess([]) + .times(2) + .expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}) + .andReturnSuccess([WebElement.buildId('bar')]) + .end(); + + let driver = executor.createDriver(); + return driver.wait(until.elementLocated(By.id('foo')), 200); + }); + + it('wait times out', function() { + let executor = new FakeExecutor() + .expect(CName.FIND_ELEMENTS, + {using: 'css selector', value: '*[id="foo"]'}) + .andReturnSuccess([]) + .anyTimes() + .end(); + + let driver = executor.createDriver(); + return driver.wait(until.elementLocated(By.id('foo')), 5) + .then(fail, err => assert.ok(err instanceof error.TimeoutError)); + }); + }); + + describe('supports promise objects', function() { + it('wait succeeds', function() { + let promise = new Promise(resolve => { + setTimeout(() => resolve(1), 10); + }); + + let driver = new FakeExecutor().createDriver(); + return driver.wait(promise, 200).then(v => assert.equal(v, 1)); + }); + + it('wait times out', function() { + let promise = new Promise(resolve => {/* never resolves */}); + + let driver = new FakeExecutor().createDriver(); + return driver.wait(promise, 5) + .then(fail, err => assert.ok(err instanceof error.TimeoutError)); + }); + + it('wait fails if promise is rejected', function() { + let err = Error('boom'); + let driver = new FakeExecutor().createDriver(); + return driver.wait(Promise.reject(err), 5) + .then(fail, e => assert.strictEqual(e, err)); + }); + }); + + it('fails if not supported condition type provided', function() { + let driver = new FakeExecutor().createDriver(); + assert.throws(() => driver.wait({}, 5), TypeError); + }); + }); + + describe('alert handling', function() { + it('alertResolvesWhenPromisedTextResolves', function() { + let driver = new FakeExecutor().createDriver(); + let deferredText = defer(); + + let alert = new AlertPromise(driver, deferredText.promise); + + deferredText.resolve(new Alert(driver, 'foo')); + return alert.getText().then(text => assert.equal(text, 'foo')); + }); + + it('cannotSwitchToAlertThatIsNotPresent', function() { + let e = new error.NoSuchAlertError; + let executor = new FakeExecutor() + .expect(CName.GET_ALERT_TEXT) + .andReturnError(e) + .end(); + + return executor.createDriver() + .switchTo().alert() + .then(assert.fail, v => assert.strictEqual(v, e)); + }); + + enablePromiseManager(() => { + it('alertsBelongToSameFlowAsParentDriver', function() { + let executor = new FakeExecutor() + .expect(CName.GET_ALERT_TEXT).andReturnSuccess('hello') + .end(); + + var driver = executor.createDriver(); + var otherFlow = new promise.ControlFlow(); + otherFlow.execute(function() { + driver.switchTo().alert().then(function() { + assert.strictEqual( + driver.controlFlow(), promise.controlFlow(), + 'Alert should belong to the same flow as its parent driver'); + }); + }); + + assert.notEqual(otherFlow, driver.controlFlow); + return Promise.all([ + waitForIdle(otherFlow), + waitForIdle(driver.controlFlow()) + ]); + }); + }); + + it('commandsFailIfAlertNotPresent', function() { + let e = new error.NoSuchAlertError; + let executor = new FakeExecutor() + .expect(CName.GET_ALERT_TEXT) + .andReturnError(e) + .end(); + + var driver = executor.createDriver(); + var alert = driver.switchTo().alert(); + + var expectError = (v) => assert.strictEqual(v, e); + + return alert.getText() + .then(fail, expectedError) + .then(() => alert.accept()) + .then(fail, expectedError) + .then(() => alert.dismiss()) + .then(fail, expectError) + .then(() => alert.sendKeys('hi')) + .then(fail, expectError); + }); + }); + + enablePromiseManager(() => { + it('testWebElementsBelongToSameFlowAsParentDriver', function() { + let executor = new FakeExecutor() + .expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}) + .andReturnSuccess(WebElement.buildId('abc123')) + .end(); + + var driver = executor.createDriver(); + var otherFlow = new promise.ControlFlow(); + otherFlow.execute(function() { + driver.findElement({id: 'foo'}).then(function() { + assert.equal(driver.controlFlow(), promise.controlFlow()); + }); + }); + + assert.notEqual(otherFlow, driver.controlFlow); + return Promise.all([ + waitForIdle(otherFlow), + waitForIdle(driver.controlFlow()) + ]); + }); + }); + + it('testFetchingLogs', function() { + let executor = new FakeExecutor(). + expect(CName.GET_LOG, {'type': 'browser'}). + andReturnSuccess([ + {'level': 'INFO', 'message': 'hello', 'timestamp': 1234}, + {'level': 'DEBUG', 'message': 'abc123', 'timestamp': 5678} + ]). + end(); + + var driver = executor.createDriver(); + return driver.manage().logs().get('browser').then(function(entries) { + assert.equal(2, entries.length); + + assert.ok(entries[0] instanceof logging.Entry); + assert.equal(logging.Level.INFO.value, entries[0].level.value); + assert.equal('hello', entries[0].message); + assert.equal(1234, entries[0].timestamp); + + assert.ok(entries[1] instanceof logging.Entry); + assert.equal(logging.Level.DEBUG.value, entries[1].level.value); + assert.equal('abc123', entries[1].message); + assert.equal(5678, entries[1].timestamp); + }); + }); + + it('testCommandsFailIfInitialSessionCreationFailed', function() { + var session = Promise.reject(new StubError); + + var driver = new FakeExecutor().createDriver(session); + var navigateResult = driver.get('some-url').then(fail, assertIsStubError); + var quitResult = driver.quit().then(fail, assertIsStubError); + + return waitForIdle().then(function() { + return promise.all(navigateResult, quitResult); + }); + }); + + it('testWebElementCommandsFailIfInitialDriverCreationFailed', function() { + var session = Promise.reject(new StubError); + var driver = new FakeExecutor().createDriver(session); + return driver.findElement(By.id('foo')).click(). + then(fail, assertIsStubError); + }); + + it('testWebElementCommansFailIfElementCouldNotBeFound', function() { + let e = new error.NoSuchElementError('Unable to find element'); + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnError(e). + end(); + + var driver = executor.createDriver(); + return driver.findElement(By.id('foo')).click() + .then(fail, v => assert.strictEqual(v, e)); + }); + + it('testCannotFindChildElementsIfParentCouldNotBeFound', function() { + let e = new error.NoSuchElementError('Unable to find element'); + let executor = new FakeExecutor(). + expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}). + andReturnError(e). + end(); + + var driver = executor.createDriver(); + return driver.findElement(By.id('foo')) + .findElement(By.id('bar')) + .findElement(By.id('baz')) + .then(fail, v => assert.strictEqual(v, e)); + }); + + describe('actions()', function() { + it('failsIfInitialDriverCreationFailed', function() { + let session = Promise.reject(new StubError('no session for you')); + let driver = new FakeExecutor().createDriver(session); + driver.getSession().catch(function() {}); + return driver. + actions(). + mouseDown(). + mouseUp(). + perform(). + catch(assertIsStubError); + }); + + describe('mouseMove', function() { + it('noElement', function() { + let executor = new FakeExecutor() + .expect(CName.MOVE_TO, {'xoffset': 0, 'yoffset': 125}) + .andReturnSuccess() + .end(); + + return executor.createDriver(). + actions(). + mouseMove({x: 0, y: 125}). + perform(); + }); + + it('element', function() { + let executor = new FakeExecutor() + .expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="foo"]'}) + .andReturnSuccess(WebElement.buildId('abc123')) + .expect(CName.MOVE_TO, + {'element': 'abc123', 'xoffset': 0, 'yoffset': 125}) + .andReturnSuccess() + .end(); + + var driver = executor.createDriver(); + var element = driver.findElement(By.id('foo')); + return driver.actions() + .mouseMove(element, {x: 0, y: 125}) + .perform(); + }); + }); + + it('supportsMouseDown', function() { + let executor = new FakeExecutor() + .expect(CName.MOUSE_DOWN, {'button': Button.LEFT}) + .andReturnSuccess() + .end(); + + return executor.createDriver(). + actions(). + mouseDown(). + perform(); + }); + + it('testActionSequence', function() { + let executor = new FakeExecutor() + .expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="a"]'}) + .andReturnSuccess(WebElement.buildId('id1')) + .expect(CName.FIND_ELEMENT, + {using: 'css selector', value: '*[id="b"]'}) + .andReturnSuccess(WebElement.buildId('id2')) + .expect(CName.SEND_KEYS_TO_ACTIVE_ELEMENT, + {'value': [Key.SHIFT]}) + .andReturnSuccess() + .expect(CName.MOVE_TO, {'element': 'id1'}) + .andReturnSuccess() + .expect(CName.CLICK, {'button': Button.LEFT}) + .andReturnSuccess() + .expect(CName.MOVE_TO, {'element': 'id2'}) + .andReturnSuccess() + .expect(CName.CLICK, {'button': Button.LEFT}) + .andReturnSuccess() + .end(); + + var driver = executor.createDriver(); + var element1 = driver.findElement(By.id('a')); + var element2 = driver.findElement(By.id('b')); + + return driver.actions() + .keyDown(Key.SHIFT) + .click(element1) + .click(element2) + .perform(); + }); + }); + + describe('touchActions()', function() { + it('failsIfInitialDriverCreationFailed', function() { + let session = Promise.reject(new StubError); + let driver = new FakeExecutor().createDriver(session); + driver.getSession().catch(function() {}); + return driver. + touchActions(). + scroll({x: 3, y: 4}). + perform(). + catch(assertIsStubError); + }); + + it('testTouchActionSequence', function() { + let executor = new FakeExecutor() + .expect(CName.TOUCH_DOWN, {x: 1, y: 2}).andReturnSuccess() + .expect(CName.TOUCH_MOVE, {x: 3, y: 4}).andReturnSuccess() + .expect(CName.TOUCH_UP, {x: 5, y: 6}).andReturnSuccess() + .end(); + + var driver = executor.createDriver(); + return driver.touchActions() + .tapAndHold({x: 1, y: 2}) + .move({x: 3, y: 4}) + .release({x: 5, y: 6}) + .perform(); + }); + }); + + describe('manage()', function() { + describe('setTimeouts()', function() { + describe('throws if no timeouts are specified', function() { + let driver; + before(() => driver = new FakeExecutor().createDriver()); + + it('; no arguments', function() { + assert.throws(() => driver.manage().setTimeouts(), TypeError); + }); + + it('; ignores unrecognized timeout keys', function() { + assert.throws( + () => driver.manage().setTimeouts({foo: 123}), TypeError); + }); + + it('; ignores positional arguments', function() { + assert.throws( + () => driver.manage().setTimeouts(1234, 56), TypeError); + }); + }); + + describe('throws timeout is not a number, null, or undefined', () => { + let driver; + before(() => driver = new FakeExecutor().createDriver()); + + function checkError(e) { + return e instanceof TypeError + && /expected "(script|pageLoad|implicit)" to be a number/.test( + e.message); + } + + it('script', function() { + assert.throws( + () => driver.manage().setTimeouts({script: 'abc'}), + checkError); + }); + + it('pageLoad', function() { + assert.throws( + () => driver.manage().setTimeouts({pageLoad: 'abc'}), + checkError); + }); + + it('implicit', function() { + assert.throws( + () => driver.manage().setTimeouts({implicit: 'abc'}), + checkError); + }); + }); + + it('can set multiple timeouts', function() { + let executor = new FakeExecutor() + .expect(CName.SET_TIMEOUT, {script:1, pageLoad: 2, implicit: 3}) + .andReturnSuccess() + .end(); + let driver = executor.createDriver(); + return driver.manage() + .setTimeouts({script: 1, pageLoad: 2, implicit: 3}); + }); + + it('falls back to legacy wire format if W3C version fails', () => { + let executor = new FakeExecutor() + .expect(CName.SET_TIMEOUT, {implicit: 3}) + .andReturnError(Error('oops')) + .expect(CName.SET_TIMEOUT, {type: 'implicit', ms: 3}) + .andReturnSuccess() + .end(); + let driver = executor.createDriver(); + return driver.manage().setTimeouts({implicit: 3}); + }); + + describe('deprecated API calls setTimeouts()', function() { + it('implicitlyWait()', function() { + let executor = new FakeExecutor() + .expect(CName.SET_TIMEOUT, {implicit: 3}) + .andReturnSuccess() + .end(); + let driver = executor.createDriver(); + return driver.manage().timeouts().implicitlyWait(3); + }); + + it('setScriptTimeout()', function() { + let executor = new FakeExecutor() + .expect(CName.SET_TIMEOUT, {script: 3}) + .andReturnSuccess() + .end(); + let driver = executor.createDriver(); + return driver.manage().timeouts().setScriptTimeout(3); + }); + + it('pageLoadTimeout()', function() { + let executor = new FakeExecutor() + .expect(CName.SET_TIMEOUT, {pageLoad: 3}) + .andReturnSuccess() + .end(); + let driver = executor.createDriver(); + return driver.manage().timeouts().pageLoadTimeout(3); + }); + }); + }); + }); + + describe('generator support', function() { + var driver; + + beforeEach(function() { + driver = new WebDriver( + new Session('test-session', {}), + new ExplodingExecutor()); + }); + + it('canUseGeneratorsWithWebDriverCall', function() { + return driver.call(function* () { + var x = yield Promise.resolve(1); + var y = yield Promise.resolve(2); + return x + y; + }).then(function(value) { + assert.deepEqual(3, value); + }); + }); + + it('canDefineScopeOnGeneratorCall', function() { + return driver.call(function* () { + var x = yield Promise.resolve(1); + return this.name + x; + }, {name: 'Bob'}).then(function(value) { + assert.deepEqual('Bob1', value); + }); + }); + + it('canSpecifyArgsOnGeneratorCall', function() { + return driver.call(function* (a, b) { + var x = yield Promise.resolve(1); + var y = yield Promise.resolve(2); + return [x + y, a, b]; + }, null, 'abc', 123).then(function(value) { + assert.deepEqual([3, 'abc', 123], value); + }); + }); + + it('canUseGeneratorWithWebDriverWait', function() { + var values = []; + return driver.wait(function* () { + yield values.push(1); + values.push(yield promise.delayed(10).then(function() { + return 2; + })); + yield values.push(3); + return values.length === 6; + }, 250).then(function() { + assert.deepEqual([1, 2, 3, 1, 2, 3], values); + }); + }); + + /** + * @constructor + * @implements {CommandExecutor} + */ + function ExplodingExecutor() {} + + + /** @override */ + ExplodingExecutor.prototype.execute = function(command, cb) { + cb(Error('Unsupported operation')); + }; + }); + + describe('wire format', function() { + const FAKE_DRIVER = new FakeExecutor().createDriver(); + + describe('can serialize', function() { + function runSerializeTest(input, want) { + let executor = new FakeExecutor(). + expect(CName.NEW_SESSION). + withParameters({'desiredCapabilities': want}). + andReturnSuccess({'browserName': 'firefox'}). + end(); + return WebDriver.createSession(executor, input) + .getSession(); + } + + it('function as a string', function() { + function foo() { return 'foo'; } + return runSerializeTest(foo, '' + foo); + }); + + it('object with toJSON()', function() { + return runSerializeTest( + new Date(605728511546), + '1989-03-12T17:55:11.546Z'); + }); + + it('Session', function() { + return runSerializeTest(new Session('foo', {}), 'foo'); + }); + + it('Capabilities', function() { + var prefs = new logging.Preferences(); + prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); + + var caps = Capabilities.chrome(); + caps.setLoggingPrefs(prefs); + + return runSerializeTest( + caps, + { + 'browserName': 'chrome', + 'loggingPrefs': {'browser': 'DEBUG'} + }); + }); + + it('WebElement', function() { + return runSerializeTest( + new WebElement(FAKE_DRIVER, 'fefifofum'), + WebElement.buildId('fefifofum')); + }); + + it('WebElementPromise', function() { + return runSerializeTest( + new WebElementPromise( + FAKE_DRIVER, + Promise.resolve(new WebElement(FAKE_DRIVER, 'fefifofum'))), + WebElement.buildId('fefifofum')); + }); + + describe('an array', function() { + it('with Serializable', function() { + return runSerializeTest([new Session('foo', {})], ['foo']); + }); + + it('with WebElement', function() { + return runSerializeTest( + [new WebElement(FAKE_DRIVER, 'fefifofum')], + [WebElement.buildId('fefifofum')]); + }); + + it('with WebElementPromise', function() { + return runSerializeTest( + [new WebElementPromise( + FAKE_DRIVER, + Promise.resolve(new WebElement(FAKE_DRIVER, 'fefifofum')))], + [WebElement.buildId('fefifofum')]); + }); + + it('complex array', function() { + var expected = [ + 'abc', 123, true, WebElement.buildId('fefifofum'), + [123, {'foo': 'bar'}] + ]; + + var element = new WebElement(FAKE_DRIVER, 'fefifofum'); + var input = ['abc', 123, true, element, [123, {'foo': 'bar'}]]; + return runSerializeTest(input, expected); + }); + + it('nested promises', function() { + return runSerializeTest( + ['abc', Promise.resolve([123, Promise.resolve(true)])], + ['abc', [123, true]]); + }); + }); + + describe('an object', function() { + it('literal', function() { + var expected = {sessionId: 'foo'}; + return runSerializeTest({sessionId: 'foo'}, expected); + }); + + it('with sub-objects', function() { + var expected = {sessionId: {value: 'foo'}}; + return runSerializeTest( + {sessionId: {value: 'foo'}}, expected); + }); + + it('with values that have toJSON', function() { + return runSerializeTest( + {a: {b: new Date(605728511546)}}, + {a: {b: '1989-03-12T17:55:11.546Z'}}); + }); + + it('with a Session', function() { + return runSerializeTest( + {a: new Session('foo', {})}, + {a: 'foo'}); + }); + + it('nested', function() { + var elementJson = WebElement.buildId('fefifofum'); + var expected = { + 'script': 'return 1', + 'args': ['abc', 123, true, elementJson, [123, {'foo': 'bar'}]], + 'sessionId': 'foo' + }; + + var element = new WebElement(FAKE_DRIVER, 'fefifofum'); + var parameters = { + 'script': 'return 1', + 'args':['abc', 123, true, element, [123, {'foo': 'bar'}]], + 'sessionId': new Session('foo', {}) + }; + + return runSerializeTest(parameters, expected); + }); + }); + }); + + describe('can deserialize', function() { + function runDeserializeTest(original, want) { + let executor = new FakeExecutor() + .expect(CName.GET_CURRENT_URL) + .andReturnSuccess(original) + .end(); + let driver = executor.createDriver(); + return driver.getCurrentUrl().then(function(got) { + assert.deepEqual(got, want); + }); + } + + it('primitives', function() { + return Promise.all([ + runDeserializeTest(1, 1), + runDeserializeTest('', ''), + runDeserializeTest(true, true), + runDeserializeTest(undefined, undefined), + runDeserializeTest(null, null) + ]); + }); + + it('simple object', function() { + return runDeserializeTest( + {sessionId: 'foo'}, + {sessionId: 'foo'}); + }); + + it('nested object', function() { + return runDeserializeTest( + {'foo': {'bar': 123}}, + {'foo': {'bar': 123}}); + }); + + it('array', function() { + return runDeserializeTest( + [{'foo': {'bar': 123}}], + [{'foo': {'bar': 123}}]); + }); + + it('passes through function properties', function() { + function bar() {} + return runDeserializeTest( + [{foo: {'bar': 123}, func: bar}], + [{foo: {'bar': 123}, func: bar}]); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/logging_test.js b/test-eol-project/node_modules/selenium-webdriver/test/logging_test.js new file mode 100644 index 00000000..54687971 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/logging_test.js @@ -0,0 +1,167 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var Browser = require('..').Browser, + By = require('..').By, + logging = require('..').logging, + assert = require('../testing/assert'), + test = require('../lib/test'); + +test.suite(function(env) { + // Logging API has numerous issues with PhantomJS: + // - does not support adjusting log levels for type "browser". + // - does not return proper log level for "browser" messages. + // - does not delete logs after retrieval + // Logging API is not supported in IE. + // Logging API not supported in Marionette. + // Tests depend on opening data URLs, which is broken in Safari (issue 7586) + test.ignore(env.browsers( + Browser.PHANTOM_JS, Browser.IE, Browser.SAFARI, Browser.FIREFOX)). + describe('logging', function() { + var driver; + + test.beforeEach(function() { + driver = null; + }); + + test.afterEach(function*() { + if (driver) { + return driver.quit(); + } + }); + + test.it('can be disabled', function*() { + var prefs = new logging.Preferences(); + prefs.setLevel(logging.Type.BROWSER, logging.Level.OFF); + + driver = yield env.builder() + .setLoggingPrefs(prefs) + .build(); + + yield driver.get(dataUrl( + '')); + return driver.manage().logs().get(logging.Type.BROWSER) + .then(entries => assert(entries.length).equalTo(0)); + }); + + // Firefox does not capture JS error console log messages. + test.ignore(env.browsers(Browser.FIREFOX, 'legacy-firefox')). + it('can be turned down', function*() { + var prefs = new logging.Preferences(); + prefs.setLevel(logging.Type.BROWSER, logging.Level.SEVERE); + + driver = yield env.builder() + .setLoggingPrefs(prefs) + .build(); + + yield driver.get(dataUrl( + '')); + return driver.manage().logs().get(logging.Type.BROWSER) + .then(function(entries) { + assert(entries.length).equalTo(1); + assert(entries[0].level.name).equalTo('SEVERE'); + assert(entries[0].message).matches(/.*\"?and this is an error\"?/); + }); + }); + + // Firefox does not capture JS error console log messages. + test.ignore(env.browsers(Browser.FIREFOX, 'legacy-firefox')). + it('can be made verbose', function*() { + var prefs = new logging.Preferences(); + prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); + + driver = yield env.builder() + .setLoggingPrefs(prefs) + .build(); + + yield driver.get(dataUrl( + '')); + return driver.manage().logs().get(logging.Type.BROWSER) + .then(function(entries) { + assert(entries.length).equalTo(3); + assert(entries[0].level.name).equalTo('DEBUG'); + assert(entries[0].message).matches(/.*\"?hello\"?/); + + assert(entries[1].level.name).equalTo('WARNING'); + assert(entries[1].message).matches(/.*\"?this is a warning\"?/); + + assert(entries[2].level.name).equalTo('SEVERE'); + assert(entries[2].message).matches(/.*\"?and this is an error\"?/); + }); + }); + + // Firefox does not capture JS error console log messages. + test.ignore(env.browsers(Browser.FIREFOX, 'legacy-firefox')). + it('clears records after retrieval', function*() { + var prefs = new logging.Preferences(); + prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); + + driver = yield env.builder() + .setLoggingPrefs(prefs) + .build(); + + yield driver.get(dataUrl( + '')); + yield driver.manage().logs().get(logging.Type.BROWSER) + .then(entries => assert(entries.length).equalTo(3)); + return driver.manage().logs().get(logging.Type.BROWSER) + .then(entries => assert(entries.length).equalTo(0)); + }); + + test.it('does not mix log types', function*() { + var prefs = new logging.Preferences(); + prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); + prefs.setLevel(logging.Type.DRIVER, logging.Level.SEVERE); + + driver = yield env.builder() + .setLoggingPrefs(prefs) + .build(); + + yield driver.get(dataUrl( + '')); + return driver.manage().logs().get(logging.Type.DRIVER) + .then(entries => assert(entries.length).equalTo(0)); + }); + }); + + function dataUrl(var_args) { + return 'data:text/html,' + + Array.prototype.slice.call(arguments, 0).join(''); + } +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js b/test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js new file mode 100644 index 00000000..88c52c06 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js @@ -0,0 +1,60 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'); + +var net = require('../../net'); + +describe('net.splitHostAndPort', function() { + it('hostname with no port', function() { + assert.deepEqual( + net.splitHostAndPort('www.example.com'), + {host: 'www.example.com', port: null}); + }); + + it('hostname with port', function() { + assert.deepEqual( + net.splitHostAndPort('www.example.com:80'), + {host: 'www.example.com', port: 80}); + }); + + it('IPv4 with no port', function() { + assert.deepEqual( + net.splitHostAndPort('127.0.0.1'), + {host: '127.0.0.1', port: null}); + }); + + it('IPv4 with port', function() { + assert.deepEqual( + net.splitHostAndPort('127.0.0.1:1234'), + {host: '127.0.0.1', port: 1234}); + }); + + it('IPv6 with no port', function() { + assert.deepEqual( + net.splitHostAndPort('1234:0:1000:5768:1234:5678:90'), + {host: '1234:0:1000:5768:1234:5678:90', port: null}); + }); + + it('IPv6 with port', function() { + assert.deepEqual( + net.splitHostAndPort('[1234:0:1000:5768:1234:5678:90]:1234'), + {host: '1234:0:1000:5768:1234:5678:90', port: 1234}); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js b/test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js new file mode 100644 index 00000000..668c4ae0 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js @@ -0,0 +1,128 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const net = require('net'); + +const portprober = require('../../net/portprober'); + +describe('isFree', function() { + + var server; + + beforeEach(function() { + server = net.createServer(function(){}); + }) + + afterEach(function(done) { + if (!server) return done(); + server.close(function() { + done(); + }); + }); + + it('should work for INADDR_ANY', function(done) { + server.listen(0, function() { + var port = server.address().port; + assertPortNotfree(port).then(function() { + return new Promise(resolve => { + server.close(function() { + server = null; + resolve(assertPortIsFree(port)); + }); + }); + }).then(function() { done(); }, done); + }); + }); + + it('should work for a specific host', function(done) { + var host = '127.0.0.1'; + server.listen(0, host, function() { + var port = server.address().port; + assertPortNotfree(port, host).then(function() { + return new Promise(resolve => { + server.close(function() { + server = null; + resolve(assertPortIsFree(port, host)); + }); + }); + }).then(function() { done(); }, done); + }); + }); +}); + +describe('findFreePort', function() { + var server; + + beforeEach(function() { + server = net.createServer(function(){}); + }) + + afterEach(function(done) { + if (!server) return done(); + server.close(function() { + done(); + }); + }); + + it('should work for INADDR_ANY', function(done) { + portprober.findFreePort().then(function(port) { + server.listen(port, function() { + assertPortNotfree(port).then(function() { + return new Promise(resolve => { + server.close(function() { + server = null; + resolve(assertPortIsFree(port)); + }); + }); + }).then(function() { done(); }, done); + }); + }); + }); + + it('should work for a specific host', function(done) { + var host = '127.0.0.1'; + portprober.findFreePort(host).then(function(port) { + server.listen(port, host, function() { + assertPortNotfree(port, host).then(function() { + return new Promise(resolve => { + server.close(function() { + server = null; + resolve(assertPortIsFree(port, host)); + }); + }); + }).then(function() { done(); }, done); + }); + }); + }); +}); + + +function assertPortIsFree(port, opt_host) { + return portprober.isFree(port, opt_host).then(function(free) { + assert.ok(free, 'port should be free'); + }); +} + + +function assertPortNotfree(port, opt_host) { + return portprober.isFree(port, opt_host).then(function(free) { + assert.ok(!free, 'port should is not free'); + }); +} diff --git a/test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js b/test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js new file mode 100644 index 00000000..f4c3470c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js @@ -0,0 +1,166 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var Browser = require('..').Browser, + By = require('..').By, + until = require('..').until, + assert = require('../testing/assert'), + error = require('../lib/error'), + test = require('../lib/test'), + Pages = test.Pages; + + +test.suite(function(env) { + var browsers = env.browsers; + + var driver; + test.before(function*() { + driver = yield env.builder().build(); + }); + + test.beforeEach(function*() { + if (!driver) { + driver = yield env.builder().build(); + } + }); + + test.after(function() { + if (driver) { + return driver.quit(); + } + }); + + test.it('should wait for document to be loaded', function*() { + yield driver.get(Pages.simpleTestPage); + return assert(driver.getTitle()).equalTo('Hello WebDriver'); + }); + + test.it('should follow redirects sent in the http response headers', + function*() { + yield driver.get(Pages.redirectPage); + return assert(driver.getTitle()).equalTo('We Arrive Here'); + }); + + // Skip Firefox; see https://bugzilla.mozilla.org/show_bug.cgi?id=1280300 + test.ignore(browsers(Browser.FIREFOX)). + it('should be able to get a fragment on the current page', function*() { + yield driver.get(Pages.xhtmlTestPage); + yield driver.get(Pages.xhtmlTestPage + '#text'); + yield driver.findElement(By.id('id1')); + }); + + test.ignore(browsers(Browser.IPAD, Browser.IPHONE)). + it('should wait for all frames to load in a frameset', function*() { + yield driver.get(Pages.framesetPage); + yield driver.switchTo().frame(0); + + let txt = yield driver.findElement(By.css('span#pageNumber')).getText(); + assert(txt.trim()).equalTo('1'); + + yield driver.switchTo().defaultContent(); + yield driver.switchTo().frame(1); + txt = yield driver.findElement(By.css('span#pageNumber')).getText(); + + assert(txt.trim()).equalTo('2'); + }); + + test.ignore(browsers(Browser.SAFARI)). + it('should be able to navigate back in browser history', function*() { + yield driver.get(Pages.formPage); + + yield driver.findElement(By.id('imageButton')).click(); + yield driver.wait(until.titleIs('We Arrive Here'), 2500); + + yield driver.navigate().back(); + yield driver.wait(until.titleIs('We Leave From Here'), 2500); + }); + + test.ignore(browsers(Browser.SAFARI)). + it('should be able to navigate back in presence of iframes', function*() { + yield driver.get(Pages.xhtmlTestPage); + + yield driver.findElement(By.name('sameWindow')).click(); + yield driver.wait(until.titleIs('This page has iframes'), 2500); + + yield driver.navigate().back(); + yield driver.wait(until.titleIs('XHTML Test Page'), 2500); + }); + + test.ignore(browsers(Browser.SAFARI)). + it('should be able to navigate forwards in browser history', function*() { + yield driver.get(Pages.formPage); + + yield driver.findElement(By.id('imageButton')).click(); + yield driver.wait(until.titleIs('We Arrive Here'), 5000); + + yield driver.navigate().back(); + yield driver.wait(until.titleIs('We Leave From Here'), 5000); + + yield driver.navigate().forward(); + yield driver.wait(until.titleIs('We Arrive Here'), 5000); + }); + + // PhantomJS 2.0 does not properly reload pages on refresh. + test.ignore(browsers(Browser.PHANTOM_JS)). + it('should be able to refresh a page', function*() { + yield driver.get(Pages.xhtmlTestPage); + + yield driver.navigate().refresh(); + + yield assert(driver.getTitle()).equalTo('XHTML Test Page'); + }); + + test.it('should return title of page if set', function*() { + yield driver.get(Pages.xhtmlTestPage); + yield assert(driver.getTitle()).equalTo('XHTML Test Page'); + + yield driver.get(Pages.simpleTestPage); + yield assert(driver.getTitle()).equalTo('Hello WebDriver'); + }); + + describe('timeouts', function() { + test.afterEach(function() { + let nullDriver = () => driver = null; + if (driver) { + return driver.quit().then(nullDriver, nullDriver); + } + }); + + // Only implemented in Firefox. + test.ignore(browsers( + Browser.CHROME, + Browser.IE, + Browser.IPAD, + Browser.IPHONE, + Browser.OPERA, + Browser.PHANTOM_JS)). + it('should timeout if page load timeout is set', function*() { + yield driver.manage().timeouts().pageLoadTimeout(1); + return driver.get(Pages.sleepingPage + '?time=3') + .then(function() { + throw Error('Should have timed out on page load'); + }, function(e) { + if (!(e instanceof error.ScriptTimeoutError) + && !(e instanceof error.TimeoutError)) { + throw Error('Unexpected error response: ' + e); + } + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js b/test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js new file mode 100644 index 00000000..8b7a99f8 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js @@ -0,0 +1,59 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'); +var path = require('path'); +var test = require('../../lib/test'); + +test.suite(function(env) { + var driver; + + test.before(function*() { + driver = yield env.builder().build(); + }); + + test.after(function() { + return driver.quit(); + }); + + var testPageUrl = + 'data:text/html,

    ' + path.basename(__filename) + '

    '; + + test.beforeEach(function() { + return driver.get(testPageUrl); + }); + + describe('phantomjs.Driver', function() { + describe('#executePhantomJS()', function() { + + test.it('can execute scripts using PhantomJS API', function*() { + let url = yield driver.executePhantomJS('return this.url;'); + assert.equal(testPageUrl, decodeURIComponent(url)); + }); + + test.it('can execute scripts as functions', function*() { + let result = yield driver.executePhantomJS(function(a, b) { + return a + b; + }, 1, 2); + + assert.equal(3, result); + }); + }); + }); +}, {browsers: ['phantomjs']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js b/test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js new file mode 100644 index 00000000..442ff606 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js @@ -0,0 +1,180 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var http = require('http'), + url = require('url'); + +var Browser = require('..').Browser, + promise = require('..').promise, + firefox = require('../firefox'), + proxy = require('../proxy'), + assert = require('../testing/assert'), + test = require('../lib/test'), + Server = require('../lib/test/httpserver').Server, + Pages = test.Pages; + +test.suite(function(env) { + function writeResponse(res, body, encoding, contentType) { + res.writeHead(200, { + 'Content-Length': Buffer.byteLength(body, encoding), + 'Content-Type': contentType + }); + res.end(body); + } + + function writePacFile(res) { + writeResponse(res, [ + 'function FindProxyForURL(url, host) {', + ' if (shExpMatch(url, "' + goodbyeServer.url('*') + '")) {', + ' return "DIRECT";', + ' }', + ' return "PROXY ' + proxyServer.host() + '";', + '}' + ].join('\n'), 'ascii', 'application/x-javascript-config'); + } + + var proxyServer = new Server(function(req, res) { + var pathname = url.parse(req.url).pathname; + if (pathname === '/proxy.pac') { + return writePacFile(res); + } + + writeResponse(res, [ + '', + 'Proxy page', + '

    This is the proxy landing page

    ' + ].join(''), 'utf8', 'text/html; charset=UTF-8'); + }); + + var helloServer = new Server(function(req, res) { + writeResponse(res, [ + '', + 'Hello', + '

    Hello, world!

    ' + ].join(''), 'utf8', 'text/html; charset=UTF-8'); + }); + + var goodbyeServer = new Server(function(req, res) { + writeResponse(res, [ + '', + 'Goodbye', + '

    Goodbye, world!

    ' + ].join(''), 'utf8', 'text/html; charset=UTF-8'); + }); + + // Cannot pass start directly to mocha's before, as mocha will interpret the optional + // port parameter as an async callback parameter. + function mkStartFunc(server) { + return function() { + return server.start(); + }; + } + + test.before(mkStartFunc(proxyServer)); + test.before(mkStartFunc(helloServer)); + test.before(mkStartFunc(goodbyeServer)); + + test.after(proxyServer.stop.bind(proxyServer)); + test.after(helloServer.stop.bind(helloServer)); + test.after(goodbyeServer.stop.bind(goodbyeServer)); + + var driver; + test.beforeEach(function() { driver = null; }); + test.afterEach(function() { return driver && driver.quit(); }); + + function createDriver(proxy) { + // For Firefox we need to explicitly enable proxies for localhost by + // clearing the network.proxy.no_proxies_on preference. + let profile = new firefox.Profile(); + profile.setPreference('network.proxy.no_proxies_on', ''); + + return driver = env.builder() + .setFirefoxOptions(new firefox.Options().setProfile(profile)) + .setProxy(proxy) + .build(); + } + + // Proxy support not implemented. + test.ignore(env.browsers(Browser.IE, Browser.OPERA, Browser.SAFARI)). + describe('manual proxy settings', function() { + // phantomjs 1.9.1 in webdriver mode does not appear to respect proxy + // settings. + test.ignore(env.browsers(Browser.PHANTOM_JS)). + it('can configure HTTP proxy host', function*() { + yield createDriver(proxy.manual({ + http: proxyServer.host() + })); + + yield driver.get(helloServer.url()); + yield assert(driver.getTitle()).equalTo('Proxy page'); + yield assert(driver.findElement({tagName: 'h3'}).getText()). + equalTo('This is the proxy landing page'); + }); + + // PhantomJS does not support bypassing the proxy for individual hosts. + // geckodriver does not support the bypass option, this must be configured + // through profile preferences. + test.ignore(env.browsers( + Browser.FIREFOX, + 'legacy-' + Browser.FIREFOX, + Browser.PHANTOM_JS)). + it('can bypass proxy for specific hosts', function*() { + yield createDriver(proxy.manual({ + http: proxyServer.host(), + bypass: helloServer.host() + })); + + yield driver.get(helloServer.url()); + yield assert(driver.getTitle()).equalTo('Hello'); + yield assert(driver.findElement({tagName: 'h3'}).getText()). + equalTo('Hello, world!'); + + yield driver.get(goodbyeServer.url()); + yield assert(driver.getTitle()).equalTo('Proxy page'); + yield assert(driver.findElement({tagName: 'h3'}).getText()). + equalTo('This is the proxy landing page'); + }); + + // TODO: test ftp and https proxies. + }); + + // PhantomJS does not support PAC file proxy configuration. + // Safari does not support proxies. + test.ignore(env.browsers( + Browser.IE, Browser.OPERA, Browser.PHANTOM_JS, Browser.SAFARI)). + describe('pac proxy settings', function() { + test.it('can configure proxy through PAC file', function*() { + yield createDriver(proxy.pac(proxyServer.url('/proxy.pac'))); + + yield driver.get(helloServer.url()); + yield assert(driver.getTitle()).equalTo('Proxy page'); + yield assert(driver.findElement({tagName: 'h3'}).getText()). + equalTo('This is the proxy landing page'); + + yield driver.get(goodbyeServer.url()); + yield assert(driver.getTitle()).equalTo('Goodbye'); + yield assert(driver.findElement({tagName: 'h3'}).getText()). + equalTo('Goodbye, world!'); + }); + }); + + // TODO: figure out how to test direct and system proxy settings. + describe.skip('direct proxy settings', function() {}); + describe.skip('system proxy settings', function() {}); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/rect_test.js b/test-eol-project/node_modules/selenium-webdriver/test/rect_test.js new file mode 100644 index 00000000..e5ea3652 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/rect_test.js @@ -0,0 +1,60 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); + +const {By} = require('..'); +const test = require('../lib/test'); + +test.suite(function(env) { + describe('rect commands', function() { + let driver; + let el; + + test.before(function*() { + driver = yield env.builder().build(); + yield driver.get( + 'data:text/html,
    Hello
    '); + el = yield driver.findElement(By.css('div')); + }); + + after(function() { + if (driver) { + return driver.quit(); + } + }); + + test.it('WebElement.getLocation()', function*() { + let location = yield el.getLocation(); + assert.equal(location.x, 50); + assert.equal(location.y, 50); + }); + + test.it('WebElement.getSize()', function*() { + let size = yield el.getSize(); + assert.equal(size.width, 50); + assert.equal(size.height, 50); + }); + + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/remote_test.js b/test-eol-project/node_modules/selenium-webdriver/test/remote_test.js new file mode 100644 index 00000000..4c18398c --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/remote_test.js @@ -0,0 +1,117 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var assert = require('assert'), + fs = require('fs'), + path = require('path'); + +var promise = require('../').promise, + io = require('../io'), + cmd = require('../lib/command'), + remote = require('../remote'); + +const {enablePromiseManager} = require('../lib/test/promise'); + +describe('DriverService', function() { + describe('start()', function() { + var service; + + beforeEach(function() { + service = new remote.DriverService(process.execPath, { + port: 1234, + args: ['-e', 'process.exit(1)'] + }); + }); + + afterEach(function() { + return service.kill(); + }); + + it('fails if child-process dies', function() { + this.timeout(1000); + return service.start(500).then(expectFailure, verifyFailure); + }); + + enablePromiseManager(function() { + describe( + 'failures propagate through control flow if child-process dies', + function() { + it('', function() { + this.timeout(1000); + + return promise.controlFlow().execute(function() { + promise.controlFlow().execute(function() { + return service.start(500); + }); + }).then(expectFailure, verifyFailure); + }); + }); + }); + + function verifyFailure(e) { + assert.ok(!(e instanceof promise.CancellationError)); + assert.equal('Server terminated early with status 1', e.message); + } + + function expectFailure() { + throw Error('expected to fail'); + } + }); +}); + +describe('FileDetector', function() { + class ExplodingDriver { + schedule() { + throw Error('unexpected call'); + } + } + + it('returns the original path if the file does not exist', function() { + return io.tmpDir().then(dir => { + let theFile = path.join(dir, 'not-there'); + return (new remote.FileDetector) + .handleFile(new ExplodingDriver, theFile) + .then(f => assert.equal(f, theFile)); + }); + }); + + it('returns the original path if it is a directory', function() { + return io.tmpDir().then(dir => { + return (new remote.FileDetector) + .handleFile(new ExplodingDriver, dir) + .then(f => assert.equal(f, dir)); + }); + }); + + it('attempts to upload valid files', function() { + return io.tmpFile().then(theFile => { + return (new remote.FileDetector) + .handleFile( + new (class FakeDriver { + schedule(command) { + assert.equal(command.getName(), cmd.Name.UPLOAD_FILE); + assert.equal(typeof command.getParameters()['file'], 'string'); + return Promise.resolve('success!'); + } + }), + theFile) + .then(f => assert.equal(f, 'success!')); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/safari_test.js b/test-eol-project/node_modules/selenium-webdriver/test/safari_test.js new file mode 100644 index 00000000..6032b865 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/safari_test.js @@ -0,0 +1,108 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const webdriver = require('..'), + proxy = require('../proxy'), + safari = require('../safari'), + assert = require('../testing/assert'), + test = require('../lib/test'); + + +describe('safari.Options', function() { + describe('fromCapabilities', function() { + it('returns a new Options instance if none were defined', function() { + let options = safari.Options.fromCapabilities( + new webdriver.Capabilities()); + assert(options).instanceOf(safari.Options); + }); + + it('returns the options instance if present', function() { + let options = new safari.Options().setCleanSession(true), + caps = options.toCapabilities(); + assert(safari.Options.fromCapabilities(caps)).equalTo(options); + }); + + it('extracts supported WebDriver capabilities', function() { + let proxyPrefs = proxy.direct(), + logPrefs = {}, + caps = webdriver.Capabilities.chrome() + .set(webdriver.Capability.PROXY, proxyPrefs) + .set(webdriver.Capability.LOGGING_PREFS, logPrefs); + + let options = safari.Options.fromCapabilities(caps); + assert(options.proxy_).equalTo(proxyPrefs); + assert(options.logPrefs_).equalTo(logPrefs); + }); + }); + + describe('toCapabilities', function() { + let options; + + before(function() { + options = new safari.Options() + .setCleanSession(true); + }); + + it('returns a new capabilities object if one is not provided', function() { + let caps = options.toCapabilities(); + assert(caps).instanceOf(webdriver.Capabilities); + assert(caps.get('browserName')).equalTo('safari'); + assert(caps.get('safari.options')).equalTo(options); + }); + + it('adds to input capabilities object', function() { + let caps = webdriver.Capabilities.safari(); + assert(options.toCapabilities(caps)).equalTo(caps); + assert(caps.get('safari.options')).equalTo(options); + }); + + it('sets generic driver capabilities', function() { + let proxyPrefs = proxy.direct(), + loggingPrefs = {}; + + options + .setLoggingPrefs(loggingPrefs) + .setProxy(proxyPrefs); + + let caps = options.toCapabilities(); + assert(caps.get('proxy')).equalTo(proxyPrefs); + assert(caps.get('loggingPrefs')).equalTo(loggingPrefs); + }); + }); +}); + +test.suite(function(env) { + describe('safaridriver', function() { + let service; + + afterEach(function() { + if (service) { + return service.kill(); + } + }); + + it('can start safaridriver', function() { + service = new safari.ServiceBuilder().build(); + + return service.start().then(function(url) { + assert(url).matches(/127\.0\.0\.1/); + }); + }); + }); +}, {browsers: ['safari']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/session_test.js b/test-eol-project/node_modules/selenium-webdriver/test/session_test.js new file mode 100644 index 00000000..93bc7c88 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/session_test.js @@ -0,0 +1,99 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('../testing/assert'); +const chrome = require('../chrome'); +const edge = require('../edge'); +const firefox = require('../firefox'); +const ie = require('../ie'); +const opera = require('../opera'); +const phantomjs = require('../phantomjs'); +const safari = require('../safari'); +const test = require('../lib/test'); +const {Browser} = require('../lib/capabilities'); +const {Pages} = require('../lib/test'); +const {WebDriver} = require('..'); + + +test.suite(function(env) { + var browsers = env.browsers; + + const BROWSER_MAP = new Map([ + [Browser.CHROME, chrome.Driver], + [Browser.EDGE, edge.Driver], + [Browser.FIREFOX, firefox.Driver], + [Browser.INTERNET_EXPLORER, ie.Driver], + [Browser.OPERA, opera.Driver], + [Browser.PHANTOM_JS, phantomjs.Driver], + [Browser.SAFARI, safari.Driver], + ]); + + if (BROWSER_MAP.has(env.currentBrowser())) { + describe('builder creates thenable driver instances', function() { + let driver; + + after(() => driver && driver.quit()); + + it(env.currentBrowser(), function() { + driver = env.builder().build(); + + const want = BROWSER_MAP.get(env.currentBrowser()); + assert(driver).instanceOf(want, + `want ${want.name}, but got ${driver.name}`); + assert(typeof driver.then).equalTo('function'); + + return driver + .then( + d => assert(d) + .instanceOf(want, `want ${want.name}, but got ${d.name}`)) + // Load something so the safari driver doesn't crash from starting and + // stopping in short time. + .then(() => driver.get(Pages.echoPage)); + }); + }); + } + + describe('session management', function() { + var driver; + test.before(function*() { + driver = yield env.builder().build(); + }); + + test.after(function() { + return driver.quit(); + }); + + test.it('can connect to an existing session', function*() { + yield driver.get(Pages.simpleTestPage); + yield assert(driver.getTitle()).equalTo('Hello WebDriver'); + + return driver.getSession().then(session1 => { + let driver2 = WebDriver.attachToSession( + driver.getExecutor(), + session1.getId()); + + return assert(driver2.getTitle()).equalTo('Hello WebDriver') + .then(_ => { + let session2Id = driver2.getSession().then(s => s.getId()); + return assert(session2Id).equalTo(session1.getId()); + }); + }); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js b/test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js new file mode 100644 index 00000000..d00b5d44 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js @@ -0,0 +1,63 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fail = require('assert').fail; + +var Browser = require('..').Browser, + By = require('..').By, + error = require('..').error, + until = require('..').until, + assert = require('../testing/assert'), + test = require('../lib/test'), + Pages = test.Pages; + + +test.suite(function(env) { + var driver; + test.before(function*() { driver = yield env.builder().build(); }); + test.after(function() { return driver.quit(); }); + + // Element never goes stale in Safari. + test.ignore(env.browsers(Browser.SAFARI)). + it( + 'dynamically removing elements from the DOM trigger a ' + + 'StaleElementReferenceError', + function*() { + yield driver.get(Pages.javascriptPage); + + var toBeDeleted = yield driver.findElement(By.id('deleted')); + yield assert(toBeDeleted.getTagName()).isEqualTo('p'); + + yield driver.findElement(By.id('delete')).click(); + yield driver.wait(until.stalenessOf(toBeDeleted), 5000); + }); + + test.it('an element found in a different frame is stale', function*() { + yield driver.get(Pages.missedJsReferencePage); + + var frame = yield driver.findElement(By.css('iframe[name="inner"]')); + yield driver.switchTo().frame(frame); + + var el = yield driver.findElement(By.id('oneline')); + yield driver.switchTo().defaultContent(); + return el.getText().then(fail, function(e) { + assert(e).instanceOf(error.StaleElementReferenceError); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js b/test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js new file mode 100644 index 00000000..b934e6bb --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js @@ -0,0 +1,36 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var By = require('..').By, + assert = require('../testing/assert'), + test = require('../lib/test'); + + +test.suite(function(env) { + var driver; + test.after(function() { return driver.quit(); }); + + test.it('should return lower case tag name', function*() { + driver = yield env.builder().build(); + yield driver.get(test.Pages.formPage); + + let el = yield driver.findElement(By.id('cheese')); + return assert(el.getTagName()).equalTo('input'); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js b/test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js new file mode 100644 index 00000000..eaced8bf --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js @@ -0,0 +1,373 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('../../testing/assert'); + +const AssertionError = require('assert').AssertionError; +const assertTrue = require('assert').ok; +const assertEqual = require('assert').equal; +const assertThrows = require('assert').throws; +const fail = require('assert').fail; + + +describe('assert', function() { + describe('atLeast', function() { + it('compares subject >= value', function() { + assert(1).atLeast(0); + assert(1).atLeast(1); + assertThrows(() => assert(1).atLeast(2)); + }); + + it('accepts failure message', function() { + assertThrows( + () => assert(1).atLeast(2, 'hi there!'), + (error) => error.message.indexOf('hi there') != -1); + }); + + it('fails if given a non-numeric subject', function() { + assertThrows(() => assert('a').atLeast(1)); + }); + + it('fails if given a non-numeric bound', function() { + assertThrows(() => assert(1).atLeast('a')); + }); + + it('waits for promised subject', function() { + return assert(Promise.resolve(123)).atLeast(100); + }); + + it('waits for promised subject (with failure)', function() { + return assert(Promise.resolve(100)) + .atLeast(123) + .then(() => fail('should have failed'), function(e) { + assertInstanceOf(AssertionError, e); + assertEqual('100 >= 123', e.message); + }); + }); + }); + + describe('atMost', function() { + it('compares subject <= value', function() { + assertThrows(() => assert(1).atMost(0)); + assert(1).atMost(1); + assert(1).atMost(2); + }); + + it('accepts failure message', function() { + assertThrows( + () => assert(1).atMost(0, 'hi there!'), + (error) => error.message.indexOf('hi there!') != -1); + }); + + it('fails if given a non-numeric subject', function() { + assertThrows(() => assert(1).atMost('a')); + }); + + it('fails if given a non-numeric bound', function() { + assertThrows(() => assert('a').atMost(1)); + }); + + it('waits for promised subject', function() { + return assert(Promise.resolve(100)).atMost(123); + }); + + it('waits for promised subject (with failure)', function() { + return assert(Promise.resolve(123)) + .atMost(100) + .then(() => fail('should have failed'), function(e) { + assertInstanceOf(AssertionError, e); + assertEqual('123 <= 100', e.message); + }); + }); + }); + + describe('greaterThan', function() { + it('compares subject > value', function() { + assertThrows(() => assert(1).greaterThan(1)); + assertThrows(() => assert(1).greaterThan(2)); + assert(2).greaterThan(1); + }); + + it('accepts failure message', function() { + assertThrows( + () => assert(0).greaterThan(1, 'hi there!'), + (error) => error.message.indexOf('hi there!') != -1); + }); + + it('fails if given a non-numeric subject', function() { + assertThrows(() => assert('a').atMost(1)); + }); + + it('fails if given a non-numeric bound', function() { + assertThrows(() => assert(1).atMost('a')); + }); + + it('waits for promised subject', function() { + return assert(Promise.resolve(123)).greaterThan(100); + }); + + it('waits for promised subject (with failure)', function() { + return assert(Promise.resolve(100)) + .greaterThan(123) + .then(() => fail('should have failed'), function(e) { + assertInstanceOf(AssertionError, e); + assertEqual('100 > 123', e.message); + }); + }); + }); + + describe('lessThan', function() { + it('compares subject < value', function() { + assertThrows(() => assert(1).lessThan(0)); + assertThrows(() => assert(1).lessThan(1)); + assert(1).lessThan(2); + }); + + it('accepts failure message', function() { + assertThrows( + () => assert(1).lessThan(0, 'hi there!'), + (error) => error.message.indexOf('hi there!') != -1); + }); + + it('fails if given a non-numeric subject', function() { + assertThrows(() => assert('a').lessThan(1)); + }); + + it('fails if given a non-numeric bound', function() { + assertThrows(() => assert(1).lessThan('a')); + }); + + it('waits for promised subject', function() { + return assert(Promise.resolve(100)).lessThan(123); + }); + + it('waits for promised subject (with failure)', function() { + return assert(Promise.resolve(123)) + .lessThan(100) + .then(() => fail('should have failed'), function(e) { + assertInstanceOf(AssertionError, e); + assertEqual('123 < 100', e.message); + }); + }); + }); + + describe('closeTo', function() { + it('accepts values within epislon of target', function() { + assert(123).closeTo(123, 0); + assert(123).closeTo(124, 1); + assert(125).closeTo(124, 1); + + assertThrows(() => assert(123).closeTo(125, .1)); + assertThrows(() => assert(1./3).closeTo(.8, .01)); + }); + + it('waits for promised values', function() { + let p = new Promise(resolve => setTimeout(() => resolve(123), 10)); + return assert(p).closeTo(124, 1); + }); + }); + + describe('instanceOf', function() { + it('works with direct instances', function() { + assert(Error('foo')).instanceOf(Error); + }); + + it('works with sub-types', function() { + assert(TypeError('foo')).instanceOf(Error); + }); + + it('parent types are not instances of sub-types', function() { + assertThrows(() => assert(Error('foo')).instanceOf(TypeError)); + }); + }); + + describe('isNull', function() { + it('normal case', function() { + assert(null).isNull(); + assertThrows(() => assert(1).isNull()); + }); + + it('handles promised values', function() { + let p = new Promise(function(f) { + setTimeout(() => f(null), 10); + }); + return assert(p).isNull(); + }); + + it('does not match on undefined', function() { + assertThrows(() => assert(void(0)).isNull()); + }) + }); + + describe('isUndefined', function() { + it('normal case', function() { + assert(void(0)).isUndefined(); + assertThrows(() => assert(1).isUndefined()); + }); + + it('handles promised values', function() { + let p = new Promise(function(f) { + setTimeout(() => f(void(0)), 10); + }); + return assert(p).isUndefined(); + }); + + it('does not match on null', function() { + assertThrows(() => assert(null).isUndefined()); + }) + }); + + describe('contains', function() { + it('works with strings', function() { + assert('abc').contains('a'); + assert('abc').contains('ab'); + assert('abc').contains('abc'); + assert('abc').contains('bc'); + assert('abc').contains('c'); + assertThrows(() => assert('abc').contains('d')); + }); + + it('works with arrays', function() { + assert([1, 2, 3]).contains(1); + assert([1, 2, 3]).contains(2); + assert([1, 2, 3]).contains(3); + assertThrows(() => assert([1, 2]).contains(3)); + }); + + it('works with maps', function() { + let m = new Map; + m.set(1, 2); + assert(m).contains(1); + assertThrows(() => assert(m).contains(2)); + }); + + it('works with sets', function() { + let s = new Set; + s.add(1); + assert(s).contains(1); + assertThrows(() => assert(s).contains(2)); + }); + + it('requires an array, string, map, or set subject', function() { + assertThrows(() => assert(123).contains('a')); + }); + }); + + describe('endsWith', function() { + it('works', function() { + assert('abc').endsWith('abc'); + assert('abc').endsWith('bc'); + assert('abc').endsWith('c'); + assertThrows(() => assert('abc').endsWith('d')); + }) + }); + + describe('startsWith', function() { + it('works', function() { + assert('abc').startsWith('abc'); + assert('abc').startsWith('ab'); + assert('abc').startsWith('a'); + assertThrows(() => assert('abc').startsWith('d')); + }) + }); + + describe('matches', function() { + it('requires a regex value', function() { + assertThrows(() => assert('abc').matches(1234)); + }); + + it('requires a string value', function() { + assertThrows(() => assert(1234).matches(/abc/)); + }); + + it('requires a string value (promise case)', function() { + return assert(Promise.resolve(1234)) + .matches(/abc/) + .then(fail, function(error) { + assertEqual( + 'Expected a string matching /abc/, got <1234> (number)', + error.message); + }); + }); + + it('applies regex', function() { + assert('abc').matches(/abc/); + assertThrows(() => assert('def').matches(/abc/)); + }); + }); + + describe('isTrue', function() { + it('only accepts booleans', function() { + assertThrows(() => assert(123).isTrue()); + }); + + it('accepts true values', function() { + assert(true).isTrue(); + assert(Boolean('abc')).isTrue(); + return assert(Promise.resolve(true)).isTrue(); + }); + + it('rejects false values', function() { + assertThrows(() => assert(false).isTrue()); + assertThrows(() => assert(Boolean(0)).isTrue()); + return assert(Promise.resolve(false)).isTrue() + .then(fail, function() {/*no-op, ok*/}); + }); + }); + + describe('isFalse', function() { + it('only accepts booleans', function() { + assertThrows(() => assert(123).isFalse()); + }) + + it('accepts false values', function() { + assert(false).isFalse(); + assert(Boolean('')).isFalse(); + return assert(Promise.resolve(false)).isFalse(); + }); + + it('rejects true values', function() { + assertThrows(() => assert(true).isFalse()); + assertThrows(() => assert(Boolean(1)).isFalse()); + return assert(Promise.resolve(true)).isFalse() + .then(fail, function() {/*no-op, ok*/}); + }); + }); + + describe('isEqualTo', function() { + it('is strict equality', function() { + assert('abc').isEqualTo('abc'); + assert('abc').equals('abc'); + assert('abc').equalTo('abc'); + assertThrows(() => assert('1').isEqualTo(1)); + }); + }); + + describe('notEqualTo', function() { + it('tests strict equality', function() { + assert('1').notEqualTo(1); + assert(1).notEqualTo('1'); + assertThrows(() => assert('abc').notEqualTo('abc')); + }); + }); + + function assertInstanceOf(ctor, value) { + assertTrue(value instanceof ctor); + } +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js b/test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js new file mode 100644 index 00000000..edc841bb --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js @@ -0,0 +1,224 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +const assert = require('assert'); +const promise = require('../..').promise; +const {enablePromiseManager} = require('../../lib/test/promise'); + + +var test = require('../../testing'); + +describe('Mocha Integration', function() { + + describe('beforeEach properly binds "this"', function() { + beforeEach(function() { this.x = 1; }); + test.beforeEach(function() { this.x = 2; }); + it('', function() { assert.equal(this.x, 2); }); + }); + + describe('afterEach properly binds "this"', function() { + it('', function() { this.x = 1; }); + test.afterEach(function() { this.x = 2; }); + afterEach(function() { assert.equal(this.x, 2); }); + }); + + describe('it properly binds "this"', function() { + beforeEach(function() { this.x = 1; }); + test.it('', function() { this.x = 2; }); + afterEach(function() { assert.equal(this.x, 2); }); + }); + + enablePromiseManager(function() { + describe('timeout handling', function() { + describe('it does not reset the control flow on a non-timeout', function() { + var flowReset = false; + + beforeEach(function() { + flowReset = false; + test.controlFlow().once(promise.ControlFlow.EventType.RESET, onreset); + }); + + test.it('', function() { + this.timeout(100); + return promise.delayed(50); + }); + + afterEach(function() { + assert.ok(!flowReset); + test.controlFlow().removeListener( + promise.ControlFlow.EventType.RESET, onreset); + }); + + function onreset() { + flowReset = true; + } + }); + + describe('it resets the control flow after a timeout' ,function() { + var timeoutErr, flowReset; + + beforeEach(function() { + flowReset = false; + test.controlFlow().once(promise.ControlFlow.EventType.RESET, onreset); + }); + + test.it('', function() { + var callback = this.runnable().callback; + var test = this; + this.runnable().callback = function(err) { + timeoutErr = err; + // Reset our timeout to 0 so Mocha does not fail the test. + test.timeout(0); + // When we invoke the real callback, do not pass along the error so + // Mocha does not fail the test. + return callback.call(this); + }; + + test.timeout(50); + return promise.defer().promise; + }); + + afterEach(function() { + return Promise.resolve().then(function() { + test.controlFlow().removeListener( + promise.ControlFlow.EventType.RESET, onreset); + assert.ok(flowReset, 'control flow was not reset after a timeout'); + }); + }); + + function onreset() { + flowReset = true; + } + }); + }); + + describe('async "done" support', function() { + this.timeout(2*1000); + + var waited = false; + var DELAY = 100; // ms enough to notice + + // Each test asynchronously sets waited to true, so clear/check waited + // before/after: + beforeEach(function() { + waited = false; + }); + + afterEach(function() { + assert.strictEqual(waited, true); + }); + + // --- First, vanilla mocha "it" should support the "done" callback correctly. + + // This 'it' should block until 'done' is invoked + it('vanilla delayed', function(done) { + setTimeout(function delayedVanillaTimeout() { + waited = true; + done(); + }, DELAY); + }); + + // --- Now with the webdriver wrappers for 'it' should support the "done" callback: + + test.it('delayed', function(done) { + assert(done); + assert.strictEqual(typeof done, 'function'); + setTimeout(function delayedTimeoutCallback() { + waited = true; + done(); + }, DELAY); + }); + + // --- And test that the webdriver wrapper for 'it' works with a returned promise, too: + + test.it('delayed by promise', function() { + var defer = promise.defer(); + setTimeout(function delayedPromiseCallback() { + waited = true; + defer.fulfill('ignored'); + }); + return defer.promise; + }); + }); + + describe('ControlFlow and "done" work together', function() { + var flow, order; + before(function() { + order = []; + flow = test.controlFlow(); + flow.execute(function() { order.push(1); }); + }); + + test.it('control flow updates and async done', function(done) { + flow.execute(function() { order.push(2); }); + flow.execute(function() { order.push(3); }).then(function() { + order.push(4); + }); + done(); + }); + + after(function() { + assert.deepEqual([1, 2, 3, 4], order); + }); + }); + }); + + describe('generator support', function() { + let arr; + + beforeEach(() => arr = []); + afterEach(() => assert.deepEqual(arr, [0, 1, 2, 3])); + + test.it('sync generator', function* () { + arr.push(yield arr.length); + arr.push(yield arr.length); + arr.push(yield arr.length); + arr.push(yield arr.length); + }); + + test.it('async generator', function* () { + arr.push(yield Promise.resolve(arr.length)); + arr.push(yield Promise.resolve(arr.length)); + arr.push(yield Promise.resolve(arr.length)); + arr.push(yield Promise.resolve(arr.length)); + }); + + test.it('generator returns promise', function*() { + arr.push(yield Promise.resolve(arr.length)); + arr.push(yield Promise.resolve(arr.length)); + arr.push(yield Promise.resolve(arr.length)); + setTimeout(_ => arr.push(arr.length), 10); + return new Promise((resolve) => setTimeout(_ => resolve(), 25)); + }); + + describe('generator runs with proper "this" context', () => { + before(function() { this.values = [0, 1, 2, 3]; }); + test.it('', function*() { + arr = this.values; + }); + }); + + it('generator function must not take a callback', function() { + arr = [0, 1, 2, 3]; // For teardown hook. + assert.throws(_ => { + test.it('', function*(done){}); + }, TypeError); + }); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/upload_test.js b/test-eol-project/node_modules/selenium-webdriver/test/upload_test.js new file mode 100644 index 00000000..c677550f --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/upload_test.js @@ -0,0 +1,86 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var fs = require('fs'); + +var Browser = require('..').Browser, + By = require('..').By, + until = require('..').until, + io = require('../io'), + remote = require('../remote'), + assert = require('../testing/assert'), + test = require('../lib/test'), + Pages = test.Pages; + +test.suite(function(env) { + var LOREM_IPSUM_TEXT = 'lorem ipsum dolor sit amet'; + var FILE_HTML = '
    ' + LOREM_IPSUM_TEXT + '
    '; + + var fp; + test.before(function() { + return fp = io.tmpFile().then(function(fp) { + fs.writeFileSync(fp, FILE_HTML); + return fp; + }); + }) + + var driver; + test.before(function*() { + driver = yield env.builder().build(); + }); + + test.after(function() { + if (driver) { + return driver.quit(); + } + }); + + test.ignore(env.browsers( + Browser.IPAD, + Browser.IPHONE, + // Uploads broken in PhantomJS 2.0. + // See https://github.com/ariya/phantomjs/issues/12506 + Browser.PHANTOM_JS, + Browser.SAFARI)). + it('can upload files', function*() { + driver.setFileDetector(new remote.FileDetector); + + yield driver.get(Pages.uploadPage); + + var fp = yield driver.call(function() { + return io.tmpFile().then(function(fp) { + fs.writeFileSync(fp, FILE_HTML); + return fp; + }); + }); + + yield driver.findElement(By.id('upload')).sendKeys(fp); + yield driver.findElement(By.id('go')).click(); + + // Uploading files across a network may take a while, even if they're small. + var label = yield driver.findElement(By.id('upload_label')); + yield driver.wait(until.elementIsNotVisible(label), + 10 * 1000, 'File took longer than 10 seconds to upload!'); + + var frame = yield driver.findElement(By.id('upload_target')); + yield driver.switchTo().frame(frame); + yield assert(driver.findElement(By.css('body')).getText()) + .equalTo(LOREM_IPSUM_TEXT); + }); +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/window_test.js b/test-eol-project/node_modules/selenium-webdriver/test/window_test.js new file mode 100644 index 00000000..73cdd802 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/test/window_test.js @@ -0,0 +1,161 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +'use strict'; + +var Browser = require('..').Browser, + By = require('..').By, + assert = require('../testing/assert'), + test = require('../lib/test'); + + +test.suite(function(env) { + var driver; + + test.before(function*() { driver = yield env.builder().build(); }); + test.after(function() { return driver.quit(); }); + + test.beforeEach(function() { + return driver.switchTo().defaultContent(); + }); + + test.it('can set size of the current window', function*() { + yield driver.get(test.Pages.echoPage); + yield changeSizeBy(-20, -20); + }); + + test.it('can set size of the current window from frame', function*() { + yield driver.get(test.Pages.framesetPage); + + var frame = yield driver.findElement({css: 'frame[name="fourth"]'}); + yield driver.switchTo().frame(frame); + yield changeSizeBy(-20, -20); + }); + + test.it('can set size of the current window from iframe', function*() { + yield driver.get(test.Pages.iframePage); + + var frame = yield driver.findElement({css: 'iframe[name="iframe1-name"]'}); + yield driver.switchTo().frame(frame); + yield changeSizeBy(-20, -20); + }); + + test.it('can switch to a new window', function*() { + yield driver.get(test.Pages.xhtmlTestPage); + + let handle = yield driver.getWindowHandle(); + let originalHandles = yield driver.getAllWindowHandles(); + + yield driver.findElement(By.linkText("Open new window")).click(); + yield driver.wait(forNewWindowToBeOpened(originalHandles), 2000); + yield assert(driver.getTitle()).equalTo("XHTML Test Page"); + + let newHandle = yield getNewWindowHandle(originalHandles); + + yield driver.switchTo().window(newHandle); + yield assert(driver.getTitle()).equalTo("We Arrive Here"); + }); + + test.it('can set the window position of the current window', function*() { + let position = yield driver.manage().window().getPosition(); + + yield driver.manage().window().setSize(640, 480); + yield driver.manage().window().setPosition(position.x + 10, position.y + 10); + + // For phantomjs, setPosition is a no-op and the "window" stays at (0, 0) + if (env.currentBrowser() === Browser.PHANTOM_JS) { + position = yield driver.manage().window().getPosition(); + assert(position.x).equalTo(0); + assert(position.y).equalTo(0); + } else { + var dx = position.x + 10; + var dy = position.y + 10; + return driver.wait(forPositionToBe(dx, dy), 1000); + } + }); + + test.it('can set the window position from a frame', function*() { + yield driver.get(test.Pages.iframePage); + + let frame = yield driver.findElement(By.name('iframe1-name')); + yield driver.switchTo().frame(frame); + + let position = yield driver.manage().window().getPosition(); + yield driver.manage().window().setSize(640, 480); + yield driver.manage().window().setPosition(position.x + 10, position.y + 10); + + // For phantomjs, setPosition is a no-op and the "window" stays at (0, 0) + if (env.currentBrowser() === Browser.PHANTOM_JS) { + return driver.manage().window().getPosition().then(function(position) { + assert(position.x).equalTo(0); + assert(position.y).equalTo(0); + }); + } else { + var dx = position.x + 10; + var dy = position.y + 10; + return driver.wait(forPositionToBe(dx, dy), 1000); + } + }); + + function changeSizeBy(dx, dy) { + return driver.manage().window().getSize().then(function(size) { + return driver.manage().window() + .setSize(size.width + dx, size.height + dy) + .then(_ => { + return driver.wait( + forSizeToBe(size.width + dx, size.height + dy), 1000); + }); + }); + } + + function forSizeToBe(w, h) { + return function() { + return driver.manage().window().getSize().then(function(size) { + return size.width === w && size.height === h; + }); + }; + } + + function forPositionToBe(x, y) { + return function() { + return driver.manage().window().getPosition().then(function(position) { + return position.x === x && + // On OSX, the window height may be bumped down 22px for the top + // status bar. + // On Linux, Opera's window position will be off by 28px. + (position.y >= y && position.y <= (y + 28)); + }); + }; + } + + function forNewWindowToBeOpened(originalHandles) { + return function() { + return driver.getAllWindowHandles().then(function(currentHandles) { + return currentHandles.length > originalHandles.length; + }); + }; + } + + function getNewWindowHandle(originalHandles) { + // Note: this assumes there's just one new window. + return driver.getAllWindowHandles().then(function(currentHandles) { + return currentHandles.filter(function(i) { + return originalHandles.indexOf(i) < 0; + })[0]; + }); + } +}); diff --git a/test-eol-project/node_modules/selenium-webdriver/testing/assert.js b/test-eol-project/node_modules/selenium-webdriver/testing/assert.js new file mode 100644 index 00000000..253aca03 --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/testing/assert.js @@ -0,0 +1,378 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Defines a library that simplifies writing assertions against + * promised values. + * + * >
    + * > __NOTE:__ This module is considered experimental and is subject to + * > change, or removal, at any time! + * >
    + * + * Sample usage: + * + * var driver = new webdriver.Builder().build(); + * driver.get('http://www.google.com'); + * + * assert(driver.getTitle()).equalTo('Google'); + */ + +'use strict'; + +const assert = require('assert'); + +function trueType(v) { + if (v === null) { + return 'null'; + } + + let type = typeof v; + if (type === 'object') { + if (Array.isArray(v)) { + type = 'array'; + } + } + return type; +} + + +function checkType(v, want) { + let got = trueType(v); + if (got !== want) { + throw new TypeError('require ' + want + ', but got ' + got); + } + return v; +} + +const checkNumber = v => checkType(v, 'number'); +const checkFunction = v => checkType(v, 'function'); +const checkString = v => checkType(v, 'string'); + +const isFunction = v => trueType(v) === 'function'; +const isNumber = v => trueType(v) === 'number'; +const isObject = v => trueType(v) === 'object'; +const isString = v => trueType(v) === 'string'; + + +function describe(value) { + let ret; + try { + ret = `<${String(value)}>`; + } catch (e) { + ret = ``; + } + + if (null !== value && void(0) !== value) { + ret += ` (${trueType(value)})`; + } + + return ret; +} + + +function evaluate(value, predicate) { + if (isObject(value) && isFunction(value.then)) { + return value.then(predicate); + } + predicate(value); +} + + +/** + * @private + */ +class Assertion { + /** + * @param {?} subject The subject of this assertion. + * @param {boolean=} opt_invert Whether to invert any assertions performed by + * this instance. + */ + constructor(subject, opt_invert) { + /** @private {?} */ + this.subject_ = subject; + /** @private {boolean} */ + this.invert_ = !!opt_invert; + } + + /** + * @param {number} expected The minimum permissible value (inclusive). + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + atLeast(expected, opt_message) { + checkNumber(expected); + return evaluate(this.subject_, function(actual) { + if (!isNumber(actual) || actual < expected) { + assert.fail(actual, expected, opt_message, '>='); + } + }); + } + + /** + * @param {number} expected The maximum permissible value (inclusive). + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + atMost(expected, opt_message) { + checkNumber(expected); + return evaluate(this.subject_, function (actual) { + if (!isNumber(actual) || actual > expected) { + assert.fail(actual, expected, opt_message, '<='); + } + }); + } + + /** + * @param {number} expected The maximum permissible value (exclusive). + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + greaterThan(expected, opt_message) { + checkNumber(expected); + return evaluate(this.subject_, function(actual) { + if (!isNumber(actual) || actual <= expected) { + assert.fail(actual, expected, opt_message, '>'); + } + }); + } + + /** + * @param {number} expected The minimum permissible value (exclusive). + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + lessThan(expected, opt_message) { + checkNumber(expected); + return evaluate(this.subject_, function (actual) { + if (!isNumber(actual) || actual >= expected) { + assert.fail(actual, expected, opt_message, '<'); + } + }); + } + + /** + * @param {number} expected The desired value. + * @param {number} epsilon The maximum distance from the desired value. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + closeTo(expected, epsilon, opt_message) { + checkNumber(expected); + checkNumber(epsilon); + return evaluate(this.subject_, function(actual) { + checkNumber(actual); + if (Math.abs(expected - actual) > epsilon) { + assert.fail(opt_message || `${actual} === ${expected} (± ${epsilon})`); + } + }); + } + + /** + * @param {function(new: ?)} ctor The exptected type's constructor. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + instanceOf(ctor, opt_message) { + checkFunction(ctor); + return evaluate(this.subject_, function(actual) { + if (!(actual instanceof ctor)) { + assert.fail( + opt_message + || `${describe(actual)} instanceof ${ctor.name || ctor}`); + } + }); + } + + /** + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + isNull(opt_message) { + return this.isEqualTo(null); + } + + /** + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + isUndefined(opt_message) { + return this.isEqualTo(void(0)); + } + + /** + * Ensures the subject of this assertion is either a string or array + * containing the given `value`. + * + * @param {?} value The value expected to be contained within the subject. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + contains(value, opt_message) { + return evaluate(this.subject_, function(actual) { + if (actual instanceof Map || actual instanceof Set) { + assert.ok(actual.has(value), opt_message || `${actual}.has(${value})`); + } else if (Array.isArray(actual) || isString(actual)) { + assert.ok( + actual.indexOf(value) !== -1, + opt_message || `${actual}.indexOf(${value}) !== -1`); + } else { + assert.fail( + `Expected an array, map, set, or string: got ${describe(actual)}`); + } + }); + } + + /** + * @param {string} str The expected suffix. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + endsWith(str, opt_message) { + checkString(str); + return evaluate(this.subject_, function(actual) { + if (!isString(actual) || !actual.endsWith(str)) { + assert.fail(actual, str, 'ends with'); + } + }); + } + + /** + * @param {string} str The expected prefix. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + startsWith(str, opt_message) { + checkString(str); + return evaluate(this.subject_, function(actual) { + if (!isString(actual) || !actual.startsWith(str)) { + assert.fail(actual, str, 'starts with'); + } + }); + } + + /** + * @param {!RegExp} regex The regex the subject is expected to match. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + matches(regex, opt_message) { + if (!(regex instanceof RegExp)) { + throw TypeError(`Not a RegExp: ${describe(regex)}`); + } + return evaluate(this.subject_, function(actual) { + if (!isString(actual) || !regex.test(actual)) { + let message = opt_message + || `Expected a string matching ${regex}, got ${describe(actual)}`; + assert.fail(actual, regex, message); + } + }); + } + + /** + * @param {?} value The unexpected value. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + notEqualTo(value, opt_message) { + return evaluate(this.subject_, function(actual) { + assert.notStrictEqual(actual, value, opt_message); + }); + } + + /** An alias for {@link #isEqualTo}. */ + equalTo(value, opt_message) { + return this.isEqualTo(value, opt_message); + } + + /** An alias for {@link #isEqualTo}. */ + equals(value, opt_message) { + return this.isEqualTo(value, opt_message); + } + + /** + * @param {?} value The expected value. + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + isEqualTo(value, opt_message) { + return evaluate(this.subject_, function(actual) { + assert.strictEqual(actual, value, opt_message); + }); + } + + /** + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + isTrue(opt_message) { + return this.isEqualTo(true, opt_message); + } + + /** + * @param {string=} opt_message An optional failure message. + * @return {(Promise|undefined)} The result of this assertion, if the subject + * is a promised-value. Otherwise, the assertion is performed immediately + * and nothing is returned. + */ + isFalse(opt_message) { + return this.isEqualTo(false, opt_message); + } +} + + +// PUBLIC API + + +/** + * Creates an assertion about the given `value`. + * @return {!Assertion} the new assertion. + */ +module.exports = function assertThat(value) { + return new Assertion(value); +}; +module.exports.Assertion = Assertion; // Exported to help generated docs diff --git a/test-eol-project/node_modules/selenium-webdriver/testing/index.js b/test-eol-project/node_modules/selenium-webdriver/testing/index.js new file mode 100644 index 00000000..4bd677aa --- /dev/null +++ b/test-eol-project/node_modules/selenium-webdriver/testing/index.js @@ -0,0 +1,426 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/** + * @fileoverview Provides wrappers around the following global functions from + * [Mocha's BDD interface](https://github.com/mochajs/mocha): + * + * - after + * - afterEach + * - before + * - beforeEach + * - it + * - it.only + * - it.skip + * - xit + * + * Each of the wrapped functions support generator functions. If the generator + * {@linkplain ../lib/promise.consume yields a promise}, the test will wait + * for that promise to resolve before invoking the next iteration of the + * generator: + * + * test.it('generators', function*() { + * let x = yield Promise.resolve(1); + * assert.equal(x, 1); + * }); + * + * The provided wrappers leverage the {@link webdriver.promise.ControlFlow} + * to simplify writing asynchronous tests: + * + * var {Builder, By, Key, until} = require('selenium-webdriver'); + * var test = require('selenium-webdriver/testing'); + * + * test.describe('Google Search', function() { + * var driver; + * + * test.before(function() { + * driver = new Builder().forBrowser('firefox').build(); + * }); + * + * test.after(function() { + * driver.quit(); + * }); + * + * test.it('should append query to title', function() { + * driver.get('http://www.google.com/ncr'); + * driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN); + * driver.wait(until.titleIs('webdriver - Google Search'), 1000); + * }); + * }); + * + * You may conditionally suppress a test function using the exported + * "ignore" function. If the provided predicate returns true, the attached + * test case will be skipped: + * + * test.ignore(maybe()).it('is flaky', function() { + * if (Math.random() < 0.5) throw Error(); + * }); + * + * function maybe() { return Math.random() < 0.5; } + */ + +'use strict'; + +const promise = require('..').promise; +const flow = (function() { + const initial = process.env['SELENIUM_PROMISE_MANAGER']; + try { + process.env['SELENIUM_PROMISE_MANAGER'] = '1'; + return promise.controlFlow(); + } finally { + if (initial === undefined) { + delete process.env['SELENIUM_PROMISE_MANAGER']; + } else { + process.env['SELENIUM_PROMISE_MANAGER'] = initial; + } + } +})(); + + +/** + * Wraps a function so that all passed arguments are ignored. + * @param {!Function} fn The function to wrap. + * @return {!Function} The wrapped function. + */ +function seal(fn) { + return function() { + fn(); + }; +} + + +/** + * Wraps a function on Mocha's BDD interface so it runs inside a + * webdriver.promise.ControlFlow and waits for the flow to complete before + * continuing. + * @param {!Function} globalFn The function to wrap. + * @return {!Function} The new function. + */ +function wrapped(globalFn) { + return function() { + if (arguments.length === 1) { + return globalFn(wrapArgument(arguments[0])); + + } else if (arguments.length === 2) { + return globalFn(arguments[0], wrapArgument(arguments[1])); + + } else { + throw Error('Invalid # arguments: ' + arguments.length); + } + }; +} + + +function wrapArgument(value) { + if (typeof value === 'function') { + return makeAsyncTestFn(value); + } + return value; +} + + +/** + * Make a wrapper to invoke caller's test function, fn. Run the test function + * within a ControlFlow. + * + * Should preserve the semantics of Mocha's Runnable.prototype.run (See + * https://github.com/mochajs/mocha/blob/master/lib/runnable.js#L192) + * + * @param {!Function} fn + * @return {!Function} + */ +function makeAsyncTestFn(fn) { + const isAsync = fn.length > 0; + const isGenerator = promise.isGenerator(fn); + if (isAsync && isGenerator) { + throw TypeError( + 'generator-based tests must not take a callback; for async testing,' + + ' return a promise (or yield on a promise)'); + } + + var ret = /** @type {function(this: mocha.Context)}*/ (function(done) { + const runTest = (resolve, reject) => { + try { + if (isAsync) { + fn.call(this, err => err ? reject(err) : resolve()); + } else if (isGenerator) { + resolve(promise.consume(fn, this)); + } else { + resolve(fn.call(this)); + } + } catch (ex) { + reject(ex); + } + }; + + if (!promise.USE_PROMISE_MANAGER) { + new Promise(runTest).then(seal(done), done); + return; + } + + var runnable = this.runnable(); + var mochaCallback = runnable.callback; + runnable.callback = function() { + flow.reset(); + return mochaCallback.apply(this, arguments); + }; + + flow.execute(function controlFlowExecute() { + return new promise.Promise(function(fulfill, reject) { + return runTest(fulfill, reject); + }, flow); + }, runnable.fullTitle()).then(seal(done), done); + }); + + ret.toString = function() { + return fn.toString(); + }; + + return ret; +} + + +/** + * Ignores the test chained to this function if the provided predicate returns + * true. + * @param {function(): boolean} predicateFn A predicate to call to determine + * if the test should be suppressed. This function MUST be synchronous. + * @return {!Object} An object with wrapped versions of {@link #it()} and + * {@link #describe()} that ignore tests as indicated by the predicate. + */ +function ignore(predicateFn) { + var describe = wrap(exports.xdescribe, exports.describe); + describe.only = wrap(exports.xdescribe, exports.describe.only); + + var it = wrap(exports.xit, exports.it); + it.only = wrap(exports.xit, exports.it.only); + + return { + describe: describe, + it: it + }; + + function wrap(onSkip, onRun) { + return function(title, fn) { + if (predicateFn()) { + onSkip(title, fn); + } else { + onRun(title, fn); + } + }; + } +} + + +/** + * @param {string} name + * @return {!Function} + * @throws {TypeError} + */ +function getMochaGlobal(name) { + let fn = global[name]; + let type = typeof fn; + if (type !== 'function') { + throw TypeError( + `Expected global.${name} to be a function, but is ${type}. ` + + 'This can happen if you try using this module when running ' + + 'with node directly instead of using the mocha executable'); + } + return fn; +} + + +const WRAPPED = { + after: null, + afterEach: null, + before: null, + beforeEach: null, + it: null, + itOnly: null, + xit: null +}; + + +function wrapIt() { + if (!WRAPPED.it) { + let it = getMochaGlobal('it'); + WRAPPED.it = wrapped(it); + WRAPPED.itOnly = wrapped(it.only); + } +} + + + +// PUBLIC API + + +/** + * @return {!promise.ControlFlow} the control flow instance used by this module + * to coordinate test actions. + */ +exports.controlFlow = function(){ + return flow; +}; + + +/** + * Registers a new test suite. + * @param {string} name The suite name. + * @param {function()=} opt_fn The suite function, or `undefined` to define + * a pending test suite. + */ +exports.describe = function(name, opt_fn) { + let fn = getMochaGlobal('describe'); + return opt_fn ? fn(name, opt_fn) : fn(name); +}; + + +/** + * An alias for {@link #describe()} that marks the suite as exclusive, + * suppressing all other test suites. + * @param {string} name The suite name. + * @param {function()=} opt_fn The suite function, or `undefined` to define + * a pending test suite. + */ +exports.describe.only = function(name, opt_fn) { + let desc = getMochaGlobal('describe'); + return opt_fn ? desc.only(name, opt_fn) : desc.only(name); +}; + + +/** + * Defines a suppressed test suite. + * @param {string} name The suite name. + * @param {function()=} opt_fn The suite function, or `undefined` to define + * a pending test suite. + */ +exports.describe.skip = function(name, opt_fn) { + let fn = getMochaGlobal('describe'); + return opt_fn ? fn.skip(name, opt_fn) : fn.skip(name); +}; + + +/** + * Defines a suppressed test suite. + * @param {string} name The suite name. + * @param {function()=} opt_fn The suite function, or `undefined` to define + * a pending test suite. + */ +exports.xdescribe = function(name, opt_fn) { + let fn = getMochaGlobal('xdescribe'); + return opt_fn ? fn(name, opt_fn) : fn(name); +}; + + +/** + * Register a function to call after the current suite finishes. + * @param {function()} fn . + */ +exports.after = function(fn) { + if (!WRAPPED.after) { + WRAPPED.after = wrapped(getMochaGlobal('after')); + } + WRAPPED.after(fn); +}; + + +/** + * Register a function to call after each test in a suite. + * @param {function()} fn . + */ +exports.afterEach = function(fn) { + if (!WRAPPED.afterEach) { + WRAPPED.afterEach = wrapped(getMochaGlobal('afterEach')); + } + WRAPPED.afterEach(fn); +}; + + +/** + * Register a function to call before the current suite starts. + * @param {function()} fn . + */ +exports.before = function(fn) { + if (!WRAPPED.before) { + WRAPPED.before = wrapped(getMochaGlobal('before')); + } + WRAPPED.before(fn); +}; + +/** + * Register a function to call before each test in a suite. + * @param {function()} fn . + */ +exports.beforeEach = function(fn) { + if (!WRAPPED.beforeEach) { + WRAPPED.beforeEach = wrapped(getMochaGlobal('beforeEach')); + } + WRAPPED.beforeEach(fn); +}; + +/** + * Add a test to the current suite. + * @param {string} name The test name. + * @param {function()=} opt_fn The test function, or `undefined` to define + * a pending test case. + */ +exports.it = function(name, opt_fn) { + wrapIt(); + if (opt_fn) { + WRAPPED.it(name, opt_fn); + } else { + WRAPPED.it(name); + } +}; + +/** + * An alias for {@link #it()} that flags the test as the only one that should + * be run within the current suite. + * @param {string} name The test name. + * @param {function()=} opt_fn The test function, or `undefined` to define + * a pending test case. + */ +exports.it.only = function(name, opt_fn) { + wrapIt(); + if (opt_fn) { + WRAPPED.itOnly(name, opt_fn); + } else { + WRAPPED.itOnly(name); + } +}; + + +/** + * Adds a test to the current suite while suppressing it so it is not run. + * @param {string} name The test name. + * @param {function()=} opt_fn The test function, or `undefined` to define + * a pending test case. + */ +exports.xit = function(name, opt_fn) { + if (!WRAPPED.xit) { + WRAPPED.xit = wrapped(getMochaGlobal('xit')); + } + if (opt_fn) { + WRAPPED.xit(name, opt_fn); + } else { + WRAPPED.xit(name); + } +}; + + +exports.it.skip = exports.xit; +exports.ignore = ignore; diff --git a/test-eol-project/node_modules/semver/LICENSE b/test-eol-project/node_modules/semver/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/test-eol-project/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/semver/README.md b/test-eol-project/node_modules/semver/README.md new file mode 100644 index 00000000..f8dfa5a0 --- /dev/null +++ b/test-eol-project/node_modules/semver/README.md @@ -0,0 +1,412 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/test-eol-project/node_modules/semver/package.json b/test-eol-project/node_modules/semver/package.json new file mode 100644 index 00000000..db035e97 --- /dev/null +++ b/test-eol-project/node_modules/semver/package.json @@ -0,0 +1,38 @@ +{ + "name": "semver", + "version": "5.7.2", + "description": "The semantic version parser used by npm.", + "main": "semver.js", + "scripts": { + "test": "tap test/ --100 --timeout=30", + "lint": "echo linting disabled", + "postlint": "template-oss-check", + "template-oss-apply": "template-oss-apply --force", + "lintfix": "npm run lint -- --fix", + "snap": "tap test/ --100 --timeout=30", + "posttest": "npm run lint" + }, + "devDependencies": { + "@npmcli/template-oss": "4.17.0", + "tap": "^12.7.0" + }, + "license": "ISC", + "repository": { + "type": "git", + "url": "https://github.com/npm/node-semver.git" + }, + "bin": { + "semver": "./bin/semver" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "author": "GitHub Inc.", + "templateOSS": { + "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", + "content": "./scripts/template-oss", + "version": "4.17.0" + } +} diff --git a/test-eol-project/node_modules/semver/range.bnf b/test-eol-project/node_modules/semver/range.bnf new file mode 100644 index 00000000..d4c6ae0d --- /dev/null +++ b/test-eol-project/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/test-eol-project/node_modules/semver/semver.js b/test-eol-project/node_modules/semver/semver.js new file mode 100644 index 00000000..dcb68334 --- /dev/null +++ b/test-eol-project/node_modules/semver/semver.js @@ -0,0 +1,1525 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + +// The actual regexps go on exports.re +var re = exports.re = [] +var safeRe = exports.safeRe = [] +var src = exports.src = [] +var R = 0 + +var LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +var safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +function makeSafeRe (value) { + for (var i = 0; i < safeRegexReplacements.length; i++) { + var token = safeRegexReplacements[i][0] + var max = safeRegexReplacements[i][1] + value = value + .split(token + '*').join(token + '{0,' + max + '}') + .split(token + '+').join(token + '{1,' + max + '}') + } + return value +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '\\d+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + + // Replace all greedy whitespace to prevent regex dos issues. These regex are + // used internally via the safeRe object since all inputs in this library get + // normalized first to trim and collapse all extra whitespace. The original + // regexes are exported for userland consumption and lower level usage. A + // future breaking change could export the safer regex only with a note that + // all input should have extra whitespace removed. + safeRe[i] = new RegExp(makeSafeRe(src[i])) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range + .trim() + .split(/\s+/) + .join(' ') + + // First, split based on boolean or || + this.set = this.raw.split('||').map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + this.raw) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, safeRe[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(safeRe[CARETTRIM], caretTrimReplace) + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(safeRe[STAR], '') +} + +// This function is passed to string.replace(safeRe[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(safeRe[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/test-eol-project/node_modules/set-blocking/CHANGELOG.md b/test-eol-project/node_modules/set-blocking/CHANGELOG.md new file mode 100644 index 00000000..03bf5919 --- /dev/null +++ b/test-eol-project/node_modules/set-blocking/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) + + +### Features + +* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) + + +### BREAKING CHANGES + +* stdio/stderr will not be set to blocking if isTTY === false + + + + +# 1.0.0 (2016-05-14) + + +### Features + +* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/test-eol-project/node_modules/set-blocking/LICENSE.txt b/test-eol-project/node_modules/set-blocking/LICENSE.txt new file mode 100644 index 00000000..836440be --- /dev/null +++ b/test-eol-project/node_modules/set-blocking/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/set-blocking/README.md b/test-eol-project/node_modules/set-blocking/README.md new file mode 100644 index 00000000..e93b4202 --- /dev/null +++ b/test-eol-project/node_modules/set-blocking/README.md @@ -0,0 +1,31 @@ +# set-blocking + +[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) +[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) +[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. + +```js +const setBlocking = require('set-blocking') +setBlocking(true) +console.log(someLargeStringToOutput) +``` + +## Historical Context/Word of Warning + +This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on +newer versions of Node.js (`0.12+`), truncating terminal output. + +You should be mindful of the side-effects caused by using `set-blocking`: + +* if your module sets blocking to `true`, it will effect other modules + consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call + `setBlocking(true)` once we already know we are about to call `process.exit(code)`. +* this patch will not apply to subprocesses spawned with `isTTY = true`, this is + the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). + +## License + +ISC diff --git a/test-eol-project/node_modules/set-blocking/index.js b/test-eol-project/node_modules/set-blocking/index.js new file mode 100644 index 00000000..6f78774b --- /dev/null +++ b/test-eol-project/node_modules/set-blocking/index.js @@ -0,0 +1,7 @@ +module.exports = function (blocking) { + [process.stdout, process.stderr].forEach(function (stream) { + if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { + stream._handle.setBlocking(blocking) + } + }) +} diff --git a/test-eol-project/node_modules/set-blocking/package.json b/test-eol-project/node_modules/set-blocking/package.json new file mode 100644 index 00000000..c082db72 --- /dev/null +++ b/test-eol-project/node_modules/set-blocking/package.json @@ -0,0 +1,42 @@ +{ + "name": "set-blocking", + "version": "2.0.0", + "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha ./test/*.js", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "version": "standard-version" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/yargs/set-blocking.git" + }, + "keywords": [ + "flush", + "terminal", + "blocking", + "shim", + "stdio", + "stderr" + ], + "author": "Ben Coe ", + "license": "ISC", + "bugs": { + "url": "https://github.com/yargs/set-blocking/issues" + }, + "homepage": "https://github.com/yargs/set-blocking#readme", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.9", + "mocha": "^2.4.5", + "nyc": "^6.4.4", + "standard": "^7.0.1", + "standard-version": "^2.2.1" + }, + "files": [ + "index.js", + "LICENSE.txt" + ] +} \ No newline at end of file diff --git a/test-eol-project/node_modules/setimmediate/LICENSE.txt b/test-eol-project/node_modules/setimmediate/LICENSE.txt new file mode 100644 index 00000000..32b20de6 --- /dev/null +++ b/test-eol-project/node_modules/setimmediate/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola + +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/test-eol-project/node_modules/setimmediate/package.json b/test-eol-project/node_modules/setimmediate/package.json new file mode 100644 index 00000000..9b211e43 --- /dev/null +++ b/test-eol-project/node_modules/setimmediate/package.json @@ -0,0 +1,30 @@ +{ + "name": "setimmediate", + "description": "A shim for the setImmediate efficient script yielding API", + "version": "1.0.5", + "author": "YuzuJS", + "contributors": [ + "Domenic Denicola (https://domenic.me)", + "Donavon West (http://donavon.com)", + "Yaffle" + ], + "license": "MIT", + "repository": "YuzuJS/setImmediate", + "main": "setImmediate.js", + "files": [ + "setImmediate.js" + ], + "scripts": { + "lint": "jshint setImmediate.js", + "test": "mocha test/tests.js", + "test-browser": "opener http://localhost:9008/__zuul && zuul test/tests.js --ui mocha-bdd --local 9008", + "test-browser-only": "opener http://localhost:9007/test/browserOnly/index.html && http-server . -p 9007" + }, + "devDependencies": { + "jshint": "^2.5.0", + "mocha": "~1.18.2", + "http-server": "~0.6.1", + "opener": "^1.3", + "zuul": "^1.6.4" + } +} diff --git a/test-eol-project/node_modules/setimmediate/setImmediate.js b/test-eol-project/node_modules/setimmediate/setImmediate.js new file mode 100644 index 00000000..3c1b06e6 --- /dev/null +++ b/test-eol-project/node_modules/setimmediate/setImmediate.js @@ -0,0 +1,186 @@ +(function (global, undefined) { + "use strict"; + + if (global.setImmediate) { + return; + } + + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var registerImmediate; + + function setImmediate(callback) { + // Callback can either be a function or a string + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + // Copy function arguments + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + // Store and register the task + var task = { callback: callback, args: args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } + + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined, args); + break; + } + } + + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function () { runIfPresent(handle); }); + }; + } + + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages + + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } + + registerImmediate = function(handle) { + global.postMessage(messagePrefix + handle, "*"); + }; + } + + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; + } + + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + // Create a + +``` + +This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: + +```html + +``` + +## Options + +This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: + +```js +require('source-map-support').install({ + handleUncaughtExceptions: false +}); +``` + +This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. + +```js +require('source-map-support').install({ + retrieveSourceMap: function(source) { + if (source === 'compiled.js') { + return { + url: 'original.js', + map: fs.readFileSync('compiled.js.map', 'utf8') + }; + } + return null; + } +}); +``` + +The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. +In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. + +```js +require('source-map-support').install({ + environment: 'node' +}); +``` + +To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. + + +```js +require('source-map-support').install({ + hookRequire: true +}); +``` + +This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. + +## Demos + +#### Basic Demo + +original.js: + +```js +throw new Error('test'); // This is the original code +``` + +compiled.js: + +```js +require('source-map-support').install(); + +throw new Error('test'); // This is the compiled code +// The next line defines the sourceMapping. +//# sourceMappingURL=compiled.js.map +``` + +compiled.js.map: + +```json +{ + "version": 3, + "file": "compiled.js", + "sources": ["original.js"], + "names": [], + "mappings": ";;AAAA,MAAM,IAAI" +} +``` + +Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): + +``` +$ node compiled.js + +original.js:1 +throw new Error('test'); // This is the original code + ^ +Error: test + at Object. (original.js:1:7) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### TypeScript Demo + +demo.ts: + +```typescript +declare function require(name: string); +require('source-map-support').install(); +class Foo { + constructor() { this.bar(); } + bar() { throw new Error('this is a demo'); } +} +new Foo(); +``` + +Compile and run the file using the TypeScript compiler from the terminal: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### CoffeeScript Demo + +demo.coffee: + +```coffee +require('source-map-support').install() +foo = -> + bar = -> throw new Error 'this is a demo' + bar() +foo() +``` + +Compile and run the file using the CoffeeScript compiler from the terminal: + +```sh +$ npm install source-map-support coffee-script +$ node_modules/coffee-script/bin/coffee --map --compile demo.coffee +$ node demo.js + +demo.coffee:3 + bar = -> throw new Error 'this is a demo' + ^ +Error: this is a demo + at bar (demo.coffee:3:22) + at foo (demo.coffee:4:3) + at Object. (demo.coffee:5:1) + at Object. (demo.coffee:1:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) +``` + +## Tests + +This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: + +* Build the tests using `build.js` +* Launch the HTTP server (`npm run serve-tests`) and visit + * http://127.0.0.1:1336/amd-test + * http://127.0.0.1:1336/browser-test + * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). +* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ + +## License + +This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/test-eol-project/node_modules/source-map-support/browser-source-map-support.js b/test-eol-project/node_modules/source-map-support/browser-source-map-support.js new file mode 100644 index 00000000..e7a3990d --- /dev/null +++ b/test-eol-project/node_modules/source-map-support/browser-source-map-support.js @@ -0,0 +1,110 @@ +/* + * Support for source maps in V8 stack traces + * https://github.com/evanw/node-source-map-support + */ +/* + The buffer module from node.js, for the browser. + + @author Feross Aboukhadijeh + license MIT +*/ +(this.define||function(N,O){this.sourceMapSupport=O()})("browser-source-map-support",function(N){(function n(v,m,c){function d(e,a){if(!m[e]){if(!v[e]){var h="function"==typeof require&&require;if(!a&&h)return h(e,!0);if(k)return k(e,!0);throw Error("Cannot find module '"+e+"'");}h=m[e]={exports:{}};v[e][0].call(h.exports,function(a){var c=v[e][1][a];return d(c?c:a)},h,h.exports,n,v,m,c)}return m[e].exports}for(var k="function"==typeof require&&require,q=0;qc)return-1;if(58>c)return c-48+52;if(91>c)return c-65;if(123>c)return c-97+26}var k="undefined"!==typeof Uint8Array?Uint8Array:Array;c.toByteArray=function(c){function e(a){u[b++]=a}if(0>16);e((f&65280)>>8);e(f&255)}2===h?(f=d(c.charAt(a))<<2|d(c.charAt(a+1))>>4,e(f&255)):1===h&&(f=d(c.charAt(a))<<10|d(c.charAt(a+1))<<4|d(c.charAt(a+2))>>2,e(f>>8&255),e(f&255));return u};c.fromByteArray=function(c){var e=c.length%3,a="",h;var d=0;for(h=c.length-e;d>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);a+=r}switch(e){case 1:r=c[c.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<< +4&63);a+="==";break;case 2:r=(c[c.length-2]<<8)+c[c.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(n,v,m){},{}],4:[function(n,v,m){function c(g,l,b){if(!(this instanceof c))return new c(g,l,b);var x=typeof g; +if("base64"===l&&"string"===x)for(g=g.trim?g.trim():g.replace(/^\s+|\s+$/g,"");0!==g.length%4;)g+="=";if("number"===x)var a=B(g);else if("string"===x)a=c.byteLength(g,l);else if("object"===x)a=B(g.length);else throw Error("First argument needs to be a number, array or string.");if(c._useTypedArrays)var f=c._augment(new Uint8Array(a));else f=this,f.length=a,f._isBuffer=!0;if(c._useTypedArrays&&"number"===typeof g.byteLength)f._set(g);else{var e=g;if(L(e)||c.isBuffer(e)||e&&"object"===typeof e&&"number"=== +typeof e.length)for(l=0;l=a))return b?(b=g[l],l+ +1=a)){var x;b?(l+2>>0)):(l+1>>0);return x}}function e(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"), +p(void 0!==l&&null!==l,"missing offset"),p(l+1=g.length))return g=k(g,l,b,!0),g&32768?-1*(65535-g+1):g}function a(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(void 0!==l&&null!==l,"missing offset"),p(l+3=g.length))return g=q(g,l,b,!0),g&2147483648?-1*(4294967295-g+1):g}function h(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(l+3=x))for(c=0,x=Math.min(x-b,2);c>>8* +(a?c:1-c)}function b(g,l,b,a,c){c||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+3=x))for(c=0,x=Math.min(x-b,4);c>>8*(a?c:3-c)&255}function f(g,l,b,a,c){c||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+1=g.length||(0<=l?r(g,l,b,a,c):r(g,65535+l+1,b,a,c))}function G(g,l,a,c,f){f||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3=g.length||(0<=l?b(g,l,a,c,f):b(g,4294967295+l+1,a,c,f))}function t(g,b,a,c,f){f||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof c, +"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3=g.length||J.write(g,b,a,c,23,4)}function M(g,b,a,c,f){f||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+7=g.length||J.write(g, +b,a,c,52,8)}function I(g,b,a){if("number"!==typeof g)return a;g=~~g;if(g>=b)return b;if(0<=g)return g;g+=b;return 0<=g?g:0}function B(g){g=~~Math.ceil(+g);return 0>g?0:g}function L(g){return(Array.isArray||function(g){return"[object Array]"===Object.prototype.toString.call(g)})(g)}function C(g){return 16>g?"0"+g.toString(16):g.toString(16)}function y(g){for(var b=[],a=0;a=c)b.push(g.charCodeAt(a));else{var f=a;55296<=c&&57343>=c&&a++;c=encodeURIComponent(g.slice(f, +a+1)).substr(1).split("%");for(f=0;f=b.length||l>=g.length);l++)b[l+a]=g[l];return l}function F(g){try{return decodeURIComponent(g)}catch(l){return String.fromCharCode(65533)}}function H(g,b){p("number"===typeof g,"cannot write a non-number as a number");p(0<=g,"specified a negative value for writing an unsigned value");p(g<= +b,"value is larger than maximum value for type");p(Math.floor(g)===g,"value has a fractional component")}function z(g,b,a){p("number"===typeof g,"cannot write a non-number as a number");p(g<=b,"value larger than maximum allowed value");p(g>=a,"value smaller than minimum allowed value");p(Math.floor(g)===g,"value has a fractional component")}function E(g,b,a){p("number"===typeof g,"cannot write a non-number as a number");p(g<=b,"value larger than maximum allowed value");p(g>=a,"value smaller than minimum allowed value")} +function p(g,b){if(!g)throw Error(b||"Failed assertion");}var D=n("base64-js"),J=n("ieee754");m.Buffer=c;m.SlowBuffer=c;m.INSPECT_MAX_BYTES=50;c.poolSize=8192;c._useTypedArrays=function(){try{var g=new ArrayBuffer(0),b=new Uint8Array(g);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray}catch(x){return!1}}();c.isEncoding=function(g){switch(String(g).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0; +default:return!1}};c.isBuffer=function(g){return!(null===g||void 0===g||!g._isBuffer)};c.byteLength=function(g,b){g+="";switch(b||"utf8"){case "hex":var a=g.length/2;break;case "utf8":case "utf-8":a=y(g).length;break;case "ascii":case "binary":case "raw":a=g.length;break;case "base64":a=D.toByteArray(g).length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=2*g.length;break;default:throw Error("Unknown encoding");}return a};c.concat=function(g,b){p(L(g),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."); +if(0===g.length)return new c(0);if(1===g.length)return g[0];var a;if("number"!==typeof b)for(a=b=0;al&&(a=l)):a=l;f=String(f||"utf8").toLowerCase();switch(f){case "hex":b=Number(b)||0;f=this.length-b;a?(a=Number(a),a>f&&(a=f)):a=f;f= +g.length;p(0===f%2,"Invalid hex string");a>f/2&&(a=f/2);for(f=0;f>8;h%=256;l.push(h);l.push(f)}g=c._charsWritten=A(l,this,b,a);break;default:throw Error("Unknown encoding");}return g};c.prototype.toString=function(g,b,a){g=String(g||"utf8").toLowerCase();b=Number(b)||0;a=void 0!==a?Number(a):a=this.length;if(a===b)return"";switch(g){case "hex":g=this.length;if(!b||0>b)b=0;if(!a||0>a||a>g)a=g;for(g="";b=this[b]?(g+=F(c)+String.fromCharCode(this[b]), +c=""):c+="%"+this[b].toString(16);a=g+F(c);break;case "ascii":a=d(this,b,a);break;case "binary":a=d(this,b,a);break;case "base64":a=0===b&&a===this.length?D.fromByteArray(this):D.fromByteArray(this.slice(b,a));break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=this.slice(b,a);b="";for(g=0;g=a,"sourceEnd < sourceStart"),p(0<=b&&bthis.length&&(f=this.length),g.length-bf||!c._useTypedArrays)for(var l=0;l=this.length))return this[b]};c.prototype.readUInt16LE=function(b,a){return k(this,b,!0,a)};c.prototype.readUInt16BE=function(b,a){return k(this,b,!1,a)};c.prototype.readUInt32LE=function(b,a){return q(this,b,!0,a)};c.prototype.readUInt32BE=function(b,a){return q(this,b,!1,a)};c.prototype.readInt8=function(b,a){a||(p(void 0!==b&&null!==b,"missing offset"),p(b= +this.length))return this[b]&128?-1*(255-this[b]+1):this[b]};c.prototype.readInt16LE=function(b,a){return e(this,b,!0,a)};c.prototype.readInt16BE=function(b,a){return e(this,b,!1,a)};c.prototype.readInt32LE=function(b,f){return a(this,b,!0,f)};c.prototype.readInt32BE=function(b,f){return a(this,b,!1,f)};c.prototype.readFloatLE=function(b,a){return h(this,b,!0,a)};c.prototype.readFloatBE=function(b,a){return h(this,b,!1,a)};c.prototype.readDoubleLE=function(b,a){return u(this,b,!0,a)};c.prototype.readDoubleBE= +function(b,a){return u(this,b,!1,a)};c.prototype.writeUInt8=function(b,a,f){f||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a=this.length||(this[a]=b)};c.prototype.writeUInt16LE=function(b,a,f){r(this,b,a,!0,f)};c.prototype.writeUInt16BE=function(b,a,f){r(this,b,a,!1,f)};c.prototype.writeUInt32LE=function(a,f,c){b(this,a,f,!0,c)};c.prototype.writeUInt32BE=function(a,f,c){b(this,a,f,!1,c)};c.prototype.writeInt8= +function(b,a,f){f||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a=this.length||(0<=b?this.writeUInt8(b,a,f):this.writeUInt8(255+b+1,a,f))};c.prototype.writeInt16LE=function(b,a,c){f(this,b,a,!0,c)};c.prototype.writeInt16BE=function(b,a,c){f(this,b,a,!1,c)};c.prototype.writeInt32LE=function(b,a,f){G(this,b,a,!0,f)};c.prototype.writeInt32BE=function(b,a,f){G(this,b,a,!1,f)};c.prototype.writeFloatLE= +function(b,a,f){t(this,b,a,!0,f)};c.prototype.writeFloatBE=function(b,a,f){t(this,b,a,!1,f)};c.prototype.writeDoubleLE=function(b,a,f){M(this,b,a,!0,f)};c.prototype.writeDoubleBE=function(b,a,f){M(this,b,a,!1,f)};c.prototype.fill=function(b,a,f){b||(b=0);a||(a=0);f||(f=this.length);"string"===typeof b&&(b=b.charCodeAt(0));p("number"===typeof b&&!isNaN(b),"value is not a number");p(f>=a,"end < start");if(f!==a&&0!==this.length)for(p(0<=a&&a"};c.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(c._useTypedArrays)return(new c(this)).buffer;for(var b=new Uint8Array(this.length),a=0,f=b.length;a>1,r=-7;e=k?e-1:0;var b=k?-1:1,f=c[d+e];e+=b;k=f&(1<<-r)-1;f>>=-r;for(r+=a;0>=-r;for(r+=q;0>1,f=23===e?Math.pow(2,-24)-Math.pow(2,-77):0;a=q?0:a-1;var G=q?1:-1,t=0>d||0===d&&0>1/d?1:0;d=Math.abs(d);isNaN(d)||Infinity===d?(d=isNaN(d)?1:0,q=r):(q=Math.floor(Math.log(d)/Math.LN2),1>d*(h=Math.pow(2,-q))&&(q--,h*=2),d=1<=q+b?d+f/h:d+f*Math.pow(2,1-b),2<=d*h&&(q++,h/=2),q+b>=r?(d=0,q=r):1<=q+b?(d=(d*h-1)*Math.pow(2,e),q+=b):(d=d*Math.pow(2,b-1)*Math.pow(2,e),q=0));for(;8<=e;c[k+a]=d&255,a+=G,d/=256,e-=8);q=q<f?[]:b.slice(a,f-a+1)}a=m.resolve(a).substr(1);c=m.resolve(c).substr(1);for(var h=e(a.split("/")),b=e(c.split("/")),f=Math.min(h.length,b.length),G=f,t=0;tc&&(c=a.length+c);return a.substr(c,e)}}).call(this,n("node_modules/process/browser.js"))}, +{"node_modules/process/browser.js":7}],7:[function(n,v,m){function c(){}n=v.exports={};n.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(c){return window.setImmediate(c)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var c=[];window.addEventListener("message",function(d){var k=d.source;k!==window&&null!==k||"process-tick"!==d.data||(d.stopPropagation(),0d?(-d<<1)+1:(d<<1)+0;do d=q&31,q>>>=5,0=e)throw Error("Expected more digits in base 64 VLQ value.");var u=c.decode(d.charCodeAt(k++));if(-1===u)throw Error("Invalid base64 digit: "+d.charAt(k-1)); +var r=!!(u&32);u&=31;a+=u<>1;q.value=1===(a&1)?-d:d;q.rest=k}},{"./base64":10}],10:[function(n,v,m){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(d){if(0<=d&&d=c?c-65:97<=c&&122>=c?c-97+26:48<=c&&57>=c?c-48+52:43==c?62:47==c?63:-1}},{}],11:[function(n,v,m){function c(d,k,q,e,a,h){var u=Math.floor((k-d)/2)+d,r= +a(q,e[u],!0);return 0===r?u:0d?-1:d}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(d,k,q,e){if(0===k.length)return-1;d=c(-1,k.length,d,k,q,e||m.GREATEST_LOWER_BOUND);if(0>d)return-1;for(;0<=d-1&&0===q(k[d],k[d-1],!0);)--d;return d}},{}],12:[function(n,v,m){function c(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var d=n("./util");c.prototype.unsortedForEach= +function(c,d){this._array.forEach(c,d)};c.prototype.add=function(c){var k=this._last,e=k.generatedLine,a=c.generatedLine,h=k.generatedColumn,u=c.generatedColumn;a>e||a==e&&u>=h||0>=d.compareByGeneratedPositionsInflated(k,c)?this._last=c:this._sorted=!1;this._array.push(c)};c.prototype.toArray=function(){this._sorted||(this._array.sort(d.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=c},{"./util":17}],13:[function(n,v,m){function c(c,d,e){var a=c[d];c[d]=c[e]; +c[e]=a}function d(k,m,e,a){if(e=m(k[r],u)&&(h+=1,c(k,h,r));c(k,h+1,r);h+=1;d(k,m,e,h-1);d(k,m,h+1,a)}}m.quickSort=function(c,m){d(c,m,0,c.length-1)}},{}],14:[function(n,v,m){function c(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));return null!=a.sections?new q(a):new d(a)}function d(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=e.getArg(a,"version");var c=e.getArg(a, +"sources"),t=e.getArg(a,"names",[]),d=e.getArg(a,"sourceRoot",null),r=e.getArg(a,"sourcesContent",null),k=e.getArg(a,"mappings");a=e.getArg(a,"file",null);if(b!=this._version)throw Error("Unsupported version: "+b);c=c.map(String).map(e.normalize).map(function(b){return d&&e.isAbsolute(d)&&e.isAbsolute(b)?e.relative(d,b):b});this._names=h.fromArray(t.map(String),!0);this._sources=h.fromArray(c,!0);this.sourceRoot=d;this.sourcesContent=r;this._mappings=k;this.file=a}function k(){this.generatedColumn= +this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source=null}function q(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=e.getArg(a,"version");a=e.getArg(a,"sections");if(b!=this._version)throw Error("Unsupported version: "+b);this._sources=new h;this._names=new h;var d={line:-1,column:0};this._sections=a.map(function(b){if(b.url)throw Error("Support for url field in sections not implemented.");var a=e.getArg(b,"offset"),f=e.getArg(a,"line"),t=e.getArg(a, +"column");if(f=b[e])throw new TypeError("Line must be greater than or equal to 1, got "+b[e]);if(0>b[d])throw new TypeError("Column must be greater than or equal to 0, got "+b[d]);return a.search(b,c,h,r)};d.prototype.computeColumnSpans=function(){for(var b=0;b=this._sources.size()&&!this.sourcesContent.some(function(b){return null==b}):!1};d.prototype.sourceContentFor=function(b,a){if(!this.sourcesContent)return null;null!=this.sourceRoot&&(b=e.relative(this.sourceRoot, +b));if(this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var c;if(null!=this.sourceRoot&&(c=e.urlParse(this.sourceRoot))){var f=b.replace(/^file:\/\//,"");if("file"==c.scheme&&this._sources.has(f))return this.sourcesContent[this._sources.indexOf(f)];if((!c.path||"/"==c.path)&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}if(a)return null;throw Error('"'+b+'" is not in the SourceMap.');};d.prototype.generatedPositionFor=function(b){var a= +e.getArg(b,"source");null!=this.sourceRoot&&(a=e.relative(this.sourceRoot,a));if(!this._sources.has(a))return{line:null,column:null,lastColumn:null};a=this._sources.indexOf(a);a={source:a,originalLine:e.getArg(b,"line"),originalColumn:e.getArg(b,"column")};b=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(b,"bias",c.GREATEST_LOWER_BOUND));return 0<=b&&(b=this._originalMappings[b],b.source===a.source)?{line:e.getArg(b,"generatedLine", +null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}:{line:null,column:null,lastColumn:null}};m.BasicSourceMapConsumer=d;q.prototype=Object.create(c.prototype);q.prototype.constructor=c;q.prototype._version=3;Object.defineProperty(q.prototype,"sources",{get:function(){for(var a=[],c=0;cb||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b- +9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}m.getArg=function(a,c,d){if(c in a)return a[c];if(3===arguments.length)return d;throw Error('"'+c+'" is a required argument.');};var u=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;m.urlParse=c;m.urlGenerate=d;m.normalize=k;m.join=function(a,e){""===a&&(a=".");""===e&&(e=".");var b=c(e),f=c(a);f&&(a=f.path||"/");if(b&&!b.scheme)return f&&(b.scheme=f.scheme),d(b);if(b||e.match(r))return e; +if(f&&!f.host&&!f.path)return f.host=e,d(f);b="/"===e.charAt(0)?e:k(a.replace(/\/+$/,"")+"/"+e);return f?(f.path=b,d(f)):b};m.isAbsolute=function(a){return"/"===a.charAt(0)||!!a.match(u)};m.relative=function(a,c){""===a&&(a=".");a=a.replace(/\/$/,"");for(var b=0;0!==c.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return c;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return c;++b}return Array(b+1).join("../")+c.substr(a.length+1)};n=!("__proto__"in Object.create(null));m.toSetString=n?q:e;m.fromSetString= +n?q:a;m.compareByOriginalPositions=function(a,c,d){var b=a.source-c.source;if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;if(0!==b||d)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b)return b;b=a.generatedLine-c.generatedLine;return 0!==b?b:a.name-c.name};m.compareByGeneratedPositionsDeflated=function(a,c,d){var b=a.generatedLine-c.generatedLine;if(0!==b)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b||d)return b;b=a.source-c.source; +if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;return 0!==b?b:a.name-c.name};m.compareByGeneratedPositionsInflated=function(a,c){var b=a.generatedLine-c.generatedLine;if(0!==b)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b)return b;b=a.source;var d=c.source;b=b===d?0:b>d?1:-1;if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;0===b&&(b=a.name,d=c.name,b=b===d?0:b>d?1:-1);return b}}, +{}],18:[function(n,v,m){m.SourceMapGenerator=n("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=n("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=n("./lib/source-node").SourceNode},{"./lib/source-map-consumer":14,"./lib/source-map-generator":15,"./lib/source-node":16}],19:[function(n,v,m){(function(c,d){function k(){return"browser"===K?!0:"node"===K?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&& +"renderer"===window.process.type)}function q(a){return function(b){for(var c=0;c";b=this.getLineNumber();null!=b&&(a+=":"+b,(b=this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||""):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"")}d&&(b+=" ("+a+")");return b}function r(a){var b= +{};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=u;return b}function b(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var d=b.getLineNumber(),e=b.getColumnNumber()-1;1===d&&62"); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + line += fileLocation; + addSuffix = false; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; +} + +function cloneCallSite(frame) { + var object = {}; + Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { + object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; + }); + object.toString = CallSiteToString; + return object; +} + +function wrapCallSite(frame) { + if(frame.isNative()) { + return frame; + } + + // Most call sites will return the source file from getFileName(), but code + // passed to eval() ending in "//# sourceURL=..." will return the source file + // from getScriptNameOrSourceURL() instead + var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); + if (source) { + var line = frame.getLineNumber(); + var column = frame.getColumnNumber() - 1; + + // Fix position in Node where some (internal) code is prepended. + // See https://github.com/evanw/node-source-map-support/issues/36 + var headerLength = 62; + if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { + column -= headerLength; + } + + var position = mapSourcePosition({ + source: source, + line: line, + column: column + }); + frame = cloneCallSite(frame); + frame.getFileName = function() { return position.source; }; + frame.getLineNumber = function() { return position.line; }; + frame.getColumnNumber = function() { return position.column + 1; }; + frame.getScriptNameOrSourceURL = function() { return position.source; }; + return frame; + } + + // Code called using eval() needs special handling + var origin = frame.isEval() && frame.getEvalOrigin(); + if (origin) { + origin = mapEvalOrigin(origin); + frame = cloneCallSite(frame); + frame.getEvalOrigin = function() { return origin; }; + return frame; + } + + // If we get here then we were unable to change the source position + return frame; +} + +// This function is part of the V8 stack trace API, for more info see: +// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi +function prepareStackTrace(error, stack) { + if (emptyCacheBetweenOperations) { + fileContentsCache = {}; + sourceMapCache = {}; + } + + return error + stack.map(function(frame) { + return '\n at ' + wrapCallSite(frame); + }).join(''); +} + +// Generate position and snippet of original source with pointer +function getErrorSource(error) { + var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); + if (match) { + var source = match[1]; + var line = +match[2]; + var column = +match[3]; + + // Support the inline sourceContents inside the source map + var contents = fileContentsCache[source]; + + // Support files on disk + if (!contents && fs && fs.existsSync(source)) { + try { + contents = fs.readFileSync(source, 'utf8'); + } catch (er) { + contents = ''; + } + } + + // Format the line from the original source code like node does + if (contents) { + var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; + if (code) { + return source + ':' + line + '\n' + code + '\n' + + new Array(column).join(' ') + '^'; + } + } + } + return null; +} + +function printErrorAndExit (error) { + var source = getErrorSource(error); + + if (source) { + console.error(); + console.error(source); + } + + console.error(error.stack); + process.exit(1); +} + +function shimEmitUncaughtException () { + var origEmit = process.emit; + + process.emit = function (type) { + if (type === 'uncaughtException') { + var hasStack = (arguments[1] && arguments[1].stack); + var hasListeners = (this.listeners(type).length > 0); + + if (hasStack && !hasListeners) { + return printErrorAndExit(arguments[1]); + } + } + + return origEmit.apply(this, arguments); + }; +} + +exports.wrapCallSite = wrapCallSite; +exports.getErrorSource = getErrorSource; +exports.mapSourcePosition = mapSourcePosition; +exports.retrieveSourceMap = retrieveSourceMap; + +exports.install = function(options) { + options = options || {}; + + if (options.environment) { + environment = options.environment; + if (["node", "browser", "auto"].indexOf(environment) === -1) { + throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") + } + } + + // Allow sources to be found by methods other than reading the files + // directly from disk. + if (options.retrieveFile) { + if (options.overrideRetrieveFile) { + retrieveFileHandlers.length = 0; + } + + retrieveFileHandlers.unshift(options.retrieveFile); + } + + // Allow source maps to be found by methods other than reading the files + // directly from disk. + if (options.retrieveSourceMap) { + if (options.overrideRetrieveSourceMap) { + retrieveMapHandlers.length = 0; + } + + retrieveMapHandlers.unshift(options.retrieveSourceMap); + } + + // Support runtime transpilers that include inline source maps + if (options.hookRequire && !isInBrowser()) { + var Module; + try { + Module = require('module'); + } catch (err) { + // NOP: Loading in catch block to convert webpack error to warning. + } + var $compile = Module.prototype._compile; + + if (!$compile.__sourceMapSupport) { + Module.prototype._compile = function(content, filename) { + fileContentsCache[filename] = content; + sourceMapCache[filename] = undefined; + return $compile.call(this, content, filename); + }; + + Module.prototype._compile.__sourceMapSupport = true; + } + } + + // Configure options + if (!emptyCacheBetweenOperations) { + emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? + options.emptyCacheBetweenOperations : false; + } + + // Install the error reformatter + if (!errorFormatterInstalled) { + errorFormatterInstalled = true; + Error.prepareStackTrace = prepareStackTrace; + } + + if (!uncaughtShimInstalled) { + var installHandler = 'handleUncaughtExceptions' in options ? + options.handleUncaughtExceptions : true; + + // Provide the option to not install the uncaught exception handler. This is + // to support other uncaught exception handlers (in test frameworks, for + // example). If this handler is not installed and there are no other uncaught + // exception handlers, uncaught exceptions will be caught by node's built-in + // exception handler and the process will still be terminated. However, the + // generated JavaScript code will be shown above the stack trace instead of + // the original source code. + if (installHandler && hasGlobalProcessEventEmitter()) { + uncaughtShimInstalled = true; + shimEmitUncaughtException(); + } + } +}; diff --git a/test-eol-project/node_modules/source-map/CHANGELOG.md b/test-eol-project/node_modules/source-map/CHANGELOG.md new file mode 100644 index 00000000..3a8c066c --- /dev/null +++ b/test-eol-project/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,301 @@ +# 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/test-eol-project/node_modules/source-map/LICENSE b/test-eol-project/node_modules/source-map/LICENSE new file mode 100644 index 00000000..ed1b7cf2 --- /dev/null +++ b/test-eol-project/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +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/test-eol-project/node_modules/source-map/README.md b/test-eol-project/node_modules/source-map/README.md new file mode 100644 index 00000000..32813394 --- /dev/null +++ b/test-eol-project/node_modules/source-map/README.md @@ -0,0 +1,729 @@ +# 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/test-eol-project/node_modules/source-map/dist/source-map.debug.js b/test-eol-project/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 00000000..b5ab6382 --- /dev/null +++ b/test-eol-project/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3091 @@ +(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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7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KSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAg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lUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3Rhb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B7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/test-eol-project/node_modules/source-map/dist/source-map.js b/test-eol-project/node_modules/source-map/dist/source-map.js new file mode 100644 index 00000000..4e630e29 --- /dev/null +++ b/test-eol-project/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3090 @@ +(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/test-eol-project/node_modules/source-map/dist/source-map.min.js b/test-eol-project/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 00000000..f2a46bd0 --- /dev/null +++ b/test-eol-project/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!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/test-eol-project/node_modules/source-map/lib/array-set.js b/test-eol-project/node_modules/source-map/lib/array-set.js new file mode 100644 index 00000000..fbd5c81c --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/base64-vlq.js b/test-eol-project/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 00000000..612b4040 --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/base64.js b/test-eol-project/node_modules/source-map/lib/base64.js new file mode 100644 index 00000000..8aa86b30 --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/binary-search.js b/test-eol-project/node_modules/source-map/lib/binary-search.js new file mode 100644 index 00000000..010ac941 --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/mapping-list.js b/test-eol-project/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 00000000..06d1274a --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/quick-sort.js b/test-eol-project/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 00000000..6a7caadb --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/source-map-consumer.js b/test-eol-project/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 00000000..6abcc280 --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1082 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/source-map-generator.js b/test-eol-project/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 00000000..aff1e7fb --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,416 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/source-node.js b/test-eol-project/node_modules/source-map/lib/source-node.js new file mode 100644 index 00000000..d196a53f --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- 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/test-eol-project/node_modules/source-map/lib/util.js b/test-eol-project/node_modules/source-map/lib/util.js new file mode 100644 index 00000000..44e0e452 --- /dev/null +++ b/test-eol-project/node_modules/source-map/lib/util.js @@ -0,0 +1,417 @@ +/* -*- 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/test-eol-project/node_modules/source-map/package.json b/test-eol-project/node_modules/source-map/package.json new file mode 100644 index 00000000..048e3ae8 --- /dev/null +++ b/test-eol-project/node_modules/source-map/package.json @@ -0,0 +1,72 @@ +{ + "name": "source-map", + "description": "Generates and consumes source maps", + "version": "0.5.7", + "homepage": "https://github.com/mozilla/source-map", + "author": "Nick Fitzgerald ", + "contributors": [ + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": { + "type": "git", + "url": "http://github.com/mozilla/source-map.git" + }, + "main": "./source-map.js", + "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" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "typings": "source-map" +} diff --git a/test-eol-project/node_modules/source-map/source-map.js b/test-eol-project/node_modules/source-map/source-map.js new file mode 100644 index 00000000..bc88fe82 --- /dev/null +++ b/test-eol-project/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * 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/test-eol-project/node_modules/sshpk/.travis.yml b/test-eol-project/node_modules/sshpk/.travis.yml new file mode 100644 index 00000000..c3394c25 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "5.10" + - "4.4" + - "4.1" + - "0.12" + - "0.10" +before_install: + - "make check" +after_success: + - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio' diff --git a/test-eol-project/node_modules/sshpk/Jenkinsfile b/test-eol-project/node_modules/sshpk/Jenkinsfile new file mode 100644 index 00000000..cd0bf225 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/Jenkinsfile @@ -0,0 +1,86 @@ +@Library('jenkins-joylib@v1.0.8') _ + +pipeline { + + agent none + + options { + buildDiscarder(logRotator(numToKeepStr: '30')) + timestamps() + } + + stages { + stage('top') { + parallel { + stage('v0.10.48-zone') { + agent { + label joyCommonLabels(image_ver: '15.4.1') + } + tools { + nodejs 'sdcnode-v0.10.48-zone' + } + stages { + stage('check') { + steps{ + sh('make check') + } + } + stage('test') { + steps{ + sh('make test') + } + } + } + } + + stage('v4-zone') { + agent { + label joyCommonLabels(image_ver: '15.4.1') + } + tools { + nodejs 'sdcnode-v4-zone' + } + stages { + stage('check') { + steps{ + sh('make check') + } + } + stage('test') { + steps{ + sh('make test') + } + } + } + } + + stage('v6-zone64') { + agent { + label joyCommonLabels(image_ver: '18.4.0') + } + tools { + nodejs 'sdcnode-v6-zone64' + } + stages { + stage('check') { + steps{ + sh('make check') + } + } + stage('test') { + steps{ + sh('make test') + } + } + } + } + } + } + } + + post { + always { + joySlackNotifications() + } + } +} diff --git a/test-eol-project/node_modules/sshpk/LICENSE b/test-eol-project/node_modules/sshpk/LICENSE new file mode 100644 index 00000000..f6d947d2 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. 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/test-eol-project/node_modules/sshpk/README.md b/test-eol-project/node_modules/sshpk/README.md new file mode 100644 index 00000000..5740f74d --- /dev/null +++ b/test-eol-project/node_modules/sshpk/README.md @@ -0,0 +1,804 @@ +sshpk +========= + +Parse, convert, fingerprint and use SSH keys (both public and private) in pure +node -- no `ssh-keygen` or other external dependencies. + +Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1, +PKCS#8) and OpenSSH formats. + +This library has been extracted from +[`node-http-signature`](https://github.com/joyent/node-http-signature) +(work by [Mark Cavage](https://github.com/mcavage) and +[Dave Eddy](https://github.com/bahamas10)) and +[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint) +(work by Dave Eddy), with additions (including ECDSA support) by +[Alex Wilson](https://github.com/arekinath). + +Install +------- + +``` +npm install sshpk +``` + +Examples +-------- + +```js +var sshpk = require('sshpk'); + +var fs = require('fs'); + +/* Read in an OpenSSH-format public key */ +var keyPub = fs.readFileSync('id_rsa.pub'); +var key = sshpk.parseKey(keyPub, 'ssh'); + +/* Get metadata about the key */ +console.log('type => %s', key.type); +console.log('size => %d bits', key.size); +console.log('comment => %s', key.comment); + +/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */ +console.log('fingerprint => %s', key.fingerprint().toString()); +console.log('old-style fingerprint => %s', key.fingerprint('md5').toString()); +``` + +Example output: + +``` +type => rsa +size => 2048 bits +comment => foo@foo.com +fingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w +old-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd +``` + +More examples: converting between formats: + +```js +/* Read in a PEM public key */ +var keyPem = fs.readFileSync('id_rsa.pem'); +var key = sshpk.parseKey(keyPem, 'pem'); + +/* Convert to PEM PKCS#8 public key format */ +var pemBuf = key.toBuffer('pkcs8'); + +/* Convert to SSH public key format (and return as a string) */ +var sshKey = key.toString('ssh'); +``` + +Signing and verifying: + +```js +/* Read in an OpenSSH/PEM *private* key */ +var keyPriv = fs.readFileSync('id_ecdsa'); +var key = sshpk.parsePrivateKey(keyPriv, 'pem'); + +var data = 'some data'; + +/* Sign some data with the key */ +var s = key.createSign('sha1'); +s.update(data); +var signature = s.sign(); + +/* Now load the public key (could also use just key.toPublic()) */ +var keyPub = fs.readFileSync('id_ecdsa.pub'); +key = sshpk.parseKey(keyPub, 'ssh'); + +/* Make a crypto.Verifier with this key */ +var v = key.createVerify('sha1'); +v.update(data); +var valid = v.verify(signature); +/* => true! */ +``` + +Matching fingerprints with keys: + +```js +var fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w'); + +var keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...]; + +keys.forEach(function (key) { + if (fp.matches(key)) + console.log('found it!'); +}); +``` + +Usage +----- + +## Public keys + +### `parseKey(data[, format = 'auto'[, options]])` + +Parses a key from a given data format and returns a new `Key` object. + +Parameters + +- `data` -- Either a Buffer or String, containing the key +- `format` -- String name of format to use, valid options are: + - `auto`: choose automatically from all below + - `pem`: supports both PKCS#1 and PKCS#8 + - `ssh`: standard OpenSSH format, + - `pkcs1`, `pkcs8`: variants of `pem` + - `rfc4253`: raw OpenSSH wire format + - `openssh`: new post-OpenSSH 6.5 internal format, produced by + `ssh-keygen -o` + - `dnssec`: `.key` file format output by `dnssec-keygen` etc + - `putty`: the PuTTY `.ppk` file format (supports truncated variant without + all the lines from `Private-Lines:` onwards) +- `options` -- Optional Object, extra options, with keys: + - `filename` -- Optional String, name for the key being parsed + (eg. the filename that was opened). Used to generate + Error messages + - `passphrase` -- Optional String, encryption passphrase used to decrypt an + encrypted PEM file + +### `Key.isKey(obj)` + +Returns `true` if the given object is a valid `Key` object created by a version +of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `Key#type` + +String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. + +### `Key#size` + +Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; +for ECDSA this is the bit size of the curve in use. + +### `Key#comment` + +Optional string, a key comment used by some formats (eg the `ssh` format). + +### `Key#curve` + +Only present if `this.type === 'ecdsa'`, string containing the name of the +named curve used with this key. Possible values include `nistp256`, `nistp384` +and `nistp521`. + +### `Key#toBuffer([format = 'ssh'])` + +Convert the key into a given data format and return the serialized key as +a Buffer. + +Parameters + +- `format` -- String name of format to use, for valid options see `parseKey()` + +### `Key#toString([format = 'ssh])` + +Same as `this.toBuffer(format).toString()`. + +### `Key#fingerprint([algorithm = 'sha256'[, hashType = 'ssh']])` + +Creates a new `Fingerprint` object representing this Key's fingerprint. + +Parameters + +- `algorithm` -- String name of hash algorithm to use, valid options are `md5`, + `sha1`, `sha256`, `sha384`, `sha512` +- `hashType` -- String name of fingerprint hash type to use, valid options are + `ssh` (the type of fingerprint used by OpenSSH, e.g. in + `ssh-keygen`), `spki` (used by HPKP, some OpenSSL applications) + +### `Key#createVerify([hashAlgorithm])` + +Creates a `crypto.Verifier` specialized to use this Key (and the correct public +key algorithm to match it). The returned Verifier has the same API as a regular +one, except that the `verify()` function takes only the target signature as an +argument. + +Parameters + +- `hashAlgorithm` -- optional String name of hash algorithm to use, any + supported by OpenSSL are valid, usually including + `sha1`, `sha256`. + +`v.verify(signature[, format])` Parameters + +- `signature` -- either a Signature object, or a Buffer or String +- `format` -- optional String, name of format to interpret given String with. + Not valid if `signature` is a Signature or Buffer. + +### `Key#createDiffieHellman()` +### `Key#createDH()` + +Creates a Diffie-Hellman key exchange object initialized with this key and all +necessary parameters. This has the same API as a `crypto.DiffieHellman` +instance, except that functions take `Key` and `PrivateKey` objects as +arguments, and return them where indicated for. + +This is only valid for keys belonging to a cryptosystem that supports DHE +or a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt +to call this function on other keys will yield an `Error`. + +## Private keys + +### `parsePrivateKey(data[, format = 'auto'[, options]])` + +Parses a private key from a given data format and returns a new +`PrivateKey` object. + +Parameters + +- `data` -- Either a Buffer or String, containing the key +- `format` -- String name of format to use, valid options are: + - `auto`: choose automatically from all below + - `pem`: supports both PKCS#1 and PKCS#8 + - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by + `ssh-keygen -o` + - `pkcs1`, `pkcs8`: variants of `pem` + - `rfc4253`: raw OpenSSH wire format + - `dnssec`: `.private` format output by `dnssec-keygen` etc. +- `options` -- Optional Object, extra options, with keys: + - `filename` -- Optional String, name for the key being parsed + (eg. the filename that was opened). Used to generate + Error messages + - `passphrase` -- Optional String, encryption passphrase used to decrypt an + encrypted PEM file + +### `generatePrivateKey(type[, options])` + +Generates a new private key of a certain key type, from random data. + +Parameters + +- `type` -- String, type of key to generate. Currently supported are `'ecdsa'` + and `'ed25519'` +- `options` -- optional Object, with keys: + - `curve` -- optional String, for `'ecdsa'` keys, specifies the curve to use. + If ECDSA is specified and this option is not given, defaults to + using `'nistp256'`. + +### `PrivateKey.isPrivateKey(obj)` + +Returns `true` if the given object is a valid `PrivateKey` object created by a +version of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `PrivateKey#type` + +String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. + +### `PrivateKey#size` + +Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; +for ECDSA this is the bit size of the curve in use. + +### `PrivateKey#curve` + +Only present if `this.type === 'ecdsa'`, string containing the name of the +named curve used with this key. Possible values include `nistp256`, `nistp384` +and `nistp521`. + +### `PrivateKey#toBuffer([format = 'pkcs1'])` + +Convert the key into a given data format and return the serialized key as +a Buffer. + +Parameters + +- `format` -- String name of format to use, valid options are listed under + `parsePrivateKey`. Note that ED25519 keys default to `openssh` + format instead (as they have no `pkcs1` representation). + +### `PrivateKey#toString([format = 'pkcs1'])` + +Same as `this.toBuffer(format).toString()`. + +### `PrivateKey#toPublic()` + +Extract just the public part of this private key, and return it as a `Key` +object. + +### `PrivateKey#fingerprint([algorithm = 'sha256'])` + +Same as `this.toPublic().fingerprint()`. + +### `PrivateKey#createVerify([hashAlgorithm])` + +Same as `this.toPublic().createVerify()`. + +### `PrivateKey#createSign([hashAlgorithm])` + +Creates a `crypto.Sign` specialized to use this PrivateKey (and the correct +key algorithm to match it). The returned Signer has the same API as a regular +one, except that the `sign()` function takes no arguments, and returns a +`Signature` object. + +Parameters + +- `hashAlgorithm` -- optional String name of hash algorithm to use, any + supported by OpenSSL are valid, usually including + `sha1`, `sha256`. + +`v.sign()` Parameters + +- none + +### `PrivateKey#derive(newType)` + +Derives a related key of type `newType` from this key. Currently this is +only supported to change between `ed25519` and `curve25519` keys which are +stored with the same private key (but usually distinct public keys in order +to avoid degenerate keys that lead to a weak Diffie-Hellman exchange). + +Parameters + +- `newType` -- String, type of key to derive, either `ed25519` or `curve25519` + +## Fingerprints + +### `parseFingerprint(fingerprint[, options])` + +Pre-parses a fingerprint, creating a `Fingerprint` object that can be used to +quickly locate a key by using the `Fingerprint#matches` function. + +Parameters + +- `fingerprint` -- String, the fingerprint value, in any supported format +- `options` -- Optional Object, with properties: + - `algorithms` -- Array of strings, names of hash algorithms to limit + support to. If `fingerprint` uses a hash algorithm not on + this list, throws `InvalidAlgorithmError`. + - `hashType` -- String, the type of hash the fingerprint uses, either `ssh` + or `spki` (normally auto-detected based on the format, but + can be overridden) + - `type` -- String, the entity this fingerprint identifies, either `key` or + `certificate` + +### `Fingerprint.isFingerprint(obj)` + +Returns `true` if the given object is a valid `Fingerprint` object created by a +version of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `Fingerprint#toString([format])` + +Returns a fingerprint as a string, in the given format. + +Parameters + +- `format` -- Optional String, format to use, valid options are `hex` and + `base64`. If this `Fingerprint` uses the `md5` algorithm, the + default format is `hex`. Otherwise, the default is `base64`. + +### `Fingerprint#matches(keyOrCertificate)` + +Verifies whether or not this `Fingerprint` matches a given `Key` or +`Certificate`. This function uses double-hashing to avoid leaking timing +information. Returns a boolean. + +Note that a `Key`-type Fingerprint will always return `false` if asked to match +a `Certificate` and vice versa. + +Parameters + +- `keyOrCertificate` -- a `Key` object or `Certificate` object, the entity to + match this fingerprint against + +## Signatures + +### `parseSignature(signature, algorithm, format)` + +Parses a signature in a given format, creating a `Signature` object. Useful +for converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and +also returned as output from `PrivateKey#createSign().sign()`. + +A Signature object can also be passed to a verifier produced by +`Key#createVerify()` and it will automatically be converted internally into the +correct format for verification. + +Parameters + +- `signature` -- a Buffer (binary) or String (base64), data of the actual + signature in the given format +- `algorithm` -- a String, name of the algorithm to be used, possible values + are `rsa`, `dsa`, `ecdsa` +- `format` -- a String, either `asn1` or `ssh` + +### `Signature.isSignature(obj)` + +Returns `true` if the given object is a valid `Signature` object created by a +version of `sshpk` compatible with this one. + +Parameters + +- `obj` -- Object to identify + +### `Signature#toBuffer([format = 'asn1'])` + +Converts a Signature to the given format and returns it as a Buffer. + +Parameters + +- `format` -- a String, either `asn1` or `ssh` + +### `Signature#toString([format = 'asn1'])` + +Same as `this.toBuffer(format).toString('base64')`. + +## Certificates + +`sshpk` includes basic support for parsing certificates in X.509 (PEM) format +and the OpenSSH certificate format. This feature is intended to be used mainly +to access basic metadata about certificates, extract public keys from them, and +also to generate simple self-signed certificates from an existing key. + +Notably, there is no implementation of CA chain-of-trust verification, and only +very minimal support for key usage restrictions. Please do the security world +a favour, and DO NOT use this code for certificate verification in the +traditional X.509 CA chain style. + +### `parseCertificate(data, format)` + +Parameters + + - `data` -- a Buffer or String + - `format` -- a String, format to use, one of `'openssh'`, `'pem'` (X.509 in a + PEM wrapper), or `'x509'` (raw DER encoded) + +### `createSelfSignedCertificate(subject, privateKey[, options])` + +Parameters + + - `subject` -- an Identity, the subject of the certificate + - `privateKey` -- a PrivateKey, the key of the subject: will be used both to be + placed in the certificate and also to sign it (since this is + a self-signed certificate) + - `options` -- optional Object, with keys: + - `lifetime` -- optional Number, lifetime of the certificate from now in + seconds + - `validFrom`, `validUntil` -- optional Dates, beginning and end of + certificate validity period. If given + `lifetime` will be ignored + - `serial` -- optional Buffer, the serial number of the certificate + - `purposes` -- optional Array of String, X.509 key usage restrictions + +### `createCertificate(subject, key, issuer, issuerKey[, options])` + +Parameters + + - `subject` -- an Identity, the subject of the certificate + - `key` -- a Key, the public key of the subject + - `issuer` -- an Identity, the issuer of the certificate who will sign it + - `issuerKey` -- a PrivateKey, the issuer's private key for signing + - `options` -- optional Object, with keys: + - `lifetime` -- optional Number, lifetime of the certificate from now in + seconds + - `validFrom`, `validUntil` -- optional Dates, beginning and end of + certificate validity period. If given + `lifetime` will be ignored + - `serial` -- optional Buffer, the serial number of the certificate + - `purposes` -- optional Array of String, X.509 key usage restrictions + +### `Certificate#subjects` + +Array of `Identity` instances describing the subject of this certificate. + +### `Certificate#issuer` + +The `Identity` of the Certificate's issuer (signer). + +### `Certificate#subjectKey` + +The public key of the subject of the certificate, as a `Key` instance. + +### `Certificate#issuerKey` + +The public key of the signing issuer of this certificate, as a `Key` instance. +May be `undefined` if the issuer's key is unknown (e.g. on an X509 certificate). + +### `Certificate#serial` + +The serial number of the certificate. As this is normally a 64-bit or wider +integer, it is returned as a Buffer. + +### `Certificate#purposes` + +Array of Strings indicating the X.509 key usage purposes that this certificate +is valid for. The possible strings at the moment are: + + * `'signature'` -- key can be used for digital signatures + * `'identity'` -- key can be used to attest about the identity of the signer + (X.509 calls this `nonRepudiation`) + * `'codeSigning'` -- key can be used to sign executable code + * `'keyEncryption'` -- key can be used to encrypt other keys + * `'encryption'` -- key can be used to encrypt data (only applies for RSA) + * `'keyAgreement'` -- key can be used for key exchange protocols such as + Diffie-Hellman + * `'ca'` -- key can be used to sign other certificates (is a Certificate + Authority) + * `'crl'` -- key can be used to sign Certificate Revocation Lists (CRLs) + +### `Certificate#getExtension(nameOrOid)` + +Retrieves information about a certificate extension, if present, or returns +`undefined` if not. The string argument `nameOrOid` should be either the OID +(for X509 extensions) or the name (for OpenSSH extensions) of the extension +to retrieve. + +The object returned will have the following properties: + + * `format` -- String, set to either `'x509'` or `'openssh'` + * `name` or `oid` -- String, only one set based on value of `format` + * `data` -- Buffer, the raw data inside the extension + +### `Certificate#getExtensions()` + +Returns an Array of all present certificate extensions, in the same manner and +format as `getExtension()`. + +### `Certificate#isExpired([when])` + +Tests whether the Certificate is currently expired (i.e. the `validFrom` and +`validUntil` dates specify a range of time that does not include the current +time). + +Parameters + + - `when` -- optional Date, if specified, tests whether the Certificate was or + will be expired at the specified time instead of now + +Returns a Boolean. + +### `Certificate#isSignedByKey(key)` + +Tests whether the Certificate was validly signed by the given (public) Key. + +Parameters + + - `key` -- a Key instance + +Returns a Boolean. + +### `Certificate#isSignedBy(certificate)` + +Tests whether this Certificate was validly signed by the subject of the given +certificate. Also tests that the issuer Identity of this Certificate and the +subject Identity of the other Certificate are equivalent. + +Parameters + + - `certificate` -- another Certificate instance + +Returns a Boolean. + +### `Certificate#fingerprint([hashAlgo])` + +Returns the X509-style fingerprint of the entire certificate (as a Fingerprint +instance). This matches what a web-browser or similar would display as the +certificate fingerprint and should not be confused with the fingerprint of the +subject's public key. + +Parameters + + - `hashAlgo` -- an optional String, any hash function name + +### `Certificate#toBuffer([format])` + +Serializes the Certificate to a Buffer and returns it. + +Parameters + + - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or + `'x509'`. Defaults to `'x509'`. + +Returns a Buffer. + +### `Certificate#toString([format])` + + - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or + `'x509'`. Defaults to `'pem'`. + +Returns a String. + +## Certificate identities + +### `identityForHost(hostname)` + +Constructs a host-type Identity for a given hostname. + +Parameters + + - `hostname` -- the fully qualified DNS name of the host + +Returns an Identity instance. + +### `identityForUser(uid)` + +Constructs a user-type Identity for a given UID. + +Parameters + + - `uid` -- a String, user identifier (login name) + +Returns an Identity instance. + +### `identityForEmail(email)` + +Constructs an email-type Identity for a given email address. + +Parameters + + - `email` -- a String, email address + +Returns an Identity instance. + +### `identityFromDN(dn)` + +Parses an LDAP-style DN string (e.g. `'CN=foo, C=US'`) and turns it into an +Identity instance. + +Parameters + + - `dn` -- a String + +Returns an Identity instance. + +### `identityFromArray(arr)` + +Constructs an Identity from an array of DN components (see `Identity#toArray()` +for the format). + +Parameters + + - `arr` -- an Array of Objects, DN components with `name` and `value` + +Returns an Identity instance. + + +Supported attributes in DNs: + +| Attribute name | OID | +| -------------- | --- | +| `cn` | `2.5.4.3` | +| `o` | `2.5.4.10` | +| `ou` | `2.5.4.11` | +| `l` | `2.5.4.7` | +| `s` | `2.5.4.8` | +| `c` | `2.5.4.6` | +| `sn` | `2.5.4.4` | +| `postalCode` | `2.5.4.17` | +| `serialNumber` | `2.5.4.5` | +| `street` | `2.5.4.9` | +| `x500UniqueIdentifier` | `2.5.4.45` | +| `role` | `2.5.4.72` | +| `telephoneNumber` | `2.5.4.20` | +| `description` | `2.5.4.13` | +| `dc` | `0.9.2342.19200300.100.1.25` | +| `uid` | `0.9.2342.19200300.100.1.1` | +| `mail` | `0.9.2342.19200300.100.1.3` | +| `title` | `2.5.4.12` | +| `gn` | `2.5.4.42` | +| `initials` | `2.5.4.43` | +| `pseudonym` | `2.5.4.65` | + +### `Identity#toString()` + +Returns the identity as an LDAP-style DN string. +e.g. `'CN=foo, O=bar corp, C=us'` + +### `Identity#type` + +The type of identity. One of `'host'`, `'user'`, `'email'` or `'unknown'` + +### `Identity#hostname` +### `Identity#uid` +### `Identity#email` + +Set when `type` is `'host'`, `'user'`, or `'email'`, respectively. Strings. + +### `Identity#cn` + +The value of the first `CN=` in the DN, if any. It's probably better to use +the `#get()` method instead of this property. + +### `Identity#get(name[, asArray])` + +Returns the value of a named attribute in the Identity DN. If there is no +attribute of the given name, returns `undefined`. If multiple components +of the DN contain an attribute of this name, an exception is thrown unless +the `asArray` argument is given as `true` -- then they will be returned as +an Array in the same order they appear in the DN. + +Parameters + + - `name` -- a String + - `asArray` -- an optional Boolean + +### `Identity#toArray()` + +Returns the Identity as an Array of DN component objects. This looks like: + +```js +[ { + "name": "cn", + "value": "Joe Bloggs" +}, +{ + "name": "o", + "value": "Organisation Ltd" +} ] +``` + +Each object has a `name` and a `value` property. The returned objects may be +safely modified. + +Errors +------ + +### `InvalidAlgorithmError` + +The specified algorithm is not valid, either because it is not supported, or +because it was not included on a list of allowed algorithms. + +Thrown by `Fingerprint.parse`, `Key#fingerprint`. + +Properties + +- `algorithm` -- the algorithm that could not be validated + +### `FingerprintFormatError` + +The fingerprint string given could not be parsed as a supported fingerprint +format, or the specified fingerprint format is invalid. + +Thrown by `Fingerprint.parse`, `Fingerprint#toString`. + +Properties + +- `fingerprint` -- if caused by a fingerprint, the string value given +- `format` -- if caused by an invalid format specification, the string value given + +### `KeyParseError` + +The key data given could not be parsed as a valid key. + +Properties + +- `keyName` -- `filename` that was given to `parseKey` +- `format` -- the `format` that was trying to parse the key (see `parseKey`) +- `innerErr` -- the inner Error thrown by the format parser + +### `KeyEncryptedError` + +The key is encrypted with a symmetric key (ie, it is password protected). The +parsing operation would succeed if it was given the `passphrase` option. + +Properties + +- `keyName` -- `filename` that was given to `parseKey` +- `format` -- the `format` that was trying to parse the key (currently can only + be `"pem"`) + +### `CertificateParseError` + +The certificate data given could not be parsed as a valid certificate. + +Properties + +- `certName` -- `filename` that was given to `parseCertificate` +- `format` -- the `format` that was trying to parse the key + (see `parseCertificate`) +- `innerErr` -- the inner Error thrown by the format parser + +Friends of sshpk +---------------- + + * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library + for speaking the `ssh-agent` protocol from node.js, which uses `sshpk` diff --git a/test-eol-project/node_modules/sshpk/lib/algs.js b/test-eol-project/node_modules/sshpk/lib/algs.js new file mode 100644 index 00000000..3b01e7d1 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/algs.js @@ -0,0 +1,168 @@ +// Copyright 2015 Joyent, Inc. + +var Buffer = require('safer-buffer').Buffer; + +var algInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y'], + sizePart: 'p' + }, + 'rsa': { + parts: ['e', 'n'], + sizePart: 'n' + }, + 'ecdsa': { + parts: ['curve', 'Q'], + sizePart: 'Q' + }, + 'ed25519': { + parts: ['A'], + sizePart: 'A' + } +}; +algInfo['curve25519'] = algInfo['ed25519']; + +var algPrivInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y', 'x'] + }, + 'rsa': { + parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] + }, + 'ecdsa': { + parts: ['curve', 'Q', 'd'] + }, + 'ed25519': { + parts: ['A', 'k'] + } +}; +algPrivInfo['curve25519'] = algPrivInfo['ed25519']; + +var hashAlgs = { + 'md5': true, + 'sha1': true, + 'sha256': true, + 'sha384': true, + 'sha512': true +}; + +/* + * Taken from + * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf + */ +var curves = { + 'nistp256': { + size: 256, + pkcs8oid: '1.2.840.10045.3.1.7', + p: Buffer.from(('00' + + 'ffffffff 00000001 00000000 00000000' + + '00000000 ffffffff ffffffff ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF 00000001 00000000 00000000' + + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'c49d3608 86e70493 6a6678e1 139d26b7' + + '819f7e90'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff 00000000 ffffffff ffffffff' + + 'bce6faad a7179e84 f3b9cac2 fc632551'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + + '77037d81 2deb33a0 f4a13945 d898c296' + + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + + '2bce3357 6b315ece cbb64068 37bf51f5'). + replace(/ /g, ''), 'hex') + }, + 'nistp384': { + size: 384, + pkcs8oid: '1.3.132.0.34', + p: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffe' + + 'ffffffff 00000000 00000000 ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + 'b3312fa7 e23ee7e4 988e056b e3f82d19' + + '181d9c6e fe814112 0314088f 5013875a' + + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'a335926a a319a27a 1d00896a 6773a482' + + '7acdac73'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff c7634d81 f4372ddf' + + '581a0db2 48b0a77a ecec196a ccc52973'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + + '6e1d3b62 8ba79b98 59f741e0 82542a38' + + '5502f25d bf55296c 3a545e38 72760ab7' + + '3617de4a 96262c6f 5d9e98bf 9292dc29' + + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). + replace(/ /g, ''), 'hex') + }, + 'nistp521': { + size: 521, + pkcs8oid: '1.3.132.0.35', + p: Buffer.from(( + '01ffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffff').replace(/ /g, ''), 'hex'), + a: Buffer.from(('01FF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(('51' + + '953eb961 8e1c9a1f 929a21a0 b68540ee' + + 'a2da725b 99b315f3 b8b48991 8ef109e1' + + '56193951 ec7e937b 1652c0bd 3bb1bf07' + + '3573df88 3d2c34f1 ef451fd4 6b503f00'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'd09e8800 291cb853 96cc6717 393284aa' + + 'a0da64ba').replace(/ /g, ''), 'hex'), + n: Buffer.from(('01ff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffa' + + '51868783 bf2f966b 7fcc0148 f709a5d0' + + '3bb5c9b8 899c47ae bb6fb71e 91386409'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + + '9c648139 053fb521 f828af60 6b4d3dba' + + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + + '3348b3c1 856a429b f97e7e31 c2e5bd66' + + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + + '98f54449 579b4468 17afbd17 273e662c' + + '97ee7299 5ef42640 c550b901 3fad0761' + + '353c7086 a272c240 88be9476 9fd16650'). + replace(/ /g, ''), 'hex') + } +}; + +module.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs: hashAlgs, + curves: curves +}; diff --git a/test-eol-project/node_modules/sshpk/lib/certificate.js b/test-eol-project/node_modules/sshpk/lib/certificate.js new file mode 100644 index 00000000..69323570 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/certificate.js @@ -0,0 +1,410 @@ +// Copyright 2016 Joyent, Inc. + +module.exports = Certificate; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('./algs'); +var crypto = require('crypto'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var errs = require('./errors'); +var util = require('util'); +var utils = require('./utils'); +var Key = require('./key'); +var PrivateKey = require('./private-key'); +var Identity = require('./identity'); + +var formats = {}; +formats['openssh'] = require('./formats/openssh-cert'); +formats['x509'] = require('./formats/x509'); +formats['pem'] = require('./formats/x509-pem'); + +var CertificateParseError = errs.CertificateParseError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Certificate(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.subjects, 'options.subjects'); + utils.assertCompatible(opts.subjects[0], Identity, [1, 0], + 'options.subjects'); + utils.assertCompatible(opts.subjectKey, Key, [1, 0], + 'options.subjectKey'); + utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); + if (opts.issuerKey !== undefined) { + utils.assertCompatible(opts.issuerKey, Key, [1, 0], + 'options.issuerKey'); + } + assert.object(opts.signatures, 'options.signatures'); + assert.buffer(opts.serial, 'options.serial'); + assert.date(opts.validFrom, 'options.validFrom'); + assert.date(opts.validUntil, 'optons.validUntil'); + + assert.optionalArrayOfString(opts.purposes, 'options.purposes'); + + this._hashCache = {}; + + this.subjects = opts.subjects; + this.issuer = opts.issuer; + this.subjectKey = opts.subjectKey; + this.issuerKey = opts.issuerKey; + this.signatures = opts.signatures; + this.serial = opts.serial; + this.validFrom = opts.validFrom; + this.validUntil = opts.validUntil; + this.purposes = opts.purposes; +} + +Certificate.formats = formats; + +Certificate.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'x509'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +Certificate.prototype.toString = function (format, options) { + if (format === undefined) + format = 'pem'; + return (this.toBuffer(format, options).toString()); +}; + +Certificate.prototype.fingerprint = function (algo) { + if (algo === undefined) + algo = 'sha256'; + assert.string(algo, 'algorithm'); + var opts = { + type: 'certificate', + hash: this.hash(algo), + algorithm: algo + }; + return (new Fingerprint(opts)); +}; + +Certificate.prototype.hash = function (algo) { + assert.string(algo, 'algorithm'); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + if (this._hashCache[algo]) + return (this._hashCache[algo]); + + var hash = crypto.createHash(algo). + update(this.toBuffer('x509')).digest(); + this._hashCache[algo] = hash; + return (hash); +}; + +Certificate.prototype.isExpired = function (when) { + if (when === undefined) + when = new Date(); + return (!((when.getTime() >= this.validFrom.getTime()) && + (when.getTime() < this.validUntil.getTime()))); +}; + +Certificate.prototype.isSignedBy = function (issuerCert) { + utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); + + if (!this.issuer.equals(issuerCert.subjects[0])) + return (false); + if (this.issuer.purposes && this.issuer.purposes.length > 0 && + this.issuer.purposes.indexOf('ca') === -1) { + return (false); + } + + return (this.isSignedByKey(issuerCert.subjectKey)); +}; + +Certificate.prototype.getExtension = function (keyOrOid) { + assert.string(keyOrOid, 'keyOrOid'); + var ext = this.getExtensions().filter(function (maybeExt) { + if (maybeExt.format === 'x509') + return (maybeExt.oid === keyOrOid); + if (maybeExt.format === 'openssh') + return (maybeExt.name === keyOrOid); + return (false); + })[0]; + return (ext); +}; + +Certificate.prototype.getExtensions = function () { + var exts = []; + var x509 = this.signatures.x509; + if (x509 && x509.extras && x509.extras.exts) { + x509.extras.exts.forEach(function (ext) { + ext.format = 'x509'; + exts.push(ext); + }); + } + var openssh = this.signatures.openssh; + if (openssh && openssh.exts) { + openssh.exts.forEach(function (ext) { + ext.format = 'openssh'; + exts.push(ext); + }); + } + return (exts); +}; + +Certificate.prototype.isSignedByKey = function (issuerKey) { + utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); + + if (this.issuerKey !== undefined) { + return (this.issuerKey. + fingerprint('sha512').matches(issuerKey)); + } + + var fmt = Object.keys(this.signatures)[0]; + var valid = formats[fmt].verify(this, issuerKey); + if (valid) + this.issuerKey = issuerKey; + return (valid); +}; + +Certificate.prototype.signWith = function (key) { + utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); + var fmts = Object.keys(formats); + var didOne = false; + for (var i = 0; i < fmts.length; ++i) { + if (fmts[i] !== 'pem') { + var ret = formats[fmts[i]].sign(this, key); + if (ret === true) + didOne = true; + } + } + if (!didOne) { + throw (new Error('Failed to sign the certificate for any ' + + 'available certificate formats')); + } +}; + +Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + + assert.arrayOfObject(subjects); + subjects.forEach(function (subject) { + utils.assertCompatible(subject, Identity, [1, 0], 'subject'); + }); + + utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); + + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalObject(options.validFrom, 'options.validFrom'); + assert.optionalObject(options.validUntil, 'options.validUntil'); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === undefined) + validFrom = new Date(); + if (validUntil === undefined) { + assert.optionalNumber(options.lifetime, 'options.lifetime'); + var lifetime = options.lifetime; + if (lifetime === undefined) + lifetime = 10*365*24*3600; + validUntil = new Date(); + validUntil.setTime(validUntil.getTime() + lifetime*1000); + } + assert.optionalBuffer(options.serial, 'options.serial'); + var serial = options.serial; + if (serial === undefined) + serial = Buffer.from('0000000000000001', 'hex'); + + var purposes = options.purposes; + if (purposes === undefined) + purposes = []; + + if (purposes.indexOf('signature') === -1) + purposes.push('signature'); + + /* Self-signed certs are always CAs. */ + if (purposes.indexOf('ca') === -1) + purposes.push('ca'); + if (purposes.indexOf('crl') === -1) + purposes.push('crl'); + + /* + * If we weren't explicitly given any other purposes, do the sensible + * thing and add some basic ones depending on the subject type. + */ + if (purposes.length <= 3) { + var hostSubjects = subjects.filter(function (subject) { + return (subject.type === 'host'); + }); + var userSubjects = subjects.filter(function (subject) { + return (subject.type === 'user'); + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf('serverAuth') === -1) + purposes.push('serverAuth'); + } + if (userSubjects.length > 0) { + if (purposes.indexOf('clientAuth') === -1) + purposes.push('clientAuth'); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf('keyAgreement') === -1) + purposes.push('keyAgreement'); + if (key.type === 'rsa' && + purposes.indexOf('encryption') === -1) + purposes.push('encryption'); + } + } + + var cert = new Certificate({ + subjects: subjects, + issuer: subjects[0], + subjectKey: key.toPublic(), + issuerKey: key.toPublic(), + signatures: {}, + serial: serial, + validFrom: validFrom, + validUntil: validUntil, + purposes: purposes + }); + cert.signWith(key); + + return (cert); +}; + +Certificate.create = + function (subjectOrSubjects, key, issuer, issuerKey, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + + assert.arrayOfObject(subjects); + subjects.forEach(function (subject) { + utils.assertCompatible(subject, Identity, [1, 0], 'subject'); + }); + + utils.assertCompatible(key, Key, [1, 0], 'key'); + if (PrivateKey.isPrivateKey(key)) + key = key.toPublic(); + utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); + utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); + + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalObject(options.validFrom, 'options.validFrom'); + assert.optionalObject(options.validUntil, 'options.validUntil'); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === undefined) + validFrom = new Date(); + if (validUntil === undefined) { + assert.optionalNumber(options.lifetime, 'options.lifetime'); + var lifetime = options.lifetime; + if (lifetime === undefined) + lifetime = 10*365*24*3600; + validUntil = new Date(); + validUntil.setTime(validUntil.getTime() + lifetime*1000); + } + assert.optionalBuffer(options.serial, 'options.serial'); + var serial = options.serial; + if (serial === undefined) + serial = Buffer.from('0000000000000001', 'hex'); + + var purposes = options.purposes; + if (purposes === undefined) + purposes = []; + + if (purposes.indexOf('signature') === -1) + purposes.push('signature'); + + if (options.ca === true) { + if (purposes.indexOf('ca') === -1) + purposes.push('ca'); + if (purposes.indexOf('crl') === -1) + purposes.push('crl'); + } + + var hostSubjects = subjects.filter(function (subject) { + return (subject.type === 'host'); + }); + var userSubjects = subjects.filter(function (subject) { + return (subject.type === 'user'); + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf('serverAuth') === -1) + purposes.push('serverAuth'); + } + if (userSubjects.length > 0) { + if (purposes.indexOf('clientAuth') === -1) + purposes.push('clientAuth'); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf('keyAgreement') === -1) + purposes.push('keyAgreement'); + if (key.type === 'rsa' && + purposes.indexOf('encryption') === -1) + purposes.push('encryption'); + } + + var cert = new Certificate({ + subjects: subjects, + issuer: issuer, + subjectKey: key, + issuerKey: issuerKey.toPublic(), + signatures: {}, + serial: serial, + validFrom: validFrom, + validUntil: validUntil, + purposes: purposes + }); + cert.signWith(issuerKey); + + return (cert); +}; + +Certificate.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + return (k); + } catch (e) { + throw (new CertificateParseError(options.filename, format, e)); + } +}; + +Certificate.isCertificate = function (obj, ver) { + return (utils.isCompatible(obj, Certificate, ver)); +}; + +/* + * API versions for Certificate: + * [1,0] -- initial ver + * [1,1] -- openssh format now unpacks extensions + */ +Certificate.prototype._sshpkApiVersion = [1, 1]; + +Certificate._oldVersionDetect = function (obj) { + return ([1, 0]); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/dhe.js b/test-eol-project/node_modules/sshpk/lib/dhe.js new file mode 100644 index 00000000..a3c8032c --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/dhe.js @@ -0,0 +1,397 @@ +// Copyright 2017 Joyent, Inc. + +module.exports = { + DiffieHellman: DiffieHellman, + generateECDSA: generateECDSA, + generateED25519: generateED25519 +}; + +var assert = require('assert-plus'); +var crypto = require('crypto'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('./algs'); +var utils = require('./utils'); +var nacl = require('tweetnacl'); + +var Key = require('./key'); +var PrivateKey = require('./private-key'); + +var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); + +var ecdh = require('ecc-jsbn'); +var ec = require('ecc-jsbn/lib/ec'); +var jsbn = require('jsbn').BigInteger; + +function DiffieHellman(key) { + utils.assertCompatible(key, Key, [1, 4], 'key'); + this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); + this._algo = key.type; + this._curve = key.curve; + this._key = key; + if (key.type === 'dsa') { + if (!CRYPTO_HAVE_ECDH) { + throw (new Error('Due to bugs in the node 0.10 ' + + 'crypto API, node 0.12.x or later is required ' + + 'to use DH')); + } + this._dh = crypto.createDiffieHellman( + key.part.p.data, undefined, + key.part.g.data, undefined); + this._p = key.part.p; + this._g = key.part.g; + if (this._isPriv) + this._dh.setPrivateKey(key.part.x.data); + this._dh.setPublicKey(key.part.y.data); + + } else if (key.type === 'ecdsa') { + if (!CRYPTO_HAVE_ECDH) { + this._ecParams = new X9ECParameters(this._curve); + + if (this._isPriv) { + this._priv = new ECPrivate( + this._ecParams, key.part.d.data); + } + return; + } + + var curve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[key.curve]; + this._dh = crypto.createECDH(curve); + if (typeof (this._dh) !== 'object' || + typeof (this._dh.setPrivateKey) !== 'function') { + CRYPTO_HAVE_ECDH = false; + DiffieHellman.call(this, key); + return; + } + if (this._isPriv) + this._dh.setPrivateKey(key.part.d.data); + this._dh.setPublicKey(key.part.Q.data); + + } else if (key.type === 'curve25519') { + if (this._isPriv) { + utils.assertCompatible(key, PrivateKey, [1, 5], 'key'); + this._priv = key.part.k.data; + } + + } else { + throw (new Error('DH not supported for ' + key.type + ' keys')); + } +} + +DiffieHellman.prototype.getPublicKey = function () { + if (this._isPriv) + return (this._key.toPublic()); + return (this._key); +}; + +DiffieHellman.prototype.getPrivateKey = function () { + if (this._isPriv) + return (this._key); + else + return (undefined); +}; +DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; + +DiffieHellman.prototype._keyCheck = function (pk, isPub) { + assert.object(pk, 'key'); + if (!isPub) + utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); + utils.assertCompatible(pk, Key, [1, 4], 'key'); + + if (pk.type !== this._algo) { + throw (new Error('A ' + pk.type + ' key cannot be used in ' + + this._algo + ' Diffie-Hellman')); + } + + if (pk.curve !== this._curve) { + throw (new Error('A key from the ' + pk.curve + ' curve ' + + 'cannot be used with a ' + this._curve + + ' Diffie-Hellman')); + } + + if (pk.type === 'dsa') { + assert.deepEqual(pk.part.p, this._p, + 'DSA key prime does not match'); + assert.deepEqual(pk.part.g, this._g, + 'DSA key generator does not match'); + } +}; + +DiffieHellman.prototype.setKey = function (pk) { + this._keyCheck(pk); + + if (pk.type === 'dsa') { + this._dh.setPrivateKey(pk.part.x.data); + this._dh.setPublicKey(pk.part.y.data); + + } else if (pk.type === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.setPrivateKey(pk.part.d.data); + this._dh.setPublicKey(pk.part.Q.data); + } else { + this._priv = new ECPrivate( + this._ecParams, pk.part.d.data); + } + + } else if (pk.type === 'curve25519') { + var k = pk.part.k; + if (!pk.part.k) + k = pk.part.r; + this._priv = k.data; + if (this._priv[0] === 0x00) + this._priv = this._priv.slice(1); + this._priv = this._priv.slice(0, 32); + } + this._key = pk; + this._isPriv = true; +}; +DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; + +DiffieHellman.prototype.computeSecret = function (otherpk) { + this._keyCheck(otherpk, true); + if (!this._isPriv) + throw (new Error('DH exchange has not been initialized with ' + + 'a private key yet')); + + var pub; + if (this._algo === 'dsa') { + return (this._dh.computeSecret( + otherpk.part.y.data)); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + return (this._dh.computeSecret( + otherpk.part.Q.data)); + } else { + pub = new ECPublic( + this._ecParams, otherpk.part.Q.data); + return (this._priv.deriveSharedSecret(pub)); + } + + } else if (this._algo === 'curve25519') { + pub = otherpk.part.A.data; + while (pub[0] === 0x00 && pub.length > 32) + pub = pub.slice(1); + var priv = this._priv; + assert.strictEqual(pub.length, 32); + assert.strictEqual(priv.length, 32); + + var secret = nacl.box.before(new Uint8Array(pub), + new Uint8Array(priv)); + + return (Buffer.from(secret)); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; + +DiffieHellman.prototype.generateKey = function () { + var parts = []; + var priv, pub; + if (this._algo === 'dsa') { + this._dh.generateKeys(); + + parts.push({name: 'p', data: this._p.data}); + parts.push({name: 'q', data: this._key.part.q.data}); + parts.push({name: 'g', data: this._g.data}); + parts.push({name: 'y', data: this._dh.getPublicKey()}); + parts.push({name: 'x', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'dsa', + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.generateKeys(); + + parts.push({name: 'curve', + data: Buffer.from(this._curve)}); + parts.push({name: 'Q', data: this._dh.getPublicKey()}); + parts.push({name: 'd', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else { + var n = this._ecParams.getN(); + var r = new jsbn(crypto.randomBytes(n.bitLength())); + var n1 = n.subtract(jsbn.ONE); + priv = r.mod(n1).add(jsbn.ONE); + pub = this._ecParams.getG().multiply(priv); + + priv = Buffer.from(priv.toByteArray()); + pub = Buffer.from(this._ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + this._priv = new ECPrivate(this._ecParams, priv); + + parts.push({name: 'curve', + data: Buffer.from(this._curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + } else if (this._algo === 'curve25519') { + var pair = nacl.box.keyPair(); + priv = Buffer.from(pair.secretKey); + pub = Buffer.from(pair.publicKey); + priv = Buffer.concat([priv, pub]); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + + parts.push({name: 'A', data: pub}); + parts.push({name: 'k', data: priv}); + this._key = new PrivateKey({ + type: 'curve25519', + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; +DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; + +/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ + +function X9ECParameters(name) { + var params = algs.curves[name]; + assert.object(params); + + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var n = new jsbn(params.n); + var h = jsbn.ONE; + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + this.curve = curve; + this.g = G; + this.n = n; + this.h = h; +} +X9ECParameters.prototype.getCurve = function () { return (this.curve); }; +X9ECParameters.prototype.getG = function () { return (this.g); }; +X9ECParameters.prototype.getN = function () { return (this.n); }; +X9ECParameters.prototype.getH = function () { return (this.h); }; + +function ECPublic(params, buffer) { + this._params = params; + if (buffer[0] === 0x00) + buffer = buffer.slice(1); + this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); +} + +function ECPrivate(params, buffer) { + this._params = params; + this._priv = new jsbn(utils.mpNormalize(buffer)); +} +ECPrivate.prototype.deriveSharedSecret = function (pubKey) { + assert.ok(pubKey instanceof ECPublic); + var S = pubKey._pub.multiply(this._priv); + return (Buffer.from(S.getX().toBigInteger().toByteArray())); +}; + +function generateED25519() { + var pair = nacl.sign.keyPair(); + var priv = Buffer.from(pair.secretKey); + var pub = Buffer.from(pair.publicKey); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + + var parts = []; + parts.push({name: 'A', data: pub}); + parts.push({name: 'k', data: priv.slice(0, 32)}); + var key = new PrivateKey({ + type: 'ed25519', + parts: parts + }); + return (key); +} + +/* Generates a new ECDSA private key on a given curve. */ +function generateECDSA(curve) { + var parts = []; + var key; + + if (CRYPTO_HAVE_ECDH) { + /* + * Node crypto doesn't expose key generation directly, but the + * ECDH instances can generate keys. It turns out this just + * calls into the OpenSSL generic key generator, and we can + * read its output happily without doing an actual DH. So we + * use that here. + */ + var osCurve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[curve]; + + var dh = crypto.createECDH(osCurve); + dh.generateKeys(); + + parts.push({name: 'curve', + data: Buffer.from(curve)}); + parts.push({name: 'Q', data: dh.getPublicKey()}); + parts.push({name: 'd', data: dh.getPrivateKey()}); + + key = new PrivateKey({ + type: 'ecdsa', + curve: curve, + parts: parts + }); + return (key); + } else { + + var ecParams = new X9ECParameters(curve); + + /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ + var n = ecParams.getN(); + /* + * The crypto.randomBytes() function can only give us whole + * bytes, so taking a nod from X9.62, we round up. + */ + var cByteLen = Math.ceil((n.bitLength() + 64) / 8); + var c = new jsbn(crypto.randomBytes(cByteLen)); + + var n1 = n.subtract(jsbn.ONE); + var priv = c.mod(n1).add(jsbn.ONE); + var pub = ecParams.getG().multiply(priv); + + priv = Buffer.from(priv.toByteArray()); + pub = Buffer.from(ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + parts.push({name: 'curve', data: Buffer.from(curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + key = new PrivateKey({ + type: 'ecdsa', + curve: curve, + parts: parts + }); + return (key); + } +} diff --git a/test-eol-project/node_modules/sshpk/lib/ed-compat.js b/test-eol-project/node_modules/sshpk/lib/ed-compat.js new file mode 100644 index 00000000..70732e1f --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/ed-compat.js @@ -0,0 +1,92 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + Verifier: Verifier, + Signer: Signer +}; + +var nacl = require('tweetnacl'); +var stream = require('stream'); +var util = require('util'); +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var Signature = require('./signature'); + +function Verifier(key, hashAlgo) { + if (hashAlgo.toLowerCase() !== 'sha512') + throw (new Error('ED25519 only supports the use of ' + + 'SHA-512 hashes')); + + this.key = key; + this.chunks = []; + + stream.Writable.call(this, {}); +} +util.inherits(Verifier, stream.Writable); + +Verifier.prototype._write = function (chunk, enc, cb) { + this.chunks.push(chunk); + cb(); +}; + +Verifier.prototype.update = function (chunk) { + if (typeof (chunk) === 'string') + chunk = Buffer.from(chunk, 'binary'); + this.chunks.push(chunk); +}; + +Verifier.prototype.verify = function (signature, fmt) { + var sig; + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== 'ed25519') + return (false); + sig = signature.toBuffer('raw'); + + } else if (typeof (signature) === 'string') { + sig = Buffer.from(signature, 'base64'); + + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + } + + assert.buffer(sig); + return (nacl.sign.detached.verify( + new Uint8Array(Buffer.concat(this.chunks)), + new Uint8Array(sig), + new Uint8Array(this.key.part.A.data))); +}; + +function Signer(key, hashAlgo) { + if (hashAlgo.toLowerCase() !== 'sha512') + throw (new Error('ED25519 only supports the use of ' + + 'SHA-512 hashes')); + + this.key = key; + this.chunks = []; + + stream.Writable.call(this, {}); +} +util.inherits(Signer, stream.Writable); + +Signer.prototype._write = function (chunk, enc, cb) { + this.chunks.push(chunk); + cb(); +}; + +Signer.prototype.update = function (chunk) { + if (typeof (chunk) === 'string') + chunk = Buffer.from(chunk, 'binary'); + this.chunks.push(chunk); +}; + +Signer.prototype.sign = function () { + var sig = nacl.sign.detached( + new Uint8Array(Buffer.concat(this.chunks)), + new Uint8Array(Buffer.concat([ + this.key.part.k.data, this.key.part.A.data]))); + var sigBuf = Buffer.from(sig); + var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); + sigObj.hashAlgorithm = 'sha512'; + return (sigObj); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/errors.js b/test-eol-project/node_modules/sshpk/lib/errors.js new file mode 100644 index 00000000..1cc09ec7 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/errors.js @@ -0,0 +1,84 @@ +// Copyright 2015 Joyent, Inc. + +var assert = require('assert-plus'); +var util = require('util'); + +function FingerprintFormatError(fp, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, FingerprintFormatError); + this.name = 'FingerprintFormatError'; + this.fingerprint = fp; + this.format = format; + this.message = 'Fingerprint format is not supported, or is invalid: '; + if (fp !== undefined) + this.message += ' fingerprint = ' + fp; + if (format !== undefined) + this.message += ' format = ' + format; +} +util.inherits(FingerprintFormatError, Error); + +function InvalidAlgorithmError(alg) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, InvalidAlgorithmError); + this.name = 'InvalidAlgorithmError'; + this.algorithm = alg; + this.message = 'Algorithm "' + alg + '" is not supported'; +} +util.inherits(InvalidAlgorithmError, Error); + +function KeyParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyParseError); + this.name = 'KeyParseError'; + this.format = format; + this.keyName = name; + this.innerErr = innerErr; + this.message = 'Failed to parse ' + name + ' as a valid ' + format + + ' format key: ' + innerErr.message; +} +util.inherits(KeyParseError, Error); + +function SignatureParseError(type, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, SignatureParseError); + this.name = 'SignatureParseError'; + this.type = type; + this.format = format; + this.innerErr = innerErr; + this.message = 'Failed to parse the given data as a ' + type + + ' signature in ' + format + ' format: ' + innerErr.message; +} +util.inherits(SignatureParseError, Error); + +function CertificateParseError(name, format, innerErr) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, CertificateParseError); + this.name = 'CertificateParseError'; + this.format = format; + this.certName = name; + this.innerErr = innerErr; + this.message = 'Failed to parse ' + name + ' as a valid ' + format + + ' format certificate: ' + innerErr.message; +} +util.inherits(CertificateParseError, Error); + +function KeyEncryptedError(name, format) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, KeyEncryptedError); + this.name = 'KeyEncryptedError'; + this.format = format; + this.keyName = name; + this.message = 'The ' + format + ' format key ' + name + ' is ' + + 'encrypted (password-protected), and no passphrase was ' + + 'provided in `options`'; +} +util.inherits(KeyEncryptedError, Error); + +module.exports = { + FingerprintFormatError: FingerprintFormatError, + InvalidAlgorithmError: InvalidAlgorithmError, + KeyParseError: KeyParseError, + SignatureParseError: SignatureParseError, + KeyEncryptedError: KeyEncryptedError, + CertificateParseError: CertificateParseError +}; diff --git a/test-eol-project/node_modules/sshpk/lib/fingerprint.js b/test-eol-project/node_modules/sshpk/lib/fingerprint.js new file mode 100644 index 00000000..0004b376 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/fingerprint.js @@ -0,0 +1,220 @@ +// Copyright 2018 Joyent, Inc. + +module.exports = Fingerprint; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('./algs'); +var crypto = require('crypto'); +var errs = require('./errors'); +var Key = require('./key'); +var PrivateKey = require('./private-key'); +var Certificate = require('./certificate'); +var utils = require('./utils'); + +var FingerprintFormatError = errs.FingerprintFormatError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Fingerprint(opts) { + assert.object(opts, 'options'); + assert.string(opts.type, 'options.type'); + assert.buffer(opts.hash, 'options.hash'); + assert.string(opts.algorithm, 'options.algorithm'); + + this.algorithm = opts.algorithm.toLowerCase(); + if (algs.hashAlgs[this.algorithm] !== true) + throw (new InvalidAlgorithmError(this.algorithm)); + + this.hash = opts.hash; + this.type = opts.type; + this.hashType = opts.hashType; +} + +Fingerprint.prototype.toString = function (format) { + if (format === undefined) { + if (this.algorithm === 'md5' || this.hashType === 'spki') + format = 'hex'; + else + format = 'base64'; + } + assert.string(format); + + switch (format) { + case 'hex': + if (this.hashType === 'spki') + return (this.hash.toString('hex')); + return (addColons(this.hash.toString('hex'))); + case 'base64': + if (this.hashType === 'spki') + return (this.hash.toString('base64')); + return (sshBase64Format(this.algorithm, + this.hash.toString('base64'))); + default: + throw (new FingerprintFormatError(undefined, format)); + } +}; + +Fingerprint.prototype.matches = function (other) { + assert.object(other, 'key or certificate'); + if (this.type === 'key' && this.hashType !== 'ssh') { + utils.assertCompatible(other, Key, [1, 7], 'key with spki'); + if (PrivateKey.isPrivateKey(other)) { + utils.assertCompatible(other, PrivateKey, [1, 6], + 'privatekey with spki support'); + } + } else if (this.type === 'key') { + utils.assertCompatible(other, Key, [1, 0], 'key'); + } else { + utils.assertCompatible(other, Certificate, [1, 0], + 'certificate'); + } + + var theirHash = other.hash(this.algorithm, this.hashType); + var theirHash2 = crypto.createHash(this.algorithm). + update(theirHash).digest('base64'); + + if (this.hash2 === undefined) + this.hash2 = crypto.createHash(this.algorithm). + update(this.hash).digest('base64'); + + return (this.hash2 === theirHash2); +}; + +/*JSSTYLED*/ +var base64RE = /^[A-Za-z0-9+\/=]+$/; +/*JSSTYLED*/ +var hexRE = /^[a-fA-F0-9]+$/; + +Fingerprint.parse = function (fp, options) { + assert.string(fp, 'fingerprint'); + + var alg, hash, enAlgs; + if (Array.isArray(options)) { + enAlgs = options; + options = {}; + } + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + if (options.enAlgs !== undefined) + enAlgs = options.enAlgs; + if (options.algorithms !== undefined) + enAlgs = options.algorithms; + assert.optionalArrayOfString(enAlgs, 'algorithms'); + + var hashType = 'ssh'; + if (options.hashType !== undefined) + hashType = options.hashType; + assert.string(hashType, 'options.hashType'); + + var parts = fp.split(':'); + if (parts.length == 2) { + alg = parts[0].toLowerCase(); + if (!base64RE.test(parts[1])) + throw (new FingerprintFormatError(fp)); + try { + hash = Buffer.from(parts[1], 'base64'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } else if (parts.length > 2) { + alg = 'md5'; + if (parts[0].toLowerCase() === 'md5') + parts = parts.slice(1); + parts = parts.map(function (p) { + while (p.length < 2) + p = '0' + p; + if (p.length > 2) + throw (new FingerprintFormatError(fp)); + return (p); + }); + parts = parts.join(''); + if (!hexRE.test(parts) || parts.length % 2 !== 0) + throw (new FingerprintFormatError(fp)); + try { + hash = Buffer.from(parts, 'hex'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } else { + if (hexRE.test(fp)) { + hash = Buffer.from(fp, 'hex'); + } else if (base64RE.test(fp)) { + hash = Buffer.from(fp, 'base64'); + } else { + throw (new FingerprintFormatError(fp)); + } + + switch (hash.length) { + case 32: + alg = 'sha256'; + break; + case 16: + alg = 'md5'; + break; + case 20: + alg = 'sha1'; + break; + case 64: + alg = 'sha512'; + break; + default: + throw (new FingerprintFormatError(fp)); + } + + /* Plain hex/base64: guess it's probably SPKI unless told. */ + if (options.hashType === undefined) + hashType = 'spki'; + } + + if (alg === undefined) + throw (new FingerprintFormatError(fp)); + + if (algs.hashAlgs[alg] === undefined) + throw (new InvalidAlgorithmError(alg)); + + if (enAlgs !== undefined) { + enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); + if (enAlgs.indexOf(alg) === -1) + throw (new InvalidAlgorithmError(alg)); + } + + return (new Fingerprint({ + algorithm: alg, + hash: hash, + type: options.type || 'key', + hashType: hashType + })); +}; + +function addColons(s) { + /*JSSTYLED*/ + return (s.replace(/(.{2})(?=.)/g, '$1:')); +} + +function base64Strip(s) { + /*JSSTYLED*/ + return (s.replace(/=*$/, '')); +} + +function sshBase64Format(alg, h) { + return (alg.toUpperCase() + ':' + base64Strip(h)); +} + +Fingerprint.isFingerprint = function (obj, ver) { + return (utils.isCompatible(obj, Fingerprint, ver)); +}; + +/* + * API versions for Fingerprint: + * [1,0] -- initial ver + * [1,1] -- first tagged ver + * [1,2] -- hashType and spki support + */ +Fingerprint.prototype._sshpkApiVersion = [1, 2]; + +Fingerprint._oldVersionDetect = function (obj) { + assert.func(obj.toString); + assert.func(obj.matches); + return ([1, 0]); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/formats/auto.js b/test-eol-project/node_modules/sshpk/lib/formats/auto.js new file mode 100644 index 00000000..f32cd964 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/auto.js @@ -0,0 +1,124 @@ +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); + +var pem = require('./pem'); +var ssh = require('./ssh'); +var rfc4253 = require('./rfc4253'); +var dnssec = require('./dnssec'); +var putty = require('./putty'); + +var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; + +function read(buf, options) { + if (typeof (buf) === 'string') { + if (buf.trim().match(/^[-]+[ ]*BEGIN/)) + return (pem.read(buf, options)); + if (buf.match(/^\s*ssh-[a-z]/)) + return (ssh.read(buf, options)); + if (buf.match(/^\s*ecdsa-/)) + return (ssh.read(buf, options)); + if (buf.match(/^putty-user-key-file-2:/i)) + return (putty.read(buf, options)); + if (findDNSSECHeader(buf)) + return (dnssec.read(buf, options)); + buf = Buffer.from(buf, 'binary'); + } else { + assert.buffer(buf); + if (findPEMHeader(buf)) + return (pem.read(buf, options)); + if (findSSHHeader(buf)) + return (ssh.read(buf, options)); + if (findPuTTYHeader(buf)) + return (putty.read(buf, options)); + if (findDNSSECHeader(buf)) + return (dnssec.read(buf, options)); + } + if (buf.readUInt32BE(0) < buf.length) + return (rfc4253.read(buf, options)); + throw (new Error('Failed to auto-detect format of key')); +} + +function findPuTTYHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) + ++offset; + if (offset + 22 <= buf.length && + buf.slice(offset, offset + 22).toString('ascii').toLowerCase() === + 'putty-user-key-file-2:') + return (true); + return (false); +} + +function findSSHHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) + ++offset; + if (offset + 4 <= buf.length && + buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') + return (true); + if (offset + 6 <= buf.length && + buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') + return (true); + return (false); +} + +function findPEMHeader(buf) { + var offset = 0; + while (offset < buf.length && + (buf[offset] === 32 || buf[offset] === 10)) + ++offset; + if (buf[offset] !== 45) + return (false); + while (offset < buf.length && + (buf[offset] === 45)) + ++offset; + while (offset < buf.length && + (buf[offset] === 32)) + ++offset; + if (offset + 5 > buf.length || + buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') + return (false); + return (true); +} + +function findDNSSECHeader(buf) { + // private case first + if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) + return (false); + var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); + if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX) + return (true); + + // public-key RFC3110 ? + // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...' + // skip any comment-lines + if (typeof (buf) !== 'string') { + buf = buf.toString('ascii'); + } + var lines = buf.split('\n'); + var line = 0; + /* JSSTYLED */ + while (lines[line].match(/^\;/)) + line++; + if (lines[line].toString('ascii').match(/\. IN KEY /)) + return (true); + if (lines[line].toString('ascii').match(/\. IN DNSKEY /)) + return (true); + return (false); +} + +function write(key, options) { + throw (new Error('"auto" format cannot be used for writing')); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/dnssec.js b/test-eol-project/node_modules/sshpk/lib/formats/dnssec.js new file mode 100644 index 00000000..a74ea9ce --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/dnssec.js @@ -0,0 +1,287 @@ +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var utils = require('../utils'); +var SSHBuffer = require('../ssh-buffer'); +var Dhe = require('../dhe'); + +var supportedAlgos = { + 'rsa-sha1' : 5, + 'rsa-sha256' : 8, + 'rsa-sha512' : 10, + 'ecdsa-p256-sha256' : 13, + 'ecdsa-p384-sha384' : 14 + /* + * ed25519 is hypothetically supported with id 15 + * but the common tools available don't appear to be + * capable of generating/using ed25519 keys + */ +}; + +var supportedAlgosById = {}; +Object.keys(supportedAlgos).forEach(function (k) { + supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); +}); + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + var lines = buf.split('\n'); + if (lines[0].match(/^Private-key-format\: v1/)) { + var algElems = lines[1].split(' '); + var algoNum = parseInt(algElems[1], 10); + var algoName = algElems[2]; + if (!supportedAlgosById[algoNum]) + throw (new Error('Unsupported algorithm: ' + algoName)); + return (readDNSSECPrivateKey(algoNum, lines.slice(2))); + } + + // skip any comment-lines + var line = 0; + /* JSSTYLED */ + while (lines[line].match(/^\;/)) + line++; + // we should now have *one single* line left with our KEY on it. + if ((lines[line].match(/\. IN KEY /) || + lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) { + return (readRFC3110(lines[line])); + } + throw (new Error('Cannot parse dnssec key')); +} + +function readRFC3110(keyString) { + var elems = keyString.split(' '); + //unused var flags = parseInt(elems[3], 10); + //unused var protocol = parseInt(elems[4], 10); + var algorithm = parseInt(elems[5], 10); + if (!supportedAlgosById[algorithm]) + throw (new Error('Unsupported algorithm: ' + algorithm)); + var base64key = elems.slice(6, elems.length).join(); + var keyBuffer = Buffer.from(base64key, 'base64'); + if (supportedAlgosById[algorithm].match(/^RSA-/)) { + // join the rest of the body into a single base64-blob + var publicExponentLen = keyBuffer.readUInt8(0); + if (publicExponentLen != 3 && publicExponentLen != 1) + throw (new Error('Cannot parse dnssec key: ' + + 'unsupported exponent length')); + + var publicExponent = keyBuffer.slice(1, publicExponentLen+1); + publicExponent = utils.mpNormalize(publicExponent); + var modulus = keyBuffer.slice(1+publicExponentLen); + modulus = utils.mpNormalize(modulus); + // now, make the key + var rsaKey = { + type: 'rsa', + parts: [] + }; + rsaKey.parts.push({ name: 'e', data: publicExponent}); + rsaKey.parts.push({ name: 'n', data: modulus}); + return (new Key(rsaKey)); + } + if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' || + supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') { + var curve = 'nistp384'; + var size = 384; + if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { + curve = 'nistp256'; + size = 256; + } + + var ecdsaKey = { + type: 'ecdsa', + curve: curve, + size: size, + parts: [ + {name: 'curve', data: Buffer.from(curve) }, + {name: 'Q', data: utils.ecNormalize(keyBuffer) } + ] + }; + return (new Key(ecdsaKey)); + } + throw (new Error('Unsupported algorithm: ' + + supportedAlgosById[algorithm])); +} + +function elementToBuf(e) { + return (Buffer.from(e.split(' ')[1], 'base64')); +} + +function readDNSSECRSAPrivateKey(elements) { + var rsaParams = {}; + elements.forEach(function (element) { + if (element.split(' ')[0] === 'Modulus:') + rsaParams['n'] = elementToBuf(element); + else if (element.split(' ')[0] === 'PublicExponent:') + rsaParams['e'] = elementToBuf(element); + else if (element.split(' ')[0] === 'PrivateExponent:') + rsaParams['d'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Prime1:') + rsaParams['p'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Prime2:') + rsaParams['q'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Exponent1:') + rsaParams['dmodp'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Exponent2:') + rsaParams['dmodq'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Coefficient:') + rsaParams['iqmp'] = elementToBuf(element); + }); + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'e', data: utils.mpNormalize(rsaParams['e'])}, + { name: 'n', data: utils.mpNormalize(rsaParams['n'])}, + { name: 'd', data: utils.mpNormalize(rsaParams['d'])}, + { name: 'p', data: utils.mpNormalize(rsaParams['p'])}, + { name: 'q', data: utils.mpNormalize(rsaParams['q'])}, + { name: 'dmodp', + data: utils.mpNormalize(rsaParams['dmodp'])}, + { name: 'dmodq', + data: utils.mpNormalize(rsaParams['dmodq'])}, + { name: 'iqmp', + data: utils.mpNormalize(rsaParams['iqmp'])} + ] + }; + return (new PrivateKey(key)); +} + +function readDNSSECPrivateKey(alg, elements) { + if (supportedAlgosById[alg].match(/^RSA-/)) { + return (readDNSSECRSAPrivateKey(elements)); + } + if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' || + supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { + var d = Buffer.from(elements[0].split(' ')[1], 'base64'); + var curve = 'nistp384'; + var size = 384; + if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { + curve = 'nistp256'; + size = 256; + } + // DNSSEC generates the public-key on the fly (go calculate it) + var publicKey = utils.publicFromPrivateECDSA(curve, d); + var Q = publicKey.part['Q'].data; + var ecdsaKey = { + type: 'ecdsa', + curve: curve, + size: size, + parts: [ + {name: 'curve', data: Buffer.from(curve) }, + {name: 'd', data: d }, + {name: 'Q', data: Q } + ] + }; + return (new PrivateKey(ecdsaKey)); + } + throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg])); +} + +function dnssecTimestamp(date) { + var year = date.getFullYear() + ''; //stringify + var month = (date.getMonth() + 1); + var timestampStr = year + month + date.getUTCDate(); + timestampStr += '' + date.getUTCHours() + date.getUTCMinutes(); + timestampStr += date.getUTCSeconds(); + return (timestampStr); +} + +function rsaAlgFromOptions(opts) { + if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1') + return ('5 (RSASHA1)'); + else if (opts.hashAlgo === 'sha256') + return ('8 (RSASHA256)'); + else if (opts.hashAlgo === 'sha512') + return ('10 (RSASHA512)'); + else + throw (new Error('Unknown or unsupported hash: ' + + opts.hashAlgo)); +} + +function writeRSA(key, options) { + // if we're missing parts, add them. + if (!key.part.dmodp || !key.part.dmodq) { + utils.addRSAMissing(key); + } + + var out = ''; + out += 'Private-key-format: v1.3\n'; + out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n'; + var n = utils.mpDenormalize(key.part['n'].data); + out += 'Modulus: ' + n.toString('base64') + '\n'; + var e = utils.mpDenormalize(key.part['e'].data); + out += 'PublicExponent: ' + e.toString('base64') + '\n'; + var d = utils.mpDenormalize(key.part['d'].data); + out += 'PrivateExponent: ' + d.toString('base64') + '\n'; + var p = utils.mpDenormalize(key.part['p'].data); + out += 'Prime1: ' + p.toString('base64') + '\n'; + var q = utils.mpDenormalize(key.part['q'].data); + out += 'Prime2: ' + q.toString('base64') + '\n'; + var dmodp = utils.mpDenormalize(key.part['dmodp'].data); + out += 'Exponent1: ' + dmodp.toString('base64') + '\n'; + var dmodq = utils.mpDenormalize(key.part['dmodq'].data); + out += 'Exponent2: ' + dmodq.toString('base64') + '\n'; + var iqmp = utils.mpDenormalize(key.part['iqmp'].data); + out += 'Coefficient: ' + iqmp.toString('base64') + '\n'; + // Assume that we're valid as-of now + var timestamp = new Date(); + out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; + return (Buffer.from(out, 'ascii')); +} + +function writeECDSA(key, options) { + var out = ''; + out += 'Private-key-format: v1.3\n'; + + if (key.curve === 'nistp256') { + out += 'Algorithm: 13 (ECDSAP256SHA256)\n'; + } else if (key.curve === 'nistp384') { + out += 'Algorithm: 14 (ECDSAP384SHA384)\n'; + } else { + throw (new Error('Unsupported curve')); + } + var base64Key = key.part['d'].data.toString('base64'); + out += 'PrivateKey: ' + base64Key + '\n'; + + // Assume that we're valid as-of now + var timestamp = new Date(); + out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; + + return (Buffer.from(out, 'ascii')); +} + +function write(key, options) { + if (PrivateKey.isPrivateKey(key)) { + if (key.type === 'rsa') { + return (writeRSA(key, options)); + } else if (key.type === 'ecdsa') { + return (writeECDSA(key, options)); + } else { + throw (new Error('Unsupported algorithm: ' + key.type)); + } + } else if (Key.isKey(key)) { + /* + * RFC3110 requires a keyname, and a keytype, which we + * don't really have a mechanism for specifying such + * additional metadata. + */ + throw (new Error('Format "dnssec" only supports ' + + 'writing private keys')); + } else { + throw (new Error('key is not a Key or PrivateKey')); + } +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js b/test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js new file mode 100644 index 00000000..766f3d39 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js @@ -0,0 +1,352 @@ +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + verify: verify, + sign: sign, + signAsync: signAsync, + write: write, + + /* Internal private API */ + fromBuffer: fromBuffer, + toBuffer: toBuffer +}; + +var assert = require('assert-plus'); +var SSHBuffer = require('../ssh-buffer'); +var crypto = require('crypto'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var Identity = require('../identity'); +var rfc4253 = require('./rfc4253'); +var Signature = require('../signature'); +var utils = require('../utils'); +var Certificate = require('../certificate'); + +function verify(cert, key) { + /* + * We always give an issuerKey, so if our verify() is being called then + * there was no signature. Return false. + */ + return (false); +} + +var TYPES = { + 'user': 1, + 'host': 2 +}; +Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; }); + +var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/; + +function read(buf, options) { + if (Buffer.isBuffer(buf)) + buf = buf.toString('ascii'); + var parts = buf.trim().split(/[ \t\n]+/g); + if (parts.length < 2 || parts.length > 3) + throw (new Error('Not a valid SSH certificate line')); + + var algo = parts[0]; + var data = parts[1]; + + data = Buffer.from(data, 'base64'); + return (fromBuffer(data, algo)); +} + +function fromBuffer(data, algo, partial) { + var sshbuf = new SSHBuffer({ buffer: data }); + var innerAlgo = sshbuf.readString(); + if (algo !== undefined && innerAlgo !== algo) + throw (new Error('SSH certificate algorithm mismatch')); + if (algo === undefined) + algo = innerAlgo; + + var cert = {}; + cert.signatures = {}; + cert.signatures.openssh = {}; + + cert.signatures.openssh.nonce = sshbuf.readBuffer(); + + var key = {}; + var parts = (key.parts = []); + key.type = getAlg(algo); + + var partCount = algs.info[key.type].parts.length; + while (parts.length < partCount) + parts.push(sshbuf.readPart()); + assert.ok(parts.length >= 1, 'key must have at least one part'); + + var algInfo = algs.info[key.type]; + if (key.type === 'ecdsa') { + var res = ECDSA_ALGO.exec(algo); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + + for (var i = 0; i < algInfo.parts.length; ++i) { + parts[i].name = algInfo.parts[i]; + if (parts[i].name !== 'curve' && + algInfo.normalize !== false) { + var p = parts[i]; + p.data = utils.mpNormalize(p.data); + } + } + + cert.subjectKey = new Key(key); + + cert.serial = sshbuf.readInt64(); + + var type = TYPES[sshbuf.readInt()]; + assert.string(type, 'valid cert type'); + + cert.signatures.openssh.keyId = sshbuf.readString(); + + var principals = []; + var pbuf = sshbuf.readBuffer(); + var psshbuf = new SSHBuffer({ buffer: pbuf }); + while (!psshbuf.atEnd()) + principals.push(psshbuf.readString()); + if (principals.length === 0) + principals = ['*']; + + cert.subjects = principals.map(function (pr) { + if (type === 'user') + return (Identity.forUser(pr)); + else if (type === 'host') + return (Identity.forHost(pr)); + throw (new Error('Unknown identity type ' + type)); + }); + + cert.validFrom = int64ToDate(sshbuf.readInt64()); + cert.validUntil = int64ToDate(sshbuf.readInt64()); + + var exts = []; + var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); + var ext; + while (!extbuf.atEnd()) { + ext = { critical: true }; + ext.name = extbuf.readString(); + ext.data = extbuf.readBuffer(); + exts.push(ext); + } + extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); + while (!extbuf.atEnd()) { + ext = { critical: false }; + ext.name = extbuf.readString(); + ext.data = extbuf.readBuffer(); + exts.push(ext); + } + cert.signatures.openssh.exts = exts; + + /* reserved */ + sshbuf.readBuffer(); + + var signingKeyBuf = sshbuf.readBuffer(); + cert.issuerKey = rfc4253.read(signingKeyBuf); + + /* + * OpenSSH certs don't give the identity of the issuer, just their + * public key. So, we use an Identity that matches anything. The + * isSignedBy() function will later tell you if the key matches. + */ + cert.issuer = Identity.forHost('**'); + + var sigBuf = sshbuf.readBuffer(); + cert.signatures.openssh.signature = + Signature.parse(sigBuf, cert.issuerKey.type, 'ssh'); + + if (partial !== undefined) { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + + return (new Certificate(cert)); +} + +function int64ToDate(buf) { + var i = buf.readUInt32BE(0) * 4294967296; + i += buf.readUInt32BE(4); + var d = new Date(); + d.setTime(i * 1000); + d.sourceInt64 = buf; + return (d); +} + +function dateToInt64(date) { + if (date.sourceInt64 !== undefined) + return (date.sourceInt64); + var i = Math.round(date.getTime() / 1000); + var upper = Math.floor(i / 4294967296); + var lower = Math.floor(i % 4294967296); + var buf = Buffer.alloc(8); + buf.writeUInt32BE(upper, 0); + buf.writeUInt32BE(lower, 4); + return (buf); +} + +function sign(cert, key) { + if (cert.signatures.openssh === undefined) + cert.signatures.openssh = {}; + try { + var blob = toBuffer(cert, true); + } catch (e) { + delete (cert.signatures.openssh); + return (false); + } + var sig = cert.signatures.openssh; + var hashAlgo = undefined; + if (key.type === 'rsa' || key.type === 'dsa') + hashAlgo = 'sha1'; + var signer = key.createSign(hashAlgo); + signer.write(blob); + sig.signature = signer.sign(); + return (true); +} + +function signAsync(cert, signer, done) { + if (cert.signatures.openssh === undefined) + cert.signatures.openssh = {}; + try { + var blob = toBuffer(cert, true); + } catch (e) { + delete (cert.signatures.openssh); + done(e); + return; + } + var sig = cert.signatures.openssh; + + signer(blob, function (err, signature) { + if (err) { + done(err); + return; + } + try { + /* + * This will throw if the signature isn't of a + * type/algo that can be used for SSH. + */ + signature.toBuffer('ssh'); + } catch (e) { + done(e); + return; + } + sig.signature = signature; + done(); + }); +} + +function write(cert, options) { + if (options === undefined) + options = {}; + + var blob = toBuffer(cert); + var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64'); + if (options.comment) + out = out + ' ' + options.comment; + return (out); +} + + +function toBuffer(cert, noSig) { + assert.object(cert.signatures.openssh, 'signature for openssh format'); + var sig = cert.signatures.openssh; + + if (sig.nonce === undefined) + sig.nonce = crypto.randomBytes(16); + var buf = new SSHBuffer({}); + buf.writeString(getCertType(cert.subjectKey)); + buf.writeBuffer(sig.nonce); + + var key = cert.subjectKey; + var algInfo = algs.info[key.type]; + algInfo.parts.forEach(function (part) { + buf.writePart(key.part[part]); + }); + + buf.writeInt64(cert.serial); + + var type = cert.subjects[0].type; + assert.notStrictEqual(type, 'unknown'); + cert.subjects.forEach(function (id) { + assert.strictEqual(id.type, type); + }); + type = TYPES[type]; + buf.writeInt(type); + + if (sig.keyId === undefined) { + sig.keyId = cert.subjects[0].type + '_' + + (cert.subjects[0].uid || cert.subjects[0].hostname); + } + buf.writeString(sig.keyId); + + var sub = new SSHBuffer({}); + cert.subjects.forEach(function (id) { + if (type === TYPES.host) + sub.writeString(id.hostname); + else if (type === TYPES.user) + sub.writeString(id.uid); + }); + buf.writeBuffer(sub.toBuffer()); + + buf.writeInt64(dateToInt64(cert.validFrom)); + buf.writeInt64(dateToInt64(cert.validUntil)); + + var exts = sig.exts; + if (exts === undefined) + exts = []; + + var extbuf = new SSHBuffer({}); + exts.forEach(function (ext) { + if (ext.critical !== true) + return; + extbuf.writeString(ext.name); + extbuf.writeBuffer(ext.data); + }); + buf.writeBuffer(extbuf.toBuffer()); + + extbuf = new SSHBuffer({}); + exts.forEach(function (ext) { + if (ext.critical === true) + return; + extbuf.writeString(ext.name); + extbuf.writeBuffer(ext.data); + }); + buf.writeBuffer(extbuf.toBuffer()); + + /* reserved */ + buf.writeBuffer(Buffer.alloc(0)); + + sub = rfc4253.write(cert.issuerKey); + buf.writeBuffer(sub); + + if (!noSig) + buf.writeBuffer(sig.signature.toBuffer('ssh')); + + return (buf.toBuffer()); +} + +function getAlg(certType) { + if (certType === 'ssh-rsa-cert-v01@openssh.com') + return ('rsa'); + if (certType === 'ssh-dss-cert-v01@openssh.com') + return ('dsa'); + if (certType.match(ECDSA_ALGO)) + return ('ecdsa'); + if (certType === 'ssh-ed25519-cert-v01@openssh.com') + return ('ed25519'); + throw (new Error('Unsupported cert type ' + certType)); +} + +function getCertType(key) { + if (key.type === 'rsa') + return ('ssh-rsa-cert-v01@openssh.com'); + if (key.type === 'dsa') + return ('ssh-dss-cert-v01@openssh.com'); + if (key.type === 'ecdsa') + return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com'); + if (key.type === 'ed25519') + return ('ssh-ed25519-cert-v01@openssh.com'); + throw (new Error('Unsupported key type ' + key.type)); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/pem.js b/test-eol-project/node_modules/sshpk/lib/formats/pem.js new file mode 100644 index 00000000..bbe78fcb --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/pem.js @@ -0,0 +1,290 @@ +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var crypto = require('crypto'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); + +var pkcs1 = require('./pkcs1'); +var pkcs8 = require('./pkcs8'); +var sshpriv = require('./ssh-private'); +var rfc4253 = require('./rfc4253'); + +var errors = require('../errors'); + +var OID_PBES2 = '1.2.840.113549.1.5.13'; +var OID_PBKDF2 = '1.2.840.113549.1.5.12'; + +var OID_TO_CIPHER = { + '1.2.840.113549.3.7': '3des-cbc', + '2.16.840.1.101.3.4.1.2': 'aes128-cbc', + '2.16.840.1.101.3.4.1.42': 'aes256-cbc' +}; +var CIPHER_TO_OID = {}; +Object.keys(OID_TO_CIPHER).forEach(function (k) { + CIPHER_TO_OID[OID_TO_CIPHER[k]] = k; +}); + +var OID_TO_HASH = { + '1.2.840.113549.2.7': 'sha1', + '1.2.840.113549.2.9': 'sha256', + '1.2.840.113549.2.11': 'sha512' +}; +var HASH_TO_OID = {}; +Object.keys(OID_TO_HASH).forEach(function (k) { + HASH_TO_OID[OID_TO_HASH[k]] = k; +}); + +/* + * For reading we support both PKCS#1 and PKCS#8. If we find a private key, + * we just take the public component of it and use that. + */ +function read(buf, options, forceType) { + var input = buf; + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var lines = buf.trim().split(/[\r\n]+/g); + + var m; + var si = -1; + while (!m && si < lines.length) { + m = lines[++si].match(/*JSSTYLED*/ + /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + } + assert.ok(m, 'invalid PEM header'); + + var m2; + var ei = lines.length; + while (!m2 && ei > 0) { + m2 = lines[--ei].match(/*JSSTYLED*/ + /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + } + assert.ok(m2, 'invalid PEM footer'); + + /* Begin and end banners must match key type */ + assert.equal(m[2], m2[2]); + var type = m[2].toLowerCase(); + + var alg; + if (m[1]) { + /* They also must match algorithms, if given */ + assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); + alg = m[1].trim(); + } + + lines = lines.slice(si, ei + 1); + + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match(/*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + + /* Chop off the first and last lines */ + lines = lines.slice(0, -1).join(''); + buf = Buffer.from(lines, 'base64'); + + var cipher, key, iv; + if (headers['proc-type']) { + var parts = headers['proc-type'].split(','); + if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from( + options.passphrase, 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } else { + parts = headers['dek-info'].split(','); + assert.ok(parts.length === 2); + cipher = parts[0].toLowerCase(); + iv = Buffer.from(parts[1], 'hex'); + key = utils.opensslKeyDeriv(cipher, iv, + options.passphrase, 1).key; + } + } + } + + if (alg && alg.toLowerCase() === 'encrypted') { + var eder = new asn1.BerReader(buf); + var pbesEnd; + eder.readSequence(); + + eder.readSequence(); + pbesEnd = eder.offset + eder.length; + + var method = eder.readOID(); + if (method !== OID_PBES2) { + throw (new Error('Unsupported PEM/PKCS8 encryption ' + + 'scheme: ' + method)); + } + + eder.readSequence(); /* PBES2-params */ + + eder.readSequence(); /* keyDerivationFunc */ + var kdfEnd = eder.offset + eder.length; + var kdfOid = eder.readOID(); + if (kdfOid !== OID_PBKDF2) + throw (new Error('Unsupported PBES2 KDF: ' + kdfOid)); + eder.readSequence(); + var salt = eder.readString(asn1.Ber.OctetString, true); + var iterations = eder.readInt(); + var hashAlg = 'sha1'; + if (eder.offset < kdfEnd) { + eder.readSequence(); + var hashAlgOid = eder.readOID(); + hashAlg = OID_TO_HASH[hashAlgOid]; + if (hashAlg === undefined) { + throw (new Error('Unsupported PBKDF2 hash: ' + + hashAlgOid)); + } + } + eder._offset = kdfEnd; + + eder.readSequence(); /* encryptionScheme */ + var cipherOid = eder.readOID(); + cipher = OID_TO_CIPHER[cipherOid]; + if (cipher === undefined) { + throw (new Error('Unsupported PBES2 cipher: ' + + cipherOid)); + } + iv = eder.readString(asn1.Ber.OctetString, true); + + eder._offset = pbesEnd; + buf = eder.readString(asn1.Ber.OctetString, true); + + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from( + options.passphrase, 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } + + var cinfo = utils.opensshCipherInfo(cipher); + + cipher = cinfo.opensslName; + key = utils.pbkdf2(hashAlg, salt, iterations, cinfo.keySize, + options.passphrase); + alg = undefined; + } + + if (cipher && key && iv) { + var cipherStream = crypto.createDecipheriv(cipher, key, iv); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(buf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + buf = Buffer.concat(chunks); + } + + /* The new OpenSSH internal format abuses PEM headers */ + if (alg && alg.toLowerCase() === 'openssh') + return (sshpriv.readSSHPrivate(type, buf, options)); + if (alg && alg.toLowerCase() === 'ssh2') + return (rfc4253.readType(type, buf, options)); + + var der = new asn1.BerReader(buf); + der.originalInput = input; + + /* + * All of the PEM file types start with a sequence tag, so chop it + * off here + */ + der.readSequence(); + + /* PKCS#1 type keys name an algorithm in the banner explicitly */ + if (alg) { + if (forceType) + assert.strictEqual(forceType, 'pkcs1'); + return (pkcs1.readPkcs1(alg, type, der)); + } else { + if (forceType) + assert.strictEqual(forceType, 'pkcs8'); + return (pkcs8.readPkcs8(alg, type, der)); + } +} + +function write(key, options, type) { + assert.object(key); + + var alg = { + 'ecdsa': 'EC', + 'rsa': 'RSA', + 'dsa': 'DSA', + 'ed25519': 'EdDSA' + }[key.type]; + var header; + + var der = new asn1.BerWriter(); + + if (PrivateKey.isPrivateKey(key)) { + if (type && type === 'pkcs8') { + header = 'PRIVATE KEY'; + pkcs8.writePkcs8(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs1'); + header = alg + ' PRIVATE KEY'; + pkcs1.writePkcs1(der, key); + } + + } else if (Key.isKey(key)) { + if (type && type === 'pkcs1') { + header = alg + ' PUBLIC KEY'; + pkcs1.writePkcs1(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs8'); + header = 'PUBLIC KEY'; + pkcs8.writePkcs8(der, key); + } + + } else { + throw (new Error('key is not a Key or PrivateKey')); + } + + var tmp = der.buffer.toString('base64'); + var len = tmp.length + (tmp.length / 64) + + 18 + 16 + header.length*2 + 10; + var buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js b/test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js new file mode 100644 index 00000000..bc485500 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js @@ -0,0 +1,373 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readPkcs1: readPkcs1, + write: write, + writePkcs1: writePkcs1 +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); + +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); + +var pkcs8 = require('./pkcs8'); +var readECDSACurve = pkcs8.readECDSACurve; + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs1')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs1')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs1(alg, type, der) { + switch (alg) { + case 'RSA': + if (type === 'public') + return (readPkcs1RSAPublic(der)); + else if (type === 'private') + return (readPkcs1RSAPrivate(der)); + throw (new Error('Unknown key type: ' + type)); + case 'DSA': + if (type === 'public') + return (readPkcs1DSAPublic(der)); + else if (type === 'private') + return (readPkcs1DSAPrivate(der)); + throw (new Error('Unknown key type: ' + type)); + case 'EC': + case 'ECDSA': + if (type === 'private') + return (readPkcs1ECDSAPrivate(der)); + else if (type === 'public') + return (readPkcs1ECDSAPublic(der)); + throw (new Error('Unknown key type: ' + type)); + case 'EDDSA': + case 'EdDSA': + if (type === 'private') + return (readPkcs1EdDSAPrivate(der)); + throw (new Error(type + ' keys not supported with EdDSA')); + default: + throw (new Error('Unknown key algo: ' + alg)); + } +} + +function readPkcs1RSAPublic(der) { + // modulus and exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs1RSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version[0], 0); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1DSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 0); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + var y = readMPInt(der, 'y'); + var x = readMPInt(der, 'x'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1EdDSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 1); + + // private key + var k = der.readString(asn1.Ber.OctetString, true); + + der.readSequence(0xa0); + var oid = der.readOID(); + assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier'); + + der.readSequence(0xa1); + var A = utils.readBitString(der); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: k } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs1DSAPublic(der) { + var y = readMPInt(der, 'y'); + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + var key = { + type: 'dsa', + parts: [ + { name: 'y', data: y }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g } + ] + }; + + return (new Key(key)); +} + +function readPkcs1ECDSAPublic(der) { + der.readSequence(); + + var oid = der.readOID(); + assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); + + var curveOid = der.readOID(); + + var curve; + var curves = Object.keys(algs.curves); + for (var j = 0; j < curves.length; ++j) { + var c = curves[j]; + var cd = algs.curves[c]; + if (cd.pkcs8oid === curveOid) { + curve = c; + break; + } + } + assert.string(curve, 'a known ECDSA named curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curve) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function readPkcs1ECDSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 1); + + // private key + var d = der.readString(asn1.Ber.OctetString, true); + + der.readSequence(0xa0); + var curve = readECDSACurve(der); + assert.string(curve, 'a known elliptic curve'); + + der.readSequence(0xa1); + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curve) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function writePkcs1(der, key) { + der.startSequence(); + + switch (key.type) { + case 'rsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1RSAPrivate(der, key); + else + writePkcs1RSAPublic(der, key); + break; + case 'dsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1DSAPrivate(der, key); + else + writePkcs1DSAPublic(der, key); + break; + case 'ecdsa': + if (PrivateKey.isPrivateKey(key)) + writePkcs1ECDSAPrivate(der, key); + else + writePkcs1ECDSAPublic(der, key); + break; + case 'ed25519': + if (PrivateKey.isPrivateKey(key)) + writePkcs1EdDSAPrivate(der, key); + else + writePkcs1EdDSAPublic(der, key); + break; + default: + throw (new Error('Unknown key algo: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs1RSAPublic(der, key) { + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); +} + +function writePkcs1RSAPrivate(der, key) { + var ver = Buffer.from([0]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); +} + +function writePkcs1DSAPrivate(der, key) { + var ver = Buffer.from([0]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); +} + +function writePkcs1DSAPublic(der, key) { + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); +} + +function writePkcs1ECDSAPublic(der, key) { + der.startSequence(); + + der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, 'a known ECDSA named curve'); + der.writeOID(curveOid); + + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs1ECDSAPrivate(der, key) { + var ver = Buffer.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa0); + var curve = key.part.curve.data.toString(); + var curveOid = algs.curves[curve].pkcs8oid; + assert.string(curveOid, 'a known ECDSA named curve'); + der.writeOID(curveOid); + der.endSequence(); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); +} + +function writePkcs1EdDSAPrivate(der, key) { + var ver = Buffer.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); + + der.startSequence(0xa0); + der.writeOID('1.3.101.112'); + der.endSequence(); + + der.startSequence(0xa1); + utils.writeBitString(der, key.part.A.data); + der.endSequence(); +} + +function writePkcs1EdDSAPublic(der, key) { + throw (new Error('Public keys are not supported for EdDSA PKCS#1')); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js b/test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js new file mode 100644 index 00000000..07d04c85 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js @@ -0,0 +1,643 @@ +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + readPkcs8: readPkcs8, + write: write, + writePkcs8: writePkcs8, + pkcs8ToBuffer: pkcs8ToBuffer, + + readECDSACurve: readECDSACurve, + writeECDSACurve: writeECDSACurve +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs8')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs8')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs8(alg, type, der) { + /* Private keys in pkcs#8 format have a weird extra int */ + if (der.peek() === asn1.Ber.Integer) { + assert.strictEqual(type, 'private', + 'unexpected Integer at start of public key'); + der.readString(asn1.Ber.Integer, true); + } + + der.readSequence(); + var next = der.offset + der.length; + + var oid = der.readOID(); + switch (oid) { + case '1.2.840.113549.1.1.1': + der._offset = next; + if (type === 'public') + return (readPkcs8RSAPublic(der)); + else + return (readPkcs8RSAPrivate(der)); + case '1.2.840.10040.4.1': + if (type === 'public') + return (readPkcs8DSAPublic(der)); + else + return (readPkcs8DSAPrivate(der)); + case '1.2.840.10045.2.1': + if (type === 'public') + return (readPkcs8ECDSAPublic(der)); + else + return (readPkcs8ECDSAPrivate(der)); + case '1.3.101.112': + if (type === 'public') { + return (readPkcs8EdDSAPublic(der)); + } else { + return (readPkcs8EdDSAPrivate(der)); + } + case '1.3.101.110': + if (type === 'public') { + return (readPkcs8X25519Public(der)); + } else { + return (readPkcs8X25519Private(der)); + } + default: + throw (new Error('Unknown key type OID ' + oid)); + } +} + +function readPkcs8RSAPublic(der) { + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + der.readSequence(); + + // modulus + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + source: der.originalInput, + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs8RSAPrivate(der) { + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var ver = readMPInt(der, 'version'); + assert.equal(ver[0], 0x0, 'unknown RSA private key version'); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8DSAPublic(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + + var y = readMPInt(der, 'y'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y } + ] + }; + + return (new Key(key)); +} + +function readPkcs8DSAPrivate(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + der.readSequence(asn1.Ber.OctetString); + var x = readMPInt(der, 'x'); + + /* The pkcs#8 format does not include the public key */ + var y = utils.calculateDSAPublic(g, p, x); + + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readECDSACurve(der) { + var curveName, curveNames; + var j, c, cd; + + if (der.peek() === asn1.Ber.OID) { + var oid = der.readOID(); + + curveNames = Object.keys(algs.curves); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + if (cd.pkcs8oid === oid) { + curveName = c; + break; + } + } + + } else { + // ECParameters sequence + der.readSequence(); + var version = der.readString(asn1.Ber.Integer, true); + assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); + + var curve = {}; + + // FieldID sequence + der.readSequence(); + var fieldTypeOid = der.readOID(); + assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', + 'ECDSA key is not from a prime-field'); + var p = curve.p = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + /* + * p always starts with a 1 bit, so count the zeros to get its + * real size. + */ + curve.size = p.length * 8 - utils.countZeros(p); + + // Curve sequence + der.readSequence(); + curve.a = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + curve.b = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + if (der.peek() === asn1.Ber.BitString) + curve.s = der.readString(asn1.Ber.BitString, true); + + // Combined Gx and Gy + curve.G = der.readString(asn1.Ber.OctetString, true); + assert.strictEqual(curve.G[0], 0x4, + 'uncompressed G is required'); + + curve.n = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + curve.h = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + + 'required'); + + curveNames = Object.keys(algs.curves); + var ks = Object.keys(curve); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + var equal = true; + for (var i = 0; i < ks.length; ++i) { + var k = ks[i]; + if (cd[k] === undefined) + continue; + if (typeof (cd[k]) === 'object' && + cd[k].equals !== undefined) { + if (!cd[k].equals(curve[k])) { + equal = false; + break; + } + } else if (Buffer.isBuffer(cd[k])) { + if (cd[k].toString('binary') + !== curve[k].toString('binary')) { + equal = false; + break; + } + } else { + if (cd[k] !== curve[k]) { + equal = false; + break; + } + } + } + if (equal) { + curveName = c; + break; + } + } + } + return (curveName); +} + +function readPkcs8ECDSAPrivate(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var version = readMPInt(der, 'version'); + assert.equal(version[0], 1, 'unknown version of ECDSA key'); + + var d = der.readString(asn1.Ber.OctetString, true); + var Q; + + if (der.peek() == 0xa0) { + der.readSequence(0xa0); + der._offset += der.length; + } + if (der.peek() == 0xa1) { + der.readSequence(0xa1); + Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + } + + if (Q === undefined) { + var pub = utils.publicFromPrivateECDSA(curveName, d); + Q = pub.part.Q.data; + } + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curveName) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8ECDSAPublic(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curveName) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function readPkcs8EdDSAPublic(der) { + if (der.peek() === 0x00) + der.readByte(); + + var A = utils.readBitString(der); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) } + ] + }; + + return (new Key(key)); +} + +function readPkcs8X25519Public(der) { + var A = utils.readBitString(der); + + var key = { + type: 'curve25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) } + ] + }; + + return (new Key(key)); +} + +function readPkcs8EdDSAPrivate(der) { + if (der.peek() === 0x00) + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + + var A, tag; + while ((tag = der.peek()) !== null) { + if (tag === (asn1.Ber.Context | 1)) { + A = utils.readBitString(der, tag); + } else { + der.readSequence(tag); + der._offset += der.length; + } + } + if (A === undefined) + A = utils.calculateED25519Public(k); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: utils.zeroPadToLength(k, 32) } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8X25519Private(der) { + if (der.peek() === 0x00) + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + + var A = utils.calculateX25519Public(k); + + var key = { + type: 'curve25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: utils.zeroPadToLength(k, 32) } + ] + }; + + return (new PrivateKey(key)); +} + +function pkcs8ToBuffer(key) { + var der = new asn1.BerWriter(); + writePkcs8(der, key); + return (der.buffer); +} + +function writePkcs8(der, key) { + der.startSequence(); + + if (PrivateKey.isPrivateKey(key)) { + var version = 0; + if (key.type === 'ed25519') + version = 1; + var vbuf = Buffer.from([version]); + der.writeBuffer(vbuf, asn1.Ber.Integer); + } + + der.startSequence(); + switch (key.type) { + case 'rsa': + der.writeOID('1.2.840.113549.1.1.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8RSAPrivate(key, der); + else + writePkcs8RSAPublic(key, der); + break; + case 'dsa': + der.writeOID('1.2.840.10040.4.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8DSAPrivate(key, der); + else + writePkcs8DSAPublic(key, der); + break; + case 'ecdsa': + der.writeOID('1.2.840.10045.2.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8ECDSAPrivate(key, der); + else + writePkcs8ECDSAPublic(key, der); + break; + case 'ed25519': + der.writeOID('1.3.101.112'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8EdDSAPrivate(key, der); + else + writePkcs8EdDSAPublic(key, der); + break; + default: + throw (new Error('Unsupported key type: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs8RSAPrivate(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = Buffer.from([0]); + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8RSAPublic(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + + der.startSequence(); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); +} + +function writePkcs8DSAPrivate(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writePkcs8DSAPublic(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writeECDSACurve(key, der) { + var curve = algs.curves[key.curve]; + if (curve.pkcs8oid) { + /* This one has a name in pkcs#8, so just write the oid */ + der.writeOID(curve.pkcs8oid); + + } else { + // ECParameters sequence + der.startSequence(); + + var version = Buffer.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + + // FieldID sequence + der.startSequence(); + der.writeOID('1.2.840.10045.1.1'); // prime-field + der.writeBuffer(curve.p, asn1.Ber.Integer); + der.endSequence(); + + // Curve sequence + der.startSequence(); + var a = curve.p; + if (a[0] === 0x0) + a = a.slice(1); + der.writeBuffer(a, asn1.Ber.OctetString); + der.writeBuffer(curve.b, asn1.Ber.OctetString); + der.writeBuffer(curve.s, asn1.Ber.BitString); + der.endSequence(); + + der.writeBuffer(curve.G, asn1.Ber.OctetString); + der.writeBuffer(curve.n, asn1.Ber.Integer); + var h = curve.h; + if (!h) { + h = Buffer.from([1]); + } + der.writeBuffer(h, asn1.Ber.Integer); + + // ECParameters + der.endSequence(); + } +} + +function writePkcs8ECDSAPublic(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs8ECDSAPrivate(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = Buffer.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8EdDSAPublic(key, der) { + der.endSequence(); + + utils.writeBitString(der, key.part.A.data); +} + +function writePkcs8EdDSAPrivate(key, der) { + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + var k = utils.mpNormalize(key.part.k.data); + /* RFCs call for storing exactly 32 bytes, so strip any leading zeros */ + while (k.length > 32 && k[0] === 0x00) + k = k.slice(1); + der.writeBuffer(k, asn1.Ber.OctetString); + der.endSequence(); + + utils.writeBitString(der, key.part.A.data, asn1.Ber.Context | 1); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/putty.js b/test-eol-project/node_modules/sshpk/lib/formats/putty.js new file mode 100644 index 00000000..e7b2add3 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/putty.js @@ -0,0 +1,194 @@ +// Copyright 2018 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var rfc4253 = require('./rfc4253'); +var Key = require('../key'); +var SSHBuffer = require('../ssh-buffer'); +var crypto = require('crypto'); +var PrivateKey = require('../private-key'); + +var errors = require('../errors'); + +// https://tartarus.org/~simon/putty-prerel-snapshots/htmldoc/AppendixC.html +function read(buf, options) { + var lines = buf.toString('ascii').split(/[\r\n]+/); + var found = false; + var parts; + var si = 0; + var formatVersion; + while (si < lines.length) { + parts = splitHeader(lines[si++]); + if (parts) { + formatVersion = { + 'putty-user-key-file-2': 2, + 'putty-user-key-file-3': 3 + }[parts[0].toLowerCase()]; + if (formatVersion) { + found = true; + break; + } + } + } + if (!found) { + throw (new Error('No PuTTY format first line found')); + } + var alg = parts[1]; + + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'encryption'); + var encryption = parts[1]; + + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'comment'); + var comment = parts[1]; + + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'public-lines'); + var publicLines = parseInt(parts[1], 10); + if (!isFinite(publicLines) || publicLines < 0 || + publicLines > lines.length) { + throw (new Error('Invalid public-lines count')); + } + + var publicBuf = Buffer.from( + lines.slice(si, si + publicLines).join(''), 'base64'); + var keyType = rfc4253.algToKeyType(alg); + var key = rfc4253.read(publicBuf); + if (key.type !== keyType) { + throw (new Error('Outer key algorithm mismatch')); + } + + si += publicLines; + if (lines[si]) { + parts = splitHeader(lines[si++]); + assert.equal(parts[0].toLowerCase(), 'private-lines'); + var privateLines = parseInt(parts[1], 10); + if (!isFinite(privateLines) || privateLines < 0 || + privateLines > lines.length) { + throw (new Error('Invalid private-lines count')); + } + + var privateBuf = Buffer.from( + lines.slice(si, si + privateLines).join(''), 'base64'); + + if (encryption !== 'none' && formatVersion === 3) { + throw new Error('Encrypted keys arenot supported for' + + ' PuTTY format version 3'); + } + + if (encryption === 'aes256-cbc') { + if (!options.passphrase) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } + + var iv = Buffer.alloc(16, 0); + var decipher = crypto.createDecipheriv( + 'aes-256-cbc', + derivePPK2EncryptionKey(options.passphrase), + iv); + decipher.setAutoPadding(false); + privateBuf = Buffer.concat([ + decipher.update(privateBuf), decipher.final()]); + } + + key = new PrivateKey(key); + if (key.type !== keyType) { + throw (new Error('Outer key algorithm mismatch')); + } + + var sshbuf = new SSHBuffer({buffer: privateBuf}); + var privateKeyParts; + if (alg === 'ssh-dss') { + privateKeyParts = [ { + name: 'x', + data: sshbuf.readBuffer() + }]; + } else if (alg === 'ssh-rsa') { + privateKeyParts = [ + { name: 'd', data: sshbuf.readBuffer() }, + { name: 'p', data: sshbuf.readBuffer() }, + { name: 'q', data: sshbuf.readBuffer() }, + { name: 'iqmp', data: sshbuf.readBuffer() } + ]; + } else if (alg.match(/^ecdsa-sha2-nistp/)) { + privateKeyParts = [ { + name: 'd', data: sshbuf.readBuffer() + } ]; + } else if (alg === 'ssh-ed25519') { + privateKeyParts = [ { + name: 'k', data: sshbuf.readBuffer() + } ]; + } else { + throw new Error('Unsupported PPK key type: ' + alg); + } + + key = new PrivateKey({ + type: key.type, + parts: key.parts.concat(privateKeyParts) + }); + } + + key.comment = comment; + return (key); +} + +function derivePPK2EncryptionKey(passphrase) { + var hash1 = crypto.createHash('sha1').update(Buffer.concat([ + Buffer.from([0, 0, 0, 0]), + Buffer.from(passphrase) + ])).digest(); + var hash2 = crypto.createHash('sha1').update(Buffer.concat([ + Buffer.from([0, 0, 0, 1]), + Buffer.from(passphrase) + ])).digest(); + return (Buffer.concat([hash1, hash2]).slice(0, 32)); +} + +function splitHeader(line) { + var idx = line.indexOf(':'); + if (idx === -1) + return (null); + var header = line.slice(0, idx); + ++idx; + while (line[idx] === ' ') + ++idx; + var rest = line.slice(idx); + return ([header, rest]); +} + +function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw (new Error('Must be a public key')); + + var alg = rfc4253.keyTypeToAlg(key); + var buf = rfc4253.write(key); + var comment = key.comment || ''; + + var b64 = buf.toString('base64'); + var lines = wrap(b64, 64); + + lines.unshift('Public-Lines: ' + lines.length); + lines.unshift('Comment: ' + comment); + lines.unshift('Encryption: none'); + lines.unshift('PuTTY-User-Key-File-2: ' + alg); + + return (Buffer.from(lines.join('\n') + '\n')); +} + +function wrap(txt, len) { + var lines = []; + var pos = 0; + while (pos < txt.length) { + lines.push(txt.slice(pos, pos + 64)); + pos += 64; + } + return (lines); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js b/test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js new file mode 100644 index 00000000..52fddcb6 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js @@ -0,0 +1,166 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read.bind(undefined, false, undefined), + readType: read.bind(undefined, false), + write: write, + /* semi-private api, used by sshpk-agent */ + readPartial: read.bind(undefined, true), + + /* shared with ssh format */ + readInternal: read, + keyTypeToAlg: keyTypeToAlg, + algToKeyType: algToKeyType +}; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var SSHBuffer = require('../ssh-buffer'); + +function algToKeyType(alg) { + assert.string(alg); + if (alg === 'ssh-dss') + return ('dsa'); + else if (alg === 'ssh-rsa') + return ('rsa'); + else if (alg === 'ssh-ed25519') + return ('ed25519'); + else if (alg === 'ssh-curve25519') + return ('curve25519'); + else if (alg.match(/^ecdsa-sha2-/)) + return ('ecdsa'); + else + throw (new Error('Unknown algorithm ' + alg)); +} + +function keyTypeToAlg(key) { + assert.object(key); + if (key.type === 'dsa') + return ('ssh-dss'); + else if (key.type === 'rsa') + return ('ssh-rsa'); + else if (key.type === 'ed25519') + return ('ssh-ed25519'); + else if (key.type === 'curve25519') + return ('ssh-curve25519'); + else if (key.type === 'ecdsa') + return ('ecdsa-sha2-' + key.part.curve.data.toString()); + else + throw (new Error('Unknown key type ' + key.type)); +} + +function read(partial, type, buf, options) { + if (typeof (buf) === 'string') + buf = Buffer.from(buf); + assert.buffer(buf, 'buf'); + + var key = {}; + + var parts = key.parts = []; + var sshbuf = new SSHBuffer({buffer: buf}); + + var alg = sshbuf.readString(); + assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); + + key.type = algToKeyType(alg); + + var partCount = algs.info[key.type].parts.length; + if (type && type === 'private') + partCount = algs.privInfo[key.type].parts.length; + + while (!sshbuf.atEnd() && parts.length < partCount) + parts.push(sshbuf.readPart()); + while (!partial && !sshbuf.atEnd()) + parts.push(sshbuf.readPart()); + + assert.ok(parts.length >= 1, + 'key must have at least one part'); + assert.ok(partial || sshbuf.atEnd(), + 'leftover bytes at end of key'); + + var Constructor = Key; + var algInfo = algs.info[key.type]; + if (type === 'private' || algInfo.parts.length !== parts.length) { + algInfo = algs.privInfo[key.type]; + Constructor = PrivateKey; + } + assert.strictEqual(algInfo.parts.length, parts.length); + + if (key.type === 'ecdsa') { + var res = /^ecdsa-sha2-(.+)$/.exec(alg); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + + var normalized = true; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = parts[i]; + p.name = algInfo.parts[i]; + /* + * OpenSSH stores ed25519 "private" keys as seed + public key + * concat'd together (k followed by A). We want to keep them + * separate for other formats that don't do this. + */ + if (key.type === 'ed25519' && p.name === 'k') + p.data = p.data.slice(0, 32); + + if (p.name !== 'curve' && algInfo.normalize !== false) { + var nd; + if (key.type === 'ed25519') { + nd = utils.zeroPadToLength(p.data, 32); + } else { + nd = utils.mpNormalize(p.data); + } + if (nd.toString('binary') !== + p.data.toString('binary')) { + p.data = nd; + normalized = false; + } + } + } + + if (normalized) + key._rfc4253Cache = sshbuf.toBuffer(); + + if (partial && typeof (partial) === 'object') { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + + return (new Constructor(key)); +} + +function write(key, options) { + assert.object(key); + + var alg = keyTypeToAlg(key); + var i; + + var algInfo = algs.info[key.type]; + if (PrivateKey.isPrivateKey(key)) + algInfo = algs.privInfo[key.type]; + var parts = algInfo.parts; + + var buf = new SSHBuffer({}); + + buf.writeString(alg); + + for (i = 0; i < parts.length; ++i) { + var data = key.part[parts[i]].data; + if (algInfo.normalize !== false) { + if (key.type === 'ed25519') + data = utils.zeroPadToLength(data, 32); + else + data = utils.mpNormalize(data); + } + if (key.type === 'ed25519' && parts[i] === 'k') + data = Buffer.concat([data, key.part.A.data]); + buf.writeBuffer(data); + } + + return (buf.toBuffer()); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js b/test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js new file mode 100644 index 00000000..5e7eed88 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js @@ -0,0 +1,262 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readSSHPrivate: readSSHPrivate, + write: write +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); +var crypto = require('crypto'); + +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); +var rfc4253 = require('./rfc4253'); +var SSHBuffer = require('../ssh-buffer'); +var errors = require('../errors'); + +var bcrypt; + +function read(buf, options) { + return (pem.read(buf, options)); +} + +var MAGIC = 'openssh-key-v1'; + +function readSSHPrivate(type, buf, options) { + buf = new SSHBuffer({buffer: buf}); + + var magic = buf.readCString(); + assert.strictEqual(magic, MAGIC, 'bad magic string'); + + var cipher = buf.readString(); + var kdf = buf.readString(); + var kdfOpts = buf.readBuffer(); + + var nkeys = buf.readInt(); + if (nkeys !== 1) { + throw (new Error('OpenSSH-format key file contains ' + + 'multiple keys: this is unsupported.')); + } + + var pubKey = buf.readBuffer(); + + if (type === 'public') { + assert.ok(buf.atEnd(), 'excess bytes left after key'); + return (rfc4253.read(pubKey)); + } + + var privKeyBlob = buf.readBuffer(); + assert.ok(buf.atEnd(), 'excess bytes left after key'); + + var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); + switch (kdf) { + case 'none': + if (cipher !== 'none') { + throw (new Error('OpenSSH-format key uses KDF "none" ' + + 'but specifies a cipher other than "none"')); + } + break; + case 'bcrypt': + var salt = kdfOptsBuf.readBuffer(); + var rounds = kdfOptsBuf.readInt(); + var cinf = utils.opensshCipherInfo(cipher); + if (bcrypt === undefined) { + bcrypt = require('bcrypt-pbkdf'); + } + + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from(options.passphrase, + 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'OpenSSH')); + } + + var pass = new Uint8Array(options.passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = Buffer.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + var cipherStream = crypto.createDecipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(privKeyBlob); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privKeyBlob = Buffer.concat(chunks); + break; + default: + throw (new Error( + 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); + } + + buf = new SSHBuffer({buffer: privKeyBlob}); + + var checkInt1 = buf.readInt(); + var checkInt2 = buf.readInt(); + if (checkInt1 !== checkInt2) { + throw (new Error('Incorrect passphrase supplied, could not ' + + 'decrypt key')); + } + + var ret = {}; + var key = rfc4253.readInternal(ret, 'private', buf.remainder()); + + buf.skip(ret.consumed); + + var comment = buf.readString(); + key.comment = comment; + + return (key); +} + +function write(key, options) { + var pubKey; + if (PrivateKey.isPrivateKey(key)) + pubKey = key.toPublic(); + else + pubKey = key; + + var cipher = 'none'; + var kdf = 'none'; + var kdfopts = Buffer.alloc(0); + var cinf = { blockSize: 8 }; + var passphrase; + if (options !== undefined) { + passphrase = options.passphrase; + if (typeof (passphrase) === 'string') + passphrase = Buffer.from(passphrase, 'utf-8'); + if (passphrase !== undefined) { + assert.buffer(passphrase, 'options.passphrase'); + assert.optionalString(options.cipher, 'options.cipher'); + cipher = options.cipher; + if (cipher === undefined) + cipher = 'aes128-ctr'; + cinf = utils.opensshCipherInfo(cipher); + kdf = 'bcrypt'; + } + } + + var privBuf; + if (PrivateKey.isPrivateKey(key)) { + privBuf = new SSHBuffer({}); + var checkInt = crypto.randomBytes(4).readUInt32BE(0); + privBuf.writeInt(checkInt); + privBuf.writeInt(checkInt); + privBuf.write(key.toBuffer('rfc4253')); + privBuf.writeString(key.comment || ''); + + var n = 1; + while (privBuf._offset % cinf.blockSize !== 0) + privBuf.writeChar(n++); + privBuf = privBuf.toBuffer(); + } + + switch (kdf) { + case 'none': + break; + case 'bcrypt': + var salt = crypto.randomBytes(16); + var rounds = 16; + var kdfssh = new SSHBuffer({}); + kdfssh.writeBuffer(salt); + kdfssh.writeInt(rounds); + kdfopts = kdfssh.toBuffer(); + + if (bcrypt === undefined) { + bcrypt = require('bcrypt-pbkdf'); + } + var pass = new Uint8Array(passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = Buffer.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + + var cipherStream = crypto.createCipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + throw (e); + }); + cipherStream.write(privBuf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privBuf = Buffer.concat(chunks); + break; + default: + throw (new Error('Unsupported kdf ' + kdf)); + } + + var buf = new SSHBuffer({}); + + buf.writeCString(MAGIC); + buf.writeString(cipher); /* cipher */ + buf.writeString(kdf); /* kdf */ + buf.writeBuffer(kdfopts); /* kdfoptions */ + + buf.writeInt(1); /* nkeys */ + buf.writeBuffer(pubKey.toBuffer('rfc4253')); + + if (privBuf) + buf.writeBuffer(privBuf); + + buf = buf.toBuffer(); + + var header; + if (PrivateKey.isPrivateKey(key)) + header = 'OPENSSH PRIVATE KEY'; + else + header = 'OPENSSH PUBLIC KEY'; + + var tmp = buf.toString('base64'); + var len = tmp.length + (tmp.length / 70) + + 18 + 16 + header.length*2 + 10; + buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 70; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/ssh.js b/test-eol-project/node_modules/sshpk/lib/formats/ssh.js new file mode 100644 index 00000000..c8e9c931 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/ssh.js @@ -0,0 +1,115 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var rfc4253 = require('./rfc4253'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); + +var sshpriv = require('./ssh-private'); + +/*JSSTYLED*/ +var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; +/*JSSTYLED*/ +var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var trimmed = buf.trim().replace(/[\\\r]/g, ''); + var m = trimmed.match(SSHKEY_RE); + if (!m) + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, 'key must match regex'); + + var type = rfc4253.algToKeyType(m[1]); + var kbuf = Buffer.from(m[2], 'base64'); + + /* + * This is a bit tricky. If we managed to parse the key and locate the + * key comment with the regex, then do a non-partial read and assert + * that we have consumed all bytes. If we couldn't locate the key + * comment, though, there may be whitespace shenanigans going on that + * have conjoined the comment to the rest of the key. We do a partial + * read in this case to try to make the best out of a sorry situation. + */ + var key; + var ret = {}; + if (m[4]) { + try { + key = rfc4253.read(kbuf); + + } catch (e) { + m = trimmed.match(SSHKEY_RE2); + assert.ok(m, 'key must match regex'); + kbuf = Buffer.from(m[2], 'base64'); + key = rfc4253.readInternal(ret, 'public', kbuf); + } + } else { + key = rfc4253.readInternal(ret, 'public', kbuf); + } + + assert.strictEqual(type, key.type); + + if (m[4] && m[4].length > 0) { + key.comment = m[4]; + + } else if (ret.consumed) { + /* + * Now the magic: trying to recover the key comment when it's + * gotten conjoined to the key or otherwise shenanigan'd. + * + * Work out how much base64 we used, then drop all non-base64 + * chars from the beginning up to this point in the the string. + * Then offset in this and try to make up for missing = chars. + */ + var data = m[2] + (m[3] ? m[3] : ''); + var realOffset = Math.ceil(ret.consumed / 3) * 4; + data = data.slice(0, realOffset - 2). /*JSSTYLED*/ + replace(/[^a-zA-Z0-9+\/=]/g, '') + + data.slice(realOffset - 2); + + var padding = ret.consumed % 3; + if (padding > 0 && + data.slice(realOffset - 1, realOffset) !== '=') + realOffset--; + while (data.slice(realOffset, realOffset + 1) === '=') + realOffset++; + + /* Finally, grab what we think is the comment & clean it up. */ + var trailer = data.slice(realOffset); + trailer = trailer.replace(/[\r\n]/g, ' '). + replace(/^\s+/, ''); + if (trailer.match(/^[a-zA-Z0-9]/)) + key.comment = trailer; + } + + return (key); +} + +function write(key, options) { + assert.object(key); + if (!Key.isKey(key)) + throw (new Error('Must be a public key')); + + var parts = []; + var alg = rfc4253.keyTypeToAlg(key); + parts.push(alg); + + var buf = rfc4253.write(key); + parts.push(buf.toString('base64')); + + if (key.comment) + parts.push(key.comment); + + return (Buffer.from(parts.join(' '))); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js b/test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js new file mode 100644 index 00000000..3155ef0b --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js @@ -0,0 +1,88 @@ +// Copyright 2016 Joyent, Inc. + +var x509 = require('./x509'); + +module.exports = { + read: read, + verify: x509.verify, + sign: x509.sign, + write: write +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); +var Identity = require('../identity'); +var Signature = require('../signature'); +var Certificate = require('../certificate'); + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var lines = buf.trim().split(/[\r\n]+/g); + + var m; + var si = -1; + while (!m && si < lines.length) { + m = lines[++si].match(/*JSSTYLED*/ + /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/); + } + assert.ok(m, 'invalid PEM header'); + + var m2; + var ei = lines.length; + while (!m2 && ei > 0) { + m2 = lines[--ei].match(/*JSSTYLED*/ + /[-]+[ ]*END CERTIFICATE[ ]*[-]+/); + } + assert.ok(m2, 'invalid PEM footer'); + + lines = lines.slice(si, ei + 1); + + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match(/*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + + /* Chop off the first and last lines */ + lines = lines.slice(0, -1).join(''); + buf = Buffer.from(lines, 'base64'); + + return (x509.read(buf, options)); +} + +function write(cert, options) { + var dbuf = x509.write(cert, options); + + var header = 'CERTIFICATE'; + var tmp = dbuf.toString('base64'); + var len = tmp.length + (tmp.length / 64) + + 18 + 16 + header.length*2 + 10; + var buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/x509.js b/test-eol-project/node_modules/sshpk/lib/formats/x509.js new file mode 100644 index 00000000..0144c444 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/formats/x509.js @@ -0,0 +1,752 @@ +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + verify: verify, + sign: sign, + signAsync: signAsync, + write: write +}; + +var assert = require('assert-plus'); +var asn1 = require('asn1'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('../algs'); +var utils = require('../utils'); +var Key = require('../key'); +var PrivateKey = require('../private-key'); +var pem = require('./pem'); +var Identity = require('../identity'); +var Signature = require('../signature'); +var Certificate = require('../certificate'); +var pkcs8 = require('./pkcs8'); + +/* + * This file is based on RFC5280 (X.509). + */ + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function verify(cert, key) { + var sig = cert.signatures.x509; + assert.object(sig, 'x509 signature'); + + var algParts = sig.algo.split('-'); + if (algParts[0] !== key.type) + return (false); + + var blob = sig.cache; + if (blob === undefined) { + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + blob = der.buffer; + } + + var verifier = key.createVerify(algParts[1]); + verifier.write(blob); + return (verifier.verify(sig.signature)); +} + +function Local(i) { + return (asn1.Ber.Context | asn1.Ber.Constructor | i); +} + +function Context(i) { + return (asn1.Ber.Context | i); +} + +var SIGN_ALGS = { + 'rsa-md5': '1.2.840.113549.1.1.4', + 'rsa-sha1': '1.2.840.113549.1.1.5', + 'rsa-sha256': '1.2.840.113549.1.1.11', + 'rsa-sha384': '1.2.840.113549.1.1.12', + 'rsa-sha512': '1.2.840.113549.1.1.13', + 'dsa-sha1': '1.2.840.10040.4.3', + 'dsa-sha256': '2.16.840.1.101.3.4.3.2', + 'ecdsa-sha1': '1.2.840.10045.4.1', + 'ecdsa-sha256': '1.2.840.10045.4.3.2', + 'ecdsa-sha384': '1.2.840.10045.4.3.3', + 'ecdsa-sha512': '1.2.840.10045.4.3.4', + 'ed25519-sha512': '1.3.101.112' +}; +Object.keys(SIGN_ALGS).forEach(function (k) { + SIGN_ALGS[SIGN_ALGS[k]] = k; +}); +SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5'; +SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1'; + +var EXTS = { + 'issuerKeyId': '2.5.29.35', + 'altName': '2.5.29.17', + 'basicConstraints': '2.5.29.19', + 'keyUsage': '2.5.29.15', + 'extKeyUsage': '2.5.29.37' +}; + +function read(buf, options) { + if (typeof (buf) === 'string') { + buf = Buffer.from(buf, 'binary'); + } + assert.buffer(buf, 'buf'); + + var der = new asn1.BerReader(buf); + + der.readSequence(); + if (Math.abs(der.length - der.remain) > 1) { + throw (new Error('DER sequence does not contain whole byte ' + + 'stream')); + } + + var tbsStart = der.offset; + der.readSequence(); + var sigOffset = der.offset + der.length; + var tbsEnd = sigOffset; + + if (der.peek() === Local(0)) { + der.readSequence(Local(0)); + var version = der.readInt(); + assert.ok(version <= 3, + 'only x.509 versions up to v3 supported'); + } + + var cert = {}; + cert.signatures = {}; + var sig = (cert.signatures.x509 = {}); + sig.extras = {}; + + cert.serial = readMPInt(der, 'serial'); + + der.readSequence(); + var after = der.offset + der.length; + var certAlgOid = der.readOID(); + var certAlg = SIGN_ALGS[certAlgOid]; + if (certAlg === undefined) + throw (new Error('unknown signature algorithm ' + certAlgOid)); + + der._offset = after; + cert.issuer = Identity.parseAsn1(der); + + der.readSequence(); + cert.validFrom = readDate(der); + cert.validUntil = readDate(der); + + cert.subjects = [Identity.parseAsn1(der)]; + + der.readSequence(); + after = der.offset + der.length; + cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der); + der._offset = after; + + /* issuerUniqueID */ + if (der.peek() === Local(1)) { + der.readSequence(Local(1)); + sig.extras.issuerUniqueID = + buf.slice(der.offset, der.offset + der.length); + der._offset += der.length; + } + + /* subjectUniqueID */ + if (der.peek() === Local(2)) { + der.readSequence(Local(2)); + sig.extras.subjectUniqueID = + buf.slice(der.offset, der.offset + der.length); + der._offset += der.length; + } + + /* extensions */ + if (der.peek() === Local(3)) { + der.readSequence(Local(3)); + var extEnd = der.offset + der.length; + der.readSequence(); + + while (der.offset < extEnd) + readExtension(cert, buf, der); + + assert.strictEqual(der.offset, extEnd); + } + + assert.strictEqual(der.offset, sigOffset); + + der.readSequence(); + after = der.offset + der.length; + var sigAlgOid = der.readOID(); + var sigAlg = SIGN_ALGS[sigAlgOid]; + if (sigAlg === undefined) + throw (new Error('unknown signature algorithm ' + sigAlgOid)); + der._offset = after; + + var sigData = der.readString(asn1.Ber.BitString, true); + if (sigData[0] === 0) + sigData = sigData.slice(1); + var algParts = sigAlg.split('-'); + + sig.signature = Signature.parse(sigData, algParts[0], 'asn1'); + sig.signature.hashAlgorithm = algParts[1]; + sig.algo = sigAlg; + sig.cache = buf.slice(tbsStart, tbsEnd); + + return (new Certificate(cert)); +} + +function readDate(der) { + if (der.peek() === asn1.Ber.UTCTime) { + return (utcTimeToDate(der.readString(asn1.Ber.UTCTime))); + } else if (der.peek() === asn1.Ber.GeneralizedTime) { + return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime))); + } else { + throw (new Error('Unsupported date format')); + } +} + +function writeDate(der, date) { + if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) { + der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime); + } else { + der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime); + } +} + +/* RFC5280, section 4.2.1.6 (GeneralName type) */ +var ALTNAME = { + OtherName: Local(0), + RFC822Name: Context(1), + DNSName: Context(2), + X400Address: Local(3), + DirectoryName: Local(4), + EDIPartyName: Local(5), + URI: Context(6), + IPAddress: Context(7), + OID: Context(8) +}; + +/* RFC5280, section 4.2.1.12 (KeyPurposeId) */ +var EXTPURPOSE = { + 'serverAuth': '1.3.6.1.5.5.7.3.1', + 'clientAuth': '1.3.6.1.5.5.7.3.2', + 'codeSigning': '1.3.6.1.5.5.7.3.3', + + /* See https://github.com/joyent/oid-docs/blob/master/root.md */ + 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1', + 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2' +}; +var EXTPURPOSE_REV = {}; +Object.keys(EXTPURPOSE).forEach(function (k) { + EXTPURPOSE_REV[EXTPURPOSE[k]] = k; +}); + +var KEYUSEBITS = [ + 'signature', 'identity', 'keyEncryption', + 'encryption', 'keyAgreement', 'ca', 'crl' +]; + +function readExtension(cert, buf, der) { + der.readSequence(); + var after = der.offset + der.length; + var extId = der.readOID(); + var id; + var sig = cert.signatures.x509; + if (!sig.extras.exts) + sig.extras.exts = []; + + var critical; + if (der.peek() === asn1.Ber.Boolean) + critical = der.readBoolean(); + + switch (extId) { + case (EXTS.basicConstraints): + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var bcEnd = der.offset + der.length; + var ca = false; + if (der.peek() === asn1.Ber.Boolean) + ca = der.readBoolean(); + if (cert.purposes === undefined) + cert.purposes = []; + if (ca === true) + cert.purposes.push('ca'); + var bc = { oid: extId, critical: critical }; + if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer) + bc.pathLen = der.readInt(); + sig.extras.exts.push(bc); + break; + case (EXTS.extKeyUsage): + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + if (cert.purposes === undefined) + cert.purposes = []; + var ekEnd = der.offset + der.length; + while (der.offset < ekEnd) { + var oid = der.readOID(); + cert.purposes.push(EXTPURPOSE_REV[oid] || oid); + } + /* + * This is a bit of a hack: in the case where we have a cert + * that's only allowed to do serverAuth or clientAuth (and not + * the other), we want to make sure all our Subjects are of + * the right type. But we already parsed our Subjects and + * decided if they were hosts or users earlier (since it appears + * first in the cert). + * + * So we go through and mutate them into the right kind here if + * it doesn't match. This might not be hugely beneficial, as it + * seems that single-purpose certs are not often seen in the + * wild. + */ + if (cert.purposes.indexOf('serverAuth') !== -1 && + cert.purposes.indexOf('clientAuth') === -1) { + cert.subjects.forEach(function (ide) { + if (ide.type !== 'host') { + ide.type = 'host'; + ide.hostname = ide.uid || + ide.email || + ide.components[0].value; + } + }); + } else if (cert.purposes.indexOf('clientAuth') !== -1 && + cert.purposes.indexOf('serverAuth') === -1) { + cert.subjects.forEach(function (ide) { + if (ide.type !== 'user') { + ide.type = 'user'; + ide.uid = ide.hostname || + ide.email || + ide.components[0].value; + } + }); + } + sig.extras.exts.push({ oid: extId, critical: critical }); + break; + case (EXTS.keyUsage): + der.readSequence(asn1.Ber.OctetString); + var bits = der.readString(asn1.Ber.BitString, true); + var setBits = readBitField(bits, KEYUSEBITS); + setBits.forEach(function (bit) { + if (cert.purposes === undefined) + cert.purposes = []; + if (cert.purposes.indexOf(bit) === -1) + cert.purposes.push(bit); + }); + sig.extras.exts.push({ oid: extId, critical: critical, + bits: bits }); + break; + case (EXTS.altName): + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + var aeEnd = der.offset + der.length; + while (der.offset < aeEnd) { + switch (der.peek()) { + case ALTNAME.OtherName: + case ALTNAME.EDIPartyName: + der.readSequence(); + der._offset += der.length; + break; + case ALTNAME.OID: + der.readOID(ALTNAME.OID); + break; + case ALTNAME.RFC822Name: + /* RFC822 specifies email addresses */ + var email = der.readString(ALTNAME.RFC822Name); + id = Identity.forEmail(email); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + case ALTNAME.DirectoryName: + der.readSequence(ALTNAME.DirectoryName); + id = Identity.parseAsn1(der); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + case ALTNAME.DNSName: + var host = der.readString( + ALTNAME.DNSName); + id = Identity.forHost(host); + if (!cert.subjects[0].equals(id)) + cert.subjects.push(id); + break; + default: + der.readString(der.peek()); + break; + } + } + sig.extras.exts.push({ oid: extId, critical: critical }); + break; + default: + sig.extras.exts.push({ + oid: extId, + critical: critical, + data: der.readString(asn1.Ber.OctetString, true) + }); + break; + } + + der._offset = after; +} + +var UTCTIME_RE = + /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; +function utcTimeToDate(t) { + var m = t.match(UTCTIME_RE); + assert.ok(m, 'timestamps must be in UTC'); + var d = new Date(); + + var thisYear = d.getUTCFullYear(); + var century = Math.floor(thisYear / 100) * 100; + + var year = parseInt(m[1], 10); + if (thisYear % 100 < 50 && year >= 60) + year += (century - 1); + else + year += century; + d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10)); + d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); + if (m[6] && m[6].length > 0) + d.setUTCSeconds(parseInt(m[6], 10)); + return (d); +} + +var GTIME_RE = + /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; +function gTimeToDate(t) { + var m = t.match(GTIME_RE); + assert.ok(m); + var d = new Date(); + + d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1, + parseInt(m[3], 10)); + d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); + if (m[6] && m[6].length > 0) + d.setUTCSeconds(parseInt(m[6], 10)); + return (d); +} + +function zeroPad(n, m) { + if (m === undefined) + m = 2; + var s = '' + n; + while (s.length < m) + s = '0' + s; + return (s); +} + +function dateToUTCTime(d) { + var s = ''; + s += zeroPad(d.getUTCFullYear() % 100); + s += zeroPad(d.getUTCMonth() + 1); + s += zeroPad(d.getUTCDate()); + s += zeroPad(d.getUTCHours()); + s += zeroPad(d.getUTCMinutes()); + s += zeroPad(d.getUTCSeconds()); + s += 'Z'; + return (s); +} + +function dateToGTime(d) { + var s = ''; + s += zeroPad(d.getUTCFullYear(), 4); + s += zeroPad(d.getUTCMonth() + 1); + s += zeroPad(d.getUTCDate()); + s += zeroPad(d.getUTCHours()); + s += zeroPad(d.getUTCMinutes()); + s += zeroPad(d.getUTCSeconds()); + s += 'Z'; + return (s); +} + +function sign(cert, key) { + if (cert.signatures.x509 === undefined) + cert.signatures.x509 = {}; + var sig = cert.signatures.x509; + + sig.algo = key.type + '-' + key.defaultHashAlgorithm(); + if (SIGN_ALGS[sig.algo] === undefined) + return (false); + + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + var blob = der.buffer; + sig.cache = blob; + + var signer = key.createSign(); + signer.write(blob); + cert.signatures.x509.signature = signer.sign(); + + return (true); +} + +function signAsync(cert, signer, done) { + if (cert.signatures.x509 === undefined) + cert.signatures.x509 = {}; + var sig = cert.signatures.x509; + + var der = new asn1.BerWriter(); + writeTBSCert(cert, der); + var blob = der.buffer; + sig.cache = blob; + + signer(blob, function (err, signature) { + if (err) { + done(err); + return; + } + sig.algo = signature.type + '-' + signature.hashAlgorithm; + if (SIGN_ALGS[sig.algo] === undefined) { + done(new Error('Invalid signing algorithm "' + + sig.algo + '"')); + return; + } + sig.signature = signature; + done(); + }); +} + +function write(cert, options) { + var sig = cert.signatures.x509; + assert.object(sig, 'x509 signature'); + + var der = new asn1.BerWriter(); + der.startSequence(); + if (sig.cache) { + der._ensure(sig.cache.length); + sig.cache.copy(der._buf, der._offset); + der._offset += sig.cache.length; + } else { + writeTBSCert(cert, der); + } + + der.startSequence(); + der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); + der.endSequence(); + + var sigData = sig.signature.toBuffer('asn1'); + var data = Buffer.alloc(sigData.length + 1); + data[0] = 0; + sigData.copy(data, 1); + der.writeBuffer(data, asn1.Ber.BitString); + der.endSequence(); + + return (der.buffer); +} + +function writeTBSCert(cert, der) { + var sig = cert.signatures.x509; + assert.object(sig, 'x509 signature'); + + der.startSequence(); + + der.startSequence(Local(0)); + der.writeInt(2); + der.endSequence(); + + der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer); + + der.startSequence(); + der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); + der.endSequence(); + + cert.issuer.toAsn1(der); + + der.startSequence(); + writeDate(der, cert.validFrom); + writeDate(der, cert.validUntil); + der.endSequence(); + + var subject = cert.subjects[0]; + var altNames = cert.subjects.slice(1); + subject.toAsn1(der); + + pkcs8.writePkcs8(der, cert.subjectKey); + + if (sig.extras && sig.extras.issuerUniqueID) { + der.writeBuffer(sig.extras.issuerUniqueID, Local(1)); + } + + if (sig.extras && sig.extras.subjectUniqueID) { + der.writeBuffer(sig.extras.subjectUniqueID, Local(2)); + } + + if (altNames.length > 0 || subject.type === 'host' || + (cert.purposes !== undefined && cert.purposes.length > 0) || + (sig.extras && sig.extras.exts)) { + der.startSequence(Local(3)); + der.startSequence(); + + var exts = []; + if (cert.purposes !== undefined && cert.purposes.length > 0) { + exts.push({ + oid: EXTS.basicConstraints, + critical: true + }); + exts.push({ + oid: EXTS.keyUsage, + critical: true + }); + exts.push({ + oid: EXTS.extKeyUsage, + critical: true + }); + } + exts.push({ oid: EXTS.altName }); + if (sig.extras && sig.extras.exts) + exts = sig.extras.exts; + + for (var i = 0; i < exts.length; ++i) { + der.startSequence(); + der.writeOID(exts[i].oid); + + if (exts[i].critical !== undefined) + der.writeBoolean(exts[i].critical); + + if (exts[i].oid === EXTS.altName) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + if (subject.type === 'host') { + der.writeString(subject.hostname, + Context(2)); + } + for (var j = 0; j < altNames.length; ++j) { + if (altNames[j].type === 'host') { + der.writeString( + altNames[j].hostname, + ALTNAME.DNSName); + } else if (altNames[j].type === + 'email') { + der.writeString( + altNames[j].email, + ALTNAME.RFC822Name); + } else { + /* + * Encode anything else as a + * DN style name for now. + */ + der.startSequence( + ALTNAME.DirectoryName); + altNames[j].toAsn1(der); + der.endSequence(); + } + } + der.endSequence(); + der.endSequence(); + } else if (exts[i].oid === EXTS.basicConstraints) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + var ca = (cert.purposes.indexOf('ca') !== -1); + var pathLen = exts[i].pathLen; + der.writeBoolean(ca); + if (pathLen !== undefined) + der.writeInt(pathLen); + der.endSequence(); + der.endSequence(); + } else if (exts[i].oid === EXTS.extKeyUsage) { + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + cert.purposes.forEach(function (purpose) { + if (purpose === 'ca') + return; + if (KEYUSEBITS.indexOf(purpose) !== -1) + return; + var oid = purpose; + if (EXTPURPOSE[purpose] !== undefined) + oid = EXTPURPOSE[purpose]; + der.writeOID(oid); + }); + der.endSequence(); + der.endSequence(); + } else if (exts[i].oid === EXTS.keyUsage) { + der.startSequence(asn1.Ber.OctetString); + /* + * If we parsed this certificate from a byte + * stream (i.e. we didn't generate it in sshpk) + * then we'll have a ".bits" property on the + * ext with the original raw byte contents. + * + * If we have this, use it here instead of + * regenerating it. This guarantees we output + * the same data we parsed, so signatures still + * validate. + */ + if (exts[i].bits !== undefined) { + der.writeBuffer(exts[i].bits, + asn1.Ber.BitString); + } else { + var bits = writeBitField(cert.purposes, + KEYUSEBITS); + der.writeBuffer(bits, + asn1.Ber.BitString); + } + der.endSequence(); + } else { + der.writeBuffer(exts[i].data, + asn1.Ber.OctetString); + } + + der.endSequence(); + } + + der.endSequence(); + der.endSequence(); + } + + der.endSequence(); +} + +/* + * Reads an ASN.1 BER bitfield out of the Buffer produced by doing + * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw + * contents of the BitString tag, which is a count of unused bits followed by + * the bits as a right-padded byte string. + * + * `bits` is the Buffer, `bitIndex` should contain an array of string names + * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec. + * + * Returns an array of Strings, the names of the bits that were set to 1. + */ +function readBitField(bits, bitIndex) { + var bitLen = 8 * (bits.length - 1) - bits[0]; + var setBits = {}; + for (var i = 0; i < bitLen; ++i) { + var byteN = 1 + Math.floor(i / 8); + var bit = 7 - (i % 8); + var mask = 1 << bit; + var bitVal = ((bits[byteN] & mask) !== 0); + var name = bitIndex[i]; + if (bitVal && typeof (name) === 'string') { + setBits[name] = true; + } + } + return (Object.keys(setBits)); +} + +/* + * `setBits` is an array of strings, containing the names for each bit that + * sould be set to 1. `bitIndex` is same as in `readBitField()`. + * + * Returns a Buffer, ready to be written out with `BerWriter#writeString()`. + */ +function writeBitField(setBits, bitIndex) { + var bitLen = bitIndex.length; + var blen = Math.ceil(bitLen / 8); + var unused = blen * 8 - bitLen; + var bits = Buffer.alloc(1 + blen); // zero-filled + bits[0] = unused; + for (var i = 0; i < bitLen; ++i) { + var byteN = 1 + Math.floor(i / 8); + var bit = 7 - (i % 8); + var mask = 1 << bit; + var name = bitIndex[i]; + if (name === undefined) + continue; + var bitVal = (setBits.indexOf(name) !== -1); + if (bitVal) { + bits[byteN] |= mask; + } + } + return (bits); +} diff --git a/test-eol-project/node_modules/sshpk/lib/identity.js b/test-eol-project/node_modules/sshpk/lib/identity.js new file mode 100644 index 00000000..7d75b667 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/identity.js @@ -0,0 +1,373 @@ +// Copyright 2017 Joyent, Inc. + +module.exports = Identity; + +var assert = require('assert-plus'); +var algs = require('./algs'); +var crypto = require('crypto'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var errs = require('./errors'); +var util = require('util'); +var utils = require('./utils'); +var asn1 = require('asn1'); +var Buffer = require('safer-buffer').Buffer; + +/*JSSTYLED*/ +var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; + +var oids = {}; +oids.cn = '2.5.4.3'; +oids.o = '2.5.4.10'; +oids.ou = '2.5.4.11'; +oids.l = '2.5.4.7'; +oids.s = '2.5.4.8'; +oids.c = '2.5.4.6'; +oids.sn = '2.5.4.4'; +oids.postalCode = '2.5.4.17'; +oids.serialNumber = '2.5.4.5'; +oids.street = '2.5.4.9'; +oids.x500UniqueIdentifier = '2.5.4.45'; +oids.role = '2.5.4.72'; +oids.telephoneNumber = '2.5.4.20'; +oids.description = '2.5.4.13'; +oids.dc = '0.9.2342.19200300.100.1.25'; +oids.uid = '0.9.2342.19200300.100.1.1'; +oids.mail = '0.9.2342.19200300.100.1.3'; +oids.title = '2.5.4.12'; +oids.gn = '2.5.4.42'; +oids.initials = '2.5.4.43'; +oids.pseudonym = '2.5.4.65'; +oids.emailAddress = '1.2.840.113549.1.9.1'; + +var unoids = {}; +Object.keys(oids).forEach(function (k) { + unoids[oids[k]] = k; +}); + +function Identity(opts) { + var self = this; + assert.object(opts, 'options'); + assert.arrayOfObject(opts.components, 'options.components'); + this.components = opts.components; + this.componentLookup = {}; + this.components.forEach(function (c) { + if (c.name && !c.oid) + c.oid = oids[c.name]; + if (c.oid && !c.name) + c.name = unoids[c.oid]; + if (self.componentLookup[c.name] === undefined) + self.componentLookup[c.name] = []; + self.componentLookup[c.name].push(c); + }); + if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { + this.cn = this.componentLookup.cn[0].value; + } + assert.optionalString(opts.type, 'options.type'); + if (opts.type === undefined) { + if (this.components.length === 1 && + this.componentLookup.cn && + this.componentLookup.cn.length === 1 && + this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = 'host'; + this.hostname = this.componentLookup.cn[0].value; + + } else if (this.componentLookup.dc && + this.components.length === this.componentLookup.dc.length) { + this.type = 'host'; + this.hostname = this.componentLookup.dc.map( + function (c) { + return (c.value); + }).join('.'); + + } else if (this.componentLookup.uid && + this.components.length === + this.componentLookup.uid.length) { + this.type = 'user'; + this.uid = this.componentLookup.uid[0].value; + + } else if (this.componentLookup.cn && + this.componentLookup.cn.length === 1 && + this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = 'host'; + this.hostname = this.componentLookup.cn[0].value; + + } else if (this.componentLookup.uid && + this.componentLookup.uid.length === 1) { + this.type = 'user'; + this.uid = this.componentLookup.uid[0].value; + + } else if (this.componentLookup.mail && + this.componentLookup.mail.length === 1) { + this.type = 'email'; + this.email = this.componentLookup.mail[0].value; + + } else if (this.componentLookup.cn && + this.componentLookup.cn.length === 1) { + this.type = 'user'; + this.uid = this.componentLookup.cn[0].value; + + } else { + this.type = 'unknown'; + } + } else { + this.type = opts.type; + if (this.type === 'host') + this.hostname = opts.hostname; + else if (this.type === 'user') + this.uid = opts.uid; + else if (this.type === 'email') + this.email = opts.email; + else + throw (new Error('Unknown type ' + this.type)); + } +} + +Identity.prototype.toString = function () { + return (this.components.map(function (c) { + var n = c.name.toUpperCase(); + /*JSSTYLED*/ + n = n.replace(/=/g, '\\='); + var v = c.value; + /*JSSTYLED*/ + v = v.replace(/,/g, '\\,'); + return (n + '=' + v); + }).join(', ')); +}; + +Identity.prototype.get = function (name, asArray) { + assert.string(name, 'name'); + var arr = this.componentLookup[name]; + if (arr === undefined || arr.length === 0) + return (undefined); + if (!asArray && arr.length > 1) + throw (new Error('Multiple values for attribute ' + name)); + if (!asArray) + return (arr[0].value); + return (arr.map(function (c) { + return (c.value); + })); +}; + +Identity.prototype.toArray = function (idx) { + return (this.components.map(function (c) { + return ({ + name: c.name, + value: c.value + }); + })); +}; + +/* + * These are from X.680 -- PrintableString allowed chars are in section 37.4 + * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to + * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 + * (the basic ASCII character set). + */ +/* JSSTYLED */ +var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; +/* JSSTYLED */ +var NOT_IA5 = /[^\x00-\x7f]/; + +Identity.prototype.toAsn1 = function (der, tag) { + der.startSequence(tag); + this.components.forEach(function (c) { + der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); + der.startSequence(); + der.writeOID(c.oid); + /* + * If we fit in a PrintableString, use that. Otherwise use an + * IA5String or UTF8String. + * + * If this identity was parsed from a DN, use the ASN.1 types + * from the original representation (otherwise this might not + * be a full match for the original in some validators). + */ + if (c.asn1type === asn1.Ber.Utf8String || + c.value.match(NOT_IA5)) { + var v = Buffer.from(c.value, 'utf8'); + der.writeBuffer(v, asn1.Ber.Utf8String); + + } else if (c.asn1type === asn1.Ber.IA5String || + c.value.match(NOT_PRINTABLE)) { + der.writeString(c.value, asn1.Ber.IA5String); + + } else { + var type = asn1.Ber.PrintableString; + if (c.asn1type !== undefined) + type = c.asn1type; + der.writeString(c.value, type); + } + der.endSequence(); + der.endSequence(); + }); + der.endSequence(); +}; + +function globMatch(a, b) { + if (a === '**' || b === '**') + return (true); + var aParts = a.split('.'); + var bParts = b.split('.'); + if (aParts.length !== bParts.length) + return (false); + for (var i = 0; i < aParts.length; ++i) { + if (aParts[i] === '*' || bParts[i] === '*') + continue; + if (aParts[i] !== bParts[i]) + return (false); + } + return (true); +} + +Identity.prototype.equals = function (other) { + if (!Identity.isIdentity(other, [1, 0])) + return (false); + if (other.components.length !== this.components.length) + return (false); + for (var i = 0; i < this.components.length; ++i) { + if (this.components[i].oid !== other.components[i].oid) + return (false); + if (!globMatch(this.components[i].value, + other.components[i].value)) { + return (false); + } + } + return (true); +}; + +Identity.forHost = function (hostname) { + assert.string(hostname, 'hostname'); + return (new Identity({ + type: 'host', + hostname: hostname, + components: [ { name: 'cn', value: hostname } ] + })); +}; + +Identity.forUser = function (uid) { + assert.string(uid, 'uid'); + return (new Identity({ + type: 'user', + uid: uid, + components: [ { name: 'uid', value: uid } ] + })); +}; + +Identity.forEmail = function (email) { + assert.string(email, 'email'); + return (new Identity({ + type: 'email', + email: email, + components: [ { name: 'mail', value: email } ] + })); +}; + +Identity.parseDN = function (dn) { + assert.string(dn, 'dn'); + var parts = ['']; + var idx = 0; + var rem = dn; + while (rem.length > 0) { + var m; + /*JSSTYLED*/ + if ((m = /^,/.exec(rem)) !== null) { + parts[++idx] = ''; + rem = rem.slice(m[0].length); + /*JSSTYLED*/ + } else if ((m = /^\\,/.exec(rem)) !== null) { + parts[idx] += ','; + rem = rem.slice(m[0].length); + /*JSSTYLED*/ + } else if ((m = /^\\./.exec(rem)) !== null) { + parts[idx] += m[0]; + rem = rem.slice(m[0].length); + /*JSSTYLED*/ + } else if ((m = /^[^\\,]+/.exec(rem)) !== null) { + parts[idx] += m[0]; + rem = rem.slice(m[0].length); + } else { + throw (new Error('Failed to parse DN')); + } + } + var cmps = parts.map(function (c) { + c = c.trim(); + var eqPos = c.indexOf('='); + while (eqPos > 0 && c.charAt(eqPos - 1) === '\\') + eqPos = c.indexOf('=', eqPos + 1); + if (eqPos === -1) { + throw (new Error('Failed to parse DN')); + } + /*JSSTYLED*/ + var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, '='); + var value = c.slice(eqPos + 1); + return ({ name: name, value: value }); + }); + return (new Identity({ components: cmps })); +}; + +Identity.fromArray = function (components) { + assert.arrayOfObject(components, 'components'); + components.forEach(function (cmp) { + assert.object(cmp, 'component'); + assert.string(cmp.name, 'component.name'); + if (!Buffer.isBuffer(cmp.value) && + !(typeof (cmp.value) === 'string')) { + throw (new Error('Invalid component value')); + } + }); + return (new Identity({ components: components })); +}; + +Identity.parseAsn1 = function (der, top) { + var components = []; + der.readSequence(top); + var end = der.offset + der.length; + while (der.offset < end) { + der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); + var after = der.offset + der.length; + der.readSequence(); + var oid = der.readOID(); + var type = der.peek(); + var value; + switch (type) { + case asn1.Ber.PrintableString: + case asn1.Ber.IA5String: + case asn1.Ber.OctetString: + case asn1.Ber.T61String: + value = der.readString(type); + break; + case asn1.Ber.Utf8String: + value = der.readString(type, true); + value = value.toString('utf8'); + break; + case asn1.Ber.CharacterString: + case asn1.Ber.BMPString: + value = der.readString(type, true); + value = value.toString('utf16le'); + break; + default: + throw (new Error('Unknown asn1 type ' + type)); + } + components.push({ oid: oid, asn1type: type, value: value }); + der._offset = after; + } + der._offset = end; + return (new Identity({ + components: components + })); +}; + +Identity.isIdentity = function (obj, ver) { + return (utils.isCompatible(obj, Identity, ver)); +}; + +/* + * API versions for Identity: + * [1,0] -- initial ver + */ +Identity.prototype._sshpkApiVersion = [1, 0]; + +Identity._oldVersionDetect = function (obj) { + return ([1, 0]); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/index.js b/test-eol-project/node_modules/sshpk/lib/index.js new file mode 100644 index 00000000..f76db791 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/index.js @@ -0,0 +1,40 @@ +// Copyright 2015 Joyent, Inc. + +var Key = require('./key'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var PrivateKey = require('./private-key'); +var Certificate = require('./certificate'); +var Identity = require('./identity'); +var errs = require('./errors'); + +module.exports = { + /* top-level classes */ + Key: Key, + parseKey: Key.parse, + Fingerprint: Fingerprint, + parseFingerprint: Fingerprint.parse, + Signature: Signature, + parseSignature: Signature.parse, + PrivateKey: PrivateKey, + parsePrivateKey: PrivateKey.parse, + generatePrivateKey: PrivateKey.generate, + Certificate: Certificate, + parseCertificate: Certificate.parse, + createSelfSignedCertificate: Certificate.createSelfSigned, + createCertificate: Certificate.create, + Identity: Identity, + identityFromDN: Identity.parseDN, + identityForHost: Identity.forHost, + identityForUser: Identity.forUser, + identityForEmail: Identity.forEmail, + identityFromArray: Identity.fromArray, + + /* errors */ + FingerprintFormatError: errs.FingerprintFormatError, + InvalidAlgorithmError: errs.InvalidAlgorithmError, + KeyParseError: errs.KeyParseError, + SignatureParseError: errs.SignatureParseError, + KeyEncryptedError: errs.KeyEncryptedError, + CertificateParseError: errs.CertificateParseError +}; diff --git a/test-eol-project/node_modules/sshpk/lib/key.js b/test-eol-project/node_modules/sshpk/lib/key.js new file mode 100644 index 00000000..706f8340 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/key.js @@ -0,0 +1,294 @@ +// Copyright 2018 Joyent, Inc. + +module.exports = Key; + +var assert = require('assert-plus'); +var algs = require('./algs'); +var crypto = require('crypto'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var DiffieHellman = require('./dhe').DiffieHellman; +var errs = require('./errors'); +var utils = require('./utils'); +var PrivateKey = require('./private-key'); +var edCompat; + +try { + edCompat = require('./ed-compat'); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; + +var formats = {}; +formats['auto'] = require('./formats/auto'); +formats['pem'] = require('./formats/pem'); +formats['pkcs1'] = require('./formats/pkcs1'); +formats['pkcs8'] = require('./formats/pkcs8'); +formats['rfc4253'] = require('./formats/rfc4253'); +formats['ssh'] = require('./formats/ssh'); +formats['ssh-private'] = require('./formats/ssh-private'); +formats['openssh'] = formats['ssh-private']; +formats['dnssec'] = require('./formats/dnssec'); +formats['putty'] = require('./formats/putty'); +formats['ppk'] = formats['putty']; + +function Key(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + assert.optionalString(opts.comment, 'options.comment'); + + var algInfo = algs.info[opts.type]; + if (typeof (algInfo) !== 'object') + throw (new InvalidAlgorithmError(opts.type)); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.parts = opts.parts; + this.part = partLookup; + this.comment = undefined; + this.source = opts.source; + + /* for speeding up hashing/fingerprint operations */ + this._rfc4253Cache = opts._rfc4253Cache; + this._hashCache = {}; + + var sz; + this.curve = undefined; + if (this.type === 'ecdsa') { + var curve = this.part.curve.data.toString(); + this.curve = curve; + sz = algs.curves[curve].size; + } else if (this.type === 'ed25519' || this.type === 'curve25519') { + sz = 256; + this.curve = 'curve25519'; + } else { + var szPart = this.part[algInfo.sizePart]; + sz = szPart.data.length; + sz = sz * 8 - utils.countZeros(szPart.data); + } + this.size = sz; +} + +Key.formats = formats; + +Key.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'ssh'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + if (format === 'rfc4253') { + if (this._rfc4253Cache === undefined) + this._rfc4253Cache = formats['rfc4253'].write(this); + return (this._rfc4253Cache); + } + + return (formats[format].write(this, options)); +}; + +Key.prototype.toString = function (format, options) { + return (this.toBuffer(format, options).toString()); +}; + +Key.prototype.hash = function (algo, type) { + assert.string(algo, 'algorithm'); + assert.optionalString(type, 'type'); + if (type === undefined) + type = 'ssh'; + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + var cacheKey = algo + '||' + type; + if (this._hashCache[cacheKey]) + return (this._hashCache[cacheKey]); + + var buf; + if (type === 'ssh') { + buf = this.toBuffer('rfc4253'); + } else if (type === 'spki') { + buf = formats.pkcs8.pkcs8ToBuffer(this); + } else { + throw (new Error('Hash type ' + type + ' not supported')); + } + var hash = crypto.createHash(algo).update(buf).digest(); + this._hashCache[cacheKey] = hash; + return (hash); +}; + +Key.prototype.fingerprint = function (algo, type) { + if (algo === undefined) + algo = 'sha256'; + if (type === undefined) + type = 'ssh'; + assert.string(algo, 'algorithm'); + assert.string(type, 'type'); + var opts = { + type: 'key', + hash: this.hash(algo, type), + algorithm: algo, + hashType: type + }; + return (new Fingerprint(opts)); +}; + +Key.prototype.defaultHashAlgorithm = function () { + var hashAlgo = 'sha1'; + if (this.type === 'rsa') + hashAlgo = 'sha256'; + if (this.type === 'dsa' && this.size > 1024) + hashAlgo = 'sha256'; + if (this.type === 'ed25519') + hashAlgo = 'sha512'; + if (this.type === 'ecdsa') { + if (this.size <= 256) + hashAlgo = 'sha256'; + else if (this.size <= 384) + hashAlgo = 'sha384'; + else + hashAlgo = 'sha512'; + } + return (hashAlgo); +}; + +Key.prototype.createVerify = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Verifier(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldVerify = v.verify.bind(v); + var key = this.toBuffer('pkcs8'); + var curve = this.curve; + var self = this; + v.verify = function (signature, fmt) { + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== self.type) + return (false); + if (signature.hashAlgorithm && + signature.hashAlgorithm !== hashAlgo) + return (false); + if (signature.curve && self.type === 'ecdsa' && + signature.curve !== curve) + return (false); + return (oldVerify(key, signature.toBuffer('asn1'))); + + } else if (typeof (signature) === 'string' || + Buffer.isBuffer(signature)) { + return (oldVerify(key, signature, fmt)); + + /* + * Avoid doing this on valid arguments, walking the prototype + * chain can be quite slow. + */ + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + + } else { + throw (new TypeError('signature must be a string, ' + + 'Buffer, or Signature object')); + } + }; + return (v); +}; + +Key.prototype.createDiffieHellman = function () { + if (this.type === 'rsa') + throw (new Error('RSA keys do not support Diffie-Hellman')); + + return (new DiffieHellman(this)); +}; +Key.prototype.createDH = Key.prototype.createDiffieHellman; + +Key.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + if (k instanceof PrivateKey) + k = k.toPublic(); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +Key.isKey = function (obj, ver) { + return (utils.isCompatible(obj, Key, ver)); +}; + +/* + * API versions for Key: + * [1,0] -- initial ver, may take Signature for createVerify or may not + * [1,1] -- added pkcs1, pkcs8 formats + * [1,2] -- added auto, ssh-private, openssh formats + * [1,3] -- added defaultHashAlgorithm + * [1,4] -- added ed support, createDH + * [1,5] -- first explicitly tagged version + * [1,6] -- changed ed25519 part names + * [1,7] -- spki hash types + */ +Key.prototype._sshpkApiVersion = [1, 7]; + +Key._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + assert.func(obj.fingerprint); + if (obj.createDH) + return ([1, 4]); + if (obj.defaultHashAlgorithm) + return ([1, 3]); + if (obj.formats['auto']) + return ([1, 2]); + if (obj.formats['pkcs1']) + return ([1, 1]); + return ([1, 0]); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/private-key.js b/test-eol-project/node_modules/sshpk/lib/private-key.js new file mode 100644 index 00000000..570e0543 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/private-key.js @@ -0,0 +1,247 @@ +// Copyright 2017 Joyent, Inc. + +module.exports = PrivateKey; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('./algs'); +var crypto = require('crypto'); +var Fingerprint = require('./fingerprint'); +var Signature = require('./signature'); +var errs = require('./errors'); +var util = require('util'); +var utils = require('./utils'); +var dhe = require('./dhe'); +var generateECDSA = dhe.generateECDSA; +var generateED25519 = dhe.generateED25519; +var edCompat = require('./ed-compat'); +var nacl = require('tweetnacl'); + +var Key = require('./key'); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; +var KeyEncryptedError = errs.KeyEncryptedError; + +var formats = {}; +formats['auto'] = require('./formats/auto'); +formats['pem'] = require('./formats/pem'); +formats['pkcs1'] = require('./formats/pkcs1'); +formats['pkcs8'] = require('./formats/pkcs8'); +formats['rfc4253'] = require('./formats/rfc4253'); +formats['ssh-private'] = require('./formats/ssh-private'); +formats['openssh'] = formats['ssh-private']; +formats['ssh'] = formats['ssh-private']; +formats['dnssec'] = require('./formats/dnssec'); +formats['putty'] = require('./formats/putty'); + +function PrivateKey(opts) { + assert.object(opts, 'options'); + Key.call(this, opts); + + this._pubCache = undefined; +} +util.inherits(PrivateKey, Key); + +PrivateKey.formats = formats; + +PrivateKey.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'pkcs1'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +PrivateKey.prototype.hash = function (algo, type) { + return (this.toPublic().hash(algo, type)); +}; + +PrivateKey.prototype.fingerprint = function (algo, type) { + return (this.toPublic().fingerprint(algo, type)); +}; + +PrivateKey.prototype.toPublic = function () { + if (this._pubCache) + return (this._pubCache); + + var algInfo = algs.info[this.type]; + var pubParts = []; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = algInfo.parts[i]; + pubParts.push(this.part[p]); + } + + this._pubCache = new Key({ + type: this.type, + source: this, + parts: pubParts + }); + if (this.comment) + this._pubCache.comment = this.comment; + return (this._pubCache); +}; + +PrivateKey.prototype.derive = function (newType) { + assert.string(newType, 'type'); + var priv, pub, pair; + + if (this.type === 'ed25519' && newType === 'curve25519') { + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'curve25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } else if (this.type === 'curve25519' && newType === 'ed25519') { + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'ed25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } + throw (new Error('Key derivation not supported from ' + this.type + + ' to ' + newType)); +}; + +PrivateKey.prototype.createVerify = function (hashAlgo) { + return (this.toPublic().createVerify(hashAlgo)); +}; + +PrivateKey.prototype.createSign = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Signer(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldSign = v.sign.bind(v); + var key = this.toBuffer('pkcs1'); + var type = this.type; + var curve = this.curve; + v.sign = function () { + var sig = oldSign(key); + if (typeof (sig) === 'string') + sig = Buffer.from(sig, 'binary'); + sig = Signature.parse(sig, type, 'asn1'); + sig.hashAlgorithm = hashAlgo; + sig.curve = curve; + return (sig); + }; + return (v); +}; + +PrivateKey.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + assert.ok(k instanceof PrivateKey, 'key is not a private key'); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +PrivateKey.isPrivateKey = function (obj, ver) { + return (utils.isCompatible(obj, PrivateKey, ver)); +}; + +PrivateKey.generate = function (type, options) { + if (options === undefined) + options = {}; + assert.object(options, 'options'); + + switch (type) { + case 'ecdsa': + if (options.curve === undefined) + options.curve = 'nistp256'; + assert.string(options.curve, 'options.curve'); + return (generateECDSA(options.curve)); + case 'ed25519': + return (generateED25519()); + default: + throw (new Error('Key generation not supported with key ' + + 'type "' + type + '"')); + } +}; + +/* + * API versions for PrivateKey: + * [1,0] -- initial ver + * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats + * [1,2] -- added defaultHashAlgorithm + * [1,3] -- added derive, ed, createDH + * [1,4] -- first tagged version + * [1,5] -- changed ed25519 part names and format + * [1,6] -- type arguments for hash() and fingerprint() + */ +PrivateKey.prototype._sshpkApiVersion = [1, 6]; + +PrivateKey._oldVersionDetect = function (obj) { + assert.func(obj.toPublic); + assert.func(obj.createSign); + if (obj.derive) + return ([1, 3]); + if (obj.defaultHashAlgorithm) + return ([1, 2]); + if (obj.formats['auto']) + return ([1, 1]); + return ([1, 0]); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/signature.js b/test-eol-project/node_modules/sshpk/lib/signature.js new file mode 100644 index 00000000..aa8fdbb8 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/signature.js @@ -0,0 +1,314 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = Signature; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var algs = require('./algs'); +var crypto = require('crypto'); +var errs = require('./errors'); +var utils = require('./utils'); +var asn1 = require('asn1'); +var SSHBuffer = require('./ssh-buffer'); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var SignatureParseError = errs.SignatureParseError; + +function Signature(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.hashAlgorithm = opts.hashAlgo; + this.curve = opts.curve; + this.parts = opts.parts; + this.part = partLookup; +} + +Signature.prototype.toBuffer = function (format) { + if (format === undefined) + format = 'asn1'; + assert.string(format, 'format'); + + var buf; + var stype = 'ssh-' + this.type; + + switch (this.type) { + case 'rsa': + switch (this.hashAlgorithm) { + case 'sha256': + stype = 'rsa-sha2-256'; + break; + case 'sha512': + stype = 'rsa-sha2-512'; + break; + case 'sha1': + case undefined: + break; + default: + throw (new Error('SSH signature ' + + 'format does not support hash ' + + 'algorithm ' + this.hashAlgorithm)); + } + if (format === 'ssh') { + buf = new SSHBuffer({}); + buf.writeString(stype); + buf.writePart(this.part.sig); + return (buf.toBuffer()); + } else { + return (this.part.sig.data); + } + break; + + case 'ed25519': + if (format === 'ssh') { + buf = new SSHBuffer({}); + buf.writeString(stype); + buf.writePart(this.part.sig); + return (buf.toBuffer()); + } else { + return (this.part.sig.data); + } + break; + + case 'dsa': + case 'ecdsa': + var r, s; + if (format === 'asn1') { + var der = new asn1.BerWriter(); + der.startSequence(); + r = utils.mpNormalize(this.part.r.data); + s = utils.mpNormalize(this.part.s.data); + der.writeBuffer(r, asn1.Ber.Integer); + der.writeBuffer(s, asn1.Ber.Integer); + der.endSequence(); + return (der.buffer); + } else if (format === 'ssh' && this.type === 'dsa') { + buf = new SSHBuffer({}); + buf.writeString('ssh-dss'); + r = this.part.r.data; + if (r.length > 20 && r[0] === 0x00) + r = r.slice(1); + s = this.part.s.data; + if (s.length > 20 && s[0] === 0x00) + s = s.slice(1); + if ((this.hashAlgorithm && + this.hashAlgorithm !== 'sha1') || + r.length + s.length !== 40) { + throw (new Error('OpenSSH only supports ' + + 'DSA signatures with SHA1 hash')); + } + buf.writeBuffer(Buffer.concat([r, s])); + return (buf.toBuffer()); + } else if (format === 'ssh' && this.type === 'ecdsa') { + var inner = new SSHBuffer({}); + r = this.part.r.data; + inner.writeBuffer(r); + inner.writePart(this.part.s); + + buf = new SSHBuffer({}); + /* XXX: find a more proper way to do this? */ + var curve; + if (r[0] === 0x00) + r = r.slice(1); + var sz = r.length * 8; + if (sz === 256) + curve = 'nistp256'; + else if (sz === 384) + curve = 'nistp384'; + else if (sz === 528) + curve = 'nistp521'; + buf.writeString('ecdsa-sha2-' + curve); + buf.writeBuffer(inner.toBuffer()); + return (buf.toBuffer()); + } + throw (new Error('Invalid signature format')); + default: + throw (new Error('Invalid signature data')); + } +}; + +Signature.prototype.toString = function (format) { + assert.optionalString(format, 'format'); + return (this.toBuffer(format).toString('base64')); +}; + +Signature.parse = function (data, type, format) { + if (typeof (data) === 'string') + data = Buffer.from(data, 'base64'); + assert.buffer(data, 'data'); + assert.string(format, 'format'); + assert.string(type, 'type'); + + var opts = {}; + opts.type = type.toLowerCase(); + opts.parts = []; + + try { + assert.ok(data.length > 0, 'signature must not be empty'); + switch (opts.type) { + case 'rsa': + return (parseOneNum(data, type, format, opts)); + case 'ed25519': + return (parseOneNum(data, type, format, opts)); + + case 'dsa': + case 'ecdsa': + if (format === 'asn1') + return (parseDSAasn1(data, type, format, opts)); + else if (opts.type === 'dsa') + return (parseDSA(data, type, format, opts)); + else + return (parseECDSA(data, type, format, opts)); + + default: + throw (new InvalidAlgorithmError(type)); + } + + } catch (e) { + if (e instanceof InvalidAlgorithmError) + throw (e); + throw (new SignatureParseError(type, format, e)); + } +}; + +function parseOneNum(data, type, format, opts) { + if (format === 'ssh') { + try { + var buf = new SSHBuffer({buffer: data}); + var head = buf.readString(); + } catch (e) { + /* fall through */ + } + if (buf !== undefined) { + var msg = 'SSH signature does not match expected ' + + 'type (expected ' + type + ', got ' + head + ')'; + switch (head) { + case 'ssh-rsa': + assert.strictEqual(type, 'rsa', msg); + opts.hashAlgo = 'sha1'; + break; + case 'rsa-sha2-256': + assert.strictEqual(type, 'rsa', msg); + opts.hashAlgo = 'sha256'; + break; + case 'rsa-sha2-512': + assert.strictEqual(type, 'rsa', msg); + opts.hashAlgo = 'sha512'; + break; + case 'ssh-ed25519': + assert.strictEqual(type, 'ed25519', msg); + opts.hashAlgo = 'sha512'; + break; + default: + throw (new Error('Unknown SSH signature ' + + 'type: ' + head)); + } + var sig = buf.readPart(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + sig.name = 'sig'; + opts.parts.push(sig); + return (new Signature(opts)); + } + } + opts.parts.push({name: 'sig', data: data}); + return (new Signature(opts)); +} + +function parseDSAasn1(data, type, format, opts) { + var der = new asn1.BerReader(data); + der.readSequence(); + var r = der.readString(asn1.Ber.Integer, true); + var s = der.readString(asn1.Ber.Integer, true); + + opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); + opts.parts.push({name: 's', data: utils.mpNormalize(s)}); + + return (new Signature(opts)); +} + +function parseDSA(data, type, format, opts) { + if (data.length != 40) { + var buf = new SSHBuffer({buffer: data}); + var d = buf.readBuffer(); + if (d.toString('ascii') === 'ssh-dss') + d = buf.readBuffer(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + assert.strictEqual(d.length, 40, 'invalid inner length'); + data = d; + } + opts.parts.push({name: 'r', data: data.slice(0, 20)}); + opts.parts.push({name: 's', data: data.slice(20, 40)}); + return (new Signature(opts)); +} + +function parseECDSA(data, type, format, opts) { + var buf = new SSHBuffer({buffer: data}); + + var r, s; + var inner = buf.readBuffer(); + var stype = inner.toString('ascii'); + if (stype.slice(0, 6) === 'ecdsa-') { + var parts = stype.split('-'); + assert.strictEqual(parts[0], 'ecdsa'); + assert.strictEqual(parts[1], 'sha2'); + opts.curve = parts[2]; + switch (opts.curve) { + case 'nistp256': + opts.hashAlgo = 'sha256'; + break; + case 'nistp384': + opts.hashAlgo = 'sha384'; + break; + case 'nistp521': + opts.hashAlgo = 'sha512'; + break; + default: + throw (new Error('Unsupported ECDSA curve: ' + + opts.curve)); + } + inner = buf.readBuffer(); + assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); + buf = new SSHBuffer({buffer: inner}); + r = buf.readPart(); + } else { + r = {data: inner}; + } + + s = buf.readPart(); + assert.ok(buf.atEnd(), 'extra trailing bytes'); + + r.name = 'r'; + s.name = 's'; + + opts.parts.push(r); + opts.parts.push(s); + return (new Signature(opts)); +} + +Signature.isSignature = function (obj, ver) { + return (utils.isCompatible(obj, Signature, ver)); +}; + +/* + * API versions for Signature: + * [1,0] -- initial ver + * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent + * hashAlgorithm property + * [2,1] -- first tagged version + */ +Signature.prototype._sshpkApiVersion = [2, 1]; + +Signature._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + if (obj.hasOwnProperty('hashAlgorithm')) + return ([2, 0]); + return ([1, 0]); +}; diff --git a/test-eol-project/node_modules/sshpk/lib/ssh-buffer.js b/test-eol-project/node_modules/sshpk/lib/ssh-buffer.js new file mode 100644 index 00000000..1dd286c8 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/ssh-buffer.js @@ -0,0 +1,149 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = SSHBuffer; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; + +function SSHBuffer(opts) { + assert.object(opts, 'options'); + if (opts.buffer !== undefined) + assert.buffer(opts.buffer, 'options.buffer'); + + this._size = opts.buffer ? opts.buffer.length : 1024; + this._buffer = opts.buffer || Buffer.alloc(this._size); + this._offset = 0; +} + +SSHBuffer.prototype.toBuffer = function () { + return (this._buffer.slice(0, this._offset)); +}; + +SSHBuffer.prototype.atEnd = function () { + return (this._offset >= this._buffer.length); +}; + +SSHBuffer.prototype.remainder = function () { + return (this._buffer.slice(this._offset)); +}; + +SSHBuffer.prototype.skip = function (n) { + this._offset += n; +}; + +SSHBuffer.prototype.expand = function () { + this._size *= 2; + var buf = Buffer.alloc(this._size); + this._buffer.copy(buf, 0); + this._buffer = buf; +}; + +SSHBuffer.prototype.readPart = function () { + return ({data: this.readBuffer()}); +}; + +SSHBuffer.prototype.readBuffer = function () { + var len = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + assert.ok(this._offset + len <= this._buffer.length, + 'length out of bounds at +0x' + this._offset.toString(16) + + ' (data truncated?)'); + var buf = this._buffer.slice(this._offset, this._offset + len); + this._offset += len; + return (buf); +}; + +SSHBuffer.prototype.readString = function () { + return (this.readBuffer().toString()); +}; + +SSHBuffer.prototype.readCString = function () { + var offset = this._offset; + while (offset < this._buffer.length && + this._buffer[offset] !== 0x00) + offset++; + assert.ok(offset < this._buffer.length, 'c string does not terminate'); + var str = this._buffer.slice(this._offset, offset).toString(); + this._offset = offset + 1; + return (str); +}; + +SSHBuffer.prototype.readInt = function () { + var v = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + return (v); +}; + +SSHBuffer.prototype.readInt64 = function () { + assert.ok(this._offset + 8 < this._buffer.length, + 'buffer not long enough to read Int64'); + var v = this._buffer.slice(this._offset, this._offset + 8); + this._offset += 8; + return (v); +}; + +SSHBuffer.prototype.readChar = function () { + var v = this._buffer[this._offset++]; + return (v); +}; + +SSHBuffer.prototype.writeBuffer = function (buf) { + while (this._offset + 4 + buf.length > this._size) + this.expand(); + this._buffer.writeUInt32BE(buf.length, this._offset); + this._offset += 4; + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; + +SSHBuffer.prototype.writeString = function (str) { + this.writeBuffer(Buffer.from(str, 'utf8')); +}; + +SSHBuffer.prototype.writeCString = function (str) { + while (this._offset + 1 + str.length > this._size) + this.expand(); + this._buffer.write(str, this._offset); + this._offset += str.length; + this._buffer[this._offset++] = 0; +}; + +SSHBuffer.prototype.writeInt = function (v) { + while (this._offset + 4 > this._size) + this.expand(); + this._buffer.writeUInt32BE(v, this._offset); + this._offset += 4; +}; + +SSHBuffer.prototype.writeInt64 = function (v) { + assert.buffer(v, 'value'); + if (v.length > 8) { + var lead = v.slice(0, v.length - 8); + for (var i = 0; i < lead.length; ++i) { + assert.strictEqual(lead[i], 0, + 'must fit in 64 bits of precision'); + } + v = v.slice(v.length - 8, v.length); + } + while (this._offset + 8 > this._size) + this.expand(); + v.copy(this._buffer, this._offset); + this._offset += 8; +}; + +SSHBuffer.prototype.writeChar = function (v) { + while (this._offset + 1 > this._size) + this.expand(); + this._buffer[this._offset++] = v; +}; + +SSHBuffer.prototype.writePart = function (p) { + this.writeBuffer(p.data); +}; + +SSHBuffer.prototype.write = function (buf) { + while (this._offset + buf.length > this._size) + this.expand(); + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; diff --git a/test-eol-project/node_modules/sshpk/lib/utils.js b/test-eol-project/node_modules/sshpk/lib/utils.js new file mode 100644 index 00000000..6b83a322 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/lib/utils.js @@ -0,0 +1,404 @@ +// Copyright 2015 Joyent, Inc. + +module.exports = { + bufferSplit: bufferSplit, + addRSAMissing: addRSAMissing, + calculateDSAPublic: calculateDSAPublic, + calculateED25519Public: calculateED25519Public, + calculateX25519Public: calculateX25519Public, + mpNormalize: mpNormalize, + mpDenormalize: mpDenormalize, + ecNormalize: ecNormalize, + countZeros: countZeros, + assertCompatible: assertCompatible, + isCompatible: isCompatible, + opensslKeyDeriv: opensslKeyDeriv, + opensshCipherInfo: opensshCipherInfo, + publicFromPrivateECDSA: publicFromPrivateECDSA, + zeroPadToLength: zeroPadToLength, + writeBitString: writeBitString, + readBitString: readBitString, + pbkdf2: pbkdf2 +}; + +var assert = require('assert-plus'); +var Buffer = require('safer-buffer').Buffer; +var PrivateKey = require('./private-key'); +var Key = require('./key'); +var crypto = require('crypto'); +var algs = require('./algs'); +var asn1 = require('asn1'); + +var ec = require('ecc-jsbn/lib/ec'); +var jsbn = require('jsbn').BigInteger; +var nacl = require('tweetnacl'); + +var MAX_CLASS_DEPTH = 3; + +function isCompatible(obj, klass, needVer) { + if (obj === null || typeof (obj) !== 'object') + return (false); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return (true); + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + if (!proto || ++depth > MAX_CLASS_DEPTH) + return (false); + } + if (proto.constructor.name !== klass.name) + return (false); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + if (ver[0] != needVer[0] || ver[1] < needVer[1]) + return (false); + return (true); +} + +function assertCompatible(obj, klass, needVer, name) { + if (name === undefined) + name = 'object'; + assert.ok(obj, name + ' must not be null'); + assert.object(obj, name + ' must be an object'); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, + name + ' must be a ' + klass.name + ' instance'); + } + assert.strictEqual(proto.constructor.name, klass.name, + name + ' must be a ' + klass.name + ' instance'); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], + name + ' must be compatible with ' + klass.name + ' klass ' + + 'version ' + needVer[0] + '.' + needVer[1]); +} + +var CIPHER_LEN = { + 'des-ede3-cbc': { key: 24, iv: 8 }, + 'aes-128-cbc': { key: 16, iv: 16 }, + 'aes-256-cbc': { key: 32, iv: 16 } +}; +var PKCS5_SALT_LEN = 8; + +function opensslKeyDeriv(cipher, salt, passphrase, count) { + assert.buffer(salt, 'salt'); + assert.buffer(passphrase, 'passphrase'); + assert.number(count, 'iteration count'); + + var clen = CIPHER_LEN[cipher]; + assert.object(clen, 'supported cipher'); + + salt = salt.slice(0, PKCS5_SALT_LEN); + + var D, D_prev, bufs; + var material = Buffer.alloc(0); + while (material.length < clen.key + clen.iv) { + bufs = []; + if (D_prev) + bufs.push(D_prev); + bufs.push(passphrase); + bufs.push(salt); + D = Buffer.concat(bufs); + for (var j = 0; j < count; ++j) + D = crypto.createHash('md5').update(D).digest(); + material = Buffer.concat([material, D]); + D_prev = D; + } + + return ({ + key: material.slice(0, clen.key), + iv: material.slice(clen.key, clen.key + clen.iv) + }); +} + +/* See: RFC2898 */ +function pbkdf2(hashAlg, salt, iterations, size, passphrase) { + var hkey = Buffer.alloc(salt.length + 4); + salt.copy(hkey); + + var gen = 0, ts = []; + var i = 1; + while (gen < size) { + var t = T(i++); + gen += t.length; + ts.push(t); + } + return (Buffer.concat(ts).slice(0, size)); + + function T(I) { + hkey.writeUInt32BE(I, hkey.length - 4); + + var hmac = crypto.createHmac(hashAlg, passphrase); + hmac.update(hkey); + + var Ti = hmac.digest(); + var Uc = Ti; + var c = 1; + while (c++ < iterations) { + hmac = crypto.createHmac(hashAlg, passphrase); + hmac.update(Uc); + Uc = hmac.digest(); + for (var x = 0; x < Ti.length; ++x) + Ti[x] ^= Uc[x]; + } + return (Ti); + } +} + +/* Count leading zero bits on a buffer */ +function countZeros(buf) { + var o = 0, obit = 8; + while (o < buf.length) { + var mask = (1 << obit); + if ((buf[o] & mask) === mask) + break; + obit--; + if (obit < 0) { + o++; + obit = 8; + } + } + return (o*8 + (8 - obit) - 1); +} + +function bufferSplit(buf, chr) { + assert.buffer(buf); + assert.string(chr); + + var parts = []; + var lastPart = 0; + var matches = 0; + for (var i = 0; i < buf.length; ++i) { + if (buf[i] === chr.charCodeAt(matches)) + ++matches; + else if (buf[i] === chr.charCodeAt(0)) + matches = 1; + else + matches = 0; + + if (matches >= chr.length) { + var newPart = i + 1; + parts.push(buf.slice(lastPart, newPart - matches)); + lastPart = newPart; + matches = 0; + } + } + if (lastPart <= buf.length) + parts.push(buf.slice(lastPart, buf.length)); + + return (parts); +} + +function ecNormalize(buf, addZero) { + assert.buffer(buf); + if (buf[0] === 0x00 && buf[1] === 0x04) { + if (addZero) + return (buf); + return (buf.slice(1)); + } else if (buf[0] === 0x04) { + if (!addZero) + return (buf); + } else { + while (buf[0] === 0x00) + buf = buf.slice(1); + if (buf[0] === 0x02 || buf[0] === 0x03) + throw (new Error('Compressed elliptic curve points ' + + 'are not supported')); + if (buf[0] !== 0x04) + throw (new Error('Not a valid elliptic curve point')); + if (!addZero) + return (buf); + } + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x0; + buf.copy(b, 1); + return (b); +} + +function readBitString(der, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var buf = der.readString(tag, true); + assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + + 'not supported (0x' + buf[0].toString(16) + ')'); + return (buf.slice(1)); +} + +function writeBitString(der, buf, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + der.writeBuffer(b, tag); +} + +function mpNormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) + buf = buf.slice(1); + if ((buf[0] & 0x80) === 0x80) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function mpDenormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00) + buf = buf.slice(1); + return (buf); +} + +function zeroPadToLength(buf, len) { + assert.buffer(buf); + assert.number(len); + while (buf.length > len) { + assert.equal(buf[0], 0x00); + buf = buf.slice(1); + } + while (buf.length < len) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function bigintToMpBuf(bigint) { + var buf = Buffer.from(bigint.toByteArray()); + buf = mpNormalize(buf); + return (buf); +} + +function calculateDSAPublic(g, p, x) { + assert.buffer(g); + assert.buffer(p); + assert.buffer(x); + g = new jsbn(g); + p = new jsbn(p); + x = new jsbn(x); + var y = g.modPow(x, p); + var ybuf = bigintToMpBuf(y); + return (ybuf); +} + +function calculateED25519Public(k) { + assert.buffer(k); + + var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function calculateX25519Public(k) { + assert.buffer(k); + + var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function addRSAMissing(key) { + assert.object(key); + assertCompatible(key, PrivateKey, [1, 1]); + + var d = new jsbn(key.part.d.data); + var buf; + + if (!key.part.dmodp) { + var p = new jsbn(key.part.p.data); + var dmodp = d.mod(p.subtract(1)); + + buf = bigintToMpBuf(dmodp); + key.part.dmodp = {name: 'dmodp', data: buf}; + key.parts.push(key.part.dmodp); + } + if (!key.part.dmodq) { + var q = new jsbn(key.part.q.data); + var dmodq = d.mod(q.subtract(1)); + + buf = bigintToMpBuf(dmodq); + key.part.dmodq = {name: 'dmodq', data: buf}; + key.parts.push(key.part.dmodq); + } +} + +function publicFromPrivateECDSA(curveName, priv) { + assert.string(curveName, 'curveName'); + assert.buffer(priv); + var params = algs.curves[curveName]; + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + var d = new jsbn(mpNormalize(priv)); + var pub = G.multiply(d); + pub = Buffer.from(curve.encodePointHex(pub), 'hex'); + + var parts = []; + parts.push({name: 'curve', data: Buffer.from(curveName)}); + parts.push({name: 'Q', data: pub}); + + var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); + return (key); +} + +function opensshCipherInfo(cipher) { + var inf = {}; + switch (cipher) { + case '3des-cbc': + inf.keySize = 24; + inf.blockSize = 8; + inf.opensslName = 'des-ede3-cbc'; + break; + case 'blowfish-cbc': + inf.keySize = 16; + inf.blockSize = 8; + inf.opensslName = 'bf-cbc'; + break; + case 'aes128-cbc': + case 'aes128-ctr': + case 'aes128-gcm@openssh.com': + inf.keySize = 16; + inf.blockSize = 16; + inf.opensslName = 'aes-128-' + cipher.slice(7, 10); + break; + case 'aes192-cbc': + case 'aes192-ctr': + case 'aes192-gcm@openssh.com': + inf.keySize = 24; + inf.blockSize = 16; + inf.opensslName = 'aes-192-' + cipher.slice(7, 10); + break; + case 'aes256-cbc': + case 'aes256-ctr': + case 'aes256-gcm@openssh.com': + inf.keySize = 32; + inf.blockSize = 16; + inf.opensslName = 'aes-256-' + cipher.slice(7, 10); + break; + default: + throw (new Error( + 'Unsupported openssl cipher "' + cipher + '"')); + } + return (inf); +} diff --git a/test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 b/test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 new file mode 100644 index 00000000..0887dce2 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 @@ -0,0 +1,135 @@ +.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands" +.SH NAME +.PP +sshpk\-conv \- convert between key formats +.SH SYNOPSYS +.PP +\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...] +.PP +\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...] +.SH DESCRIPTION +.PP +Reads in a public or private key and converts it between different formats, +particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7 +formats. +.PP +In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to +stderr information about its nature, size and fingerprint. +.SH EXAMPLES +.PP +Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR: +.PP +.RS +.nf +ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host +.fi +.RE +.PP +Identify it with \fB\fC\-i\fR: +.PP +.RS +.nf +$ sshpk\-conv \-i id_ecdsa.pub +id_ecdsa: a 256 bit ECDSA public key +ECDSA curve: nistp256 +Comment: user@host +Fingerprint: + SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k + 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51 +.fi +.RE +.PP +Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL: +.PP +.RS +.nf +$ sshpk\-conv \-t pkcs8 id_ecdsa +\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR +zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg== +\-\-\-\-\-END PUBLIC KEY\-\-\-\-\- +.fi +.RE +.PP +Retrieve the public half of a private key: +.PP +.RS +.nf +$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar +ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar +.fi +.RE +.PP +Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key +format (the \fB\fCssh\-keygen \-o\fR format): +.PP +.RS +.nf +$ ssh\-keygen \-o \-f foobar +\&... +$ sshpk\-conv \-p \-t pkcs1 foobar +\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\- +MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL.... +\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\- +.fi +.RE +.SH OPTIONS +.TP +\fB\fC\-i, \-\-identify\fR +Instead of converting the key, output identifying information about it to +stderr, including its type, size and fingerprints. +.TP +\fB\fC\-p, \-\-private\fR +Treat the key as a private key instead of a public key (the default). If you +supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will +extract only the public half of the key from it and work with that. +.TP +\fB\fC\-f PATH, \-\-file=PATH\fR +Input file to take the key from instead of stdin. If a filename is supplied +as a positional argument, it is equivalent to using this option. +.TP +\fB\fC\-o PATH, \-\-out=PATH\fR +Output file name to use instead of stdout. +.PP +\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR +.TP +\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR +Selects the input and output formats to be used (see FORMATS, below). +.TP +\fB\fC\-c TEXT, \-\-comment=TEXT\fR +Sets the key comment for the output file, if supported. +.SH FORMATS +.PP +Currently supported formats: +.TP +\fB\fCpem, pkcs1\fR +The standard PEM format used by older OpenSSH and most TLS libraries such as +OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1 +encoded structure, base64\-encoded and placed between PEM headers. +.TP +\fB\fCssh\fR +The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single +line, containing 3 space separated parts: the key type, key body and optional +key comment. +.TP +\fB\fCpkcs8\fR +A newer PEM format, usually used only for public keys by TLS libraries such +as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&. +.TP +\fB\fCopenssh\fR +The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM +encoding but is actually an OpenSSH internal format. +.TP +\fB\fCrfc4253\fR +The internal binary format of keys when sent over the wire in the SSH +protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol. +.SH SEE ALSO +.PP +.BR ssh-keygen (1), +.BR openssl (1) +.SH BUGS +.PP +Encrypted (password\-protected) keys are not supported. +.PP +Report bugs at Github +\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 b/test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 new file mode 100644 index 00000000..749916ba --- /dev/null +++ b/test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 @@ -0,0 +1,81 @@ +.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands" +.SH NAME +.PP +sshpk\-sign \- sign data using an SSH key +.SH SYNOPSYS +.PP +\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...] +.SH DESCRIPTION +.PP +Takes in arbitrary bytes, and signs them using an SSH private key. The key can +be of any type or format supported by the \fB\fCsshpk\fR library, including the +standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8. +.PP +The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR +option is given. +.SH EXAMPLES +.PP +Signing with default settings: +.PP +.RS +.nf +$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa +MEUCIAMdLS/vXrrtWFepwe... +.fi +.RE +.PP +Signing in SSH (RFC 4253) format (rather than the default ASN.1): +.PP +.RS +.nf +$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh +AAAAFGVjZHNhLXNoYTIt... +.fi +.RE +.PP +Saving the binary signature to a file: +.PP +.RS +.nf +$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\ + \-o signature.bin \-b +$ cat signature.bin | base64 +MEUCIAMdLS/vXrrtWFepwe... +.fi +.RE +.SH OPTIONS +.TP +\fB\fC\-v, \-\-verbose\fR +Print extra information about the key and signature to stderr when signing. +.TP +\fB\fC\-b, \-\-binary\fR +Don't base64\-encode the signature before outputting it. +.TP +\fB\fC\-i KEY, \-\-identity=KEY\fR +Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute +filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library +is supported, including OpenSSH formats and standard PEM PKCS. +.TP +\fB\fC\-f PATH, \-\-file=PATH\fR +Input file to sign instead of stdin. +.TP +\fB\fC\-o PATH, \-\-out=PATH\fR +Output file to save signature in instead of stdout. +.TP +\fB\fC\-H HASH, \-\-hash=HASH\fR +Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, +\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash +algorithms may be used (e.g. ED25519 keys can only use SHA\-512). +.TP +\fB\fC\-t FORMAT, \-\-format=FORMAT\fR +Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for +ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format +used with TLS and typically the standard in most non\-SSH libraries (e.g. +OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. +.SH SEE ALSO +.PP +.BR sshpk-verify (1) +.SH BUGS +.PP +Report bugs at Github +\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 b/test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 new file mode 100644 index 00000000..f79169d2 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 @@ -0,0 +1,68 @@ +.TH sshpk\-verify 1 "Jan 2016" sshpk "sshpk Commands" +.SH NAME +.PP +sshpk\-verify \- verify a signature on data using an SSH key +.SH SYNOPSYS +.PP +\fB\fCsshpk\-verify\fR \-i KEYPATH \-s SIGNATURE [OPTION...] +.SH DESCRIPTION +.PP +Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the +signature was produced by the private half of the given SSH public key. +.SH EXAMPLES +.PP +.RS +.nf +$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s MEUCIQCYp... +OK +$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s GARBAGE... +NOT OK +.fi +.RE +.SH EXIT STATUS +.TP +\fB\fC0\fR +Signature validates and matches the key. +.TP +\fB\fC1\fR +Signature is parseable and the correct length but does not match the key or +otherwise is invalid. +.TP +\fB\fC2\fR +The signature or key could not be parsed. +.TP +\fB\fC3\fR +Invalid commandline options were supplied. +.SH OPTIONS +.TP +\fB\fC\-v, \-\-verbose\fR +Print extra information about the key and signature to stderr when verifying. +.TP +\fB\fC\-i KEY, \-\-identity=KEY\fR +Select the key to be used for verification. \fB\fCKEY\fR must be a relative or +absolute filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR +library is supported, including OpenSSH formats and standard PEM PKCS. +.TP +\fB\fC\-s BASE64, \-\-signature=BASE64\fR +Supplies the base64\-encoded signature to be verified. +.TP +\fB\fC\-f PATH, \-\-file=PATH\fR +Input file to verify instead of stdin. +.TP +\fB\fC\-H HASH, \-\-hash=HASH\fR +Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, +\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash +algorithms may be used (e.g. ED25519 keys can only use SHA\-512). +.TP +\fB\fC\-t FORMAT, \-\-format=FORMAT\fR +Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for +ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format +used with TLS and typically the standard in most non\-SSH libraries (e.g. +OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. +.SH SEE ALSO +.PP +.BR sshpk-sign (1) +.SH BUGS +.PP +Report bugs at Github +\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/test-eol-project/node_modules/sshpk/package.json b/test-eol-project/node_modules/sshpk/package.json new file mode 100644 index 00000000..144ec160 --- /dev/null +++ b/test-eol-project/node_modules/sshpk/package.json @@ -0,0 +1,59 @@ +{ + "name": "sshpk", + "version": "1.18.0", + "description": "A library for finding and using SSH public keys", + "main": "lib/index.js", + "scripts": { + "test": "tape test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/joyent/node-sshpk.git" + }, + "author": "Joyent, Inc", + "contributors": [ + { + "name": "Dave Eddy", + "email": "dave@daveeddy.com" + }, + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "Alex Wilson", + "email": "alex@cooperi.net" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/arekinath/node-sshpk/issues" + }, + "engines": { + "node": ">=0.10.0" + }, + "directories": { + "bin": "./bin", + "lib": "./lib", + "man": "./man/man1" + }, + "homepage": "https://github.com/arekinath/node-sshpk#readme", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "dashdash": "^1.12.0", + "getpass": "^0.1.1", + "safer-buffer": "^2.0.2", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0", + "ecc-jsbn": "~0.1.1", + "bcrypt-pbkdf": "^1.0.0" + }, + "optionalDependencies": {}, + "devDependencies": { + "tape": "^3.5.0", + "benchmark": "^1.0.0", + "sinon": "^1.17.2", + "temp": "^0.8.2" + } +} diff --git a/test-eol-project/node_modules/string-width/index.d.ts b/test-eol-project/node_modules/string-width/index.d.ts new file mode 100644 index 00000000..12b53097 --- /dev/null +++ b/test-eol-project/node_modules/string-width/index.d.ts @@ -0,0 +1,29 @@ +declare const stringWidth: { + /** + Get the visual width of a string - the number of columns required to display it. + + Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + + @example + ``` + import stringWidth = require('string-width'); + + stringWidth('a'); + //=> 1 + + stringWidth('古'); + //=> 2 + + stringWidth('\u001B[1m古\u001B[22m'); + //=> 2 + ``` + */ + (string: string): number; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function stringWidth(string: string): number; + // export = stringWidth; + default: typeof stringWidth; +} + +export = stringWidth; diff --git a/test-eol-project/node_modules/string-width/index.js b/test-eol-project/node_modules/string-width/index.js new file mode 100644 index 00000000..f4d261a9 --- /dev/null +++ b/test-eol-project/node_modules/string-width/index.js @@ -0,0 +1,47 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex'); + +const stringWidth = string => { + if (typeof string !== 'string' || string.length === 0) { + return 0; + } + + string = stripAnsi(string); + + if (string.length === 0) { + return 0; + } + + string = string.replace(emojiRegex(), ' '); + + let width = 0; + + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; + +module.exports = stringWidth; +// TODO: remove this in the next major version +module.exports.default = stringWidth; diff --git a/test-eol-project/node_modules/string-width/license b/test-eol-project/node_modules/string-width/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts new file mode 100644 index 00000000..2dbf6af2 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,37 @@ +declare namespace ansiRegex { + interface Options { + /** + Match only the first ANSI escape. + + @default false + */ + onlyFirst: boolean; + } +} + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +declare function ansiRegex(options?: ansiRegex.Options): RegExp; + +export = ansiRegex; diff --git a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..616ff837 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/license b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..017f5311 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..4d848bc3 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md @@ -0,0 +1,78 @@ +# ansi-regex + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`
    +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +--- + +
    + + Get professional support for this package with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +
    diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts new file mode 100644 index 00000000..907fccc2 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,17 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +declare function stripAnsi(string: string): string; + +export = stripAnsi; diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js new file mode 100644 index 00000000..9a593dfc --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/license b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json new file mode 100644 index 00000000..1a41108d --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000..7c4b56d4 --- /dev/null +++ b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md @@ -0,0 +1,46 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + + +## strip-ansi for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + diff --git a/test-eol-project/node_modules/string-width/package.json b/test-eol-project/node_modules/string-width/package.json new file mode 100644 index 00000000..28ba7b4c --- /dev/null +++ b/test-eol-project/node_modules/string-width/package.json @@ -0,0 +1,56 @@ +{ + "name": "string-width", + "version": "4.2.3", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "string", + "character", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/test-eol-project/node_modules/string-width/readme.md b/test-eol-project/node_modules/string-width/readme.md new file mode 100644 index 00000000..bdd31412 --- /dev/null +++ b/test-eol-project/node_modules/string-width/readme.md @@ -0,0 +1,50 @@ +# string-width + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('a'); +//=> 1 + +stringWidth('古'); +//=> 2 + +stringWidth('\u001B[1m古\u001B[22m'); +//=> 2 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +--- + +
    + + Get professional support for this package with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +
    diff --git a/test-eol-project/node_modules/string_decoder/.travis.yml b/test-eol-project/node_modules/string_decoder/.travis.yml new file mode 100644 index 00000000..3347a725 --- /dev/null +++ b/test-eol-project/node_modules/string_decoder/.travis.yml @@ -0,0 +1,50 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.10' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.11' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.12' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 1 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 2 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 3 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 8 + env: TASK=test + - node_js: 9 + env: TASK=test diff --git a/test-eol-project/node_modules/string_decoder/LICENSE b/test-eol-project/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000..778edb20 --- /dev/null +++ b/test-eol-project/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. 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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. 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/test-eol-project/node_modules/string_decoder/README.md b/test-eol-project/node_modules/string_decoder/README.md new file mode 100644 index 00000000..5fd58315 --- /dev/null +++ b/test-eol-project/node_modules/string_decoder/README.md @@ -0,0 +1,47 @@ +# string_decoder + +***Node-core v8.9.4 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. + +## Streams Working Group + +`string_decoder` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + +See [readable-stream](https://github.com/nodejs/readable-stream) for +more details. diff --git a/test-eol-project/node_modules/string_decoder/lib/string_decoder.js b/test-eol-project/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 00000000..2e89e63f --- /dev/null +++ b/test-eol-project/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,296 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var Buffer = require('safe-buffer').Buffer; +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/test-eol-project/node_modules/string_decoder/package.json b/test-eol-project/node_modules/string_decoder/package.json new file mode 100644 index 00000000..518c3eb9 --- /dev/null +++ b/test-eol-project/node_modules/string_decoder/package.json @@ -0,0 +1,31 @@ +{ + "name": "string_decoder", + "version": "1.1.1", + "description": "The string_decoder module from Node core", + "main": "lib/string_decoder.js", + "dependencies": { + "safe-buffer": "~5.1.0" + }, + "devDependencies": { + "babel-polyfill": "^6.23.0", + "core-util-is": "^1.0.2", + "inherits": "^2.0.3", + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/parallel/*.js && node test/verify-dependencies", + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/string_decoder.git" + }, + "homepage": "https://github.com/nodejs/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT" +} diff --git a/test-eol-project/node_modules/strip-ansi/index.js b/test-eol-project/node_modules/strip-ansi/index.js new file mode 100644 index 00000000..099480fb --- /dev/null +++ b/test-eol-project/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/test-eol-project/node_modules/strip-ansi/license b/test-eol-project/node_modules/strip-ansi/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/strip-ansi/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/strip-ansi/package.json b/test-eol-project/node_modules/strip-ansi/package.json new file mode 100644 index 00000000..301685ba --- /dev/null +++ b/test-eol-project/node_modules/strip-ansi/package.json @@ -0,0 +1,57 @@ +{ + "name": "strip-ansi", + "version": "3.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Boy Nicolai Appelman (jbna.nl)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/test-eol-project/node_modules/strip-ansi/readme.md b/test-eol-project/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000..cb7d9ff7 --- /dev/null +++ b/test-eol-project/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/supports-color/index.js b/test-eol-project/node_modules/supports-color/index.js new file mode 100644 index 00000000..4346e272 --- /dev/null +++ b/test-eol-project/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/test-eol-project/node_modules/supports-color/license b/test-eol-project/node_modules/supports-color/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/test-eol-project/node_modules/supports-color/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/supports-color/package.json b/test-eol-project/node_modules/supports-color/package.json new file mode 100644 index 00000000..3bb77ac1 --- /dev/null +++ b/test-eol-project/node_modules/supports-color/package.json @@ -0,0 +1,49 @@ +{ + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + } +} diff --git a/test-eol-project/node_modules/supports-color/readme.md b/test-eol-project/node_modules/supports-color/readme.md new file mode 100644 index 00000000..b4761f1e --- /dev/null +++ b/test-eol-project/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/tmp/.eslintrc.js b/test-eol-project/node_modules/tmp/.eslintrc.js new file mode 100644 index 00000000..8222a832 --- /dev/null +++ b/test-eol-project/node_modules/tmp/.eslintrc.js @@ -0,0 +1,24 @@ +module.exports = { + "env": { + "node": true + }, + "extends": "eslint:recommended", + "rules": { + "indent": [ + "error", + 2 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } +}; diff --git a/test-eol-project/node_modules/tmp/.npmignore b/test-eol-project/node_modules/tmp/.npmignore new file mode 100644 index 00000000..78f2710d --- /dev/null +++ b/test-eol-project/node_modules/tmp/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +.idea/ diff --git a/test-eol-project/node_modules/tmp/.travis.yml b/test-eol-project/node_modules/tmp/.travis.yml new file mode 100644 index 00000000..9c0aa010 --- /dev/null +++ b/test-eol-project/node_modules/tmp/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +node_js: + - "0.6" + - "0.8" + - "0.10" + - "0.12" + - "4.0" + - "4.1" + - "4.2" + - "5.0" + - "5.1" + - "5.2" + - "5.3" + - "5.4" + - "6" diff --git a/test-eol-project/node_modules/tmp/Gruntfile.js b/test-eol-project/node_modules/tmp/Gruntfile.js new file mode 100644 index 00000000..8df64e70 --- /dev/null +++ b/test-eol-project/node_modules/tmp/Gruntfile.js @@ -0,0 +1,18 @@ +module.exports = function(grunt) { + grunt.initConfig({ + jshint: { + all: ['Gruntfile.js', 'lib/*.js', 'test/*.js'] + }, + vows: { + all: { + src: ['test/*.js'], + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-jshint'); + //grunt.loadNpmTasks('grunt-vows-runner'); + grunt.loadNpmTasks('grunt-vows'); + + grunt.registerTask('default', ['jshint', 'vows']); +}; diff --git a/test-eol-project/node_modules/tmp/LICENSE b/test-eol-project/node_modules/tmp/LICENSE new file mode 100644 index 00000000..72418bd9 --- /dev/null +++ b/test-eol-project/node_modules/tmp/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 KARASZI István + +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/test-eol-project/node_modules/tmp/README.md b/test-eol-project/node_modules/tmp/README.md new file mode 100644 index 00000000..804bf339 --- /dev/null +++ b/test-eol-project/node_modules/tmp/README.md @@ -0,0 +1,268 @@ +# Tmp + +A simple temporary file and directory creator for [node.js.][1] + +[![Build Status](https://travis-ci.org/raszi/node-tmp.svg?branch=master)](https://travis-ci.org/raszi/node-tmp) +[![Dependencies](https://david-dm.org/raszi/node-tmp.svg)](https://david-dm.org/raszi/node-tmp) +[![npm version](https://badge.fury.io/js/tmp.svg)](https://badge.fury.io/js/tmp) + +## About + +This is a [widely used library][2] to create temporary files and directories +in a [node.js][1] environment. + +Tmp offers both an asynchronous and a synchronous API. For all API calls, all +the parameters are optional. + +Tmp uses crypto for determining random file names, or, when using templates, +a six letter random identifier. And just in case that you do not have that much +entropy left on your system, Tmp will fall back to pseudo random numbers. + +You can set whether you want to remove the temporary file on process exit or +not, and the destination directory can also be set. + +## How to install + +```bash +npm install tmp +``` + +## Usage + +### Asynchronous file creation + +Simple temporary file creation, the file will be closed and unlinked on process exit. + +```javascript +var tmp = require('tmp'); + +tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) { + if (err) throw err; + + console.log("File: ", path); + console.log("Filedescriptor: ", fd); + + // If we don't need the file anymore we could manually call the cleanupCallback + // But that is not necessary if we didn't pass the keep option because the library + // will clean after itself. + cleanupCallback(); +}); +``` + +### Synchronous file creation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp'); + +var tmpobj = tmp.fileSync(); +console.log("File: ", tmpobj.name); +console.log("Filedescriptor: ", tmpobj.fd); + +// If we don't need the file anymore we could manually call the removeCallback +// But that is not necessary if we didn't pass the keep option because the library +// will clean after itself. +tmpobj.removeCallback(); +``` + +Note that this might throw an exception if either the maximum limit of retries +for creating a temporary name fails, or, in case that you do not have the permission +to write to the directory where the temporary file should be created in. + +### Asynchronous directory creation + +Simple temporary directory creation, it will be removed on process exit. + +If the directory still contains items on process exit, then it won't be removed. + +```javascript +var tmp = require('tmp'); + +tmp.dir(function _tempDirCreated(err, path, cleanupCallback) { + if (err) throw err; + + console.log("Dir: ", path); + + // Manual cleanup + cleanupCallback(); +}); +``` + +If you want to cleanup the directory even when there are entries in it, then +you can pass the `unsafeCleanup` option when creating it. + +### Synchronous directory creation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp'); + +var tmpobj = tmp.dirSync(); +console.log("Dir: ", tmpobj.name); +// Manual cleanup +tmpobj.removeCallback(); +``` + +Note that this might throw an exception if either the maximum limit of retries +for creating a temporary name fails, or, in case that you do not have the permission +to write to the directory where the temporary directory should be created in. + +### Asynchronous filename generation + +It is possible with this library to generate a unique filename in the specified +directory. + +```javascript +var tmp = require('tmp'); + +tmp.tmpName(function _tempNameGenerated(err, path) { + if (err) throw err; + + console.log("Created temporary filename: ", path); +}); +``` + +### Synchronous filename generation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp'); + +var name = tmp.tmpNameSync(); +console.log("Created temporary filename: ", name); +``` + +## Advanced usage + +### Asynchronous file creation + +Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`. + +```javascript +var tmp = require('tmp'); + +tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) { + if (err) throw err; + + console.log("File: ", path); + console.log("Filedescriptor: ", fd); +}); +``` + +### Synchronous file creation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp'); + +var tmpobj = tmp.fileSync({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }); +console.log("File: ", tmpobj.name); +console.log("Filedescriptor: ", tmpobj.fd); +``` + +### Asynchronous directory creation + +Creates a directory with mode `0755`, prefix will be `myTmpDir_`. + +```javascript +var tmp = require('tmp'); + +tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) { + if (err) throw err; + + console.log("Dir: ", path); +}); +``` + +### Synchronous directory creation + +Again, a synchronous version of the above. + +```javascript +var tmp = require('tmp'); + +var tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' }); +console.log("Dir: ", tmpobj.name); +``` + +### mkstemp like, asynchronously + +Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`. + +```javascript +var tmp = require('tmp'); + +tmp.dir({ template: '/tmp/tmp-XXXXXX' }, function _tempDirCreated(err, path) { + if (err) throw err; + + console.log("Dir: ", path); +}); +``` + +### mkstemp like, synchronously + +This will behave similarly to the asynchronous version. + +```javascript +var tmp = require('tmp'); + +var tmpobj = tmp.dirSync({ template: '/tmp/tmp-XXXXXX' }); +console.log("Dir: ", tmpobj.name); +``` + +### Asynchronous filename generation + +The `tmpName()` function accepts the `prefix`, `postfix`, `dir`, etc. parameters also: + +```javascript +var tmp = require('tmp'); + +tmp.tmpName({ template: '/tmp/tmp-XXXXXX' }, function _tempNameGenerated(err, path) { + if (err) throw err; + + console.log("Created temporary filename: ", path); +}); +``` + +### Synchronous filename generation + +The `tmpNameSync()` function works similarly to `tmpName()`. + +```javascript +var tmp = require('tmp'); +var tmpname = tmp.tmpNameSync({ template: '/tmp/tmp-XXXXXX' }); +console.log("Created temporary filename: ", tmpname); +``` + +## Graceful cleanup + +One may want to cleanup the temporary files even when an uncaught exception +occurs. To enforce this, you can call the `setGracefulCleanup()` method: + +```javascript +var tmp = require('tmp'); + +tmp.setGracefulCleanup(); +``` + +## Options + +All options are optional :) + + * `mode`: the file mode to create with, it fallbacks to `0600` on file creation and `0700` on directory creation + * `prefix`: the optional prefix, fallbacks to `tmp-` if not provided + * `postfix`: the optional postfix, fallbacks to `.tmp` on file creation + * `template`: [`mkstemp`][3] like filename template, no default + * `dir`: the optional temporary directory, fallbacks to system default (guesses from environment) + * `tries`: how many times should the function try to get a unique filename before giving up, default `3` + * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false`, means delete + * Please keep in mind that it is recommended in this case to call the provided `cleanupCallback` function manually. + * `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false` + +[1]: http://nodejs.org/ +[2]: https://www.npmjs.com/browse/depended/tmp +[3]: http://www.kernel.org/doc/man-pages/online/pages/man3/mkstemp.3.html diff --git a/test-eol-project/node_modules/tmp/cleanup.sh b/test-eol-project/node_modules/tmp/cleanup.sh new file mode 100755 index 00000000..d069ebfb --- /dev/null +++ b/test-eol-project/node_modules/tmp/cleanup.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +rm -vrf ${TMPDIR}/{foo,tmp,something,complicated,clike,using}* diff --git a/test-eol-project/node_modules/tmp/coverage/coverage.json b/test-eol-project/node_modules/tmp/coverage/coverage.json new file mode 100644 index 00000000..5a2f97db --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/coverage.json @@ -0,0 +1 @@ +{"/Users/ikaraszi/_vc/github/node-tmp/lib/tmp.js":{"path":"/Users/ikaraszi/_vc/github/node-tmp/lib/tmp.js","s":{"1":1,"2":1,"3":1,"4":33,"5":33,"6":33,"7":0,"8":33,"9":366,"10":33,"11":1,"12":9,"13":1,"14":79,"15":5,"16":5,"17":5,"18":74,"19":4,"20":79,"21":1,"22":37,"23":4,"24":33,"25":5,"26":28,"27":28,"28":1,"29":25,"30":25,"31":4,"32":21,"33":0,"34":21,"35":21,"36":21,"37":21,"38":0,"39":0,"40":0,"41":21,"42":1,"43":18,"44":18,"45":2,"46":16,"47":0,"48":16,"49":16,"50":16,"51":16,"52":16,"53":0,"54":1,"55":9,"56":9,"57":9,"58":9,"59":1,"60":8,"61":8,"62":0,"63":8,"64":1,"65":9,"66":9,"67":9,"68":8,"69":8,"70":1,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":1,"85":9,"86":9,"87":9,"88":1,"89":8,"90":8,"91":0,"92":8,"93":1,"94":9,"95":9,"96":8,"97":8,"98":1,"99":16,"100":2,"101":2,"102":0,"103":0,"104":2,"105":16,"106":16,"107":16,"108":1,"109":16,"110":16,"111":16,"112":16,"113":16,"114":1,"115":32,"116":32,"117":5,"118":0,"119":5,"120":5,"121":5,"122":5,"123":5,"124":1,"125":0,"126":0,"127":0,"128":0,"129":0,"130":1,"131":0,"132":1,"133":3,"134":1,"135":0,"136":0,"137":0,"138":0,"139":1,"140":0,"141":0,"142":0,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1},"b":{"1":[5,74],"2":[5,5],"3":[4,70],"4":[4,33],"5":[4,4],"6":[5,28],"7":[28,14],"8":[28,8],"9":[28,28],"10":[25,20],"11":[4,21],"12":[25,24],"13":[0,21],"14":[21,3],"15":[0,21],"16":[0,0],"17":[18,16],"18":[2,16],"19":[18,18],"20":[0,16],"21":[16,2],"22":[6,3],"23":[1,8],"24":[8,6],"25":[0,8],"26":[9,6],"27":[8,6],"28":[0,0],"29":[0,0],"30":[0,0],"31":[1,8],"32":[8,6],"33":[0,8],"34":[8,6],"35":[0,0],"36":[0,0],"37":[16,0],"38":[0,16],"39":[16,0],"40":[0,5],"41":[5,0],"42":[0,0],"43":[0,0],"44":[0,1],"45":[1,0,0,0],"46":[0,0]},"f":{"1":33,"2":9,"3":79,"4":37,"5":25,"6":21,"7":21,"8":18,"9":9,"10":9,"11":8,"12":9,"13":0,"14":9,"15":9,"16":8,"17":9,"18":16,"19":2,"20":16,"21":32,"22":5,"23":0,"24":0,"25":3,"26":0,"27":0},"fnMap":{"1":{"name":"_randomChars","line":53,"loc":{"start":{"line":53,"column":0},"end":{"line":53,"column":31}}},"2":{"name":"_isUndefined","line":79,"loc":{"start":{"line":79,"column":0},"end":{"line":79,"column":27}}},"3":{"name":"_parseArguments","line":92,"loc":{"start":{"line":92,"column":0},"end":{"line":92,"column":44}}},"4":{"name":"_generateTmpName","line":112,"loc":{"start":{"line":112,"column":0},"end":{"line":112,"column":32}}},"5":{"name":"_getTmpName","line":140,"loc":{"start":{"line":140,"column":0},"end":{"line":140,"column":40}}},"6":{"name":"_getUniqueName","line":153,"loc":{"start":{"line":153,"column":3},"end":{"line":153,"column":29}}},"7":{"name":"(anonymous_7)","line":157,"loc":{"start":{"line":157,"column":18},"end":{"line":157,"column":33}}},"8":{"name":"_getTmpNameSync","line":176,"loc":{"start":{"line":176,"column":0},"end":{"line":176,"column":34}}},"9":{"name":"_createTmpFile","line":207,"loc":{"start":{"line":207,"column":0},"end":{"line":207,"column":43}}},"10":{"name":"_tmpNameCreated","line":216,"loc":{"start":{"line":216,"column":20},"end":{"line":216,"column":56}}},"11":{"name":"_fileCreated","line":220,"loc":{"start":{"line":220,"column":56},"end":{"line":220,"column":87}}},"12":{"name":"_createTmpFileSync","line":235,"loc":{"start":{"line":235,"column":0},"end":{"line":235,"column":37}}},"13":{"name":"_rmdirRecursiveSync","line":258,"loc":{"start":{"line":258,"column":0},"end":{"line":258,"column":35}}},"14":{"name":"_createTmpDir","line":296,"loc":{"start":{"line":296,"column":0},"end":{"line":296,"column":42}}},"15":{"name":"_tmpNameCreated","line":303,"loc":{"start":{"line":303,"column":20},"end":{"line":303,"column":56}}},"16":{"name":"_dirCreated","line":307,"loc":{"start":{"line":307,"column":42},"end":{"line":307,"column":68}}},"17":{"name":"_createTmpDirSync","line":322,"loc":{"start":{"line":322,"column":0},"end":{"line":322,"column":36}}},"18":{"name":"_prepareTmpFileRemoveCallback","line":345,"loc":{"start":{"line":345,"column":0},"end":{"line":345,"column":55}}},"19":{"name":"_removeCallback","line":346,"loc":{"start":{"line":346,"column":46},"end":{"line":346,"column":79}}},"20":{"name":"_prepareTmpDirRemoveCallback","line":377,"loc":{"start":{"line":377,"column":0},"end":{"line":377,"column":50}}},"21":{"name":"_prepareRemoveCallback","line":396,"loc":{"start":{"line":396,"column":0},"end":{"line":396,"column":53}}},"22":{"name":"_cleanupCallback","line":399,"loc":{"start":{"line":399,"column":9},"end":{"line":399,"column":37}}},"23":{"name":"_garbageCollector","line":417,"loc":{"start":{"line":417,"column":0},"end":{"line":417,"column":29}}},"24":{"name":"_setGracefulCleanup","line":431,"loc":{"start":{"line":431,"column":0},"end":{"line":431,"column":31}}},"25":{"name":"(anonymous_25)","line":435,"loc":{"start":{"line":435,"column":51},"end":{"line":435,"column":68}}},"26":{"name":"_uncaughtExceptionThrown","line":440,"loc":{"start":{"line":440,"column":43},"end":{"line":440,"column":82}}},"27":{"name":"_exit","line":448,"loc":{"start":{"line":448,"column":28},"end":{"line":448,"column":49}}}},"statementMap":{"1":{"start":{"line":12,"column":0},"end":{"line":17,"column":32}},"2":{"start":{"line":23,"column":0},"end":{"line":43,"column":29}},"3":{"start":{"line":53,"column":0},"end":{"line":70,"column":1}},"4":{"start":{"line":54,"column":2},"end":{"line":56,"column":15}},"5":{"start":{"line":59,"column":2},"end":{"line":63,"column":3}},"6":{"start":{"line":60,"column":4},"end":{"line":60,"column":38}},"7":{"start":{"line":62,"column":4},"end":{"line":62,"column":44}},"8":{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},"9":{"start":{"line":66,"column":4},"end":{"line":66,"column":59}},"10":{"start":{"line":69,"column":2},"end":{"line":69,"column":24}},"11":{"start":{"line":79,"column":0},"end":{"line":81,"column":1}},"12":{"start":{"line":80,"column":2},"end":{"line":80,"column":36}},"13":{"start":{"line":92,"column":0},"end":{"line":103,"column":1}},"14":{"start":{"line":93,"column":2},"end":{"line":100,"column":3}},"15":{"start":{"line":94,"column":4},"end":{"line":95,"column":20}},"16":{"start":{"line":96,"column":6},"end":{"line":96,"column":31}},"17":{"start":{"line":97,"column":6},"end":{"line":97,"column":21}},"18":{"start":{"line":98,"column":9},"end":{"line":100,"column":3}},"19":{"start":{"line":99,"column":4},"end":{"line":99,"column":17}},"20":{"start":{"line":102,"column":2},"end":{"line":102,"column":29}},"21":{"start":{"line":112,"column":0},"end":{"line":131,"column":1}},"22":{"start":{"line":113,"column":2},"end":{"line":115,"column":3}},"23":{"start":{"line":114,"column":4},"end":{"line":114,"column":50}},"24":{"start":{"line":118,"column":2},"end":{"line":120,"column":3}},"25":{"start":{"line":119,"column":4},"end":{"line":119,"column":68}},"26":{"start":{"line":123,"column":2},"end":{"line":128,"column":13}},"27":{"start":{"line":130,"column":2},"end":{"line":130,"column":43}},"28":{"start":{"line":140,"column":0},"end":{"line":167,"column":1}},"29":{"start":{"line":141,"column":2},"end":{"line":145,"column":40}},"30":{"start":{"line":147,"column":2},"end":{"line":148,"column":42}},"31":{"start":{"line":148,"column":4},"end":{"line":148,"column":42}},"32":{"start":{"line":150,"column":2},"end":{"line":151,"column":54}},"33":{"start":{"line":151,"column":4},"end":{"line":151,"column":54}},"34":{"start":{"line":153,"column":2},"end":{"line":166,"column":7}},"35":{"start":{"line":154,"column":4},"end":{"line":154,"column":38}},"36":{"start":{"line":157,"column":4},"end":{"line":165,"column":7}},"37":{"start":{"line":158,"column":6},"end":{"line":162,"column":7}},"38":{"start":{"line":159,"column":8},"end":{"line":159,"column":49}},"39":{"start":{"line":159,"column":25},"end":{"line":159,"column":49}},"40":{"start":{"line":161,"column":8},"end":{"line":161,"column":95}},"41":{"start":{"line":164,"column":6},"end":{"line":164,"column":21}},"42":{"start":{"line":176,"column":0},"end":{"line":198,"column":1}},"43":{"start":{"line":177,"column":2},"end":{"line":180,"column":40}},"44":{"start":{"line":182,"column":2},"end":{"line":183,"column":37}},"45":{"start":{"line":183,"column":4},"end":{"line":183,"column":37}},"46":{"start":{"line":185,"column":2},"end":{"line":186,"column":49}},"47":{"start":{"line":186,"column":4},"end":{"line":186,"column":49}},"48":{"start":{"line":188,"column":2},"end":{"line":195,"column":24}},"49":{"start":{"line":189,"column":4},"end":{"line":189,"column":38}},"50":{"start":{"line":190,"column":4},"end":{"line":194,"column":5}},"51":{"start":{"line":191,"column":8},"end":{"line":191,"column":26}},"52":{"start":{"line":193,"column":8},"end":{"line":193,"column":20}},"53":{"start":{"line":197,"column":2},"end":{"line":197,"column":76}},"54":{"start":{"line":207,"column":0},"end":{"line":226,"column":1}},"55":{"start":{"line":208,"column":2},"end":{"line":211,"column":17}},"56":{"start":{"line":213,"column":4},"end":{"line":213,"column":72}},"57":{"start":{"line":216,"column":2},"end":{"line":225,"column":5}},"58":{"start":{"line":217,"column":4},"end":{"line":217,"column":28}},"59":{"start":{"line":217,"column":13},"end":{"line":217,"column":28}},"60":{"start":{"line":220,"column":4},"end":{"line":224,"column":7}},"61":{"start":{"line":221,"column":6},"end":{"line":221,"column":30}},"62":{"start":{"line":221,"column":15},"end":{"line":221,"column":30}},"63":{"start":{"line":223,"column":6},"end":{"line":223,"column":72}},"64":{"start":{"line":235,"column":0},"end":{"line":250,"column":1}},"65":{"start":{"line":236,"column":2},"end":{"line":238,"column":19}},"66":{"start":{"line":240,"column":4},"end":{"line":240,"column":42}},"67":{"start":{"line":242,"column":2},"end":{"line":242,"column":35}},"68":{"start":{"line":243,"column":2},"end":{"line":243,"column":67}},"69":{"start":{"line":245,"column":2},"end":{"line":249,"column":4}},"70":{"start":{"line":258,"column":0},"end":{"line":287,"column":1}},"71":{"start":{"line":259,"column":2},"end":{"line":259,"column":20}},"72":{"start":{"line":261,"column":2},"end":{"line":286,"column":30}},"73":{"start":{"line":262,"column":4},"end":{"line":265,"column":34}},"74":{"start":{"line":267,"column":4},"end":{"line":281,"column":5}},"75":{"start":{"line":268,"column":6},"end":{"line":270,"column":34}},"76":{"start":{"line":272,"column":6},"end":{"line":280,"column":7}},"77":{"start":{"line":273,"column":8},"end":{"line":276,"column":9}},"78":{"start":{"line":274,"column":10},"end":{"line":274,"column":26}},"79":{"start":{"line":275,"column":10},"end":{"line":275,"column":25}},"80":{"start":{"line":277,"column":8},"end":{"line":277,"column":24}},"81":{"start":{"line":279,"column":8},"end":{"line":279,"column":28}},"82":{"start":{"line":283,"column":4},"end":{"line":285,"column":5}},"83":{"start":{"line":284,"column":6},"end":{"line":284,"column":24}},"84":{"start":{"line":296,"column":0},"end":{"line":313,"column":1}},"85":{"start":{"line":297,"column":2},"end":{"line":300,"column":17}},"86":{"start":{"line":303,"column":2},"end":{"line":312,"column":5}},"87":{"start":{"line":304,"column":4},"end":{"line":304,"column":28}},"88":{"start":{"line":304,"column":13},"end":{"line":304,"column":28}},"89":{"start":{"line":307,"column":4},"end":{"line":311,"column":7}},"90":{"start":{"line":308,"column":6},"end":{"line":308,"column":30}},"91":{"start":{"line":308,"column":15},"end":{"line":308,"column":30}},"92":{"start":{"line":310,"column":6},"end":{"line":310,"column":63}},"93":{"start":{"line":322,"column":0},"end":{"line":334,"column":1}},"94":{"start":{"line":323,"column":2},"end":{"line":325,"column":19}},"95":{"start":{"line":327,"column":2},"end":{"line":327,"column":35}},"96":{"start":{"line":328,"column":2},"end":{"line":328,"column":44}},"97":{"start":{"line":330,"column":2},"end":{"line":333,"column":4}},"98":{"start":{"line":345,"column":0},"end":{"line":367,"column":1}},"99":{"start":{"line":346,"column":2},"end":{"line":360,"column":17}},"100":{"start":{"line":347,"column":4},"end":{"line":358,"column":5}},"101":{"start":{"line":348,"column":6},"end":{"line":348,"column":30}},"102":{"start":{"line":354,"column":6},"end":{"line":357,"column":7}},"103":{"start":{"line":356,"column":8},"end":{"line":356,"column":16}},"104":{"start":{"line":359,"column":4},"end":{"line":359,"column":29}},"105":{"start":{"line":362,"column":2},"end":{"line":364,"column":3}},"106":{"start":{"line":363,"column":4},"end":{"line":363,"column":43}},"107":{"start":{"line":366,"column":2},"end":{"line":366,"column":24}},"108":{"start":{"line":377,"column":0},"end":{"line":386,"column":1}},"109":{"start":{"line":378,"column":2},"end":{"line":378,"column":88}},"110":{"start":{"line":379,"column":2},"end":{"line":379,"column":68}},"111":{"start":{"line":381,"column":2},"end":{"line":383,"column":3}},"112":{"start":{"line":382,"column":4},"end":{"line":382,"column":43}},"113":{"start":{"line":385,"column":2},"end":{"line":385,"column":24}},"114":{"start":{"line":396,"column":0},"end":{"line":410,"column":1}},"115":{"start":{"line":397,"column":2},"end":{"line":397,"column":21}},"116":{"start":{"line":399,"column":2},"end":{"line":409,"column":4}},"117":{"start":{"line":400,"column":4},"end":{"line":400,"column":23}},"118":{"start":{"line":400,"column":16},"end":{"line":400,"column":23}},"119":{"start":{"line":402,"column":4},"end":{"line":402,"column":57}},"120":{"start":{"line":403,"column":4},"end":{"line":405,"column":5}},"121":{"start":{"line":404,"column":6},"end":{"line":404,"column":38}},"122":{"start":{"line":407,"column":4},"end":{"line":407,"column":18}},"123":{"start":{"line":408,"column":4},"end":{"line":408,"column":24}},"124":{"start":{"line":417,"column":0},"end":{"line":429,"column":1}},"125":{"start":{"line":418,"column":2},"end":{"line":420,"column":3}},"126":{"start":{"line":419,"column":4},"end":{"line":419,"column":11}},"127":{"start":{"line":422,"column":2},"end":{"line":428,"column":3}},"128":{"start":{"line":423,"column":4},"end":{"line":427,"column":5}},"129":{"start":{"line":424,"column":6},"end":{"line":424,"column":35}},"130":{"start":{"line":431,"column":0},"end":{"line":433,"column":1}},"131":{"start":{"line":432,"column":2},"end":{"line":432,"column":26}},"132":{"start":{"line":435,"column":0},"end":{"line":437,"column":3}},"133":{"start":{"line":436,"column":2},"end":{"line":436,"column":29}},"134":{"start":{"line":439,"column":0},"end":{"line":446,"column":1}},"135":{"start":{"line":440,"column":2},"end":{"line":445,"column":5}},"136":{"start":{"line":441,"column":4},"end":{"line":441,"column":30}},"137":{"start":{"line":442,"column":4},"end":{"line":442,"column":24}},"138":{"start":{"line":444,"column":4},"end":{"line":444,"column":14}},"139":{"start":{"line":448,"column":0},"end":{"line":451,"column":3}},"140":{"start":{"line":449,"column":2},"end":{"line":449,"column":38}},"141":{"start":{"line":449,"column":12},"end":{"line":449,"column":38}},"142":{"start":{"line":450,"column":2},"end":{"line":450,"column":22}},"143":{"start":{"line":454,"column":0},"end":{"line":454,"column":29}},"144":{"start":{"line":455,"column":0},"end":{"line":455,"column":35}},"145":{"start":{"line":456,"column":0},"end":{"line":456,"column":43}},"146":{"start":{"line":457,"column":0},"end":{"line":457,"column":37}},"147":{"start":{"line":458,"column":0},"end":{"line":458,"column":45}},"148":{"start":{"line":459,"column":0},"end":{"line":459,"column":37}},"149":{"start":{"line":460,"column":0},"end":{"line":460,"column":45}},"150":{"start":{"line":461,"column":0},"end":{"line":461,"column":56}}},"branchMap":{"1":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":2},"end":{"line":93,"column":2}},{"start":{"line":93,"column":2},"end":{"line":93,"column":2}}]},"2":{"line":96,"type":"binary-expr","locations":[{"start":{"line":96,"column":16},"end":{"line":96,"column":24}},{"start":{"line":96,"column":28},"end":{"line":96,"column":30}}]},"3":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":9},"end":{"line":98,"column":9}},{"start":{"line":98,"column":9},"end":{"line":98,"column":9}}]},"4":{"line":113,"type":"if","locations":[{"start":{"line":113,"column":2},"end":{"line":113,"column":2}},{"start":{"line":113,"column":2},"end":{"line":113,"column":2}}]},"5":{"line":114,"type":"binary-expr","locations":[{"start":{"line":114,"column":21},"end":{"line":114,"column":29}},{"start":{"line":114,"column":33},"end":{"line":114,"column":37}}]},"6":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":2},"end":{"line":118,"column":2}},{"start":{"line":118,"column":2},"end":{"line":118,"column":2}}]},"7":{"line":124,"type":"binary-expr","locations":[{"start":{"line":124,"column":4},"end":{"line":124,"column":15}},{"start":{"line":124,"column":19},"end":{"line":124,"column":25}}]},"8":{"line":127,"type":"binary-expr","locations":[{"start":{"line":127,"column":4},"end":{"line":127,"column":16}},{"start":{"line":127,"column":20},"end":{"line":127,"column":22}}]},"9":{"line":130,"type":"binary-expr","locations":[{"start":{"line":130,"column":19},"end":{"line":130,"column":27}},{"start":{"line":130,"column":31},"end":{"line":130,"column":35}}]},"10":{"line":145,"type":"binary-expr","locations":[{"start":{"line":145,"column":12},"end":{"line":145,"column":22}},{"start":{"line":145,"column":26},"end":{"line":145,"column":39}}]},"11":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":2},"end":{"line":147,"column":2}},{"start":{"line":147,"column":2},"end":{"line":147,"column":2}}]},"12":{"line":147,"type":"binary-expr","locations":[{"start":{"line":147,"column":6},"end":{"line":147,"column":18}},{"start":{"line":147,"column":22},"end":{"line":147,"column":31}}]},"13":{"line":150,"type":"if","locations":[{"start":{"line":150,"column":2},"end":{"line":150,"column":2}},{"start":{"line":150,"column":2},"end":{"line":150,"column":2}}]},"14":{"line":150,"type":"binary-expr","locations":[{"start":{"line":150,"column":6},"end":{"line":150,"column":19}},{"start":{"line":150,"column":23},"end":{"line":150,"column":61}}]},"15":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":6},"end":{"line":158,"column":6}},{"start":{"line":158,"column":6},"end":{"line":158,"column":6}}]},"16":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":8},"end":{"line":159,"column":8}},{"start":{"line":159,"column":8},"end":{"line":159,"column":8}}]},"17":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":12},"end":{"line":180,"column":22}},{"start":{"line":180,"column":26},"end":{"line":180,"column":39}}]},"18":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":2},"end":{"line":182,"column":2}},{"start":{"line":182,"column":2},"end":{"line":182,"column":2}}]},"19":{"line":182,"type":"binary-expr","locations":[{"start":{"line":182,"column":6},"end":{"line":182,"column":18}},{"start":{"line":182,"column":22},"end":{"line":182,"column":31}}]},"20":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":2},"end":{"line":185,"column":2}},{"start":{"line":185,"column":2},"end":{"line":185,"column":2}}]},"21":{"line":185,"type":"binary-expr","locations":[{"start":{"line":185,"column":6},"end":{"line":185,"column":19}},{"start":{"line":185,"column":23},"end":{"line":185,"column":61}}]},"22":{"line":213,"type":"cond-expr","locations":[{"start":{"line":213,"column":50},"end":{"line":213,"column":56}},{"start":{"line":213,"column":59},"end":{"line":213,"column":71}}]},"23":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":4},"end":{"line":217,"column":4}},{"start":{"line":217,"column":4},"end":{"line":217,"column":4}}]},"24":{"line":220,"type":"binary-expr","locations":[{"start":{"line":220,"column":32},"end":{"line":220,"column":41}},{"start":{"line":220,"column":45},"end":{"line":220,"column":54}}]},"25":{"line":221,"type":"if","locations":[{"start":{"line":221,"column":6},"end":{"line":221,"column":6}},{"start":{"line":221,"column":6},"end":{"line":221,"column":6}}]},"26":{"line":240,"type":"binary-expr","locations":[{"start":{"line":240,"column":19},"end":{"line":240,"column":31}},{"start":{"line":240,"column":35},"end":{"line":240,"column":41}}]},"27":{"line":243,"type":"binary-expr","locations":[{"start":{"line":243,"column":43},"end":{"line":243,"column":52}},{"start":{"line":243,"column":56},"end":{"line":243,"column":65}}]},"28":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":6},"end":{"line":272,"column":6}},{"start":{"line":272,"column":6},"end":{"line":272,"column":6}}]},"29":{"line":273,"type":"if","locations":[{"start":{"line":273,"column":8},"end":{"line":273,"column":8}},{"start":{"line":273,"column":8},"end":{"line":273,"column":8}}]},"30":{"line":283,"type":"if","locations":[{"start":{"line":283,"column":4},"end":{"line":283,"column":4}},{"start":{"line":283,"column":4},"end":{"line":283,"column":4}}]},"31":{"line":304,"type":"if","locations":[{"start":{"line":304,"column":4},"end":{"line":304,"column":4}},{"start":{"line":304,"column":4},"end":{"line":304,"column":4}}]},"32":{"line":307,"type":"binary-expr","locations":[{"start":{"line":307,"column":19},"end":{"line":307,"column":28}},{"start":{"line":307,"column":32},"end":{"line":307,"column":40}}]},"33":{"line":308,"type":"if","locations":[{"start":{"line":308,"column":6},"end":{"line":308,"column":6}},{"start":{"line":308,"column":6},"end":{"line":308,"column":6}}]},"34":{"line":328,"type":"binary-expr","locations":[{"start":{"line":328,"column":21},"end":{"line":328,"column":30}},{"start":{"line":328,"column":34},"end":{"line":328,"column":42}}]},"35":{"line":354,"type":"if","locations":[{"start":{"line":354,"column":6},"end":{"line":354,"column":6}},{"start":{"line":354,"column":6},"end":{"line":354,"column":6}}]},"36":{"line":354,"type":"binary-expr","locations":[{"start":{"line":354,"column":10},"end":{"line":354,"column":30}},{"start":{"line":354,"column":34},"end":{"line":354,"column":55}}]},"37":{"line":362,"type":"if","locations":[{"start":{"line":362,"column":2},"end":{"line":362,"column":2}},{"start":{"line":362,"column":2},"end":{"line":362,"column":2}}]},"38":{"line":378,"type":"cond-expr","locations":[{"start":{"line":378,"column":44},"end":{"line":378,"column":63}},{"start":{"line":378,"column":66},"end":{"line":378,"column":87}}]},"39":{"line":381,"type":"if","locations":[{"start":{"line":381,"column":2},"end":{"line":381,"column":2}},{"start":{"line":381,"column":2},"end":{"line":381,"column":2}}]},"40":{"line":400,"type":"if","locations":[{"start":{"line":400,"column":4},"end":{"line":400,"column":4}},{"start":{"line":400,"column":4},"end":{"line":400,"column":4}}]},"41":{"line":403,"type":"if","locations":[{"start":{"line":403,"column":4},"end":{"line":403,"column":4}},{"start":{"line":403,"column":4},"end":{"line":403,"column":4}}]},"42":{"line":418,"type":"if","locations":[{"start":{"line":418,"column":2},"end":{"line":418,"column":2}},{"start":{"line":418,"column":2},"end":{"line":418,"column":2}}]},"43":{"line":418,"type":"binary-expr","locations":[{"start":{"line":418,"column":6},"end":{"line":418,"column":24}},{"start":{"line":418,"column":28},"end":{"line":418,"column":45}}]},"44":{"line":439,"type":"if","locations":[{"start":{"line":439,"column":0},"end":{"line":439,"column":0}},{"start":{"line":439,"column":0},"end":{"line":439,"column":0}}]},"45":{"line":439,"type":"binary-expr","locations":[{"start":{"line":439,"column":4},"end":{"line":439,"column":20}},{"start":{"line":439,"column":25},"end":{"line":439,"column":39}},{"start":{"line":439,"column":43},"end":{"line":439,"column":59}},{"start":{"line":439,"column":63},"end":{"line":439,"column":77}}]},"46":{"line":449,"type":"if","locations":[{"start":{"line":449,"column":2},"end":{"line":449,"column":2}},{"start":{"line":449,"column":2},"end":{"line":449,"column":2}}]}}}} \ No newline at end of file diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/base.css b/test-eol-project/node_modules/tmp/coverage/lcov-report/base.css new file mode 100644 index 00000000..29737bcb --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov-report/base.css @@ -0,0 +1,213 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.medium .chart { border:1px solid #f9cd0b; } +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } +/* light gray */ +span.cline-neutral { background: #eaeaea; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/index.html b/test-eol-project/node_modules/tmp/coverage/lcov-report/index.html new file mode 100644 index 00000000..1d4d14f0 --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov-report/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
    +
    +

    + / +

    +
    +
    + 74.67% + Statements + 112/150 +
    +
    + 65.96% + Branches + 62/94 +
    +
    + 81.48% + Functions + 22/27 +
    +
    + 76.92% + Lines + 110/143 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    lib/
    74.67%112/15065.96%62/9481.48%22/2776.92%110/143
    +
    +
    + + + + + + + diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html b/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html new file mode 100644 index 00000000..ee405aea --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for lib/ + + + + + + + +
    +
    +

    + all files lib/ +

    +
    +
    + 74.67% + Statements + 112/150 +
    +
    + 65.96% + Branches + 62/94 +
    +
    + 81.48% + Functions + 22/27 +
    +
    + 76.92% + Lines + 110/143 +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileStatementsBranchesFunctionsLines
    tmp.js
    74.67%112/15065.96%62/9481.48%22/2776.92%110/143
    +
    +
    + + + + + + + diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html b/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html new file mode 100644 index 00000000..8d0fa2b1 --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html @@ -0,0 +1,1448 @@ + + + + Code coverage report for lib/tmp.js + + + + + + + +
    +
    +

    + all files / lib/ tmp.js +

    +
    +
    + 74.67% + Statements + 112/150 +
    +
    + 65.96% + Branches + 62/94 +
    +
    + 81.48% + Functions + 22/27 +
    +
    + 76.92% + Lines + 110/143 +
    +
    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462  +  +  +  +  +  +  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +33× +  +  +  +  +33× +33× +  +  +  +  +33× +366× +  +  +33× +  +  +  +  +  +  +  +  +  + + +  +  +  +  +  +  +  +  +  +  +  + +79× + +  + + +74× + +  +  +79× +  +  +  +  +  +  +  +  +  + +37× + +  +  +  +33× + +  +  +  +28× +  +  +  +  +  +  +28× +  +  +  +  +  +  +  +  +  + +25× +  +  +  +  +  +25× + +  +21× +  +  +21× +21× +  +  +21× +21× +  +  +  +  +  +21× +  +  +  +  +  +  +  +  +  +  +  + +18× +  +  +  +  +18× + +  +16× +  +  +16× +16× +16× +16× +  +16× +  +  +  +  +  +  +  +  +  +  +  +  +  + + +  +  +  +  + +  +  + + +  +  + + +  + +  +  +  +  +  +  +  +  +  +  +  + + +  +  +  + +  + + +  + +  +  +  +  +  +  +  +  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + + +  +  +  +  +  + + +  +  + + +  + +  +  +  +  +  +  +  +  +  +  +  + + +  +  +  + + +  + +  +  +  +  +  +  +  +  +  +  +  +  +  +  + +16× + + +  +  +  +  +  +  +  +  +  +  + +  +  +16× +16× +  +  +16× +  +  +  +  +  +  +  +  +  +  + +16× +16× +  +16× +16× +  +  +16× +  +  +  +  +  +  +  +  +  +  + +32× +  +32× + +  + + + +  +  + + +  +  +  +  +  +  +  +  + +  +  +  +  +  +  +  +  +  +  +  +  +  + +  +  +  + + +  +  + +  +  +  +  +  +  +  +  + +  +  +  +  +  + + + + + + + + + 
    /*!
    + * Tmp
    + *
    + * Copyright (c) 2011-2015 KARASZI Istvan <github@spam.raszi.hu>
    + *
    + * MIT Licensed
    + */
    + 
    +/**
    + * Module dependencies.
    + */
    +var
    +  fs     = require('fs'),
    +  path   = require('path'),
    +  crypto = require('crypto'),
    +  tmpDir = require('os-tmpdir'),
    +  _c     = require('constants');
    + 
    + 
    +/**
    + * The working inner variables.
    + */
    +var
    +  // store the actual TMP directory
    +  _TMP = tmpDir(),
    + 
    +  // the random characters to choose from
    +  RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
    + 
    +  TEMPLATE_PATTERN = /XXXXXX/,
    + 
    +  DEFAULT_TRIES = 3,
    + 
    +  CREATE_FLAGS = _c.O_CREAT | _c.O_EXCL | _c.O_RDWR,
    + 
    +  DIR_MODE = 448 /* 0700 */,
    +  FILE_MODE = 384 /* 0600 */,
    + 
    +  // this will hold the objects need to be removed on exit
    +  _removeObjects = [],
    + 
    +  _gracefulCleanup = false,
    +  _uncaughtException = false;
    + 
    +/**
    + * Random name generator based on crypto.
    + * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript
    + *
    + * @param {Number} howMany
    + * @return {String}
    + * @api private
    + */
    +function _randomChars(howMany) {
    +  var
    +    value = [],
    +    rnd = null;
    + 
    +  // make sure that we do not fail because we ran out of entropy
    +  try {
    +    rnd = crypto.randomBytes(howMany);
    +  } catch (e) {
    +    rnd = crypto.pseudoRandomBytes(howMany);
    +  }
    + 
    +  for (var i = 0; i < howMany; i++) {
    +    value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
    +  }
    + 
    +  return value.join('');
    +}
    + 
    +/**
    + * Checks whether the `obj` parameter is defined or not.
    + *
    + * @param {Object} obj
    + * @return {Boolean}
    + * @api private
    + */
    +function _isUndefined(obj) {
    +  return typeof obj === 'undefined';
    +}
    + 
    +/**
    + * Parses the function arguments.
    + *
    + * This function helps to have optional arguments.
    + *
    + * @param {Object} options
    + * @param {Function} callback
    + * @api private
    + */
    +function _parseArguments(options, callback) {
    +  if (typeof options == 'function') {
    +    var
    +      tmp = options;
    +      options = callback || {};
    +      callback = tmp;
    +  } else if (typeof options == 'undefined') {
    +    options = {};
    +  }
    + 
    +  return [options, callback];
    +}
    + 
    +/**
    + * Generates a new temporary name.
    + *
    + * @param {Object} opts
    + * @returns {String}
    + * @api private
    + */
    +function _generateTmpName(opts) {
    +  if (opts.name) {
    +    return path.join(opts.dir || _TMP, opts.name);
    +  }
    + 
    +  // mkstemps like template
    +  if (opts.template) {
    +    return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
    +  }
    + 
    +  // prefix and postfix
    +  var name = [
    +    opts.prefix || 'tmp-',
    +    process.pid,
    +    _randomChars(12),
    +    opts.postfix || ''
    +  ].join('');
    + 
    +  return path.join(opts.dir || _TMP, name);
    +}
    + 
    +/**
    + * Gets a temporary file name.
    + *
    + * @param {Object} options
    + * @param {Function} callback
    + * @api private
    + */
    +function _getTmpName(options, callback) {
    +  var
    +    args = _parseArguments(options, callback),
    +    opts = args[0],
    +    cb = args[1],
    +    tries = opts.tries || DEFAULT_TRIES;
    + 
    +  if (isNaN(tries) || tries < 0)
    +    return cb(new Error('Invalid tries'));
    + 
    +  Iif (opts.template && !opts.template.match(TEMPLATE_PATTERN))
    +    return cb(new Error('Invalid template provided'));
    + 
    +  (function _getUniqueName() {
    +    var name = _generateTmpName(opts);
    + 
    +    // check whether the path exists then retry if needed
    +    fs.stat(name, function (err) {
    +      Iif (!err) {
    +        if (tries-- > 0) return _getUniqueName();
    + 
    +        return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));
    +      }
    + 
    +      cb(null, name);
    +    });
    +  }());
    +}
    + 
    +/**
    + * Synchronous version of _getTmpName.
    + *
    + * @param {Object} options
    + * @returns {String}
    + * @api private
    + */
    +function _getTmpNameSync(options) {
    +  var
    +    args = _parseArguments(options),
    +    opts = args[0],
    +    tries = opts.tries || DEFAULT_TRIES;
    + 
    +  if (isNaN(tries) || tries < 0)
    +    throw new Error('Invalid tries');
    + 
    +  Iif (opts.template && !opts.template.match(TEMPLATE_PATTERN))
    +    throw new Error('Invalid template provided');
    + 
    +  do {
    +    var name = _generateTmpName(opts);
    +    try {
    +        fs.statSync(name);
    +    } catch (e) {
    +        return name;
    +    }
    +  } while (tries-- > 0);
    + 
    +  throw new Error('Could not get a unique tmp filename, max tries reached');
    +}
    + 
    +/**
    + * Creates and opens a temporary file.
    + *
    + * @param {Object} options
    + * @param {Function} callback
    + * @api public
    + */
    +function _createTmpFile(options, callback) {
    +  var
    +    args = _parseArguments(options, callback),
    +    opts = args[0],
    +    cb = args[1];
    + 
    +    opts.postfix = (_isUndefined(opts.postfix)) ? '.tmp' : opts.postfix;
    + 
    +  // gets a temporary filename
    +  _getTmpName(opts, function _tmpNameCreated(err, name) {
    +    if (err) return cb(err);
    + 
    +    // create and open the file
    +    fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {
    +      Iif (err) return cb(err);
    + 
    +      cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts));
    +    });
    +  });
    +}
    + 
    +/**
    + * Synchronous version of _createTmpFile.
    + *
    + * @param {Object} options
    + * @returns {Object} object consists of name, fd and removeCallback
    + * @api private
    + */
    +function _createTmpFileSync(options) {
    +  var
    +    args = _parseArguments(options),
    +    opts = args[0];
    + 
    +    opts.postfix = opts.postfix || '.tmp';
    + 
    +  var name = _getTmpNameSync(opts);
    +  var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
    + 
    +  return {
    +    name : name,
    +    fd : fd,
    +    removeCallback : _prepareTmpFileRemoveCallback(name, fd, opts)
    +  };
    +}
    + 
    +/**
    + * Removes files and folders in a directory recursively.
    + *
    + * @param {String} root
    + * @api private
    + */
    +function _rmdirRecursiveSync(root) {
    +  var dirs = [root];
    + 
    +  do {
    +    var
    +      dir = dirs.pop(),
    +      deferred = false,
    +      files = fs.readdirSync(dir);
    + 
    +    for (var i = 0, length = files.length; i < length; i++) {
    +      var
    +        file = path.join(dir, files[i]),
    +        stat = fs.lstatSync(file); // lstat so we don't recurse into symlinked directories
    + 
    +      if (stat.isDirectory()) {
    +        if (!deferred) {
    +          deferred = true;
    +          dirs.push(dir);
    +        }
    +        dirs.push(file);
    +      } else {
    +        fs.unlinkSync(file);
    +      }
    +    }
    + 
    +    if (!deferred) {
    +      fs.rmdirSync(dir);
    +    }
    +  } while (dirs.length !== 0);
    +}
    + 
    +/**
    + * Creates a temporary directory.
    + *
    + * @param {Object} options
    + * @param {Function} callback
    + * @api public
    + */
    +function _createTmpDir(options, callback) {
    +  var
    +    args = _parseArguments(options, callback),
    +    opts = args[0],
    +    cb = args[1];
    + 
    +  // gets a temporary filename
    +  _getTmpName(opts, function _tmpNameCreated(err, name) {
    +    if (err) return cb(err);
    + 
    +    // create the directory
    +    fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {
    +      Iif (err) return cb(err);
    + 
    +      cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
    +    });
    +  });
    +}
    + 
    +/**
    + * Synchronous version of _createTmpDir.
    + *
    + * @param {Object} options
    + * @returns {Object} object consists of name and removeCallback
    + * @api private
    + */
    +function _createTmpDirSync(options) {
    +  var
    +    args = _parseArguments(options),
    +    opts = args[0];
    + 
    +  var name = _getTmpNameSync(opts);
    +  fs.mkdirSync(name, opts.mode || DIR_MODE);
    + 
    +  return {
    +    name : name,
    +    removeCallback : _prepareTmpDirRemoveCallback(name, opts)
    +  };
    +}
    + 
    +/**
    + * Prepares the callback for removal of the temporary file.
    + *
    + * @param {String} name
    + * @param {int} fd
    + * @param {Object} opts
    + * @api private
    + * @returns {Function} the callback
    + */
    +function _prepareTmpFileRemoveCallback(name, fd, opts) {
    +  var removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) {
    +    try {
    +      fs.closeSync(fdPath[0]);
    +    }
    +    catch (e) {
    +      // under some node/windows related circumstances, a temporary file
    +      // may have not be created as expected or the file was already closed
    +      // by the user, in which case we will simply ignore the error
    +      if (e.errno != -_c.EBADF && e.errno != -_c.ENOENT) {
    +        // reraise any unanticipated error
    +        throw e;
    +      }
    +    }
    +    fs.unlinkSync(fdPath[1]);
    +  }, [fd, name]);
    + 
    +  Eif (!opts.keep) {
    +    _removeObjects.unshift(removeCallback);
    +  }
    + 
    +  return removeCallback;
    +}
    + 
    +/**
    + * Prepares the callback for removal of the temporary directory.
    + *
    + * @param {String} name
    + * @param {Object} opts
    + * @returns {Function} the callback
    + * @api private
    + */
    +function _prepareTmpDirRemoveCallback(name, opts) {
    +  var removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs.rmdirSync.bind(fs);
    +  var removeCallback = _prepareRemoveCallback(removeFunction, name);
    + 
    +  Eif (!opts.keep) {
    +    _removeObjects.unshift(removeCallback);
    +  }
    + 
    +  return removeCallback;
    +}
    + 
    +/**
    + * Creates a guarded function wrapping the removeFunction call.
    + *
    + * @param {Function} removeFunction
    + * @param {Object} arg
    + * @returns {Function}
    + * @api private
    + */
    +function _prepareRemoveCallback(removeFunction, arg) {
    +  var called = false;
    + 
    +  return function _cleanupCallback() {
    +    Iif (called) return;
    + 
    +    var index = _removeObjects.indexOf(_cleanupCallback);
    +    Eif (index >= 0) {
    +      _removeObjects.splice(index, 1);
    +    }
    + 
    +    called = true;
    +    removeFunction(arg);
    +  };
    +}
    + 
    +/**
    + * The garbage collector.
    + *
    + * @api private
    + */
    +function _garbageCollector() {
    +  if (_uncaughtException && !_gracefulCleanup) {
    +    return;
    +  }
    + 
    +  for (var i = 0, length = _removeObjects.length; i < length; i++) {
    +    try {
    +      _removeObjects[i].call(null);
    +    } catch (e) {
    +      // already removed?
    +    }
    +  }
    +}
    + 
    +function _setGracefulCleanup() {
    +  _gracefulCleanup = true;
    +}
    + 
    +var version = process.versions.node.split('.').map(function (value) {
    +  return parseInt(value, 10);
    +});
    + 
    +Iif (version[0] === 0 && (version[1] < 9 || version[1] === 9 && version[2] < 5)) {
    +  process.addListener('uncaughtException', function _uncaughtExceptionThrown(err) {
    +    _uncaughtException = true;
    +    _garbageCollector();
    + 
    +    throw err;
    +  });
    +}
    + 
    +process.addListener('exit', function _exit(code) {
    +  if (code) _uncaughtException = true;
    +  _garbageCollector();
    +});
    + 
    +// exporting all the needed methods
    +module.exports.tmpdir = _TMP;
    +module.exports.dir = _createTmpDir;
    +module.exports.dirSync = _createTmpDirSync;
    +module.exports.file = _createTmpFile;
    +module.exports.fileSync = _createTmpFileSync;
    +module.exports.tmpName = _getTmpName;
    +module.exports.tmpNameSync = _getTmpNameSync;
    +module.exports.setGracefulCleanup = _setGracefulCleanup;
    + 
    +
    +
    + + + + + + + diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css b/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css new file mode 100644 index 00000000..b317a7cd --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js b/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js new file mode 100644 index 00000000..ef51e038 --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/sort-arrow-sprite.png b/test-eol-project/node_modules/tmp/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/test-eol-project/node_modules/tmp/coverage/lcov.info b/test-eol-project/node_modules/tmp/coverage/lcov.info new file mode 100644 index 00000000..1f185c30 --- /dev/null +++ b/test-eol-project/node_modules/tmp/coverage/lcov.info @@ -0,0 +1,300 @@ +TN: +SF:/Users/ikaraszi/_vc/github/node-tmp/lib/tmp.js +FN:53,_randomChars +FN:79,_isUndefined +FN:92,_parseArguments +FN:112,_generateTmpName +FN:140,_getTmpName +FN:153,_getUniqueName +FN:157,(anonymous_7) +FN:176,_getTmpNameSync +FN:207,_createTmpFile +FN:216,_tmpNameCreated +FN:220,_fileCreated +FN:235,_createTmpFileSync +FN:258,_rmdirRecursiveSync +FN:296,_createTmpDir +FN:303,_tmpNameCreated +FN:307,_dirCreated +FN:322,_createTmpDirSync +FN:345,_prepareTmpFileRemoveCallback +FN:346,_removeCallback +FN:377,_prepareTmpDirRemoveCallback +FN:396,_prepareRemoveCallback +FN:399,_cleanupCallback +FN:417,_garbageCollector +FN:431,_setGracefulCleanup +FN:435,(anonymous_25) +FN:440,_uncaughtExceptionThrown +FN:448,_exit +FNF:27 +FNH:22 +FNDA:33,_randomChars +FNDA:9,_isUndefined +FNDA:79,_parseArguments +FNDA:37,_generateTmpName +FNDA:25,_getTmpName +FNDA:21,_getUniqueName +FNDA:21,(anonymous_7) +FNDA:18,_getTmpNameSync +FNDA:9,_createTmpFile +FNDA:9,_tmpNameCreated +FNDA:8,_fileCreated +FNDA:9,_createTmpFileSync +FNDA:0,_rmdirRecursiveSync +FNDA:9,_createTmpDir +FNDA:9,_tmpNameCreated +FNDA:8,_dirCreated +FNDA:9,_createTmpDirSync +FNDA:16,_prepareTmpFileRemoveCallback +FNDA:2,_removeCallback +FNDA:16,_prepareTmpDirRemoveCallback +FNDA:32,_prepareRemoveCallback +FNDA:5,_cleanupCallback +FNDA:0,_garbageCollector +FNDA:0,_setGracefulCleanup +FNDA:3,(anonymous_25) +FNDA:0,_uncaughtExceptionThrown +FNDA:0,_exit +DA:12,1 +DA:23,1 +DA:53,1 +DA:54,33 +DA:59,33 +DA:60,33 +DA:62,0 +DA:65,33 +DA:66,366 +DA:69,33 +DA:79,1 +DA:80,9 +DA:92,1 +DA:93,79 +DA:94,5 +DA:96,5 +DA:97,5 +DA:98,74 +DA:99,4 +DA:102,79 +DA:112,1 +DA:113,37 +DA:114,4 +DA:118,33 +DA:119,5 +DA:123,28 +DA:130,28 +DA:140,1 +DA:141,25 +DA:147,25 +DA:148,4 +DA:150,21 +DA:151,0 +DA:153,21 +DA:154,21 +DA:157,21 +DA:158,21 +DA:159,0 +DA:161,0 +DA:164,21 +DA:176,1 +DA:177,18 +DA:182,18 +DA:183,2 +DA:185,16 +DA:186,0 +DA:188,16 +DA:189,16 +DA:190,16 +DA:191,16 +DA:193,16 +DA:197,0 +DA:207,1 +DA:208,9 +DA:213,9 +DA:216,9 +DA:217,9 +DA:220,8 +DA:221,8 +DA:223,8 +DA:235,1 +DA:236,9 +DA:240,9 +DA:242,9 +DA:243,8 +DA:245,8 +DA:258,1 +DA:259,0 +DA:261,0 +DA:262,0 +DA:267,0 +DA:268,0 +DA:272,0 +DA:273,0 +DA:274,0 +DA:275,0 +DA:277,0 +DA:279,0 +DA:283,0 +DA:284,0 +DA:296,1 +DA:297,9 +DA:303,9 +DA:304,9 +DA:307,8 +DA:308,8 +DA:310,8 +DA:322,1 +DA:323,9 +DA:327,9 +DA:328,8 +DA:330,8 +DA:345,1 +DA:346,16 +DA:347,2 +DA:348,2 +DA:354,0 +DA:356,0 +DA:359,2 +DA:362,16 +DA:363,16 +DA:366,16 +DA:377,1 +DA:378,16 +DA:379,16 +DA:381,16 +DA:382,16 +DA:385,16 +DA:396,1 +DA:397,32 +DA:399,32 +DA:400,5 +DA:402,5 +DA:403,5 +DA:404,5 +DA:407,5 +DA:408,5 +DA:417,1 +DA:418,0 +DA:419,0 +DA:422,0 +DA:423,0 +DA:424,0 +DA:431,1 +DA:432,0 +DA:435,1 +DA:436,3 +DA:439,1 +DA:440,0 +DA:441,0 +DA:442,0 +DA:444,0 +DA:448,1 +DA:449,0 +DA:450,0 +DA:454,1 +DA:455,1 +DA:456,1 +DA:457,1 +DA:458,1 +DA:459,1 +DA:460,1 +DA:461,1 +LF:143 +LH:110 +BRDA:93,1,0,5 +BRDA:93,1,1,74 +BRDA:96,2,0,5 +BRDA:96,2,1,5 +BRDA:98,3,0,4 +BRDA:98,3,1,70 +BRDA:113,4,0,4 +BRDA:113,4,1,33 +BRDA:114,5,0,4 +BRDA:114,5,1,4 +BRDA:118,6,0,5 +BRDA:118,6,1,28 +BRDA:124,7,0,28 +BRDA:124,7,1,14 +BRDA:127,8,0,28 +BRDA:127,8,1,8 +BRDA:130,9,0,28 +BRDA:130,9,1,28 +BRDA:145,10,0,25 +BRDA:145,10,1,20 +BRDA:147,11,0,4 +BRDA:147,11,1,21 +BRDA:147,12,0,25 +BRDA:147,12,1,24 +BRDA:150,13,0,0 +BRDA:150,13,1,21 +BRDA:150,14,0,21 +BRDA:150,14,1,3 +BRDA:158,15,0,0 +BRDA:158,15,1,21 +BRDA:159,16,0,0 +BRDA:159,16,1,0 +BRDA:180,17,0,18 +BRDA:180,17,1,16 +BRDA:182,18,0,2 +BRDA:182,18,1,16 +BRDA:182,19,0,18 +BRDA:182,19,1,18 +BRDA:185,20,0,0 +BRDA:185,20,1,16 +BRDA:185,21,0,16 +BRDA:185,21,1,2 +BRDA:213,22,0,6 +BRDA:213,22,1,3 +BRDA:217,23,0,1 +BRDA:217,23,1,8 +BRDA:220,24,0,8 +BRDA:220,24,1,6 +BRDA:221,25,0,0 +BRDA:221,25,1,8 +BRDA:240,26,0,9 +BRDA:240,26,1,6 +BRDA:243,27,0,8 +BRDA:243,27,1,6 +BRDA:272,28,0,0 +BRDA:272,28,1,0 +BRDA:273,29,0,0 +BRDA:273,29,1,0 +BRDA:283,30,0,0 +BRDA:283,30,1,0 +BRDA:304,31,0,1 +BRDA:304,31,1,8 +BRDA:307,32,0,8 +BRDA:307,32,1,6 +BRDA:308,33,0,0 +BRDA:308,33,1,8 +BRDA:328,34,0,8 +BRDA:328,34,1,6 +BRDA:354,35,0,0 +BRDA:354,35,1,0 +BRDA:354,36,0,0 +BRDA:354,36,1,0 +BRDA:362,37,0,16 +BRDA:362,37,1,0 +BRDA:378,38,0,0 +BRDA:378,38,1,16 +BRDA:381,39,0,16 +BRDA:381,39,1,0 +BRDA:400,40,0,0 +BRDA:400,40,1,5 +BRDA:403,41,0,5 +BRDA:403,41,1,0 +BRDA:418,42,0,0 +BRDA:418,42,1,0 +BRDA:418,43,0,0 +BRDA:418,43,1,0 +BRDA:439,44,0,0 +BRDA:439,44,1,1 +BRDA:439,45,0,1 +BRDA:439,45,1,0 +BRDA:439,45,2,0 +BRDA:439,45,3,0 +BRDA:449,46,0,0 +BRDA:449,46,1,0 +BRF:94 +BRH:62 +end_of_record diff --git a/test-eol-project/node_modules/tmp/lib/tmp.js b/test-eol-project/node_modules/tmp/lib/tmp.js new file mode 100644 index 00000000..bb83c7ec --- /dev/null +++ b/test-eol-project/node_modules/tmp/lib/tmp.js @@ -0,0 +1,463 @@ +/*! + * Tmp + * + * Copyright (c) 2011-2015 KARASZI Istvan + * + * MIT Licensed + */ + +/** + * Module dependencies. + */ +var + fs = require('fs'), + path = require('path'), + crypto = require('crypto'), + tmpDir = require('os-tmpdir'), + _c = process.binding('constants'); + + +/** + * The working inner variables. + */ +var + // store the actual TMP directory + _TMP = tmpDir(), + + // the random characters to choose from + RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', + + TEMPLATE_PATTERN = /XXXXXX/, + + DEFAULT_TRIES = 3, + + CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), + + DIR_MODE = 448 /* 0700 */, + FILE_MODE = 384 /* 0600 */, + + // this will hold the objects need to be removed on exit + _removeObjects = [], + + _gracefulCleanup = false, + _uncaughtException = false; + +/** + * Random name generator based on crypto. + * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript + * + * @param {Number} howMany + * @return {String} + * @api private + */ +function _randomChars(howMany) { + var + value = [], + rnd = null; + + // make sure that we do not fail because we ran out of entropy + try { + rnd = crypto.randomBytes(howMany); + } catch (e) { + rnd = crypto.pseudoRandomBytes(howMany); + } + + for (var i = 0; i < howMany; i++) { + value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); + } + + return value.join(''); +} + +/** + * Checks whether the `obj` parameter is defined or not. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ +function _isUndefined(obj) { + return typeof obj === 'undefined'; +} + +/** + * Parses the function arguments. + * + * This function helps to have optional arguments. + * + * @param {Object} options + * @param {Function} callback + * @api private + */ +function _parseArguments(options, callback) { + if (typeof options == 'function') { + var + tmp = options, + options = callback || {}, + callback = tmp; + } else if (typeof options == 'undefined') { + options = {}; + } + + return [options, callback]; +} + +/** + * Generates a new temporary name. + * + * @param {Object} opts + * @returns {String} + * @api private + */ +function _generateTmpName(opts) { + if (opts.name) { + return path.join(opts.dir || _TMP, opts.name); + } + + // mkstemps like template + if (opts.template) { + return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6)); + } + + // prefix and postfix + var name = [ + opts.prefix || 'tmp-', + process.pid, + _randomChars(12), + opts.postfix || '' + ].join(''); + + return path.join(opts.dir || _TMP, name); +} + +/** + * Gets a temporary file name. + * + * @param {Object} options + * @param {Function} callback + * @api private + */ +function _getTmpName(options, callback) { + var + args = _parseArguments(options, callback), + opts = args[0], + cb = args[1], + tries = opts.tries || DEFAULT_TRIES; + + if (isNaN(tries) || tries < 0) + return cb(new Error('Invalid tries')); + + if (opts.template && !opts.template.match(TEMPLATE_PATTERN)) + return cb(new Error('Invalid template provided')); + + (function _getUniqueName() { + var name = _generateTmpName(opts); + + // check whether the path exists then retry if needed + fs.stat(name, function (err) { + if (!err) { + if (tries-- > 0) return _getUniqueName(); + + return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name)); + } + + cb(null, name); + }); + }()); +} + +/** + * Synchronous version of _getTmpName. + * + * @param {Object} options + * @returns {String} + * @api private + */ +function _getTmpNameSync(options) { + var + args = _parseArguments(options), + opts = args[0], + tries = opts.tries || DEFAULT_TRIES; + + if (isNaN(tries) || tries < 0) + throw new Error('Invalid tries'); + + if (opts.template && !opts.template.match(TEMPLATE_PATTERN)) + throw new Error('Invalid template provided'); + + do { + var name = _generateTmpName(opts); + try { + fs.statSync(name); + } catch (e) { + return name; + } + } while (tries-- > 0); + + throw new Error('Could not get a unique tmp filename, max tries reached'); +} + +/** + * Creates and opens a temporary file. + * + * @param {Object} options + * @param {Function} callback + * @api public + */ +function _createTmpFile(options, callback) { + var + args = _parseArguments(options, callback), + opts = args[0], + cb = args[1]; + + opts.postfix = (_isUndefined(opts.postfix)) ? '.tmp' : opts.postfix; + + // gets a temporary filename + _getTmpName(opts, function _tmpNameCreated(err, name) { + if (err) return cb(err); + + // create and open the file + fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) { + if (err) return cb(err); + + cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts)); + }); + }); +} + +/** + * Synchronous version of _createTmpFile. + * + * @param {Object} options + * @returns {Object} object consists of name, fd and removeCallback + * @api private + */ +function _createTmpFileSync(options) { + var + args = _parseArguments(options), + opts = args[0]; + + opts.postfix = opts.postfix || '.tmp'; + + var name = _getTmpNameSync(opts); + var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + + return { + name : name, + fd : fd, + removeCallback : _prepareTmpFileRemoveCallback(name, fd, opts) + }; +} + +/** + * Removes files and folders in a directory recursively. + * + * @param {String} root + * @api private + */ +function _rmdirRecursiveSync(root) { + var dirs = [root]; + + do { + var + dir = dirs.pop(), + deferred = false, + files = fs.readdirSync(dir); + + for (var i = 0, length = files.length; i < length; i++) { + var + file = path.join(dir, files[i]), + stat = fs.lstatSync(file); // lstat so we don't recurse into symlinked directories + + if (stat.isDirectory()) { + if (!deferred) { + deferred = true; + dirs.push(dir); + } + dirs.push(file); + } else { + fs.unlinkSync(file); + } + } + + if (!deferred) { + fs.rmdirSync(dir); + } + } while (dirs.length !== 0); +} + +/** + * Creates a temporary directory. + * + * @param {Object} options + * @param {Function} callback + * @api public + */ +function _createTmpDir(options, callback) { + var + args = _parseArguments(options, callback), + opts = args[0], + cb = args[1]; + + // gets a temporary filename + _getTmpName(opts, function _tmpNameCreated(err, name) { + if (err) return cb(err); + + // create the directory + fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) { + if (err) return cb(err); + + cb(null, name, _prepareTmpDirRemoveCallback(name, opts)); + }); + }); +} + +/** + * Synchronous version of _createTmpDir. + * + * @param {Object} options + * @returns {Object} object consists of name and removeCallback + * @api private + */ +function _createTmpDirSync(options) { + var + args = _parseArguments(options), + opts = args[0]; + + var name = _getTmpNameSync(opts); + fs.mkdirSync(name, opts.mode || DIR_MODE); + + return { + name : name, + removeCallback : _prepareTmpDirRemoveCallback(name, opts) + }; +} + +/** + * Prepares the callback for removal of the temporary file. + * + * @param {String} name + * @param {int} fd + * @param {Object} opts + * @api private + * @returns {Function} the callback + */ +function _prepareTmpFileRemoveCallback(name, fd, opts) { + var removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) { + try { + fs.closeSync(fdPath[0]); + } + catch (e) { + // under some node/windows related circumstances, a temporary file + // may have not be created as expected or the file was already closed + // by the user, in which case we will simply ignore the error + if (e.errno != -(_c.EBADF || _c.os.errno.EBADF) && e.errno != -(_c.ENOENT || _c.os.errno.ENOENT)) { + // reraise any unanticipated error + throw e; + } + } + fs.unlinkSync(fdPath[1]); + }, [fd, name]); + + if (!opts.keep) { + _removeObjects.unshift(removeCallback); + } + + return removeCallback; +} + +/** + * Prepares the callback for removal of the temporary directory. + * + * @param {String} name + * @param {Object} opts + * @returns {Function} the callback + * @api private + */ +function _prepareTmpDirRemoveCallback(name, opts) { + var removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs.rmdirSync.bind(fs); + var removeCallback = _prepareRemoveCallback(removeFunction, name); + + if (!opts.keep) { + _removeObjects.unshift(removeCallback); + } + + return removeCallback; +} + +/** + * Creates a guarded function wrapping the removeFunction call. + * + * @param {Function} removeFunction + * @param {Object} arg + * @returns {Function} + * @api private + */ +function _prepareRemoveCallback(removeFunction, arg) { + var called = false; + + return function _cleanupCallback() { + if (called) return; + + var index = _removeObjects.indexOf(_cleanupCallback); + if (index >= 0) { + _removeObjects.splice(index, 1); + } + + called = true; + removeFunction(arg); + }; +} + +/** + * The garbage collector. + * + * @api private + */ +function _garbageCollector() { + if (_uncaughtException && !_gracefulCleanup) { + return; + } + + // the function being called removes itself from _removeObjects, + // loop until _removeObjects is empty + while (_removeObjects.length) { + try { + _removeObjects[0].call(null); + } catch (e) { + // already removed? + } + } +} + +function _setGracefulCleanup() { + _gracefulCleanup = true; +} + +var version = process.versions.node.split('.').map(function (value) { + return parseInt(value, 10); +}); + +if (version[0] === 0 && (version[1] < 9 || version[1] === 9 && version[2] < 5)) { + process.addListener('uncaughtException', function _uncaughtExceptionThrown(err) { + _uncaughtException = true; + _garbageCollector(); + + throw err; + }); +} + +process.addListener('exit', function _exit(code) { + if (code) _uncaughtException = true; + _garbageCollector(); +}); + +// exporting all the needed methods +module.exports.tmpdir = _TMP; +module.exports.dir = _createTmpDir; +module.exports.dirSync = _createTmpDirSync; +module.exports.file = _createTmpFile; +module.exports.fileSync = _createTmpFileSync; +module.exports.tmpName = _getTmpName; +module.exports.tmpNameSync = _getTmpNameSync; +module.exports.setGracefulCleanup = _setGracefulCleanup; diff --git a/test-eol-project/node_modules/tmp/package.json b/test-eol-project/node_modules/tmp/package.json new file mode 100644 index 00000000..71f58092 --- /dev/null +++ b/test-eol-project/node_modules/tmp/package.json @@ -0,0 +1,38 @@ +{ + "name": "tmp", + "version": "0.0.30", + "description": "Temporary file and directory creator", + "author": "KARASZI István (http://raszi.hu/)", + + "homepage": "http://github.com/raszi/node-tmp", + "keywords": [ "temporary", "tmp", "temp", "tempdir", "tempfile", "tmpdir", "tmpfile" ], + + "license": "MIT", + + "repository": { + "type": "git", + "url": "git://github.com/raszi/node-tmp.git" + }, + + "bugs": { + "url": "http://github.com/raszi/node-tmp/issues" + }, + + "main": "lib/tmp.js", + + "scripts": { + "test": "vows test/*-test.js" + }, + + "engines": { + "node": ">=0.4.0" + }, + + "dependencies": { + "os-tmpdir": "~1.0.1" + }, + + "devDependencies": { + "vows": "~0.7.0" + } +} diff --git a/test-eol-project/node_modules/tmp/run-tests b/test-eol-project/node_modules/tmp/run-tests new file mode 100755 index 00000000..a377f108 --- /dev/null +++ b/test-eol-project/node_modules/tmp/run-tests @@ -0,0 +1,7 @@ +#!/bin/sh + +DIR="x" + +rm -rf ${DIR} +mkdir ${DIR} +TMPDIR=${DIR} npm test diff --git a/test-eol-project/node_modules/tmp/test/base.js b/test-eol-project/node_modules/tmp/test/base.js new file mode 100644 index 00000000..a77f3a56 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/base.js @@ -0,0 +1,149 @@ +var + assert = require('assert'), + path = require('path'), + exec = require('child_process').exec, + tmp = require('../lib/tmp'); + +// make sure that we do not test spam the global tmp +tmp.TMP_DIR = './tmp'; + + +function _spawnTestWithError(testFile, params, cb) { + _spawnTest(true, testFile, params, cb); +} + +function _spawnTestWithoutError(testFile, params, cb) { + _spawnTest(false, testFile, params, cb); +} + +function _spawnTest(passError, testFile, params, cb) { + var + node_path = process.argv[0], + command = [ node_path, path.join(__dirname, testFile) ].concat(params).join(' '); + + exec(command, function _execDone(err, stdout, stderr) { + if (passError) { + if (err) { + return cb(err); + } else if (stderr.length > 0) { + return cb(stderr.toString()); + } + } + + return cb(null, stdout.toString()); + }); +} + +function _testStat(stat, mode) { + assert.equal(stat.uid, process.getuid(), 'should have the same UID'); + assert.equal(stat.gid, process.getgid(), 'should have the same GUID'); + assert.equal(stat.mode, mode); +} + +function _testPrefix(prefix) { + return function _testPrefixGenerated(err, name) { + assert.equal(path.basename(name).slice(0, prefix.length), prefix, 'should have the provided prefix'); + }; +} + +function _testPrefixSync(prefix) { + return function _testPrefixGeneratedSync(result) { + if (result instanceof Error) { + throw result; + } + _testPrefix(prefix)(null, result.name, result.fd); + }; +} + +function _testPostfix(postfix) { + return function _testPostfixGenerated(err, name) { + assert.equal(name.slice(name.length - postfix.length, name.length), postfix, 'should have the provided postfix'); + }; +} + +function _testPostfixSync(postfix) { + return function _testPostfixGeneratedSync(result) { + if (result instanceof Error) { + throw result; + } + _testPostfix(postfix)(null, result.name, result.fd); + }; +} + +function _testKeep(type, keep, cb) { + _spawnTestWithError('keep.js', [ type, keep ], cb); +} + +function _testKeepSync(type, keep, cb) { + _spawnTestWithError('keep-sync.js', [ type, keep ], cb); +} + +function _testGraceful(type, graceful, cb) { + _spawnTestWithoutError('graceful.js', [ type, graceful ], cb); +} + +function _testGracefulSync(type, graceful, cb) { + _spawnTestWithoutError('graceful-sync.js', [ type, graceful ], cb); +} + +function _assertName(err, name) { + assert.isString(name); + assert.isNotZero(name.length, 'an empty string is not a valid name'); +} + +function _assertNameSync(result) { + if (result instanceof Error) { + throw result; + } + var name = typeof(result) == 'string' ? result : result.name; + _assertName(null, name); +} + +function _testName(expected){ + return function _testNameGenerated(err, name) { + assert.equal(expected, name, 'should have the provided name'); + }; +} + +function _testNameSync(expected){ + return function _testNameGeneratedSync(result) { + if (result instanceof Error) { + throw result; + } + _testName(expected)(null, result.name, result.fd); + }; +} + +function _testUnsafeCleanup(unsafe, cb) { + _spawnTestWithoutError('unsafe.js', [ 'dir', unsafe ], cb); +} + +function _testIssue62(cb) { + _spawnTestWithoutError('issue62.js', [], cb); +} + +function _testUnsafeCleanupSync(unsafe, cb) { + _spawnTestWithoutError('unsafe-sync.js', [ 'dir', unsafe ], cb); +} + +function _testIssue62Sync(cb) { + _spawnTestWithoutError('issue62-sync.js', [], cb); +} + +module.exports.testStat = _testStat; +module.exports.testPrefix = _testPrefix; +module.exports.testPrefixSync = _testPrefixSync; +module.exports.testPostfix = _testPostfix; +module.exports.testPostfixSync = _testPostfixSync; +module.exports.testKeep = _testKeep; +module.exports.testKeepSync = _testKeepSync; +module.exports.testGraceful = _testGraceful; +module.exports.testGracefulSync = _testGracefulSync; +module.exports.assertName = _assertName; +module.exports.assertNameSync = _assertNameSync; +module.exports.testName = _testName; +module.exports.testNameSync = _testNameSync; +module.exports.testUnsafeCleanup = _testUnsafeCleanup; +module.exports.testIssue62 = _testIssue62; +module.exports.testUnsafeCleanupSync = _testUnsafeCleanupSync; +module.exports.testIssue62Sync = _testIssue62Sync; diff --git a/test-eol-project/node_modules/tmp/test/dir-sync-test.js b/test-eol-project/node_modules/tmp/test/dir-sync-test.js new file mode 100644 index 00000000..091a03e5 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/dir-sync-test.js @@ -0,0 +1,230 @@ +var + vows = require('vows'), + assert = require('assert'), + + path = require('path'), + fs = require('fs'), + existsSync = fs.existsSync || path.existsSync, + + tmp = require('../lib/tmp.js'), + Test = require('./base.js'); + + +function _testDir(mode) { + return function _testDirGenerated(result) { + assert.ok(existsSync(result.name), 'should exist'); + + var stat = fs.statSync(result.name); + assert.ok(stat.isDirectory(), 'should be a directory'); + + Test.testStat(stat, mode); + }; +} + +vows.describe('Synchronous directory creation').addBatch({ + 'when using without parameters': { + topic: function () { + return tmp.dirSync(); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a directory': _testDir(040700), + 'should have the default prefix': Test.testPrefixSync('tmp-') + }, + + 'when using with prefix': { + topic: function () { + return tmp.dirSync({ prefix: 'something' }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a directory': _testDir(040700), + 'should have the provided prefix': Test.testPrefixSync('something') + }, + + 'when using with postfix': { + topic: function () { + return tmp.dirSync({ postfix: '.txt' }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a directory': _testDir(040700), + 'should have the provided postfix': Test.testPostfixSync('.txt') + }, + + 'when using template': { + topic: function () { + return tmp.dirSync({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a directory': _testDir(040700), + 'should have the provided prefix': Test.testPrefixSync('clike-'), + 'should have the provided postfix': Test.testPostfixSync('-postfix') + }, + + 'when using name': { + topic: function () { + return tmp.dirSync({ name: 'using-name' }); + }, + + 'should return with a name': Test.assertNameSync, + 'should have the provided name': Test.testNameSync(path.join(tmp.tmpdir, 'using-name')), + 'should be a directory': function (result) { + _testDir(040700)(result); + result.removeCallback(); + assert.ok(!existsSync(result.name), 'Directory should be removed'); + } + }, + + 'when using multiple options': { + topic: function () { + return tmp.dirSync({ prefix: 'foo', postfix: 'bar', mode: 0750 }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a directory': _testDir(040750), + 'should have the provided prefix': Test.testPrefixSync('foo'), + 'should have the provided postfix': Test.testPostfixSync('bar') + }, + + 'when using multiple options and mode': { + topic: function () { + return tmp.dirSync({ prefix: 'complicated', postfix: 'options', mode: 0755 }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a directory': _testDir(040755), + 'should have the provided prefix': Test.testPrefixSync('complicated'), + 'should have the provided postfix': Test.testPostfixSync('options') + }, + + 'no tries': { + topic: function () { + try { + return tmp.dirSync({ tries: -1 }); + } + catch (e) { + return e; + } + }, + + 'should return with an error': function (topic) { + assert.instanceOf(topic, Error); + } + }, + + 'keep testing': { + topic: function () { + Test.testKeepSync('dir', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a dir': function (err, name) { + _testDir(040700)({ name: name }); + fs.rmdirSync(name); + } + }, + + 'unlink testing': { + topic: function () { + Test.testKeepSync('dir', '0', this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + } + }, + + 'non graceful testing': { + topic: function () { + Test.testGracefulSync('dir', '0', this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a dir': function (err, name) { + _testDir(040700)({ name: name }); + fs.rmdirSync(name); + } + }, + + 'graceful testing': { + topic: function () { + Test.testGracefulSync('dir', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + } + }, + + 'unsafeCleanup === true': { + topic: function () { + Test.testUnsafeCleanupSync('1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + }, + 'should remove symlinked dir': function(err, name) { + assert.ok( + !existsSync(name + '/symlinkme-target'), + 'should remove target' + ); + }, + 'should not remove contents of symlink dir': function(err, name) { + assert.ok( + existsSync(__dirname + '/symlinkme/file.js'), + 'should not remove symlinked directory\'s content' + ); + } + }, + + 'unsafeCleanup === true with issue62 structure': { + topic: function () { + Test.testIssue62Sync(this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + } + }, + + 'unsafeCleanup === false': { + topic: function () { + Test.testUnsafeCleanupSync('0', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': function (err, name) { + _testDir(040700)({name:name}); + // make sure that everything gets cleaned up + fs.unlinkSync(path.join(name, 'should-be-removed.file')); + fs.unlinkSync(path.join(name, 'symlinkme-target')); + fs.rmdirSync(name); + } + }, + + 'remove callback': { + topic: function () { + return tmp.dirSync(); + }, + + 'should return with a name': Test.assertNameSync, + 'removeCallback should remove directory': function (result) { + result.removeCallback(); + assert.ok(!existsSync(result.name), 'Directory should be removed'); + } + } +}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/dir-test.js b/test-eol-project/node_modules/tmp/test/dir-test.js new file mode 100644 index 00000000..9f2c282b --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/dir-test.js @@ -0,0 +1,225 @@ +var + vows = require('vows'), + assert = require('assert'), + + path = require('path'), + fs = require('fs'), + existsSync = fs.existsSync || path.existsSync, + + tmp = require('../lib/tmp.js'), + Test = require('./base.js'); + + +function _testDir(mode) { + return function _testDirGenerated(err, name) { + assert.ok(existsSync(name), 'should exist'); + + var stat = fs.statSync(name); + assert.ok(stat.isDirectory(), 'should be a directory'); + + Test.testStat(stat, mode); + }; +} + +vows.describe('Directory creation').addBatch({ + 'when using without parameters': { + topic: function () { + tmp.dir(this.callback); + }, + + 'should be a directory': _testDir(040700), + 'should have the default prefix': Test.testPrefix('tmp-') + }, + + 'when using with prefix': { + topic: function () { + tmp.dir({ prefix: 'something' }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': _testDir(040700), + 'should have the provided prefix': Test.testPrefix('something') + }, + + 'when using with postfix': { + topic: function () { + tmp.dir({ postfix: '.txt' }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': _testDir(040700), + 'should have the provided postfix': Test.testPostfix('.txt') + }, + + 'when using template': { + topic: function () { + tmp.dir({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': _testDir(040700), + 'should have the provided prefix': Test.testPrefix('clike-'), + 'should have the provided postfix': Test.testPostfix('-postfix') + }, + + 'when using name': { + topic: function () { + tmp.dir({ name: 'using-name' }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': _testDir(040700), + 'should have the provided name': Test.testName(path.join(tmp.tmpdir, 'using-name')) + }, + + 'when using multiple options': { + topic: function () { + tmp.dir({ prefix: 'foo', postfix: 'bar', mode: 0750 }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': _testDir(040750), + 'should have the provided prefix': Test.testPrefix('foo'), + 'should have the provided postfix': Test.testPostfix('bar') + }, + + 'when using multiple options and mode': { + topic: function () { + tmp.dir({ prefix: 'complicated', postfix: 'options', mode: 0755 }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': _testDir(040755), + 'should have the provided prefix': Test.testPrefix('complicated'), + 'should have the provided postfix': Test.testPostfix('options') + }, + + 'no tries': { + topic: function () { + tmp.dir({ tries: -1 }, this.callback); + }, + + 'should return with an error': assert.isObject + }, + + 'keep testing': { + topic: function () { + Test.testKeep('dir', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a dir': function (err, name) { + _testDir(040700)(err, name); + fs.rmdirSync(name); + } + }, + + 'unlink testing': { + topic: function () { + Test.testKeep('dir', '0', this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + } + }, + + 'non graceful testing': { + topic: function () { + Test.testGraceful('dir', '0', this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a dir': function (err, name) { + _testDir(040700)(err, name); + fs.rmdirSync(name); + } + }, + + 'graceful testing': { + topic: function () { + Test.testGraceful('dir', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + } + }, + + 'unsafeCleanup === true': { + topic: function () { + Test.testUnsafeCleanup('1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + }, + 'should remove symlinked dir': function(err, name) { + assert.ok( + !existsSync(name + '/symlinkme-target'), + 'should remove target' + ); + }, + 'should not remove contents of symlink dir': function(err, name) { + assert.ok( + existsSync(__dirname + '/symlinkme/file.js'), + 'should not remove symlinked directory\'s content' + ); + } + }, + + 'unsafeCleanup === true with issue62 structure': { + topic: function () { + Test.testIssue62(this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'Directory should be removed'); + } + }, + + 'unsafeCleanup === false': { + topic: function () { + Test.testUnsafeCleanup('0', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a directory': function (err, name) { + _testDir(040700)(err, name); + // make sure that everything gets cleaned up + fs.unlinkSync(path.join(name, 'should-be-removed.file')); + fs.unlinkSync(path.join(name, 'symlinkme-target')); + fs.rmdirSync(name); + } + }, + + 'remove callback': { + topic: function () { + tmp.dir(this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'removeCallback should remove directory': function (_err, name, removeCallback) { + removeCallback(); + assert.ok(!existsSync(name), 'Directory should be removed'); + } + } +}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/file-sync-test.js b/test-eol-project/node_modules/tmp/test/file-sync-test.js new file mode 100644 index 00000000..44c1d22f --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/file-sync-test.js @@ -0,0 +1,190 @@ +var + vows = require('vows'), + assert = require('assert'), + + path = require('path'), + fs = require('fs'), + existsSync = fs.existsSync || path.existsSync, + + tmp = require('../lib/tmp.js'), + Test = require('./base.js'); + + +function _testFile(mode, fdTest) { + return function _testFileGenerated(result) { + assert.ok(existsSync(result.name), 'should exist'); + + var stat = fs.statSync(result.name); + assert.equal(stat.size, 0, 'should have zero size'); + assert.ok(stat.isFile(), 'should be a file'); + + Test.testStat(stat, mode); + + // check with fstat as well (fd checking) + if (fdTest) { + var fstat = fs.fstatSync(result.fd); + assert.deepEqual(fstat, stat, 'fstat results should be the same'); + + var data = new Buffer('something'); + assert.equal(fs.writeSync(result.fd, data, 0, data.length, 0), data.length, 'should be writable'); + assert.ok(!fs.closeSync(result.fd), 'should not return with error'); + } + }; +} + +vows.describe('Synchronous file creation').addBatch({ + 'when using without parameters': { + topic: function () { + return tmp.fileSync(); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a file': _testFile(0100600, true), + 'should have the default prefix': Test.testPrefixSync('tmp-'), + 'should have the default postfix': Test.testPostfixSync('.tmp') + }, + + 'when using with prefix': { + topic: function () { + return tmp.fileSync({ prefix: 'something' }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a file': _testFile(0100600, true), + 'should have the provided prefix': Test.testPrefixSync('something') + }, + + 'when using with postfix': { + topic: function () { + return tmp.fileSync({ postfix: '.txt' }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a file': _testFile(0100600, true), + 'should have the provided postfix': Test.testPostfixSync('.txt') + }, + + 'when using template': { + topic: function () { + return tmp.fileSync({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a file': _testFile(0100600, true), + 'should have the provided prefix': Test.testPrefixSync('clike-'), + 'should have the provided postfix': Test.testPostfixSync('-postfix') + }, + + 'when using name': { + topic: function () { + return tmp.fileSync({ name: 'using-name.tmp' }); + }, + + 'should return with a name': Test.assertNameSync, + 'should have the provided name': Test.testNameSync(path.join(tmp.tmpdir, 'using-name.tmp')), + 'should be a file': function (result) { + _testFile(0100600, true); + fs.unlinkSync(result.name); + } + }, + + 'when using multiple options': { + topic: function () { + return tmp.fileSync({ prefix: 'foo', postfix: 'bar', mode: 0640 }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a file': _testFile(0100640, true), + 'should have the provided prefix': Test.testPrefixSync('foo'), + 'should have the provided postfix': Test.testPostfixSync('bar') + }, + + 'when using multiple options and mode': { + topic: function () { + return tmp.fileSync({ prefix: 'complicated', postfix: 'options', mode: 0644 }); + }, + + 'should return with a name': Test.assertNameSync, + 'should be a file': _testFile(0100644, true), + 'should have the provided prefix': Test.testPrefixSync('complicated'), + 'should have the provided postfix': Test.testPostfixSync('options') + }, + + 'no tries': { + topic: function () { + try { + return tmp.fileSync({ tries: -1 }); + } + catch (e) { + return e; + } + }, + + 'should return with an error': function (topic) { + assert.instanceOf(topic, Error); + } + }, + + 'keep testing': { + topic: function () { + Test.testKeepSync('file', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': function (err, name) { + _testFile(0100600, false)({name:name}); + fs.unlinkSync(name); + } + }, + + 'unlink testing': { + topic: function () { + Test.testKeepSync('file', '0', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'File should be removed'); + } + }, + + 'non graceful testing': { + topic: function () { + Test.testGracefulSync('file', '0', this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': function (err, name) { + _testFile(0100600, false)({name:name}); + fs.unlinkSync(name); + } + }, + + 'graceful testing': { + topic: function () { + Test.testGracefulSync('file', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'File should be removed'); + } + }, + + 'remove callback': { + topic: function () { + return tmp.fileSync(); + }, + + 'should return with a name': Test.assertNameSync, + 'removeCallback should remove file': function (result) { + result.removeCallback(); + assert.ok(!existsSync(result.name), 'File should be removed'); + } + } + +}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/file-test.js b/test-eol-project/node_modules/tmp/test/file-test.js new file mode 100644 index 00000000..b710859c --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/file-test.js @@ -0,0 +1,191 @@ +var + vows = require('vows'), + assert = require('assert'), + + path = require('path'), + fs = require('fs'), + existsSync = fs.existsSync || path.existsSync, + + tmp = require('../lib/tmp.js'), + Test = require('./base.js'); + + +function _testFile(mode, fdTest) { + return function _testFileGenerated(err, name, fd) { + assert.ok(existsSync(name), 'should exist'); + + var stat = fs.statSync(name); + assert.equal(stat.size, 0, 'should have zero size'); + assert.ok(stat.isFile(), 'should be a file'); + + Test.testStat(stat, mode); + + // check with fstat as well (fd checking) + if (fdTest) { + var fstat = fs.fstatSync(fd); + assert.deepEqual(fstat, stat, 'fstat results should be the same'); + + var data = new Buffer('something'); + assert.equal(fs.writeSync(fd, data, 0, data.length, 0), data.length, 'should be writable'); + assert.ok(!fs.closeSync(fd), 'should not return with error'); + } + }; +} + +vows.describe('File creation').addBatch({ + 'when using without parameters': { + topic: function () { + tmp.file(this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': _testFile(0100600, true), + 'should have the default prefix': Test.testPrefix('tmp-'), + 'should have the default postfix': Test.testPostfix('.tmp') + }, + + 'when using with prefix': { + topic: function () { + tmp.file({ prefix: 'something' }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': _testFile(0100600, true), + 'should have the provided prefix': Test.testPrefix('something') + }, + + 'when using with postfix': { + topic: function () { + tmp.file({ postfix: '.txt' }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': _testFile(0100600, true), + 'should have the provided postfix': Test.testPostfix('.txt') + }, + + 'when using template': { + topic: function () { + tmp.file({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': _testFile(0100600, true), + 'should have the provided prefix': Test.testPrefix('clike-'), + 'should have the provided postfix': Test.testPostfix('-postfix') + }, + + 'when using name': { + topic: function () { + tmp.file({ name: 'using-name.tmp' }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should have the provided name': Test.testName(path.join(tmp.tmpdir, 'using-name.tmp')), + 'should be a file': function (err, name) { + _testFile(0100600, true); + fs.unlinkSync(name); + } + }, + + 'when using multiple options': { + topic: function () { + tmp.file({ prefix: 'foo', postfix: 'bar', mode: 0640 }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': _testFile(0100640, true), + 'should have the provided prefix': Test.testPrefix('foo'), + 'should have the provided postfix': Test.testPostfix('bar') + }, + + 'when using multiple options and mode': { + topic: function () { + tmp.file({ prefix: 'complicated', postfix: 'options', mode: 0644 }, this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': _testFile(0100644, true), + 'should have the provided prefix': Test.testPrefix('complicated'), + 'should have the provided postfix': Test.testPostfix('options') + }, + + 'no tries': { + topic: function () { + tmp.file({ tries: -1 }, this.callback); + }, + + 'should not be created': assert.isObject + }, + + 'keep testing': { + topic: function () { + Test.testKeep('file', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': function (err, name) { + _testFile(0100600, false)(err, name, null); + fs.unlinkSync(name); + } + }, + + 'unlink testing': { + topic: function () { + Test.testKeep('file', '0', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'File should be removed'); + } + }, + + 'non graceful testing': { + topic: function () { + Test.testGraceful('file', '0', this.callback); + }, + + 'should not return with error': assert.isNull, + 'should return with a name': Test.assertName, + 'should be a file': function (err, name) { + _testFile(0100600, false)(err, name, null); + fs.unlinkSync(name); + } + }, + + 'graceful testing': { + topic: function () { + Test.testGraceful('file', '1', this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'should not exist': function (err, name) { + assert.ok(!existsSync(name), 'File should be removed'); + } + }, + + 'remove callback': { + topic: function () { + tmp.file(this.callback); + }, + + 'should not return with an error': assert.isNull, + 'should return with a name': Test.assertName, + 'removeCallback should remove file': function (_err, name, _fd, removeCallback) { + removeCallback(); + assert.ok(!existsSync(name), 'File should be removed'); + } + } + +}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/graceful-sync.js b/test-eol-project/node_modules/tmp/test/graceful-sync.js new file mode 100644 index 00000000..37766ffa --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/graceful-sync.js @@ -0,0 +1,20 @@ +var + tmp = require('../lib/tmp'), + spawn = require('./spawn-sync'); + +var graceful = spawn.arg; + +if (graceful) { + tmp.setGracefulCleanup(); +} + +try { + var result = spawn.tmpFunction(); + spawn.out(result.name, function () { + throw new Error('Thrown on purpose'); + }); +} +catch (e) { + spawn.err(e, spawn.exit); +} + diff --git a/test-eol-project/node_modules/tmp/test/graceful.js b/test-eol-project/node_modules/tmp/test/graceful.js new file mode 100644 index 00000000..dbe554e1 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/graceful.js @@ -0,0 +1,15 @@ +var + tmp = require('../lib/tmp'), + spawn = require('./spawn'); + +var graceful = spawn.arg; + +if (graceful) { + tmp.setGracefulCleanup(); +} + +spawn.tmpFunction(function (err, name) { + spawn.out(name, function () { + throw new Error('Thrown on purpose'); + }); +}); diff --git a/test-eol-project/node_modules/tmp/test/issue62-sync.js b/test-eol-project/node_modules/tmp/test/issue62-sync.js new file mode 100644 index 00000000..94840c66 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/issue62-sync.js @@ -0,0 +1,27 @@ + +var + fs = require('fs'), + join = require('path').join, + spawn = require('./spawn-sync'); + +try { + var result = spawn.tmpFunction({ unsafeCleanup: true }); + try { + // creates structure from issue 62 + // https://github.com/raszi/node-tmp/issues/62 + + fs.mkdirSync(join(result.name, 'issue62')); + + ['foo', 'bar'].forEach(function(subdir) { + fs.mkdirSync(join(result.name, 'issue62', subdir)); + fs.writeFileSync(join(result.name, 'issue62', subdir, 'baz.txt'), ''); + }); + + spawn.out(result.name, spawn.exit); + } catch (e) { + spawn.err(e.toString(), spawn.exit); + } +} +catch (e) { + spawn.err(e, spawn.exit); +} diff --git a/test-eol-project/node_modules/tmp/test/issue62.js b/test-eol-project/node_modules/tmp/test/issue62.js new file mode 100644 index 00000000..004e1907 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/issue62.js @@ -0,0 +1,27 @@ +var + fs = require('fs'), + join = require('path').join, + spawn = require('./spawn'); + +spawn.tmpFunction({ unsafeCleanup: true }, function (err, name) { + if (err) { + spawn.err(err, spawn.exit); + return; + } + + try { + // creates structure from issue 62 + // https://github.com/raszi/node-tmp/issues/62 + + fs.mkdirSync(join(name, 'issue62')); + + ['foo', 'bar'].forEach(function(subdir) { + fs.mkdirSync(join(name, 'issue62', subdir)); + fs.writeFileSync(join(name, 'issue62', subdir, 'baz.txt'), ''); + }); + + spawn.out(name, spawn.exit); + } catch (e) { + spawn.err(e.toString(), spawn.exit); + } +}); diff --git a/test-eol-project/node_modules/tmp/test/keep-sync.js b/test-eol-project/node_modules/tmp/test/keep-sync.js new file mode 100644 index 00000000..6cd8b186 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/keep-sync.js @@ -0,0 +1,12 @@ +var spawn = require('./spawn-sync'); + +var keep = spawn.arg; + +try { + var result = spawn.tmpFunction({ keep: keep }); + spawn.out(result.name, spawn.exit); +} +catch (e) { + spawn.err(err, spawn.exit); +} + diff --git a/test-eol-project/node_modules/tmp/test/keep.js b/test-eol-project/node_modules/tmp/test/keep.js new file mode 100644 index 00000000..9538605d --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/keep.js @@ -0,0 +1,11 @@ +var spawn = require('./spawn'); + +var keep = spawn.arg; + +spawn.tmpFunction({ keep: keep }, function (err, name) { + if (err) { + spawn.err(err, spawn.exit); + } else { + spawn.out(name, spawn.exit); + } +}); diff --git a/test-eol-project/node_modules/tmp/test/name-test.js b/test-eol-project/node_modules/tmp/test/name-test.js new file mode 100644 index 00000000..a242c21b --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/name-test.js @@ -0,0 +1,82 @@ +var + vows = require('vows'), + assert = require('assert'), + + path = require('path'), + + tmp = require('../lib/tmp.js'), + Test = require('./base.js'); + +vows.describe('Name creation').addBatch({ + 'when using without parameters': { + topic: function () { + tmp.tmpName(this.callback); + }, + + 'should not return with error': assert.isNull, + 'should have the default prefix': Test.testPrefix('tmp-') + }, + + 'when using with prefix': { + topic: function () { + tmp.tmpName({ prefix: 'something' }, this.callback); + }, + + 'should not return with error': assert.isNull, + 'should have the provided prefix': Test.testPrefix('something') + }, + + 'when using with postfix': { + topic: function () { + tmp.tmpName({ postfix: '.txt' }, this.callback); + }, + + 'should not return with error': assert.isNull, + 'should have the provided postfix': Test.testPostfix('.txt') + + }, + + 'when using template': { + topic: function () { + tmp.tmpName({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); + }, + + 'should not return with error': assert.isNull, + 'should have the provided prefix': Test.testPrefix('clike-'), + 'should have the provided postfix': Test.testPostfix('-postfix'), + 'should have template filled': function (err, name) { + assert.isTrue(/[a-zA-Z0-9]{6}/.test(name)); + } + }, + + 'when using multiple options': { + topic: function () { + tmp.tmpName({ prefix: 'foo', postfix: 'bar', tries: 5 }, this.callback); + }, + + 'should not return with error': assert.isNull, + 'should have the provided prefix': Test.testPrefix('foo'), + 'should have the provided postfix': Test.testPostfix('bar') + }, + + 'no tries': { + topic: function () { + tmp.tmpName({ tries: -1 }, this.callback); + }, + + 'should fail': function (err, name) { + assert.isObject(err); + } + }, + + 'tries not numeric': { + topic: function () { + tmp.tmpName({ tries: 'hello'}, this.callback); + }, + + 'should fail': function (err, name) { + assert.isObject(err); + } + } + +}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/spawn-sync.js b/test-eol-project/node_modules/tmp/test/spawn-sync.js new file mode 100644 index 00000000..bde2db46 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/spawn-sync.js @@ -0,0 +1,32 @@ +var + fs = require('fs'), + tmp = require('../lib/tmp'); + +function _writeSync(stream, str, cb) { + var flushed = stream.write(str); + if (flushed) { + return cb(null); + } + + stream.once('drain', function _flushed() { + cb(null); + }); +} + +module.exports.out = function (str, cb) { + _writeSync(process.stdout, str, cb); +}; + +module.exports.err = function (str, cb) { + _writeSync(process.stderr, str, cb); +}; + +module.exports.exit = function () { + process.exit(0); +}; + +var type = process.argv[2]; +module.exports.tmpFunction = (type == 'file') ? tmp.fileSync : tmp.dirSync; + +var arg = (process.argv[3] && parseInt(process.argv[3], 10) === 1) ? true : false; +module.exports.arg = arg; diff --git a/test-eol-project/node_modules/tmp/test/spawn.js b/test-eol-project/node_modules/tmp/test/spawn.js new file mode 100644 index 00000000..6468eb39 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/spawn.js @@ -0,0 +1,32 @@ +var + fs = require('fs'), + tmp = require('../lib/tmp'); + +function _writeSync(stream, str, cb) { + var flushed = stream.write(str); + if (flushed) { + return cb(null); + } + + stream.once('drain', function _flushed() { + cb(null); + }); +} + +module.exports.out = function (str, cb) { + _writeSync(process.stdout, str, cb); +}; + +module.exports.err = function (str, cb) { + _writeSync(process.stderr, str, cb); +}; + +module.exports.exit = function () { + process.exit(0); +}; + +var type = process.argv[2]; +module.exports.tmpFunction = (type == 'file') ? tmp.file : tmp.dir; + +var arg = (process.argv[3] && parseInt(process.argv[3], 10) === 1) ? true : false; +module.exports.arg = arg; diff --git a/test-eol-project/node_modules/tmp/test/symlinkme/file.js b/test-eol-project/node_modules/tmp/test/symlinkme/file.js new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/tmp/test/unsafe-sync.js b/test-eol-project/node_modules/tmp/test/unsafe-sync.js new file mode 100644 index 00000000..97717d05 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/unsafe-sync.js @@ -0,0 +1,30 @@ +var + fs = require('fs'), + join = require('path').join, + spawn = require('./spawn-sync'); + +var unsafe = spawn.arg; + +try { + var result = spawn.tmpFunction({ unsafeCleanup: unsafe }); + try { + // file that should be removed + var fd = fs.openSync(join(result.name, 'should-be-removed.file'), 'w'); + fs.closeSync(fd); + + // in tree source + var symlinkSource = join(__dirname, 'symlinkme'); + // testing target + var symlinkTarget = join(result.name, 'symlinkme-target'); + + // symlink that should be removed but the contents should be preserved. + fs.symlinkSync(symlinkSource, symlinkTarget, 'dir'); + + spawn.out(result.name, spawn.exit); + } catch (e) { + spawn.err(e.toString(), spawn.exit); + } +} +catch (e) { + spawn.err(err, spawn.exit); +} diff --git a/test-eol-project/node_modules/tmp/test/unsafe.js b/test-eol-project/node_modules/tmp/test/unsafe.js new file mode 100644 index 00000000..73e4fb34 --- /dev/null +++ b/test-eol-project/node_modules/tmp/test/unsafe.js @@ -0,0 +1,30 @@ +var + fs = require('fs'), + join = require('path').join, + spawn = require('./spawn'); + +var unsafe = spawn.arg; +spawn.tmpFunction({ unsafeCleanup: unsafe }, function (err, name) { + if (err) { + spawn.err(err, spawn.exit); + return; + } + + try { + // file that should be removed + var fd = fs.openSync(join(name, 'should-be-removed.file'), 'w'); + fs.closeSync(fd); + + // in tree source + var symlinkSource = join(__dirname, 'symlinkme'); + // testing target + var symlinkTarget = join(name, 'symlinkme-target'); + + // symlink that should be removed but the contents should be preserved. + fs.symlinkSync(symlinkSource, symlinkTarget, 'dir'); + + spawn.out(name, spawn.exit); + } catch (e) { + spawn.err(e.toString(), spawn.exit); + } +}); diff --git a/test-eol-project/node_modules/tough-cookie/LICENSE b/test-eol-project/node_modules/tough-cookie/LICENSE new file mode 100644 index 00000000..22204e87 --- /dev/null +++ b/test-eol-project/node_modules/tough-cookie/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2015, Salesforce.com, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of Salesforce.com 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 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/test-eol-project/node_modules/tough-cookie/README.md b/test-eol-project/node_modules/tough-cookie/README.md new file mode 100644 index 00000000..656a2555 --- /dev/null +++ b/test-eol-project/node_modules/tough-cookie/README.md @@ -0,0 +1,527 @@ +[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js + +[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/) + +[![Build Status](https://travis-ci.org/salesforce/tough-cookie.png?branch=master)](https://travis-ci.org/salesforce/tough-cookie) + +# Synopsis + +``` javascript +var tough = require('tough-cookie'); +var Cookie = tough.Cookie; +var cookie = Cookie.parse(header); +cookie.value = 'somethingdifferent'; +header = cookie.toString(); + +var cookiejar = new tough.CookieJar(); +cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); +// ... +cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { + res.headers['cookie'] = cookies.join('; '); +}); +``` + +# Installation + +It's _so_ easy! + +`npm install tough-cookie` + +Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. + +## Version Support + +Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module. + +# API + +## tough + +Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". + +**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary. + +### `parseDate(string)` + +Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. + +### `formatDate(date)` + +Format a Date into a RFC1123 string (the RFC6265-recommended format). + +### `canonicalDomain(str)` + +Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). + +### `domainMatch(str,domStr[,canonicalize=true])` + +Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". + +The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not. + +### `defaultPath(path)` + +Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. + +The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. + +### `pathMatch(reqPath,cookiePath)` + +Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. + +This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. + +### `parse(cookieString[, options])` + +alias for `Cookie.parse(cookieString[, options])` + +### `fromJSON(string)` + +alias for `Cookie.fromJSON(string)` + +### `getPublicSuffix(hostname)` + +Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. + +For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. + +For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain). + +### `cookieCompare(a,b)` + +For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence: + +* Longest `.path` +* oldest `.creation` (which has a 1ms precision, same as `Date`) +* lowest `.creationIndex` (to get beyond the 1ms precision) + +``` javascript +var cookies = [ /* unsorted array of Cookie objects */ ]; +cookies = cookies.sort(cookieCompare); +``` + +**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`. + +### `permuteDomain(domain)` + +Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. + +### `permutePath(path)` + +Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. + + +## Cookie + +Exported via `tough.Cookie`. + +### `Cookie.parse(cookieString[, options])` + +Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. + +The options parameter is not required and currently has only one property: + + * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant. + +If options is not an object, it is ignored, which means you can use `Array#map` with it. + +Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: + +``` javascript +if (res.headers['set-cookie'] instanceof Array) + cookies = res.headers['set-cookie'].map(Cookie.parse); +else + cookies = [Cookie.parse(res.headers['set-cookie'])]; +``` + +_Note:_ in version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation has since been removed. +See [Issue 92](https://github.com/salesforce/tough-cookie/issues/92) + +### Properties + +Cookie object properties: + + * _key_ - string - the name or key of the cookie (default "") + * _value_ - string - the value of the cookie (default "") + * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` + * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` + * _domain_ - string - the `Domain=` attribute of the cookie + * _path_ - string - the `Path=` of the cookie + * _secure_ - boolean - the `Secure` cookie flag + * _httpOnly_ - boolean - the `HttpOnly` cookie flag + * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) + * _creation_ - `Date` - when this cookie was constructed + * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation) + +After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: + + * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) + * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. + * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar + * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. + +### `Cookie([{properties}])` + +Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties. + +### `.toString()` + +encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. + +### `.cookieString()` + +encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). + +### `.setExpires(String)` + +sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. + +### `.setMaxAge(number)` + +sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. + +### `.expiryTime([now=Date.now()])` + +### `.expiryDate([now=Date.now()])` + +expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. + +Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute. + +If Expires (`.expires`) is set, that's returned. + +Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). + +### `.TTL([now=Date.now()])` + +compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. + +The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. + +### `.canonicalizedDomain()` + +### `.cdomain()` + +return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. + +### `.toJSON()` + +For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized. + +Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`). + +**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. + +### `Cookie.fromJSON(strOrObj)` + +Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first. + +Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer. + +Returns `null` upon JSON parsing error. + +### `.clone()` + +Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`. + +### `.validate()` + +Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. + +validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: + +``` javascript +if (cookie.validate() === true) { + // it's tasty +} else { + // yuck! +} +``` + + +## CookieJar + +Exported via `tough.CookieJar`. + +### `CookieJar([store],[options])` + +Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. + +The `options` object can be omitted and can have the following properties: + + * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk" + * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name. + This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers. + +Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. + +### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))` + +Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option. + +As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). + +### `.setCookieSync(cookieOrString, currentUrl, [{options}])` + +Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getCookies(currentUrl, [{options},] cb(err,cookies))` + +Retrieve the list of cookies that can be sent in a Cookie header for the current url. + +If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). + * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it). + +The `.lastAccessed` property of the returned cookies will have been updated. + +### `.getCookiesSync(currentUrl, [{options}])` + +Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getCookieString(...)` + +Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. + +### `.getCookieStringSync(...)` + +Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.getSetCookieStrings(...)` + +Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`. + +### `.getSetCookieStringsSync(...)` + +Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). + +### `.serialize(cb(err,serializedObject))` + +Serialize the Jar if the underlying store supports `.getAllCookies`. + +**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. + +See [Serialization Format]. + +### `.serializeSync()` + +Sync version of .serialize + +### `.toJSON()` + +Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`. + +### `CookieJar.deserialize(serialized, [store], cb(err,object))` + +A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. + +The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. + +As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback. + +### `CookieJar.deserializeSync(serialized, [store])` + +Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work. + +### `CookieJar.fromJSON(string)` + +Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`. + +### `.clone([store,]cb(err,newJar))` + +Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa. + +The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`. + +### `.cloneSync([store])` + +Synchronous version of `.clone`, returning a new `CookieJar` instance. + +The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used. + +The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls. + +### `.removeAllCookies(cb(err))` + +Removes all cookies from the jar. + +This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned. + +### `.removeAllCookiesSync()` + +Sync version of `.removeAllCookies()` + +## Store + +Base class for CookieJar stores. Available as `tough.Store`. + +## Store API + +The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. + +Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. + +Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style + +All `domain` parameters will have been normalized before calling. + +The Cookie store must have all of the following methods. + +### `store.findCookie(domain, path, key, cb(err,cookie))` + +Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. + +Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). + +### `store.findCookies(domain, path, cb(err,cookies))` + +Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. + +If no cookies are found, the callback MUST be passed an empty array. + +The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. + +As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). + +### `store.putCookie(cookie, cb(err))` + +Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. + +The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. + +Pass an error if the cookie cannot be stored. + +### `store.updateCookie(oldCookie, newCookie, cb(err))` + +Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. + +The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement). + +Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. + +The `newCookie` and `oldCookie` objects MUST NOT be modified. + +Pass an error if the newCookie cannot be stored. + +### `store.removeCookie(domain, path, key, cb(err))` + +Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). + +The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. + +### `store.removeCookies(domain, path, cb(err))` + +Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed. + +Pass an error ONLY if removing any existing cookies failed. + +### `store.removeAllCookies(cb(err))` + +_Optional_. Removes all cookies from the store. + +Pass an error if one or more cookies can't be removed. + +**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this. + +### `store.getAllCookies(cb(err, cookies))` + +_Optional_. Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure. + +Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail. + +Pass an error if retrieval fails. + +**Note**: not all Stores can implement this due to technical limitations, so it is optional. + +## MemoryCookieStore + +Inherits from `Store`. + +A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`. + +## Community Cookie Stores + +These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look: + +- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases +- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk +- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis +- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk +- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage + + +# Serialization Format + +**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. + +```js + { + // The version of tough-cookie that serialized this jar. + version: 'tough-cookie@1.x.y', + + // add the store type, to make humans happy: + storeType: 'MemoryCookieStore', + + // CookieJar configuration: + rejectPublicSuffixes: true, + // ... future items go here + + // Gets filled from jar.store.getAllCookies(): + cookies: [ + { + key: 'string', + value: 'string', + // ... + /* other Cookie.serializableProperties go here */ + } + ] + } +``` + +# Copyright and License + +BSD-3-Clause: + +```text + Copyright (c) 2015, Salesforce.com, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of Salesforce.com 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 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/test-eol-project/node_modules/tough-cookie/lib/cookie.js b/test-eol-project/node_modules/tough-cookie/lib/cookie.js new file mode 100644 index 00000000..32dc0f8d --- /dev/null +++ b/test-eol-project/node_modules/tough-cookie/lib/cookie.js @@ -0,0 +1,1482 @@ +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com 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 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. + */ +'use strict'; +var net = require('net'); +var urlParse = require('url').parse; +var util = require('util'); +var pubsuffix = require('./pubsuffix-psl'); +var Store = require('./store').Store; +var MemoryCookieStore = require('./memstore').MemoryCookieStore; +var pathMatch = require('./pathMatch').pathMatch; +var VERSION = require('./version'); + +var punycode; +try { + punycode = require('punycode'); +} catch(e) { + console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); +} + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + +var CONTROL_CHARS = /[\x00-\x1F]/; + +// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in +// the "relaxed" mode, see: +// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 +var TERMINATORS = ['\n', '\r', '\0']; + +// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; + +// date-time parsing constants (RFC6265 S5.1.1) + +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, + jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; + +var MAX_TIME = 2147483647000; // 31-bit max +var MIN_TIME = 0; // 31-bit min + +/* + * Parses a Natural number (i.e., non-negative integer) with either the + * *DIGIT ( non-digit *OCTET ) + * or + * *DIGIT + * grammar (RFC6265 S5.1.1). + * + * The "trailingOK" boolean controls if the grammar accepts a + * "( non-digit *OCTET )" trailer. + */ +function parseDigits(token, minDigits, maxDigits, trailingOK) { + var count = 0; + while (count < token.length) { + var c = token.charCodeAt(count); + // "non-digit = %x00-2F / %x3A-FF" + if (c <= 0x2F || c >= 0x3A) { + break; + } + count++; + } + + // constrain to a minimum and maximum number of digits. + if (count < minDigits || count > maxDigits) { + return null; + } + + if (!trailingOK && count != token.length) { + return null; + } + + return parseInt(token.substr(0,count), 10); +} + +function parseTime(token) { + var parts = token.split(':'); + var result = [0,0,0]; + + /* RF6256 S5.1.1: + * time = hms-time ( non-digit *OCTET ) + * hms-time = time-field ":" time-field ":" time-field + * time-field = 1*2DIGIT + */ + + if (parts.length !== 3) { + return null; + } + + for (var i = 0; i < 3; i++) { + // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be + // followed by "( non-digit *OCTET )" so therefore the last time-field can + // have a trailer + var trailingOK = (i == 2); + var num = parseDigits(parts[i], 1, 2, trailingOK); + if (num === null) { + return null; + } + result[i] = num; + } + + return result; +} + +function parseMonth(token) { + token = String(token).substr(0,3).toLowerCase(); + var num = MONTH_TO_NUM[token]; + return num >= 0 ? num : null; +} + +/* + * RFC6265 S5.1.1 date parser (see RFC for full grammar) + */ +function parseDate(str) { + if (!str) { + return; + } + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) { + return; + } + + var hour = null; + var minute = null; + var second = null; + var dayOfMonth = null; + var month = null; + var year = null; + + for (var i=0; i= 70 && year <= 99) { + year += 1900; + } else if (year >= 0 && year <= 69) { + year += 2000; + } + } + } + } + + /* RFC 6265 S5.1.1 + * "5. Abort these steps and fail to parse the cookie-date if: + * * at least one of the found-day-of-month, found-month, found- + * year, or found-time flags is not set, + * * the day-of-month-value is less than 1 or greater than 31, + * * the year-value is less than 1601, + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + * (Note that leap seconds cannot be represented in this syntax.)" + * + * So, in order as above: + */ + if ( + dayOfMonth === null || month === null || year === null || second === null || + dayOfMonth < 1 || dayOfMonth > 31 || + year < 1601 || + hour > 23 || + minute > 59 || + second > 59 + ) { + return; + } + + return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); +} + +function formatDate(date) { + var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) { + return null; + } + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) { + str = punycode.toASCII(str); + } + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) { + return null; + } + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) { + return true; + } + + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ + + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) { + return false; + } + + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) { + return false; // it's a non-match (-1) or prefix (0) + } + + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) { // it's not a suffix + return false; + } + + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') { + return false; + } + + return true; +} + + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") { + return "/"; + } + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") { + return path; + } + + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) { + return "/"; + } + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + +function trimTerminator(str) { + for (var t = 0; t < TERMINATORS.length; t++) { + var terminatorIdx = str.indexOf(TERMINATORS[t]); + if (terminatorIdx !== -1) { + str = str.substr(0,terminatorIdx); + } + } + + return str; +} + +function parseCookiePair(cookiePair, looseMode) { + cookiePair = trimTerminator(cookiePair); + + var firstEq = cookiePair.indexOf('='); + if (looseMode) { + if (firstEq === 0) { // '=' is immediately at start + cookiePair = cookiePair.substr(1); + firstEq = cookiePair.indexOf('='); // might still need to split on '=' + } + } else { // non-loose mode + if (firstEq <= 0) { // no '=' or is at start + return; // needs to have non-empty "cookie-name" + } + } + + var cookieName, cookieValue; + if (firstEq <= 0) { + cookieName = ""; + cookieValue = cookiePair.trim(); + } else { + cookieName = cookiePair.substr(0, firstEq).trim(); + cookieValue = cookiePair.substr(firstEq+1).trim(); + } + + if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { + return; + } + + var c = new Cookie(); + c.key = cookieName; + c.value = cookieValue; + return c; +} + +function parse(str, options) { + if (!options || typeof options !== 'object') { + options = {}; + } + str = str.trim(); + + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); + var c = parseCookiePair(cookiePair, !!options.loose); + if (!c) { + return; + } + + if (firstSemi === -1) { + return c; + } + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi + 1).trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) { + return c; + } + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(';'); + while (cookie_avs.length) { + var av = cookie_avs.shift().trim(); + if (av.length === 0) { // happens if ";;" appears + continue; + } + var av_sep = av.indexOf('='); + var av_key, av_value; + + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } + + av_key = av_key.trim().toLowerCase(); + + if (av_value) { + av_value = av_value.trim(); + } + + switch(av_key) { + case 'expires': // S5.2.1 + if (av_value) { + var exp = parseDate(av_value); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp) { + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + c.expires = exp; + } + } + break; + + case 'max-age': // S5.2.2 + if (av_value) { + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (/^-?[0-9]+$/.test(av_value)) { + var delta = parseInt(av_value, 10); + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + } + } + break; + + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (av_value) { + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./, ''); + if (domain) { + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + } + } + break; + + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + c.path = av_value && av_value[0] === "/" ? av_value : null; + break; + + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + c.secure = true; + break; + + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + c.httpOnly = true; + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + return c; +} + +// avoid the V8 deoptimization monster! +function jsonParse(str) { + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return e; + } + return obj; +} + +function fromJSON(str) { + if (!str) { + return null; + } + + var obj; + if (typeof str === 'string') { + obj = jsonParse(str); + if (obj instanceof Error) { + return null; + } + } else { + // assume it's an Object + obj = str; + } + + var c = new Cookie(); + for (var i=0; i 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) { + break; + } + path = path.substr(0,lindex); + permutations.push(path); + } + permutations.push('/'); + return permutations; +} + +function getCookieContext(url) { + if (url instanceof Object) { + return url; + } + // NOTE: decodeURI will throw on malformed URIs (see GH-32). + // Therefore, we will just skip decoding for such URIs. + try { + url = decodeURI(url); + } + catch(err) { + // Silently swallow error + } + + return urlParse(url); +} + +function Cookie(options) { + options = options || {}; + + Object.keys(options).forEach(function(prop) { + if (Cookie.prototype.hasOwnProperty(prop) && + Cookie.prototype[prop] !== options[prop] && + prop.substr(0,1) !== '_') + { + this[prop] = options[prop]; + } + }, this); + + this.creation = this.creation || new Date(); + + // used to break creation ties in cookieCompare(): + Object.defineProperty(this, 'creationIndex', { + configurable: false, + enumerable: false, // important for assert.deepEqual checks + writable: true, + value: ++Cookie.cookiesCreated + }); +} + +Cookie.cookiesCreated = 0; // incremented each time a cookie is created + +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; + +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; + +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; + +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set +Object.defineProperty(Cookie.prototype, 'creationIndex', { + configurable: true, + enumerable: false, + writable: true, + value: 0 +}); + +Cookie.serializableProperties = Object.keys(Cookie.prototype) + .filter(function(prop) { + return !( + Cookie.prototype[prop] instanceof Function || + prop === 'creationIndex' || + prop.substr(0,1) === '_' + ); + }); + +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; + +// Use the new custom inspection symbol to add the custom inspect function if +// available. +if (util.inspect.custom) { + Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; +} + +Cookie.prototype.toJSON = function() { + var obj = {}; + + var props = Cookie.serializableProperties; + for (var i=0; i=0.8" + }, + "devDependencies": { + "async": "^1.4.2", + "genversion": "^2.1.0", + "nyc": "^11.6.0", + "string.prototype.repeat": "^0.2.0", + "vows": "^0.8.2" + }, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } +} diff --git a/test-eol-project/node_modules/tunnel-agent/LICENSE b/test-eol-project/node_modules/tunnel-agent/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/test-eol-project/node_modules/tunnel-agent/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/test-eol-project/node_modules/tunnel-agent/README.md b/test-eol-project/node_modules/tunnel-agent/README.md new file mode 100644 index 00000000..bb533d56 --- /dev/null +++ b/test-eol-project/node_modules/tunnel-agent/README.md @@ -0,0 +1,4 @@ +tunnel-agent +============ + +HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/test-eol-project/node_modules/tunnel-agent/index.js b/test-eol-project/node_modules/tunnel-agent/index.js new file mode 100644 index 00000000..3ee9abc5 --- /dev/null +++ b/test-eol-project/node_modules/tunnel-agent/index.js @@ -0,0 +1,244 @@ +'use strict' + +var net = require('net') + , tls = require('tls') + , http = require('http') + , https = require('https') + , events = require('events') + , assert = require('assert') + , util = require('util') + , Buffer = require('safe-buffer').Buffer + ; + +exports.httpOverHttp = httpOverHttp +exports.httpsOverHttp = httpsOverHttp +exports.httpOverHttps = httpOverHttps +exports.httpsOverHttps = httpsOverHttps + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + return agent +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + agent.createSocket = createSecureSocket + agent.defaultPort = 443 + return agent +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + return agent +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + agent.createSocket = createSecureSocket + agent.defaultPort = 443 + return agent +} + + +function TunnelingAgent(options) { + var self = this + self.options = options || {} + self.proxyOptions = self.options.proxy || {} + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets + self.requests = [] + self.sockets = [] + + self.on('free', function onFree(socket, host, port) { + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i] + if (pending.host === host && pending.port === port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1) + pending.request.onSocket(socket) + return + } + } + socket.destroy() + self.removeSocket(socket) + }) +} +util.inherits(TunnelingAgent, events.EventEmitter) + +TunnelingAgent.prototype.addRequest = function addRequest(req, options) { + var self = this + + // Legacy API: addRequest(req, host, port, path) + if (typeof options === 'string') { + options = { + host: options, + port: arguments[2], + path: arguments[3] + }; + } + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push({host: options.host, port: options.port, request: req}) + return + } + + // If we are under maxSockets create a new one. + self.createConnection({host: options.host, port: options.port, request: req}) +} + +TunnelingAgent.prototype.createConnection = function createConnection(pending) { + var self = this + + self.createSocket(pending, function(socket) { + socket.on('free', onFree) + socket.on('close', onCloseOrRemove) + socket.on('agentRemove', onCloseOrRemove) + pending.request.onSocket(socket) + + function onFree() { + self.emit('free', socket, pending.host, pending.port) + } + + function onCloseOrRemove(err) { + self.removeSocket(socket) + socket.removeListener('free', onFree) + socket.removeListener('close', onCloseOrRemove) + socket.removeListener('agentRemove', onCloseOrRemove) + } + }) +} + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this + var placeholder = {} + self.sockets.push(placeholder) + + var connectOptions = mergeOptions({}, self.proxyOptions, + { method: 'CONNECT' + , path: options.host + ':' + options.port + , agent: false + } + ) + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {} + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + Buffer.from(connectOptions.proxyAuth).toString('base64') + } + + debug('making CONNECT request') + var connectReq = self.request(connectOptions) + connectReq.useChunkedEncodingByDefault = false // for v0.6 + connectReq.once('response', onResponse) // for v0.6 + connectReq.once('upgrade', onUpgrade) // for v0.6 + connectReq.once('connect', onConnect) // for v0.7 or later + connectReq.once('error', onError) + connectReq.end() + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head) + }) + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners() + socket.removeAllListeners() + + if (res.statusCode === 200) { + assert.equal(head.length, 0) + debug('tunneling connection has established') + self.sockets[self.sockets.indexOf(placeholder)] = socket + cb(socket) + } else { + debug('tunneling socket could not be established, statusCode=%d', res.statusCode) + var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } + } + + function onError(cause) { + connectReq.removeAllListeners() + + debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) + var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } +} + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) return + + this.sockets.splice(pos, 1) + + var pending = this.requests.shift() + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createConnection(pending) + } +} + +function createSecureSocket(options, cb) { + var self = this + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, mergeOptions({}, self.options, + { servername: options.host + , socket: socket + } + )) + self.sockets[self.sockets.indexOf(socket)] = secureSocket + cb(secureSocket) + }) +} + + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i] + if (typeof overrides === 'object') { + var keys = Object.keys(overrides) + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j] + if (overrides[k] !== undefined) { + target[k] = overrides[k] + } + } + } + } + return target +} + + +var debug +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments) + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0] + } else { + args.unshift('TUNNEL:') + } + console.error.apply(console, args) + } +} else { + debug = function() {} +} +exports.debug = debug // for test diff --git a/test-eol-project/node_modules/tunnel-agent/package.json b/test-eol-project/node_modules/tunnel-agent/package.json new file mode 100644 index 00000000..a271fda9 --- /dev/null +++ b/test-eol-project/node_modules/tunnel-agent/package.json @@ -0,0 +1,22 @@ +{ + "author": "Mikeal Rogers (http://www.futurealoof.com)", + "name": "tunnel-agent", + "license": "Apache-2.0", + "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", + "version": "0.6.0", + "repository": { + "url": "https://github.com/mikeal/tunnel-agent" + }, + "main": "index.js", + "files": [ + "index.js" + ], + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + } +} diff --git a/test-eol-project/node_modules/tweetnacl/.npmignore b/test-eol-project/node_modules/tweetnacl/.npmignore new file mode 100644 index 00000000..7d98dcbd --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/.npmignore @@ -0,0 +1,4 @@ +.eslintrc +.travis.yml +bower.json +test diff --git a/test-eol-project/node_modules/tweetnacl/AUTHORS.md b/test-eol-project/node_modules/tweetnacl/AUTHORS.md new file mode 100644 index 00000000..6d74d406 --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/AUTHORS.md @@ -0,0 +1,28 @@ +List of TweetNaCl.js authors +============================ + + Alphabetical order by first name. + Format: Name (GitHub username or URL) + +* AndSDev (@AndSDev) +* Devi Mandiri (@devi) +* Dmitry Chestnykh (@dchest) + +List of authors of third-party public domain code from which TweetNaCl.js code was derived +========================================================================================== + +[TweetNaCl](http://tweetnacl.cr.yp.to/) +-------------------------------------- + +* Bernard van Gastel +* Daniel J. Bernstein +* Peter Schwabe +* Sjaak Smetsers +* Tanja Lange +* Wesley Janssen + + +[Poly1305-donna](https://github.com/floodyberry/poly1305-donna) +-------------------------------------------------------------- + +* Andrew Moon (@floodyberry) diff --git a/test-eol-project/node_modules/tweetnacl/CHANGELOG.md b/test-eol-project/node_modules/tweetnacl/CHANGELOG.md new file mode 100644 index 00000000..92a4fdc5 --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/CHANGELOG.md @@ -0,0 +1,221 @@ +TweetNaCl.js Changelog +====================== + + +v0.14.5 +------- + +* Fixed incomplete return types in TypeScript typings. +* Replaced COPYING.txt with LICENSE file, which now has public domain dedication + text from The Unlicense. License fields in package.json and bower.json have + been set to "Unlicense". The project was and will be in the public domain -- + this change just makes it easier for automated tools to know about this fact by + using the widely recognized and SPDX-compatible template for public domain + dedication. + + +v0.14.4 +------- + +* Added TypeScript type definitions (contributed by @AndSDev). +* Improved benchmarking code. + + +v0.14.3 +------- + +Fixed a bug in the fast version of Poly1305 and brought it back. + +Thanks to @floodyberry for promptly responding and fixing the original C code: + +> "The issue was not properly detecting if st->h was >= 2^130 - 5, coupled with +> [testing mistake] not catching the failure. The chance of the bug affecting +> anything in the real world is essentially zero luckily, but it's good to have +> it fixed." + +https://github.com/floodyberry/poly1305-donna/issues/2#issuecomment-202698577 + + +v0.14.2 +------- + +Switched Poly1305 fast version back to original (slow) version due to a bug. + + +v0.14.1 +------- + +No code changes, just tweaked packaging and added COPYING.txt. + + +v0.14.0 +------- + +* **Breaking change!** All functions from `nacl.util` have been removed. These + functions are no longer available: + + nacl.util.decodeUTF8 + nacl.util.encodeUTF8 + nacl.util.decodeBase64 + nacl.util.encodeBase64 + + If want to continue using them, you can include + package: + + + + + or + + var nacl = require('tweetnacl'); + nacl.util = require('tweetnacl-util'); + + However it is recommended to use better packages that have wider + compatibility and better performance. Functions from `nacl.util` were never + intended to be robust solution for string conversion and were included for + convenience: cryptography library is not the right place for them. + + Currently calling these functions will throw error pointing to + `tweetnacl-util-js` (in the next version this error message will be removed). + +* Improved detection of available random number generators, making it possible + to use `nacl.randomBytes` and related functions in Web Workers without + changes. + +* Changes to testing (see README). + + +v0.13.3 +------- + +No code changes. + +* Reverted license field in package.json to "Public domain". + +* Fixed typo in README. + + +v0.13.2 +------- + +* Fixed undefined variable bug in fast version of Poly1305. No worries, this + bug was *never* triggered. + +* Specified CC0 public domain dedication. + +* Updated development dependencies. + + +v0.13.1 +------- + +* Exclude `crypto` and `buffer` modules from browserify builds. + + +v0.13.0 +------- + +* Made `nacl-fast` the default version in NPM package. Now + `require("tweetnacl")` will use fast version; to get the original version, + use `require("tweetnacl/nacl.js")`. + +* Cleanup temporary array after generating random bytes. + + +v0.12.2 +------- + +* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, + `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. + + +v0.12.1 +------- + +* Significantly improved performance of Salsa20 (~1.5x faster) and + Poly1305 (~3.5x faster) in `nacl-fast` version. + + +v0.12.0 +------- + +* Instead of using the given secret key directly, TweetNaCl.js now copies it to + a new array in `nacl.box.keyPair.fromSecretKey` and + `nacl.sign.keyPair.fromSecretKey`. + + +v0.11.2 +------- + +* Added new constant: `nacl.sign.seedLength`. + + +v0.11.1 +------- + +* Even faster hash for both short and long inputs (in `nacl-fast`). + + +v0.11.0 +------- + +* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs + deterministically from a 32-byte seed. (It behaves like + [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) + `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) + +* Fast version now has an improved hash implementation that is 2x-5x faster. + +* Fixed benchmarks, which may have produced incorrect measurements. + + +v0.10.1 +------- + +* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. + + +v0.10.0 +------- + +* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal + with signed messages, and new `nacl.sign.detached` and + `nacl.sign.detached.verify` are available. + + Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a + message and "detached" signature. This was unlike NaCl's API, which dealt with + signed messages (concatenation of signature and message). + + The new API is: + + nacl.sign(message, secretKey) -> signedMessage + nacl.sign.open(signedMessage, publicKey) -> message | null + + Since detached signatures are common, two new API functions were introduced: + + nacl.sign.detached(message, secretKey) -> signature + nacl.sign.detached.verify(message, signature, publicKey) -> true | false + + (Note that it's `verify`, not `open`, and it returns a boolean value, unlike + `open`, which returns an "unsigned" message.) + +* NPM package now comes without `test` directory to keep it small. + + +v0.9.2 +------ + +* Improved documentation. +* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 + bytes in Poly1305 (and thus, secretbox and box). However this has no impact + in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit + indexes, and most implementations won't allocate more than a gigabyte or so. + (Obviously, there are no tests for the correctness of implementation.) Also, + it's not recommended to use messages that large without splitting them into + smaller packets anyway. + + +v0.9.1 +------ + +* Initial release diff --git a/test-eol-project/node_modules/tweetnacl/LICENSE b/test-eol-project/node_modules/tweetnacl/LICENSE new file mode 100644 index 00000000..cf1ab25d --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md b/test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..a8eb4a9a --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +# Important! + +If your contribution is not trivial (not a typo fix, etc.), we can only accept +it if you dedicate your copyright for the contribution to the public domain. +Make sure you understand what it means (see http://unlicense.org/)! If you +agree, please add yourself to AUTHORS.md file, and include the following text +to your pull request description or a comment in it: + +------------------------------------------------------------------------------ + + I dedicate any and all copyright interest in this software to the + public domain. I make this dedication for the benefit of the public at + large and to the detriment of my heirs and successors. I intend this + dedication to be an overt act of relinquishment in perpetuity of all + present and future rights to this software under copyright law. + + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. diff --git a/test-eol-project/node_modules/tweetnacl/README.md b/test-eol-project/node_modules/tweetnacl/README.md new file mode 100644 index 00000000..ffb6871d --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/README.md @@ -0,0 +1,459 @@ +TweetNaCl.js +============ + +Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) +to JavaScript for modern browsers and Node.js. Public domain. + +[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) +](https://travis-ci.org/dchest/tweetnacl-js) + +Demo: + +**:warning: The library is stable and API is frozen, however it has not been +independently reviewed. If you can help reviewing it, please [contact +me](mailto:dmitry@codingrobots.com).** + +Documentation +============= + +* [Overview](#overview) +* [Installation](#installation) +* [Usage](#usage) + * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) + * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) + * [Scalar multiplication](#scalar-multiplication) + * [Signatures](#signatures) + * [Hashing](#hashing) + * [Random bytes generation](#random-bytes-generation) + * [Constant-time comparison](#constant-time-comparison) +* [System requirements](#system-requirements) +* [Development and testing](#development-and-testing) +* [Benchmarks](#benchmarks) +* [Contributors](#contributors) +* [Who uses it](#who-uses-it) + + +Overview +-------- + +The primary goal of this project is to produce a translation of TweetNaCl to +JavaScript which is as close as possible to the original C implementation, plus +a thin layer of idiomatic high-level API on top of it. + +There are two versions, you can use either of them: + +* `nacl.js` is the port of TweetNaCl with minimum differences from the + original + high-level API. + +* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with + faster versions. + + +Installation +------------ + +You can install TweetNaCl.js via a package manager: + +[Bower](http://bower.io): + + $ bower install tweetnacl + +[NPM](https://www.npmjs.org/): + + $ npm install tweetnacl + +or [download source code](https://github.com/dchest/tweetnacl-js/releases). + + +Usage +----- + +All API functions accept and return bytes as `Uint8Array`s. If you need to +encode or decode strings, use functions from + or one of the more robust codec +packages. + +In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you +can freely pass them to TweetNaCl.js functions as arguments. The returned +objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to +convert them manually; make sure to convert using copying: `new Buffer(array)`, +instead of sharing: `new Buffer(array.buffer)`, because some functions return +subarrays of their buffers. + + +### Public-key authenticated encryption (box) + +Implements *curve25519-xsalsa20-poly1305*. + +#### nacl.box.keyPair() + +Generates a new random key pair for box and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 32-byte secret key + } + + +#### nacl.box.keyPair.fromSecretKey(secretKey) + +Returns a key pair for box with public key corresponding to the given secret +key. + +#### nacl.box(message, nonce, theirPublicKey, mySecretKey) + +Encrypt and authenticates message using peer's public key, our secret key, and +the given nonce, which must be unique for each distinct message for a key pair. + +Returns an encrypted and authenticated message, which is +`nacl.box.overheadLength` longer than the original message. + +#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) + +Authenticates and decrypts the given box with peer's public key, our secret +key, and the given nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.box.before(theirPublicKey, mySecretKey) + +Returns a precomputed shared key which can be used in `nacl.box.after` and +`nacl.box.open.after`. + +#### nacl.box.after(message, nonce, sharedKey) + +Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.open.after(box, nonce, sharedKey) + +Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.publicKeyLength = 32 + +Length of public key in bytes. + +#### nacl.box.secretKeyLength = 32 + +Length of secret key in bytes. + +#### nacl.box.sharedKeyLength = 32 + +Length of precomputed shared key in bytes. + +#### nacl.box.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.box.overheadLength = 16 + +Length of overhead added to box compared to original message. + + +### Secret-key authenticated encryption (secretbox) + +Implements *xsalsa20-poly1305*. + +#### nacl.secretbox(message, nonce, key) + +Encrypt and authenticates message using the key and the nonce. The nonce must +be unique for each distinct message for this key. + +Returns an encrypted and authenticated message, which is +`nacl.secretbox.overheadLength` longer than the original message. + +#### nacl.secretbox.open(box, nonce, key) + +Authenticates and decrypts the given secret box using the key and the nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.secretbox.keyLength = 32 + +Length of key in bytes. + +#### nacl.secretbox.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.secretbox.overheadLength = 16 + +Length of overhead added to secret box compared to original message. + + +### Scalar multiplication + +Implements *curve25519*. + +#### nacl.scalarMult(n, p) + +Multiplies an integer `n` by a group element `p` and returns the resulting +group element. + +#### nacl.scalarMult.base(n) + +Multiplies an integer `n` by a standard group element and returns the resulting +group element. + +#### nacl.scalarMult.scalarLength = 32 + +Length of scalar in bytes. + +#### nacl.scalarMult.groupElementLength = 32 + +Length of group element in bytes. + + +### Signatures + +Implements [ed25519](http://ed25519.cr.yp.to). + +#### nacl.sign.keyPair() + +Generates new random key pair for signing and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 64-byte secret key + } + +#### nacl.sign.keyPair.fromSecretKey(secretKey) + +Returns a signing key pair with public key corresponding to the given +64-byte secret key. The secret key must have been generated by +`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. + +#### nacl.sign.keyPair.fromSeed(seed) + +Returns a new signing key pair generated deterministically from a 32-byte seed. +The seed must contain enough entropy to be secure. This method is not +recommended for general use: instead, use `nacl.sign.keyPair` to generate a new +key pair from a random seed. + +#### nacl.sign(message, secretKey) + +Signs the message using the secret key and returns a signed message. + +#### nacl.sign.open(signedMessage, publicKey) + +Verifies the signed message and returns the message without signature. + +Returns `null` if verification failed. + +#### nacl.sign.detached(message, secretKey) + +Signs the message using the secret key and returns a signature. + +#### nacl.sign.detached.verify(message, signature, publicKey) + +Verifies the signature for the message and returns `true` if verification +succeeded or `false` if it failed. + +#### nacl.sign.publicKeyLength = 32 + +Length of signing public key in bytes. + +#### nacl.sign.secretKeyLength = 64 + +Length of signing secret key in bytes. + +#### nacl.sign.seedLength = 32 + +Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. + +#### nacl.sign.signatureLength = 64 + +Length of signature in bytes. + + +### Hashing + +Implements *SHA-512*. + +#### nacl.hash(message) + +Returns SHA-512 hash of the message. + +#### nacl.hash.hashLength = 64 + +Length of hash in bytes. + + +### Random bytes generation + +#### nacl.randomBytes(length) + +Returns a `Uint8Array` of the given length containing random bytes of +cryptographic quality. + +**Implementation note** + +TweetNaCl.js uses the following methods to generate random bytes, +depending on the platform it runs on: + +* `window.crypto.getRandomValues` (WebCrypto standard) +* `window.msCrypto.getRandomValues` (Internet Explorer 11) +* `crypto.randomBytes` (Node.js) + +If the platform doesn't provide a suitable PRNG, the following functions, +which require random numbers, will throw exception: + +* `nacl.randomBytes` +* `nacl.box.keyPair` +* `nacl.sign.keyPair` + +Other functions are deterministic and will continue working. + +If a platform you are targeting doesn't implement secure random number +generator, but you somehow have a cryptographically-strong source of entropy +(not `Math.random`!), and you know what you are doing, you can plug it into +TweetNaCl.js like this: + + nacl.setPRNG(function(x, n) { + // ... copy n random bytes into x ... + }); + +Note that `nacl.setPRNG` *completely replaces* internal random byte generator +with the one provided. + + +### Constant-time comparison + +#### nacl.verify(x, y) + +Compares `x` and `y` in constant time and returns `true` if their lengths are +non-zero and equal, and their contents are equal. + +Returns `false` if either of the arguments has zero length, or arguments have +different lengths, or their contents differ. + + +System requirements +------------------- + +TweetNaCl.js supports modern browsers that have a cryptographically secure +pseudorandom number generator and typed arrays, including the latest versions +of: + +* Chrome +* Firefox +* Safari (Mac, iOS) +* Internet Explorer 11 + +Other systems: + +* Node.js + + +Development and testing +------------------------ + +Install NPM modules needed for development: + + $ npm install + +To build minified versions: + + $ npm run build + +Tests use minified version, so make sure to rebuild it every time you change +`nacl.js` or `nacl-fast.js`. + +### Testing + +To run tests in Node.js: + + $ npm run test-node + +By default all tests described here work on `nacl.min.js`. To test other +versions, set environment variable `NACL_SRC` to the file name you want to test. +For example, the following command will test fast minified version: + + $ NACL_SRC=nacl-fast.min.js npm run test-node + +To run full suite of tests in Node.js, including comparing outputs of +JavaScript port to outputs of the original C version: + + $ npm run test-node-all + +To prepare tests for browsers: + + $ npm run build-test-browser + +and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to +run them. + +To run headless browser tests with `tape-run` (powered by Electron): + + $ npm run test-browser + +(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) + +To run tests in both Node and Electron: + + $ npm test + +### Benchmarking + +To run benchmarks in Node.js: + + $ npm run bench + $ NACL_SRC=nacl-fast.min.js npm run bench + +To run benchmarks in a browser, open `test/benchmark/bench.html` (or +`test/benchmark/bench-fast.html`). + + +Benchmarks +---------- + +For reference, here are benchmarks from MacBook Pro (Retina, 13-inch, Mid 2014) +laptop with 2.6 GHz Intel Core i5 CPU (Intel) in Chrome 53/OS X and Xiaomi Redmi +Note 3 smartphone with 1.8 GHz Qualcomm Snapdragon 650 64-bit CPU (ARM) in +Chrome 52/Android: + +| | nacl.js Intel | nacl-fast.js Intel | nacl.js ARM | nacl-fast.js ARM | +| ------------- |:-------------:|:-------------------:|:-------------:|:-----------------:| +| salsa20 | 1.3 MB/s | 128 MB/s | 0.4 MB/s | 43 MB/s | +| poly1305 | 13 MB/s | 171 MB/s | 4 MB/s | 52 MB/s | +| hash | 4 MB/s | 34 MB/s | 0.9 MB/s | 12 MB/s | +| secretbox 1K | 1113 op/s | 57583 op/s | 334 op/s | 14227 op/s | +| box 1K | 145 op/s | 718 op/s | 37 op/s | 368 op/s | +| scalarMult | 171 op/s | 733 op/s | 56 op/s | 380 op/s | +| sign | 77 op/s | 200 op/s | 20 op/s | 61 op/s | +| sign.open | 39 op/s | 102 op/s | 11 op/s | 31 op/s | + +(You can run benchmarks on your devices by clicking on the links at the bottom +of the [home page](https://tweetnacl.js.org)). + +In short, with *nacl-fast.js* and 1024-byte messages you can expect to encrypt and +authenticate more than 57000 messages per second on a typical laptop or more than +14000 messages per second on a $170 smartphone, sign about 200 and verify 100 +messages per second on a laptop or 60 and 30 messages per second on a smartphone, +per CPU core (with Web Workers you can do these operations in parallel), +which is good enough for most applications. + + +Contributors +------------ + +See AUTHORS.md file. + + +Third-party libraries based on TweetNaCl.js +------------------------------------------- + +* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation +* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption +* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) +* [chloride](https://github.com/dominictarr/chloride) - unified API for various NaCl modules + + +Who uses it +----------- + +Some notable users of TweetNaCl.js: + +* [miniLock](http://minilock.io/) +* [Stellar](https://www.stellar.org/) diff --git a/test-eol-project/node_modules/tweetnacl/nacl-fast.js b/test-eol-project/node_modules/tweetnacl/nacl-fast.js new file mode 100644 index 00000000..5e4562fe --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/nacl-fast.js @@ -0,0 +1,2388 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function ts64(x, i, h, l) { + x[i] = (h >> 24) & 0xff; + x[i+1] = (h >> 16) & 0xff; + x[i+2] = (h >> 8) & 0xff; + x[i+3] = h & 0xff; + x[i+4] = (l >> 24) & 0xff; + x[i+5] = (l >> 16) & 0xff; + x[i+6] = (l >> 8) & 0xff; + x[i+7] = l & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core_salsa20(o, p, k, c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + x0 = x0 + j0 | 0; + x1 = x1 + j1 | 0; + x2 = x2 + j2 | 0; + x3 = x3 + j3 | 0; + x4 = x4 + j4 | 0; + x5 = x5 + j5 | 0; + x6 = x6 + j6 | 0; + x7 = x7 + j7 | 0; + x8 = x8 + j8 | 0; + x9 = x9 + j9 | 0; + x10 = x10 + j10 | 0; + x11 = x11 + j11 | 0; + x12 = x12 + j12 | 0; + x13 = x13 + j13 | 0; + x14 = x14 + j14 | 0; + x15 = x15 + j15 | 0; + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x1 >>> 0 & 0xff; + o[ 5] = x1 >>> 8 & 0xff; + o[ 6] = x1 >>> 16 & 0xff; + o[ 7] = x1 >>> 24 & 0xff; + + o[ 8] = x2 >>> 0 & 0xff; + o[ 9] = x2 >>> 8 & 0xff; + o[10] = x2 >>> 16 & 0xff; + o[11] = x2 >>> 24 & 0xff; + + o[12] = x3 >>> 0 & 0xff; + o[13] = x3 >>> 8 & 0xff; + o[14] = x3 >>> 16 & 0xff; + o[15] = x3 >>> 24 & 0xff; + + o[16] = x4 >>> 0 & 0xff; + o[17] = x4 >>> 8 & 0xff; + o[18] = x4 >>> 16 & 0xff; + o[19] = x4 >>> 24 & 0xff; + + o[20] = x5 >>> 0 & 0xff; + o[21] = x5 >>> 8 & 0xff; + o[22] = x5 >>> 16 & 0xff; + o[23] = x5 >>> 24 & 0xff; + + o[24] = x6 >>> 0 & 0xff; + o[25] = x6 >>> 8 & 0xff; + o[26] = x6 >>> 16 & 0xff; + o[27] = x6 >>> 24 & 0xff; + + o[28] = x7 >>> 0 & 0xff; + o[29] = x7 >>> 8 & 0xff; + o[30] = x7 >>> 16 & 0xff; + o[31] = x7 >>> 24 & 0xff; + + o[32] = x8 >>> 0 & 0xff; + o[33] = x8 >>> 8 & 0xff; + o[34] = x8 >>> 16 & 0xff; + o[35] = x8 >>> 24 & 0xff; + + o[36] = x9 >>> 0 & 0xff; + o[37] = x9 >>> 8 & 0xff; + o[38] = x9 >>> 16 & 0xff; + o[39] = x9 >>> 24 & 0xff; + + o[40] = x10 >>> 0 & 0xff; + o[41] = x10 >>> 8 & 0xff; + o[42] = x10 >>> 16 & 0xff; + o[43] = x10 >>> 24 & 0xff; + + o[44] = x11 >>> 0 & 0xff; + o[45] = x11 >>> 8 & 0xff; + o[46] = x11 >>> 16 & 0xff; + o[47] = x11 >>> 24 & 0xff; + + o[48] = x12 >>> 0 & 0xff; + o[49] = x12 >>> 8 & 0xff; + o[50] = x12 >>> 16 & 0xff; + o[51] = x12 >>> 24 & 0xff; + + o[52] = x13 >>> 0 & 0xff; + o[53] = x13 >>> 8 & 0xff; + o[54] = x13 >>> 16 & 0xff; + o[55] = x13 >>> 24 & 0xff; + + o[56] = x14 >>> 0 & 0xff; + o[57] = x14 >>> 8 & 0xff; + o[58] = x14 >>> 16 & 0xff; + o[59] = x14 >>> 24 & 0xff; + + o[60] = x15 >>> 0 & 0xff; + o[61] = x15 >>> 8 & 0xff; + o[62] = x15 >>> 16 & 0xff; + o[63] = x15 >>> 24 & 0xff; +} + +function core_hsalsa20(o,p,k,c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x5 >>> 0 & 0xff; + o[ 5] = x5 >>> 8 & 0xff; + o[ 6] = x5 >>> 16 & 0xff; + o[ 7] = x5 >>> 24 & 0xff; + + o[ 8] = x10 >>> 0 & 0xff; + o[ 9] = x10 >>> 8 & 0xff; + o[10] = x10 >>> 16 & 0xff; + o[11] = x10 >>> 24 & 0xff; + + o[12] = x15 >>> 0 & 0xff; + o[13] = x15 >>> 8 & 0xff; + o[14] = x15 >>> 16 & 0xff; + o[15] = x15 >>> 24 & 0xff; + + o[16] = x6 >>> 0 & 0xff; + o[17] = x6 >>> 8 & 0xff; + o[18] = x6 >>> 16 & 0xff; + o[19] = x6 >>> 24 & 0xff; + + o[20] = x7 >>> 0 & 0xff; + o[21] = x7 >>> 8 & 0xff; + o[22] = x7 >>> 16 & 0xff; + o[23] = x7 >>> 24 & 0xff; + + o[24] = x8 >>> 0 & 0xff; + o[25] = x8 >>> 8 & 0xff; + o[26] = x8 >>> 16 & 0xff; + o[27] = x8 >>> 24 & 0xff; + + o[28] = x9 >>> 0 & 0xff; + o[29] = x9 >>> 8 & 0xff; + o[30] = x9 >>> 16 & 0xff; + o[31] = x9 >>> 24 & 0xff; +} + +function crypto_core_salsa20(out,inp,k,c) { + core_salsa20(out,inp,k,c); +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core_hsalsa20(out,inp,k,c); +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = x[i]; + } + return 0; +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20(c,cpos,d,sn,s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); +} + +/* +* Port of Andrew Moon's Poly1305-donna-16. Public domain. +* https://github.com/floodyberry/poly1305-donna +*/ + +var poly1305 = function(key) { + this.buffer = new Uint8Array(16); + this.r = new Uint16Array(10); + this.h = new Uint16Array(10); + this.pad = new Uint16Array(8); + this.leftover = 0; + this.fin = 0; + + var t0, t1, t2, t3, t4, t5, t6, t7; + + t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; + t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; + t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; + this.r[5] = ((t4 >>> 1)) & 0x1ffe; + t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; + t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + this.r[9] = ((t7 >>> 5)) & 0x007f; + + this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; + this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; + this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; + this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; + this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; + this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; + this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; + this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; +}; + +poly1305.prototype.blocks = function(m, mpos, bytes) { + var hibit = this.fin ? 0 : (1 << 11); + var t0, t1, t2, t3, t4, t5, t6, t7, c; + var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; + + var h0 = this.h[0], + h1 = this.h[1], + h2 = this.h[2], + h3 = this.h[3], + h4 = this.h[4], + h5 = this.h[5], + h6 = this.h[6], + h7 = this.h[7], + h8 = this.h[8], + h9 = this.h[9]; + + var r0 = this.r[0], + r1 = this.r[1], + r2 = this.r[2], + r3 = this.r[3], + r4 = this.r[4], + r5 = this.r[5], + r6 = this.r[6], + r7 = this.r[7], + r8 = this.r[8], + r9 = this.r[9]; + + while (bytes >= 16) { + t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; + t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; + t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; + h5 += ((t4 >>> 1)) & 0x1fff; + t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; + t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + h9 += ((t7 >>> 5)) | hibit; + + c = 0; + + d0 = c; + d0 += h0 * r0; + d0 += h1 * (5 * r9); + d0 += h2 * (5 * r8); + d0 += h3 * (5 * r7); + d0 += h4 * (5 * r6); + c = (d0 >>> 13); d0 &= 0x1fff; + d0 += h5 * (5 * r5); + d0 += h6 * (5 * r4); + d0 += h7 * (5 * r3); + d0 += h8 * (5 * r2); + d0 += h9 * (5 * r1); + c += (d0 >>> 13); d0 &= 0x1fff; + + d1 = c; + d1 += h0 * r1; + d1 += h1 * r0; + d1 += h2 * (5 * r9); + d1 += h3 * (5 * r8); + d1 += h4 * (5 * r7); + c = (d1 >>> 13); d1 &= 0x1fff; + d1 += h5 * (5 * r6); + d1 += h6 * (5 * r5); + d1 += h7 * (5 * r4); + d1 += h8 * (5 * r3); + d1 += h9 * (5 * r2); + c += (d1 >>> 13); d1 &= 0x1fff; + + d2 = c; + d2 += h0 * r2; + d2 += h1 * r1; + d2 += h2 * r0; + d2 += h3 * (5 * r9); + d2 += h4 * (5 * r8); + c = (d2 >>> 13); d2 &= 0x1fff; + d2 += h5 * (5 * r7); + d2 += h6 * (5 * r6); + d2 += h7 * (5 * r5); + d2 += h8 * (5 * r4); + d2 += h9 * (5 * r3); + c += (d2 >>> 13); d2 &= 0x1fff; + + d3 = c; + d3 += h0 * r3; + d3 += h1 * r2; + d3 += h2 * r1; + d3 += h3 * r0; + d3 += h4 * (5 * r9); + c = (d3 >>> 13); d3 &= 0x1fff; + d3 += h5 * (5 * r8); + d3 += h6 * (5 * r7); + d3 += h7 * (5 * r6); + d3 += h8 * (5 * r5); + d3 += h9 * (5 * r4); + c += (d3 >>> 13); d3 &= 0x1fff; + + d4 = c; + d4 += h0 * r4; + d4 += h1 * r3; + d4 += h2 * r2; + d4 += h3 * r1; + d4 += h4 * r0; + c = (d4 >>> 13); d4 &= 0x1fff; + d4 += h5 * (5 * r9); + d4 += h6 * (5 * r8); + d4 += h7 * (5 * r7); + d4 += h8 * (5 * r6); + d4 += h9 * (5 * r5); + c += (d4 >>> 13); d4 &= 0x1fff; + + d5 = c; + d5 += h0 * r5; + d5 += h1 * r4; + d5 += h2 * r3; + d5 += h3 * r2; + d5 += h4 * r1; + c = (d5 >>> 13); d5 &= 0x1fff; + d5 += h5 * r0; + d5 += h6 * (5 * r9); + d5 += h7 * (5 * r8); + d5 += h8 * (5 * r7); + d5 += h9 * (5 * r6); + c += (d5 >>> 13); d5 &= 0x1fff; + + d6 = c; + d6 += h0 * r6; + d6 += h1 * r5; + d6 += h2 * r4; + d6 += h3 * r3; + d6 += h4 * r2; + c = (d6 >>> 13); d6 &= 0x1fff; + d6 += h5 * r1; + d6 += h6 * r0; + d6 += h7 * (5 * r9); + d6 += h8 * (5 * r8); + d6 += h9 * (5 * r7); + c += (d6 >>> 13); d6 &= 0x1fff; + + d7 = c; + d7 += h0 * r7; + d7 += h1 * r6; + d7 += h2 * r5; + d7 += h3 * r4; + d7 += h4 * r3; + c = (d7 >>> 13); d7 &= 0x1fff; + d7 += h5 * r2; + d7 += h6 * r1; + d7 += h7 * r0; + d7 += h8 * (5 * r9); + d7 += h9 * (5 * r8); + c += (d7 >>> 13); d7 &= 0x1fff; + + d8 = c; + d8 += h0 * r8; + d8 += h1 * r7; + d8 += h2 * r6; + d8 += h3 * r5; + d8 += h4 * r4; + c = (d8 >>> 13); d8 &= 0x1fff; + d8 += h5 * r3; + d8 += h6 * r2; + d8 += h7 * r1; + d8 += h8 * r0; + d8 += h9 * (5 * r9); + c += (d8 >>> 13); d8 &= 0x1fff; + + d9 = c; + d9 += h0 * r9; + d9 += h1 * r8; + d9 += h2 * r7; + d9 += h3 * r6; + d9 += h4 * r5; + c = (d9 >>> 13); d9 &= 0x1fff; + d9 += h5 * r4; + d9 += h6 * r3; + d9 += h7 * r2; + d9 += h8 * r1; + d9 += h9 * r0; + c += (d9 >>> 13); d9 &= 0x1fff; + + c = (((c << 2) + c)) | 0; + c = (c + d0) | 0; + d0 = c & 0x1fff; + c = (c >>> 13); + d1 += c; + + h0 = d0; + h1 = d1; + h2 = d2; + h3 = d3; + h4 = d4; + h5 = d5; + h6 = d6; + h7 = d7; + h8 = d8; + h9 = d9; + + mpos += 16; + bytes -= 16; + } + this.h[0] = h0; + this.h[1] = h1; + this.h[2] = h2; + this.h[3] = h3; + this.h[4] = h4; + this.h[5] = h5; + this.h[6] = h6; + this.h[7] = h7; + this.h[8] = h8; + this.h[9] = h9; +}; + +poly1305.prototype.finish = function(mac, macpos) { + var g = new Uint16Array(10); + var c, mask, f, i; + + if (this.leftover) { + i = this.leftover; + this.buffer[i++] = 1; + for (; i < 16; i++) this.buffer[i] = 0; + this.fin = 1; + this.blocks(this.buffer, 0, 16); + } + + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + for (i = 2; i < 10; i++) { + this.h[i] += c; + c = this.h[i] >>> 13; + this.h[i] &= 0x1fff; + } + this.h[0] += (c * 5); + c = this.h[0] >>> 13; + this.h[0] &= 0x1fff; + this.h[1] += c; + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + this.h[2] += c; + + g[0] = this.h[0] + 5; + c = g[0] >>> 13; + g[0] &= 0x1fff; + for (i = 1; i < 10; i++) { + g[i] = this.h[i] + c; + c = g[i] >>> 13; + g[i] &= 0x1fff; + } + g[9] -= (1 << 13); + + mask = (c ^ 1) - 1; + for (i = 0; i < 10; i++) g[i] &= mask; + mask = ~mask; + for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; + + this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; + this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; + this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; + this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; + this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; + this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; + this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; + this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; + + f = this.h[0] + this.pad[0]; + this.h[0] = f & 0xffff; + for (i = 1; i < 8; i++) { + f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; + this.h[i] = f & 0xffff; + } + + mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; + mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; + mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; + mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; + mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; + mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; + mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; + mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; + mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; + mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; + mac[macpos+10] = (this.h[5] >>> 0) & 0xff; + mac[macpos+11] = (this.h[5] >>> 8) & 0xff; + mac[macpos+12] = (this.h[6] >>> 0) & 0xff; + mac[macpos+13] = (this.h[6] >>> 8) & 0xff; + mac[macpos+14] = (this.h[7] >>> 0) & 0xff; + mac[macpos+15] = (this.h[7] >>> 8) & 0xff; +}; + +poly1305.prototype.update = function(m, mpos, bytes) { + var i, want; + + if (this.leftover) { + want = (16 - this.leftover); + if (want > bytes) + want = bytes; + for (i = 0; i < want; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + bytes -= want; + mpos += want; + this.leftover += want; + if (this.leftover < 16) + return; + this.blocks(this.buffer, 0, 16); + this.leftover = 0; + } + + if (bytes >= 16) { + want = bytes - (bytes % 16); + this.blocks(m, mpos, want); + mpos += want; + bytes -= want; + } + + if (bytes) { + for (i = 0; i < bytes; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + this.leftover += bytes; + } +}; + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s = new poly1305(k); + s.update(m, mpos, n); + s.finish(out, outpos); + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var i, v, c = 1; + for (i = 0; i < 16; i++) { + v = o[i] + c + 65535; + c = Math.floor(v / 65536); + o[i] = v - c * 65536; + } + o[0] += c-1 + 37 * (c-1); +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; +} + +function Z(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; +} + +function M(o, a, b) { + var v, c, + t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, + t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, + t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, + t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, + b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11], + b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + + v = a[0]; + t0 += v * b0; + t1 += v * b1; + t2 += v * b2; + t3 += v * b3; + t4 += v * b4; + t5 += v * b5; + t6 += v * b6; + t7 += v * b7; + t8 += v * b8; + t9 += v * b9; + t10 += v * b10; + t11 += v * b11; + t12 += v * b12; + t13 += v * b13; + t14 += v * b14; + t15 += v * b15; + v = a[1]; + t1 += v * b0; + t2 += v * b1; + t3 += v * b2; + t4 += v * b3; + t5 += v * b4; + t6 += v * b5; + t7 += v * b6; + t8 += v * b7; + t9 += v * b8; + t10 += v * b9; + t11 += v * b10; + t12 += v * b11; + t13 += v * b12; + t14 += v * b13; + t15 += v * b14; + t16 += v * b15; + v = a[2]; + t2 += v * b0; + t3 += v * b1; + t4 += v * b2; + t5 += v * b3; + t6 += v * b4; + t7 += v * b5; + t8 += v * b6; + t9 += v * b7; + t10 += v * b8; + t11 += v * b9; + t12 += v * b10; + t13 += v * b11; + t14 += v * b12; + t15 += v * b13; + t16 += v * b14; + t17 += v * b15; + v = a[3]; + t3 += v * b0; + t4 += v * b1; + t5 += v * b2; + t6 += v * b3; + t7 += v * b4; + t8 += v * b5; + t9 += v * b6; + t10 += v * b7; + t11 += v * b8; + t12 += v * b9; + t13 += v * b10; + t14 += v * b11; + t15 += v * b12; + t16 += v * b13; + t17 += v * b14; + t18 += v * b15; + v = a[4]; + t4 += v * b0; + t5 += v * b1; + t6 += v * b2; + t7 += v * b3; + t8 += v * b4; + t9 += v * b5; + t10 += v * b6; + t11 += v * b7; + t12 += v * b8; + t13 += v * b9; + t14 += v * b10; + t15 += v * b11; + t16 += v * b12; + t17 += v * b13; + t18 += v * b14; + t19 += v * b15; + v = a[5]; + t5 += v * b0; + t6 += v * b1; + t7 += v * b2; + t8 += v * b3; + t9 += v * b4; + t10 += v * b5; + t11 += v * b6; + t12 += v * b7; + t13 += v * b8; + t14 += v * b9; + t15 += v * b10; + t16 += v * b11; + t17 += v * b12; + t18 += v * b13; + t19 += v * b14; + t20 += v * b15; + v = a[6]; + t6 += v * b0; + t7 += v * b1; + t8 += v * b2; + t9 += v * b3; + t10 += v * b4; + t11 += v * b5; + t12 += v * b6; + t13 += v * b7; + t14 += v * b8; + t15 += v * b9; + t16 += v * b10; + t17 += v * b11; + t18 += v * b12; + t19 += v * b13; + t20 += v * b14; + t21 += v * b15; + v = a[7]; + t7 += v * b0; + t8 += v * b1; + t9 += v * b2; + t10 += v * b3; + t11 += v * b4; + t12 += v * b5; + t13 += v * b6; + t14 += v * b7; + t15 += v * b8; + t16 += v * b9; + t17 += v * b10; + t18 += v * b11; + t19 += v * b12; + t20 += v * b13; + t21 += v * b14; + t22 += v * b15; + v = a[8]; + t8 += v * b0; + t9 += v * b1; + t10 += v * b2; + t11 += v * b3; + t12 += v * b4; + t13 += v * b5; + t14 += v * b6; + t15 += v * b7; + t16 += v * b8; + t17 += v * b9; + t18 += v * b10; + t19 += v * b11; + t20 += v * b12; + t21 += v * b13; + t22 += v * b14; + t23 += v * b15; + v = a[9]; + t9 += v * b0; + t10 += v * b1; + t11 += v * b2; + t12 += v * b3; + t13 += v * b4; + t14 += v * b5; + t15 += v * b6; + t16 += v * b7; + t17 += v * b8; + t18 += v * b9; + t19 += v * b10; + t20 += v * b11; + t21 += v * b12; + t22 += v * b13; + t23 += v * b14; + t24 += v * b15; + v = a[10]; + t10 += v * b0; + t11 += v * b1; + t12 += v * b2; + t13 += v * b3; + t14 += v * b4; + t15 += v * b5; + t16 += v * b6; + t17 += v * b7; + t18 += v * b8; + t19 += v * b9; + t20 += v * b10; + t21 += v * b11; + t22 += v * b12; + t23 += v * b13; + t24 += v * b14; + t25 += v * b15; + v = a[11]; + t11 += v * b0; + t12 += v * b1; + t13 += v * b2; + t14 += v * b3; + t15 += v * b4; + t16 += v * b5; + t17 += v * b6; + t18 += v * b7; + t19 += v * b8; + t20 += v * b9; + t21 += v * b10; + t22 += v * b11; + t23 += v * b12; + t24 += v * b13; + t25 += v * b14; + t26 += v * b15; + v = a[12]; + t12 += v * b0; + t13 += v * b1; + t14 += v * b2; + t15 += v * b3; + t16 += v * b4; + t17 += v * b5; + t18 += v * b6; + t19 += v * b7; + t20 += v * b8; + t21 += v * b9; + t22 += v * b10; + t23 += v * b11; + t24 += v * b12; + t25 += v * b13; + t26 += v * b14; + t27 += v * b15; + v = a[13]; + t13 += v * b0; + t14 += v * b1; + t15 += v * b2; + t16 += v * b3; + t17 += v * b4; + t18 += v * b5; + t19 += v * b6; + t20 += v * b7; + t21 += v * b8; + t22 += v * b9; + t23 += v * b10; + t24 += v * b11; + t25 += v * b12; + t26 += v * b13; + t27 += v * b14; + t28 += v * b15; + v = a[14]; + t14 += v * b0; + t15 += v * b1; + t16 += v * b2; + t17 += v * b3; + t18 += v * b4; + t19 += v * b5; + t20 += v * b6; + t21 += v * b7; + t22 += v * b8; + t23 += v * b9; + t24 += v * b10; + t25 += v * b11; + t26 += v * b12; + t27 += v * b13; + t28 += v * b14; + t29 += v * b15; + v = a[15]; + t15 += v * b0; + t16 += v * b1; + t17 += v * b2; + t18 += v * b3; + t19 += v * b4; + t20 += v * b5; + t21 += v * b6; + t22 += v * b7; + t23 += v * b8; + t24 += v * b9; + t25 += v * b10; + t26 += v * b11; + t27 += v * b12; + t28 += v * b13; + t29 += v * b14; + t30 += v * b15; + + t0 += 38 * t16; + t1 += 38 * t17; + t2 += 38 * t18; + t3 += 38 * t19; + t4 += 38 * t20; + t5 += 38 * t21; + t6 += 38 * t22; + t7 += 38 * t23; + t8 += 38 * t24; + t9 += 38 * t25; + t10 += 38 * t26; + t11 += 38 * t27; + t12 += 38 * t28; + t13 += 38 * t29; + t14 += 38 * t30; + // t15 left as is + + // first car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + // second car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + o[ 0] = t0; + o[ 1] = t1; + o[ 2] = t2; + o[ 3] = t3; + o[ 4] = t4; + o[ 5] = t5; + o[ 6] = t6; + o[ 7] = t7; + o[ 8] = t8; + o[ 9] = t9; + o[10] = t10; + o[11] = t11; + o[12] = t12; + o[13] = t13; + o[14] = t14; + o[15] = t15; +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function crypto_hashblocks_hl(hh, hl, m, n) { + var wh = new Int32Array(16), wl = new Int32Array(16), + bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, + bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, + th, tl, i, j, h, l, a, b, c, d; + + var ah0 = hh[0], + ah1 = hh[1], + ah2 = hh[2], + ah3 = hh[3], + ah4 = hh[4], + ah5 = hh[5], + ah6 = hh[6], + ah7 = hh[7], + + al0 = hl[0], + al1 = hl[1], + al2 = hl[2], + al3 = hl[3], + al4 = hl[4], + al5 = hl[5], + al6 = hl[6], + al7 = hl[7]; + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) { + j = 8 * i + pos; + wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; + wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; + } + for (i = 0; i < 80; i++) { + bh0 = ah0; + bh1 = ah1; + bh2 = ah2; + bh3 = ah3; + bh4 = ah4; + bh5 = ah5; + bh6 = ah6; + bh7 = ah7; + + bl0 = al0; + bl1 = al1; + bl2 = al2; + bl3 = al3; + bl4 = al4; + bl5 = al5; + bl6 = al6; + bl7 = al7; + + // add + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma1 + h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); + l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Ch + h = (ah4 & ah5) ^ (~ah4 & ah6); + l = (al4 & al5) ^ (~al4 & al6); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // K + h = K[i*2]; + l = K[i*2+1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // w + h = wh[i%16]; + l = wl[i%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + th = c & 0xffff | d << 16; + tl = a & 0xffff | b << 16; + + // add + h = th; + l = tl; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma0 + h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); + l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Maj + h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); + l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh7 = (c & 0xffff) | (d << 16); + bl7 = (a & 0xffff) | (b << 16); + + // add + h = bh3; + l = bl3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = th; + l = tl; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh3 = (c & 0xffff) | (d << 16); + bl3 = (a & 0xffff) | (b << 16); + + ah1 = bh0; + ah2 = bh1; + ah3 = bh2; + ah4 = bh3; + ah5 = bh4; + ah6 = bh5; + ah7 = bh6; + ah0 = bh7; + + al1 = bl0; + al2 = bl1; + al3 = bl2; + al4 = bl3; + al5 = bl4; + al6 = bl5; + al7 = bl6; + al0 = bl7; + + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + // add + h = wh[j]; + l = wl[j]; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = wh[(j+9)%16]; + l = wl[(j+9)%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma0 + th = wh[(j+1)%16]; + tl = wl[(j+1)%16]; + h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); + l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma1 + th = wh[(j+14)%16]; + tl = wl[(j+14)%16]; + h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); + l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + wh[j] = (c & 0xffff) | (d << 16); + wl[j] = (a & 0xffff) | (b << 16); + } + } + } + + // add + h = ah0; + l = al0; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[0]; + l = hl[0]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[0] = ah0 = (c & 0xffff) | (d << 16); + hl[0] = al0 = (a & 0xffff) | (b << 16); + + h = ah1; + l = al1; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[1]; + l = hl[1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[1] = ah1 = (c & 0xffff) | (d << 16); + hl[1] = al1 = (a & 0xffff) | (b << 16); + + h = ah2; + l = al2; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[2]; + l = hl[2]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[2] = ah2 = (c & 0xffff) | (d << 16); + hl[2] = al2 = (a & 0xffff) | (b << 16); + + h = ah3; + l = al3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[3]; + l = hl[3]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[3] = ah3 = (c & 0xffff) | (d << 16); + hl[3] = al3 = (a & 0xffff) | (b << 16); + + h = ah4; + l = al4; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[4]; + l = hl[4]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[4] = ah4 = (c & 0xffff) | (d << 16); + hl[4] = al4 = (a & 0xffff) | (b << 16); + + h = ah5; + l = al5; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[5]; + l = hl[5]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[5] = ah5 = (c & 0xffff) | (d << 16); + hl[5] = al5 = (a & 0xffff) | (b << 16); + + h = ah6; + l = al6; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[6]; + l = hl[6]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[6] = ah6 = (c & 0xffff) | (d << 16); + hl[6] = al6 = (a & 0xffff) | (b << 16); + + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[7]; + l = hl[7]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[7] = ah7 = (c & 0xffff) | (d << 16); + hl[7] = al7 = (a & 0xffff) | (b << 16); + + pos += 128; + n -= 128; + } + + return n; +} + +function crypto_hash(out, m, n) { + var hh = new Int32Array(8), + hl = new Int32Array(8), + x = new Uint8Array(256), + i, b = n; + + hh[0] = 0x6a09e667; + hh[1] = 0xbb67ae85; + hh[2] = 0x3c6ef372; + hh[3] = 0xa54ff53a; + hh[4] = 0x510e527f; + hh[5] = 0x9b05688c; + hh[6] = 0x1f83d9ab; + hh[7] = 0x5be0cd19; + + hl[0] = 0xf3bcc908; + hl[1] = 0x84caa73b; + hl[2] = 0xfe94f82b; + hl[3] = 0x5f1d36f1; + hl[4] = 0xade682d1; + hl[5] = 0x2b3e6c1f; + hl[6] = 0xfb41bd6b; + hl[7] = 0x137e2179; + + crypto_hashblocks_hl(hh, hl, m, n); + n %= 128; + + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, (b / 0x20000000) | 0, b << 3); + crypto_hashblocks_hl(hh, hl, x, n); + + for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto && crypto.randomBytes) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/test-eol-project/node_modules/tweetnacl/nacl-fast.min.js b/test-eol-project/node_modules/tweetnacl/nacl-fast.min.js new file mode 100644 index 00000000..8bc47daa --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/nacl-fast.min.js @@ -0,0 +1,2 @@ +!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;i>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+c|0,B=B+u|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M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19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,c=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=i[s];for(;o>=64;){for(a(u,c,h,ur),s=0;s<64;s++)r[t+s]=n[e+s]^u[s];for(f=1,s=8;s<16;s++)f=f+(255&c[s])|0,c[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(u,c,h,ur),s=0;s=64;){for(a(s,f,o,ur),h=0;h<64;h++)r[t+h]=s[h];for(i=1,h=8;h<16;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,ur),h=0;h>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;n<16;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,c=0,u=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z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*E,f+=38*x,s+=38*M,c+=38*m,u+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=c,r[6]=u,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g;r[14]=_;r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),c=$(),u=$(),y=$();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;o<16;o++)f[o]=h[o],c[o]=a[o]=s[o]=0;for(a[0]=c[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,c,e),x(u,a,s),M(a,a,s),x(s,f,c),M(f,f,c),B(c,u),B(y,a),m(a,s,a),m(s,f,u),x(u,a,s),M(a,a,s),B(f,a),M(s,c,y),m(a,s,ir),x(a,a,c),m(s,s,a),m(a,c,y),m(c,f,h),B(f,u),_(a,f,e),_(s,c,e);for(o=0;o<16;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=c[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,ur)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;U<16;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;U<80;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,c=N,u=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,u=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=c,k=u,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;E<16;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;o=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*vr[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),c=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var u=n+64;for(o=0;o>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],c=[$(),$(),$(),$()];if(h=-1,n<64)return-1;if(X(c,e))return-1;for(i=0;i>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),c=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|c<<8),k+=c>>>5|U,u=0,y=u,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),u=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),u+=y>>>13,y&=8191,l=u,l+=E*z,l+=x*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=8191,u=(u<<2)+u|0,u=u+y|0,y=8191&u,u>>>=13,l+=u,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;e=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n void): void; +} diff --git a/test-eol-project/node_modules/tweetnacl/nacl.js b/test-eol-project/node_modules/tweetnacl/nacl.js new file mode 100644 index 00000000..f72dd78d --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/nacl.js @@ -0,0 +1,1175 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function L32(x, c) { return (x << c) | (x >>> (32 - c)); } + +function ld32(x, i) { + var u = x[i+3] & 0xff; + u = (u<<8)|(x[i+2] & 0xff); + u = (u<<8)|(x[i+1] & 0xff); + return (u<<8)|(x[i+0] & 0xff); +} + +function dl64(x, i) { + var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; + var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; + return new u64(h, l); +} + +function st32(x, j, u) { + var i; + for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } +} + +function ts64(x, i, u) { + x[i] = (u.hi >> 24) & 0xff; + x[i+1] = (u.hi >> 16) & 0xff; + x[i+2] = (u.hi >> 8) & 0xff; + x[i+3] = u.hi & 0xff; + x[i+4] = (u.lo >> 24) & 0xff; + x[i+5] = (u.lo >> 16) & 0xff; + x[i+6] = (u.lo >> 8) & 0xff; + x[i+7] = u.lo & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core(out,inp,k,c,h) { + var w = new Uint32Array(16), x = new Uint32Array(16), + y = new Uint32Array(16), t = new Uint32Array(4); + var i, j, m; + + for (i = 0; i < 4; i++) { + x[5*i] = ld32(c, 4*i); + x[1+i] = ld32(k, 4*i); + x[6+i] = ld32(inp, 4*i); + x[11+i] = ld32(k, 16+4*i); + } + + for (i = 0; i < 16; i++) y[i] = x[i]; + + for (i = 0; i < 20; i++) { + for (j = 0; j < 4; j++) { + for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; + t[1] ^= L32((t[0]+t[3])|0, 7); + t[2] ^= L32((t[1]+t[0])|0, 9); + t[3] ^= L32((t[2]+t[1])|0,13); + t[0] ^= L32((t[3]+t[2])|0,18); + for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; + } + for (m = 0; m < 16; m++) x[m] = w[m]; + } + + if (h) { + for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; + for (i = 0; i < 4; i++) { + x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; + x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; + } + for (i = 0; i < 4; i++) { + st32(out,4*i,x[5*i]); + st32(out,16+4*i,x[6+i]); + } + } else { + for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); + } +} + +function crypto_core_salsa20(out,inp,k,c) { + core(out,inp,k,c,false); + return 0; +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core(out,inp,k,c,true); + return 0; +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + if (!b) return 0; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + if (m) mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,d,n,k) { + return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); +} + +function add1305(h, c) { + var j, u = 0; + for (j = 0; j < 17; j++) { + u = (u + ((h[j] + c[j]) | 0)) | 0; + h[j] = u & 255; + u >>>= 8; + } +} + +var minusp = new Uint32Array([ + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 +]); + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s, i, j, u; + var x = new Uint32Array(17), r = new Uint32Array(17), + h = new Uint32Array(17), c = new Uint32Array(17), + g = new Uint32Array(17); + for (j = 0; j < 17; j++) r[j]=h[j]=0; + for (j = 0; j < 16; j++) r[j]=k[j]; + r[3]&=15; + r[4]&=252; + r[7]&=15; + r[8]&=252; + r[11]&=15; + r[12]&=252; + r[15]&=15; + + while (n > 0) { + for (j = 0; j < 17; j++) c[j] = 0; + for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; + c[j] = 1; + mpos += j; n -= j; + add1305(h,c); + for (i = 0; i < 17; i++) { + x[i] = 0; + for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; + } + for (i = 0; i < 17; i++) h[i] = x[i]; + u = 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u & 3; + u = (5 * (u >>> 2)) | 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u; + } + + for (j = 0; j < 17; j++) g[j] = h[j]; + add1305(h,minusp); + s = (-(h[16] >>> 7) | 0); + for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); + + for (j = 0; j < 16; j++) c[j] = k[j + 16]; + c[16] = 0; + add1305(h,c); + for (j = 0; j < 16; j++) out[outpos+j] = h[j]; + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var c; + var i; + for (i = 0; i < 16; i++) { + o[i] += 65536; + c = Math.floor(o[i] / 65536); + o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); + o[i] -= (c * 65536); + } +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; +} + +function Z(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; +} + +function M(o, a, b) { + var i, j, t = new Float64Array(31); + for (i = 0; i < 31; i++) t[i] = 0; + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { + t[i+j] += a[i] * b[j]; + } + } + for (i = 0; i < 15; i++) { + t[i] += 38 * t[i+16]; + } + for (i = 0; i < 16; i++) o[i] = t[i]; + car25519(o); + car25519(o); +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +function add64() { + var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; + for (i = 0; i < arguments.length; i++) { + l = arguments[i].lo; + h = arguments[i].hi; + a += (l & m16); b += (l >>> 16); + c += (h & m16); d += (h >>> 16); + } + + b += (a >>> 16); + c += (b >>> 16); + d += (c >>> 16); + + return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); +} + +function shr64(x, c) { + return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); +} + +function xor64() { + var l = 0, h = 0, i; + for (i = 0; i < arguments.length; i++) { + l ^= arguments[i].lo; + h ^= arguments[i].hi; + } + return new u64(h, l); +} + +function R(x, c) { + var h, l, c1 = 32 - c; + if (c < 32) { + h = (x.hi >>> c) | (x.lo << c1); + l = (x.lo >>> c) | (x.hi << c1); + } else if (c < 64) { + h = (x.lo >>> c) | (x.hi << c1); + l = (x.hi >>> c) | (x.lo << c1); + } + return new u64(h, l); +} + +function Ch(x, y, z) { + var h = (x.hi & y.hi) ^ (~x.hi & z.hi), + l = (x.lo & y.lo) ^ (~x.lo & z.lo); + return new u64(h, l); +} + +function Maj(x, y, z) { + var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), + l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); + return new u64(h, l); +} + +function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } +function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } +function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } +function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } + +var K = [ + new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), + new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), + new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), + new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), + new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), + new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), + new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), + new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), + new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), + new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), + new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), + new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), + new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), + new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), + new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), + new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), + new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), + new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), + new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), + new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), + new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), + new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), + new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), + new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), + new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), + new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), + new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), + new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), + new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), + new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), + new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), + new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), + new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), + new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), + new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), + new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), + new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), + new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), + new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), + new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) +]; + +function crypto_hashblocks(x, m, n) { + var z = [], b = [], a = [], w = [], t, i, j; + + for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); + for (i = 0; i < 80; i++) { + for (j = 0; j < 8; j++) b[j] = a[j]; + t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); + b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); + b[3] = add64(b[3], t); + for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); + } + } + } + + for (i = 0; i < 8; i++) { + a[i] = add64(a[i], z[i]); + z[i] = a[i]; + } + + pos += 128; + n -= 128; + } + + for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); + return n; +} + +var iv = new Uint8Array([ + 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, + 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, + 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, + 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, + 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, + 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, + 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, + 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 +]); + +function crypto_hash(out, m, n) { + var h = new Uint8Array(64), x = new Uint8Array(256); + var i, b = n; + + for (i = 0; i < 64; i++) h[i] = iv[i]; + + crypto_hashblocks(h, m, n); + n %= 128; + + for (i = 0; i < 256; i++) x[i] = 0; + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); + crypto_hashblocks(h, x, n); + + for (i = 0; i < 64; i++) out[i] = h[i]; + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto && crypto.randomBytes) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/test-eol-project/node_modules/tweetnacl/nacl.min.js b/test-eol-project/node_modules/tweetnacl/nacl.min.js new file mode 100644 index 00000000..4484974e --- /dev/null +++ b/test-eol-project/node_modules/tweetnacl/nacl.min.js @@ -0,0 +1 @@ +!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new sr(e,t)}function o(r,n,e){var t;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;i>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),l=new Uint32Array(16),s=new Uint32Array(16),h=new Uint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}else for(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function l(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),l=new Uint32Array(17),s=new Uint32Array(17),h=new Uint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;e<16;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var s=a.subarray(32),h=a.subarray(16);return k(s,s),Y(h,h,s),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new sr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new sr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r>>n|r.lo<>>n|r.hi<>>n|r.hi<>>n|r.lo<=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;o>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", + "test": "npm run test-node-all && npm run test-browser", + "bench": "node test/benchmark/bench.js", + "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/dchest/tweetnacl-js.git" + }, + "keywords": [ + "crypto", + "cryptography", + "curve25519", + "ed25519", + "encrypt", + "hash", + "key", + "nacl", + "poly1305", + "public", + "salsa20", + "signatures" + ], + "author": "TweetNaCl-js contributors", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/dchest/tweetnacl-js/issues" + }, + "homepage": "https://tweetnacl.js.org", + "devDependencies": { + "browserify": "^13.0.0", + "eslint": "^2.2.0", + "faucet": "^0.0.1", + "tap-browser-color": "^0.1.2", + "tape": "^4.4.0", + "tape-run": "^2.1.3", + "tweetnacl-util": "^0.13.3", + "uglify-js": "^2.6.1" + }, + "browser": { + "buffer": false, + "crypto": false + } +} diff --git a/test-eol-project/node_modules/uri-js/LICENSE b/test-eol-project/node_modules/uri-js/LICENSE new file mode 100755 index 00000000..9338bde8 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/LICENSE @@ -0,0 +1,11 @@ +Copyright 2011 Gary Court. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY GARY COURT "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 GARY COURT 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. + +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. diff --git a/test-eol-project/node_modules/uri-js/README.md b/test-eol-project/node_modules/uri-js/README.md new file mode 100755 index 00000000..43e648bb --- /dev/null +++ b/test-eol-project/node_modules/uri-js/README.md @@ -0,0 +1,203 @@ +# URI.js + +URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc). +It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications. + +URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated). + +## API + +### Parsing + + URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body"); + //returns: + //{ + // scheme : "uri", + // userinfo : "user:pass", + // host : "example.com", + // port : 123, + // path : "/one/two.three", + // query : "q1=a1&q2=a2", + // fragment : "body" + //} + +### Serializing + + URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer" + +### Resolving + + URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g" + +### Normalizing + + URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html" + +### Comparison + + URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true + +### IP Support + + //IPv4 normalization + URI.normalize("//192.068.001.000") === "//192.68.1.0" + + //IPv6 normalization + URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]" + + //IPv6 zone identifier support + URI.parse("//[2001:db8::7%25en1]"); + //returns: + //{ + // host : "2001:db8::7%en1" + //} + +### IRI Support + + //convert IRI to URI + URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9" + //convert URI to IRI + URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé" + +### Options + +All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties: + +* `scheme` (string) + + Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior. + +* `reference` (string) + + If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme. + +* `tolerant` (boolean, false) + + If set to `true`, the parser will relax URI resolving rules. + +* `absolutePath` (boolean, false) + + If set to `true`, the serializer will not resolve a relative `path` component. + +* `iri` (boolean, false) + + If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). + +* `unicodeSupport` (boolean, false) + + If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). + +* `domainHost` (boolean, false) + + If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt). + +## Scheme Extendable + +URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes: + +* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\] +* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\] +* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\] +* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\] +* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\] +* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\] +* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\] + +### HTTP/HTTPS Support + + URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true + URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true + +### WS/WSS Support + + URI.parse("wss://example.com/foo?bar=baz"); + //returns: + //{ + // scheme : "wss", + // host: "example.com", + // resourceName: "/foo?bar=baz", + // secure: true, + //} + + URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true + +### Mailto Support + + URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!"); + //returns: + //{ + // scheme : "mailto", + // to : ["alpha@example.com", "bravo@example.com"], + // subject : "SUBSCRIBE", + // body : "Sign me up!" + //} + + URI.serialize({ + scheme : "mailto", + to : ["alpha@example.com"], + subject : "REMOVE", + body : "Please remove me", + headers : { + cc : "charlie@example.com" + } + }) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me" + +### URN Support + + URI.parse("urn:example:foo"); + //returns: + //{ + // scheme : "urn", + // nid : "example", + // nss : "foo", + //} + +#### URN UUID Support + + URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); + //returns: + //{ + // scheme : "urn", + // nid : "uuid", + // uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", + //} + +## Usage + +To load in a browser, use the following tag: + + + +To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line: + + npm install uri-js + # OR + yarn add uri-js + +Then, in your code, load it using: + + const URI = require("uri-js"); + +If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using: + + import * as URI from "uri-js"; + +Or you can load just what you need using named exports: + + import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js"; + +## Breaking changes + +### Breaking changes from 3.x + +URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler. + +The UUID of a URN can now be found in the `uuid` property. + +### Breaking changes from 2.x + +URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful. + +### Breaking changes from 1.x + +The `errors` array on parsed components is now an `error` string. diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts new file mode 100755 index 00000000..da51e235 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts @@ -0,0 +1,59 @@ +export interface URIComponents { + scheme?: string; + userinfo?: string; + host?: string; + port?: number | string; + path?: string; + query?: string; + fragment?: string; + reference?: string; + error?: string; +} +export interface URIOptions { + scheme?: string; + reference?: string; + tolerant?: boolean; + absolutePath?: boolean; + iri?: boolean; + unicodeSupport?: boolean; + domainHost?: boolean; +} +export interface URISchemeHandler { + scheme: string; + parse(components: ParentComponents, options: Options): Components; + serialize(components: Components, options: Options): ParentComponents; + unicodeSupport?: boolean; + domainHost?: boolean; + absolutePath?: boolean; +} +export interface URIRegExps { + NOT_SCHEME: RegExp; + NOT_USERINFO: RegExp; + NOT_HOST: RegExp; + NOT_PATH: RegExp; + NOT_PATH_NOSCHEME: RegExp; + NOT_QUERY: RegExp; + NOT_FRAGMENT: RegExp; + ESCAPE: RegExp; + UNRESERVED: RegExp; + OTHER_CHARS: RegExp; + PCT_ENCODED: RegExp; + IPV4ADDRESS: RegExp; + IPV6ADDRESS: RegExp; +} +export declare const SCHEMES: { + [scheme: string]: URISchemeHandler; +}; +export declare function pctEncChar(chr: string): string; +export declare function pctDecChars(str: string): string; +export declare function parse(uriString: string, options?: URIOptions): URIComponents; +export declare function removeDotSegments(input: string): string; +export declare function serialize(components: URIComponents, options?: URIOptions): string; +export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; +export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; +export declare function normalize(uri: string, options?: URIOptions): string; +export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; +export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; +export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; +export declare function escapeComponent(str: string, options?: URIOptions): string; +export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js new file mode 100755 index 00000000..0706116f --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js @@ -0,0 +1,1443 @@ +/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.URI = global.URI || {}))); +}(this, (function (exports) { 'use strict'; + +function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + //normalize the default port + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +function isSecure(wsComponents) { + return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; +} +//RFC 6455 +var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse(components, options) { + var wsComponents = components; + //indicate if the secure flag is set + wsComponents.secure = isSecure(wsComponents); + //construct resouce name + wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); + wsComponents.path = undefined; + wsComponents.query = undefined; + return wsComponents; + }, + serialize: function serialize(wsComponents, options) { + //normalize the default port + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = undefined; + } + //ensure scheme matches secure flag + if (typeof wsComponents.secure === 'boolean') { + wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; + wsComponents.secure = undefined; + } + //reconstruct path from resource name + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split('?'), + _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), + path = _wsComponents$resourc2[0], + query = _wsComponents$resourc2[1]; + + wsComponents.path = path && path !== '/' ? path : undefined; + wsComponents.query = query; + wsComponents.resourceName = undefined; + } + //forbid fragment component + wsComponents.fragment = undefined; + return wsComponents; + } +}; + +var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$6 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; +SCHEMES[handler$5.scheme] = handler$5; +SCHEMES[handler$6.scheme] = handler$6; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=uri.all.js.map diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map new file mode 100755 index 00000000..5b30c4e2 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","wss","ws","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","wsComponents","fragment","resourceName","secure","port","isSecure","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_O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,OAAOT,QAAQS,GAAvC,UAA8CZ,GAA9C;eAEOU,aAAP;;CA1CF,CA8CA;;AD5DA,IAAMH,OAAO,0DAAb;AACA,AAEA;AACA,IAAME,YAAsE;YAClE,UADkE;WAGnE,eAAUV,aAAV,EAAuCI,OAAvC,EAAT;YACQF,iBAAiBF,aAAvB;uBACeR,IAAf,GAAsBU,eAAeD,GAArC;uBACeA,GAAf,GAAqBQ,SAArB;YAEI,CAACL,QAAQE,QAAT,KAAsB,CAACJ,eAAeV,IAAhB,IAAwB,CAACU,eAAeV,IAAf,CAAoBe,KAApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeV,IAAf,IAAuB,EAAxB,EAA4BW,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAT,QAAQQ,QAAKN,MAAb,IAAuBM,OAAvB;AAEA,AACAR,QAAQO,UAAML,MAAd,IAAwBK,SAAxB;AAEA,AACAP,QAAQM,UAAGJ,MAAX,IAAqBI,SAArB;AAEA,AACAN,QAAQK,UAAIH,MAAZ,IAAsBG,SAAtB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts new file mode 100755 index 00000000..da51e235 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts @@ -0,0 +1,59 @@ +export interface URIComponents { + scheme?: string; + userinfo?: string; + host?: string; + port?: number | string; + path?: string; + query?: string; + fragment?: string; + reference?: string; + error?: string; +} +export interface URIOptions { + scheme?: string; + reference?: string; + tolerant?: boolean; + absolutePath?: boolean; + iri?: boolean; + unicodeSupport?: boolean; + domainHost?: boolean; +} +export interface URISchemeHandler { + scheme: string; + parse(components: ParentComponents, options: Options): Components; + serialize(components: Components, options: Options): ParentComponents; + unicodeSupport?: boolean; + domainHost?: boolean; + absolutePath?: boolean; +} +export interface URIRegExps { + NOT_SCHEME: RegExp; + NOT_USERINFO: RegExp; + NOT_HOST: RegExp; + NOT_PATH: RegExp; + NOT_PATH_NOSCHEME: RegExp; + NOT_QUERY: RegExp; + NOT_FRAGMENT: RegExp; + ESCAPE: RegExp; + UNRESERVED: RegExp; + OTHER_CHARS: RegExp; + PCT_ENCODED: RegExp; + IPV4ADDRESS: RegExp; + IPV6ADDRESS: RegExp; +} +export declare const SCHEMES: { + [scheme: string]: URISchemeHandler; +}; +export declare function pctEncChar(chr: string): string; +export declare function pctDecChars(str: string): string; +export declare function parse(uriString: string, options?: URIOptions): URIComponents; +export declare function removeDotSegments(input: string): string; +export declare function serialize(components: URIComponents, options?: URIOptions): string; +export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; +export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; +export declare function normalize(uri: string, options?: URIOptions): string; +export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; +export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; +export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; +export declare function escapeComponent(str: string, options?: URIOptions): string; +export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js new file mode 100755 index 00000000..fcd84586 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js @@ -0,0 +1,3 @@ +/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function g(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=T(n,2),o=t[1];return o?o.split(".").map(m).join("."):e}function v(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=T(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=T(i,2),s=u[0],f=u[1],c=f?f.split(":").map(m):[],p=s.split(":").map(m),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,v=Array(d),E=0;E1){var A=v.slice(0,y.index),D=v.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=v.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?R:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(K);if(o){W?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=v(g(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=J[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=B.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?R:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(v(g(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(ee))e=e.replace(ee,"/");else if(e.match(re))e=e.replace(re,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(ne);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?R:F,t=[],o=J[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?R.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?R.PCT_ENCODED:F.PCT_ENCODED,d)}function N(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function I(e){var r=d(e);return r.match(he)?r:e}var F=u(!1),R=u(!0),T=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode,$=function(e){return String.fromCodePoint.apply(String,_(e))},M=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},V=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},k=function(e,r,n){var t=0;for(e=n?z(e/700):e>>1,e+=z(e/r);e>455;t+=36)e=z(e/35);return z(t+36*e/(e+38))},Z=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=M(e.charCodeAt(f++));(d>=36||d>z((P-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dz(P/m)&&s("overflow"),p*=m}var g=r.length+1;a=k(t-c,g,0==c),z(t/g)>P-o&&s("overflow"),o+=z(t/g),t%=g,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},G=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(L(d))}}catch(U){u=!0,f=U}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,m=l;for(l&&r.push("-");m=t&&Az((P-o)/D)&&s("overflow"),o+=(g-t)*D,t=g;var w=!0,b=!1,x=undefined;try{for(var O,N=e[Symbol.iterator]();!(w=(O=N.next()).done);w=!0){var I=O.value;if(IP&&s("overflow"),I==t){for(var F=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(FA-Z\\x5E-\\x7E]",'[\\"\\\\]'),he=new RegExp(se,"g"),de=new RegExp(ce,"g"),le=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pe),"g"),me=new RegExp(r("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ge=me,ve={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts new file mode 100755 index 00000000..f6be7603 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts @@ -0,0 +1 @@ +export * from "./uri"; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/index.js b/test-eol-project/node_modules/uri-js/dist/esnext/index.js new file mode 100755 index 00000000..e3531b5b --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/index.js @@ -0,0 +1,17 @@ +import { SCHEMES } from "./uri"; +import http from "./schemes/http"; +SCHEMES[http.scheme] = http; +import https from "./schemes/https"; +SCHEMES[https.scheme] = https; +import ws from "./schemes/ws"; +SCHEMES[ws.scheme] = ws; +import wss from "./schemes/wss"; +SCHEMES[wss.scheme] = wss; +import mailto from "./schemes/mailto"; +SCHEMES[mailto.scheme] = mailto; +import urn from "./schemes/urn"; +SCHEMES[urn.scheme] = urn; +import uuid from "./schemes/urn-uuid"; +SCHEMES[uuid.scheme] = uuid; +export * from "./uri"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/index.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/index.js.map new file mode 100755 index 00000000..0971f6eb --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAExB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts new file mode 100755 index 00000000..c91cdacb --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts @@ -0,0 +1,3 @@ +import { URIRegExps } from "./uri"; +declare const _default: URIRegExps; +export default _default; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js new file mode 100755 index 00000000..34e7de98 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js @@ -0,0 +1,3 @@ +import { buildExps } from "./regexps-uri"; +export default buildExps(true); +//# sourceMappingURL=regexps-iri.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map new file mode 100755 index 00000000..2269c580 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts new file mode 100755 index 00000000..6096bda5 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts @@ -0,0 +1,4 @@ +import { URIRegExps } from "./uri"; +export declare function buildExps(isIRI: boolean): URIRegExps; +declare const _default: URIRegExps; +export default _default; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js new file mode 100755 index 00000000..1cc659f1 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js @@ -0,0 +1,42 @@ +import { merge, subexp } from "./util"; +export function buildExps(isIRI) { + const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive + LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +export default buildExps(false); +//# sourceMappingURL=regexps-uri.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map new file mode 100755 index 00000000..cb028b80 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EA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,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC;QACtG,YAAY,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAAE,GAAG,CAAC;QAC7F,MAAM,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,GAAG,CAAC;QAClE,UAAU,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC1C,WAAW,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC;QACxE,WAAW,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC3C,WAAW,EAAG,IAAI,MAAM,CAAC,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC;QACpD,WAAW,EAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAE,sCAAsC;KACrL,CAAC;AACH,CAAC;AAED,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts new file mode 100755 index 00000000..fe5b2f35 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts @@ -0,0 +1,3 @@ +import { URISchemeHandler } from "../uri"; +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js new file mode 100755 index 00000000..6abf0fe6 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js @@ -0,0 +1,28 @@ +const handler = { + scheme: "http", + domainHost: true, + parse: function (components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function (components, options) { + const secure = String(components.scheme).toLowerCase() === "https"; + //normalize the default port + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; +export default handler; +//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map new file mode 100755 index 00000000..82118970 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map @@ -0,0 +1 @@ +{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;QAEnE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACtE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts new file mode 100755 index 00000000..fe5b2f35 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts @@ -0,0 +1,3 @@ +import { URISchemeHandler } from "../uri"; +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js new file mode 100755 index 00000000..ec4b6e76 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js @@ -0,0 +1,9 @@ +import http from "./http"; +const handler = { + scheme: "https", + domainHost: http.domainHost, + parse: http.parse, + serialize: http.serialize +}; +export default handler; +//# sourceMappingURL=https.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map new file mode 100755 index 00000000..385b8efe --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map @@ -0,0 +1 @@ +{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts new file mode 100755 index 00000000..e2aefc2a --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts @@ -0,0 +1,12 @@ +import { URISchemeHandler, URIComponents } from "../uri"; +export interface MailtoHeaders { + [hfname: string]: string; +} +export interface MailtoComponents extends URIComponents { + to: Array; + headers?: MailtoHeaders; + subject?: string; + body?: string; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js new file mode 100755 index 00000000..2553713c --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js @@ -0,0 +1,148 @@ +import { pctEncChar, pctDecChars, unescapeComponent } from "../uri"; +import punycode from "punycode"; +import { merge, subexp, toUpperCase, toArray } from "../util"; +const O = {}; +const isIRI = true; +//RFC 3986 +const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"); +const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$); +const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$); +const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'); +//RFC 6068 +const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126 +const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$); +const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"); +const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$); +const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$); +const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"); +const HFNAME$ = subexp(QCHAR$ + "*"); +const HFVALUE$ = HFNAME$; +const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$); +const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"); +const HFIELDS$ = subexp("\\?" + HFIELDS2$); +const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"); +const UNRESERVED = new RegExp(UNRESERVED$$, "g"); +const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"); +const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +const NOT_HFVALUE = NOT_HFNAME; +const TO = new RegExp("^" + TO$ + "$"); +const HFIELDS = new RegExp("^" + HFIELDS2$ + "$"); +function decodeUnreserved(str) { + const decStr = pctDecChars(str); + return (!decStr.match(UNRESERVED) ? str : decStr); +} +const handler = { + scheme: "mailto", + parse: function (components, options) { + const mailtoComponents = components; + const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []); + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + let unknownHeaders = false; + const headers = {}; + const hfields = mailtoComponents.query.split("&"); + for (let x = 0, xl = hfields.length; x < xl; ++x) { + const hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + const toAddrs = hfield[1].split(","); + for (let x = 0, xl = toAddrs.length; x < xl; ++x) { + to.push(toAddrs[x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) + mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (let x = 0, xl = to.length; x < xl; ++x) { + const addr = to[x].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } + catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } + else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[x] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function (mailtoComponents, options) { + const components = mailtoComponents; + const to = toArray(mailtoComponents.to); + if (to) { + for (let x = 0, xl = to.length; x < xl; ++x) { + const toAddr = String(to[x]); + const atIdx = toAddr.lastIndexOf("@"); + const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + let domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); + } + catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + const headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) + headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) + headers["body"] = mailtoComponents.body; + const fields = []; + for (const name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + + "=" + + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; +export default handler; +//# sourceMappingURL=mailto.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map new file mode 100755 index 00000000..82dba9a1 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mailto.js","sourceRoot":"","sources":["../../../src/schemes/mailto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAa9D,MAAM,CAAC,GAAiB,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB,UAAU;AACV,MAAM,YAAY,GAAG,wBAAwB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,2EAA2E,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACjJ,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAE,kBAAkB;AACnD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,GAAG,QAAQ,GAA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,CAAC;oBAC7G,GAAG;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CACvH,CAAC;aACF;SACD;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YAClB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts new file mode 100755 index 00000000..e75f2e79 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts @@ -0,0 +1,7 @@ +import { URISchemeHandler, URIOptions } from "../uri"; +import { URNComponents } from "./urn"; +export interface UUIDComponents extends URNComponents { + uuid?: string; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js new file mode 100755 index 00000000..d1fce495 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js @@ -0,0 +1,23 @@ +const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/; +//RFC 4122 +const handler = { + scheme: "urn:uuid", + parse: function (urnComponents, options) { + const uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function (uuidComponents, options) { + const urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + }, +}; +export default handler; +//# sourceMappingURL=urn-uuid.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map new file mode 100755 index 00000000..3b7a8b3a --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map @@ -0,0 +1 @@ +{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts new file mode 100755 index 00000000..7e0c2fba --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts @@ -0,0 +1,10 @@ +import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; +export interface URNComponents extends URIComponents { + nid?: string; + nss?: string; +} +export interface URNOptions extends URIOptions { + nid?: string; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js new file mode 100755 index 00000000..5d3f10aa --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js @@ -0,0 +1,49 @@ +import { SCHEMES } from "../uri"; +const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})"; +const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})"; +const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]"; +const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)"; +const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"); +const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"); +const URN_PARSE = /^([^\:]+)\:(.*)/; +const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g; +//RFC 2141 +const handler = { + scheme: "urn", + parse: function (components, options) { + const matches = components.path && components.path.match(URN_PARSE); + let urnComponents = components; + if (matches) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = matches[1].toLowerCase(); + const nss = matches[2]; + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } + else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function (urnComponents, options) { + const scheme = options.scheme || urnComponents.scheme || "urn"; + const nid = urnComponents.nid; + const urnScheme = `${scheme}:${options.nid || nid}`; + const schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + const uriComponents = urnComponents; + const nss = urnComponents.nss; + uriComponents.path = `${nid || options.nid}:${nss}`; + return uriComponents; + }, +}; +export default handler; +//# sourceMappingURL=urn.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map new file mode 100755 index 00000000..ea43b0be --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,YAAY,GAAG,uBAAuB,CAAC;AAC7C,MAAM,OAAO,GAAG,mEAAmE,CAAC;AACpF,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,OAAO,GAAG,KAAK,CAAC;AAC7D,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACjE,MAAM,SAAS,GAAG,iBAAiB,CAAC;AACpC,MAAM,YAAY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AAG,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,aAAa,EAAE;YAClB,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;SACjF;QAED,MAAM,aAAa,GAAG,aAA8B,CAAC;QACrD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,aAAa,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QAEpD,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts new file mode 100755 index 00000000..47f4835b --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts @@ -0,0 +1,7 @@ +import { URISchemeHandler, URIComponents } from "../uri"; +export interface WSComponents extends URIComponents { + resourceName?: string; + secure?: boolean; +} +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js new file mode 100755 index 00000000..9277f035 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js @@ -0,0 +1,41 @@ +function isSecure(wsComponents) { + return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; +} +//RFC 6455 +const handler = { + scheme: "ws", + domainHost: true, + parse: function (components, options) { + const wsComponents = components; + //indicate if the secure flag is set + wsComponents.secure = isSecure(wsComponents); + //construct resouce name + wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); + wsComponents.path = undefined; + wsComponents.query = undefined; + return wsComponents; + }, + serialize: function (wsComponents, options) { + //normalize the default port + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = undefined; + } + //ensure scheme matches secure flag + if (typeof wsComponents.secure === 'boolean') { + wsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws'); + wsComponents.secure = undefined; + } + //reconstruct path from resource name + if (wsComponents.resourceName) { + const [path, query] = wsComponents.resourceName.split('?'); + wsComponents.path = (path && path !== '/' ? path : undefined); + wsComponents.query = query; + wsComponents.resourceName = undefined; + } + //forbid fragment component + wsComponents.fragment = undefined; + return wsComponents; + } +}; +export default handler; +//# sourceMappingURL=ws.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map new file mode 100755 index 00000000..186818cc --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../../src/schemes/ws.ts"],"names":[],"mappings":"AAOA,kBAAkB,YAAyB;IAC1C,OAAO,OAAO,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;AAC7H,CAAC;AAED,UAAU;AACV,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,IAAI;IAEb,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,YAAY,GAAG,UAA0B,CAAC;QAEhD,oCAAoC;QACpC,YAAY,CAAC,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE7C,wBAAwB;QACxB,YAAY,CAAC,YAAY,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,K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diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts new file mode 100755 index 00000000..fe5b2f35 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts @@ -0,0 +1,3 @@ +import { URISchemeHandler } from "../uri"; +declare const handler: URISchemeHandler; +export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js new file mode 100755 index 00000000..d1e22ccd --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js @@ -0,0 +1,9 @@ +import ws from "./ws"; +const handler = { + scheme: "wss", + domainHost: ws.domainHost, + parse: ws.parse, + serialize: ws.serialize +}; +export default handler; +//# sourceMappingURL=wss.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map new file mode 100755 index 00000000..e19006d9 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wss.js","sourceRoot":"","sources":["../../../src/schemes/wss.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,KAAK;IACd,UAAU,EAAG,EAAE,CAAC,UAAU;IAC1B,KAAK,EAAG,EAAE,CAAC,KAAK;IAChB,SAAS,EAAG,EAAE,CAAC,SAAS;CACxB,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts new file mode 100755 index 00000000..da51e235 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts @@ -0,0 +1,59 @@ +export interface URIComponents { + scheme?: string; + userinfo?: string; + host?: string; + port?: number | string; + path?: string; + query?: string; + fragment?: string; + reference?: string; + error?: string; +} +export interface URIOptions { + scheme?: string; + reference?: string; + tolerant?: boolean; + absolutePath?: boolean; + iri?: boolean; + unicodeSupport?: boolean; + domainHost?: boolean; +} +export interface URISchemeHandler { + scheme: string; + parse(components: ParentComponents, options: Options): Components; + serialize(components: Components, options: Options): ParentComponents; + unicodeSupport?: boolean; + domainHost?: boolean; + absolutePath?: boolean; +} +export interface URIRegExps { + NOT_SCHEME: RegExp; + NOT_USERINFO: RegExp; + NOT_HOST: RegExp; + NOT_PATH: RegExp; + NOT_PATH_NOSCHEME: RegExp; + NOT_QUERY: RegExp; + NOT_FRAGMENT: RegExp; + ESCAPE: RegExp; + UNRESERVED: RegExp; + OTHER_CHARS: RegExp; + PCT_ENCODED: RegExp; + IPV4ADDRESS: RegExp; + IPV6ADDRESS: RegExp; +} +export declare const SCHEMES: { + [scheme: string]: URISchemeHandler; +}; +export declare function pctEncChar(chr: string): string; +export declare function pctDecChars(str: string): string; +export declare function parse(uriString: string, options?: URIOptions): URIComponents; +export declare function removeDotSegments(input: string): string; +export declare function serialize(components: URIComponents, options?: URIOptions): string; +export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; +export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; +export declare function normalize(uri: string, options?: URIOptions): string; +export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; +export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; +export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; +export declare function escapeComponent(str: string, options?: URIOptions): string; +export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/uri.js b/test-eol-project/node_modules/uri-js/dist/esnext/uri.js new file mode 100755 index 00000000..659ce265 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/uri.js @@ -0,0 +1,480 @@ +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +import URI_PROTOCOL from "./regexps-uri"; +import IRI_PROTOCOL from "./regexps-iri"; +import punycode from "punycode"; +import { toUpperCase, typeOf, assign } from "./util"; +export const SCHEMES = {}; +export function pctEncChar(chr) { + const c = chr.charCodeAt(0); + let e; + if (c < 16) + e = "%0" + c.toString(16).toUpperCase(); + else if (c < 128) + e = "%" + c.toString(16).toUpperCase(); + else if (c < 2048) + e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); + else + e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); + return e; +} +export function pctDecChars(str) { + let newStr = ""; + let i = 0; + const il = str.length; + while (i < il) { + const c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } + else if (c >= 194 && c < 224) { + if ((il - i) >= 6) { + const c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + } + else { + newStr += str.substr(i, 6); + } + i += 6; + } + else if (c >= 224) { + if ((il - i) >= 9) { + const c2 = parseInt(str.substr(i + 4, 2), 16); + const c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + } + else { + newStr += str.substr(i, 9); + } + i += 9; + } + else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + const decStr = pctDecChars(str); + return (!decStr.match(protocol.UNRESERVED) ? str : decStr); + } + if (components.scheme) + components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) + components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) + components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) + components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) + components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) + components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} +; +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + const matches = host.match(protocol.IPV4ADDRESS) || []; + const [, address] = matches; + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } + else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + const matches = host.match(protocol.IPV6ADDRESS) || []; + const [, address, zone] = matches; + if (address) { + const [last, first] = address.toLowerCase().split('::').reverse(); + const firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + const lastFields = last.split(":").map(_stripLeadingZeros); + const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + const fieldCount = isLastFieldIPv4Address ? 7 : 8; + const lastFieldsStart = lastFields.length - fieldCount; + const fields = Array(fieldCount); + for (let x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + const allZeroFields = fields.reduce((acc, field, index) => { + if (!field || field === "0") { + const lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } + else { + acc.push({ index, length: 1 }); + } + } + return acc; + }, []); + const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0]; + let newHost; + if (longestZeroFields && longestZeroFields.length > 1) { + const newFirst = fields.slice(0, longestZeroFields.index); + const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } + else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } + else { + return host; + } +} +const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined; +export function parse(uriString, options = {}) { + const components = {}; + const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); + if (options.reference === "suffix") + uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + const matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } + else { //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); + components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); + components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); + //fix port number + if (isNaN(components.port)) { + components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } + else if (components.scheme === undefined) { + components.reference = "relative"; + } + else if (components.fragment === undefined) { + components.reference = "absolute"; + } + else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } + catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } + else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } + else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} +; +function _recomposeAuthority(components, options) { + const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); + const uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} +; +const RDS1 = /^\.\.?\//; +const RDS2 = /^\/\.(\/|$)/; +const RDS3 = /^\/\.\.(\/|$)/; +const RDS4 = /^\.\.?$/; +const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +export function removeDotSegments(input) { + const output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } + else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } + else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } + else if (input === "." || input === "..") { + input = ""; + } + else { + const im = input.match(RDS5); + if (im) { + const s = im[0]; + input = input.slice(s.length); + output.push(s); + } + else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} +; +export function serialize(components, options = {}) { + const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL); + const uriTokens = []; + //find scheme handler + const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) + schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) { + //TODO: normalize IPv6 address as per RFC 5952 + } + //if host component is a domain name + else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) { + //convert IDN via punycode + try { + components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); + } + catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + const authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + let s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} +; +export function resolveComponents(base, relative, options = {}, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } + else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } + else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } + else { + target.query = base.query; + } + } + else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } + else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } + else if (!base.path) { + target.path = relative.path; + } + else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} +; +export function resolve(baseURI, relativeURI, options) { + const schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} +; +export function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } + else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} +; +export function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } + else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } + else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} +; +export function escapeComponent(str, options) { + return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); +} +; +export function unescapeComponent(str, options) { + return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); +} +; +//# sourceMappingURL=uri.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map new file mode 100755 index 00000000..2e72ab18 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAiDrD,MAAM,CAAC,MAAM,OAAO,GAAsC,EAAE,CAAC;AAE7D,MAAM,qBAAqB,GAAU;IACpC,MAAM,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAQ,CAAC;IAEb,IAAI,CAAC,GAAG,EAAE;QAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;SAC/C,IAAI,CAAC,GAAG,GAAG;QAAE,CAAC,GAAG,GAA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,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACrI,CAAC;AAAA,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts new file mode 100755 index 00000000..7c128575 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts @@ -0,0 +1,6 @@ +export declare function merge(...sets: Array): string; +export declare function subexp(str: string): string; +export declare function typeOf(o: any): string; +export declare function toUpperCase(str: string): string; +export declare function toArray(obj: any): Array; +export declare function assign(target: object, source: any): any; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/util.js b/test-eol-project/node_modules/uri-js/dist/esnext/util.js new file mode 100755 index 00000000..072711ef --- /dev/null +++ b/test-eol-project/node_modules/uri-js/dist/esnext/util.js @@ -0,0 +1,36 @@ +export function merge(...sets) { + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + const xl = sets.length - 1; + for (let x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } + else { + return sets[0]; + } +} +export function subexp(str) { + return "(?:" + str + ")"; +} +export function typeOf(o) { + return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); +} +export function toUpperCase(str) { + return str.toUpperCase(); +} +export function toArray(obj) { + return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; +} +export function assign(target, source) { + const obj = target; + if (source) { + for (const key in source) { + obj[key] = source[key]; + } + } + return obj; +} +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/util.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/util.js.map new file mode 100755 index 00000000..05d9df02 --- /dev/null +++ b/test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C;AACpJ,CAAC;AAED,MAAM,sBAAsB,GAAU;IACrC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,kBAAkB,GAAO;IAC9B,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvM,CAAC;AAGD,MAAM,iBAAiB,MAAc,EAAE,MAAW;IACjD,MAAM,GAAG,GAAG,MAAa,CAAC;IAC1B,IAAI,MAAM,EAAE;QACX,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACzB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/package.json b/test-eol-project/node_modules/uri-js/package.json new file mode 100755 index 00000000..de95d91a --- /dev/null +++ b/test-eol-project/node_modules/uri-js/package.json @@ -0,0 +1,77 @@ +{ + "name": "uri-js", + "version": "4.4.1", + "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", + "main": "dist/es5/uri.all.js", + "types": "dist/es5/uri.all.d.ts", + "directories": { + "test": "tests" + }, + "files": [ + "dist", + "package.json", + "yarn.lock", + "README.md", + "CHANGELOG", + "LICENSE" + ], + "scripts": { + "build:esnext": "tsc", + "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", + "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", + "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", + "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", + "clean": "rm -rf dist", + "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" + }, + "repository": { + "type": "git", + "url": "http://github.com/garycourt/uri-js" + }, + "keywords": [ + "URI", + "IRI", + "IDN", + "URN", + "UUID", + "HTTP", + "HTTPS", + "WS", + "WSS", + "MAILTO", + "RFC3986", + "RFC3987", + "RFC5891", + "RFC2616", + "RFC2818", + "RFC2141", + "RFC4122", + "RFC4291", + "RFC5952", + "RFC6068", + "RFC6455", + "RFC6874" + ], + "author": "Gary Court ", + "license": "BSD-2-Clause", + "bugs": { + "url": "https://github.com/garycourt/uri-js/issues" + }, + "homepage": "https://github.com/garycourt/uri-js", + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-plugin-external-helpers": "^6.22.0", + "babel-preset-latest": "^6.24.1", + "mocha": "^8.2.1", + "mocha-qunit-ui": "^0.1.3", + "rollup": "^0.41.6", + "rollup-plugin-babel": "^2.7.1", + "rollup-plugin-node-resolve": "^2.0.0", + "sorcery": "^0.10.0", + "typescript": "^2.8.1", + "uglify-js": "^2.8.14" + }, + "dependencies": { + "punycode": "^2.1.0" + } +} diff --git a/test-eol-project/node_modules/uri-js/yarn.lock b/test-eol-project/node_modules/uri-js/yarn.lock new file mode 100755 index 00000000..3c42ded1 --- /dev/null +++ b/test-eol-project/node_modules/uri-js/yarn.lock @@ -0,0 +1,2558 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +babel-cli@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" + integrity sha1-UCq1SHTX24itALiHoGODzgPQAvE= + dependencies: + babel-core "^6.26.0" + babel-polyfill "^6.26.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + commander "^2.11.0" + convert-source-map "^1.5.0" + fs-readdir-recursive "^1.0.0" + glob "^7.1.2" + lodash "^4.17.4" + output-file-sync "^1.1.2" + path-is-absolute "^1.0.1" + slash "^1.0.0" + source-map "^0.5.6" + v8flags "^2.1.1" + optionalDependencies: + chokidar "^1.6.1" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@6: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-external-helpers@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-classes@^6.9.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-polyfill@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" + +babel-preset-es2015@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.24.1" + babel-plugin-transform-es2015-classes "^6.24.1" + babel-plugin-transform-es2015-computed-properties "^6.24.1" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.24.1" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.24.1" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-plugin-transform-es2015-modules-systemjs "^6.24.1" + babel-plugin-transform-es2015-modules-umd "^6.24.1" + babel-plugin-transform-es2015-object-super "^6.24.1" + babel-plugin-transform-es2015-parameters "^6.24.1" + babel-plugin-transform-es2015-shorthand-properties "^6.24.1" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.24.1" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.24.1" + babel-plugin-transform-regenerator "^6.24.1" + +babel-preset-es2016@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" + dependencies: + babel-plugin-transform-exponentiation-operator "^6.24.1" + +babel-preset-es2017@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" + dependencies: + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.24.1" + +babel-preset-latest@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" + dependencies: + babel-preset-es2015 "^6.24.1" + babel-preset-es2016 "^6.24.1" + babel-preset-es2017 "^6.24.1" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +binary-extensions@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" + integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-resolve@^1.11.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +buffer-crc32@^0.2.5: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + +builtin-modules@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" + integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.1.2" + +chokidar@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^2.11.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +convert-source-map@^1.5.0, convert-source-map@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +debug@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" + integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== + dependencies: + ms "2.1.2" + +debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +diff@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +es6-promise@^3.1.2: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estree-walker@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs-readdir-recursive@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.0.0: + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + +glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@7.1.6, glob@^7.1.2, glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + +graceful-fs@^4.1.11, graceful-fs@^4.1.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +graceful-fs@^4.1.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" + integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@3.14.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash@^4.17.4: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mocha-qunit-ui@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/mocha-qunit-ui/-/mocha-qunit-ui-0.1.3.tgz#e3e1ff1dac33222b10cef681efd7f82664141ea9" + +mocha@^8.2.1: + version "8.2.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39" + integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.4.3" + debug "4.2.0" + diff "4.0.2" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "3.14.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.2" + nanoid "3.1.12" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "7.2.0" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.0.2" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "2.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nan@^2.12.1: + version "2.14.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" + integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + +nanoid@3.1.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" + integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +output-file-sync@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + integrity sha1-0KM+7+YaIF+suQCS6CZZjVJFznY= + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= + +private@^0.1.6, private@^0.1.7, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +punycode@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readable-stream@^2.0.2: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + +regenerate@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + +regenerator-runtime@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.6: + version "1.6.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" + dependencies: + path-parse "^1.0.5" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.5.2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + dependencies: + glob "^7.1.3" + +rollup-plugin-babel@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" + dependencies: + babel-core "6" + babel-plugin-transform-es2015-classes "^6.9.0" + object-assign "^4.1.0" + rollup-pluginutils "^1.5.0" + +rollup-plugin-node-resolve@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8" + dependencies: + browser-resolve "^1.11.0" + builtin-modules "^1.1.0" + resolve "^1.1.6" + +rollup-pluginutils@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" + dependencies: + estree-walker "^0.2.1" + minimatch "^3.0.2" + +rollup@^0.41.6: + version "0.41.6" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a" + dependencies: + source-map-support "^0.4.0" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +sander@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/sander/-/sander-0.5.1.tgz#741e245e231f07cafb6fdf0f133adfa216a502ad" + dependencies: + es6-promise "^3.1.2" + graceful-fs "^4.1.3" + mkdirp "^0.5.1" + rimraf "^2.5.2" + +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sorcery@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/sorcery/-/sorcery-0.10.0.tgz#8ae90ad7d7cb05fc59f1ab0c637845d5c15a52b7" + dependencies: + buffer-crc32 "^0.2.5" + minimist "^1.2.0" + sander "^0.5.0" + sourcemap-codec "^1.3.0" + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.4.0, source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +sourcemap-codec@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@7.2.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +typescript@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" + +uglify-js@^2.8.14: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + integrity sha1-K1viOjK2Onyd640PKNSFcko98ZA= + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +v8flags@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + integrity sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ= + dependencies: + user-home "^1.1.1" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +workerpool@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" + integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +y18n@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + +yargs-parser@13.1.2, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@13.3.2: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/test-eol-project/node_modules/util-deprecate/History.md b/test-eol-project/node_modules/util-deprecate/History.md new file mode 100644 index 00000000..acc86753 --- /dev/null +++ b/test-eol-project/node_modules/util-deprecate/History.md @@ -0,0 +1,16 @@ + +1.0.2 / 2015-10-07 +================== + + * use try/catch when checking `localStorage` (#3, @kumavis) + +1.0.1 / 2014-11-25 +================== + + * browser: use `console.warn()` for deprecation calls + * browser: more jsdocs + +1.0.0 / 2014-04-30 +================== + + * initial commit diff --git a/test-eol-project/node_modules/util-deprecate/LICENSE b/test-eol-project/node_modules/util-deprecate/LICENSE new file mode 100644 index 00000000..6a60e8c2 --- /dev/null +++ b/test-eol-project/node_modules/util-deprecate/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +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/test-eol-project/node_modules/util-deprecate/README.md b/test-eol-project/node_modules/util-deprecate/README.md new file mode 100644 index 00000000..75622fa7 --- /dev/null +++ b/test-eol-project/node_modules/util-deprecate/README.md @@ -0,0 +1,53 @@ +util-deprecate +============== +### The Node.js `util.deprecate()` function with browser support + +In Node.js, this module simply re-exports the `util.deprecate()` function. + +In the web browser (i.e. via browserify), a browser-specific implementation +of the `util.deprecate()` function is used. + + +## API + +A `deprecate()` function is the only thing exposed by this module. + +``` javascript +// setup: +exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); + + +// users see: +foo(); +// foo() is deprecated, use bar() instead +foo(); +foo(); +``` + + +## License + +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +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/test-eol-project/node_modules/util-deprecate/browser.js b/test-eol-project/node_modules/util-deprecate/browser.js new file mode 100644 index 00000000..549ae2f0 --- /dev/null +++ b/test-eol-project/node_modules/util-deprecate/browser.js @@ -0,0 +1,67 @@ + +/** + * Module exports. + */ + +module.exports = deprecate; + +/** + * Mark that a method should not be used. + * Returns a modified function which warns once by default. + * + * If `localStorage.noDeprecation = true` is set, then it is a no-op. + * + * If `localStorage.throwDeprecation = true` is set, then deprecated functions + * will throw an Error when invoked. + * + * If `localStorage.traceDeprecation = true` is set, then deprecated functions + * will invoke `console.trace()` instead of `console.error()`. + * + * @param {Function} fn - the function to deprecate + * @param {String} msg - the string to print to the console when `fn` is invoked + * @returns {Function} a new "deprecated" version of `fn` + * @api public + */ + +function deprecate (fn, msg) { + if (config('noDeprecation')) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (config('throwDeprecation')) { + throw new Error(msg); + } else if (config('traceDeprecation')) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +/** + * Checks `localStorage` for boolean values for the given `name`. + * + * @param {String} name + * @returns {Boolean} + * @api private + */ + +function config (name) { + // accessing global.localStorage can trigger a DOMException in sandboxed iframes + try { + if (!global.localStorage) return false; + } catch (_) { + return false; + } + var val = global.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === 'true'; +} diff --git a/test-eol-project/node_modules/util-deprecate/node.js b/test-eol-project/node_modules/util-deprecate/node.js new file mode 100644 index 00000000..5e6fcff5 --- /dev/null +++ b/test-eol-project/node_modules/util-deprecate/node.js @@ -0,0 +1,6 @@ + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = require('util').deprecate; diff --git a/test-eol-project/node_modules/util-deprecate/package.json b/test-eol-project/node_modules/util-deprecate/package.json new file mode 100644 index 00000000..2e79f89a --- /dev/null +++ b/test-eol-project/node_modules/util-deprecate/package.json @@ -0,0 +1,27 @@ +{ + "name": "util-deprecate", + "version": "1.0.2", + "description": "The Node.js `util.deprecate()` function with browser support", + "main": "node.js", + "browser": "browser.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/util-deprecate.git" + }, + "keywords": [ + "util", + "deprecate", + "browserify", + "browser", + "node" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/util-deprecate/issues" + }, + "homepage": "https://github.com/TooTallNate/util-deprecate" +} diff --git a/test-eol-project/node_modules/uuid/AUTHORS b/test-eol-project/node_modules/uuid/AUTHORS new file mode 100644 index 00000000..5a105230 --- /dev/null +++ b/test-eol-project/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/test-eol-project/node_modules/uuid/CHANGELOG.md b/test-eol-project/node_modules/uuid/CHANGELOG.md new file mode 100644 index 00000000..f811b8a0 --- /dev/null +++ b/test-eol-project/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,119 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + + +### Features + +* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + + +### Bug Fixes + +* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + + + + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + + +### Bug Fixes + +* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + + + + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + + +### Bug Fixes + +* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + + + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + + +### Bug Fixes + +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +* Fix typo (#178) +* Simple typo fix (#165) + +### Features +* v5 support in CLI (#197) +* V5 support (#188) + + +# 3.0.1 (2016-11-28) + +* split uuid versions into separate files + + +# 3.0.0 (2016-11-17) + +* remove .parse and .unparse + + +# 2.0.0 + +* Removed uuid.BufferClass + + +# 1.4.0 + +* Improved module context detection +* Removed public RNG functions + + +# 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + + +# 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/test-eol-project/node_modules/uuid/LICENSE.md b/test-eol-project/node_modules/uuid/LICENSE.md new file mode 100644 index 00000000..8c84e398 --- /dev/null +++ b/test-eol-project/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/test-eol-project/node_modules/uuid/README.md b/test-eol-project/node_modules/uuid/README.md new file mode 100644 index 00000000..1752e475 --- /dev/null +++ b/test-eol-project/node_modules/uuid/README.md @@ -0,0 +1,276 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Example: Generate string UUID with fully-specified options + +```javascript +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, + // 17, 233, 146, 52, 155, 29, + // 235, 77, 59, 125 + // ] +uuidv1(null, arr, 16); // ⇨ + // [ + // 44, 94, 164, 192, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125, + // 44, 94, 164, 193, 64, 103, 17, 233, + // 146, 52, 155, 29, 235, 77, 59, 125 + // ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ + // [ + // 155, 29, 235, 77, 59, + // 125, 75, 173, 155, 221, + // 43, 13, 123, 61, 203, + // 109 + // ] +uuidv4(null, buffer, 16); // ⇨ + // [ + // 155, 29, 235, 77, 59, 125, 75, 173, + // 155, 221, 43, 13, 123, 61, 203, 109, + // 27, 157, 107, 205, 187, 253, 75, 45, + // 155, 93, 171, 141, 251, 189, 75, 237 + // ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/test-eol-project/node_modules/uuid/index.js b/test-eol-project/node_modules/uuid/index.js new file mode 100644 index 00000000..e96791ab --- /dev/null +++ b/test-eol-project/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/test-eol-project/node_modules/uuid/lib/bytesToUuid.js b/test-eol-project/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 00000000..24b60412 --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,26 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; diff --git a/test-eol-project/node_modules/uuid/lib/md5-browser.js b/test-eol-project/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 00000000..9b3b6c7e --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + return md5ToHexEncodedArray( + wordsToMd5( + bytesToWords(bytes) + , bytes.length * 8) + ); +} + + +/* +* Convert an array of little-endian words to an array of bytes +*/ +function md5ToHexEncodedArray(input) { + var i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* Calculate the MD5 of an array of little-endian words, and a bit length. +*/ +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + return [a, b, c, d]; +} + +/* +* Convert an array bytes to an array of little-endian words +* Characters >255 have their high-byte silently ignored. +*/ +function bytesToWords(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); + } + + return output; +} + +/* +* Add integers, wrapping at 2^32. This uses 16-bit operations internally +* to work around bugs in some JS interpreters. +*/ +function safeAdd(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* +* Bitwise rotate a 32-bit number to the left. +*/ +function bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* +* These functions implement the four basic operations the algorithm uses. +*/ +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} +function md5ff(a, b, c, d, x, s, t) { + return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5gg(a, b, c, d, x, s, t) { + return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +module.exports = md5; diff --git a/test-eol-project/node_modules/uuid/lib/md5.js b/test-eol-project/node_modules/uuid/lib/md5.js new file mode 100644 index 00000000..7044b872 --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/test-eol-project/node_modules/uuid/lib/rng-browser.js b/test-eol-project/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 00000000..6361fb81 --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,34 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto +// implementation. Also, find the complete implementation of crypto on IE11. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); + +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/test-eol-project/node_modules/uuid/lib/rng.js b/test-eol-project/node_modules/uuid/lib/rng.js new file mode 100644 index 00000000..58f0dc9c --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/test-eol-project/node_modules/uuid/lib/sha1-browser.js b/test-eol-project/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 00000000..5758ed75 --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +function f(s, x, y, z) { + switch (s) { + case 0: return (x & y) ^ (~x & z); + case 1: return x ^ y ^ z; + case 2: return (x & y) ^ (x & z) ^ (y & z); + case 3: return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return (x << n) | (x>>> (32 - n)); +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + bytes.push(0x80); + + var l = bytes.length/4 + 2; + var N = Math.ceil(l/16); + var M = new Array(N); + + for (var i=0; i>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = (H[0] + a) >>> 0; + H[1] = (H[1] + b) >>> 0; + H[2] = (H[2] + c) >>> 0; + H[3] = (H[3] + d) >>> 0; + H[4] = (H[4] + e) >>> 0; + } + + return [ + H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, + H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, + H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, + H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, + H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff + ]; +} + +module.exports = sha1; diff --git a/test-eol-project/node_modules/uuid/lib/sha1.js b/test-eol-project/node_modules/uuid/lib/sha1.js new file mode 100644 index 00000000..0b54b250 --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/test-eol-project/node_modules/uuid/lib/v35.js b/test-eol-project/node_modules/uuid/lib/v35.js new file mode 100644 index 00000000..8b066cc5 --- /dev/null +++ b/test-eol-project/node_modules/uuid/lib/v35.js @@ -0,0 +1,57 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + // Function#name is not settable on some platforms (#270) + try { + generateUUID.name = name; + } catch (err) { + } + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/test-eol-project/node_modules/uuid/package.json b/test-eol-project/node_modules/uuid/package.json new file mode 100644 index 00000000..efc07b8f --- /dev/null +++ b/test-eol-project/node_modules/uuid/package.json @@ -0,0 +1,49 @@ +{ + "name": "uuid", + "version": "3.4.0", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./bin/uuid" + }, + "devDependencies": { + "@commitlint/cli": "~8.2.0", + "@commitlint/config-conventional": "~8.2.0", + "eslint": "~6.4.0", + "husky": "~3.0.5", + "mocha": "6.2.0", + "runmd": "1.2.1", + "standard-version": "7.0.0" + }, + "scripts": { + "lint": "eslint .", + "test": "npm run lint && mocha test/test.js", + "md": "runmd --watch --output=README.md README_js.md", + "release": "standard-version", + "prepare": "runmd --output=README.md README_js.md" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" + } + } +} diff --git a/test-eol-project/node_modules/uuid/v1.js b/test-eol-project/node_modules/uuid/v1.js new file mode 100644 index 00000000..8c245de4 --- /dev/null +++ b/test-eol-project/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/test-eol-project/node_modules/uuid/v3.js b/test-eol-project/node_modules/uuid/v3.js new file mode 100644 index 00000000..ee7e14c0 --- /dev/null +++ b/test-eol-project/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/test-eol-project/node_modules/uuid/v4.js b/test-eol-project/node_modules/uuid/v4.js new file mode 100644 index 00000000..1f07be1c --- /dev/null +++ b/test-eol-project/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/test-eol-project/node_modules/uuid/v5.js b/test-eol-project/node_modules/uuid/v5.js new file mode 100644 index 00000000..4945baf3 --- /dev/null +++ b/test-eol-project/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/test-eol-project/node_modules/verror/.npmignore b/test-eol-project/node_modules/verror/.npmignore new file mode 100644 index 00000000..f14aec80 --- /dev/null +++ b/test-eol-project/node_modules/verror/.npmignore @@ -0,0 +1,9 @@ +.gitignore +.gitmodules +deps +examples +experiments +jsl.node.conf +Makefile +Makefile.targ +test diff --git a/test-eol-project/node_modules/verror/CHANGES.md b/test-eol-project/node_modules/verror/CHANGES.md new file mode 100644 index 00000000..bbb745a2 --- /dev/null +++ b/test-eol-project/node_modules/verror/CHANGES.md @@ -0,0 +1,28 @@ +# Changelog + +## Not yet released + +None yet. + +## v1.10.0 + +* #49 want convenience functions for MultiErrors + +## v1.9.0 + +* #47 could use VError.hasCauseWithName() + +## v1.8.1 + +* #39 captureStackTrace lost when inheriting from WError + +## v1.8.0 + +* #23 Preserve original stack trace(s) + +## v1.7.0 + +* #10 better support for extra properties on Errors +* #11 make it easy to find causes of a particular kind +* #29 No documentation on how to Install this package +* #36 elide development-only files from npm package diff --git a/test-eol-project/node_modules/verror/CONTRIBUTING.md b/test-eol-project/node_modules/verror/CONTRIBUTING.md new file mode 100644 index 00000000..750cef8d --- /dev/null +++ b/test-eol-project/node_modules/verror/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Contributing + +This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new +changes. Anyone can submit changes. To get started, see the [cr.joyent.us user +guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). +This repo does not use GitHub pull requests. + +See the [Joyent Engineering +Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general +best practices expected in this repository. + +Contributions should be "make prepush" clean. The "prepush" target runs the +"check" target, which requires these separate tools: + +* https://github.com/davepacheco/jsstyle +* https://github.com/davepacheco/javascriptlint + +If you're changing something non-trivial or user-facing, you may want to submit +an issue first. diff --git a/test-eol-project/node_modules/verror/LICENSE b/test-eol-project/node_modules/verror/LICENSE new file mode 100644 index 00000000..82a5cb86 --- /dev/null +++ b/test-eol-project/node_modules/verror/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016, Joyent, Inc. 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/test-eol-project/node_modules/verror/README.md b/test-eol-project/node_modules/verror/README.md new file mode 100644 index 00000000..c1f0635e --- /dev/null +++ b/test-eol-project/node_modules/verror/README.md @@ -0,0 +1,528 @@ +# verror: rich JavaScript errors + +This module provides several classes in support of Joyent's [Best Practices for +Error Handling in Node.js](http://www.joyent.com/developers/node/design/errors). +If you find any of the behavior here confusing or surprising, check out that +document first. + +The error classes here support: + +* printf-style arguments for the message +* chains of causes +* properties to provide extra information about the error +* creating your own subclasses that support all of these + +The classes here are: + +* **VError**, for chaining errors while preserving each one's error message. + This is useful in servers and command-line utilities when you want to + propagate an error up a call stack, but allow various levels to add their own + context. See examples below. +* **WError**, for wrapping errors while hiding the lower-level messages from the + top-level error. This is useful for API endpoints where you don't want to + expose internal error messages, but you still want to preserve the error chain + for logging and debugging. +* **SError**, which is just like VError but interprets printf-style arguments + more strictly. +* **MultiError**, which is just an Error that encapsulates one or more other + errors. (This is used for parallel operations that return several errors.) + + +# Quick start + +First, install the package: + + npm install verror + +If nothing else, you can use VError as a drop-in replacement for the built-in +JavaScript Error class, with the addition of printf-style messages: + +```javascript +var err = new VError('missing file: "%s"', '/etc/passwd'); +console.log(err.message); +``` + +This prints: + + missing file: "/etc/passwd" + +You can also pass a `cause` argument, which is any other Error object: + +```javascript +var fs = require('fs'); +var filename = '/nonexistent'; +fs.stat(filename, function (err1) { + var err2 = new VError(err1, 'stat "%s"', filename); + console.error(err2.message); +}); +``` + +This prints out: + + stat "/nonexistent": ENOENT, stat '/nonexistent' + +which resembles how Unix programs typically report errors: + + $ sort /nonexistent + sort: open failed: /nonexistent: No such file or directory + +To match the Unixy feel, when you print out the error, just prepend the +program's name to the VError's `message`. Or just call +[node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which +does this for you. + +You can get the next-level Error using `err.cause()`: + +```javascript +console.error(err2.cause().message); +``` + +prints: + + ENOENT, stat '/nonexistent' + +Of course, you can chain these as many times as you want, and it works with any +kind of Error: + +```javascript +var err1 = new Error('No such file or directory'); +var err2 = new VError(err1, 'failed to stat "%s"', '/junk'); +var err3 = new VError(err2, 'request failed'); +console.error(err3.message); +``` + +This prints: + + request failed: failed to stat "/junk": No such file or directory + +The idea is that each layer in the stack annotates the error with a description +of what it was doing. The end result is a message that explains what happened +at each level. + +You can also decorate Error objects with additional information so that callers +can not only handle each kind of error differently, but also construct their own +error messages (e.g., to localize them, format them, group them by type, and so +on). See the example below. + + +# Deeper dive + +The two main goals for VError are: + +* **Make it easy to construct clear, complete error messages intended for + people.** Clear error messages greatly improve both user experience and + debuggability, so we wanted to make it easy to build them. That's why the + constructor takes printf-style arguments. +* **Make it easy to construct objects with programmatically-accessible + metadata** (which we call _informational properties_). Instead of just saying + "connection refused while connecting to 192.168.1.2:80", you can add + properties like `"ip": "192.168.1.2"` and `"tcpPort": 80`. This can be used + for feeding into monitoring systems, analyzing large numbers of Errors (as + from a log file), or localizing error messages. + +To really make this useful, it also needs to be easy to compose Errors: +higher-level code should be able to augment the Errors reported by lower-level +code to provide a more complete description of what happened. Instead of saying +"connection refused", you can say "operation X failed: connection refused". +That's why VError supports `causes`. + +In order for all this to work, programmers need to know that it's generally safe +to wrap lower-level Errors with higher-level ones. If you have existing code +that handles Errors produced by a library, you should be able to wrap those +Errors with a VError to add information without breaking the error handling +code. There are two obvious ways that this could break such consumers: + +* The error's name might change. People typically use `name` to determine what + kind of Error they've got. To ensure compatibility, you can create VErrors + with custom names, but this approach isn't great because it prevents you from + representing complex failures. For this reason, VError provides + `findCauseByName`, which essentially asks: does this Error _or any of its + causes_ have this specific type? If error handling code uses + `findCauseByName`, then subsystems can construct very specific causal chains + for debuggability and still let people handle simple cases easily. There's an + example below. +* The error's properties might change. People often hang additional properties + off of Error objects. If we wrap an existing Error in a new Error, those + properties would be lost unless we copied them. But there are a variety of + both standard and non-standard Error properties that should _not_ be copied in + this way: most obviously `name`, `message`, and `stack`, but also `fileName`, + `lineNumber`, and a few others. Plus, it's useful for some Error subclasses + to have their own private properties -- and there'd be no way to know whether + these should be copied. For these reasons, VError first-classes these + information properties. You have to provide them in the constructor, you can + only fetch them with the `info()` function, and VError takes care of making + sure properties from causes wind up in the `info()` output. + +Let's put this all together with an example from the node-fast RPC library. +node-fast implements a simple RPC protocol for Node programs. There's a server +and client interface, and clients make RPC requests to servers. Let's say the +server fails with an UnauthorizedError with message "user 'bob' is not +authorized". The client wraps all server errors with a FastServerError. The +client also wraps all request errors with a FastRequestError that includes the +name of the RPC call being made. The result of this failed RPC might look like +this: + + name: FastRequestError + message: "request failed: server error: user 'bob' is not authorized" + rpcMsgid: + rpcMethod: GetObject + cause: + name: FastServerError + message: "server error: user 'bob' is not authorized" + cause: + name: UnauthorizedError + message: "user 'bob' is not authorized" + rpcUser: "bob" + +When the caller uses `VError.info()`, the information properties are collapsed +so that it looks like this: + + message: "request failed: server error: user 'bob' is not authorized" + rpcMsgid: + rpcMethod: GetObject + rpcUser: "bob" + +Taking this apart: + +* The error's message is a complete description of the problem. The caller can + report this directly to its caller, which can potentially make its way back to + an end user (if appropriate). It can also be logged. +* The caller can tell that the request failed on the server, rather than as a + result of a client problem (e.g., failure to serialize the request), a + transport problem (e.g., failure to connect to the server), or something else + (e.g., a timeout). They do this using `findCauseByName('FastServerError')` + rather than checking the `name` field directly. +* If the caller logs this error, the logs can be analyzed to aggregate + errors by cause, by RPC method name, by user, or whatever. Or the + error can be correlated with other events for the same rpcMsgid. +* It wasn't very hard for any part of the code to contribute to this Error. + Each part of the stack has just a few lines to provide exactly what it knows, + with very little boilerplate. + +It's not expected that you'd use these complex forms all the time. Despite +supporting the complex case above, you can still just do: + + new VError("my service isn't working"); + +for the simple cases. + + +# Reference: VError, WError, SError + +VError, WError, and SError are convenient drop-in replacements for `Error` that +support printf-style arguments, first-class causes, informational properties, +and other useful features. + + +## Constructors + +The VError constructor has several forms: + +```javascript +/* + * This is the most general form. You can specify any supported options + * (including "cause" and "info") this way. + */ +new VError(options, sprintf_args...) + +/* + * This is a useful shorthand when the only option you need is "cause". + */ +new VError(cause, sprintf_args...) + +/* + * This is a useful shorthand when you don't need any options at all. + */ +new VError(sprintf_args...) +``` + +All of these forms construct a new VError that behaves just like the built-in +JavaScript `Error` class, with some additional methods described below. + +In the first form, `options` is a plain object with any of the following +optional properties: + +Option name | Type | Meaning +---------------- | ---------------- | ------- +`name` | string | Describes what kind of error this is. This is intended for programmatic use to distinguish between different kinds of errors. Note that in modern versions of Node.js, this name is ignored in the `stack` property value, but callers can still use the `name` property to get at it. +`cause` | any Error object | Indicates that the new error was caused by `cause`. See `cause()` below. If unspecified, the cause will be `null`. +`strict` | boolean | If true, then `null` and `undefined` values in `sprintf_args` are passed through to `sprintf()`. Otherwise, these are replaced with the strings `'null'`, and '`undefined`', respectively. +`constructorOpt` | function | If specified, then the stack trace for this error ends at function `constructorOpt`. Functions called by `constructorOpt` will not show up in the stack. This is useful when this class is subclassed. +`info` | object | Specifies arbitrary informational properties that are available through the `VError.info(err)` static class method. See that method for details. + +The second form is equivalent to using the first form with the specified `cause` +as the error's cause. This form is distinguished from the first form because +the first argument is an Error. + +The third form is equivalent to using the first form with all default option +values. This form is distinguished from the other forms because the first +argument is not an object or an Error. + +The `WError` constructor is used exactly the same way as the `VError` +constructor. The `SError` constructor is also used the same way as the +`VError` constructor except that in all cases, the `strict` property is +overriden to `true. + + +## Public properties + +`VError`, `WError`, and `SError` all provide the same public properties as +JavaScript's built-in Error objects. + +Property name | Type | Meaning +------------- | ------ | ------- +`name` | string | Programmatically-usable name of the error. +`message` | string | Human-readable summary of the failure. Programmatically-accessible details are provided through `VError.info(err)` class method. +`stack` | string | Human-readable stack trace where the Error was constructed. + +For all of these classes, the printf-style arguments passed to the constructor +are processed with `sprintf()` to form a message. For `WError`, this becomes +the complete `message` property. For `SError` and `VError`, this message is +prepended to the message of the cause, if any (with a suitable separator), and +the result becomes the `message` property. + +The `stack` property is managed entirely by the underlying JavaScript +implementation. It's generally implemented using a getter function because +constructing the human-readable stack trace is somewhat expensive. + +## Class methods + +The following methods are defined on the `VError` class and as exported +functions on the `verror` module. They're defined this way rather than using +methods on VError instances so that they can be used on Errors not created with +`VError`. + +### `VError.cause(err)` + +The `cause()` function returns the next Error in the cause chain for `err`, or +`null` if there is no next error. See the `cause` argument to the constructor. +Errors can have arbitrarily long cause chains. You can walk the `cause` chain +by invoking `VError.cause(err)` on each subsequent return value. If `err` is +not a `VError`, the cause is `null`. + +### `VError.info(err)` + +Returns an object with all of the extra error information that's been associated +with this Error and all of its causes. These are the properties passed in using +the `info` option to the constructor. Properties not specified in the +constructor for this Error are implicitly inherited from this error's cause. + +These properties are intended to provide programmatically-accessible metadata +about the error. For an error that indicates a failure to resolve a DNS name, +informational properties might include the DNS name to be resolved, or even the +list of resolvers used to resolve it. The values of these properties should +generally be plain objects (i.e., consisting only of null, undefined, numbers, +booleans, strings, and objects and arrays containing only other plain objects). + +### `VError.fullStack(err)` + +Returns a string containing the full stack trace, with all nested errors recursively +reported as `'caused by:' + err.stack`. + +### `VError.findCauseByName(err, name)` + +The `findCauseByName()` function traverses the cause chain for `err`, looking +for an error whose `name` property matches the passed in `name` value. If no +match is found, `null` is returned. + +If all you want is to know _whether_ there's a cause (and you don't care what it +is), you can use `VError.hasCauseWithName(err, name)`. + +If a vanilla error or a non-VError error is passed in, then there is no cause +chain to traverse. In this scenario, the function will check the `name` +property of only `err`. + +### `VError.hasCauseWithName(err, name)` + +Returns true if and only if `VError.findCauseByName(err, name)` would return +a non-null value. This essentially determines whether `err` has any cause in +its cause chain that has name `name`. + +### `VError.errorFromList(errors)` + +Given an array of Error objects (possibly empty), return a single error +representing the whole collection of errors. If the list has: + +* 0 elements, returns `null` +* 1 element, returns the sole error +* more than 1 element, returns a MultiError referencing the whole list + +This is useful for cases where an operation may produce any number of errors, +and you ultimately want to implement the usual `callback(err)` pattern. You can +accumulate the errors in an array and then invoke +`callback(VError.errorFromList(errors))` when the operation is complete. + + +### `VError.errorForEach(err, func)` + +Convenience function for iterating an error that may itself be a MultiError. + +In all cases, `err` must be an Error. If `err` is a MultiError, then `func` is +invoked as `func(errorN)` for each of the underlying errors of the MultiError. +If `err` is any other kind of error, `func` is invoked once as `func(err)`. In +all cases, `func` is invoked synchronously. + +This is useful for cases where an operation may produce any number of warnings +that may be encapsulated with a MultiError -- but may not be. + +This function does not iterate an error's cause chain. + + +## Examples + +The "Demo" section above covers several basic cases. Here's a more advanced +case: + +```javascript +var err1 = new VError('something bad happened'); +/* ... */ +var err2 = new VError({ + 'name': 'ConnectionError', + 'cause': err1, + 'info': { + 'errno': 'ECONNREFUSED', + 'remote_ip': '127.0.0.1', + 'port': 215 + } +}, 'failed to connect to "%s:%d"', '127.0.0.1', 215); + +console.log(err2.message); +console.log(err2.name); +console.log(VError.info(err2)); +console.log(err2.stack); +``` + +This outputs: + + failed to connect to "127.0.0.1:215": something bad happened + ConnectionError + { errno: 'ECONNREFUSED', remote_ip: '127.0.0.1', port: 215 } + ConnectionError: failed to connect to "127.0.0.1:215": something bad happened + at Object. (/home/dap/node-verror/examples/info.js:5:12) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:935:3 + +Information properties are inherited up the cause chain, with values at the top +of the chain overriding same-named values lower in the chain. To continue that +example: + +```javascript +var err3 = new VError({ + 'name': 'RequestError', + 'cause': err2, + 'info': { + 'errno': 'EBADREQUEST' + } +}, 'request failed'); + +console.log(err3.message); +console.log(err3.name); +console.log(VError.info(err3)); +console.log(err3.stack); +``` + +This outputs: + + request failed: failed to connect to "127.0.0.1:215": something bad happened + RequestError + { errno: 'EBADREQUEST', remote_ip: '127.0.0.1', port: 215 } + RequestError: request failed: failed to connect to "127.0.0.1:215": something bad happened + at Object. (/home/dap/node-verror/examples/info.js:20:12) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:935:3 + +You can also print the complete stack trace of combined `Error`s by using +`VError.fullStack(err).` + +```javascript +var err1 = new VError('something bad happened'); +/* ... */ +var err2 = new VError(err1, 'something really bad happened here'); + +console.log(VError.fullStack(err2)); +``` + +This outputs: + + VError: something really bad happened here: something bad happened + at Object. (/home/dap/node-verror/examples/fullStack.js:5:12) + at Module._compile (module.js:409:26) + at Object.Module._extensions..js (module.js:416:10) + at Module.load (module.js:343:32) + at Function.Module._load (module.js:300:12) + at Function.Module.runMain (module.js:441:10) + at startup (node.js:139:18) + at node.js:968:3 + caused by: VError: something bad happened + at Object. (/home/dap/node-verror/examples/fullStack.js:3:12) + at Module._compile (module.js:409:26) + at Object.Module._extensions..js (module.js:416:10) + at Module.load (module.js:343:32) + at Function.Module._load (module.js:300:12) + at Function.Module.runMain (module.js:441:10) + at startup (node.js:139:18) + at node.js:968:3 + +`VError.fullStack` is also safe to use on regular `Error`s, so feel free to use +it whenever you need to extract the stack trace from an `Error`, regardless if +it's a `VError` or not. + +# Reference: MultiError + +MultiError is an Error class that represents a group of Errors. This is used +when you logically need to provide a single Error, but you want to preserve +information about multiple underying Errors. A common case is when you execute +several operations in parallel and some of them fail. + +MultiErrors are constructed as: + +```javascript +new MultiError(error_list) +``` + +`error_list` is an array of at least one `Error` object. + +The cause of the MultiError is the first error provided. None of the other +`VError` options are supported. The `message` for a MultiError consists the +`message` from the first error, prepended with a message indicating that there +were other errors. + +For example: + +```javascript +err = new MultiError([ + new Error('failed to resolve DNS name "abc.example.com"'), + new Error('failed to resolve DNS name "def.example.com"'), +]); + +console.error(err.message); +``` + +outputs: + + first of 2 errors: failed to resolve DNS name "abc.example.com" + +See the convenience function `VError.errorFromList`, which is sometimes simpler +to use than this constructor. + +## Public methods + + +### `errors()` + +Returns an array of the errors used to construct this MultiError. + + +# Contributing + +See separate [contribution guidelines](CONTRIBUTING.md). diff --git a/test-eol-project/node_modules/verror/lib/verror.js b/test-eol-project/node_modules/verror/lib/verror.js new file mode 100644 index 00000000..8663ddea --- /dev/null +++ b/test-eol-project/node_modules/verror/lib/verror.js @@ -0,0 +1,451 @@ +/* + * verror.js: richer JavaScript errors + */ + +var mod_assertplus = require('assert-plus'); +var mod_util = require('util'); + +var mod_extsprintf = require('extsprintf'); +var mod_isError = require('core-util-is').isError; +var sprintf = mod_extsprintf.sprintf; + +/* + * Public interface + */ + +/* So you can 'var VError = require('verror')' */ +module.exports = VError; +/* For compatibility */ +VError.VError = VError; +/* Other exported classes */ +VError.SError = SError; +VError.WError = WError; +VError.MultiError = MultiError; + +/* + * Common function used to parse constructor arguments for VError, WError, and + * SError. Named arguments to this function: + * + * strict force strict interpretation of sprintf arguments, even + * if the options in "argv" don't say so + * + * argv error's constructor arguments, which are to be + * interpreted as described in README.md. For quick + * reference, "argv" has one of the following forms: + * + * [ sprintf_args... ] (argv[0] is a string) + * [ cause, sprintf_args... ] (argv[0] is an Error) + * [ options, sprintf_args... ] (argv[0] is an object) + * + * This function normalizes these forms, producing an object with the following + * properties: + * + * options equivalent to "options" in third form. This will never + * be a direct reference to what the caller passed in + * (i.e., it may be a shallow copy), so it can be freely + * modified. + * + * shortmessage result of sprintf(sprintf_args), taking options.strict + * into account as described in README.md. + */ +function parseConstructorArguments(args) +{ + var argv, options, sprintf_args, shortmessage, k; + + mod_assertplus.object(args, 'args'); + mod_assertplus.bool(args.strict, 'args.strict'); + mod_assertplus.array(args.argv, 'args.argv'); + argv = args.argv; + + /* + * First, figure out which form of invocation we've been given. + */ + if (argv.length === 0) { + options = {}; + sprintf_args = []; + } else if (mod_isError(argv[0])) { + options = { 'cause': argv[0] }; + sprintf_args = argv.slice(1); + } else if (typeof (argv[0]) === 'object') { + options = {}; + for (k in argv[0]) { + options[k] = argv[0][k]; + } + sprintf_args = argv.slice(1); + } else { + mod_assertplus.string(argv[0], + 'first argument to VError, SError, or WError ' + + 'constructor must be a string, object, or Error'); + options = {}; + sprintf_args = argv; + } + + /* + * Now construct the error's message. + * + * extsprintf (which we invoke here with our caller's arguments in order + * to construct this Error's message) is strict in its interpretation of + * values to be processed by the "%s" specifier. The value passed to + * extsprintf must actually be a string or something convertible to a + * String using .toString(). Passing other values (notably "null" and + * "undefined") is considered a programmer error. The assumption is + * that if you actually want to print the string "null" or "undefined", + * then that's easy to do that when you're calling extsprintf; on the + * other hand, if you did NOT want that (i.e., there's actually a bug + * where the program assumes some variable is non-null and tries to + * print it, which might happen when constructing a packet or file in + * some specific format), then it's better to stop immediately than + * produce bogus output. + * + * However, sometimes the bug is only in the code calling VError, and a + * programmer might prefer to have the error message contain "null" or + * "undefined" rather than have the bug in the error path crash the + * program (making the first bug harder to identify). For that reason, + * by default VError converts "null" or "undefined" arguments to their + * string representations and passes those to extsprintf. Programmers + * desiring the strict behavior can use the SError class or pass the + * "strict" option to the VError constructor. + */ + mod_assertplus.object(options); + if (!options.strict && !args.strict) { + sprintf_args = sprintf_args.map(function (a) { + return (a === null ? 'null' : + a === undefined ? 'undefined' : a); + }); + } + + if (sprintf_args.length === 0) { + shortmessage = ''; + } else { + shortmessage = sprintf.apply(null, sprintf_args); + } + + return ({ + 'options': options, + 'shortmessage': shortmessage + }); +} + +/* + * See README.md for reference documentation. + */ +function VError() +{ + var args, obj, parsed, cause, ctor, message, k; + + args = Array.prototype.slice.call(arguments, 0); + + /* + * This is a regrettable pattern, but JavaScript's built-in Error class + * is defined to work this way, so we allow the constructor to be called + * without "new". + */ + if (!(this instanceof VError)) { + obj = Object.create(VError.prototype); + VError.apply(obj, arguments); + return (obj); + } + + /* + * For convenience and backwards compatibility, we support several + * different calling forms. Normalize them here. + */ + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': false + }); + + /* + * If we've been given a name, apply it now. + */ + if (parsed.options.name) { + mod_assertplus.string(parsed.options.name, + 'error\'s "name" must be a string'); + this.name = parsed.options.name; + } + + /* + * For debugging, we keep track of the original short message (attached + * this Error particularly) separately from the complete message (which + * includes the messages of our cause chain). + */ + this.jse_shortmsg = parsed.shortmessage; + message = parsed.shortmessage; + + /* + * If we've been given a cause, record a reference to it and update our + * message appropriately. + */ + cause = parsed.options.cause; + if (cause) { + mod_assertplus.ok(mod_isError(cause), 'cause is not an Error'); + this.jse_cause = cause; + + if (!parsed.options.skipCauseMessage) { + message += ': ' + cause.message; + } + } + + /* + * If we've been given an object with properties, shallow-copy that + * here. We don't want to use a deep copy in case there are non-plain + * objects here, but we don't want to use the original object in case + * the caller modifies it later. + */ + this.jse_info = {}; + if (parsed.options.info) { + for (k in parsed.options.info) { + this.jse_info[k] = parsed.options.info[k]; + } + } + + this.message = message; + Error.call(this, message); + + if (Error.captureStackTrace) { + ctor = parsed.options.constructorOpt || this.constructor; + Error.captureStackTrace(this, ctor); + } + + return (this); +} + +mod_util.inherits(VError, Error); +VError.prototype.name = 'VError'; + +VError.prototype.toString = function ve_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + + return (str); +}; + +/* + * This method is provided for compatibility. New callers should use + * VError.cause() instead. That method also uses the saner `null` return value + * when there is no cause. + */ +VError.prototype.cause = function ve_cause() +{ + var cause = VError.cause(this); + return (cause === null ? undefined : cause); +}; + +/* + * Static methods + * + * These class-level methods are provided so that callers can use them on + * instances of Errors that are not VErrors. New interfaces should be provided + * only using static methods to eliminate the class of programming mistake where + * people fail to check whether the Error object has the corresponding methods. + */ + +VError.cause = function (err) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + return (mod_isError(err.jse_cause) ? err.jse_cause : null); +}; + +VError.info = function (err) +{ + var rv, cause, k; + + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + cause = VError.cause(err); + if (cause !== null) { + rv = VError.info(cause); + } else { + rv = {}; + } + + if (typeof (err.jse_info) == 'object' && err.jse_info !== null) { + for (k in err.jse_info) { + rv[k] = err.jse_info[k]; + } + } + + return (rv); +}; + +VError.findCauseByName = function (err, name) +{ + var cause; + + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + mod_assertplus.string(name, 'name'); + mod_assertplus.ok(name.length > 0, 'name cannot be empty'); + + for (cause = err; cause !== null; cause = VError.cause(cause)) { + mod_assertplus.ok(mod_isError(cause)); + if (cause.name == name) { + return (cause); + } + } + + return (null); +}; + +VError.hasCauseWithName = function (err, name) +{ + return (VError.findCauseByName(err, name) !== null); +}; + +VError.fullStack = function (err) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + + var cause = VError.cause(err); + + if (cause) { + return (err.stack + '\ncaused by: ' + VError.fullStack(cause)); + } + + return (err.stack); +}; + +VError.errorFromList = function (errors) +{ + mod_assertplus.arrayOfObject(errors, 'errors'); + + if (errors.length === 0) { + return (null); + } + + errors.forEach(function (e) { + mod_assertplus.ok(mod_isError(e)); + }); + + if (errors.length == 1) { + return (errors[0]); + } + + return (new MultiError(errors)); +}; + +VError.errorForEach = function (err, func) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + mod_assertplus.func(func, 'func'); + + if (err instanceof MultiError) { + err.errors().forEach(function iterError(e) { func(e); }); + } else { + func(err); + } +}; + + +/* + * SError is like VError, but stricter about types. You cannot pass "null" or + * "undefined" as string arguments to the formatter. + */ +function SError() +{ + var args, obj, parsed, options; + + args = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof SError)) { + obj = Object.create(SError.prototype); + SError.apply(obj, arguments); + return (obj); + } + + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': true + }); + + options = parsed.options; + VError.call(this, options, '%s', parsed.shortmessage); + + return (this); +} + +/* + * We don't bother setting SError.prototype.name because once constructed, + * SErrors are just like VErrors. + */ +mod_util.inherits(SError, VError); + + +/* + * Represents a collection of errors for the purpose of consumers that generally + * only deal with one error. Callers can extract the individual errors + * contained in this object, but may also just treat it as a normal single + * error, in which case a summary message will be printed. + */ +function MultiError(errors) +{ + mod_assertplus.array(errors, 'list of errors'); + mod_assertplus.ok(errors.length > 0, 'must be at least one error'); + this.ase_errors = errors; + + VError.call(this, { + 'cause': errors[0] + }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); +} + +mod_util.inherits(MultiError, VError); +MultiError.prototype.name = 'MultiError'; + +MultiError.prototype.errors = function me_errors() +{ + return (this.ase_errors.slice(0)); +}; + + +/* + * See README.md for reference details. + */ +function WError() +{ + var args, obj, parsed, options; + + args = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof WError)) { + obj = Object.create(WError.prototype); + WError.apply(obj, args); + return (obj); + } + + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': false + }); + + options = parsed.options; + options['skipCauseMessage'] = true; + VError.call(this, options, '%s', parsed.shortmessage); + + return (this); +} + +mod_util.inherits(WError, VError); +WError.prototype.name = 'WError'; + +WError.prototype.toString = function we_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + if (this.jse_cause && this.jse_cause.message) + str += '; caused by ' + this.jse_cause.toString(); + + return (str); +}; + +/* + * For purely historical reasons, WError's cause() function allows you to set + * the cause. + */ +WError.prototype.cause = function we_cause(c) +{ + if (mod_isError(c)) + this.jse_cause = c; + + return (this.jse_cause); +}; diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE b/test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE new file mode 100644 index 00000000..d8d7f943 --- /dev/null +++ b/test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. 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/test-eol-project/node_modules/verror/node_modules/core-util-is/README.md b/test-eol-project/node_modules/verror/node_modules/core-util-is/README.md new file mode 100644 index 00000000..5a76b414 --- /dev/null +++ b/test-eol-project/node_modules/verror/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch b/test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch new file mode 100644 index 00000000..a06d5c05 --- /dev/null +++ b/test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js b/test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js new file mode 100644 index 00000000..ff4c851c --- /dev/null +++ b/test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/package.json b/test-eol-project/node_modules/verror/node_modules/core-util-is/package.json new file mode 100644 index 00000000..3368e951 --- /dev/null +++ b/test-eol-project/node_modules/verror/node_modules/core-util-is/package.json @@ -0,0 +1,32 @@ +{ + "name": "core-util-is", + "version": "1.0.2", + "description": "The `util.is*` functions introduced in Node v0.12.", + "main": "lib/util.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is" + }, + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "scripts": { + "test": "tap test.js" + }, + "devDependencies": { + "tap": "^2.3.0" + } +} diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/test.js b/test-eol-project/node_modules/verror/node_modules/core-util-is/test.js new file mode 100644 index 00000000..1a490c65 --- /dev/null +++ b/test-eol-project/node_modules/verror/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/test-eol-project/node_modules/verror/package.json b/test-eol-project/node_modules/verror/package.json new file mode 100644 index 00000000..79295c57 --- /dev/null +++ b/test-eol-project/node_modules/verror/package.json @@ -0,0 +1,22 @@ +{ + "name": "verror", + "version": "1.10.0", + "description": "richer JavaScript errors", + "main": "./lib/verror.js", + "repository": { + "type": "git", + "url": "git://github.com/davepacheco/node-verror.git" + }, + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "engines": [ + "node >=0.6.0" + ], + "scripts": { + "test": "make test" + }, + "license": "MIT" +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/.travis.yml b/test-eol-project/node_modules/webdriver-js-extender/.travis.yml new file mode 100644 index 00000000..b9e743a0 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/.travis.yml @@ -0,0 +1,23 @@ +language: node_js +sudo: false +node_js: + - "6" + - "8" + - "10" + +env: + global: + - CXX=g++-4.8 + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + +before_install: + - g++-4.8 --version + +script: + - npm test diff --git a/test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md b/test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md new file mode 100644 index 00000000..22949549 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md @@ -0,0 +1,13 @@ +Adding support for more commands +-------------------------------- + +If you think we need to support another command, you can either make an issue +requesting support, or just implement it yourself. + +Adding new commands is easy. In [`lib/index.ts`](lib/index.ts), you'll see the +implementation of our current commands. If your command is already supported by +[`wd`](https://github.com/admc/wd), you should be able to get all the +information you need [from `webdriverio`]( +https://github.com/webdriverio/webdriverio/tree/master/lib/protocol). Make sure to add tests +in [`spec/index_spec.ts`](spec/index_spec.ts), and run `npm test` before you +submit. diff --git a/test-eol-project/node_modules/webdriver-js-extender/LICENSE b/test-eol-project/node_modules/webdriver-js-extender/LICENSE new file mode 100644 index 00000000..5cbc7da3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2016 Google, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/test-eol-project/node_modules/webdriver-js-extender/README.md b/test-eol-project/node_modules/webdriver-js-extender/README.md new file mode 100644 index 00000000..50727a54 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/README.md @@ -0,0 +1,21 @@ +WebDriver JS Extender +===================== + +This tools extends [Selenium's javascript implementation]( +https://www.npmjs.com/package/selenium-webdriver) of the WebDriver API +to include additional commands (e.g. commands required for [appium]( +https://github.com/appium/appium)). + +You can view the full list of commands in [`lib/index.ts`](lib/index.ts#L8). + +Usage +----- + +Use WebDriver JS Extender's `extend` function on your webdriver instance: + + +```js + var extendedWebdriver = require('webdriver-js-extender').extend(webdriver); + + extendedWebdriver.setNetworkConnection(5); +``` diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts new file mode 100644 index 00000000..8aaae5ed --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts @@ -0,0 +1,11 @@ +import { promise as wdpromise } from 'selenium-webdriver'; +import { Extender } from './extender'; +export declare class CommandDefinition { + name: string; + params: string[]; + method: 'GET' | 'POST' | 'DELETE' | 'PUT'; + path: string; + private preprocessParams; + constructor(name: string, params: string[], method: 'GET' | 'POST' | 'DELETE' | 'PUT', path: string, preprocessParams?: (...args: any[]) => any[]); + compile(extender: Extender, silentFailure: boolean): (...args: any[]) => wdpromise.Promise; +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js new file mode 100644 index 00000000..235feac6 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path_1 = require("path"); +class CommandDefinition { + constructor(name, params, method, path, preprocessParams = (x) => x) { + this.name = name; + this.params = params; + this.method = method; + this.path = path; + this.preprocessParams = preprocessParams; + } + compile(extender, silentFailure) { + try { + extender.defineCommand(this.name, this.params, this.method, path_1.posix.join('/session/:sessionId', this.path)); + return (...args) => { + return extender.execCommand(this.name, this.method, this.preprocessParams(args)); + }; + } + catch (e) { + if (silentFailure) { + return (...args) => { + throw new Error('Command "' + this.name + '" could not be extended onto WebDriver instance. ' + + 'This is generally a result of using `directConnect` in protractor.'); + }; + } + else { + throw e; + } + } + } +} +exports.CommandDefinition = CommandDefinition; +//# sourceMappingURL=command_definition.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map new file mode 100644 index 00000000..d03d1aa5 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"command_definition.js","sourceRoot":"","sources":["../../lib/command_definition.ts"],"names":[],"mappings":";;AAAA,+BAAmC;AAKnC;IACE,YACW,IAAY,EAAS,MAAgB,EAAS,MAAmC,EACjF,IAAY,EAAU,mBAA8C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAD5E,SAAI,GAAJ,IAAI,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAU;QAAS,WAAM,GAAN,MAAM,CAA6B;QACjF,SAAI,GAAJ,IAAI,CAAQ;QAAU,qBAAgB,GAAhB,gBAAgB,CAAsC;IAAG,CAAC;IAE3F,OAAO,CAAI,QAAkB,EAAE,aAAsB;QACnD,IAAI;YACF,QAAQ,CAAC,aAAa,CAClB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,YAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACtF,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;gBACxB,OAAO,QAAQ,CAAC,WAAW,CAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;YACtF,CAAC,CAAA;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,aAAa,EAAE;gBACjB,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;oBACxB,MAAM,IAAI,KAAK,CACX,WAAW,GAAG,IAAI,CAAC,IAAI,GAAG,mDAAmD;wBAC7E,oEAAoE,CAAC,CAAC;gBAC5E,CAAC,CAAC;aACH;iBAAM;gBACL,MAAM,CAAC,CAAC;aACT;SACF;IACH,CAAC;CACF;AAxBD,8CAwBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts new file mode 100644 index 00000000..1aa0a7c8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts @@ -0,0 +1,48 @@ +import { CommandDefinition } from './command_definition'; +export declare let getNetworkConnection: CommandDefinition; +export declare let setNetworkConnection: CommandDefinition; +export declare let toggleAirplaneMode: CommandDefinition; +export declare let toggleWiFi: CommandDefinition; +export declare let toggleData: CommandDefinition; +export declare let toggleLocationServices: CommandDefinition; +export declare let getGeolocation: CommandDefinition<{ + latitude: number; + longitude: number; + altitude: number; +}>; +export declare let setGeolocation: CommandDefinition; +export declare let getCurrentDeviceActivity: CommandDefinition; +export declare let startDeviceActivity: CommandDefinition; +export declare let getAppiumSettings: CommandDefinition<{ + [name: string]: any; +}>; +export declare let setAppiumSettings: CommandDefinition; +export declare let getCurrentContext: CommandDefinition; +export declare let selectContext: CommandDefinition; +export declare let getScreenOrientation: CommandDefinition<"LANDSCAPE" | "PORTRAIT">; +export declare let setScreenOrientation: CommandDefinition; +export declare let isDeviceLocked: CommandDefinition; +export declare let lockDevice: CommandDefinition; +export declare let unlockDevice: CommandDefinition; +export declare let installApp: CommandDefinition; +export declare let isAppInstalled: CommandDefinition; +export declare let removeApp: CommandDefinition; +export declare let pullFileFromDevice: CommandDefinition; +export declare let pullFolderFromDevice: CommandDefinition; +export declare let pushFileToDevice: CommandDefinition; +export declare let listContexts: CommandDefinition; +export declare let uploadFile: CommandDefinition; +export declare let switchToParentFrame: CommandDefinition; +export declare let fullscreen: CommandDefinition; +export declare let sendAppToBackground: CommandDefinition; +export declare let closeApp: CommandDefinition; +export declare let getAppStrings: CommandDefinition; +export declare let launchSession: CommandDefinition; +export declare let resetApp: CommandDefinition; +export declare let hideSoftKeyboard: CommandDefinition; +export declare let getDeviceTime: CommandDefinition; +export declare let openDeviceNotifications: CommandDefinition; +export declare let rotationGesture: CommandDefinition<{}>; +export declare let shakeDevice: CommandDefinition; +export declare let sendChromiumCommand: CommandDefinition; +export declare let sendChromiumCommandAndGetResult: CommandDefinition; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js new file mode 100644 index 00000000..c43250d0 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js @@ -0,0 +1,106 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const command_definition_1 = require("./command_definition"); +exports.getNetworkConnection = new command_definition_1.CommandDefinition('getNetworkConnection', [], 'GET', '/network_connection'); +exports.setNetworkConnection = new command_definition_1.CommandDefinition('setNetworkConnection', ['type'], 'POST', '/network_connection', (args) => { + if (typeof args[0] == 'boolean') { + // Transform into bitmask + return [(args[0] ? 1 : 0) + (args[1] ? 2 : 0) + (args[2] ? 4 : 0)]; + } + else { + return args; + } +}); +exports.toggleAirplaneMode = new command_definition_1.CommandDefinition('toggleAirplaneMode', [], 'POST', 'appium/device/toggle_airplane_mode'); +exports.toggleWiFi = new command_definition_1.CommandDefinition('toggleWiFi', [], 'POST', 'appium/device/toggle_wifi'); +exports.toggleData = new command_definition_1.CommandDefinition('toggleData', [], 'POST', 'appium/device/toggle_data'); +exports.toggleLocationServices = new command_definition_1.CommandDefinition('toggleLocationServices', [], 'POST', 'appium/device/toggle_location_services'); +exports.getGeolocation = new command_definition_1.CommandDefinition('getGeolocation', [], 'GET', '/location'); +exports.setGeolocation = new command_definition_1.CommandDefinition('setGeolocation', ['location'], 'POST', '/location', (args) => { + return [{ latitude: args[0] || 0, longitude: args[1] || 0, altitude: args[2] || 0 }]; +}); +exports.getCurrentDeviceActivity = new command_definition_1.CommandDefinition('getCurrentDeviceActivity', [], 'GET', '/appium/device/current_activity'); +exports.startDeviceActivity = new command_definition_1.CommandDefinition('startDeviceActivity', ['appPackage', 'appActivity', 'appWaitPackage', 'appWaitActivity'], 'POST', '/appium/device/start_activity', (args) => { + if (args.length == 2) { + // No appWait, default parameters to undefined + args[2] = undefined; + args[3] = undefined; + } + if (args.length == 4) { + return args; + } + else { + throw new RangeError('startDeviceActivity requires 2 or 4 arguments, got ' + args.length); + } +}); +exports.getAppiumSettings = new command_definition_1.CommandDefinition('getAppiumSettings', [], 'GET', '/appium/settings'); +exports.setAppiumSettings = new command_definition_1.CommandDefinition('setAppiumSettings', ['settings'], 'POST', '/appium/settings'); +exports.getCurrentContext = new command_definition_1.CommandDefinition('getCurrentContext', [], 'GET', '/context'); +exports.selectContext = new command_definition_1.CommandDefinition('selectContext', ['name'], 'POST', '/context'); +exports.getScreenOrientation = new command_definition_1.CommandDefinition('getScreenOrientation', [], 'GET', '/orientation'); +exports.setScreenOrientation = new command_definition_1.CommandDefinition('setScreenOrientation', ['orientation'], 'POST', '/orientation', (args) => { + let orientation = (args[0] || '').toUpperCase(); + if ((orientation != 'PORTRAIT') && (orientation != 'LANDSCAPE')) { + throw new TypeError('Invalid orientation "' + args[0] + '"'); + } + args[0] = orientation; + return args; +}); +exports.isDeviceLocked = new command_definition_1.CommandDefinition('isDeviceLocked', [], 'POST', '/appium/device/is_locked'); +exports.lockDevice = new command_definition_1.CommandDefinition('lockDevice', ['seconds'], 'POST', '/appium/device/lock', (args) => { + args[0] = args[0] || 0; + return args; +}); +exports.unlockDevice = new command_definition_1.CommandDefinition('unlockDevice', [], 'POST', '/appium/device/unlock'); +exports.installApp = new command_definition_1.CommandDefinition('installApp', ['appPath'], 'POST', '/appium/device/install_app'); +exports.isAppInstalled = new command_definition_1.CommandDefinition('isAppInstalled', ['bundleId'], 'POST', 'appium/device/app_installed'); +exports.removeApp = new command_definition_1.CommandDefinition('removeApp', ['appId'], 'POST', '/appium/device/remove_app'); +exports.pullFileFromDevice = new command_definition_1.CommandDefinition('pullFileFromDevice', ['path'], 'POST', '/appium/device/pull_file'); +exports.pullFolderFromDevice = new command_definition_1.CommandDefinition('pullFolderFromDevice', ['path'], 'POST', '/appium/device/pull_folder'); +exports.pushFileToDevice = new command_definition_1.CommandDefinition('pushFileToDevice', ['path', 'data'], 'POST', 'appium/device/push_file'); +exports.listContexts = new command_definition_1.CommandDefinition('listContexts', [], 'GET', '/contexts'); +exports.uploadFile = new command_definition_1.CommandDefinition('uploadFile', ['file'], 'POST', '/file'); +exports.switchToParentFrame = new command_definition_1.CommandDefinition('switchToParentFrame', [], 'POST', '/frame/parent'); +exports.fullscreen = new command_definition_1.CommandDefinition('fullscreen', [], 'POST', '/window/fullscreen'); +exports.sendAppToBackground = new command_definition_1.CommandDefinition('sendAppToBackground', ['seconds'], 'POST', '/appium/app/background', (args) => { + args[0] = args[0] || 0; + return args; +}); +exports.closeApp = new command_definition_1.CommandDefinition('closeApp', [], 'POST', '/appium/app/close'); +exports.getAppStrings = new command_definition_1.CommandDefinition('getAppStrings', ['language'], 'POST', 'appium/app/strings', (args) => { + args[0] = args.length ? args[0] : undefined; // Default to `undefined` + return args; +}); +exports.launchSession = new command_definition_1.CommandDefinition('launchSession', [], 'POST', '/appium/app/launch'); +exports.resetApp = new command_definition_1.CommandDefinition('resetApp', [], 'POST', '/appium/app/reset'); +exports.hideSoftKeyboard = new command_definition_1.CommandDefinition('hideSoftKeyboard', ['strategy', 'key'], 'POST', '/appium/device/hide_keyboard', (args) => { + switch (args[0] || 'default') { + case 'default': + args[0] = 'default'; + case 'swipeDown': + case 'tapOut': + case 'tapOutside': + if (args.length == 1) { + args[1] = undefined; // Default to `undefined` + } + case 'press': + case 'pressKey': + return args; + default: + throw new RangeError('Invalid keyboard hiding strategy "' + args[0] + '"'); + } +}); +exports.getDeviceTime = new command_definition_1.CommandDefinition('getDeviceTime', [], 'GET', '/appium/device/system_time'); +exports.openDeviceNotifications = new command_definition_1.CommandDefinition('openDeviceNotifications', [], 'POST', '/appium/device/open_notifications'); +exports.rotationGesture = new command_definition_1.CommandDefinition('rotationGesture', ['x', 'y', 'duration', 'rotation', 'touchCount'], 'POST', '/appium/device/rotate', (args) => { + args[0] = args[0] || 0; + args[1] = args[1] || 0; + args[2] = args[2] === undefined ? 1 : args[2]; + args[3] = args[3] === undefined ? 180 : args[3]; + args[4] = args[4] == undefined ? 2 : args[4]; + return args; +}); +exports.shakeDevice = new command_definition_1.CommandDefinition('shakeDevice', [], 'POST', 'appium/device/shake'); +exports.sendChromiumCommand = new command_definition_1.CommandDefinition('sendChromiumCommand', ['cmd', 'params'], 'POST', '/chromium/send_command'); +exports.sendChromiumCommandAndGetResult = new command_definition_1.CommandDefinition('sendChromiumCommandAndGetResult', ['cmd', 'params'], 'POST', '/chromium/send_command_and_get_result'); +//# sourceMappingURL=command_definitions.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map new file mode 100644 index 00000000..ad2bf3bb --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"command_definitions.js","sourceRoot":"","sources":["../../lib/command_definitions.ts"],"names":[],"mappings":";;AAAA,6DAAuD;AAE5C,QAAA,oBAAoB,GAC3B,IAAI,sCAAiB,CAAS,sBAAsB,EAAE,EAAE,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC;AACjF,QAAA,oBAAoB,GAAG,IAAI,sCAAiB,CACnD,sBAAsB,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,qBAAqB,EAC/D,CAAC,IAA2B,EAAE,EAAE;IAC9B,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE;QAC/B,yBAAyB;QACzB,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;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,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,CAAC;AACI,QAAA,WAAW,GAClB,IAAI,sCAAiB,CAAO,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC;AACvE,QAAA,mBAAmB,GAAG,IAAI,sCAAiB,CAClD,qBAAqB,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,wBAAwB,CAAC,CAAC;AACrE,QAAA,+BAA+B,GAAG,IAAI,sCAAiB,CAC9D,iCAAiC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,MAAM,EAC5D,uCAAuC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts new file mode 100644 index 00000000..c84eb1f4 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts @@ -0,0 +1,10 @@ +import { promise as wdpromise } from 'selenium-webdriver'; +export declare class DeferredExecutor { + execute: (command: any) => wdpromise.Promise; + defineCommand: (name: string, method: string, path: string) => void; + /** + * @param {!Promise} delegate The promised delegate, which + * may be provided by any promise-like thenable object. + */ + constructor(delegate: wdpromise.Promise); +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js new file mode 100644 index 00000000..e6f61fab --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/* + * Wraps a promised {@link Executor}, ensuring no commands are executed until + * the wrapped executor has been fully resolved. + * + * selenium-webdriver uses this internally, and we overwrite it to give it the + * defineCommand() function + * + * Based off of + * https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/lib/command.js#L240 + * + * @implements {Executor} + */ +class DeferredExecutor { + /** + * @param {!Promise} delegate The promised delegate, which + * may be provided by any promise-like thenable object. + */ + constructor(delegate) { + /** @override */ + this.execute = function (command) { + return delegate.then((executor) => { + return executor.execute(command); + }); + }; + this.defineCommand = function (name, method, path) { + delegate.then((executor) => { + executor.defineCommand(name, method, path); + }); + }; + } +} +exports.DeferredExecutor = DeferredExecutor; +//# sourceMappingURL=deferred_executor.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map new file mode 100644 index 00000000..4b06c2bd --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"deferred_executor.js","sourceRoot":"","sources":["../../lib/deferred_executor.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;GAWG;AACH;IAIE;;;OAGG;IACH,YAAY,QAAgC;QAC1C,gBAAgB;QAChB,IAAI,CAAC,OAAO,GAAG,UAAS,OAAY;YAClC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAa,EAAE,EAAE;gBACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,UAAS,IAAY,EAAE,MAAc,EAAE,IAAY;YACtE,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAa,EAAE,EAAE;gBAC9B,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;CACF;AAtBD,4CAsBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts new file mode 100644 index 00000000..7f1b8640 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts @@ -0,0 +1,35 @@ +import { promise as wdpromise, WebDriver } from 'selenium-webdriver'; +export declare class Extender { + driver_: WebDriver; + params_: { + [key: string]: string[]; + }; + executor_: { + defineCommand: (name: string, method: string, path: string) => void; + }; + constructor(driver: WebDriver); + /** + * Defines a new command. When a command is sent, the {@code path} will be + * preprocessed using the command's parameters; any path segments prefixed + * with ":" will be replaced by the parameter of the same name. For example, + * given "/person/:name" and the parameters "{name: 'Bob'}", the final command + * path will be "/person/Bob". + * + * @param {string} name The command name. + * @param {string} params The names of the parameters to the command + * @param {string} method The HTTP method to use when sending this command. + * @param {string} path The path to send the command to, relative to + * the WebDriver server's command root and of the form + * "/path/:variable/segment". + */ + defineCommand(name: string, params: string[], method: string, path: string): void; + /** + * Executes a command which was defined by defineCommand() + * + * @param {string} name The command name. + * @param {*[]} params The parameters to the command + * @return {webdriver.promise.Promise<*>} A promise that will be resolved with + * the command result + */ + execCommand(name: string, method: string, params: any[]): wdpromise.Promise; +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js new file mode 100644 index 00000000..104b2c65 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +let Command = require('selenium-webdriver/lib/command').Command; +class Extender { + constructor(driver) { + this.driver_ = driver; + this.params_ = {}; + this.executor_ = + driver.getExecutor ? driver.getExecutor() : driver.executor_; + } + /** + * Defines a new command. When a command is sent, the {@code path} will be + * preprocessed using the command's parameters; any path segments prefixed + * with ":" will be replaced by the parameter of the same name. For example, + * given "/person/:name" and the parameters "{name: 'Bob'}", the final command + * path will be "/person/Bob". + * + * @param {string} name The command name. + * @param {string} params The names of the parameters to the command + * @param {string} method The HTTP method to use when sending this command. + * @param {string} path The path to send the command to, relative to + * the WebDriver server's command root and of the form + * "/path/:variable/segment". + */ + defineCommand(name, params, method, path) { + this.executor_.defineCommand(name, method, path); + this.params_[method + ':' + name] = params; + } + /** + * Executes a command which was defined by defineCommand() + * + * @param {string} name The command name. + * @param {*[]} params The parameters to the command + * @return {webdriver.promise.Promise<*>} A promise that will be resolved with + * the command result + */ + execCommand(name, method, params) { + var paramNames = this.params_[method + ':' + name]; + if (paramNames === undefined) { + throw new RangeError('The command "' + name + '" has not yet been defined'); + } + if (paramNames.length !== params.length) { + throw new RangeError('The command "' + name + '" expected ' + paramNames.length + ' parameters, got ' + + params.length); + } + var command = new Command(name); + for (var i = 0; i < params.length; i++) { + if (params[i] !== undefined) { + command.setParameter(paramNames[i], params[i]); + } + } + return this.driver_.schedule(command, 'Custom Command: ' + name + '(' + + params + .map((x) => { + if ((typeof x == 'number') || (typeof x == 'boolean') || + (typeof x == 'function')) { + return x.toString(); + } + else if (x == null) { + return '' + x; + } + else { + return JSON.stringify(x); + } + }) + .join(', ') + + ')'); + } +} +exports.Extender = Extender; +//# sourceMappingURL=extender.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map new file mode 100644 index 00000000..3a465426 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extender.js","sourceRoot":"","sources":["../../lib/extender.ts"],"names":[],"mappings":";;AAEA,IAAI,OAAO,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC,OAAO,CAAC;AAEhE;IAME,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS;YACT,MAAc,CAAC,WAAW,CAAC,CAAC,CAAE,MAAc,CAAC,WAAW,EAAE,CAAC,CAAC,CAAE,MAAc,CAAC,SAAS,CAAC;IAC9F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,IAAY,EAAE,MAAgB,EAAE,MAAc,EAAE,IAAY;QACxE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC;IAC7C,CAAC;IAED;;;;;;;OAOG;IACH,WAAW,CAAI,IAAY,EAAE,MAAc,EAAE,MAAa;QACxD,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;QACnD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,UAAU,CAAC,eAAe,GAAG,IAAI,GAAG,4BAA4B,CAAC,CAAC;SAC7E;QACD,IAAI,UAAU,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE;YACvC,MAAM,IAAI,UAAU,CAChB,eAAe,GAAG,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,MAAM,GAAG,mBAAmB;gBAChF,MAAM,CAAC,MAAM,CAAC,CAAC;SACpB;QACD,IAAI,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;gBAC3B,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;aAChD;SACF;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CACxB,OAAO,EACP,kBAAkB,GAAG,IAAI,GAAG,GAAG;YAC3B,MAAM;iBACD,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBACd,IAAI,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC;oBACjD,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,EAAE;oBAC5B,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;iBACrB;qBAAM,IAAI,CAAC,IAAI,IAAI,EAAE;oBACpB,OAAO,EAAE,GAAG,CAAC,CAAC;iBACf;qBAAM;oBACL,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;iBAC1B;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;YACf,GAAG,CAAC,CAAC;IACf,CAAC;CACF;AAzED,4BAyEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts new file mode 100644 index 00000000..44af777c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts @@ -0,0 +1,53 @@ +import { promise as wdpromise, WebDriver } from 'selenium-webdriver'; +export interface ExtendedWebDriver extends WebDriver { + getNetworkConnection: () => wdpromise.Promise<0 | 1 | 2 | 3 | 4 | 5 | 6 | 7>; + setNetworkConnection: (typeOrAirplaneMode: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | boolean, wifi?: boolean, data?: boolean) => wdpromise.Promise; + toggleAirplaneMode: () => wdpromise.Promise; + toggleWiFi: () => wdpromise.Promise; + toggleData: () => wdpromise.Promise; + toggleLocationServices: () => wdpromise.Promise; + getGeolocation: () => wdpromise.Promise<{ + latitude: number; + longitude: number; + altitude: number; + }>; + setGeolocation: (latitude?: number, longitude?: number, altitude?: number) => wdpromise.Promise; + getCurrentDeviceActivity: () => wdpromise.Promise; + startDeviceActivity: (appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string) => wdpromise.Promise; + getAppiumSettings: () => wdpromise.Promise<{ + [name: string]: any; + }>; + setAppiumSettings: (settings: { + [name: string]: any; + }) => wdpromise.Promise; + getCurrentContext: () => wdpromise.Promise; + selectContext: (name: string) => wdpromise.Promise; + listContexts: () => wdpromise.Promise; + getScreenOrientation: () => wdpromise.Promise<'LANDSCAPE' | 'PORTRAIT'>; + setScreenOrientation: (orientation: string) => wdpromise.Promise; + isDeviceLocked: () => wdpromise.Promise; + lockDevice: (delay?: number) => wdpromise.Promise; + unlockDevice: () => wdpromise.Promise; + installApp: (appPath: string) => wdpromise.Promise; + isAppInstalled: (bundleId: string) => wdpromise.Promise; + removeApp: (appId: string) => wdpromise.Promise; + pullFileFromDevice: (path: string) => wdpromise.Promise; + pullFolderFromDevice: (path: string) => wdpromise.Promise; + pushFileToDevice: (path: string, base64Data: string) => wdpromise.Promise; + uploadFile: (base64Data: string) => wdpromise.Promise; + switchToParentFrame: () => wdpromise.Promise; + fullscreen: () => wdpromise.Promise; + sendAppToBackground: (delay?: number) => wdpromise.Promise; + closeApp: () => wdpromise.Promise; + getAppStrings: (language?: string) => wdpromise.Promise; + launchSession: () => wdpromise.Promise; + resetApp: () => wdpromise.Promise; + hideSoftKeyboard: (strategy?: 'default' | 'tapOutside' | 'tapOut' | 'swipeDown' | 'pressKey' | 'press', key?: string) => wdpromise.Promise; + getDeviceTime: () => wdpromise.Promise; + openDeviceNotifications: () => wdpromise.Promise; + rotationGesture: (x?: number, y?: number, duration?: number, rotation?: number, touchCount?: 1 | 2 | 3 | 4 | 5) => wdpromise.Promise; + shakeDevice: () => wdpromise.Promise; + sendChromiumCommand: (cmd: string, params: Object) => wdpromise.Promise; + sendChromiumCommandAndGetResult: (cmd: string, params: Object) => wdpromise.Promise; +} +export declare function extend(baseDriver: WebDriver, fallbackGracefully?: boolean): ExtendedWebDriver; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js new file mode 100644 index 00000000..6721ae07 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const commandDefinitions = require("./command_definitions"); +const extender_1 = require("./extender"); +function extend(baseDriver, fallbackGracefully = false) { + var extender = new extender_1.Extender(baseDriver); + let extendedDriver = baseDriver; + for (let commandName in commandDefinitions) { + extendedDriver[commandName] = + commandDefinitions[commandName].compile(extender, fallbackGracefully); + } + return extendedDriver; +} +exports.extend = extend; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map new file mode 100644 index 00000000..ced288fc --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;AAGA,4DAA4D;AAC5D,yCAAoC;AAiJpC,gBAAuB,UAAqB,EAAE,kBAAkB,GAAG,KAAK;IACtE,IAAI,QAAQ,GAAG,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,cAAc,GAAsB,UAA+B,CAAC;IAExE,KAAK,IAAI,WAAW,IAAI,kBAAkB,EAAE;QACzC,cAAsB,CAAC,WAAW,CAAC;YAC/B,kBAA0B,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;KACpF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAVD,wBAUC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/package.json b/test-eol-project/node_modules/webdriver-js-extender/built/package.json new file mode 100644 index 00000000..7b6bd017 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/package.json @@ -0,0 +1,39 @@ +{ + "name": "webdriver-js-extender", + "version": "2.1.0", + "description": "A plugin which adds additional commands to selenium's javascript implementation of the webdriver client side API", + "scripts": { + "prepublish": "gulp prepublish", + "test": "gulp test" + }, + "keywords": [ + "testing", + "webdriver", + "webdriverjs", + "selenium", + "appium" + ], + "repository": "github:angular/webdriver-js-extender", + "main": "built/lib/index.js", + "author": "Sammy Jelin ", + "license": "MIT", + "typings": "built/lib/index.d.ts", + "dependencies": { + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" + }, + "devDependencies": { + "@types/jasmine": "^2.5.37", + "clang-format": "^1.0.42", + "gulp": "^3.9.1", + "gulp-clang-format": "^1.0.23", + "jasmine": "^2.4.1", + "portfinder": "^1.0.10", + "run-sequence": "^1.2.2", + "selenium-mock": "^0.1.5", + "typescript": "^2.0.0" + }, + "engines": { + "node": ">=6.9.x" + } +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts new file mode 100644 index 00000000..5df10614 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts @@ -0,0 +1,2 @@ +import { ExtendedWebDriver } from '../../lib'; +export declare function initMockSeleniumStandaloneServerAndGetDriverFactory(annotateCommands?: boolean): () => ExtendedWebDriver; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js new file mode 100644 index 00000000..913bbd3f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js @@ -0,0 +1,73 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const webdriver = require("selenium-webdriver"); +const commandDefinitions = require("../../lib/command_definitions"); +const mock_server_1 = require("../mock-server"); +const commands_1 = require("../mock-server/commands"); +const selenium_mock_1 = require("selenium-mock"); +const lib_1 = require("../../lib"); +let portfinder = require('portfinder'); +let commandMap = null; +function buildCommandMap(commandList) { + if (commandMap == null) { + commandMap = {}; + } + for (let commandName in commandList) { + let command = commandList[commandName]; + if (command instanceof selenium_mock_1.Command) { + commandMap[command.method + ':' + (command.path[0] == '/' ? '' : '/') + command.path] = command; + } + else { + buildCommandMap(command); + } + } +} +function initMockSeleniumStandaloneServerAndGetDriverFactory(annotateCommands = false) { + let server; + let port; + beforeAll((done) => { + portfinder.getPort((err, p) => { + if (err) { + done.fail(err); + } + else { + port = p; + server = new mock_server_1.MockAppium(port); + server.start(); + done(); + } + }); + }); + if (annotateCommands && !commandMap) { + buildCommandMap(commands_1.session); + } + return () => { + let driver = lib_1.extend(new webdriver.Builder(). + usingServer('http://localhost:' + port + '/wd/hub'). + withCapabilities({ browserName: 'chrome' }).build()); + if (annotateCommands) { + Object.keys(commandDefinitions).forEach((commandName) => { + let clientCommand = commandDefinitions[commandName]; + let serverCommand = commandMap[clientCommand.method + ':' + + (clientCommand.path[0] == '/' ? '' : '/') + clientCommand.path]; + let spy = spyOn(serverCommand, 'exec').and.callThrough(); + let oldFun = driver[commandName]; + driver[commandName] = function () { + let oldCount = spy.calls.count(); + return oldFun.apply(this, arguments).then((result) => { + expect(spy.calls.count()).toBe(oldCount + 1); + let args = spy.calls.mostRecent().args; + return { + result: result, + session: args[0], + params: args[1] + }; + }); + }; + }); + } + return driver; + }; +} +exports.initMockSeleniumStandaloneServerAndGetDriverFactory = initMockSeleniumStandaloneServerAndGetDriverFactory; +//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map new file mode 100644 index 00000000..47224c67 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../spec/command_tests/helpers.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAEhD,oEAAoE;AACpE,gDAA0C;AAE1C,sDAA+D;AAC/D,iDAAsC;AACtC,mCAAoD;AACpD,IAAI,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAGvC,IAAI,UAAU,GAA2C,IAAI,CAAC;AAC9D,yBAAyB,WAAwB;IAC/C,IAAI,UAAU,IAAI,IAAI,EAAE;QACtB,UAAU,GAAG,EAAE,CAAC;KACjB;IACD,KAAK,IAAI,WAAW,IAAI,WAAW,EAAE;QACnC,IAAI,OAAO,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;QACvC,IAAI,OAAO,YAAY,uBAAO,EAAE;YAC9B,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA,CAAC,CAAA,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;SAC/F;aAAM;YACL,eAAe,CAAC,OAAO,CAAC,CAAC;SAC1B;KACF;AACH,CAAC;AAED,6DAAoE,gBAAgB,GAAG,KAAK;IAC1F,IAAI,MAAkB,CAAC;IACvB,IAAI,IAAY,CAAC;IACjB,SAAS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AW,CAAC,CAAC;gBACzC,MAAc,CAAC,WAAW,CAAC,GAAG;oBAC7B,IAAI,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;oBACjC,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,MAAW,EAAE,EAAE;wBACxD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;wBAC7C,IAAI,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC;wBACvC,OAAO;4BACL,MAAM,EAAE,MAAM;4BACd,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;4BAChB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;yBAChB,CAAC;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AA/CD,kHA+CC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js new file mode 100644 index 00000000..b094f347 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js @@ -0,0 +1,213 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const helpers_1 = require("./helpers"); +const path = require("path"); +describe('normal tests', () => { + let driverFactory = helpers_1.initMockSeleniumStandaloneServerAndGetDriverFactory(); + it('should set/get device activity', (done) => { + let driver = driverFactory(); + driver.startDeviceActivity('sjelin', '.is.cool').then(() => { + return driver.getCurrentDeviceActivity(); + }).then((activity) => { + expect(activity).toBe('.is.cool'); + return driver.startDeviceActivity('sjelin', '.is.the.coolest'); + }).then(() => { + return driver.getCurrentDeviceActivity(); + }).then((activity) => { + expect(activity).toBe('.is.the.coolest'); + done(); + }); + }); + it('should set/get appium settings', (done) => { + let driver = driverFactory(); + driver.setAppiumSettings({ ignoreUnimportantViews: true }).then(() => { + return driver.getAppiumSettings(); + }).then((settings) => { + expect(settings['ignoreUnimportantViews']).toBe(true); + return driver.setAppiumSettings({ ignoreUnimportantViews: false }); + }).then(() => { + return driver.getAppiumSettings(); + }).then((settings) => { + expect(settings['ignoreUnimportantViews']).toBe(false); + done(); + }); + }); + it('should set/get the context', (done) => { + let driver = driverFactory(); + driver.selectContext('NATIVE_APP').then(() => { + return driver.getCurrentContext(); + }).then((context) => { + expect(context).toBe('NATIVE_APP'); + return driver.selectContext('WEBVIEW_1'); + }).then(() => { + return driver.getCurrentContext(); + }).then((context) => { + expect(context).toBe('WEBVIEW_1'); + done(); + }); + }); + it('should set/get screen orientation', (done) => { + let driver = driverFactory(); + driver.setScreenOrientation('landscape').then(() => { + return driver.getScreenOrientation(); + }).then((orientation) => { + expect(orientation).toBe('LANDSCAPE'); + return driver.setScreenOrientation('portrait'); + }).then(() => { + return driver.getScreenOrientation(); + }).then((orientation) => { + expect(orientation).toBe('PORTRAIT'); + done(); + }); + }); + it('should lock/unlcok the device', (done) => { + let driver = driverFactory(); + driver.lockDevice().then(() => { + return driver.isDeviceLocked(); + }).then((locked) => { + expect(locked).toBe(true); + return driver.unlockDevice(); + }).then(() => { + return driver.isDeviceLocked(); + }).then((locked) => { + expect(locked).toBe(false); + done(); + }); + }); + it('should install/uninstall an app', (done) => { + let driver = driverFactory(); + driver.installApp(path.resolve(__dirname, 'totally_real_apk.apk')).then(() => { + return driver.isAppInstalled('sjelin.is.cool'); + }).then((isInstalled) => { + expect(isInstalled).toBe(true); + return driver.removeApp('sjelin.is.cool'); + }).then(() => { + return driver.isAppInstalled('sjelin.is.cool'); + }).then((isInstalled) => { + expect(isInstalled).toBe(false); + done(); + }); + }); + it('should manipulate file system', (done) => { + let driver = driverFactory(); + Promise.all([ + driver.pushFileToDevice('/tmp/wd_js_ext/foo.txt', 'bar'), + driver.pushFileToDevice('/tmp/wd_js_ext/folder/a.txt', 'x'), + driver.pushFileToDevice('/tmp/wd_js_ext/folder/b.txt', 'y'), + driver.pushFileToDevice('/tmp/wd_js_ext/folder/c.txt', 'z'), + ]).then(() => { + return driver.pullFileFromDevice('/tmp/wd_js_ext/foo.txt'); + }).then((fileContents) => { + expect(fileContents).toBe('bar'); + return driver.pullFolderFromDevice('/tmp/wd_js_ext/folder'); + }).then((folderContents) => { + expect(folderContents['a.txt']).toBe('x'); + expect(folderContents['b.txt']).toBe('y'); + expect(folderContents['c.txt']).toBe('z'); + done(); + }); + }); + describe('network connection', () => { + it('should get/set the network connection', (done) => { + let driver = driverFactory(); + driver.setNetworkConnection(0).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(0); + return driver.setNetworkConnection(6); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(6); + done(); + }); + }); + it('should be able to toggle various settings', (done) => { + let driver = driverFactory(); + driver.setNetworkConnection(0).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(0); + return driver.toggleAirplaneMode(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(1); + return driver.toggleWiFi(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(3); + return driver.toggleData(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(7); + return driver.toggleWiFi(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(5); + return driver.toggleAirplaneMode(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(4); + return driver.toggleWiFi(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(6); + return driver.toggleData(); + }).then(() => { + return driver.getNetworkConnection(); + }).then((networkConnection) => { + expect(networkConnection).toBe(2); + done(); + }); + }); + }); + describe('geolocation', () => { + it('should get/set the geolocation', (done) => { + let driver = driverFactory(); + driver.setGeolocation(1, 2, 3).then(() => { + return driver.getGeolocation(); + }).then((geolocation) => { + expect(geolocation).toEqual({ latitude: 1, longitude: 2, altitude: 3 }); + return driver.setGeolocation(0, 0, 0); + }).then(() => { + return driver.getGeolocation(); + }).then((geolocation) => { + expect(geolocation).toEqual({ latitude: 0, longitude: 0, altitude: 0 }); + done(); + }); + }); + it('should disable geolocation', (done) => { + let driver = driverFactory(); + // Location should initially work + driver.setGeolocation(1, 2, 3).then(() => { + return driver.getGeolocation(); + }).then((geolocation) => { + expect(geolocation).toEqual({ latitude: 1, longitude: 2, altitude: 3 }); + // Double toggle should do nothing + return driver.toggleLocationServices(); + }).then(() => { + return driver.toggleLocationServices(); + }).then(() => { + return driver.setGeolocation(0, 0, 0); + }).then(() => { + return driver.getGeolocation(); + }).then((geolocation) => { + expect(geolocation).toEqual({ latitude: 0, longitude: 0, altitude: 0 }); + // Single toggle should cause the command to fail + return driver.toggleLocationServices(); + }).then(() => { + return driver.getGeolocation().catch((error) => { + expect(error.toString()).toContain('Location services disabled'); + done(); + }); + }); + }); + }); +}); +//# sourceMappingURL=normal_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map new file mode 100644 index 00000000..9c78220d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normal_spec.js","sourceRoot":"","sources":["../../../spec/command_tests/normal_spec.ts"],"names":[],"mappings":";;AAAA,uCAA8E;AAC9E,6BAA6B;AAE7B,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,aAAa,GAAG,6DAAmD,EAAE,CAAC;IAE1E,EAAE,CAAC,gCAAgC,EAAE,CAAC,IAAI,EAAE,EAAE;QAC5C,IAAI,MAAM,GAAG,aAAa,EAAE,CAAC;QAC7B,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACzD,OAAO,MAAM,CAAC,wBAAwB,EAAE,CAAC;QAC3C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAClC,OAAO,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACX,OAAO,MAAM,CAAC,wBAAwB,EAAE,CAAC;QAC3C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YACzC,IAAI,EAAE,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE,CAAC,IAAI,EAAE,EAAE;QAC5C,IAAI,MAAM,GAAG,aAAa,EAAE,CAAC;QAC7B,MAAM,CAAC,iBAAiB,CAAC,EAAC,sBAAsB,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACjE,OAAO,MAAM,CAAC,iBAAiB,EAAE,CAAC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AAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts new file mode 100644 index 00000000..93eaed81 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts @@ -0,0 +1,10 @@ +import { Session } from '../mock-server/interfaces'; +export interface Testcase { + skip?: boolean; + args?: any[]; + result?: any; + session?: Session; + params?: { + [name: string]: any; + }; +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js new file mode 100644 index 00000000..7e5afc6d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js @@ -0,0 +1,95 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const helpers_1 = require("./helpers"); +const path = require("path"); +describe('table tests', () => { + let driverFactory = helpers_1.initMockSeleniumStandaloneServerAndGetDriverFactory(true); + let table = { + getCurrentContext: { result: 'WEBVIEW_1' }, + selectContext: { args: ['WEBVIEW_1'], params: { name: 'WEBVIEW_1' } }, + listContexts: { result: ['WEBVIEW_1'] }, + uploadFile: { args: ['hello'], params: { file: 'hello' } }, + getNetworkConnection: { result: 6 }, + setNetworkConnection: [ + { args: [0], params: { 'type': 0 } }, + { args: [true, false, false], params: { 'type': 1 } }, + { args: [false, true, true], params: { 'type': 6 } } + ], + toggleAirplaneMode: {}, + toggleData: {}, + toggleWiFi: {}, + toggleLocationServices: {}, + getGeolocation: { result: { latitude: 0, longitude: 0, altitude: 0 } }, + setGeolocation: { args: [1, 2, 3], params: { location: { latitude: 1, longitude: 2, altitude: 3 } } }, + getScreenOrientation: { result: 'PORTRAIT' }, + setScreenOrientation: { args: ['landscape'], params: { orientation: 'LANDSCAPE' } }, + switchToParentFrame: {}, + fullscreen: {}, + getAppiumSettings: { result: { ignoreUnimportantViews: false } }, + setAppiumSettings: { args: [{ ignoreUnimportantViews: true }], params: { settings: { ignoreUnimportantViews: true } } }, + sendAppToBackground: [{ params: { seconds: 0 } }, { args: [1], params: { seconds: 1 } }], + closeApp: {}, + getAppStrings: [{ result: ['Hello', 'World'] }, + { result: ['Hello', 'World'], args: ['en'], params: { language: 'en' } }], + launchSession: {}, + resetApp: {}, + getCurrentDeviceActivity: {}, + startDeviceActivity: [{ args: ['a', 'b', 'c', 'd'], params: { appPackage: 'a', appActivity: 'b', appWaitPackage: 'c', appWaitActivity: 'd' } }, + { args: ['a', 'b'], params: { appPackage: 'a', appActivity: 'b' } }], + hideSoftKeyboard: [{ params: { strategy: 'default' } }, + { args: ['pressKey', 'Done'], params: { strategy: 'pressKey', key: 'Done' } }], + installApp: { args: [path.resolve(__dirname, 'totally_real_apk.apk')], + params: { appPath: path.resolve(__dirname, 'totally_real_apk.apk') } }, + isAppInstalled: { result: false, args: ['sjelin.is.cool'], params: { bundleId: 'sjelin.is.cool' } }, + removeApp: { args: ['sjelin.is.cool'], params: { appId: 'sjelin.is.cool' } }, + isDeviceLocked: { result: false }, + lockDevice: [{ params: { seconds: 0 } }, { args: [1], params: { seconds: 1 } }], + unlockDevice: {}, + // pullFileFromDevice: null, // No good way to test this + pullFolderFromDevice: { result: {}, args: [''], params: { path: '' } }, + pushFileToDevice: { args: ['/a/b', 'cde'], params: { path: '/a/b', data: 'cde' } }, + getDeviceTime: { result: new Date().toString() }, + openDeviceNotifications: {}, + rotationGesture: [{ params: { x: 0, y: 0, duration: 1, rotation: 180, touchCount: 2 } }, + { args: [1, 2, 3, 90, 5], params: { x: 1, y: 2, duration: 3, rotation: 90, touchCount: 5 } }], + shakeDevice: {}, + sendChromiumCommand: { args: ['DOM.enable', {}] }, + sendChromiumCommandAndGetResult: { args: ['DOM.enable', {}] } + }; + function runTestcase(commandName) { + let itName = 'should correctly call "' + commandName + '"'; + let tableEntry = table[commandName]; + if (tableEntry == null) { + return it(itName); + } + let testcases = Array.isArray(tableEntry) ? tableEntry : [tableEntry]; + testcases.forEach((testcase, i) => { + let caseName = itName + (tableEntry === testcases ? ' (#' + i + ')' : ''); + if (testcase.skip) { + return it(caseName); + } + it(caseName, (done) => { + let driver = driverFactory(); + driver[commandName].apply(driver, testcase.args || []).then((results) => { + expect(results.result).toEqual(testcase.result == null ? null : testcase.result); + if (testcase.session) { + for (let varname in testcase.session) { + expect(results.session[varname]). + toEqual(testcase.session[varname]); + } + } + if (testcase.params) { + for (let paramName in testcase.params) { + expect(results.params[paramName]).toEqual(testcase.params[paramName]); + } + } + done(); + }); + }); + }); + } + for (let commandName in table) { + runTestcase(commandName); + } +}); +//# sourceMappingURL=table_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map new file mode 100644 index 00000000..47a84cf8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"table_spec.js","sourceRoot":"","sources":["../../../spec/command_tests/table_spec.ts"],"names":[],"mappings":";;AAAA,uCAA8E;AAE9E,6BAA6B;AAU7B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,aAAa,GAAG,6DAAmD,CAAC,IAAI,CAAC,CAAC;IAC9E,IAAI,KAAK,GAAmD;QAC1D,iBAAiB,EAAE,EAAC,MAAM,EAAE,WAAW,EAAC;QACxC,aAAa,EAAE,EAAC,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,EAAC,IAAI,EAAE,WAAW,EAAC,EAAC;QACjE,YAAY,EAAE,EAAC,MAAM,EAAE,CAAC,WAAW,CAAC,EAAC;QACrC,UAAU,EAAE,EAAC,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAC,IAAI,EAAE,OAAO,EAAC,EAAC;QACt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EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAClE,CAAC,OAAiB,EAAE,EAAE;oBACpB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACjF,IAAI,QAAQ,CAAC,OAAO,EAAE;wBACpB,KAAK,IAAI,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;4BACpC,MAAM,CAAE,OAAO,CAAC,OAAe,CAAC,OAAO,CAAC,CAAC;gCACrC,OAAO,CAAE,QAAQ,CAAC,OAAe,CAAC,OAAO,CAAC,CAAC,CAAC;yBACjD;qBACF;oBACD,IAAI,QAAQ,CAAC,MAAM,EAAE;wBACnB,KAAK,IAAI,SAAS,IAAI,QAAQ,CAAC,MAAM,EAAE;4BACrC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;yBACvE;qBACF;oBACD,IAAI,EAAE,CAAC;gBACT,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,IAAI,WAAW,IAAI,KAAK,EAAE;QAC7B,WAAW,CAAC,WAAW,CAAC,CAAC;KAC1B;AACH,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk new file mode 100644 index 00000000..066f0038 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk @@ -0,0 +1 @@ +sjelin.is.cool diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js new file mode 100644 index 00000000..dd15bbcf --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const extender_1 = require("../lib/extender"); +const mockdriver_1 = require("./mockdriver"); +let noop_define = (n, m, p) => { }; +let noop_exec = (p, m, d) => { }; +describe('extender', () => { + let sessionId = '1234'; + it('should call executor_.defineCommand', (done) => { + let name = 'customCommand'; + let method = 'post'; + let path = '/custom/command'; + let mockdriver = mockdriver_1.buildMockDriver(sessionId, (n, m, p) => { + expect(n).toEqual(name); + expect(m).toEqual(method); + expect(p).toEqual(path); + done(); + }, noop_exec); + let extender = new extender_1.Extender(mockdriver); + extender.defineCommand(name, [], method, path); + }); + it('should schedule custom commands', (done) => { + let name = 'customCommand'; + let method = 'post'; + let path = '/custom/command'; + let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, (p, m, d) => { + expect(p).toEqual(path); + expect(m).toEqual(method); + expect(d['sessionId']).toEqual(sessionId); + expect(Object.keys(d).length).toEqual(1); + done(); + }); + let extender = new extender_1.Extender(mockdriver); + extender.defineCommand(name, [], method, path); + extender.execCommand(name, method, []); + }); + it('should use command parameters', (done) => { + let name = 'customCommand'; + let method = 'post'; + let paramNames = ['var1', 'var2']; + let paramValues = ['val1', 'val2']; + let path = '/custom/:var1/command'; + let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, (p, m, d) => { + expect(p).toEqual('/custom/val1/command'); + expect(m).toEqual(method); + expect(d['sessionId']).toEqual(sessionId); + expect(d['var2']).toEqual('val2'); + expect(Object.keys(d).length).toEqual(2); + done(); + }); + let extender = new extender_1.Extender(mockdriver); + extender.defineCommand(name, paramNames, method, path); + extender.execCommand(name, method, paramValues); + }); + it('should not be able to exec a command that has not been defined', () => { + let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, noop_exec); + let extender = new extender_1.Extender(mockdriver); + expect(() => { extender.execCommand('', '', []); }).toThrowError(RangeError); + }); + it('should require correct number of parameters for execution', () => { + let name = 'customCommand'; + let method = 'post'; + let path = '/custom/:command'; + let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, noop_exec); + let extender = new extender_1.Extender(mockdriver); + extender.defineCommand(name, ['command'], method, path); + expect(() => { extender.execCommand(name, method, []); }).toThrowError(RangeError); + }); +}); +//# sourceMappingURL=extender_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map new file mode 100644 index 00000000..478bcfbd --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extender_spec.js","sourceRoot":"","sources":["../../spec/extender_spec.ts"],"names":[],"mappings":";;AACA,8CAAyC;AACzC,6CAAmD;AAEnD,IAAI,WAAW,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,EAAE,GAAE,CAAC,CAAC;AAC1D,IAAI,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,EAAE,GAAE,CAAC,CAAC;AAExD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,IAAI,SAAS,GAAG,MAAM,CAAC;IAEvB,EAAE,CAAC,qCAAqC,EAAE,CAAC,IAAI,EAAE,EAAE;QACjD,IAAI,IAAI,GAAG,eAAe,CAAC;QAC3B,IAAI,MAAM,GAAG,MAAM,CAAC;QACpB,IAAI,IAAI,GAAG,iBAAiB,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WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,IAAI,UAAU,GAAG,4BAAe,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QACpE,IAAI,QAAQ,GAAG,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,IAAI,IAAI,GAAG,eAAe,CAAC;QAC3B,IAAI,MAAM,GAAG,MAAM,CAAC;QACpB,IAAI,IAAI,GAAG,kBAAkB,CAAC;QAC9B,IAAI,UAAU,GAAG,4BAAe,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;QACpE,IAAI,QAAQ,GAAG,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACxD,MAAM,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js new file mode 100644 index 00000000..7792bd53 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const lib_1 = require("../lib"); +const mockdriver_1 = require("./mockdriver"); +describe('extender', () => { + it('should support setting/getting the network connection', (done) => { + let ncType; + let baseDriver = mockdriver_1.buildMockDriver('42', (name, method, path) => { }, (path, method, data) => { + expect(path).toEqual('/session/42/network_connection'); + if (method == 'GET') { + expect(Object.keys(data).length).toEqual(0); + return ncType; + } + else if (method == 'POST') { + expect(JSON.stringify(Object.keys(data))).toEqual('["type"]'); + ncType = data['type']; + } + }); + let driver = lib_1.extend(baseDriver); + driver.setNetworkConnection(5).then(() => { + return driver.getNetworkConnection(); + }).then((connectionType) => { + expect(connectionType).toEqual(5); + done(); + }); + }); +}); +//# sourceMappingURL=index_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map new file mode 100644 index 00000000..094ed85f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["../../spec/index_spec.ts"],"names":[],"mappings":";;AACA,gCAA8B;AAC9B,6CAAmD;AAGnD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,uDAAuD,EAAE,CAAC,IAAI,EAAE,EAAE;QACnE,IAAI,MAAe,CAAC;QACpB,IAAI,UAAU,GAAG,4BAAe,CAAC,IAAI,EACnC,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY,EAAE,EAAE,GAAE,CAAC,EAClD,CAAC,IAAY,EAAE,MAAc,EAAE,IAAU,EAAE,EAAE;YAC3C,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;YACvD,IAAG,MAAM,IAAI,KAAK,EAAE;gBAClB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC5C,OAAO,MAAM,CAAC;aACf;iBAAM,IAAI,MAAM,IAAI,MAAM,EAAE;gBAC3B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBAC9D,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;aACvB;QACH,CAAC,CACF,CAAC;QACF,IAAI,MAAM,GAAG,YAAM,CAAC,UAAU,CAAC,CAAC;QAChC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACvC,OAAO,MAAM,CAAC,oBAAoB,EAAE,CAAC;QACvC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,cAAsB,EAAE,EAAE;YACjC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAClC,IAAI,EAAE,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts new file mode 100644 index 00000000..8ec666e1 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts @@ -0,0 +1,2 @@ +import { AppiumCommandList } from '../interfaces'; +export declare let appium: AppiumCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js new file mode 100644 index 00000000..583dcf45 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js @@ -0,0 +1,118 @@ +"use strict"; +/** + * Custom appium commands + * + * In this file we define all the custom commands which are part of the appium API but will probably + * never be part of the webdriver spec or JsonWireProtocol. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const selenium_mock_1 = require("selenium-mock"); +const helpers_1 = require("./helpers"); +let app = {}; +let device = {}; +exports.appium = { + app: app, + device: device +}; +app.toBackground = + new selenium_mock_1.Command('POST', 'appium/app/background', (session, params) => { + return new Promise((resolve) => { + setTimeout(resolve, (params['seconds'] || 0) * 1000); + }); + }); +app.closeApp = helpers_1.noopFactory('appium/app/close'); +app.getStrings = helpers_1.constFactory('POST', '/appium/app/strings', ['Hello', 'World']); +app.launch = helpers_1.noopFactory('appium/app/launch'); +app.reset = helpers_1.noopFactory('appium/app/reset'); +device.getActivity = helpers_1.getterFactory('/appium/device/current_activity', 'activity'); +device.startActivity = helpers_1.setterFactory('/appium/device/start_activity', 'activity', 'appActivity'); +device.hideKeyboard = helpers_1.noopFactory('/appium/device/hide_keyboard'); +device.sendKeyEvent = helpers_1.noopFactory('/appium/device/keyevent'); +device.pressKeyCode = helpers_1.noopFactory('/appium/device/press_keycode'); +device.longPressKeyCode = helpers_1.noopFactory('/appium/device/long_press_keycode'); +device.installApp = + new selenium_mock_1.Command('POST', 'appium/device/install_app', (session, params) => { + fs.readFile(params['appPath'], (err, contents) => { + if (err) { + throw 'Error while trying to read "' + params['appPath'] + ': ' + err; + } + session.installedApps.push(contents.toString().trim()); + }); + }); +device.isAppInstalled = + new selenium_mock_1.Command('POST', 'appium/device/app_installed', (session, params) => { + return session.installedApps.some((app) => { + return app === params['bundleId'] || app === params['appId']; + }); + }); +device.removeApp = + new selenium_mock_1.Command('POST', '/appium/device/remove_app', (session, params) => { + session.installedApps = session.installedApps.filter((app) => { + return app !== params['bundleId'] && app !== params['appId']; + }); + }); +device.isLocked = helpers_1.getterFactory('/appium/device/is_locked', 'locked', 'POST'); +device.lock = + new selenium_mock_1.Command('POST', 'appium/device/lock', (session, params) => { + return new Promise((resolve) => { + setTimeout(() => { + session.locked = true; + resolve(); + }, (params['seconds'] || 0) * 1000); + }); + }); +device.unlock = + new selenium_mock_1.Command('POST', 'appium/device/unlock', (session) => { + session.locked = false; + }); +device.pullFile = + new selenium_mock_1.Command('POST', '/appium/device/pull_file', (session, params) => { + let path = params['path'].split('/'); + if (path[0].length == 0) { + path = path.slice(1); + } + ; + let file = session.files; + for (let folder of path) { + file = file[folder]; + } + return file; + }); +device.pullFolder = + new selenium_mock_1.Command('POST', '/appium/device/pull_folder', (session, params) => { + let path = params['path'].split('/'); + if (path[0].length == 0) { + path = path.slice(1); + } + ; + let folder = session.files; + for (let name of path) { + folder = folder[name]; + } + return folder; + }); +device.pushFile = + new selenium_mock_1.Command('POST', 'appium/device/push_file', (session, params) => { + let path = params['path'].split('/'); + if (path[0].length == 0) { + path = path.slice(1); + } + ; + let folder = session.files; + for (let i = 0; i < path.length - 1; i++) { + if (folder[path[i]] === undefined) { + folder[path[i]] = {}; + } + folder = folder[path[i]]; + } + folder[path[path.length - 1]] = params['data']; + }); +device.getTime = helpers_1.constFactory('GET', '/appium/device/system_time', new Date().toString()); +device.openNotifications = helpers_1.noopFactory('/appium/device/open_notifications'); +device.rotate = helpers_1.noopFactory('appium/device/rotate'); +device.shake = helpers_1.noopFactory('appium/device/shake'); +exports.appium.getSettings = helpers_1.getterFactory('/appium/settings'); +exports.appium.setSettings = helpers_1.setterFactory('/appium/settings'); +exports.appium.setImmediateValue = helpers_1.noopFactory('/appium/element/:id/value'); +//# sourceMappingURL=appium.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map new file mode 100644 index 00000000..369a36b8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map @@ -0,0 +1 @@ +{"version":3,"file":"appium.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/appium.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB,iDAAsC;AAEtC,uCAA8G;AAE9G,IAAI,GAAG,GAAG,EAA0B,CAAC;AAErC,IAAI,MAAM,GAAG,EAA6B,CAAC;AAEhC,QAAA,MAAM,GAAG;IAClB,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,MAAM;CACM,CAAC;AAEvB,GAAG,CAAC,YAAY;IACd,IAAI,uBAAO,CAAU,MAAM,EAAE,uBAAuB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,IAAE,CAAC,CAAC,GAAC,IAAI,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,GAAG,CAAC,QAAQ,GAAG,qBAAI,CAAC,kBAAkB,CAAC,CAAC;AACxC,GAAG,CAAC,UAAU,GAAG,sBAAY,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACjF,GAAG,CAAC,MAAM,GAAG,qBAAI,CAAC,mBAAmB,CAAC,CAAC;AACvC,GAAG,CAAC,KAAK,GAAG,qBAAI,CAAC,kBAAkB,CAAC,CAAC;AAErC,MAAM,CAAC,WAAW,GAAG,uBAAM,CAAC,iCAAiC,EAAE,UAAU,CAAC,CAAC;AAC3E,MAAM,CAAC,aAAa,GAAG,uBAAM,CAAC,+BAA+B,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;AAE1F,MAAM,CAAC,YAAY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AC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;aACtB;YACD,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa,CAAC;SACtC;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AAGL,MAAM,CAAC,OAAO,GAAG,sBAAY,CAAC,KAAK,EAAE,4BAA4B,EAAE,IAAI,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC1F,MAAM,CAAC,iBAAiB,GAAG,qBAAI,CAAC,mCAAmC,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,GAAG,qBAAI,CAAC,sBAAsB,CAAC,CAAC;AAC7C,MAAM,CAAC,KAAK,GAAG,qBAAI,CAAC,qBAAqB,CAAC,CAAC;AAG3C,cAAM,CAAC,WAAW,GAAG,uBAAM,CAAC,kBAAkB,CAAC,CAAC;AAChD,cAAM,CAAC,WAAW,GAAG,uBAAM,CAAC,kBAAkB,CAAC,CAAC;AAChD,cAAM,CAAC,iBAAiB,GAAG,qBAAI,CAAC,2BAA2B,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts new file mode 100644 index 00000000..86c54eae --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts @@ -0,0 +1,2 @@ +import { ChromiumCommandList } from '../interfaces'; +export declare let chromium: ChromiumCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js new file mode 100644 index 00000000..b72404bf --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js @@ -0,0 +1,14 @@ +"use strict"; +/** + * Custom chromium commands + * + * In this file we define all the custom commands which are part of the chromium API but will probably + * never be part of the webdriver spec or JsonWireProtocol. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +const helpers_1 = require("./helpers"); +exports.chromium = { + sendChromiumCommand: helpers_1.noopFactory('chromium/send_command'), + sendChromiumCommandAndGetResult: helpers_1.noopFactory('chromium/send_command_and_get_result') +}; +//# sourceMappingURL=chromium.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map new file mode 100644 index 00000000..4fb96979 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/chromium.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAIH,uCAA8C;AAEnC,QAAA,QAAQ,GAAG;IACpB,mBAAmB,EAAE,qBAAI,CAAC,uBAAuB,CAAC;IAClD,+BAA+B,EAAE,qBAAI,CAAC,sCAAsC,CAAC;CACvD,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts new file mode 100644 index 00000000..df20feec --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts @@ -0,0 +1,12 @@ +/** + * Helpers for defining commands more quickly. + * + * In this file we define some helpers for quickly defining commands with either do nothing, + * set/get a value on the session, or return a constant value. + */ +import { Command } from 'selenium-mock'; +import { Session } from '../interfaces'; +export declare function noopFactory(path: string, method?: 'GET' | 'POST' | 'DELETE' | 'PUT'): Command; +export declare function getterFactory(path: string, name?: string, method?: 'GET' | 'POST' | 'DELETE' | 'PUT'): Command; +export declare function setterFactory(path: string, name?: string, paramName?: string): Command; +export declare function constFactory(method: 'GET' | 'POST' | 'DELETE' | 'PUT', path: string, val: any): Command; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js new file mode 100644 index 00000000..d4458db9 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Helpers for defining commands more quickly. + * + * In this file we define some helpers for quickly defining commands with either do nothing, + * set/get a value on the session, or return a constant value. + */ +const selenium_mock_1 = require("selenium-mock"); +function noopFactory(path, method = 'POST') { + return new selenium_mock_1.Command(method, path, () => { }); +} +exports.noopFactory = noopFactory; +function getterFactory(path, name, method = 'GET') { + name = name || path.split('/').pop(); + return new selenium_mock_1.Command(method, path, (session) => { + return session[name]; + }); +} +exports.getterFactory = getterFactory; +function setterFactory(path, name, paramName) { + name = name || path.split('/').pop(); + paramName = paramName || name; + return new selenium_mock_1.Command('POST', path, (session, params) => { + session[name] = params[paramName]; + }); +} +exports.setterFactory = setterFactory; +function constFactory(method, path, val) { + return new selenium_mock_1.Command(method, path, () => { + return val; + }); +} +exports.constFactory = constFactory; +//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map new file mode 100644 index 00000000..4d41002e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/helpers.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iDAAsC;AAGtC,qBAA4B,IAAY,EAAE,SAAsC,MAAM;IACpF,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kCAEC;AAED,uBAA8B,IAAY,EAAE,IAAa,EAAE,SAAsC,KAAK;IACpG,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACrC,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;QACpD,OAAQ,OAAe,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AALD,sCAKC;AAED,uBAA8B,IAAY,EAAE,IAAa,EAAE,SAAkB;IAC3E,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACrC,SAAS,GAAG,SAAS,IAAI,IAAI,CAAC;IAC9B,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,OAAe,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC;AAND,sCAMC;AAED,sBAA6B,MAAmC,EAAE,IAAY,EAAE,GAAQ;IACtF,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE;QAC7C,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,oCAIC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts new file mode 100644 index 00000000..1f4e55d4 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts @@ -0,0 +1,2 @@ +import { SessionCommandList } from '../interfaces'; +export declare let session: SessionCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js new file mode 100644 index 00000000..959f6252 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * In this file we define all the commands which run against a particular webdriver session, but + * do not belong in `./appium.ts` or `./storage.ts`. + */ +const selenium_mock_1 = require("selenium-mock"); +const helpers_1 = require("./helpers"); +const appium_1 = require("./appium"); +const chromium_1 = require("./chromium"); +const storage_1 = require("./storage"); +exports.session = { + element: {}, + sessionStorage: storage_1.storageFactory('session'), + localStorage: storage_1.storageFactory('local'), + appium: appium_1.appium, + chromium: chromium_1.chromium, +}; +exports.session.currentContext = helpers_1.getterFactory('context', 'currentContext'); +exports.session.selectContext = helpers_1.setterFactory('context', 'currentContext', 'name'); +exports.session.listContexts = helpers_1.constFactory('GET', 'contexts', ['WEBVIEW_1']); +exports.session.uploadFile = helpers_1.noopFactory('file'); +exports.session.getNetworkConnection = helpers_1.getterFactory('network_connection', 'networkConnection'); +exports.session.setNetworkConnection = helpers_1.setterFactory('network_connection', 'networkConnection', 'type'); +exports.session.toggleAirplaneMode = + new selenium_mock_1.Command('POST', 'appium/device/toggle_airplane_mode', (session) => { + session.networkConnection ^= 1; + }); +exports.session.toggleWiFi = + new selenium_mock_1.Command('POST', 'appium/device/toggle_wifi', (session) => { + session.networkConnection ^= 2; + }); +exports.session.toggleData = + new selenium_mock_1.Command('POST', 'appium/device/toggle_data', (session) => { + session.networkConnection ^= 4; + }); +exports.session.toggleLocationServices = + new selenium_mock_1.Command('POST', 'appium/device/toggle_location_services', (session) => { + session.locationEnabled = !session.locationEnabled; + }); +exports.session.getGeolocation = + new selenium_mock_1.Command('GET', '/location', (session) => { + if (!session.locationEnabled) { + throw 'Location services disabled'; + } + return session.location; + }); +exports.session.setGeolocation = + new selenium_mock_1.Command('POST', '/location', (session, params) => { + if (!session.locationEnabled) { + throw 'Location services disabled'; + } + session.location = params['location']; + }); +exports.session.getOrientation = helpers_1.getterFactory('orientation'); +exports.session.setOrientation = helpers_1.setterFactory('orientation'); +exports.session.switchToParentFrame = helpers_1.noopFactory('frame/parent'); +exports.session.fullscreen = helpers_1.noopFactory('window/fullscreen'); +exports.session.performMultiAction = helpers_1.noopFactory('touch/multi/perform'); +exports.session.performTouchAction = helpers_1.noopFactory('touch/perform'); +exports.session.element.elementIdLocationInView = helpers_1.constFactory('GET', '/element/:id/location_in_view', { x: 0, y: 0 }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map new file mode 100644 index 00000000..c98e99c4 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/index.ts"],"names":[],"mappings":";;AAAA;;;GAGG;AACH,iDAAsC;AAEtC,uCAA8G;AAC9G,qCAAgC;AAChC,yCAAoC;AACpC,uCAAyC;AAE9B,QAAA,OAAO,GAAG;IACnB,OAAO,EAAE,EAAwB;IACjC,cAAc,EAAE,wBAAc,CAAC,SAAS,CAAC;IACzC,YAAY,EAAE,wBAAc,CAAC,OAAO,CAAC;IACrC,MAAM,EAAE,eAAM;IACd,QAAQ,EAAE,mBAAQ;CACG,CAAC;AAExB,eAAO,CAAC,cAAc,GAAG,uBAAM,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;AAC7D,eAAO,CAAC,aAAa,GAAG,uBAAM,CAAC,SAAS,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACpE,eAAO,CAAC,YAAY,GAAG,sBAAY,CAAC,KAA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AAc;IACpB,IAAI,uBAAO,CAAU,MAAM,EAAE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5D,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YAC5B,MAAM,4BAA4B,CAAC;SACpC;QACD,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AAEL,eAAO,CAAC,cAAc,GAAG,uBAAM,CAAC,aAAa,CAAC,CAAC;AAC/C,eAAO,CAAC,cAAc,GAAG,uBAAM,CAAC,aAAa,CAAC,CAAC;AAE/C,eAAO,CAAC,mBAAmB,GAAG,qBAAI,CAAC,cAAc,CAAC,CAAC;AACnD,eAAO,CAAC,UAAU,GAAG,qBAAI,CAAC,mBAAmB,CAAC,CAAC;AAE/C,eAAO,CAAC,kBAAkB,GAAG,qBAAI,CAAC,qBAAqB,CAAC,CAAC;AACzD,eAAO,CAAC,kBAAkB,GAAG,qBAAI,CAAC,eAAe,CAAC,CAAC;AAEnD,eAAO,CAAC,OAAO,CAAC,uBAAuB,GAAG,sBAAY,CAAC,KAAK,EAAE,+BAA+B,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts new file mode 100644 index 00000000..85d84a95 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts @@ -0,0 +1,2 @@ +import { StorageCommandList } from '../interfaces'; +export declare function storageFactory(type: 'session' | 'local'): StorageCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js new file mode 100644 index 00000000..6e9c55d1 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * In this file we define a factory which can be used to create the commands for either + * sessionStorage or localStorage + */ +const selenium_mock_1 = require("selenium-mock"); +function storageFactory(type) { + let storageCmds = {}; + function cmdFactory(method, relPath, fun) { + return new selenium_mock_1.Command(method, type + '_storage' + relPath, (session, params) => { + return fun(session[type + '_storage'], params['key'], params['value']); + }); + } + storageCmds.getKeys = cmdFactory('GET', '', (store) => { + return Object.keys(store); + }); + storageCmds.getValue = cmdFactory('GET', '/key/:key', (store, key) => { + return store[key]; + }); + storageCmds.setValue = cmdFactory('POST', '', (store, key, value) => { + store[key] = value; + }); + storageCmds.deleteEntry = cmdFactory('DELETE', '/key/:key', (store, key) => { + delete store[key]; + }); + storageCmds.deleteAll = cmdFactory('DELETE', '', (store) => { + for (var key in store) { + delete store[key]; + } + }); + storageCmds.getSize = cmdFactory('GET', '/size', (store) => { + return Object.keys(store).length; + }); + return storageCmds; +} +exports.storageFactory = storageFactory; +; +//# sourceMappingURL=storage.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map new file mode 100644 index 00000000..fd888a88 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/storage.ts"],"names":[],"mappings":";;AAAA;;;GAGG;AACH,iDAAsC;AAGtC,wBAA+B,IAAyB;IACtD,IAAI,WAAW,GAAG,EAAwB,CAAC;IAC3C,oBAAoB,MAA6B,EAAE,OAAe,EAAE,GACK;QACvE,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,GAAG,UAAU,GAAG,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAA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CAAC,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,CAAC;AA7BD,wCA6BC;AAAA,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts new file mode 100644 index 00000000..ee2c66d9 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts @@ -0,0 +1,5 @@ +import { Session } from './interfaces'; +import { Server } from 'selenium-mock'; +export declare class MockAppium extends Server { + constructor(port: number); +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js new file mode 100644 index 00000000..24c68696 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const commands_1 = require("./commands"); +const selenium_mock_1 = require("selenium-mock"); +class MockAppium extends selenium_mock_1.Server { + constructor(port) { + super(port, (basicSession) => { + let session = basicSession; + session.currentContext = 'WEBVIEW_1'; + session.installedApps = []; + session.locked = false; + session.localStorage = {}; + session.location = { latitude: 0, longitude: 0, altitude: 0 }; + session.locationEnabled = true; + session.orientation = 'PORTRAIT'; + session.files = {}; + session.sessionStorage = {}; + session.settings = { ignoreUnimportantViews: false }; + session.activity = null; + session.networkConnection = 6; + return session; + }); + let addCommands = (commandList) => { + for (let commandName in commandList) { + let command = commandList[commandName]; + if (command instanceof selenium_mock_1.Command) { + this.addCommand(command); + } + else { + addCommands(command); + } + } + }; + addCommands(commands_1.session); + } +} +exports.MockAppium = MockAppium; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map new file mode 100644 index 00000000..e0ffd1a1 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../spec/mock-server/index.ts"],"names":[],"mappings":";;AAAA,yCAAkD;AAElD,iDAA8C;AAE9C,gBAAwB,SAAQ,sBAAe;IAC7C,YAAY,IAAY;QACtB,KAAK,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;YAC3B,IAAI,OAAO,GAAG,YAAuB,CAAC;YACtC,OAAO,CAAC,cAAc,GAAG,WAAW,CAAC;YACrC,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC;YAC3B,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;YACvB,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC;YAC1B,OAAO,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;YAC/B,OAAO,CAAC,WAAW,GAAG,UAAU,CAAC;YACjC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;YACnB,OAAO,CAAC,cAAc,GAAG,EAAE,CAAC;YAC5B,OAAO,CAAC,QAAQ,GAAG,EAAC,sBAAsB,EAAE,KAAK,EAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;YACxB,OAAO,CAAC,iBAAiB,GAAG,CAAC,CAAC;YAC9B,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,GAAG,CAAC,WAAwB,EAAE,EAAE;YAC7C,KAAK,IAAI,WAAW,IAAI,WAAW,EAAE;gBACnC,IAAI,OAAO,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;gBACvC,IAAI,OAAO,YAAY,uBAAO,EAAE;oBAC9B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;iBAC1B;qBAAM;oBACL,WAAW,CAAC,OAAO,CAAC,CAAC;iBACtB;aACF;QACH,CAAC,CAAA;QAED,WAAW,CAAC,kBAAW,CAAC,CAAC;IAC3B,CAAC;CACF;AAhCD,gCAgCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts new file mode 100644 index 00000000..61fbfa54 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts @@ -0,0 +1,108 @@ +import { Session as BasicSession, Command } from 'selenium-mock'; +export interface Location { + latitude: number; + longitude: number; + altitude: number; +} +export interface FsFolder { + [name: string]: (string | FsFolder); +} +export declare type Orientation = 'LANDSCAPE' | 'PORTRAIT'; +export interface Session extends BasicSession { + currentContext?: string; + installedApps?: string[]; + locked?: boolean; + localStorage?: { + [key: string]: string; + }; + location?: Location; + locationEnabled?: boolean; + orientation?: Orientation; + files?: FsFolder; + sessionStorage?: { + [key: string]: string; + }; + settings?: { + [key: string]: any; + }; + activity?: string; + networkConnection?: number; +} +export interface CommandList { + [name: string]: Command | CommandList; +} +export interface ElementCommandList extends CommandList { + elementIdLocationInView: Command; +} +export interface StorageCommandList extends CommandList { + getKeys: Command; + getValue: Command; + setValue: Command; + deleteEntry: Command; + deleteAll: Command; + getSize: Command; +} +export interface AppiumAppCommandList extends CommandList { + toBackground: Command; + closeApp: Command; + getStrings: Command; + launch: Command; + reset: Command; +} +export interface AppiumDeviceCommandList extends CommandList { + getActivity: Command; + startActivity: Command; + hideKeyboard: Command; + sendKeyEvent: Command; + pressKeyCode: Command; + longPressKeyCode: Command; + installApp: Command; + isAppInstalled: Command; + removeApp: Command; + isLocked: Command; + lock: Command; + unlock: Command; + pullFile: Command; + pullFolder: Command; + pushFile: Command; + getTime: Command; + openNotifications: Command; + rotate: Command; + shake: Command; +} +export interface AppiumCommandList extends CommandList { + getSettings: Command; + setSettings: Command; + setImmediateValue: Command; + app: AppiumAppCommandList; + device: AppiumDeviceCommandList; +} +export interface ChromiumCommandList extends CommandList { + sendChromiumCommand: Command; + sendChromiumCommandAndGetResult: Command; +} +export interface SessionCommandList extends CommandList { + currentContext: Command; + selectContext: Command; + listContexts: Command; + uploadFile: Command; + getNetworkConnection: Command; + setNetworkConnection: Command; + toggleAirplaneMode: Command; + toggleData: Command; + toggleWiFi: Command; + toggleLocationServices: Command; + getGeolocation: Command; + setGeolocation: Command; + getOrientation: Command; + setOrientation: Command; + switchToParentFrame: Command; + fullscreen: Command; + performMultiAction: Command; + performTouchAction: Command; + element: ElementCommandList; + sessionStorage: StorageCommandList; + localStorage: StorageCommandList; + appium: AppiumCommandList; + chromium: ChromiumCommandList; +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js new file mode 100644 index 00000000..db919115 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map new file mode 100644 index 00000000..d4f4bfa3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../spec/mock-server/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts new file mode 100644 index 00000000..1fe2d189 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts @@ -0,0 +1,6 @@ +import * as webdriver from 'selenium-webdriver'; +export interface Data { + sessionId: string; + [key: string]: any; +} +export declare function buildMockDriver(sessionId: string, defineCallback: (name: string, method: string, path: string) => void, execCallback: (path: string, method: string, data: Data) => any): webdriver.WebDriver; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js new file mode 100644 index 00000000..fcd5780f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const webdriver = require("selenium-webdriver"); +let buildPath = require('selenium-webdriver/lib/http').buildPath; +function buildMockDriver(sessionId, defineCallback, execCallback) { + let paths = {}; + let methods = {}; + let mockSession = new webdriver.Session(sessionId, {}); + return new webdriver.WebDriver(mockSession, { + execute: (command) => { + command.setParameter('sessionId', sessionId); + let params = command.getParameters(); + return webdriver.promise.fulfilled(execCallback(buildPath(paths[command.getName()], params), methods[command.getName()], params)); + }, + defineCommand: (name, method, path) => { + paths[name] = path; + methods[name] = method; + defineCallback(name, method, path); + } + }); +} +exports.buildMockDriver = buildMockDriver; +//# sourceMappingURL=mockdriver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map new file mode 100644 index 00000000..068cc0bf --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mockdriver.js","sourceRoot":"","sources":["../../spec/mockdriver.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAChD,IAAI,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC,SAAS,CAAC;AAOjE,yBAAgC,SAAiB,EAC7C,cAAoE,EACpE,YAA+D;IAGjE,IAAI,KAAK,GAA6B,EAAE,CAAC;IACzC,IAAI,OAAO,GAA6B,EAAE,CAAC;IAC3C,IAAI,WAAW,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAEvD,OAAO,IAAI,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE;QAC1C,OAAO,EAAE,CAAC,OAA0B,EAAE,EAAE;YACtC,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YAC7C,IAAI,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;YACrC,OAAO,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAC3C,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAC3C,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,aAAa,EAAE,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY,EAAE,EAAE;YAC5D,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YACvB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;KACoB,CAAC,CAAC;AAC3B,CAAC;AAvBD,0CAuBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/gulpfile.js b/test-eol-project/node_modules/webdriver-js-extender/gulpfile.js new file mode 100644 index 00000000..031acafc --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/gulpfile.js @@ -0,0 +1,58 @@ +'use strict'; + +var gulp = require('gulp'); +var runSequence = require('run-sequence'); +var spawn = require('child_process').spawn; +const format = require('gulp-clang-format'); +const clangFormat = require('clang-format'); + +var runSpawn = function(done, task, opt_arg) { + opt_arg = typeof opt_arg !== 'undefined' ? opt_arg : []; + var child = spawn(task, opt_arg, {stdio: 'inherit'}); + var running = false; + child.on('close', function() { + if (!running) { + running = true; + done(); + } + }); + child.on('error', function() { + if (!running) { + console.error('gulp encountered a child error'); + running = true; + done(); + } + }); +}; + +gulp.task('copy', function() { + return gulp.src(['**/*.apk', 'package.json']) + .pipe(gulp.dest('built/')); +}); + +gulp.task('format:enforce', () => { + return gulp.src(['lib/**/*.ts']).pipe( + format.checkFormat('file', clangFormat, {verbose: true, fail: true})); +}); + +gulp.task('format', () => { + return gulp.src(['lib/**/*.ts'], { base: '.' }).pipe( + format.format('file', clangFormat)).pipe(gulp.dest('.')); +}); + +gulp.task('tsc', function(done) { + runSpawn(done, process.execPath, ['node_modules/typescript/bin/tsc']); +}); + +gulp.task('prepublish', function(done) { + runSequence('format', 'tsc', 'copy', done); +}); + +gulp.task('default',['prepublish']); +gulp.task('build',['prepublish']); + +gulp.task('test', ['build'], function(done) { + var opt_arg = []; + opt_arg.push('node_modules/jasmine/bin/jasmine.js'); + runSpawn(done, process.execPath, opt_arg); +}); diff --git a/test-eol-project/node_modules/webdriver-js-extender/package.json b/test-eol-project/node_modules/webdriver-js-extender/package.json new file mode 100644 index 00000000..7b6bd017 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/package.json @@ -0,0 +1,39 @@ +{ + "name": "webdriver-js-extender", + "version": "2.1.0", + "description": "A plugin which adds additional commands to selenium's javascript implementation of the webdriver client side API", + "scripts": { + "prepublish": "gulp prepublish", + "test": "gulp test" + }, + "keywords": [ + "testing", + "webdriver", + "webdriverjs", + "selenium", + "appium" + ], + "repository": "github:angular/webdriver-js-extender", + "main": "built/lib/index.js", + "author": "Sammy Jelin ", + "license": "MIT", + "typings": "built/lib/index.d.ts", + "dependencies": { + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" + }, + "devDependencies": { + "@types/jasmine": "^2.5.37", + "clang-format": "^1.0.42", + "gulp": "^3.9.1", + "gulp-clang-format": "^1.0.23", + "jasmine": "^2.4.1", + "portfinder": "^1.0.10", + "run-sequence": "^1.2.2", + "selenium-mock": "^0.1.5", + "typescript": "^2.0.0" + }, + "engines": { + "node": ">=6.9.x" + } +} diff --git a/test-eol-project/node_modules/webdriver-js-extender/tsconfig.json b/test-eol-project/node_modules/webdriver-js-extender/tsconfig.json new file mode 100644 index 00000000..9c12cf91 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-js-extender/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "declaration": true, + "removeComments": false, + "noImplicitAny": true, + "outDir": "built/" + }, + "exclude": [ + "built", + "node_modules" + ] +} diff --git a/test-eol-project/node_modules/webdriver-manager/.circleci/config.yml b/test-eol-project/node_modules/webdriver-manager/.circleci/config.yml new file mode 100644 index 00000000..a8efa3be --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/.circleci/config.yml @@ -0,0 +1,24 @@ +var_1: &docker_image circleci/node:8-browsers + +anchor_1: &job_defaults + working_directory: ~/workspace + docker: + - image: *docker_image + +version: 2 +jobs: + build_and_test: + <<: *job_defaults + steps: + - checkout + - run: node --version + - run: npm --version + - run: npm install + - run: npm run format-enforce + - run: npm run test-unit + +workflows: + version: 2 + default_workflow: + jobs: + - build_and_test \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/CHANGELOG.md b/test-eol-project/node_modules/webdriver-manager/CHANGELOG.md new file mode 100644 index 00000000..7424e028 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/CHANGELOG.md @@ -0,0 +1,670 @@ +# 12.1.9 + +Updates `adm-zip` to version `0.5.2`. + +# 12.1.8 + +Fixes for macOS ChromeDriver download. If you are using a macOS and are +running into a `WebDriver.createSession` error, run +`webdriver-manager clean` to remove the downloaded ChromeDriver +before running `webdriver-manager update`. + +- ([4f5f736](https://github.com/angular/webdriver-manager/commit/4f5f7369790c9ae604b8b51a08b645a89cc4c7b7)) + fix(chromedriver): get most recent version on x64 windows if multiple major versions exist (#473) + +- ([17db8a2](https://github.com/angular/webdriver-manager/commit/17db8a2ad5401ab68c7a400f419760edd9c3e9e3)) + fix(binaries): filter m1 mac chromedriver versions (#478) + +# 12.1.7 + +Updates to Chromedriver to the LATEST_RELEASE. This should work from here on in when Chrome is updated to a new version. + +- [64795b7](https://github.com/angular/webdriver-manager/commit/64795b753b3d00ad2d1f4ac98c531f9e147f3b3e) chore(chrome) get latest chromedriver from LATEST_RELEASE (#418) + + - changed the get latest chromedriver to use the URL getting the latest first, then downloading that specific version. + - removed unused imports. + +# 12.1.6 + +Update the max Chrome version to 76. + +# 12.1.5 + +Update the max Chrome version to 75. + +# 12.1.4 + +Fixes issues introduced by 12.1.3 (--versions.chrome flag and status command did not work). Also prevents downloading version 75 using the config.json file. + +## Bug Fix + +- ([0a6ce24](https://github.com/angular/webdriver-manager/commit/0a6ce24e73ae06319bcafa472e22a2fe99d139e1)) + fix(chromedriver): version fixes for update, status, and start (#380) + + - Set the max versioning set in config.json. This will need to be updated on +every release of chromedriver. This will "fix" chrome and chromedriver +mismatches until Chrome 75 comes out. When it does there will have to be +an update for this again. Possible future work would allow a user +to set this via flag. Example --maxVersions.chrome "74." + - Create a generic way to get a valid version for Chromedriver. If +presented with 2.x, change this to 2.x.0. If presented with a 74.x.x.x, +chop off the last set of numbers and change this to 74.x.x + - Fixes the status command during a semver check. + - Fixes the update and start command when starting a specific version of +chromedriver + +# 12.1.3 + +Fixes download issues for chromedriver version 74+. + +## Bug Fix + +- ([476c117](https://github.com/angular/webdriver-manager/commit/476c117ac10539634d1c8f8973aa94012ed017a4)) + fix(chromedriver): support downloads for chromedriver beyond 2.46 (#377) + + Versions of Chromdriver were versioned as 2.xx. We previously used to +tack on a '.0' at the end to make it a semver version. This is why it +was not downloading 74.0.3729.6. We now have to change 74.0.3729.6 to be +a semver. We will do this by grabbing 74.0.3729 with a regex. + + This should work when downloading the latest chromedriver version since +2.46.0 < 74.0.3729. If Chromedriver releases 75 but we are still on +Chrome 74, this will still break in this version of webdriver-manager. +This does not prevent latest Chromedriver and latest Chrome mismatches. +If you run into an issue where Chromedriver is mismatched with Chrome, +use the `--versions.chrome` flag to pass in the version to download. + +# 12.1.2 + +Fixes download issues for the selenium jar file. + +## Bug Fix + +- ([7dc17ef](https://github.com/angular/webdriver-manager/commit/7dc17ef36e93f71bc63475612e343ffb84efec0f)) + fix(selenium): download jar files and not zip files (#371) + + This fix is here because selenium now has .zip files in the .xml. This worked previously since + there were no .zip files and it would find a version that matched the latest jar file. + + Also do not download alpha versions since we are also not downloading beta versions of the jar + file. + + closes #370 + + +# 12.1.1 + +## Bug Fix + +- ([f17b226](https://github.com/angular/webdriver-manager/commit/f17b226342173e59b4d2fac54632185c26ca7086)) + Fix(types): Operator '==' cannot be applied to types 'string | string[]' and 'number' (#297) + + - build-enforced style changes + - add package-lock.json + +- ([7dbc1df](https://github.com/angular/webdriver-manager/commit/7dbc1dfbccc60c8836e7c1d390fd5562e0af5b9d)) + fix(clean): remove existing chrome meta files from update on clean command (#279) + + - change file name from chromedriver-response.xml to chrome-response.xml +- ([0a4c065](https://github.com/angular/webdriver-manager/commit/0a4c0658b0725154cba07ad6e7125c1dd504fa3d)) + fix(appium): change appiumPort to seleniumPort for selenium server request (#228) + +## Dependencies + +- ([6775421](https://github.com/angular/webdriver-manager/commit/6775421ea9e40db1bf547bcedcb716ba35106a80)) + deps(package): update npm audit. + + - Updates to vulnerable to zipslip. + - Update all dependencies with `npm audit fix --force`. + + closes #314 + +- ([a80ccd2](https://github.com/angular/webdriver-manager/commit/a80ccd22d494e10e8c3c6ef9af22abf38496cb14)) + deps(appium): bump up the appium version (#258) + + +# 12.0.6 + +## Bug Fix + +- ([708ade3](https://github.com/angular/webdriver-manager/commit/708ade31564ab5a48fbfcff80c37370fdc4f659a)) + fix(responses): response xml and json files (#247) + +# 12.0.5 + +## Bug Fix + +- ([242a72f](https://github.com/angular/webdriver-manager/commit/242a72ffc93037d651c9805e09b4fb30318d9f05)) + feat(start): start selenium without making web requests (#232) + +# 12.0.4 + +## Bug Fixes +- ([52d8a23](https://github.com/angular/webdriver-manager/commit/52d8a23f2d5d5021d1d9d302c492bf78a233a79d)) + fix(ignoressl): pass option to both binary and config source + + closes #207. + +- ([5af1c1c](https://github.com/angular/webdriver-manager/commit/5af1c1cdfb2d718004b02e9c0325ea6e758e78f1)) + fix(cache): change timestamp to 1 hour instead of 10 hours (#223) + + closes #221 + +# 12.0.3 + +## Bug Fixes + +- ([bb13882](https://github.com/angular/webdriver-manager/commit/bb13882f1d111fc0c16032be33a7b8dc7b1a797c)) + feat(gecko): Improve error message when Github api limit reached. (#217) + + the user. Also, API limit is reached, the error message now directly informs + when any other failure occurs the status code is reported. + This should hopefully give more info for issue #216. +- ([2cffd30](https://github.com/angular/webdriver-manager/commit/2cffd30d9ef87c5b53433f2aa73eda92b4251a76)) + fix(ignoressl): pass proxy and ignore ssl down to the binary and config source (#208) + + closes #207 and closes #221 + +# 12.0.2 + +- ([0bdf6a4](https://github.com/angular/webdriver-manager/commit/0bdf6a465ae2a4b106bb5ff948718ef4ae3f31ad)) + deps(typescript): use typescript@~2.0.0. fix any types (#203) + +# 12.0.1 + +- ([6209666](https://github.com/angular/webdriver-manager/commit/620966611f48504619a594b582060ba04a61b3a7)) + fix(gecko): add additional check for OS when getting latest (#200) + +# 12.0.0 + +### Changes to update + +This release gets the latest release for selenium standalone, chromedriver, +iedriver, and gecko driver by downloading and parsing either a json or xml file. +These json or xml files are cached in the selenium directory. This means for +users that provide an alternative cdn will also be required to provide the proper +xml or json server response to find these binaries. + +Since we are always downloading the latest, the `config.json` versions will no +longer be a place to override these. + +### Changes to start + +If a new release is out and you have old binaries, running `webdriver-manager +start` without specifying any versions should throw an error. The error will +tell the user that the binary is not present. + +### Changes to status + +Since we are downloading the latest and not maintaining a default version in +`config.json`, we are dropping the default tag. + +## Features + +- ([fe309ef](https://github.com/angular/webdriver-manager/commit/fe309ef0d85081592662164d4a24d79b0f2ed5cf)) + feat(latest): get the latest version from the cdn (#198) + + This reads the xml from the CDN to get the latest chromedriver, iedriver, + or standalone version if the version is 'latest'. If the release is from + Github, use the Github API to get the releases. Also store the downloaded + information to a cache in the output directory (default: selenium/). If + the file is older than one hour it will be rewritten. + + When getting the status, we are no longer showing the default version. + Default versions will be deprecated and will be removed from the config.json + file. + + When starting the standalone server, use the 'latest' version by default + unless specified by --versions.{binary} flag. + + Change the gulp update task to use 3.0.0-beta4 so Firefox tests will pass. + +# 11.1.1 + +## Bug Fixes + +- ([70614a2](https://github.com/angular/webdriver-manager/commit/70614a23e289088c852f5c0162a947488ffc77e0)) + fix(ie): Use 32-bit version by default for IEDriver (#181) + + closes #180 +- ([6f9a2ab](https://github.com/angular/webdriver-manager/commit/6f9a2abbf7d16f35e342f963543706ff3e1c45a1)) + fix(gecko): Respect versions.gecko in start command. (#184) + + Also bump the geckodriver version to latest. + +## Dependencies + +- ([5881c5b](https://github.com/angular/webdriver-manager/commit/5881c5bb49f330abd7804e2605df46901e87bf2a)) + deps(update): update devDependencies (#187) + + +# 11.1.0 + +- Update to set the default chrome driver version to 2.26 + +## Features + +- ([72e3d9f](https://github.com/angular/webdriver-manager/commit/72e3d9f341f1d0ba190036a72938e727d83840c7)) + feat(status): show the last downloaded version when using status (#177) + + - added a test to run update, then checks status for labels + + closes #172 + +## Bug Fixes + +- ([a3b46c7](https://github.com/angular/webdriver-manager/commit/a3b46c7a2ae59357b00fe5ce81d36964d6b0d45c)) + fix(iedriver): if downloading x64, use x64 version on start command (#173) + + - clang formatting + + closes #147 + +# 10.3 + +- Minor version update so users still on ES5/selenium 2.x can access appium/mobile fixes + See https://github.com/angular/webdriver-manager/commits/10.3.0 for details + + +# 11.0.0 + +## Breaking Change: + +- Requires node 6 since node 6 is in long term support. See (node LTS Schedule)[https://github.com/nodejs/LTS#lts-schedule]. + +## Features +- ([b5638ef](https://github.com/angular/webdriver-manager/commit/b5638ef0861843e1d42220af515adc3e03a2b65a)) + feat(update): on update, write full binary paths to file (#140) + + - Adding back in curl calls, these were removed on the new + `Downloader.getFile`. Add curl call to reflect proxies. + + - Fix output dir to read from update's options instead of Config + + - Feature will help directConnect users for Protractor. The file + will keep track of the last binary version as well as all other + binaries downloaded. + + The file will be created in the output directory. By default this is + `selenium/update-config.json`. On `clean` this file will be removed. + + ``` + webdriver-manager update --versions.chrome=2.20 --standalone=false + --gecko=false + ``` + + file created: + ``` + { + "chrome": { + "last": "/opt/src/webdriver-manager/selenium/chromedriver_2.20", + "all": ["/opt/src/webdriver-manager/selenium/chromedriver_2.20"] + } + } + ``` + + then the user wants to use 2.25: + + ``` + webdriver-manager update --versions.chrome=2.25 --standalone=false + --gecko=false + + ``` + + file created: + ``` + { + "chrome": { + "last": "/opt/src/webdriver-manager/selenium/chromedriver_2.25", + "all": ["/opt/src/webdriver-manager/selenium/chromedriver_2.20", + "/opt/src/webdriver-manager/selenium/chromedriver_2.25"] + } + } + ``` + +- ([473ab3e](https://github.com/angular/webdriver-manager/commit/473ab3e40c44468bb79e2a23d7b12753cf6e2b4d)) + feat(android): match android arch to os.arch (#164) + + The default was x86-64, but x86 cannot be emulated on ARM. This makes more sense +- ([c864c9a](https://github.com/angular/webdriver-manager/commit/c864c9af35514a4b5bf8a1d82b4339b39e5ac574)) + feat(shutdown): do not error if you try to shutdown a server which is already off (#162) + + When scripting, you might want to defensively run a `shutdown` command. If the shutdown fails + because the server is already off, you don't care. If it fails for another reason, you do care. + So I made trying to shutdown a server which is already off just a warning. I added a flag in case + you want the old behavior though. + +- ([338fffd](https://github.com/angular/webdriver-manager/commit/338fffddf68ac2767aa5c226ba5374451b9e5308)) + feat(quiet/verbose): add `--quiet` and `--verbose` flags to control the level of output (#156) + + I added the `--quiet` flag for cases like: + where currently the start --detach; ./tests.sh; webdriver-manager shutdown` + selenium server output will get mixed in with other output. + I also added the `--verbose` flag for `webdriver-manager update` in case you *really* wanted to + see all the output which gets eaten by using `--android-accept-licenses`. + +- ([91e36a3](https://github.com/angular/webdriver-manager/commit/91e36a3e56e712af2c104eafc45eeeba5997ad6a)) + feat(android on windows): Support android VMs on windows (#154) + + Closes https://github.com/angular/webdriver-manager/issues/51 + +- ([d533b03](https://github.com/angular/webdriver-manager/commit/d533b0389ac8a43b815890a644fdb9aa403ec769)) + feat(start android): extend the --detach flag to wait for appium/android (#141) + +## Bug fixes + +- ([26586f1](https://github.com/angular/webdriver-manager/commit/26586f1b341e02229d73d40827a9c1af2197ebb3)) + fix(start): wait for emulated android to really be ready before signaling (#161) + + Before, we were just waiting for the emulator to be running, rather than waiting for the OS to be + booted up and ready to instance chrome. + While I was doing that I moved some stuff into `lib/utils.ts` since I felt like too much of + `lib/cmds/start.ts` was being devoted to this one feature. + Also closes https://github.com/angular/webdriver-manager/issues/166 +- ([a7c6eb5](https://github.com/angular/webdriver-manager/commit/a7c6eb5d3d1caed2afea1ef896753d53f4ea14ed)) + fix(update/android): 2a1505f broke android +- ([3ee3e1a](https://github.com/angular/webdriver-manager/commit/3ee3e1a328087cb8c5bf869e00a325cfdeb80f6d)) + fix(fs): path.join does not handle absolute paths as desired (#152) +- ([deead0f](https://github.com/angular/webdriver-manager/commit/deead0fc55ecd00b282aedc234592181746a307c)) + fix(downloader): destroy the request after receiving the header (#144) + + Otherwise we’ll won’t terminate until the whole file was downloaded, even though we don’t need it. +- ([c16bf90](https://github.com/angular/webdriver-manager/commit/c16bf9053fc90e4b5e89ab867c514d0622ab0716)) + chore(es6): allow to use es6 promises (#160) + + - with node 6 on LTS, we can update the tsconfig to es6 + - update travis tests to use node 6 and 7 + +# 10.2.10 + +- Since 10.2.9 produced breaking changes, released as version 11.0.0 +- Version 10.2.8 is the same as 10.2.10 due to [issue #170](https://github.com/angular/webdriver-manager/issues/170). + +# 10.2.8 + +## Features + +- ([1f9713a](https://github.com/angular/webdriver-manager/commit/1f9713aff1e7d44de900ed3c74abac532d3e25ff)) + feat(start and shutdown): Added `--detach` option for `start` command and new `shutdown` command + (#130) + +- ([88cf46b](https://github.com/angular/webdriver-manager/commit/88cf46b715250559ba8a726370a83c5c2f4daed1)) + feat(version): have a way to get the package version (#136) + + closes #119 + +## Bug fixes +- ([5966b6a](https://github.com/angular/webdriver-manager/commit/5966b6ac7329878e9e16f5b1b88261c5b7f7e438)) + fix(cli): fix setting flag to false (#135) + + - This fixes `webdriver-manager update --gecko=false` + - This does not fix `webdriver-manager update --gecko=0`. Minimist interprets 0 as true. + - Add options and programs unit tests + closes #110 + +- ([35676ee](https://github.com/angular/webdriver-manager/commit/35676ee70c816d43f045fa33d02e41bf502a3a14)) + fix(gecko): follow redirects for content-length (#133) + +# 10.2.7 + +## Features + +- ([66776a0](https://github.com/angular/webdriver-manager/commit/66776a0edc97e0b2718f2fdf4eeb2c2c8b40df73)) + feat(start): add way to programmatically detect when the selenium server is running (#120) + +## Bug fixes + +- ([dc2f9f9](https://github.com/angular/webdriver-manager/commit/dc2f9f99ebd9675b02addf06732a4d8d348046bc)) + fix(cli): fix default option values, boolean and string handling (#110) (#122) + + - default option values initialize properly for `minimist` + - user-supplied boolean-type option values respected + - string-type option values are always strings + - simplify boolean-type option value access + +- ([88d6105](https://github.com/angular/webdriver-manager/commit/88d6105f538f075968c152935131bf19bf289532)) + fix(gecko): Update geckodriver to 0.11.0 and fix suffixes. (#128) + + Fixes #111 + +- ([707e015](https://github.com/angular/webdriver-manager/commit/707e015737ee3ca4b26b6d89979251f8d8c2d11d)) + fix(android): fixed four things for android: (#116) + + - Make appium default to 1.6.0 (Android N didn't work on 1.5.x) + - Make virtual devices default to `google_apis` + - Don't delete old virtual devices on update + - Update documentation + +- ([9fe4b22](https://github.com/angular/webdriver-manager/commit/9fe4b226d58fbbce2e9cf49df58f45dee7f13cf2)) + fix typo in webdriver-manager/spec/files (#125) + +# 10.2.6 + +## Features + +- ([f892ec4](https://github.com/angular/webdriver-manager/commit/f892ec41c09c210527998c966a69edc081cf418e)) + chore(chromedriver): update chromedriver version to 2.25 + +# 10.2.5 + +## Bug Fixes + +- ([b103850](https://github.com/angular/webdriver-manager/commit/b1038500466fe790cc8e3c2ff82dc3c7eb3796ba)) + fix(update): fix undefined gecko getBoolean error (#113) + + closes #107 +- ([7fbacf5](https://github.com/angular/webdriver-manager/commit/7fbacf5bc902dd3ccd1c9fbf285c8ca9a1e48ee3)) + fix(start): set the port when standalone server starts + + closes #106 + +# 10.2.4 + +## Bug Fixes + +- ([3984ea4](https://github.com/angular/webdriver-manager/commit/3984ea4e5cfd2edf0401a5e5310aecaaecb63555)) + fix(filemanager): respect proxy/ignoreSSL options in contentLength HEAD request (#101) + + +- ([946ee00](https://github.com/angular/webdriver-manager/commit/946ee005f7d316fd2d404c4bdbeae9a3802051af)) + fix(chrome_driver): use the x64 binary if chrome driver version is greater than 2.23 (#95) + + * fix(chrome_driver): use the x64 binary if chrome driver version is greater than 2.23 + * fix(chrome_driver): add semver to better determine version number + * refactor(chrome_driver): check first to see if we have valid semver or not + + closes #93 +- ([b183fad](https://github.com/angular/webdriver-manager/commit/b183fadd4ae0b47b0773d6979d090c74419ee327)) + fix(filemanager): Binaries can be downloaded from a custom CDN with alternate_cdn(#97) + + closes #96 + +## Features + +- ([5241fc1](https://github.com/angular/webdriver-manager/commit/5241fc14eaf2b5cdf4b35362f260f6973cea0b1e)) + chore(chromedriver): update chromedriver version to 2.24 (#92) + + Chromedriver < 2.24 has issues with Chrome 54+ + (https://bugs.chromium.org/p/chromedriver/issues/detail?id=1451). + +- ([61af7be](https://github.com/angular/webdriver-manager/commit/61af7be4edbaf070bdcc35dc85f11fb46ab9577e)) + feat(gecko): Add geckodriver, related config, and flags + + Users will still need 'marionette': true in their capabilities in order to use gecko driver. + +# 10.2.3 + +## Bug Fixes + +- ([fa48354](https://github.com/angular/webdriver-manager/commit/fa4835453385d4c79fcbba7bb6d408557c870bae)) + fix(downloader): fix against working proxy (#87) + +- ([d6597e8](https://github.com/angular/webdriver-manager/commit/d6597e8a06004888371cca12b8e803c7d44eaf8d)) + fix(start): add the correct flags for windows (#83) + + closes #68 +- ([c96090c](https://github.com/angular/webdriver-manager/commit/c96090c0f7cc24209b34f9634699e68669650070)) + fix(update): download standalone with proxy and ignore ssl (#81) + + closes #79 + +## Features + +- ([7ec082a](https://github.com/angular/webdriver-manager/commit/7ec082a1bcc7f262237a616ec96592c36c28b89a)) + feat(start): add a gecko driver path to the start command (#86) + +## Dependencies + +- ([fe85c94](https://github.com/angular/webdriver-manager/commit/fe85c94e8db0680be25461cd3ea1ef59fc4d8fa4)) + dep(types): update typescript, remove typings in favor of @types (#84) + +# 10.2.2 + +## Bug Fixes + +- ([236a8ec](https://github.com/angular/webdriver-manager/commit/236a8ec901133cb21247fc452d7ef7c9d5fed172)) + fix(downloader): increase timeouts and unlink sync on download errors (#75) + + closes #62 and #63 +- ([fa20ca8](https://github.com/angular/webdriver-manager/commit/fa20ca82e191b122ed49b144b8ebc53ee3b92a9d)) + fix(start): check if edge driver exists before adding to args (#73) + + closes #60 +- ([8b61b71](https://github.com/angular/webdriver-manager/commit/8b61b71410dbca6e205fbc599b954fe61a8ee937)) + fix(start): use ie32 if specified via command line (#72) + + closes #68 + +## Features + +- ([8346858](https://github.com/angular/webdriver-manager/commit/83468588fc21f7584b76a8c55afe659db045a4c9)) + feat(logging): add logging property to selenium standalone (#76) + + closes #61 +- ([18f9f1d](https://github.com/angular/webdriver-manager/commit/18f9f1dfea02cd8f5c5a2cd5f09130f0ca24f68a)) + chore(selenium): add dev/urandom to selenium start args to prevent startup delays in linux + + +# 10.2.1 + +upgrade to latest chrome driver and selenium standalone server versions + +# 10.2.0 + +- ([aa1b8b7](https://github.com/angular/webdriver-manager/commit/aa1b8b7cd9295f02b9bf69274e21eef1a7f3b7f0)) + feat(ios): iOS support (#57) + +# 10.1.0 + +## Bug Fixes + +- ([81c2aa3](https://github.com/angular/webdriver-manager/commit/81c2aa3ea6435934797b4d10c6734945484a641d)) + fix(iedriver): download url fix for iedriver (#54) + + closes #53 + +## Features + +- ([57372eb](https://github.com/angular/webdriver-manager/commit/57372ebd076f6b1ccaf41d920601e867b7b3084c)) + feat(edge): add Microsoft Edge support in CLI (#56) + + closes #55 +- ([d937245](https://github.com/angular/webdriver-manager/commit/d9372459c51a1aec553a79edaa32e497608a65de)) + feat(android): support android + +# 10.0.4 + +## Dependency Upgrades + +- ([970167a](https://github.com/angular/webdriver-manager/commit/970167a1b2db24fc8ca34db2994507ef0187ee7e)) + dep(typings): update typings (#42) + +## Bug Fixes + +- ([5073e23](https://github.com/angular/webdriver-manager/commit/5073e230574237047dd593a702f08f84907871bd)) + fix(folder): fix selenium folder location (#43) + +# 10.0.3 + +## Bug Fixes + +- ([d3724fb](https://github.com/angular/webdriver-manager/commit/d3724fbd9f6b0ceb481538f7f8f0088c8b004959)) + fix(config): simplify locating configuration file, selenium folder (#41) + + * Let the bin file decide which webdriver-manager to use + * Use the configuration file / package from the default position + * Selenium folder will always be located to webdriver-manager/selenium/ + +# 10.0.2 + +## Bug Fixes + +- ([5bca026](https://github.com/angular/webdriver-manager/commit/5bca0266118dcabf2e2782820e5c9095f6d16ed4)) + fix(config): configuration file local look up when used as a dependency (#33) + + closes #32 +- ([0cfcc88](https://github.com/angular/webdriver-manager/commit/0cfcc88f1383c400f72ea5e49f9600ff652f8214)) + fix(binary): Fix typo in fallback case when chalk isn't available. + + +# 10.0.1 + +## Bug Fixes + +- ([a6f1edd](https://github.com/angular/webdriver-manager/commit/a6f1edd782251c96d35e79a3bb78b70c2b137aa9)) + fix(global): fix finding config.json for global installs and release 10.0.1 (#23) + +# 10.0.0 + + +## Bug Fixes + +- ([70d32df](https://github.com/angular/webdriver-manager/commit/70d32df659f19510c25e97ea9a42c7f93813d448)) + fix(dir): check selenium dir and warn user that the folder does not exist (#17) + +- ([0ec1443](https://github.com/angular/webdriver-manager/commit/0ec14435379161259435edc7c766388941f1a846)) + fix(binary): file type, unzipping, and permissions + + closes #7, #16 + +- ([a073fd0](https://github.com/angular/webdriver-manager/commit/a073fd0e9d0290e52ac3a808643b069c71b196c3)) + fix(npm): use global, local, and project without env + + closes #20 + + +- ([6ccb9d8](https://github.com/angular/webdriver-manager/commit/6ccb9d8b9ac6daf79388c44e6d53f1d3d71fd3f8)) + fix(versions): versions option should stay consistent with existing webdriver-manager + + closes #6 + +- ([c34b05c](https://github.com/angular/webdriver-manager/commit/c34b05cc66849708a2fc515bc455a6a661c867d6)) + fix(bin): local, project, and global usage + +- ([4a0caf5](https://github.com/angular/webdriver-manager/commit/4a0caf5a69cacda01df87d4b4cc35092e519d267)) + fix(dep): fix dependency for chalk + +- ([15ae0e8](https://github.com/angular/webdriver-manager/commit/15ae0e815270c8af2441002492e3165edd3140df)) + fix(chmod): set permissions to 755 + +([1820fbc](https://github.com/angular/webdriver-manager/commit/1820fbc46ddc45b70911fb1678f1d99247ec7028)) + Initial commit + +## Features + +- ([374c3e7](https://github.com/angular/webdriver-manager/commit/374c3e719fce18a2f0a1b751b19bffb7d266cc69)) + feat(length): on update, check to see the file is the correct length + + closes #8 +- ([8c47291](https://github.com/angular/webdriver-manager/commit/8c472918ac73390890bbc39fcc4c7a2e86d3b262)) + feat(local): use the local version of webdriver-tool if it is installed + + closes #5 + +- ([f0622d2](https://github.com/angular/webdriver-manager/commit/f0622d2e173b68e4afcd409f9c0356c8a1c2652a)) + feat(logs): add chrome logs command line option + + + closes #11 +- ([3b30312](https://github.com/angular/webdriver-manager/commit/3b303129040b17292028452f13c73d62736f1216)) + feat(logger): update logging methods (#5) diff --git a/test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md b/test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md new file mode 100644 index 00000000..d50963ad --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md @@ -0,0 +1,61 @@ +Contributing +============ + +Questions +--------- + +Please ask support questions on [StackOverflow](http://stackoverflow.com/questions/tagged/webdriver-manager) or [Gitter](https://gitter.im/angular/webdriver-manager). + +Any questions posted to webdriver-manager's Github Issues will be closed with this note: + +Please direct general support questions like this one to an appropriate support channel, see https://github.com/angular/webdriver-manager/blob/master/CONTRIBUTING.md#questions. Thank you! + +Issues +====== + +If you have a bug or feature request, please file an issue. When submitting an issue, please include a reproducible case that we can actually run. + +Please format code and markup in your issue using [github markdown](https://help.github.com/articles/github-flavored-markdown). + + +Contributing to Source Code (Pull Requests) +=========================================== + +Loosely, follow the [Angular contribution rules](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md). + + * If your PR changes any behavior or fixes an issue, it should have an associated test. + * New features should be general and as simple as possible. + * Breaking changes should be avoided if possible. + * All pull requests require review. No PR will be submitted without a comment from a team member stating LGTM (Looks good to me). + +Webdriver-manager specific rules +------------------------- + + * JavaScript style should generally follow the [Google JS style guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml). + * Wrap code at 100 chars. + * Document public methods with jsdoc. + * Be consistent with the code around you! + +Commit Messages +--------------- + +Please write meaningful commit messages - they are used to generate the changelog, so the commit message should tell a user everything they need to know about a commit. Webdriver-manager follows AngularJS's [commit message format](https://docs.google.com/a/google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.z8a3t6ehl060). + +In summary, this style is + + (): + + + +Where `` is one of [feat, fix, docs, refactor, test, chore, deps] and +`` is a quick descriptor of the location of the change, such as cli, clientSideScripts, element. + +Testing your changes +-------------------- + +Test your changes on your machine by running `npm test` to run the test suite. + +When you submit a PR, tests will also be run on the Continuous Integration environment +through Travis. If your tests fail on Travis, take a look at the logs - if the failures +are known flakes in Internet Explorer or Safari you can ignore them, but otherwise +Travis should pass. diff --git a/test-eol-project/node_modules/webdriver-manager/LICENSE b/test-eol-project/node_modules/webdriver-manager/LICENSE new file mode 100644 index 00000000..1556807c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2016-2017 Google, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/test-eol-project/node_modules/webdriver-manager/README.md b/test-eol-project/node_modules/webdriver-manager/README.md new file mode 100644 index 00000000..8fa91dad --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/README.md @@ -0,0 +1,76 @@ + +Webdriver Manager [![CircleCI Status](https://circleci.com/gh/angular/webdriver-manager.svg?style=shield)](https://circleci.com/gh/angular/webdriver-manager) [![Join the chat at https://gitter.im/angular/webdriver-manager](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular/webdriver-manager?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +================= + +A selenium server and browser driver manager for your end to end tests. This is the same tool as `webdriver-manager` from the [Protractor](https://github.com/angular/protractor) repository. + +**Note:** Version 9 and lower please reference [pose/webdriver-manager](https://github.com/pose/webdriver-manager). If there are features that existed in version 9 and lower, please open up an issue with the missing feature or a create a pull request. + +Getting Started +--------------- + +``` +npm install -g webdriver-manager +``` + +Setting up a Selenium Server +---------------------------- + +Prior to starting the selenium server, download the selenium server jar and driver binaries. By default it will download the selenium server jar and chromedriver binary. + +``` +webdriver-manager update +``` + +Starting the Selenium Server +---------------------------- + +By default, the selenium server will run on `http://localhost:4444/wd/hub`. + + +``` +webdriver-manager start +``` + +Other useful commands +--------------------- + +View different versions of server and driver files: + +``` +webdriver-manager status +``` + +Clear out the server and driver files. If `webdriver-manager start` does not work, try to clear out the saved files. + +``` +webdriver-manager clean +``` + +Running / stopping server in background process (stopping is not yet supported on standalone server 3.x.x): + +``` +webdriver-manager start --detach +webdriver-manager shutdown +``` + +Help commands +------------- + +Wedriver-manager has a main help option: `webdriver-manager help`. There are also other built in help menus for each of the commands. So for example, if you would like to look up all the flag options you can set in `update`, you could run `webdriver-manager update help`. + +Here are a list of all the commands with help: + +``` +webdriver-manager update help +webdriver-manager start help +webdriver-manager clean help +webdriver-manager status help +``` + +Other topics: +-------------- + +- [mobile browser support](docs/mobile.md) +- [protractor support](docs/protractor.md) +- [set specific versions](docs/versions.md) \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/config.json b/test-eol-project/node_modules/webdriver-manager/built/config.json new file mode 100644 index 00000000..cc7625a6 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/config.json @@ -0,0 +1,18 @@ +{ + "webdriverVersions": { + "selenium": "2.53.1", + "chromedriver": "2.27", + "maxChromedriver": "77", + "geckodriver": "v0.13.0", + "iedriver": "2.53.1", + "androidsdk": "24.4.1", + "appium": "1.6.5" + }, + "cdnUrls": { + "selenium": "https://selenium-release.storage.googleapis.com/", + "chromedriver": "https://chromedriver.storage.googleapis.com/", + "geckodriver": "https://github.com/mozilla/geckodriver/releases/download/", + "iedriver": "https://selenium-release.storage.googleapis.com/", + "androidsdk": "http://dl.google.com/android/" + } +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts new file mode 100644 index 00000000..4c071af8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts @@ -0,0 +1,26 @@ +import { Binary, BinaryUrl, OS } from './binary'; +/** + * The android sdk binary. + */ +export declare class AndroidSDK extends Binary { + static os: OS[]; + static id: string; + static versionDefault: string; + static isDefault: boolean; + static DEFAULT_API_LEVELS: string; + static DEFAULT_ARCHITECTURES: string; + static DEFAULT_PLATFORMS: string; + static VERSIONS: { + [api_level: number]: string; + }; + constructor(alternateCDN?: string); + id(): string; + prefix(): string; + suffix(): string; + getUrl(): Promise; + getVersionList(): Promise; + url(ostype: string): string; + zipContentName(): string; + executableSuffix(): string; + remove(sdkPath: string): void; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js new file mode 100644 index 00000000..67d53084 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const rimraf = require("rimraf"); +const config_1 = require("../config"); +const utils_1 = require("../utils"); +const binary_1 = require("./binary"); +function getAndroidArch() { + switch (config_1.Config.osArch()) { + case 'arm': + return 'armeabi-v7a'; + case 'arm64': + return 'arm64-v8a'; + case 'x86': + case 'x32': + case 'ia32': + case 'ppc': + return 'x86'; + case 'x86-64': + case 'x64': + case 'ia64': + case 'ppc64': + return 'x86_64'; + default: + return config_1.Config.osArch(); + } +} +/** + * The android sdk binary. + */ +class AndroidSDK extends binary_1.Binary { + constructor(alternateCDN) { + super(alternateCDN || config_1.Config.cdnUrls().android); + this.name = 'android-sdk'; + this.versionCustom = AndroidSDK.versionDefault; + } + id() { + return AndroidSDK.id; + } + prefix() { + return 'android-sdk_r'; + } + suffix() { + if (this.ostype === 'Darwin') { + return '-macosx.zip'; + } + else if (this.ostype === 'Linux') { + return '-linux.tgz'; + } + else if (this.ostype === 'Windows_NT') { + return '-windows.zip'; + } + } + getUrl() { + return Promise.resolve({ url: this.cdn + this.filename(), version: this.versionCustom }); + } + getVersionList() { + return null; + } + url(ostype) { + return this.cdn + this.filename(); + } + zipContentName() { + if (this.ostype === 'Darwin') { + return this.name + '-macosx'; + } + else if (this.ostype === 'Linux') { + return this.name + '-linux'; + } + else if (this.ostype === 'Windows_NT') { + return this.name + '-windows'; + } + } + executableSuffix() { + return ''; + } + remove(sdkPath) { + try { + let avds = require(path.resolve(sdkPath, 'available_avds.json')); + let version = path.basename(sdkPath).slice(this.prefix().length); + avds.forEach((avd) => { + utils_1.spawnSync(path.resolve(sdkPath, 'tools', 'android'), ['delete', 'avd', '-n', avd + '-v' + version + '-wd-manager']); + }); + } + catch (e) { + } + rimraf.sync(sdkPath); + } +} +AndroidSDK.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; +AndroidSDK.id = 'android'; +AndroidSDK.versionDefault = config_1.Config.binaryVersions().android; +AndroidSDK.isDefault = false; +AndroidSDK.DEFAULT_API_LEVELS = '24'; +AndroidSDK.DEFAULT_ARCHITECTURES = getAndroidArch(); +AndroidSDK.DEFAULT_PLATFORMS = 'google_apis'; +AndroidSDK.VERSIONS = { + // Before 24 is not supported + 24: '7.0', + 25: '7.1' +}; +exports.AndroidSDK = AndroidSDK; +//# sourceMappingURL=android_sdk.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map new file mode 100644 index 00000000..8fb43623 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"android_sdk.js","sourceRoot":"","sources":["../../../lib/binaries/android_sdk.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,sCAAiC;AACjC,oCAAmC;AAEnC,qCAA+C;AAE/C;IACE,MAAM,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACxB,KAAK,KAAK;YACR,MAAM,CAAC,aAAa,CAAC;QACvB,KAAK,OAAO;YACV,MAAM,CAAC,WAAW,CAAC;QACrB,KAAK,KAAK,CA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C,CAAC,CAAC,CAAC,CAAC,CAAC;QACb,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;;AA5EM,aAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,aAAE,GAAG,SAAS,CAAC;AACf,yBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC;AACjD,oBAAS,GAAG,KAAK,CAAC;AAClB,6BAAkB,GAAG,IAAI,CAAC;AAC1B,gCAAqB,GAAG,cAAc,EAAE,CAAC;AACzC,4BAAiB,GAAG,aAAa,CAAC;AAClC,mBAAQ,GAAkC;IAC/C,6BAA6B;IAC7B,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;CACV,CAAA;AAZH,gCA8EC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts new file mode 100644 index 00000000..53a3fc8e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts @@ -0,0 +1,18 @@ +import { Binary, BinaryUrl, OS } from './binary'; +/** + * The appium binary. + */ +export declare class Appium extends Binary { + static os: OS[]; + static id: string; + static versionDefault: string; + static isDefault: boolean; + constructor(alternateCDN?: string); + id(): string; + prefix(): string; + suffix(): string; + executableSuffix(): string; + getUrl(version?: string): Promise; + getVersionList(): Promise; + remove(sdkPath: string): void; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js new file mode 100644 index 00000000..fbf5b8ee --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const rimraf = require("rimraf"); +const config_1 = require("../config"); +const binary_1 = require("./binary"); +/** + * The appium binary. + */ +class Appium extends binary_1.Binary { + constructor(alternateCDN) { + super(alternateCDN || config_1.Config.cdnUrls().appium); + this.name = 'appium'; + this.versionCustom = Appium.versionDefault; + } + id() { + return Appium.id; + } + prefix() { + return 'appium-'; + } + suffix() { + return ''; + } + executableSuffix() { + return ''; + } + getUrl(version) { + return Promise.resolve({ url: '', version: this.versionCustom }); + } + getVersionList() { + return null; + } + remove(sdkPath) { + rimraf.sync(sdkPath); + } +} +Appium.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; +Appium.id = 'appium'; +Appium.versionDefault = config_1.Config.binaryVersions().appium; +Appium.isDefault = false; +exports.Appium = Appium; +//# sourceMappingURL=appium.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map new file mode 100644 index 00000000..ef091e3f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map @@ -0,0 +1 @@ +{"version":3,"file":"appium.js","sourceRoot":"","sources":["../../../lib/binaries/appium.ts"],"names":[],"mappings":";;AACA,iCAAiC;AAEjC,sCAAiC;AAEjC,qCAA+C;AAG/C;;GAEG;AACH,YAAoB,SAAQ,eAAM;IAMhC,YAAY,YAAqB;QAC/B,KAAK,CAAC,YAAY,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC;IAC7C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,SAAS,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAED,gBAAgB;QACd,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,OAAgB;QACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAC,CAAC,CAAC;IACjE,CAAC;IAED,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;;AArCM,SAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,SAAE,GAAG,QAAQ,CAAC;AACd,qBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC;AAChD,gBAAS,GAAG,KAAK,CAAC;AAJ3B,wBAuCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts new file mode 100644 index 00000000..dfa0c767 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts @@ -0,0 +1,66 @@ +import { ConfigSource } from './config_source'; +/** + * operating system enum + */ +export declare enum OS { + Windows_NT = 0, + Linux = 1, + Darwin = 2, +} +export interface BinaryUrl { + url: string; + version: string; +} +/** + * Dictionary to map the binary's id to the binary object + */ +export interface BinaryMap { + [id: string]: T; +} +export declare abstract class Binary { + static os: OS[]; + configSource: ConfigSource; + ostype: string; + osarch: string; + alternativeDownloadUrl: string; + cdn: string; + name: string; + versionDefault: string; + versionCustom: string; + constructor(opt_alternativeCdn?: string); + abstract prefix(): string; + abstract suffix(): string; + executableSuffix(): string; + version(): string; + filename(): string; + /** + * @param ostype The operating system. + * @returns The file name for the executable. + */ + executableFilename(): string; + /** + * Gets the id of the binary. + */ + abstract id(): string; + /** + * Gets the url to download the file set by the version. This will use the XML if available. + * If not, it will download from an existing url. + * + * @param {string} version The version we are looking for. This could also be 'latest'. + */ + getUrl(version?: string): Promise; + /** + * Gets the list of available versions available based on the xml. If no XML exists, return an + * empty list. + */ + abstract getVersionList(): Promise; + /** + * Delete an instance of this binary from the file system + */ + remove(filename: string): void; + /** + * @param ostype The operating system. + * @returns The file name for the file inside the downloaded zip file + */ + zipContentName(): string; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js new file mode 100644 index 00000000..c695eb89 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js @@ -0,0 +1,76 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const config_1 = require("../config"); +/** + * operating system enum + */ +var OS; +(function (OS) { + OS[OS["Windows_NT"] = 0] = "Windows_NT"; + OS[OS["Linux"] = 1] = "Linux"; + OS[OS["Darwin"] = 2] = "Darwin"; +})(OS = exports.OS || (exports.OS = {})); +class Binary { + constructor(opt_alternativeCdn) { + this.ostype = config_1.Config.osType(); + this.osarch = config_1.Config.osArch(); + this.cdn = opt_alternativeCdn; + } + executableSuffix() { + if (this.ostype == 'Windows_NT') { + return '.exe'; + } + else { + return ''; + } + } + version() { + return this.versionCustom; + } + filename() { + return this.prefix() + this.version() + this.suffix(); + } + /** + * @param ostype The operating system. + * @returns The file name for the executable. + */ + executableFilename() { + return this.prefix() + this.version() + this.executableSuffix(); + } + /** + * Gets the url to download the file set by the version. This will use the XML if available. + * If not, it will download from an existing url. + * + * @param {string} version The version we are looking for. This could also be 'latest'. + */ + getUrl(version) { + if (this.alternativeDownloadUrl != null) { + return Promise.resolve({ url: '', version: '' }); + } + else { + return this.getVersionList().then(() => { + version = version || config_1.Config.binaryVersions()[this.id()]; + return this.configSource.getUrl(version).then(binaryUrl => { + this.versionCustom = binaryUrl.version; + return { url: binaryUrl.url, version: binaryUrl.version }; + }); + }); + } + } + /** + * Delete an instance of this binary from the file system + */ + remove(filename) { + fs.unlinkSync(filename); + } + /** + * @param ostype The operating system. + * @returns The file name for the file inside the downloaded zip file + */ + zipContentName() { + return this.name + this.executableSuffix(); + } +} +exports.Binary = Binary; +//# sourceMappingURL=binary.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map new file mode 100644 index 00000000..29016f9b --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../../lib/binaries/binary.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,sCAAiC;AAGjC;;GAEG;AACH,IAAY,EAIX;AAJD,WAAY,EAAE;IACZ,uCAAU,CAAA;IACV,6BAAK,CAAA;IACL,+BAAM,CAAA;AACR,CAAC,EAJW,EAAE,GAAF,UAAE,KAAF,UAAE,QAIb;AAYD;IAmBE,YAAY,kBAA2B;QAdvC,WAAM,GAAW,eAAM,CAAC,MAAM,EAAE,CAAC;QACjC,WAAM,GAAW,eAAM,CAAC,MAAM,EAAE,CAAC;QAc/B,IAAI,CAAC,GAAG,GAAG,kBAAkB,CAAC;IAChC,CAAC;IAKD,gBAAgB;QACd,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,MAAM,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,QAAQ;QACN,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IACxD,CAAC;IAED;;;OAGG;IACH,kBAAkB;QAChB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAClE,CAAC;IAOD;;;;;OAKG;IACH,MAAM,CAAC,OAAgB;QACrB,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC,CAAC;QACjD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC;gBAChC,OAAO,GAAG,OAAO,IAAI,eAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS;oBACrD,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC;oBACvC,MAAM,CAAC,EAAC,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAC,CAAC;gBAC1D,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAQD;;OAEG;IACH,MAAM,CAAC,QAAgB;QACrB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC7C,CAAC;CACF;AA/FD,wBA+FC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts new file mode 100644 index 00000000..cfaa85fb --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts @@ -0,0 +1,12 @@ +import { Binary, OS } from './binary'; +export declare class ChromeDriver extends Binary { + static id: string; + static isDefault: boolean; + static os: OS[]; + static versionDefault: string; + constructor(opt_alternativeCdn?: string); + id(): string; + prefix(): string; + suffix(): string; + getVersionList(): Promise; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js new file mode 100644 index 00000000..d23b1c15 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const config_1 = require("../config"); +const binary_1 = require("./binary"); +const chrome_xml_1 = require("./chrome_xml"); +class ChromeDriver extends binary_1.Binary { + constructor(opt_alternativeCdn) { + super(opt_alternativeCdn || config_1.Config.cdnUrls().chrome); + this.configSource = new chrome_xml_1.ChromeXml(); + this.name = 'chromedriver'; + this.versionDefault = ChromeDriver.versionDefault; + this.versionCustom = this.versionDefault; + } + id() { + return ChromeDriver.id; + } + prefix() { + return 'chromedriver_'; + } + suffix() { + return '.zip'; + } + getVersionList() { + // If an alternative cdn is set, return an empty list. + if (this.alternativeDownloadUrl != null) { + Promise.resolve([]); + } + else { + return this.configSource.getVersionList(); + } + } +} +ChromeDriver.id = 'chrome'; +ChromeDriver.isDefault = true; +ChromeDriver.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; +ChromeDriver.versionDefault = config_1.Config.binaryVersions().chrome; +exports.ChromeDriver = ChromeDriver; +//# sourceMappingURL=chrome_driver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map new file mode 100644 index 00000000..f15bb0cd --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chrome_driver.js","sourceRoot":"","sources":["../../../lib/binaries/chrome_driver.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAC/C,6CAAuC;AAEvC,kBAA0B,SAAQ,eAAM;IAMtC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAS,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;QAClD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,eAAe,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,sDAAsD;QACtD,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AAhCM,eAAE,GAAG,QAAQ,CAAC;AACd,sBAAS,GAAG,IAAI,CAAC;AACjB,eAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,2BAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC;AAJzD,oCAkCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts new file mode 100644 index 00000000..547d36aa --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts @@ -0,0 +1,36 @@ +import { BinaryUrl } from './binary'; +import { XmlConfigSource } from './config_source'; +export declare class ChromeXml extends XmlConfigSource { + maxVersion: string; + constructor(); + getUrl(version: string): Promise; + /** + * Get a list of chrome drivers paths available for the configuration OS type and architecture. + */ + getVersionList(): Promise; + /** + * Helper method, gets the ostype and gets the name used by the XML + */ + getOsTypeName(): string; + /** + * Gets the latest item from the XML. + */ + private getLatestChromeDriverVersion(); + /** + * Gets a specific item from the XML. + */ + private getSpecificChromeDriverVersion(inputVersion); +} +/** + * Chromedriver is the only binary that does not conform to semantic versioning + * and either has too little number of digits or too many. To get this to be in + * semver, we will either add a '.0' at the end or chop off the last set of + * digits. This is so we can compare to find the latest and greatest. + * + * Example: + * 2.46 -> 2.46.0 + * 75.0.3770.8 -> 75.0.3770 + * + * @param version + */ +export declare function getValidSemver(version: string): string; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js new file mode 100644 index 00000000..6dfbea56 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js @@ -0,0 +1,156 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const semver = require("semver"); +const config_1 = require("../config"); +const http_utils_1 = require("../http_utils"); +const config_source_1 = require("./config_source"); +class ChromeXml extends config_source_1.XmlConfigSource { + constructor() { + super('chrome', config_1.Config.cdnUrls()['chrome']); + this.maxVersion = config_1.Config.binaryVersions().maxChrome; + } + getUrl(version) { + if (version === 'latest') { + return this.getLatestChromeDriverVersion(); + } + else { + return this.getSpecificChromeDriverVersion(version); + } + } + /** + * Get a list of chrome drivers paths available for the configuration OS type and architecture. + */ + getVersionList() { + return this.getXml().then(xml => { + let versionPaths = []; + let osType = this.getOsTypeName(); + for (let content of xml.ListBucketResult.Contents) { + let contentKey = content.Key[0]; + if ( + // Filter for 32-bit devices, make sure x64 is not an option + (this.osarch.includes('64') || !contentKey.includes('64')) && + // Filter for x86 macs, make sure m1 is not an option + ((this.ostype === 'Darwin' && this.osarch === 'arm64') || !contentKey.includes('m1'))) { + // Filter for only the osType + if (contentKey.includes(osType)) { + versionPaths.push(contentKey); + } + } + } + return versionPaths; + }); + } + /** + * Helper method, gets the ostype and gets the name used by the XML + */ + getOsTypeName() { + // Get the os type name. + if (this.ostype === 'Darwin') { + return 'mac'; + } + else if (this.ostype === 'Windows_NT') { + return 'win'; + } + else { + return 'linux'; + } + } + /** + * Gets the latest item from the XML. + */ + getLatestChromeDriverVersion() { + const latestReleaseUrl = 'https://chromedriver.storage.googleapis.com/LATEST_RELEASE'; + return http_utils_1.requestBody(latestReleaseUrl).then(latestVersion => { + return this.getSpecificChromeDriverVersion(latestVersion); + }); + } + /** + * Gets a specific item from the XML. + */ + getSpecificChromeDriverVersion(inputVersion) { + return this.getVersionList().then(list => { + const specificVersion = getValidSemver(inputVersion); + if (specificVersion === '') { + throw new Error(`version ${inputVersion} ChromeDriver does not exist`); + } + let itemFound = ''; + for (let item of list) { + // Get a semantic version. + let version = item.split('/')[0]; + if (semver.valid(version) == null) { + const lookUpVersion = getValidSemver(version); + if (semver.valid(lookUpVersion)) { + // Check to see if the specified version matches. + if (lookUpVersion === specificVersion) { + // When item found is null, check the os arch + // 64-bit version works OR not 64-bit version and the path does not have '64' + if (itemFound == '') { + if (this.osarch === 'x64' || + (this.osarch !== 'x64' && !item.includes(this.getOsTypeName() + '64'))) { + itemFound = item; + } + if (this.osarch === 'arm64' && this.ostype === 'Darwin' && item.includes('m1')) { + itemFound = item; + } + } + else if (this.osarch === 'x64') { + // No win64 version exists, so even on x64 we need to look for win32 + const osTypeNameAndArch = this.getOsTypeName() + (this.getOsTypeName() === 'win' ? '32' : '64'); + if (item.includes(osTypeNameAndArch)) { + itemFound = item; + } + } + } + } + } + } + if (itemFound == '') { + return { url: '', version: inputVersion }; + } + else { + return { url: config_1.Config.cdnUrls().chrome + itemFound, version: inputVersion }; + } + }); + } +} +exports.ChromeXml = ChromeXml; +/** + * Chromedriver is the only binary that does not conform to semantic versioning + * and either has too little number of digits or too many. To get this to be in + * semver, we will either add a '.0' at the end or chop off the last set of + * digits. This is so we can compare to find the latest and greatest. + * + * Example: + * 2.46 -> 2.46.0 + * 75.0.3770.8 -> 75.0.3770 + * + * @param version + */ +function getValidSemver(version) { + let lookUpVersion = ''; + // This supports downloading 2.46 + try { + const oldRegex = /(\d+.\d+)/g; + const exec = oldRegex.exec(version); + if (exec) { + lookUpVersion = exec[1] + '.0'; + } + } + catch (_) { + // no-op: is this is not valid, do not throw here. + } + // This supports downloading 74.0.3729.6 + try { + const newRegex = /(\d+.\d+.\d+).\d+/g; + const exec = newRegex.exec(version); + if (exec) { + lookUpVersion = exec[1]; + } + } + catch (_) { + // no-op: if this does not work, use the other regex pattern. + } + return lookUpVersion; +} +exports.getValidSemver = getValidSemver; +//# sourceMappingURL=chrome_xml.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map new file mode 100644 index 00000000..ed3a210b --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chrome_xml.js","sourceRoot":"","sources":["../../../lib/binaries/chrome_xml.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,sCAAiC;AACjC,8CAA0C;AAG1C,mDAAgD;AAEhD,eAAuB,SAAQ,+BAAe;IAG5C;QACE,KAAK,CAAC,QAAQ,EAAE,eAAM,CAAC,OAAO,EAAE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AI,EAAE,CAAC,CAAC,CAAC;gBACpB,MAAM,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAC,CAAC;YAC1C,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,EAAC,GAAG,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,YAAY,EAAC,CAAC;YAC3E,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AArHD,8BAqHC;AAED;;;;;;;;;;;GAWG;AACH,wBAA+B,OAAe;IAC5C,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,iCAAiC;IACjC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,YAAY,CAAC;QAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACT,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QACjC,CAAC;IACH,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,kDAAkD;IACpD,CAAC;IACD,wCAAwC;IACxC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,oBAAoB,CAAC;QACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACT,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,6DAA6D;IAC/D,CAAC;IACD,MAAM,CAAC,aAAa,CAAC;AACvB,CAAC;AAvBD,wCAuBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts new file mode 100644 index 00000000..e74fa403 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts @@ -0,0 +1,38 @@ +export declare abstract class ConfigSource { + ostype: string; + osarch: string; + out_dir: string; + abstract getUrl(version: string): Promise<{ + url: string; + version: string; + }>; + abstract getVersionList(): Promise; +} +export declare abstract class XmlConfigSource extends ConfigSource { + name: string; + xmlUrl: string; + constructor(name: string, xmlUrl: string); + protected getFileName(): string; + protected getXml(): Promise; + private readResponse(); + private requestXml(); + private convertXml2js(xml); +} +export declare abstract class JsonConfigSource extends ConfigSource { + name: string; + jsonUrl: string; + constructor(name: string, jsonUrl: string); + protected getFileName(): string; + protected abstract getJson(): Promise; +} +export declare abstract class GithubApiConfigSource extends JsonConfigSource { + constructor(name: string, url: string); + /** + * This is an unauthenticated request and since Github limits the rate, we will cache this + * to a file. { timestamp: number, response: response }. We will check the timestamp and renew + * this request if the file is older than an hour. + */ + getJson(): Promise; + private requestJson(); + private readResponse(); +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js new file mode 100644 index 00000000..251d4898 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js @@ -0,0 +1,209 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const path = require("path"); +const request = require("request"); +const url = require("url"); +const xml2js = require("xml2js"); +const logger_1 = require("../cli/logger"); +const config_1 = require("../config"); +const http_utils_1 = require("../http_utils"); +let logger = new logger_1.Logger('config_source'); +class ConfigSource { + constructor() { + this.ostype = config_1.Config.osType(); + this.osarch = config_1.Config.osArch(); + this.out_dir = config_1.Config.getSeleniumDir(); + } +} +exports.ConfigSource = ConfigSource; +class XmlConfigSource extends ConfigSource { + constructor(name, xmlUrl) { + super(); + this.name = name; + this.xmlUrl = xmlUrl; + } + getFileName() { + try { + fs.statSync(this.out_dir); + } + catch (e) { + fs.mkdirSync(this.out_dir); + } + return path.resolve(this.out_dir, this.name + '-response.xml'); + } + getXml() { + let fileName = this.getFileName(); + let content = this.readResponse(); + if (content) { + return Promise.resolve(content); + } + else { + return this.requestXml().then(text => { + let xml = this.convertXml2js(text); + fs.writeFileSync(fileName, text); + return xml; + }); + } + } + readResponse() { + let fileName = this.getFileName(); + try { + let contents = fs.readFileSync(fileName).toString(); + let timestamp = new Date(fs.statSync(fileName).mtime).getTime(); + let size = fs.statSync(fileName).size; + let now = Date.now(); + // On start, read the file. If not on start, check use the cache as long as the + // size > 0 and within the cache time. + // 60 minutes * 60 seconds / minute * 1000 ms / second + if (config_1.Config.runCommand === 'start' || (size > 0 && (now - (60 * 60 * 1000) < timestamp))) { + return this.convertXml2js(contents); + } + else { + return null; + } + } + catch (err) { + return null; + } + } + requestXml() { + return new Promise((resolve, reject) => { + let options = http_utils_1.HttpUtils.initOptions(this.xmlUrl); + let curl = this.getFileName() + ' ' + options.url; + if (http_utils_1.HttpUtils.requestOpts.proxy) { + let pathUrl = url.parse(options.url.toString()).path; + let host = url.parse(options.url.toString()).host; + let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); + curl = this.getFileName() + ' \'' + newFileUrl + '\' -H \'host:' + host + '\''; + } + if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { + curl = 'k ' + curl; + } + logger.info('curl -o' + curl); + let req = request(options); + req.on('response', response => { + if (response.statusCode === 200) { + let output = ''; + response.on('data', (data) => { + output += data; + }); + response.on('end', () => { + resolve(output); + }); + } + else { + reject(new Error('response status code is not 200')); + } + }); + }); + } + convertXml2js(xml) { + let retResult = null; + xml2js.parseString(xml, (err, result) => { + retResult = result; + }); + return retResult; + } +} +exports.XmlConfigSource = XmlConfigSource; +class JsonConfigSource extends ConfigSource { + constructor(name, jsonUrl) { + super(); + this.name = name; + this.jsonUrl = jsonUrl; + } + getFileName() { + try { + fs.statSync(this.out_dir); + } + catch (e) { + fs.mkdirSync(this.out_dir); + } + return path.resolve(this.out_dir, this.name + '-response.json'); + } +} +exports.JsonConfigSource = JsonConfigSource; +class GithubApiConfigSource extends JsonConfigSource { + constructor(name, url) { + super(name, url); + } + /** + * This is an unauthenticated request and since Github limits the rate, we will cache this + * to a file. { timestamp: number, response: response }. We will check the timestamp and renew + * this request if the file is older than an hour. + */ + getJson() { + let fileName = this.getFileName(); + let content = this.readResponse(); + if (content) { + return Promise.resolve(JSON.parse(content)); + } + else { + return this.requestJson().then(body => { + let json = JSON.parse(body); + fs.writeFileSync(fileName, JSON.stringify(json, null, ' ')); + return json; + }); + } + } + requestJson() { + return new Promise((resolve, reject) => { + let options = http_utils_1.HttpUtils.initOptions(this.jsonUrl); + options = http_utils_1.HttpUtils.optionsHeader(options, 'Host', 'api.github.com'); + options = http_utils_1.HttpUtils.optionsHeader(options, 'User-Agent', 'request'); + let curl = this.getFileName() + ' ' + options.url; + if (http_utils_1.HttpUtils.requestOpts.proxy) { + let pathUrl = url.parse(options.url.toString()).path; + let host = url.parse(options.url.toString()).host; + let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); + curl = this.getFileName() + ' \'' + newFileUrl + '\' -H \'host:' + host + '\''; + } + if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { + curl = 'k ' + curl; + } + logger.info('curl -o' + curl); + let req = request(options); + req.on('response', response => { + if (response.statusCode === 200) { + let output = ''; + response.on('data', (data) => { + output += data; + }); + response.on('end', () => { + resolve(output); + }); + } + else if (response.statusCode == 403 && response.headers['x-ratelimit-remaining'] == '0') { + reject(new Error('Failed to make Github request, rate limit reached.')); + } + else { + reject(new Error('response status code is not 200. It was ' + response.statusCode)); + } + }); + }); + } + readResponse() { + let fileName = this.getFileName(); + try { + let contents = fs.readFileSync(fileName).toString(); + let timestamp = new Date(fs.statSync(fileName).mtime).getTime(); + let size = fs.statSync(fileName).size; + let now = Date.now(); + // On start, read the file. If not on start, check use the cache as long as the + // size > 0 and within the cache time. + // 60 minutes * 60 seconds / minute * 1000 ms / second + if (config_1.Config.runCommand === 'start' || (size > 0 && (now - (60 * 60 * 1000) < timestamp))) { + return contents; + } + else { + return null; + } + } + catch (err) { + return null; + } + } +} +exports.GithubApiConfigSource = GithubApiConfigSource; +//# sourceMappingURL=config_source.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map new file mode 100644 index 00000000..1149664e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config_source.js","sourceRoot":"","sources":["../../../lib/binaries/config_source.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AAEzB,6BAA6B;AAC7B,mCAAmC;AACnC,2BAA2B;AAC3B,iCAAiC;AAEjC,0CAAqC;AACrC,sCAAiC;AACjC,8CAAwC;AAExC,IAAI,MAAM,GAAG,IAAI,eAAM,CAAC,eAAe,CAAC,CAAC;AAEzC;IAAA;QACE,WAAM,GAAG,eAAM,CAAC,MAAM,EAAE,CAAC;QACzB,WAAM,GAAG,eAAM,CAAC,MAAM,EAAE,CAAC;QACzB,YAAO,GAAW,eAAM,CAAC,cAAc,EAAE,CAAC;IAI5C,CAAC;CAAA;AAPD,oCAOC;AAED,qBAAsC,SAAQ,YAAY;IACxD,YAAmB,IAAY,EAAS,MAAc;QACpD,KAAK,EAAE,CAAC;QADS,SAAI,GAAJ,IAAI,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAQ;IAEtD,CAAC;IAES,WAAW;QACnB,IAAI,CAAC;YACH,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACX,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;QACD,M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d,CAAC;QACH,CAAC;QAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAlFD,sDAkFC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts new file mode 100644 index 00000000..837438dc --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts @@ -0,0 +1,13 @@ +import { Binary, OS } from './binary'; +export declare class GeckoDriver extends Binary { + static id: string; + static isDefault: boolean; + static os: OS[]; + static versionDefault: string; + private static suffixes; + constructor(opt_alternativeCdn?: string); + id(): string; + prefix(): string; + suffix(): string; + getVersionList(): Promise; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js new file mode 100644 index 00000000..7205a205 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const config_1 = require("../config"); +const binary_1 = require("./binary"); +const gecko_driver_github_1 = require("./gecko_driver_github"); +class GeckoDriver extends binary_1.Binary { + constructor(opt_alternativeCdn) { + super(opt_alternativeCdn || config_1.Config.cdnUrls().gecko); + this.configSource = new gecko_driver_github_1.GeckoDriverGithub(); + this.name = 'geckodriver'; + this.versionDefault = GeckoDriver.versionDefault; + this.versionCustom = this.versionDefault; + } + id() { + return GeckoDriver.id; + } + prefix() { + return 'geckodriver-'; + } + suffix() { + if (this.ostype === 'Windows_NT') { + return '.zip'; + } + else { + return '.tar.gz'; + } + } + getVersionList() { + if (this.alternativeDownloadUrl != null) { + return Promise.resolve([]); + } + else { + return this.configSource.getVersionList(); + } + } +} +GeckoDriver.id = 'gecko'; +GeckoDriver.isDefault = true; +GeckoDriver.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; +GeckoDriver.versionDefault = config_1.Config.binaryVersions().gecko; +GeckoDriver.suffixes = { + 'Darwin': { 'x64': '-macos.tar.gz' }, + 'Linux': { 'x64': '-linux64.tar.gz', 'ia32': '-linux32.tar.gz' }, + 'Windows_NT': { + 'x64': '-win64.zip', + 'ia32': '-win32.zip', + } +}; +exports.GeckoDriver = GeckoDriver; +//# sourceMappingURL=gecko_driver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map new file mode 100644 index 00000000..de1c3723 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"gecko_driver.js","sourceRoot":"","sources":["../../../lib/binaries/gecko_driver.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAC/C,+DAAwD;AASxD,iBAAyB,SAAQ,eAAM;IAcrC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,IAAI,uCAAiB,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;IACxB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,cAAc,CAAC;IACxB,CAAC;IAED,MAAM;QACJ,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,MAAM,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,cAAc;QACZ,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AA3CM,cAAE,GAAG,OAAO,CAAC;AACb,qBAAS,GAAG,IAAI,CAAC;AACjB,cAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,0BAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC;AACvC,oBAAQ,GAAc;IACnC,QAAQ,EAAE,EAAC,KAAK,EAAE,eAAe,EAAC;IAClC,OAAO,EAAE,EAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAC;IAC9D,YAAY,EAAE;QACZ,KAAK,EAAE,YAAY;QACnB,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAZJ,kCA6CC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts new file mode 100644 index 00000000..6f5df47d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts @@ -0,0 +1,14 @@ +import { BinaryUrl } from './binary'; +import { GithubApiConfigSource } from './config_source'; +export declare class GeckoDriverGithub extends GithubApiConfigSource { + constructor(); + getUrl(version: string): Promise; + getVersionList(): Promise; + getVersionsLookup(): Promise>; + private getLatestGeckoDriverVersion(); + private getSpecificGeckoDrierVersion(inputVersion); + private oshelper(); +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js new file mode 100644 index 00000000..8e45c751 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js @@ -0,0 +1,93 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const semver = require("semver"); +const config_source_1 = require("./config_source"); +class GeckoDriverGithub extends config_source_1.GithubApiConfigSource { + constructor() { + super('gecko', 'https://api.github.com/repos/mozilla/geckodriver/releases'); + } + getUrl(version) { + if (version === 'latest') { + return this.getLatestGeckoDriverVersion(); + } + else { + return this.getSpecificGeckoDrierVersion(version); + } + } + getVersionList() { + return this.getJson().then(json => { + let versions = []; + for (let i = 0; i < json.length; i++) { + let item = json[i]; + versions.push(item.tag_name); + } + return versions; + }); + } + getVersionsLookup() { + return this.getJson().then(json => { + let versionsLookup = []; + for (let i = 0; i < json.length; i++) { + let item = json[i]; + let index = i.toString(); + versionsLookup.push({ version: item.tag_name, index: index }); + } + return versionsLookup; + }); + } + getLatestGeckoDriverVersion() { + return this.getJson().then(json => { + return this.getVersionsLookup().then(versionsLookup => { + let latest = ''; + for (let item of versionsLookup) { + let version = item.version.replace('v', ''); + let assetsArray = json[item.index].assets; + // check to make sure the version found has the OS + for (let asset of assetsArray) { + if (asset.name.includes(this.oshelper())) { + if (latest === '') { + latest = version; + } + else if (semver.lt(latest, version)) { + latest = version; + } + } + } + } + return this.getSpecificGeckoDrierVersion('v' + latest); + }); + }); + } + getSpecificGeckoDrierVersion(inputVersion) { + return this.getJson().then(json => { + return this.getVersionsLookup().then(versionsLookup => { + for (let item of versionsLookup) { + // Get the asset from the matching version. + if (item.version === inputVersion) { + let assetsArray = json[item.index].assets; + for (let asset of assetsArray) { + if (asset.name.includes(this.oshelper())) { + return { url: asset.browser_download_url, version: inputVersion }; + } + } + } + } + return null; + }); + }); + } + oshelper() { + // Get the os type name. + if (this.ostype === 'Darwin') { + return 'macos'; + } + else if (this.ostype === 'Windows_NT') { + return this.osarch === 'x64' ? 'win64' : 'win32'; + } + else { + return this.osarch === 'x64' ? 'linux64' : 'linux32'; + } + } +} +exports.GeckoDriverGithub = GeckoDriverGithub; +//# sourceMappingURL=gecko_driver_github.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map new file mode 100644 index 00000000..9c2d52ed --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map @@ -0,0 +1 @@ +{"version":3,"file":"gecko_driver_github.js","sourceRoot":"","sources":["../../../lib/binaries/gecko_driver_github.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAKjC,mDAAsD;AAEtD,uBAA+B,SAAQ,qCAAqB;IAC1D;QACE,KAAK,CAAC,OAAO,EAAE,2DAA2D,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC;QAC5C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI;YAC7B,IAAI,QAAQ,GAAa,EAAE,CAAC;YAC5B,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACrC,IAAI,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACnB,QAAQ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ACd,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,QAAQ;QACd,wBAAwB;QACxB,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC7B,MAAM,CAAC,OAAO,CAAC;QACjB,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;QACnD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;QACvD,CAAC;IACH,CAAC;CACF;AAzFD,8CAyFC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts new file mode 100644 index 00000000..874c5534 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts @@ -0,0 +1,13 @@ +import { Binary, OS } from './binary'; +export declare class IEDriver extends Binary { + static id: string; + static isDefault32: boolean; + static isDefault64: boolean; + static os: OS[]; + static versionDefault: string; + constructor(opt_alternativeCdn?: string); + id(): string; + prefix(): string; + suffix(): string; + getVersionList(): Promise; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js new file mode 100644 index 00000000..fb45f7da --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const config_1 = require("../config"); +const binary_1 = require("./binary"); +const iedriver_xml_1 = require("./iedriver_xml"); +class IEDriver extends binary_1.Binary { + constructor(opt_alternativeCdn) { + super(opt_alternativeCdn || config_1.Config.cdnUrls().ie); + this.configSource = new iedriver_xml_1.IEDriverXml(); + this.name = 'IEDriverServer'; + this.versionDefault = IEDriver.versionDefault; + this.versionCustom = this.versionDefault; + } + id() { + return IEDriver.id; + } + prefix() { + return 'IEDriverServer'; + } + suffix() { + return '.zip'; + } + getVersionList() { + if (this.alternativeDownloadUrl != null) { + return Promise.resolve([]); + } + else { + return this.configSource.getVersionList(); + } + } +} +IEDriver.id = 'ie'; +IEDriver.isDefault32 = false; +IEDriver.isDefault64 = false; +IEDriver.os = [binary_1.OS.Windows_NT]; +IEDriver.versionDefault = config_1.Config.binaryVersions().ie; +exports.IEDriver = IEDriver; +//# sourceMappingURL=iedriver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map new file mode 100644 index 00000000..aaaa9a73 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iedriver.js","sourceRoot":"","sources":["../../../lib/binaries/iedriver.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAC/C,iDAA2C;AAE3C,cAAsB,SAAQ,eAAM;IAOlC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,YAAY,GAAG,IAAI,0BAAW,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;QAC9C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,gBAAgB,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AAhCM,WAAE,GAAG,IAAI,CAAC;AACV,oBAAW,GAAG,KAAK,CAAC;AACpB,oBAAW,GAAG,KAAK,CAAC;AACpB,WAAE,GAAG,CAAC,WAAE,CAAC,UAAU,CAAC,CAAC;AACrB,uBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC;AALrD,4BAkCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts new file mode 100644 index 00000000..7ab30ed8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts @@ -0,0 +1,9 @@ +import { BinaryUrl } from './binary'; +import { XmlConfigSource } from './config_source'; +export declare class IEDriverXml extends XmlConfigSource { + constructor(); + getUrl(version: string): Promise; + getVersionList(): Promise; + private getLatestIEDriverVersion(); + private getSpecificIEDriverVersion(inputVersion); +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js new file mode 100644 index 00000000..e9c0dffb --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const semver = require("semver"); +const config_1 = require("../config"); +const config_source_1 = require("./config_source"); +class IEDriverXml extends config_source_1.XmlConfigSource { + constructor() { + super('iedriver', config_1.Config.cdnUrls()['ie']); + } + getUrl(version) { + if (version === 'latest') { + return this.getLatestIEDriverVersion(); + } + else { + return this.getSpecificIEDriverVersion(version); + } + } + getVersionList() { + return this.getXml().then(xml => { + let versionPaths = []; + for (let content of xml.ListBucketResult.Contents) { + let contentKey = content.Key[0]; + // Filter For IEDriverServer win 32. Removing option to download x64 + if (contentKey.includes('IEDriverServer_Win32_')) { + versionPaths.push(contentKey); + } + } + return versionPaths; + }); + } + getLatestIEDriverVersion() { + return this.getVersionList().then(list => { + let latestVersion = null; + let latest = ''; + for (let item of list) { + // Get a semantic version. + let version = item.split('IEDriverServer_Win32_')[1].replace('.zip', ''); + if (latestVersion == null) { + // First time: use the version found. + latestVersion = version; + latest = item; + } + else if (semver.gt(version, latestVersion)) { + // Get the latest. + latestVersion = version; + latest = item; + } + } + return { url: config_1.Config.cdnUrls().ie + latest, version: latestVersion }; + }); + } + getSpecificIEDriverVersion(inputVersion) { + return this.getVersionList().then(list => { + let itemFound = ''; + for (let item of list) { + // Get a semantic version. + let version = item.split('IEDriverServer_Win32_')[1].replace('.zip', ''); + // Check to see if the specified version matches. + let firstPath = item.split('/')[0]; + if (version === inputVersion) { + return { url: config_1.Config.cdnUrls().ie + item, version: version }; + } + } + return { url: '', version: inputVersion }; + }); + } +} +exports.IEDriverXml = IEDriverXml; +//# sourceMappingURL=iedriver_xml.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map new file mode 100644 index 00000000..678ec8cd --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iedriver_xml.js","sourceRoot":"","sources":["../../../lib/binaries/iedriver_xml.ts"],"names":[],"mappings":";;AAAA,iCAAi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ACH,CAAC;YACD,MAAM,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApED,kCAoEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts new file mode 100644 index 00000000..70c3d9b8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts @@ -0,0 +1,7 @@ +export * from './android_sdk'; +export * from './appium'; +export * from './binary'; +export * from './chrome_driver'; +export * from './gecko_driver'; +export * from './iedriver'; +export * from './standalone'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js new file mode 100644 index 00000000..d65b865e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js @@ -0,0 +1,13 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./android_sdk")); +__export(require("./appium")); +__export(require("./binary")); +__export(require("./chrome_driver")); +__export(require("./gecko_driver")); +__export(require("./iedriver")); +__export(require("./standalone")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map new file mode 100644 index 00000000..a47d9b2a --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/binaries/index.ts"],"names":[],"mappings":";;;;;AAAA,mCAA8B;AAC9B,8BAAyB;AACzB,8BAAyB;AACzB,qCAAgC;AAChC,oCAA+B;AAC/B,gCAA2B;AAC3B,kCAA6B"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts new file mode 100644 index 00000000..470c0a58 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts @@ -0,0 +1,13 @@ +import { Binary, OS } from './binary'; +export declare class Standalone extends Binary { + static id: string; + static isDefault: boolean; + static os: OS[]; + static versionDefault: string; + constructor(opt_alternativeCdn?: string); + id(): string; + prefix(): string; + suffix(): string; + executableSuffix(): string; + getVersionList(): Promise; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js new file mode 100644 index 00000000..b110a0c4 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const config_1 = require("../config"); +const binary_1 = require("./binary"); +const standalone_xml_1 = require("./standalone_xml"); +class Standalone extends binary_1.Binary { + constructor(opt_alternativeCdn) { + super(opt_alternativeCdn || config_1.Config.cdnUrls().selenium); + this.configSource = new standalone_xml_1.StandaloneXml(); + this.name = 'selenium standalone'; + this.versionDefault = Standalone.versionDefault; + this.versionCustom = this.versionDefault; + } + id() { + return Standalone.id; + } + prefix() { + return 'selenium-server-standalone-'; + } + suffix() { + return '.jar'; + } + executableSuffix() { + return '.jar'; + } + getVersionList() { + // If an alternative cdn is set, return an empty list. + if (this.alternativeDownloadUrl != null) { + return Promise.resolve([]); + } + else { + return this.configSource.getVersionList(); + } + } +} +Standalone.id = 'standalone'; +Standalone.isDefault = true; +Standalone.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; +Standalone.versionDefault = config_1.Config.binaryVersions().selenium; +exports.Standalone = Standalone; +//# sourceMappingURL=standalone.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map new file mode 100644 index 00000000..d33fcc5d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map @@ -0,0 +1 @@ +{"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../../lib/binaries/standalone.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAE/C,qDAA+C;AAE/C,gBAAwB,SAAQ,eAAM;IAMpC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,IAAI,8BAAa,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,6BAA6B,CAAC;IACvC,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,gBAAgB;QACd,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,sDAAsD;QACtD,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AApCM,aAAE,GAAG,YAAY,CAAC;AAClB,oBAAS,GAAG,IAAI,CAAC;AACjB,aAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,yBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC;AAJ3D,gCAsCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts new file mode 100644 index 00000000..65545d3f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts @@ -0,0 +1,9 @@ +import { BinaryUrl } from './binary'; +import { XmlConfigSource } from './config_source'; +export declare class StandaloneXml extends XmlConfigSource { + constructor(); + getUrl(version: string): Promise; + getVersionList(): Promise; + private getLatestStandaloneVersion(); + private getSpecificStandaloneVersion(inputVersion); +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js new file mode 100644 index 00000000..45c2c4bc --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js @@ -0,0 +1,89 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const semver = require("semver"); +const config_1 = require("../config"); +const config_source_1 = require("./config_source"); +class StandaloneXml extends config_source_1.XmlConfigSource { + constructor() { + super('standalone', config_1.Config.cdnUrls()['selenium']); + } + getUrl(version) { + if (version === 'latest') { + return this.getLatestStandaloneVersion(); + } + else { + return this.getSpecificStandaloneVersion(version); + } + } + getVersionList() { + return this.getXml().then(xml => { + let versionPaths = []; + for (let content of xml.ListBucketResult.Contents) { + let contentKey = content.Key[0]; + // Filter the selenium-server-standalone. + if (contentKey.includes('selenium-server-standalone')) { + versionPaths.push(contentKey); + } + } + return versionPaths; + }); + } + getLatestStandaloneVersion() { + return this.getVersionList().then(list => { + let standaloneVersion = null; + let latest = ''; + let latestVersion = ''; + // Use jar files that are not beta and not alpha versions. + const jarList = list.filter((i) => { + return i.endsWith('.jar') && !i.includes('beta') && !i.includes('alpha'); + }); + for (let item of jarList) { + // Get a semantic version. + let version = item.split('selenium-server-standalone-')[1].replace('.jar', ''); + if (standaloneVersion == null) { + // First time: use the version found. + standaloneVersion = version; + latest = item; + latestVersion = version; + } + else if (semver.gt(version, standaloneVersion)) { + // Get the latest. + standaloneVersion = version; + latest = item; + latestVersion = version; + } + } + return { url: config_1.Config.cdnUrls().selenium + latest, version: latestVersion }; + }); + } + getSpecificStandaloneVersion(inputVersion) { + return this.getVersionList().then(list => { + let itemFound = ''; + let standaloneVersion = null; + for (let item of list) { + // Get a semantic version. + let version = item.split('selenium-server-standalone-')[1].replace('.jar', ''); + // Check to see if the specified version matches. + let firstPath = item.split('/')[0]; + if (version === inputVersion) { + // Check if the beta exists that we have the right version + // Example: We will see that beta3 appears in the file and path + // 3.0-beta3/selenium-server-standalone-3.0.0-beta3.jar + // where this should not work: + // 3.0-beta2/selenium-server-standalone-3.0.0-beta3.jar + if (inputVersion.includes('beta')) { + let betaInputVersion = inputVersion.replace('.jar', '').split('beta')[1]; + if (item.split('/')[0].includes('beta' + betaInputVersion)) { + return { url: config_1.Config.cdnUrls().selenium + item, version: version }; + } + } + else { + return { url: config_1.Config.cdnUrls().selenium + item, version: version }; + } + } + } + }); + } +} +exports.StandaloneXml = StandaloneXml; +//# sourceMappingURL=standalone_xml.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map new file mode 100644 index 00000000..4bb727ff --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"standalone_xml.js","sourceRoot":"","sources":["../../../lib/binaries/standalone_xml.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,sCAAiC;AAGjC,mDAAgD;AAEh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AAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAE/E,iDAAiD;gBACjD,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnC,EAAE,CAAC,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC;oBAC7B,0DAA0D;oBAC1D,+DAA+D;oBAC/D,uDAAuD;oBACvD,8BAA8B;oBAC9B,uDAAuD;oBACvD,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;wBAClC,IAAI,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;wBACzE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;4BAC3D,MAAM,CAAC,EAAC,GAAG,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC;wBACnE,CAAC;oBACH,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,MAAM,CAAC,EAAC,GAAG,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC;oBACnE,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAtFD,sCAsFC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts new file mode 100644 index 00000000..e4e19e9c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts @@ -0,0 +1,57 @@ +import { Options } from './options'; +import { Program, Programs } from './programs'; +/** + * The Cli contains the usage and the collection of programs. + * + * Printing help for all the programs in the following order: + * usage, commands, and options. If the options are used in multiple programs, + * it will list it once. + */ +export declare class Cli { + programs: Programs; + usageText: string; + version: string; + /** + * Register a program to the command line interface. + * @returns The cli for method chaining. + */ + program(prog: Program): Cli; + /** + * Add a usage for the command line interface. + * @returns The cli for method chaining. + */ + usage(usageText: string): Cli; + /** + * Prints help for the programs registered to the cli. + */ + printHelp(): void; + /** + * For commands, gets the position where the description should start so they + * are aligned. + * @returns The position where the command description should start. + */ + posCmdDescription(): number; + /** + * For options, gets the position where the description should start so they + * are aligned. + * @returns The position where the option description should start. + */ + posDescription(): number; + /** + * For options, get the position where the default values should start so they + * are aligned. + * @returns The position where the option default values should start. + */ + posDefault(): number; + /** + * Go through all programs and add options to the collection. + * @returns The options used in the programs. + */ + getOptions(): Options; + /** + * Get the options used by the programs and create the minimist options + * to ensure that minimist parses the values properly. + * @returns The options for minimist. + */ + getMinimistOptions(): Object; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js new file mode 100644 index 00000000..f68cede5 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js @@ -0,0 +1,136 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * The Cli contains the usage and the collection of programs. + * + * Printing help for all the programs in the following order: + * usage, commands, and options. If the options are used in multiple programs, + * it will list it once. + */ +class Cli { + constructor() { + this.programs = {}; + } + /** + * Register a program to the command line interface. + * @returns The cli for method chaining. + */ + program(prog) { + this.programs[prog.cmd] = prog; + return this; + } + /** + * Add a usage for the command line interface. + * @returns The cli for method chaining. + */ + usage(usageText) { + this.usageText = usageText; + return this; + } + /** + * Prints help for the programs registered to the cli. + */ + printHelp() { + console.log('Usage: ' + this.usageText); + console.log('\nCommands:'); + let cmdDescriptionPos = this.posCmdDescription(); + for (let cmd in this.programs) { + let prog = this.programs[cmd]; + prog.printCmd(cmdDescriptionPos); + } + let descriptionPos = this.posDescription(); + let defaultPos = this.posDefault(); + let extOptions = {}; + console.log('\nOptions:'); + // print all options + for (let cmd in this.programs) { + let prog = this.programs[cmd]; + prog.printOptions(descriptionPos, defaultPos, extOptions); + } + } + /** + * For commands, gets the position where the description should start so they + * are aligned. + * @returns The position where the command description should start. + */ + posCmdDescription() { + let position = -1; + for (let cmd in this.programs) { + position = Math.max(position, cmd.length + 6); + } + return position; + } + /** + * For options, gets the position where the description should start so they + * are aligned. + * @returns The position where the option description should start. + */ + posDescription() { + let position = -1; + for (let cmd in this.programs) { + let prog = this.programs[cmd]; + position = Math.max(position, prog.posDescription()); + } + return position; + } + /** + * For options, get the position where the default values should start so they + * are aligned. + * @returns The position where the option default values should start. + */ + posDefault() { + let position = -1; + for (let cmd in this.programs) { + let prog = this.programs[cmd]; + position = Math.max(position, prog.posDefault()); + } + return position; + } + /** + * Go through all programs and add options to the collection. + * @returns The options used in the programs. + */ + getOptions() { + let allOptions = {}; + for (let cmd in this.programs) { + let prog = this.programs[cmd]; + allOptions = prog.getOptions_(allOptions); + } + return allOptions; + } + /** + * Get the options used by the programs and create the minimist options + * to ensure that minimist parses the values properly. + * @returns The options for minimist. + */ + getMinimistOptions() { + let allOptions = this.getOptions(); + let minimistOptions = {}; + let minimistBoolean = []; + let minimistString = []; + let minimistNumber = []; + let minimistDefault = {}; + for (let opt in allOptions) { + let option = allOptions[opt]; + if (option.type === 'boolean') { + minimistBoolean.push(option.opt); + } + else if (option.type === 'string') { + minimistString.push(option.opt); + } + else if (option.type === 'number') { + minimistNumber.push(option.opt); + } + if (typeof option.defaultValue !== 'undefined') { + minimistDefault[option.opt] = option.defaultValue; + } + } + minimistOptions['boolean'] = minimistBoolean; + minimistOptions['string'] = minimistString; + minimistOptions['number'] = minimistNumber; + minimistOptions['default'] = minimistDefault; + return minimistOptions; + } +} +exports.Cli = Cli; +//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map new file mode 100644 index 00000000..d93df787 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../lib/cli/cli.ts"],"names":[],"mappings":";;AAUA;;;;;;GAMG;AACH;IAAA;QACE,aAAQ,GAAa,EAAE,CAAC;IAiI1B,CAAC;IA7HC;;;OAGG;IACH,OAAO,CAAC,IAAa;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAiB;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC3B,IAAI,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACjD,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC9B,IAAI,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC9B,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3C,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACnC,IAAI,UAAU,GAAY,EAAE,CAAC;QAC7B,OAAO,CAAC,G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AC,GAAG,CAAC,CAAC;YAClC,CAAC;YACD,EAAE,CAAC,CAAC,OAAO,MAAM,CAAC,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC/C,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;YACpD,CAAC;QACH,CAAC;QACD,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;QAC7C,eAAe,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAC3C,eAAe,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAC3C,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC;IACzB,CAAC;CACF;AAlID,kBAkIC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts new file mode 100644 index 00000000..3b0816a3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts @@ -0,0 +1,4 @@ +export * from './cli'; +export * from './options'; +export * from './programs'; +export * from './logger'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js new file mode 100644 index 00000000..16c66275 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js @@ -0,0 +1,10 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./cli")); +__export(require("./options")); +__export(require("./programs")); +__export(require("./logger")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map new file mode 100644 index 00000000..69a8ff79 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/cli/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAAsB;AACtB,+BAA0B;AAC1B,gCAA2B;AAC3B,8BAAyB"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts new file mode 100644 index 00000000..6e028f3f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts @@ -0,0 +1,95 @@ +export declare enum LogLevel { + ERROR = 0, + WARN = 1, + INFO = 2, + DEBUG = 3, +} +export declare enum WriteTo { + CONSOLE = 0, + FILE = 1, + BOTH = 2, + NONE = 3, +} +/** + * Logger class adds timestamp output, log levels, and identifiers to help + * when debugging. Also could write to console, file, both, or none. + */ +export declare class Logger { + private id; + static logLevel: LogLevel; + static showTimestamp: boolean; + static showId: boolean; + static writeTo: WriteTo; + static fd: any; + static firstWrite: boolean; + /** + * Set up the write location. If writing to a file, get the file descriptor. + * @param writeTo The enum for where to write the logs. + * @param opt_logFile An optional parameter to override the log file location. + */ + static setWrite(writeTo: WriteTo, opt_logFile?: string): void; + /** + * Creates a logger instance with an ID for the logger. + * @constructor + */ + constructor(id: string); + /** + * Log INFO + * @param ...msgs multiple arguments to be logged. + */ + info(...msgs: any[]): void; + /** + * Log DEBUG + * @param ...msgs multiple arguments to be logged. + */ + debug(...msgs: any[]): void; + /** + * Log WARN + * @param ...msgs multiple arguments to be logged. + */ + warn(...msgs: any[]): void; + /** + * Log ERROR + * @param ...msgs multiple arguments to be logged. + */ + error(...msgs: any[]): void; + /** + * For the log level set, check to see if the messages should be logged. + * @param logLevel The log level of the message. + * @param msgs The messages to be logged + */ + log_(logLevel: LogLevel, msgs: any[]): void; + /** + * Format with timestamp, log level, identifier, and message and log to + * specified medium (console, file, both, none). + * @param logLevel The log level of the message. + * @param msgs The messages to be logged. + */ + print_(logLevel: LogLevel, msgs: any[]): void; + /** + * Get a timestamp formatted with [hh:mm:ss] + * @param writeTo The enum for where to write the logs. + * @return The string of the formatted timestamp + */ + static timestamp_(writeTo: WriteTo): string; + /** + * Get the identifier of the logger as '/' + * @param logLevel The log level of the message. + * @param writeTo The enum for where to write the logs. + * @return The string of the formatted id + */ + static id_(logLevel: LogLevel, id: string, writeTo: WriteTo): string; + /** + * Get the log level formatted with the first letter. For info, it is I. + * @param logLevel The log level of the message. + * @param writeTo The enum for where to write the logs. + * @return The string of the formatted log level + */ + static level_(logLevel: LogLevel, id: string, writeTo: WriteTo): string; + /** + * Convert the list of messages to a single string message. + * @param msgs The list of messages. + * @return The string of the formatted messages + */ + static msgToFile_(msgs: any[]): string; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js new file mode 100644 index 00000000..4fec851b --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js @@ -0,0 +1,264 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const path = require("path"); +// Will use chalk if chalk is available to add color to console logging +let chalk; +let printRed; +let printYellow; +let printGray; +try { + chalk = require('chalk'); + printRed = chalk.red; + printYellow = chalk.yellow; + printGray = chalk.gray; +} +catch (e) { + printRed = printYellow = printGray = (msg) => { + return msg; + }; +} +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["ERROR"] = 0] = "ERROR"; + LogLevel[LogLevel["WARN"] = 1] = "WARN"; + LogLevel[LogLevel["INFO"] = 2] = "INFO"; + LogLevel[LogLevel["DEBUG"] = 3] = "DEBUG"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +var WriteTo; +(function (WriteTo) { + WriteTo[WriteTo["CONSOLE"] = 0] = "CONSOLE"; + WriteTo[WriteTo["FILE"] = 1] = "FILE"; + WriteTo[WriteTo["BOTH"] = 2] = "BOTH"; + WriteTo[WriteTo["NONE"] = 3] = "NONE"; +})(WriteTo = exports.WriteTo || (exports.WriteTo = {})); +let logFile = 'webdriver.log'; // the default log file name +/** + * Logger class adds timestamp output, log levels, and identifiers to help + * when debugging. Also could write to console, file, both, or none. + */ +class Logger { + /** + * Creates a logger instance with an ID for the logger. + * @constructor + */ + constructor(id) { + this.id = id; + } + /** + * Set up the write location. If writing to a file, get the file descriptor. + * @param writeTo The enum for where to write the logs. + * @param opt_logFile An optional parameter to override the log file location. + */ + static setWrite(writeTo, opt_logFile) { + if (opt_logFile) { + logFile = opt_logFile; + } + Logger.writeTo = writeTo; + if (Logger.writeTo == WriteTo.FILE || Logger.writeTo == WriteTo.BOTH) { + Logger.fd = fs.openSync(path.resolve(logFile), 'a'); + Logger.firstWrite = false; + } + } + /** + * Log INFO + * @param ...msgs multiple arguments to be logged. + */ + info(...msgs) { + this.log_(LogLevel.INFO, msgs); + } + /** + * Log DEBUG + * @param ...msgs multiple arguments to be logged. + */ + debug(...msgs) { + this.log_(LogLevel.DEBUG, msgs); + } + /** + * Log WARN + * @param ...msgs multiple arguments to be logged. + */ + warn(...msgs) { + this.log_(LogLevel.WARN, msgs); + } + /** + * Log ERROR + * @param ...msgs multiple arguments to be logged. + */ + error(...msgs) { + this.log_(LogLevel.ERROR, msgs); + } + /** + * For the log level set, check to see if the messages should be logged. + * @param logLevel The log level of the message. + * @param msgs The messages to be logged + */ + log_(logLevel, msgs) { + switch (Logger.logLevel) { + case LogLevel.ERROR: + if (logLevel <= LogLevel.ERROR) { + this.print_(logLevel, msgs); + } + break; + case LogLevel.WARN: + if (logLevel <= LogLevel.WARN) { + this.print_(logLevel, msgs); + } + break; + case LogLevel.INFO: + if (logLevel <= LogLevel.INFO) { + this.print_(logLevel, msgs); + } + break; + case LogLevel.DEBUG: + if (logLevel <= LogLevel.DEBUG) { + this.print_(logLevel, msgs); + } + break; + default: + throw new Error('Log level undefined'); + } + } + /** + * Format with timestamp, log level, identifier, and message and log to + * specified medium (console, file, both, none). + * @param logLevel The log level of the message. + * @param msgs The messages to be logged. + */ + print_(logLevel, msgs) { + let consoleLog = ''; + let fileLog = ''; + if (Logger.showTimestamp) { + consoleLog += Logger.timestamp_(WriteTo.CONSOLE); + fileLog += Logger.timestamp_(WriteTo.FILE); + } + consoleLog += Logger.level_(logLevel, this.id, WriteTo.CONSOLE); + fileLog += Logger.level_(logLevel, this.id, WriteTo.FILE); + if (Logger.showId) { + consoleLog += Logger.id_(logLevel, this.id, WriteTo.CONSOLE); + fileLog += Logger.id_(logLevel, this.id, WriteTo.FILE); + } + consoleLog += ' -'; + fileLog += ' - '; + switch (Logger.writeTo) { + case WriteTo.CONSOLE: + msgs.unshift(consoleLog); + console.log.apply(console, msgs); + break; + case WriteTo.FILE: + // for the first line written to the file, add a space + if (!Logger.firstWrite) { + fs.writeSync(Logger.fd, '\n'); + Logger.firstWrite = true; + } + fileLog += ' ' + Logger.msgToFile_(msgs); + fs.writeSync(Logger.fd, fileLog + '\n'); + break; + case WriteTo.BOTH: + // for the first line written to the file, add a space + if (!Logger.firstWrite) { + fs.writeSync(Logger.fd, '\n'); + Logger.firstWrite = true; + } + fileLog += ' ' + Logger.msgToFile_(msgs); + fs.writeSync(Logger.fd, fileLog + '\n'); + msgs.unshift(consoleLog); + console.log.apply(console, msgs); + break; + case WriteTo.NONE: + break; + } + } + /** + * Get a timestamp formatted with [hh:mm:ss] + * @param writeTo The enum for where to write the logs. + * @return The string of the formatted timestamp + */ + static timestamp_(writeTo) { + let d = new Date(); + let ts = '['; + let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours(); + let minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes(); + let seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(); + if (writeTo == WriteTo.CONSOLE) { + ts += printGray(hours + ':' + minutes + ':' + seconds) + ']'; + } + else { + ts += hours + ':' + minutes + ':' + seconds + ']'; + } + ts += ' '; + return ts; + } + /** + * Get the identifier of the logger as '/' + * @param logLevel The log level of the message. + * @param writeTo The enum for where to write the logs. + * @return The string of the formatted id + */ + static id_(logLevel, id, writeTo) { + let level = LogLevel[logLevel].toString(); + if (writeTo === WriteTo.FILE) { + return '/' + id; + } + else if (logLevel === LogLevel.ERROR) { + return printRed('/' + id); + } + else if (logLevel === LogLevel.WARN) { + return printYellow('/' + id); + } + else { + return '/' + id; + } + } + /** + * Get the log level formatted with the first letter. For info, it is I. + * @param logLevel The log level of the message. + * @param writeTo The enum for where to write the logs. + * @return The string of the formatted log level + */ + static level_(logLevel, id, writeTo) { + let level = LogLevel[logLevel].toString(); + if (writeTo === WriteTo.FILE) { + return level[0]; + } + else if (logLevel === LogLevel.ERROR) { + return printRed(level[0]); + } + else if (logLevel === LogLevel.WARN) { + return printYellow(level[0]); + } + else { + return level[0]; + } + } + /** + * Convert the list of messages to a single string message. + * @param msgs The list of messages. + * @return The string of the formatted messages + */ + static msgToFile_(msgs) { + let log = ''; + for (let pos = 0; pos < msgs.length; pos++) { + let msg = msgs[pos]; + let ret; + if (typeof msg === 'object') { + ret = JSON.stringify(msg); + } + else { + ret = msg; + } + if (pos !== msgs.length - 1) { + ret += ' '; + } + log += ret; + } + return log; + } +} +Logger.logLevel = LogLevel.INFO; +Logger.showTimestamp = true; +Logger.showId = true; +Logger.writeTo = WriteTo.CONSOLE; +Logger.firstWrite = false; +exports.Logger = Logger; +//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map new file mode 100644 index 00000000..059e34a9 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../lib/cli/logger.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,uEAAuE;AACvE,IAAI,KAAU,CAAC;AACf,IAAI,QAAkB,CAAC;AACvB,IA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,KAAK,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAW;QAC3B,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;YAC3C,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACpB,IAAI,GAAQ,CAAC;YACb,EAAE,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC5B,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC5B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,GAAG,GAAG,GAAG,CAAC;YACZ,CAAC;YACD,EAAE,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC5B,GAAG,IAAI,GAAG,CAAC;YACb,CAAC;YACD,GAAG,IAAI,GAAG,CAAC;QACb,CAAC;QACD,MAAM,CAAC,GAAG,CAAC;IACb,CAAC;;AAjOM,eAAQ,GAAa,QAAQ,CAAC,IAAI,CAAC;AACnC,oBAAa,GAAY,IAAI,CAAC;AAC9B,aAAM,GAAY,IAAI,CAAC;AACvB,cAAO,GAAY,OAAO,CAAC,OAAO,CAAC;AAEnC,iBAAU,GAAY,KAAK,CAAC;AANrC,wBAmOC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts new file mode 100644 index 00000000..52c57eb8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts @@ -0,0 +1,22 @@ +export interface MinimistArgs { + [opt: string]: string[]; +} +export interface Args { + [opt: string]: number | string | boolean; +} +export interface Options { + [opt: string]: Option; +} +export declare class Option { + opt: string; + description: string; + type: string; + defaultValue: number | string | boolean; + value: number | string | boolean; + constructor(opt: string, description: string, type: string, defaultValue?: number | string | boolean); + getValue_(): number | string | boolean; + getNumber(): number; + getString(): string; + getBoolean(): boolean; +} +export declare function unparseOptions(options: Options): string[]; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js new file mode 100644 index 00000000..ad0ef13e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class Option { + constructor(opt, description, type, defaultValue) { + this.opt = opt; + this.description = description; + this.type = type; + if (defaultValue != null) { + this.defaultValue = defaultValue; + } + } + getValue_() { + if (typeof this.value !== 'undefined') { + return this.value; + } + else { + return this.defaultValue; + } + } + getNumber() { + let value = this.getValue_(); + if (value != null && (typeof value === 'number' || typeof value === 'string')) { + return +value; + } + else { + return null; + } + } + getString() { + let value = this.getValue_(); + if (value != null) { + return '' + this.getValue_(); + } + else { + return ''; + } + } + getBoolean() { + let value = this.getValue_(); + if (value != null) { + if (typeof value === 'string') { + return !(value === '0' || value === 'false'); + } + else if (typeof value === 'number') { + return value !== 0; + } + else { + return value; + } + } + return false; + } +} +exports.Option = Option; +function unparseOptions(options) { + var args = []; + for (let name in options) { + let value = options[name].getValue_(); + if (value !== options[name].defaultValue) { + args.push('--' + name, '' + value); + } + } + return args; +} +exports.unparseOptions = unparseOptions; +; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map new file mode 100644 index 00000000..706fcef0 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../lib/cli/options.ts"],"names":[],"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CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;YAClB,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAC9B,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC;YAC/C,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACrC,MAAM,CAAC,KAAK,KAAK,CAAC,CAAC;YACrB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;CACF;AAxDD,wBAwDC;AAED,wBAA+B,OAAgB;IAC7C,IAAI,IAAI,GAAa,EAAE,CAAC;IACxB,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC;QACzB,IAAI,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;QACtC,EAAE,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,MAAM,CAAC,IAAI,CAAC;AACd,CAAC;AATD,wCASC;AAAA,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts new file mode 100644 index 00000000..e6e00687 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts @@ -0,0 +1,93 @@ +import { MinimistArgs, Option, Options } from './options'; +/** + * Dictionary that maps the command and the program. + */ +export interface Programs { + [cmd: string]: Program; +} +/** + * A program has a command, a description, options, and a run method + */ +export declare class Program { + static MIN_SPACING: number; + cmd: string; + cmdDescription: string; + options: Options; + runMethod: Function; + helpDescription: string; + version: string; + /** + * Register a command and the description. + * @param cmd The command. + * @param cmdDescription The description of the command. + * @returns The program for method chaining. + */ + command(cmd: string, cmdDescription: string): Program; + /** + * Register a new option. + * @param opt The option. + * @param description The description of the option. + * @param type The type of value expected: boolean, number, or string + * @param defaultValue The option's default value. + * @returns The program for method chaining. + */ + option(opt: string, description: string, type: string, opt_defaultValue?: number | string | boolean): Program; + /** + * Adds an option to the program. + * @param option The option. + * @returns The program for method chaining. + */ + addOption(option: Option): Program; + /** + * Registers a method that will be used to run the program. + * @param runMethod The method that will be used to run the program. + * @returns The program for method chaining. + */ + action(runMethod: Function): Program; + /** + * Adds the value to the options and passes the updated options to the run + * method. + * @param args The arguments that will be parsed to run the method. + */ + run(json: JSON): Promise; + private getValue_(key, json); + /** + * Prints the command with the description. The description will have spaces + * between the cmd so that the starting position is "posDescription". If the + * gap between the cmd and the description is less than MIN_SPACING or + * posDescription is undefined, the spacing will be MIN_SPACING. + * + * @param opt_postDescription Starting position of the description. + */ + printCmd(opt_posDescription?: number): void; + /** + * Prints the options with the option descriptions and default values. + * The posDescription and posDefault is the starting position for the option + * description. If extOptions are provided, check to see if we have already + * printed those options. Also, once we print the option, add them to the extOptions. + * + * @param posDescription Position to start logging the description. + * @param posDefault Position to start logging the default value. + * @param opt_extOptions A collection of options that will be updated. + */ + printOptions(posDescription: number, posDefault: number, opt_extOptions?: Options): void; + /** + * Assuming that the this program can run by itself, to print out the program's + * help. Also assuming that the commands are called cmd-run and cmd-help. + */ + printHelp(): void; + posDescription(): number; + posDefault(): number; + lengthOf_(param: string): number; + /** + * Create a collection of options used by this program. + * @returns The options used in the programs. + */ + getOptions_(allOptions: Options): Options; + /** + * Get the options used by the program and create the minimist options + * to ensure that minimist parses the values properly. + * @returns The options for minimist. + */ + getMinimistOptions(): MinimistArgs; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js new file mode 100644 index 00000000..5894c0b6 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js @@ -0,0 +1,226 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const options_1 = require("./options"); +/** + * A program has a command, a description, options, and a run method + */ +class Program { + constructor() { + this.options = {}; + } + /** + * Register a command and the description. + * @param cmd The command. + * @param cmdDescription The description of the command. + * @returns The program for method chaining. + */ + command(cmd, cmdDescription) { + this.cmd = cmd; + this.cmdDescription = cmdDescription; + return this; + } + /** + * Register a new option. + * @param opt The option. + * @param description The description of the option. + * @param type The type of value expected: boolean, number, or string + * @param defaultValue The option's default value. + * @returns The program for method chaining. + */ + option(opt, description, type, opt_defaultValue) { + this.options[opt] = new options_1.Option(opt, description, type, opt_defaultValue); + return this; + } + /** + * Adds an option to the program. + * @param option The option. + * @returns The program for method chaining. + */ + addOption(option) { + this.options[option.opt] = option; + return this; + } + /** + * Registers a method that will be used to run the program. + * @param runMethod The method that will be used to run the program. + * @returns The program for method chaining. + */ + action(runMethod) { + this.runMethod = runMethod; + return this; + } + /** + * Adds the value to the options and passes the updated options to the run + * method. + * @param args The arguments that will be parsed to run the method. + */ + run(json) { + for (let opt in this.options) { + this.options[opt].value = this.getValue_(opt, json); + } + return Promise.resolve(this.runMethod(this.options)); + } + getValue_(key, json) { + let keyList = key.split('.'); + let tempJson = json; + while (keyList.length > 0) { + let keyItem = keyList[0]; + if (tempJson[keyItem] != null) { + tempJson = tempJson[keyItem]; + keyList = keyList.slice(1); + } + else { + return undefined; + } + } + return tempJson; + } + /** + * Prints the command with the description. The description will have spaces + * between the cmd so that the starting position is "posDescription". If the + * gap between the cmd and the description is less than MIN_SPACING or + * posDescription is undefined, the spacing will be MIN_SPACING. + * + * @param opt_postDescription Starting position of the description. + */ + printCmd(opt_posDescription) { + let log = ' ' + this.cmd; + let spacing = Program.MIN_SPACING; + if (opt_posDescription) { + let diff = opt_posDescription - log.length; + if (diff < Program.MIN_SPACING) { + spacing = Program.MIN_SPACING; + } + else { + spacing = diff; + } + } + log += Array(spacing).join(' ') + this.cmdDescription; + console.log(log); + } + /** + * Prints the options with the option descriptions and default values. + * The posDescription and posDefault is the starting position for the option + * description. If extOptions are provided, check to see if we have already + * printed those options. Also, once we print the option, add them to the extOptions. + * + * @param posDescription Position to start logging the description. + * @param posDefault Position to start logging the default value. + * @param opt_extOptions A collection of options that will be updated. + */ + printOptions(posDescription, posDefault, opt_extOptions) { + for (let opt in this.options) { + // we have already logged it + if (opt_extOptions && opt_extOptions[opt]) { + continue; + } + let option = this.options[opt]; + let log = ' --' + option.opt; + let spacing = Program.MIN_SPACING; + // description + let diff = posDescription - log.length; + if (diff < Program.MIN_SPACING) { + spacing = Program.MIN_SPACING; + } + else { + spacing = diff; + } + log += Array(spacing).join(' ') + option.description; + // default value + if (option.defaultValue) { + spacing = Program.MIN_SPACING; + let diff = posDefault - log.length - 1; + if (diff <= Program.MIN_SPACING) { + spacing = Program.MIN_SPACING; + } + else { + spacing = diff; + } + log += Array(spacing).join(' '); + log += '[default: ' + option.defaultValue + ']'; + } + console.log(log); + if (opt_extOptions) { + opt_extOptions[option.opt] = option; + } + } + } + /** + * Assuming that the this program can run by itself, to print out the program's + * help. Also assuming that the commands are called cmd-run and cmd-help. + */ + printHelp() { + console.log('\n' + + 'Usage: ' + this.cmd + ' [options]\n' + + ' ' + this.cmd + ' help\n' + + 'Description: ' + this.cmdDescription + '\n'); + console.log('Options:'); + this.printOptions(this.posDescription(), this.posDefault()); + } + posDescription() { + return this.lengthOf_('opt') + 2 * Program.MIN_SPACING; + } + posDefault() { + return this.posDescription() + this.lengthOf_('description') + Program.MIN_SPACING; + } + lengthOf_(param) { + let maxLength = -1; + for (let opt in this.options) { + let option = this.options[opt]; + if (param === 'description') { + maxLength = Math.max(maxLength, option.description.length); + } + else if (param === 'opt') { + maxLength = Math.max(maxLength, option.opt.length); + } + } + return maxLength; + } + /** + * Create a collection of options used by this program. + * @returns The options used in the programs. + */ + getOptions_(allOptions) { + for (let opt in this.options) { + allOptions[opt] = this.options[opt]; + } + return allOptions; + } + /** + * Get the options used by the program and create the minimist options + * to ensure that minimist parses the values properly. + * @returns The options for minimist. + */ + getMinimistOptions() { + let allOptions = {}; + allOptions = this.getOptions_(allOptions); + let minimistOptions = {}; + let minimistBoolean = []; + let minimistString = []; + let minimistNumber = []; + let minimistDefault = {}; + for (let opt in allOptions) { + let option = allOptions[opt]; + if (option.type === 'boolean') { + minimistBoolean.push(option.opt); + } + else if (option.type === 'string') { + minimistString.push(option.opt); + } + else if (option.type === 'number') { + minimistNumber.push(option.opt); + } + if (typeof option.defaultValue !== 'undefined') { + minimistDefault[option.opt] = option.defaultValue; + } + } + minimistOptions['boolean'] = minimistBoolean; + minimistOptions['string'] = minimistString; + minimistOptions['number'] = minimistNumber; + minimistOptions['default'] = minimistDefault; + return minimistOptions; + } +} +Program.MIN_SPACING = 4; +exports.Program = Program; +//# sourceMappingURL=programs.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map new file mode 100644 index 00000000..74b20aee --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"programs.js","sourceRoot":"","sources":["../../../lib/cli/programs.ts"],"names":[],"mappings":";;AAEA,uCAA8D;AAQ9D;;GAEG;AACH;IAAA;QAIE,YAAO,GAAY,EAAE,CAAC;IAsOxB,CAAC;IAjOC;;;;;OAKG;IACH,OAAO,CAAC,GAAW,EAAE,cAAsB;QACzC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,GA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;YACpD,CAAC;QACH,CAAC;QACD,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;QAC7C,eAAe,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAC3C,eAAe,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAC3C,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC;IACzB,CAAC;;AAxOM,mBAAW,GAAW,CAAC,CAAC;AADjC,0BA0OC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts new file mode 100644 index 00000000..294ae6ff --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts @@ -0,0 +1,2 @@ +import { Cli } from './cli'; +export declare let cli: Cli; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js new file mode 100644 index 00000000..8b80e826 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const cli_1 = require("./cli"); +const clean = require("./cmds/clean"); +const shutdown = require("./cmds/shutdown"); +const start = require("./cmds/start"); +const status = require("./cmds/status"); +const update = require("./cmds/update"); +const version = require("./cmds/version"); +exports.cli = new cli_1.Cli() + .usage('webdriver-manager [options]') + .program(clean.program) + .program(start.program) + .program(shutdown.program) + .program(status.program) + .program(update.program) + .program(version.program); +//# sourceMappingURL=cli_instance.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map new file mode 100644 index 00000000..76942548 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cli_instance.js","sourceRoot":"","sources":["../../lib/cli_instance.ts"],"names":[],"mappings":";;AAAA,+BAA0B;AAC1B,sCAAsC;AACtC,4CAA4C;AAC5C,sCAAsC;AACtC,wCAAwC;AACxC,wCAAwC;AACxC,0CAA0C;AAE/B,QAAA,GAAG,GAAG,IAAI,SAAG,EAAE;KACJ,KAAK,CAAC,uCAAuC,CAAC;KAC9C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KACtB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;KACzB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;KACvB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;KACvB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts new file mode 100644 index 00000000..c837c34c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts @@ -0,0 +1,2 @@ +import { Program } from '../cli'; +export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js new file mode 100644 index 00000000..b3c53918 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const minimist = require("minimist"); +const path = require("path"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +const files_1 = require("../files"); +const Opt = require("./"); +const opts_1 = require("./opts"); +let prog = new cli_1.Program() + .command('clean', 'removes all downloaded driver files from the out_dir') + .action(clean) + .addOption(opts_1.Opts[Opt.OUT_DIR]); +exports.program = prog; +// stand alone runner +let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); +if (argv._[0] === 'clean-run') { + prog.run(JSON.parse(JSON.stringify(argv))); +} +else if (argv._[0] === 'clean-help') { + prog.printHelp(); +} +/** + * Parses the options and cleans the output directory of binaries. + * @param: options + */ +function clean(options) { + let outputDir = config_1.Config.getSeleniumDir(); + if (options[Opt.OUT_DIR].getString()) { + if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { + outputDir = options[Opt.OUT_DIR].getString(); + } + else { + outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); + } + } + files_1.FileManager.removeExistingFiles(outputDir); +} +//# sourceMappingURL=clean.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map new file mode 100644 index 00000000..5b0c67fe --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../../lib/cmds/clean.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AACrC,6BAA6B;AAE7B,gCAAwC;AACxC,sCAAiC;AACjC,oCAAqC;AAErC,0BAA0B;AAC1B,iCAA4B;AAE5B,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,OAAO,EAAE,sDAAsD,CAAC;KACxE,MAAM,CAAC,KAAK,CAAC;KACb,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AAElC,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACtE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,SAAS,EAAE,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,eAAe,OAAgB;IAC7B,IAAI,SAAS,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC;IACxC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACrC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;YACtD,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC;QAC/C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,eAAM,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IACD,mBAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts new file mode 100644 index 00000000..d6ee736f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts @@ -0,0 +1 @@ +export * from './opts'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js new file mode 100644 index 00000000..8ba6184e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./opts")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map new file mode 100644 index 00000000..59b3bd87 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/cmds/index.ts"],"names":[],"mappings":";;;;;AAAA,4BAAuB"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts new file mode 100644 index 00000000..22d9668c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts @@ -0,0 +1,3 @@ +import { Logger } from '../cli'; +export declare function android(sdkPath: string, apiLevels: string[], architectures: string[], platforms: string[], acceptLicenses: boolean, version: string, oldAVDs: string[], logger: Logger, verbose: boolean): void; +export declare function iOS(logger: Logger): void; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js new file mode 100644 index 00000000..231bd655 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js @@ -0,0 +1,244 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const child_process_1 = require("child_process"); +const fs = require("fs"); +const glob = require("glob"); +const ini = require("ini"); +const path = require("path"); +const q = require("q"); +const config_1 = require("../config"); +const utils_1 = require("../utils"); +const noop = () => { }; +// Make a function which configures a child process to automatically respond +// to a certain question +function respondFactory(question, answer, verbose) { + return (child) => { + child.stdin.setDefaultEncoding('utf-8'); + child.stdout.on('data', (data) => { + if (data != null) { + if (verbose) { + process.stdout.write(data); + } + if (data.toString().indexOf(question) != -1) { + child.stdin.write(answer + '\n'); + } + } + }); + }; +} +// Run a command on the android SDK +function runAndroidSDKCommand(sdkPath, cmd, args, stdio, config_fun) { + let child = utils_1.spawn(path.resolve(sdkPath, 'tools', 'android'), [cmd].concat(args), stdio); + if (config_fun) { + config_fun(child); + } + ; + let deferred = q.defer(); + child.on('exit', (code) => { + if (deferred != null) { + if (code) { + deferred.reject(code); + } + else { + deferred.resolve(); + } + deferred = null; + } + }); + child.on('error', (err) => { + if (deferred != null) { + deferred.reject(err); + deferred = null; + } + }); + return deferred.promise; +} +// Download updates via the android SDK +function downloadAndroidUpdates(sdkPath, targets, search_all, auto_accept, verbose) { + return runAndroidSDKCommand(sdkPath, 'update', ['sdk', '-u'].concat(search_all ? ['-a'] : []).concat(['-t', targets.join(',')]), auto_accept ? 'pipe' : 'inherit', auto_accept ? respondFactory('Do you accept the license', 'y', verbose) : noop); +} +// Setup hardware acceleration for x86-64 emulation +function setupHardwareAcceleration(sdkPath) { + // TODO(sjelin): linux setup + let toolDir = path.resolve(sdkPath, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager'); + if (config_1.Config.osType() == 'Darwin') { + console.log('Enabling hardware acceleration (requires root access)'); + // We don't need the wrapped spawnSync because we know we're on OSX + child_process_1.spawnSync('sudo', ['silent_install.sh'], { stdio: 'inherit', cwd: toolDir }); + } + else if (config_1.Config.osType() == 'Windows_NT') { + console.log('Enabling hardware acceleration (requires admin access)'); + // We don't need the wrapped spawnSync because we know we're on windows + child_process_1.spawnSync('silent_install.bat', [], { stdio: 'inherit', cwd: toolDir }); + } +} +// Get a list of all the SDK download targets for a given set of APIs, +// architectures, and platforms +function getAndroidSDKTargets(apiLevels, architectures, platforms, oldAVDs) { + function getSysImgTarget(architecture, platform, level) { + if (platform.toUpperCase() == 'DEFAULT') { + platform = 'android'; + } + return 'sys-img-' + architecture + '-' + platform + '-' + level; + } + let targets = apiLevels + .map((level) => { + return 'android-' + level; + }) + .concat(architectures.reduce((targets, architecture) => { + return targets.concat.apply(targets, platforms.map((platform) => { + return apiLevels.map(getSysImgTarget.bind(null, architecture, platform)); + })); + }, [])); + oldAVDs.forEach((name) => { + let avd = new AVDDescriptor(name); + if (targets.indexOf(avd.api) == -1) { + targets.push(avd.api); + } + let sysImgTarget = getSysImgTarget(avd.architecture, avd.platform, avd.api.slice('android-'.length)); + if (targets.indexOf(sysImgTarget) == -1) { + targets.push(sysImgTarget); + } + }); + return targets; +} +// All the information about an android virtual device +class AVDDescriptor { + constructor(api, platform, architecture) { + if (platform != undefined) { + this.api = api; + this.platform = platform; + this.architecture = architecture; + this.name = [api, platform, architecture].join('-'); + } + else { + this.name = api; + let nameParts = this.name.split('-'); + this.api = nameParts[0] + '-' + nameParts[1]; + if (/v[0-9]+[a-z]+/.test(nameParts[nameParts.length - 1]) && + (nameParts[nameParts.length - 2].slice(0, 3) == 'arm')) { + this.architecture = nameParts[nameParts.length - 2] + '-' + nameParts[nameParts.length - 1]; + } + else { + this.architecture = nameParts[nameParts.length - 1]; + } + this.platform = this.name.slice(this.api.length + 1, -this.architecture.length - 1); + } + this.abi = + (this.platform.toUpperCase() == 'DEFAULT' ? '' : this.platform + '/') + this.architecture; + } + avdName(version) { + return this.name + '-v' + version + '-wd-manager'; + } +} +// Gets the descriptors for all AVDs which are possible to make given the +// SDKs which were downloaded +function getAVDDescriptors(sdkPath) { + let deferred = q.defer(); + // `glob` package always prefers patterns to use `/` + glob('system-images/*/*/*', { cwd: sdkPath }, (err, files) => { + if (err) { + deferred.reject(err); + } + else { + deferred.resolve(files.map((file) => { + // `file` could use `/` or `\`, so we use `path.normalize` + let info = path.normalize(file).split(path.sep).slice(-3); + return new AVDDescriptor(info[0], info[1], info[2]); + })); + } + }); + return deferred.promise; +} +function sequentialForEach(array, func) { + let ret = q(null); + array.forEach((x) => { + ret = ret.then(() => { + return func(x); + }); + }); + return ret; +} +// Configures the hardware.ini file for a system image of a new AVD +function configureAVDHardware(sdkPath, desc) { + let file = path.resolve(sdkPath, 'system-images', desc.api, desc.platform, desc.architecture, 'hardware.ini'); + return q.nfcall(fs.stat, file) + .then((stats) => { + return q.nfcall(fs.readFile, file); + }, (err) => { + return q(''); + }) + .then((contents) => { + let config = ini.parse(contents.toString()); + config['hw.keyboard'] = 'yes'; + config['hw.battery'] = 'yes'; + config['hw.ramSize'] = 1024; + return q.nfcall(fs.writeFile, file, ini.stringify(config)); + }); +} +// Make an android virtual device +function makeAVD(sdkPath, desc, version, verbose) { + return runAndroidSDKCommand(sdkPath, 'delete', ['avd', '--name', desc.avdName(version)]) + .then(noop, noop) + .then(() => { + return runAndroidSDKCommand(sdkPath, 'create', ['avd', '--name', desc.avdName(version), '--target', desc.api, '--abi', desc.abi], 'pipe', respondFactory('Do you wish to create a custom hardware profile', 'no', verbose)); + }); +} +// Initialize the android SDK +function android(sdkPath, apiLevels, architectures, platforms, acceptLicenses, version, oldAVDs, logger, verbose) { + let avdDescriptors; + let tools = ['platform-tool', 'tool']; + if ((config_1.Config.osType() == 'Darwin') || (config_1.Config.osType() == 'Windows_NT')) { + tools.push('extra-intel-Hardware_Accelerated_Execution_Manager'); + } + logger.info('android-sdk: Downloading additional SDK updates'); + downloadAndroidUpdates(sdkPath, tools, false, acceptLicenses, verbose) + .then(() => { + return setupHardwareAcceleration(sdkPath); + }) + .then(() => { + logger.info('android-sdk: Downloading more additional SDK updates ' + + '(this may take a while)'); + return downloadAndroidUpdates(sdkPath, ['build-tools-24.0.0'].concat(getAndroidSDKTargets(apiLevels, architectures, platforms, oldAVDs)), true, acceptLicenses, verbose); + }) + .then(() => { + return getAVDDescriptors(sdkPath); + }) + .then((descriptors) => { + avdDescriptors = descriptors; + logger.info('android-sdk: Configuring virtual device hardware'); + return sequentialForEach(avdDescriptors, (descriptor) => { + return configureAVDHardware(sdkPath, descriptor); + }); + }) + .then(() => { + return sequentialForEach(avdDescriptors, (descriptor) => { + logger.info('android-sdk: Setting up virtual device "' + descriptor.name + '"'); + return makeAVD(sdkPath, descriptor, version, verbose); + }); + }) + .then(() => { + return q.nfcall(fs.writeFile, path.resolve(sdkPath, 'available_avds.json'), JSON.stringify(avdDescriptors.map((descriptor) => { + return descriptor.name; + }))); + }) + .then(() => { + logger.info('android-sdk: Initialization complete'); + }) + .done(); +} +exports.android = android; +; +function iOS(logger) { + if (config_1.Config.osType() != 'Darwin') { + throw new Error('Must be on a Mac to simulate iOS devices.'); + } + try { + fs.statSync('/Applications/Xcode.app'); + } + catch (e) { + logger.warn('You must install the xcode commandline tools!'); + } +} +exports.iOS = iOS; +//# sourceMappingURL=initialize.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map new file mode 100644 index 00000000..22a118b3 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"initialize.js","sourceRoot":"","sources":["../../../lib/cmds/initialize.ts"],"names":[],"mappings":";;AAAA,iDAAsD;AACtD,yBAAyB;AACzB,6BAA6B;AAC7B,2BAA2B;AAC3B,6BAA6B;AAC7B,uBAAuB;AAGvB,sCAAiC;AACjC,oCAA+B;AAG/B,MAAM,IAAI,GAAG,QAAO,CAAC,CAAC;AAEtB,4EAA4E;AAC5E,wBAAwB;AACxB,wBAAwB,QAAgB,EAAE,MAAc,EAAE,OAAgB;IACxE,MAAM,CAAC,CAAC,KAAmB;QACnB,KAAK,CAAC,KAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC/C,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAmB;YAC1C,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC;gBACjB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC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AChF,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;SACD,IAAI,CAAC;QACJ,MAAM,CAAC,CAAC,CAAC,MAAM,CACX,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,qBAAqB,CAAC,EAC1D,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,UAAyB;YAC1D,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;QACzB,CAAC,CAAC,CAAC,CAAC,CAAC;IACX,CAAC,CAAC;SACD,IAAI,CAAC;QACJ,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC,CAAC;SACD,IAAI,EAAE,CAAC;AACd,CAAC;AApDD,0BAoDC;AAAA,CAAC;AAEF,aAAoB,MAAc;IAChC,EAAE,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IACD,IAAI,CAAC;QACH,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IACzC,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,MAAM,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC;AATD,kBASC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts new file mode 100644 index 00000000..270f5b5e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts @@ -0,0 +1,38 @@ +import { Options } from '../cli'; +export declare const OUT_DIR = "out_dir"; +export declare const SELENIUM_PORT = "seleniumPort"; +export declare const APPIUM_PORT = "appium-port"; +export declare const AVD_PORT = "avd-port"; +export declare const IGNORE_SSL = "ignore_ssl"; +export declare const PROXY = "proxy"; +export declare const ALTERNATE_CDN = "alternate_cdn"; +export declare const STANDALONE = "standalone"; +export declare const CHROME = "chrome"; +export declare const IE = "ie"; +export declare const IE32 = "ie32"; +export declare const IE64 = "ie64"; +export declare const EDGE = "edge"; +export declare const GECKO = "gecko"; +export declare const ANDROID = "android"; +export declare const IOS = "ios"; +export declare const VERSIONS_CHROME = "versions.chrome"; +export declare const VERSIONS_GECKO = "versions.gecko"; +export declare const VERSIONS_STANDALONE = "versions.standalone"; +export declare const VERSIONS_IE = "versions.ie"; +export declare const VERSIONS_ANDROID = "versions.android"; +export declare const VERSIONS_APPIUM = "versions.appium"; +export declare const CHROME_LOGS = "chrome_logs"; +export declare const LOGGING = "logging"; +export declare const ANDROID_API_LEVELS = "android-api-levels"; +export declare const ANDROID_ARCHITECTURES = "android-archs"; +export declare const ANDROID_PLATFORMS = "android-platorms"; +export declare const ANDROID_ACCEPT_LICENSES = "android-accept-licenses"; +export declare const AVDS = "avds"; +export declare const AVD_USE_SNAPSHOTS = "avd-use-snapshots"; +export declare const STARTED_SIGNIFIER = "started-signifier"; +export declare const SIGNAL_VIA_IPC = "signal-via-ipc"; +export declare const DETACH = "detach"; +export declare const QUIET = "quiet"; +export declare const VERBOSE = "verbose"; +export declare const ALREADY_OFF_ERROR = "already-off-error"; +export declare var Opts: Options; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js new file mode 100644 index 00000000..0360146c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const binaries_1 = require("../binaries"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +exports.OUT_DIR = 'out_dir'; +exports.SELENIUM_PORT = 'seleniumPort'; +exports.APPIUM_PORT = 'appium-port'; +exports.AVD_PORT = 'avd-port'; +exports.IGNORE_SSL = 'ignore_ssl'; +exports.PROXY = 'proxy'; +exports.ALTERNATE_CDN = 'alternate_cdn'; +exports.STANDALONE = 'standalone'; +exports.CHROME = 'chrome'; +exports.IE = 'ie'; +exports.IE32 = 'ie32'; +exports.IE64 = 'ie64'; +exports.EDGE = 'edge'; +exports.GECKO = 'gecko'; +exports.ANDROID = 'android'; +exports.IOS = 'ios'; +exports.VERSIONS_CHROME = 'versions.chrome'; +exports.VERSIONS_GECKO = 'versions.gecko'; +exports.VERSIONS_STANDALONE = 'versions.standalone'; +exports.VERSIONS_IE = 'versions.ie'; +exports.VERSIONS_ANDROID = 'versions.android'; +exports.VERSIONS_APPIUM = 'versions.appium'; +exports.CHROME_LOGS = 'chrome_logs'; +exports.LOGGING = 'logging'; +exports.ANDROID_API_LEVELS = 'android-api-levels'; +exports.ANDROID_ARCHITECTURES = 'android-archs'; +exports.ANDROID_PLATFORMS = 'android-platorms'; +exports.ANDROID_ACCEPT_LICENSES = 'android-accept-licenses'; +exports.AVDS = 'avds'; +exports.AVD_USE_SNAPSHOTS = 'avd-use-snapshots'; +exports.STARTED_SIGNIFIER = 'started-signifier'; +exports.SIGNAL_VIA_IPC = 'signal-via-ipc'; +exports.DETACH = 'detach'; +exports.QUIET = 'quiet'; +exports.VERBOSE = 'verbose'; +exports.ALREADY_OFF_ERROR = 'already-off-error'; +/** + * The options used by the commands. + */ +var opts = {}; +opts[exports.OUT_DIR] = new cli_1.Option(exports.OUT_DIR, 'Location to output/expect', 'string', config_1.Config.getSeleniumDir()); +opts[exports.SELENIUM_PORT] = + new cli_1.Option(exports.SELENIUM_PORT, 'Optional port for the selenium standalone server', 'string', '4444'); +opts[exports.APPIUM_PORT] = + new cli_1.Option(exports.APPIUM_PORT, 'Optional port for the appium server', 'string', '4723'); +opts[exports.AVD_PORT] = new cli_1.Option(exports.AVD_PORT, 'Optional port for android virtual devices. See mobile.md for details', 'number', 5554); +opts[exports.IGNORE_SSL] = new cli_1.Option(exports.IGNORE_SSL, 'Ignore SSL certificates', 'boolean', false); +opts[exports.PROXY] = new cli_1.Option(exports.PROXY, 'Proxy to use for the install or update command', 'string'); +opts[exports.ALTERNATE_CDN] = new cli_1.Option(exports.ALTERNATE_CDN, 'Alternate CDN to binaries', 'string'); +opts[exports.STANDALONE] = new cli_1.Option(exports.STANDALONE, 'Install or update selenium standalone', 'boolean', binaries_1.Standalone.isDefault); +opts[exports.CHROME] = + new cli_1.Option(exports.CHROME, 'Install or update chromedriver', 'boolean', binaries_1.ChromeDriver.isDefault); +opts[exports.GECKO] = new cli_1.Option(exports.GECKO, 'Install or update geckodriver', 'boolean', binaries_1.GeckoDriver.isDefault); +opts[exports.IE] = new cli_1.Option(exports.IE, 'Install or update 32-bit ie driver', 'boolean', binaries_1.IEDriver.isDefault32); +opts[exports.IE32] = + new cli_1.Option(exports.IE32, 'Install or update 32-bit ie driver', 'boolean', binaries_1.IEDriver.isDefault32); +opts[exports.IE64] = new cli_1.Option(exports.IE64, 'Update: install or update 64-bit IE driver. Start: use installed x64 IE driver.', 'boolean', binaries_1.IEDriver.isDefault64); +opts[exports.EDGE] = new cli_1.Option(exports.EDGE, 'Use installed Microsoft Edge driver', 'string', 'C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe'); +opts[exports.ANDROID] = new cli_1.Option(exports.ANDROID, 'Update/use the android sdk', 'boolean', binaries_1.AndroidSDK.isDefault); +opts[exports.IOS] = new cli_1.Option(exports.IOS, 'Update the iOS sdk', 'boolean', false); +opts[exports.VERSIONS_CHROME] = new cli_1.Option(exports.VERSIONS_CHROME, 'Optional chrome driver version (use \'latest\' to get the most recent version)', 'string', 'latest'); +opts[exports.VERSIONS_GECKO] = + new cli_1.Option(exports.VERSIONS_GECKO, 'Optional gecko driver version', 'string', 'latest'); +opts[exports.VERSIONS_ANDROID] = new cli_1.Option(exports.VERSIONS_ANDROID, 'Optional android sdk version', 'string', binaries_1.AndroidSDK.versionDefault); +opts[exports.VERSIONS_STANDALONE] = new cli_1.Option(exports.VERSIONS_STANDALONE, 'Optional seleniuim standalone server version (use \'latest\' to get the most recent version)', 'string', 'latest'); +opts[exports.VERSIONS_APPIUM] = + new cli_1.Option(exports.VERSIONS_APPIUM, 'Optional appium version', 'string', binaries_1.Appium.versionDefault); +opts[exports.VERSIONS_IE] = new cli_1.Option(exports.VERSIONS_IE, 'Optional internet explorer driver version (use \'latest\' to get the most recent version)', 'string', 'latest'); +opts[exports.CHROME_LOGS] = new cli_1.Option(exports.CHROME_LOGS, 'File path to chrome logs', 'string', undefined); +opts[exports.LOGGING] = new cli_1.Option(exports.LOGGING, 'File path to logging properties file', 'string', undefined); +opts[exports.ANDROID_API_LEVELS] = new cli_1.Option(exports.ANDROID_API_LEVELS, 'Which versions of the android API you want to emulate', 'string', binaries_1.AndroidSDK.DEFAULT_API_LEVELS); +opts[exports.ANDROID_ARCHITECTURES] = new cli_1.Option(exports.ANDROID_ARCHITECTURES, 'Which architectures you want to use in android emulation. By default it will try to match os.arch()', 'string', binaries_1.AndroidSDK.DEFAULT_ARCHITECTURES); +opts[exports.ANDROID_PLATFORMS] = new cli_1.Option(exports.ANDROID_PLATFORMS, 'Which platforms you want to use in android emulation', 'string', binaries_1.AndroidSDK.DEFAULT_PLATFORMS); +opts[exports.ANDROID_ACCEPT_LICENSES] = + new cli_1.Option(exports.ANDROID_ACCEPT_LICENSES, 'Automatically accept android licenses', 'boolean', false); +opts[exports.AVDS] = new cli_1.Option(exports.AVDS, 'Android virtual devices to emulate. Use "all" for emulating all possible devices, and "none" for no devices', 'string', 'all'); +opts[exports.AVD_USE_SNAPSHOTS] = new cli_1.Option(exports.AVD_USE_SNAPSHOTS, 'Rather than booting a new AVD every time, save/load snapshots of the last time it was used', 'boolean', true); +opts[exports.STARTED_SIGNIFIER] = new cli_1.Option(exports.STARTED_SIGNIFIER, 'A string to be outputted once the selenium server is up and running. Useful if you are writing a script which uses webdriver-manager.', 'string'); +opts[exports.SIGNAL_VIA_IPC] = new cli_1.Option(exports.SIGNAL_VIA_IPC, 'If you are using --' + exports.STARTED_SIGNIFIER + + ', this flag will emit the signal string using process.send(), rather than writing it to stdout', 'boolean', false); +opts[exports.DETACH] = new cli_1.Option(exports.DETACH, 'Once the selenium server is up and running, return control to the parent process and continue running the server in the background.', 'boolean', false); +opts[exports.VERBOSE] = new cli_1.Option(exports.VERBOSE, 'Extra console output', 'boolean', false); +opts[exports.QUIET] = new cli_1.Option(exports.QUIET, 'Minimal console output', 'boolean', false); +opts[exports.ALREADY_OFF_ERROR] = new cli_1.Option(exports.ALREADY_OFF_ERROR, 'Normally if you try to shut down a selenium which is not running, you will get a warning. This turns it into an error', 'boolean', false); +exports.Opts = opts; +//# sourceMappingURL=opts.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map new file mode 100644 index 00000000..eb616994 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"opts.js","sourceRoot":"","sources":["../../../lib/cmds/opts.ts"],"names":[],"mappings":";;AAAA,0CAAgG;AAChG,gCAA4C;AAC5C,sCAAiC;AAEpB,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,aAAa,GAAG,cAAc,CAAC;AAC/B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,QAAQ,GAAG,UAAU,CAAC;AACtB,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,MAAM,GAAG,QAAQ,CAAC;AAClB,QAAA,EAAE,GAAG,IAAI,CAAC;AACV,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,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CAAC;AACtB,IAAI,CAAC,eAAO,CAAC,GAAG,IAAI,YAAM,CAAC,eAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAC9E,IAAI,CAAC,aAAK,CAAC,GAAG,IAAI,YAAM,CAAC,aAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAC5E,IAAI,CAAC,yBAAiB,CAAC,GAAG,IAAI,YAAM,CAChC,yBAAiB,EACjB,wHAAwH,EACxH,SAAS,EAAE,KAAK,CAAC,CAAC;AAEX,QAAA,IAAI,GAAG,IAAI,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts new file mode 100644 index 00000000..c837c34c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts @@ -0,0 +1,2 @@ +import { Program } from '../cli'; +export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js new file mode 100644 index 00000000..a6e290d7 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const http = require("http"); +const minimist = require("minimist"); +const cli_1 = require("../cli"); +const Opt = require("./"); +const opts_1 = require("./opts"); +let logger = new cli_1.Logger('shutdown'); +let prog = new cli_1.Program() + .command('shutdown', 'shut down the selenium server') + .action(shutdown) + .addOption(opts_1.Opts[Opt.SELENIUM_PORT]) + .addOption(opts_1.Opts[Opt.ALREADY_OFF_ERROR]); +exports.program = prog; +// stand alone runner +let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); +if (argv._[0] === 'shutdown-run') { + prog.run(JSON.parse(JSON.stringify(argv))); +} +else if (argv._[0] === 'shutdown-help') { + prog.printHelp(); +} +/** + * Parses the options and starts the selenium standalone server. + * @param options + */ +function shutdown(options) { + logger.info('Attempting to shut down selenium nicely'); + http.get('http://localhost:' + options[Opt.SELENIUM_PORT].getString() + + '/selenium-server/driver/?cmd=shutDownSeleniumServer') + .on('error', (e) => { + if ((e.code == 'ECONNREFUSED') && (e.syscall == 'connect')) { + if (!options[Opt.ALREADY_OFF_ERROR].getBoolean()) { + logger.warn('Server does not appear to be on'); + } + else { + logger.error('Server unreachable, probably not running'); + throw e; + } + } + else { + throw e; + } + }); +} +//# sourceMappingURL=shutdown.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map new file mode 100644 index 00000000..561603d2 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/cmds/shutdown.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,qCAAqC;AAErC,gCAAgD;AAEhD,0BAA0B;AAC1B,iCAA4B;AAG5B,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,UAAU,CAAC,CAAC;AACpC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,UAAU,EAAE,+BAA+B,CAAC;KACpD,MAAM,CAAC,QAAQ,CAAC;KAChB,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;KAClC,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE5C,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACtE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,EAAE,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,kBAAkB,OAAgB;IAChC,MAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACvD,IAAI,CAAC,GAAG,CACA,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,SAAS,EAAE;QAC5D,qDAAqD,CAAC;SACzD,EAAE,CAAC,OAAO,EAAE,CAAC,CAAwB;QACpC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;YAC3D,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;gBACjD,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;YACjD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBACzD,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts new file mode 100644 index 00000000..c837c34c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts @@ -0,0 +1,2 @@ +import { Program } from '../cli'; +export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js new file mode 100644 index 00000000..86a7394c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js @@ -0,0 +1,458 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const http = require("http"); +const minimist = require("minimist"); +const path = require("path"); +const binaries_1 = require("../binaries"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +const files_1 = require("../files"); +const utils_1 = require("../utils"); +const Opt = require("./"); +const opts_1 = require("./opts"); +const commandName = 'start'; +config_1.Config.runCommand = commandName; +let logger = new cli_1.Logger('start'); +let prog = new cli_1.Program() + .command(commandName, 'start up the selenium server') + .action(start) + .addOption(opts_1.Opts[Opt.OUT_DIR]) + .addOption(opts_1.Opts[Opt.SELENIUM_PORT]) + .addOption(opts_1.Opts[Opt.APPIUM_PORT]) + .addOption(opts_1.Opts[Opt.AVD_PORT]) + .addOption(opts_1.Opts[Opt.VERSIONS_STANDALONE]) + .addOption(opts_1.Opts[Opt.VERSIONS_CHROME]) + .addOption(opts_1.Opts[Opt.VERSIONS_GECKO]) + .addOption(opts_1.Opts[Opt.VERSIONS_ANDROID]) + .addOption(opts_1.Opts[Opt.VERSIONS_APPIUM]) + .addOption(opts_1.Opts[Opt.CHROME_LOGS]) + .addOption(opts_1.Opts[Opt.LOGGING]) + .addOption(opts_1.Opts[Opt.ANDROID]) + .addOption(opts_1.Opts[Opt.AVDS]) + .addOption(opts_1.Opts[Opt.AVD_USE_SNAPSHOTS]) + .addOption(opts_1.Opts[Opt.STARTED_SIGNIFIER]) + .addOption(opts_1.Opts[Opt.SIGNAL_VIA_IPC]) + .addOption(opts_1.Opts[Opt.QUIET]) + .addOption(opts_1.Opts[Opt.DETACH]); +if (config_1.Config.osType() === 'Darwin') { + prog.addOption(opts_1.Opts[Opt.IOS]); +} +if (config_1.Config.osType() === 'Windows_NT') { + prog.addOption(opts_1.Opts[Opt.VERSIONS_IE]).addOption(opts_1.Opts[Opt.IE64]).addOption(opts_1.Opts[Opt.EDGE]); +} +exports.program = prog; +// stand alone runner +let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); +if (argv._[0] === 'start-run') { + prog.run(JSON.parse(JSON.stringify(argv))); +} +else if (argv._[0] === 'start-help') { + prog.printHelp(); +} +// Manage processes used in android emulation +let androidProcesses = []; +let androidActiveAVDs = []; +/** + * Parses the options and starts the selenium standalone server. + * @param options + */ +function start(options) { + if (options[Opt.DETACH].getBoolean()) { + return detachedRun(options); + } + let osType = config_1.Config.osType(); + let stdio = options[Opt.QUIET].getBoolean() ? 'pipe' : 'inherit'; + let binaries = files_1.FileManager.setupBinaries(); + let seleniumPort = options[Opt.SELENIUM_PORT].getString(); + let appiumPort = options[Opt.APPIUM_PORT].getString(); + let avdPort = options[Opt.AVD_PORT].getNumber(); + let android = options[Opt.ANDROID].getBoolean(); + let outputDir = config_1.Config.getSeleniumDir(); + if (options[Opt.OUT_DIR].getString()) { + if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { + outputDir = options[Opt.OUT_DIR].getString(); + } + else { + outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); + } + } + try { + // check if folder exists + fs.statSync(outputDir).isDirectory(); + } + catch (e) { + // if the folder does not exist, quit early. + logger.warn('the out_dir path ' + outputDir + ' does not exist, run webdriver-manager update'); + return; + } + let chromeLogs = null; + let loggingFile = null; + if (options[Opt.CHROME_LOGS].getString()) { + if (path.isAbsolute(options[Opt.CHROME_LOGS].getString())) { + chromeLogs = options[Opt.CHROME_LOGS].getString(); + } + else { + chromeLogs = path.resolve(config_1.Config.getBaseDir(), options[Opt.CHROME_LOGS].getString()); + } + } + binaries[binaries_1.Standalone.id].versionCustom = options[Opt.VERSIONS_STANDALONE].getString(); + binaries[binaries_1.ChromeDriver.id].versionCustom = options[Opt.VERSIONS_CHROME].getString(); + binaries[binaries_1.GeckoDriver.id].versionCustom = options[Opt.VERSIONS_GECKO].getString(); + if (options[Opt.VERSIONS_IE]) { + binaries[binaries_1.IEDriver.id].versionCustom = options[Opt.VERSIONS_IE].getString(); + } + binaries[binaries_1.AndroidSDK.id].versionCustom = options[Opt.VERSIONS_ANDROID].getString(); + binaries[binaries_1.Appium.id].versionCustom = options[Opt.VERSIONS_APPIUM].getString(); + let downloadedBinaries = files_1.FileManager.downloadedBinaries(outputDir); + if (downloadedBinaries[binaries_1.Standalone.id] == null) { + logger.error('Selenium Standalone is not present. Install with ' + + 'webdriver-manager update --standalone'); + process.exit(1); + } + let promises = []; + let args = []; + if (osType === 'Linux') { + // selenium server may take a long time to start because /dev/random is BLOCKING if there is not + // enough entropy the solution is to use /dev/urandom, which is NON-BLOCKING (use /dev/./urandom + // because of a java bug) + // https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/1301 + // https://bugs.openjdk.java.net/browse/JDK-6202721 + promises.push(Promise.resolve(args.push('-Djava.security.egd=file:///dev/./urandom'))); + } + if (options[Opt.LOGGING].getString()) { + if (path.isAbsolute(options[Opt.LOGGING].getString())) { + loggingFile = options[Opt.LOGGING].getString(); + } + else { + loggingFile = path.resolve(config_1.Config.getBaseDir(), options[Opt.LOGGING].getString()); + } + promises.push(Promise.resolve(args.push('-Djava.util.logging.config.file=' + loggingFile))); + } + if (downloadedBinaries[binaries_1.ChromeDriver.id] != null) { + let chrome = binaries[binaries_1.ChromeDriver.id]; + promises.push(chrome.getUrl(chrome.versionCustom) + .then(() => { + args.push('-Dwebdriver.chrome.driver=' + + path.resolve(outputDir, binaries[binaries_1.ChromeDriver.id].executableFilename())); + if (chromeLogs != null) { + args.push('-Dwebdriver.chrome.logfile=' + chromeLogs); + } + }) + .catch(err => { + console.log(err); + })); + } + if (downloadedBinaries[binaries_1.GeckoDriver.id] != null) { + let gecko = binaries[binaries_1.GeckoDriver.id]; + promises.push(gecko.getUrl(gecko.versionCustom) + .then(() => { + args.push('-Dwebdriver.gecko.driver=' + + path.resolve(outputDir, binaries[binaries_1.GeckoDriver.id].executableFilename())); + }) + .catch(err => { + console.log(err); + })); + } + if (downloadedBinaries[binaries_1.IEDriver.id] != null) { + let ie = binaries[binaries_1.IEDriver.id]; + promises.push(ie.getUrl(ie.versionCustom) + .then(() => { + binaries[binaries_1.IEDriver.id].osarch = 'Win32'; // use Win 32 by default + if (options[Opt.IE64].getBoolean()) { + binaries[binaries_1.IEDriver.id].osarch = + config_1.Config.osArch(); // use the system architecture + } + args.push('-Dwebdriver.ie.driver=' + + path.resolve(outputDir, binaries[binaries_1.IEDriver.id].executableFilename())); + }) + .catch(err => { + console.log(err); + })); + } + if (options[Opt.EDGE] && options[Opt.EDGE].getString()) { + // validate that the file exists prior to adding it to args + try { + let edgeFile = options[Opt.EDGE].getString(); + if (fs.statSync(edgeFile).isFile()) { + promises.push(Promise.resolve(args.push('-Dwebdriver.edge.driver=' + options[Opt.EDGE].getString()))); + } + } + catch (err) { + // Either the default file or user specified location of the edge + // driver does not exist. + } + } + Promise.all(promises).then(() => { + let standalone = binaries[binaries_1.Standalone.id]; + standalone.getUrl(standalone.versionCustom) + .then(() => { + // starting android + if (android) { + if (downloadedBinaries[binaries_1.AndroidSDK.id] != null) { + let avds = options[Opt.AVDS].getString(); + startAndroid(outputDir, binaries[binaries_1.AndroidSDK.id], avds.split(','), options[Opt.AVD_USE_SNAPSHOTS].getBoolean(), avdPort, stdio); + } + else { + logger.warn('Not starting android because it is not installed'); + } + } + if (downloadedBinaries[binaries_1.Appium.id] != null) { + startAppium(outputDir, binaries[binaries_1.Appium.id], binaries[binaries_1.AndroidSDK.id], appiumPort, stdio); + } + args.push('-jar'); + args.push(path.resolve(outputDir, binaries[binaries_1.Standalone.id].filename())); + }) + .catch(err => { + console.log(err); + }) + .then(() => { + // Add the port parameter, has to declared after the jar file + if (seleniumPort) { + args.push('-port', seleniumPort); + } + let argsToString = ''; + for (let arg in args) { + argsToString += ' ' + args[arg]; + } + logger.info('java' + argsToString); + let seleniumProcess = utils_1.spawn('java', args, stdio); + if (options[Opt.STARTED_SIGNIFIER].getString()) { + signalWhenReady(options[Opt.STARTED_SIGNIFIER].getString(), options[Opt.SIGNAL_VIA_IPC].getBoolean(), outputDir, seleniumPort, downloadedBinaries[binaries_1.Appium.id] ? appiumPort : '', binaries[binaries_1.AndroidSDK.id], avdPort, androidActiveAVDs); + } + logger.info('seleniumProcess.pid: ' + seleniumProcess.pid); + seleniumProcess.on('exit', (code) => { + logger.info('Selenium Standalone has exited with code ' + code); + shutdownEverything(); + process.exit(process.exitCode || code); + }); + seleniumProcess.on('error', (error) => { + logger.warn('Selenium Standalone server encountered an error: ' + error); + }); + process.stdin.resume(); + process.stdin.on('data', (chunk) => { + logger.info('Attempting to shut down selenium nicely'); + shutdownEverything(seleniumPort); + }); + process.on('SIGINT', () => { + logger.info('Staying alive until the Selenium Standalone process exits'); + shutdownEverything(seleniumPort); + }); + }); + }); +} +function startAndroid(outputDir, sdk, avds, useSnapshots, port, stdio) { + let sdkPath = path.resolve(outputDir, sdk.executableFilename()); + if (avds[0] == 'all') { + avds = require(path.resolve(sdkPath, 'available_avds.json')); + } + else if (avds[0] == 'none') { + avds.length = 0; + } + const minAVDPort = 5554; + const maxAVDPort = 5586 - 2 * avds.length; + if (avds.length && ((port < minAVDPort) || (port > maxAVDPort))) { + throw new RangeError('AVD Port must be between ' + minAVDPort + ' and ' + maxAVDPort + ' to emulate ' + + avds.length + ' android devices'); + } + avds.forEach((avd, i) => { + // Credit to appium-ci, which this code was adapted from + let emuBin = 'emulator'; // TODO(sjelin): get the 64bit linux version working + let emuArgs = [ + '-avd', + avd + '-v' + sdk.versionCustom + '-wd-manager', + '-netfast', + ]; + let portArg = null; + if (!useSnapshots) { + emuArgs = emuArgs.concat(['-no-snapshot-load', '-no-snapshot-save']); + } + if (port) { + portArg = port + i * 2; + emuArgs = emuArgs.concat(['-port', '' + portArg]); + } + if (emuBin !== 'emulator') { + emuArgs = emuArgs.concat(['-qemu', '-enable-kvm']); + } + logger.info('Starting ' + avd + ' on ' + (portArg == null ? 'default port' : 'port ' + portArg)); + let child = utils_1.spawn(path.resolve(sdkPath, 'tools', emuBin), emuArgs, stdio); + child.on('error', (error) => { + logger.warn(avd + ' encountered an error: ' + error); + }); + androidProcesses.push(child); + androidActiveAVDs.push(avd); + }); +} +function killAndroid() { + for (var i = 0; i < androidProcesses.length; i++) { + logger.info('Shutting down ' + androidActiveAVDs[i]); + androidProcesses[i].kill(); + } + androidProcesses.length = androidActiveAVDs.length = 0; +} +// Manage appium process +let appiumProcess; +function startAppium(outputDir, binary, androidSDK, port, stdio) { + logger.info('Starting appium server'); + if (androidSDK) { + process.env.ANDROID_HOME = path.resolve(outputDir, androidSDK.executableFilename()); + } + appiumProcess = utils_1.spawn('npm', ['run', 'appium'].concat(port ? ['--', '--port', port] : []), stdio, { cwd: path.resolve(outputDir, binary.filename()) }); +} +function killAppium() { + if (appiumProcess != null) { + appiumProcess.kill(); + appiumProcess = null; + } +} +function signalWhenReady(signal, viaIPC, outputDir, seleniumPort, appiumPort, androidSDK, avdPort, avdNames) { + const maxWait = 10 * 60 * 1000; // Ten minutes + function waitFor(getStatus, testStatus, desc) { + const checkInterval = 100; + return new Promise((resolve, reject) => { + let waited = 0; + (function recursiveCheck() { + setTimeout(() => { + getStatus() + .then((status) => { + if (!testStatus(status)) { + return Promise.reject('Invalid status' + (desc ? ' for ' + desc : '') + ': ' + status); + } + }) + .then(() => { + resolve(); + }, (error) => { + waited += checkInterval; + if (waited < maxWait) { + recursiveCheck(); + } + else { + reject('Timed out' + (desc ? ' wating for' + desc : '') + + '. Final rejection reason: ' + JSON.stringify(error)); + } + }); + }, checkInterval); + })(); + }); + } + ; + function waitForAndroid(avdPort, avdName, appiumPort) { + let sdkPath = path.resolve(outputDir, androidSDK.executableFilename()); + logger.info('Waiting for ' + avdName + '\'s emulator to start'); + return utils_1.adb(sdkPath, avdPort, 'wait-for-device', maxWait) + .then(() => { + logger.info('Waiting for ' + avdName + '\'s OS to boot up'); + return waitFor(() => { + return utils_1.adb(sdkPath, avdPort, 'shell', maxWait, ['getprop', 'sys.boot_completed']); + }, (status) => { + return status.trim() == '1'; + }, avdName + '\'s OS'); + }, (error) => { + return Promise.reject('Failed to wait for ' + avdName + '\'s emulator to start (' + error.code + ': ' + + error.message + ')'); + }) + .then(() => { + logger.info('Waiting for ' + avdName + ' to be ready to launch chrome'); + let version = binaries_1.AndroidSDK.VERSIONS[parseInt(avdName.slice('android-'.length))]; + return utils_1.request('POST', appiumPort, '/wd/hub/session', maxWait, { + desiredCapabilities: { + browserName: 'chrome', + platformName: 'Android', + platformVersion: version, + deviceName: 'Android Emulator' + } + }) + .then((data) => { + return JSON.parse(data)['sessionId']; + }, (error) => { + return Promise.reject('Could not start chrome on ' + avdName + ' (' + error.code + ': ' + + error.message + ')'); + }); + }) + .then((sessionId) => { + logger.info('Shutting down dummy chrome instance for ' + avdName); + return utils_1.request('DELETE', appiumPort, '/wd/hub/session/' + sessionId) + .then(() => { }, (error) => { + return Promise.reject('Could not close chrome on ' + avdName + ' (' + error.code + ': ' + + error.message + ')'); + }); + }); + } + let pending = [waitFor(() => { + return utils_1.request('GET', seleniumPort, '/wd/hub/status', maxWait); + }, (status) => { + return JSON.parse(status).status == 0; + }, 'selenium server')]; + if (appiumPort) { + pending.push(waitFor(() => { + return utils_1.request('GET', appiumPort, '/wd/hub/status', maxWait); + }, (status) => { + return JSON.parse(status).status == 0; + }, 'appium server')); + } + if (androidSDK && avdPort) { + for (let i = 0; i < avdNames.length; i++) { + pending.push(waitForAndroid(avdPort + 2 * i, avdNames[i], appiumPort)); + } + } + Promise.all(pending).then(() => { + logger.info('Everything started'); + sendStartedSignal(signal, viaIPC); + }, (error) => { + logger.error(error); + shutdownEverything(seleniumPort); + process.exitCode = 1; + }); +} +function sendStartedSignal(signal, viaIPC) { + if (viaIPC) { + if (process.send) { + return process.send(signal); + } + else { + logger.warn('No IPC channel, sending signal via stdout'); + } + } + console.log(signal); +} +function shutdownEverything(seleniumPort) { + if (seleniumPort) { + http.get('http://localhost:' + seleniumPort + '/selenium-server/driver/?cmd=shutDownSeleniumServer'); + } + killAndroid(); + killAppium(); +} +function detachedRun(options) { + var file = path.resolve(__dirname, '..', 'webdriver.js'); + var oldSignal = options[Opt.STARTED_SIGNIFIER].getString(); + var oldViaIPC = options[Opt.SIGNAL_VIA_IPC].getBoolean(); + options[Opt.DETACH].value = false; + options[Opt.STARTED_SIGNIFIER].value = 'server started'; + options[Opt.SIGNAL_VIA_IPC].value = true; + let args = [file, commandName].concat(cli_1.unparseOptions(options)); + var unreffed = false; + let child = utils_1.spawn(process.execPath, args, ['ignore', 1, 2, 'ipc']); + child.on('message', (message) => { + if (message == options[Opt.STARTED_SIGNIFIER].getString()) { + if (oldSignal) { + sendStartedSignal(oldSignal, oldViaIPC); + } + logger.info('Detached pid: ' + child.pid); + child.disconnect(); + child.unref(); + unreffed = true; + } + }); + child.on('exit', (code) => { + if (!unreffed) { + if (code == 0) { + logger.warn('Server never seemed to start, and has now exited'); + } + else { + logger.error('Server never seemed to start, and has probably crashed'); + } + process.exit(code); + } + }); +} +//# sourceMappingURL=start.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map new file mode 100644 index 00000000..7862b9ff --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map @@ -0,0 +1 @@ +{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../lib/cmds/start.ts"],"names":[],"mappings":";;AACA,yBAAyB;AACzB,6BAA6B;AAC7B,qCAAqC;AACrC,6BAA6B;AAG7B,0CAAmH;AACnH,gCAAgE;AAChE,sCAAiC;AACjC,oCAAqC;AACrC,oCAA6C;AAE7C,0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AAC,CAAC,CAAC;YAC1D,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACd,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YAC1C,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1C,KAAK,CAAC,UAAU,EAAE,CAAC;YACnB,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAY;QAC5B,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACd,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;gBACd,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;YAClE,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;YACzE,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts new file mode 100644 index 00000000..c837c34c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts @@ -0,0 +1,2 @@ +import { Program } from '../cli'; +export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js new file mode 100644 index 00000000..fc5ad7f0 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js @@ -0,0 +1,120 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const minimist = require("minimist"); +const path = require("path"); +const semver = require("semver"); +const binaries_1 = require("../binaries"); +const chrome_xml_1 = require("../binaries/chrome_xml"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +const files_1 = require("../files"); +const Opt = require("./"); +const opts_1 = require("./opts"); +let logger = new cli_1.Logger('status'); +let prog = new cli_1.Program() + .command('status', 'list the current available drivers') + .addOption(opts_1.Opts[Opt.OUT_DIR]) + .action(status); +exports.program = prog; +// stand alone runner +let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); +if (argv._[0] === 'status-run') { + prog.run(JSON.parse(JSON.stringify(argv))); +} +else if (argv._[0] === 'status-help') { + prog.printHelp(); +} +/** + * Parses the options and logs the status of the binaries downloaded. + * @param options + */ +function status(options) { + let binaries = files_1.FileManager.setupBinaries(); + let outputDir = config_1.Config.getSeleniumDir(); + if (options[Opt.OUT_DIR].value) { + if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { + outputDir = options[Opt.OUT_DIR].getString(); + } + else { + outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); + } + } + try { + // check if folder exists + fs.statSync(outputDir).isDirectory(); + } + catch (e) { + // if the folder does not exist, quit early. + logger.warn('the out_dir path ' + outputDir + ' does not exist'); + return; + } + // Try to get the update-config.json. This will be used for showing the last binary downloaded. + let updateConfig = {}; + try { + updateConfig = + JSON.parse(fs.readFileSync(path.resolve(outputDir, 'update-config.json')).toString()) || {}; + } + catch (err) { + updateConfig = {}; + } + let downloadedBinaries = files_1.FileManager.downloadedBinaries(outputDir); + // Log which binaries have been downloaded. + for (let bin in downloadedBinaries) { + let downloaded = downloadedBinaries[bin]; + let log = downloaded.name + ' '; + log += downloaded.versions.length == 1 ? 'version available: ' : 'versions available: '; + // Get the "last" downloaded binary from the updateConfig. + let last = null; + if (downloaded.binary instanceof binaries_1.Appium && updateConfig[binaries_1.Appium.id]) { + last = updateConfig[binaries_1.Appium.id]['last']; + } + else if (downloaded.binary instanceof binaries_1.AndroidSDK && updateConfig[binaries_1.AndroidSDK.id]) { + last = updateConfig[binaries_1.AndroidSDK.id]['last']; + } + else if (downloaded.binary instanceof binaries_1.ChromeDriver && updateConfig[binaries_1.ChromeDriver.id]) { + last = updateConfig[binaries_1.ChromeDriver.id]['last']; + } + else if (downloaded.binary instanceof binaries_1.GeckoDriver && updateConfig[binaries_1.GeckoDriver.id]) { + last = updateConfig[binaries_1.GeckoDriver.id]['last']; + } + else if (downloaded.binary instanceof binaries_1.IEDriver && updateConfig[binaries_1.IEDriver.id]) { + last = updateConfig[binaries_1.IEDriver.id]['last']; + } + else if (downloaded.binary instanceof binaries_1.Standalone && updateConfig[binaries_1.Standalone.id]) { + last = updateConfig[binaries_1.Standalone.id]['last']; + } + // Sort the versions then log them: + // - last: the last binary downloaded by webdriver-manager per the update-config.json + downloaded.versions = downloaded.versions.sort((a, b) => { + if (!semver.valid(a)) { + a = chrome_xml_1.getValidSemver(a); + b = chrome_xml_1.getValidSemver(b); + } + if (semver.gt(a, b)) { + return 1; + } + else { + return 0; + } + }); + for (let ver in downloaded.versions) { + let version = downloaded.versions[ver]; + log += version; + if (last && last.indexOf(version) >= 0) { + log += ' [last]'; + } + if (+ver != downloaded.versions.length - 1) { + log += ', '; + } + } + logger.info(log); + } + // for binaries that are available for the operating system, show them here + for (let bin in binaries) { + if (downloadedBinaries[bin] == null) { + logger.info(binaries[bin].name + ' is not present'); + } + } +} +//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map new file mode 100644 index 00000000..d804808c --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map @@ -0,0 +1 @@ +{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../lib/cmds/status.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,qCAAqC;AACrC,6BAA6B;AAC7B,iCAAiC;AAEjC,0CAAgG;A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CAAC;IACnB,CAAC;IACD,2EAA2E;IAC3E,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC;QACzB,EAAE,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,iBAAiB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts new file mode 100644 index 00000000..2dec5ba6 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts @@ -0,0 +1,3 @@ +import { Program } from '../cli'; +export declare let program: Program; +export declare function clearBrowserFile(): void; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js new file mode 100644 index 00000000..b98cdced --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js @@ -0,0 +1,300 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const AdmZip = require("adm-zip"); +const child_process = require("child_process"); +const fs = require("fs"); +const minimist = require("minimist"); +const path = require("path"); +const q = require("q"); +const rimraf = require("rimraf"); +const binaries_1 = require("../binaries"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +const files_1 = require("../files"); +const http_utils_1 = require("../http_utils"); +const utils_1 = require("../utils"); +const Opt = require("./"); +const initialize_1 = require("./initialize"); +const opts_1 = require("./opts"); +config_1.Config.runCommand = 'update'; +let logger = new cli_1.Logger('update'); +let prog = new cli_1.Program() + .command('update', 'install or update selected binaries') + .action(update) + .addOption(opts_1.Opts[Opt.OUT_DIR]) + .addOption(opts_1.Opts[Opt.VERBOSE]) + .addOption(opts_1.Opts[Opt.IGNORE_SSL]) + .addOption(opts_1.Opts[Opt.PROXY]) + .addOption(opts_1.Opts[Opt.ALTERNATE_CDN]) + .addOption(opts_1.Opts[Opt.STANDALONE]) + .addOption(opts_1.Opts[Opt.CHROME]) + .addOption(opts_1.Opts[Opt.GECKO]) + .addOption(opts_1.Opts[Opt.ANDROID]) + .addOption(opts_1.Opts[Opt.ANDROID_API_LEVELS]) + .addOption(opts_1.Opts[Opt.ANDROID_ARCHITECTURES]) + .addOption(opts_1.Opts[Opt.ANDROID_PLATFORMS]) + .addOption(opts_1.Opts[Opt.ANDROID_ACCEPT_LICENSES]); +if (config_1.Config.osType() === 'Darwin') { + prog.addOption(opts_1.Opts[Opt.IOS]); +} +if (config_1.Config.osType() === 'Windows_NT') { + prog.addOption(opts_1.Opts[Opt.IE]).addOption(opts_1.Opts[Opt.IE32]).addOption(opts_1.Opts[Opt.IE64]); +} +prog.addOption(opts_1.Opts[Opt.VERSIONS_STANDALONE]) + .addOption(opts_1.Opts[Opt.VERSIONS_CHROME]) + .addOption(opts_1.Opts[Opt.VERSIONS_APPIUM]) + .addOption(opts_1.Opts[Opt.VERSIONS_ANDROID]) + .addOption(opts_1.Opts[Opt.VERSIONS_GECKO]); +if (config_1.Config.osType() === 'Windows_NT') { + prog.addOption(opts_1.Opts[Opt.VERSIONS_IE]); +} +exports.program = prog; +// stand alone runner +let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); +if (argv._[0] === 'update-run') { + prog.run(JSON.parse(JSON.stringify(argv))); +} +else if (argv._[0] === 'update-help') { + prog.printHelp(); +} +let browserFile; +/** + * Parses the options and downloads binaries if they do not exist. + * @param options + */ +function update(options) { + let promises = []; + let standalone = options[Opt.STANDALONE].getBoolean(); + let chrome = options[Opt.CHROME].getBoolean(); + let gecko = options[Opt.GECKO].getBoolean(); + let ie32 = false; + let ie64 = false; + if (options[Opt.IE]) { + ie32 = ie32 || options[Opt.IE].getBoolean(); + } + if (options[Opt.IE32]) { + ie32 = ie32 || options[Opt.IE32].getBoolean(); + } + if (options[Opt.IE64]) { + ie64 = options[Opt.IE64].getBoolean(); + } + let android = options[Opt.ANDROID].getBoolean(); + let ios = false; + if (options[Opt.IOS]) { + ios = options[Opt.IOS].getBoolean(); + } + let outputDir = options[Opt.OUT_DIR].getString(); + try { + browserFile = + JSON.parse(fs.readFileSync(path.resolve(outputDir, 'update-config.json')).toString()); + } + catch (err) { + browserFile = {}; + } + let android_api_levels = options[Opt.ANDROID_API_LEVELS].getString().split(','); + let android_architectures = options[Opt.ANDROID_ARCHITECTURES].getString().split(','); + let android_platforms = options[Opt.ANDROID_PLATFORMS].getString().split(','); + let android_accept_licenses = options[Opt.ANDROID_ACCEPT_LICENSES].getBoolean(); + if (options[Opt.OUT_DIR].getString()) { + if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { + outputDir = options[Opt.OUT_DIR].getString(); + } + else { + outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); + } + files_1.FileManager.makeOutputDirectory(outputDir); + } + let ignoreSSL = options[Opt.IGNORE_SSL].getBoolean(); + let proxy = options[Opt.PROXY].getString(); + http_utils_1.HttpUtils.assignOptions({ ignoreSSL, proxy }); + let verbose = options[Opt.VERBOSE].getBoolean(); + // setup versions for binaries + let binaries = files_1.FileManager.setupBinaries(options[Opt.ALTERNATE_CDN].getString()); + binaries[binaries_1.Standalone.id].versionCustom = options[Opt.VERSIONS_STANDALONE].getString(); + binaries[binaries_1.ChromeDriver.id].versionCustom = options[Opt.VERSIONS_CHROME].getString(); + if (options[Opt.VERSIONS_IE]) { + binaries[binaries_1.IEDriver.id].versionCustom = options[Opt.VERSIONS_IE].getString(); + } + if (options[Opt.VERSIONS_GECKO]) { + binaries[binaries_1.GeckoDriver.id].versionCustom = options[Opt.VERSIONS_GECKO].getString(); + } + binaries[binaries_1.AndroidSDK.id].versionCustom = options[Opt.VERSIONS_ANDROID].getString(); + binaries[binaries_1.Appium.id].versionCustom = options[Opt.VERSIONS_APPIUM].getString(); + // if the file has not been completely downloaded, download it + // else if the file has already been downloaded, unzip the file, rename it, and give it + // permissions + if (standalone) { + let binary = binaries[binaries_1.Standalone.id]; + promises.push(files_1.FileManager.downloadFile(binary, outputDir) + .then((downloaded) => { + if (!downloaded) { + logger.info(binary.name + ': file exists ' + + path.resolve(outputDir, binary.filename())); + logger.info(binary.name + ': ' + binary.filename() + ' up to date'); + } + }) + .then(() => { + updateBrowserFile(binary, outputDir); + })); + } + if (chrome) { + let binary = binaries[binaries_1.ChromeDriver.id]; + promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { + return Promise.resolve(updateBrowserFile(binary, outputDir)); + })); + } + if (gecko) { + let binary = binaries[binaries_1.GeckoDriver.id]; + promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { + return Promise.resolve(updateBrowserFile(binary, outputDir)); + })); + } + if (ie64) { + let binary = binaries[binaries_1.IEDriver.id]; + binary.osarch = config_1.Config.osArch(); // Win32 or x64 + promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { + return Promise.resolve(updateBrowserFile(binary, outputDir)); + })); + } + if (ie32) { + let binary = binaries[binaries_1.IEDriver.id]; + binary.osarch = 'Win32'; + promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { + return Promise.resolve(updateBrowserFile(binary, outputDir)); + })); + } + if (android) { + let binary = binaries[binaries_1.AndroidSDK.id]; + let sdk_path = path.resolve(outputDir, binary.executableFilename()); + let oldAVDList; + updateBrowserFile(binary, outputDir); + promises.push(q.nfcall(fs.readFile, path.resolve(sdk_path, 'available_avds.json')) + .then((oldAVDs) => { + oldAVDList = oldAVDs; + }, () => { + oldAVDList = '[]'; + }) + .then(() => { + return updateBinary(binary, outputDir, proxy, ignoreSSL); + }) + .then(() => { + initialize_1.android(path.resolve(outputDir, binary.executableFilename()), android_api_levels, android_architectures, android_platforms, android_accept_licenses, binaries[binaries_1.AndroidSDK.id].versionCustom, JSON.parse(oldAVDList), logger, verbose); + })); + } + if (ios) { + initialize_1.iOS(logger); + } + if (android || ios) { + installAppium(binaries[binaries_1.Appium.id], outputDir); + updateBrowserFile(binaries[binaries_1.Appium.id], outputDir); + } + return Promise.all(promises).then(() => { + writeBrowserFile(outputDir); + }); +} +function updateBinary(binary, outputDir, proxy, ignoreSSL) { + return files_1.FileManager + .downloadFile(binary, outputDir, (binary, outputDir, fileName) => { + unzip(binary, outputDir, fileName); + }) + .then(downloaded => { + if (!downloaded) { + // The file did not have to download, we should unzip it. + logger.info(binary.name + ': file exists ' + path.resolve(outputDir, binary.filename())); + let fileName = binary.filename(); + unzip(binary, outputDir, fileName); + logger.info(binary.name + ': ' + binary.executableFilename() + ' up to date'); + } + }); +} +function unzip(binary, outputDir, fileName) { + // remove the previously saved file and unzip it + let osType = config_1.Config.osType(); + let mv = path.resolve(outputDir, binary.executableFilename()); + try { + fs.unlinkSync(mv); + } + catch (err) { + try { + rimraf.sync(mv); + } + catch (err2) { + } + } + // unzip the file + logger.info(binary.name + ': unzipping ' + fileName); + if (fileName.slice(-4) == '.zip') { + try { + let zip = new AdmZip(path.resolve(outputDir, fileName)); + zip.extractAllTo(outputDir, true); + } + catch (e) { + throw new Error(`Invalid filename: ${path.resolve(outputDir, fileName)}`); + } + } + else { + // We will only ever get .tar files on linux + child_process.spawnSync('tar', ['zxvf', path.resolve(outputDir, fileName), '-C', outputDir]); + } + // rename + fs.renameSync(path.resolve(outputDir, binary.zipContentName()), mv); + // set permissions + if (osType !== 'Windows_NT') { + logger.info(binary.name + ': setting permissions to 0755 for ' + mv); + if (binary.id() !== binaries_1.AndroidSDK.id) { + fs.chmodSync(mv, '0755'); + } + else { + fs.chmodSync(path.resolve(mv, 'tools', 'android'), '0755'); + fs.chmodSync(path.resolve(mv, 'tools', 'emulator'), '0755'); + // TODO(sjelin): get 64 bit versions working + } + } +} +function installAppium(binary, outputDir) { + logger.info('appium: installing appium'); + let folder = path.resolve(outputDir, binary.filename()); + try { + rimraf.sync(folder); + } + catch (err) { + } + fs.mkdirSync(folder); + fs.writeFileSync(path.resolve(folder, 'package.json'), JSON.stringify({ scripts: { appium: 'appium' } })); + utils_1.spawn('npm', ['install', 'appium@' + binary.version()], null, { cwd: folder }); +} +function updateBrowserFile(binary, outputDir) { + let currentDownload = path.resolve(outputDir, binary.executableFilename()); + // if browserFile[id] exists, we should update it + if (browserFile[binary.id()]) { + let binaryPath = browserFile[binary.id()]; + if (binaryPath.last === currentDownload) { + return; + } + else { + binaryPath.last = currentDownload; + for (let bin of binaryPath.all) { + if (bin === currentDownload) { + return; + } + } + binaryPath.all.push(currentDownload); + } + } + else { + // The browserFile[id] does not exist / has not been downloaded previously. + // We should create the entry. + let binaryPath = { last: currentDownload, all: [currentDownload] }; + browserFile[binary.id()] = binaryPath; + } +} +function writeBrowserFile(outputDir) { + let filePath = path.resolve(outputDir, 'update-config.json'); + fs.writeFileSync(filePath, JSON.stringify(browserFile)); +} +// for testing +function clearBrowserFile() { + browserFile = {}; +} +exports.clearBrowserFile = clearBrowserFile; +//# sourceMappingURL=update.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map new file mode 100644 index 00000000..bf3b16ba --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map @@ -0,0 +1 @@ +{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../lib/cmds/update.ts"],"names":[],"mappings":";;AAAA,kCAAkC;AAClC,+CAA+C;AAC/C,yBAAyB;AACzB,qCAAqC;AACrC,6BAA6B;AAC7B,uBAAuB;AACvB,iCAAiC;AAEjC,0CAAwG;AACxG,gCAAgD;AAChD,sCAAiC;AACjC,oCAAiD;AACjD,8CAAwC;AACxC,oCAA+B;AAE/B,0BAA0B;AAC1B,6CAA2E;AAC3E,iCAA4B;AAE5B,eAAM,CAAC,UAAU,GAAG,QAAQ,CAAC;AAE7B,IAAI,MAAM,GAAG,IAAI,YA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7D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,cAAc;AACd;IACE,WAAW,GAAG,EAAE,CAAC;AACnB,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts new file mode 100644 index 00000000..89c28059 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts @@ -0,0 +1,2 @@ +import { Program } from '../cli'; +export declare let program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js new file mode 100644 index 00000000..9fb2e957 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const minimist = require("minimist"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +let logger = new cli_1.Logger('version'); +let prog = new cli_1.Program().command('version', 'get the current version').action(getVersion); +exports.program = prog; +// stand alone runner +let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); +if (argv._[0] === 'version-run') { + prog.run(JSON.parse(JSON.stringify(argv))); +} +function getVersion() { + logger.info('webdriver-manager', config_1.Config.getVersion()); +} +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map new file mode 100644 index 00000000..f1b57a61 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../lib/cmds/version.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AACrC,gCAAgD;AAChD,sCAAiC;AAKjC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,SAAS,CAAC,CAAC;AAEnC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAE/E,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACtE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC;IAChC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;IACE,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,eAAM,CAAC,UAAU,EAAE,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts new file mode 100644 index 00000000..2bef6f06 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts @@ -0,0 +1,58 @@ +export interface ConfigFile { + [key: string]: string; + selenium?: string; + chrome?: string; + gecko?: string; + ie?: string; + android?: string; + appium?: string; + maxChrome?: string; +} +/** + * The configuration for webdriver-manager + * + * The config.json, package.json, and selenium directory are found in the + * same location at the root directory in webdriver-manager. + * + */ +export declare class Config { + static runCommand: string; + static configFile: string; + static packageFile: string; + static nodeModuleName: string; + static cwd: string; + static localInstall: string; + static parentPath: string; + static dir: string; + static folder: string; + static isProjectVersion: boolean; + static isLocalVersion: boolean; + static osArch_: string; + static osType_: string; + static noProxy_: any; + static httpsProxy_: any; + static httpProxy_: any; + static osArch(): string; + static osType(): string; + static noProxy(): string; + static httpProxy(): string; + static httpsProxy(): string; + static getConfigFile_(): string; + static getPackageFile_(): string; + static getSeleniumDir(): string; + static getBaseDir(): string; + /** + * Get the binary versions from the configuration file. + * @returns A map of the versions defined in the configuration file. + */ + static binaryVersions(): ConfigFile; + /** + * Get the CDN urls from the configuration file. + * @returns A map of the CDN versions defined in the configuration file. + */ + static cdnUrls(): ConfigFile; + /** + * Get the package version. + */ + static getVersion(): string; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/config.js b/test-eol-project/node_modules/webdriver-manager/built/lib/config.js new file mode 100644 index 00000000..1fd07120 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/config.js @@ -0,0 +1,95 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = require("os"); +const path = require("path"); +const cli_1 = require("./cli"); +let logger = new cli_1.Logger('config'); +/** + * The configuration for webdriver-manager + * + * The config.json, package.json, and selenium directory are found in the + * same location at the root directory in webdriver-manager. + * + */ +class Config { + static osArch() { + return Config.osArch_; + } + static osType() { + return Config.osType_; + } + static noProxy() { + return Config.noProxy_; + } + static httpProxy() { + return Config.httpProxy_; + } + static httpsProxy() { + return Config.httpsProxy_; + } + static getConfigFile_() { + return path.resolve(Config.dir, '..', Config.configFile); + } + static getPackageFile_() { + return path.resolve(Config.dir, '..', Config.packageFile); + } + static getSeleniumDir() { + return path.resolve(Config.dir, '..', '..', 'selenium/'); + } + static getBaseDir() { + return path.resolve(Config.dir, '..', '..'); + } + /** + * Get the binary versions from the configuration file. + * @returns A map of the versions defined in the configuration file. + */ + static binaryVersions() { + let configFile = require(Config.getConfigFile_()); + let configVersions = {}; + configVersions.selenium = configFile.webdriverVersions.selenium; + configVersions.chrome = configFile.webdriverVersions.chromedriver; + configVersions.gecko = configFile.webdriverVersions.geckodriver; + configVersions.ie = configFile.webdriverVersions.iedriver; + configVersions.android = configFile.webdriverVersions.androidsdk; + configVersions.appium = configFile.webdriverVersions.appium; + configVersions.maxChrome = configFile.webdriverVersions.maxChromedriver; + return configVersions; + } + /** + * Get the CDN urls from the configuration file. + * @returns A map of the CDN versions defined in the configuration file. + */ + static cdnUrls() { + let configFile = require(Config.getConfigFile_()); + let configCdnUrls = {}; + configCdnUrls.selenium = configFile.cdnUrls.selenium; + configCdnUrls.chrome = configFile.cdnUrls.chromedriver; + configCdnUrls.gecko = configFile.cdnUrls.geckodriver; + configCdnUrls.ie = configFile.cdnUrls.iedriver; + configCdnUrls.android = configFile.cdnUrls.androidsdk; + return configCdnUrls; + } + /** + * Get the package version. + */ + static getVersion() { + let packageFile = require(Config.getPackageFile_()); + return packageFile.version; + } +} +Config.configFile = 'config.json'; +Config.packageFile = 'package.json'; +Config.nodeModuleName = 'webdriver-manager'; +Config.cwd = process.cwd(); +Config.parentPath = path.resolve(Config.cwd, '..'); +Config.dir = __dirname; +Config.folder = Config.cwd.replace(Config.parentPath, '').substring(1); +Config.isProjectVersion = Config.folder === Config.nodeModuleName; +Config.isLocalVersion = false; +Config.osArch_ = os.arch(); +Config.osType_ = os.type(); +Config.noProxy_ = process.env.NO_PROXY || process.env.no_proxy; +Config.httpsProxy_ = process.env.HTTPS_PROXY || process.env.https_proxy; +Config.httpProxy_ = process.env.HTTP_PROXY || process.env.http_proxy; +exports.Config = Config; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map new file mode 100644 index 00000000..5a04cc20 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":";;AACA,yBAAyB;AACzB,6BAA6B;AAE7B,+BAA6B;AAG7B,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,QAAQ,CAAC,CAAC;AAalC;;;;;;GAMG;AACH;IAsBE,MAAM,CAAC,MA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OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC5C,UAAG,GAAG,SAAS,CAAC;AAChB,aAAM,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAEhE,uBAAgB,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,cAAc,CAAC;AAC3D,qBAAc,GAAG,KAAK,CAAC;AAEvB,cAAO,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;AACpB,cAAO,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;AACpB,eAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;AACxD,kBAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;AACjE,iBAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AApBvE,wBAgGC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts new file mode 100644 index 00000000..e8fbef5f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts @@ -0,0 +1,14 @@ +import { Binary, BinaryUrl } from '../binaries'; +/** + * The downloaded binary is the binary with the list of versions downloaded. + */ +export declare class DownloadedBinary extends Binary { + versions: string[]; + binary: Binary; + constructor(binary: Binary); + id(): string; + prefix(): string; + suffix(): string; + getUrl(): Promise; + getVersionList(): Promise; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js new file mode 100644 index 00000000..6d00cce0 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const binaries_1 = require("../binaries"); +/** + * The downloaded binary is the binary with the list of versions downloaded. + */ +class DownloadedBinary extends binaries_1.Binary { + constructor(binary) { + super(); + this.versions = []; + this.binary = binary; + this.name = binary.name; + this.versionCustom = binary.versionCustom; + } + id() { + return this.binary.id(); + } + prefix() { + return null; + } + suffix() { + return null; + } + getUrl() { + return null; + } + getVersionList() { + return null; + } +} +exports.DownloadedBinary = DownloadedBinary; +//# sourceMappingURL=downloaded_binary.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map new file mode 100644 index 00000000..f88f1348 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"downloaded_binary.js","sourceRoot":"","sources":["../../../lib/files/downloaded_binary.ts"],"names":[],"mappings":";;AAAA,0CAA8C;AAE9C;;GAEG;AACH,sBAA8B,SAAQ,iBAAM;IAI1C,YAAY,MAAc;QACxB,KAAK,EAAE,CAAC;QAJV,aAAQ,GAAa,EAAE,CAAC;QAKtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IAC5C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,MAAM;QACJ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,MAAM;QACJ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;CACF;AA3BD,4CA2BC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts new file mode 100644 index 00000000..3cc75e4d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts @@ -0,0 +1,20 @@ +import { Binary } from '../binaries'; +/** + * The file downloader. + */ +export declare class Downloader { + /** + * Http get the file. Check the content length of the file before writing the file. + * If the content length does not match, remove it and download the file. + * + * @param binary The binary of interest. + * @param fileName The file name. + * @param outputDir The directory where files are downloaded and stored. + * @param contentLength The content length of the existing file. + * @param opt_proxy The proxy for downloading files. + * @param opt_callback Callback method to be executed after the file is downloaded. + * @returns Promise Resolves true = downloaded. Resolves false = not downloaded. + * Rejected with an error. + */ + static getFile(binary: Binary, fileUrl: string, fileName: string, outputDir: string, contentLength: number, callback?: Function): Promise; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js new file mode 100644 index 00000000..067389cf --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const path = require("path"); +const request = require("request"); +const url = require("url"); +const cli_1 = require("../cli"); +const http_utils_1 = require("../http_utils"); +let logger = new cli_1.Logger('downloader'); +/** + * The file downloader. + */ +class Downloader { + /** + * Http get the file. Check the content length of the file before writing the file. + * If the content length does not match, remove it and download the file. + * + * @param binary The binary of interest. + * @param fileName The file name. + * @param outputDir The directory where files are downloaded and stored. + * @param contentLength The content length of the existing file. + * @param opt_proxy The proxy for downloading files. + * @param opt_callback Callback method to be executed after the file is downloaded. + * @returns Promise Resolves true = downloaded. Resolves false = not downloaded. + * Rejected with an error. + */ + static getFile(binary, fileUrl, fileName, outputDir, contentLength, callback) { + let filePath = path.resolve(outputDir, fileName); + let file; + let options = http_utils_1.HttpUtils.initOptions(fileUrl); + let req = null; + let resContentLength; + return new Promise((resolve, reject) => { + req = request(options); + req.on('response', response => { + if (response.statusCode === 200) { + resContentLength = +response.headers['content-length']; + if (contentLength === resContentLength) { + // if the size is the same, do not download and stop here + response.destroy(); + resolve(false); + } + else { + let curl = outputDir + '/' + fileName + ' ' + options.url; + if (http_utils_1.HttpUtils.requestOpts.proxy) { + let pathUrl = url.parse(options.url.toString()).path; + let host = url.parse(options.url.toString()).host; + let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); + curl = outputDir + '/' + fileName + ' \'' + newFileUrl + + '\' -H \'host:' + host + '\''; + } + if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { + curl = 'k ' + curl; + } + logger.info('curl -o' + curl); + // only pipe if the headers are different length + file = fs.createWriteStream(filePath); + req.pipe(file); + file.on('close', () => { + fs.stat(filePath, (error, stats) => { + if (error) { + error.msg = 'Error: Got error ' + error + ' from ' + fileUrl; + return reject(error); + } + if (stats.size != resContentLength) { + error.msg = 'Error: corrupt download for ' + fileName + + '. Please re-run webdriver-manager update'; + fs.unlinkSync(filePath); + reject(error); + } + if (callback) { + callback(binary, outputDir, fileName); + } + resolve(true); + }); + }); + } + } + else { + let error = new Error(); + error.msg = + 'Expected response code 200, received: ' + response.statusCode; + reject(error); + } + }); + req.on('error', error => { + if (error.code === 'ETIMEDOUT') { + error.msg = 'Connection timeout downloading: ' + fileUrl + + '. Default timeout is 4 minutes.'; + } + else if (error.connect) { + error.msg = 'Could not connect to the server to download: ' + fileUrl; + } + reject(error); + }); + }) + .catch(error => { + logger.error(error.msg || error.message); + }); + } +} +exports.Downloader = Downloader; +//# sourceMappingURL=downloader.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map new file mode 100644 index 00000000..63858282 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"downloader.js","sourceRoot":"","sources":["../../../lib/files/downloader.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,mCAAmC;AACnC,2BAA2B;AAG3B,gCAA8B;AAE9B,8CAAwC;AAExC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,YAAY,CAAC,CAAC;AAEtC;;GAEG;AACH;IACE;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,OAAO,CACV,MAAc,EAAE,OAAe,EAAE,QAAgB,EAAE,SAAiB,EAAE,aAAqB,EAC3F,QAAmB;QACrB,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACjD,IAAI,IAAS,CAAC;QAEd,IAAI,OAAO,GAAG,sBAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAE7C,IAAI,GAAG,GAAoB,IAAI,CAAC;QAChC,IAAI,gBAAwB,CAAC;QAE7B,MAAM,CAAC,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,MAAM;YACnC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;YACvB,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ;gBACzB,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC;oBAChC,gBAAgB,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;oBACvD,EAAE,CAAC,CAAC,aAAa,KAAK,gBAAgB,CAAC,CAAC,CAAC;wBACvC,yDAAyD;wBACzD,QAAQ,CAAC,OAAO,EAAE,CAAC;wBACnB,OAAO,CAAC,KAAK,CAAC,CAAC;oBACjB,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,IAAI,IAAI,GAAG,SAAS,GAAG,GA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7D,CAAC,CAAC,CAAC;IACT,CAAC;CACF;AA5FD,gCA4FC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts new file mode 100644 index 00000000..7edf34ee --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts @@ -0,0 +1,72 @@ +import { Binary, BinaryMap } from '../binaries'; +import { DownloadedBinary } from './downloaded_binary'; +/** + * The File Manager class is where the webdriver manager will compile a list of + * binaries that could be downloaded and get a list of previously downloaded + * file versions. + */ +export declare class FileManager { + /** + * Create a directory if it does not exist. + * @param outputDir The directory to create. + */ + static makeOutputDirectory(outputDir: string): void; + /** + * For the operating system, check against the list of operating systems that the + * binary is available for. + * @param osType The operating system. + * @param binary The class type to have access to the static properties. + * @returns If the binary is available for the operating system. + */ + static checkOS_(osType: string, binary: typeof Binary): boolean; + /** + * For the operating system, create a list that includes the binaries + * for selenium standalone, chrome, and internet explorer. + * @param osType The operating system. + * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. + * @returns A binary map that are available for the operating system. + */ + static compileBinaries_(osType: string, alternateCDN?: string): BinaryMap; + /** + * Look up the operating system and compile a list of binaries that are available + * for the system. + * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. + * @returns A binary map that is available for the operating system. + */ + static setupBinaries(alternateCDN?: string): BinaryMap; + /** + * Get the list of existing files from the output directory + * @param outputDir The directory where binaries are saved + * @returns A list of existing files. + */ + static getExistingFiles(outputDir: string): string[]; + /** + * For the binary, operating system, and system architecture, look through + * the existing files and the downloaded binary + * @param binary The binary of interest + * @param osType The operating system. + * @param existingFiles A list of existing files. + * @returns The downloaded binary with all the versions found. + */ + static downloadedVersions_(binary: T, osType: string, arch: string, existingFiles: string[]): DownloadedBinary; + /** + * Finds all the downloaded binary versions stored in the output directory. + * @param outputDir The directory where files are downloaded and stored. + * @returns An dictionary map of all the downloaded binaries found in the output folder. + */ + static downloadedBinaries(outputDir: string): BinaryMap; + /** + * Try to download the binary version. + * @param binary The binary of interest. + * @param outputDir The directory where files are downloaded and stored. + * @returns Promise resolved to true for files downloaded, resolved to false for files not + * downloaded because they exist, rejected if there is an error. + */ + static downloadFile(binary: T, outputDir: string, callback?: Function): Promise; + /** + * Removes the existing files found in the output directory that match the + * binary prefix names. + * @param outputDir The directory where files are downloaded and stored. + */ + static removeExistingFiles(outputDir: string): void; +} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js new file mode 100644 index 00000000..761cbff2 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js @@ -0,0 +1,239 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("fs"); +const path = require("path"); +const binaries_1 = require("../binaries"); +const cli_1 = require("../cli"); +const config_1 = require("../config"); +const downloaded_binary_1 = require("./downloaded_binary"); +const downloader_1 = require("./downloader"); +let logger = new cli_1.Logger('file_manager'); +/** + * The File Manager class is where the webdriver manager will compile a list of + * binaries that could be downloaded and get a list of previously downloaded + * file versions. + */ +class FileManager { + /** + * Create a directory if it does not exist. + * @param outputDir The directory to create. + */ + static makeOutputDirectory(outputDir) { + try { + fs.statSync(outputDir); + } + catch (e) { + logger.info('creating folder ' + outputDir); + fs.mkdirSync(outputDir); + } + } + /** + * For the operating system, check against the list of operating systems that the + * binary is available for. + * @param osType The operating system. + * @param binary The class type to have access to the static properties. + * @returns If the binary is available for the operating system. + */ + static checkOS_(osType, binary) { + for (let os in binary.os) { + if (binaries_1.OS[os] == osType) { + return true; + } + } + return false; + } + /** + * For the operating system, create a list that includes the binaries + * for selenium standalone, chrome, and internet explorer. + * @param osType The operating system. + * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. + * @returns A binary map that are available for the operating system. + */ + static compileBinaries_(osType, alternateCDN) { + let binaries = {}; + if (FileManager.checkOS_(osType, binaries_1.Standalone)) { + binaries[binaries_1.Standalone.id] = new binaries_1.Standalone(alternateCDN); + } + if (FileManager.checkOS_(osType, binaries_1.ChromeDriver)) { + binaries[binaries_1.ChromeDriver.id] = new binaries_1.ChromeDriver(alternateCDN); + } + if (FileManager.checkOS_(osType, binaries_1.GeckoDriver)) { + binaries[binaries_1.GeckoDriver.id] = new binaries_1.GeckoDriver(alternateCDN); + } + if (FileManager.checkOS_(osType, binaries_1.IEDriver)) { + binaries[binaries_1.IEDriver.id] = new binaries_1.IEDriver(alternateCDN); + } + if (FileManager.checkOS_(osType, binaries_1.AndroidSDK)) { + binaries[binaries_1.AndroidSDK.id] = new binaries_1.AndroidSDK(alternateCDN); + } + if (FileManager.checkOS_(osType, binaries_1.Appium)) { + binaries[binaries_1.Appium.id] = new binaries_1.Appium(alternateCDN); + } + return binaries; + } + /** + * Look up the operating system and compile a list of binaries that are available + * for the system. + * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. + * @returns A binary map that is available for the operating system. + */ + static setupBinaries(alternateCDN) { + return FileManager.compileBinaries_(config_1.Config.osType(), alternateCDN); + } + /** + * Get the list of existing files from the output directory + * @param outputDir The directory where binaries are saved + * @returns A list of existing files. + */ + static getExistingFiles(outputDir) { + try { + return fs.readdirSync(outputDir); + } + catch (e) { + return []; + } + } + /** + * For the binary, operating system, and system architecture, look through + * the existing files and the downloaded binary + * @param binary The binary of interest + * @param osType The operating system. + * @param existingFiles A list of existing files. + * @returns The downloaded binary with all the versions found. + */ + static downloadedVersions_(binary, osType, arch, existingFiles) { + let versions = []; + for (let existPos in existingFiles) { + let existFile = existingFiles[existPos]; + // use only files that have a prefix and suffix that we care about + if (existFile.indexOf(binary.prefix()) === 0) { + let editExistFile = existFile.replace(binary.prefix(), ''); + // if the suffix matches the executable suffix, add it + if (binary.suffix() === binary.executableSuffix()) { + versions.push(editExistFile.replace(binary.suffix(), '')); + } + else if (!existFile.endsWith('.zip') && !existFile.endsWith('.tar.gz') && + existFile.indexOf(binary.suffix()) === -1) { + editExistFile = editExistFile.replace(binary.executableSuffix(), ''); + editExistFile = editExistFile.indexOf('_') === 0 ? + editExistFile.substring(1, editExistFile.length) : + editExistFile; + versions.push(editExistFile); + } + } + } + if (versions.length === 0) { + return null; + } + let downloadedBinary = new downloaded_binary_1.DownloadedBinary(binary); + downloadedBinary.versions = versions; + return downloadedBinary; + } + /** + * Finds all the downloaded binary versions stored in the output directory. + * @param outputDir The directory where files are downloaded and stored. + * @returns An dictionary map of all the downloaded binaries found in the output folder. + */ + static downloadedBinaries(outputDir) { + let ostype = config_1.Config.osType(); + let arch = config_1.Config.osArch(); + let binaries = FileManager.setupBinaries(); + let existingFiles = FileManager.getExistingFiles(outputDir); + let downloaded = {}; + for (let bin in binaries) { + let binary = FileManager.downloadedVersions_(binaries[bin], ostype, arch, existingFiles); + if (binary != null) { + downloaded[binary.id()] = binary; + } + } + return downloaded; + } + /** + * Try to download the binary version. + * @param binary The binary of interest. + * @param outputDir The directory where files are downloaded and stored. + * @returns Promise resolved to true for files downloaded, resolved to false for files not + * downloaded because they exist, rejected if there is an error. + */ + static downloadFile(binary, outputDir, callback) { + return new Promise((resolve, reject) => { + let outDir = config_1.Config.getSeleniumDir(); + let downloaded = FileManager.downloadedBinaries(outputDir); + let contentLength = 0; + // Pass options down to binary to make request to get the latest version to download. + binary.getUrl(binary.version()).then(fileUrl => { + binary.versionCustom = fileUrl.version; + let filePath = path.resolve(outputDir, binary.filename()); + let fileName = binary.filename(); + // If we have downloaded the file before, check the content length + if (downloaded[binary.id()]) { + let downloadedBinary = downloaded[binary.id()]; + let versions = downloadedBinary.versions; + let version = binary.versionCustom; + for (let index in versions) { + let v = versions[index]; + if (v === version) { + contentLength = fs.statSync(filePath).size; + downloader_1.Downloader.getFile(binary, fileUrl.url, fileName, outputDir, contentLength, callback) + .then(downloaded => { + resolve(downloaded); + }); + } + } + } + // We have not downloaded it before, or the version does not exist. Use the default content + // length of zero and download the file. + downloader_1.Downloader.getFile(binary, fileUrl.url, fileName, outputDir, contentLength, callback) + .then(downloaded => { + resolve(downloaded); + }); + }); + }); + } + /** + * Removes the existing files found in the output directory that match the + * binary prefix names. + * @param outputDir The directory where files are downloaded and stored. + */ + static removeExistingFiles(outputDir) { + try { + fs.statSync(outputDir); + } + catch (e) { + logger.warn('path does not exist ' + outputDir); + return; + } + let existingFiles = FileManager.getExistingFiles(outputDir); + if (existingFiles.length === 0) { + logger.warn('no files found in path ' + outputDir); + return; + } + let binaries = FileManager.setupBinaries(); + existingFiles.forEach((file) => { + for (let binPos in binaries) { + let bin = binaries[binPos]; + if (file.indexOf(bin.prefix()) !== -1) { + bin.remove(path.resolve(outputDir, file)); + logger.info('removed ' + file); + } + } + }); + let metaFiles = [ + 'chrome-response.xml', 'gecko-response.json', 'iedriver-response.xml', + 'standalone-response.xml', 'update-config.json' + ]; + for (let metaFile of metaFiles) { + try { + let metaFilePath = path.resolve(outputDir, metaFile); + if (fs.statSync(metaFilePath)) { + fs.unlinkSync(metaFilePath); + logger.info('removed ' + metaFile); + } + } + catch (e) { + } + } + } +} +exports.FileManager = FileManager; +//# sourceMappingURL=file_manager.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map new file mode 100644 index 00000000..e693a4f2 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"file_manager.js","sourceRoot":"","sources":["../../../lib/files/file_manager.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAG7B,0CAAuH;AACvH,gCAA8B;AAC9B,sCAAiC;AAEjC,2DAAqD;AACrD,6CAAwC;AAExC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,cAAc,CAAC,CAAC;AAExC;;;;GAIG;AACH;IACE;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAiB;QAC1C,IAAI,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GAAG,CAAC,CAAC,IAAI,QAAQ,IAAI,SAAS,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC;gBACH,IAAI,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBACrD,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;oBAC9B,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;oBAC5B,MAAM,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC;gBACrC,CAAC;YACH,CAAC;YAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACb,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA9OD,kCA8OC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts new file mode 100644 index 00000000..74536c2e --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts @@ -0,0 +1,3 @@ +export * from './downloaded_binary'; +export * from './downloader'; +export * from './file_manager'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js new file mode 100644 index 00000000..0596600f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js @@ -0,0 +1,9 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./downloaded_binary")); +__export(require("./downloader")); +__export(require("./file_manager")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map new file mode 100644 index 00000000..222383da --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/files/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAAoC;AACpC,kCAA6B;AAC7B,oCAA+B"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts new file mode 100644 index 00000000..61d9449d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts @@ -0,0 +1,27 @@ +/// +import { OptionsWithUrl } from 'request'; +export interface RequestOptionsValue { + proxy?: string; + ignoreSSL?: boolean; +} +export declare class HttpUtils { + static requestOpts: RequestOptionsValue; + static assignOptions(options: RequestOptionsValue): void; + static initOptions(url: string, timeout?: number): OptionsWithUrl; + static optionsSSL(options: OptionsWithUrl, opt_ignoreSSL: boolean): OptionsWithUrl; + static optionsProxy(options: OptionsWithUrl, requestUrl: string, opt_proxy: string): OptionsWithUrl; + static optionsHeader(options: OptionsWithUrl, key: string, value: string): OptionsWithUrl; + /** + * Resolves proxy based on values set + * @param fileUrl The url to download the file. + * @param opt_proxy The proxy to connect to to download files. + * @return Either undefined or the proxy. + */ + static resolveProxy(fileUrl: string, opt_proxy?: string): string; +} +/** + * Request the body from the url. + * @param requestUrl The request url. + * @returns A promise string of the response body. + */ +export declare function requestBody(requestUrl: string): Promise; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js new file mode 100644 index 00000000..6122ea73 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js @@ -0,0 +1,118 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const request = require("request"); +const url = require("url"); +const logger_1 = require("./cli/logger"); +const config_1 = require("./config"); +let logger = new logger_1.Logger('http_utils'); +class HttpUtils { + static assignOptions(options) { + Object.assign(HttpUtils.requestOpts, options); + } + static initOptions(url, timeout) { + let options = { + url: url, + // default Linux can be anywhere from 20-120 seconds + // increasing this arbitrarily to 4 minutes + timeout: 240000 + }; + HttpUtils.optionsSSL(options, HttpUtils.requestOpts.ignoreSSL); + HttpUtils.optionsProxy(options, url, HttpUtils.requestOpts.proxy); + return options; + } + static optionsSSL(options, opt_ignoreSSL) { + if (opt_ignoreSSL) { + logger.info('ignoring SSL certificate'); + options.strictSSL = !opt_ignoreSSL; + options.rejectUnauthorized = !opt_ignoreSSL; + } + return options; + } + static optionsProxy(options, requestUrl, opt_proxy) { + if (opt_proxy) { + options.proxy = HttpUtils.resolveProxy(requestUrl, opt_proxy); + if (url.parse(requestUrl).protocol === 'https:') { + options.url = requestUrl.replace('https:', 'http:'); + } + } + return options; + } + static optionsHeader(options, key, value) { + if (options.headers == null) { + options.headers = {}; + } + options.headers[key] = value; + return options; + } + /** + * Resolves proxy based on values set + * @param fileUrl The url to download the file. + * @param opt_proxy The proxy to connect to to download files. + * @return Either undefined or the proxy. + */ + static resolveProxy(fileUrl, opt_proxy) { + let protocol = url.parse(fileUrl).protocol; + let hostname = url.parse(fileUrl).hostname; + if (opt_proxy) { + return opt_proxy; + } + else { + // If the NO_PROXY environment variable exists and matches the host name, + // to ignore the resolve proxy. + // the checks to see if it exists and equal to empty string is to help with testing + let noProxy = config_1.Config.noProxy(); + if (noProxy) { + // array of hostnames/domain names listed in the NO_PROXY environment variable + let noProxyTokens = noProxy.split(','); + // check if the fileUrl hostname part does not end with one of the + // NO_PROXY environment variable's hostnames/domain names + for (let noProxyToken of noProxyTokens) { + if (hostname.indexOf(noProxyToken) !== -1) { + return undefined; + } + } + } + // If the HTTPS_PROXY and HTTP_PROXY environment variable is set, use that as the proxy + if (protocol === 'https:') { + return config_1.Config.httpsProxy() || config_1.Config.httpProxy(); + } + else if (protocol === 'http:') { + return config_1.Config.httpProxy(); + } + } + return undefined; + } +} +HttpUtils.requestOpts = {}; +exports.HttpUtils = HttpUtils; +/** + * Request the body from the url. + * @param requestUrl The request url. + * @returns A promise string of the response body. + */ +function requestBody(requestUrl) { + const options = HttpUtils.initOptions(requestUrl); + options.followRedirect = true; + return new Promise((resolve, reject) => { + const req = request(options); + req.on('response', response => { + if (response.statusCode === 200) { + let output = ''; + response.on('data', (data) => { + output += data; + }); + response.on('end', () => { + resolve(output); + }); + } + else { + reject(new Error('response status code is not 200')); + } + }); + req.on('error', error => { + reject(error); + }); + }); +} +exports.requestBody = requestBody; +//# sourceMappingURL=http_utils.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map new file mode 100644 index 00000000..5a67b445 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"http_utils.js","sourceRoot":"","sources":["../../lib/http_utils.ts"],"names":[],"mappings":";;AAAA,mCAAmC;AAEnC,2BAA2B;AAE3B,yCAAoC;AACpC,qCAAgC;AAEhC,IAAI,MAAM,GAAG,IAAI,eAAM,CAAC,YAAY,CAAC,CAAC;AAOtC;IAEE,MAAM,CAAC,aAAa,CAAC,OAA4B;QAC/C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,OAAgB;QAC9C,IAAI,OAAO,GAAmB;YAC5B,GAAG,EAAE,GAAG;YACR,oDAAoD;YACpD,2CAA2C;YAC3C,OAAO,EAAE,MAAM;SAChB,CAAC;QACF,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC/D,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,CAAC,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAuB,EAAE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AG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7B,GAAG,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ;YACzB,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC;gBAChC,IAAI,MAAM,GAAG,EAAE,CAAC;gBAChB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI;oBACvB,MAAM,IAAI,IAAI,CAAC;gBACjB,CAAC,CAAC,CAAC;gBACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;oBACjB,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClB,CAAC,CAAC,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;YACvD,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK;YACnB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,kCAsBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts new file mode 100644 index 00000000..21740b35 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts @@ -0,0 +1,6 @@ +/// +import * as child_process from 'child_process'; +export declare let spawn: (cmd: string, args: string[], stdio?: any, opts?: child_process.SpawnOptions) => child_process.ChildProcess; +export declare let spawnSync: (cmd: string, args: string[], stdio?: any, opts?: child_process.SpawnSyncOptions) => child_process.SpawnSyncReturns; +export declare function request(method: string, port: string, path: string, timeout?: number, data?: any): Promise; +export declare function adb(sdkPath: string, port: number, command: string, timeout: number, args?: string[]): Promise; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js new file mode 100644 index 00000000..cb33251f --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js @@ -0,0 +1,115 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const child_process = require("child_process"); +const fs = require("fs"); +const http = require("http"); +const path = require("path"); +const config_1 = require("./config"); +function spawnFactory(sync) { + return (cmd, args, stdio, opts) => { + if ((config_1.Config.osType() === 'Windows_NT') && (cmd.slice(-4) !== '.exe')) { + if (fs.existsSync(cmd + '.exe')) { + cmd += '.exe'; + } + else { + args = ['/c'].concat([cmd], args); + cmd = 'cmd'; + } + } + if (stdio) { + opts = opts || {}; + opts.stdio = stdio; + } + if (sync) { + return child_process.spawnSync(cmd, args, opts); + } + else { + return child_process.spawn(cmd, args, opts); + } + }; +} +exports.spawn = spawnFactory(false); +exports.spawnSync = spawnFactory(true); +function request(method, port, path, timeout, data) { + let headers = {}; + let hasContent = data && ((method == 'POST') || (method == 'PUT')); + if (hasContent) { + data = data ? JSON.stringify(data) : ''; + headers['Content-Length'] = data.length; + headers['Content-Type'] = 'application/json;charset=UTF-8'; + } + return new Promise((resolve, reject) => { + let unexpectedEnd = () => { + reject({ code: 'UNKNOWN', message: 'Request ended unexpectedly' }); + }; + let req = http.request({ port: parseInt(port), method: method, path: path, headers: headers }, (res) => { + req.removeListener('end', unexpectedEnd); + if (res.statusCode !== 200) { + reject({ code: res.statusCode, message: res.statusMessage }); + } + else { + let buffer = []; + res.on('data', buffer.push.bind(buffer)); + res.on('end', () => { + resolve(buffer.join('').replace(/\0/g, '')); + }); + } + }); + if (timeout) { + req.setTimeout(timeout, () => { + reject({ code: 'TIMEOUT', message: 'Request timed out' }); + }); + } + req.on('error', reject); + req.on('end', unexpectedEnd); + if (hasContent) { + req.write(data); + } + req.end(); + }); +} +exports.request = request; +function adb(sdkPath, port, command, timeout, args) { + return new Promise((resolve, reject) => { + let child = exports.spawn(path.resolve(sdkPath, 'platform-tools', 'adb'), ['-s', 'emulator-' + port, command].concat(args || []), 'pipe'); + let done = false; + let buffer = []; + child.stdout.on('data', buffer.push.bind(buffer)); + child.on('error', (err) => { + if (!done) { + done = true; + reject(err); + } + }); + child.on('exit', (code, signal) => { + if (!done) { + done = true; + if (code === 0) { + resolve(buffer.join('')); + } + else { + reject({ + code: code, + message: 'abd command "' + command + '" ' + + (signal ? 'received signal ' + signal : 'returned with a non-zero exit code') + + 'for emulator-' + port + }); + } + } + }); + if (timeout) { + setTimeout(() => { + if (!done) { + done = true; + child.kill(); + reject({ + code: 'TIMEOUT', + message: 'adb command "' + command + '" timed out for emulator-' + port + }); + } + }, timeout); + } + }); +} +exports.adb = adb; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map new file mode 100644 index 00000000..72cd0023 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAC/C,yBAAyB;AACzB,6BAA6B;AAC7B,6BAA6B;AAE7B,qCAAgC;AAQhC,sBAAsB,IAAa;IAIjC,MAAM,CAAC,CAAC,GAAW,EAAE,IAAc,EAAE,KAAc,EAC3C,IAAgE;QACtE,EAAE,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,KAAK,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;YACrE,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAChC,GAAG,IAAI,MAAM,CAAC;YAChB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,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,IAAI,CAAC,CAAC;oBACN,MAAM,CAAC;wBACL,IAAI,EAAE,IAAI;wBACV,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,IAAI;4BACrC,CAAC,MAAM,GAAG,kBAAkB,GAAG,MAAM,GAAG,oCAAoC,CAAC;4BAC7E,eAAe,GAAG,IAAI;qBAC3B,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACZ,UAAU,CAAC;gBACT,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBACV,IAAI,GAAG,IAAI,CAAC;oBACZ,KAAK,CAAC,IAAI,EAAE,CAAC;oBACb,MAAM,CAAC;wBACL,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,2BAA2B,GAAG,IAAI;qBACxE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,EAAE,OAAO,CAAC,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA5CD,kBA4CC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js new file mode 100644 index 00000000..4e661448 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const minimist = require("minimist"); +const cli_instance_1 = require("./cli_instance"); +let minimistOptions = cli_instance_1.cli.getMinimistOptions(); +let argv = minimist(process.argv.slice(2), minimistOptions); +let cmd = argv._; +if (cli_instance_1.cli.programs[cmd[0]]) { + if (cmd[0] === 'help') { + cli_instance_1.cli.printHelp(); + } + else if (cmd[1] === 'help' || argv['help'] || argv['h']) { + cli_instance_1.cli.programs[cmd[0]].printHelp(); + } + else { + cli_instance_1.cli.programs[cmd[0]].run(JSON.parse(JSON.stringify(argv))); + } +} +else { + cli_instance_1.cli.printHelp(); +} +//# sourceMappingURL=webdriver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map new file mode 100644 index 00000000..12cbdf5b --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webdriver.js","sourceRoot":"","sources":["../../lib/webdriver.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AAErC,iDAAkD;AAElD,IAAI,eAAe,GAAG,kBAAW,CAAC,kBAAkB,EAAE,CAAC;AACvD,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;AAC5D,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;AACjB,EAAE,CAAC,CAAC,kBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;QACtB,kBAAW,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC1D,kBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3C,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,kBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAAC,IAAI,CAAC,CAAC;IACN,kBAAW,CAAC,SAAS,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/package.json b/test-eol-project/node_modules/webdriver-manager/built/package.json new file mode 100644 index 00000000..08490842 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/built/package.json @@ -0,0 +1,81 @@ +{ + "name": "webdriver-manager", + "version": "12.1.9", + "description": "A selenium server and browser driver manager for your end to end tests.", + "scripts": { + "format": "gulp format", + "format-enforce": "gulp format:enforce", + "gulp": "gulp", + "jasmine": "jasmine", + "prepublish": "npm run format-enforce && tsc && gulp copy", + "tsc": "tsc", + "pretest": "tsc && gulp copy", + "test": "npm run test-unit && npm run test-e2e", + "test-unit": "jasmine", + "pretest-e2e:update": "node ./bin/webdriver-manager update", + "pretest-e2e:start": "node ./bin/webdriver-manager start --detach --seleniumPort 4444 --quiet", + "pretest-e2e": "npm run pretest && npm run pretest-e2e:update && npm run pretest-e2e:start", + "test-e2e": "jasmine JASMINE_CONFIG_PATH=e2e_spec/support/headless.json", + "posttest-e2e": "node ./bin/webdriver-manager shutdown" + }, + "keywords": [ + "angular", + "test", + "testing", + "protractor", + "webdriver", + "webdriverjs", + "selenium", + "selenium-webdriver" + ], + "repository": { + "type": "git", + "url": "git://github.com/angular/webdriver-manager.git" + }, + "bin": { + "webdriver-manager": "bin/webdriver-manager" + }, + "main": "built/lib/webdriver.js", + "author": "Craig Nishina ", + "license": "MIT", + "dependencies": { + "adm-zip": "^0.5.2", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.87.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" + }, + "devDependencies": { + "@types/adm-zip": "^0.5.0", + "@types/chalk": "^0.4.28", + "@types/form-data": "^0.0.33", + "@types/glob": "^5.0.29", + "@types/ini": "^1.3.28", + "@types/jasmine": "^2.5.43", + "@types/minimatch": "^2.0.28", + "@types/minimist": "^1.1.28", + "@types/node": "^7.0.4", + "@types/q": "^0.0.32", + "@types/request": "^0.0.39", + "@types/rimraf": "^0.0.28", + "@types/selenium-webdriver": "^2.53.35", + "@types/semver": "^5.3.30", + "@types/xml2js": "0.0.32", + "clang-format": "^1.0.35", + "gulp": "^4.0.0", + "gulp-clang-format": "^1.0.23", + "jasmine": "^2.4.1", + "run-sequence": "^1.1.5", + "selenium-webdriver": "~3.0.1", + "typescript": "~2.3.0" + }, + "engines": { + "node": ">=6.9.x" + } +} diff --git a/test-eol-project/node_modules/webdriver-manager/config.json b/test-eol-project/node_modules/webdriver-manager/config.json new file mode 100644 index 00000000..cc7625a6 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/config.json @@ -0,0 +1,18 @@ +{ + "webdriverVersions": { + "selenium": "2.53.1", + "chromedriver": "2.27", + "maxChromedriver": "77", + "geckodriver": "v0.13.0", + "iedriver": "2.53.1", + "androidsdk": "24.4.1", + "appium": "1.6.5" + }, + "cdnUrls": { + "selenium": "https://selenium-release.storage.googleapis.com/", + "chromedriver": "https://chromedriver.storage.googleapis.com/", + "geckodriver": "https://github.com/mozilla/geckodriver/releases/download/", + "iedriver": "https://selenium-release.storage.googleapis.com/", + "androidsdk": "http://dl.google.com/android/" + } +} diff --git a/test-eol-project/node_modules/webdriver-manager/docs/README.md b/test-eol-project/node_modules/webdriver-manager/docs/README.md new file mode 100644 index 00000000..efc1fb5d --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/docs/README.md @@ -0,0 +1,6 @@ +# Contents + +- [main page](../README.md) +- [mobile browser support](mobile.md) +- [protractor support](protractor.md) +- [set specific versions](versions.md) diff --git a/test-eol-project/node_modules/webdriver-manager/docs/mobile.md b/test-eol-project/node_modules/webdriver-manager/docs/mobile.md new file mode 100644 index 00000000..64ddd36a --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/docs/mobile.md @@ -0,0 +1,79 @@ +Mobile Browser Support +====================== + +Support for mobile browsers is provided via [appium](https://github.com/appium/appium). If you +have used `webdriver-manager update --android` or `webdriver-manager update --ios`, when you run +`webdriver-manager start`, Appium will automatically start on the port specified by `--appium-port`. + + +Android SDK +----------- + +`webdriver-manager` will not install the android SDK by default. If you want to test on android, +run `webdriver-manager update --android`. This will download the android SDK, Appium, and set up +some virtual android devices for you to run tests against. By default, this will create only an +android device running version 24 on x86-64. If you need a different device, you must use the +`--android-api-levels` and `--android-abis` flags. So you might run a command like this: + +``` +webdriver-manager update --android --android-api-levels 24 --android-archs armeabi-v7a +``` + +Valid values for the `--android-api-levels` flag are: `24` and `25`. You *can* specify a lower +API level, but the virtual device create will not have Chrome installed. + +Valid values for the `--android-archs` flag are: + +* `x86` +* `x86_64` +* `armeabi-v7a` (or possibly some other 32-bit ARM architecture) +* `arm64-v8a` (or possibly some other 64-bit ARM architecture) +* `mips` + +Note that we always use the `google_apis/*` ABIs, since only those versions comes with chrome. So +if you specify `--android-archs x86_64`, this tool will use the ABI `google_apis/x86_64`. If you +wish to use a different platform (i.e. `android-wear`, `android-tv` or `default`), you can do so +with the `--android-platforms` flag. But only the `google_apis` version comes with Chrome. + + +As a practical matter, if you don't want to manually accept the license agreements, you can use +`--android-accept-licenses`, which will accept them on your behalf. + +Once you have installed the Android SDK with the virtual devices you need, use +`webdriver-manager start --android` to boot up Appium and begin emulating your android device(s). +By default `webdriver-manager` will emulate all available android devices. If you would rather +emulate a specific device, use `--avds`. So you might use: + +``` +webdriver-manager start --android --avds android-23-default-x86_64 +``` + +If you would prefer not to emulate any android virtual devices, use `--avds none`. + +If you need to specify the ports used by the android virtual devices, use `--avd_port`. The port +you specify will be used for the console of the first device, and the port one higher will be used +for its ADB. The second device will use the next two ports, and so on. + + +### "Welcome to Chome" UI + +Every time appium boots up chrome, a "Welcome to Chrome" dialog will pop up. It won't interfere +with your tests, since the webpage still renders underneath the dialog, and those tests access the +webpage directly. However, you won't be able to watch what's going on unless you manually click +"Accept & Continue". Also, since webdriver boots up a fresh chrome instance every time, chrome +won't remember that you've clicked "Accept & Continue" between tests. Any time you want to actually +watch the test as it's run, you'll need to click through the dialog again. For now, there is no +good way around this sadly (https://github.com/appium/appium/issues/6618). + +iOS +--------- + +When you run `webdriver-manager update --ios`, `webdriver-manager` will install Appium and check +your computer for iOS simulation capabilities. `webdriver-manager` cannot download the xcode +commandline tools for you however, nor can it agree to Apple's user agreement. The xcode +commandline tools come with several virtual devices pre-setup. If you need more, run +`xcrun simctl` for help doing that. + +Once you have installed Appium, `webdriver-manager` will launch it automatically when you run +`webdriver-manager start`. Appium will automatically handle starting iOS device emulation as +needed. diff --git a/test-eol-project/node_modules/webdriver-manager/docs/protractor.md b/test-eol-project/node_modules/webdriver-manager/docs/protractor.md new file mode 100644 index 00000000..0d236ea8 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/docs/protractor.md @@ -0,0 +1,41 @@ +# Protractor support topics + +## Supported browsers + +### Tests with Protractor test suite (v 4.0.13) + +The following are the supported browsers / drivers based on running the +Protractor test suite. Since the test suite checks only firefox and chrome, +these are the only browsers reported. + +### Current supported browsers / drivers + +| selenium standalone | firefox | chromedriver | chrome | +| ------------------- | ------- | ------------ | ------ | +| 2.53.1 | 47.0.1 | 2.26 | 54 | + + +### Investigated + +| selenium standalone | firefox 47.0.1 | firefox 49.0.1 | +| ------------------- | -------------- | -------------- | +| 2.53.1 | pass | fail | +| 3.0.0 | fail | fail | + + +## Driver providers + +There are a couple cases where Protractor launches downloaded binaries +(from webdriver-manager) without specifying which version to use: + +- local driver providers - when no `seleniumAddress`, `directConnect`, saucelabs + or browser stack configuration is set +- direct connect - when setting `directConnect` to true + +Protractor knows which downloaded binaries to use based on the +`update-config.json`. The `update-config.json` is written during the `update` +command and provides the path to the current downloaded version and a list of +all the binaries previously downloaded. + +During the launch of either local driver provider or direct connect, Protractor +will launch the last downloaded binary. diff --git a/test-eol-project/node_modules/webdriver-manager/docs/versions.md b/test-eol-project/node_modules/webdriver-manager/docs/versions.md new file mode 100644 index 00000000..cf581386 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/docs/versions.md @@ -0,0 +1,87 @@ +# update command: downloading specific binaries + +The help command for update. The flags shown here are OS specific. If you are not on a Windows machine, the `--ie` flags are not shown. + +``` +webdriver-manager update help +``` + +Overview when you call `update`: + +* The output directory is created if it does not exist (`out_dir`) +* If this is the first time downloading, it will make web requests to selenium-release.storage.googleapis.com, chromedriver.storage.googleapis.com, and api.github.com. The responses will be stored in the `out_dir` as a cache. +* If this is not the first time downloading, it will look at the cached files in `out_dir` and if the file is older than an hour, it will make a request for new files. Note: api.github.com is rate limited by the ip address making the request. This is an issue for common CI systems like Travis or Circle and have an issue opened for this. +* The response will then be parsed for the url to get the latest version if no version is provided via command line. The latest version will be based on what is available for your OS type and architecture. +* Next we download the file from the url. If the file already exists (based on content length), we cancel the download. +* We uncompress zip and tar files and for linux and mac, we set the permissions. Currently, we always uncompress the files even if the uncompressed files already exist. +* Finally we write the file locations to the `update-config.json` which is also located in the `out_dir`. + +## Download defaults --chrome, --gecko, --standalone flags + +Let's say you want to download just chromedriver... + +``` +webdriver-manager update --gecko false --standalone false +``` + +Why do we set `--gecko` and `--standalone` to false? By default chromedriver, geckodriver and selenium standalone server download with no flags set. Setting `--gecko` and `--standalone` to false will prevent them from downloading and will just download chromedriver. + +## Download using --ie + +When setting the `--ie` flag, this will download IEDriver 32 bit. Why 32-bit? We prefer using the 32-bit version because the 64-bit version has been previously reported to be very slow and flaky. + +## Download a specific version + +Let's say there is an issue with the latest version of chromedriver and we need version 2.20: + +``` +webdriver-manager update --versions.chrome 2.20 +``` + +So the only thing different here is that instead of parsing for the latest version, we are parsing for version 2.20. We could then verify that it was the last item downloaded by calling `webdriver-manager status`. + +What about selenium standalone 2.53.1? This is similar but instead of the flag would be `--versions.standalone 2.53.1`. What if the selenium standalone server has a beta in the name? The idea is similar: + +``` +webdriver-manager update --versions.standalone 3.0.0-beta1 +``` + +# start command: setting specific versions + +The help command for start. + +``` +webdriver-manager start help +``` + +When starting selenium standalone server with `webdriver-manager start`, it will use the latest version that is found in the cache unless you specify the version. Why? The idea here is that if you run `webdriver-manager update` without flags, you are using the latest binary versions, so the start command would be similar `webdriver-manager start`. + +## Starting a specific version + +So let's say you downloaded chromedriver 2.20 and let's also say that the latest version is 2.29. If you have never downloaded 2.29, then chromedriver will not be associated with your selenium standalone server. In order for you to get 2.20 working: + +``` +webdriver-manager start --versions.chrome 2.20 +``` + +What about chrome version 2.20, selenium standalone server 3.0.0-beta1, and not start with gecko driver? + +``` +webdriver-manager start --versions.chrome 2.20 --versions.standalone 3.0.0-beta1 --gecko false +``` + +## Starting with --ie + +Since IEDriver is not set by default, you'll still need to pass this field if you would like to start the selenium standalone server with the IEDriver. + +``` +webdriver-manager start --ie +``` + +## Starting with --edge + +We make the assumption that you already have the EdgeDriver downloaded and installed. To get this working pass the full path to the `--edge` flag + +``` +webdriver-manager start --edge "C:\Program Files (x86)\Microsoft Web Driver\MicrosoftWebDriver.exe" +``` diff --git a/test-eol-project/node_modules/webdriver-manager/gulpfile.js b/test-eol-project/node_modules/webdriver-manager/gulpfile.js new file mode 100644 index 00000000..f397bd1a --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/gulpfile.js @@ -0,0 +1,44 @@ +'use strict'; +const path = require('path'); +const gulp = require('gulp'); +const tsGlobs = ['lib/**/*.ts', '*spec/**/*.ts']; + +let runSpawn = (task, args, done) => { + done = done || function() {}; + const spawn = require('child_process').spawn; + let child = spawn(task, args, {stdio: 'inherit'}); + let running = false; + child.on('close', (code) => { + if (!running) { + running = true; + done(code); + } + }); + child.on('error', (err) => { + if (!running) { + console.error('gulp encountered a child error'); + running = true; + done(err || 1); + } + }); + return child; +}; + +gulp.task('copy', function() { + return gulp.src(['config.json', 'package.json']) + .pipe(gulp.dest('built/')); +}); + +gulp.task('format:enforce', () => { + const format = require('gulp-clang-format'); + const clangFormat = require('clang-format'); + return gulp.src(tsGlobs).pipe( + format.checkFormat('file', clangFormat, {verbose: true, fail: true})); +}); + +gulp.task('format', () => { + const format = require('gulp-clang-format'); + const clangFormat = require('clang-format'); + return gulp.src(tsGlobs, { base: '.' }).pipe( + format.format('file', clangFormat)).pipe(gulp.dest('.')); +}); \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/package.json b/test-eol-project/node_modules/webdriver-manager/package.json new file mode 100644 index 00000000..08490842 --- /dev/null +++ b/test-eol-project/node_modules/webdriver-manager/package.json @@ -0,0 +1,81 @@ +{ + "name": "webdriver-manager", + "version": "12.1.9", + "description": "A selenium server and browser driver manager for your end to end tests.", + "scripts": { + "format": "gulp format", + "format-enforce": "gulp format:enforce", + "gulp": "gulp", + "jasmine": "jasmine", + "prepublish": "npm run format-enforce && tsc && gulp copy", + "tsc": "tsc", + "pretest": "tsc && gulp copy", + "test": "npm run test-unit && npm run test-e2e", + "test-unit": "jasmine", + "pretest-e2e:update": "node ./bin/webdriver-manager update", + "pretest-e2e:start": "node ./bin/webdriver-manager start --detach --seleniumPort 4444 --quiet", + "pretest-e2e": "npm run pretest && npm run pretest-e2e:update && npm run pretest-e2e:start", + "test-e2e": "jasmine JASMINE_CONFIG_PATH=e2e_spec/support/headless.json", + "posttest-e2e": "node ./bin/webdriver-manager shutdown" + }, + "keywords": [ + "angular", + "test", + "testing", + "protractor", + "webdriver", + "webdriverjs", + "selenium", + "selenium-webdriver" + ], + "repository": { + "type": "git", + "url": "git://github.com/angular/webdriver-manager.git" + }, + "bin": { + "webdriver-manager": "bin/webdriver-manager" + }, + "main": "built/lib/webdriver.js", + "author": "Craig Nishina ", + "license": "MIT", + "dependencies": { + "adm-zip": "^0.5.2", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.87.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" + }, + "devDependencies": { + "@types/adm-zip": "^0.5.0", + "@types/chalk": "^0.4.28", + "@types/form-data": "^0.0.33", + "@types/glob": "^5.0.29", + "@types/ini": "^1.3.28", + "@types/jasmine": "^2.5.43", + "@types/minimatch": "^2.0.28", + "@types/minimist": "^1.1.28", + "@types/node": "^7.0.4", + "@types/q": "^0.0.32", + "@types/request": "^0.0.39", + "@types/rimraf": "^0.0.28", + "@types/selenium-webdriver": "^2.53.35", + "@types/semver": "^5.3.30", + "@types/xml2js": "0.0.32", + "clang-format": "^1.0.35", + "gulp": "^4.0.0", + "gulp-clang-format": "^1.0.23", + "jasmine": "^2.4.1", + "run-sequence": "^1.1.5", + "selenium-webdriver": "~3.0.1", + "typescript": "~2.3.0" + }, + "engines": { + "node": ">=6.9.x" + } +} diff --git a/test-eol-project/node_modules/which-module/LICENSE b/test-eol-project/node_modules/which-module/LICENSE new file mode 100644 index 00000000..ab601b65 --- /dev/null +++ b/test-eol-project/node_modules/which-module/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/test-eol-project/node_modules/which-module/README.md b/test-eol-project/node_modules/which-module/README.md new file mode 100644 index 00000000..008a1ae2 --- /dev/null +++ b/test-eol-project/node_modules/which-module/README.md @@ -0,0 +1,58 @@ +# which-module + +> Find the module object for something that was require()d + +[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module) +[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) +[![Greenkeeper badge](https://badges.greenkeeper.io/nexdrew/which-module.svg)](https://greenkeeper.io/) + +Find the `module` object in `require.cache` for something that was `require()`d +or `import`ed - essentially a reverse `require()` lookup. + +Useful for libs that want to e.g. lookup a filename for a module or submodule +that it did not `require()` itself. + +## Install and Usage + +``` +npm install --save which-module +``` + +```js +const whichModule = require('which-module') + +console.log(whichModule(require('something'))) +// Module { +// id: '/path/to/project/node_modules/something/index.js', +// exports: [Function], +// parent: ..., +// filename: '/path/to/project/node_modules/something/index.js', +// loaded: true, +// children: [], +// paths: [ '/path/to/project/node_modules/something/node_modules', +// '/path/to/project/node_modules', +// '/path/to/node_modules', +// '/path/node_modules', +// '/node_modules' ] } +``` + +## API + +### `whichModule(exported)` + +Return the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object), +if any, that represents the given argument in the `require.cache`. + +`exported` can be anything that was previously `require()`d or `import`ed as a +module, submodule, or dependency - which means `exported` is identical to the +`module.exports` returned by this method. + +If `exported` did not come from the `exports` of a `module` in `require.cache`, +then this method returns `null`. + +## License + +ISC © Contributors + +[opensourceregistry_package_id]: # (458260416784685e5ef3091fee54001785dd4360406aa3000315ff256eef6878) diff --git a/test-eol-project/node_modules/which-module/index.js b/test-eol-project/node_modules/which-module/index.js new file mode 100644 index 00000000..45559b78 --- /dev/null +++ b/test-eol-project/node_modules/which-module/index.js @@ -0,0 +1,9 @@ +'use strict' + +module.exports = function whichModule (exported) { + for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { + mod = require.cache[files[i]] + if (mod.exports === exported) return mod + } + return null +} diff --git a/test-eol-project/node_modules/which-module/package.json b/test-eol-project/node_modules/which-module/package.json new file mode 100644 index 00000000..65535755 --- /dev/null +++ b/test-eol-project/node_modules/which-module/package.json @@ -0,0 +1,41 @@ +{ + "name": "which-module", + "version": "2.0.1", + "description": "Find the module object for something that was require()d", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc ava", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "files": [ + "index.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/nexdrew/which-module.git" + }, + "keywords": [ + "which", + "module", + "exports", + "filename", + "require", + "reverse", + "lookup" + ], + "author": "nexdrew", + "license": "ISC", + "bugs": { + "url": "https://github.com/nexdrew/which-module/issues" + }, + "homepage": "https://github.com/nexdrew/which-module#readme", + "devDependencies": { + "ava": "^2.0.0", + "coveralls": "^3.0.3", + "nyc": "^14.0.0", + "standard": "^14.0.0", + "standard-version": "^7.0.0" + } +} diff --git a/test-eol-project/node_modules/wrap-ansi/index.js b/test-eol-project/node_modules/wrap-ansi/index.js new file mode 100755 index 00000000..a6e54431 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/index.js @@ -0,0 +1,186 @@ +'use strict'; +const stringWidth = require('string-width'); +const stripAnsi = require('strip-ansi'); +const ansiStyles = require('ansi-styles'); + +const ESCAPES = new Set([ + '\u001B', + '\u009B' +]); + +const END_CODE = 39; + +const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`; + +// Calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes +const wordLengths = string => string.split(' ').map(character => stringWidth(character)); + +// Wrap a long word across multiple rows +// Ansi escape codes do not count towards length +const wrapWord = (rows, word, columns) => { + const characters = [...word]; + + let isInsideEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); + + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); + + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } + + if (ESCAPES.has(character)) { + isInsideEscape = true; + } else if (isInsideEscape && character === 'm') { + isInsideEscape = false; + continue; + } + + if (isInsideEscape) { + continue; + } + + visible += characterLength; + + if (visible === columns && index < characters.length - 1) { + rows.push(''); + visible = 0; + } + } + + // It's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case + if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } +}; + +// Trims spaces from a string ignoring invisible sequences +const stringVisibleTrimSpacesRight = str => { + const words = str.split(' '); + let last = words.length; + + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + + last--; + } + + if (last === words.length) { + return str; + } + + return words.slice(0, last).join(' ') + words.slice(last).join(''); +}; + +// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode +// +// 'hard' will never allow a string to take up more than columns characters +// +// 'soft' allows long words to expand past the column length +const exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === '') { + return ''; + } + + let pre = ''; + let ret = ''; + let escapeCode; + + const lengths = wordLengths(string); + let rows = ['']; + + for (const [index, word] of string.split(' ').entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimLeft(); + } + + let rowLength = stringWidth(rows[rows.length - 1]); + + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + // If we start with a new word but the current row length equals the length of the columns, add a new row + rows.push(''); + rowLength = 0; + } + + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += ' '; + rowLength++; + } + } + + // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' + if (options.hard && lengths[index] > columns) { + const remainingColumns = (columns - rowLength); + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { + rows.push(''); + } + + wrapWord(rows, word, columns); + continue; + } + + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); + continue; + } + + rows.push(''); + } + + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + + rows[rows.length - 1] += word; + } + + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } + + pre = rows.join('\n'); + + for (const [index, character] of [...pre].entries()) { + ret += character; + + if (ESCAPES.has(character)) { + const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4))); + escapeCode = code === END_CODE ? null : code; + } + + const code = ansiStyles.codes.get(Number(escapeCode)); + + if (escapeCode && code) { + if (pre[index + 1] === '\n') { + ret += wrapAnsi(code); + } else if (character === '\n') { + ret += wrapAnsi(escapeCode); + } + } + } + + return ret; +}; + +// For each newline, invoke the method separately +module.exports = (string, columns, options) => { + return String(string) + .normalize() + .replace(/\r\n/g, '\n') + .split('\n') + .map(line => exec(line, columns, options)) + .join('\n'); +}; diff --git a/test-eol-project/node_modules/wrap-ansi/license b/test-eol-project/node_modules/wrap-ansi/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts new file mode 100644 index 00000000..2dbf6af2 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,37 @@ +declare namespace ansiRegex { + interface Options { + /** + Match only the first ANSI escape. + + @default false + */ + onlyFirst: boolean; + } +} + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +declare function ansiRegex(options?: ansiRegex.Options): RegExp; + +export = ansiRegex; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..616ff837 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..017f5311 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..4d848bc3 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,78 @@ +# ansi-regex + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`
    +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +--- + +
    + + Get professional support for this package with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +
    diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts new file mode 100644 index 00000000..44a907e5 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts @@ -0,0 +1,345 @@ +declare type CSSColor = + | 'aliceblue' + | 'antiquewhite' + | 'aqua' + | 'aquamarine' + | 'azure' + | 'beige' + | 'bisque' + | 'black' + | 'blanchedalmond' + | 'blue' + | 'blueviolet' + | 'brown' + | 'burlywood' + | 'cadetblue' + | 'chartreuse' + | 'chocolate' + | 'coral' + | 'cornflowerblue' + | 'cornsilk' + | 'crimson' + | 'cyan' + | 'darkblue' + | 'darkcyan' + | 'darkgoldenrod' + | 'darkgray' + | 'darkgreen' + | 'darkgrey' + | 'darkkhaki' + | 'darkmagenta' + | 'darkolivegreen' + | 'darkorange' + | 'darkorchid' + | 'darkred' + | 'darksalmon' + | 'darkseagreen' + | 'darkslateblue' + | 'darkslategray' + | 'darkslategrey' + | 'darkturquoise' + | 'darkviolet' + | 'deeppink' + | 'deepskyblue' + | 'dimgray' + | 'dimgrey' + | 'dodgerblue' + | 'firebrick' + | 'floralwhite' + | 'forestgreen' + | 'fuchsia' + | 'gainsboro' + | 'ghostwhite' + | 'gold' + | 'goldenrod' + | 'gray' + | 'green' + | 'greenyellow' + | 'grey' + | 'honeydew' + | 'hotpink' + | 'indianred' + | 'indigo' + | 'ivory' + | 'khaki' + | 'lavender' + | 'lavenderblush' + | 'lawngreen' + | 'lemonchiffon' + | 'lightblue' + | 'lightcoral' + | 'lightcyan' + | 'lightgoldenrodyellow' + | 'lightgray' + | 'lightgreen' + | 'lightgrey' + | 'lightpink' + | 'lightsalmon' + | 'lightseagreen' + | 'lightskyblue' + | 'lightslategray' + | 'lightslategrey' + | 'lightsteelblue' + | 'lightyellow' + | 'lime' + | 'limegreen' + | 'linen' + | 'magenta' + | 'maroon' + | 'mediumaquamarine' + | 'mediumblue' + | 'mediumorchid' + | 'mediumpurple' + | 'mediumseagreen' + | 'mediumslateblue' + | 'mediumspringgreen' + | 'mediumturquoise' + | 'mediumvioletred' + | 'midnightblue' + | 'mintcream' + | 'mistyrose' + | 'moccasin' + | 'navajowhite' + | 'navy' + | 'oldlace' + | 'olive' + | 'olivedrab' + | 'orange' + | 'orangered' + | 'orchid' + | 'palegoldenrod' + | 'palegreen' + | 'paleturquoise' + | 'palevioletred' + | 'papayawhip' + | 'peachpuff' + | 'peru' + | 'pink' + | 'plum' + | 'powderblue' + | 'purple' + | 'rebeccapurple' + | 'red' + | 'rosybrown' + | 'royalblue' + | 'saddlebrown' + | 'salmon' + | 'sandybrown' + | 'seagreen' + | 'seashell' + | 'sienna' + | 'silver' + | 'skyblue' + | 'slateblue' + | 'slategray' + | 'slategrey' + | 'snow' + | 'springgreen' + | 'steelblue' + | 'tan' + | 'teal' + | 'thistle' + | 'tomato' + | 'turquoise' + | 'violet' + | 'wheat' + | 'white' + | 'whitesmoke' + | 'yellow' + | 'yellowgreen'; + +declare namespace ansiStyles { + interface ColorConvert { + /** + The RGB color space. + + @param red - (`0`-`255`) + @param green - (`0`-`255`) + @param blue - (`0`-`255`) + */ + rgb(red: number, green: number, blue: number): string; + + /** + The RGB HEX color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hex(hex: string): string; + + /** + @param keyword - A CSS color name. + */ + keyword(keyword: CSSColor): string; + + /** + The HSL color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param lightness - (`0`-`100`) + */ + hsl(hue: number, saturation: number, lightness: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param value - (`0`-`100`) + */ + hsv(hue: number, saturation: number, value: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param whiteness - (`0`-`100`) + @param blackness - (`0`-`100`) + */ + hwb(hue: number, whiteness: number, blackness: number): string; + + /** + Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. + */ + ansi(ansi: number): string; + + /** + Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + */ + ansi256(ansi: number): string; + } + + interface CSPair { + /** + The ANSI terminal control sequence for starting this style. + */ + readonly open: string; + + /** + The ANSI terminal control sequence for ending this style. + */ + readonly close: string; + } + + interface ColorBase { + readonly ansi: ColorConvert; + readonly ansi256: ColorConvert; + readonly ansi16m: ColorConvert; + + /** + The ANSI terminal control sequence for ending this color. + */ + readonly close: string; + } + + interface Modifier { + /** + Resets the current color chain. + */ + readonly reset: CSPair; + + /** + Make text bold. + */ + readonly bold: CSPair; + + /** + Emitting only a small amount of light. + */ + readonly dim: CSPair; + + /** + Make text italic. (Not widely supported) + */ + readonly italic: CSPair; + + /** + Make text underline. (Not widely supported) + */ + readonly underline: CSPair; + + /** + Inverse background and foreground colors. + */ + readonly inverse: CSPair; + + /** + Prints the text, but makes it invisible. + */ + readonly hidden: CSPair; + + /** + Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: CSPair; + } + + interface ForegroundColor { + readonly black: CSPair; + readonly red: CSPair; + readonly green: CSPair; + readonly yellow: CSPair; + readonly blue: CSPair; + readonly cyan: CSPair; + readonly magenta: CSPair; + readonly white: CSPair; + + /** + Alias for `blackBright`. + */ + readonly gray: CSPair; + + /** + Alias for `blackBright`. + */ + readonly grey: CSPair; + + readonly blackBright: CSPair; + readonly redBright: CSPair; + readonly greenBright: CSPair; + readonly yellowBright: CSPair; + readonly blueBright: CSPair; + readonly cyanBright: CSPair; + readonly magentaBright: CSPair; + readonly whiteBright: CSPair; + } + + interface BackgroundColor { + readonly bgBlack: CSPair; + readonly bgRed: CSPair; + readonly bgGreen: CSPair; + readonly bgYellow: CSPair; + readonly bgBlue: CSPair; + readonly bgCyan: CSPair; + readonly bgMagenta: CSPair; + readonly bgWhite: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGray: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGrey: CSPair; + + readonly bgBlackBright: CSPair; + readonly bgRedBright: CSPair; + readonly bgGreenBright: CSPair; + readonly bgYellowBright: CSPair; + readonly bgBlueBright: CSPair; + readonly bgCyanBright: CSPair; + readonly bgMagentaBright: CSPair; + readonly bgWhiteBright: CSPair; + } +} + +declare const ansiStyles: { + readonly modifier: ansiStyles.Modifier; + readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; + readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; + readonly codes: ReadonlyMap; +} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; + +export = ansiStyles; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js new file mode 100644 index 00000000..5d82581a --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..75393284 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json @@ -0,0 +1,56 @@ +{ + "name": "ansi-styles", + "version": "4.3.0", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "color-convert": "^2.0.1" + }, + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + } +} diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..24883de8 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md @@ -0,0 +1,152 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + + + +## Install + +``` +$ npm install ansi-styles +``` + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `blackBright` (alias: `gray`, `grey`) +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` (alias: `bgGray`, `bgGrey`) +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +The following color spaces from `color-convert` are supported: + +- `rgb` +- `hex` +- `keyword` +- `hsl` +- `hsv` +- `hwb` +- `ansi` +- `ansi256` + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + +## For enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts new file mode 100644 index 00000000..907fccc2 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,17 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +declare function stripAnsi(string: string): string; + +export = stripAnsi; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js new file mode 100644 index 00000000..9a593dfc --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json new file mode 100644 index 00000000..1a41108d --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000..7c4b56d4 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md @@ -0,0 +1,46 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + + +## strip-ansi for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + diff --git a/test-eol-project/node_modules/wrap-ansi/package.json b/test-eol-project/node_modules/wrap-ansi/package.json new file mode 100644 index 00000000..1d57c9f1 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/package.json @@ -0,0 +1,61 @@ +{ + "name": "wrap-ansi", + "version": "6.2.0", + "description": "Wordwrap a string with ANSI escape codes", + "license": "MIT", + "repository": "chalk/wrap-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "wrap", + "break", + "wordwrap", + "wordbreak", + "linewrap", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "devDependencies": { + "ava": "^2.1.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "has-ansi": "^3.0.0", + "nyc": "^14.1.1", + "xo": "^0.24.0" + } +} diff --git a/test-eol-project/node_modules/wrap-ansi/readme.md b/test-eol-project/node_modules/wrap-ansi/readme.md new file mode 100644 index 00000000..d81a4d51 --- /dev/null +++ b/test-eol-project/node_modules/wrap-ansi/readme.md @@ -0,0 +1,97 @@ +# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) + +> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) + + +## Install + +``` +$ npm install wrap-ansi +``` + + +## Usage + +```js +const chalk = require('chalk'); +const wrapAnsi = require('wrap-ansi'); + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(wrapAnsi(input, 20)); +``` + + + + +## API + +### wrapAnsi(string, columns, options?) + +Wrap words to the specified column width. + +#### string + +Type: `string` + +String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. + +#### columns + +Type: `number` + +Number of columns to wrap the text to. + +#### options + +Type: `object` + +##### hard + +Type: `boolean`
    +Default: `false` + +By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. + +##### wordWrap + +Type: `boolean`
    +Default: `true` + +By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. + +##### trim + +Type: `boolean`
    +Default: `true` + +Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + + +## Related + +- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes +- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right +- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) +- [Benjamin Coe](https://github.com/bcoe) + + +--- + +
    + + Get professional support for this package with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +
    diff --git a/test-eol-project/node_modules/wrappy/LICENSE b/test-eol-project/node_modules/wrappy/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/test-eol-project/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/wrappy/README.md b/test-eol-project/node_modules/wrappy/README.md new file mode 100644 index 00000000..98eab252 --- /dev/null +++ b/test-eol-project/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/test-eol-project/node_modules/wrappy/package.json b/test-eol-project/node_modules/wrappy/package.json new file mode 100644 index 00000000..13075204 --- /dev/null +++ b/test-eol-project/node_modules/wrappy/package.json @@ -0,0 +1,29 @@ +{ + "name": "wrappy", + "version": "1.0.2", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "files": [ + "wrappy.js" + ], + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/npm/wrappy" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy" +} diff --git a/test-eol-project/node_modules/wrappy/wrappy.js b/test-eol-project/node_modules/wrappy/wrappy.js new file mode 100644 index 00000000..bb7e7d6f --- /dev/null +++ b/test-eol-project/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/test-eol-project/node_modules/xml2js/LICENSE b/test-eol-project/node_modules/xml2js/LICENSE new file mode 100644 index 00000000..e3b4222a --- /dev/null +++ b/test-eol-project/node_modules/xml2js/LICENSE @@ -0,0 +1,19 @@ +Copyright 2010, 2011, 2012, 2013. 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/test-eol-project/node_modules/xml2js/README.md b/test-eol-project/node_modules/xml2js/README.md new file mode 100644 index 00000000..7534c893 --- /dev/null +++ b/test-eol-project/node_modules/xml2js/README.md @@ -0,0 +1,488 @@ +node-xml2js +=========== + +Ever had the urge to parse XML? And wanted to access the data in some sane, +easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is +what you're looking for! + +Description +=========== + +Simple XML to JavaScript object converter. It supports bi-directional conversion. +Uses [sax-js](https://github.com/isaacs/sax-js/) and +[xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js/). + +Note: If you're looking for a full DOM parser, you probably want +[JSDom](https://github.com/tmpvar/jsdom). + +Installation +============ + +Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm +install xml2js` which will download xml2js and all dependencies. + +xml2js is also available via [Bower](http://bower.io/), just `bower install +xml2js` which will download xml2js and all dependencies. + +Usage +===== + +No extensive tutorials required because you are a smart developer! The task of +parsing XML should be an easy one, so let's make it so! Here's some examples. + +Shoot-and-forget usage +---------------------- + +You want to parse XML as simple and easy as possible? It's dangerous to go +alone, take this: + +```javascript +var parseString = require('xml2js').parseString; +var xml = "Hello xml2js!" +parseString(xml, function (err, result) { + console.dir(result); +}); +``` + +Can't get easier than this, right? This works starting with `xml2js` 0.2.3. +With CoffeeScript it looks like this: + +```coffeescript +{parseString} = require 'xml2js' +xml = "Hello xml2js!" +parseString xml, (err, result) -> + console.dir result +``` + +If you need some special options, fear not, `xml2js` supports a number of +options (see below), you can specify these as second argument: + +```javascript +parseString(xml, {trim: true}, function (err, result) { +}); +``` + +Simple as pie usage +------------------- + +That's right, if you have been using xml-simple or a home-grown +wrapper, this was added in 0.1.11 just for you: + +```javascript +var fs = require('fs'), + xml2js = require('xml2js'); + +var parser = new xml2js.Parser(); +fs.readFile(__dirname + '/foo.xml', function(err, data) { + parser.parseString(data, function (err, result) { + console.dir(result); + console.log('Done'); + }); +}); +``` + +Look ma, no event listeners! + +You can also use `xml2js` from +[CoffeeScript](https://github.com/jashkenas/coffeescript), further reducing +the clutter: + +```coffeescript +fs = require 'fs', +xml2js = require 'xml2js' + +parser = new xml2js.Parser() +fs.readFile __dirname + '/foo.xml', (err, data) -> + parser.parseString data, (err, result) -> + console.dir result + console.log 'Done.' +``` + +But what happens if you forget the `new` keyword to create a new `Parser`? In +the middle of a nightly coding session, it might get lost, after all. Worry +not, we got you covered! Starting with 0.2.8 you can also leave it out, in +which case `xml2js` will helpfully add it for you, no bad surprises and +inexplicable bugs! + +Promise usage +------------- + +```javascript +var xml2js = require('xml2js'); +var xml = ''; + +// With parser +var parser = new xml2js.Parser(/* options */); +parser.parseStringPromise(data).then(function (result) { + console.dir(result); + console.log('Done'); +}) +.catch(function (err) { + // Failed +}); + +// Without parser +xml2js.parseStringPromise(data /*, options */).then(function (result) { + console.dir(result); + console.log('Done'); +}) +.catch(function (err) { + // Failed +}); +``` + +Parsing multiple files +---------------------- + +If you want to parse multiple files, you have multiple possibilities: + + * You can create one `xml2js.Parser` per file. That's the recommended one + and is promised to always *just work*. + * You can call `reset()` on your parser object. + * You can hope everything goes well anyway. This behaviour is not + guaranteed work always, if ever. Use option #1 if possible. Thanks! + +So you wanna some JSON? +----------------------- + +Just wrap the `result` object in a call to `JSON.stringify` like this +`JSON.stringify(result)`. You get a string containing the JSON representation +of the parsed object that you can feed to JSON-hungry consumers. + +Displaying results +------------------ + +You might wonder why, using `console.dir` or `console.log` the output at some +level is only `[Object]`. Don't worry, this is not because `xml2js` got lazy. +That's because Node uses `util.inspect` to convert the object into strings and +that function stops after `depth=2` which is a bit low for most XML. + +To display the whole deal, you can use `console.log(util.inspect(result, false, +null))`, which displays the whole result. + +So much for that, but what if you use +[eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it +truncates the output with `…`? Don't fear, there's also a solution for that, +you just need to increase the `maxLength` limit by creating a custom inspector +`var inspect = require('eyes').inspector({maxLength: false})` and then you can +easily `inspect(result)`. + +XML builder usage +----------------- + +Since 0.4.0, objects can be also be used to build XML: + +```javascript +var xml2js = require('xml2js'); + +var obj = {name: "Super", Surname: "Man", age: 23}; + +var builder = new xml2js.Builder(); +var xml = builder.buildObject(obj); +``` + +At the moment, a one to one bi-directional conversion is guaranteed only for +default configuration, except for `attrkey`, `charkey` and `explicitArray` options +you can redefine to your taste. Writing CDATA is supported via setting the `cdata` +option to `true`. + +To specify attributes: +```javascript +var xml2js = require('xml2js'); + +var obj = {root: {$: {id: "my id"}, _: "my inner text"}}; + +var builder = new xml2js.Builder(); +var xml = builder.buildObject(obj); +``` + +### Adding xmlns attributes + +You can generate XML that declares XML namespace prefix / URI pairs with xmlns attributes. + +Example declaring a default namespace on the root element: + +```javascript +let obj = { + Foo: { + $: { + "xmlns": "http://foo.com" + } + } +}; +``` +Result of `buildObject(obj)`: +```xml + +``` +Example declaring non-default namespaces on non-root elements: +```javascript +let obj = { + 'foo:Foo': { + $: { + 'xmlns:foo': 'http://foo.com' + }, + 'bar:Bar': { + $: { + 'xmlns:bar': 'http://bar.com' + } + } + } +} +``` +Result of `buildObject(obj)`: +```xml + + + +``` + + +Processing attribute, tag names and values +------------------------------------------ + +Since 0.4.1 you can optionally provide the parser with attribute name and tag name processors as well as element value processors (Since 0.4.14, you can also optionally provide the parser with attribute value processors): + +```javascript + +function nameToUpperCase(name){ + return name.toUpperCase(); +} + +//transform all attribute and tag names and values to uppercase +parseString(xml, { + tagNameProcessors: [nameToUpperCase], + attrNameProcessors: [nameToUpperCase], + valueProcessors: [nameToUpperCase], + attrValueProcessors: [nameToUpperCase]}, + function (err, result) { + // processed data +}); +``` + +The `tagNameProcessors` and `attrNameProcessors` options +accept an `Array` of functions with the following signature: + +```javascript +function (name){ + //do something with `name` + return name +} +``` + +The `attrValueProcessors` and `valueProcessors` options +accept an `Array` of functions with the following signature: + +```javascript +function (value, name) { + //`name` will be the node name or attribute name + //do something with `value`, (optionally) dependent on the node/attr name + return value +} +``` + +Some processors are provided out-of-the-box and can be found in `lib/processors.js`: + +- `normalize`: transforms the name to lowercase. +(Automatically used when `options.normalize` is set to `true`) + +- `firstCharLowerCase`: transforms the first character to lower case. +E.g. 'MyTagName' becomes 'myTagName' + +- `stripPrefix`: strips the xml namespace prefix. E.g `` will become 'Bar'. +(N.B.: the `xmlns` prefix is NOT stripped.) + +- `parseNumbers`: parses integer-like strings as integers and float-like strings as floats +E.g. "0" becomes 0 and "15.56" becomes 15.56 + +- `parseBooleans`: parses boolean-like strings to booleans +E.g. "true" becomes true and "False" becomes false + +Options +======= + +Apart from the default settings, there are a number of options that can be +specified for the parser. Options are specified by ``new Parser({optionName: +value})``. Possible options are: + + * `attrkey` (default: `$`): Prefix that is used to access the attributes. + Version 0.1 default was `@`. + * `charkey` (default: `_`): Prefix that is used to access the character + content. Version 0.1 default was `#`. + * `explicitCharkey` (default: `false`) + * `trim` (default: `false`): Trim the whitespace at the beginning and end of + text nodes. + * `normalizeTags` (default: `false`): Normalize all tag names to lowercase. + * `normalize` (default: `false`): Trim whitespaces inside text nodes. + * `explicitRoot` (default: `true`): Set this if you want to get the root + node in the resulting object. + * `emptyTag` (default: `''`): what will the value of empty nodes be. + * `explicitArray` (default: `true`): Always put child nodes in an array if + true; otherwise an array is created only if there is more than one. + * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create + text nodes. + * `mergeAttrs` (default: `false`): Merge attributes and child elements as + properties of the parent, instead of keying attributes off a child + attribute object. This option is ignored if `ignoreAttrs` is `true`. + * `validator` (default `null`): You can specify a callable that validates + the resulting structure somehow, however you want. See unit tests + for an example. + * `xmlns` (default `false`): Give each element a field usually called '$ns' + (the first character is the same as attrkey) that contains its local name + and namespace URI. + * `explicitChildren` (default `false`): Put child elements to separate + property. Doesn't work with `mergeAttrs = true`. If element has no children + then "children" won't be created. Added in 0.2.5. + * `childkey` (default `$$`): Prefix that is used to access child elements if + `explicitChildren` is set to `true`. Added in 0.2.5. + * `preserveChildrenOrder` (default `false`): Modifies the behavior of + `explicitChildren` so that the value of the "children" property becomes an + ordered array. When this is `true`, every node will also get a `#name` field + whose value will correspond to the XML nodeName, so that you may iterate + the "children" array and still be able to determine node names. The named + (and potentially unordered) properties are also retained in this + configuration at the same level as the ordered "children" array. Added in + 0.4.9. + * `charsAsChildren` (default `false`): Determines whether chars should be + considered children if `explicitChildren` is on. Added in 0.2.5. + * `includeWhiteChars` (default `false`): Determines whether whitespace-only + text nodes should be included. Added in 0.4.17. + * `async` (default `false`): Should the callbacks be async? This *might* be + an incompatible change if your code depends on sync execution of callbacks. + Future versions of `xml2js` might change this default, so the recommendation + is to not depend on sync execution anyway. Added in 0.2.6. + * `strict` (default `true`): Set sax-js to strict or non-strict parsing mode. + Defaults to `true` which is *highly* recommended, since parsing HTML which + is not well-formed XML might yield just about anything. Added in 0.2.7. + * `attrNameProcessors` (default: `null`): Allows the addition of attribute + name processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (name){ + //do something with `name` + return name + } + ``` + Added in 0.4.14 + * `attrValueProcessors` (default: `null`): Allows the addition of attribute + value processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (value, name){ + //do something with `name` + return name + } + ``` + Added in 0.4.1 + * `tagNameProcessors` (default: `null`): Allows the addition of tag name + processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (name){ + //do something with `name` + return name + } + ``` + Added in 0.4.1 + * `valueProcessors` (default: `null`): Allows the addition of element value + processing functions. Accepts an `Array` of functions with following + signature: + ```javascript + function (value, name){ + //do something with `name` + return name + } + ``` + Added in 0.4.6 + +Options for the `Builder` class +------------------------------- +These options are specified by ``new Builder({optionName: value})``. +Possible options are: + + * `attrkey` (default: `$`): Prefix that is used to access the attributes. + Version 0.1 default was `@`. + * `charkey` (default: `_`): Prefix that is used to access the character + content. Version 0.1 default was `#`. + * `rootName` (default `root` or the root key name): root element name to be used in case + `explicitRoot` is `false` or to override the root element name. + * `renderOpts` (default `{ 'pretty': true, 'indent': ' ', 'newline': '\n' }`): + Rendering options for xmlbuilder-js. + * pretty: prettify generated XML + * indent: whitespace for indentation (only when pretty) + * newline: newline char (only when pretty) + * `xmldec` (default `{ 'version': '1.0', 'encoding': 'UTF-8', 'standalone': true }`: + XML declaration attributes. + * `xmldec.version` A version number string, e.g. 1.0 + * `xmldec.encoding` Encoding declaration, e.g. UTF-8 + * `xmldec.standalone` standalone document declaration: true or false + * `doctype` (default `null`): optional DTD. Eg. `{'ext': 'hello.dtd'}` + * `headless` (default: `false`): omit the XML header. Added in 0.4.3. + * `allowSurrogateChars` (default: `false`): allows using characters from the Unicode + surrogate blocks. + * `cdata` (default: `false`): wrap text nodes in `` instead of + escaping when necessary. Does not add `` if it is not required. + Added in 0.4.5. + +`renderOpts`, `xmldec`,`doctype` and `headless` pass through to +[xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js). + +Updating to new version +======================= + +Version 0.2 changed the default parsing settings, but version 0.1.14 introduced +the default settings for version 0.2, so these settings can be tried before the +migration. + +```javascript +var xml2js = require('xml2js'); +var parser = new xml2js.Parser(xml2js.defaults["0.2"]); +``` + +To get the 0.1 defaults in version 0.2 you can just use +`xml2js.defaults["0.1"]` in the same place. This provides you with enough time +to migrate to the saner way of parsing in `xml2js` 0.2. We try to make the +migration as simple and gentle as possible, but some breakage cannot be +avoided. + +So, what exactly did change and why? In 0.2 we changed some defaults to parse +the XML in a more universal and sane way. So we disabled `normalize` and `trim` +so `xml2js` does not cut out any text content. You can reenable this at will of +course. A more important change is that we return the root tag in the resulting +JavaScript structure via the `explicitRoot` setting, so you need to access the +first element. This is useful for anybody who wants to know what the root node +is and preserves more information. The last major change was to enable +`explicitArray`, so everytime it is possible that one might embed more than one +sub-tag into a tag, xml2js >= 0.2 returns an array even if the array just +includes one element. This is useful when dealing with APIs that return +variable amounts of subtags. + +Running tests, development +========================== + +[![Build Status](https://travis-ci.org/Leonidas-from-XIV/node-xml2js.svg?branch=master)](https://travis-ci.org/Leonidas-from-XIV/node-xml2js) +[![Coverage Status](https://coveralls.io/repos/Leonidas-from-XIV/node-xml2js/badge.svg?branch=)](https://coveralls.io/r/Leonidas-from-XIV/node-xml2js?branch=master) +[![Dependency Status](https://david-dm.org/Leonidas-from-XIV/node-xml2js.svg)](https://david-dm.org/Leonidas-from-XIV/node-xml2js) + +The development requirements are handled by npm, you just need to install them. +We also have a number of unit tests, they can be run using `npm test` directly +from the project root. This runs zap to discover all the tests and execute +them. + +If you like to contribute, keep in mind that `xml2js` is written in +CoffeeScript, so don't develop on the JavaScript files that are checked into +the repository for convenience reasons. Also, please write some unit test to +check your behaviour and if it is some user-facing thing, add some +documentation to this README, so people will know it exists. Thanks in advance! + +Getting support +=============== + +Please, if you have a problem with the library, first make sure you read this +README. If you read this far, thanks, you're good. Then, please make sure your +problem really is with `xml2js`. It is? Okay, then I'll look at it. Send me a +mail and we can talk. Please don't open issues, as I don't think that is the +proper forum for support problems. Some problems might as well really be bugs +in `xml2js`, if so I'll let you know to open an issue instead :) + +But if you know you really found a bug, feel free to open an issue instead. diff --git a/test-eol-project/node_modules/xml2js/lib/bom.js b/test-eol-project/node_modules/xml2js/lib/bom.js new file mode 100644 index 00000000..7b8fb27b --- /dev/null +++ b/test-eol-project/node_modules/xml2js/lib/bom.js @@ -0,0 +1,12 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + exports.stripBOM = function(str) { + if (str[0] === '\uFEFF') { + return str.substring(1); + } else { + return str; + } + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/builder.js b/test-eol-project/node_modules/xml2js/lib/builder.js new file mode 100644 index 00000000..58f36384 --- /dev/null +++ b/test-eol-project/node_modules/xml2js/lib/builder.js @@ -0,0 +1,127 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, + hasProp = {}.hasOwnProperty; + + builder = require('xmlbuilder'); + + defaults = require('./defaults').defaults; + + requiresCDATA = function(entry) { + return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0); + }; + + wrapCDATA = function(entry) { + return ""; + }; + + escapeCDATA = function(entry) { + return entry.replace(']]>', ']]]]>'); + }; + + exports.Builder = (function() { + function Builder(opts) { + var key, ref, value; + this.options = {}; + ref = defaults["0.2"]; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this.options[key] = value; + } + for (key in opts) { + if (!hasProp.call(opts, key)) continue; + value = opts[key]; + this.options[key] = value; + } + } + + Builder.prototype.buildObject = function(rootObj) { + var attrkey, charkey, render, rootElement, rootName; + attrkey = this.options.attrkey; + charkey = this.options.charkey; + if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) { + rootName = Object.keys(rootObj)[0]; + rootObj = rootObj[rootName]; + } else { + rootName = this.options.rootName; + } + render = (function(_this) { + return function(element, obj) { + var attr, child, entry, index, key, value; + if (typeof obj !== 'object') { + if (_this.options.cdata && requiresCDATA(obj)) { + element.raw(wrapCDATA(obj)); + } else { + element.txt(obj); + } + } else if (Array.isArray(obj)) { + for (index in obj) { + if (!hasProp.call(obj, index)) continue; + child = obj[index]; + for (key in child) { + entry = child[key]; + element = render(element.ele(key), entry).up(); + } + } + } else { + for (key in obj) { + if (!hasProp.call(obj, key)) continue; + child = obj[key]; + if (key === attrkey) { + if (typeof child === "object") { + for (attr in child) { + value = child[attr]; + element = element.att(attr, value); + } + } + } else if (key === charkey) { + if (_this.options.cdata && requiresCDATA(child)) { + element = element.raw(wrapCDATA(child)); + } else { + element = element.txt(child); + } + } else if (Array.isArray(child)) { + for (index in child) { + if (!hasProp.call(child, index)) continue; + entry = child[index]; + if (typeof entry === 'string') { + if (_this.options.cdata && requiresCDATA(entry)) { + element = element.ele(key).raw(wrapCDATA(entry)).up(); + } else { + element = element.ele(key, entry).up(); + } + } else { + element = render(element.ele(key), entry).up(); + } + } + } else if (typeof child === "object") { + element = render(element.ele(key), child).up(); + } else { + if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) { + element = element.ele(key).raw(wrapCDATA(child)).up(); + } else { + if (child == null) { + child = ''; + } + element = element.ele(key, child.toString()).up(); + } + } + } + } + return element; + }; + })(this); + rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { + headless: this.options.headless, + allowSurrogateChars: this.options.allowSurrogateChars + }); + return render(rootElement, rootObj).end(this.options.renderOpts); + }; + + return Builder; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/defaults.js b/test-eol-project/node_modules/xml2js/lib/defaults.js new file mode 100644 index 00000000..0a21da0a --- /dev/null +++ b/test-eol-project/node_modules/xml2js/lib/defaults.js @@ -0,0 +1,72 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + exports.defaults = { + "0.1": { + explicitCharkey: false, + trim: true, + normalize: true, + normalizeTags: false, + attrkey: "@", + charkey: "#", + explicitArray: false, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: false, + validator: null, + xmlns: false, + explicitChildren: false, + childkey: '@@', + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + emptyTag: '' + }, + "0.2": { + explicitCharkey: false, + trim: false, + normalize: false, + normalizeTags: false, + attrkey: "$", + charkey: "_", + explicitArray: true, + ignoreAttrs: false, + mergeAttrs: false, + explicitRoot: true, + validator: null, + xmlns: false, + explicitChildren: false, + preserveChildrenOrder: false, + childkey: '$$', + charsAsChildren: false, + includeWhiteChars: false, + async: false, + strict: true, + attrNameProcessors: null, + attrValueProcessors: null, + tagNameProcessors: null, + valueProcessors: null, + rootName: 'root', + xmldec: { + 'version': '1.0', + 'encoding': 'UTF-8', + 'standalone': true + }, + doctype: null, + renderOpts: { + 'pretty': true, + 'indent': ' ', + 'newline': '\n' + }, + headless: false, + chunkSize: 10000, + emptyTag: '', + cdata: false + } + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/parser.js b/test-eol-project/node_modules/xml2js/lib/parser.js new file mode 100644 index 00000000..59f4d545 --- /dev/null +++ b/test-eol-project/node_modules/xml2js/lib/parser.js @@ -0,0 +1,381 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + sax = require('sax'); + + events = require('events'); + + bom = require('./bom'); + + processors = require('./processors'); + + setImmediate = require('timers').setImmediate; + + defaults = require('./defaults').defaults; + + isEmpty = function(thing) { + return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; + }; + + processItem = function(processors, item, key) { + var i, len, process; + for (i = 0, len = processors.length; i < len; i++) { + process = processors[i]; + item = process(item, key); + } + return item; + }; + + exports.Parser = (function(superClass) { + extend(Parser, superClass); + + function Parser(opts) { + this.parseStringPromise = bind(this.parseStringPromise, this); + this.parseString = bind(this.parseString, this); + this.reset = bind(this.reset, this); + this.assignOrPush = bind(this.assignOrPush, this); + this.processAsync = bind(this.processAsync, this); + var key, ref, value; + if (!(this instanceof exports.Parser)) { + return new exports.Parser(opts); + } + this.options = {}; + ref = defaults["0.2"]; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this.options[key] = value; + } + for (key in opts) { + if (!hasProp.call(opts, key)) continue; + value = opts[key]; + this.options[key] = value; + } + if (this.options.xmlns) { + this.options.xmlnskey = this.options.attrkey + "ns"; + } + if (this.options.normalizeTags) { + if (!this.options.tagNameProcessors) { + this.options.tagNameProcessors = []; + } + this.options.tagNameProcessors.unshift(processors.normalize); + } + this.reset(); + } + + Parser.prototype.processAsync = function() { + var chunk, err; + try { + if (this.remaining.length <= this.options.chunkSize) { + chunk = this.remaining; + this.remaining = ''; + this.saxParser = this.saxParser.write(chunk); + return this.saxParser.close(); + } else { + chunk = this.remaining.substr(0, this.options.chunkSize); + this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length); + this.saxParser = this.saxParser.write(chunk); + return setImmediate(this.processAsync); + } + } catch (error1) { + err = error1; + if (!this.saxParser.errThrown) { + this.saxParser.errThrown = true; + return this.emit(err); + } + } + }; + + Parser.prototype.assignOrPush = function(obj, key, newValue) { + if (!(key in obj)) { + if (!this.options.explicitArray) { + return obj[key] = newValue; + } else { + return obj[key] = [newValue]; + } + } else { + if (!(obj[key] instanceof Array)) { + obj[key] = [obj[key]]; + } + return obj[key].push(newValue); + } + }; + + Parser.prototype.reset = function() { + var attrkey, charkey, ontext, stack; + this.removeAllListeners(); + this.saxParser = sax.parser(this.options.strict, { + trim: false, + normalize: false, + xmlns: this.options.xmlns + }); + this.saxParser.errThrown = false; + this.saxParser.onerror = (function(_this) { + return function(error) { + _this.saxParser.resume(); + if (!_this.saxParser.errThrown) { + _this.saxParser.errThrown = true; + return _this.emit("error", error); + } + }; + })(this); + this.saxParser.onend = (function(_this) { + return function() { + if (!_this.saxParser.ended) { + _this.saxParser.ended = true; + return _this.emit("end", _this.resultObject); + } + }; + })(this); + this.saxParser.ended = false; + this.EXPLICIT_CHARKEY = this.options.explicitCharkey; + this.resultObject = null; + stack = []; + attrkey = this.options.attrkey; + charkey = this.options.charkey; + this.saxParser.onopentag = (function(_this) { + return function(node) { + var key, newValue, obj, processedKey, ref; + obj = {}; + obj[charkey] = ""; + if (!_this.options.ignoreAttrs) { + ref = node.attributes; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + if (!(attrkey in obj) && !_this.options.mergeAttrs) { + obj[attrkey] = {}; + } + newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key]; + processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key; + if (_this.options.mergeAttrs) { + _this.assignOrPush(obj, processedKey, newValue); + } else { + obj[attrkey][processedKey] = newValue; + } + } + } + obj["#name"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name; + if (_this.options.xmlns) { + obj[_this.options.xmlnskey] = { + uri: node.uri, + local: node.local + }; + } + return stack.push(obj); + }; + })(this); + this.saxParser.onclosetag = (function(_this) { + return function() { + var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath; + obj = stack.pop(); + nodeName = obj["#name"]; + if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) { + delete obj["#name"]; + } + if (obj.cdata === true) { + cdata = obj.cdata; + delete obj.cdata; + } + s = stack[stack.length - 1]; + if (obj[charkey].match(/^\s*$/) && !cdata) { + emptyStr = obj[charkey]; + delete obj[charkey]; + } else { + if (_this.options.trim) { + obj[charkey] = obj[charkey].trim(); + } + if (_this.options.normalize) { + obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim(); + } + obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey]; + if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { + obj = obj[charkey]; + } + } + if (isEmpty(obj)) { + obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr; + } + if (_this.options.validator != null) { + xpath = "/" + ((function() { + var i, len, results; + results = []; + for (i = 0, len = stack.length; i < len; i++) { + node = stack[i]; + results.push(node["#name"]); + } + return results; + })()).concat(nodeName).join("/"); + (function() { + var err; + try { + return obj = _this.options.validator(xpath, s && s[nodeName], obj); + } catch (error1) { + err = error1; + return _this.emit("error", err); + } + })(); + } + if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') { + if (!_this.options.preserveChildrenOrder) { + node = {}; + if (_this.options.attrkey in obj) { + node[_this.options.attrkey] = obj[_this.options.attrkey]; + delete obj[_this.options.attrkey]; + } + if (!_this.options.charsAsChildren && _this.options.charkey in obj) { + node[_this.options.charkey] = obj[_this.options.charkey]; + delete obj[_this.options.charkey]; + } + if (Object.getOwnPropertyNames(obj).length > 0) { + node[_this.options.childkey] = obj; + } + obj = node; + } else if (s) { + s[_this.options.childkey] = s[_this.options.childkey] || []; + objClone = {}; + for (key in obj) { + if (!hasProp.call(obj, key)) continue; + objClone[key] = obj[key]; + } + s[_this.options.childkey].push(objClone); + delete obj["#name"]; + if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { + obj = obj[charkey]; + } + } + } + if (stack.length > 0) { + return _this.assignOrPush(s, nodeName, obj); + } else { + if (_this.options.explicitRoot) { + old = obj; + obj = {}; + obj[nodeName] = old; + } + _this.resultObject = obj; + _this.saxParser.ended = true; + return _this.emit("end", _this.resultObject); + } + }; + })(this); + ontext = (function(_this) { + return function(text) { + var charChild, s; + s = stack[stack.length - 1]; + if (s) { + s[charkey] += text; + if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\n/g, '').trim() !== '')) { + s[_this.options.childkey] = s[_this.options.childkey] || []; + charChild = { + '#name': '__text__' + }; + charChild[charkey] = text; + if (_this.options.normalize) { + charChild[charkey] = charChild[charkey].replace(/\s{2,}/g, " ").trim(); + } + s[_this.options.childkey].push(charChild); + } + return s; + } + }; + })(this); + this.saxParser.ontext = ontext; + return this.saxParser.oncdata = (function(_this) { + return function(text) { + var s; + s = ontext(text); + if (s) { + return s.cdata = true; + } + }; + })(this); + }; + + Parser.prototype.parseString = function(str, cb) { + var err; + if ((cb != null) && typeof cb === "function") { + this.on("end", function(result) { + this.reset(); + return cb(null, result); + }); + this.on("error", function(err) { + this.reset(); + return cb(err); + }); + } + try { + str = str.toString(); + if (str.trim() === '') { + this.emit("end", null); + return true; + } + str = bom.stripBOM(str); + if (this.options.async) { + this.remaining = str; + setImmediate(this.processAsync); + return this.saxParser; + } + return this.saxParser.write(str).close(); + } catch (error1) { + err = error1; + if (!(this.saxParser.errThrown || this.saxParser.ended)) { + this.emit('error', err); + return this.saxParser.errThrown = true; + } else if (this.saxParser.ended) { + throw err; + } + } + }; + + Parser.prototype.parseStringPromise = function(str) { + return new Promise((function(_this) { + return function(resolve, reject) { + return _this.parseString(str, function(err, value) { + if (err) { + return reject(err); + } else { + return resolve(value); + } + }); + }; + })(this)); + }; + + return Parser; + + })(events); + + exports.parseString = function(str, a, b) { + var cb, options, parser; + if (b != null) { + if (typeof b === 'function') { + cb = b; + } + if (typeof a === 'object') { + options = a; + } + } else { + if (typeof a === 'function') { + cb = a; + } + options = {}; + } + parser = new exports.Parser(options); + return parser.parseString(str, cb); + }; + + exports.parseStringPromise = function(str, a) { + var options, parser; + if (typeof a === 'object') { + options = a; + } + parser = new exports.Parser(options); + return parser.parseStringPromise(str); + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/processors.js b/test-eol-project/node_modules/xml2js/lib/processors.js new file mode 100644 index 00000000..89aa85f2 --- /dev/null +++ b/test-eol-project/node_modules/xml2js/lib/processors.js @@ -0,0 +1,34 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var prefixMatch; + + prefixMatch = new RegExp(/(?!xmlns)^.*:/); + + exports.normalize = function(str) { + return str.toLowerCase(); + }; + + exports.firstCharLowerCase = function(str) { + return str.charAt(0).toLowerCase() + str.slice(1); + }; + + exports.stripPrefix = function(str) { + return str.replace(prefixMatch, ''); + }; + + exports.parseNumbers = function(str) { + if (!isNaN(str)) { + str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str); + } + return str; + }; + + exports.parseBooleans = function(str) { + if (/^(?:true|false)$/i.test(str)) { + str = str.toLowerCase() === 'true'; + } + return str; + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/xml2js.js b/test-eol-project/node_modules/xml2js/lib/xml2js.js new file mode 100644 index 00000000..24b6e699 --- /dev/null +++ b/test-eol-project/node_modules/xml2js/lib/xml2js.js @@ -0,0 +1,39 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + "use strict"; + var builder, defaults, parser, processors, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + defaults = require('./defaults'); + + builder = require('./builder'); + + parser = require('./parser'); + + processors = require('./processors'); + + exports.defaults = defaults.defaults; + + exports.processors = processors; + + exports.ValidationError = (function(superClass) { + extend(ValidationError, superClass); + + function ValidationError(message) { + this.message = message; + } + + return ValidationError; + + })(Error); + + exports.Builder = builder.Builder; + + exports.Parser = parser.Parser; + + exports.parseString = parser.parseString; + + exports.parseStringPromise = parser.parseStringPromise; + +}).call(this); diff --git a/test-eol-project/node_modules/xml2js/package.json b/test-eol-project/node_modules/xml2js/package.json new file mode 100644 index 00000000..0769b611 --- /dev/null +++ b/test-eol-project/node_modules/xml2js/package.json @@ -0,0 +1,92 @@ +{ + "name": "xml2js", + "description": "Simple XML to JavaScript object converter.", + "keywords": [ + "xml", + "json" + ], + "homepage": "https://github.com/Leonidas-from-XIV/node-xml2js", + "version": "0.4.23", + "author": "Marek Kubica (https://xivilization.net)", + "contributors": [ + "maqr (https://github.com/maqr)", + "Ben Weaver (http://benweaver.com/)", + "Jae Kwon (https://github.com/jaekwon)", + "Jim Robert", + "Ștefan Rusu (http://www.saltwaterc.eu/)", + "Carter Cole (http://cartercole.com/)", + "Kurt Raschke (http://www.kurtraschke.com/)", + "Contra (https://github.com/Contra)", + "Marcelo Diniz (https://github.com/mdiniz)", + "Michael Hart (https://github.com/mhart)", + "Zachary Scott (http://zacharyscott.net/)", + "Raoul Millais (https://github.com/raoulmillais)", + "Salsita Software (http://www.salsitasoft.com/)", + "Mike Schilling (http://www.emotive.com/)", + "Jackson Tian (http://weibo.com/shyvo)", + "Mikhail Zyatin (https://github.com/Sitin)", + "Chris Tavares (https://github.com/christav)", + "Frank Xu (http://f2e.us/)", + "Guido D'Albore (http://www.bitstorm.it/)", + "Jack Senechal (http://jacksenechal.com/)", + "Matthias Hölzl (https://github.com/hoelzl)", + "Camille Reynders (http://www.creynders.be/)", + "Taylor Gautier (https://github.com/tsgautier)", + "Todd Bryan (https://github.com/toddrbryan)", + "Leore Avidar (http://leoreavidar.com/)", + "Dave Aitken (http://www.actionshrimp.com/)", + "Shaney Orrowe ", + "Candle ", + "Jess Telford (http://jes.st)", + "Tom Hughes < (http://compton.nu/)", + "Piotr Rochala (http://rocha.la/)", + "Michael Avila (https://github.com/michaelavila)", + "Ryan Gahl (https://github.com/ryedin)", + "Eric Laberge (https://github.com/elaberge)", + "Benjamin E. Coe (https://twitter.com/benjamincoe)", + "Stephen Cresswell (https://github.com/cressie176)", + "Pascal Ehlert (http://www.hacksrus.net/)", + "Tom Spencer (http://fiznool.com/)", + "Tristian Flanagan (https://github.com/tflanagan)", + "Tim Johns (https://github.com/TimJohns)", + "Bogdan Chadkin (https://github.com/TrySound)", + "David Wood (http://codesleuth.co.uk/)", + "Nicolas Maquet (https://github.com/nmaquet)", + "Lovell Fuller (http://lovell.info/)", + "d3adc0d3 (https://github.com/d3adc0d3)" + ], + "main": "./lib/xml2js", + "files": [ + "lib" + ], + "directories": { + "lib": "./lib" + }, + "scripts": { + "build": "cake build", + "test": "zap", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "doc": "cake doc" + }, + "repository": { + "type": "git", + "url": "https://github.com/Leonidas-from-XIV/node-xml2js.git" + }, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "devDependencies": { + "coffee-script": ">=1.10.0", + "coveralls": "^3.0.1", + "diff": ">=1.0.8", + "docco": ">=0.6.2", + "nyc": ">=2.2.1", + "zap": ">=0.2.9" + }, + "engines": { + "node": ">=4.0.0" + }, + "license": "MIT" +} diff --git a/test-eol-project/node_modules/xmlbuilder/CHANGELOG.md b/test-eol-project/node_modules/xmlbuilder/CHANGELOG.md new file mode 100644 index 00000000..610f412e --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/CHANGELOG.md @@ -0,0 +1,470 @@ +# Change Log + +All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200). + +## [11.0.0] - 2019-02-18 +- Calling `end()` with arguments no longer overwrites writer options. See [#120](https://github.com/oozcitak/xmlbuilder-js/issues/120). +- Added writer state and customizable space and endline functions to help customize writer behavior. Also added `openNode` and `closeNode` functions to writer. See [#193](https://github.com/oozcitak/xmlbuilder-js/issues/193). +- Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See [#195](https://github.com/oozcitak/xmlbuilder-js/issues/195). +- Renamed `elEscape` to `textEscape` in `XMLStringifier`. +- Fixed a bug where empty arrays would produce child nodes. See [#190](https://github.com/oozcitak/xmlbuilder-js/issues/190). +- Removed the `skipNullAttributes` option. `null` attributes are now skipped by default. Added the `keepNullAttributes` option in case someone needs the old behavior. +- Removed the `skipNullNodes` option. `null` nodes are now skipped by default. Added the `keepNullNodes` option in case someone needs the old behavior. +- `undefined` values are now skipped when converting JS objects. +- Renamed stringify functions. See [#194](https://github.com/oozcitak/xmlbuilder-js/issues/194): + * `eleName` -> `name` + * `attName` -> `name` + * `eleText` -> `text` +- Fixed argument order for `attribute` function in the writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). +- Added `openAttribute` and `closeAttribute` functions to writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). +- Added node types to node objects. Node types and writer states are exported by the module with the `nodeType` and `writerState` properties. +- Fixed a bug where array items would not be correctly converted. See [#159](https://github.com/oozcitak/xmlbuilder-js/issues/159). +- Fixed a bug where mixed-content inside JS objects with `#text` decorator would not be correctly converted. See [#171](https://github.com/oozcitak/xmlbuilder-js/issues/171). +- Fixed a bug where JS objects would not be expanded in callback mode. See [#173](https://github.com/oozcitak/xmlbuilder-js/issues/173). +- Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See [#169](https://github.com/oozcitak/xmlbuilder-js/issues/169). +- Fixed a bug where names would not be validated according to the spec. See [#49](https://github.com/oozcitak/xmlbuilder-js/issues/49). +- Renamed `text` property to `value` in comment and cdata nodes to unify the API. +- Removed `doctype` function to prevent name clash with DOM implementation. Use the `dtd` function instead. +- Removed dummy nodes from the XML tree (Those were created while chain-building the tree). +- Renamed `attributes`property to `attribs` to prevent name clash with DOM property with the same name. +- Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See [#122](https://github.com/oozcitak/xmlbuilder-js/issues/122). + +## [10.1.1] - 2018-10-24 +- Fixed an edge case where a null node at root level would be printed although `skipNullNodes` was set. See [#187](https://github.com/oozcitak/xmlbuilder-js/issues/187). + +## [10.1.0] - 2018-10-10 +- Added the `skipNullNodes` option to skip nodes with null values. See [#158](https://github.com/oozcitak/xmlbuilder-js/issues/158). + +## [10.0.0] - 2018-04-26 +- Added current indentation level as a parameter to the onData function when in callback mode. See [#125](https://github.com/oozcitak/xmlbuilder-js/issues/125). +- Added name of the current node and parent node to error messages where possible. See [#152](https://github.com/oozcitak/xmlbuilder-js/issues/152). This has the potential to break code depending on the content of error messages. +- Fixed an issue where objects created with Object.create(null) created an error. See [#176](https://github.com/oozcitak/xmlbuilder-js/issues/176). +- Added test builds for node.js v8 and v10. + +## [9.0.7] - 2018-02-09 +- Simplified regex used for validating encoding. + +## [9.0.4] - 2017-08-16 +- `spacebeforeslash` writer option accepts `true` as well as space char(s). + +## [9.0.3] - 2017-08-15 +- `spacebeforeslash` writer option can now be used with XML fragments. + +## [9.0.2] - 2017-08-15 +- Added the `spacebeforeslash` writer option to add a space character before closing tags of empty elements. See +[#157](https://github.com/oozcitak/xmlbuilder-js/issues/157). + +## [9.0.1] - 2017-06-19 +- Fixed character validity checks to work with node.js 4.0 and 5.0. See +[#161](https://github.com/oozcitak/xmlbuilder-js/issues/161). + +## [9.0.0] - 2017-05-05 +- Removed case conversion options. +- Removed support for node.js 4.0 and 5.0. Minimum required version is now 6.0. +- Fixed valid char filter to use XML 1.1 instead of 1.0. See +[#147](https://github.com/oozcitak/xmlbuilder-js/issues/147). +- Added options for negative indentation and suppressing pretty printing of text +nodes. See +[#145](https://github.com/oozcitak/xmlbuilder-js/issues/145). + +## [8.2.2] - 2016-04-08 +- Falsy values can now be used as a text node in callback mode. + +## [8.2.1] - 2016-04-07 +- Falsy values can now be used as a text node. See +[#117](https://github.com/oozcitak/xmlbuilder-js/issues/117). + +## [8.2.0] - 2016-04-01 +- Removed lodash dependency to keep the library small and simple. See +[#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), +[#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), +and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43). +- Added title case to name conversion options. + +## [8.1.0] - 2016-03-29 +- Added the callback option to the `begin` export function. When used with a +callback function, the XML document will be generated in chunks and each chunk +will be passed to the supplied function. In this mode, `begin` uses a different +code path and the builder should use much less memory since the entire XML tree +is not kept. There are a few drawbacks though. For example, traversing the document +tree or adding attributes to a node after it is written is not possible. It is +also not possible to remove nodes or attributes. + +``` js +var result = ''; + +builder.begin(function(chunk) { result += chunk; }) + .dec() + .ele('root') + .ele('xmlbuilder').up() + .end(); +``` + +- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111). + +## [8.0.0] - 2016-03-25 +- Added the `begin` export function. See the wiki for details. +- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose. +- Dropped support for old node.js releases. Minimum required node.js version is now 4.0. + +## [7.0.0] - 2016-03-21 +- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element. +```js +root.ele('node').ins('pi'); +// pre-v7 + +// v7 + +``` + +## [6.0.0] - 2016-03-20 +- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document. + +## [5.0.1] - 2016-03-08 +- Moved require statements for text case conversion to the top of files to reduce lazy requires. + +## [5.0.0] - 2016-03-05 +- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`. +- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). +- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed. +- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]>`. + +## [4.2.1] - 2016-01-15 +- Updated lodash dependency to 4.0.0. + +## [4.2.0] - 2015-12-16 +- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded. + +## [4.1.0] - 2015-11-11 +- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g. + +```js +root.ele({ number: [ "one", "two" ]}); +// with separateArrayItems: true + + + + +// with separateArrayItems: false +one +two +``` + +## [4.0.0] - 2015-11-01 +- Removed the `#list` decorator. Array items are now created as child nodes by default. +- Fixed a bug where the XML encoding string was checked partially. + +## [3.1.0] - 2015-09-19 +- `#list` decorator ignores empty arrays. + +## [3.0.0] - 2015-09-10 +- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). + +## [2.6.5] - 2015-09-09 +- Use native `isArray` instead of lodash. +- Indentation of processing instructions are set to the parent element's. + +## [2.6.4] - 2015-05-27 +- Updated lodash dependency to 3.5.0. + +## [2.6.3] - 2015-05-27 +- Bumped version because previous release was not published on npm. + +## [2.6.2] - 2015-03-10 +- Updated lodash dependency to 3.5.0. + +## [2.6.1] - 2015-02-20 +- Updated lodash dependency to 3.3.0. + +## [2.6.0] - 2015-02-20 +- Fixed a bug where the `XMLNode` constructor overwrote the super class parent. +- Removed document property from cloned nodes. +- Switched to mocha.js for testing. + +## [2.5.2] - 2015-02-16 +- Updated lodash dependency to 3.2.0. + +## [2.5.1] - 2015-02-09 +- Updated lodash dependency to 3.1.0. +- Support all node >= 0.8. + +## [2.5.0] - 2015-00-03 +- Updated lodash dependency to 3.0.0. + +## [2.4.6] - 2015-01-26 +- Show more information from attribute creation with null values. +- Added iojs as an engine. +- Self close elements with empty text. + +## [2.4.5] - 2014-11-15 +- Fixed prepublish script to run on windows. +- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value. +- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62). + +## [2.4.4] - 2014-09-08 +- Added the `offset` option to `toString()` for use in XML fragments. + +## [2.4.3] - 2014-08-13 +- Corrected license in package description. + +## [2.4.2] - 2014-08-13 +- Dropped performance test and memwatch dependency. + +## [2.4.1] - 2014-08-12 +- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59). + +## [2.4.0] - 2014-08-04 +- Correct cases of pubID and sysID. +- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53). +- Escape according to Canonical XML 1.0. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54). + +## [2.3.0] - 2014-07-17 +- Convert objects to JS primitives while sanitizing user input. +- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44). +- Use modularized lodash functions to cut down dependencies. +- Process empty objects when converting from objects so that we don't throw on empty child objects. + +## [2.2.1] - 2014-04-04 +- Bumped version because previous release was not published on npm. + +## [2.2.0] - 2014-04-04 +- Switch to lodash from underscore. +- Removed legacy `ext` option from `create()`. +- Drop old node versions: 0.4, 0.5, 0.6. 0.8 is the minimum requirement from now on. + +## [2.1.0] - 2013-12-30 +- Removed duplicate null checks from constructors. +- Fixed node count in performance test. +- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26). +- Allow multiple values in `att()` and `ins()`. +- Added ability to run individual performance tests. +- Added flag for ignoring decorator strings. + +## [2.0.1] - 2013-12-24 +- Removed performance tests from npm package. + +## [2.0.0] - 2013-12-24 +- Combined loops for speed up. +- Added support for the DTD and XML declaration. +- `clone` includes attributes. +- Added performance tests. +- Evaluate attribute value if function. +- Evaluate instruction value if function. + +## [1.1.2] - 2013-12-11 +- Changed processing instruction decorator to `?`. + +## [1.1.1] - 2013-12-11 +- Added processing instructions to JS object conversion. + +## [1.1.0] - 2013-12-10 +- Added license to package. +- `create()` and `element()` accept JS object to fully build the document. +- Added `nod()` and `n()` aliases for `node()`. +- Renamed `convertAttChar` decorator to `convertAttKey`. +- Ignore empty decorator strings when converting JS objects. + +## [1.0.2] - 2013-11-27 +- Removed temp file which was accidentally included in the package. + +## [1.0.1] - 2013-11-27 +- Custom stringify functions affect current instance only. + +## [1.0.0] - 2013-11-27 +- Added processing instructions. +- Added stringify functions to sanitize and convert input values. +- Added option for headless XML documents. +- Added vows tests. +- Removed Makefile. Using npm publish scripts instead. +- Removed the `begin()` function. `create()` begins the document by creating the root node. + +## [0.4.3] - 2013-11-08 +- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29). +- Fixed empty value string representation in pretty mode. +- Added pre and postpublish scripts to package.json. +- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31). + +## [0.4.2] - 2012-09-14 +- Removed README.md from `.npmignore`. + +## [0.4.1] - 2012-08-31 +- Removed `begin()` calls in favor of `XMLBuilder` constructor. +- Added the `end()` function. `end()` is a convenience over `doc().toString()`. + +## [0.4.0] - 2012-08-31 +- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line. +- Soft deprecated `begin()`. + +## [0.3.11] - 2012-08-13 +- Package keywords are fixed to be an array of values. + +## [0.3.10] - 2012-08-13 +- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases. + +## [0.3.3] - 2012-07-27 +- Implemented `importXMLBuilder()`. + +## [0.3.2] - 2012-07-20 +- Fixed a duplicated escaping problem on `element()`. +- Fixed a problem with text node creation from empty string. +- Calling `root()` on the document element returns the root element. +- `XMLBuilder` no longer extends `XMLFragment`. + +## [0.3.1] - 2011-11-28 +- Added guards for document element so that nodes cannot be inserted at document level. + +## [0.3.0] - 2011-11-28 +- Added `doc()` to return the document element. + +## [0.2.2] - 2011-11-28 +- Prevent code relying on `up()`'s older behavior to break. + +## [0.2.1] - 2011-11-28 +- Added the `root()` function. + +## [0.2.0] - 2011-11-21 +- Added Travis-CI integration. +- Added coffee-script dependency. +- Added insert, traversal and delete functions. + +## [0.1.7] - 2011-10-25 +- No changes. Accidental release. + +## [0.1.6] - 2011-10-25 +- Corrected `package.json` bugs link to `url` from `web`. + +## [0.1.5] - 2011-08-08 +- Added missing npm package contents. + +## [0.1.4] - 2011-07-29 +- Text-only nodes are no longer indented. +- Added documentation for multiple instances. + +## [0.1.3] - 2011-07-27 +- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed. +- Fixed `u()` function so that it now correctly calls `up()`. +- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably. + +## [0.1.2] - 2011-06-03 +- `ele()` accepts element text. +- `attributes()` now overrides existing attributes if passed the same attribute name. + +## [0.1.1] - 2011-05-19 +- Added the raw output option. +- Removed most validity checks. + +## [0.1.0] - 2011-04-27 +- `text()` and `cdata()` now return parent element. +- Attribute values are escaped. + +## [0.0.7] - 2011-04-23 +- Coerced text values to string. + +## [0.0.6] - 2011-02-23 +- Added support for XML comments. +- Text nodes are checked against CharData. + +## [0.0.5] - 2010-12-31 +- Corrected the name of the main npm module in `package.json`. + +## [0.0.4] - 2010-12-28 +- Added `.npmignore`. + +## [0.0.3] - 2010-12-27 +- root element is now constructed in `begin()`. +- moved prolog to `begin()`. +- Added the ability to have CDATA in element text. +- Removed unused prolog aliases. +- Removed `builder()` function from main module. +- Added the name of the main npm module in `package.json`. + +## [0.0.2] - 2010-11-03 +- `element()` expands nested arrays. +- Added pretty printing. +- Added the `up()`, `build()` and `prolog()` functions. +- Added readme. + +## 0.0.1 - 2010-11-02 +- Initial release + +[11.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.1...v11.0.0 +[10.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.0...v10.1.1 +[10.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.0.0...v10.1.0 +[10.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.7...v10.0.0 +[9.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.4...v9.0.7 +[9.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.3...v9.0.4 +[9.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.2...v9.0.3 +[9.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.1...v9.0.2 +[9.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.0...v9.0.1 +[9.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.2...v9.0.0 +[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2 +[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1 +[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0 +[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0 +[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0 +[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0 +[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0 +[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1 +[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0 +[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1 +[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0 +[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0 +[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0 +[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0 +[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0 +[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5 +[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4 +[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3 +[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2 +[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1 +[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0 +[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2 +[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1 +[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0 +[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6 +[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5 +[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4 +[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3 +[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2 +[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1 +[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0 +[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0 +[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0 +[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0 +[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1 +[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0 +[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0 +[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0 +[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3 +[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0 +[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11 +[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10 +[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3 +[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2 +[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0 +[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0 +[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7 +[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6 +[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5 +[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0 +[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7 +[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6 +[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5 +[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4 +[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3 +[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2 + diff --git a/test-eol-project/node_modules/xmlbuilder/LICENSE b/test-eol-project/node_modules/xmlbuilder/LICENSE new file mode 100644 index 00000000..9fb97002 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +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/test-eol-project/node_modules/xmlbuilder/README.md b/test-eol-project/node_modules/xmlbuilder/README.md new file mode 100644 index 00000000..1a96edb5 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/README.md @@ -0,0 +1,86 @@ +# xmlbuilder-js + +An XML builder for [node.js](https://nodejs.org/) similar to +[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). + +[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) +[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) +[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) + +[![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) +[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js) +[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) +[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) + +### Installation: + +``` sh +npm install xmlbuilder +``` + +### Usage: + +``` js +var builder = require('xmlbuilder'); +var xml = builder.create('root') + .ele('xmlbuilder') + .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') + .end({ pretty: true}); + +console.log(xml); +``` + +will result in: + +``` xml + + + + git://github.com/oozcitak/xmlbuilder-js.git + + +``` + +It is also possible to convert objects into nodes: + +``` js +builder.create({ + root: { + xmlbuilder: { + repo: { + '@type': 'git', // attributes start with @ + '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node + } + } + } +}); +``` + +If you need to do some processing: + +``` js +var root = builder.create('squares'); +root.com('f(x) = x^2'); +for(var i = 1; i <= 5; i++) +{ + var item = root.ele('data'); + item.att('x', i); + item.att('y', i * i); +} +``` + +This will result in: + +``` xml + + + + + + + + + +``` + +See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples. diff --git a/test-eol-project/node_modules/xmlbuilder/appveyor.yml b/test-eol-project/node_modules/xmlbuilder/appveyor.yml new file mode 100644 index 00000000..9604b785 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/appveyor.yml @@ -0,0 +1,20 @@ +environment: + matrix: + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "6" + - nodejs_version: "8" + - nodejs_version: "10" + - nodejs_version: "" # latest + +install: + - ps: "Install-Product node $env:nodejs_version" + - "npm install" + +test_script: + - "node --version" + - "npm --version" + - "npm test" + +build: off + diff --git a/test-eol-project/node_modules/xmlbuilder/lib/Derivation.js b/test-eol-project/node_modules/xmlbuilder/lib/Derivation.js new file mode 100644 index 00000000..2abfd08d --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/Derivation.js @@ -0,0 +1,10 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Restriction: 1, + Extension: 2, + Union: 4, + List: 8 + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js b/test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js new file mode 100644 index 00000000..1cbd21c1 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js @@ -0,0 +1,12 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Disconnected: 1, + Preceding: 2, + Following: 4, + Contains: 8, + ContainedBy: 16, + ImplementationSpecific: 32 + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/NodeType.js b/test-eol-project/node_modules/xmlbuilder/lib/NodeType.js new file mode 100644 index 00000000..4c200e3c --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/NodeType.js @@ -0,0 +1,23 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Element: 1, + Attribute: 2, + Text: 3, + CData: 4, + EntityReference: 5, + EntityDeclaration: 6, + ProcessingInstruction: 7, + Comment: 8, + Document: 9, + DocType: 10, + DocumentFragment: 11, + NotationDeclaration: 12, + Declaration: 201, + Raw: 202, + AttributeDeclaration: 203, + ElementDeclaration: 204, + Dummy: 205 + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/OperationType.js b/test-eol-project/node_modules/xmlbuilder/lib/OperationType.js new file mode 100644 index 00000000..29428f61 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/OperationType.js @@ -0,0 +1,11 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + Clones: 1, + Imported: 2, + Deleted: 3, + Renamed: 4, + Adopted: 5 + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/Utility.js b/test-eol-project/node_modules/xmlbuilder/lib/Utility.js new file mode 100644 index 00000000..1d42cfd3 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/Utility.js @@ -0,0 +1,83 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, + slice = [].slice, + hasProp = {}.hasOwnProperty; + + assign = function() { + var i, key, len, source, sources, target; + target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; + if (isFunction(Object.assign)) { + Object.assign.apply(null, arguments); + } else { + for (i = 0, len = sources.length; i < len; i++) { + source = sources[i]; + if (source != null) { + for (key in source) { + if (!hasProp.call(source, key)) continue; + target[key] = source[key]; + } + } + } + } + return target; + }; + + isFunction = function(val) { + return !!val && Object.prototype.toString.call(val) === '[object Function]'; + }; + + isObject = function(val) { + var ref; + return !!val && ((ref = typeof val) === 'function' || ref === 'object'); + }; + + isArray = function(val) { + if (isFunction(Array.isArray)) { + return Array.isArray(val); + } else { + return Object.prototype.toString.call(val) === '[object Array]'; + } + }; + + isEmpty = function(val) { + var key; + if (isArray(val)) { + return !val.length; + } else { + for (key in val) { + if (!hasProp.call(val, key)) continue; + return false; + } + return true; + } + }; + + isPlainObject = function(val) { + var ctor, proto; + return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); + }; + + getValue = function(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } else { + return obj; + } + }; + + module.exports.assign = assign; + + module.exports.isFunction = isFunction; + + module.exports.isObject = isObject; + + module.exports.isArray = isArray; + + module.exports.isEmpty = isEmpty; + + module.exports.isPlainObject = isPlainObject; + + module.exports.getValue = getValue; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/WriterState.js b/test-eol-project/node_modules/xmlbuilder/lib/WriterState.js new file mode 100644 index 00000000..0923eec9 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/WriterState.js @@ -0,0 +1,10 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + module.exports = { + None: 0, + OpenTag: 1, + InsideTag: 2, + CloseTag: 3 + }; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js new file mode 100644 index 00000000..c208566d --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js @@ -0,0 +1,108 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLAttribute, XMLNode; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLAttribute = (function() { + function XMLAttribute(parent, name, value) { + this.parent = parent; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.value = this.stringify.attValue(value); + this.type = NodeType.Attribute; + this.isId = false; + this.schemaTypeInfo = null; + } + + Object.defineProperty(XMLAttribute.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'ownerElement', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLAttribute.prototype, 'specified', { + get: function() { + return true; + } + }); + + XMLAttribute.prototype.clone = function() { + return Object.create(this); + }; + + XMLAttribute.prototype.toString = function(options) { + return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); + }; + + XMLAttribute.prototype.debugInfo = function(name) { + name = name || this.name; + if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else { + return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; + } + }; + + XMLAttribute.prototype.isEqualNode = function(node) { + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.value !== this.value) { + return false; + } + return true; + }; + + return XMLAttribute; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js new file mode 100644 index 00000000..c732ec5b --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js @@ -0,0 +1,36 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLCData, XMLCharacterData, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + module.exports = XMLCData = (function(superClass) { + extend(XMLCData, superClass); + + function XMLCData(parent, text) { + XMLCData.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing CDATA text. " + this.debugInfo()); + } + this.name = "#cdata-section"; + this.type = NodeType.CData; + this.value = this.stringify.cdata(text); + } + + XMLCData.prototype.clone = function() { + return Object.create(this); + }; + + XMLCData.prototype.toString = function(options) { + return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); + }; + + return XMLCData; + + })(XMLCharacterData); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js new file mode 100644 index 00000000..c007a181 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js @@ -0,0 +1,79 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLCharacterData, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + module.exports = XMLCharacterData = (function(superClass) { + extend(XMLCharacterData, superClass); + + function XMLCharacterData(parent) { + XMLCharacterData.__super__.constructor.call(this, parent); + this.value = ''; + } + + Object.defineProperty(XMLCharacterData.prototype, 'data', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'length', { + get: function() { + return this.value.length; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + XMLCharacterData.prototype.clone = function() { + return Object.create(this); + }; + + XMLCharacterData.prototype.substringData = function(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.appendData = function(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.insertData = function(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.deleteData = function(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.replaceData = function(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLCharacterData.prototype.isEqualNode = function(node) { + if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + }; + + return XMLCharacterData; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js new file mode 100644 index 00000000..82872168 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js @@ -0,0 +1,36 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLCharacterData, XMLComment, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + module.exports = XMLComment = (function(superClass) { + extend(XMLComment, superClass); + + function XMLComment(parent, text) { + XMLComment.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing comment text. " + this.debugInfo()); + } + this.name = "#comment"; + this.type = NodeType.Comment; + this.value = this.stringify.comment(text); + } + + XMLComment.prototype.clone = function() { + return Object.create(this); + }; + + XMLComment.prototype.toString = function(options) { + return this.options.writer.comment(this, this.options.writer.filterOptions(options)); + }; + + return XMLComment; + + })(XMLCharacterData); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js new file mode 100644 index 00000000..b331b86f --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js @@ -0,0 +1,64 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; + + XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); + + XMLDOMStringList = require('./XMLDOMStringList'); + + module.exports = XMLDOMConfiguration = (function() { + function XMLDOMConfiguration() { + var clonedSelf; + this.defaultParams = { + "canonical-form": false, + "cdata-sections": false, + "comments": false, + "datatype-normalization": false, + "element-content-whitespace": true, + "entities": true, + "error-handler": new XMLDOMErrorHandler(), + "infoset": true, + "validate-if-schema": false, + "namespaces": true, + "namespace-declarations": true, + "normalize-characters": false, + "schema-location": '', + "schema-type": '', + "split-cdata-sections": true, + "validate": false, + "well-formed": true + }; + this.params = clonedSelf = Object.create(this.defaultParams); + } + + Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { + get: function() { + return new XMLDOMStringList(Object.keys(this.defaultParams)); + } + }); + + XMLDOMConfiguration.prototype.getParameter = function(name) { + if (this.params.hasOwnProperty(name)) { + return this.params[name]; + } else { + return null; + } + }; + + XMLDOMConfiguration.prototype.canSetParameter = function(name, value) { + return true; + }; + + XMLDOMConfiguration.prototype.setParameter = function(name, value) { + if (value != null) { + return this.params[name] = value; + } else { + return delete this.params[name]; + } + }; + + return XMLDOMConfiguration; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js new file mode 100644 index 00000000..4a0446c0 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js @@ -0,0 +1,16 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMErrorHandler; + + module.exports = XMLDOMErrorHandler = (function() { + function XMLDOMErrorHandler() {} + + XMLDOMErrorHandler.prototype.handleError = function(error) { + throw new Error(error); + }; + + return XMLDOMErrorHandler; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js new file mode 100644 index 00000000..4f9f9db1 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js @@ -0,0 +1,32 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMImplementation; + + module.exports = XMLDOMImplementation = (function() { + function XMLDOMImplementation() {} + + XMLDOMImplementation.prototype.hasFeature = function(feature, version) { + return true; + }; + + XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { + throw new Error("This DOM method is not implemented."); + }; + + XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { + throw new Error("This DOM method is not implemented."); + }; + + XMLDOMImplementation.prototype.createHTMLDocument = function(title) { + throw new Error("This DOM method is not implemented."); + }; + + XMLDOMImplementation.prototype.getFeature = function(feature, version) { + throw new Error("This DOM method is not implemented."); + }; + + return XMLDOMImplementation; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js new file mode 100644 index 00000000..ba558c5b --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js @@ -0,0 +1,28 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLDOMStringList; + + module.exports = XMLDOMStringList = (function() { + function XMLDOMStringList(arr) { + this.arr = arr || []; + } + + Object.defineProperty(XMLDOMStringList.prototype, 'length', { + get: function() { + return this.arr.length; + } + }); + + XMLDOMStringList.prototype.item = function(index) { + return this.arr[index] || null; + }; + + XMLDOMStringList.prototype.contains = function(str) { + return this.arr.indexOf(str) !== -1; + }; + + return XMLDOMStringList; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js new file mode 100644 index 00000000..aca9dbd4 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js @@ -0,0 +1,55 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDAttList, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDAttList = (function(superClass) { + extend(XMLDTDAttList, superClass); + + function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { + XMLDTDAttList.__super__.constructor.call(this, parent); + if (elementName == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (attributeName == null) { + throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); + } + if (!attributeType) { + throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); + } + if (!defaultValueType) { + throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); + } + if (defaultValueType.indexOf('#') !== 0) { + defaultValueType = '#' + defaultValueType; + } + if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { + throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { + throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); + } + this.elementName = this.stringify.name(elementName); + this.type = NodeType.AttributeDeclaration; + this.attributeName = this.stringify.name(attributeName); + this.attributeType = this.stringify.dtdAttType(attributeType); + if (defaultValue) { + this.defaultValue = this.stringify.dtdAttDefault(defaultValue); + } + this.defaultValueType = defaultValueType; + } + + XMLDTDAttList.prototype.toString = function(options) { + return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDAttList; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js new file mode 100644 index 00000000..f8f1ae76 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js @@ -0,0 +1,38 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDElement, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDElement = (function(superClass) { + extend(XMLDTDElement, superClass); + + function XMLDTDElement(parent, name, value) { + XMLDTDElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD element name. " + this.debugInfo()); + } + if (!value) { + value = '(#PCDATA)'; + } + if (Array.isArray(value)) { + value = '(' + value.join(',') + ')'; + } + this.name = this.stringify.name(name); + this.type = NodeType.ElementDeclaration; + this.value = this.stringify.dtdElementValue(value); + } + + XMLDTDElement.prototype.toString = function(options) { + return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDElement; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js new file mode 100644 index 00000000..0a940d6e --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js @@ -0,0 +1,97 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDEntity, XMLNode, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isObject = require('./Utility').isObject; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDEntity = (function(superClass) { + extend(XMLDTDEntity, superClass); + + function XMLDTDEntity(parent, pe, name, value) { + XMLDTDEntity.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD entity name. " + this.debugInfo(name)); + } + if (value == null) { + throw new Error("Missing DTD entity value. " + this.debugInfo(name)); + } + this.pe = !!pe; + this.name = this.stringify.name(name); + this.type = NodeType.EntityDeclaration; + if (!isObject(value)) { + this.value = this.stringify.dtdEntityValue(value); + this.internal = true; + } else { + if (!value.pubID && !value.sysID) { + throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + if (value.pubID && !value.sysID) { + throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); + } + this.internal = false; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + if (value.nData != null) { + this.nData = this.stringify.dtdNData(value.nData); + } + if (this.pe && this.nData) { + throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); + } + } + } + + Object.defineProperty(XMLDTDEntity.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'notationName', { + get: function() { + return this.nData || null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', { + get: function() { + return null; + } + }); + + XMLDTDEntity.prototype.toString = function(options) { + return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDEntity; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js new file mode 100644 index 00000000..57a119d2 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js @@ -0,0 +1,52 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDNotation, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDTDNotation = (function(superClass) { + extend(XMLDTDNotation, superClass); + + function XMLDTDNotation(parent, name, value) { + XMLDTDNotation.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing DTD notation name. " + this.debugInfo(name)); + } + if (!value.pubID && !value.sysID) { + throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); + } + this.name = this.stringify.name(name); + this.type = NodeType.NotationDeclaration; + if (value.pubID != null) { + this.pubID = this.stringify.dtdPubID(value.pubID); + } + if (value.sysID != null) { + this.sysID = this.stringify.dtdSysID(value.sysID); + } + } + + Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + XMLDTDNotation.prototype.toString = function(options) { + return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); + }; + + return XMLDTDNotation; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js new file mode 100644 index 00000000..d4f7f447 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js @@ -0,0 +1,43 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDeclaration, XMLNode, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isObject = require('./Utility').isObject; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDeclaration = (function(superClass) { + extend(XMLDeclaration, superClass); + + function XMLDeclaration(parent, version, encoding, standalone) { + var ref; + XMLDeclaration.__super__.constructor.call(this, parent); + if (isObject(version)) { + ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; + } + if (!version) { + version = '1.0'; + } + this.type = NodeType.Declaration; + this.version = this.stringify.xmlVersion(version); + if (encoding != null) { + this.encoding = this.stringify.xmlEncoding(encoding); + } + if (standalone != null) { + this.standalone = this.stringify.xmlStandalone(standalone); + } + } + + XMLDeclaration.prototype.toString = function(options) { + return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); + }; + + return XMLDeclaration; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js new file mode 100644 index 00000000..ef043f4c --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js @@ -0,0 +1,186 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isObject = require('./Utility').isObject; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + module.exports = XMLDocType = (function(superClass) { + extend(XMLDocType, superClass); + + function XMLDocType(parent, pubID, sysID) { + var child, i, len, ref, ref1, ref2; + XMLDocType.__super__.constructor.call(this, parent); + this.type = NodeType.DocType; + if (parent.children) { + ref = parent.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.Element) { + this.name = child.name; + break; + } + } + } + this.documentObject = parent; + if (isObject(pubID)) { + ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; + } + if (sysID == null) { + ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; + } + if (pubID != null) { + this.pubID = this.stringify.dtdPubID(pubID); + } + if (sysID != null) { + this.sysID = this.stringify.dtdSysID(sysID); + } + } + + Object.defineProperty(XMLDocType.prototype, 'entities', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if ((child.type === NodeType.EntityDeclaration) && !child.pe) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'notations', { + get: function() { + var child, i, len, nodes, ref; + nodes = {}; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.NotationDeclaration) { + nodes[child.name] = child; + } + } + return new XMLNamedNodeMap(nodes); + } + }); + + Object.defineProperty(XMLDocType.prototype, 'publicId', { + get: function() { + return this.pubID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'systemId', { + get: function() { + return this.sysID; + } + }); + + Object.defineProperty(XMLDocType.prototype, 'internalSubset', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + XMLDocType.prototype.element = function(name, value) { + var child; + child = new XMLDTDElement(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var child; + child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.entity = function(name, value) { + var child; + child = new XMLDTDEntity(this, false, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.pEntity = function(name, value) { + var child; + child = new XMLDTDEntity(this, true, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.notation = function(name, value) { + var child; + child = new XMLDTDNotation(this, name, value); + this.children.push(child); + return this; + }; + + XMLDocType.prototype.toString = function(options) { + return this.options.writer.docType(this, this.options.writer.filterOptions(options)); + }; + + XMLDocType.prototype.ele = function(name, value) { + return this.element(name, value); + }; + + XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); + }; + + XMLDocType.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocType.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocType.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + XMLDocType.prototype.up = function() { + return this.root() || this.documentObject; + }; + + XMLDocType.prototype.isEqualNode = function(node) { + if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.name !== this.name) { + return false; + } + if (node.publicId !== this.publicId) { + return false; + } + if (node.systemId !== this.systemId) { + return false; + } + return true; + }; + + return XMLDocType; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js new file mode 100644 index 00000000..88df56c4 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js @@ -0,0 +1,242 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + isPlainObject = require('./Utility').isPlainObject; + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDOMConfiguration = require('./XMLDOMConfiguration'); + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + module.exports = XMLDocument = (function(superClass) { + extend(XMLDocument, superClass); + + function XMLDocument(options) { + XMLDocument.__super__.constructor.call(this, null); + this.name = "#document"; + this.type = NodeType.Document; + this.documentURI = null; + this.domConfig = new XMLDOMConfiguration(); + options || (options = {}); + if (!options.writer) { + options.writer = new XMLStringWriter(); + } + this.options = options; + this.stringify = new XMLStringifier(options); + } + + Object.defineProperty(XMLDocument.prototype, 'implementation', { + value: new XMLDOMImplementation() + }); + + Object.defineProperty(XMLDocument.prototype, 'doctype', { + get: function() { + var child, i, len, ref; + ref = this.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + if (child.type === NodeType.DocType) { + return child; + } + } + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'documentElement', { + get: function() { + return this.rootObject || null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { + get: function() { + return false; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].encoding; + } else { + return null; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].standalone === 'yes'; + } else { + return false; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { + get: function() { + if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { + return this.children[0].version; + } else { + return "1.0"; + } + } + }); + + Object.defineProperty(XMLDocument.prototype, 'URL', { + get: function() { + return this.documentURI; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'origin', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'compatMode', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'characterSet', { + get: function() { + return null; + } + }); + + Object.defineProperty(XMLDocument.prototype, 'contentType', { + get: function() { + return null; + } + }); + + XMLDocument.prototype.end = function(writer) { + var writerOptions; + writerOptions = {}; + if (!writer) { + writer = this.options.writer; + } else if (isPlainObject(writer)) { + writerOptions = writer; + writer = this.options.writer; + } + return writer.document(this, writer.filterOptions(writerOptions)); + }; + + XMLDocument.prototype.toString = function(options) { + return this.options.writer.document(this, this.options.writer.filterOptions(options)); + }; + + XMLDocument.prototype.createElement = function(tagName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createDocumentFragment = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createTextNode = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createComment = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createCDATASection = function(data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createProcessingInstruction = function(target, data) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createAttribute = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createEntityReference = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementsByTagName = function(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.importNode = function(importedNode, deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementById = function(elementId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.adoptNode = function(source) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.normalizeDocument = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.getElementsByClassName = function(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createEvent = function(eventInterface) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createRange = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + return XMLDocument; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js new file mode 100644 index 00000000..ca1aa1cf --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js @@ -0,0 +1,528 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, + hasProp = {}.hasOwnProperty; + + ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; + + NodeType = require('./NodeType'); + + XMLDocument = require('./XMLDocument'); + + XMLElement = require('./XMLElement'); + + XMLCData = require('./XMLCData'); + + XMLComment = require('./XMLComment'); + + XMLRaw = require('./XMLRaw'); + + XMLText = require('./XMLText'); + + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + + XMLDeclaration = require('./XMLDeclaration'); + + XMLDocType = require('./XMLDocType'); + + XMLDTDAttList = require('./XMLDTDAttList'); + + XMLDTDEntity = require('./XMLDTDEntity'); + + XMLDTDElement = require('./XMLDTDElement'); + + XMLDTDNotation = require('./XMLDTDNotation'); + + XMLAttribute = require('./XMLAttribute'); + + XMLStringifier = require('./XMLStringifier'); + + XMLStringWriter = require('./XMLStringWriter'); + + WriterState = require('./WriterState'); + + module.exports = XMLDocumentCB = (function() { + function XMLDocumentCB(options, onData, onEnd) { + var writerOptions; + this.name = "?xml"; + this.type = NodeType.Document; + options || (options = {}); + writerOptions = {}; + if (!options.writer) { + options.writer = new XMLStringWriter(); + } else if (isPlainObject(options.writer)) { + writerOptions = options.writer; + options.writer = new XMLStringWriter(); + } + this.options = options; + this.writer = options.writer; + this.writerOptions = this.writer.filterOptions(writerOptions); + this.stringify = new XMLStringifier(options); + this.onDataCallback = onData || function() {}; + this.onEndCallback = onEnd || function() {}; + this.currentNode = null; + this.currentLevel = -1; + this.openTags = {}; + this.documentStarted = false; + this.documentCompleted = false; + this.root = null; + } + + XMLDocumentCB.prototype.createChildNode = function(node) { + var att, attName, attributes, child, i, len, ref1, ref2; + switch (node.type) { + case NodeType.CData: + this.cdata(node.value); + break; + case NodeType.Comment: + this.comment(node.value); + break; + case NodeType.Element: + attributes = {}; + ref1 = node.attribs; + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) continue; + att = ref1[attName]; + attributes[attName] = att.value; + } + this.node(node.name, attributes); + break; + case NodeType.Dummy: + this.dummy(); + break; + case NodeType.Raw: + this.raw(node.value); + break; + case NodeType.Text: + this.text(node.value); + break; + case NodeType.ProcessingInstruction: + this.instruction(node.target, node.value); + break; + default: + throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); + } + ref2 = node.children; + for (i = 0, len = ref2.length; i < len; i++) { + child = ref2[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + return this; + }; + + XMLDocumentCB.prototype.dummy = function() { + return this; + }; + + XMLDocumentCB.prototype.node = function(name, attributes, text) { + var ref1; + if (name == null) { + throw new Error("Missing node name."); + } + if (this.root && this.currentLevel === -1) { + throw new Error("Document can only have one root node. " + this.debugInfo(name)); + } + this.openCurrent(); + name = getValue(name); + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; + } + this.currentNode = new XMLElement(this, name, attributes); + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + if (text != null) { + this.text(text); + } + return this; + }; + + XMLDocumentCB.prototype.element = function(name, attributes, text) { + var child, i, len, oldValidationFlag, ref1, root; + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + this.dtdElement.apply(this, arguments); + } else { + if (Array.isArray(name) || isObject(name) || isFunction(name)) { + oldValidationFlag = this.options.noValidation; + this.options.noValidation = true; + root = new XMLDocument(this.options).element('TEMP_ROOT'); + root.element(name); + this.options.noValidation = oldValidationFlag; + ref1 = root.children; + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + this.createChildNode(child); + if (child.type === NodeType.Element) { + this.up(); + } + } + } else { + this.node(name, attributes, text); + } + } + return this; + }; + + XMLDocumentCB.prototype.attribute = function(name, value) { + var attName, attValue; + if (!this.currentNode || this.currentNode.children) { + throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); + } + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.currentNode.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLDocumentCB.prototype.text = function(value) { + var node; + this.openCurrent(); + node = new XMLText(this, value); + this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.cdata = function(value) { + var node; + this.openCurrent(); + node = new XMLCData(this, value); + this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.comment = function(value) { + var node; + this.openCurrent(); + node = new XMLComment(this, value); + this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.raw = function(value) { + var node; + this.openCurrent(); + node = new XMLRaw(this, value); + this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.instruction = function(target, value) { + var i, insTarget, insValue, len, node; + this.openCurrent(); + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { + for (i = 0, len = target.length; i < len; i++) { + insTarget = target[i]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + node = new XMLProcessingInstruction(this, target, value); + this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + } + return this; + }; + + XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) { + var node; + this.openCurrent(); + if (this.documentStarted) { + throw new Error("declaration() must be the first node."); + } + node = new XMLDeclaration(this, version, encoding, standalone); + this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) { + this.openCurrent(); + if (root == null) { + throw new Error("Missing root node name."); + } + if (this.root) { + throw new Error("dtd() must come before the root node."); + } + this.currentNode = new XMLDocType(this, pubID, sysID); + this.currentNode.rootNodeName = root; + this.currentNode.children = false; + this.currentLevel++; + this.openTags[this.currentLevel] = this.currentNode; + return this; + }; + + XMLDocumentCB.prototype.dtdElement = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDElement(this, name, value); + this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { + var node; + this.openCurrent(); + node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); + this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.entity = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, false, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.pEntity = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDEntity(this, true, name, value); + this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.notation = function(name, value) { + var node; + this.openCurrent(); + node = new XMLDTDNotation(this, name, value); + this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); + return this; + }; + + XMLDocumentCB.prototype.up = function() { + if (this.currentLevel < 0) { + throw new Error("The document node has no parent."); + } + if (this.currentNode) { + if (this.currentNode.children) { + this.closeNode(this.currentNode); + } else { + this.openNode(this.currentNode); + } + this.currentNode = null; + } else { + this.closeNode(this.openTags[this.currentLevel]); + } + delete this.openTags[this.currentLevel]; + this.currentLevel--; + return this; + }; + + XMLDocumentCB.prototype.end = function() { + while (this.currentLevel >= 0) { + this.up(); + } + return this.onEnd(); + }; + + XMLDocumentCB.prototype.openCurrent = function() { + if (this.currentNode) { + this.currentNode.children = true; + return this.openNode(this.currentNode); + } + }; + + XMLDocumentCB.prototype.openNode = function(node) { + var att, chunk, name, ref1; + if (!node.isOpen) { + if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { + this.root = node; + } + chunk = ''; + if (node.type === NodeType.Element) { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name; + ref1 = node.attribs; + for (name in ref1) { + if (!hasProp.call(ref1, name)) continue; + att = ref1[name]; + chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); + } + chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel); + this.writerOptions.state = WriterState.InsideTag; + } else { + this.writerOptions.state = WriterState.OpenTag; + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ''; + } + chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.onData(chunk, this.currentLevel); + return node.isOpen = true; + } + }; + + XMLDocumentCB.prototype.closeNode = function(node) { + var chunk; + if (!node.isClosed) { + chunk = ''; + this.writerOptions.state = WriterState.CloseTag; + if (node.type === NodeType.Element) { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } else { + chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel); + } + this.writerOptions.state = WriterState.None; + this.onData(chunk, this.currentLevel); + return node.isClosed = true; + } + }; + + XMLDocumentCB.prototype.onData = function(chunk, level) { + this.documentStarted = true; + return this.onDataCallback(chunk, level + 1); + }; + + XMLDocumentCB.prototype.onEnd = function() { + this.documentCompleted = true; + return this.onEndCallback(); + }; + + XMLDocumentCB.prototype.debugInfo = function(name) { + if (name == null) { + return ""; + } else { + return "node: <" + name + ">"; + } + }; + + XMLDocumentCB.prototype.ele = function() { + return this.element.apply(this, arguments); + }; + + XMLDocumentCB.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLDocumentCB.prototype.txt = function(value) { + return this.text(value); + }; + + XMLDocumentCB.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLDocumentCB.prototype.com = function(value) { + return this.comment(value); + }; + + XMLDocumentCB.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocumentCB.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) { + return this.doctype(root, pubID, sysID); + }; + + XMLDocumentCB.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLDocumentCB.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLDocumentCB.prototype.t = function(value) { + return this.text(value); + }; + + XMLDocumentCB.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLDocumentCB.prototype.c = function(value) { + return this.comment(value); + }; + + XMLDocumentCB.prototype.r = function(value) { + return this.raw(value); + }; + + XMLDocumentCB.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + XMLDocumentCB.prototype.att = function() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments); + } else { + return this.attribute.apply(this, arguments); + } + }; + + XMLDocumentCB.prototype.a = function() { + if (this.currentNode && this.currentNode.type === NodeType.DocType) { + return this.attList.apply(this, arguments); + } else { + return this.attribute.apply(this, arguments); + } + }; + + XMLDocumentCB.prototype.ent = function(name, value) { + return this.entity(name, value); + }; + + XMLDocumentCB.prototype.pent = function(name, value) { + return this.pEntity(name, value); + }; + + XMLDocumentCB.prototype.not = function(name, value) { + return this.notation(name, value); + }; + + return XMLDocumentCB; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js new file mode 100644 index 00000000..5d6039c4 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js @@ -0,0 +1,24 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDocumentFragment, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDocumentFragment = (function(superClass) { + extend(XMLDocumentFragment, superClass); + + function XMLDocumentFragment() { + XMLDocumentFragment.__super__.constructor.call(this, null); + this.name = "#document-fragment"; + this.type = NodeType.DocumentFragment; + } + + return XMLDocumentFragment; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js new file mode 100644 index 00000000..b26083a3 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js @@ -0,0 +1,31 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLDummy, XMLNode, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + module.exports = XMLDummy = (function(superClass) { + extend(XMLDummy, superClass); + + function XMLDummy(parent) { + XMLDummy.__super__.constructor.call(this, parent); + this.type = NodeType.Dummy; + } + + XMLDummy.prototype.clone = function() { + return Object.create(this); + }; + + XMLDummy.prototype.toString = function(options) { + return ''; + }; + + return XMLDummy; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js new file mode 100644 index 00000000..c1657299 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js @@ -0,0 +1,298 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; + + XMLNode = require('./XMLNode'); + + NodeType = require('./NodeType'); + + XMLAttribute = require('./XMLAttribute'); + + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + + module.exports = XMLElement = (function(superClass) { + extend(XMLElement, superClass); + + function XMLElement(parent, name, attributes) { + var child, j, len, ref1; + XMLElement.__super__.constructor.call(this, parent); + if (name == null) { + throw new Error("Missing element name. " + this.debugInfo()); + } + this.name = this.stringify.name(name); + this.type = NodeType.Element; + this.attribs = {}; + this.schemaTypeInfo = null; + if (attributes != null) { + this.attribute(attributes); + } + if (parent.type === NodeType.Document) { + this.isRoot = true; + this.documentObject = parent; + parent.rootObject = this; + if (parent.children) { + ref1 = parent.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + if (child.type === NodeType.DocType) { + child.name = this.name; + break; + } + } + } + } + } + + Object.defineProperty(XMLElement.prototype, 'tagName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'namespaceURI', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'prefix', { + get: function() { + return ''; + } + }); + + Object.defineProperty(XMLElement.prototype, 'localName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLElement.prototype, 'id', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'className', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'classList', { + get: function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + Object.defineProperty(XMLElement.prototype, 'attributes', { + get: function() { + if (!this.attributeMap || !this.attributeMap.nodes) { + this.attributeMap = new XMLNamedNodeMap(this.attribs); + } + return this.attributeMap; + } + }); + + XMLElement.prototype.clone = function() { + var att, attName, clonedSelf, ref1; + clonedSelf = Object.create(this); + if (clonedSelf.isRoot) { + clonedSelf.documentObject = null; + } + clonedSelf.attribs = {}; + ref1 = this.attribs; + for (attName in ref1) { + if (!hasProp.call(ref1, attName)) continue; + att = ref1[attName]; + clonedSelf.attribs[attName] = att.clone(); + } + clonedSelf.children = []; + this.children.forEach(function(child) { + var clonedChild; + clonedChild = child.clone(); + clonedChild.parent = clonedSelf; + return clonedSelf.children.push(clonedChild); + }); + return clonedSelf; + }; + + XMLElement.prototype.attribute = function(name, value) { + var attName, attValue; + if (name != null) { + name = getValue(name); + } + if (isObject(name)) { + for (attName in name) { + if (!hasProp.call(name, attName)) continue; + attValue = name[attName]; + this.attribute(attName, attValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + if (this.options.keepNullAttributes && (value == null)) { + this.attribs[name] = new XMLAttribute(this, name, ""); + } else if (value != null) { + this.attribs[name] = new XMLAttribute(this, name, value); + } + } + return this; + }; + + XMLElement.prototype.removeAttribute = function(name) { + var attName, j, len; + if (name == null) { + throw new Error("Missing attribute name. " + this.debugInfo()); + } + name = getValue(name); + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + attName = name[j]; + delete this.attribs[attName]; + } + } else { + delete this.attribs[name]; + } + return this; + }; + + XMLElement.prototype.toString = function(options) { + return this.options.writer.element(this, this.options.writer.filterOptions(options)); + }; + + XMLElement.prototype.att = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.a = function(name, value) { + return this.attribute(name, value); + }; + + XMLElement.prototype.getAttribute = function(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].value; + } else { + return null; + } + }; + + XMLElement.prototype.setAttribute = function(name, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getAttributeNode = function(name) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name]; + } else { + return null; + } + }; + + XMLElement.prototype.setAttributeNode = function(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.removeAttributeNode = function(oldAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagName = function(name) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setAttributeNodeNS = function(newAttr) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.hasAttribute = function(name) { + return this.attribs.hasOwnProperty(name); + }; + + XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setIdAttribute = function(name, isId) { + if (this.attribs.hasOwnProperty(name)) { + return this.attribs[name].isId; + } else { + return isId; + } + }; + + XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagName = function(tagname) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.getElementsByClassName = function(classNames) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLElement.prototype.isEqualNode = function(node) { + var i, j, ref1; + if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.namespaceURI !== this.namespaceURI) { + return false; + } + if (node.prefix !== this.prefix) { + return false; + } + if (node.localName !== this.localName) { + return false; + } + if (node.attribs.length !== this.attribs.length) { + return false; + } + for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { + if (!this.attribs[i].isEqualNode(node.attribs[i])) { + return false; + } + } + return true; + }; + + return XMLElement; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js new file mode 100644 index 00000000..885402d0 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js @@ -0,0 +1,58 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLNamedNodeMap; + + module.exports = XMLNamedNodeMap = (function() { + function XMLNamedNodeMap(nodes) { + this.nodes = nodes; + } + + Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { + get: function() { + return Object.keys(this.nodes).length || 0; + } + }); + + XMLNamedNodeMap.prototype.clone = function() { + return this.nodes = null; + }; + + XMLNamedNodeMap.prototype.getNamedItem = function(name) { + return this.nodes[name]; + }; + + XMLNamedNodeMap.prototype.setNamedItem = function(node) { + var oldNode; + oldNode = this.nodes[node.nodeName]; + this.nodes[node.nodeName] = node; + return oldNode || null; + }; + + XMLNamedNodeMap.prototype.removeNamedItem = function(name) { + var oldNode; + oldNode = this.nodes[name]; + delete this.nodes[name]; + return oldNode || null; + }; + + XMLNamedNodeMap.prototype.item = function(index) { + return this.nodes[Object.keys(this.nodes)[index]] || null; + }; + + XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + }; + + XMLNamedNodeMap.prototype.setNamedItemNS = function(node) { + throw new Error("This DOM method is not implemented."); + }; + + XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) { + throw new Error("This DOM method is not implemented."); + }; + + return XMLNamedNodeMap; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js new file mode 100644 index 00000000..e2c7bb76 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js @@ -0,0 +1,785 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, + hasProp = {}.hasOwnProperty; + + ref1 = require('./Utility'), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; + + XMLElement = null; + + XMLCData = null; + + XMLComment = null; + + XMLDeclaration = null; + + XMLDocType = null; + + XMLRaw = null; + + XMLText = null; + + XMLProcessingInstruction = null; + + XMLDummy = null; + + NodeType = null; + + XMLNodeList = null; + + XMLNamedNodeMap = null; + + DocumentPosition = null; + + module.exports = XMLNode = (function() { + function XMLNode(parent1) { + this.parent = parent1; + if (this.parent) { + this.options = this.parent.options; + this.stringify = this.parent.stringify; + } + this.value = null; + this.children = []; + this.baseURI = null; + if (!XMLElement) { + XMLElement = require('./XMLElement'); + XMLCData = require('./XMLCData'); + XMLComment = require('./XMLComment'); + XMLDeclaration = require('./XMLDeclaration'); + XMLDocType = require('./XMLDocType'); + XMLRaw = require('./XMLRaw'); + XMLText = require('./XMLText'); + XMLProcessingInstruction = require('./XMLProcessingInstruction'); + XMLDummy = require('./XMLDummy'); + NodeType = require('./NodeType'); + XMLNodeList = require('./XMLNodeList'); + XMLNamedNodeMap = require('./XMLNamedNodeMap'); + DocumentPosition = require('./DocumentPosition'); + } + } + + Object.defineProperty(XMLNode.prototype, 'nodeName', { + get: function() { + return this.name; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeType', { + get: function() { + return this.type; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nodeValue', { + get: function() { + return this.value; + } + }); + + Object.defineProperty(XMLNode.prototype, 'parentNode', { + get: function() { + return this.parent; + } + }); + + Object.defineProperty(XMLNode.prototype, 'childNodes', { + get: function() { + if (!this.childNodeList || !this.childNodeList.nodes) { + this.childNodeList = new XMLNodeList(this.children); + } + return this.childNodeList; + } + }); + + Object.defineProperty(XMLNode.prototype, 'firstChild', { + get: function() { + return this.children[0] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'lastChild', { + get: function() { + return this.children[this.children.length - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'previousSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i - 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'nextSibling', { + get: function() { + var i; + i = this.parent.children.indexOf(this); + return this.parent.children[i + 1] || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'ownerDocument', { + get: function() { + return this.document() || null; + } + }); + + Object.defineProperty(XMLNode.prototype, 'textContent', { + get: function() { + var child, j, len, ref2, str; + if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { + str = ''; + ref2 = this.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (child.textContent) { + str += child.textContent; + } + } + return str; + } else { + return null; + } + }, + set: function(value) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + }); + + XMLNode.prototype.setParent = function(parent) { + var child, j, len, ref2, results; + this.parent = parent; + if (parent) { + this.options = parent.options; + this.stringify = parent.stringify; + } + ref2 = this.children; + results = []; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + results.push(child.setParent(this)); + } + return results; + }; + + XMLNode.prototype.element = function(name, attributes, text) { + var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; + lastChild = null; + if (attributes === null && (text == null)) { + ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; + } + if (attributes == null) { + attributes = {}; + } + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; + } + if (name != null) { + name = getValue(name); + } + if (Array.isArray(name)) { + for (j = 0, len = name.length; j < len; j++) { + item = name[j]; + lastChild = this.element(item); + } + } else if (isFunction(name)) { + lastChild = this.element(name.apply()); + } else if (isObject(name)) { + for (key in name) { + if (!hasProp.call(name, key)) continue; + val = name[key]; + if (isFunction(val)) { + val = val.apply(); + } + if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { + lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); + } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { + lastChild = this.dummy(); + } else if (isObject(val) && isEmpty(val)) { + lastChild = this.element(key); + } else if (!this.options.keepNullNodes && (val == null)) { + lastChild = this.dummy(); + } else if (!this.options.separateArrayItems && Array.isArray(val)) { + for (k = 0, len1 = val.length; k < len1; k++) { + item = val[k]; + childNode = {}; + childNode[key] = item; + lastChild = this.element(childNode); + } + } else if (isObject(val)) { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.element(val); + } else { + lastChild = this.element(key); + lastChild.element(val); + } + } else { + lastChild = this.element(key, val); + } + } + } else if (!this.options.keepNullNodes && text === null) { + lastChild = this.dummy(); + } else { + if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { + lastChild = this.text(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { + lastChild = this.cdata(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { + lastChild = this.comment(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { + lastChild = this.raw(text); + } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { + lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); + } else { + lastChild = this.node(name, attributes, text); + } + } + if (lastChild == null) { + throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); + } + return lastChild; + }; + + XMLNode.prototype.insertBefore = function(name, attributes, text) { + var child, i, newChild, refChild, removed; + if (name != null ? name.type : void 0) { + newChild = name; + refChild = attributes; + newChild.setParent(this); + if (refChild) { + i = children.indexOf(refChild); + removed = children.splice(i); + children.push(newChild); + Array.prototype.push.apply(children, removed); + } else { + children.push(newChild); + } + return newChild; + } else { + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + } + }; + + XMLNode.prototype.insertAfter = function(name, attributes, text) { + var child, i, removed; + if (this.isRoot) { + throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); + } + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.element(name, attributes, text); + Array.prototype.push.apply(this.parent.children, removed); + return child; + }; + + XMLNode.prototype.remove = function() { + var i, ref2; + if (this.isRoot) { + throw new Error("Cannot remove the root element. " + this.debugInfo()); + } + i = this.parent.children.indexOf(this); + [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; + return this.parent; + }; + + XMLNode.prototype.node = function(name, attributes, text) { + var child, ref2; + if (name != null) { + name = getValue(name); + } + attributes || (attributes = {}); + attributes = getValue(attributes); + if (!isObject(attributes)) { + ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; + } + child = new XMLElement(this, name, attributes); + if (text != null) { + child.text(text); + } + this.children.push(child); + return child; + }; + + XMLNode.prototype.text = function(value) { + var child; + if (isObject(value)) { + this.element(value); + } + child = new XMLText(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.cdata = function(value) { + var child; + child = new XMLCData(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.comment = function(value) { + var child; + child = new XMLComment(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.commentBefore = function(value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.comment(value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.commentAfter = function(value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.comment(value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.raw = function(value) { + var child; + child = new XMLRaw(this, value); + this.children.push(child); + return this; + }; + + XMLNode.prototype.dummy = function() { + var child; + child = new XMLDummy(this); + return child; + }; + + XMLNode.prototype.instruction = function(target, value) { + var insTarget, insValue, instruction, j, len; + if (target != null) { + target = getValue(target); + } + if (value != null) { + value = getValue(value); + } + if (Array.isArray(target)) { + for (j = 0, len = target.length; j < len; j++) { + insTarget = target[j]; + this.instruction(insTarget); + } + } else if (isObject(target)) { + for (insTarget in target) { + if (!hasProp.call(target, insTarget)) continue; + insValue = target[insTarget]; + this.instruction(insTarget, insValue); + } + } else { + if (isFunction(value)) { + value = value.apply(); + } + instruction = new XMLProcessingInstruction(this, target, value); + this.children.push(instruction); + } + return this; + }; + + XMLNode.prototype.instructionBefore = function(target, value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i); + child = this.parent.instruction(target, value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.instructionAfter = function(target, value) { + var child, i, removed; + i = this.parent.children.indexOf(this); + removed = this.parent.children.splice(i + 1); + child = this.parent.instruction(target, value); + Array.prototype.push.apply(this.parent.children, removed); + return this; + }; + + XMLNode.prototype.declaration = function(version, encoding, standalone) { + var doc, xmldec; + doc = this.document(); + xmldec = new XMLDeclaration(doc, version, encoding, standalone); + if (doc.children.length === 0) { + doc.children.unshift(xmldec); + } else if (doc.children[0].type === NodeType.Declaration) { + doc.children[0] = xmldec; + } else { + doc.children.unshift(xmldec); + } + return doc.root() || doc; + }; + + XMLNode.prototype.dtd = function(pubID, sysID) { + var child, doc, doctype, i, j, k, len, len1, ref2, ref3; + doc = this.document(); + doctype = new XMLDocType(doc, pubID, sysID); + ref2 = doc.children; + for (i = j = 0, len = ref2.length; j < len; i = ++j) { + child = ref2[i]; + if (child.type === NodeType.DocType) { + doc.children[i] = doctype; + return doctype; + } + } + ref3 = doc.children; + for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { + child = ref3[i]; + if (child.isRoot) { + doc.children.splice(i, 0, doctype); + return doctype; + } + } + doc.children.push(doctype); + return doctype; + }; + + XMLNode.prototype.up = function() { + if (this.isRoot) { + throw new Error("The root node has no parent. Use doc() if you need to get the document object."); + } + return this.parent; + }; + + XMLNode.prototype.root = function() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node.rootObject; + } else if (node.isRoot) { + return node; + } else { + node = node.parent; + } + } + }; + + XMLNode.prototype.document = function() { + var node; + node = this; + while (node) { + if (node.type === NodeType.Document) { + return node; + } else { + node = node.parent; + } + } + }; + + XMLNode.prototype.end = function(options) { + return this.document().end(options); + }; + + XMLNode.prototype.prev = function() { + var i; + i = this.parent.children.indexOf(this); + if (i < 1) { + throw new Error("Already at the first node. " + this.debugInfo()); + } + return this.parent.children[i - 1]; + }; + + XMLNode.prototype.next = function() { + var i; + i = this.parent.children.indexOf(this); + if (i === -1 || i === this.parent.children.length - 1) { + throw new Error("Already at the last node. " + this.debugInfo()); + } + return this.parent.children[i + 1]; + }; + + XMLNode.prototype.importDocument = function(doc) { + var clonedRoot; + clonedRoot = doc.root().clone(); + clonedRoot.parent = this; + clonedRoot.isRoot = false; + this.children.push(clonedRoot); + return this; + }; + + XMLNode.prototype.debugInfo = function(name) { + var ref2, ref3; + name = name || this.name; + if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { + return ""; + } else if (name == null) { + return "parent: <" + this.parent.name + ">"; + } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { + return "node: <" + name + ">"; + } else { + return "node: <" + name + ">, parent: <" + this.parent.name + ">"; + } + }; + + XMLNode.prototype.ele = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.nod = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.txt = function(value) { + return this.text(value); + }; + + XMLNode.prototype.dat = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.com = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.ins = function(target, value) { + return this.instruction(target, value); + }; + + XMLNode.prototype.doc = function() { + return this.document(); + }; + + XMLNode.prototype.dec = function(version, encoding, standalone) { + return this.declaration(version, encoding, standalone); + }; + + XMLNode.prototype.e = function(name, attributes, text) { + return this.element(name, attributes, text); + }; + + XMLNode.prototype.n = function(name, attributes, text) { + return this.node(name, attributes, text); + }; + + XMLNode.prototype.t = function(value) { + return this.text(value); + }; + + XMLNode.prototype.d = function(value) { + return this.cdata(value); + }; + + XMLNode.prototype.c = function(value) { + return this.comment(value); + }; + + XMLNode.prototype.r = function(value) { + return this.raw(value); + }; + + XMLNode.prototype.i = function(target, value) { + return this.instruction(target, value); + }; + + XMLNode.prototype.u = function() { + return this.up(); + }; + + XMLNode.prototype.importXMLBuilder = function(doc) { + return this.importDocument(doc); + }; + + XMLNode.prototype.replaceChild = function(newChild, oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.removeChild = function(oldChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.appendChild = function(newChild) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.hasChildNodes = function() { + return this.children.length !== 0; + }; + + XMLNode.prototype.cloneNode = function(deep) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.normalize = function() { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.isSupported = function(feature, version) { + return true; + }; + + XMLNode.prototype.hasAttributes = function() { + return this.attribs.length !== 0; + }; + + XMLNode.prototype.compareDocumentPosition = function(other) { + var ref, res; + ref = this; + if (ref === other) { + return 0; + } else if (this.document() !== other.document()) { + res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; + if (Math.random() < 0.5) { + res |= DocumentPosition.Preceding; + } else { + res |= DocumentPosition.Following; + } + return res; + } else if (ref.isAncestor(other)) { + return DocumentPosition.Contains | DocumentPosition.Preceding; + } else if (ref.isDescendant(other)) { + return DocumentPosition.Contains | DocumentPosition.Following; + } else if (ref.isPreceding(other)) { + return DocumentPosition.Preceding; + } else { + return DocumentPosition.Following; + } + }; + + XMLNode.prototype.isSameNode = function(other) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.lookupPrefix = function(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.lookupNamespaceURI = function(prefix) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.isEqualNode = function(node) { + var i, j, ref2; + if (node.nodeType !== this.nodeType) { + return false; + } + if (node.children.length !== this.children.length) { + return false; + } + for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { + if (!this.children[i].isEqualNode(node.children[i])) { + return false; + } + } + return true; + }; + + XMLNode.prototype.getFeature = function(feature, version) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.setUserData = function(key, data, handler) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.getUserData = function(key) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + }; + + XMLNode.prototype.contains = function(other) { + if (!other) { + return false; + } + return other === this || this.isDescendant(other); + }; + + XMLNode.prototype.isDescendant = function(node) { + var child, isDescendantChild, j, len, ref2; + ref2 = this.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (node === child) { + return true; + } + isDescendantChild = child.isDescendant(node); + if (isDescendantChild) { + return true; + } + } + return false; + }; + + XMLNode.prototype.isAncestor = function(node) { + return node.isDescendant(this); + }; + + XMLNode.prototype.isPreceding = function(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos < thisPos; + } + }; + + XMLNode.prototype.isFollowing = function(node) { + var nodePos, thisPos; + nodePos = this.treePosition(node); + thisPos = this.treePosition(this); + if (nodePos === -1 || thisPos === -1) { + return false; + } else { + return nodePos > thisPos; + } + }; + + XMLNode.prototype.treePosition = function(node) { + var found, pos; + pos = 0; + found = false; + this.foreachTreeNode(this.document(), function(childNode) { + pos++; + if (!found && childNode === node) { + return found = true; + } + }); + if (found) { + return pos; + } else { + return -1; + } + }; + + XMLNode.prototype.foreachTreeNode = function(node, func) { + var child, j, len, ref2, res; + node || (node = this.document()); + ref2 = node.children; + for (j = 0, len = ref2.length; j < len; j++) { + child = ref2[j]; + if (res = func(child)) { + return res; + } else { + res = this.foreachTreeNode(child, func); + if (res) { + return res; + } + } + } + }; + + return XMLNode; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js new file mode 100644 index 00000000..ce32fd59 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js @@ -0,0 +1,48 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLNodeFilter; + + module.exports = XMLNodeFilter = (function() { + function XMLNodeFilter() {} + + XMLNodeFilter.prototype.FilterAccept = 1; + + XMLNodeFilter.prototype.FilterReject = 2; + + XMLNodeFilter.prototype.FilterSkip = 3; + + XMLNodeFilter.prototype.ShowAll = 0xffffffff; + + XMLNodeFilter.prototype.ShowElement = 0x1; + + XMLNodeFilter.prototype.ShowAttribute = 0x2; + + XMLNodeFilter.prototype.ShowText = 0x4; + + XMLNodeFilter.prototype.ShowCDataSection = 0x8; + + XMLNodeFilter.prototype.ShowEntityReference = 0x10; + + XMLNodeFilter.prototype.ShowEntity = 0x20; + + XMLNodeFilter.prototype.ShowProcessingInstruction = 0x40; + + XMLNodeFilter.prototype.ShowComment = 0x80; + + XMLNodeFilter.prototype.ShowDocument = 0x100; + + XMLNodeFilter.prototype.ShowDocumentType = 0x200; + + XMLNodeFilter.prototype.ShowDocumentFragment = 0x400; + + XMLNodeFilter.prototype.ShowNotation = 0x800; + + XMLNodeFilter.prototype.acceptNode = function(node) { + throw new Error("This DOM method is not implemented."); + }; + + return XMLNodeFilter; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js new file mode 100644 index 00000000..3414a3e4 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js @@ -0,0 +1,28 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLNodeList; + + module.exports = XMLNodeList = (function() { + function XMLNodeList(nodes) { + this.nodes = nodes; + } + + Object.defineProperty(XMLNodeList.prototype, 'length', { + get: function() { + return this.nodes.length || 0; + } + }); + + XMLNodeList.prototype.clone = function() { + return this.nodes = null; + }; + + XMLNodeList.prototype.item = function(index) { + return this.nodes[index] || null; + }; + + return XMLNodeList; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js new file mode 100644 index 00000000..d4333d46 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js @@ -0,0 +1,49 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLCharacterData, XMLProcessingInstruction, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLCharacterData = require('./XMLCharacterData'); + + module.exports = XMLProcessingInstruction = (function(superClass) { + extend(XMLProcessingInstruction, superClass); + + function XMLProcessingInstruction(parent, target, value) { + XMLProcessingInstruction.__super__.constructor.call(this, parent); + if (target == null) { + throw new Error("Missing instruction target. " + this.debugInfo()); + } + this.type = NodeType.ProcessingInstruction; + this.target = this.stringify.insTarget(target); + this.name = this.target; + if (value) { + this.value = this.stringify.insValue(value); + } + } + + XMLProcessingInstruction.prototype.clone = function() { + return Object.create(this); + }; + + XMLProcessingInstruction.prototype.toString = function(options) { + return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); + }; + + XMLProcessingInstruction.prototype.isEqualNode = function(node) { + if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { + return false; + } + if (node.target !== this.target) { + return false; + } + return true; + }; + + return XMLProcessingInstruction; + + })(XMLCharacterData); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js new file mode 100644 index 00000000..b5928502 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js @@ -0,0 +1,35 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, XMLNode, XMLRaw, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLNode = require('./XMLNode'); + + module.exports = XMLRaw = (function(superClass) { + extend(XMLRaw, superClass); + + function XMLRaw(parent, text) { + XMLRaw.__super__.constructor.call(this, parent); + if (text == null) { + throw new Error("Missing raw text. " + this.debugInfo()); + } + this.type = NodeType.Raw; + this.value = this.stringify.raw(text); + } + + XMLRaw.prototype.clone = function() { + return Object.create(this); + }; + + XMLRaw.prototype.toString = function(options) { + return this.options.writer.raw(this, this.options.writer.filterOptions(options)); + }; + + return XMLRaw; + + })(XMLNode); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js new file mode 100644 index 00000000..159dc6b6 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js @@ -0,0 +1,176 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + NodeType = require('./NodeType'); + + XMLWriterBase = require('./XMLWriterBase'); + + WriterState = require('./WriterState'); + + module.exports = XMLStreamWriter = (function(superClass) { + extend(XMLStreamWriter, superClass); + + function XMLStreamWriter(stream, options) { + this.stream = stream; + XMLStreamWriter.__super__.constructor.call(this, options); + } + + XMLStreamWriter.prototype.endline = function(node, options, level) { + if (node.isLastRootNode && options.state === WriterState.CloseTag) { + return ''; + } else { + return XMLStreamWriter.__super__.endline.call(this, node, options, level); + } + }; + + XMLStreamWriter.prototype.document = function(doc, options) { + var child, i, j, k, len, len1, ref, ref1, results; + ref = doc.children; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + child = ref[i]; + child.isLastRootNode = i === doc.children.length - 1; + } + options = this.filterOptions(options); + ref1 = doc.children; + results = []; + for (k = 0, len1 = ref1.length; k < len1; k++) { + child = ref1[k]; + results.push(this.writeChildNode(child, options, 0)); + } + return results; + }; + + XMLStreamWriter.prototype.attribute = function(att, options, level) { + return this.stream.write(XMLStreamWriter.__super__.attribute.call(this, att, options, level)); + }; + + XMLStreamWriter.prototype.cdata = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.cdata.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.comment = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.comment.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.declaration = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.declaration.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.docType = function(node, options, level) { + var child, j, len, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level)); + this.stream.write(' 0) { + this.stream.write(' ['); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref = node.children; + for (j = 0, len = ref.length; j < len; j++) { + child = ref[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(']'); + } + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '>'); + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + }; + + XMLStreamWriter.prototype.element = function(node, options, level) { + var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + this.stream.write(this.indent(node, options, level) + '<' + node.name); + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + this.attribute(att, options, level); + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ''; + })) { + if (options.allowEmpty) { + this.stream.write('>'); + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + options.state = WriterState.CloseTag; + this.stream.write(options.spaceBeforeSlash + '/>'); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) { + this.stream.write('>'); + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + this.stream.write(''); + } else { + this.stream.write('>' + this.endline(node, options, level)); + options.state = WriterState.InsideTag; + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + child = ref1[j]; + this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + this.stream.write(this.indent(node, options, level) + ''); + } + this.stream.write(this.endline(node, options, level)); + options.state = WriterState.None; + return this.closeNode(node, options, level); + }; + + XMLStreamWriter.prototype.processingInstruction = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.raw = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.raw.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.text = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.text.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdAttList = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdElement = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdEntity = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this, node, options, level)); + }; + + XMLStreamWriter.prototype.dtdNotation = function(node, options, level) { + return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this, node, options, level)); + }; + + return XMLStreamWriter; + + })(XMLWriterBase); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js new file mode 100644 index 00000000..71870170 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js @@ -0,0 +1,35 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLStringWriter, XMLWriterBase, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + XMLWriterBase = require('./XMLWriterBase'); + + module.exports = XMLStringWriter = (function(superClass) { + extend(XMLStringWriter, superClass); + + function XMLStringWriter(options) { + XMLStringWriter.__super__.constructor.call(this, options); + } + + XMLStringWriter.prototype.document = function(doc, options) { + var child, i, len, r, ref; + options = this.filterOptions(options); + r = ''; + ref = doc.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, 0); + } + if (options.pretty && r.slice(-options.newline.length) === options.newline) { + r = r.slice(0, -options.newline.length); + } + return r; + }; + + return XMLStringWriter; + + })(XMLWriterBase); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js new file mode 100644 index 00000000..a39475c1 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js @@ -0,0 +1,240 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var XMLStringifier, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + hasProp = {}.hasOwnProperty; + + module.exports = XMLStringifier = (function() { + function XMLStringifier(options) { + this.assertLegalName = bind(this.assertLegalName, this); + this.assertLegalChar = bind(this.assertLegalChar, this); + var key, ref, value; + options || (options = {}); + this.options = options; + if (!this.options.version) { + this.options.version = '1.0'; + } + ref = options.stringify || {}; + for (key in ref) { + if (!hasProp.call(ref, key)) continue; + value = ref[key]; + this[key] = value; + } + } + + XMLStringifier.prototype.name = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalName('' + val || ''); + }; + + XMLStringifier.prototype.text = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.textEscape('' + val || '')); + }; + + XMLStringifier.prototype.cdata = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + val = val.replace(']]>', ']]]]>'); + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.comment = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/--/)) { + throw new Error("Comment text cannot contain double-hypen: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.raw = function(val) { + if (this.options.noValidation) { + return val; + } + return '' + val || ''; + }; + + XMLStringifier.prototype.attValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar(this.attEscape(val = '' + val || '')); + }; + + XMLStringifier.prototype.insTarget = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.insValue = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (val.match(/\?>/)) { + throw new Error("Invalid processing instruction value: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.xmlVersion = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/1\.[0-9]+/)) { + throw new Error("Invalid version number: " + val); + } + return val; + }; + + XMLStringifier.prototype.xmlEncoding = function(val) { + if (this.options.noValidation) { + return val; + } + val = '' + val || ''; + if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { + throw new Error("Invalid encoding: " + val); + } + return this.assertLegalChar(val); + }; + + XMLStringifier.prototype.xmlStandalone = function(val) { + if (this.options.noValidation) { + return val; + } + if (val) { + return "yes"; + } else { + return "no"; + } + }; + + XMLStringifier.prototype.dtdPubID = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdSysID = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdElementValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdAttType = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdAttDefault = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdEntityValue = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.dtdNData = function(val) { + if (this.options.noValidation) { + return val; + } + return this.assertLegalChar('' + val || ''); + }; + + XMLStringifier.prototype.convertAttKey = '@'; + + XMLStringifier.prototype.convertPIKey = '?'; + + XMLStringifier.prototype.convertTextKey = '#text'; + + XMLStringifier.prototype.convertCDataKey = '#cdata'; + + XMLStringifier.prototype.convertCommentKey = '#comment'; + + XMLStringifier.prototype.convertRawKey = '#raw'; + + XMLStringifier.prototype.assertLegalChar = function(str) { + var regex, res; + if (this.options.noValidation) { + return str; + } + regex = ''; + if (this.options.version === '1.0') { + regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + if (res = str.match(regex)) { + throw new Error("Invalid character in string: " + str + " at index " + res.index); + } + } else if (this.options.version === '1.1') { + regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + if (res = str.match(regex)) { + throw new Error("Invalid character in string: " + str + " at index " + res.index); + } + } + return str; + }; + + XMLStringifier.prototype.assertLegalName = function(str) { + var regex; + if (this.options.noValidation) { + return str; + } + this.assertLegalChar(str); + regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; + if (!str.match(regex)) { + throw new Error("Invalid character in name"); + } + return str; + }; + + XMLStringifier.prototype.textEscape = function(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; + return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); + }; + + XMLStringifier.prototype.attEscape = function(str) { + var ampregex; + if (this.options.noValidation) { + return str; + } + ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; + return str.replace(ampregex, '&').replace(/ 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ''; + }; + + XMLWriterBase.prototype.endline = function(node, options, level) { + if (!options.pretty || options.suppressPrettyCount) { + return ''; + } else { + return options.newline; + } + }; + + XMLWriterBase.prototype.attribute = function(att, options, level) { + var r; + this.openAttribute(att, options, level); + r = ' ' + att.name + '="' + att.value + '"'; + this.closeAttribute(att, options, level); + return r; + }; + + XMLWriterBase.prototype.cdata = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.comment = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.declaration = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.docType = function(node, options, level) { + var child, i, len, r, ref; + level || (level = 0); + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + r += ' 0) { + r += ' ['; + r += this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref = node.children; + for (i = 0, len = ref.length; i < len; i++) { + child = ref[i]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += ']'; + } + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '>'; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.element = function(node, options, level) { + var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; + level || (level = 0); + prettySuppressed = false; + r = ''; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r += this.indent(node, options, level) + '<' + node.name; + ref = node.attribs; + for (name in ref) { + if (!hasProp.call(ref, name)) continue; + att = ref[name]; + r += this.attribute(att, options, level); + } + childNodeCount = node.children.length; + firstChildNode = childNodeCount === 0 ? null : node.children[0]; + if (childNodeCount === 0 || node.children.every(function(e) { + return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ''; + })) { + if (options.allowEmpty) { + r += '>'; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + options.state = WriterState.CloseTag; + r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level); + } + } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) { + r += '>'; + options.state = WriterState.InsideTag; + options.suppressPrettyCount++; + prettySuppressed = true; + r += this.writeChildNode(firstChildNode, options, level + 1); + options.suppressPrettyCount--; + prettySuppressed = false; + options.state = WriterState.CloseTag; + r += '' + this.endline(node, options, level); + } else { + if (options.dontPrettyTextNodes) { + ref1 = node.children; + for (i = 0, len = ref1.length; i < len; i++) { + child = ref1[i]; + if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) { + options.suppressPrettyCount++; + prettySuppressed = true; + break; + } + } + } + r += '>' + this.endline(node, options, level); + options.state = WriterState.InsideTag; + ref2 = node.children; + for (j = 0, len1 = ref2.length; j < len1; j++) { + child = ref2[j]; + r += this.writeChildNode(child, options, level + 1); + } + options.state = WriterState.CloseTag; + r += this.indent(node, options, level) + ''; + if (prettySuppressed) { + options.suppressPrettyCount--; + } + r += this.endline(node, options, level); + options.state = WriterState.None; + } + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.writeChildNode = function(node, options, level) { + switch (node.type) { + case NodeType.CData: + return this.cdata(node, options, level); + case NodeType.Comment: + return this.comment(node, options, level); + case NodeType.Element: + return this.element(node, options, level); + case NodeType.Raw: + return this.raw(node, options, level); + case NodeType.Text: + return this.text(node, options, level); + case NodeType.ProcessingInstruction: + return this.processingInstruction(node, options, level); + case NodeType.Dummy: + return ''; + case NodeType.Declaration: + return this.declaration(node, options, level); + case NodeType.DocType: + return this.docType(node, options, level); + case NodeType.AttributeDeclaration: + return this.dtdAttList(node, options, level); + case NodeType.ElementDeclaration: + return this.dtdElement(node, options, level); + case NodeType.EntityDeclaration: + return this.dtdEntity(node, options, level); + case NodeType.NotationDeclaration: + return this.dtdNotation(node, options, level); + default: + throw new Error("Unknown XML node type: " + node.constructor.name); + } + }; + + XMLWriterBase.prototype.processingInstruction = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + ''; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.raw = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.text = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level); + options.state = WriterState.InsideTag; + r += node.value; + options.state = WriterState.CloseTag; + r += this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdAttList = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdElement = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdEntity = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.dtdNotation = function(node, options, level) { + var r; + this.openNode(node, options, level); + options.state = WriterState.OpenTag; + r = this.indent(node, options, level) + '' + this.endline(node, options, level); + options.state = WriterState.None; + this.closeNode(node, options, level); + return r; + }; + + XMLWriterBase.prototype.openNode = function(node, options, level) {}; + + XMLWriterBase.prototype.closeNode = function(node, options, level) {}; + + XMLWriterBase.prototype.openAttribute = function(att, options, level) {}; + + XMLWriterBase.prototype.closeAttribute = function(att, options, level) {}; + + return XMLWriterBase; + + })(); + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/index.js b/test-eol-project/node_modules/xmlbuilder/lib/index.js new file mode 100644 index 00000000..b1ed2636 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/lib/index.js @@ -0,0 +1,65 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; + + ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction; + + XMLDOMImplementation = require('./XMLDOMImplementation'); + + XMLDocument = require('./XMLDocument'); + + XMLDocumentCB = require('./XMLDocumentCB'); + + XMLStringWriter = require('./XMLStringWriter'); + + XMLStreamWriter = require('./XMLStreamWriter'); + + NodeType = require('./NodeType'); + + WriterState = require('./WriterState'); + + module.exports.create = function(name, xmldec, doctype, options) { + var doc, root; + if (name == null) { + throw new Error("Root element needs a name."); + } + options = assign({}, xmldec, doctype, options); + doc = new XMLDocument(options); + root = doc.element(name); + if (!options.headless) { + doc.declaration(options); + if ((options.pubID != null) || (options.sysID != null)) { + doc.dtd(options); + } + } + return root; + }; + + module.exports.begin = function(options, onData, onEnd) { + var ref1; + if (isFunction(options)) { + ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; + options = {}; + } + if (onData) { + return new XMLDocumentCB(options, onData, onEnd); + } else { + return new XMLDocument(options); + } + }; + + module.exports.stringWriter = function(options) { + return new XMLStringWriter(options); + }; + + module.exports.streamWriter = function(stream, options) { + return new XMLStreamWriter(stream, options); + }; + + module.exports.implementation = new XMLDOMImplementation(); + + module.exports.nodeType = NodeType; + + module.exports.writerState = WriterState; + +}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/package.json b/test-eol-project/node_modules/xmlbuilder/package.json new file mode 100644 index 00000000..512cd977 --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/package.json @@ -0,0 +1,39 @@ +{ + "name": "xmlbuilder", + "version": "11.0.1", + "keywords": [ + "xml", + "xmlbuilder" + ], + "homepage": "http://github.com/oozcitak/xmlbuilder-js", + "description": "An XML builder for node.js", + "author": "Ozgur Ozcitak ", + "contributors": [], + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/oozcitak/xmlbuilder-js.git" + }, + "bugs": { + "url": "http://github.com/oozcitak/xmlbuilder-js/issues" + }, + "main": "./lib/index", + "typings": "./typings/index.d.ts", + "engines": { + "node": ">=4.0" + }, + "dependencies": {}, + "devDependencies": { + "coffeescript": "1.*", + "mocha": "*", + "coffee-coverage": "2.*", + "istanbul": "*", + "coveralls": "*", + "xpath": "*" + }, + "scripts": { + "prepublishOnly": "coffee -co lib src", + "postpublish": "rm -rf lib", + "test": "mocha \"test/**/*.coffee\" && istanbul report text lcov" + } +} diff --git a/test-eol-project/node_modules/xmlbuilder/typings/index.d.ts b/test-eol-project/node_modules/xmlbuilder/typings/index.d.ts new file mode 100644 index 00000000..3e0e5b0a --- /dev/null +++ b/test-eol-project/node_modules/xmlbuilder/typings/index.d.ts @@ -0,0 +1,153 @@ +// Type definitions for xmlbuilder +// Project: https://github.com/oozcitak/xmlbuilder-js +// Definitions by: Wallymathieu +// : GaikwadPratik +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = xmlbuilder; + +declare namespace xmlbuilder { + + class XMLDocType { + clone(): XMLDocType; + element(name: string, value?: Object): XMLDocType; + attList(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; + entity(name: string, value: any): XMLDocType; + pEntity(name: string, value: any): XMLDocType; + notation(name: string, value: any): XMLDocType; + cdata(value: string): XMLDocType; + comment(value: string): XMLDocType; + instruction(target: string, value: any): XMLDocType; + root(): XMLDocType; + document(): any; + toString(options?: XMLToStringOptions, level?: Number): string; + + ele(name: string, value?: Object): XMLDocType; + att(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; + ent(name: string, value: any): XMLDocType; + pent(name: string, value: any): XMLDocType; + not(name: string, value: any): XMLDocType; + dat(value: string): XMLDocType; + com(value: string): XMLDocType; + ins(target: string, value: any): XMLDocType; + up(): XMLDocType; + doc(): any; + } + + class XMLElementOrXMLNode { + // XMLElement: + clone(): XMLElementOrXMLNode; + attribute(name: any, value?: any): XMLElementOrXMLNode; + att(name: any, value?: any): XMLElementOrXMLNode; + removeAttribute(name: string): XMLElementOrXMLNode; + instruction(target: string, value: any): XMLElementOrXMLNode; + instruction(array: Array): XMLElementOrXMLNode; + instruction(obj: Object): XMLElementOrXMLNode; + ins(target: string, value: any): XMLElementOrXMLNode; + ins(array: Array): XMLElementOrXMLNode; + ins(obj: Object): XMLElementOrXMLNode; + a(name: any, value?: any): XMLElementOrXMLNode; + i(target: string, value: any): XMLElementOrXMLNode; + i(array: Array): XMLElementOrXMLNode; + i(obj: Object): XMLElementOrXMLNode; + toString(options?: XMLToStringOptions, level?: Number): string; + // XMLNode: + element(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + ele(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + insertBefore(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + insertAfter(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + remove(): XMLElementOrXMLNode; + node(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + text(value: string): XMLElementOrXMLNode; + cdata(value: string): XMLElementOrXMLNode; + comment(value: string): XMLElementOrXMLNode; + raw(value: string): XMLElementOrXMLNode; + declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; + doctype(pubID: string, sysID: string): XMLDocType; + up(): XMLElementOrXMLNode; + importDocument(input: XMLElementOrXMLNode): XMLElementOrXMLNode; + root(): XMLElementOrXMLNode; + document(): any; + end(options?: XMLEndOptions): string; + prev(): XMLElementOrXMLNode; + next(): XMLElementOrXMLNode; + nod(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + txt(value: string): XMLElementOrXMLNode; + dat(value: string): XMLElementOrXMLNode; + com(value: string): XMLElementOrXMLNode; + doc(): XMLElementOrXMLNode; + dec(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; + dtd(pubID: string, sysID: string): XMLDocType; + e(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + n(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + t(value: string): XMLElementOrXMLNode; + d(value: string): XMLElementOrXMLNode; + c(value: string): XMLElementOrXMLNode; + r(value: string): XMLElementOrXMLNode; + u(): XMLElementOrXMLNode; + } + + interface XMLDec { + version?: string; + encoding?: string; + standalone?: boolean; + } + + interface XMLDtd { + pubID?: string; + sysID?: string; + } + + interface XMLStringifier { + [x: string]: ((v: any) => string) | string; + } + + interface XMLWriter { + [x: string]: ((e: XMLElementOrXMLNode, options: WriterOptions, level?: number) => void); + } + + interface XMLCreateOptions { + headless?: boolean; + keepNullNodes?: boolean; + keepNullAttributes?: boolean; + ignoreDecorators?: boolean; + separateArrayItems?: boolean; + noDoubleEncoding?: boolean; + stringify?: XMLStringifier; + } + + interface XMLToStringOptions { + pretty?: boolean; + indent?: string; + offset?: number; + newline?: string; + allowEmpty?: boolean; + spacebeforeslash?: string; + } + + interface XMLEndOptions extends XMLToStringOptions { + writer?: XMLWriter; + } + + interface WriterOptions { + pretty?: boolean; + indent?: string; + newline?: string; + offset?: number; + allowEmpty?: boolean; + dontPrettyTextNodes?: boolean; + spaceBeforeSlash?: string | boolean; + user? :any; + state?: WriterState; + } + + enum WriterState { + None = 0, + OpenTag = 1, + InsideTag = 2, + CloseTag = 3 + } + + function create(nameOrObjSpec: string | { [name: string]: Object }, xmldecOrOptions?: XMLDec | XMLCreateOptions, doctypeOrOptions?: XMLDtd | XMLCreateOptions, options?: XMLCreateOptions): XMLElementOrXMLNode; + function begin(): XMLElementOrXMLNode; +} \ No newline at end of file diff --git a/test-eol-project/node_modules/y18n/CHANGELOG.md b/test-eol-project/node_modules/y18n/CHANGELOG.md new file mode 100644 index 00000000..b7e86e94 --- /dev/null +++ b/test-eol-project/node_modules/y18n/CHANGELOG.md @@ -0,0 +1,35 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +### [4.0.3](https://www.github.com/yargs/y18n/compare/y18n-v4.0.2...y18n-v4.0.3) (2021-04-07) + + +### Bug Fixes + +* **release:** 4.x.x should not enforce Node 10 ([#126](https://www.github.com/yargs/y18n/issues/126)) ([1e21a53](https://www.github.com/yargs/y18n/commit/1e21a536e9135d8403a47be88922157a706b7cde)) + +### 4.0.1 (2020-11-30) + +### Bug Fixes + +* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) + + +# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) + + +### Bug Fixes + +* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) + + +### Features + +* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf)) + + +### BREAKING CHANGES + +* **__:** dropping Node 0.10/Node 0.12 support diff --git a/test-eol-project/node_modules/y18n/LICENSE b/test-eol-project/node_modules/y18n/LICENSE new file mode 100644 index 00000000..3c157f0b --- /dev/null +++ b/test-eol-project/node_modules/y18n/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/test-eol-project/node_modules/y18n/README.md b/test-eol-project/node_modules/y18n/README.md new file mode 100644 index 00000000..826474f2 --- /dev/null +++ b/test-eol-project/node_modules/y18n/README.md @@ -0,0 +1,109 @@ +# y18n + +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) + +The bare-bones internationalization library used by yargs. + +Inspired by [i18n](https://www.npmjs.com/package/i18n). + +## Examples + +_simple string translation:_ + +```js +var __ = require('y18n').__ + +console.log(__('my awesome string %s', 'foo')) +``` + +output: + +`my awesome string foo` + +_using tagged template literals_ + +```js +var __ = require('y18n').__ +var str = 'foo' + +console.log(__`my awesome string ${str}`) +``` + +output: + +`my awesome string foo` + +_pluralization support:_ + +```js +var __n = require('y18n').__n + +console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) +``` + +output: + +`2 fishes foo` + +## JSON Language Files + +The JSON language files should be stored in a `./locales` folder. +File names correspond to locales, e.g., `en.json`, `pirate.json`. + +When strings are observed for the first time they will be +added to the JSON file corresponding to the current locale. + +## Methods + +### require('y18n')(config) + +Create an instance of y18n with the config provided, options include: + +* `directory`: the locale directory, default `./locales`. +* `updateFiles`: should newly observed strings be updated in file, default `true`. +* `locale`: what locale should be used. +* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) + be allowed if a file matching the locale does not exist (e.g. `en_US.json`), + default `true`. + +### y18n.\_\_(str, arg, arg, arg) + +Print a localized string, `%s` will be replaced with `arg`s. + +This function can also be used as a tag for a template literal. You can use it +like this: __`hello ${'world'}`. This will be equivalent to +`__('hello %s', 'world')`. + +### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) + +Print a localized string with appropriate pluralization. If `%d` is provided +in the string, the `count` will replace this placeholder. + +### y18n.setLocale(str) + +Set the current locale being used. + +### y18n.getLocale() + +What locale is currently being used? + +### y18n.updateLocale(obj) + +Update the current locale with the key value pairs in `obj`. + +## License + +ISC + +[travis-url]: https://travis-ci.org/yargs/y18n +[travis-image]: https://img.shields.io/travis/yargs/y18n.svg +[coveralls-url]: https://coveralls.io/github/yargs/y18n +[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg +[npm-url]: https://npmjs.org/package/y18n +[npm-image]: https://img.shields.io/npm/v/y18n.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: https://github.com/feross/standard diff --git a/test-eol-project/node_modules/y18n/index.js b/test-eol-project/node_modules/y18n/index.js new file mode 100644 index 00000000..727362aa --- /dev/null +++ b/test-eol-project/node_modules/y18n/index.js @@ -0,0 +1,188 @@ +var fs = require('fs') +var path = require('path') +var util = require('util') + +function Y18N (opts) { + // configurable options. + opts = opts || {} + this.directory = opts.directory || './locales' + this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true + this.locale = opts.locale || 'en' + this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true + + // internal stuff. + this.cache = Object.create(null) + this.writeQueue = [] +} + +Y18N.prototype.__ = function () { + if (typeof arguments[0] !== 'string') { + return this._taggedLiteral.apply(this, arguments) + } + var args = Array.prototype.slice.call(arguments) + var str = args.shift() + var cb = function () {} // start with noop. + + if (typeof args[args.length - 1] === 'function') cb = args.pop() + cb = cb || function () {} // noop. + + if (!this.cache[this.locale]) this._readLocaleFile() + + // we've observed a new string, update the language file. + if (!this.cache[this.locale][str] && this.updateFiles) { + this.cache[this.locale][str] = str + + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite([this.directory, this.locale, cb]) + } else { + cb() + } + + return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) +} + +Y18N.prototype._taggedLiteral = function (parts) { + var args = arguments + var str = '' + parts.forEach(function (part, i) { + var arg = args[i + 1] + str += part + if (typeof arg !== 'undefined') { + str += '%s' + } + }) + return this.__.apply(null, [str].concat([].slice.call(arguments, 1))) +} + +Y18N.prototype._enqueueWrite = function (work) { + this.writeQueue.push(work) + if (this.writeQueue.length === 1) this._processWriteQueue() +} + +Y18N.prototype._processWriteQueue = function () { + var _this = this + var work = this.writeQueue[0] + + // destructure the enqueued work. + var directory = work[0] + var locale = work[1] + var cb = work[2] + + var languageFile = this._resolveLocaleFile(directory, locale) + var serializedLocale = JSON.stringify(this.cache[locale], null, 2) + + fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { + _this.writeQueue.shift() + if (_this.writeQueue.length > 0) _this._processWriteQueue() + cb(err) + }) +} + +Y18N.prototype._readLocaleFile = function () { + var localeLookup = {} + var languageFile = this._resolveLocaleFile(this.directory, this.locale) + + try { + localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) + } catch (err) { + if (err instanceof SyntaxError) { + err.message = 'syntax error in ' + languageFile + } + + if (err.code === 'ENOENT') localeLookup = {} + else throw err + } + + this.cache[this.locale] = localeLookup +} + +Y18N.prototype._resolveLocaleFile = function (directory, locale) { + var file = path.resolve(directory, './', locale + '.json') + if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { + // attempt fallback to language only + var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') + if (this._fileExistsSync(languageFile)) file = languageFile + } + return file +} + +// this only exists because fs.existsSync() "will be deprecated" +// see https://nodejs.org/api/fs.html#fs_fs_existssync_path +Y18N.prototype._fileExistsSync = function (file) { + try { + return fs.statSync(file).isFile() + } catch (err) { + return false + } +} + +Y18N.prototype.__n = function () { + var args = Array.prototype.slice.call(arguments) + var singular = args.shift() + var plural = args.shift() + var quantity = args.shift() + + var cb = function () {} // start with noop. + if (typeof args[args.length - 1] === 'function') cb = args.pop() + + if (!this.cache[this.locale]) this._readLocaleFile() + + var str = quantity === 1 ? singular : plural + if (this.cache[this.locale][singular]) { + str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] + } + + // we've observed a new string, update the language file. + if (!this.cache[this.locale][singular] && this.updateFiles) { + this.cache[this.locale][singular] = { + one: singular, + other: plural + } + + // include the current directory and locale, + // since these values could change before the + // write is performed. + this._enqueueWrite([this.directory, this.locale, cb]) + } else { + cb() + } + + // if a %d placeholder is provided, add quantity + // to the arguments expanded by util.format. + var values = [str] + if (~str.indexOf('%d')) values.push(quantity) + + return util.format.apply(util, values.concat(args)) +} + +Y18N.prototype.setLocale = function (locale) { + this.locale = locale +} + +Y18N.prototype.getLocale = function () { + return this.locale +} + +Y18N.prototype.updateLocale = function (obj) { + if (!this.cache[this.locale]) this._readLocaleFile() + + for (var key in obj) { + this.cache[this.locale][key] = obj[key] + } +} + +module.exports = function (opts) { + var y18n = new Y18N(opts) + + // bind all functions to y18n, so that + // they can be used in isolation. + for (var key in y18n) { + if (typeof y18n[key] === 'function') { + y18n[key] = y18n[key].bind(y18n) + } + } + + return y18n +} diff --git a/test-eol-project/node_modules/y18n/package.json b/test-eol-project/node_modules/y18n/package.json new file mode 100644 index 00000000..6f08863e --- /dev/null +++ b/test-eol-project/node_modules/y18n/package.json @@ -0,0 +1,39 @@ +{ + "name": "y18n", + "version": "4.0.3", + "description": "the bare-bones internationalization library used by yargs", + "main": "index.js", + "scripts": { + "pretest": "standard", + "test": "nyc mocha", + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "standard-version" + }, + "repository": { + "type": "git", + "url": "git@github.com:yargs/y18n.git" + }, + "files": [ + "index.js" + ], + "keywords": [ + "i18n", + "internationalization", + "yargs" + ], + "author": "Ben Coe ", + "license": "ISC", + "bugs": { + "url": "https://github.com/yargs/y18n/issues" + }, + "homepage": "https://github.com/yargs/y18n", + "devDependencies": { + "chai": "^4.0.1", + "coveralls": "^3.0.0", + "mocha": "^4.0.1", + "nyc": "^11.0.1", + "rimraf": "^2.5.0", + "standard": "^10.0.0-beta.0", + "standard-version": "^4.2.0" + } +} diff --git a/test-eol-project/node_modules/yargs-parser/CHANGELOG.md b/test-eol-project/node_modules/yargs-parser/CHANGELOG.md new file mode 100644 index 00000000..d91dc516 --- /dev/null +++ b/test-eol-project/node_modules/yargs-parser/CHANGELOG.md @@ -0,0 +1,601 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16) + + +### Bug Fixes + +* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e)) + +### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26) + + +### Bug Fixes + +* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13)) + +### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16) + + +### Bug Fixes + +* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential +prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) + +## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07) + + +### Features + +* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f)) + +## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02) + + +### ⚠ BREAKING CHANGES + +* the narg count is now enforced when parsing arrays. + +### Features + +* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c)) + +## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01) + + +### Features + +* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb)) + +### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29) + + +### Bug Fixes + +* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba)) + +## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10) + + +### ⚠ BREAKING CHANGES + +* this reverts parsing behavior of booleans to that of yargs@14 +* objects used during parsing are now created with a null +prototype. There may be some scenarios where this change in behavior +leaks externally. + +### Features + +* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5)) +* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732)) + + +### Bug Fixes + +* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346)) +* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c)) +* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de)) +* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5)) + +## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01) + + +### ⚠ BREAKING CHANGES + +* populate error if incompatible narg/count or array/count options are used (#191) + +### Features + +* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0)) +* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9)) + + +### Reverts + +* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf)) + +## [15.0.0](https://github.com/yargs/yargs-parser/compare/v14.0.0...v15.0.0) (2019-10-07) + + +### Features + +* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality ([ef771ca](https://github.com/yargs/yargs-parser/commit/ef771ca)) + + +### BREAKING CHANGES + +* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality + + + +## [14.0.0](https://github.com/yargs/yargs-parser/compare/v13.1.1...v14.0.0) (2019-09-06) + + +### Bug Fixes + +* boolean arrays with default values ([#185](https://github.com/yargs/yargs-parser/issues/185)) ([7d42572](https://github.com/yargs/yargs-parser/commit/7d42572)) +* boolean now behaves the same as other array types ([#184](https://github.com/yargs/yargs-parser/issues/184)) ([17ca3bd](https://github.com/yargs/yargs-parser/commit/17ca3bd)) +* eatNargs() for 'opt.narg === 0' and boolean typed options ([#188](https://github.com/yargs/yargs-parser/issues/188)) ([c5a1db0](https://github.com/yargs/yargs-parser/commit/c5a1db0)) +* maybeCoerceNumber now takes precedence over coerce return value ([#182](https://github.com/yargs/yargs-parser/issues/182)) ([2f26436](https://github.com/yargs/yargs-parser/commit/2f26436)) +* take into account aliases when appending arrays from config object ([#199](https://github.com/yargs/yargs-parser/issues/199)) ([f8a2d3f](https://github.com/yargs/yargs-parser/commit/f8a2d3f)) + + +### Features + +* add configuration option to "collect-unknown-options" ([#181](https://github.com/yargs/yargs-parser/issues/181)) ([7909cc4](https://github.com/yargs/yargs-parser/commit/7909cc4)) +* maybeCoerceNumber() now takes into account arrays ([#187](https://github.com/yargs/yargs-parser/issues/187)) ([31c204b](https://github.com/yargs/yargs-parser/commit/31c204b)) + + +### BREAKING CHANGES + +* unless "parse-numbers" is set to "false", arrays of numeric strings are now parsed as numbers, rather than strings. +* we have dropped the broken "defaulted" functionality; we would like to revisit adding this in the future. +* maybeCoerceNumber now takes precedence over coerce return value (#182) + + + +### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) + + +### Bug Fixes + +* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) +* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) +* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) + +## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) + + +### Features + +* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) +* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) + + + + +# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) + + +### Features + +* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings + + + + +# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) + + +### Bug Fixes + +* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) + + +### Features + +* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) + + +### BREAKING CHANGES + +* a flag with no right-hand value no longer populates defaulted options with `undefined`. +* quotes at beginning and endings of strings are not removed during parsing. + + + + +## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) + + +### Bug Fixes + +* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) + + +### Reverts + +* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) + + + + +# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) + + +### Bug Fixes + +* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) + + +### Features + +* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) + + + + +# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) + + +### Bug Fixes + +* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) +* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) +* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) + + +### Chores + +* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) + + +### Features + +* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) +* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) + + +### BREAKING CHANGES + +* drops Node 4 support +* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. + + + + +# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) + + +### Features + +* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) + + + + +# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) + + +### Bug Fixes + +* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) + + +### BREAKING CHANGES + +* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. + +Previous behavior: +```js +var parse = require('yargs-parser'); + +parse('--flag', {boolean: ['flag']}); +// => { _: [], flag: true } + +parse('--no-flag', {boolean: ['flag']}); +// => { _: [], flag: false } + +parse('', {boolean: ['flag']}); +// => { _: [], flag: false } +``` + +New behavior: +```js +var parse = require('yargs-parser'); + +parse('--flag', {boolean: ['flag']}); +// => { _: [], flag: true } + +parse('--no-flag', {boolean: ['flag']}); +// => { _: [], flag: false } + +parse('', {boolean: ['flag']}); +// => { _: [] } => flag not set similarly to other option type +``` + + + + +## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) + + +### Bug Fixes + +* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) + + + + +## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) + + +### Bug Fixes + +* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) + + + + +# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) + + +### Features + +* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3)) + + +### BREAKING CHANGES + +* arguments of form --foo, -abc, will no longer be consumed by nargs + + + + +# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) + + +### Bug Fixes + +* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) +* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) +* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) +* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) +* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) +* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) + + +### Features + +* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) +* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) + + + + +# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) + + +### Bug Fixes + +* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) + + +### Features + +* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) +* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) + + +### BREAKING CHANGES + +* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. + + + + +# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) + + +### Chores + +* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) + + +### BREAKING CHANGES + +* populate-- now defaults to false. + + + + +## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) + + +### Bug Fixes + +* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) + + + + +# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) + + +### Bug Fixes + +* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) +* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) + + +### Chores + +* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) + + +### Features + +* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) +* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) + + +### BREAKING CHANGES + +* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. +* camelcase now requires Node 4+. +* environment variables will now override config files (args, env, config-file, config-object) + + + + +# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) + + +### Bug Fixes + +* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) + + +### BREAKING CHANGES + +* environment variables will now override config files (args, env, config-file, config-object) + + + + +## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) + + +### Bug Fixes + +* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) + + + + +# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) + + +### Bug Fixes + +* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) + + +### Features + +* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) + + + + +# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) + + +### Features + +* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) +* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) + + + + +## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) + + +### Bug Fixes + +* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) + + + + +## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) + + +### Bug Fixes + +* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) + + + + +# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) + + +### Bug Fixes + +* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) + + +### BREAKING CHANGES + +* coerce is no longer applied to individual arguments in an implicit array. + + + + +# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) + + +### Features + +* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) + + + + +# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) + + +### Bug Fixes + +* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) +* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) +* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) + + +### Features + +* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) + + + + +# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) + + +### Bug Fixes + +* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) +* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) + +### BREAKING CHANGES + +* subtle change to how values are parsed in a group of single-character arguments. +* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ + + + + +## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) + + +### Bug Fixes + +* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) + + + + +# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) + + +### Features + +* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) + + + + +# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) + + +### Bug Fixes + +* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) +* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) +* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) +* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) +* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) + +### Features + +* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) +* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) diff --git a/test-eol-project/node_modules/yargs-parser/LICENSE.txt b/test-eol-project/node_modules/yargs-parser/LICENSE.txt new file mode 100644 index 00000000..836440be --- /dev/null +++ b/test-eol-project/node_modules/yargs-parser/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/yargs-parser/README.md b/test-eol-project/node_modules/yargs-parser/README.md new file mode 100644 index 00000000..bae61c2a --- /dev/null +++ b/test-eol-project/node_modules/yargs-parser/README.md @@ -0,0 +1,449 @@ +# yargs-parser + +[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](https://travis-ci.org/yargs/yargs-parser) +[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + + +The mighty option parser used by [yargs](https://github.com/yargs/yargs). + +visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. + + + +## Example + +```sh +npm i yargs-parser --save +``` + +```js +var argv = require('yargs-parser')(process.argv.slice(2)) +console.log(argv) +``` + +```sh +node example.js --foo=33 --bar hello +{ _: [], foo: 33, bar: 'hello' } +``` + +_or parse a string!_ + +```js +var argv = require('yargs-parser')('--foo=99 --bar=33') +console.log(argv) +``` + +```sh +{ _: [], foo: 99, bar: 33 } +``` + +Convert an array of mixed types before passing to `yargs-parser`: + +```js +var parse = require('yargs-parser') +parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string +parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings +``` + +## API + +### require('yargs-parser')(args, opts={}) + +Parses command line arguments returning a simple mapping of keys and values. + +**expects:** + +* `args`: a string or array of strings representing the options to parse. +* `opts`: provide a set of hints indicating how `args` should be parsed: + * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
    + Indicate that keys should be parsed as an array and coerced to booleans / numbers:
    + `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. + * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. + * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided + (or throws an error). For arrays the function is called only once for the entire array:
    + `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
    + `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). + * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. + * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. + * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. + * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. + * `opts.normalize`: `path.normalize()` will be applied to values set to this key. + * `opts.number`: keys should be treated as numbers. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). + +**returns:** + +* `obj`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. + +### require('yargs-parser').detailed(args, opts={}) + +Parses a command line string, returning detailed information required by the +yargs engine. + +**expects:** + +* `args`: a string or array of strings representing options to parse. +* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. + +**returns:** + +* `argv`: an object representing the parsed value of `args` + * `key/value`: key value pairs for each argument and their aliases. + * `_`: an array representing the positional arguments. + * [optional] `--`: an array with arguments after the end-of-options flag `--`. +* `error`: populated with an error object if an exception occurred during parsing. +* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. +* `newAliases`: any new aliases added via camel-case expansion: + * `boolean`: `{ fooBar: true }` +* `defaulted`: any new argument created by `opts.default`, no aliases included. + * `boolean`: `{ foo: true }` +* `configuration`: given by default settings and `opts.configuration`. + + + +### Configuration + +The yargs-parser applies several automated transformations on the keys provided +in `args`. These features can be turned on and off using the `configuration` field +of `opts`. + +```js +var parsed = parser(['--no-dice'], { + configuration: { + 'boolean-negation': false + } +}) +``` + +### short option groups + +* default: `true`. +* key: `short-option-groups`. + +Should a group of short-options be treated as boolean flags? + +```sh +node example.js -abc +{ _: [], a: true, b: true, c: true } +``` + +_if disabled:_ + +```sh +node example.js -abc +{ _: [], abc: true } +``` + +### camel-case expansion + +* default: `true`. +* key: `camel-case-expansion`. + +Should hyphenated arguments be expanded into camel-case aliases? + +```sh +node example.js --foo-bar +{ _: [], 'foo-bar': true, fooBar: true } +``` + +_if disabled:_ + +```sh +node example.js --foo-bar +{ _: [], 'foo-bar': true } +``` + +### dot-notation + +* default: `true` +* key: `dot-notation` + +Should keys that contain `.` be treated as objects? + +```sh +node example.js --foo.bar +{ _: [], foo: { bar: true } } +``` + +_if disabled:_ + +```sh +node example.js --foo.bar +{ _: [], "foo.bar": true } +``` + +### parse numbers + +* default: `true` +* key: `parse-numbers` + +Should keys that look like numbers be treated as such? + +```sh +node example.js --foo=99.3 +{ _: [], foo: 99.3 } +``` + +_if disabled:_ + +```sh +node example.js --foo=99.3 +{ _: [], foo: "99.3" } +``` + +### boolean negation + +* default: `true` +* key: `boolean-negation` + +Should variables prefixed with `--no` be treated as negations? + +```sh +node example.js --no-foo +{ _: [], foo: false } +``` + +_if disabled:_ + +```sh +node example.js --no-foo +{ _: [], "no-foo": true } +``` + +### combine arrays + +* default: `false` +* key: `combine-arrays` + +Should arrays be combined when provided by both command line arguments and +a configuration file. + +### duplicate arguments array + +* default: `true` +* key: `duplicate-arguments-array` + +Should arguments be coerced into an array when duplicated: + +```sh +node example.js -x 1 -x 2 +{ _: [], x: [1, 2] } +``` + +_if disabled:_ + +```sh +node example.js -x 1 -x 2 +{ _: [], x: 2 } +``` + +### flatten duplicate arrays + +* default: `true` +* key: `flatten-duplicate-arrays` + +Should array arguments be coerced into a single array when duplicated: + +```sh +node example.js -x 1 2 -x 3 4 +{ _: [], x: [1, 2, 3, 4] } +``` + +_if disabled:_ + +```sh +node example.js -x 1 2 -x 3 4 +{ _: [], x: [[1, 2], [3, 4]] } +``` + +### greedy arrays + +* default: `true` +* key: `greedy-arrays` + +Should arrays consume more than one positional argument following their flag. + +```sh +node example --arr 1 2 +{ _[], arr: [1, 2] } +``` + +_if disabled:_ + +```sh +node example --arr 1 2 +{ _[2], arr: [1] } +``` + +**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** + +### nargs eats options + +* default: `false` +* key: `nargs-eats-options` + +Should nargs consume dash options as well as positional arguments. + +### negation prefix + +* default: `no-` +* key: `negation-prefix` + +The prefix to use for negated boolean variables. + +```sh +node example.js --no-foo +{ _: [], foo: false } +``` + +_if set to `quux`:_ + +```sh +node example.js --quuxfoo +{ _: [], foo: false } +``` + +### populate -- + +* default: `false`. +* key: `populate--` + +Should unparsed flags be stored in `--` or `_`. + +_If disabled:_ + +```sh +node example.js a -b -- x y +{ _: [ 'a', 'x', 'y' ], b: true } +``` + +_If enabled:_ + +```sh +node example.js a -b -- x y +{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } +``` + +### set placeholder key + +* default: `false`. +* key: `set-placeholder-key`. + +Should a placeholder be added for keys not set via the corresponding CLI argument? + +_If disabled:_ + +```sh +node example.js -a 1 -c 2 +{ _: [], a: 1, c: 2 } +``` + +_If enabled:_ + +```sh +node example.js -a 1 -c 2 +{ _: [], a: 1, b: undefined, c: 2 } +``` + +### halt at non-option + +* default: `false`. +* key: `halt-at-non-option`. + +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. + +_If disabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b' ], a: 'run', x: 'y' } +``` + +_If enabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-expansion` is disabled. + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], testField: 1 } +``` + +### unknown options as args + +* default: `false` +* key: `unknown-options-as-args` + +Should unknown options be treated like regular arguments? An unknown option is one that is not +configured in `opts`. + +_If disabled_ + +```sh +node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } +``` + +_If enabled_ + +```sh +node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } +``` + +## Special Thanks + +The yargs project evolves from optimist and minimist. It owes its +existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ + +## License + +ISC diff --git a/test-eol-project/node_modules/yargs-parser/index.js b/test-eol-project/node_modules/yargs-parser/index.js new file mode 100644 index 00000000..c14c1fc7 --- /dev/null +++ b/test-eol-project/node_modules/yargs-parser/index.js @@ -0,0 +1,1032 @@ +const camelCase = require('camelcase') +const decamelize = require('decamelize') +const path = require('path') +const tokenizeArgString = require('./lib/tokenize-arg-string') +const util = require('util') + +function parse (args, opts) { + opts = Object.assign(Object.create(null), opts) + // allow a string argument to be passed in rather + // than an argv array. + args = tokenizeArgString(args) + + // aliases might have transitive relationships, normalize this. + const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)) + const configuration = Object.assign({ + 'boolean-negation': true, + 'camel-case-expansion': true, + 'combine-arrays': false, + 'dot-notation': true, + 'duplicate-arguments-array': true, + 'flatten-duplicate-arrays': true, + 'greedy-arrays': true, + 'halt-at-non-option': false, + 'nargs-eats-options': false, + 'negation-prefix': 'no-', + 'parse-numbers': true, + 'populate--': false, + 'set-placeholder-key': false, + 'short-option-groups': true, + 'strip-aliased': false, + 'strip-dashed': false, + 'unknown-options-as-args': false + }, opts.configuration) + const defaults = Object.assign(Object.create(null), opts.default) + const configObjects = opts.configObjects || [] + const envPrefix = opts.envPrefix + const notFlagsOption = configuration['populate--'] + const notFlagsArgv = notFlagsOption ? '--' : '_' + const newAliases = Object.create(null) + const defaulted = Object.create(null) + // allow a i18n handler to be passed in, default to a fake one (util.format). + const __ = opts.__ || util.format + const flags = { + aliases: Object.create(null), + arrays: Object.create(null), + bools: Object.create(null), + strings: Object.create(null), + numbers: Object.create(null), + counts: Object.create(null), + normalize: Object.create(null), + configs: Object.create(null), + nargs: Object.create(null), + coercions: Object.create(null), + keys: [] + } + const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/ + const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') + + ;[].concat(opts.array).filter(Boolean).forEach(function (opt) { + const key = opt.key || opt + + // assign to flags[bools|strings|numbers] + const assignment = Object.keys(opt).map(function (key) { + return ({ + boolean: 'bools', + string: 'strings', + number: 'numbers' + })[key] + }).filter(Boolean).pop() + + // assign key to be coerced + if (assignment) { + flags[assignment][key] = true + } + + flags.arrays[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { + flags.bools[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.number).filter(Boolean).forEach(function (key) { + flags.numbers[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.count).filter(Boolean).forEach(function (key) { + flags.counts[key] = true + flags.keys.push(key) + }) + + ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { + flags.normalize[key] = true + flags.keys.push(key) + }) + + Object.keys(opts.narg || {}).forEach(function (k) { + flags.nargs[k] = opts.narg[k] + flags.keys.push(k) + }) + + Object.keys(opts.coerce || {}).forEach(function (k) { + flags.coercions[k] = opts.coerce[k] + flags.keys.push(k) + }) + + if (Array.isArray(opts.config) || typeof opts.config === 'string') { + ;[].concat(opts.config).filter(Boolean).forEach(function (key) { + flags.configs[key] = true + }) + } else { + Object.keys(opts.config || {}).forEach(function (k) { + flags.configs[k] = opts.config[k] + }) + } + + // create a lookup table that takes into account all + // combinations of aliases: {f: ['foo'], foo: ['f']} + extendAliases(opts.key, aliases, opts.default, flags.arrays) + + // apply default values to all aliases. + Object.keys(defaults).forEach(function (key) { + (flags.aliases[key] || []).forEach(function (alias) { + defaults[alias] = defaults[key] + }) + }) + + let error = null + checkConfiguration() + + let notFlags = [] + + const argv = Object.assign(Object.create(null), { _: [] }) + // TODO(bcoe): for the first pass at removing object prototype we didn't + // remove all prototypes from objects returned by this API, we might want + // to gradually move towards doing so. + const argvReturn = {} + + for (let i = 0; i < args.length; i++) { + const arg = args[i] + let broken + let key + let letters + let m + let next + let value + + // any unknown option (except for end-of-options, "--") + if (arg !== '--' && isUnknownOptionAsArg(arg)) { + argv._.push(arg) + // -- separated by = + } else if (arg.match(/^--.+=/) || ( + !configuration['short-option-groups'] && arg.match(/^-.+=/) + )) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + m = arg.match(/^--?([^=]+)=([\s\S]*)$/) + + // arrays format = '--f=a b c' + if (checkAllAliases(m[1], flags.arrays)) { + i = eatArray(i, m[1], args, m[2]) + } else if (checkAllAliases(m[1], flags.nargs) !== false) { + // nargs format = '--f=monkey washing cat' + i = eatNargs(i, m[1], args, m[2]) + } else { + setArg(m[1], m[2]) + } + } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { + key = arg.match(negatedBoolean)[1] + setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false) + + // -- separated by space. + } else if (arg.match(/^--.+/) || ( + !configuration['short-option-groups'] && arg.match(/^-[^-]+/) + )) { + key = arg.match(/^--?(.+)/)[1] + + if (checkAllAliases(key, flags.arrays)) { + // array format = '--foo a b c' + i = eatArray(i, key, args) + } else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '--foo a b c' + // should be truthy even if: flags.nargs[key] === 0 + i = eatNargs(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && (!next.match(/^-/) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultValue(key)) + } + } + + // dot-notation flag separated by '='. + } else if (arg.match(/^-.\..+=/)) { + m = arg.match(/^-([^=]+)=([\s\S]*)$/) + setArg(m[1], m[2]) + + // dot-notation flag separated by space. + } else if (arg.match(/^-.\..+/) && !arg.match(negative)) { + next = args[i + 1] + key = arg.match(/^-(.\..+)/)[1] + + if (next !== undefined && !next.match(/^-/) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultValue(key)) + } + } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { + letters = arg.slice(1, -1).split('') + broken = false + + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (letters[j + 1] && letters[j + 1] === '=') { + value = arg.slice(j + 3) + key = letters[j] + + if (checkAllAliases(key, flags.arrays)) { + // array format = '-f=a b c' + i = eatArray(i, key, args, value) + } else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '-f=monkey washing cat' + i = eatNargs(i, key, args, value) + } else { + setArg(key, value) + } + + broken = true + break + } + + if (next === '-') { + setArg(letters[j], next) + continue + } + + // current letter is an alphabetic character and next value is a number + if (/[A-Za-z]/.test(letters[j]) && + /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next) + broken = true + break + } + + if (letters[j + 1] && letters[j + 1].match(/\W/)) { + setArg(letters[j], next) + broken = true + break + } else { + setArg(letters[j], defaultValue(letters[j])) + } + } + + key = arg.slice(-1)[0] + + if (!broken && key !== '-') { + if (checkAllAliases(key, flags.arrays)) { + // array format = '-f a b c' + i = eatArray(i, key, args) + } else if (checkAllAliases(key, flags.nargs) !== false) { + // nargs format = '-f a b c' + // should be truthy even if: flags.nargs[key] === 0 + i = eatNargs(i, key, args) + } else { + next = args[i + 1] + + if (next !== undefined && (!/^(-|--)[^-]/.test(next) || + next.match(negative)) && + !checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts)) { + setArg(key, next) + i++ + } else if (/^(true|false)$/.test(next)) { + setArg(key, next) + i++ + } else { + setArg(key, defaultValue(key)) + } + } + } + } else if (arg.match(/^-[0-9]$/) && + arg.match(negative) && + checkAllAliases(arg.slice(1), flags.bools)) { + // single-digit boolean alias, e.g: xargs -0 + key = arg.slice(1) + setArg(key, defaultValue(key)) + } else if (arg === '--') { + notFlags = args.slice(i + 1) + break + } else if (configuration['halt-at-non-option']) { + notFlags = args.slice(i) + break + } else { + argv._.push(maybeCoerceNumber('_', arg)) + } + } + + // order of precedence: + // 1. command line arg + // 2. value from env var + // 3. value from config file + // 4. value from config objects + // 5. configured default value + applyEnvVars(argv, true) // special case: check env vars that point to config file + applyEnvVars(argv, false) + setConfig(argv) + setConfigObjects() + applyDefaultsAndAliases(argv, flags.aliases, defaults, true) + applyCoercions(argv) + if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) + + // for any counts either not in args or without an explicit default, set to 0 + Object.keys(flags.counts).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) setArg(key, 0) + }) + + // '--' defaults to undefined. + if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] + notFlags.forEach(function (key) { + argv[notFlagsArgv].push(key) + }) + + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key] + }) + } + + if (configuration['strip-aliased']) { + ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion']) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] + } + + delete argv[alias] + }) + } + + // how many arguments should we consume, based + // on the nargs option? + function eatNargs (i, key, args, argAfterEqualSign) { + let ii + let toEat = checkAllAliases(key, flags.nargs) + // NaN has a special meaning for the array type, indicating that one or + // more values are expected. + toEat = isNaN(toEat) ? 1 : toEat + + if (toEat === 0) { + if (!isUndefined(argAfterEqualSign)) { + error = Error(__('Argument unexpected for: %s', key)) + } + setArg(key, defaultValue(key)) + return i + } + + let available = isUndefined(argAfterEqualSign) ? 0 : 1 + if (configuration['nargs-eats-options']) { + // classic behavior, yargs eats positional and dash arguments. + if (args.length - (i + 1) + available < toEat) { + error = Error(__('Not enough arguments following: %s', key)) + } + available = toEat + } else { + // nargs will not consume flag arguments, e.g., -abc, --foo, + // and terminates when one is observed. + for (ii = i + 1; ii < args.length; ii++) { + if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) available++ + else break + } + if (available < toEat) error = Error(__('Not enough arguments following: %s', key)) + } + + let consumed = Math.min(available, toEat) + if (!isUndefined(argAfterEqualSign) && consumed > 0) { + setArg(key, argAfterEqualSign) + consumed-- + } + for (ii = i + 1; ii < (consumed + i + 1); ii++) { + setArg(key, args[ii]) + } + + return (i + consumed) + } + + // if an option is an array, eat all non-hyphenated arguments + // following it... YUM! + // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] + function eatArray (i, key, args, argAfterEqualSign) { + let argsToSet = [] + let next = argAfterEqualSign || args[i + 1] + // If both array and nargs are configured, enforce the nargs count: + const nargsCount = checkAllAliases(key, flags.nargs) + + if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { + argsToSet.push(true) + } else if (isUndefined(next) || + (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { + // for keys without value ==> argsToSet remains an empty [] + // set user default value, if available + if (defaults[key] !== undefined) { + const defVal = defaults[key] + argsToSet = Array.isArray(defVal) ? defVal : [defVal] + } + } else { + // value in --option=value is eaten as is + if (!isUndefined(argAfterEqualSign)) { + argsToSet.push(processValue(key, argAfterEqualSign)) + } + for (let ii = i + 1; ii < args.length; ii++) { + if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || + (nargsCount && argsToSet.length >= nargsCount)) break + next = args[ii] + if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break + i = ii + argsToSet.push(processValue(key, next)) + } + } + + // If both array and nargs are configured, create an error if less than + // nargs positionals were found. NaN has special meaning, indicating + // that at least one value is required (more are okay). + if ((nargsCount && argsToSet.length < nargsCount) || + (isNaN(nargsCount) && argsToSet.length === 0)) { + error = Error(__('Not enough arguments following: %s', key)) + } + + setArg(key, argsToSet) + return i + } + + function setArg (key, val) { + if (/-/.test(key) && configuration['camel-case-expansion']) { + const alias = key.split('.').map(function (prop) { + return camelCase(prop) + }).join('.') + addNewAlias(key, alias) + } + + const value = processValue(key, val) + const splitKey = key.split('.') + setKey(argv, splitKey, value) + + // handle populating aliases of the full key + if (flags.aliases[key]) { + flags.aliases[key].forEach(function (x) { + x = x.split('.') + setKey(argv, x, value) + }) + } + + // handle populating aliases of the first element of the dot-notation key + if (splitKey.length > 1 && configuration['dot-notation']) { + ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { + x = x.split('.') + + // expand alias with nested objects in key + const a = [].concat(splitKey) + a.shift() // nuke the old key. + x = x.concat(a) + + // populate alias only if is not already an alias of the full key + // (already populated above) + if (!(flags.aliases[key] || []).includes(x.join('.'))) { + setKey(argv, x, value) + } + }) + } + + // Set normalize getter and setter when key is in 'normalize' but isn't an array + if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { + const keys = [key].concat(flags.aliases[key] || []) + keys.forEach(function (key) { + Object.defineProperty(argvReturn, key, { + enumerable: true, + get () { + return val + }, + set (value) { + val = typeof value === 'string' ? path.normalize(value) : value + } + }) + }) + } + } + + function addNewAlias (key, alias) { + if (!(flags.aliases[key] && flags.aliases[key].length)) { + flags.aliases[key] = [alias] + newAliases[alias] = true + } + if (!(flags.aliases[alias] && flags.aliases[alias].length)) { + addNewAlias(alias, key) + } + } + + function processValue (key, val) { + // strings may be quoted, clean this up as we assign values. + if (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0] + ) { + val = val.substring(1, val.length - 1) + } + + // handle parsing boolean arguments --foo=true --bar false. + if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { + if (typeof val === 'string') val = val === 'true' + } + + let value = Array.isArray(val) + ? val.map(function (v) { return maybeCoerceNumber(key, v) }) + : maybeCoerceNumber(key, val) + + // increment a count given as arg (either no value or value parsed as boolean) + if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { + value = increment + } + + // Set normalized value when key is in 'normalize' and in 'arrays' + if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { + if (Array.isArray(val)) value = val.map(path.normalize) + else value = path.normalize(val) + } + return value + } + + function maybeCoerceNumber (key, value) { + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { + const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( + Number.isSafeInteger(Math.floor(value)) + ) + if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) + } + return value + } + + // set args from config.json file, this should be + // applied last so that defaults can be applied. + function setConfig (argv) { + const configLookup = Object.create(null) + + // expand defaults/aliases, in-case any happen to reference + // the config.json file. + applyDefaultsAndAliases(configLookup, flags.aliases, defaults) + + Object.keys(flags.configs).forEach(function (configKey) { + const configPath = argv[configKey] || configLookup[configKey] + if (configPath) { + try { + let config = null + const resolvedConfigPath = path.resolve(process.cwd(), configPath) + + if (typeof flags.configs[configKey] === 'function') { + try { + config = flags.configs[configKey](resolvedConfigPath) + } catch (e) { + config = e + } + if (config instanceof Error) { + error = config + return + } + } else { + config = require(resolvedConfigPath) + } + + setConfigObject(config) + } catch (ex) { + if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) + } + } + }) + } + + // set args from config object. + // it recursively checks nested objects. + function setConfigObject (config, prev) { + Object.keys(config).forEach(function (key) { + const value = config[key] + const fullKey = prev ? prev + '.' + key : key + + // if the value is an inner object and we have dot-notation + // enabled, treat inner objects in config the same as + // heavily nested dot notations (foo.bar.apple). + if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { + // if the value is an object but not an array, check nested object + setConfigObject(value, fullKey) + } else { + // setting arguments via CLI takes precedence over + // values within the config file. + if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { + setArg(fullKey, value) + } + } + }) + } + + // set all config objects passed in opts + function setConfigObjects () { + if (typeof configObjects === 'undefined') return + configObjects.forEach(function (configObject) { + setConfigObject(configObject) + }) + } + + function applyEnvVars (argv, configOnly) { + if (typeof envPrefix === 'undefined') return + + const prefix = typeof envPrefix === 'string' ? envPrefix : '' + Object.keys(process.env).forEach(function (envVar) { + if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { + // get array of nested keys and convert them to camel case + const keys = envVar.split('__').map(function (key, i) { + if (i === 0) { + key = key.substring(prefix.length) + } + return camelCase(key) + }) + + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { + setArg(keys.join('.'), process.env[envVar]) + } + } + }) + } + + function applyCoercions (argv) { + let coerce + const applied = new Set() + Object.keys(argv).forEach(function (key) { + if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases + coerce = checkAllAliases(key, flags.coercions) + if (typeof coerce === 'function') { + try { + const value = maybeCoerceNumber(key, coerce(argv[key])) + ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { + applied.add(ali) + argv[ali] = value + }) + } catch (err) { + error = err + } + } + } + }) + } + + function setPlaceholderKeys (argv) { + flags.keys.forEach((key) => { + // don't set placeholder keys for dot notation options 'foo.bar'. + if (~key.indexOf('.')) return + if (typeof argv[key] === 'undefined') argv[key] = undefined + }) + return argv + } + + function applyDefaultsAndAliases (obj, aliases, defaults, canLog = false) { + Object.keys(defaults).forEach(function (key) { + if (!hasKey(obj, key.split('.'))) { + setKey(obj, key.split('.'), defaults[key]) + if (canLog) defaulted[key] = true + + ;(aliases[key] || []).forEach(function (x) { + if (hasKey(obj, x.split('.'))) return + setKey(obj, x.split('.'), defaults[key]) + }) + } + }) + } + + function hasKey (obj, keys) { + let o = obj + + if (!configuration['dot-notation']) keys = [keys.join('.')] + + keys.slice(0, -1).forEach(function (key) { + o = (o[key] || {}) + }) + + const key = keys[keys.length - 1] + + if (typeof o !== 'object') return false + else return key in o + } + + function setKey (obj, keys, value) { + let o = obj + + if (!configuration['dot-notation']) keys = [keys.join('.')] + + keys.slice(0, -1).forEach(function (key, index) { + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + key = sanitizeKey(key) + + if (typeof o === 'object' && o[key] === undefined) { + o[key] = {} + } + + if (typeof o[key] !== 'object' || Array.isArray(o[key])) { + // ensure that o[key] is an array, and that the last item is an empty object. + if (Array.isArray(o[key])) { + o[key].push({}) + } else { + o[key] = [o[key], {}] + } + + // we want to update the empty object at the end of the o[key] array, so set o to that object + o = o[key][o[key].length - 1] + } else { + o = o[key] + } + }) + + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + const key = sanitizeKey(keys[keys.length - 1]) + + const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) + const isValueArray = Array.isArray(value) + let duplicate = configuration['duplicate-arguments-array'] + + // nargs has higher priority than duplicate + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined + } + } + + if (value === increment) { + o[key] = increment(o[key]) + } else if (Array.isArray(o[key])) { + if (duplicate && isTypeArray && isValueArray) { + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]) + } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { + o[key] = value + } else { + o[key] = o[key].concat([value]) + } + } else if (o[key] === undefined && isTypeArray) { + o[key] = isValueArray ? value : [value] + } else if (duplicate && !( + o[key] === undefined || + checkAllAliases(key, flags.counts) || + checkAllAliases(key, flags.bools) + )) { + o[key] = [o[key], value] + } else { + o[key] = value + } + } + + // extend the aliases list with inferred aliases. + function extendAliases (...args) { + args.forEach(function (obj) { + Object.keys(obj || {}).forEach(function (key) { + // short-circuit if we've already added a key + // to the aliases array, for example it might + // exist in both 'opts.default' and 'opts.key'. + if (flags.aliases[key]) return + + flags.aliases[key] = [].concat(aliases[key] || []) + // For "--option-name", also set argv.optionName + flags.aliases[key].concat(key).forEach(function (x) { + if (/-/.test(x) && configuration['camel-case-expansion']) { + const c = camelCase(x) + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c) + newAliases[c] = true + } + } + }) + // For "--optionName", also set argv['option-name'] + flags.aliases[key].concat(key).forEach(function (x) { + if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { + const c = decamelize(x, '-') + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c) + newAliases[c] = true + } + } + }) + flags.aliases[key].forEach(function (x) { + flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { + return x !== y + })) + }) + }) + }) + } + + // return the 1st set flag for any of a key's aliases (or false if no flag set) + function checkAllAliases (key, flag) { + const toCheck = [].concat(flags.aliases[key] || [], key) + const keys = Object.keys(flag) + const setAlias = toCheck.find(key => keys.includes(key)) + return setAlias ? flag[setAlias] : false + } + + function hasAnyFlag (key) { + const toCheck = [].concat(Object.keys(flags).map(k => flags[k])) + return toCheck.some(function (flag) { + return Array.isArray(flag) ? flag.includes(key) : flag[key] + }) + } + + function hasFlagsMatching (arg, ...patterns) { + const toCheck = [].concat(...patterns) + return toCheck.some(function (pattern) { + const match = arg.match(pattern) + return match && hasAnyFlag(match[1]) + }) + } + + // based on a simplified version of the short flag group parsing logic + function hasAllShortFlags (arg) { + // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group + if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false } + let hasAllFlags = true + let next + const letters = arg.slice(1).split('') + for (let j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (!hasAnyFlag(letters[j])) { + hasAllFlags = false + break + } + + if ((letters[j + 1] && letters[j + 1] === '=') || + next === '-' || + (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || + (letters[j + 1] && letters[j + 1].match(/\W/))) { + break + } + } + return hasAllFlags + } + + function isUnknownOptionAsArg (arg) { + return configuration['unknown-options-as-args'] && isUnknownOption(arg) + } + + function isUnknownOption (arg) { + // ignore negative numbers + if (arg.match(negative)) { return false } + // if this is a short option group and all of them are configured, it isn't unknown + if (hasAllShortFlags(arg)) { return false } + // e.g. '--count=2' + const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/ + // e.g. '-a' or '--arg' + const normalFlag = /^-+([^=]+?)$/ + // e.g. '-a-' + const flagEndingInHyphen = /^-+([^=]+?)-$/ + // e.g. '-abc123' + const flagEndingInDigits = /^-+([^=]+?\d+)$/ + // e.g. '-a/usr/local' + const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/ + // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method + return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters) + } + + // make a best effor to pick a default value + // for an option based on name and type. + function defaultValue (key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key] + } else { + return defaultForType(guessType(key)) + } + } + + // return a default value, given the type of a flag., + // e.g., key of type 'string' will default to '', rather than 'true'. + function defaultForType (type) { + const def = { + boolean: true, + string: '', + number: undefined, + array: [] + } + + return def[type] + } + + // given a flag, enforce a default type. + function guessType (key) { + let type = 'boolean' + if (checkAllAliases(key, flags.strings)) type = 'string' + else if (checkAllAliases(key, flags.numbers)) type = 'number' + else if (checkAllAliases(key, flags.bools)) type = 'boolean' + else if (checkAllAliases(key, flags.arrays)) type = 'array' + return type + } + + function isNumber (x) { + if (x === null || x === undefined) return false + // if loaded from config, may already be a number. + if (typeof x === 'number') return true + // hexadecimal. + if (/^0x[0-9a-f]+$/i.test(x)) return true + // don't treat 0123 as a number; as it drops the leading '0'. + if (x.length > 1 && x[0] === '0') return false + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + } + + function isUndefined (num) { + return num === undefined + } + + // check user configuration settings for inconsistencies + function checkConfiguration () { + // count keys should not be set as array/narg + Object.keys(flags.counts).find(key => { + if (checkAllAliases(key, flags.arrays)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)) + return true + } else if (checkAllAliases(key, flags.nargs)) { + error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)) + return true + } + }) + } + + return { + argv: Object.assign(argvReturn, argv), + error: error, + aliases: Object.assign({}, flags.aliases), + newAliases: Object.assign({}, newAliases), + defaulted: Object.assign({}, defaulted), + configuration: configuration + } +} + +// if any aliases reference each other, we should +// merge them together. +function combineAliases (aliases) { + const aliasArrays = [] + const combined = Object.create(null) + let change = true + + // turn alias lookup hash {key: ['alias1', 'alias2']} into + // a simple array ['key', 'alias1', 'alias2'] + Object.keys(aliases).forEach(function (key) { + aliasArrays.push( + [].concat(aliases[key], key) + ) + }) + + // combine arrays until zero changes are + // made in an iteration. + while (change) { + change = false + for (let i = 0; i < aliasArrays.length; i++) { + for (let ii = i + 1; ii < aliasArrays.length; ii++) { + const intersect = aliasArrays[i].filter(function (v) { + return aliasArrays[ii].indexOf(v) !== -1 + }) + + if (intersect.length) { + aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) + aliasArrays.splice(ii, 1) + change = true + break + } + } + } + } + + // map arrays back to the hash-lookup (de-dupe while + // we're at it). + aliasArrays.forEach(function (aliasArray) { + aliasArray = aliasArray.filter(function (v, i, self) { + return self.indexOf(v) === i + }) + combined[aliasArray.pop()] = aliasArray + }) + + return combined +} + +// this function should only be called when a count is given as an arg +// it is NOT called to set a default value +// thus we can start the count at 1 instead of 0 +function increment (orig) { + return orig !== undefined ? orig + 1 : 1 +} + +function Parser (args, opts) { + const result = parse(args.slice(), opts) + return result.argv +} + +// parse arguments and return detailed +// meta information, aliases, etc. +Parser.detailed = function (args, opts) { + return parse(args.slice(), opts) +} + +// TODO(bcoe): in the next major version of yargs, switch to +// Object.create(null) for dot notation: +function sanitizeKey (key) { + if (key === '__proto__') return '___proto___' + return key +} + +module.exports = Parser diff --git a/test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js b/test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js new file mode 100644 index 00000000..260c67c1 --- /dev/null +++ b/test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js @@ -0,0 +1,40 @@ +// take an un-split argv string and tokenize it. +module.exports = function (argString) { + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e) + } + + argString = argString.trim() + + let i = 0 + let prevC = null + let c = null + let opening = null + const args = [] + + for (let ii = 0; ii < argString.length; ii++) { + prevC = c + c = argString.charAt(ii) + + // split on spaces unless we're in quotes. + if (c === ' ' && !opening) { + if (!(prevC === ' ')) { + i++ + } + continue + } + + // don't split the string if we're in matching + // opening or closing single and double quotes. + if (c === opening) { + opening = null + } else if ((c === "'" || c === '"') && !opening) { + opening = c + } + + if (!args[i]) args[i] = '' + args[i] += c + } + + return args +} diff --git a/test-eol-project/node_modules/yargs-parser/package.json b/test-eol-project/node_modules/yargs-parser/package.json new file mode 100644 index 00000000..636ff176 --- /dev/null +++ b/test-eol-project/node_modules/yargs-parser/package.json @@ -0,0 +1,46 @@ +{ + "name": "yargs-parser", + "version": "18.1.3", + "description": "the mighty option parser used by yargs", + "main": "index.js", + "scripts": { + "fix": "standard --fix", + "test": "c8 --reporter=text --reporter=html mocha test/*.js", + "posttest": "standard", + "coverage": "c8 report --check-coverage check-coverage --lines=100 --branches=97 --statements=100" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs-parser.git" + }, + "keywords": [ + "argument", + "parser", + "yargs", + "command", + "cli", + "parsing", + "option", + "args", + "argument" + ], + "author": "Ben Coe ", + "license": "ISC", + "devDependencies": { + "c8": "^7.0.1", + "chai": "^4.2.0", + "mocha": "^7.0.0", + "standard": "^14.3.1" + }, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "files": [ + "lib", + "index.js" + ], + "engines": { + "node": ">=6" + } +} diff --git a/test-eol-project/node_modules/yargs/CHANGELOG.md b/test-eol-project/node_modules/yargs/CHANGELOG.md new file mode 100644 index 00000000..a010cf34 --- /dev/null +++ b/test-eol-project/node_modules/yargs/CHANGELOG.md @@ -0,0 +1,420 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [15.4.0](https://www.github.com/yargs/yargs/compare/v15.3.1...v15.4.0) (2020-06-30) + + +### Features + +* adds deprecation option for commands ([027a636](https://www.github.com/yargs/yargs/commit/027a6365b737e13116811a8ef43670196e1fa00a)) +* support array of examples ([#1682](https://www.github.com/yargs/yargs/issues/1682)) ([225ab82](https://www.github.com/yargs/yargs/commit/225ab8271938bed3a48d23175f3d580ce8cd1306)) + + +### Bug Fixes + +* **docs:** describe usage of `.check()` in more detail ([932cd11](https://www.github.com/yargs/yargs/commit/932cd1177e93f5cc99edfe57a4028e30717bf8fb)) +* **i18n:** Japanese translation phrasing ([#1619](https://www.github.com/yargs/yargs/issues/1619)) ([0894175](https://www.github.com/yargs/yargs/commit/089417550ef5a5b8ce3578dd2a989191300b64cd)) +* **strict mode:** report default command unknown arguments ([#1626](https://www.github.com/yargs/yargs/issues/1626)) ([69f29a9](https://www.github.com/yargs/yargs/commit/69f29a9cd429d4bb99481238305390107ac75b02)) +* **usage:** translate 'options' group only when displaying help ([#1600](https://www.github.com/yargs/yargs/issues/1600)) ([e60b39b](https://www.github.com/yargs/yargs/commit/e60b39b9d3a912c06db43f87c86ba894142b6c1c)) + + +### Reverts + +* Revert "chore(deps): update dependency eslint to v7 (#1656)" (#1673) ([34949f8](https://www.github.com/yargs/yargs/commit/34949f89ee7cdf88f7b315659df4b5f62f714842)), closes [#1656](https://www.github.com/yargs/yargs/issues/1656) [#1673](https://www.github.com/yargs/yargs/issues/1673) + +### [15.3.1](https://www.github.com/yargs/yargs/compare/v15.3.0...v15.3.1) (2020-03-16) + + +### Bug Fixes + +* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential +prototype pollution vulnerability. This was reported by the Snyk Security Research Team. ([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) + +## [15.3.0](https://www.github.com/yargs/yargs/compare/v15.2.0...v15.3.0) (2020-03-08) + + +### Features + +* **yargs-parser:** introduce single-digit boolean aliases ([#1576](https://www.github.com/yargs/yargs/issues/1576)) ([3af7f04](https://www.github.com/yargs/yargs/commit/3af7f04cdbfcbd4b3f432aca5144d43f21958c39)) +* add usage for single-digit boolean aliases ([#1580](https://www.github.com/yargs/yargs/issues/1580)) ([6014e39](https://www.github.com/yargs/yargs/commit/6014e39bca3a1e8445aa0fb2a435f6181e344c45)) + + +### Bug Fixes + +* address ambiguity between nargs of 1 and requiresArg ([#1572](https://www.github.com/yargs/yargs/issues/1572)) ([a5edc32](https://www.github.com/yargs/yargs/commit/a5edc328ecb3f90d1ba09cfe70a0040f68adf50a)) + +## [15.2.0](https://www.github.com/yargs/yargs/compare/v15.1.0...v15.2.0) (2020-03-01) + + +### ⚠ BREAKING CHANGES + +* **deps:** yargs-parser@17.0.0 no longer implicitly creates arrays out of boolean +arguments when duplicates are provided + +### Features + +* **completion:** takes negated flags into account when boolean-negation is set ([#1509](https://www.github.com/yargs/yargs/issues/1509)) ([7293ad5](https://www.github.com/yargs/yargs/commit/7293ad50d20ea0fb7dd1ac9b925e90e1bd95dea8)) +* **deps:** pull in yargs-parser@17.0.0 ([#1553](https://www.github.com/yargs/yargs/issues/1553)) ([b9409da](https://www.github.com/yargs/yargs/commit/b9409da199ebca515a848489c206b807fab2e65d)) +* deprecateOption ([#1559](https://www.github.com/yargs/yargs/issues/1559)) ([8aae333](https://www.github.com/yargs/yargs/commit/8aae3332251d09fa136db17ef4a40d83fa052bc4)) +* display appropriate $0 for electron apps ([#1536](https://www.github.com/yargs/yargs/issues/1536)) ([d0e4379](https://www.github.com/yargs/yargs/commit/d0e437912917d6a66bb5128992fa2f566a5f830b)) +* introduces strictCommands() subset of strict mode ([#1540](https://www.github.com/yargs/yargs/issues/1540)) ([1d4cca3](https://www.github.com/yargs/yargs/commit/1d4cca395a98b395e6318f0505fc73bef8b01350)) +* **deps:** yargs-parser with 'greedy-array' configuration ([#1569](https://www.github.com/yargs/yargs/issues/1569)) ([a03a320](https://www.github.com/yargs/yargs/commit/a03a320dbf5c0ce33d829a857fc04a651c0bb53e)) + + +### Bug Fixes + +* help always displayed for the first command parsed having an async handler ([#1535](https://www.github.com/yargs/yargs/issues/1535)) ([d585b30](https://www.github.com/yargs/yargs/commit/d585b303a43746201b05c9c9fda94a444634df33)) +* **deps:** fix enumeration for normalized path arguments ([#1567](https://www.github.com/yargs/yargs/issues/1567)) ([0b5b1b0](https://www.github.com/yargs/yargs/commit/0b5b1b0e5f4f9baf393c48e9cc2bc85c1b67a47a)) +* **locales:** only translate default option group name ([acc16de](https://www.github.com/yargs/yargs/commit/acc16de6b846ea7332db753646a9cec76b589162)) +* **locales:** remove extra space in French for 'default' ([#1564](https://www.github.com/yargs/yargs/issues/1564)) ([ecfc2c4](https://www.github.com/yargs/yargs/commit/ecfc2c474575c6cdbc6d273c94c13181bd1dbaa6)) +* **translations:** add French translation for unknown command ([#1563](https://www.github.com/yargs/yargs/issues/1563)) ([18b0b75](https://www.github.com/yargs/yargs/commit/18b0b752424bf560271e670ff95a0f90c8386787)) +* **translations:** fix pluralization in error messages. ([#1557](https://www.github.com/yargs/yargs/issues/1557)) ([94fa38c](https://www.github.com/yargs/yargs/commit/94fa38cbab8d86943e87bf41d368ed56dffa6835)) +* **yargs:** correct support of bundled electron apps ([#1554](https://www.github.com/yargs/yargs/issues/1554)) ([a0b61ac](https://www.github.com/yargs/yargs/commit/a0b61ac21e2b554aa73dbf1a66d4a7af94047c2f)) + +## [15.1.0](https://www.github.com/yargs/yargs/compare/v15.0.2...v15.1.0) (2020-01-02) + + +### Features + +* **lang:** add Finnish localization (language code fi) ([222c8fe](https://www.github.com/yargs/yargs/commit/222c8fef2e2ad46e314c337dec96940f896bec35)) +* complete short options with a single dash ([#1507](https://www.github.com/yargs/yargs/issues/1507)) ([99011ab](https://www.github.com/yargs/yargs/commit/99011ab5ba90232506ece0a17e59e2001a1ab562)) +* onFinishCommand handler ([#1473](https://www.github.com/yargs/yargs/issues/1473)) ([fe380cd](https://www.github.com/yargs/yargs/commit/fe380cd356aa33aef0449facd59c22cab8930ac9)) + + +### Bug Fixes + +* getCompletion() was not working for options ([#1495](https://www.github.com/yargs/yargs/issues/1495)) ([463feb2](https://www.github.com/yargs/yargs/commit/463feb2870158eb9df670222b0f0a40a05cf18d0)) +* misspelling of package.json `engines` field ([0891d0e](https://www.github.com/yargs/yargs/commit/0891d0ed35b30c83a6d9e9f6a5c5f84d13c546a0)) +* populate positionals when unknown-options-as-args is set ([#1508](https://www.github.com/yargs/yargs/issues/1508)) ([bb0f2eb](https://www.github.com/yargs/yargs/commit/bb0f2eb996fa4e19d330b31a01c2036cafa99a7e)), closes [#1444](https://www.github.com/yargs/yargs/issues/1444) +* show 2 dashes on help for single digit option key or alias ([#1493](https://www.github.com/yargs/yargs/issues/1493)) ([63b3dd3](https://www.github.com/yargs/yargs/commit/63b3dd31a455d428902220c1992ae930e18aff5c)) +* **docs:** use recommended cjs import syntax for ts examples ([#1513](https://www.github.com/yargs/yargs/issues/1513)) ([f9a18bf](https://www.github.com/yargs/yargs/commit/f9a18bfd624a5013108084f690cd8a1de794c430)) + +### [15.0.2](https://www.github.com/yargs/yargs/compare/v15.0.1...v15.0.2) (2019-11-19) + + +### Bug Fixes + +* temporary fix for libraries that call Object.freeze() ([#1483](https://www.github.com/yargs/yargs/issues/1483)) ([99c2dc8](https://www.github.com/yargs/yargs/commit/99c2dc850e67c606644f8b0c0bca1a59c87dcbcd)) + +### [15.0.1](https://www.github.com/yargs/yargs/compare/v15.0.0...v15.0.1) (2019-11-16) + + +### Bug Fixes + +* **deps:** cliui, find-up, and string-width, all drop Node 6 support ([#1479](https://www.github.com/yargs/yargs/issues/1479)) ([6a9ebe2](https://www.github.com/yargs/yargs/commit/6a9ebe2d955e3e979e76c07ffbb1c17fef64cb49)) + +## [15.0.0](https://www.github.com/yargs/yargs/compare/v14.2.0...v15.0.0) (2019-11-10) + + +### ⚠ BREAKING CHANGES + +* **deps:** yargs-parser now throws on invalid combinations of config (#1470) +* yargs-parser@16.0.0 drops support for Node 6 +* drop Node 6 support (#1461) +* remove package.json-based parserConfiguration (#1460) + +### Features + +* **deps:** yargs-parser now throws on invalid combinations of config ([#1470](https://www.github.com/yargs/yargs/issues/1470)) ([c10c38c](https://www.github.com/yargs/yargs/commit/c10c38cca04298f96b55a7e374a9a134abefffa7)) +* expose `Parser` from `require('yargs/yargs')` ([#1477](https://www.github.com/yargs/yargs/issues/1477)) ([1840ba2](https://www.github.com/yargs/yargs/commit/1840ba22f1a24c0ece8e32bbd31db4134a080aee)) + + +### Bug Fixes + +* **docs:** TypeScript import to prevent a future major release warning ([#1441](https://www.github.com/yargs/yargs/issues/1441)) ([b1b156a](https://www.github.com/yargs/yargs/commit/b1b156a3eb4ddd6803fbbd56c611a77919293000)) +* stop-parse was not being respected by commands ([#1459](https://www.github.com/yargs/yargs/issues/1459)) ([12c82e6](https://www.github.com/yargs/yargs/commit/12c82e62663e928148a7ee2f51629aa26a0f9bb2)) +* update to yargs-parser with fix for array default values ([#1463](https://www.github.com/yargs/yargs/issues/1463)) ([ebee59d](https://www.github.com/yargs/yargs/commit/ebee59d9022da538410e69a5c025019ed46d13d2)) +* **docs:** update boolean description and examples in docs ([#1474](https://www.github.com/yargs/yargs/issues/1474)) ([afd5b48](https://www.github.com/yargs/yargs/commit/afd5b4871bfeb90d58351ac56c5c44a83ef033e6)) + + +### Miscellaneous Chores + +* drop Node 6 support ([#1461](https://www.github.com/yargs/yargs/issues/1461)) ([2ba8ce0](https://www.github.com/yargs/yargs/commit/2ba8ce05e8fefbeffc6cb7488d9ebf6e86cceb1d)) + + +### Code Refactoring + +* remove package.json-based parserConfiguration ([#1460](https://www.github.com/yargs/yargs/issues/1460)) ([0d3642b](https://www.github.com/yargs/yargs/commit/0d3642b6f829b637938774c0c6ce5f6bfe1afa51)) + +## [14.2.0](https://github.com/yargs/yargs/compare/v14.1.0...v14.2.0) (2019-10-07) + + +### Bug Fixes + +* async middleware was called twice ([#1422](https://github.com/yargs/yargs/issues/1422)) ([9a42b63](https://github.com/yargs/yargs/commit/9a42b63)) +* fix promise check to accept any spec conform object ([#1424](https://github.com/yargs/yargs/issues/1424)) ([0be43d2](https://github.com/yargs/yargs/commit/0be43d2)) +* groups were not being maintained for nested commands ([#1430](https://github.com/yargs/yargs/issues/1430)) ([d38650e](https://github.com/yargs/yargs/commit/d38650e)) +* **docs:** broken markdown link ([#1426](https://github.com/yargs/yargs/issues/1426)) ([236e24e](https://github.com/yargs/yargs/commit/236e24e)) +* support merging deeply nested configuration ([#1423](https://github.com/yargs/yargs/issues/1423)) ([bae66fe](https://github.com/yargs/yargs/commit/bae66fe)) + + +### Features + +* **deps:** introduce yargs-parser with support for unknown-options-as-args ([#1440](https://github.com/yargs/yargs/issues/1440)) ([4d21520](https://github.com/yargs/yargs/commit/4d21520)) + +## [14.1.0](https://github.com/yargs/yargs/compare/v14.0.0...v14.1.0) (2019-09-06) + + +### Bug Fixes + +* **docs:** fix incorrect parserConfiguration documentation ([2a99124](https://github.com/yargs/yargs/commit/2a99124)) +* detect zsh when zsh isnt run as a login prompt ([#1395](https://github.com/yargs/yargs/issues/1395)) ([8792d13](https://github.com/yargs/yargs/commit/8792d13)) +* populate correct value on yargs.parsed and stop warning on access ([#1412](https://github.com/yargs/yargs/issues/1412)) ([bb0eb52](https://github.com/yargs/yargs/commit/bb0eb52)) +* showCompletionScript was logging script twice ([#1388](https://github.com/yargs/yargs/issues/1388)) ([07c8537](https://github.com/yargs/yargs/commit/07c8537)) +* strict() should not ignore hyphenated arguments ([#1414](https://github.com/yargs/yargs/issues/1414)) ([b774b5e](https://github.com/yargs/yargs/commit/b774b5e)) +* **docs:** formalize existing callback argument to showHelp ([#1386](https://github.com/yargs/yargs/issues/1386)) ([d217764](https://github.com/yargs/yargs/commit/d217764)) + + +### Features + +* make it possible to merge configurations when extending other config. ([#1411](https://github.com/yargs/yargs/issues/1411)) ([5d7ad98](https://github.com/yargs/yargs/commit/5d7ad98)) + +## [14.0.0](https://github.com/yargs/yargs/compare/v13.3.0...v14.0.0) (2019-07-30) + + +### ⚠ BREAKING CHANGES + +* we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed +* previously to this fix methods like `yargs.getOptions()` contained the state of the last command to execute. +* do not allow additional positionals in strict mode + +### Bug Fixes + +* calling parse multiple times now appropriately maintains state ([#1137](https://github.com/yargs/yargs/issues/1137)) ([#1369](https://github.com/yargs/yargs/issues/1369)) ([026b151](https://github.com/yargs/yargs/commit/026b151)) +* prefer user supplied script name in usage ([#1383](https://github.com/yargs/yargs/issues/1383)) ([28c74b9](https://github.com/yargs/yargs/commit/28c74b9)) +* **deps:** use decamelize from npm instead of vendored copy ([#1377](https://github.com/yargs/yargs/issues/1377)) ([015eeb9](https://github.com/yargs/yargs/commit/015eeb9)) +* **examples:** fix usage-options.js to reflect current API ([#1375](https://github.com/yargs/yargs/issues/1375)) ([6e5b76b](https://github.com/yargs/yargs/commit/6e5b76b)) +* do not allow additional positionals in strict mode ([35d777c](https://github.com/yargs/yargs/commit/35d777c)) +* properties accessed on singleton now reflect current state of instance ([#1366](https://github.com/yargs/yargs/issues/1366)) ([409d35b](https://github.com/yargs/yargs/commit/409d35b)) +* tolerate null prototype for config objects with `extends` ([#1376](https://github.com/yargs/yargs/issues/1376)) ([3d26d11](https://github.com/yargs/yargs/commit/3d26d11)), closes [#1372](https://github.com/yargs/yargs/issues/1372) +* yargs.parsed now populated before returning, when yargs.parse() called with no args (#1382) ([e3981fd](https://github.com/yargs/yargs/commit/e3981fd)), closes [#1382](https://github.com/yargs/yargs/issues/1382) + +### Features + +* adds support for multiple epilog messages ([#1384](https://github.com/yargs/yargs/issues/1384)) ([07a5554](https://github.com/yargs/yargs/commit/07a5554)) +* allow completionCommand to be set via showCompletionScript ([#1385](https://github.com/yargs/yargs/issues/1385)) ([5562853](https://github.com/yargs/yargs/commit/5562853)) + +## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10) + + +### Bug Fixes + +* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b)) + + +### Features + +* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b)) +* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c)) + +### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13) + + +### Bug Fixes + +* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813)) + + + +### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05) + + +### Bug Fixes + +* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65)) +* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132)) + + +### Tests + +* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b)) + + + +## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06) + + + +## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18) + + +### Bug Fixes + +* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224)) +* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394)) + + +# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15) + + +### Features + +* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156) + + + +# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12) + + +### Features + +* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a)) + + + + +# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02) + + +### Bug Fixes + +* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739)) +* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6)) +* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2)) +* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518)) + + +### Chores + +* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~ + * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._ +* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f)) + + +### Features + +* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a)) +* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9)) +* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa)) +* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings +* dropping Node 6 which hits end of life in April 2019 +* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) +* we now warn if the yargs stanza package.json is used. + + + + +## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) + + +### Bug Fixes + +* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035)) + + + + +## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10) + + +### Bug Fixes + +* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92)) + + + + +## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06) + + +### Bug Fixes + +* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b)) +* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214) +* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028)) +* improve Norwegian Bokmål translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4)) +* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5)) + + + + +## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04) + + +### Bug Fixes + +* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178) +* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea)) +* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970)) + + + + +## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29) + + + + +# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26) + + +### Bug Fixes + +* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4)) +* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c)) +* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5)) + + +### Chores + +* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b)) +* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4)) + + +### Features + +* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7)) +* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae)) +* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82)) + + +### BREAKING CHANGES + +* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined` +* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4. +* yargs-parser does not populate 'false' when boolean flag is not passed +* tests that assert against help output will need to be updated + + + + +# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) + + +### Bug Fixes + +* choose correct config directory when require.main does not exist ([#1056](https://github.com/yargs/yargs/issues/1056)) ([a04678c](https://github.com/yargs/yargs/commit/a04678c)) + + +### Features + +* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae)) +* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6)) + + + + +# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) + + +### Bug Fixes + +* Set implicit nargs=1 when type=number requiresArg=true ([#1050](https://github.com/yargs/yargs/issues/1050)) ([2b56812](https://github.com/yargs/yargs/commit/2b56812)) + + +### Features + +* requiresArg is now simply an alias for nargs(1) ([#1054](https://github.com/yargs/yargs/issues/1054)) ([a3ddacc](https://github.com/yargs/yargs/commit/a3ddacc)) + + +### BREAKING CHANGES + +* requiresArg now has significantly different error output, matching nargs. + +[Historical Versions](/docs/CHANGELOG-historical.md) diff --git a/test-eol-project/node_modules/yargs/LICENSE b/test-eol-project/node_modules/yargs/LICENSE new file mode 100644 index 00000000..b0145ca0 --- /dev/null +++ b/test-eol-project/node_modules/yargs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +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/test-eol-project/node_modules/yargs/README.md b/test-eol-project/node_modules/yargs/README.md new file mode 100644 index 00000000..0db992b1 --- /dev/null +++ b/test-eol-project/node_modules/yargs/README.md @@ -0,0 +1,140 @@ +

    + +

    +

    Yargs

    +

    + Yargs be a node.js library fer hearties tryin' ter parse optstrings +

    + +
    + +[![Build Status][travis-image]][travis-url] +[![NPM version][npm-image]][npm-url] +[![js-standard-style][standard-image]][standard-url] +[![Coverage][coverage-image]][coverage-url] +[![Conventional Commits][conventional-commits-image]][conventional-commits-url] +[![Slack][slack-image]][slack-url] + +## Description : +Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. + +It gives you: + +* commands and (grouped) options (`my-program.js serve --port=5000`). +* a dynamically generated help menu based on your arguments. + +> + +* bash-completion shortcuts for commands and options. +* and [tons more](/docs/api.md). + +## Installation + +Stable version: +```bash +npm i yargs +``` + +Bleeding edge version with the most recent features: +```bash +npm i yargs@next +``` + +## Usage : + +### Simple Example + +```javascript +#!/usr/bin/env node +const {argv} = require('yargs') + +if (argv.ships > 3 && argv.distance < 53.5) { + console.log('Plunder more riffiwobbles!') +} else { + console.log('Retreat from the xupptumblers!') +} +``` + +```bash +$ ./plunder.js --ships=4 --distance=22 +Plunder more riffiwobbles! + +$ ./plunder.js --ships 12 --distance 98.7 +Retreat from the xupptumblers! +``` + +### Complex Example + +```javascript +#!/usr/bin/env node +require('yargs') // eslint-disable-line + .command('serve [port]', 'start the server', (yargs) => { + yargs + .positional('port', { + describe: 'port to bind on', + default: 5000 + }) + }, (argv) => { + if (argv.verbose) console.info(`start server on :${argv.port}`) + serve(argv.port) + }) + .option('verbose', { + alias: 'v', + type: 'boolean', + description: 'Run with verbose logging' + }) + .argv +``` + +Run the example above with `--help` to see the help for the application. + +## TypeScript + +yargs has type definitions at [@types/yargs][type-definitions]. + +``` +npm i @types/yargs --save-dev +``` + +See usage examples in [docs](/docs/typescript.md). + +## Webpack + +See usage examples of yargs with webpack in [docs](/docs/webpack.md). + +## Community : + +Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). + +## Documentation : + +### Table of Contents + +* [Yargs' API](/docs/api.md) +* [Examples](/docs/examples.md) +* [Parsing Tricks](/docs/tricks.md) + * [Stop the Parser](/docs/tricks.md#stop) + * [Negating Boolean Arguments](/docs/tricks.md#negate) + * [Numbers](/docs/tricks.md#numbers) + * [Arrays](/docs/tricks.md#arrays) + * [Objects](/docs/tricks.md#objects) + * [Quotes](/docs/tricks.md#quotes) +* [Advanced Topics](/docs/advanced.md) + * [Composing Your App Using Commands](/docs/advanced.md#commands) + * [Building Configurable CLI Apps](/docs/advanced.md#configuration) + * [Customizing Yargs' Parser](/docs/advanced.md#customizing) +* [Contributing](/contributing.md) + +[travis-url]: https://travis-ci.org/yargs/yargs +[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg +[npm-url]: https://www.npmjs.com/package/yargs +[npm-image]: https://img.shields.io/npm/v/yargs.svg +[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg +[standard-url]: http://standardjs.com/ +[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg +[conventional-commits-url]: https://conventionalcommits.org/ +[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg +[slack-url]: http://devtoolscommunity.herokuapp.com +[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs +[coverage-image]: https://img.shields.io/nycrc/yargs/yargs +[coverage-url]: https://github.com/yargs/yargs/blob/master/.nycrc diff --git a/test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts b/test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts new file mode 100644 index 00000000..5a9aca77 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts @@ -0,0 +1,2 @@ +import { Dictionary } from './common-types'; +export declare function applyExtends(config: Dictionary, cwd: string, mergeExtends?: boolean): Dictionary; diff --git a/test-eol-project/node_modules/yargs/build/lib/apply-extends.js b/test-eol-project/node_modules/yargs/build/lib/apply-extends.js new file mode 100644 index 00000000..005734a0 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/apply-extends.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.applyExtends = void 0; +const fs = require("fs"); +const path = require("path"); +const yerror_1 = require("./yerror"); +let previouslyVisitedConfigs = []; +function checkForCircularExtends(cfgPath) { + if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { + throw new yerror_1.YError(`Circular extended configurations: '${cfgPath}'.`); + } +} +function getPathToDefaultConfig(cwd, pathToExtend) { + return path.resolve(cwd, pathToExtend); +} +function mergeDeep(config1, config2) { + const target = {}; + function isObject(obj) { + return obj && typeof obj === 'object' && !Array.isArray(obj); + } + Object.assign(target, config1); + for (const key of Object.keys(config2)) { + if (isObject(config2[key]) && isObject(target[key])) { + target[key] = mergeDeep(config1[key], config2[key]); + } + else { + target[key] = config2[key]; + } + } + return target; +} +function applyExtends(config, cwd, mergeExtends = false) { + let defaultConfig = {}; + if (Object.prototype.hasOwnProperty.call(config, 'extends')) { + if (typeof config.extends !== 'string') + return defaultConfig; + const isPath = /\.json|\..*rc$/.test(config.extends); + let pathToDefault = null; + if (!isPath) { + try { + pathToDefault = require.resolve(config.extends); + } + catch (err) { + // most likely this simply isn't a module. + } + } + else { + pathToDefault = getPathToDefaultConfig(cwd, config.extends); + } + // maybe the module uses key for some other reason, + // err on side of caution. + if (!pathToDefault && !isPath) + return config; + if (!pathToDefault) + throw new yerror_1.YError(`Unable to find extended config '${config.extends}' in '${cwd}'.`); + checkForCircularExtends(pathToDefault); + previouslyVisitedConfigs.push(pathToDefault); + defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends); + delete config.extends; + defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault), mergeExtends); + } + previouslyVisitedConfigs = []; + return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config); +} +exports.applyExtends = applyExtends; diff --git a/test-eol-project/node_modules/yargs/build/lib/argsert.d.ts b/test-eol-project/node_modules/yargs/build/lib/argsert.d.ts new file mode 100644 index 00000000..6f7a83f5 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/argsert.d.ts @@ -0,0 +1,2 @@ +export declare function argsert(callerArguments: any[], length?: number): void; +export declare function argsert(expected: string, callerArguments: any[], length?: number): void; diff --git a/test-eol-project/node_modules/yargs/build/lib/argsert.js b/test-eol-project/node_modules/yargs/build/lib/argsert.js new file mode 100644 index 00000000..40cb091a --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/argsert.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.argsert = void 0; +const yerror_1 = require("./yerror"); +const parse_command_1 = require("./parse-command"); +const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; +function argsert(arg1, arg2, arg3) { + function parseArgs() { + return typeof arg1 === 'object' + ? [{ demanded: [], optional: [] }, arg1, arg2] + : [parse_command_1.parseCommand(`cmd ${arg1}`), arg2, arg3]; + } + // TODO: should this eventually raise an exception. + try { + // preface the argument description with "cmd", so + // that we can run it through yargs' command parser. + let position = 0; + let [parsed, callerArguments, length] = parseArgs(); + const args = [].slice.call(callerArguments); + while (args.length && args[args.length - 1] === undefined) + args.pop(); + length = length || args.length; + if (length < parsed.demanded.length) { + throw new yerror_1.YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); + } + const totalCommands = parsed.demanded.length + parsed.optional.length; + if (length > totalCommands) { + throw new yerror_1.YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); + } + parsed.demanded.forEach((demanded) => { + const arg = args.shift(); + const observedType = guessType(arg); + const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); + if (matchingTypes.length === 0) + argumentTypeError(observedType, demanded.cmd, position); + position += 1; + }); + parsed.optional.forEach((optional) => { + if (args.length === 0) + return; + const arg = args.shift(); + const observedType = guessType(arg); + const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); + if (matchingTypes.length === 0) + argumentTypeError(observedType, optional.cmd, position); + position += 1; + }); + } + catch (err) { + console.warn(err.stack); + } +} +exports.argsert = argsert; +function guessType(arg) { + if (Array.isArray(arg)) { + return 'array'; + } + else if (arg === null) { + return 'null'; + } + return typeof arg; +} +function argumentTypeError(observedType, allowedTypes, position) { + throw new yerror_1.YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); +} diff --git a/test-eol-project/node_modules/yargs/build/lib/command.d.ts b/test-eol-project/node_modules/yargs/build/lib/command.d.ts new file mode 100644 index 00000000..9db6ab5e --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/command.d.ts @@ -0,0 +1,64 @@ +/// +import { Dictionary } from './common-types'; +import { Middleware } from './middleware'; +import { Positional } from './parse-command'; +import { RequireDirectoryOptions } from 'require-directory'; +import { UsageInstance } from './usage'; +import { ValidationInstance } from './validation'; +import { YargsInstance, Options, OptionDefinition, Context, Arguments, DetailedArguments } from './yargs'; +export declare function command(yargs: YargsInstance, usage: UsageInstance, validation: ValidationInstance, globalMiddleware?: Middleware[]): CommandInstance; +/** Instance of the command module. */ +export interface CommandInstance { + addDirectory(dir: string, context: Context, req: NodeRequireFunction, callerFile: string, opts?: RequireDirectoryOptions): void; + addHandler(handler: CommandHandlerDefinition): void; + addHandler(cmd: string | string[], description: CommandHandler['description'], builder?: CommandBuilderDefinition | CommandBuilder, handler?: CommandHandlerCallback, commandMiddleware?: Middleware[], deprecated?: boolean): void; + cmdToParseOptions(cmdString: string): Positionals; + freeze(): void; + getCommandHandlers(): Dictionary; + getCommands(): string[]; + hasDefaultCommand(): boolean; + reset(): CommandInstance; + runCommand(command: string | null, yargs: YargsInstance, parsed: DetailedArguments, commandIndex?: number): Arguments | Promise; + runDefaultBuilderOn(yargs: YargsInstance): void; + unfreeze(): void; +} +export interface CommandHandlerDefinition extends Partial> { + aliases?: string[]; + builder?: CommandBuilder | CommandBuilderDefinition; + command?: string | string[]; + desc?: CommandHandler['description']; + describe?: CommandHandler['description']; +} +export declare function isCommandHandlerDefinition(cmd: string | string[] | CommandHandlerDefinition): cmd is CommandHandlerDefinition; +export interface CommandBuilderDefinition { + builder?: CommandBuilder; + deprecated?: boolean; + handler: CommandHandlerCallback; + middlewares?: Middleware[]; +} +export declare function isCommandBuilderDefinition(builder?: CommandBuilder | CommandBuilderDefinition): builder is CommandBuilderDefinition; +export interface CommandHandlerCallback { + (argv: Arguments): any; +} +export interface CommandHandler { + builder: CommandBuilder; + demanded: Positional[]; + deprecated?: boolean; + description?: string | false; + handler: CommandHandlerCallback; + middlewares: Middleware[]; + optional: Positional[]; + original: string; +} +export declare type CommandBuilder = CommandBuilderCallback | Dictionary; +interface CommandBuilderCallback { + (y: YargsInstance): YargsInstance | void; +} +export declare function isCommandBuilderCallback(builder: CommandBuilder): builder is CommandBuilderCallback; +interface Positionals extends Pick { + demand: Dictionary; +} +export interface FinishCommandHandler { + (handlerResult: any): any; +} +export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/command.js b/test-eol-project/node_modules/yargs/build/lib/command.js new file mode 100644 index 00000000..d90c4559 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/command.js @@ -0,0 +1,416 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCommandBuilderCallback = exports.isCommandBuilderDefinition = exports.isCommandHandlerDefinition = exports.command = void 0; +const common_types_1 = require("./common-types"); +const is_promise_1 = require("./is-promise"); +const middleware_1 = require("./middleware"); +const parse_command_1 = require("./parse-command"); +const path = require("path"); +const util_1 = require("util"); +const yargs_1 = require("./yargs"); +const requireDirectory = require("require-directory"); +const whichModule = require("which-module"); +const Parser = require("yargs-parser"); +const DEFAULT_MARKER = /(^\*)|(^\$0)/; +// handles parsing positional arguments, +// and populating argv with said positional +// arguments. +function command(yargs, usage, validation, globalMiddleware = []) { + const self = {}; + let handlers = {}; + let aliasMap = {}; + let defaultCommand; + self.addHandler = function addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { + let aliases = []; + const middlewares = middleware_1.commandMiddlewareFactory(commandMiddleware); + handler = handler || (() => { }); + if (Array.isArray(cmd)) { + aliases = cmd.slice(1); + cmd = cmd[0]; + } + else if (isCommandHandlerDefinition(cmd)) { + let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd); + if (cmd.aliases) + command = [].concat(command).concat(cmd.aliases); + self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); + return; + } + // allow a module to be provided instead of separate builder and handler + if (isCommandBuilderDefinition(builder)) { + self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); + return; + } + // parse positionals out of cmd string + const parsedCommand = parse_command_1.parseCommand(cmd); + // remove positional args from aliases only + aliases = aliases.map(alias => parse_command_1.parseCommand(alias).cmd); + // check for default and filter out '*'' + let isDefault = false; + const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => { + if (DEFAULT_MARKER.test(c)) { + isDefault = true; + return false; + } + return true; + }); + // standardize on $0 for default command. + if (parsedAliases.length === 0 && isDefault) + parsedAliases.push('$0'); + // shift cmd and aliases after filtering out '*' + if (isDefault) { + parsedCommand.cmd = parsedAliases[0]; + aliases = parsedAliases.slice(1); + cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); + } + // populate aliasMap + aliases.forEach((alias) => { + aliasMap[alias] = parsedCommand.cmd; + }); + if (description !== false) { + usage.command(cmd, description, isDefault, aliases, deprecated); + } + handlers[parsedCommand.cmd] = { + original: cmd, + description, + handler, + builder: builder || {}, + middlewares, + deprecated, + demanded: parsedCommand.demanded, + optional: parsedCommand.optional + }; + if (isDefault) + defaultCommand = handlers[parsedCommand.cmd]; + }; + self.addDirectory = function addDirectory(dir, context, req, callerFile, opts) { + opts = opts || {}; + // disable recursion to support nested directories of subcommands + if (typeof opts.recurse !== 'boolean') + opts.recurse = false; + // exclude 'json', 'coffee' from require-directory defaults + if (!Array.isArray(opts.extensions)) + opts.extensions = ['js']; + // allow consumer to define their own visitor function + const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o; + // call addHandler via visitor function + opts.visit = function visit(obj, joined, filename) { + const visited = parentVisit(obj, joined, filename); + // allow consumer to skip modules with their own visitor + if (visited) { + // check for cyclic reference + // each command file path should only be seen once per execution + if (~context.files.indexOf(joined)) + return visited; + // keep track of visited files in context.files + context.files.push(joined); + self.addHandler(visited); + } + return visited; + }; + requireDirectory({ require: req, filename: callerFile }, dir, opts); + }; + // lookup module object from require()d command and derive name + // if module was not require()d and no name given, throw error + function moduleName(obj) { + const mod = whichModule(obj); + if (!mod) + throw new Error(`No command name given for module: ${util_1.inspect(obj)}`); + return commandFromFilename(mod.filename); + } + // derive command name from filename + function commandFromFilename(filename) { + return path.basename(filename, path.extname(filename)); + } + function extractDesc({ describe, description, desc }) { + for (const test of [describe, description, desc]) { + if (typeof test === 'string' || test === false) + return test; + common_types_1.assertNotStrictEqual(test, true); + } + return false; + } + self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)); + self.getCommandHandlers = () => handlers; + self.hasDefaultCommand = () => !!defaultCommand; + self.runCommand = function runCommand(command, yargs, parsed, commandIndex) { + let aliases = parsed.aliases; + const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand; + const currentContext = yargs.getContext(); + let numFiles = currentContext.files.length; + const parentCommands = currentContext.commands.slice(); + // what does yargs look like after the builder is run? + let innerArgv = parsed.argv; + let positionalMap = {}; + if (command) { + currentContext.commands.push(command); + currentContext.fullCommands.push(commandHandler.original); + } + const builder = commandHandler.builder; + if (isCommandBuilderCallback(builder)) { + // a function can be provided, which builds + // up a yargs chain and possibly returns it. + const builderOutput = builder(yargs.reset(parsed.aliases)); + const innerYargs = yargs_1.isYargsInstance(builderOutput) ? builderOutput : yargs; + if (shouldUpdateUsage(innerYargs)) { + innerYargs.getUsageInstance().usage(usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); + } + innerArgv = innerYargs._parseArgs(null, null, true, commandIndex); + aliases = innerYargs.parsed.aliases; + } + else if (isCommandBuilderOptionDefinitions(builder)) { + // as a short hand, an object can instead be provided, specifying + // the options that a command takes. + const innerYargs = yargs.reset(parsed.aliases); + if (shouldUpdateUsage(innerYargs)) { + innerYargs.getUsageInstance().usage(usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); + } + Object.keys(commandHandler.builder).forEach((key) => { + innerYargs.option(key, builder[key]); + }); + innerArgv = innerYargs._parseArgs(null, null, true, commandIndex); + aliases = innerYargs.parsed.aliases; + } + if (!yargs._hasOutput()) { + positionalMap = populatePositionals(commandHandler, innerArgv, currentContext); + } + const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares); + middleware_1.applyMiddleware(innerArgv, yargs, middlewares, true); + // we apply validation post-hoc, so that custom + // checks get passed populated positional arguments. + if (!yargs._hasOutput()) { + yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error, !command); + } + if (commandHandler.handler && !yargs._hasOutput()) { + yargs._setHasOutput(); + // to simplify the parsing of positionals in commands, + // we temporarily populate '--' rather than _, with arguments + const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; + if (!populateDoubleDash) + yargs._copyDoubleDash(innerArgv); + innerArgv = middleware_1.applyMiddleware(innerArgv, yargs, middlewares, false); + let handlerResult; + if (is_promise_1.isPromise(innerArgv)) { + handlerResult = innerArgv.then(argv => commandHandler.handler(argv)); + } + else { + handlerResult = commandHandler.handler(innerArgv); + } + const handlerFinishCommand = yargs.getHandlerFinishCommand(); + if (is_promise_1.isPromise(handlerResult)) { + yargs.getUsageInstance().cacheHelpMessage(); + handlerResult + .then(value => { + if (handlerFinishCommand) { + handlerFinishCommand(value); + } + }) + .catch(error => { + try { + yargs.getUsageInstance().fail(null, error); + } + catch (err) { + // fail's throwing would cause an unhandled rejection. + } + }) + .then(() => { + yargs.getUsageInstance().clearCachedHelpMessage(); + }); + } + else { + if (handlerFinishCommand) { + handlerFinishCommand(handlerResult); + } + } + } + if (command) { + currentContext.commands.pop(); + currentContext.fullCommands.pop(); + } + numFiles = currentContext.files.length - numFiles; + if (numFiles > 0) + currentContext.files.splice(numFiles * -1, numFiles); + return innerArgv; + }; + function shouldUpdateUsage(yargs) { + return !yargs.getUsageInstance().getUsageDisabled() && + yargs.getUsageInstance().getUsage().length === 0; + } + function usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { + const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original; + const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c); }); + pc.push(c); + return `$0 ${pc.join(' ')}`; + } + self.runDefaultBuilderOn = function (yargs) { + common_types_1.assertNotStrictEqual(defaultCommand, undefined); + if (shouldUpdateUsage(yargs)) { + // build the root-level command string from the default string. + const commandString = DEFAULT_MARKER.test(defaultCommand.original) + ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); + yargs.getUsageInstance().usage(commandString, defaultCommand.description); + } + const builder = defaultCommand.builder; + if (isCommandBuilderCallback(builder)) { + builder(yargs); + } + else { + Object.keys(builder).forEach((key) => { + yargs.option(key, builder[key]); + }); + } + }; + // transcribe all positional arguments "command [apple]" + // onto argv. + function populatePositionals(commandHandler, argv, context) { + argv._ = argv._.slice(context.commands.length); // nuke the current commands + const demanded = commandHandler.demanded.slice(0); + const optional = commandHandler.optional.slice(0); + const positionalMap = {}; + validation.positionalCount(demanded.length, argv._.length); + while (demanded.length) { + const demand = demanded.shift(); + populatePositional(demand, argv, positionalMap); + } + while (optional.length) { + const maybe = optional.shift(); + populatePositional(maybe, argv, positionalMap); + } + argv._ = context.commands.concat(argv._); + postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)); + return positionalMap; + } + function populatePositional(positional, argv, positionalMap) { + const cmd = positional.cmd[0]; + if (positional.variadic) { + positionalMap[cmd] = argv._.splice(0).map(String); + } + else { + if (argv._.length) + positionalMap[cmd] = [String(argv._.shift())]; + } + } + // we run yargs-parser against the positional arguments + // applying the same parsing logic used for flags. + function postProcessPositionals(argv, positionalMap, parseOptions) { + // combine the parsing hints we've inferred from the command + // string with explicitly configured parsing hints. + const options = Object.assign({}, yargs.getOptions()); + options.default = Object.assign(parseOptions.default, options.default); + for (const key of Object.keys(parseOptions.alias)) { + options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); + } + options.array = options.array.concat(parseOptions.array); + delete options.config; // don't load config when processing positionals. + const unparsed = []; + Object.keys(positionalMap).forEach((key) => { + positionalMap[key].map((value) => { + if (options.configuration['unknown-options-as-args']) + options.key[key] = true; + unparsed.push(`--${key}`); + unparsed.push(value); + }); + }); + // short-circuit parse. + if (!unparsed.length) + return; + const config = Object.assign({}, options.configuration, { + 'populate--': true + }); + const parsed = Parser.detailed(unparsed, Object.assign({}, options, { + configuration: config + })); + if (parsed.error) { + yargs.getUsageInstance().fail(parsed.error.message, parsed.error); + } + else { + // only copy over positional keys (don't overwrite + // flag arguments that were already parsed). + const positionalKeys = Object.keys(positionalMap); + Object.keys(positionalMap).forEach((key) => { + positionalKeys.push(...parsed.aliases[key]); + }); + Object.keys(parsed.argv).forEach((key) => { + if (positionalKeys.indexOf(key) !== -1) { + // any new aliases need to be placed in positionalMap, which + // is used for validation. + if (!positionalMap[key]) + positionalMap[key] = parsed.argv[key]; + argv[key] = parsed.argv[key]; + } + }); + } + } + self.cmdToParseOptions = function (cmdString) { + const parseOptions = { + array: [], + default: {}, + alias: {}, + demand: {} + }; + const parsed = parse_command_1.parseCommand(cmdString); + parsed.demanded.forEach((d) => { + const [cmd, ...aliases] = d.cmd; + if (d.variadic) { + parseOptions.array.push(cmd); + parseOptions.default[cmd] = []; + } + parseOptions.alias[cmd] = aliases; + parseOptions.demand[cmd] = true; + }); + parsed.optional.forEach((o) => { + const [cmd, ...aliases] = o.cmd; + if (o.variadic) { + parseOptions.array.push(cmd); + parseOptions.default[cmd] = []; + } + parseOptions.alias[cmd] = aliases; + }); + return parseOptions; + }; + self.reset = () => { + handlers = {}; + aliasMap = {}; + defaultCommand = undefined; + return self; + }; + // used by yargs.parse() to freeze + // the state of commands such that + // we can apply .parse() multiple times + // with the same yargs instance. + const frozens = []; + self.freeze = () => { + frozens.push({ + handlers, + aliasMap, + defaultCommand + }); + }; + self.unfreeze = () => { + const frozen = frozens.pop(); + common_types_1.assertNotStrictEqual(frozen, undefined); + ({ + handlers, + aliasMap, + defaultCommand + } = frozen); + }; + return self; +} +exports.command = command; +function isCommandHandlerDefinition(cmd) { + return typeof cmd === 'object'; +} +exports.isCommandHandlerDefinition = isCommandHandlerDefinition; +function isCommandBuilderDefinition(builder) { + return typeof builder === 'object' && + !!builder.builder && + typeof builder.handler === 'function'; +} +exports.isCommandBuilderDefinition = isCommandBuilderDefinition; +function isCommandBuilderCallback(builder) { + return typeof builder === 'function'; +} +exports.isCommandBuilderCallback = isCommandBuilderCallback; +function isCommandBuilderOptionDefinitions(builder) { + return typeof builder === 'object'; +} diff --git a/test-eol-project/node_modules/yargs/build/lib/common-types.d.ts b/test-eol-project/node_modules/yargs/build/lib/common-types.d.ts new file mode 100644 index 00000000..f83c0dd0 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/common-types.d.ts @@ -0,0 +1,36 @@ +/** + * An object whose all properties have the same type. + */ +export declare type Dictionary = { + [key: string]: T; +}; +/** + * Returns the keys of T that match Dictionary and are not arrays. + */ +export declare type DictionaryKeyof = Exclude>, KeyOf>; +/** + * Returns the keys of T that match U. + */ +export declare type KeyOf = Exclude<{ + [K in keyof T]: T[K] extends U ? K : never; +}[keyof T], undefined>; +/** + * An array whose first element is not undefined. + */ +export declare type NotEmptyArray = [T, ...T[]]; +/** + * Returns the type of a Dictionary or array values. + */ +export declare type ValueOf = T extends (infer U)[] ? U : T[keyof T]; +/** + * Typing wrapper around assert.notStrictEqual() + */ +export declare function assertNotStrictEqual(actual: T | N, expected: N, message?: string | Error): asserts actual is Exclude; +/** + * Asserts actual is a single key, not a key array or a key map. + */ +export declare function assertSingleKey(actual: string | string[] | Dictionary): asserts actual is string; +/** + * Typing wrapper around Object.keys() + */ +export declare function objectKeys(object: T): (keyof T)[]; diff --git a/test-eol-project/node_modules/yargs/build/lib/common-types.js b/test-eol-project/node_modules/yargs/build/lib/common-types.js new file mode 100644 index 00000000..3064cbf4 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/common-types.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.objectKeys = exports.assertSingleKey = exports.assertNotStrictEqual = void 0; +const assert_1 = require("assert"); +/** + * Typing wrapper around assert.notStrictEqual() + */ +function assertNotStrictEqual(actual, expected, message) { + assert_1.notStrictEqual(actual, expected, message); +} +exports.assertNotStrictEqual = assertNotStrictEqual; +/** + * Asserts actual is a single key, not a key array or a key map. + */ +function assertSingleKey(actual) { + assert_1.strictEqual(typeof actual, 'string'); +} +exports.assertSingleKey = assertSingleKey; +/** + * Typing wrapper around Object.keys() + */ +function objectKeys(object) { + return Object.keys(object); +} +exports.objectKeys = objectKeys; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts b/test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts new file mode 100644 index 00000000..67bcd303 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts @@ -0,0 +1,2 @@ +export declare const completionShTemplate = "###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word=\"${COMP_WORDS[COMP_CWORD]}\"\n args=(\"${COMP_WORDS[@]}\")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions \"${args[@]}\")\n\n COMPREPLY=( $(compgen -W \"${type_list}\" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o default -F _yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n"; +export declare const completionZshTemplate = "###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$'\n' reply=($(COMP_CWORD=\"$((CURRENT-1))\" COMP_LINE=\"$BUFFER\" COMP_POINT=\"$CURSOR\" {{app_path}} --get-yargs-completions \"${words[@]}\"))\n IFS=$si\n _describe 'values' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n"; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion-templates.js b/test-eol-project/node_modules/yargs/build/lib/completion-templates.js new file mode 100644 index 00000000..3ee0e068 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/completion-templates.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.completionZshTemplate = exports.completionShTemplate = void 0; +exports.completionShTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc +# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. +# +_yargs_completions() +{ + local cur_word args type_list + + cur_word="\${COMP_WORDS[COMP_CWORD]}" + args=("\${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") + + COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) + + # if no match was found, fall back to filename completion + if [ \${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=() + fi + + return 0 +} +complete -o default -F _yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +`; +exports.completionZshTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc +# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local reply + local si=$IFS + IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) + IFS=$si + _describe 'values' reply +} +compdef _{{app_name}}_yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +`; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion.d.ts b/test-eol-project/node_modules/yargs/build/lib/completion.d.ts new file mode 100644 index 00000000..176a91b5 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/completion.d.ts @@ -0,0 +1,21 @@ +import { CommandInstance } from './command'; +import { UsageInstance } from './usage'; +import { YargsInstance } from './yargs'; +import { Arguments, DetailedArguments } from 'yargs-parser'; +export declare function completion(yargs: YargsInstance, usage: UsageInstance, command: CommandInstance): CompletionInstance; +/** Instance of the completion module. */ +export interface CompletionInstance { + completionKey: string; + generateCompletionScript($0: string, cmd: string): string; + getCompletion(args: string[], done: (completions: string[]) => any): any; + registerFunction(fn: CompletionFunction): void; + setParsed(parsed: DetailedArguments): void; +} +export declare type CompletionFunction = SyncCompletionFunction | AsyncCompletionFunction; +interface SyncCompletionFunction { + (current: string, argv: Arguments): string[] | Promise; +} +interface AsyncCompletionFunction { + (current: string, argv: Arguments, done: (completions: string[]) => any): any; +} +export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion.js b/test-eol-project/node_modules/yargs/build/lib/completion.js new file mode 100644 index 00000000..d65925ab --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/completion.js @@ -0,0 +1,135 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.completion = void 0; +const command_1 = require("./command"); +const templates = require("./completion-templates"); +const is_promise_1 = require("./is-promise"); +const parse_command_1 = require("./parse-command"); +const path = require("path"); +const common_types_1 = require("./common-types"); +// add bash completions to your +// yargs-powered applications. +function completion(yargs, usage, command) { + const self = { + completionKey: 'get-yargs-completions' + }; + let aliases; + self.setParsed = function setParsed(parsed) { + aliases = parsed.aliases; + }; + const zshShell = (process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1) || + (process.env.ZSH_NAME && process.env.ZSH_NAME.indexOf('zsh') !== -1); + // get a list of completion commands. + // 'args' is the array of strings from the line to be completed + self.getCompletion = function getCompletion(args, done) { + const completions = []; + const current = args.length ? args[args.length - 1] : ''; + const argv = yargs.parse(args, true); + const parentCommands = yargs.getContext().commands; + // a custom completion function can be provided + // to completion(). + function runCompletionFunction(argv) { + common_types_1.assertNotStrictEqual(completionFunction, null); + if (isSyncCompletionFunction(completionFunction)) { + const result = completionFunction(current, argv); + // promise based completion function. + if (is_promise_1.isPromise(result)) { + return result.then((list) => { + process.nextTick(() => { done(list); }); + }).catch((err) => { + process.nextTick(() => { throw err; }); + }); + } + // synchronous completion function. + return done(result); + } + else { + // asynchronous completion function + return completionFunction(current, argv, (completions) => { + done(completions); + }); + } + } + if (completionFunction) { + return is_promise_1.isPromise(argv) ? argv.then(runCompletionFunction) : runCompletionFunction(argv); + } + const handlers = command.getCommandHandlers(); + for (let i = 0, ii = args.length; i < ii; ++i) { + if (handlers[args[i]] && handlers[args[i]].builder) { + const builder = handlers[args[i]].builder; + if (command_1.isCommandBuilderCallback(builder)) { + const y = yargs.reset(); + builder(y); + return y.argv; + } + } + } + if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) { + usage.getCommands().forEach((usageCommand) => { + const commandName = parse_command_1.parseCommand(usageCommand[0]).cmd; + if (args.indexOf(commandName) === -1) { + if (!zshShell) { + completions.push(commandName); + } + else { + const desc = usageCommand[1] || ''; + completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); + } + } + }); + } + if (current.match(/^-/) || (current === '' && completions.length === 0)) { + const descs = usage.getDescriptions(); + const options = yargs.getOptions(); + Object.keys(options.key).forEach((key) => { + const negable = !!options.configuration['boolean-negation'] && options.boolean.includes(key); + // If the key and its aliases aren't in 'args', add the key to 'completions' + let keyAndAliases = [key].concat(aliases[key] || []); + if (negable) + keyAndAliases = keyAndAliases.concat(keyAndAliases.map(key => `no-${key}`)); + function completeOptionKey(key) { + const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1); + if (notInArgs) { + const startsByTwoDashes = (s) => /^--/.test(s); + const isShortOption = (s) => /^[^0-9]$/.test(s); + const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; + if (!zshShell) { + completions.push(dashes + key); + } + else { + const desc = descs[key] || ''; + completions.push(dashes + `${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`); + } + } + } + completeOptionKey(key); + if (negable && !!options.default[key]) + completeOptionKey(`no-${key}`); + }); + } + done(completions); + }; + // generate the completion script to add to your .bashrc. + self.generateCompletionScript = function generateCompletionScript($0, cmd) { + let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate; + const name = path.basename($0); + // add ./to applications not yet installed as bin. + if ($0.match(/\.js$/)) + $0 = `./${$0}`; + script = script.replace(/{{app_name}}/g, name); + script = script.replace(/{{completion_command}}/g, cmd); + return script.replace(/{{app_path}}/g, $0); + }; + // register a function to perform your own custom + // completions., this function can be either + // synchrnous or asynchronous. + let completionFunction = null; + self.registerFunction = (fn) => { + completionFunction = fn; + }; + return self; +} +exports.completion = completion; +function isSyncCompletionFunction(completionFunction) { + return completionFunction.length < 3; +} diff --git a/test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts b/test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts new file mode 100644 index 00000000..19b5566b --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts @@ -0,0 +1 @@ +export declare function isPromise(maybePromise: T | Promise): maybePromise is Promise; diff --git a/test-eol-project/node_modules/yargs/build/lib/is-promise.js b/test-eol-project/node_modules/yargs/build/lib/is-promise.js new file mode 100644 index 00000000..c24f9a86 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/is-promise.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPromise = void 0; +function isPromise(maybePromise) { + return !!maybePromise && + !!maybePromise.then && + (typeof maybePromise.then === 'function'); +} +exports.isPromise = isPromise; diff --git a/test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts b/test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts new file mode 100644 index 00000000..08b6b7f5 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts @@ -0,0 +1 @@ +export declare function levenshtein(a: string, b: string): number; diff --git a/test-eol-project/node_modules/yargs/build/lib/levenshtein.js b/test-eol-project/node_modules/yargs/build/lib/levenshtein.js new file mode 100644 index 00000000..84c0831f --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/levenshtein.js @@ -0,0 +1,58 @@ +"use strict"; +/* +Copyright (c) 2011 Andrei Mackenzie + +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. +*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.levenshtein = void 0; +// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. +// gist, which can be found here: https://gist.github.com/andrei-m/982927 +// Compute the edit distance between the two given strings +function levenshtein(a, b) { + if (a.length === 0) + return b.length; + if (b.length === 0) + return a.length; + const matrix = []; + // increment along the first column of each row + let i; + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } + // increment each column in the first row + let j; + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } + // Fill in the rest of the matrix + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } + else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)); // deletion + } + } + } + return matrix[b.length][a.length]; +} +exports.levenshtein = levenshtein; diff --git a/test-eol-project/node_modules/yargs/build/lib/middleware.d.ts b/test-eol-project/node_modules/yargs/build/lib/middleware.d.ts new file mode 100644 index 00000000..8fa7c34f --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/middleware.d.ts @@ -0,0 +1,10 @@ +import { YargsInstance, Arguments } from './yargs'; +export declare function globalMiddlewareFactory(globalMiddleware: Middleware[], context: T): (callback: MiddlewareCallback | MiddlewareCallback[], applyBeforeValidation?: boolean) => T; +export declare function commandMiddlewareFactory(commandMiddleware?: MiddlewareCallback[]): Middleware[]; +export declare function applyMiddleware(argv: Arguments | Promise, yargs: YargsInstance, middlewares: Middleware[], beforeValidation: boolean): Arguments | Promise; +export interface MiddlewareCallback { + (argv: Arguments, yargs: YargsInstance): Partial | Promise>; +} +export interface Middleware extends MiddlewareCallback { + applyBeforeValidation: boolean; +} diff --git a/test-eol-project/node_modules/yargs/build/lib/middleware.js b/test-eol-project/node_modules/yargs/build/lib/middleware.js new file mode 100644 index 00000000..e93b6d27 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/middleware.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.applyMiddleware = exports.commandMiddlewareFactory = exports.globalMiddlewareFactory = void 0; +const argsert_1 = require("./argsert"); +const is_promise_1 = require("./is-promise"); +function globalMiddlewareFactory(globalMiddleware, context) { + return function (callback, applyBeforeValidation = false) { + argsert_1.argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length); + if (Array.isArray(callback)) { + for (let i = 0; i < callback.length; i++) { + if (typeof callback[i] !== 'function') { + throw Error('middleware must be a function'); + } + callback[i].applyBeforeValidation = applyBeforeValidation; + } + Array.prototype.push.apply(globalMiddleware, callback); + } + else if (typeof callback === 'function') { + callback.applyBeforeValidation = applyBeforeValidation; + globalMiddleware.push(callback); + } + return context; + }; +} +exports.globalMiddlewareFactory = globalMiddlewareFactory; +function commandMiddlewareFactory(commandMiddleware) { + if (!commandMiddleware) + return []; + return commandMiddleware.map(middleware => { + middleware.applyBeforeValidation = false; + return middleware; + }); +} +exports.commandMiddlewareFactory = commandMiddlewareFactory; +function applyMiddleware(argv, yargs, middlewares, beforeValidation) { + const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true'); + return middlewares + .reduce((acc, middleware) => { + if (middleware.applyBeforeValidation !== beforeValidation) { + return acc; + } + if (is_promise_1.isPromise(acc)) { + return acc + .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) + .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); + } + else { + const result = middleware(acc, yargs); + if (beforeValidation && is_promise_1.isPromise(result)) + throw beforeValidationError; + return is_promise_1.isPromise(result) + ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) + : Object.assign(acc, result); + } + }, argv); +} +exports.applyMiddleware = applyMiddleware; diff --git a/test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts b/test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts new file mode 100644 index 00000000..031ae289 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts @@ -0,0 +1 @@ +export declare function objFilter(original?: T, filter?: (k: keyof T, v: T[keyof T]) => boolean): T; diff --git a/test-eol-project/node_modules/yargs/build/lib/obj-filter.js b/test-eol-project/node_modules/yargs/build/lib/obj-filter.js new file mode 100644 index 00000000..790f9478 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/obj-filter.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.objFilter = void 0; +const common_types_1 = require("./common-types"); +function objFilter(original = {}, filter = () => true) { + const obj = {}; + common_types_1.objectKeys(original).forEach((key) => { + if (filter(key, original[key])) { + obj[key] = original[key]; + } + }); + return obj; +} +exports.objFilter = objFilter; diff --git a/test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts b/test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts new file mode 100644 index 00000000..fc578369 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts @@ -0,0 +1,11 @@ +import { NotEmptyArray } from './common-types'; +export declare function parseCommand(cmd: string): ParsedCommand; +export interface ParsedCommand { + cmd: string; + demanded: Positional[]; + optional: Positional[]; +} +export interface Positional { + cmd: NotEmptyArray; + variadic: boolean; +} diff --git a/test-eol-project/node_modules/yargs/build/lib/parse-command.js b/test-eol-project/node_modules/yargs/build/lib/parse-command.js new file mode 100644 index 00000000..aaf23272 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/parse-command.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseCommand = void 0; +function parseCommand(cmd) { + const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); + const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); + const bregex = /\.*[\][<>]/g; + const firstCommand = splitCommand.shift(); + if (!firstCommand) + throw new Error(`No command found in: ${cmd}`); + const parsedCommand = { + cmd: firstCommand.replace(bregex, ''), + demanded: [], + optional: [] + }; + splitCommand.forEach((cmd, i) => { + let variadic = false; + cmd = cmd.replace(/\s/g, ''); + if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) + variadic = true; + if (/^\[/.test(cmd)) { + parsedCommand.optional.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic + }); + } + else { + parsedCommand.demanded.push({ + cmd: cmd.replace(bregex, '').split('|'), + variadic + }); + } + }); + return parsedCommand; +} +exports.parseCommand = parseCommand; diff --git a/test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts b/test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts new file mode 100644 index 00000000..18fd43b9 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts @@ -0,0 +1,2 @@ +export declare function getProcessArgvWithoutBin(): string[]; +export declare function getProcessArgvBin(): string; diff --git a/test-eol-project/node_modules/yargs/build/lib/process-argv.js b/test-eol-project/node_modules/yargs/build/lib/process-argv.js new file mode 100644 index 00000000..a9201dd7 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/process-argv.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getProcessArgvBin = exports.getProcessArgvWithoutBin = void 0; +function getProcessArgvBinIndex() { + // The binary name is the first command line argument for: + // - bundled Electron apps: bin argv1 argv2 ... argvn + if (isBundledElectronApp()) + return 0; + // or the second one (default) for: + // - standard node apps: node bin.js argv1 argv2 ... argvn + // - unbundled Electron apps: electron bin.js argv1 arg2 ... argvn + return 1; +} +function isBundledElectronApp() { + // process.defaultApp is either set by electron in an electron unbundled app, or undefined + // see https://github.com/electron/electron/blob/master/docs/api/process.md#processdefaultapp-readonly + return isElectronApp() && !process.defaultApp; +} +function isElectronApp() { + // process.versions.electron is either set by electron, or undefined + // see https://github.com/electron/electron/blob/master/docs/api/process.md#processversionselectron-readonly + return !!process.versions.electron; +} +function getProcessArgvWithoutBin() { + return process.argv.slice(getProcessArgvBinIndex() + 1); +} +exports.getProcessArgvWithoutBin = getProcessArgvWithoutBin; +function getProcessArgvBin() { + return process.argv[getProcessArgvBinIndex()]; +} +exports.getProcessArgvBin = getProcessArgvBin; diff --git a/test-eol-project/node_modules/yargs/build/lib/usage.d.ts b/test-eol-project/node_modules/yargs/build/lib/usage.d.ts new file mode 100644 index 00000000..d9dd1fa7 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/usage.d.ts @@ -0,0 +1,49 @@ +import { Dictionary } from './common-types'; +import { YargsInstance } from './yargs'; +import { YError } from './yerror'; +import { Y18N } from 'y18n'; +export declare function usage(yargs: YargsInstance, y18n: Y18N): UsageInstance; +/** Instance of the usage module. */ +export interface UsageInstance { + cacheHelpMessage(): void; + clearCachedHelpMessage(): void; + command(cmd: string, description: string | undefined, isDefault: boolean, aliases: string[], deprecated?: boolean): void; + deferY18nLookup(str: string): string; + describe(keys: string | string[] | Dictionary, desc?: string): void; + epilog(msg: string): void; + example(cmd: string, description?: string): void; + fail(msg?: string | null, err?: YError | string): void; + failFn(f: FailureFunction): void; + freeze(): void; + functionDescription(fn: { + name?: string; + }): string; + getCommands(): [string, string, boolean, string[], boolean][]; + getDescriptions(): Dictionary; + getPositionalGroupName(): string; + getUsage(): [string, string][]; + getUsageDisabled(): boolean; + help(): string; + reset(localLookup: Dictionary): UsageInstance; + showHelp(level: 'error' | 'log' | ((message: string) => void)): void; + showHelpOnFail(enabled?: boolean | string, message?: string): UsageInstance; + showVersion(): void; + stringifiedValues(values?: any[], separator?: string): string; + unfreeze(): void; + usage(msg: string | null, description?: string | false): UsageInstance; + version(ver: any): void; + wrap(cols: number | null | undefined): void; +} +export interface FailureFunction { + (msg: string | undefined | null, err: YError | string | undefined, usage: UsageInstance): void; +} +export interface FrozenUsageInstance { + failMessage: string | undefined | null; + failureOutput: boolean; + usages: [string, string][]; + usageDisabled: boolean; + epilogs: string[]; + examples: [string, string][]; + commands: [string, string, boolean, string[], boolean][]; + descriptions: Dictionary; +} diff --git a/test-eol-project/node_modules/yargs/build/lib/usage.js b/test-eol-project/node_modules/yargs/build/lib/usage.js new file mode 100644 index 00000000..73f7b244 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/usage.js @@ -0,0 +1,540 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.usage = void 0; +// this file handles outputting usage instructions, +// failures, etc. keeps logging in one place. +const common_types_1 = require("./common-types"); +const obj_filter_1 = require("./obj-filter"); +const path = require("path"); +const yerror_1 = require("./yerror"); +const decamelize = require("decamelize"); +const setBlocking = require("set-blocking"); +const stringWidth = require("string-width"); +function usage(yargs, y18n) { + const __ = y18n.__; + const self = {}; + // methods for ouputting/building failure message. + const fails = []; + self.failFn = function failFn(f) { + fails.push(f); + }; + let failMessage = null; + let showHelpOnFail = true; + self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { + function parseFunctionArgs() { + return typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; + } + const [enabled, message] = parseFunctionArgs(); + failMessage = message; + showHelpOnFail = enabled; + return self; + }; + let failureOutput = false; + self.fail = function fail(msg, err) { + const logger = yargs._getLoggerInstance(); + if (fails.length) { + for (let i = fails.length - 1; i >= 0; --i) { + fails[i](msg, err, self); + } + } + else { + if (yargs.getExitProcess()) + setBlocking(true); + // don't output failure message more than once + if (!failureOutput) { + failureOutput = true; + if (showHelpOnFail) { + yargs.showHelp('error'); + logger.error(); + } + if (msg || err) + logger.error(msg || err); + if (failMessage) { + if (msg || err) + logger.error(''); + logger.error(failMessage); + } + } + err = err || new yerror_1.YError(msg); + if (yargs.getExitProcess()) { + return yargs.exit(1); + } + else if (yargs._hasParseCallback()) { + return yargs.exit(1, err); + } + else { + throw err; + } + } + }; + // methods for ouputting/building help (usage) message. + let usages = []; + let usageDisabled = false; + self.usage = (msg, description) => { + if (msg === null) { + usageDisabled = true; + usages = []; + return self; + } + usageDisabled = false; + usages.push([msg, description || '']); + return self; + }; + self.getUsage = () => { + return usages; + }; + self.getUsageDisabled = () => { + return usageDisabled; + }; + self.getPositionalGroupName = () => { + return __('Positionals:'); + }; + let examples = []; + self.example = (cmd, description) => { + examples.push([cmd, description || '']); + }; + let commands = []; + self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { + // the last default wins, so cancel out any previously set default + if (isDefault) { + commands = commands.map((cmdArray) => { + cmdArray[2] = false; + return cmdArray; + }); + } + commands.push([cmd, description || '', isDefault, aliases, deprecated]); + }; + self.getCommands = () => commands; + let descriptions = {}; + self.describe = function describe(keyOrKeys, desc) { + if (Array.isArray(keyOrKeys)) { + keyOrKeys.forEach((k) => { + self.describe(k, desc); + }); + } + else if (typeof keyOrKeys === 'object') { + Object.keys(keyOrKeys).forEach((k) => { + self.describe(k, keyOrKeys[k]); + }); + } + else { + descriptions[keyOrKeys] = desc; + } + }; + self.getDescriptions = () => descriptions; + let epilogs = []; + self.epilog = (msg) => { + epilogs.push(msg); + }; + let wrapSet = false; + let wrap; + self.wrap = (cols) => { + wrapSet = true; + wrap = cols; + }; + function getWrap() { + if (!wrapSet) { + wrap = windowWidth(); + wrapSet = true; + } + return wrap; + } + const deferY18nLookupPrefix = '__yargsString__:'; + self.deferY18nLookup = str => deferY18nLookupPrefix + str; + self.help = function help() { + if (cachedHelpMessage) + return cachedHelpMessage; + normalizeAliases(); + // handle old demanded API + const base$0 = yargs.customScriptName ? yargs.$0 : path.basename(yargs.$0); + const demandedOptions = yargs.getDemandedOptions(); + const demandedCommands = yargs.getDemandedCommands(); + const deprecatedOptions = yargs.getDeprecatedOptions(); + const groups = yargs.getGroups(); + const options = yargs.getOptions(); + let keys = []; + keys = keys.concat(Object.keys(descriptions)); + keys = keys.concat(Object.keys(demandedOptions)); + keys = keys.concat(Object.keys(demandedCommands)); + keys = keys.concat(Object.keys(options.default)); + keys = keys.filter(filterHiddenOptions); + keys = Object.keys(keys.reduce((acc, key) => { + if (key !== '_') + acc[key] = true; + return acc; + }, {})); + const theWrap = getWrap(); + const ui = require('cliui')({ + width: theWrap, + wrap: !!theWrap + }); + // the usage string. + if (!usageDisabled) { + if (usages.length) { + // user-defined usage. + usages.forEach((usage) => { + ui.div(`${usage[0].replace(/\$0/g, base$0)}`); + if (usage[1]) { + ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); + } + }); + ui.div(); + } + else if (commands.length) { + let u = null; + // demonstrate how commands are used. + if (demandedCommands._) { + u = `${base$0} <${__('command')}>\n`; + } + else { + u = `${base$0} [${__('command')}]\n`; + } + ui.div(`${u}`); + } + } + // your application's commands, i.e., non-option + // arguments populated in '_'. + if (commands.length) { + ui.div(__('Commands:')); + const context = yargs.getContext(); + const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : ''; + if (yargs.getParserConfiguration()['sort-commands'] === true) { + commands = commands.sort((a, b) => a[0].localeCompare(b[0])); + } + commands.forEach((command) => { + const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; // drop $0 from default commands. + ui.span({ + text: commandString, + padding: [0, 2, 0, 2], + width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 + }, { text: command[1] }); + const hints = []; + if (command[2]) + hints.push(`[${__('default')}]`); + if (command[3] && command[3].length) { + hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); + } + if (command[4]) { + if (typeof command[4] === 'string') { + hints.push(`[${__('deprecated: %s', command[4])}]`); + } + else { + hints.push(`[${__('deprecated')}]`); + } + } + if (hints.length) { + ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' }); + } + else { + ui.div(); + } + }); + ui.div(); + } + // perform some cleanup on the keys array, making it + // only include top-level keys not their aliases. + const aliasKeys = (Object.keys(options.alias) || []) + .concat(Object.keys(yargs.parsed.newAliases) || []); + keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); + // populate 'Options:' group with any keys that have not + // explicitly had a group set. + const defaultGroup = __('Options:'); + if (!groups[defaultGroup]) + groups[defaultGroup] = []; + addUngroupedKeys(keys, options.alias, groups, defaultGroup); + // display 'Options:' table along with any custom tables: + Object.keys(groups).forEach((groupName) => { + if (!groups[groupName].length) + return; + // if we've grouped the key 'f', but 'f' aliases 'foobar', + // normalizedKeys should contain only 'foobar'. + const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => { + if (~aliasKeys.indexOf(key)) + return key; + for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { + if (~(options.alias[aliasKey] || []).indexOf(key)) + return aliasKey; + } + return key; + }); + if (normalizedKeys.length < 1) + return; + ui.div(groupName); + // actually generate the switches string --foo, -f, --bar. + const switches = normalizedKeys.reduce((acc, key) => { + acc[key] = [key].concat(options.alias[key] || []) + .map(sw => { + // for the special positional group don't + // add '--' or '-' prefix. + if (groupName === self.getPositionalGroupName()) + return sw; + else { + return ( + // matches yargs-parser logic in which single-digits + // aliases declared with a boolean type are now valid + /^[0-9]$/.test(sw) + ? ~options.boolean.indexOf(key) ? '-' : '--' + : sw.length > 1 ? '--' : '-') + sw; + } + }) + .join(', '); + return acc; + }, {}); + normalizedKeys.forEach((key) => { + const kswitch = switches[key]; + let desc = descriptions[key] || ''; + let type = null; + if (~desc.lastIndexOf(deferY18nLookupPrefix)) + desc = __(desc.substring(deferY18nLookupPrefix.length)); + if (~options.boolean.indexOf(key)) + type = `[${__('boolean')}]`; + if (~options.count.indexOf(key)) + type = `[${__('count')}]`; + if (~options.string.indexOf(key)) + type = `[${__('string')}]`; + if (~options.normalize.indexOf(key)) + type = `[${__('string')}]`; + if (~options.array.indexOf(key)) + type = `[${__('array')}]`; + if (~options.number.indexOf(key)) + type = `[${__('number')}]`; + const deprecatedExtra = (deprecated) => typeof deprecated === 'string' + ? `[${__('deprecated: %s', deprecated)}]` + : `[${__('deprecated')}]`; + const extra = [ + (key in deprecatedOptions) ? deprecatedExtra(deprecatedOptions[key]) : null, + type, + (key in demandedOptions) ? `[${__('required')}]` : null, + options.choices && options.choices[key] ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` : null, + defaultString(options.default[key], options.defaultDescription[key]) + ].filter(Boolean).join(' '); + ui.span({ text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 }, desc); + if (extra) + ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); + else + ui.div(); + }); + ui.div(); + }); + // describe some common use-cases for your application. + if (examples.length) { + ui.div(__('Examples:')); + examples.forEach((example) => { + example[0] = example[0].replace(/\$0/g, base$0); + }); + examples.forEach((example) => { + if (example[1] === '') { + ui.div({ + text: example[0], + padding: [0, 2, 0, 2] + }); + } + else { + ui.div({ + text: example[0], + padding: [0, 2, 0, 2], + width: maxWidth(examples, theWrap) + 4 + }, { + text: example[1] + }); + } + }); + ui.div(); + } + // the usage string. + if (epilogs.length > 0) { + const e = epilogs.map(epilog => epilog.replace(/\$0/g, base$0)).join('\n'); + ui.div(`${e}\n`); + } + // Remove the trailing white spaces + return ui.toString().replace(/\s*$/, ''); + }; + // return the maximum width of a string + // in the left-hand column of a table. + function maxWidth(table, theWrap, modifier) { + let width = 0; + // table might be of the form [leftColumn], + // or {key: leftColumn} + if (!Array.isArray(table)) { + table = Object.values(table).map(v => [v]); + } + table.forEach((v) => { + width = Math.max(stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]), width); + }); + // if we've enabled 'wrap' we should limit + // the max-width of the left-column. + if (theWrap) + width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); + return width; + } + // make sure any options set for aliases, + // are copied to the keys being aliased. + function normalizeAliases() { + // handle old demanded API + const demandedOptions = yargs.getDemandedOptions(); + const options = yargs.getOptions(); + (Object.keys(options.alias) || []).forEach((key) => { + options.alias[key].forEach((alias) => { + // copy descriptions. + if (descriptions[alias]) + self.describe(key, descriptions[alias]); + // copy demanded. + if (alias in demandedOptions) + yargs.demandOption(key, demandedOptions[alias]); + // type messages. + if (~options.boolean.indexOf(alias)) + yargs.boolean(key); + if (~options.count.indexOf(alias)) + yargs.count(key); + if (~options.string.indexOf(alias)) + yargs.string(key); + if (~options.normalize.indexOf(alias)) + yargs.normalize(key); + if (~options.array.indexOf(alias)) + yargs.array(key); + if (~options.number.indexOf(alias)) + yargs.number(key); + }); + }); + } + // if yargs is executing an async handler, we take a snapshot of the + // help message to display on failure: + let cachedHelpMessage; + self.cacheHelpMessage = function () { + cachedHelpMessage = this.help(); + }; + // however this snapshot must be cleared afterwards + // not to be be used by next calls to parse + self.clearCachedHelpMessage = function () { + cachedHelpMessage = undefined; + }; + // given a set of keys, place any keys that are + // ungrouped under the 'Options:' grouping. + function addUngroupedKeys(keys, aliases, groups, defaultGroup) { + let groupedKeys = []; + let toCheck = null; + Object.keys(groups).forEach((group) => { + groupedKeys = groupedKeys.concat(groups[group]); + }); + keys.forEach((key) => { + toCheck = [key].concat(aliases[key]); + if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { + groups[defaultGroup].push(key); + } + }); + return groupedKeys; + } + function filterHiddenOptions(key) { + return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt]; + } + self.showHelp = (level) => { + const logger = yargs._getLoggerInstance(); + if (!level) + level = 'error'; + const emit = typeof level === 'function' ? level : logger[level]; + emit(self.help()); + }; + self.functionDescription = (fn) => { + const description = fn.name ? decamelize(fn.name, '-') : __('generated-value'); + return ['(', description, ')'].join(''); + }; + self.stringifiedValues = function stringifiedValues(values, separator) { + let string = ''; + const sep = separator || ', '; + const array = [].concat(values); + if (!values || !array.length) + return string; + array.forEach((value) => { + if (string.length) + string += sep; + string += JSON.stringify(value); + }); + return string; + }; + // format the default-value-string displayed in + // the right-hand column. + function defaultString(value, defaultDescription) { + let string = `[${__('default:')} `; + if (value === undefined && !defaultDescription) + return null; + if (defaultDescription) { + string += defaultDescription; + } + else { + switch (typeof value) { + case 'string': + string += `"${value}"`; + break; + case 'object': + string += JSON.stringify(value); + break; + default: + string += value; + } + } + return `${string}]`; + } + // guess the width of the console window, max-width 80. + function windowWidth() { + const maxWidth = 80; + // CI is not a TTY + /* c8 ignore next 2 */ + if (typeof process === 'object' && process.stdout && process.stdout.columns) { + return Math.min(maxWidth, process.stdout.columns); + } + else { + return maxWidth; + } + } + // logic for displaying application version. + let version = null; + self.version = (ver) => { + version = ver; + }; + self.showVersion = () => { + const logger = yargs._getLoggerInstance(); + logger.log(version); + }; + self.reset = function reset(localLookup) { + // do not reset wrap here + // do not reset fails here + failMessage = null; + failureOutput = false; + usages = []; + usageDisabled = false; + epilogs = []; + examples = []; + commands = []; + descriptions = obj_filter_1.objFilter(descriptions, k => !localLookup[k]); + return self; + }; + const frozens = []; + self.freeze = function freeze() { + frozens.push({ + failMessage, + failureOutput, + usages, + usageDisabled, + epilogs, + examples, + commands, + descriptions + }); + }; + self.unfreeze = function unfreeze() { + const frozen = frozens.pop(); + common_types_1.assertNotStrictEqual(frozen, undefined); + ({ + failMessage, + failureOutput, + usages, + usageDisabled, + epilogs, + examples, + commands, + descriptions + } = frozen); + }; + return self; +} +exports.usage = usage; diff --git a/test-eol-project/node_modules/yargs/build/lib/validation.d.ts b/test-eol-project/node_modules/yargs/build/lib/validation.d.ts new file mode 100644 index 00000000..e2d78548 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/validation.d.ts @@ -0,0 +1,34 @@ +import { Dictionary } from './common-types'; +import { UsageInstance } from './usage'; +import { YargsInstance, Arguments } from './yargs'; +import { DetailedArguments } from 'yargs-parser'; +import { Y18N } from 'y18n'; +export declare function validation(yargs: YargsInstance, usage: UsageInstance, y18n: Y18N): ValidationInstance; +/** Instance of the validation module. */ +export interface ValidationInstance { + check(f: CustomCheck['func'], global: boolean): void; + conflicting(argv: Arguments): void; + conflicts(key: string | Dictionary, value?: string | string[]): void; + customChecks(argv: Arguments, aliases: DetailedArguments['aliases']): void; + freeze(): void; + getConflicting(): Dictionary<(string | undefined)[]>; + getImplied(): Dictionary; + implications(argv: Arguments): void; + implies(key: string | Dictionary, value?: KeyOrPos | KeyOrPos[]): void; + isValidAndSomeAliasIsNotNew(key: string, aliases: DetailedArguments['aliases']): boolean; + limitedChoices(argv: Arguments): void; + nonOptionCount(argv: Arguments): void; + positionalCount(required: number, observed: number): void; + recommendCommands(cmd: string, potentialCommands: string[]): void; + requiredArguments(argv: Arguments): void; + reset(localLookup: Dictionary): ValidationInstance; + unfreeze(): void; + unknownArguments(argv: Arguments, aliases: DetailedArguments['aliases'], positionalMap: Dictionary, isDefaultCommand: boolean): void; + unknownCommands(argv: Arguments): boolean; +} +interface CustomCheck { + func: (argv: Arguments, aliases: DetailedArguments['aliases']) => any; + global: boolean; +} +export declare type KeyOrPos = string | number; +export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/validation.js b/test-eol-project/node_modules/yargs/build/lib/validation.js new file mode 100644 index 00000000..60c5e43b --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/validation.js @@ -0,0 +1,330 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validation = void 0; +const argsert_1 = require("./argsert"); +const common_types_1 = require("./common-types"); +const levenshtein_1 = require("./levenshtein"); +const obj_filter_1 = require("./obj-filter"); +const specialKeys = ['$0', '--', '_']; +// validation-type-stuff, missing params, +// bad implications, custom checks. +function validation(yargs, usage, y18n) { + const __ = y18n.__; + const __n = y18n.__n; + const self = {}; + // validate appropriate # of non-option + // arguments were provided, i.e., '_'. + self.nonOptionCount = function nonOptionCount(argv) { + const demandedCommands = yargs.getDemandedCommands(); + // don't count currently executing commands + const _s = argv._.length - yargs.getContext().commands.length; + if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) { + if (_s < demandedCommands._.min) { + if (demandedCommands._.minMsg !== undefined) { + usage.fail( + // replace $0 with observed, $1 with expected. + demandedCommands._.minMsg + ? demandedCommands._.minMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.min.toString()) + : null); + } + else { + usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s, demandedCommands._.min)); + } + } + else if (_s > demandedCommands._.max) { + if (demandedCommands._.maxMsg !== undefined) { + usage.fail( + // replace $0 with observed, $1 with expected. + demandedCommands._.maxMsg + ? demandedCommands._.maxMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.max.toString()) + : null); + } + else { + usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s, demandedCommands._.max)); + } + } + } + }; + // validate the appropriate # of + // positional arguments were provided: + self.positionalCount = function positionalCount(required, observed) { + if (observed < required) { + usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed, required)); + } + }; + // make sure all the required arguments are present. + self.requiredArguments = function requiredArguments(argv) { + const demandedOptions = yargs.getDemandedOptions(); + let missing = null; + for (const key of Object.keys(demandedOptions)) { + if (!Object.prototype.hasOwnProperty.call(argv, key) || typeof argv[key] === 'undefined') { + missing = missing || {}; + missing[key] = demandedOptions[key]; + } + } + if (missing) { + const customMsgs = []; + for (const key of Object.keys(missing)) { + const msg = missing[key]; + if (msg && customMsgs.indexOf(msg) < 0) { + customMsgs.push(msg); + } + } + const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; + usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); + } + }; + // check for unknown arguments (strict-mode). + self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand) { + const commandKeys = yargs.getCommandInstance().getCommands(); + const unknown = []; + const currentContext = yargs.getContext(); + Object.keys(argv).forEach((key) => { + if (specialKeys.indexOf(key) === -1 && + !Object.prototype.hasOwnProperty.call(positionalMap, key) && + !Object.prototype.hasOwnProperty.call(yargs._getParseContext(), key) && + !self.isValidAndSomeAliasIsNotNew(key, aliases)) { + unknown.push(key); + } + }); + if ((currentContext.commands.length > 0) || (commandKeys.length > 0) || isDefaultCommand) { + argv._.slice(currentContext.commands.length).forEach((key) => { + if (commandKeys.indexOf(key) === -1) { + unknown.push(key); + } + }); + } + if (unknown.length > 0) { + usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.join(', '))); + } + }; + self.unknownCommands = function unknownCommands(argv) { + const commandKeys = yargs.getCommandInstance().getCommands(); + const unknown = []; + const currentContext = yargs.getContext(); + if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) { + argv._.slice(currentContext.commands.length).forEach((key) => { + if (commandKeys.indexOf(key) === -1) { + unknown.push(key); + } + }); + } + if (unknown.length > 0) { + usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); + return true; + } + else { + return false; + } + }; + // check for a key that is not an alias, or for which every alias is new, + // implying that it was invented by the parser, e.g., during camelization + self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { + if (!Object.prototype.hasOwnProperty.call(aliases, key)) { + return false; + } + const newAliases = yargs.parsed.newAliases; + for (const a of [key, ...aliases[key]]) { + if (!Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]) { + return true; + } + } + return false; + }; + // validate arguments limited to enumerated choices + self.limitedChoices = function limitedChoices(argv) { + const options = yargs.getOptions(); + const invalid = {}; + if (!Object.keys(options.choices).length) + return; + Object.keys(argv).forEach((key) => { + if (specialKeys.indexOf(key) === -1 && + Object.prototype.hasOwnProperty.call(options.choices, key)) { + [].concat(argv[key]).forEach((value) => { + // TODO case-insensitive configurability + if (options.choices[key].indexOf(value) === -1 && + value !== undefined) { + invalid[key] = (invalid[key] || []).concat(value); + } + }); + } + }); + const invalidKeys = Object.keys(invalid); + if (!invalidKeys.length) + return; + let msg = __('Invalid values:'); + invalidKeys.forEach((key) => { + msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; + }); + usage.fail(msg); + }; + // custom checks, added using the `check` option on yargs. + let checks = []; + self.check = function check(f, global) { + checks.push({ + func: f, + global + }); + }; + self.customChecks = function customChecks(argv, aliases) { + for (let i = 0, f; (f = checks[i]) !== undefined; i++) { + const func = f.func; + let result = null; + try { + result = func(argv, aliases); + } + catch (err) { + usage.fail(err.message ? err.message : err, err); + continue; + } + if (!result) { + usage.fail(__('Argument check failed: %s', func.toString())); + } + else if (typeof result === 'string' || result instanceof Error) { + usage.fail(result.toString(), result); + } + } + }; + // check implications, argument foo implies => argument bar. + let implied = {}; + self.implies = function implies(key, value) { + argsert_1.argsert(' [array|number|string]', [key, value], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.implies(k, key[k]); + }); + } + else { + yargs.global(key); + if (!implied[key]) { + implied[key] = []; + } + if (Array.isArray(value)) { + value.forEach((i) => self.implies(key, i)); + } + else { + common_types_1.assertNotStrictEqual(value, undefined); + implied[key].push(value); + } + } + }; + self.getImplied = function getImplied() { + return implied; + }; + function keyExists(argv, val) { + // convert string '1' to number 1 + const num = Number(val); + val = isNaN(num) ? val : num; + if (typeof val === 'number') { + // check length of argv._ + val = argv._.length >= val; + } + else if (val.match(/^--no-.+/)) { + // check if key/value doesn't exist + val = val.match(/^--no-(.+)/)[1]; + val = !argv[val]; + } + else { + // check if key/value exists + val = argv[val]; + } + return val; + } + self.implications = function implications(argv) { + const implyFail = []; + Object.keys(implied).forEach((key) => { + const origKey = key; + (implied[key] || []).forEach((value) => { + let key = origKey; + const origValue = value; + key = keyExists(argv, key); + value = keyExists(argv, value); + if (key && !value) { + implyFail.push(` ${origKey} -> ${origValue}`); + } + }); + }); + if (implyFail.length) { + let msg = `${__('Implications failed:')}\n`; + implyFail.forEach((value) => { + msg += (value); + }); + usage.fail(msg); + } + }; + let conflicting = {}; + self.conflicts = function conflicts(key, value) { + argsert_1.argsert(' [array|string]', [key, value], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.conflicts(k, key[k]); + }); + } + else { + yargs.global(key); + if (!conflicting[key]) { + conflicting[key] = []; + } + if (Array.isArray(value)) { + value.forEach((i) => self.conflicts(key, i)); + } + else { + conflicting[key].push(value); + } + } + }; + self.getConflicting = () => conflicting; + self.conflicting = function conflictingFn(argv) { + Object.keys(argv).forEach((key) => { + if (conflicting[key]) { + conflicting[key].forEach((value) => { + // we default keys to 'undefined' that have been configured, we should not + // apply conflicting check unless they are a value other than 'undefined'. + if (value && argv[key] !== undefined && argv[value] !== undefined) { + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); + } + }); + } + }); + }; + self.recommendCommands = function recommendCommands(cmd, potentialCommands) { + const threshold = 3; // if it takes more than three edits, let's move on. + potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); + let recommended = null; + let bestDistance = Infinity; + for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { + const d = levenshtein_1.levenshtein(cmd, candidate); + if (d <= threshold && d < bestDistance) { + bestDistance = d; + recommended = candidate; + } + } + if (recommended) + usage.fail(__('Did you mean %s?', recommended)); + }; + self.reset = function reset(localLookup) { + implied = obj_filter_1.objFilter(implied, k => !localLookup[k]); + conflicting = obj_filter_1.objFilter(conflicting, k => !localLookup[k]); + checks = checks.filter(c => c.global); + return self; + }; + const frozens = []; + self.freeze = function freeze() { + frozens.push({ + implied, + checks, + conflicting + }); + }; + self.unfreeze = function unfreeze() { + const frozen = frozens.pop(); + common_types_1.assertNotStrictEqual(frozen, undefined); + ({ + implied, + checks, + conflicting + } = frozen); + }; + return self; +} +exports.validation = validation; diff --git a/test-eol-project/node_modules/yargs/build/lib/yargs.d.ts b/test-eol-project/node_modules/yargs/build/lib/yargs.d.ts new file mode 100644 index 00000000..8e6e27cd --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/yargs.d.ts @@ -0,0 +1,274 @@ +/// +import { CommandInstance, CommandHandler, CommandBuilderDefinition, CommandBuilder, CommandHandlerCallback, FinishCommandHandler } from './command'; +import { Dictionary } from './common-types'; +import { Arguments as ParserArguments, DetailedArguments as ParserDetailedArguments, Configuration as ParserConfiguration, Options as ParserOptions, ConfigCallback, CoerceCallback } from 'yargs-parser'; +import { YError } from './yerror'; +import { UsageInstance, FailureFunction } from './usage'; +import { CompletionFunction } from './completion'; +import { ValidationInstance, KeyOrPos } from './validation'; +import { Y18N } from 'y18n'; +import { MiddlewareCallback, Middleware } from './middleware'; +import { RequireDirectoryOptions } from 'require-directory'; +export declare function Yargs(processArgs?: string | string[], cwd?: string, parentRequire?: NodeRequire): YargsInstance; +export declare function rebase(base: string, dir: string): string; +/** Instance of the yargs module. */ +export interface YargsInstance { + $0: string; + argv: Arguments; + customScriptName: boolean; + parsed: DetailedArguments | false; + _copyDoubleDash>(argv: T): T; + _getLoggerInstance(): LoggerInstance; + _getParseContext(): Object; + _hasOutput(): boolean; + _hasParseCallback(): boolean; + _parseArgs: { + (args: null, shortCircuit: null, _calledFromCommand: boolean, commandIndex?: number): Arguments | Promise; + (args: string | string[], shortCircuit?: boolean): Arguments | Promise; + }; + _runValidation(argv: Arguments, aliases: Dictionary, positionalMap: Dictionary, parseErrors: Error | null, isDefaultCommand?: boolean): void; + _setHasOutput(): void; + addHelpOpt: { + (opt?: string | false): YargsInstance; + (opt?: string, msg?: string): YargsInstance; + }; + addShowHiddenOpt: { + (opt?: string | false): YargsInstance; + (opt?: string, msg?: string): YargsInstance; + }; + alias: { + (keys: string | string[], aliases: string | string[]): YargsInstance; + (keyAliases: Dictionary): YargsInstance; + }; + array(keys: string | string[]): YargsInstance; + boolean(keys: string | string[]): YargsInstance; + check(f: (argv: Arguments, aliases: Dictionary) => any, _global?: boolean): YargsInstance; + choices: { + (keys: string | string[], choices: string | string[]): YargsInstance; + (keyChoices: Dictionary): YargsInstance; + }; + coerce: { + (keys: string | string[], coerceCallback: CoerceCallback): YargsInstance; + (keyCoerceCallbacks: Dictionary): YargsInstance; + }; + command(cmd: string | string[], description: CommandHandler['description'], builder?: CommandBuilderDefinition | CommandBuilder, handler?: CommandHandlerCallback, commandMiddleware?: Middleware[], deprecated?: boolean): YargsInstance; + commandDir(dir: string, opts?: RequireDirectoryOptions): YargsInstance; + completion: { + (cmd?: string, fn?: CompletionFunction): YargsInstance; + (cmd?: string, desc?: string | false, fn?: CompletionFunction): YargsInstance; + }; + config: { + (config: Dictionary): YargsInstance; + (keys?: string | string[], configCallback?: ConfigCallback): YargsInstance; + (keys?: string | string[], msg?: string, configCallback?: ConfigCallback): YargsInstance; + }; + conflicts: { + (key: string, conflictsWith: string | string[]): YargsInstance; + (keyConflicts: Dictionary): YargsInstance; + }; + count(keys: string | string[]): YargsInstance; + default: { + (key: string, value: any, defaultDescription?: string): YargsInstance; + (keys: string[], value: Exclude): YargsInstance; + (keys: Dictionary): YargsInstance; + }; + defaults: YargsInstance['default']; + demand: { + (min: number, max?: number | string, msg?: string): YargsInstance; + (keys: string | string[], msg?: string | true): YargsInstance; + (keys: string | string[], max: string[], msg?: string | true): YargsInstance; + (keyMsgs: Dictionary): YargsInstance; + (keyMsgs: Dictionary, max: string[], msg?: string): YargsInstance; + }; + demandCommand(): YargsInstance; + demandCommand(min: number, minMsg?: string): YargsInstance; + demandCommand(min: number, max: number, minMsg?: string | null, maxMsg?: string | null): YargsInstance; + demandOption: { + (keys: string | string[], msg?: string): YargsInstance; + (keyMsgs: Dictionary): YargsInstance; + }; + deprecateOption(option: string, message?: string | boolean): YargsInstance; + describe: { + (keys: string | string[], description?: string): YargsInstance; + (keyDescriptions: Dictionary): YargsInstance; + }; + detectLocale(detect: boolean): YargsInstance; + env(prefix?: string | false): YargsInstance; + epilog: YargsInstance['epilogue']; + epilogue(msg: string): YargsInstance; + example(cmd: string | [string, string?][], description?: string): YargsInstance; + exit(code: number, err?: YError | string): void; + exitProcess(enabled: boolean): YargsInstance; + fail(f: FailureFunction): YargsInstance; + getCommandInstance(): CommandInstance; + getCompletion(args: string[], done: (completions: string[]) => any): void; + getContext(): Context; + getDemandedCommands(): Options['demandedCommands']; + getDemandedOptions(): Options['demandedOptions']; + getDeprecatedOptions(): Options['deprecatedOptions']; + getDetectLocale(): boolean; + getExitProcess(): boolean; + getGroups(): Dictionary; + getHandlerFinishCommand(): FinishCommandHandler | null; + getOptions(): Options; + getParserConfiguration(): Configuration; + getStrict(): boolean; + getStrictCommands(): boolean; + getUsageInstance(): UsageInstance; + getValidationInstance(): ValidationInstance; + global(keys: string | string[], global?: boolean): YargsInstance; + group(keys: string | string[], groupName: string): YargsInstance; + help: YargsInstance['addHelpOpt']; + hide(key: string): YargsInstance; + implies: { + (key: string, implication: KeyOrPos | KeyOrPos[]): YargsInstance; + (keyImplications: Dictionary): YargsInstance; + }; + locale: { + (): string; + (locale: string): YargsInstance; + }; + middleware(callback: MiddlewareCallback | MiddlewareCallback[], applyBeforeValidation?: boolean): YargsInstance; + nargs: { + (keys: string | string[], nargs: number): YargsInstance; + (keyNargs: Dictionary): YargsInstance; + }; + normalize(keys: string | string[]): YargsInstance; + number(keys: string | string[]): YargsInstance; + onFinishCommand(f: FinishCommandHandler): YargsInstance; + option: { + (key: string, optionDefinition: OptionDefinition): YargsInstance; + (keyOptionDefinitions: Dictionary): YargsInstance; + }; + options: YargsInstance['option']; + parse: { + (): Arguments | Promise; + (args: string | string[], context: object, parseCallback?: ParseCallback): Arguments | Promise; + (args: string | string[], parseCallback: ParseCallback): Arguments | Promise; + (args: string | string[], shortCircuit: boolean): Arguments | Promise; + }; + parserConfiguration(config: Configuration): YargsInstance; + pkgConf(key: string, rootPath?: string): YargsInstance; + positional(key: string, positionalDefinition: PositionalDefinition): YargsInstance; + recommendCommands(recommend: boolean): YargsInstance; + require: YargsInstance['demand']; + required: YargsInstance['demand']; + requiresArg(keys: string | string[] | Dictionary): YargsInstance; + reset(aliases?: DetailedArguments['aliases']): YargsInstance; + resetOptions(aliases?: DetailedArguments['aliases']): YargsInstance; + scriptName(scriptName: string): YargsInstance; + showCompletionScript($0?: string, cmd?: string): YargsInstance; + showHelp(level: 'error' | 'log' | ((message: string) => void)): YargsInstance; + showHelpOnFail: { + (message?: string): YargsInstance; + (enabled: boolean, message: string): YargsInstance; + }; + showHidden: YargsInstance['addShowHiddenOpt']; + skipValidation(keys: string | string[]): YargsInstance; + strict(enable?: boolean): YargsInstance; + strictCommands(enable?: boolean): YargsInstance; + string(key: string | string[]): YargsInstance; + terminalWidth(): number | null; + updateStrings(obj: Dictionary): YargsInstance; + updateLocale: YargsInstance['updateStrings']; + usage: { + (msg: string | null): YargsInstance; + (msg: string, description: CommandHandler['description'], builder?: CommandBuilderDefinition | CommandBuilder, handler?: CommandHandlerCallback): YargsInstance; + }; + version: { + (ver?: string | false): YargsInstance; + (key?: string, ver?: string): YargsInstance; + (key?: string, msg?: string, ver?: string): YargsInstance; + }; + wrap(cols: number | null | undefined): YargsInstance; +} +export declare function isYargsInstance(y: YargsInstance | void): y is YargsInstance; +/** Yargs' context. */ +export interface Context { + commands: string[]; + files: string[]; + fullCommands: string[]; +} +declare type LoggerInstance = Pick; +export interface Options extends ParserOptions { + __: Y18N['__']; + alias: Dictionary; + array: string[]; + boolean: string[]; + choices: Dictionary; + config: Dictionary; + configObjects: Dictionary[]; + configuration: Configuration; + count: string[]; + defaultDescription: Dictionary; + demandedCommands: Dictionary<{ + min: number; + max: number; + minMsg?: string | null; + maxMsg?: string | null; + }>; + demandedOptions: Dictionary; + deprecatedOptions: Dictionary; + hiddenOptions: string[]; + /** Manually set keys */ + key: Dictionary; + local: string[]; + normalize: string[]; + number: string[]; + showHiddenOpt: string; + skipValidation: string[]; + string: string[]; +} +export interface Configuration extends Partial { + /** Should a config object be deep-merged with the object config it extends? */ + 'deep-merge-config'?: boolean; + /** Should commands be sorted in help? */ + 'sort-commands'?: boolean; +} +export interface OptionDefinition { + alias?: string | string[]; + array?: boolean; + boolean?: boolean; + choices?: string | string[]; + coerce?: CoerceCallback; + config?: boolean; + configParser?: ConfigCallback; + conflicts?: string | string[]; + count?: boolean; + default?: any; + defaultDescription?: string; + deprecate?: string | boolean; + deprecated?: OptionDefinition['deprecate']; + desc?: string; + describe?: OptionDefinition['desc']; + description?: OptionDefinition['desc']; + demand?: string | true; + demandOption?: OptionDefinition['demand']; + global?: boolean; + group?: string; + hidden?: boolean; + implies?: string | number | KeyOrPos[]; + nargs?: number; + normalize?: boolean; + number?: boolean; + require?: OptionDefinition['demand']; + required?: OptionDefinition['demand']; + requiresArg?: boolean; + skipValidation?: boolean; + string?: boolean; + type?: 'array' | 'boolean' | 'count' | 'number' | 'string'; +} +interface PositionalDefinition extends Pick { + type?: 'boolean' | 'number' | 'string'; +} +interface ParseCallback { + (err: YError | string | undefined | null, argv: Arguments | Promise, output: string): void; +} +export interface Arguments extends ParserArguments { + /** The script name or node command */ + $0: string; +} +export interface DetailedArguments extends ParserDetailedArguments { + argv: Arguments; +} +export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/yargs.js b/test-eol-project/node_modules/yargs/build/lib/yargs.js new file mode 100644 index 00000000..316f3d6e --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/yargs.js @@ -0,0 +1,1190 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isYargsInstance = exports.rebase = exports.Yargs = void 0; +const command_1 = require("./command"); +const common_types_1 = require("./common-types"); +const yerror_1 = require("./yerror"); +const usage_1 = require("./usage"); +const argsert_1 = require("./argsert"); +const fs = require("fs"); +const completion_1 = require("./completion"); +const path = require("path"); +const validation_1 = require("./validation"); +const obj_filter_1 = require("./obj-filter"); +const apply_extends_1 = require("./apply-extends"); +const middleware_1 = require("./middleware"); +const processArgv = require("./process-argv"); +const is_promise_1 = require("./is-promise"); +const Parser = require("yargs-parser"); +const y18nFactory = require("y18n"); +const setBlocking = require("set-blocking"); +const findUp = require("find-up"); +const requireMainFilename = require("require-main-filename"); +function Yargs(processArgs = [], cwd = process.cwd(), parentRequire = require) { + const self = {}; + let command; + let completion = null; + let groups = {}; + const globalMiddleware = []; + let output = ''; + const preservedGroups = {}; + let usage; + let validation; + let handlerFinishCommand = null; + const y18n = y18nFactory({ + directory: path.resolve(__dirname, '../../locales'), + updateFiles: false + }); + self.middleware = middleware_1.globalMiddlewareFactory(globalMiddleware, self); + self.scriptName = function (scriptName) { + self.customScriptName = true; + self.$0 = scriptName; + return self; + }; + // ignore the node bin, specify this in your + // bin file with #!/usr/bin/env node + let default$0; + if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) { + default$0 = process.argv.slice(1, 2); + } + else { + default$0 = process.argv.slice(0, 1); + } + self.$0 = default$0 + .map(x => { + const b = rebase(cwd, x); + return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; + }) + .join(' ').trim(); + if (process.env._ !== undefined && processArgv.getProcessArgvBin() === process.env._) { + self.$0 = process.env._.replace(`${path.dirname(process.execPath)}/`, ''); + } + // use context object to keep track of resets, subcommand execution, etc + // submodules should modify and check the state of context as necessary + const context = { resets: -1, commands: [], fullCommands: [], files: [] }; + self.getContext = () => context; + // puts yargs back into an initial state. any keys + // that have been set to "global" will not be reset + // by this action. + let options; + self.resetOptions = self.reset = function resetOptions(aliases = {}) { + context.resets++; + options = options || {}; + // put yargs back into an initial state, this + // logic is used to build a nested command + // hierarchy. + const tmpOptions = {}; + tmpOptions.local = options.local ? options.local : []; + tmpOptions.configObjects = options.configObjects ? options.configObjects : []; + // if a key has been explicitly set as local, + // we should reset it before passing options to command. + const localLookup = {}; + tmpOptions.local.forEach((l) => { + localLookup[l] = true; + (aliases[l] || []).forEach((a) => { + localLookup[a] = true; + }); + }); + // add all groups not set to local to preserved groups + Object.assign(preservedGroups, Object.keys(groups).reduce((acc, groupName) => { + const keys = groups[groupName].filter(key => !(key in localLookup)); + if (keys.length > 0) { + acc[groupName] = keys; + } + return acc; + }, {})); + // groups can now be reset + groups = {}; + const arrayOptions = [ + 'array', 'boolean', 'string', 'skipValidation', + 'count', 'normalize', 'number', + 'hiddenOptions' + ]; + const objectOptions = [ + 'narg', 'key', 'alias', 'default', 'defaultDescription', + 'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce', + 'deprecatedOptions' + ]; + arrayOptions.forEach(k => { + tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k]); + }); + objectOptions.forEach((k) => { + tmpOptions[k] = obj_filter_1.objFilter(options[k], k => !localLookup[k]); + }); + tmpOptions.envPrefix = options.envPrefix; + options = tmpOptions; + // if this is the first time being executed, create + // instances of all our helpers -- otherwise just reset. + usage = usage ? usage.reset(localLookup) : usage_1.usage(self, y18n); + validation = validation ? validation.reset(localLookup) : validation_1.validation(self, usage, y18n); + command = command ? command.reset() : command_1.command(self, usage, validation, globalMiddleware); + if (!completion) + completion = completion_1.completion(self, usage, command); + completionCommand = null; + output = ''; + exitError = null; + hasOutput = false; + self.parsed = false; + return self; + }; + self.resetOptions(); + // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) + const frozens = []; + function freeze() { + frozens.push({ + options, + configObjects: options.configObjects.slice(0), + exitProcess, + groups, + strict, + strictCommands, + completionCommand, + output, + exitError, + hasOutput, + parsed: self.parsed, + parseFn, + parseContext, + handlerFinishCommand + }); + usage.freeze(); + validation.freeze(); + command.freeze(); + } + function unfreeze() { + const frozen = frozens.pop(); + common_types_1.assertNotStrictEqual(frozen, undefined); + let configObjects; + ({ + options, + configObjects, + exitProcess, + groups, + output, + exitError, + hasOutput, + parsed: self.parsed, + strict, + strictCommands, + completionCommand, + parseFn, + parseContext, + handlerFinishCommand + } = frozen); + options.configObjects = configObjects; + usage.unfreeze(); + validation.unfreeze(); + command.unfreeze(); + } + self.boolean = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('boolean', keys); + return self; + }; + self.array = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('array', keys); + return self; + }; + self.number = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('number', keys); + return self; + }; + self.normalize = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('normalize', keys); + return self; + }; + self.count = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('count', keys); + return self; + }; + self.string = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('string', keys); + return self; + }; + self.requiresArg = function (keys) { + // the 2nd paramter [number] in the argsert the assertion is mandatory + // as populateParserHintSingleValueDictionary recursively calls requiresArg + // with Nan as a 2nd parameter, although we ignore it + argsert_1.argsert(' [number]', [keys], arguments.length); + // If someone configures nargs at the same time as requiresArg, + // nargs should take precedent, + // see: https://github.com/yargs/yargs/pull/1572 + // TODO: make this work with aliases, using a check similar to + // checkAllAliases() in yargs-parser. + if (typeof keys === 'string' && options.narg[keys]) { + return self; + } + else { + populateParserHintSingleValueDictionary(self.requiresArg, 'narg', keys, NaN); + } + return self; + }; + self.skipValidation = function (keys) { + argsert_1.argsert('', [keys], arguments.length); + populateParserHintArray('skipValidation', keys); + return self; + }; + function populateParserHintArray(type, keys) { + keys = [].concat(keys); + keys.forEach((key) => { + key = sanitizeKey(key); + options[type].push(key); + }); + } + self.nargs = function (key, value) { + argsert_1.argsert(' [number]', [key, value], arguments.length); + populateParserHintSingleValueDictionary(self.nargs, 'narg', key, value); + return self; + }; + self.choices = function (key, value) { + argsert_1.argsert(' [string|array]', [key, value], arguments.length); + populateParserHintArrayDictionary(self.choices, 'choices', key, value); + return self; + }; + self.alias = function (key, value) { + argsert_1.argsert(' [string|array]', [key, value], arguments.length); + populateParserHintArrayDictionary(self.alias, 'alias', key, value); + return self; + }; + // TODO: actually deprecate self.defaults. + self.default = self.defaults = function (key, value, defaultDescription) { + argsert_1.argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); + if (defaultDescription) { + common_types_1.assertSingleKey(key); + options.defaultDescription[key] = defaultDescription; + } + if (typeof value === 'function') { + common_types_1.assertSingleKey(key); + if (!options.defaultDescription[key]) + options.defaultDescription[key] = usage.functionDescription(value); + value = value.call(); + } + populateParserHintSingleValueDictionary(self.default, 'default', key, value); + return self; + }; + self.describe = function (key, desc) { + argsert_1.argsert(' [string]', [key, desc], arguments.length); + setKey(key, true); + usage.describe(key, desc); + return self; + }; + function setKey(key, set) { + populateParserHintSingleValueDictionary(setKey, 'key', key, set); + return self; + } + function demandOption(keys, msg) { + argsert_1.argsert(' [string]', [keys, msg], arguments.length); + populateParserHintSingleValueDictionary(self.demandOption, 'demandedOptions', keys, msg); + return self; + } + self.demandOption = demandOption; + self.coerce = function (keys, value) { + argsert_1.argsert(' [function]', [keys, value], arguments.length); + populateParserHintSingleValueDictionary(self.coerce, 'coerce', keys, value); + return self; + }; + function populateParserHintSingleValueDictionary(builder, type, key, value) { + populateParserHintDictionary(builder, type, key, value, (type, key, value) => { + options[type][key] = value; + }); + } + function populateParserHintArrayDictionary(builder, type, key, value) { + populateParserHintDictionary(builder, type, key, value, (type, key, value) => { + options[type][key] = (options[type][key] || []).concat(value); + }); + } + function populateParserHintDictionary(builder, type, key, value, singleKeyHandler) { + if (Array.isArray(key)) { + // an array of keys with one value ['x', 'y', 'z'], function parse () {} + key.forEach((k) => { + builder(k, value); + }); + } + else if (((key) => typeof key === 'object')(key)) { + // an object of key value pairs: {'x': parse () {}, 'y': parse() {}} + for (const k of common_types_1.objectKeys(key)) { + builder(k, key[k]); + } + } + else { + singleKeyHandler(type, sanitizeKey(key), value); + } + } + function sanitizeKey(key) { + if (key === '__proto__') + return '___proto___'; + return key; + } + function deleteFromParserHintObject(optionKey) { + // delete from all parsing hints: + // boolean, array, key, alias, etc. + common_types_1.objectKeys(options).forEach((hintKey) => { + // configObjects is not a parsing hint array + if (((key) => key === 'configObjects')(hintKey)) + return; + const hint = options[hintKey]; + if (Array.isArray(hint)) { + if (~hint.indexOf(optionKey)) + hint.splice(hint.indexOf(optionKey), 1); + } + else if (typeof hint === 'object') { + delete hint[optionKey]; + } + }); + // now delete the description from usage.js. + delete usage.getDescriptions()[optionKey]; + } + self.config = function config(key = 'config', msg, parseFn) { + argsert_1.argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); + // allow a config object to be provided directly. + if ((typeof key === 'object') && !Array.isArray(key)) { + key = apply_extends_1.applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config']); + options.configObjects = (options.configObjects || []).concat(key); + return self; + } + // allow for a custom parsing function. + if (typeof msg === 'function') { + parseFn = msg; + msg = undefined; + } + self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')); + (Array.isArray(key) ? key : [key]).forEach((k) => { + options.config[k] = parseFn || true; + }); + return self; + }; + self.example = function (cmd, description) { + argsert_1.argsert(' [string]', [cmd, description], arguments.length); + if (Array.isArray(cmd)) { + cmd.forEach((exampleParams) => self.example(...exampleParams)); + } + else { + usage.example(cmd, description); + } + return self; + }; + self.command = function (cmd, description, builder, handler, middlewares, deprecated) { + argsert_1.argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); + command.addHandler(cmd, description, builder, handler, middlewares, deprecated); + return self; + }; + self.commandDir = function (dir, opts) { + argsert_1.argsert(' [object]', [dir, opts], arguments.length); + const req = parentRequire || require; + command.addDirectory(dir, self.getContext(), req, require('get-caller-file')(), opts); + return self; + }; + // TODO: deprecate self.demand in favor of + // .demandCommand() .demandOption(). + self.demand = self.required = self.require = function demand(keys, max, msg) { + // you can optionally provide a 'max' key, + // which will raise an exception if too many '_' + // options are provided. + if (Array.isArray(max)) { + max.forEach((key) => { + common_types_1.assertNotStrictEqual(msg, true); + demandOption(key, msg); + }); + max = Infinity; + } + else if (typeof max !== 'number') { + msg = max; + max = Infinity; + } + if (typeof keys === 'number') { + common_types_1.assertNotStrictEqual(msg, true); + self.demandCommand(keys, max, msg, msg); + } + else if (Array.isArray(keys)) { + keys.forEach((key) => { + common_types_1.assertNotStrictEqual(msg, true); + demandOption(key, msg); + }); + } + else { + if (typeof msg === 'string') { + demandOption(keys, msg); + } + else if (msg === true || typeof msg === 'undefined') { + demandOption(keys); + } + } + return self; + }; + self.demandCommand = function demandCommand(min = 1, max, minMsg, maxMsg) { + argsert_1.argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); + if (typeof max !== 'number') { + minMsg = max; + max = Infinity; + } + self.global('_', false); + options.demandedCommands._ = { + min, + max, + minMsg, + maxMsg + }; + return self; + }; + self.getDemandedOptions = () => { + argsert_1.argsert([], 0); + return options.demandedOptions; + }; + self.getDemandedCommands = () => { + argsert_1.argsert([], 0); + return options.demandedCommands; + }; + self.deprecateOption = function deprecateOption(option, message) { + argsert_1.argsert(' [string|boolean]', [option, message], arguments.length); + options.deprecatedOptions[option] = message; + return self; + }; + self.getDeprecatedOptions = () => { + argsert_1.argsert([], 0); + return options.deprecatedOptions; + }; + self.implies = function (key, value) { + argsert_1.argsert(' [number|string|array]', [key, value], arguments.length); + validation.implies(key, value); + return self; + }; + self.conflicts = function (key1, key2) { + argsert_1.argsert(' [string|array]', [key1, key2], arguments.length); + validation.conflicts(key1, key2); + return self; + }; + self.usage = function (msg, description, builder, handler) { + argsert_1.argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); + if (description !== undefined) { + common_types_1.assertNotStrictEqual(msg, null); + // .usage() can be used as an alias for defining + // a default command. + if ((msg || '').match(/^\$0( |$)/)) { + return self.command(msg, description, builder, handler); + } + else { + throw new yerror_1.YError('.usage() description must start with $0 if being used as alias for .command()'); + } + } + else { + usage.usage(msg); + return self; + } + }; + self.epilogue = self.epilog = function (msg) { + argsert_1.argsert('', [msg], arguments.length); + usage.epilog(msg); + return self; + }; + self.fail = function (f) { + argsert_1.argsert('', [f], arguments.length); + usage.failFn(f); + return self; + }; + self.onFinishCommand = function (f) { + argsert_1.argsert('', [f], arguments.length); + handlerFinishCommand = f; + return self; + }; + self.getHandlerFinishCommand = () => handlerFinishCommand; + self.check = function (f, _global) { + argsert_1.argsert(' [boolean]', [f, _global], arguments.length); + validation.check(f, _global !== false); + return self; + }; + self.global = function global(globals, global) { + argsert_1.argsert(' [boolean]', [globals, global], arguments.length); + globals = [].concat(globals); + if (global !== false) { + options.local = options.local.filter(l => globals.indexOf(l) === -1); + } + else { + globals.forEach((g) => { + if (options.local.indexOf(g) === -1) + options.local.push(g); + }); + } + return self; + }; + self.pkgConf = function pkgConf(key, rootPath) { + argsert_1.argsert(' [string]', [key, rootPath], arguments.length); + let conf = null; + // prefer cwd to require-main-filename in this method + // since we're looking for e.g. "nyc" config in nyc consumer + // rather than "yargs" config in nyc (where nyc is the main filename) + const obj = pkgUp(rootPath || cwd); + // If an object exists in the key, add it to options.configObjects + if (obj[key] && typeof obj[key] === 'object') { + conf = apply_extends_1.applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config']); + options.configObjects = (options.configObjects || []).concat(conf); + } + return self; + }; + const pkgs = {}; + function pkgUp(rootPath) { + const npath = rootPath || '*'; + if (pkgs[npath]) + return pkgs[npath]; + let obj = {}; + try { + let startDir = rootPath || requireMainFilename(parentRequire); + // When called in an environment that lacks require.main.filename, such as a jest test runner, + // startDir is already process.cwd(), and should not be shortened. + // Whether or not it is _actually_ a directory (e.g., extensionless bin) is irrelevant, find-up handles it. + if (!rootPath && path.extname(startDir)) { + startDir = path.dirname(startDir); + } + const pkgJsonPath = findUp.sync('package.json', { + cwd: startDir + }); + common_types_1.assertNotStrictEqual(pkgJsonPath, undefined); + obj = JSON.parse(fs.readFileSync(pkgJsonPath).toString()); + } + catch (noop) { } + pkgs[npath] = obj || {}; + return pkgs[npath]; + } + let parseFn = null; + let parseContext = null; + self.parse = function parse(args, shortCircuit, _parseFn) { + argsert_1.argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); + freeze(); + if (typeof args === 'undefined') { + const argv = self._parseArgs(processArgs); + const tmpParsed = self.parsed; + unfreeze(); + // TODO: remove this compatibility hack when we release yargs@15.x: + self.parsed = tmpParsed; + return argv; + } + // a context object can optionally be provided, this allows + // additional information to be passed to a command handler. + if (typeof shortCircuit === 'object') { + parseContext = shortCircuit; + shortCircuit = _parseFn; + } + // by providing a function as a second argument to + // parse you can capture output that would otherwise + // default to printing to stdout/stderr. + if (typeof shortCircuit === 'function') { + parseFn = shortCircuit; + shortCircuit = false; + } + // completion short-circuits the parsing process, + // skipping validation, etc. + if (!shortCircuit) + processArgs = args; + if (parseFn) + exitProcess = false; + const parsed = self._parseArgs(args, !!shortCircuit); + completion.setParsed(self.parsed); + if (parseFn) + parseFn(exitError, parsed, output); + unfreeze(); + return parsed; + }; + self._getParseContext = () => parseContext || {}; + self._hasParseCallback = () => !!parseFn; + self.option = self.options = function option(key, opt) { + argsert_1.argsert(' [object]', [key, opt], arguments.length); + if (typeof key === 'object') { + Object.keys(key).forEach((k) => { + self.options(k, key[k]); + }); + } + else { + if (typeof opt !== 'object') { + opt = {}; + } + options.key[key] = true; // track manually set keys. + if (opt.alias) + self.alias(key, opt.alias); + const deprecate = opt.deprecate || opt.deprecated; + if (deprecate) { + self.deprecateOption(key, deprecate); + } + const demand = opt.demand || opt.required || opt.require; + // A required option can be specified via "demand: true". + if (demand) { + self.demand(key, demand); + } + if (opt.demandOption) { + self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); + } + if (opt.conflicts) { + self.conflicts(key, opt.conflicts); + } + if ('default' in opt) { + self.default(key, opt.default); + } + if (opt.implies !== undefined) { + self.implies(key, opt.implies); + } + if (opt.nargs !== undefined) { + self.nargs(key, opt.nargs); + } + if (opt.config) { + self.config(key, opt.configParser); + } + if (opt.normalize) { + self.normalize(key); + } + if (opt.choices) { + self.choices(key, opt.choices); + } + if (opt.coerce) { + self.coerce(key, opt.coerce); + } + if (opt.group) { + self.group(key, opt.group); + } + if (opt.boolean || opt.type === 'boolean') { + self.boolean(key); + if (opt.alias) + self.boolean(opt.alias); + } + if (opt.array || opt.type === 'array') { + self.array(key); + if (opt.alias) + self.array(opt.alias); + } + if (opt.number || opt.type === 'number') { + self.number(key); + if (opt.alias) + self.number(opt.alias); + } + if (opt.string || opt.type === 'string') { + self.string(key); + if (opt.alias) + self.string(opt.alias); + } + if (opt.count || opt.type === 'count') { + self.count(key); + } + if (typeof opt.global === 'boolean') { + self.global(key, opt.global); + } + if (opt.defaultDescription) { + options.defaultDescription[key] = opt.defaultDescription; + } + if (opt.skipValidation) { + self.skipValidation(key); + } + const desc = opt.describe || opt.description || opt.desc; + self.describe(key, desc); + if (opt.hidden) { + self.hide(key); + } + if (opt.requiresArg) { + self.requiresArg(key); + } + } + return self; + }; + self.getOptions = () => options; + self.positional = function (key, opts) { + argsert_1.argsert(' ', [key, opts], arguments.length); + if (context.resets === 0) { + throw new yerror_1.YError(".positional() can only be called in a command's builder function"); + } + // .positional() only supports a subset of the configuration + // options available to .option(). + const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize', + 'choices', 'conflicts', 'coerce', 'type', 'describe', + 'desc', 'description', 'alias']; + opts = obj_filter_1.objFilter(opts, (k, v) => { + let accept = supportedOpts.indexOf(k) !== -1; + // type can be one of string|number|boolean. + if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) + accept = false; + return accept; + }); + // copy over any settings that can be inferred from the command string. + const fullCommand = context.fullCommands[context.fullCommands.length - 1]; + const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : { + array: [], + alias: {}, + default: {}, + demand: {} + }; + common_types_1.objectKeys(parseOptions).forEach((pk) => { + const parseOption = parseOptions[pk]; + if (Array.isArray(parseOption)) { + if (parseOption.indexOf(key) !== -1) + opts[pk] = true; + } + else { + if (parseOption[key] && !(pk in opts)) + opts[pk] = parseOption[key]; + } + }); + self.group(key, usage.getPositionalGroupName()); + return self.option(key, opts); + }; + self.group = function group(opts, groupName) { + argsert_1.argsert(' ', [opts, groupName], arguments.length); + const existing = preservedGroups[groupName] || groups[groupName]; + if (preservedGroups[groupName]) { + // we now only need to track this group name in groups. + delete preservedGroups[groupName]; + } + const seen = {}; + groups[groupName] = (existing || []).concat(opts).filter((key) => { + if (seen[key]) + return false; + return (seen[key] = true); + }); + return self; + }; + // combine explicit and preserved groups. explicit groups should be first + self.getGroups = () => Object.assign({}, groups, preservedGroups); + // as long as options.envPrefix is not undefined, + // parser will apply env vars matching prefix to argv + self.env = function (prefix) { + argsert_1.argsert('[string|boolean]', [prefix], arguments.length); + if (prefix === false) + delete options.envPrefix; + else + options.envPrefix = prefix || ''; + return self; + }; + self.wrap = function (cols) { + argsert_1.argsert('', [cols], arguments.length); + usage.wrap(cols); + return self; + }; + let strict = false; + self.strict = function (enabled) { + argsert_1.argsert('[boolean]', [enabled], arguments.length); + strict = enabled !== false; + return self; + }; + self.getStrict = () => strict; + let strictCommands = false; + self.strictCommands = function (enabled) { + argsert_1.argsert('[boolean]', [enabled], arguments.length); + strictCommands = enabled !== false; + return self; + }; + self.getStrictCommands = () => strictCommands; + let parserConfig = {}; + self.parserConfiguration = function parserConfiguration(config) { + argsert_1.argsert('', [config], arguments.length); + parserConfig = config; + return self; + }; + self.getParserConfiguration = () => parserConfig; + self.showHelp = function (level) { + argsert_1.argsert('[string|function]', [level], arguments.length); + if (!self.parsed) + self._parseArgs(processArgs); // run parser, if it has not already been executed. + if (command.hasDefaultCommand()) { + context.resets++; // override the restriction on top-level positoinals. + command.runDefaultBuilderOn(self); + } + usage.showHelp(level); + return self; + }; + let versionOpt = null; + self.version = function version(opt, msg, ver) { + const defaultVersionOpt = 'version'; + argsert_1.argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); + // nuke the key previously configured + // to return version #. + if (versionOpt) { + deleteFromParserHintObject(versionOpt); + usage.version(undefined); + versionOpt = null; + } + if (arguments.length === 0) { + ver = guessVersion(); + opt = defaultVersionOpt; + } + else if (arguments.length === 1) { + if (opt === false) { // disable default 'version' key. + return self; + } + ver = opt; + opt = defaultVersionOpt; + } + else if (arguments.length === 2) { + ver = msg; + msg = undefined; + } + versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt; + msg = msg || usage.deferY18nLookup('Show version number'); + usage.version(ver || undefined); + self.boolean(versionOpt); + self.describe(versionOpt, msg); + return self; + }; + function guessVersion() { + const obj = pkgUp(); + return obj.version || 'unknown'; + } + let helpOpt = null; + self.addHelpOpt = self.help = function addHelpOpt(opt, msg) { + const defaultHelpOpt = 'help'; + argsert_1.argsert('[string|boolean] [string]', [opt, msg], arguments.length); + // nuke the key previously configured + // to return help. + if (helpOpt) { + deleteFromParserHintObject(helpOpt); + helpOpt = null; + } + if (arguments.length === 1) { + if (opt === false) + return self; + } + // use arguments, fallback to defaults for opt and msg + helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt; + self.boolean(helpOpt); + self.describe(helpOpt, msg || usage.deferY18nLookup('Show help')); + return self; + }; + const defaultShowHiddenOpt = 'show-hidden'; + options.showHiddenOpt = defaultShowHiddenOpt; + self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt(opt, msg) { + argsert_1.argsert('[string|boolean] [string]', [opt, msg], arguments.length); + if (arguments.length === 1) { + if (opt === false) + return self; + } + const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt; + self.boolean(showHiddenOpt); + self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options')); + options.showHiddenOpt = showHiddenOpt; + return self; + }; + self.hide = function hide(key) { + argsert_1.argsert('', [key], arguments.length); + options.hiddenOptions.push(key); + return self; + }; + self.showHelpOnFail = function showHelpOnFail(enabled, message) { + argsert_1.argsert('[boolean|string] [string]', [enabled, message], arguments.length); + usage.showHelpOnFail(enabled, message); + return self; + }; + var exitProcess = true; + self.exitProcess = function (enabled = true) { + argsert_1.argsert('[boolean]', [enabled], arguments.length); + exitProcess = enabled; + return self; + }; + self.getExitProcess = () => exitProcess; + var completionCommand = null; + self.completion = function (cmd, desc, fn) { + argsert_1.argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); + // a function to execute when generating + // completions can be provided as the second + // or third argument to completion. + if (typeof desc === 'function') { + fn = desc; + desc = undefined; + } + // register the completion command. + completionCommand = cmd || completionCommand || 'completion'; + if (!desc && desc !== false) { + desc = 'generate completion script'; + } + self.command(completionCommand, desc); + // a function can be provided + if (fn) + completion.registerFunction(fn); + return self; + }; + self.showCompletionScript = function ($0, cmd) { + argsert_1.argsert('[string] [string]', [$0, cmd], arguments.length); + $0 = $0 || self.$0; + _logger.log(completion.generateCompletionScript($0, cmd || completionCommand || 'completion')); + return self; + }; + self.getCompletion = function (args, done) { + argsert_1.argsert(' ', [args, done], arguments.length); + completion.getCompletion(args, done); + }; + self.locale = function (locale) { + argsert_1.argsert('[string]', [locale], arguments.length); + if (!locale) { + guessLocale(); + return y18n.getLocale(); + } + detectLocale = false; + y18n.setLocale(locale); + return self; + }; + self.updateStrings = self.updateLocale = function (obj) { + argsert_1.argsert('', [obj], arguments.length); + detectLocale = false; + y18n.updateLocale(obj); + return self; + }; + let detectLocale = true; + self.detectLocale = function (detect) { + argsert_1.argsert('', [detect], arguments.length); + detectLocale = detect; + return self; + }; + self.getDetectLocale = () => detectLocale; + var hasOutput = false; + var exitError = null; + // maybe exit, always capture + // context about why we wanted to exit. + self.exit = (code, err) => { + hasOutput = true; + exitError = err; + if (exitProcess) + process.exit(code); + }; + // we use a custom logger that buffers output, + // so that we can print to non-CLIs, e.g., chat-bots. + const _logger = { + log(...args) { + if (!self._hasParseCallback()) + console.log(...args); + hasOutput = true; + if (output.length) + output += '\n'; + output += args.join(' '); + }, + error(...args) { + if (!self._hasParseCallback()) + console.error(...args); + hasOutput = true; + if (output.length) + output += '\n'; + output += args.join(' '); + } + }; + self._getLoggerInstance = () => _logger; + // has yargs output an error our help + // message in the current execution context. + self._hasOutput = () => hasOutput; + self._setHasOutput = () => { + hasOutput = true; + }; + let recommendCommands; + self.recommendCommands = function (recommend = true) { + argsert_1.argsert('[boolean]', [recommend], arguments.length); + recommendCommands = recommend; + return self; + }; + self.getUsageInstance = () => usage; + self.getValidationInstance = () => validation; + self.getCommandInstance = () => command; + self.terminalWidth = () => { + argsert_1.argsert([], 0); + return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null; + }; + Object.defineProperty(self, 'argv', { + get: () => self._parseArgs(processArgs), + enumerable: true + }); + self._parseArgs = function parseArgs(args, shortCircuit, _calledFromCommand, commandIndex) { + let skipValidation = !!_calledFromCommand; + args = args || processArgs; + options.__ = y18n.__; + options.configuration = self.getParserConfiguration(); + const populateDoubleDash = !!options.configuration['populate--']; + const config = Object.assign({}, options.configuration, { + 'populate--': true + }); + const parsed = Parser.detailed(args, Object.assign({}, options, { + configuration: config + })); + let argv = parsed.argv; + if (parseContext) + argv = Object.assign({}, argv, parseContext); + const aliases = parsed.aliases; + argv.$0 = self.$0; + self.parsed = parsed; + try { + guessLocale(); // guess locale lazily, so that it can be turned off in chain. + // while building up the argv object, there + // are two passes through the parser. If completion + // is being performed short-circuit on the first pass. + if (shortCircuit) { + return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv); + } + // if there's a handler associated with a + // command defer processing to it. + if (helpOpt) { + // consider any multi-char helpOpt alias as a valid help command + // unless all helpOpt aliases are single-char + // note that parsed.aliases is a normalized bidirectional map :) + const helpCmds = [helpOpt] + .concat(aliases[helpOpt] || []) + .filter(k => k.length > 1); + // check if help should trigger and strip it from _. + if (~helpCmds.indexOf(argv._[argv._.length - 1])) { + argv._.pop(); + argv[helpOpt] = true; + } + } + const handlerKeys = command.getCommands(); + const requestCompletions = completion.completionKey in argv; + const skipRecommendation = argv[helpOpt] || requestCompletions; + const skipDefaultCommand = skipRecommendation && (handlerKeys.length > 1 || handlerKeys[0] !== '$0'); + if (argv._.length) { + if (handlerKeys.length) { + let firstUnknownCommand; + for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { + cmd = String(argv._[i]); + if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { + // commands are executed using a recursive algorithm that executes + // the deepest command first; we keep track of the position in the + // argv._ array that is currently being executed. + const innerArgv = command.runCommand(cmd, self, parsed, i + 1); + return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv); + } + else if (!firstUnknownCommand && cmd !== completionCommand) { + firstUnknownCommand = cmd; + break; + } + } + // run the default command, if defined + if (command.hasDefaultCommand() && !skipDefaultCommand) { + const innerArgv = command.runCommand(null, self, parsed); + return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv); + } + // recommend a command if recommendCommands() has + // been enabled, and no commands were found to execute + if (recommendCommands && firstUnknownCommand && !skipRecommendation) { + validation.recommendCommands(firstUnknownCommand, handlerKeys); + } + } + // generate a completion script for adding to ~/.bashrc. + if (completionCommand && ~argv._.indexOf(completionCommand) && !requestCompletions) { + if (exitProcess) + setBlocking(true); + self.showCompletionScript(); + self.exit(0); + } + } + else if (command.hasDefaultCommand() && !skipDefaultCommand) { + const innerArgv = command.runCommand(null, self, parsed); + return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv); + } + // we must run completions first, a user might + // want to complete the --help or --version option. + if (requestCompletions) { + if (exitProcess) + setBlocking(true); + // we allow for asynchronous completions, + // e.g., loading in a list of commands from an API. + args = [].concat(args); + const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1); + completion.getCompletion(completionArgs, (completions) => { + ; + (completions || []).forEach((completion) => { + _logger.log(completion); + }); + self.exit(0); + }); + return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv); + } + // Handle 'help' and 'version' options + // if we haven't already output help! + if (!hasOutput) { + Object.keys(argv).forEach((key) => { + if (key === helpOpt && argv[key]) { + if (exitProcess) + setBlocking(true); + skipValidation = true; + self.showHelp('log'); + self.exit(0); + } + else if (key === versionOpt && argv[key]) { + if (exitProcess) + setBlocking(true); + skipValidation = true; + usage.showVersion(); + self.exit(0); + } + }); + } + // Check if any of the options to skip validation were provided + if (!skipValidation && options.skipValidation.length > 0) { + skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true); + } + // If the help or version options where used and exitProcess is false, + // or if explicitly skipped, we won't run validations. + if (!skipValidation) { + if (parsed.error) + throw new yerror_1.YError(parsed.error.message); + // if we're executed via bash completion, don't + // bother with validation. + if (!requestCompletions) { + self._runValidation(argv, aliases, {}, parsed.error); + } + } + } + catch (err) { + if (err instanceof yerror_1.YError) + usage.fail(err.message, err); + else + throw err; + } + return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv); + }; + // to simplify the parsing of positionals in commands, + // we temporarily populate '--' rather than _, with arguments + // after the '--' directive. After the parse, we copy these back. + self._copyDoubleDash = function (argv) { + if (is_promise_1.isPromise(argv) || !argv._ || !argv['--']) + return argv; + argv._.push.apply(argv._, argv['--']); + // TODO(bcoe): refactor command parsing such that this delete is not + // necessary: https://github.com/yargs/yargs/issues/1482 + try { + delete argv['--']; + } + catch (_err) { } + return argv; + }; + self._runValidation = function runValidation(argv, aliases, positionalMap, parseErrors, isDefaultCommand = false) { + if (parseErrors) + throw new yerror_1.YError(parseErrors.message); + validation.nonOptionCount(argv); + validation.requiredArguments(argv); + let failedStrictCommands = false; + if (strictCommands) { + failedStrictCommands = validation.unknownCommands(argv); + } + if (strict && !failedStrictCommands) { + validation.unknownArguments(argv, aliases, positionalMap, isDefaultCommand); + } + validation.customChecks(argv, aliases); + validation.limitedChoices(argv); + validation.implications(argv); + validation.conflicting(argv); + }; + function guessLocale() { + if (!detectLocale) + return; + const locale = process.env.LC_ALL || process.env.LC_MESSAGES || process.env.LANG || process.env.LANGUAGE || 'en_US'; + self.locale(locale.replace(/[.:].*/, '')); + } + // an app should almost always have --version and --help, + // if you *really* want to disable this use .help(false)/.version(false). + self.help(); + self.version(); + return self; +} +exports.Yargs = Yargs; +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +function rebase(base, dir) { + return path.relative(base, dir); +} +exports.rebase = rebase; +function isYargsInstance(y) { + return !!y && (typeof y._parseArgs === 'function'); +} +exports.isYargsInstance = isYargsInstance; diff --git a/test-eol-project/node_modules/yargs/build/lib/yerror.d.ts b/test-eol-project/node_modules/yargs/build/lib/yerror.d.ts new file mode 100644 index 00000000..024d0c7a --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/yerror.d.ts @@ -0,0 +1,4 @@ +export declare class YError extends Error { + name: string; + constructor(msg?: string | null); +} diff --git a/test-eol-project/node_modules/yargs/build/lib/yerror.js b/test-eol-project/node_modules/yargs/build/lib/yerror.js new file mode 100644 index 00000000..0fa146e5 --- /dev/null +++ b/test-eol-project/node_modules/yargs/build/lib/yerror.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.YError = void 0; +class YError extends Error { + constructor(msg) { + super(msg || 'yargs error'); + this.name = 'YError'; + Error.captureStackTrace(this, YError); + } +} +exports.YError = YError; diff --git a/test-eol-project/node_modules/yargs/index.js b/test-eol-project/node_modules/yargs/index.js new file mode 100644 index 00000000..7dc62de9 --- /dev/null +++ b/test-eol-project/node_modules/yargs/index.js @@ -0,0 +1,40 @@ +'use strict' +// classic singleton yargs API, to use yargs +// without running as a singleton do: +// require('yargs/yargs')(process.argv.slice(2)) +const yargs = require('./yargs') +const processArgv = require('./build/lib/process-argv') + +Argv(processArgv.getProcessArgvWithoutBin()) + +module.exports = Argv + +function Argv (processArgs, cwd) { + const argv = yargs(processArgs, cwd, require) + singletonify(argv) + return argv +} + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('yargs')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('yargs').argv + to get a parsed version of process.argv. +*/ +function singletonify (inst) { + Object.keys(inst).forEach((key) => { + if (key === 'argv') { + Argv.__defineGetter__(key, inst.__lookupGetter__(key)) + } else if (typeof inst[key] === 'function') { + Argv[key] = inst[key].bind(inst) + } else { + Argv.__defineGetter__('$0', () => { + return inst.$0 + }) + Argv.__defineGetter__('parsed', () => { + return inst.parsed + }) + } + }) +} diff --git a/test-eol-project/node_modules/yargs/locales/be.json b/test-eol-project/node_modules/yargs/locales/be.json new file mode 100644 index 00000000..e28fa301 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/be.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Каманды:", + "Options:": "Опцыі:", + "Examples:": "Прыклады:", + "boolean": "булевы тып", + "count": "падлік", + "string": "радковы тып", + "number": "лік", + "array": "масіў", + "required": "неабходна", + "default": "па змаўчанні", + "default:": "па змаўчанні:", + "choices:": "магчымасці:", + "aliases:": "аліасы:", + "generated-value": "згенераванае значэнне", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", + "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", + "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s" + }, + "Missing argument value: %s": { + "one": "Не хапае значэння аргументу: %s", + "other": "Не хапае значэнняў аргументаў: %s" + }, + "Missing required argument: %s": { + "one": "Не хапае неабходнага аргументу: %s", + "other": "Не хапае неабходных аргументаў: %s" + }, + "Unknown argument: %s": { + "one": "Невядомы аргумент: %s", + "other": "Невядомыя аргументы: %s" + }, + "Invalid values:": "Несапраўдныя значэння:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", + "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", + "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", + "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", + "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", + "Path to JSON config file": "Шлях да файла канфігурацыі JSON", + "Show help": "Паказаць дапамогу", + "Show version number": "Паказаць нумар версіі", + "Did you mean %s?": "Вы мелі на ўвазе %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/de.json b/test-eol-project/node_modules/yargs/locales/de.json new file mode 100644 index 00000000..dc73ec3f --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/de.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Kommandos:", + "Options:": "Optionen:", + "Examples:": "Beispiele:", + "boolean": "boolean", + "count": "Zähler", + "string": "string", + "number": "Zahl", + "array": "array", + "required": "erforderlich", + "default": "Standard", + "default:": "Standard:", + "choices:": "Möglichkeiten:", + "aliases:": "Aliase:", + "generated-value": "Generierter-Wert", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", + "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", + "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt" + }, + "Missing argument value: %s": { + "one": "Fehlender Argumentwert: %s", + "other": "Fehlende Argumentwerte: %s" + }, + "Missing required argument: %s": { + "one": "Fehlendes Argument: %s", + "other": "Fehlende Argumente: %s" + }, + "Unknown argument: %s": { + "one": "Unbekanntes Argument: %s", + "other": "Unbekannte Argumente: %s" + }, + "Invalid values:": "Unzulässige Werte:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", + "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", + "Implications failed:": "Fehlende abhängige Argumente:", + "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", + "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", + "Path to JSON config file": "Pfad zur JSON-Config Datei", + "Show help": "Hilfe anzeigen", + "Show version number": "Version anzeigen", + "Did you mean %s?": "Meintest du %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/en.json b/test-eol-project/node_modules/yargs/locales/en.json new file mode 100644 index 00000000..d794947d --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/en.json @@ -0,0 +1,51 @@ +{ + "Commands:": "Commands:", + "Options:": "Options:", + "Examples:": "Examples:", + "boolean": "boolean", + "count": "count", + "string": "string", + "number": "number", + "array": "array", + "required": "required", + "default": "default", + "default:": "default:", + "choices:": "choices:", + "aliases:": "aliases:", + "generated-value": "generated-value", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Not enough non-option arguments: got %s, need at least %s", + "other": "Not enough non-option arguments: got %s, need at least %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Too many non-option arguments: got %s, maximum of %s", + "other": "Too many non-option arguments: got %s, maximum of %s" + }, + "Missing argument value: %s": { + "one": "Missing argument value: %s", + "other": "Missing argument values: %s" + }, + "Missing required argument: %s": { + "one": "Missing required argument: %s", + "other": "Missing required arguments: %s" + }, + "Unknown argument: %s": { + "one": "Unknown argument: %s", + "other": "Unknown arguments: %s" + }, + "Invalid values:": "Invalid values:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", + "Argument check failed: %s": "Argument check failed: %s", + "Implications failed:": "Missing dependent arguments:", + "Not enough arguments following: %s": "Not enough arguments following: %s", + "Invalid JSON config file: %s": "Invalid JSON config file: %s", + "Path to JSON config file": "Path to JSON config file", + "Show help": "Show help", + "Show version number": "Show version number", + "Did you mean %s?": "Did you mean %s?", + "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", + "Positionals:": "Positionals:", + "command": "command", + "deprecated": "deprecated", + "deprecated: %s": "deprecated: %s" +} diff --git a/test-eol-project/node_modules/yargs/locales/es.json b/test-eol-project/node_modules/yargs/locales/es.json new file mode 100644 index 00000000..d77b4616 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/es.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opciones:", + "Examples:": "Ejemplos:", + "boolean": "booleano", + "count": "cuenta", + "string": "cadena de caracteres", + "number": "número", + "array": "tabla", + "required": "requerido", + "default": "defecto", + "default:": "defecto:", + "choices:": "selección:", + "aliases:": "alias:", + "generated-value": "valor-generado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", + "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", + "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s" + }, + "Missing argument value: %s": { + "one": "Falta argumento: %s", + "other": "Faltan argumentos: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento requerido: %s", + "other": "Faltan argumentos requeridos: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconocido: %s", + "other": "Argumentos desconocidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", + "Argument check failed: %s": "Verificación de argumento ha fallado: %s", + "Implications failed:": "Implicaciones fallidas:", + "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", + "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", + "Path to JSON config file": "Ruta al archivo de configuración JSON", + "Show help": "Muestra ayuda", + "Show version number": "Muestra número de versión", + "Did you mean %s?": "Quisiste decir %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/fi.json b/test-eol-project/node_modules/yargs/locales/fi.json new file mode 100644 index 00000000..0728c578 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/fi.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Komennot:", + "Options:": "Valinnat:", + "Examples:": "Esimerkkejä:", + "boolean": "totuusarvo", + "count": "lukumäärä", + "string": "merkkijono", + "number": "numero", + "array": "taulukko", + "required": "pakollinen", + "default": "oletusarvo", + "default:": "oletusarvo:", + "choices:": "vaihtoehdot:", + "aliases:": "aliakset:", + "generated-value": "generoitu-arvo", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s", + "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s", + "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s" + }, + "Missing argument value: %s": { + "one": "Argumentin arvo puuttuu: %s", + "other": "Argumentin arvot puuttuvat: %s" + }, + "Missing required argument: %s": { + "one": "Pakollinen argumentti puuttuu: %s", + "other": "Pakollisia argumentteja puuttuu: %s" + }, + "Unknown argument: %s": { + "one": "Tuntematon argumenttn: %s", + "other": "Tuntemattomia argumentteja: %s" + }, + "Invalid values:": "Virheelliset arvot:", + "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s", + "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s", + "Implications failed:": "Riippuvia argumentteja puuttuu:", + "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s", + "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s", + "Path to JSON config file": "JSON-asetustiedoston polku", + "Show help": "Näytä ohje", + "Show version number": "Näytä versionumero", + "Did you mean %s?": "Tarkoititko %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat", + "Positionals:": "Sijaintiparametrit:", + "command": "komento" +} diff --git a/test-eol-project/node_modules/yargs/locales/fr.json b/test-eol-project/node_modules/yargs/locales/fr.json new file mode 100644 index 00000000..edd743f0 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/fr.json @@ -0,0 +1,53 @@ +{ + "Commands:": "Commandes :", + "Options:": "Options :", + "Examples:": "Exemples :", + "boolean": "booléen", + "count": "compteur", + "string": "chaîne de caractères", + "number": "nombre", + "array": "tableau", + "required": "requis", + "default": "défaut", + "default:": "défaut :", + "choices:": "choix :", + "aliases:": "alias :", + "generated-value": "valeur générée", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s", + "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s", + "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s" + }, + "Missing argument value: %s": { + "one": "Argument manquant : %s", + "other": "Arguments manquants : %s" + }, + "Missing required argument: %s": { + "one": "Argument requis manquant : %s", + "other": "Arguments requis manquants : %s" + }, + "Unknown argument: %s": { + "one": "Argument inconnu : %s", + "other": "Arguments inconnus : %s" + }, + "Unknown command: %s": { + "one": "Commande inconnue : %s", + "other": "Commandes inconnues : %s" + }, + "Invalid values:": "Valeurs invalides :", + "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s", + "Argument check failed: %s": "Echec de la vérification de l'argument : %s", + "Implications failed:": "Arguments dépendants manquants :", + "Not enough arguments following: %s": "Pas assez d'arguments après : %s", + "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s", + "Path to JSON config file": "Chemin du fichier de configuration JSON", + "Show help": "Affiche l'aide", + "Show version number": "Affiche le numéro de version", + "Did you mean %s?": "Vouliez-vous dire %s ?", + "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs", + "Positionals:": "Arguments positionnels :", + "command": "commande" +} diff --git a/test-eol-project/node_modules/yargs/locales/hi.json b/test-eol-project/node_modules/yargs/locales/hi.json new file mode 100644 index 00000000..a9de77cc --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/hi.json @@ -0,0 +1,49 @@ +{ + "Commands:": "आदेश:", + "Options:": "विकल्प:", + "Examples:": "उदाहरण:", + "boolean": "सत्यता", + "count": "संख्या", + "string": "वर्णों का तार ", + "number": "अंक", + "array": "सरणी", + "required": "आवश्यक", + "default": "डिफॉल्ट", + "default:": "डिफॉल्ट:", + "choices:": "विकल्प:", + "aliases:": "उपनाम:", + "generated-value": "उत्पन्न-मूल्य", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", + "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", + "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य" + }, + "Missing argument value: %s": { + "one": "कुछ तर्को के मूल्य गुम हैं: %s", + "other": "कुछ तर्को के मूल्य गुम हैं: %s" + }, + "Missing required argument: %s": { + "one": "आवश्यक तर्क गुम हैं: %s", + "other": "आवश्यक तर्क गुम हैं: %s" + }, + "Unknown argument: %s": { + "one": "अज्ञात तर्क प्राप्त: %s", + "other": "अज्ञात तर्क प्राप्त: %s" + }, + "Invalid values:": "अमान्य मूल्य:", + "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", + "Argument check failed: %s": "तर्क जांच विफल: %s", + "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", + "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", + "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", + "Path to JSON config file": "JSON config फाइल का पथ", + "Show help": "सहायता दिखाएँ", + "Show version number": "Version संख्या दिखाएँ", + "Did you mean %s?": "क्या आपका मतलब है %s?", + "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", + "Positionals:": "स्थानीय:", + "command": "आदेश" +} diff --git a/test-eol-project/node_modules/yargs/locales/hu.json b/test-eol-project/node_modules/yargs/locales/hu.json new file mode 100644 index 00000000..21492d05 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/hu.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Parancsok:", + "Options:": "Opciók:", + "Examples:": "Példák:", + "boolean": "boolean", + "count": "számláló", + "string": "szöveg", + "number": "szám", + "array": "tömb", + "required": "kötelező", + "default": "alapértelmezett", + "default:": "alapértelmezett:", + "choices:": "lehetőségek:", + "aliases:": "aliaszok:", + "generated-value": "generált-érték", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", + "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", + "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet" + }, + "Missing argument value: %s": { + "one": "Hiányzó argumentum érték: %s", + "other": "Hiányzó argumentum értékek: %s" + }, + "Missing required argument: %s": { + "one": "Hiányzó kötelező argumentum: %s", + "other": "Hiányzó kötelező argumentumok: %s" + }, + "Unknown argument: %s": { + "one": "Ismeretlen argumentum: %s", + "other": "Ismeretlen argumentumok: %s" + }, + "Invalid values:": "Érvénytelen érték:", + "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", + "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", + "Implications failed:": "Implikációk sikertelenek:", + "Not enough arguments following: %s": "Nem elég argumentum követi: %s", + "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", + "Path to JSON config file": "JSON konfigurációs file helye", + "Show help": "Súgo megjelenítése", + "Show version number": "Verziószám megjelenítése", + "Did you mean %s?": "Erre gondoltál %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/id.json b/test-eol-project/node_modules/yargs/locales/id.json new file mode 100644 index 00000000..125867cb --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/id.json @@ -0,0 +1,50 @@ + +{ + "Commands:": "Perintah:", + "Options:": "Pilihan:", + "Examples:": "Contoh:", + "boolean": "boolean", + "count": "jumlah", + "number": "nomor", + "string": "string", + "array": "larik", + "required": "diperlukan", + "default": "bawaan", + "default:": "bawaan:", + "aliases:": "istilah lain:", + "choices:": "pilihan:", + "generated-value": "nilai-yang-dihasilkan", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumen wajib kurang: hanya %s, minimal %s", + "other": "Argumen wajib kurang: hanya %s, minimal %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s", + "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s" + }, + "Missing argument value: %s": { + "one": "Kurang argumen: %s", + "other": "Kurang argumen: %s" + }, + "Missing required argument: %s": { + "one": "Kurang argumen wajib: %s", + "other": "Kurang argumen wajib: %s" + }, + "Unknown argument: %s": { + "one": "Argumen tak diketahui: %s", + "other": "Argumen tak diketahui: %s" + }, + "Invalid values:": "Nilai-nilai tidak valid:", + "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", + "Argument check failed: %s": "Pemeriksaan argument gagal: %s", + "Implications failed:": "Implikasi gagal:", + "Not enough arguments following: %s": "Kurang argumen untuk: %s", + "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", + "Path to JSON config file": "Alamat berkas konfigurasi JSON", + "Show help": "Lihat bantuan", + "Show version number": "Lihat nomor versi", + "Did you mean %s?": "Maksud Anda: %s?", + "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", + "Positionals:": "Posisional-posisional:", + "command": "perintah" +} diff --git a/test-eol-project/node_modules/yargs/locales/it.json b/test-eol-project/node_modules/yargs/locales/it.json new file mode 100644 index 00000000..fde57561 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/it.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Comandi:", + "Options:": "Opzioni:", + "Examples:": "Esempi:", + "boolean": "booleano", + "count": "contatore", + "string": "stringa", + "number": "numero", + "array": "vettore", + "required": "richiesto", + "default": "predefinito", + "default:": "predefinito:", + "choices:": "scelte:", + "aliases:": "alias:", + "generated-value": "valore generato", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", + "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", + "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s" + }, + "Missing argument value: %s": { + "one": "Argomento mancante: %s", + "other": "Argomenti mancanti: %s" + }, + "Missing required argument: %s": { + "one": "Argomento richiesto mancante: %s", + "other": "Argomenti richiesti mancanti: %s" + }, + "Unknown argument: %s": { + "one": "Argomento sconosciuto: %s", + "other": "Argomenti sconosciuti: %s" + }, + "Invalid values:": "Valori non validi:", + "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", + "Argument check failed: %s": "Controllo dell'argomento fallito: %s", + "Implications failed:": "Argomenti dipendenti mancanti:", + "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", + "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", + "Path to JSON config file": "Percorso del file di configurazione JSON", + "Show help": "Mostra la schermata di aiuto", + "Show version number": "Mostra il numero di versione", + "Did you mean %s?": "Intendi forse %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/ja.json b/test-eol-project/node_modules/yargs/locales/ja.json new file mode 100644 index 00000000..3954ae68 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/ja.json @@ -0,0 +1,51 @@ +{ + "Commands:": "コマンド:", + "Options:": "オプション:", + "Examples:": "例:", + "boolean": "真偽", + "count": "カウント", + "string": "文字列", + "number": "数値", + "array": "配列", + "required": "必須", + "default": "デフォルト", + "default:": "デフォルト:", + "choices:": "選択してください:", + "aliases:": "エイリアス:", + "generated-value": "生成された値", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", + "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", + "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:" + }, + "Missing argument value: %s": { + "one": "引数の値が見つかりません: %s", + "other": "引数の値が見つかりません: %s" + }, + "Missing required argument: %s": { + "one": "必須の引数が見つかりません: %s", + "other": "必須の引数が見つかりません: %s" + }, + "Unknown argument: %s": { + "one": "未知の引数です: %s", + "other": "未知の引数です: %s" + }, + "Invalid values:": "不正な値です:", + "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s", + "Argument check failed: %s": "引数のチェックに失敗しました: %s", + "Implications failed:": "オプションの組み合わせで不正が生じました:", + "Not enough arguments following: %s": "次の引数が不足しています。: %s", + "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", + "Path to JSON config file": "JSONの設定ファイルまでのpath", + "Show help": "ヘルプを表示", + "Show version number": "バージョンを表示", + "Did you mean %s?": "もしかして %s?", + "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", + "Positionals:": "位置:", + "command": "コマンド", + "deprecated": "非推奨", + "deprecated: %s": "非推奨: %s" +} diff --git a/test-eol-project/node_modules/yargs/locales/ko.json b/test-eol-project/node_modules/yargs/locales/ko.json new file mode 100644 index 00000000..e3187eaf --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/ko.json @@ -0,0 +1,49 @@ +{ + "Commands:": "명령:", + "Options:": "옵션:", + "Examples:": "예시:", + "boolean": "여부", + "count": "개수", + "string": "문자열", + "number": "숫자", + "array": "배열", + "required": "필수", + "default": "기본", + "default:": "기본:", + "choices:": "선택:", + "aliases:": "별칭:", + "generated-value": "생성된 값", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", + "other": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", + "other": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다" + }, + "Missing argument value: %s": { + "one": "인자값을 받지 못했습니다: %s", + "other": "인자값들을 받지 못했습니다: %s" + }, + "Missing required argument: %s": { + "one": "필수 인자를 받지 못했습니다: %s", + "other": "필수 인자들을 받지 못했습니다: %s" + }, + "Unknown argument: %s": { + "one": "알 수 없는 인자입니다: %s", + "other": "알 수 없는 인자들입니다: %s" + }, + "Invalid values:": "잘못된 값입니다:", + "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", + "Argument check failed: %s": "유효하지 않은 인자입니다: %s", + "Implications failed:": "옵션의 조합이 잘못되었습니다:", + "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", + "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", + "Path to JSON config file": "JSON 설정파일 경로", + "Show help": "도움말을 보여줍니다", + "Show version number": "버전 넘버를 보여줍니다", + "Did you mean %s?": "찾고계신게 %s입니까?", + "Arguments %s and %s are mutually exclusive" : "%s와 %s 인자는 같이 사용될 수 없습니다", + "Positionals:": "위치:", + "command": "명령" +} diff --git a/test-eol-project/node_modules/yargs/locales/nb.json b/test-eol-project/node_modules/yargs/locales/nb.json new file mode 100644 index 00000000..6f410ed0 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/nb.json @@ -0,0 +1,44 @@ +{ + "Commands:": "Kommandoer:", + "Options:": "Alternativer:", + "Examples:": "Eksempler:", + "boolean": "boolsk", + "count": "antall", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default": "standard", + "default:": "standard:", + "choices:": "valg:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", + "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", + "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Mangler argument verdi: %s", + "other": "Mangler argument verdier: %s" + }, + "Missing required argument: %s": { + "one": "Mangler obligatorisk argument: %s", + "other": "Mangler obligatoriske argumenter: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjente argumenter: %s" + }, + "Invalid values:": "Ugyldige verdier:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", + "Argument check failed: %s": "Argumentsjekk mislyktes: %s", + "Implications failed:": "Konsekvensene mislyktes:", + "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/test-eol-project/node_modules/yargs/locales/nl.json b/test-eol-project/node_modules/yargs/locales/nl.json new file mode 100644 index 00000000..9ff95c55 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/nl.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Commando's:", + "Options:": "Opties:", + "Examples:": "Voorbeelden:", + "boolean": "booleaans", + "count": "aantal", + "string": "string", + "number": "getal", + "array": "lijst", + "required": "verplicht", + "default": "standaard", + "default:": "standaard:", + "choices:": "keuzes:", + "aliases:": "aliassen:", + "generated-value": "gegenereerde waarde", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", + "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", + "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s" + }, + "Missing argument value: %s": { + "one": "Missende argumentwaarde: %s", + "other": "Missende argumentwaarden: %s" + }, + "Missing required argument: %s": { + "one": "Missend verplicht argument: %s", + "other": "Missende verplichte argumenten: %s" + }, + "Unknown argument: %s": { + "one": "Onbekend argument: %s", + "other": "Onbekende argumenten: %s" + }, + "Invalid values:": "Ongeldige waarden:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", + "Argument check failed: %s": "Argumentcontrole mislukt: %s", + "Implications failed:": "Ontbrekende afhankelijke argumenten:", + "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", + "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", + "Path to JSON config file": "Pad naar JSON-config-bestand", + "Show help": "Toon help", + "Show version number": "Toon versienummer", + "Did you mean %s?": "Bedoelde u misschien %s?", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", + "Positionals:": "Positie-afhankelijke argumenten", + "command": "commando" +} diff --git a/test-eol-project/node_modules/yargs/locales/nn.json b/test-eol-project/node_modules/yargs/locales/nn.json new file mode 100644 index 00000000..24479ac9 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/nn.json @@ -0,0 +1,44 @@ +{ + "Commands:": "Kommandoar:", + "Options:": "Alternativ:", + "Examples:": "Døme:", + "boolean": "boolsk", + "count": "mengd", + "string": "streng", + "number": "nummer", + "array": "matrise", + "required": "obligatorisk", + "default": "standard", + "default:": "standard:", + "choices:": "val:", + "generated-value": "generert-verdi", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", + "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s", + "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s" + }, + "Missing argument value: %s": { + "one": "Manglar argumentverdi: %s", + "other": "Manglar argumentverdiar: %s" + }, + "Missing required argument: %s": { + "one": "Manglar obligatorisk argument: %s", + "other": "Manglar obligatoriske argument: %s" + }, + "Unknown argument: %s": { + "one": "Ukjent argument: %s", + "other": "Ukjende argument: %s" + }, + "Invalid values:": "Ugyldige verdiar:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", + "Argument check failed: %s": "Argumentsjekk mislukkast: %s", + "Implications failed:": "Konsekvensane mislukkast:", + "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", + "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", + "Path to JSON config file": "Bane til JSON konfigurasjonsfil", + "Show help": "Vis hjelp", + "Show version number": "Vis versjonsnummer" +} diff --git a/test-eol-project/node_modules/yargs/locales/pirate.json b/test-eol-project/node_modules/yargs/locales/pirate.json new file mode 100644 index 00000000..dcb5cb75 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/pirate.json @@ -0,0 +1,13 @@ +{ + "Commands:": "Choose yer command:", + "Options:": "Options for me hearties!", + "Examples:": "Ex. marks the spot:", + "required": "requi-yar-ed", + "Missing required argument: %s": { + "one": "Ye be havin' to set the followin' argument land lubber: %s", + "other": "Ye be havin' to set the followin' arguments land lubber: %s" + }, + "Show help": "Parlay this here code of conduct", + "Show version number": "'Tis the version ye be askin' fer", + "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" +} diff --git a/test-eol-project/node_modules/yargs/locales/pl.json b/test-eol-project/node_modules/yargs/locales/pl.json new file mode 100644 index 00000000..a41d4bd5 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/pl.json @@ -0,0 +1,49 @@ +{ + "Commands:": "Polecenia:", + "Options:": "Opcje:", + "Examples:": "Przykłady:", + "boolean": "boolean", + "count": "ilość", + "string": "ciąg znaków", + "number": "liczba", + "array": "tablica", + "required": "wymagany", + "default": "domyślny", + "default:": "domyślny:", + "choices:": "dostępne:", + "aliases:": "aliasy:", + "generated-value": "wygenerowana-wartość", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", + "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", + "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s" + }, + "Missing argument value: %s": { + "one": "Brak wartości dla argumentu: %s", + "other": "Brak wartości dla argumentów: %s" + }, + "Missing required argument: %s": { + "one": "Brak wymaganego argumentu: %s", + "other": "Brak wymaganych argumentów: %s" + }, + "Unknown argument: %s": { + "one": "Nieznany argument: %s", + "other": "Nieznane argumenty: %s" + }, + "Invalid values:": "Nieprawidłowe wartości:", + "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", + "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", + "Implications failed:": "Założenia nie zostały spełnione:", + "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", + "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", + "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", + "Show help": "Pokaż pomoc", + "Show version number": "Pokaż numer wersji", + "Did you mean %s?": "Czy chodziło Ci o %s?", + "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", + "Positionals:": "Pozycyjne:", + "command": "polecenie" +} diff --git a/test-eol-project/node_modules/yargs/locales/pt.json b/test-eol-project/node_modules/yargs/locales/pt.json new file mode 100644 index 00000000..0c8ac99c --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/pt.json @@ -0,0 +1,45 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "boolean", + "count": "contagem", + "string": "cadeia de caracteres", + "number": "número", + "array": "arranjo", + "required": "requerido", + "default": "padrão", + "default:": "padrão:", + "choices:": "escolhas:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", + "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", + "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s" + }, + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", + "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", + "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", + "Show help": "Mostra ajuda", + "Show version number": "Mostra número de versão", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" +} diff --git a/test-eol-project/node_modules/yargs/locales/pt_BR.json b/test-eol-project/node_modules/yargs/locales/pt_BR.json new file mode 100644 index 00000000..eae1ec60 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/pt_BR.json @@ -0,0 +1,48 @@ +{ + "Commands:": "Comandos:", + "Options:": "Opções:", + "Examples:": "Exemplos:", + "boolean": "booleano", + "count": "contagem", + "string": "string", + "number": "número", + "array": "array", + "required": "obrigatório", + "default:": "padrão:", + "choices:": "opções:", + "aliases:": "sinônimos:", + "generated-value": "valor-gerado", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", + "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Excesso de argumentos: recebido %s, máximo de %s", + "other": "Excesso de argumentos: recebido %s, máximo de %s" + }, + "Missing argument value: %s": { + "one": "Falta valor de argumento: %s", + "other": "Falta valores de argumento: %s" + }, + "Missing required argument: %s": { + "one": "Falta argumento obrigatório: %s", + "other": "Faltando argumentos obrigatórios: %s" + }, + "Unknown argument: %s": { + "one": "Argumento desconhecido: %s", + "other": "Argumentos desconhecidos: %s" + }, + "Invalid values:": "Valores inválidos:", + "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", + "Argument check failed: %s": "Verificação de argumento falhou: %s", + "Implications failed:": "Implicações falharam:", + "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", + "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", + "Path to JSON config file": "Caminho para o arquivo JSON de configuração", + "Show help": "Exibe ajuda", + "Show version number": "Exibe a versão", + "Did you mean %s?": "Você quis dizer %s?", + "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", + "Positionals:": "Posicionais:", + "command": "comando" +} diff --git a/test-eol-project/node_modules/yargs/locales/ru.json b/test-eol-project/node_modules/yargs/locales/ru.json new file mode 100644 index 00000000..5f7f7681 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/ru.json @@ -0,0 +1,46 @@ +{ + "Commands:": "Команды:", + "Options:": "Опции:", + "Examples:": "Примеры:", + "boolean": "булевый тип", + "count": "подсчет", + "string": "строковой тип", + "number": "число", + "array": "массив", + "required": "необходимо", + "default": "по умолчанию", + "default:": "по умолчанию:", + "choices:": "возможности:", + "aliases:": "алиасы:", + "generated-value": "генерированное значение", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", + "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", + "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s" + }, + "Missing argument value: %s": { + "one": "Не хватает значения аргумента: %s", + "other": "Не хватает значений аргументов: %s" + }, + "Missing required argument: %s": { + "one": "Не хватает необходимого аргумента: %s", + "other": "Не хватает необходимых аргументов: %s" + }, + "Unknown argument: %s": { + "one": "Неизвестный аргумент: %s", + "other": "Неизвестные аргументы: %s" + }, + "Invalid values:": "Недействительные значения:", + "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", + "Argument check failed: %s": "Проверка аргументов не удалась: %s", + "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", + "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", + "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", + "Path to JSON config file": "Путь к файлу конфигурации JSON", + "Show help": "Показать помощь", + "Show version number": "Показать номер версии", + "Did you mean %s?": "Вы имели в виду %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/th.json b/test-eol-project/node_modules/yargs/locales/th.json new file mode 100644 index 00000000..33b048e2 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/th.json @@ -0,0 +1,46 @@ +{ + "Commands:": "คอมมาน", + "Options:": "ออฟชั่น", + "Examples:": "ตัวอย่าง", + "boolean": "บูลีน", + "count": "นับ", + "string": "สตริง", + "number": "ตัวเลข", + "array": "อาเรย์", + "required": "จำเป็น", + "default": "ค่าเริ่มต้", + "default:": "ค่าเริ่มต้น", + "choices:": "ตัวเลือก", + "aliases:": "เอเลียส", + "generated-value": "ค่าที่ถูกสร้างขึ้น", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", + "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", + "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า" + }, + "Missing argument value: %s": { + "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", + "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" + }, + "Missing required argument: %s": { + "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", + "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" + }, + "Unknown argument: %s": { + "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", + "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" + }, + "Invalid values:": "ค่าไม่ถูกต้อง:", + "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", + "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", + "Implications failed:": "Implications ไม่สำเร็จ:", + "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", + "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", + "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", + "Show help": "ขอความช่วยเหลือ", + "Show version number": "แสดงตัวเลขเวอร์ชั่น", + "Did you mean %s?": "คุณหมายถึง %s?" +} diff --git a/test-eol-project/node_modules/yargs/locales/tr.json b/test-eol-project/node_modules/yargs/locales/tr.json new file mode 100644 index 00000000..0d0d2ccd --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/tr.json @@ -0,0 +1,48 @@ +{ + "Commands:": "Komutlar:", + "Options:": "Seçenekler:", + "Examples:": "Örnekler:", + "boolean": "boolean", + "count": "sayı", + "string": "string", + "number": "numara", + "array": "array", + "required": "zorunlu", + "default": "varsayılan", + "default:": "varsayılan:", + "choices:": "seçimler:", + "aliases:": "takma adlar:", + "generated-value": "oluşturulan-değer", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", + "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", + "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s" + }, + "Missing argument value: %s": { + "one": "Eksik argüman değeri: %s", + "other": "Eksik argüman değerleri: %s" + }, + "Missing required argument: %s": { + "one": "Eksik zorunlu argüman: %s", + "other": "Eksik zorunlu argümanlar: %s" + }, + "Unknown argument: %s": { + "one": "Bilinmeyen argüman: %s", + "other": "Bilinmeyen argümanlar: %s" + }, + "Invalid values:": "Geçersiz değerler:", + "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", + "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", + "Implications failed:": "Sonuçlar başarısız oldu:", + "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", + "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", + "Path to JSON config file": "JSON yapılandırma dosya konumu", + "Show help": "Yardım detaylarını göster", + "Show version number": "Versiyon detaylarını göster", + "Did you mean %s?": "Bunu mu demek istediniz: %s?", + "Positionals:": "Sıralılar:", + "command": "komut" +} diff --git a/test-eol-project/node_modules/yargs/locales/zh_CN.json b/test-eol-project/node_modules/yargs/locales/zh_CN.json new file mode 100644 index 00000000..257d26ba --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/zh_CN.json @@ -0,0 +1,48 @@ +{ + "Commands:": "命令:", + "Options:": "选项:", + "Examples:": "示例:", + "boolean": "布尔", + "count": "计数", + "string": "字符串", + "number": "数字", + "array": "数组", + "required": "必需", + "default": "默认值", + "default:": "默认值:", + "choices:": "可选值:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", + "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", + "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个" + }, + "Missing argument value: %s": { + "one": "没有给此选项指定值:%s", + "other": "没有给这些选项指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必须的选项:%s", + "other": "缺少这些必须的选项:%s" + }, + "Unknown argument: %s": { + "one": "无法识别的选项:%s", + "other": "无法识别这些选项:%s" + }, + "Invalid values:": "无效的选项值:", + "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", + "Argument check failed: %s": "选项值验证失败:%s", + "Implications failed:": "缺少依赖的选项:", + "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", + "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", + "Path to JSON config file": "JSON 配置文件的路径", + "Show help": "显示帮助信息", + "Show version number": "显示版本号", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", + "Positionals:": "位置:", + "command": "命令" +} diff --git a/test-eol-project/node_modules/yargs/locales/zh_TW.json b/test-eol-project/node_modules/yargs/locales/zh_TW.json new file mode 100644 index 00000000..e3c7bcf4 --- /dev/null +++ b/test-eol-project/node_modules/yargs/locales/zh_TW.json @@ -0,0 +1,47 @@ +{ + "Commands:": "命令:", + "Options:": "選項:", + "Examples:": "例:", + "boolean": "布林", + "count": "次數", + "string": "字串", + "number": "數字", + "array": "陣列", + "required": "必須", + "default": "預設值", + "default:": "預設值:", + "choices:": "可選值:", + "aliases:": "別名:", + "generated-value": "生成的值", + "Not enough non-option arguments: got %s, need at least %s": { + "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", + "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個" + }, + "Too many non-option arguments: got %s, maximum of %s": { + "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", + "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個" + }, + "Missing argument value: %s": { + "one": "此引數無指定值:%s", + "other": "這些引數無指定值:%s" + }, + "Missing required argument: %s": { + "one": "缺少必須的引數:%s", + "other": "缺少這些必須的引數:%s" + }, + "Unknown argument: %s": { + "one": "未知的引數:%s", + "other": "未知的這些引數:%s" + }, + "Invalid values:": "無效的選項值:", + "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", + "Argument check failed: %s": "引數驗證失敗:%s", + "Implications failed:": "缺少依賴的選項:", + "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", + "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", + "Path to JSON config file": "JSON 設置文件的路徑", + "Show help": "顯示說明", + "Show version number": "顯示版本", + "Did you mean %s?": "是指 %s?", + "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 是互斥的" +} diff --git a/test-eol-project/node_modules/yargs/package.json b/test-eol-project/node_modules/yargs/package.json new file mode 100644 index 00000000..dc3018ae --- /dev/null +++ b/test-eol-project/node_modules/yargs/package.json @@ -0,0 +1,92 @@ +{ + "name": "yargs", + "version": "15.4.1", + "description": "yargs the modern, pirate-themed, successor to optimist.", + "main": "./index.js", + "contributors": [ + { + "name": "Yargs Contributors", + "url": "https://github.com/yargs/yargs/graphs/contributors" + } + ], + "files": [ + "index.js", + "yargs.js", + "build", + "locales", + "LICENSE" + ], + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/decamelize": "^1.2.0", + "@types/mocha": "^7.0.2", + "@types/node": "^10.0.3", + "@typescript-eslint/eslint-plugin": "^3.0.0", + "@typescript-eslint/parser": "^3.0.0", + "c8": "^7.0.0", + "chai": "^4.2.0", + "chalk": "^4.0.0", + "coveralls": "^3.0.9", + "cpr": "^3.0.1", + "cross-spawn": "^7.0.0", + "es6-promise": "^4.2.5", + "eslint": "^6.8.0", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-node": "^11.0.0", + "gts": "^2.0.0-alpha.4", + "hashish": "0.0.4", + "mocha": "^7.0.0", + "rimraf": "^3.0.2", + "standardx": "^5.0.0", + "typescript": "^3.7.0", + "which": "^2.0.0", + "yargs-test-extends": "^1.0.1" + }, + "scripts": { + "fix": "standardx --fix && standardx --fix **/*.ts", + "posttest": "npm run check", + "test": "c8 mocha --require ./test/before.js --timeout=12000 --check-leaks", + "coverage": "c8 report --check-coverage", + "check": "standardx && standardx **/*.ts", + "compile": "rimraf build && tsc", + "prepare": "npm run compile", + "pretest": "npm run compile -- -p tsconfig.test.json" + }, + "repository": { + "type": "git", + "url": "https://github.com/yargs/yargs.git" + }, + "homepage": "https://yargs.js.org/", + "standardx": { + "ignore": [ + "build", + "**/example/**" + ] + }, + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "license": "MIT", + "engines": { + "node": ">=8" + } +} diff --git a/test-eol-project/node_modules/yargs/yargs.js b/test-eol-project/node_modules/yargs/yargs.js new file mode 100644 index 00000000..93e8059e --- /dev/null +++ b/test-eol-project/node_modules/yargs/yargs.js @@ -0,0 +1,14 @@ +'use strict' + +// an async function fails early in Node.js versions prior to 8. +async function requiresNode8OrGreater () {} +requiresNode8OrGreater() + +const { Yargs, rebase } = require('./build/lib/yargs') +const Parser = require('yargs-parser') + +exports = module.exports = Yargs +exports.rebase = rebase + +// allow consumers to directly use the version of yargs-parser used by yargs +exports.Parser = Parser diff --git a/test-eol-project/package-lock.json b/test-eol-project/package-lock.json new file mode 100644 index 00000000..2024cdd3 --- /dev/null +++ b/test-eol-project/package-lock.json @@ -0,0 +1,1554 @@ +{ + "name": "test-eol-project", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "test-eol-project", + "version": "1.0.0", + "dependencies": { + "protractor": "7.0.0" + } + }, + "node_modules/@types/q": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", + "integrity": "sha512-qYi3YV9inU/REEfxwVcGZzbS3KG/Xs90lv0Pr+lDtuVjBPGd1A+eciXzVSaRvLify132BfcvhvEjeVahrUl0Ug==", + "license": "MIT" + }, + "node_modules/@types/selenium-webdriver": { + "version": "3.0.26", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.26.tgz", + "integrity": "sha512-dyIGFKXfUFiwkMfNGn1+F6b80ZjR3uSYv1j6xVJSDlft5waZ2cwkHW4e7zNzvq7hiEackcgvBpmnXZrI1GltPg==", + "license": "MIT" + }, + "node_modules/adm-zip": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", + "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", + "license": "MIT", + "engines": { + "node": ">=12.0" + } + }, + "node_modules/agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "license": "MIT", + "dependencies": { + "es6-promisify": "^5.0.0" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/ajv": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "license": "MIT", + "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-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "license": "MIT", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "license": "MIT", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "license": "BSD-3-Clause", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/blocking-proxy": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", + "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "blocking-proxy": "built/lib/bin.js" + }, + "engines": { + "node": ">=6.9.x" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/browserstack": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.6.1.tgz", + "integrity": "sha512-GxtFjpIaKdbAyzHfFDKixKO8IBT7wR3NjbzrGc78nNs/Ciys9wU3/nBtsqsWv5nDSrdI5tz0peKuzCPuNXNUiw==", + "license": "MIT", + "dependencies": { + "https-proxy-agent": "^2.2.1" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "license": "Apache-2.0" + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/cliui/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha512-Z4fzpbIRjOu7lO5jCETSWoqUDVe0IPOlfugBsF6suen2LKDlVb4QZpKEM9P+buNJ4KI1eN7I083w/pbKUpsrWQ==", + "license": "MIT", + "dependencies": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "license": "MIT", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "license": "MIT" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "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": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "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==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "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==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha512-HJRTIH2EeH44ka+LWig+EqT2ONSYpVlNfx6pyd592/VF1TbfljJ7elwie7oSwcViLGqOdWocSdu2txwBF9bjmQ==", + "license": "MIT", + "dependencies": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "license": "MIT", + "dependencies": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "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==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "license": "MIT", + "dependencies": { + "is-path-inside": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", + "license": "MIT", + "dependencies": { + "path-is-inside": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" + }, + "node_modules/jasmine": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", + "integrity": "sha512-KbdGQTf5jbZgltoHs31XGiChAPumMSY64OZMWLNYnEnMfG5uwGBhffePwuskexjT+/Jea/gU3qAU8344hNohSw==", + "license": "MIT", + "dependencies": { + "exit": "^0.1.2", + "glob": "^7.0.6", + "jasmine-core": "~2.8.0" + }, + "bin": { + "jasmine": "bin/jasmine.js" + } + }, + "node_modules/jasmine-core": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", + "integrity": "sha512-SNkOkS+/jMZvLhuSx1fjhcNWUC/KG6oVyFUGkSBEr9n1axSNduWU8GlI7suaHXr4yxjet6KjrUZxUTE5WzzWwQ==", + "license": "MIT" + }, + "node_modules/jasminewd2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", + "integrity": "sha512-Rn0nZe4rfDhzA63Al3ZGh0E+JTmM6ESZYXJGKuqKGZObsAB9fwXPD03GjtIEvJBDOhN94T5MzbwZSqzFHSQPzg==", + "license": "MIT", + "engines": { + "node": ">= 6.9.x" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "license": "MIT" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "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==", + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "license": "MIT", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "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==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "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==", + "license": "MIT", + "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "license": "(WTFPL OR MIT)" + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "license": "MIT" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "license": "MIT", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/protractor": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-7.0.0.tgz", + "integrity": "sha512-UqkFjivi4GcvUQYzqGYNe0mLzfn5jiLmO8w9nMhQoJRLhy2grJonpga2IWhI6yJO30LibWXJJtA4MOIZD2GgZw==", + "deprecated": "We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular", + "license": "MIT", + "dependencies": { + "@types/q": "^0.0.32", + "@types/selenium-webdriver": "^3.0.0", + "blocking-proxy": "^1.0.0", + "browserstack": "^1.5.1", + "chalk": "^1.1.3", + "glob": "^7.0.3", + "jasmine": "2.8.0", + "jasminewd2": "^2.1.0", + "q": "1.4.1", + "saucelabs": "^1.5.0", + "selenium-webdriver": "3.6.0", + "source-map-support": "~0.4.0", + "webdriver-js-extender": "2.1.0", + "webdriver-manager": "^12.1.7", + "yargs": "^15.3.1" + }, + "bin": { + "protractor": "bin/protractor", + "webdriver-manager": "bin/webdriver-manager" + }, + "engines": { + "node": ">=10.13.x" + } + }, + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha512-/CdEdaw49VZVmyIDGUQKDDT53c7qBkO6g5CefWz91Ae+l4+cRtcDYwMTXh6me4O8TMldeGHG3N2Bl84V78Ywbg==", + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "license": "MIT", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/qs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.5.tgz", + "integrity": "sha512-mzR4sElr1bfCaPJe7m8ilJ6ZXdDaGoObcYR0ZHSsktM/Lt21MVHj5De30GQH2eiZ1qGRTO7LCAzQsUeXTNexWQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/saucelabs": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", + "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", + "dependencies": { + "https-proxy-agent": "^2.2.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sax": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/selenium-webdriver": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", + "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "license": "Apache-2.0", + "dependencies": { + "jszip": "^3.1.3", + "rimraf": "^2.5.4", + "tmp": "0.0.30", + "xml2js": "^0.4.17" + }, + "engines": { + "node": ">= 6.9.0" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "license": "MIT", + "dependencies": { + "source-map": "^0.5.6" + } + }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "license": "MIT", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tmp": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", + "integrity": "sha512-HXdTB7lvMwcb55XFfrTM8CPr/IYREk4hVBFaQ4b/6nInrluSL86hfHm7vu0luYKCfyBZp2trCjpc8caC3vVM3w==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "license": "Unlicense" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" + }, + "node_modules/webdriver-js-extender": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", + "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", + "license": "MIT", + "dependencies": { + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" + }, + "engines": { + "node": ">=6.9.x" + } + }, + "node_modules/webdriver-manager": { + "version": "12.1.9", + "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.9.tgz", + "integrity": "sha512-Yl113uKm8z4m/KMUVWHq1Sjtla2uxEBtx2Ue3AmIlnlPAKloDn/Lvmy6pqWCUersVISpdMeVpAaGbNnvMuT2LQ==", + "license": "MIT", + "dependencies": { + "adm-zip": "^0.5.2", + "chalk": "^1.1.1", + "del": "^2.2.0", + "glob": "^7.0.3", + "ini": "^1.3.4", + "minimist": "^1.2.0", + "q": "^1.4.1", + "request": "^2.87.0", + "rimraf": "^2.5.2", + "semver": "^5.3.0", + "xml2js": "^0.4.17" + }, + "bin": { + "webdriver-manager": "bin/webdriver-manager" + }, + "engines": { + "node": ">=6.9.x" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "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/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "license": "MIT", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + } + } +} diff --git a/test-eol-project/package.json b/test-eol-project/package.json new file mode 100644 index 00000000..f4a88425 --- /dev/null +++ b/test-eol-project/package.json @@ -0,0 +1,8 @@ +{ + "name": "test-eol-project", + "version": "1.0.0", + "description": "Minimal project with EOL dependencies for testing codacy-trivy EOL scanner", + "dependencies": { + "protractor": "7.0.0" + } +} From d7cf709b7441e4008941eac53f138700b586a72c Mon Sep 17 00:00:00 2001 From: Kendrick Curtis Date: Fri, 27 Feb 2026 12:52:48 +0000 Subject: [PATCH 2/5] resolving cyclo issues --- cmd/eoltest/main.go | 68 ++++++++------- internal/docgen/rule.go | 154 +++++++++++----------------------- internal/openssfdb/builder.go | 90 ++++++++++---------- internal/tool/eol_scanner.go | 109 +++++++++++++----------- internal/tool/tool.go | 112 +++++++++++-------------- 5 files changed, 246 insertions(+), 287 deletions(-) diff --git a/cmd/eoltest/main.go b/cmd/eoltest/main.go index 55f4de87..53b9189e 100644 --- a/cmd/eoltest/main.go +++ b/cmd/eoltest/main.go @@ -33,49 +33,57 @@ func main() { fmt.Fprintf(os.Stderr, "dir %s: %v\n", absDir, err) os.Exit(1) } + indexPath, cleanup, err := resolveIndexPath() + if err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) + } + defer cleanup() + results, err := runEOLScan(context.Background(), absDir, indexPath) + if err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) + } + printEOLResults(results) +} - indexPath := tool.MaliciousPackagesIndexPath - if _, err := os.Stat(indexPath); err != nil { - // Use empty index so we can run without the real index - f, err := os.CreateTemp("", "codacy-trivy-malicious-*.json.gz") - if err != nil { - fmt.Fprintf(os.Stderr, "temp index: %v\n", err) - os.Exit(1) - } - defer os.Remove(f.Name()) - gw := gzip.NewWriter(f) - _, _ = gw.Write([]byte("{}")) - _ = gw.Close() - _ = f.Close() - indexPath = f.Name() +// resolveIndexPath returns the malicious-packages index path and a cleanup function. +// If the default path exists it is returned with a no-op cleanup; otherwise a temp empty index is created. +func resolveIndexPath() (path string, cleanup func(), err error) { + path = tool.MaliciousPackagesIndexPath + if _, err := os.Stat(path); err == nil { + return path, func() {}, nil + } + f, err := os.CreateTemp("", "codacy-trivy-malicious-*.json.gz") + if err != nil { + return "", nil, fmt.Errorf("temp index: %w", err) } + gw := gzip.NewWriter(f) + _, _ = gw.Write([]byte("{}")) + _ = gw.Close() + _ = f.Close() + return f.Name(), func() { os.Remove(f.Name()) }, nil +} +// runEOLScan runs the tool with EOL patterns only and returns all results. +func runEOLScan(ctx context.Context, dir, indexPath string) ([]codacy.Result, error) { trivy, err := tool.New(indexPath) if err != nil { - fmt.Fprintf(os.Stderr, "New: %v\n", err) - os.Exit(1) + return nil, fmt.Errorf("New: %w", err) } - - files := listFiles(absDir) + files := listFiles(dir) patterns := []codacy.Pattern{ {ID: "eol_critical"}, {ID: "eol_high"}, {ID: "eol_medium"}, {ID: "eol_minor"}, } - te := codacy.ToolExecution{ - SourceDir: absDir, - Patterns: &patterns, - Files: &files, - } - - results, err := trivy.Run(context.Background(), te) - if err != nil { - fmt.Fprintf(os.Stderr, "Run: %v\n", err) - os.Exit(1) - } + te := codacy.ToolExecution{SourceDir: dir, Patterns: &patterns, Files: &files} + return trivy.Run(ctx, te) +} - // Print EOL results only +// printEOLResults prints EOL issues and file errors from results, then a summary line. +func printEOLResults(results []codacy.Result) { var count int for _, r := range results { switch v := r.(type) { diff --git a/internal/docgen/rule.go b/internal/docgen/rule.go index 03d81ac2..575607b2 100644 --- a/internal/docgen/rule.go +++ b/internal/docgen/rule.go @@ -1,6 +1,10 @@ package docgen -import codacy "github.com/codacy/codacy-engine-golang-seed/v6" +import ( + "fmt" + + codacy "github.com/codacy/codacy-engine-golang-seed/v6" +) // Rule represents a static code analysis rule that an execution of `codacy-trivy` can trigger. type Rule struct { @@ -52,108 +56,52 @@ func (rs Rules) toCodacyPatternDescription() []codacy.PatternDescription { return codacyPatternsDescription } -// trivyRules returns all `codacy-trivy` Rules. -func trivyRules() Rules { +func secretRule() Rules { + return Rules{{ + ID: "secret", + Title: "Secret detection", + Description: "Detects secrets that should not be committed to a repository or otherwise disclosed, such as secret keys, passwords, and authentication tokens from multiple products.", + Level: "Error", + Category: "Security", + SubCategory: "Cryptography", + ScanType: "Secrets", + Enabled: true, + }} +} + +func vulnerabilityRules() Rules { + const descPrefix = "Detects insecure dependencies (%s severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities." return Rules{ - { - ID: "secret", - Title: "Secret detection", - Description: "Detects secrets that should not be committed to a repository or otherwise disclosed, such as secret keys, passwords, and authentication tokens from multiple products.", - Level: "Error", - Category: "Security", - SubCategory: "Cryptography", - ScanType: "Secrets", - Enabled: true, - }, - { - ID: "vulnerability_critical", - Title: "Insecure dependencies detection (critical severity)", - Description: "Detects insecure dependencies (critical severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.", - Level: "Error", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "vulnerability_high", - Title: "Insecure dependencies detection (high severity)", - Description: "Detects insecure dependencies (high severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.", - Level: "High", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "vulnerability_medium", - Title: "Insecure dependencies detection (medium severity)", - Description: "Detects insecure dependencies (medium severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.", - Level: "Warning", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "vulnerability_minor", - Title: "Insecure dependencies detection (minor severity)", - Description: "Detects insecure dependencies (minor severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.", - Level: "Info", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "malicious_packages", - Title: "Malicious packages detection", - Description: "Detects malicious packages identified in the OpenSSF Malicious Packages database, including typosquatting attacks, dependency confusion, and packages with malicious payloads.", - Level: "Error", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "eol_critical", - Title: "End-of-life package (obsolete)", - Description: "Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded.", - Level: "Error", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "eol_high", - Title: "End-of-life package (within 1 month)", - Description: "Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends.", - Level: "High", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "eol_medium", - Title: "End-of-life package (within 6 months)", - Description: "Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version.", - Level: "Warning", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, - { - ID: "eol_minor", - Title: "End-of-life package (beyond 6 months)", - Description: "Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning.", - Level: "Info", - Category: "Security", - SubCategory: "InsecureModulesLibraries", - ScanType: "SCA", - Enabled: true, - }, + {"vulnerability_critical", "Insecure dependencies detection (critical severity)", fmt.Sprintf(descPrefix, "critical"), "Error", "Security", "InsecureModulesLibraries", "SCA", true}, + {"vulnerability_high", "Insecure dependencies detection (high severity)", fmt.Sprintf(descPrefix, "high"), "High", "Security", "InsecureModulesLibraries", "SCA", true}, + {"vulnerability_medium", "Insecure dependencies detection (medium severity)", fmt.Sprintf(descPrefix, "medium"), "Warning", "Security", "InsecureModulesLibraries", "SCA", true}, + {"vulnerability_minor", "Insecure dependencies detection (minor severity)", fmt.Sprintf(descPrefix, "minor"), "Info", "Security", "InsecureModulesLibraries", "SCA", true}, } } + +func maliciousPackagesRule() Rules { + return Rules{{ + ID: "malicious_packages", + Title: "Malicious packages detection", + Description: "Detects malicious packages identified in the OpenSSF Malicious Packages database, including typosquatting attacks, dependency confusion, and packages with malicious payloads.", + Level: "Error", + Category: "Security", + SubCategory: "InsecureModulesLibraries", + ScanType: "SCA", + Enabled: true, + }} +} + +func eolRules() Rules { + return Rules{ + {"eol_critical", "End-of-life package (obsolete)", "Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded.", "Error", "Security", "InsecureModulesLibraries", "SCA", true}, + {"eol_high", "End-of-life package (within 1 month)", "Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends.", "High", "Security", "InsecureModulesLibraries", "SCA", true}, + {"eol_medium", "End-of-life package (within 6 months)", "Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version.", "Warning", "Security", "InsecureModulesLibraries", "SCA", true}, + {"eol_minor", "End-of-life package (beyond 6 months)", "Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning.", "Info", "Security", "InsecureModulesLibraries", "SCA", true}, + } +} + +// trivyRules returns all `codacy-trivy` Rules. +func trivyRules() Rules { + return append(append(append(secretRule(), vulnerabilityRules()...), maliciousPackagesRule()...), eolRules()...) +} diff --git a/internal/openssfdb/builder.go b/internal/openssfdb/builder.go index f95edd02..ea740cb6 100644 --- a/internal/openssfdb/builder.go +++ b/internal/openssfdb/builder.go @@ -72,6 +72,49 @@ func NewBuilder() *Builder { } } +// parseOSVFile reads and decodes one OSV JSON file into a rawRecord. +func parseOSVFile(path string) (*rawRecord, error) { + file, err := os.Open(path) + if err != nil { + return nil, err + } + defer file.Close() + var raw rawRecord + if err := json.NewDecoder(file).Decode(&raw); err != nil { + return nil, err + } + raw.trim() + return &raw, nil +} + +// aggregateRawInto merges a raw OSV record into the output package map. +func aggregateRawInto(out *Output, raw *rawRecord) { + for _, affected := range raw.Affected { + ecosystem := normalizeEcosystem(affected.Package.Ecosystem) + if ecosystem == "" || affected.Package.Name == "" { + continue + } + name := strings.ToLower(affected.Package.Name) + entry := &Entry{ + ID: raw.ID, + Ecosystem: ecosystem, + Package: affected.Package.Name, + Summary: raw.Summary, + Details: raw.Details, + Versions: cloneAndSort(affected.Versions), + Ranges: cloneRanges(affected.Ranges), + References: cloneReferences(raw.References), + Aliases: cloneStrings(raw.Aliases), + Published: raw.Published, + Modified: raw.Modified, + } + if _, ok := out.Packages[ecosystem]; !ok { + out.Packages[ecosystem] = make(map[string][]*Entry) + } + out.Packages[ecosystem][name] = append(out.Packages[ecosystem][name], entry) + } +} + // Build walks the provided OpenSSF repository directory and emits an aggregated Output. // The source parameter is used to document where the data originated from. func (b *Builder) Build(ctx context.Context, repoDir, source string) (*Output, error) { @@ -81,19 +124,16 @@ func (b *Builder) Build(ctx context.Context, repoDir, source string) (*Output, e if source == "" { return nil, errors.New("source description is required") } - root := filepath.Join(repoDir, "osv", "malicious") if _, err := os.Stat(root); err != nil { return nil, err } - out := &Output{ SchemaVersion: SchemaVersion, GeneratedAt: b.now().UTC(), Source: source, Packages: make(map[string]map[string][]*Entry), } - err := filepath.WalkDir(root, func(path string, d fs.DirEntry, walkErr error) error { if walkErr != nil { return walkErr @@ -101,55 +141,19 @@ func (b *Builder) Build(ctx context.Context, repoDir, source string) (*Output, e if d.IsDir() || !strings.HasSuffix(d.Name(), ".json") { return nil } - if ctxErr := ctx.Err(); ctxErr != nil { - return ctxErr + if ctx.Err() != nil { + return ctx.Err() } - - file, err := os.Open(path) + raw, err := parseOSVFile(path) if err != nil { return err } - defer file.Close() - - var raw rawRecord - if err := json.NewDecoder(file).Decode(&raw); err != nil { - return err - } - raw.trim() - - for _, affected := range raw.Affected { - ecosystem := normalizeEcosystem(affected.Package.Ecosystem) - if ecosystem == "" || affected.Package.Name == "" { - continue - } - name := strings.ToLower(affected.Package.Name) - - entry := &Entry{ - ID: raw.ID, - Ecosystem: ecosystem, - Package: affected.Package.Name, - Summary: raw.Summary, - Details: raw.Details, - Versions: cloneAndSort(affected.Versions), - Ranges: cloneRanges(affected.Ranges), - References: cloneReferences(raw.References), - Aliases: cloneStrings(raw.Aliases), - Published: raw.Published, - Modified: raw.Modified, - } - - if _, ok := out.Packages[ecosystem]; !ok { - out.Packages[ecosystem] = make(map[string][]*Entry) - } - out.Packages[ecosystem][name] = append(out.Packages[ecosystem][name], entry) - } - + aggregateRawInto(out, raw) return nil }) if err != nil { return nil, err } - return out, nil } diff --git a/internal/tool/eol_scanner.go b/internal/tool/eol_scanner.go index 839c1a52..9736bc6c 100644 --- a/internal/tool/eol_scanner.go +++ b/internal/tool/eol_scanner.go @@ -67,78 +67,89 @@ func NewEOLScanner(runner EOLRunner) *EOLScanner { return &EOLScanner{runner: runner} } -// Scan runs the EOL scan and returns Codacy results. -// If no EOL pattern is enabled, returns empty. Uses report to resolve file/line from PURL. -func (s *EOLScanner) Scan(report ptypes.Report, toolExecution codacy.ToolExecution, bom *cdx.BOM) []codacy.Result { - eolEnabled := lo.SomeBy(*toolExecution.Patterns, func(p codacy.Pattern) bool { - return lo.Contains(ruleIDsEOL, p.ID) - }) - if !eolEnabled { - return []codacy.Result{} - } - - if bom == nil || bom.Components == nil { - return []codacy.Result{} - } - +// writeSBOMToTemp writes the BOM to a temp file and returns its path and a cleanup function. +// Caller must call cleanup when done. On error returns ( "", nil, error result ). +func writeSBOMToTemp(bom *cdx.BOM) (sbomPath string, cleanup func(), errResult []codacy.Result) { tmpDir, err := os.MkdirTemp("", "codacy-trivy-sbom-") if err != nil { - return []codacy.Result{codacy.FileError{File: "", Message: "Failed to create temp dir for EOL scan"}} + return "", nil, []codacy.Result{codacy.FileError{File: "", Message: "Failed to create temp dir for EOL scan"}} } - defer os.RemoveAll(tmpDir) - - sbomPath := filepath.Join(tmpDir, "sbom.json") + cleanup = func() { os.RemoveAll(tmpDir) } + sbomPath = filepath.Join(tmpDir, "sbom.json") f, err := os.Create(sbomPath) if err != nil { - return []codacy.Result{codacy.FileError{File: "", Message: "Failed to write SBOM for EOL scan"}} + cleanup() + return "", nil, []codacy.Result{codacy.FileError{File: "", Message: "Failed to write SBOM for EOL scan"}} } enc := json.NewEncoder(f) enc.SetIndent("", " ") if err := enc.Encode(bom); err != nil { f.Close() - return []codacy.Result{codacy.FileError{File: "", Message: "Failed to encode SBOM for EOL scan"}} + cleanup() + return "", nil, []codacy.Result{codacy.FileError{File: "", Message: "Failed to encode SBOM for EOL scan"}} } if err := f.Close(); err != nil { - return []codacy.Result{codacy.FileError{File: "", Message: "Failed to close SBOM file"}} + cleanup() + return "", nil, []codacy.Result{codacy.FileError{File: "", Message: "Failed to close SBOM file"}} } + return sbomPath, cleanup, nil +} +// matchToIssue converts one EOL match to a Codacy issue if location can be resolved. Returns (issue, true) or (zero, false). +func matchToIssue(m eolMatch, report ptypes.Report, sourceDir string, purlToLocation map[string]pkgLocation) (codacy.Issue, bool) { + ruleID, err := severityFromEolDate(m.EolDate) + if err != nil { + return codacy.Issue{}, false + } + loc, ok := purlToLocation[m.PURL] + if !ok { + loc, ok = findLocationByPackage(report, m.Name, m.Version) + if !ok { + return codacy.Issue{}, false + } + } + line := loc.line + if line == 0 { + line = fallbackSearchForLineNumber(sourceDir, loc.target, m.Name) + } + msg := fmt.Sprintf("End-of-life package %s@%s (EOL %s)", m.Name, m.Version, m.EolDate) + if m.CycleID != "" { + msg = fmt.Sprintf("%s [%s]", msg, m.CycleID) + } + return codacy.Issue{ + File: loc.target, + Line: line, + Message: msg, + PatternID: ruleID, + SourceID: m.EolDate, + }, true +} + +// Scan runs the EOL scan and returns Codacy results. +// If no EOL pattern is enabled, returns empty. Uses report to resolve file/line from PURL. +func (s *EOLScanner) Scan(report ptypes.Report, toolExecution codacy.ToolExecution, bom *cdx.BOM) []codacy.Result { + eolEnabled := lo.SomeBy(*toolExecution.Patterns, func(p codacy.Pattern) bool { + return lo.Contains(ruleIDsEOL, p.ID) + }) + if !eolEnabled || bom == nil || bom.Components == nil { + return []codacy.Result{} + } + sbomPath, cleanup, errResult := writeSBOMToTemp(bom) + if errResult != nil { + return errResult + } + defer cleanup() matches, err := s.runner.Run(sbomPath) if err != nil { return []codacy.Result{codacy.FileError{File: "", Message: fmt.Sprintf("EOL scan failed: %v", err)}} } - purlToLocation := buildPURLToLocation(report) var issues []codacy.Issue for _, m := range matches { - ruleID, err := severityFromEolDate(m.EolDate) - if err != nil { - continue - } - loc, ok := purlToLocation[m.PURL] - if !ok { - // Try by name+version in case PURL format differs - loc, ok = findLocationByPackage(report, m.Name, m.Version) - if !ok { - continue - } - } - line := loc.line - if line == 0 { - line = fallbackSearchForLineNumber(toolExecution.SourceDir, loc.target, m.Name) - } - msg := fmt.Sprintf("End-of-life package %s@%s (EOL %s)", m.Name, m.Version, m.EolDate) - if m.CycleID != "" { - msg = fmt.Sprintf("%s [%s]", msg, m.CycleID) + if issue, ok := matchToIssue(m, report, toolExecution.SourceDir, purlToLocation); ok { + issues = append(issues, issue) } - issues = append(issues, codacy.Issue{ - File: loc.target, - Line: line, - Message: msg, - PatternID: ruleID, - SourceID: m.EolDate, - }) } - return mapIssuesWithoutLineNumber(filterIssuesFromKnownFiles(issues, *toolExecution.Files)) } diff --git a/internal/tool/tool.go b/internal/tool/tool.go index 57b67612..6986f2b3 100644 --- a/internal/tool/tool.go +++ b/internal/tool/tool.go @@ -138,14 +138,10 @@ func (t codacyTrivy) runBaseScan(ctx context.Context, sourceDir string, patterns patterns = []codacy.Pattern{} } cacheDir := getTrivyCacheDir() - vulnerabilityScanningEnabled := lo.SomeBy(patterns, func(p codacy.Pattern) bool { - return lo.Contains(ruleIDsVulnerability, p.ID) - }) // When using a local cache (TRIVY_CACHE_DIR), allow DB update on first run; production image uses skip. skipDBUpdate := cacheDir == defaultCacheDir offlineScan := cacheDir == defaultCacheDir scanners := ptypes.Scanners{ptypes.VulnerabilityScanner} - // EOL-only: still use VulnerabilityScanner so report has packages for SBOM; Trivy DB must exist in image (see Dockerfile). config := flag.Options{ GlobalOptions: flag.GlobalOptions{ CacheDir: cacheDir, @@ -197,6 +193,50 @@ func (t codacyTrivy) runBaseScan(ctx context.Context, sourceDir string, patterns return results, nil } +// buildLineNumberByPurl builds a PURL-to-line map from a Trivy result's packages. +func buildLineNumberByPurl(result ptypes.Result) map[string]int { + lineNumberByPurl := make(map[string]int) + for _, pkg := range result.Packages { + if pkg.Identifier.PURL == nil { + continue + } + line := 0 + if len(pkg.Locations) > 0 { + line = pkg.Locations[0].StartLine + } + lineNumberByPurl[pkg.Identifier.PURL.ToString()] = line + } + return lineNumberByPurl +} + +// vulnerabilityToIssue converts one Trivy vulnerability to a Codacy issue, or (zero, false) if skipped (e.g. no PURL). +// lineByPurl is mutated to fill in fallback line when missing. Returns error only for ruleID mapping failure. +func vulnerabilityToIssue(target, sourceDir string, vuln ptypes.DetectedVulnerability, lineByPurl map[string]int) (codacy.Issue, bool, error) { + if vuln.PkgIdentifier.PURL == nil { + return codacy.Issue{}, false, nil + } + purl := vuln.PkgIdentifier.PURL.ToString() + if line, ok := lineByPurl[purl]; !ok || line == 0 { + lineByPurl[purl] = fallbackSearchForLineNumber(sourceDir, target, vuln.PkgName) + } + fixedVersion := findLeastDisruptiveFixedVersion(vuln) + fixedVersionMessage := "(no fix available)" + if fixedVersion != "" { + fixedVersionMessage = fmt.Sprintf("(update to %s)", fixedVersion) + } + ruleID, err := getRuleIDFromTrivySeverity(vuln.Severity) + if err != nil { + return codacy.Issue{}, false, err + } + return codacy.Issue{ + File: target, + Line: lineByPurl[purl], + Message: fmt.Sprintf("Insecure dependency %s (%s: %s) %s", purlPrettyPrint(*vuln.PkgIdentifier.PURL), vuln.VulnerabilityID, vuln.Title, fixedVersionMessage), + PatternID: ruleID, + SourceID: vuln.VulnerabilityID, + }, true, nil +} + // getVulnerabilties obtains the vulnerable dependency issues from `report` respecting the `toolExecution` configuration, // with regards to patterns enabled, files to scan and line numbers. See [mapIssuesWithoutLineNumber] and [filterIssuesFromKnownFiles]. // @@ -208,79 +248,27 @@ func (t codacyTrivy) getVulnerabilities(ctx context.Context, report ptypes.Repor if !vulnerabilityScanningEnabled { return []codacy.Result{}, nil } - trivySeverities := getTrivySeveritiesFromPatterns(*toolExecution.Patterns) - // This should never happen, given that we validate the patterns above. Still, it's a failsafe. if len(trivySeverities) == 0 { return nil, &ToolError{msg: fmt.Sprintf("Failed to run Codacy Trivy: vulnerability patterns did not produce severities (patterns %v)", *toolExecution.Patterns)} } - issues := []codacy.Issue{} + var issues []codacy.Issue for _, result := range report.Results { - // Make a map for faster lookup - lineNumberByPurl := map[string]int{} - for _, pkg := range result.Packages { - if pkg.Identifier.PURL == nil { - continue - } - lineNumber := 0 - if len(pkg.Locations) > 0 { - lineNumber = pkg.Locations[0].StartLine - } - lineNumberByPurl[pkg.Identifier.PURL.ToString()] = lineNumber - } - - // Ensure Trivy only produces results with severities matching the specified patterns. - // Due to the way we invoke Trivy, this won't happen by simply setting it in the config. + lineByPurl := buildLineNumberByPurl(result) if err := tresult.FilterResult(ctx, &result, tresult.IgnoreConfig{}, tresult.FilterOptions{Severities: trivySeverities}); err != nil { return nil, &ToolError{msg: "Failed to run Codacy Trivy", w: err} } - for _, vuln := range result.Vulnerabilities { - // Skip vulnerabilities without a valid PURL to avoid panic - // This can happen when Trivy detects vulnerabilities in packages that don't have - // proper package identifiers (e.g., custom packages, local dependencies, or - // packages with malformed metadata). Without a PURL, we cannot reliably map - // the vulnerability to a specific package location in the source code. - if vuln.PkgIdentifier.PURL == nil { - continue - } - - purl := vuln.PkgIdentifier.PURL.ToString() - // If the line number is not available, use the fallback. - if value, ok := lineNumberByPurl[purl]; !ok || value == 0 { - lineNumberByPurl[purl] = fallbackSearchForLineNumber(toolExecution.SourceDir, result.Target, vuln.PkgName) - } - - // Find the smallest version increment that fixes a vulnerabillity - fixedVersion := findLeastDisruptiveFixedVersion(vuln) - fixedVersionMessage := "" - if len(fixedVersion) > 0 { - fixedVersionMessage = fmt.Sprintf("(update to %s)", fixedVersion) - } else { - fixedVersionMessage = "(no fix available)" - } - - ruleID, err := getRuleIDFromTrivySeverity(vuln.Severity) - // This should not be possible since we filter out vulnerabilities with unknown severities. Still, it's a failsafe. + issue, ok, err := vulnerabilityToIssue(result.Target, toolExecution.SourceDir, vuln, lineByPurl) if err != nil { return nil, err } - - issues = append( - issues, - codacy.Issue{ - File: result.Target, - Line: lineNumberByPurl[purl], - Message: fmt.Sprintf("Insecure dependency %s (%s: %s) %s", purlPrettyPrint(*vuln.PkgIdentifier.PURL), vuln.VulnerabilityID, vuln.Title, fixedVersionMessage), - PatternID: ruleID, - SourceID: vuln.VulnerabilityID, - }, - ) + if ok { + issues = append(issues, issue) + } } - } - return mapIssuesWithoutLineNumber(filterIssuesFromKnownFiles(issues, *toolExecution.Files)), nil } From bdc5231f1fe0e858b0e633dd69552fd8d6afd839 Mon Sep 17 00:00:00 2001 From: Kendrick Curtis Date: Fri, 27 Feb 2026 16:31:45 +0000 Subject: [PATCH 3/5] added tests --- cmd/eoltest/main.go | 30 +++++++++++++---- cmd/eoltest/main_test.go | 69 ++++++++++++++++++++++++++++++++++++++++ internal/docgen/rule.go | 16 +++++----- 3 files changed, 100 insertions(+), 15 deletions(-) create mode 100644 cmd/eoltest/main_test.go diff --git a/cmd/eoltest/main.go b/cmd/eoltest/main.go index 53b9189e..a8a5db91 100644 --- a/cmd/eoltest/main.go +++ b/cmd/eoltest/main.go @@ -10,6 +10,7 @@ import ( "context" "flag" "fmt" + "io" "os" "path/filepath" @@ -50,9 +51,13 @@ func main() { // resolveIndexPath returns the malicious-packages index path and a cleanup function. // If the default path exists it is returned with a no-op cleanup; otherwise a temp empty index is created. func resolveIndexPath() (path string, cleanup func(), err error) { - path = tool.MaliciousPackagesIndexPath - if _, err := os.Stat(path); err == nil { - return path, func() {}, nil + return resolveIndexPathWithDefault(tool.MaliciousPackagesIndexPath) +} + +// resolveIndexPathWithDefault is the testable core; defaultPath is the path to check first (e.g. tool.MaliciousPackagesIndexPath). +func resolveIndexPathWithDefault(defaultPath string) (path string, cleanup func(), err error) { + if _, statErr := os.Stat(defaultPath); statErr == nil { + return defaultPath, func() {}, nil } f, err := os.CreateTemp("", "codacy-trivy-malicious-*.json.gz") if err != nil { @@ -84,24 +89,35 @@ func runEOLScan(ctx context.Context, dir, indexPath string) ([]codacy.Result, er // printEOLResults prints EOL issues and file errors from results, then a summary line. func printEOLResults(results []codacy.Result) { + printEOLResultsTo(os.Stdout, os.Stderr, results) +} + +// printEOLResultsTo is the testable core; if stdout or stderr is nil, os.Stdout or os.Stderr is used. +func printEOLResultsTo(stdout, stderr io.Writer, results []codacy.Result) { + if stdout == nil { + stdout = os.Stdout + } + if stderr == nil { + stderr = os.Stderr + } var count int for _, r := range results { switch v := r.(type) { case codacy.Issue: if isEOL(v.PatternID) { count++ - fmt.Printf("%s:%d [%s] %s\n", v.File, v.Line, v.PatternID, v.Message) + fmt.Fprintf(stdout, "%s:%d [%s] %s\n", v.File, v.Line, v.PatternID, v.Message) } case codacy.FileError: if v.File != "" { - fmt.Fprintf(os.Stderr, "file error %s: %s\n", v.File, v.Message) + fmt.Fprintf(stderr, "file error %s: %s\n", v.File, v.Message) } } } if count == 0 { - fmt.Println("No EOL issues found. Ensure the project has EOL deps (e.g. npm install in test-eol-project) and XEOL_DB_CACHE_DIR is set or DB is in default cache.") + fmt.Fprintln(stdout, "No EOL issues found. Ensure the project has EOL deps (e.g. npm install in test-eol-project) and XEOL_DB_CACHE_DIR is set or DB is in default cache.") } else { - fmt.Printf("\nTotal EOL issues: %d\n", count) + fmt.Fprintf(stdout, "\nTotal EOL issues: %d\n", count) } } diff --git a/cmd/eoltest/main_test.go b/cmd/eoltest/main_test.go new file mode 100644 index 00000000..523a4cc8 --- /dev/null +++ b/cmd/eoltest/main_test.go @@ -0,0 +1,69 @@ +package main + +import ( + "bytes" + "os" + "path/filepath" + "testing" + + codacy "github.com/codacy/codacy-engine-golang-seed/v6" + "github.com/stretchr/testify/assert" +) + +func TestResolveIndexPathWithDefault_WhenPathExists(t *testing.T) { + dir := t.TempDir() + existing := filepath.Join(dir, "index.json.gz") + f, err := os.Create(existing) + assert.NoError(t, err) + assert.NoError(t, f.Close()) + + path, cleanup, err := resolveIndexPathWithDefault(existing) + assert.NoError(t, err) + defer cleanup() + assert.Equal(t, existing, path) +} + +func TestResolveIndexPathWithDefault_WhenPathNotExists(t *testing.T) { + path, cleanup, err := resolveIndexPathWithDefault(filepath.Join(t.TempDir(), "nonexistent.json.gz")) + assert.NoError(t, err) + defer cleanup() + assert.NotEmpty(t, path) + _, err = os.Stat(path) + assert.NoError(t, err) + cleanup() + _, err = os.Stat(path) + assert.True(t, os.IsNotExist(err)) +} + +func TestPrintEOLResultsTo_Empty(t *testing.T) { + var buf bytes.Buffer + printEOLResultsTo(&buf, &buf, nil) + assert.Contains(t, buf.String(), "No EOL issues found") +} + +func TestPrintEOLResultsTo_OneIssue(t *testing.T) { + var buf bytes.Buffer + printEOLResultsTo(&buf, &buf, []codacy.Result{ + codacy.Issue{File: "go.mod", Line: 5, PatternID: "eol_critical", Message: "EOL pkg"}, + }) + out := buf.String() + assert.Contains(t, out, "go.mod:5 [eol_critical] EOL pkg") + assert.Contains(t, out, "Total EOL issues: 1") +} + +func TestPrintEOLResultsTo_FileError(t *testing.T) { + var stdout, stderr bytes.Buffer + printEOLResultsTo(&stdout, &stderr, []codacy.Result{ + codacy.FileError{File: "bad.txt", Message: "read failed"}, + }) + assert.Contains(t, stderr.String(), "file error bad.txt: read failed") +} + +func TestIsEOL(t *testing.T) { + assert.True(t, isEOL("eol_critical")) + assert.True(t, isEOL("eol_high")) + assert.True(t, isEOL("eol_medium")) + assert.True(t, isEOL("eol_minor")) + assert.False(t, isEOL("vulnerability_high")) + assert.False(t, isEOL("")) +} diff --git a/internal/docgen/rule.go b/internal/docgen/rule.go index 575607b2..94510b64 100644 --- a/internal/docgen/rule.go +++ b/internal/docgen/rule.go @@ -72,10 +72,10 @@ func secretRule() Rules { func vulnerabilityRules() Rules { const descPrefix = "Detects insecure dependencies (%s severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities." return Rules{ - {"vulnerability_critical", "Insecure dependencies detection (critical severity)", fmt.Sprintf(descPrefix, "critical"), "Error", "Security", "InsecureModulesLibraries", "SCA", true}, - {"vulnerability_high", "Insecure dependencies detection (high severity)", fmt.Sprintf(descPrefix, "high"), "High", "Security", "InsecureModulesLibraries", "SCA", true}, - {"vulnerability_medium", "Insecure dependencies detection (medium severity)", fmt.Sprintf(descPrefix, "medium"), "Warning", "Security", "InsecureModulesLibraries", "SCA", true}, - {"vulnerability_minor", "Insecure dependencies detection (minor severity)", fmt.Sprintf(descPrefix, "minor"), "Info", "Security", "InsecureModulesLibraries", "SCA", true}, + {ID: "vulnerability_critical", Title: "Insecure dependencies detection (critical severity)", Description: fmt.Sprintf(descPrefix, "critical"), Level: "Error", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, + {ID: "vulnerability_high", Title: "Insecure dependencies detection (high severity)", Description: fmt.Sprintf(descPrefix, "high"), Level: "High", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, + {ID: "vulnerability_medium", Title: "Insecure dependencies detection (medium severity)", Description: fmt.Sprintf(descPrefix, "medium"), Level: "Warning", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, + {ID: "vulnerability_minor", Title: "Insecure dependencies detection (minor severity)", Description: fmt.Sprintf(descPrefix, "minor"), Level: "Info", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, } } @@ -94,10 +94,10 @@ func maliciousPackagesRule() Rules { func eolRules() Rules { return Rules{ - {"eol_critical", "End-of-life package (obsolete)", "Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded.", "Error", "Security", "InsecureModulesLibraries", "SCA", true}, - {"eol_high", "End-of-life package (within 1 month)", "Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends.", "High", "Security", "InsecureModulesLibraries", "SCA", true}, - {"eol_medium", "End-of-life package (within 6 months)", "Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version.", "Warning", "Security", "InsecureModulesLibraries", "SCA", true}, - {"eol_minor", "End-of-life package (beyond 6 months)", "Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning.", "Info", "Security", "InsecureModulesLibraries", "SCA", true}, + {ID: "eol_critical", Title: "End-of-life package (obsolete)", Description: "Detects packages that have reached end-of-life and are no longer supported. These dependencies no longer receive security updates and should be upgraded.", Level: "Error", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, + {ID: "eol_high", Title: "End-of-life package (within 1 month)", Description: "Detects packages that will reach end-of-life within one month. Plan to upgrade before support ends.", Level: "High", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, + {ID: "eol_medium", Title: "End-of-life package (within 6 months)", Description: "Detects packages that will reach end-of-life within six months. Consider upgrading to a supported version.", Level: "Warning", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, + {ID: "eol_minor", Title: "End-of-life package (beyond 6 months)", Description: "Detects packages that will reach end-of-life in more than six months. Track for future upgrade planning.", Level: "Info", Category: "Security", SubCategory: "InsecureModulesLibraries", ScanType: "SCA", Enabled: true}, } } From 45cd9a82342a7951fc433c5250786e416ba0e761 Mon Sep 17 00:00:00 2001 From: Kendrick Curtis Date: Tue, 3 Mar 2026 16:16:57 +0000 Subject: [PATCH 4/5] resolving codacy issues --- Dockerfile | 11 +++++----- cmd/eoltest/main.go | 15 +++++++------ go.mod | 2 +- go.sum | 4 ++-- internal/tool/eol_scanner.go | 35 ++++++++++++++++++------------- internal/tool/eol_scanner_test.go | 14 ++++++------- internal/tool/eol_xeol_lib.go | 10 ++++----- 7 files changed, 50 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index 23b0237f..eda24f59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,19 +32,20 @@ RUN apk add --no-cache curl jq xz && \ rm /tmp/xeol-db.tar.xz # Download Trivy vuln DB at build time so slim image can run EOL scan (runner still needs DB to init). +WORKDIR /src/trivy-cache/db RUN ORAS_VER=1.1.0 && \ curl -sSfL "https://github.com/oras-project/oras/releases/download/v${ORAS_VER}/oras_${ORAS_VER}_linux_amd64.tar.gz" -o /tmp/oras.tar.gz && \ tar -xzf /tmp/oras.tar.gz -C /usr/local/bin oras && rm /tmp/oras.tar.gz && \ - mkdir -p /src/trivy-cache/db && cd /src/trivy-cache/db && \ + mkdir -p /src/trivy-cache/db && \ oras pull ghcr.io/aquasecurity/trivy-db:2 && \ - (test -f db.tar.gz && tar -xzf db.tar.gz && rm -f db.tar.gz) && \ - (mv 2/* . 2>/dev/null; rmdir 2 2>/dev/null) || true + ( (test -f db.tar.gz && tar -xzf db.tar.gz && rm -f db.tar.gz) || true ) && \ + ( (test -d 2 && mv 2/* . 2>/dev/null && rmdir 2 2>/dev/null) || true ) # Build eoltest for container verification (optional). RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \ go build -o bin/eoltest ./cmd/eoltest -FROM busybox AS full +FROM busybox:1.36 AS full RUN adduser -u 2004 -D docker COPY --from=builder --chown=docker:docker /src/bin /dist/bin COPY --from=builder --chown=docker:docker /src/docs /docs @@ -55,7 +56,7 @@ ENV XEOL_DB_CACHE_DIR=/dist/cache/xeol/db CMD [ "/dist/bin/codacy-trivy" ] # Slim: no host cache/openssf; includes Trivy DB + xeol DB for EOL scan. Use: docker build --target slim -t codacy-trivy:eol . -FROM busybox AS slim +FROM busybox:1.36 AS slim RUN adduser -u 2004 -D docker COPY --from=builder --chown=docker:docker /src/bin /dist/bin COPY --from=builder --chown=docker:docker /src/docs /docs diff --git a/cmd/eoltest/main.go b/cmd/eoltest/main.go index 98401472..68028c20 100644 --- a/cmd/eoltest/main.go +++ b/cmd/eoltest/main.go @@ -92,14 +92,17 @@ func printEOLResults(results []codacy.Result) { printEOLResultsTo(os.Stdout, os.Stderr, results) } +func defaultWriter(w, d io.Writer) io.Writer { + if w == nil { + return d + } + return w +} + // printEOLResultsTo is the testable core; if stdout or stderr is nil, os.Stdout or os.Stderr is used. func printEOLResultsTo(stdout, stderr io.Writer, results []codacy.Result) { - if stdout == nil { - stdout = os.Stdout - } - if stderr == nil { - stderr = os.Stderr - } + stdout = defaultWriter(stdout, os.Stdout) + stderr = defaultWriter(stderr, os.Stderr) var count int for _, r := range results { switch v := r.(type) { diff --git a/go.mod b/go.mod index 63271c4c..dbc54ab2 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( require ( github.com/anchore/syft v1.10.0 - github.com/go-git/go-git/v5 v5.16.4 + github.com/go-git/go-git/v5 v5.16.5 github.com/xeol-io/xeol v0.10.8 ) diff --git a/go.sum b/go.sum index 36c7d9bf..0009d521 100644 --- a/go.sum +++ b/go.sum @@ -1691,8 +1691,8 @@ github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UN github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.16.4 h1:7ajIEZHZJULcyJebDLo99bGgS0jRrOxzZG4uCk2Yb2Y= -github.com/go-git/go-git/v5 v5.16.4/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8= +github.com/go-git/go-git/v5 v5.16.5 h1:mdkuqblwr57kVfXri5TTH+nMFLNUxIj9Z7F5ykFbw5s= +github.com/go-git/go-git/v5 v5.16.5/go.mod h1:QOMLpNf1qxuSY4StA/ArOdfFR2TrKEjJiye2kel2m+M= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/internal/tool/eol_scanner.go b/internal/tool/eol_scanner.go index e90b2519..428c1907 100644 --- a/internal/tool/eol_scanner.go +++ b/internal/tool/eol_scanner.go @@ -23,11 +23,11 @@ const ( // EOLRunner runs an EOL scan on an SBOM file and returns matches. // Production implementation execs the xeol CLI; tests use a mock. type EOLRunner interface { - Run(sbomPath string) ([]eolMatch, error) + Run(sbomPath string) ([]EolMatch, error) } -// eolMatch represents one EOL finding from xeol (package + cycle EOL date). -type eolMatch struct { +// EolMatch represents one EOL finding from xeol (package + cycle EOL date). +type EolMatch struct { PURL string // package URL for matching to report Name string Version string @@ -95,8 +95,18 @@ func writeSBOMToTemp(bom *cdx.BOM) (sbomPath string, cleanup func(), errResult [ return sbomPath, cleanup, nil } +func collectIssuesFromMatches(matches []EolMatch, report ptypes.Report, sourceDir string, purlToLocation map[string]pkgLocation) []codacy.Issue { + var issues []codacy.Issue + for _, m := range matches { + if issue, ok := matchToIssue(m, report, sourceDir, purlToLocation); ok { + issues = append(issues, issue) + } + } + return issues +} + // matchToIssue converts one EOL match to a Codacy issue if location can be resolved. Returns (issue, true) or (zero, false). -func matchToIssue(m eolMatch, report ptypes.Report, sourceDir string, purlToLocation map[string]pkgLocation) (codacy.Issue, bool) { +func matchToIssue(m EolMatch, report ptypes.Report, sourceDir string, purlToLocation map[string]pkgLocation) (codacy.Issue, bool) { ruleID, err := severityFromEolDate(m.EolDate) if err != nil { return codacy.Issue{}, false @@ -144,12 +154,7 @@ func (s *EOLScanner) Scan(report ptypes.Report, toolExecution codacy.ToolExecuti return []codacy.Result{codacy.FileError{File: "", Message: fmt.Sprintf("EOL scan failed: %v", err)}} } purlToLocation := buildPURLToLocation(report) - var issues []codacy.Issue - for _, m := range matches { - if issue, ok := matchToIssue(m, report, toolExecution.SourceDir, purlToLocation); ok { - issues = append(issues, issue) - } - } + issues := collectIssuesFromMatches(matches, report, toolExecution.SourceDir, purlToLocation) return mapIssuesWithoutLineNumber(filterIssuesFromKnownFiles(issues, *toolExecution.Files)) } @@ -226,16 +231,16 @@ type XeolCLIRunner struct { } // Run executes xeol sbom: -o json --lookahead 365d and parses matches. -func (r *XeolCLIRunner) Run(sbomPath string) ([]eolMatch, error) { +func (r *XeolCLIRunner) Run(sbomPath string) ([]EolMatch, error) { return runXeolCLI(r.ExecPath, sbomPath, r.Env) } // runXeolCLI is the actual CLI invocation (testable with exec). -var runXeolCLI = func(execPath, sbomPath string, env []string) ([]eolMatch, error) { +var runXeolCLI = func(execPath, sbomPath string, env []string) ([]EolMatch, error) { return runXeolCLIImpl(execPath, sbomPath, env) } -func runXeolCLIImpl(execPath, sbomPath string, env []string) ([]eolMatch, error) { +func runXeolCLIImpl(execPath, sbomPath string, env []string) ([]EolMatch, error) { if execPath == "" { execPath = "xeol" } @@ -254,13 +259,13 @@ func runXeolCLIImpl(execPath, sbomPath string, env []string) ([]eolMatch, error) return nil, fmt.Errorf("xeol exit: %w", err) } - matches := make([]eolMatch, 0, len(out.Matches)) + matches := make([]EolMatch, 0, len(out.Matches)) for _, m := range out.Matches { purl := m.Package.PURL if purl == "" { purl = "pkg:generic/" + m.Package.Name + "@" + m.Package.Version } - matches = append(matches, eolMatch{ + matches = append(matches, EolMatch{ PURL: purl, Name: m.Package.Name, Version: m.Package.Version, diff --git a/internal/tool/eol_scanner_test.go b/internal/tool/eol_scanner_test.go index a624221d..eafaf4d7 100644 --- a/internal/tool/eol_scanner_test.go +++ b/internal/tool/eol_scanner_test.go @@ -57,7 +57,7 @@ func TestSeverityFromEolDate(t *testing.T) { } func TestEOLScanner_Scan_NoPatternEnabled(t *testing.T) { - mockRunner := &mockEOLRunner{matches: []eolMatch{ + mockRunner := &mockEOLRunner{matches: []EolMatch{ {PURL: "pkg:npm/lodash@4.17.21", Name: "lodash", Version: "4.17.21", EolDate: "2024-01-01"}, }} s := NewEOLScanner(mockRunner) @@ -92,7 +92,7 @@ func TestEOLScanner_Scan_WithMockRunner(t *testing.T) { }, }, } - mockRunner := &mockEOLRunner{matches: []eolMatch{ + mockRunner := &mockEOLRunner{matches: []EolMatch{ {PURL: purlStr, Name: "lodash", Version: "4.17.21", EolDate: "2024-06-01", CycleID: "4.x"}, }} s := NewEOLScanner(mockRunner) @@ -147,7 +147,7 @@ func TestEOLScanner_Scan_SeverityBands(t *testing.T) { {now.AddDate(1, 0, 0).Format("2006-01-02"), ruleIDEOLMinor}, } for _, b := range bands { - mockRunner := &mockEOLRunner{matches: []eolMatch{{PURL: purlStr, Name: "pkg", Version: "1.0.0", EolDate: b.eolDate}}} + mockRunner := &mockEOLRunner{matches: []EolMatch{{PURL: purlStr, Name: "pkg", Version: "1.0.0", EolDate: b.eolDate}}} s := NewEOLScanner(mockRunner) result := s.Scan(report, te, bom) assert.Len(t, result, 1, "eol date %s should produce one issue", b.eolDate) @@ -172,7 +172,7 @@ func TestEOLScanner_Scan_FiltersKnownFiles(t *testing.T) { }, }, } - mockRunner := &mockEOLRunner{matches: []eolMatch{ + mockRunner := &mockEOLRunner{matches: []EolMatch{ {PURL: "pkg:npm/eol-pkg@1.0.0", Name: "eol-pkg", Version: "1.0.0", EolDate: "2024-01-01"}, }} s := NewEOLScanner(mockRunner) @@ -229,7 +229,7 @@ func TestEOLScanner_Scan_NoLineNumberBecomesFileError(t *testing.T) { } dir := t.TempDir() // No file with "no-line-pkg" in content -> fallback returns 0 - mockRunner := &mockEOLRunner{matches: []eolMatch{ + mockRunner := &mockEOLRunner{matches: []EolMatch{ {PURL: purl.ToString(), Name: "no-line-pkg", Version: "1.0.0", EolDate: "2024-01-01"}, }} s := NewEOLScanner(mockRunner) @@ -291,11 +291,11 @@ func TestFindLocationByPackage(t *testing.T) { } type mockEOLRunner struct { - matches []eolMatch + matches []EolMatch called bool } -func (m *mockEOLRunner) Run(sbomPath string) ([]eolMatch, error) { +func (m *mockEOLRunner) Run(_ string) ([]EolMatch, error) { m.called = true return m.matches, nil } diff --git a/internal/tool/eol_xeol_lib.go b/internal/tool/eol_xeol_lib.go index 065517b0..4065dbc7 100644 --- a/internal/tool/eol_xeol_lib.go +++ b/internal/tool/eol_xeol_lib.go @@ -30,13 +30,13 @@ type XeolLibraryRunner struct { } // Run decodes the SBOM at sbomPath, loads the xeol DB, runs FindEol, and returns eolMatch slice. -func (r *XeolLibraryRunner) Run(sbomPath string) ([]eolMatch, error) { +func (r *XeolLibraryRunner) Run(sbomPath string) ([]EolMatch, error) { packages, err := r.packagesFromSBOM(sbomPath) if err != nil { return nil, err } if len(packages) == 0 { - return []eolMatch{}, nil + return []EolMatch{}, nil } store, closer, err := r.loadStore() @@ -125,14 +125,14 @@ func (r *XeolLibraryRunner) dbConfig() db.Config { } } -func libMatchesToEolMatch(m match.Matches) []eolMatch { - out := make([]eolMatch, 0, m.Count()) +func libMatchesToEolMatch(m match.Matches) []EolMatch { + out := make([]EolMatch, 0, m.Count()) for m := range m.Enumerate() { purl := m.Package.PURL if purl == "" { purl = "pkg:generic/" + m.Package.Name + "@" + m.Package.Version } - out = append(out, eolMatch{ + out = append(out, EolMatch{ PURL: purl, Name: m.Package.Name, Version: m.Package.Version, From 67813f2d594024673e9010e6b1bba41f18552467 Mon Sep 17 00:00:00 2001 From: Kendrick Curtis Date: Thu, 5 Mar 2026 13:15:38 +0000 Subject: [PATCH 5/5] removed node_modules from test projects --- .../node_modules/.bin/blocking-proxy | 1 - test-eol-project/node_modules/.bin/jasmine | 1 - test-eol-project/node_modules/.bin/protractor | 1 - test-eol-project/node_modules/.bin/rimraf | 1 - test-eol-project/node_modules/.bin/semver | 1 - test-eol-project/node_modules/.bin/sshpk-conv | 1 - test-eol-project/node_modules/.bin/sshpk-sign | 1 - .../node_modules/.bin/sshpk-verify | 1 - test-eol-project/node_modules/.bin/uuid | 1 - .../node_modules/.bin/webdriver-manager | 1 - .../node_modules/.package-lock.json | 1547 --- .../node_modules/@types/q/README.md | 18 - .../node_modules/@types/q/index.d.ts | 360 - .../node_modules/@types/q/package.json | 17 - .../node_modules/@types/q/types-metadata.json | 23 - .../@types/selenium-webdriver/LICENSE | 21 - .../@types/selenium-webdriver/README.md | 15 - .../@types/selenium-webdriver/chrome.d.ts | 360 - .../@types/selenium-webdriver/edge.d.ts | 96 - .../@types/selenium-webdriver/firefox.d.ts | 337 - .../@types/selenium-webdriver/http.d.ts | 159 - .../@types/selenium-webdriver/ie.d.ts | 211 - .../@types/selenium-webdriver/index.d.ts | 4775 ------- .../@types/selenium-webdriver/opera.d.ts | 180 - .../@types/selenium-webdriver/package.json | 50 - .../@types/selenium-webdriver/remote.d.ts | 239 - .../@types/selenium-webdriver/safari.d.ts | 90 - .../@types/selenium-webdriver/testing.d.ts | 106 - test-eol-project/node_modules/adm-zip/LICENSE | 21 - .../node_modules/adm-zip/README.md | 87 - .../node_modules/adm-zip/adm-zip.js | 949 -- .../adm-zip/headers/entryHeader.js | 374 - .../node_modules/adm-zip/headers/index.js | 2 - .../adm-zip/headers/mainHeader.js | 130 - .../node_modules/adm-zip/methods/deflater.js | 33 - .../node_modules/adm-zip/methods/index.js | 3 - .../node_modules/adm-zip/methods/inflater.js | 34 - .../node_modules/adm-zip/methods/zipcrypto.js | 175 - .../node_modules/adm-zip/package.json | 49 - .../node_modules/adm-zip/util/constants.js | 142 - .../node_modules/adm-zip/util/decoder.js | 5 - .../node_modules/adm-zip/util/errors.js | 63 - .../node_modules/adm-zip/util/fattr.js | 76 - .../node_modules/adm-zip/util/index.js | 5 - .../node_modules/adm-zip/util/utils.js | 336 - .../node_modules/adm-zip/zipEntry.js | 405 - .../node_modules/adm-zip/zipFile.js | 446 - .../node_modules/agent-base/.travis.yml | 24 - .../node_modules/agent-base/History.md | 113 - .../node_modules/agent-base/README.md | 145 - .../node_modules/agent-base/index.d.ts | 43 - .../node_modules/agent-base/index.js | 170 - .../node_modules/agent-base/package.json | 37 - .../node_modules/agent-base/patch-core.js | 51 - .../agent-base/test/ssl-cert-snakeoil.key | 15 - .../agent-base/test/ssl-cert-snakeoil.pem | 12 - .../node_modules/agent-base/test/test.js | 728 - .../node_modules/ajv/.tonic_example.js | 20 - test-eol-project/node_modules/ajv/LICENSE | 22 - test-eol-project/node_modules/ajv/README.md | 1505 -- .../node_modules/ajv/dist/ajv.bundle.js | 7201 ---------- .../node_modules/ajv/dist/ajv.min.js | 3 - .../node_modules/ajv/dist/ajv.min.js.map | 1 - .../node_modules/ajv/lib/ajv.d.ts | 402 - test-eol-project/node_modules/ajv/lib/ajv.js | 506 - .../node_modules/ajv/lib/cache.js | 26 - .../node_modules/ajv/lib/compile/async.js | 90 - .../node_modules/ajv/lib/compile/equal.js | 5 - .../ajv/lib/compile/error_classes.js | 34 - .../node_modules/ajv/lib/compile/formats.js | 142 - .../node_modules/ajv/lib/compile/index.js | 389 - .../node_modules/ajv/lib/compile/resolve.js | 270 - .../node_modules/ajv/lib/compile/rules.js | 66 - .../ajv/lib/compile/schema_obj.js | 9 - .../ajv/lib/compile/ucs2length.js | 20 - .../node_modules/ajv/lib/compile/util.js | 239 - test-eol-project/node_modules/ajv/lib/data.js | 49 - .../node_modules/ajv/lib/definition_schema.js | 37 - .../node_modules/ajv/lib/dot/_limit.jst | 113 - .../node_modules/ajv/lib/dot/_limitItems.jst | 12 - .../node_modules/ajv/lib/dot/_limitLength.jst | 12 - .../ajv/lib/dot/_limitProperties.jst | 12 - .../node_modules/ajv/lib/dot/allOf.jst | 32 - .../node_modules/ajv/lib/dot/anyOf.jst | 46 - .../node_modules/ajv/lib/dot/coerce.def | 51 - .../node_modules/ajv/lib/dot/comment.jst | 9 - .../node_modules/ajv/lib/dot/const.jst | 11 - .../node_modules/ajv/lib/dot/contains.jst | 55 - .../node_modules/ajv/lib/dot/custom.jst | 191 - .../node_modules/ajv/lib/dot/defaults.def | 47 - .../node_modules/ajv/lib/dot/definitions.def | 203 - .../node_modules/ajv/lib/dot/dependencies.jst | 79 - .../node_modules/ajv/lib/dot/enum.jst | 30 - .../node_modules/ajv/lib/dot/errors.def | 194 - .../node_modules/ajv/lib/dot/format.jst | 106 - .../node_modules/ajv/lib/dot/if.jst | 73 - .../node_modules/ajv/lib/dot/items.jst | 98 - .../node_modules/ajv/lib/dot/missing.def | 39 - .../node_modules/ajv/lib/dot/multipleOf.jst | 22 - .../node_modules/ajv/lib/dot/not.jst | 43 - .../node_modules/ajv/lib/dot/oneOf.jst | 54 - .../node_modules/ajv/lib/dot/pattern.jst | 25 - .../node_modules/ajv/lib/dot/properties.jst | 245 - .../ajv/lib/dot/propertyNames.jst | 52 - .../node_modules/ajv/lib/dot/ref.jst | 85 - .../node_modules/ajv/lib/dot/required.jst | 108 - .../node_modules/ajv/lib/dot/uniqueItems.jst | 62 - .../node_modules/ajv/lib/dot/validate.jst | 276 - .../node_modules/ajv/lib/dotjs/README.md | 3 - .../node_modules/ajv/lib/dotjs/_limit.js | 163 - .../node_modules/ajv/lib/dotjs/_limitItems.js | 80 - .../ajv/lib/dotjs/_limitLength.js | 85 - .../ajv/lib/dotjs/_limitProperties.js | 80 - .../node_modules/ajv/lib/dotjs/allOf.js | 42 - .../node_modules/ajv/lib/dotjs/anyOf.js | 73 - .../node_modules/ajv/lib/dotjs/comment.js | 14 - .../node_modules/ajv/lib/dotjs/const.js | 56 - .../node_modules/ajv/lib/dotjs/contains.js | 81 - .../node_modules/ajv/lib/dotjs/custom.js | 228 - .../ajv/lib/dotjs/dependencies.js | 168 - .../node_modules/ajv/lib/dotjs/enum.js | 66 - .../node_modules/ajv/lib/dotjs/format.js | 150 - .../node_modules/ajv/lib/dotjs/if.js | 103 - .../node_modules/ajv/lib/dotjs/index.js | 33 - .../node_modules/ajv/lib/dotjs/items.js | 140 - .../node_modules/ajv/lib/dotjs/multipleOf.js | 80 - .../node_modules/ajv/lib/dotjs/not.js | 84 - .../node_modules/ajv/lib/dotjs/oneOf.js | 73 - .../node_modules/ajv/lib/dotjs/pattern.js | 85 - .../node_modules/ajv/lib/dotjs/properties.js | 335 - .../ajv/lib/dotjs/propertyNames.js | 81 - .../node_modules/ajv/lib/dotjs/ref.js | 124 - .../node_modules/ajv/lib/dotjs/required.js | 270 - .../node_modules/ajv/lib/dotjs/uniqueItems.js | 86 - .../node_modules/ajv/lib/dotjs/validate.js | 482 - .../node_modules/ajv/lib/keyword.js | 146 - .../node_modules/ajv/lib/refs/data.json | 17 - .../ajv/lib/refs/json-schema-draft-04.json | 149 - .../ajv/lib/refs/json-schema-draft-06.json | 154 - .../ajv/lib/refs/json-schema-draft-07.json | 168 - .../ajv/lib/refs/json-schema-secure.json | 94 - .../node_modules/ajv/package.json | 107 - .../node_modules/ajv/scripts/.eslintrc.yml | 3 - .../node_modules/ajv/scripts/bundle.js | 61 - .../node_modules/ajv/scripts/compile-dots.js | 73 - .../node_modules/ajv/scripts/info | 10 - .../node_modules/ajv/scripts/prepare-tests | 12 - .../ajv/scripts/publish-built-version | 32 - .../node_modules/ajv/scripts/travis-gh-pages | 23 - .../node_modules/ansi-regex/index.js | 4 - .../node_modules/ansi-regex/license | 21 - .../node_modules/ansi-regex/package.json | 64 - .../node_modules/ansi-regex/readme.md | 39 - .../node_modules/ansi-styles/index.js | 65 - .../node_modules/ansi-styles/license | 21 - .../node_modules/ansi-styles/package.json | 50 - .../node_modules/ansi-styles/readme.md | 86 - .../node_modules/array-union/index.js | 6 - .../node_modules/array-union/license | 21 - .../node_modules/array-union/package.json | 40 - .../node_modules/array-union/readme.md | 28 - .../node_modules/array-uniq/index.js | 62 - .../node_modules/array-uniq/license | 21 - .../node_modules/array-uniq/package.json | 37 - .../node_modules/array-uniq/readme.md | 30 - test-eol-project/node_modules/arrify/index.js | 8 - test-eol-project/node_modules/arrify/license | 21 - .../node_modules/arrify/package.json | 33 - .../node_modules/arrify/readme.md | 36 - .../node_modules/asn1/Jenkinsfile | 65 - test-eol-project/node_modules/asn1/LICENSE | 19 - test-eol-project/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 | 31 - .../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 | 23 - .../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 - .../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 | 63 - .../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/aws-sign2/LICENSE | 55 - .../node_modules/aws-sign2/README.md | 4 - .../node_modules/aws-sign2/index.js | 212 - .../node_modules/aws-sign2/package.json | 17 - test-eol-project/node_modules/aws4/LICENSE | 19 - test-eol-project/node_modules/aws4/README.md | 211 - test-eol-project/node_modules/aws4/aws4.js | 383 - test-eol-project/node_modules/aws4/lru.js | 96 - .../node_modules/aws4/package.json | 21 - .../balanced-match/.github/FUNDING.yml | 2 - .../node_modules/balanced-match/LICENSE.md | 21 - .../node_modules/balanced-match/README.md | 97 - .../node_modules/balanced-match/index.js | 62 - .../node_modules/balanced-match/package.json | 48 - .../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 | 15 - .../node_modules/blocking-proxy/.clang-format | 3 - .../node_modules/blocking-proxy/.nvmrc | 1 - .../node_modules/blocking-proxy/LICENSE | 21 - .../node_modules/blocking-proxy/README.md | 90 - .../built/lib/angular_wait_barrier.d.ts | 44 - .../built/lib/angular_wait_barrier.js | 108 - .../built/lib/angular_wait_barrier.js.map | 1 - .../blocking-proxy/built/lib/bin.d.ts | 0 .../blocking-proxy/built/lib/bin.js | 28 - .../blocking-proxy/built/lib/bin.js.map | 1 - .../built/lib/blockingproxy.d.ts | 41 - .../blocking-proxy/built/lib/blockingproxy.js | 119 - .../built/lib/blockingproxy.js.map | 1 - .../blocking-proxy/built/lib/client.d.ts | 20 - .../blocking-proxy/built/lib/client.js | 68 - .../blocking-proxy/built/lib/client.js.map | 1 - .../built/lib/client_scripts/highlight.js | 29 - .../built/lib/client_scripts/wait.js | 180 - .../blocking-proxy/built/lib/config.d.ts | 10 - .../blocking-proxy/built/lib/config.js | 40 - .../blocking-proxy/built/lib/config.js.map | 1 - .../built/lib/highlight_delay_barrier.d.ts | 18 - .../built/lib/highlight_delay_barrier.js | 67 - .../built/lib/highlight_delay_barrier.js.map | 1 - .../blocking-proxy/built/lib/index.d.ts | 2 - .../blocking-proxy/built/lib/index.js | 7 - .../blocking-proxy/built/lib/index.js.map | 1 - .../built/lib/simple_webdriver_client.d.ts | 39 - .../built/lib/simple_webdriver_client.js | 96 - .../built/lib/simple_webdriver_client.js.map | 1 - .../built/lib/webdriver_commands.d.ts | 67 - .../built/lib/webdriver_commands.js | 212 - .../built/lib/webdriver_commands.js.map | 1 - .../built/lib/webdriver_logger.d.ts | 35 - .../built/lib/webdriver_logger.js | 152 - .../built/lib/webdriver_logger.js.map | 1 - .../built/lib/webdriver_proxy.d.ts | 24 - .../built/lib/webdriver_proxy.js | 81 - .../built/lib/webdriver_proxy.js.map | 1 - .../node_modules/blocking-proxy/circle.yml | 29 - .../blocking-proxy/examples/README.md | 22 - .../blocking-proxy/examples/e2e_test.py | 31 - .../blocking-proxy/examples/run_example.sh | 22 - .../node_modules/blocking-proxy/gulpfile.js | 65 - .../node_modules/blocking-proxy/package.json | 73 - .../node_modules/blocking-proxy/tsconfig.json | 24 - .../node_modules/blocking-proxy/tslint.json | 15 - .../node_modules/brace-expansion/LICENSE | 21 - .../node_modules/brace-expansion/README.md | 129 - .../node_modules/brace-expansion/index.js | 201 - .../node_modules/brace-expansion/package.json | 50 - .../node_modules/browserstack/.editorconfig | 11 - .../node_modules/browserstack/.jscsrc | 74 - .../node_modules/browserstack/.jshintrc | 24 - .../node_modules/browserstack/.travis.yml | 4 - .../node_modules/browserstack/LICENSE-MIT.txt | 26 - .../node_modules/browserstack/lib/api.js | 280 - .../browserstack/lib/app-automate.js | 119 - .../node_modules/browserstack/lib/automate.js | 125 - .../browserstack/lib/browserstack.js | 11 - .../node_modules/browserstack/lib/client.js | 94 - .../node_modules/browserstack/lib/extend.js | 7 - .../browserstack/lib/screenshot.js | 48 - .../node_modules/browserstack/package.json | 41 - .../node_modules/browserstack/readme.md | 477 - .../node_modules/browserstack/test/api.js | 352 - .../node_modules/browserstack/test/client.js | 76 - .../browserstack/test/screenshot.js | 95 - .../node_modules/browserstack/test/util.js | 134 - .../node_modules/camelcase/index.d.ts | 63 - .../node_modules/camelcase/index.js | 76 - .../node_modules/camelcase/license | 9 - .../node_modules/camelcase/package.json | 43 - .../node_modules/camelcase/readme.md | 99 - .../node_modules/caseless/LICENSE | 28 - .../node_modules/caseless/README.md | 45 - .../node_modules/caseless/index.js | 67 - .../node_modules/caseless/package.json | 27 - .../node_modules/caseless/test.js | 67 - test-eol-project/node_modules/chalk/index.js | 116 - test-eol-project/node_modules/chalk/license | 21 - .../node_modules/chalk/package.json | 70 - test-eol-project/node_modules/chalk/readme.md | 213 - .../node_modules/cliui/CHANGELOG.md | 76 - .../node_modules/cliui/LICENSE.txt | 14 - test-eol-project/node_modules/cliui/README.md | 115 - test-eol-project/node_modules/cliui/index.js | 354 - .../cliui/node_modules/ansi-regex/index.d.ts | 37 - .../cliui/node_modules/ansi-regex/index.js | 10 - .../cliui/node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 55 - .../cliui/node_modules/ansi-regex/readme.md | 78 - .../cliui/node_modules/strip-ansi/index.d.ts | 17 - .../cliui/node_modules/strip-ansi/index.js | 4 - .../cliui/node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 54 - .../cliui/node_modules/strip-ansi/readme.md | 46 - .../node_modules/cliui/package.json | 65 - .../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 | 48 - .../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 | 28 - .../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 | 25 - .../node_modules/combined-stream/yarn.lock | 17 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 43 - .../node_modules/concat-map/test/map.js | 39 - .../node_modules/core-util-is/LICENSE | 19 - .../node_modules/core-util-is/README.md | 3 - .../node_modules/core-util-is/lib/util.js | 107 - .../node_modules/core-util-is/package.json | 38 - .../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 | 26 - .../node_modules/debug/CHANGELOG.md | 395 - test-eol-project/node_modules/debug/LICENSE | 19 - test-eol-project/node_modules/debug/README.md | 437 - test-eol-project/node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 51 - .../node_modules/debug/src/browser.js | 180 - .../node_modules/debug/src/common.js | 249 - .../node_modules/debug/src/index.js | 12 - .../node_modules/debug/src/node.js | 177 - .../node_modules/decamelize/index.js | 13 - .../node_modules/decamelize/license | 21 - .../node_modules/decamelize/package.json | 38 - .../node_modules/decamelize/readme.md | 48 - test-eol-project/node_modules/del/index.js | 73 - test-eol-project/node_modules/del/license | 21 - .../node_modules/del/package.json | 61 - test-eol-project/node_modules/del/readme.md | 106 - .../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 | 27 - .../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 | 40 - .../node_modules/ecc-jsbn/test.js | 14 - .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 - .../node_modules/emoji-regex/README.md | 73 - .../node_modules/emoji-regex/es2015/index.js | 6 - .../node_modules/emoji-regex/es2015/text.js | 6 - .../node_modules/emoji-regex/index.d.ts | 23 - .../node_modules/emoji-regex/index.js | 6 - .../node_modules/emoji-regex/package.json | 50 - .../node_modules/emoji-regex/text.js | 6 - .../node_modules/es6-promise/CHANGELOG.md | 155 - .../node_modules/es6-promise/LICENSE | 19 - .../node_modules/es6-promise/README.md | 97 - .../node_modules/es6-promise/auto.js | 4 - .../es6-promise/dist/es6-promise.auto.js | 1176 -- .../es6-promise/dist/es6-promise.auto.map | 1 - .../es6-promise/dist/es6-promise.auto.min.js | 1 - .../es6-promise/dist/es6-promise.auto.min.map | 1 - .../es6-promise/dist/es6-promise.js | 1174 -- .../es6-promise/dist/es6-promise.map | 1 - .../es6-promise/dist/es6-promise.min.js | 1 - .../es6-promise/dist/es6-promise.min.map | 1 - .../node_modules/es6-promise/es6-promise.d.ts | 85 - .../es6-promise/lib/es6-promise.auto.js | 3 - .../es6-promise/lib/es6-promise.js | 7 - .../es6-promise/lib/es6-promise/-internal.js | 243 - .../es6-promise/lib/es6-promise/asap.js | 119 - .../es6-promise/lib/es6-promise/enumerator.js | 124 - .../es6-promise/lib/es6-promise/polyfill.js | 35 - .../es6-promise/lib/es6-promise/promise.js | 431 - .../lib/es6-promise/promise/all.js | 52 - .../lib/es6-promise/promise/race.js | 84 - .../lib/es6-promise/promise/reject.js | 46 - .../lib/es6-promise/promise/resolve.js | 48 - .../es6-promise/lib/es6-promise/then.js | 32 - .../es6-promise/lib/es6-promise/utils.js | 21 - .../node_modules/es6-promise/package.json | 78 - .../node_modules/es6-promisify/README.md | 89 - .../es6-promisify/dist/promise.js | 73 - .../es6-promisify/dist/promisify.js | 85 - .../node_modules/es6-promisify/package.json | 41 - .../escape-string-regexp/index.js | 11 - .../node_modules/escape-string-regexp/license | 21 - .../escape-string-regexp/package.json | 41 - .../escape-string-regexp/readme.md | 27 - test-eol-project/node_modules/exit/.jshintrc | 14 - test-eol-project/node_modules/exit/.npmignore | 0 .../node_modules/exit/.travis.yml | 6 - .../node_modules/exit/Gruntfile.js | 48 - .../node_modules/exit/LICENSE-MIT | 22 - test-eol-project/node_modules/exit/README.md | 75 - .../node_modules/exit/lib/exit.js | 41 - .../node_modules/exit/package.json | 47 - .../node_modules/exit/test/exit_test.js | 121 - .../exit/test/fixtures/10-stderr.txt | 10 - .../exit/test/fixtures/10-stdout-stderr.txt | 20 - .../exit/test/fixtures/10-stdout.txt | 10 - .../exit/test/fixtures/100-stderr.txt | 100 - .../exit/test/fixtures/100-stdout-stderr.txt | 200 - .../exit/test/fixtures/100-stdout.txt | 100 - .../exit/test/fixtures/1000-stderr.txt | 1000 -- .../exit/test/fixtures/1000-stdout-stderr.txt | 2000 --- .../exit/test/fixtures/1000-stdout.txt | 1000 -- .../exit/test/fixtures/create-files.sh | 8 - .../exit/test/fixtures/log-broken.js | 23 - .../node_modules/exit/test/fixtures/log.js | 25 - .../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 - test-eol-project/node_modules/extend/LICENSE | 23 - .../node_modules/extend/README.md | 81 - .../node_modules/extend/component.json | 32 - test-eol-project/node_modules/extend/index.js | 117 - .../node_modules/extend/package.json | 42 - .../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 | 14 - .../node_modules/fast-deep-equal/LICENSE | 21 - .../node_modules/fast-deep-equal/README.md | 96 - .../fast-deep-equal/es6/index.d.ts | 2 - .../node_modules/fast-deep-equal/es6/index.js | 72 - .../fast-deep-equal/es6/react.d.ts | 2 - .../node_modules/fast-deep-equal/es6/react.js | 79 - .../node_modules/fast-deep-equal/index.d.ts | 4 - .../node_modules/fast-deep-equal/index.js | 46 - .../node_modules/fast-deep-equal/package.json | 61 - .../node_modules/fast-deep-equal/react.d.ts | 2 - .../node_modules/fast-deep-equal/react.js | 53 - .../fast-json-stable-stringify/.eslintrc.yml | 26 - .../.github/FUNDING.yml | 1 - .../fast-json-stable-stringify/.travis.yml | 8 - .../fast-json-stable-stringify/LICENSE | 21 - .../fast-json-stable-stringify/README.md | 131 - .../benchmark/index.js | 31 - .../benchmark/test.json | 137 - .../example/key_cmp.js | 7 - .../example/nested.js | 3 - .../fast-json-stable-stringify/example/str.js | 3 - .../example/value_cmp.js | 7 - .../fast-json-stable-stringify/index.d.ts | 4 - .../fast-json-stable-stringify/index.js | 59 - .../fast-json-stable-stringify/package.json | 52 - .../fast-json-stable-stringify/test/cmp.js | 13 - .../fast-json-stable-stringify/test/nested.js | 44 - .../fast-json-stable-stringify/test/str.js | 46 - .../test/to-json.js | 22 - .../node_modules/find-up/index.d.ts | 137 - .../node_modules/find-up/index.js | 89 - test-eol-project/node_modules/find-up/license | 9 - .../node_modules/find-up/package.json | 53 - .../node_modules/find-up/readme.md | 156 - .../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 | 17 - .../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 | 65 - .../node_modules/form-data/yarn.lock | 2662 ---- .../node_modules/fs.realpath/LICENSE | 43 - .../node_modules/fs.realpath/README.md | 33 - .../node_modules/fs.realpath/index.js | 66 - .../node_modules/fs.realpath/old.js | 303 - .../node_modules/fs.realpath/package.json | 26 - .../node_modules/get-caller-file/LICENSE.md | 6 - .../node_modules/get-caller-file/README.md | 41 - .../node_modules/get-caller-file/index.d.ts | 2 - .../node_modules/get-caller-file/index.js | 22 - .../node_modules/get-caller-file/index.js.map | 1 - .../node_modules/get-caller-file/package.json | 42 - .../node_modules/getpass/.npmignore | 8 - .../node_modules/getpass/.travis.yml | 9 - test-eol-project/node_modules/getpass/LICENSE | 18 - .../node_modules/getpass/README.md | 32 - .../node_modules/getpass/lib/index.js | 123 - .../node_modules/getpass/package.json | 18 - test-eol-project/node_modules/glob/LICENSE | 21 - test-eol-project/node_modules/glob/README.md | 378 - test-eol-project/node_modules/glob/common.js | 238 - test-eol-project/node_modules/glob/glob.js | 790 -- .../node_modules/glob/package.json | 55 - test-eol-project/node_modules/glob/sync.js | 486 - test-eol-project/node_modules/globby/index.js | 65 - test-eol-project/node_modules/globby/license | 21 - .../node_modules/globby/package.json | 70 - .../node_modules/globby/readme.md | 82 - .../node_modules/har-schema/LICENSE | 13 - .../node_modules/har-schema/README.md | 49 - .../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 - .../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 | 54 - .../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 | 43 - .../node_modules/has-ansi/index.js | 4 - .../node_modules/has-ansi/license | 21 - .../node_modules/has-ansi/package.json | 55 - .../node_modules/has-ansi/readme.md | 36 - .../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 - .../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 | 39 - .../https-proxy-agent/.editorconfig | 37 - .../https-proxy-agent/.eslintrc.js | 86 - .../node_modules/https-proxy-agent/History.md | 124 - .../node_modules/https-proxy-agent/README.md | 137 - .../node_modules/https-proxy-agent/index.d.ts | 22 - .../node_modules/https-proxy-agent/index.js | 241 - .../https-proxy-agent/package.json | 36 - .../node_modules/immediate/LICENSE.txt | 20 - .../node_modules/immediate/README.md | 93 - .../node_modules/immediate/dist/immediate.js | 75 - .../immediate/dist/immediate.min.js | 1 - .../node_modules/immediate/lib/browser.js | 69 - .../node_modules/immediate/lib/index.js | 73 - .../node_modules/immediate/package.json | 42 - .../node_modules/inflight/LICENSE | 15 - .../node_modules/inflight/README.md | 37 - .../node_modules/inflight/inflight.js | 54 - .../node_modules/inflight/package.json | 29 - .../node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 9 - .../node_modules/inherits/inherits_browser.js | 27 - .../node_modules/inherits/package.json | 29 - test-eol-project/node_modules/ini/LICENSE | 15 - test-eol-project/node_modules/ini/README.md | 102 - test-eol-project/node_modules/ini/ini.js | 206 - .../node_modules/ini/package.json | 33 - .../is-fullwidth-code-point/index.d.ts | 17 - .../is-fullwidth-code-point/index.js | 50 - .../is-fullwidth-code-point/license | 9 - .../is-fullwidth-code-point/package.json | 42 - .../is-fullwidth-code-point/readme.md | 39 - .../node_modules/is-path-cwd/index.js | 6 - .../node_modules/is-path-cwd/package.json | 33 - .../node_modules/is-path-cwd/readme.md | 28 - .../node_modules/is-path-in-cwd/index.js | 6 - .../node_modules/is-path-in-cwd/license | 21 - .../node_modules/is-path-in-cwd/package.json | 38 - .../node_modules/is-path-in-cwd/readme.md | 31 - .../node_modules/is-path-inside/index.js | 14 - .../node_modules/is-path-inside/license | 21 - .../node_modules/is-path-inside/package.json | 37 - .../node_modules/is-path-inside/readme.md | 34 - .../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 | 30 - .../node_modules/is-typedarray/test.js | 34 - .../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 | 45 - test-eol-project/node_modules/isarray/test.js | 20 - .../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 | 33 - .../node_modules/isstream/test.js | 168 - .../jasmine-core/.codeclimate.yml | 16 - .../node_modules/jasmine-core/.editorconfig | 16 - .../jasmine-core/.github/CONTRIBUTING.md | 139 - .../jasmine-core/.github/ISSUE_TEMPLATE.md | 44 - .../.github/PULL_REQUEST_TEMPLATE.md | 30 - .../node_modules/jasmine-core/.npmignore | 28 - .../jasmine-core/CODE_OF_CONDUCT.md | 46 - .../node_modules/jasmine-core/MANIFEST.in | 5 - .../node_modules/jasmine-core/MIT.LICENSE | 20 - .../node_modules/jasmine-core/README.md | 79 - .../node_modules/jasmine-core/RELEASE.md | 76 - .../node_modules/jasmine-core/bower.json | 40 - .../images/jasmine-horizontal.png | Bin 1714 -> 0 bytes .../images/jasmine-horizontal.svg | 102 - .../jasmine-core/images/jasmine_favicon.png | Bin 1486 -> 0 bytes .../jasmine_core.egg-info/PKG-INFO | 30 - .../jasmine_core.egg-info/SOURCES.txt | 24 - .../dependency_links.txt | 1 - .../jasmine_core.egg-info/requires.txt | 2 - .../jasmine_core.egg-info/top_level.txt | 1 - .../jasmine-core/lib/console/console.js | 190 - .../jasmine-core/lib/jasmine-core.js | 37 - .../jasmine-core/lib/jasmine-core/boot.js | 155 - .../lib/jasmine_examples/Player.js | 24 - .../node_example/lib/jasmine_examples/Song.js | 9 - .../helpers/jasmine_examples/SpecHelper.js | 15 - .../spec/jasmine_examples/PlayerSpec.js | 60 - .../jasmine-core/example/spec/PlayerSpec.js | 58 - .../jasmine-core/example/spec/SpecHelper.js | 15 - .../lib/jasmine-core/example/src/Player.js | 22 - .../lib/jasmine-core/example/src/Song.js | 7 - .../lib/jasmine-core/jasmine-html.js | 499 - .../jasmine-core/lib/jasmine-core/jasmine.css | 58 - .../jasmine-core/lib/jasmine-core/jasmine.js | 5385 ------- .../jasmine-core/lib/jasmine-core/json2.js | 489 - .../lib/jasmine-core/node_boot.js | 41 - .../node_modules/jasmine-core/package.json | 34 - .../jasmine-core/requirements.txt | 1 - .../node_modules/jasmine/.travis.yml | 10 - .../node_modules/jasmine/Gruntfile.js | 44 - .../node_modules/jasmine/MIT.LICENSE | 20 - .../node_modules/jasmine/README.md | 63 - .../node_modules/jasmine/lib/command.js | 246 - .../jasmine/lib/examples/jasmine.json | 11 - .../node_modules/jasmine/lib/exit.js | 17 - .../lib/filters/console_spec_filter.js | 10 - .../node_modules/jasmine/lib/jasmine.js | 201 - .../jasmine/lib/printDeprecation.js | 3 - .../lib/reporters/completion_reporter.js | 33 - .../jasmine/lib/reporters/console_reporter.js | 240 - .../node_modules/jasmine/package.json | 33 - .../node_modules/jasmine/tasks/jasmine.js | 14 - .../node_modules/jasminewd2/CHANGELOG.md | 244 - .../node_modules/jasminewd2/LICENSE | 21 - .../node_modules/jasminewd2/README.md | 94 - .../node_modules/jasminewd2/index.js | 354 - .../node_modules/jasminewd2/maybePromise.js | 72 - .../node_modules/jasminewd2/package.json | 44 - .../node_modules/jasminewd2/scheduler.md | 68 - test-eol-project/node_modules/jsbn/.npmignore | 2 - test-eol-project/node_modules/jsbn/LICENSE | 40 - test-eol-project/node_modules/jsbn/README.md | 175 - .../node_modules/jsbn/example.html | 12 - test-eol-project/node_modules/jsbn/example.js | 3 - test-eol-project/node_modules/jsbn/index.js | 1357 -- .../node_modules/jsbn/package.json | 21 - .../json-schema-traverse/.eslintrc.yml | 27 - .../json-schema-traverse/.travis.yml | 8 - .../node_modules/json-schema-traverse/LICENSE | 21 - .../json-schema-traverse/README.md | 83 - .../json-schema-traverse/index.js | 89 - .../json-schema-traverse/package.json | 43 - .../json-schema-traverse/spec/.eslintrc.yml | 6 - .../spec/fixtures/schema.js | 125 - .../json-schema-traverse/spec/index.spec.js | 171 - .../node_modules/json-schema/LICENSE | 195 - .../node_modules/json-schema/README.md | 3 - .../node_modules/json-schema/lib/links.js | 65 - .../node_modules/json-schema/lib/validate.js | 271 - .../node_modules/json-schema/package.json | 24 - .../json-stringify-safe/.npmignore | 1 - .../json-stringify-safe/CHANGELOG.md | 14 - .../node_modules/json-stringify-safe/LICENSE | 15 - .../node_modules/json-stringify-safe/Makefile | 35 - .../json-stringify-safe/README.md | 52 - .../json-stringify-safe/package.json | 31 - .../json-stringify-safe/stringify.js | 27 - .../json-stringify-safe/test/mocha.opts | 2 - .../test/stringify_test.js | 246 - .../node_modules/jsprim/CHANGES.md | 53 - .../node_modules/jsprim/CONTRIBUTING.md | 19 - test-eol-project/node_modules/jsprim/LICENSE | 19 - .../node_modules/jsprim/README.md | 287 - .../node_modules/jsprim/lib/jsprim.js | 735 - .../node_modules/jsprim/package.json | 20 - .../node_modules/jszip/.codeclimate.yml | 16 - .../node_modules/jszip/.editorconfig | 8 - .../node_modules/jszip/.eslintrc.js | 43 - .../jszip/.github/workflows/pr.yaml | 58 - .../node_modules/jszip/.jekyll-metadata | Bin 24628 -> 0 bytes .../node_modules/jszip/.travis.yml | 17 - .../node_modules/jszip/CHANGES.md | 204 - .../node_modules/jszip/LICENSE.markdown | 651 - .../node_modules/jszip/README.markdown | 33 - test-eol-project/node_modules/jszip/deps.js | 37 - .../node_modules/jszip/dist/jszip.js | 11577 ---------------- .../node_modules/jszip/dist/jszip.min.js | 13 - test-eol-project/node_modules/jszip/graph.svg | 601 - .../node_modules/jszip/index.d.ts | 330 - .../node_modules/jszip/lib/base64.js | 106 - .../jszip/lib/compressedObject.js | 74 - .../node_modules/jszip/lib/compressions.js | 14 - .../node_modules/jszip/lib/crc32.js | 77 - .../node_modules/jszip/lib/defaults.js | 11 - .../node_modules/jszip/lib/external.js | 18 - .../node_modules/jszip/lib/flate.js | 85 - .../jszip/lib/generate/ZipFileWorker.js | 539 - .../node_modules/jszip/lib/generate/index.js | 57 - .../node_modules/jszip/lib/index.js | 55 - .../node_modules/jszip/lib/license_header.js | 11 - .../node_modules/jszip/lib/load.js | 88 - .../lib/nodejs/NodejsStreamInputAdapter.js | 74 - .../lib/nodejs/NodejsStreamOutputAdapter.js | 42 - .../node_modules/jszip/lib/nodejsUtils.js | 57 - .../node_modules/jszip/lib/object.js | 384 - .../jszip/lib/readable-stream-browser.js | 10 - .../jszip/lib/reader/ArrayReader.js | 57 - .../jszip/lib/reader/DataReader.js | 116 - .../jszip/lib/reader/NodeBufferReader.js | 19 - .../jszip/lib/reader/StringReader.js | 38 - .../jszip/lib/reader/Uint8ArrayReader.js | 22 - .../jszip/lib/reader/readerFor.js | 28 - .../node_modules/jszip/lib/signature.js | 7 - .../jszip/lib/stream/ConvertWorker.js | 26 - .../jszip/lib/stream/Crc32Probe.js | 24 - .../jszip/lib/stream/DataLengthProbe.js | 29 - .../jszip/lib/stream/DataWorker.js | 116 - .../jszip/lib/stream/GenericWorker.js | 263 - .../jszip/lib/stream/StreamHelper.js | 214 - .../node_modules/jszip/lib/support.js | 38 - .../node_modules/jszip/lib/utf8.js | 275 - .../node_modules/jszip/lib/utils.js | 501 - .../node_modules/jszip/lib/zipEntries.js | 261 - .../node_modules/jszip/lib/zipEntry.js | 293 - .../node_modules/jszip/lib/zipObject.js | 133 - .../node_modules/jszip/package.json | 67 - .../node_modules/jszip/sponsors.md | 21 - .../node_modules/jszip/tsconfig.json | 101 - .../node_modules/jszip/vendor/FileSaver.js | 247 - test-eol-project/node_modules/lie/README.md | 62 - test-eol-project/node_modules/lie/dist/lie.js | 350 - .../node_modules/lie/dist/lie.min.js | 1 - .../node_modules/lie/dist/lie.polyfill.js | 358 - .../node_modules/lie/dist/lie.polyfill.min.js | 1 - .../node_modules/lie/lib/browser.js | 273 - .../node_modules/lie/lib/index.js | 298 - test-eol-project/node_modules/lie/license.md | 7 - test-eol-project/node_modules/lie/lie.d.ts | 244 - .../node_modules/lie/package.json | 69 - test-eol-project/node_modules/lie/polyfill.js | 4 - .../node_modules/locate-path/index.d.ts | 83 - .../node_modules/locate-path/index.js | 65 - .../node_modules/locate-path/license | 9 - .../node_modules/locate-path/package.json | 45 - .../node_modules/locate-path/readme.md | 122 - .../node_modules/mime-db/HISTORY.md | 507 - test-eol-project/node_modules/mime-db/LICENSE | 23 - .../node_modules/mime-db/README.md | 100 - test-eol-project/node_modules/mime-db/db.json | 8519 ------------ .../node_modules/mime-db/index.js | 12 - .../node_modules/mime-db/package.json | 60 - .../node_modules/mime-types/HISTORY.md | 397 - .../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 | 44 - .../node_modules/minimatch/LICENSE | 15 - .../node_modules/minimatch/README.md | 267 - .../node_modules/minimatch/minimatch.js | 1005 -- .../node_modules/minimatch/package.json | 33 - .../node_modules/minimist/.eslintrc | 29 - .../node_modules/minimist/.github/FUNDING.yml | 12 - test-eol-project/node_modules/minimist/.nycrc | 14 - .../node_modules/minimist/CHANGELOG.md | 298 - .../node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/README.md | 121 - .../node_modules/minimist/example/parse.js | 4 - .../node_modules/minimist/index.js | 263 - .../node_modules/minimist/package.json | 75 - .../node_modules/minimist/test/all_bool.js | 34 - .../node_modules/minimist/test/bool.js | 177 - .../node_modules/minimist/test/dash.js | 43 - .../minimist/test/default_bool.js | 37 - .../node_modules/minimist/test/dotted.js | 24 - .../node_modules/minimist/test/kv_short.js | 32 - .../node_modules/minimist/test/long.js | 33 - .../node_modules/minimist/test/num.js | 38 - .../node_modules/minimist/test/parse.js | 209 - .../minimist/test/parse_modified.js | 11 - .../node_modules/minimist/test/proto.js | 64 - .../node_modules/minimist/test/short.js | 69 - .../node_modules/minimist/test/stop_early.js | 17 - .../node_modules/minimist/test/unknown.js | 104 - .../node_modules/minimist/test/whitespace.js | 10 - test-eol-project/node_modules/ms/index.js | 162 - test-eol-project/node_modules/ms/license.md | 21 - test-eol-project/node_modules/ms/package.json | 38 - test-eol-project/node_modules/ms/readme.md | 59 - .../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 | 23 - .../node_modules/object-assign/index.js | 90 - .../node_modules/object-assign/license | 21 - .../node_modules/object-assign/package.json | 42 - .../node_modules/object-assign/readme.md | 61 - test-eol-project/node_modules/once/LICENSE | 15 - test-eol-project/node_modules/once/README.md | 79 - test-eol-project/node_modules/once/once.js | 42 - .../node_modules/once/package.json | 33 - .../node_modules/os-tmpdir/index.js | 25 - .../node_modules/os-tmpdir/license | 21 - .../node_modules/os-tmpdir/package.json | 41 - .../node_modules/os-tmpdir/readme.md | 32 - .../node_modules/p-limit/index.d.ts | 38 - .../node_modules/p-limit/index.js | 57 - test-eol-project/node_modules/p-limit/license | 9 - .../node_modules/p-limit/package.json | 52 - .../node_modules/p-limit/readme.md | 101 - .../node_modules/p-locate/index.d.ts | 64 - .../node_modules/p-locate/index.js | 52 - .../node_modules/p-locate/license | 9 - .../node_modules/p-locate/package.json | 53 - .../node_modules/p-locate/readme.md | 90 - .../node_modules/p-try/index.d.ts | 39 - test-eol-project/node_modules/p-try/index.js | 9 - test-eol-project/node_modules/p-try/license | 9 - .../node_modules/p-try/package.json | 42 - test-eol-project/node_modules/p-try/readme.md | 58 - .../node_modules/pako/CHANGELOG.md | 164 - test-eol-project/node_modules/pako/LICENSE | 21 - test-eol-project/node_modules/pako/README.md | 191 - .../node_modules/pako/dist/pako.js | 6818 --------- .../node_modules/pako/dist/pako.min.js | 1 - .../node_modules/pako/dist/pako_deflate.js | 3997 ------ .../pako/dist/pako_deflate.min.js | 1 - .../node_modules/pako/dist/pako_inflate.js | 3300 ----- .../pako/dist/pako_inflate.min.js | 1 - test-eol-project/node_modules/pako/index.js | 14 - .../node_modules/pako/lib/deflate.js | 400 - .../node_modules/pako/lib/inflate.js | 423 - .../node_modules/pako/lib/utils/common.js | 105 - .../node_modules/pako/lib/utils/strings.js | 187 - .../node_modules/pako/lib/zlib/README | 59 - .../node_modules/pako/lib/zlib/adler32.js | 51 - .../node_modules/pako/lib/zlib/constants.js | 68 - .../node_modules/pako/lib/zlib/crc32.js | 59 - .../node_modules/pako/lib/zlib/deflate.js | 1874 --- .../node_modules/pako/lib/zlib/gzheader.js | 58 - .../node_modules/pako/lib/zlib/inffast.js | 345 - .../node_modules/pako/lib/zlib/inflate.js | 1556 --- .../node_modules/pako/lib/zlib/inftrees.js | 343 - .../node_modules/pako/lib/zlib/messages.js | 32 - .../node_modules/pako/lib/zlib/trees.js | 1222 -- .../node_modules/pako/lib/zlib/zstream.js | 47 - .../node_modules/pako/package.json | 44 - .../node_modules/path-exists/index.d.ts | 28 - .../node_modules/path-exists/index.js | 23 - .../node_modules/path-exists/license | 9 - .../node_modules/path-exists/package.json | 39 - .../node_modules/path-exists/readme.md | 52 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 43 - .../node_modules/path-is-absolute/readme.md | 59 - .../node_modules/path-is-inside/LICENSE.txt | 47 - .../path-is-inside/lib/path-is-inside.js | 28 - .../node_modules/path-is-inside/package.json | 21 - .../node_modules/performance-now/.npmignore | 1 - .../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 | 35 - .../performance-now/src/index.d.ts | 8 - .../src/performance-now.coffee | 17 - .../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 - test-eol-project/node_modules/pify/index.js | 68 - test-eol-project/node_modules/pify/license | 21 - .../node_modules/pify/package.json | 48 - test-eol-project/node_modules/pify/readme.md | 119 - .../node_modules/pinkie-promise/index.js | 3 - .../node_modules/pinkie-promise/license | 21 - .../node_modules/pinkie-promise/package.json | 35 - .../node_modules/pinkie-promise/readme.md | 28 - test-eol-project/node_modules/pinkie/index.js | 292 - test-eol-project/node_modules/pinkie/license | 21 - .../node_modules/pinkie/package.json | 36 - .../node_modules/pinkie/readme.md | 83 - .../process-nextick-args/index.js | 45 - .../process-nextick-args/license.md | 19 - .../process-nextick-args/package.json | 25 - .../process-nextick-args/readme.md | 18 - .../protractor/.circleci/config.yml | 75 - .../node_modules/protractor/.jshintignore | 1 - .../node_modules/protractor/CHANGELOG.md | 4288 ------ .../node_modules/protractor/CONTRIBUTING.md | 74 - .../node_modules/protractor/DEVELOPER.md | 151 - .../node_modules/protractor/LICENSE | 21 - .../node_modules/protractor/README.md | 37 - .../protractor/built/bpRunner.d.ts | 13 - .../node_modules/protractor/built/bpRunner.js | 59 - .../protractor/built/breakpointhook.js | 10 - .../protractor/built/browser.d.ts | 474 - .../node_modules/protractor/built/browser.js | 863 -- .../node_modules/protractor/built/cli.d.ts | 0 .../node_modules/protractor/built/cli.js | 228 - .../protractor/built/clientsidescripts.js | 939 -- .../node_modules/protractor/built/config.d.ts | 619 - .../node_modules/protractor/built/config.js | 3 - .../protractor/built/configParser.d.ts | 50 - .../protractor/built/configParser.js | 215 - .../protractor/built/debugger.d.ts | 47 - .../node_modules/protractor/built/debugger.js | 233 - .../built/debugger/clients/explorer.js | 157 - .../built/debugger/clients/wddebugger.js | 83 - .../built/debugger/debuggerCommons.js | 113 - .../built/debugger/modes/commandRepl.js | 127 - .../built/debugger/modes/debuggerRepl.js | 143 - .../built/driverProviders/attachSession.d.ts | 27 - .../built/driverProviders/attachSession.js | 51 - .../built/driverProviders/browserStack.d.ts | 21 - .../built/driverProviders/browserStack.js | 84 - .../built/driverProviders/direct.d.ts | 22 - .../built/driverProviders/direct.js | 116 - .../built/driverProviders/driverProvider.d.ts | 65 - .../built/driverProviders/driverProvider.js | 131 - .../built/driverProviders/hosted.d.ts | 14 - .../built/driverProviders/hosted.js | 28 - .../built/driverProviders/index.d.ts | 15 - .../protractor/built/driverProviders/index.js | 129 - .../built/driverProviders/kobiton.d.ts | 13 - .../built/driverProviders/kobiton.js | 33 - .../built/driverProviders/local.d.ts | 30 - .../protractor/built/driverProviders/local.js | 165 - .../built/driverProviders/mock.d.ts | 29 - .../protractor/built/driverProviders/mock.js | 50 - .../built/driverProviders/sauce.d.ts | 29 - .../protractor/built/driverProviders/sauce.js | 93 - .../built/driverProviders/testObject.d.ts | 13 - .../built/driverProviders/testObject.js | 32 - .../driverProviders/useExistingWebDriver.d.ts | 27 - .../driverProviders/useExistingWebDriver.js | 52 - .../protractor/built/element.d.ts | 871 -- .../node_modules/protractor/built/element.js | 1166 -- .../protractor/built/exitCodes.d.ts | 32 - .../protractor/built/exitCodes.js | 84 - .../protractor/built/expectedConditions.d.ts | 320 - .../protractor/built/expectedConditions.js | 424 - ...rotractor_internal_afterEach_setup_spec.js | 10 - .../protractor/built/frameworks/debugprint.js | 22 - .../protractor/built/frameworks/explorer.js | 24 - .../protractor/built/frameworks/jasmine.js | 135 - .../protractor/built/frameworks/mocha.js | 140 - .../built/frameworks/setupAfterEach.js | 29 - .../node_modules/protractor/built/index.d.ts | 29 - .../node_modules/protractor/built/index.js | 54 - .../protractor/built/launcher.d.ts | 2 - .../node_modules/protractor/built/launcher.js | 285 - .../protractor/built/locators.d.ts | 294 - .../node_modules/protractor/built/locators.js | 451 - .../node_modules/protractor/built/logger.d.ts | 101 - .../node_modules/protractor/built/logger.js | 275 - .../protractor/built/plugins.d.ts | 348 - .../node_modules/protractor/built/plugins.js | 225 - .../node_modules/protractor/built/ptor.d.ts | 50 - .../node_modules/protractor/built/ptor.js | 47 - .../node_modules/protractor/built/runner.d.ts | 104 - .../node_modules/protractor/built/runner.js | 445 - .../protractor/built/runnerCli.d.ts | 0 .../protractor/built/runnerCli.js | 56 - .../built/selenium-webdriver/locators.js | 216 - .../built/selenium-webdriver/webdriver.js | 765 - .../protractor/built/taskLogger.d.ts | 37 - .../protractor/built/taskLogger.js | 92 - .../protractor/built/taskRunner.d.ts | 40 - .../protractor/built/taskRunner.js | 118 - .../protractor/built/taskScheduler.d.ts | 61 - .../protractor/built/taskScheduler.js | 146 - .../node_modules/protractor/built/util.d.ts | 40 - .../node_modules/protractor/built/util.js | 109 - .../built/webdriver-js-extender/index.js | 47 - .../example/angular_material/conf.js | 27 - .../example/angular_material/input_spec.js | 15 - .../angular_material/mat_paginator_spec.js | 31 - .../node_modules/protractor/example/conf.js | 21 - .../protractor/example/example_spec.js | 37 - .../protractor/exampleTypescript/README.md | 89 - .../exampleTypescript/angularPage.ts | 26 - .../exampleTypescript/asyncAwait/README.md | 34 - .../exampleTypescript/asyncAwait/conf.js | 20 - .../exampleTypescript/asyncAwait/spec.ts | 13 - .../protractor/exampleTypescript/conf.ts | 24 - .../exampleTypescript/confPageObjects.ts | 20 - .../protractor/exampleTypescript/package.json | 24 - .../protractor/exampleTypescript/plugins.ts | 16 - .../protractor/exampleTypescript/spec.ts | 26 - .../exampleTypescript/specPageObjects.ts | 12 - .../exampleTypescript/tsconfig.json | 16 - .../node_modules/protractor/gulpfile.js | 100 - .../node_modules/protractor/package.json | 86 - .../protractor/ts_spec_config.json | 15 - .../node_modules/protractor/tsconfig.json | 21 - .../node_modules/protractor/tslint.json | 14 - test-eol-project/node_modules/psl/LICENSE | 9 - test-eol-project/node_modules/psl/README.md | 260 - test-eol-project/node_modules/psl/SECURITY.md | 13 - .../node_modules/psl/browserstack-logo.svg | 90 - .../node_modules/psl/data/rules.js | 9778 ------------- .../node_modules/psl/dist/psl.cjs | 1 - .../node_modules/psl/dist/psl.mjs | 10008 ------------- .../node_modules/psl/dist/psl.umd.cjs | 1 - test-eol-project/node_modules/psl/index.js | 247 - .../node_modules/psl/package.json | 51 - .../node_modules/psl/types/index.d.ts | 52 - .../node_modules/psl/types/test.ts | 14 - .../node_modules/psl/types/tsconfig.json | 22 - .../node_modules/psl/vite.config.js | 20 - .../node_modules/punycode/LICENSE-MIT.txt | 20 - .../node_modules/punycode/README.md | 148 - .../node_modules/punycode/package.json | 58 - .../node_modules/punycode/punycode.es6.js | 444 - .../node_modules/punycode/punycode.js | 443 - test-eol-project/node_modules/q/CHANGES.md | 786 -- test-eol-project/node_modules/q/LICENSE | 18 - test-eol-project/node_modules/q/README.md | 881 -- test-eol-project/node_modules/q/package.json | 79 - test-eol-project/node_modules/q/q.js | 2048 --- test-eol-project/node_modules/q/queue.js | 35 - .../node_modules/qs/.editorconfig | 43 - test-eol-project/node_modules/qs/.eslintrc | 37 - .../node_modules/qs/.github/FUNDING.yml | 12 - test-eol-project/node_modules/qs/.nycrc | 13 - test-eol-project/node_modules/qs/CHANGELOG.md | 262 - test-eol-project/node_modules/qs/LICENSE.md | 29 - test-eol-project/node_modules/qs/README.md | 516 - test-eol-project/node_modules/qs/dist/qs.js | 648 - .../node_modules/qs/lib/formats.js | 18 - test-eol-project/node_modules/qs/lib/index.js | 11 - test-eol-project/node_modules/qs/lib/parse.js | 175 - .../node_modules/qs/lib/stringify.js | 217 - test-eol-project/node_modules/qs/lib/utils.js | 215 - test-eol-project/node_modules/qs/package.json | 63 - .../node_modules/qs/test/index.js | 7 - .../node_modules/qs/test/parse.js | 658 - .../node_modules/qs/test/stringify.js | 648 - .../node_modules/qs/test/utils.js | 65 - .../node_modules/readable-stream/.travis.yml | 34 - .../readable-stream/CONTRIBUTING.md | 38 - .../readable-stream/GOVERNANCE.md | 136 - .../node_modules/readable-stream/LICENSE | 47 - .../node_modules/readable-stream/README.md | 58 - .../doc/wg-meetings/2015-01-30.md | 60 - .../readable-stream/duplex-browser.js | 1 - .../node_modules/readable-stream/duplex.js | 1 - .../readable-stream/lib/_stream_duplex.js | 131 - .../lib/_stream_passthrough.js | 47 - .../readable-stream/lib/_stream_readable.js | 1019 -- .../readable-stream/lib/_stream_transform.js | 214 - .../readable-stream/lib/_stream_writable.js | 685 - .../lib/internal/streams/BufferList.js | 78 - .../lib/internal/streams/destroy.js | 84 - .../lib/internal/streams/stream-browser.js | 1 - .../lib/internal/streams/stream.js | 1 - .../node_modules/readable-stream/package.json | 52 - .../readable-stream/passthrough.js | 1 - .../readable-stream/readable-browser.js | 7 - .../node_modules/readable-stream/readable.js | 19 - .../node_modules/readable-stream/transform.js | 1 - .../readable-stream/writable-browser.js | 1 - .../node_modules/readable-stream/writable.js | 8 - .../node_modules/request/CHANGELOG.md | 717 - test-eol-project/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 - .../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/package.json | 86 - .../node_modules/request/request.js | 1553 --- .../node_modules/require-directory/.jshintrc | 67 - .../node_modules/require-directory/.npmignore | 1 - .../require-directory/.travis.yml | 3 - .../node_modules/require-directory/LICENSE | 22 - .../require-directory/README.markdown | 184 - .../node_modules/require-directory/index.js | 86 - .../require-directory/package.json | 40 - .../require-main-filename/CHANGELOG.md | 26 - .../require-main-filename/LICENSE.txt | 14 - .../require-main-filename/README.md | 26 - .../require-main-filename/index.js | 18 - .../require-main-filename/package.json | 35 - test-eol-project/node_modules/rimraf/LICENSE | 15 - .../node_modules/rimraf/README.md | 101 - test-eol-project/node_modules/rimraf/bin.js | 50 - .../node_modules/rimraf/package.json | 29 - .../node_modules/rimraf/rimraf.js | 372 - .../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 | 37 - .../node_modules/safer-buffer/LICENSE | 21 - .../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 | 34 - .../node_modules/safer-buffer/safer.js | 77 - .../node_modules/safer-buffer/tests.js | 406 - .../node_modules/saucelabs/.jshintrc | 64 - .../node_modules/saucelabs/.travis.yml | 4 - .../node_modules/saucelabs/Makefile | 21 - .../node_modules/saucelabs/README.md | 337 - .../node_modules/saucelabs/index.js | 3 - .../node_modules/saucelabs/lib/SauceLabs.js | 344 - .../node_modules/saucelabs/lib/utils.js | 20 - .../node_modules/saucelabs/package.json | 27 - .../node_modules/saucelabs/test/SauceLabs.js | 315 - .../saucelabs/test/bootstrap/index.js | 6 - .../saucelabs/test/helpers/index.js | 62 - .../node_modules/saucelabs/test/mocha.opts | 3 - .../node_modules/saucelabs/test/utils.js | 28 - test-eol-project/node_modules/sax/LICENSE.md | 55 - test-eol-project/node_modules/sax/README.md | 227 - test-eol-project/node_modules/sax/lib/sax.js | 1704 --- .../node_modules/sax/package.json | 31 - .../selenium-webdriver/.npmignore | 2 - .../selenium-webdriver/CHANGES.md | 851 -- .../node_modules/selenium-webdriver/LICENSE | 202 - .../node_modules/selenium-webdriver/NOTICE | 2 - .../node_modules/selenium-webdriver/README.md | 226 - .../node_modules/selenium-webdriver/chrome.js | 829 -- .../node_modules/selenium-webdriver/edge.js | 301 - .../example/async_await_test.js | 69 - .../example/chrome_android.js | 42 - .../example/chrome_mobile_emulation.js | 42 - .../example/firefox_channels.js | 73 - .../example/google_search.js | 50 - .../example/google_search_generator.js | 47 - .../example/google_search_test.js | 60 - .../selenium-webdriver/example/headless.js | 55 - .../selenium-webdriver/example/logging.js | 35 - .../example/parallel_flows.js | 51 - .../selenium-webdriver/firefox/binary.js | 347 - .../selenium-webdriver/firefox/extension.js | 224 - .../selenium-webdriver/firefox/index.js | 576 - .../selenium-webdriver/firefox/profile.js | 311 - .../selenium-webdriver/http/index.js | 255 - .../selenium-webdriver/http/util.js | 175 - .../node_modules/selenium-webdriver/ie.js | 441 - .../node_modules/selenium-webdriver/index.js | 694 - .../selenium-webdriver/io/exec.js | 153 - .../selenium-webdriver/io/index.js | 359 - .../node_modules/selenium-webdriver/io/zip.js | 214 - .../selenium-webdriver/lib/README | 5 - .../selenium-webdriver/lib/actions.js | 604 - .../lib/atoms/get-attribute.js | 9 - .../lib/atoms/is-displayed.js | 102 - .../node_modules/selenium-webdriver/lib/by.js | 285 - .../selenium-webdriver/lib/capabilities.js | 489 - .../selenium-webdriver/lib/command.js | 245 - .../selenium-webdriver/lib/devmode.js | 34 - .../selenium-webdriver/lib/error.js | 598 - .../selenium-webdriver/lib/events.js | 210 - .../selenium-webdriver/lib/http.js | 582 - .../selenium-webdriver/lib/input.js | 171 - .../selenium-webdriver/lib/logging.js | 676 - .../selenium-webdriver/lib/promise.js | 3404 ----- .../selenium-webdriver/lib/proxy.js | 127 - .../selenium-webdriver/lib/session.js | 80 - .../selenium-webdriver/lib/symbols.js | 38 - .../selenium-webdriver/lib/test/build.js | 151 - ...kTest_testClicksASurroundingStrongTag.html | 11 - .../lib/test/data/Page.aspx | 17 - .../lib/test/data/Page.aspx.cs | 22 - .../lib/test/data/Redirect.aspx | 11 - .../lib/test/data/Redirect.aspx.cs | 9 - .../lib/test/data/Settings.StyleCop | 759 - .../lib/test/data/Web.Config | 59 - .../lib/test/data/actualXhtmlPage.xhtml | 14 - .../lib/test/data/ajaxy_page.html | 81 - .../lib/test/data/alerts.html | 85 - .../lib/test/data/banner.gif | Bin 2109 -> 0 bytes .../lib/test/data/beach.jpg | Bin 14085 -> 0 bytes .../lib/test/data/blank.html | 1 - .../lib/test/data/bodyTypingTest.html | 41 - .../lib/test/data/booleanAttributes.html | 19 - .../lib/test/data/child/childPage.html | 8 - .../data/child/grandchild/grandchildPage.html | 8 - .../lib/test/data/clickEventPage.html | 26 - .../lib/test/data/click_frames.html | 10 - .../lib/test/data/click_jacker.html | 38 - .../lib/test/data/click_out_of_bounds.html | 23 - .../data/click_out_of_bounds_overflow.html | 85 - .../lib/test/data/click_rtl.html | 19 - .../lib/test/data/click_source.html | 18 - .../test/data/click_tests/click_iframe.html | 6 - .../data/click_tests/click_in_iframe.html | 8 - .../data/click_tests/disabled_element.html | 12 - .../click_tests/disappearing_element.html | 62 - .../lib/test/data/click_tests/google_map.html | 15 - .../lib/test/data/click_tests/google_map.png | Bin 26209 -> 0 bytes .../click_tests/html5_submit_buttons.html | 16 - .../lib/test/data/click_tests/issue5237.html | 9 - .../data/click_tests/issue5237_frame.html | 1 - .../data/click_tests/issue5237_target.html | 10 - .../data/click_tests/link_that_wraps.html | 11 - .../test/data/click_tests/mapped_page1.html | 9 - .../test/data/click_tests/mapped_page2.html | 9 - .../test/data/click_tests/mapped_page3.html | 9 - .../click_tests/overlapping_elements.html | 70 - .../partially_overlapping_elements.html | 124 - .../data/click_tests/span_that_wraps.html | 11 - .../test/data/click_tests/submitted_page.html | 9 - .../wrapped_overlapping_elements.html | 13 - .../lib/test/data/click_too_big.html | 10 - .../lib/test/data/click_too_big_in_frame.html | 11 - .../lib/test/data/clicks.html | 35 - .../lib/test/data/closeable_window.html | 8 - .../lib/test/data/cn-test.html | 156 - .../lib/test/data/colorPage.html | 20 - .../lib/test/data/content-editable.html | 10 - .../lib/test/data/cookies.html | 30 - .../coordinates_tests/element_in_frame.html | 9 - .../element_in_nested_frame.html | 9 - .../page_with_element_out_of_view.html | 11 - .../page_with_empty_element.html | 10 - .../page_with_fixed_element.html | 12 - .../page_with_hidden_element.html | 10 - .../page_with_invisible_element.html | 10 - .../page_with_transparent_element.html | 10 - .../data/coordinates_tests/simple_page.html | 10 - .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 260 -> 0 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 251 -> 0 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 178 -> 0 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 104 -> 0 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 125 -> 0 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 3762 -> 0 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 90 -> 0 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 129 -> 0 bytes .../images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_228ef1_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_ffffff_256x240.png | Bin 4369 -> 0 bytes .../ui-lightness/jquery-ui-1.8.10.custom.css | 573 - .../lib/test/data/cssTransform.html | 61 - .../lib/test/data/cssTransform2.html | 20 - .../test/data/document_write_in_onload.html | 13 - .../data/dragAndDropInsideScrolledDiv.html | 67 - .../lib/test/data/dragAndDropTest.html | 102 - .../lib/test/data/dragDropOverflow.html | 104 - .../lib/test/data/draggableLists.html | 67 - .../lib/test/data/droppableItems.html | 65 - .../lib/test/data/dynamic.html | 39 - .../test/data/dynamicallyModifiedPage.html | 42 - .../lib/test/data/errors.html | 15 - .../lib/test/data/firefox/jetpack-sample.xpi | Bin 7289 -> 0 bytes .../lib/test/data/firefox/sample.xpi | Bin 1551 -> 0 bytes .../lib/test/data/firefox/webextension.xpi | Bin 4692 -> 0 bytes .../lib/test/data/fixedFooterNoScroll.html | 13 - .../data/fixedFooterNoScrollQuirksMode.html | 12 - .../lib/test/data/formPage.html | 175 - .../lib/test/data/formSelectionPage.html | 46 - .../test/data/form_handling_js_submit.html | 30 - .../lib/test/data/framePage3.html | 7 - .../lib/test/data/frameScrollChild.html | 26 - .../lib/test/data/frameScrollPage.html | 14 - .../lib/test/data/frameScrollParent.html | 11 - .../lib/test/data/frameWithAnimals.html | 11 - .../data/frame_switching_tests/bug4876.html | 9 - .../frame_switching_tests/bug4876_iframe.html | 9 - .../frame_switching_tests/deletingFrame.html | 29 - .../deletingFrame_iframe.html | 8 - .../deletingFrame_iframe2.html | 7 - .../lib/test/data/frameset.html | 14 - .../lib/test/data/framesetPage2.html | 7 - .../lib/test/data/framesetPage3.html | 4 - .../lib/test/data/globalscope.html | 15 - .../lib/test/data/hidden.html | 5 - .../lib/test/data/hidden_partially.html | 45 - .../lib/test/data/html5/blue.jpg | Bin 92 -> 0 bytes .../lib/test/data/html5/database.js | 84 - .../lib/test/data/html5/geolocation.js | 18 - .../lib/test/data/html5/green.jpg | Bin 92 -> 0 bytes .../lib/test/data/html5/red.jpg | Bin 92 -> 0 bytes .../lib/test/data/html5/status.html | 1 - .../lib/test/data/html5/test.appcache | 11 - .../lib/test/data/html5/yellow.jpg | Bin 92 -> 0 bytes .../lib/test/data/html5Page.html | 32 - .../selenium-webdriver/lib/test/data/icon.gif | Bin 127 -> 0 bytes .../lib/test/data/idElements.html | 2 - .../lib/test/data/iframeAtBottom.html | 15 - .../lib/test/data/iframeWithAlert.html | 1 - .../lib/test/data/iframeWithIframe.html | 1 - .../lib/test/data/iframes.html | 11 - .../lib/test/data/injectableContent.html | 22 - .../lib/test/data/javascriptEnhancedForm.html | 30 - .../lib/test/data/javascriptPage.html | 285 - .../lib/test/data/jquery-1.3.2.js | 4376 ------ .../lib/test/data/js/jquery-1.4.4.min.js | 167 - .../data/js/jquery-ui-1.8.10.custom.min.js | 782 -- .../js/skins/lightgray/content.inline.min.css | 1 - .../data/js/skins/lightgray/content.min.css | 1 - .../data/js/skins/lightgray/fonts/readme.md | 1 - .../lightgray/fonts/tinymce-small.dev.svg | 175 - .../skins/lightgray/fonts/tinymce-small.eot | Bin 10316 -> 0 bytes .../skins/lightgray/fonts/tinymce-small.svg | 62 - .../skins/lightgray/fonts/tinymce-small.ttf | Bin 10128 -> 0 bytes .../skins/lightgray/fonts/tinymce-small.woff | Bin 7848 -> 0 bytes .../js/skins/lightgray/fonts/tinymce.dev.svg | 153 - .../data/js/skins/lightgray/fonts/tinymce.eot | Bin 10024 -> 0 bytes .../data/js/skins/lightgray/fonts/tinymce.svg | 63 - .../data/js/skins/lightgray/fonts/tinymce.ttf | Bin 9860 -> 0 bytes .../js/skins/lightgray/fonts/tinymce.woff | Bin 7664 -> 0 bytes .../data/js/skins/lightgray/img/anchor.gif | Bin 53 -> 0 bytes .../data/js/skins/lightgray/img/loader.gif | Bin 2608 -> 0 bytes .../data/js/skins/lightgray/img/object.gif | Bin 152 -> 0 bytes .../data/js/skins/lightgray/img/trans.gif | Bin 43 -> 0 bytes .../data/js/skins/lightgray/skin.ie7.min.css | 1 - .../test/data/js/skins/lightgray/skin.min.css | 1 - .../test/data/js/themes/modern/theme.min.js | 1 - .../lib/test/data/js/tinymce.min.js | 10 - .../lib/test/data/key_logger.html | 34 - .../data/key_tests/remove_on_keypress.html | 36 - .../lib/test/data/keyboard_shortcut.html | 36 - .../lib/test/data/linked_image.html | 16 - .../boolean_attribute_selected.html | 13 - .../boolean_attribute_selected_html4.html | 13 - .../lib/test/data/longContentPage.html | 55 - .../lib/test/data/macbeth.html | 5255 ------- .../selenium-webdriver/lib/test/data/map.png | Bin 26209 -> 0 bytes .../lib/test/data/map_visibility.html | 8 - .../lib/test/data/markerTransparent.png | Bin 260 -> 0 bytes .../lib/test/data/messages.html | 15 - .../lib/test/data/meta-redirect.html | 11 - .../lib/test/data/missedJsReference.html | 11 - .../lib/test/data/modal_dialogs/modal_1.html | 21 - .../lib/test/data/modal_dialogs/modal_2.html | 21 - .../lib/test/data/modal_dialogs/modal_3.html | 15 - .../test/data/modal_dialogs/modalindex.html | 21 - .../lib/test/data/mouseOver.html | 17 - .../lib/test/data/mousePositionTracker.html | 33 - .../lib/test/data/nestedElements.html | 164 - .../lib/test/data/overflow-body.html | 15 - .../lib/test/data/overflow/x_auto_y_auto.html | 30 - .../test/data/overflow/x_auto_y_hidden.html | 30 - .../test/data/overflow/x_auto_y_scroll.html | 30 - .../test/data/overflow/x_hidden_y_auto.html | 30 - .../test/data/overflow/x_hidden_y_hidden.html | 30 - .../test/data/overflow/x_hidden_y_scroll.html | 30 - .../test/data/overflow/x_scroll_y_auto.html | 30 - .../test/data/overflow/x_scroll_y_hidden.html | 30 - .../test/data/overflow/x_scroll_y_scroll.html | 30 - .../data/pageWithOnBeforeUnloadMessage.html | 20 - .../lib/test/data/pageWithOnLoad.html | 6 - .../lib/test/data/pageWithOnUnload.html | 6 - .../page_with_link_to_slow_loading_page.html | 6 - .../lib/test/data/plain.txt | 1 - .../lib/test/data/proxy/page1.html | 20 - .../lib/test/data/proxy/page2.html | 24 - .../lib/test/data/proxy/page3.html | 5 - .../lib/test/data/readOnlyPage.html | 24 - .../lib/test/data/rectangles.html | 40 - .../lib/test/data/resultPage.html | 25 - .../lib/test/data/rich_text.html | 161 - .../test/data/safari/frames_benchmark.html | 31 - .../lib/test/data/screen/screen.css | 19 - .../lib/test/data/screen/screen.html | 72 - .../lib/test/data/screen/screen.js | 7 - .../lib/test/data/screen/screen_frame1.html | 72 - .../lib/test/data/screen/screen_frame2.html | 72 - .../lib/test/data/screen/screen_frames.html | 11 - .../lib/test/data/screen/screen_iframes.html | 12 - .../lib/test/data/screen/screen_too_long.html | 68 - .../lib/test/data/screen/screen_x_long.html | 72 - .../test/data/screen/screen_x_too_long.html | 72 - .../lib/test/data/screen/screen_y_long.html | 72 - .../test/data/screen/screen_y_too_long.html | 72 - .../lib/test/data/scroll.html | 27 - .../lib/test/data/scroll2.html | 21 - .../lib/test/data/scroll3.html | 8 - .../lib/test/data/scroll4.html | 7 - .../lib/test/data/scroll5.html | 18 - .../frame_with_height_above_200.html | 26 - .../frame_with_height_above_2000.html | 26 - .../frame_with_nested_scrolling_frame.html | 11 - ...th_nested_scrolling_frame_out_of_view.html | 12 - .../frame_with_small_height.html | 10 - .../page_with_double_overflow_auto.html | 19 - .../page_with_frame_out_of_view.html | 12 - .../page_with_nested_scrolling_frames.html | 11 - ...h_nested_scrolling_frames_out_of_view.html | 12 - .../page_with_non_scrolling_frame.html | 11 - .../page_with_partially_hidden_element.html | 14 - .../page_with_scrolling_frame.html | 11 - ...page_with_scrolling_frame_out_of_view.html | 12 - .../scrolling_tests/page_with_tall_frame.html | 11 - .../page_with_y_overflow_auto.html | 14 - .../data/scrolling_tests/target_page.html | 9 - .../lib/test/data/selectPage.html | 58 - .../lib/test/data/selectableItems.html | 65 - .../lib/test/data/sessionCookie.html | 21 - .../lib/test/data/sessionCookieDest.html | 34 - .../lib/test/data/simple.xml | 5 - .../lib/test/data/simpleTest.html | 98 - .../lib/test/data/single_text_input.html | 12 - .../lib/test/data/slowLoadingAlert.html | 10 - .../test/data/slowLoadingResourcePage.html | 12 - .../lib/test/data/slow_loading_iframes.html | 14 - .../lib/test/data/styledPage.html | 28 - .../lib/test/data/svgPiechart.xhtml | 81 - .../lib/test/data/svgTest.svg | 4 - .../lib/test/data/tables.html | 36 - .../lib/test/data/tinymce.html | 10 - .../lib/test/data/transformable.xml | 11 - .../lib/test/data/transformable.xsl | 37 - .../lib/test/data/transparentUpload.html | 70 - .../lib/test/data/underscore.html | 9 - .../lib/test/data/unicode_ltr.html | 8 - .../lib/test/data/upload.html | 45 - .../lib/test/data/userDefinedProperty.html | 8 - .../lib/test/data/veryLargeCanvas.html | 81 - .../lib/test/data/visibility-css.html | 21 - .../lib/test/data/win32frameset.html | 8 - .../page_with_frame.html | 12 - .../window_switching_tests/simple_page.html | 9 - .../lib/test/data/xhtmlFormPage.xhtml | 17 - .../lib/test/data/xhtmlTest.html | 76 - .../selenium-webdriver/lib/test/fileserver.js | 321 - .../selenium-webdriver/lib/test/httpserver.js | 120 - .../selenium-webdriver/lib/test/index.js | 270 - .../selenium-webdriver/lib/test/promise.js | 79 - .../selenium-webdriver/lib/test/resources.js | 44 - .../selenium-webdriver/lib/until.js | 427 - .../selenium-webdriver/lib/webdriver.js | 2656 ---- .../selenium-webdriver/net/index.js | 117 - .../selenium-webdriver/net/portprober.js | 205 - .../node_modules/selenium-webdriver/opera.js | 405 - .../selenium-webdriver/package.json | 42 - .../selenium-webdriver/phantomjs.js | 282 - .../node_modules/selenium-webdriver/proxy.js | 32 - .../selenium-webdriver/remote/index.js | 604 - .../node_modules/selenium-webdriver/safari.js | 264 - .../selenium-webdriver/test/actions_test.js | 52 - .../test/chrome/options_test.js | 227 - .../test/chrome/service_test.js | 45 - .../selenium-webdriver/test/cookie_test.js | 214 - .../test/element_finding_test.js | 426 - .../test/execute_script_test.js | 350 - .../test/fingerprint_test.js | 62 - .../test/firefox/extension_test.js | 120 - .../test/firefox/firefox_test.js | 244 - .../test/firefox/profile_test.js | 140 - .../selenium-webdriver/test/http/http_test.js | 223 - .../selenium-webdriver/test/http/util_test.js | 178 - .../selenium-webdriver/test/io/io_test.js | 360 - .../selenium-webdriver/test/io/zip_test.js | 128 - .../selenium-webdriver/test/lib/by_test.js | 160 - .../test/lib/capabilities_test.js | 111 - .../selenium-webdriver/test/lib/error_test.js | 306 - .../test/lib/events_test.js | 177 - .../selenium-webdriver/test/lib/http_test.js | 696 - .../test/lib/logging_test.js | 272 - .../test/lib/promise_aplus_test.js | 78 - .../test/lib/promise_error_test.js | 884 -- .../test/lib/promise_flow_test.js | 2288 --- .../test/lib/promise_generator_test.js | 310 - .../test/lib/promise_test.js | 1109 -- .../selenium-webdriver/test/lib/testutil.js | 90 - .../selenium-webdriver/test/lib/until_test.js | 478 - .../test/lib/webdriver_test.js | 2311 --- .../selenium-webdriver/test/logging_test.js | 167 - .../selenium-webdriver/test/net/index_test.js | 60 - .../test/net/portprober_test.js | 128 - .../test/page_loading_test.js | 166 - .../test/phantomjs/execute_phantomjs_test.js | 59 - .../selenium-webdriver/test/proxy_test.js | 180 - .../selenium-webdriver/test/rect_test.js | 60 - .../selenium-webdriver/test/remote_test.js | 117 - .../selenium-webdriver/test/safari_test.js | 108 - .../selenium-webdriver/test/session_test.js | 99 - .../test/stale_element_test.js | 63 - .../selenium-webdriver/test/tag_name_test.js | 36 - .../test/testing/assert_test.js | 373 - .../test/testing/index_test.js | 224 - .../selenium-webdriver/test/upload_test.js | 86 - .../selenium-webdriver/test/window_test.js | 161 - .../selenium-webdriver/testing/assert.js | 378 - .../selenium-webdriver/testing/index.js | 426 - test-eol-project/node_modules/semver/LICENSE | 15 - .../node_modules/semver/README.md | 412 - .../node_modules/semver/package.json | 38 - .../node_modules/semver/range.bnf | 16 - .../node_modules/semver/semver.js | 1525 -- .../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 | 42 - .../node_modules/setimmediate/LICENSE.txt | 20 - .../node_modules/setimmediate/package.json | 30 - .../node_modules/setimmediate/setImmediate.js | 186 - .../source-map-support/LICENSE.md | 21 - .../node_modules/source-map-support/README.md | 251 - .../browser-source-map-support.js | 110 - .../source-map-support/package.json | 30 - .../source-map-support/register.js | 1 - .../source-map-support/source-map-support.js | 527 - .../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 | 72 - .../node_modules/source-map/source-map.js | 8 - .../node_modules/sshpk/.travis.yml | 11 - .../node_modules/sshpk/Jenkinsfile | 86 - test-eol-project/node_modules/sshpk/LICENSE | 18 - test-eol-project/node_modules/sshpk/README.md | 804 -- .../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 | 643 - .../node_modules/sshpk/lib/formats/putty.js | 194 - .../node_modules/sshpk/lib/formats/rfc4253.js | 166 - .../sshpk/lib/formats/ssh-private.js | 262 - .../node_modules/sshpk/lib/formats/ssh.js | 115 - .../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 | 247 - .../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 - .../sshpk/man/man1/sshpk-verify.1 | 68 - .../node_modules/sshpk/package.json | 59 - .../node_modules/string-width/index.d.ts | 29 - .../node_modules/string-width/index.js | 47 - .../node_modules/string-width/license | 9 - .../node_modules/ansi-regex/index.d.ts | 37 - .../node_modules/ansi-regex/index.js | 10 - .../node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 55 - .../node_modules/ansi-regex/readme.md | 78 - .../node_modules/strip-ansi/index.d.ts | 17 - .../node_modules/strip-ansi/index.js | 4 - .../node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 54 - .../node_modules/strip-ansi/readme.md | 46 - .../node_modules/string-width/package.json | 56 - .../node_modules/string-width/readme.md | 50 - .../node_modules/string_decoder/.travis.yml | 50 - .../node_modules/string_decoder/LICENSE | 48 - .../node_modules/string_decoder/README.md | 47 - .../string_decoder/lib/string_decoder.js | 296 - .../node_modules/string_decoder/package.json | 31 - .../node_modules/strip-ansi/index.js | 6 - .../node_modules/strip-ansi/license | 21 - .../node_modules/strip-ansi/package.json | 57 - .../node_modules/strip-ansi/readme.md | 33 - .../node_modules/supports-color/index.js | 50 - .../node_modules/supports-color/license | 21 - .../node_modules/supports-color/package.json | 49 - .../node_modules/supports-color/readme.md | 36 - .../node_modules/tmp/.eslintrc.js | 24 - test-eol-project/node_modules/tmp/.npmignore | 2 - test-eol-project/node_modules/tmp/.travis.yml | 15 - .../node_modules/tmp/Gruntfile.js | 18 - test-eol-project/node_modules/tmp/LICENSE | 21 - test-eol-project/node_modules/tmp/README.md | 268 - test-eol-project/node_modules/tmp/cleanup.sh | 3 - .../node_modules/tmp/coverage/coverage.json | 1 - .../tmp/coverage/lcov-report/base.css | 213 - .../tmp/coverage/lcov-report/index.html | 93 - .../tmp/coverage/lcov-report/lib/index.html | 93 - .../tmp/coverage/lcov-report/lib/tmp.js.html | 1448 -- .../tmp/coverage/lcov-report/prettify.css | 1 - .../tmp/coverage/lcov-report/prettify.js | 1 - .../lcov-report/sort-arrow-sprite.png | Bin 209 -> 0 bytes .../tmp/coverage/lcov-report/sorter.js | 158 - .../node_modules/tmp/coverage/lcov.info | 300 - test-eol-project/node_modules/tmp/lib/tmp.js | 463 - .../node_modules/tmp/package.json | 38 - test-eol-project/node_modules/tmp/run-tests | 7 - .../node_modules/tmp/test/base.js | 149 - .../node_modules/tmp/test/dir-sync-test.js | 230 - .../node_modules/tmp/test/dir-test.js | 225 - .../node_modules/tmp/test/file-sync-test.js | 190 - .../node_modules/tmp/test/file-test.js | 191 - .../node_modules/tmp/test/graceful-sync.js | 20 - .../node_modules/tmp/test/graceful.js | 15 - .../node_modules/tmp/test/issue62-sync.js | 27 - .../node_modules/tmp/test/issue62.js | 27 - .../node_modules/tmp/test/keep-sync.js | 12 - .../node_modules/tmp/test/keep.js | 11 - .../node_modules/tmp/test/name-test.js | 82 - .../node_modules/tmp/test/spawn-sync.js | 32 - .../node_modules/tmp/test/spawn.js | 32 - .../node_modules/tmp/test/symlinkme/file.js | 0 .../node_modules/tmp/test/unsafe-sync.js | 30 - .../node_modules/tmp/test/unsafe.js | 30 - .../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 | 78 - .../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 | 22 - .../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 | 58 - test-eol-project/node_modules/uri-js/LICENSE | 11 - .../node_modules/uri-js/README.md | 203 - .../node_modules/uri-js/dist/es5/uri.all.d.ts | 59 - .../node_modules/uri-js/dist/es5/uri.all.js | 1443 -- .../uri-js/dist/es5/uri.all.js.map | 1 - .../uri-js/dist/es5/uri.all.min.d.ts | 59 - .../uri-js/dist/es5/uri.all.min.js | 3 - .../uri-js/dist/es5/uri.all.min.js.map | 1 - .../uri-js/dist/esnext/index.d.ts | 1 - .../node_modules/uri-js/dist/esnext/index.js | 17 - .../uri-js/dist/esnext/index.js.map | 1 - .../uri-js/dist/esnext/regexps-iri.d.ts | 3 - .../uri-js/dist/esnext/regexps-iri.js | 3 - .../uri-js/dist/esnext/regexps-iri.js.map | 1 - .../uri-js/dist/esnext/regexps-uri.d.ts | 4 - .../uri-js/dist/esnext/regexps-uri.js | 42 - .../uri-js/dist/esnext/regexps-uri.js.map | 1 - .../uri-js/dist/esnext/schemes/http.d.ts | 3 - .../uri-js/dist/esnext/schemes/http.js | 28 - .../uri-js/dist/esnext/schemes/http.js.map | 1 - .../uri-js/dist/esnext/schemes/https.d.ts | 3 - .../uri-js/dist/esnext/schemes/https.js | 9 - .../uri-js/dist/esnext/schemes/https.js.map | 1 - .../uri-js/dist/esnext/schemes/mailto.d.ts | 12 - .../uri-js/dist/esnext/schemes/mailto.js | 148 - .../uri-js/dist/esnext/schemes/mailto.js.map | 1 - .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 7 - .../uri-js/dist/esnext/schemes/urn-uuid.js | 23 - .../dist/esnext/schemes/urn-uuid.js.map | 1 - .../uri-js/dist/esnext/schemes/urn.d.ts | 10 - .../uri-js/dist/esnext/schemes/urn.js | 49 - .../uri-js/dist/esnext/schemes/urn.js.map | 1 - .../uri-js/dist/esnext/schemes/ws.d.ts | 7 - .../uri-js/dist/esnext/schemes/ws.js | 41 - .../uri-js/dist/esnext/schemes/ws.js.map | 1 - .../uri-js/dist/esnext/schemes/wss.d.ts | 3 - .../uri-js/dist/esnext/schemes/wss.js | 9 - .../uri-js/dist/esnext/schemes/wss.js.map | 1 - .../node_modules/uri-js/dist/esnext/uri.d.ts | 59 - .../node_modules/uri-js/dist/esnext/uri.js | 480 - .../uri-js/dist/esnext/uri.js.map | 1 - .../node_modules/uri-js/dist/esnext/util.d.ts | 6 - .../node_modules/uri-js/dist/esnext/util.js | 36 - .../uri-js/dist/esnext/util.js.map | 1 - .../node_modules/uri-js/package.json | 77 - .../node_modules/uri-js/yarn.lock | 2558 ---- .../node_modules/util-deprecate/History.md | 16 - .../node_modules/util-deprecate/LICENSE | 24 - .../node_modules/util-deprecate/README.md | 53 - .../node_modules/util-deprecate/browser.js | 67 - .../node_modules/util-deprecate/node.js | 6 - .../node_modules/util-deprecate/package.json | 27 - test-eol-project/node_modules/uuid/AUTHORS | 5 - .../node_modules/uuid/CHANGELOG.md | 119 - test-eol-project/node_modules/uuid/LICENSE.md | 21 - test-eol-project/node_modules/uuid/README.md | 276 - test-eol-project/node_modules/uuid/index.js | 8 - .../node_modules/uuid/lib/bytesToUuid.js | 26 - .../node_modules/uuid/lib/md5-browser.js | 216 - test-eol-project/node_modules/uuid/lib/md5.js | 25 - .../node_modules/uuid/lib/rng-browser.js | 34 - test-eol-project/node_modules/uuid/lib/rng.js | 8 - .../node_modules/uuid/lib/sha1-browser.js | 89 - .../node_modules/uuid/lib/sha1.js | 25 - test-eol-project/node_modules/uuid/lib/v35.js | 57 - .../node_modules/uuid/package.json | 49 - test-eol-project/node_modules/uuid/v1.js | 109 - test-eol-project/node_modules/uuid/v3.js | 4 - test-eol-project/node_modules/uuid/v4.js | 29 - test-eol-project/node_modules/uuid/v5.js | 3 - .../node_modules/verror/.npmignore | 9 - .../node_modules/verror/CHANGES.md | 28 - .../node_modules/verror/CONTRIBUTING.md | 19 - test-eol-project/node_modules/verror/LICENSE | 19 - .../node_modules/verror/README.md | 528 - .../node_modules/verror/lib/verror.js | 451 - .../verror/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 | 32 - .../verror/node_modules/core-util-is/test.js | 68 - .../node_modules/verror/package.json | 22 - .../webdriver-js-extender/.travis.yml | 23 - .../webdriver-js-extender/CONTRIBUTING.md | 13 - .../webdriver-js-extender/LICENSE | 22 - .../webdriver-js-extender/README.md | 21 - .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../spec/command_tests/totally_real_apk.apk | 0 .../built/lib/command_definition.d.ts | 11 - .../built/lib/command_definition.js | 33 - .../built/lib/command_definition.js.map | 1 - .../built/lib/command_definitions.d.ts | 48 - .../built/lib/command_definitions.js | 106 - .../built/lib/command_definitions.js.map | 1 - .../built/lib/deferred_executor.d.ts | 10 - .../built/lib/deferred_executor.js | 35 - .../built/lib/deferred_executor.js.map | 1 - .../built/lib/extender.d.ts | 35 - .../built/lib/extender.js | 71 - .../built/lib/extender.js.map | 1 - .../built/lib/index.d.ts | 53 - .../webdriver-js-extender/built/lib/index.js | 15 - .../built/lib/index.js.map | 1 - .../webdriver-js-extender/built/package.json | 39 - .../built/spec/command_tests/helpers.d.ts | 2 - .../built/spec/command_tests/helpers.js | 73 - .../built/spec/command_tests/helpers.js.map | 1 - .../built/spec/command_tests/normal_spec.d.ts | 1 - .../built/spec/command_tests/normal_spec.js | 213 - .../spec/command_tests/normal_spec.js.map | 1 - .../built/spec/command_tests/table_spec.d.ts | 10 - .../built/spec/command_tests/table_spec.js | 95 - .../spec/command_tests/table_spec.js.map | 1 - .../spec/command_tests/totally_real_apk.apk | 1 - .../built/spec/extender_spec.d.ts | 1 - .../built/spec/extender_spec.js | 70 - .../built/spec/extender_spec.js.map | 1 - .../built/spec/index_spec.d.ts | 1 - .../built/spec/index_spec.js | 28 - .../built/spec/index_spec.js.map | 1 - .../spec/mock-server/commands/appium.d.ts | 2 - .../built/spec/mock-server/commands/appium.js | 118 - .../spec/mock-server/commands/appium.js.map | 1 - .../spec/mock-server/commands/chromium.d.ts | 2 - .../spec/mock-server/commands/chromium.js | 14 - .../spec/mock-server/commands/chromium.js.map | 1 - .../spec/mock-server/commands/helpers.d.ts | 12 - .../spec/mock-server/commands/helpers.js | 35 - .../spec/mock-server/commands/helpers.js.map | 1 - .../spec/mock-server/commands/index.d.ts | 2 - .../built/spec/mock-server/commands/index.js | 62 - .../spec/mock-server/commands/index.js.map | 1 - .../spec/mock-server/commands/storage.d.ts | 2 - .../spec/mock-server/commands/storage.js | 39 - .../spec/mock-server/commands/storage.js.map | 1 - .../built/spec/mock-server/index.d.ts | 5 - .../built/spec/mock-server/index.js | 38 - .../built/spec/mock-server/index.js.map | 1 - .../built/spec/mock-server/interfaces.d.ts | 108 - .../built/spec/mock-server/interfaces.js | 3 - .../built/spec/mock-server/interfaces.js.map | 1 - .../built/spec/mockdriver.d.ts | 6 - .../built/spec/mockdriver.js | 23 - .../built/spec/mockdriver.js.map | 1 - .../webdriver-js-extender/gulpfile.js | 58 - .../webdriver-js-extender/package.json | 39 - .../webdriver-js-extender/tsconfig.json | 16 - .../webdriver-manager/.circleci/config.yml | 24 - .../webdriver-manager/CHANGELOG.md | 670 - .../webdriver-manager/CONTRIBUTING.md | 61 - .../node_modules/webdriver-manager/LICENSE | 21 - .../node_modules/webdriver-manager/README.md | 76 - .../webdriver-manager/built/config.json | 18 - .../built/lib/binaries/android_sdk.d.ts | 26 - .../built/lib/binaries/android_sdk.js | 103 - .../built/lib/binaries/android_sdk.js.map | 1 - .../built/lib/binaries/appium.d.ts | 18 - .../built/lib/binaries/appium.js | 42 - .../built/lib/binaries/appium.js.map | 1 - .../built/lib/binaries/binary.d.ts | 66 - .../built/lib/binaries/binary.js | 76 - .../built/lib/binaries/binary.js.map | 1 - .../built/lib/binaries/chrome_driver.d.ts | 12 - .../built/lib/binaries/chrome_driver.js | 38 - .../built/lib/binaries/chrome_driver.js.map | 1 - .../built/lib/binaries/chrome_xml.d.ts | 36 - .../built/lib/binaries/chrome_xml.js | 156 - .../built/lib/binaries/chrome_xml.js.map | 1 - .../built/lib/binaries/config_source.d.ts | 38 - .../built/lib/binaries/config_source.js | 209 - .../built/lib/binaries/config_source.js.map | 1 - .../built/lib/binaries/gecko_driver.d.ts | 13 - .../built/lib/binaries/gecko_driver.js | 50 - .../built/lib/binaries/gecko_driver.js.map | 1 - .../lib/binaries/gecko_driver_github.d.ts | 14 - .../built/lib/binaries/gecko_driver_github.js | 93 - .../lib/binaries/gecko_driver_github.js.map | 1 - .../built/lib/binaries/iedriver.d.ts | 13 - .../built/lib/binaries/iedriver.js | 38 - .../built/lib/binaries/iedriver.js.map | 1 - .../built/lib/binaries/iedriver_xml.d.ts | 9 - .../built/lib/binaries/iedriver_xml.js | 69 - .../built/lib/binaries/iedriver_xml.js.map | 1 - .../built/lib/binaries/index.d.ts | 7 - .../built/lib/binaries/index.js | 13 - .../built/lib/binaries/index.js.map | 1 - .../built/lib/binaries/standalone.d.ts | 13 - .../built/lib/binaries/standalone.js | 41 - .../built/lib/binaries/standalone.js.map | 1 - .../built/lib/binaries/standalone_xml.d.ts | 9 - .../built/lib/binaries/standalone_xml.js | 89 - .../built/lib/binaries/standalone_xml.js.map | 1 - .../webdriver-manager/built/lib/cli/cli.d.ts | 57 - .../webdriver-manager/built/lib/cli/cli.js | 136 - .../built/lib/cli/cli.js.map | 1 - .../built/lib/cli/index.d.ts | 4 - .../webdriver-manager/built/lib/cli/index.js | 10 - .../built/lib/cli/index.js.map | 1 - .../built/lib/cli/logger.d.ts | 95 - .../webdriver-manager/built/lib/cli/logger.js | 264 - .../built/lib/cli/logger.js.map | 1 - .../built/lib/cli/options.d.ts | 22 - .../built/lib/cli/options.js | 67 - .../built/lib/cli/options.js.map | 1 - .../built/lib/cli/programs.d.ts | 93 - .../built/lib/cli/programs.js | 226 - .../built/lib/cli/programs.js.map | 1 - .../built/lib/cli_instance.d.ts | 2 - .../built/lib/cli_instance.js | 18 - .../built/lib/cli_instance.js.map | 1 - .../built/lib/cmds/clean.d.ts | 2 - .../webdriver-manager/built/lib/cmds/clean.js | 39 - .../built/lib/cmds/clean.js.map | 1 - .../built/lib/cmds/index.d.ts | 1 - .../webdriver-manager/built/lib/cmds/index.js | 7 - .../built/lib/cmds/index.js.map | 1 - .../built/lib/cmds/initialize.d.ts | 3 - .../built/lib/cmds/initialize.js | 244 - .../built/lib/cmds/initialize.js.map | 1 - .../built/lib/cmds/opts.d.ts | 38 - .../webdriver-manager/built/lib/cmds/opts.js | 91 - .../built/lib/cmds/opts.js.map | 1 - .../built/lib/cmds/shutdown.d.ts | 2 - .../built/lib/cmds/shutdown.js | 46 - .../built/lib/cmds/shutdown.js.map | 1 - .../built/lib/cmds/start.d.ts | 2 - .../webdriver-manager/built/lib/cmds/start.js | 458 - .../built/lib/cmds/start.js.map | 1 - .../built/lib/cmds/status.d.ts | 2 - .../built/lib/cmds/status.js | 120 - .../built/lib/cmds/status.js.map | 1 - .../built/lib/cmds/update.d.ts | 3 - .../built/lib/cmds/update.js | 300 - .../built/lib/cmds/update.js.map | 1 - .../built/lib/cmds/version.d.ts | 2 - .../built/lib/cmds/version.js | 17 - .../built/lib/cmds/version.js.map | 1 - .../webdriver-manager/built/lib/config.d.ts | 58 - .../webdriver-manager/built/lib/config.js | 95 - .../webdriver-manager/built/lib/config.js.map | 1 - .../built/lib/files/downloaded_binary.d.ts | 14 - .../built/lib/files/downloaded_binary.js | 32 - .../built/lib/files/downloaded_binary.js.map | 1 - .../built/lib/files/downloader.d.ts | 20 - .../built/lib/files/downloader.js | 103 - .../built/lib/files/downloader.js.map | 1 - .../built/lib/files/file_manager.d.ts | 72 - .../built/lib/files/file_manager.js | 239 - .../built/lib/files/file_manager.js.map | 1 - .../built/lib/files/index.d.ts | 3 - .../built/lib/files/index.js | 9 - .../built/lib/files/index.js.map | 1 - .../built/lib/http_utils.d.ts | 27 - .../webdriver-manager/built/lib/http_utils.js | 118 - .../built/lib/http_utils.js.map | 1 - .../webdriver-manager/built/lib/utils.d.ts | 6 - .../webdriver-manager/built/lib/utils.js | 115 - .../webdriver-manager/built/lib/utils.js.map | 1 - .../built/lib/webdriver.d.ts | 0 .../webdriver-manager/built/lib/webdriver.js | 22 - .../built/lib/webdriver.js.map | 1 - .../webdriver-manager/built/package.json | 81 - .../webdriver-manager/config.json | 18 - .../webdriver-manager/docs/README.md | 6 - .../webdriver-manager/docs/mobile.md | 79 - .../webdriver-manager/docs/protractor.md | 41 - .../webdriver-manager/docs/versions.md | 87 - .../webdriver-manager/gulpfile.js | 44 - .../webdriver-manager/package.json | 81 - .../node_modules/which-module/LICENSE | 13 - .../node_modules/which-module/README.md | 58 - .../node_modules/which-module/index.js | 9 - .../node_modules/which-module/package.json | 41 - .../node_modules/wrap-ansi/index.js | 186 - .../node_modules/wrap-ansi/license | 9 - .../node_modules/ansi-regex/index.d.ts | 37 - .../node_modules/ansi-regex/index.js | 10 - .../wrap-ansi/node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 55 - .../node_modules/ansi-regex/readme.md | 78 - .../node_modules/ansi-styles/index.d.ts | 345 - .../node_modules/ansi-styles/index.js | 163 - .../node_modules/ansi-styles/license | 9 - .../node_modules/ansi-styles/package.json | 56 - .../node_modules/ansi-styles/readme.md | 152 - .../node_modules/strip-ansi/index.d.ts | 17 - .../node_modules/strip-ansi/index.js | 4 - .../wrap-ansi/node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 54 - .../node_modules/strip-ansi/readme.md | 46 - .../node_modules/wrap-ansi/package.json | 61 - .../node_modules/wrap-ansi/readme.md | 97 - test-eol-project/node_modules/wrappy/LICENSE | 15 - .../node_modules/wrappy/README.md | 36 - .../node_modules/wrappy/package.json | 29 - .../node_modules/wrappy/wrappy.js | 33 - test-eol-project/node_modules/xml2js/LICENSE | 19 - .../node_modules/xml2js/README.md | 488 - .../node_modules/xml2js/lib/bom.js | 12 - .../node_modules/xml2js/lib/builder.js | 127 - .../node_modules/xml2js/lib/defaults.js | 72 - .../node_modules/xml2js/lib/parser.js | 381 - .../node_modules/xml2js/lib/processors.js | 34 - .../node_modules/xml2js/lib/xml2js.js | 39 - .../node_modules/xml2js/package.json | 92 - .../node_modules/xmlbuilder/CHANGELOG.md | 470 - .../node_modules/xmlbuilder/LICENSE | 21 - .../node_modules/xmlbuilder/README.md | 86 - .../node_modules/xmlbuilder/appveyor.yml | 20 - .../node_modules/xmlbuilder/lib/Derivation.js | 10 - .../xmlbuilder/lib/DocumentPosition.js | 12 - .../node_modules/xmlbuilder/lib/NodeType.js | 23 - .../xmlbuilder/lib/OperationType.js | 11 - .../node_modules/xmlbuilder/lib/Utility.js | 83 - .../xmlbuilder/lib/WriterState.js | 10 - .../xmlbuilder/lib/XMLAttribute.js | 108 - .../node_modules/xmlbuilder/lib/XMLCData.js | 36 - .../xmlbuilder/lib/XMLCharacterData.js | 79 - .../node_modules/xmlbuilder/lib/XMLComment.js | 36 - .../xmlbuilder/lib/XMLDOMConfiguration.js | 64 - .../xmlbuilder/lib/XMLDOMErrorHandler.js | 16 - .../xmlbuilder/lib/XMLDOMImplementation.js | 32 - .../xmlbuilder/lib/XMLDOMStringList.js | 28 - .../xmlbuilder/lib/XMLDTDAttList.js | 55 - .../xmlbuilder/lib/XMLDTDElement.js | 38 - .../xmlbuilder/lib/XMLDTDEntity.js | 97 - .../xmlbuilder/lib/XMLDTDNotation.js | 52 - .../xmlbuilder/lib/XMLDeclaration.js | 43 - .../node_modules/xmlbuilder/lib/XMLDocType.js | 186 - .../xmlbuilder/lib/XMLDocument.js | 242 - .../xmlbuilder/lib/XMLDocumentCB.js | 528 - .../xmlbuilder/lib/XMLDocumentFragment.js | 24 - .../node_modules/xmlbuilder/lib/XMLDummy.js | 31 - .../node_modules/xmlbuilder/lib/XMLElement.js | 298 - .../xmlbuilder/lib/XMLNamedNodeMap.js | 58 - .../node_modules/xmlbuilder/lib/XMLNode.js | 785 -- .../xmlbuilder/lib/XMLNodeFilter.js | 48 - .../xmlbuilder/lib/XMLNodeList.js | 28 - .../lib/XMLProcessingInstruction.js | 49 - .../node_modules/xmlbuilder/lib/XMLRaw.js | 35 - .../xmlbuilder/lib/XMLStreamWriter.js | 176 - .../xmlbuilder/lib/XMLStringWriter.js | 35 - .../xmlbuilder/lib/XMLStringifier.js | 240 - .../node_modules/xmlbuilder/lib/XMLText.js | 69 - .../xmlbuilder/lib/XMLTypeInfo.js | 21 - .../xmlbuilder/lib/XMLUserDataHandler.js | 16 - .../xmlbuilder/lib/XMLWriterBase.js | 428 - .../node_modules/xmlbuilder/lib/index.js | 65 - .../node_modules/xmlbuilder/package.json | 39 - .../xmlbuilder/typings/index.d.ts | 153 - .../node_modules/y18n/CHANGELOG.md | 35 - test-eol-project/node_modules/y18n/LICENSE | 13 - test-eol-project/node_modules/y18n/README.md | 109 - test-eol-project/node_modules/y18n/index.js | 188 - .../node_modules/y18n/package.json | 39 - .../node_modules/yargs-parser/CHANGELOG.md | 601 - .../node_modules/yargs-parser/LICENSE.txt | 14 - .../node_modules/yargs-parser/README.md | 449 - .../node_modules/yargs-parser/index.js | 1032 -- .../yargs-parser/lib/tokenize-arg-string.js | 40 - .../node_modules/yargs-parser/package.json | 46 - .../node_modules/yargs/CHANGELOG.md | 420 - test-eol-project/node_modules/yargs/LICENSE | 21 - test-eol-project/node_modules/yargs/README.md | 140 - .../yargs/build/lib/apply-extends.d.ts | 2 - .../yargs/build/lib/apply-extends.js | 65 - .../node_modules/yargs/build/lib/argsert.d.ts | 2 - .../node_modules/yargs/build/lib/argsert.js | 65 - .../node_modules/yargs/build/lib/command.d.ts | 64 - .../node_modules/yargs/build/lib/command.js | 416 - .../yargs/build/lib/common-types.d.ts | 36 - .../yargs/build/lib/common-types.js | 25 - .../yargs/build/lib/completion-templates.d.ts | 2 - .../yargs/build/lib/completion-templates.js | 50 - .../yargs/build/lib/completion.d.ts | 21 - .../yargs/build/lib/completion.js | 135 - .../yargs/build/lib/is-promise.d.ts | 1 - .../yargs/build/lib/is-promise.js | 9 - .../yargs/build/lib/levenshtein.d.ts | 1 - .../yargs/build/lib/levenshtein.js | 58 - .../yargs/build/lib/middleware.d.ts | 10 - .../yargs/build/lib/middleware.js | 57 - .../yargs/build/lib/obj-filter.d.ts | 1 - .../yargs/build/lib/obj-filter.js | 14 - .../yargs/build/lib/parse-command.d.ts | 11 - .../yargs/build/lib/parse-command.js | 36 - .../yargs/build/lib/process-argv.d.ts | 2 - .../yargs/build/lib/process-argv.js | 31 - .../node_modules/yargs/build/lib/usage.d.ts | 49 - .../node_modules/yargs/build/lib/usage.js | 540 - .../yargs/build/lib/validation.d.ts | 34 - .../yargs/build/lib/validation.js | 330 - .../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 | 11 - test-eol-project/node_modules/yargs/index.js | 40 - .../node_modules/yargs/locales/be.json | 46 - .../node_modules/yargs/locales/de.json | 46 - .../node_modules/yargs/locales/en.json | 51 - .../node_modules/yargs/locales/es.json | 46 - .../node_modules/yargs/locales/fi.json | 49 - .../node_modules/yargs/locales/fr.json | 53 - .../node_modules/yargs/locales/hi.json | 49 - .../node_modules/yargs/locales/hu.json | 46 - .../node_modules/yargs/locales/id.json | 50 - .../node_modules/yargs/locales/it.json | 46 - .../node_modules/yargs/locales/ja.json | 51 - .../node_modules/yargs/locales/ko.json | 49 - .../node_modules/yargs/locales/nb.json | 44 - .../node_modules/yargs/locales/nl.json | 49 - .../node_modules/yargs/locales/nn.json | 44 - .../node_modules/yargs/locales/pirate.json | 13 - .../node_modules/yargs/locales/pl.json | 49 - .../node_modules/yargs/locales/pt.json | 45 - .../node_modules/yargs/locales/pt_BR.json | 48 - .../node_modules/yargs/locales/ru.json | 46 - .../node_modules/yargs/locales/th.json | 46 - .../node_modules/yargs/locales/tr.json | 48 - .../node_modules/yargs/locales/zh_CN.json | 48 - .../node_modules/yargs/locales/zh_TW.json | 47 - .../node_modules/yargs/package.json | 92 - test-eol-project/node_modules/yargs/yargs.js | 14 - 2165 files changed, 328739 deletions(-) delete mode 120000 test-eol-project/node_modules/.bin/blocking-proxy delete mode 120000 test-eol-project/node_modules/.bin/jasmine delete mode 120000 test-eol-project/node_modules/.bin/protractor delete mode 120000 test-eol-project/node_modules/.bin/rimraf delete mode 120000 test-eol-project/node_modules/.bin/semver delete mode 120000 test-eol-project/node_modules/.bin/sshpk-conv delete mode 120000 test-eol-project/node_modules/.bin/sshpk-sign delete mode 120000 test-eol-project/node_modules/.bin/sshpk-verify delete mode 120000 test-eol-project/node_modules/.bin/uuid delete mode 120000 test-eol-project/node_modules/.bin/webdriver-manager delete mode 100644 test-eol-project/node_modules/.package-lock.json delete mode 100644 test-eol-project/node_modules/@types/q/README.md delete mode 100644 test-eol-project/node_modules/@types/q/index.d.ts delete mode 100644 test-eol-project/node_modules/@types/q/package.json delete mode 100644 test-eol-project/node_modules/@types/q/types-metadata.json delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/LICENSE delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/README.md delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/package.json delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts delete mode 100644 test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts delete mode 100644 test-eol-project/node_modules/adm-zip/LICENSE delete mode 100644 test-eol-project/node_modules/adm-zip/README.md delete mode 100644 test-eol-project/node_modules/adm-zip/adm-zip.js delete mode 100644 test-eol-project/node_modules/adm-zip/headers/entryHeader.js delete mode 100644 test-eol-project/node_modules/adm-zip/headers/index.js delete mode 100644 test-eol-project/node_modules/adm-zip/headers/mainHeader.js delete mode 100644 test-eol-project/node_modules/adm-zip/methods/deflater.js delete mode 100644 test-eol-project/node_modules/adm-zip/methods/index.js delete mode 100644 test-eol-project/node_modules/adm-zip/methods/inflater.js delete mode 100644 test-eol-project/node_modules/adm-zip/methods/zipcrypto.js delete mode 100644 test-eol-project/node_modules/adm-zip/package.json delete mode 100644 test-eol-project/node_modules/adm-zip/util/constants.js delete mode 100644 test-eol-project/node_modules/adm-zip/util/decoder.js delete mode 100644 test-eol-project/node_modules/adm-zip/util/errors.js delete mode 100644 test-eol-project/node_modules/adm-zip/util/fattr.js delete mode 100644 test-eol-project/node_modules/adm-zip/util/index.js delete mode 100644 test-eol-project/node_modules/adm-zip/util/utils.js delete mode 100644 test-eol-project/node_modules/adm-zip/zipEntry.js delete mode 100644 test-eol-project/node_modules/adm-zip/zipFile.js delete mode 100644 test-eol-project/node_modules/agent-base/.travis.yml delete mode 100644 test-eol-project/node_modules/agent-base/History.md delete mode 100644 test-eol-project/node_modules/agent-base/README.md delete mode 100644 test-eol-project/node_modules/agent-base/index.d.ts delete mode 100644 test-eol-project/node_modules/agent-base/index.js delete mode 100644 test-eol-project/node_modules/agent-base/package.json delete mode 100644 test-eol-project/node_modules/agent-base/patch-core.js delete mode 100644 test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key delete mode 100644 test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem delete mode 100644 test-eol-project/node_modules/agent-base/test/test.js delete mode 100644 test-eol-project/node_modules/ajv/.tonic_example.js delete mode 100644 test-eol-project/node_modules/ajv/LICENSE delete mode 100644 test-eol-project/node_modules/ajv/README.md delete mode 100644 test-eol-project/node_modules/ajv/dist/ajv.bundle.js delete mode 100644 test-eol-project/node_modules/ajv/dist/ajv.min.js delete mode 100644 test-eol-project/node_modules/ajv/dist/ajv.min.js.map delete mode 100644 test-eol-project/node_modules/ajv/lib/ajv.d.ts delete mode 100644 test-eol-project/node_modules/ajv/lib/ajv.js delete mode 100644 test-eol-project/node_modules/ajv/lib/cache.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/async.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/equal.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/error_classes.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/formats.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/index.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/resolve.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/rules.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/schema_obj.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/ucs2length.js delete mode 100644 test-eol-project/node_modules/ajv/lib/compile/util.js delete mode 100644 test-eol-project/node_modules/ajv/lib/data.js delete mode 100644 test-eol-project/node_modules/ajv/lib/definition_schema.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limit.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/allOf.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/anyOf.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/coerce.def delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/comment.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/const.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/contains.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/custom.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/defaults.def delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/definitions.def delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/dependencies.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/enum.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/errors.def delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/format.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/if.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/items.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/missing.def delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/not.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/oneOf.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/pattern.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/properties.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/ref.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/required.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dot/validate.jst delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/README.md delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limit.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/allOf.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/comment.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/const.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/contains.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/custom.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/dependencies.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/enum.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/format.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/if.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/index.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/items.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/not.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/pattern.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/properties.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/ref.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/required.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js delete mode 100644 test-eol-project/node_modules/ajv/lib/dotjs/validate.js delete mode 100644 test-eol-project/node_modules/ajv/lib/keyword.js delete mode 100644 test-eol-project/node_modules/ajv/lib/refs/data.json delete mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-draft-04.json delete mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-draft-06.json delete mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-draft-07.json delete mode 100644 test-eol-project/node_modules/ajv/lib/refs/json-schema-secure.json delete mode 100644 test-eol-project/node_modules/ajv/package.json delete mode 100644 test-eol-project/node_modules/ajv/scripts/.eslintrc.yml delete mode 100644 test-eol-project/node_modules/ajv/scripts/bundle.js delete mode 100644 test-eol-project/node_modules/ajv/scripts/compile-dots.js delete mode 100755 test-eol-project/node_modules/ajv/scripts/info delete mode 100755 test-eol-project/node_modules/ajv/scripts/prepare-tests delete mode 100755 test-eol-project/node_modules/ajv/scripts/publish-built-version delete mode 100755 test-eol-project/node_modules/ajv/scripts/travis-gh-pages delete mode 100644 test-eol-project/node_modules/ansi-regex/index.js delete mode 100644 test-eol-project/node_modules/ansi-regex/license delete mode 100644 test-eol-project/node_modules/ansi-regex/package.json delete mode 100644 test-eol-project/node_modules/ansi-regex/readme.md delete mode 100644 test-eol-project/node_modules/ansi-styles/index.js delete mode 100644 test-eol-project/node_modules/ansi-styles/license delete mode 100644 test-eol-project/node_modules/ansi-styles/package.json delete mode 100644 test-eol-project/node_modules/ansi-styles/readme.md delete mode 100644 test-eol-project/node_modules/array-union/index.js delete mode 100644 test-eol-project/node_modules/array-union/license delete mode 100644 test-eol-project/node_modules/array-union/package.json delete mode 100644 test-eol-project/node_modules/array-union/readme.md delete mode 100644 test-eol-project/node_modules/array-uniq/index.js delete mode 100644 test-eol-project/node_modules/array-uniq/license delete mode 100644 test-eol-project/node_modules/array-uniq/package.json delete mode 100644 test-eol-project/node_modules/array-uniq/readme.md delete mode 100644 test-eol-project/node_modules/arrify/index.js delete mode 100644 test-eol-project/node_modules/arrify/license delete mode 100644 test-eol-project/node_modules/arrify/package.json delete mode 100644 test-eol-project/node_modules/arrify/readme.md delete mode 100644 test-eol-project/node_modules/asn1/Jenkinsfile delete mode 100644 test-eol-project/node_modules/asn1/LICENSE delete mode 100644 test-eol-project/node_modules/asn1/README.md delete mode 100644 test-eol-project/node_modules/asn1/lib/ber/errors.js delete mode 100644 test-eol-project/node_modules/asn1/lib/ber/index.js delete mode 100644 test-eol-project/node_modules/asn1/lib/ber/reader.js delete mode 100644 test-eol-project/node_modules/asn1/lib/ber/types.js delete mode 100644 test-eol-project/node_modules/asn1/lib/ber/writer.js delete mode 100644 test-eol-project/node_modules/asn1/lib/index.js delete mode 100644 test-eol-project/node_modules/asn1/package.json delete mode 100644 test-eol-project/node_modules/assert-plus/AUTHORS delete mode 100644 test-eol-project/node_modules/assert-plus/CHANGES.md delete mode 100644 test-eol-project/node_modules/assert-plus/README.md delete mode 100644 test-eol-project/node_modules/assert-plus/assert.js delete mode 100644 test-eol-project/node_modules/assert-plus/package.json delete mode 100644 test-eol-project/node_modules/asynckit/LICENSE delete mode 100644 test-eol-project/node_modules/asynckit/README.md delete mode 100644 test-eol-project/node_modules/asynckit/bench.js delete mode 100644 test-eol-project/node_modules/asynckit/index.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/abort.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/async.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/defer.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/iterate.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/readable_asynckit.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/readable_parallel.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/readable_serial.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/state.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/streamify.js delete mode 100644 test-eol-project/node_modules/asynckit/lib/terminator.js delete mode 100644 test-eol-project/node_modules/asynckit/package.json delete mode 100644 test-eol-project/node_modules/asynckit/parallel.js delete mode 100644 test-eol-project/node_modules/asynckit/serial.js delete mode 100644 test-eol-project/node_modules/asynckit/serialOrdered.js delete mode 100644 test-eol-project/node_modules/asynckit/stream.js delete mode 100644 test-eol-project/node_modules/aws-sign2/LICENSE delete mode 100644 test-eol-project/node_modules/aws-sign2/README.md delete mode 100644 test-eol-project/node_modules/aws-sign2/index.js delete mode 100644 test-eol-project/node_modules/aws-sign2/package.json delete mode 100644 test-eol-project/node_modules/aws4/LICENSE delete mode 100644 test-eol-project/node_modules/aws4/README.md delete mode 100644 test-eol-project/node_modules/aws4/aws4.js delete mode 100644 test-eol-project/node_modules/aws4/lru.js delete mode 100644 test-eol-project/node_modules/aws4/package.json delete mode 100644 test-eol-project/node_modules/balanced-match/.github/FUNDING.yml delete mode 100644 test-eol-project/node_modules/balanced-match/LICENSE.md delete mode 100644 test-eol-project/node_modules/balanced-match/README.md delete mode 100644 test-eol-project/node_modules/balanced-match/index.js delete mode 100644 test-eol-project/node_modules/balanced-match/package.json delete mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/LICENSE delete mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/README.md delete mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/index.js delete mode 100644 test-eol-project/node_modules/bcrypt-pbkdf/package.json delete mode 100644 test-eol-project/node_modules/blocking-proxy/.clang-format delete mode 100644 test-eol-project/node_modules/blocking-proxy/.nvmrc delete mode 100644 test-eol-project/node_modules/blocking-proxy/LICENSE delete mode 100644 test-eol-project/node_modules/blocking-proxy/README.md delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/bin.d.ts delete mode 100755 test-eol-project/node_modules/blocking-proxy/built/lib/bin.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/config.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/index.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map delete mode 100644 test-eol-project/node_modules/blocking-proxy/circle.yml delete mode 100644 test-eol-project/node_modules/blocking-proxy/examples/README.md delete mode 100644 test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py delete mode 100755 test-eol-project/node_modules/blocking-proxy/examples/run_example.sh delete mode 100644 test-eol-project/node_modules/blocking-proxy/gulpfile.js delete mode 100644 test-eol-project/node_modules/blocking-proxy/package.json delete mode 100644 test-eol-project/node_modules/blocking-proxy/tsconfig.json delete mode 100644 test-eol-project/node_modules/blocking-proxy/tslint.json delete mode 100644 test-eol-project/node_modules/brace-expansion/LICENSE delete mode 100644 test-eol-project/node_modules/brace-expansion/README.md delete mode 100644 test-eol-project/node_modules/brace-expansion/index.js delete mode 100644 test-eol-project/node_modules/brace-expansion/package.json delete mode 100644 test-eol-project/node_modules/browserstack/.editorconfig delete mode 100644 test-eol-project/node_modules/browserstack/.jscsrc delete mode 100644 test-eol-project/node_modules/browserstack/.jshintrc delete mode 100644 test-eol-project/node_modules/browserstack/.travis.yml delete mode 100644 test-eol-project/node_modules/browserstack/LICENSE-MIT.txt delete mode 100644 test-eol-project/node_modules/browserstack/lib/api.js delete mode 100644 test-eol-project/node_modules/browserstack/lib/app-automate.js delete mode 100644 test-eol-project/node_modules/browserstack/lib/automate.js delete mode 100644 test-eol-project/node_modules/browserstack/lib/browserstack.js delete mode 100644 test-eol-project/node_modules/browserstack/lib/client.js delete mode 100644 test-eol-project/node_modules/browserstack/lib/extend.js delete mode 100644 test-eol-project/node_modules/browserstack/lib/screenshot.js delete mode 100644 test-eol-project/node_modules/browserstack/package.json delete mode 100644 test-eol-project/node_modules/browserstack/readme.md delete mode 100644 test-eol-project/node_modules/browserstack/test/api.js delete mode 100644 test-eol-project/node_modules/browserstack/test/client.js delete mode 100644 test-eol-project/node_modules/browserstack/test/screenshot.js delete mode 100644 test-eol-project/node_modules/browserstack/test/util.js delete mode 100644 test-eol-project/node_modules/camelcase/index.d.ts delete mode 100644 test-eol-project/node_modules/camelcase/index.js delete mode 100644 test-eol-project/node_modules/camelcase/license delete mode 100644 test-eol-project/node_modules/camelcase/package.json delete mode 100644 test-eol-project/node_modules/camelcase/readme.md delete mode 100644 test-eol-project/node_modules/caseless/LICENSE delete mode 100644 test-eol-project/node_modules/caseless/README.md delete mode 100644 test-eol-project/node_modules/caseless/index.js delete mode 100644 test-eol-project/node_modules/caseless/package.json delete mode 100644 test-eol-project/node_modules/caseless/test.js delete mode 100644 test-eol-project/node_modules/chalk/index.js delete mode 100644 test-eol-project/node_modules/chalk/license delete mode 100644 test-eol-project/node_modules/chalk/package.json delete mode 100644 test-eol-project/node_modules/chalk/readme.md delete mode 100644 test-eol-project/node_modules/cliui/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/cliui/LICENSE.txt delete mode 100644 test-eol-project/node_modules/cliui/README.md delete mode 100644 test-eol-project/node_modules/cliui/index.js delete mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/index.d.ts delete mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/index.js delete mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/license delete mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/package.json delete mode 100644 test-eol-project/node_modules/cliui/node_modules/ansi-regex/readme.md delete mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/index.d.ts delete mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/index.js delete mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/license delete mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/package.json delete mode 100644 test-eol-project/node_modules/cliui/node_modules/strip-ansi/readme.md delete mode 100644 test-eol-project/node_modules/cliui/package.json delete mode 100644 test-eol-project/node_modules/color-convert/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/color-convert/LICENSE delete mode 100644 test-eol-project/node_modules/color-convert/README.md delete mode 100644 test-eol-project/node_modules/color-convert/conversions.js delete mode 100644 test-eol-project/node_modules/color-convert/index.js delete mode 100644 test-eol-project/node_modules/color-convert/package.json delete mode 100644 test-eol-project/node_modules/color-convert/route.js delete mode 100644 test-eol-project/node_modules/color-name/LICENSE delete mode 100644 test-eol-project/node_modules/color-name/README.md delete mode 100644 test-eol-project/node_modules/color-name/index.js delete mode 100644 test-eol-project/node_modules/color-name/package.json delete mode 100644 test-eol-project/node_modules/combined-stream/License delete mode 100644 test-eol-project/node_modules/combined-stream/Readme.md delete mode 100644 test-eol-project/node_modules/combined-stream/lib/combined_stream.js delete mode 100644 test-eol-project/node_modules/combined-stream/package.json delete mode 100644 test-eol-project/node_modules/combined-stream/yarn.lock delete mode 100644 test-eol-project/node_modules/concat-map/.travis.yml delete mode 100644 test-eol-project/node_modules/concat-map/LICENSE delete mode 100644 test-eol-project/node_modules/concat-map/README.markdown delete mode 100644 test-eol-project/node_modules/concat-map/example/map.js delete mode 100644 test-eol-project/node_modules/concat-map/index.js delete mode 100644 test-eol-project/node_modules/concat-map/package.json delete mode 100644 test-eol-project/node_modules/concat-map/test/map.js delete mode 100644 test-eol-project/node_modules/core-util-is/LICENSE delete mode 100644 test-eol-project/node_modules/core-util-is/README.md delete mode 100644 test-eol-project/node_modules/core-util-is/lib/util.js delete mode 100644 test-eol-project/node_modules/core-util-is/package.json delete mode 100644 test-eol-project/node_modules/dashdash/CHANGES.md delete mode 100644 test-eol-project/node_modules/dashdash/LICENSE.txt delete mode 100644 test-eol-project/node_modules/dashdash/README.md delete mode 100644 test-eol-project/node_modules/dashdash/etc/dashdash.bash_completion.in delete mode 100644 test-eol-project/node_modules/dashdash/lib/dashdash.js delete mode 100644 test-eol-project/node_modules/dashdash/package.json delete mode 100644 test-eol-project/node_modules/debug/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/debug/LICENSE delete mode 100644 test-eol-project/node_modules/debug/README.md delete mode 100644 test-eol-project/node_modules/debug/node.js delete mode 100644 test-eol-project/node_modules/debug/package.json delete mode 100644 test-eol-project/node_modules/debug/src/browser.js delete mode 100644 test-eol-project/node_modules/debug/src/common.js delete mode 100644 test-eol-project/node_modules/debug/src/index.js delete mode 100644 test-eol-project/node_modules/debug/src/node.js delete mode 100644 test-eol-project/node_modules/decamelize/index.js delete mode 100644 test-eol-project/node_modules/decamelize/license delete mode 100644 test-eol-project/node_modules/decamelize/package.json delete mode 100644 test-eol-project/node_modules/decamelize/readme.md delete mode 100644 test-eol-project/node_modules/del/index.js delete mode 100644 test-eol-project/node_modules/del/license delete mode 100644 test-eol-project/node_modules/del/package.json delete mode 100644 test-eol-project/node_modules/del/readme.md delete mode 100644 test-eol-project/node_modules/delayed-stream/.npmignore delete mode 100644 test-eol-project/node_modules/delayed-stream/License delete mode 100644 test-eol-project/node_modules/delayed-stream/Makefile delete mode 100644 test-eol-project/node_modules/delayed-stream/Readme.md delete mode 100644 test-eol-project/node_modules/delayed-stream/lib/delayed_stream.js delete mode 100644 test-eol-project/node_modules/delayed-stream/package.json delete mode 100755 test-eol-project/node_modules/ecc-jsbn/LICENSE delete mode 100755 test-eol-project/node_modules/ecc-jsbn/README.md delete mode 100755 test-eol-project/node_modules/ecc-jsbn/index.js delete mode 100755 test-eol-project/node_modules/ecc-jsbn/lib/LICENSE-jsbn delete mode 100755 test-eol-project/node_modules/ecc-jsbn/lib/ec.js delete mode 100755 test-eol-project/node_modules/ecc-jsbn/lib/sec.js delete mode 100755 test-eol-project/node_modules/ecc-jsbn/package.json delete mode 100755 test-eol-project/node_modules/ecc-jsbn/test.js delete mode 100644 test-eol-project/node_modules/emoji-regex/LICENSE-MIT.txt delete mode 100644 test-eol-project/node_modules/emoji-regex/README.md delete mode 100644 test-eol-project/node_modules/emoji-regex/es2015/index.js delete mode 100644 test-eol-project/node_modules/emoji-regex/es2015/text.js delete mode 100644 test-eol-project/node_modules/emoji-regex/index.d.ts delete mode 100644 test-eol-project/node_modules/emoji-regex/index.js delete mode 100644 test-eol-project/node_modules/emoji-regex/package.json delete mode 100644 test-eol-project/node_modules/emoji-regex/text.js delete mode 100644 test-eol-project/node_modules/es6-promise/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/es6-promise/LICENSE delete mode 100644 test-eol-project/node_modules/es6-promise/README.md delete mode 100644 test-eol-project/node_modules/es6-promise/auto.js delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.js delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.map delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.min.js delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.auto.min.map delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.js delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.map delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.min.js delete mode 100644 test-eol-project/node_modules/es6-promise/dist/es6-promise.min.map delete mode 100644 test-eol-project/node_modules/es6-promise/es6-promise.d.ts delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise.auto.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/-internal.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/asap.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/enumerator.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/polyfill.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/all.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/race.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/reject.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/promise/resolve.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/then.js delete mode 100644 test-eol-project/node_modules/es6-promise/lib/es6-promise/utils.js delete mode 100644 test-eol-project/node_modules/es6-promise/package.json delete mode 100644 test-eol-project/node_modules/es6-promisify/README.md delete mode 100644 test-eol-project/node_modules/es6-promisify/dist/promise.js delete mode 100644 test-eol-project/node_modules/es6-promisify/dist/promisify.js delete mode 100644 test-eol-project/node_modules/es6-promisify/package.json delete mode 100644 test-eol-project/node_modules/escape-string-regexp/index.js delete mode 100644 test-eol-project/node_modules/escape-string-regexp/license delete mode 100644 test-eol-project/node_modules/escape-string-regexp/package.json delete mode 100644 test-eol-project/node_modules/escape-string-regexp/readme.md delete mode 100644 test-eol-project/node_modules/exit/.jshintrc delete mode 100644 test-eol-project/node_modules/exit/.npmignore delete mode 100644 test-eol-project/node_modules/exit/.travis.yml delete mode 100644 test-eol-project/node_modules/exit/Gruntfile.js delete mode 100644 test-eol-project/node_modules/exit/LICENSE-MIT delete mode 100644 test-eol-project/node_modules/exit/README.md delete mode 100644 test-eol-project/node_modules/exit/lib/exit.js delete mode 100644 test-eol-project/node_modules/exit/package.json delete mode 100644 test-eol-project/node_modules/exit/test/exit_test.js delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/10-stderr.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/10-stdout-stderr.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/10-stdout.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/100-stderr.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/100-stdout-stderr.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/100-stdout.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/1000-stderr.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/1000-stdout-stderr.txt delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/1000-stdout.txt delete mode 100755 test-eol-project/node_modules/exit/test/fixtures/create-files.sh delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/log-broken.js delete mode 100644 test-eol-project/node_modules/exit/test/fixtures/log.js delete mode 100644 test-eol-project/node_modules/extend/.editorconfig delete mode 100644 test-eol-project/node_modules/extend/.eslintrc delete mode 100644 test-eol-project/node_modules/extend/.jscs.json delete mode 100644 test-eol-project/node_modules/extend/.travis.yml delete mode 100644 test-eol-project/node_modules/extend/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/extend/LICENSE delete mode 100644 test-eol-project/node_modules/extend/README.md delete mode 100644 test-eol-project/node_modules/extend/component.json delete mode 100644 test-eol-project/node_modules/extend/index.js delete mode 100644 test-eol-project/node_modules/extend/package.json delete mode 100644 test-eol-project/node_modules/extsprintf/.gitmodules delete mode 100644 test-eol-project/node_modules/extsprintf/.npmignore delete mode 100644 test-eol-project/node_modules/extsprintf/LICENSE delete mode 100644 test-eol-project/node_modules/extsprintf/Makefile delete mode 100644 test-eol-project/node_modules/extsprintf/Makefile.targ delete mode 100644 test-eol-project/node_modules/extsprintf/README.md delete mode 100644 test-eol-project/node_modules/extsprintf/jsl.node.conf delete mode 100644 test-eol-project/node_modules/extsprintf/lib/extsprintf.js delete mode 100644 test-eol-project/node_modules/extsprintf/package.json delete mode 100644 test-eol-project/node_modules/fast-deep-equal/LICENSE delete mode 100644 test-eol-project/node_modules/fast-deep-equal/README.md delete mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/index.d.ts delete mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/index.js delete mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/react.d.ts delete mode 100644 test-eol-project/node_modules/fast-deep-equal/es6/react.js delete mode 100644 test-eol-project/node_modules/fast-deep-equal/index.d.ts delete mode 100644 test-eol-project/node_modules/fast-deep-equal/index.js delete mode 100644 test-eol-project/node_modules/fast-deep-equal/package.json delete mode 100644 test-eol-project/node_modules/fast-deep-equal/react.d.ts delete mode 100644 test-eol-project/node_modules/fast-deep-equal/react.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/.eslintrc.yml delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/.github/FUNDING.yml delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/.travis.yml delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/LICENSE delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/README.md delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/benchmark/index.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/benchmark/test.json delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/key_cmp.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/nested.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/str.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/example/value_cmp.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/index.d.ts delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/index.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/package.json delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/cmp.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/nested.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/str.js delete mode 100644 test-eol-project/node_modules/fast-json-stable-stringify/test/to-json.js delete mode 100644 test-eol-project/node_modules/find-up/index.d.ts delete mode 100644 test-eol-project/node_modules/find-up/index.js delete mode 100644 test-eol-project/node_modules/find-up/license delete mode 100644 test-eol-project/node_modules/find-up/package.json delete mode 100644 test-eol-project/node_modules/find-up/readme.md delete mode 100644 test-eol-project/node_modules/forever-agent/LICENSE delete mode 100644 test-eol-project/node_modules/forever-agent/README.md delete mode 100644 test-eol-project/node_modules/forever-agent/index.js delete mode 100644 test-eol-project/node_modules/forever-agent/package.json delete mode 100644 test-eol-project/node_modules/form-data/License delete mode 100644 test-eol-project/node_modules/form-data/README.md delete mode 100644 test-eol-project/node_modules/form-data/README.md.bak delete mode 100644 test-eol-project/node_modules/form-data/lib/browser.js delete mode 100644 test-eol-project/node_modules/form-data/lib/form_data.js delete mode 100644 test-eol-project/node_modules/form-data/lib/populate.js delete mode 100644 test-eol-project/node_modules/form-data/package.json delete mode 100644 test-eol-project/node_modules/form-data/yarn.lock delete mode 100644 test-eol-project/node_modules/fs.realpath/LICENSE delete mode 100644 test-eol-project/node_modules/fs.realpath/README.md delete mode 100644 test-eol-project/node_modules/fs.realpath/index.js delete mode 100644 test-eol-project/node_modules/fs.realpath/old.js delete mode 100644 test-eol-project/node_modules/fs.realpath/package.json delete mode 100644 test-eol-project/node_modules/get-caller-file/LICENSE.md delete mode 100644 test-eol-project/node_modules/get-caller-file/README.md delete mode 100644 test-eol-project/node_modules/get-caller-file/index.d.ts delete mode 100644 test-eol-project/node_modules/get-caller-file/index.js delete mode 100644 test-eol-project/node_modules/get-caller-file/index.js.map delete mode 100644 test-eol-project/node_modules/get-caller-file/package.json delete mode 100644 test-eol-project/node_modules/getpass/.npmignore delete mode 100644 test-eol-project/node_modules/getpass/.travis.yml delete mode 100644 test-eol-project/node_modules/getpass/LICENSE delete mode 100644 test-eol-project/node_modules/getpass/README.md delete mode 100644 test-eol-project/node_modules/getpass/lib/index.js delete mode 100644 test-eol-project/node_modules/getpass/package.json delete mode 100644 test-eol-project/node_modules/glob/LICENSE delete mode 100644 test-eol-project/node_modules/glob/README.md delete mode 100644 test-eol-project/node_modules/glob/common.js delete mode 100644 test-eol-project/node_modules/glob/glob.js delete mode 100644 test-eol-project/node_modules/glob/package.json delete mode 100644 test-eol-project/node_modules/glob/sync.js delete mode 100644 test-eol-project/node_modules/globby/index.js delete mode 100644 test-eol-project/node_modules/globby/license delete mode 100644 test-eol-project/node_modules/globby/package.json delete mode 100644 test-eol-project/node_modules/globby/readme.md delete mode 100644 test-eol-project/node_modules/har-schema/LICENSE delete mode 100644 test-eol-project/node_modules/har-schema/README.md delete mode 100644 test-eol-project/node_modules/har-schema/lib/afterRequest.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/beforeRequest.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/browser.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/cache.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/content.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/cookie.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/creator.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/entry.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/har.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/header.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/index.js delete mode 100644 test-eol-project/node_modules/har-schema/lib/log.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/page.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/pageTimings.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/postData.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/query.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/request.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/response.json delete mode 100644 test-eol-project/node_modules/har-schema/lib/timings.json delete mode 100644 test-eol-project/node_modules/har-schema/package.json delete mode 100644 test-eol-project/node_modules/har-validator/LICENSE delete mode 100644 test-eol-project/node_modules/har-validator/README.md delete mode 100644 test-eol-project/node_modules/har-validator/lib/async.js delete mode 100644 test-eol-project/node_modules/har-validator/lib/error.js delete mode 100644 test-eol-project/node_modules/har-validator/lib/promise.js delete mode 100644 test-eol-project/node_modules/har-validator/package.json delete mode 100644 test-eol-project/node_modules/has-ansi/index.js delete mode 100644 test-eol-project/node_modules/has-ansi/license delete mode 100644 test-eol-project/node_modules/has-ansi/package.json delete mode 100644 test-eol-project/node_modules/has-ansi/readme.md delete mode 100644 test-eol-project/node_modules/http-signature/.dir-locals.el delete mode 100644 test-eol-project/node_modules/http-signature/.npmignore delete mode 100644 test-eol-project/node_modules/http-signature/CHANGES.md delete mode 100644 test-eol-project/node_modules/http-signature/LICENSE delete mode 100644 test-eol-project/node_modules/http-signature/README.md delete mode 100644 test-eol-project/node_modules/http-signature/http_signing.md delete mode 100644 test-eol-project/node_modules/http-signature/lib/index.js delete mode 100644 test-eol-project/node_modules/http-signature/lib/parser.js delete mode 100644 test-eol-project/node_modules/http-signature/lib/signer.js delete mode 100644 test-eol-project/node_modules/http-signature/lib/utils.js delete mode 100644 test-eol-project/node_modules/http-signature/lib/verify.js delete mode 100644 test-eol-project/node_modules/http-signature/package.json delete mode 100644 test-eol-project/node_modules/https-proxy-agent/.editorconfig delete mode 100644 test-eol-project/node_modules/https-proxy-agent/.eslintrc.js delete mode 100644 test-eol-project/node_modules/https-proxy-agent/History.md delete mode 100644 test-eol-project/node_modules/https-proxy-agent/README.md delete mode 100644 test-eol-project/node_modules/https-proxy-agent/index.d.ts delete mode 100644 test-eol-project/node_modules/https-proxy-agent/index.js delete mode 100644 test-eol-project/node_modules/https-proxy-agent/package.json delete mode 100644 test-eol-project/node_modules/immediate/LICENSE.txt delete mode 100644 test-eol-project/node_modules/immediate/README.md delete mode 100644 test-eol-project/node_modules/immediate/dist/immediate.js delete mode 100644 test-eol-project/node_modules/immediate/dist/immediate.min.js delete mode 100644 test-eol-project/node_modules/immediate/lib/browser.js delete mode 100644 test-eol-project/node_modules/immediate/lib/index.js delete mode 100644 test-eol-project/node_modules/immediate/package.json delete mode 100644 test-eol-project/node_modules/inflight/LICENSE delete mode 100644 test-eol-project/node_modules/inflight/README.md delete mode 100644 test-eol-project/node_modules/inflight/inflight.js delete mode 100644 test-eol-project/node_modules/inflight/package.json delete mode 100644 test-eol-project/node_modules/inherits/LICENSE delete mode 100644 test-eol-project/node_modules/inherits/README.md delete mode 100644 test-eol-project/node_modules/inherits/inherits.js delete mode 100644 test-eol-project/node_modules/inherits/inherits_browser.js delete mode 100644 test-eol-project/node_modules/inherits/package.json delete mode 100644 test-eol-project/node_modules/ini/LICENSE delete mode 100644 test-eol-project/node_modules/ini/README.md delete mode 100644 test-eol-project/node_modules/ini/ini.js delete mode 100644 test-eol-project/node_modules/ini/package.json delete mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/index.d.ts delete mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/index.js delete mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/license delete mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/package.json delete mode 100644 test-eol-project/node_modules/is-fullwidth-code-point/readme.md delete mode 100644 test-eol-project/node_modules/is-path-cwd/index.js delete mode 100644 test-eol-project/node_modules/is-path-cwd/package.json delete mode 100644 test-eol-project/node_modules/is-path-cwd/readme.md delete mode 100644 test-eol-project/node_modules/is-path-in-cwd/index.js delete mode 100644 test-eol-project/node_modules/is-path-in-cwd/license delete mode 100644 test-eol-project/node_modules/is-path-in-cwd/package.json delete mode 100644 test-eol-project/node_modules/is-path-in-cwd/readme.md delete mode 100644 test-eol-project/node_modules/is-path-inside/index.js delete mode 100644 test-eol-project/node_modules/is-path-inside/license delete mode 100644 test-eol-project/node_modules/is-path-inside/package.json delete mode 100644 test-eol-project/node_modules/is-path-inside/readme.md delete mode 100644 test-eol-project/node_modules/is-typedarray/LICENSE.md delete mode 100644 test-eol-project/node_modules/is-typedarray/README.md delete mode 100644 test-eol-project/node_modules/is-typedarray/index.js delete mode 100644 test-eol-project/node_modules/is-typedarray/package.json delete mode 100644 test-eol-project/node_modules/is-typedarray/test.js delete mode 100644 test-eol-project/node_modules/isarray/.npmignore delete mode 100644 test-eol-project/node_modules/isarray/.travis.yml delete mode 100644 test-eol-project/node_modules/isarray/Makefile delete mode 100644 test-eol-project/node_modules/isarray/README.md delete mode 100644 test-eol-project/node_modules/isarray/component.json delete mode 100644 test-eol-project/node_modules/isarray/index.js delete mode 100644 test-eol-project/node_modules/isarray/package.json delete mode 100644 test-eol-project/node_modules/isarray/test.js delete mode 100644 test-eol-project/node_modules/isstream/.jshintrc delete mode 100644 test-eol-project/node_modules/isstream/.npmignore delete mode 100644 test-eol-project/node_modules/isstream/.travis.yml delete mode 100644 test-eol-project/node_modules/isstream/LICENSE.md delete mode 100644 test-eol-project/node_modules/isstream/README.md delete mode 100644 test-eol-project/node_modules/isstream/isstream.js delete mode 100644 test-eol-project/node_modules/isstream/package.json delete mode 100644 test-eol-project/node_modules/isstream/test.js delete mode 100644 test-eol-project/node_modules/jasmine-core/.codeclimate.yml delete mode 100644 test-eol-project/node_modules/jasmine-core/.editorconfig delete mode 100644 test-eol-project/node_modules/jasmine-core/.github/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/jasmine-core/.github/ISSUE_TEMPLATE.md delete mode 100644 test-eol-project/node_modules/jasmine-core/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 test-eol-project/node_modules/jasmine-core/.npmignore delete mode 100644 test-eol-project/node_modules/jasmine-core/CODE_OF_CONDUCT.md delete mode 100644 test-eol-project/node_modules/jasmine-core/MANIFEST.in delete mode 100644 test-eol-project/node_modules/jasmine-core/MIT.LICENSE delete mode 100644 test-eol-project/node_modules/jasmine-core/README.md delete mode 100644 test-eol-project/node_modules/jasmine-core/RELEASE.md delete mode 100644 test-eol-project/node_modules/jasmine-core/bower.json delete mode 100644 test-eol-project/node_modules/jasmine-core/images/jasmine-horizontal.png delete mode 100644 test-eol-project/node_modules/jasmine-core/images/jasmine-horizontal.svg delete mode 100644 test-eol-project/node_modules/jasmine-core/images/jasmine_favicon.png delete mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/PKG-INFO delete mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/SOURCES.txt delete mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/dependency_links.txt delete mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/requires.txt delete mode 100644 test-eol-project/node_modules/jasmine-core/jasmine_core.egg-info/top_level.txt delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/console/console.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/boot.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Player.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Song.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples/SpecHelper.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/node_example/spec/jasmine_examples/PlayerSpec.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/spec/PlayerSpec.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/spec/SpecHelper.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/src/Player.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/example/src/Song.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/jasmine.css delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/json2.js delete mode 100644 test-eol-project/node_modules/jasmine-core/lib/jasmine-core/node_boot.js delete mode 100644 test-eol-project/node_modules/jasmine-core/package.json delete mode 100644 test-eol-project/node_modules/jasmine-core/requirements.txt delete mode 100644 test-eol-project/node_modules/jasmine/.travis.yml delete mode 100644 test-eol-project/node_modules/jasmine/Gruntfile.js delete mode 100644 test-eol-project/node_modules/jasmine/MIT.LICENSE delete mode 100644 test-eol-project/node_modules/jasmine/README.md delete mode 100644 test-eol-project/node_modules/jasmine/lib/command.js delete mode 100644 test-eol-project/node_modules/jasmine/lib/examples/jasmine.json delete mode 100644 test-eol-project/node_modules/jasmine/lib/exit.js delete mode 100644 test-eol-project/node_modules/jasmine/lib/filters/console_spec_filter.js delete mode 100644 test-eol-project/node_modules/jasmine/lib/jasmine.js delete mode 100644 test-eol-project/node_modules/jasmine/lib/printDeprecation.js delete mode 100644 test-eol-project/node_modules/jasmine/lib/reporters/completion_reporter.js delete mode 100644 test-eol-project/node_modules/jasmine/lib/reporters/console_reporter.js delete mode 100644 test-eol-project/node_modules/jasmine/package.json delete mode 100644 test-eol-project/node_modules/jasmine/tasks/jasmine.js delete mode 100644 test-eol-project/node_modules/jasminewd2/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/jasminewd2/LICENSE delete mode 100644 test-eol-project/node_modules/jasminewd2/README.md delete mode 100644 test-eol-project/node_modules/jasminewd2/index.js delete mode 100644 test-eol-project/node_modules/jasminewd2/maybePromise.js delete mode 100644 test-eol-project/node_modules/jasminewd2/package.json delete mode 100644 test-eol-project/node_modules/jasminewd2/scheduler.md delete mode 100644 test-eol-project/node_modules/jsbn/.npmignore delete mode 100644 test-eol-project/node_modules/jsbn/LICENSE delete mode 100644 test-eol-project/node_modules/jsbn/README.md delete mode 100644 test-eol-project/node_modules/jsbn/example.html delete mode 100644 test-eol-project/node_modules/jsbn/example.js delete mode 100644 test-eol-project/node_modules/jsbn/index.js delete mode 100644 test-eol-project/node_modules/jsbn/package.json delete mode 100644 test-eol-project/node_modules/json-schema-traverse/.eslintrc.yml delete mode 100644 test-eol-project/node_modules/json-schema-traverse/.travis.yml delete mode 100644 test-eol-project/node_modules/json-schema-traverse/LICENSE delete mode 100644 test-eol-project/node_modules/json-schema-traverse/README.md delete mode 100644 test-eol-project/node_modules/json-schema-traverse/index.js delete mode 100644 test-eol-project/node_modules/json-schema-traverse/package.json delete mode 100644 test-eol-project/node_modules/json-schema-traverse/spec/.eslintrc.yml delete mode 100644 test-eol-project/node_modules/json-schema-traverse/spec/fixtures/schema.js delete mode 100644 test-eol-project/node_modules/json-schema-traverse/spec/index.spec.js delete mode 100644 test-eol-project/node_modules/json-schema/LICENSE delete mode 100644 test-eol-project/node_modules/json-schema/README.md delete mode 100644 test-eol-project/node_modules/json-schema/lib/links.js delete mode 100644 test-eol-project/node_modules/json-schema/lib/validate.js delete mode 100644 test-eol-project/node_modules/json-schema/package.json delete mode 100644 test-eol-project/node_modules/json-stringify-safe/.npmignore delete mode 100644 test-eol-project/node_modules/json-stringify-safe/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/json-stringify-safe/LICENSE delete mode 100644 test-eol-project/node_modules/json-stringify-safe/Makefile delete mode 100644 test-eol-project/node_modules/json-stringify-safe/README.md delete mode 100644 test-eol-project/node_modules/json-stringify-safe/package.json delete mode 100644 test-eol-project/node_modules/json-stringify-safe/stringify.js delete mode 100644 test-eol-project/node_modules/json-stringify-safe/test/mocha.opts delete mode 100644 test-eol-project/node_modules/json-stringify-safe/test/stringify_test.js delete mode 100644 test-eol-project/node_modules/jsprim/CHANGES.md delete mode 100644 test-eol-project/node_modules/jsprim/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/jsprim/LICENSE delete mode 100644 test-eol-project/node_modules/jsprim/README.md delete mode 100644 test-eol-project/node_modules/jsprim/lib/jsprim.js delete mode 100644 test-eol-project/node_modules/jsprim/package.json delete mode 100644 test-eol-project/node_modules/jszip/.codeclimate.yml delete mode 100644 test-eol-project/node_modules/jszip/.editorconfig delete mode 100644 test-eol-project/node_modules/jszip/.eslintrc.js delete mode 100644 test-eol-project/node_modules/jszip/.github/workflows/pr.yaml delete mode 100644 test-eol-project/node_modules/jszip/.jekyll-metadata delete mode 100644 test-eol-project/node_modules/jszip/.travis.yml delete mode 100644 test-eol-project/node_modules/jszip/CHANGES.md delete mode 100644 test-eol-project/node_modules/jszip/LICENSE.markdown delete mode 100644 test-eol-project/node_modules/jszip/README.markdown delete mode 100644 test-eol-project/node_modules/jszip/deps.js delete mode 100644 test-eol-project/node_modules/jszip/dist/jszip.js delete mode 100644 test-eol-project/node_modules/jszip/dist/jszip.min.js delete mode 100644 test-eol-project/node_modules/jszip/graph.svg delete mode 100644 test-eol-project/node_modules/jszip/index.d.ts delete mode 100644 test-eol-project/node_modules/jszip/lib/base64.js delete mode 100644 test-eol-project/node_modules/jszip/lib/compressedObject.js delete mode 100644 test-eol-project/node_modules/jszip/lib/compressions.js delete mode 100644 test-eol-project/node_modules/jszip/lib/crc32.js delete mode 100644 test-eol-project/node_modules/jszip/lib/defaults.js delete mode 100644 test-eol-project/node_modules/jszip/lib/external.js delete mode 100644 test-eol-project/node_modules/jszip/lib/flate.js delete mode 100644 test-eol-project/node_modules/jszip/lib/generate/ZipFileWorker.js delete mode 100644 test-eol-project/node_modules/jszip/lib/generate/index.js delete mode 100644 test-eol-project/node_modules/jszip/lib/index.js delete mode 100644 test-eol-project/node_modules/jszip/lib/license_header.js delete mode 100644 test-eol-project/node_modules/jszip/lib/load.js delete mode 100644 test-eol-project/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js delete mode 100644 test-eol-project/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js delete mode 100644 test-eol-project/node_modules/jszip/lib/nodejsUtils.js delete mode 100644 test-eol-project/node_modules/jszip/lib/object.js delete mode 100644 test-eol-project/node_modules/jszip/lib/readable-stream-browser.js delete mode 100644 test-eol-project/node_modules/jszip/lib/reader/ArrayReader.js delete mode 100644 test-eol-project/node_modules/jszip/lib/reader/DataReader.js delete mode 100644 test-eol-project/node_modules/jszip/lib/reader/NodeBufferReader.js delete mode 100644 test-eol-project/node_modules/jszip/lib/reader/StringReader.js delete mode 100644 test-eol-project/node_modules/jszip/lib/reader/Uint8ArrayReader.js delete mode 100644 test-eol-project/node_modules/jszip/lib/reader/readerFor.js delete mode 100644 test-eol-project/node_modules/jszip/lib/signature.js delete mode 100644 test-eol-project/node_modules/jszip/lib/stream/ConvertWorker.js delete mode 100644 test-eol-project/node_modules/jszip/lib/stream/Crc32Probe.js delete mode 100644 test-eol-project/node_modules/jszip/lib/stream/DataLengthProbe.js delete mode 100644 test-eol-project/node_modules/jszip/lib/stream/DataWorker.js delete mode 100644 test-eol-project/node_modules/jszip/lib/stream/GenericWorker.js delete mode 100644 test-eol-project/node_modules/jszip/lib/stream/StreamHelper.js delete mode 100644 test-eol-project/node_modules/jszip/lib/support.js delete mode 100644 test-eol-project/node_modules/jszip/lib/utf8.js delete mode 100644 test-eol-project/node_modules/jszip/lib/utils.js delete mode 100644 test-eol-project/node_modules/jszip/lib/zipEntries.js delete mode 100644 test-eol-project/node_modules/jszip/lib/zipEntry.js delete mode 100644 test-eol-project/node_modules/jszip/lib/zipObject.js delete mode 100644 test-eol-project/node_modules/jszip/package.json delete mode 100644 test-eol-project/node_modules/jszip/sponsors.md delete mode 100644 test-eol-project/node_modules/jszip/tsconfig.json delete mode 100644 test-eol-project/node_modules/jszip/vendor/FileSaver.js delete mode 100644 test-eol-project/node_modules/lie/README.md delete mode 100644 test-eol-project/node_modules/lie/dist/lie.js delete mode 100644 test-eol-project/node_modules/lie/dist/lie.min.js delete mode 100644 test-eol-project/node_modules/lie/dist/lie.polyfill.js delete mode 100644 test-eol-project/node_modules/lie/dist/lie.polyfill.min.js delete mode 100644 test-eol-project/node_modules/lie/lib/browser.js delete mode 100644 test-eol-project/node_modules/lie/lib/index.js delete mode 100644 test-eol-project/node_modules/lie/license.md delete mode 100644 test-eol-project/node_modules/lie/lie.d.ts delete mode 100644 test-eol-project/node_modules/lie/package.json delete mode 100644 test-eol-project/node_modules/lie/polyfill.js delete mode 100644 test-eol-project/node_modules/locate-path/index.d.ts delete mode 100644 test-eol-project/node_modules/locate-path/index.js delete mode 100644 test-eol-project/node_modules/locate-path/license delete mode 100644 test-eol-project/node_modules/locate-path/package.json delete mode 100644 test-eol-project/node_modules/locate-path/readme.md delete mode 100644 test-eol-project/node_modules/mime-db/HISTORY.md delete mode 100644 test-eol-project/node_modules/mime-db/LICENSE delete mode 100644 test-eol-project/node_modules/mime-db/README.md delete mode 100644 test-eol-project/node_modules/mime-db/db.json delete mode 100644 test-eol-project/node_modules/mime-db/index.js delete mode 100644 test-eol-project/node_modules/mime-db/package.json delete mode 100644 test-eol-project/node_modules/mime-types/HISTORY.md delete mode 100644 test-eol-project/node_modules/mime-types/LICENSE delete mode 100644 test-eol-project/node_modules/mime-types/README.md delete mode 100644 test-eol-project/node_modules/mime-types/index.js delete mode 100644 test-eol-project/node_modules/mime-types/package.json delete mode 100644 test-eol-project/node_modules/minimatch/LICENSE delete mode 100644 test-eol-project/node_modules/minimatch/README.md delete mode 100644 test-eol-project/node_modules/minimatch/minimatch.js delete mode 100644 test-eol-project/node_modules/minimatch/package.json delete mode 100644 test-eol-project/node_modules/minimist/.eslintrc delete mode 100644 test-eol-project/node_modules/minimist/.github/FUNDING.yml delete mode 100644 test-eol-project/node_modules/minimist/.nycrc delete mode 100644 test-eol-project/node_modules/minimist/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/minimist/LICENSE delete mode 100644 test-eol-project/node_modules/minimist/README.md delete mode 100644 test-eol-project/node_modules/minimist/example/parse.js delete mode 100644 test-eol-project/node_modules/minimist/index.js delete mode 100644 test-eol-project/node_modules/minimist/package.json delete mode 100644 test-eol-project/node_modules/minimist/test/all_bool.js delete mode 100644 test-eol-project/node_modules/minimist/test/bool.js delete mode 100644 test-eol-project/node_modules/minimist/test/dash.js delete mode 100644 test-eol-project/node_modules/minimist/test/default_bool.js delete mode 100644 test-eol-project/node_modules/minimist/test/dotted.js delete mode 100644 test-eol-project/node_modules/minimist/test/kv_short.js delete mode 100644 test-eol-project/node_modules/minimist/test/long.js delete mode 100644 test-eol-project/node_modules/minimist/test/num.js delete mode 100644 test-eol-project/node_modules/minimist/test/parse.js delete mode 100644 test-eol-project/node_modules/minimist/test/parse_modified.js delete mode 100644 test-eol-project/node_modules/minimist/test/proto.js delete mode 100644 test-eol-project/node_modules/minimist/test/short.js delete mode 100644 test-eol-project/node_modules/minimist/test/stop_early.js delete mode 100644 test-eol-project/node_modules/minimist/test/unknown.js delete mode 100644 test-eol-project/node_modules/minimist/test/whitespace.js delete mode 100644 test-eol-project/node_modules/ms/index.js delete mode 100644 test-eol-project/node_modules/ms/license.md delete mode 100644 test-eol-project/node_modules/ms/package.json delete mode 100644 test-eol-project/node_modules/ms/readme.md delete mode 100644 test-eol-project/node_modules/oauth-sign/LICENSE delete mode 100644 test-eol-project/node_modules/oauth-sign/README.md delete mode 100644 test-eol-project/node_modules/oauth-sign/index.js delete mode 100644 test-eol-project/node_modules/oauth-sign/package.json delete mode 100644 test-eol-project/node_modules/object-assign/index.js delete mode 100644 test-eol-project/node_modules/object-assign/license delete mode 100644 test-eol-project/node_modules/object-assign/package.json delete mode 100644 test-eol-project/node_modules/object-assign/readme.md delete mode 100644 test-eol-project/node_modules/once/LICENSE delete mode 100644 test-eol-project/node_modules/once/README.md delete mode 100644 test-eol-project/node_modules/once/once.js delete mode 100644 test-eol-project/node_modules/once/package.json delete mode 100644 test-eol-project/node_modules/os-tmpdir/index.js delete mode 100644 test-eol-project/node_modules/os-tmpdir/license delete mode 100644 test-eol-project/node_modules/os-tmpdir/package.json delete mode 100644 test-eol-project/node_modules/os-tmpdir/readme.md delete mode 100644 test-eol-project/node_modules/p-limit/index.d.ts delete mode 100644 test-eol-project/node_modules/p-limit/index.js delete mode 100644 test-eol-project/node_modules/p-limit/license delete mode 100644 test-eol-project/node_modules/p-limit/package.json delete mode 100644 test-eol-project/node_modules/p-limit/readme.md delete mode 100644 test-eol-project/node_modules/p-locate/index.d.ts delete mode 100644 test-eol-project/node_modules/p-locate/index.js delete mode 100644 test-eol-project/node_modules/p-locate/license delete mode 100644 test-eol-project/node_modules/p-locate/package.json delete mode 100644 test-eol-project/node_modules/p-locate/readme.md delete mode 100644 test-eol-project/node_modules/p-try/index.d.ts delete mode 100644 test-eol-project/node_modules/p-try/index.js delete mode 100644 test-eol-project/node_modules/p-try/license delete mode 100644 test-eol-project/node_modules/p-try/package.json delete mode 100644 test-eol-project/node_modules/p-try/readme.md delete mode 100644 test-eol-project/node_modules/pako/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/pako/LICENSE delete mode 100644 test-eol-project/node_modules/pako/README.md delete mode 100644 test-eol-project/node_modules/pako/dist/pako.js delete mode 100644 test-eol-project/node_modules/pako/dist/pako.min.js delete mode 100644 test-eol-project/node_modules/pako/dist/pako_deflate.js delete mode 100644 test-eol-project/node_modules/pako/dist/pako_deflate.min.js delete mode 100644 test-eol-project/node_modules/pako/dist/pako_inflate.js delete mode 100644 test-eol-project/node_modules/pako/dist/pako_inflate.min.js delete mode 100644 test-eol-project/node_modules/pako/index.js delete mode 100644 test-eol-project/node_modules/pako/lib/deflate.js delete mode 100644 test-eol-project/node_modules/pako/lib/inflate.js delete mode 100644 test-eol-project/node_modules/pako/lib/utils/common.js delete mode 100644 test-eol-project/node_modules/pako/lib/utils/strings.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/README delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/adler32.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/constants.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/crc32.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/deflate.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/gzheader.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/inffast.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/inflate.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/inftrees.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/messages.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/trees.js delete mode 100644 test-eol-project/node_modules/pako/lib/zlib/zstream.js delete mode 100644 test-eol-project/node_modules/pako/package.json delete mode 100644 test-eol-project/node_modules/path-exists/index.d.ts delete mode 100644 test-eol-project/node_modules/path-exists/index.js delete mode 100644 test-eol-project/node_modules/path-exists/license delete mode 100644 test-eol-project/node_modules/path-exists/package.json delete mode 100644 test-eol-project/node_modules/path-exists/readme.md delete mode 100644 test-eol-project/node_modules/path-is-absolute/index.js delete mode 100644 test-eol-project/node_modules/path-is-absolute/license delete mode 100644 test-eol-project/node_modules/path-is-absolute/package.json delete mode 100644 test-eol-project/node_modules/path-is-absolute/readme.md delete mode 100644 test-eol-project/node_modules/path-is-inside/LICENSE.txt delete mode 100644 test-eol-project/node_modules/path-is-inside/lib/path-is-inside.js delete mode 100644 test-eol-project/node_modules/path-is-inside/package.json delete mode 100644 test-eol-project/node_modules/performance-now/.npmignore delete mode 100644 test-eol-project/node_modules/performance-now/.tm_properties delete mode 100644 test-eol-project/node_modules/performance-now/.travis.yml delete mode 100644 test-eol-project/node_modules/performance-now/README.md delete mode 100644 test-eol-project/node_modules/performance-now/lib/performance-now.js delete mode 100644 test-eol-project/node_modules/performance-now/lib/performance-now.js.map delete mode 100644 test-eol-project/node_modules/performance-now/license.txt delete mode 100644 test-eol-project/node_modules/performance-now/package.json delete mode 100644 test-eol-project/node_modules/performance-now/src/index.d.ts delete mode 100644 test-eol-project/node_modules/performance-now/src/performance-now.coffee delete mode 100644 test-eol-project/node_modules/performance-now/test/mocha.opts delete mode 100644 test-eol-project/node_modules/performance-now/test/performance-now.coffee delete mode 100644 test-eol-project/node_modules/performance-now/test/scripts.coffee delete mode 100755 test-eol-project/node_modules/performance-now/test/scripts/delayed-call.coffee delete mode 100755 test-eol-project/node_modules/performance-now/test/scripts/delayed-require.coffee delete mode 100755 test-eol-project/node_modules/performance-now/test/scripts/difference.coffee delete mode 100755 test-eol-project/node_modules/performance-now/test/scripts/initial-value.coffee delete mode 100644 test-eol-project/node_modules/pify/index.js delete mode 100644 test-eol-project/node_modules/pify/license delete mode 100644 test-eol-project/node_modules/pify/package.json delete mode 100644 test-eol-project/node_modules/pify/readme.md delete mode 100644 test-eol-project/node_modules/pinkie-promise/index.js delete mode 100644 test-eol-project/node_modules/pinkie-promise/license delete mode 100644 test-eol-project/node_modules/pinkie-promise/package.json delete mode 100644 test-eol-project/node_modules/pinkie-promise/readme.md delete mode 100644 test-eol-project/node_modules/pinkie/index.js delete mode 100644 test-eol-project/node_modules/pinkie/license delete mode 100644 test-eol-project/node_modules/pinkie/package.json delete mode 100644 test-eol-project/node_modules/pinkie/readme.md delete mode 100644 test-eol-project/node_modules/process-nextick-args/index.js delete mode 100644 test-eol-project/node_modules/process-nextick-args/license.md delete mode 100644 test-eol-project/node_modules/process-nextick-args/package.json delete mode 100644 test-eol-project/node_modules/process-nextick-args/readme.md delete mode 100644 test-eol-project/node_modules/protractor/.circleci/config.yml delete mode 100644 test-eol-project/node_modules/protractor/.jshintignore delete mode 100644 test-eol-project/node_modules/protractor/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/protractor/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/protractor/DEVELOPER.md delete mode 100644 test-eol-project/node_modules/protractor/LICENSE delete mode 100644 test-eol-project/node_modules/protractor/README.md delete mode 100644 test-eol-project/node_modules/protractor/built/bpRunner.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/bpRunner.js delete mode 100644 test-eol-project/node_modules/protractor/built/breakpointhook.js delete mode 100644 test-eol-project/node_modules/protractor/built/browser.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/browser.js delete mode 100644 test-eol-project/node_modules/protractor/built/cli.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/cli.js delete mode 100644 test-eol-project/node_modules/protractor/built/clientsidescripts.js delete mode 100644 test-eol-project/node_modules/protractor/built/config.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/config.js delete mode 100644 test-eol-project/node_modules/protractor/built/configParser.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/configParser.js delete mode 100644 test-eol-project/node_modules/protractor/built/debugger.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/debugger.js delete mode 100644 test-eol-project/node_modules/protractor/built/debugger/clients/explorer.js delete mode 100644 test-eol-project/node_modules/protractor/built/debugger/clients/wddebugger.js delete mode 100644 test-eol-project/node_modules/protractor/built/debugger/debuggerCommons.js delete mode 100644 test-eol-project/node_modules/protractor/built/debugger/modes/commandRepl.js delete mode 100644 test-eol-project/node_modules/protractor/built/debugger/modes/debuggerRepl.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/attachSession.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/attachSession.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/browserStack.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/browserStack.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/direct.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/direct.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/driverProvider.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/driverProvider.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/hosted.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/hosted.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/index.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/index.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/kobiton.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/kobiton.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/local.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/local.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/mock.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/mock.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/sauce.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/sauce.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/testObject.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/testObject.js delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/useExistingWebDriver.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/driverProviders/useExistingWebDriver.js delete mode 100644 test-eol-project/node_modules/protractor/built/element.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/element.js delete mode 100644 test-eol-project/node_modules/protractor/built/exitCodes.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/exitCodes.js delete mode 100644 test-eol-project/node_modules/protractor/built/expectedConditions.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/expectedConditions.js delete mode 100644 test-eol-project/node_modules/protractor/built/frameworks/__protractor_internal_afterEach_setup_spec.js delete mode 100644 test-eol-project/node_modules/protractor/built/frameworks/debugprint.js delete mode 100644 test-eol-project/node_modules/protractor/built/frameworks/explorer.js delete mode 100644 test-eol-project/node_modules/protractor/built/frameworks/jasmine.js delete mode 100644 test-eol-project/node_modules/protractor/built/frameworks/mocha.js delete mode 100644 test-eol-project/node_modules/protractor/built/frameworks/setupAfterEach.js delete mode 100644 test-eol-project/node_modules/protractor/built/index.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/index.js delete mode 100644 test-eol-project/node_modules/protractor/built/launcher.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/launcher.js delete mode 100644 test-eol-project/node_modules/protractor/built/locators.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/locators.js delete mode 100644 test-eol-project/node_modules/protractor/built/logger.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/logger.js delete mode 100644 test-eol-project/node_modules/protractor/built/plugins.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/plugins.js delete mode 100644 test-eol-project/node_modules/protractor/built/ptor.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/ptor.js delete mode 100644 test-eol-project/node_modules/protractor/built/runner.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/runner.js delete mode 100644 test-eol-project/node_modules/protractor/built/runnerCli.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/runnerCli.js delete mode 100644 test-eol-project/node_modules/protractor/built/selenium-webdriver/locators.js delete mode 100644 test-eol-project/node_modules/protractor/built/selenium-webdriver/webdriver.js delete mode 100644 test-eol-project/node_modules/protractor/built/taskLogger.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/taskLogger.js delete mode 100644 test-eol-project/node_modules/protractor/built/taskRunner.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/taskRunner.js delete mode 100644 test-eol-project/node_modules/protractor/built/taskScheduler.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/taskScheduler.js delete mode 100644 test-eol-project/node_modules/protractor/built/util.d.ts delete mode 100644 test-eol-project/node_modules/protractor/built/util.js delete mode 100644 test-eol-project/node_modules/protractor/built/webdriver-js-extender/index.js delete mode 100644 test-eol-project/node_modules/protractor/example/angular_material/conf.js delete mode 100644 test-eol-project/node_modules/protractor/example/angular_material/input_spec.js delete mode 100644 test-eol-project/node_modules/protractor/example/angular_material/mat_paginator_spec.js delete mode 100644 test-eol-project/node_modules/protractor/example/conf.js delete mode 100644 test-eol-project/node_modules/protractor/example/example_spec.js delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/README.md delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/angularPage.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/asyncAwait/README.md delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/asyncAwait/conf.js delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/asyncAwait/spec.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/conf.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/confPageObjects.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/package.json delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/plugins.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/spec.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/specPageObjects.ts delete mode 100644 test-eol-project/node_modules/protractor/exampleTypescript/tsconfig.json delete mode 100644 test-eol-project/node_modules/protractor/gulpfile.js delete mode 100644 test-eol-project/node_modules/protractor/package.json delete mode 100644 test-eol-project/node_modules/protractor/ts_spec_config.json delete mode 100644 test-eol-project/node_modules/protractor/tsconfig.json delete mode 100644 test-eol-project/node_modules/protractor/tslint.json delete mode 100644 test-eol-project/node_modules/psl/LICENSE delete mode 100644 test-eol-project/node_modules/psl/README.md delete mode 100644 test-eol-project/node_modules/psl/SECURITY.md delete mode 100644 test-eol-project/node_modules/psl/browserstack-logo.svg delete mode 100644 test-eol-project/node_modules/psl/data/rules.js delete mode 100644 test-eol-project/node_modules/psl/dist/psl.cjs delete mode 100644 test-eol-project/node_modules/psl/dist/psl.mjs delete mode 100644 test-eol-project/node_modules/psl/dist/psl.umd.cjs delete mode 100644 test-eol-project/node_modules/psl/index.js delete mode 100644 test-eol-project/node_modules/psl/package.json delete mode 100644 test-eol-project/node_modules/psl/types/index.d.ts delete mode 100644 test-eol-project/node_modules/psl/types/test.ts delete mode 100644 test-eol-project/node_modules/psl/types/tsconfig.json delete mode 100644 test-eol-project/node_modules/psl/vite.config.js delete mode 100644 test-eol-project/node_modules/punycode/LICENSE-MIT.txt delete mode 100644 test-eol-project/node_modules/punycode/README.md delete mode 100644 test-eol-project/node_modules/punycode/package.json delete mode 100644 test-eol-project/node_modules/punycode/punycode.es6.js delete mode 100644 test-eol-project/node_modules/punycode/punycode.js delete mode 100644 test-eol-project/node_modules/q/CHANGES.md delete mode 100644 test-eol-project/node_modules/q/LICENSE delete mode 100644 test-eol-project/node_modules/q/README.md delete mode 100644 test-eol-project/node_modules/q/package.json delete mode 100644 test-eol-project/node_modules/q/q.js delete mode 100644 test-eol-project/node_modules/q/queue.js delete mode 100644 test-eol-project/node_modules/qs/.editorconfig delete mode 100644 test-eol-project/node_modules/qs/.eslintrc delete mode 100644 test-eol-project/node_modules/qs/.github/FUNDING.yml delete mode 100644 test-eol-project/node_modules/qs/.nycrc delete mode 100644 test-eol-project/node_modules/qs/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/qs/LICENSE.md delete mode 100644 test-eol-project/node_modules/qs/README.md delete mode 100644 test-eol-project/node_modules/qs/dist/qs.js delete mode 100644 test-eol-project/node_modules/qs/lib/formats.js delete mode 100644 test-eol-project/node_modules/qs/lib/index.js delete mode 100644 test-eol-project/node_modules/qs/lib/parse.js delete mode 100644 test-eol-project/node_modules/qs/lib/stringify.js delete mode 100644 test-eol-project/node_modules/qs/lib/utils.js delete mode 100644 test-eol-project/node_modules/qs/package.json delete mode 100644 test-eol-project/node_modules/qs/test/index.js delete mode 100644 test-eol-project/node_modules/qs/test/parse.js delete mode 100644 test-eol-project/node_modules/qs/test/stringify.js delete mode 100644 test-eol-project/node_modules/qs/test/utils.js delete mode 100644 test-eol-project/node_modules/readable-stream/.travis.yml delete mode 100644 test-eol-project/node_modules/readable-stream/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/readable-stream/GOVERNANCE.md delete mode 100644 test-eol-project/node_modules/readable-stream/LICENSE delete mode 100644 test-eol-project/node_modules/readable-stream/README.md delete mode 100644 test-eol-project/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md delete mode 100644 test-eol-project/node_modules/readable-stream/duplex-browser.js delete mode 100644 test-eol-project/node_modules/readable-stream/duplex.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/BufferList.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/destroy.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/stream-browser.js delete mode 100644 test-eol-project/node_modules/readable-stream/lib/internal/streams/stream.js delete mode 100644 test-eol-project/node_modules/readable-stream/package.json delete mode 100644 test-eol-project/node_modules/readable-stream/passthrough.js delete mode 100644 test-eol-project/node_modules/readable-stream/readable-browser.js delete mode 100644 test-eol-project/node_modules/readable-stream/readable.js delete mode 100644 test-eol-project/node_modules/readable-stream/transform.js delete mode 100644 test-eol-project/node_modules/readable-stream/writable-browser.js delete mode 100644 test-eol-project/node_modules/readable-stream/writable.js delete mode 100644 test-eol-project/node_modules/request/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/request/LICENSE delete mode 100644 test-eol-project/node_modules/request/README.md delete mode 100755 test-eol-project/node_modules/request/index.js delete mode 100644 test-eol-project/node_modules/request/lib/auth.js delete mode 100644 test-eol-project/node_modules/request/lib/cookies.js delete mode 100644 test-eol-project/node_modules/request/lib/getProxyFromURI.js delete mode 100644 test-eol-project/node_modules/request/lib/har.js delete mode 100644 test-eol-project/node_modules/request/lib/hawk.js delete mode 100644 test-eol-project/node_modules/request/lib/helpers.js delete mode 100644 test-eol-project/node_modules/request/lib/multipart.js delete mode 100644 test-eol-project/node_modules/request/lib/oauth.js delete mode 100644 test-eol-project/node_modules/request/lib/querystring.js delete mode 100644 test-eol-project/node_modules/request/lib/redirect.js delete mode 100644 test-eol-project/node_modules/request/lib/tunnel.js delete mode 100644 test-eol-project/node_modules/request/package.json delete mode 100644 test-eol-project/node_modules/request/request.js delete mode 100644 test-eol-project/node_modules/require-directory/.jshintrc delete mode 100644 test-eol-project/node_modules/require-directory/.npmignore delete mode 100644 test-eol-project/node_modules/require-directory/.travis.yml delete mode 100644 test-eol-project/node_modules/require-directory/LICENSE delete mode 100644 test-eol-project/node_modules/require-directory/README.markdown delete mode 100644 test-eol-project/node_modules/require-directory/index.js delete mode 100644 test-eol-project/node_modules/require-directory/package.json delete mode 100644 test-eol-project/node_modules/require-main-filename/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/require-main-filename/LICENSE.txt delete mode 100644 test-eol-project/node_modules/require-main-filename/README.md delete mode 100644 test-eol-project/node_modules/require-main-filename/index.js delete mode 100644 test-eol-project/node_modules/require-main-filename/package.json delete mode 100644 test-eol-project/node_modules/rimraf/LICENSE delete mode 100644 test-eol-project/node_modules/rimraf/README.md delete mode 100755 test-eol-project/node_modules/rimraf/bin.js delete mode 100644 test-eol-project/node_modules/rimraf/package.json delete mode 100644 test-eol-project/node_modules/rimraf/rimraf.js delete mode 100644 test-eol-project/node_modules/safe-buffer/LICENSE delete mode 100644 test-eol-project/node_modules/safe-buffer/README.md delete mode 100644 test-eol-project/node_modules/safe-buffer/index.d.ts delete mode 100644 test-eol-project/node_modules/safe-buffer/index.js delete mode 100644 test-eol-project/node_modules/safe-buffer/package.json delete mode 100644 test-eol-project/node_modules/safer-buffer/LICENSE delete mode 100644 test-eol-project/node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 test-eol-project/node_modules/safer-buffer/Readme.md delete mode 100644 test-eol-project/node_modules/safer-buffer/dangerous.js delete mode 100644 test-eol-project/node_modules/safer-buffer/package.json delete mode 100644 test-eol-project/node_modules/safer-buffer/safer.js delete mode 100644 test-eol-project/node_modules/safer-buffer/tests.js delete mode 100644 test-eol-project/node_modules/saucelabs/.jshintrc delete mode 100644 test-eol-project/node_modules/saucelabs/.travis.yml delete mode 100644 test-eol-project/node_modules/saucelabs/Makefile delete mode 100644 test-eol-project/node_modules/saucelabs/README.md delete mode 100644 test-eol-project/node_modules/saucelabs/index.js delete mode 100644 test-eol-project/node_modules/saucelabs/lib/SauceLabs.js delete mode 100644 test-eol-project/node_modules/saucelabs/lib/utils.js delete mode 100644 test-eol-project/node_modules/saucelabs/package.json delete mode 100644 test-eol-project/node_modules/saucelabs/test/SauceLabs.js delete mode 100644 test-eol-project/node_modules/saucelabs/test/bootstrap/index.js delete mode 100644 test-eol-project/node_modules/saucelabs/test/helpers/index.js delete mode 100644 test-eol-project/node_modules/saucelabs/test/mocha.opts delete mode 100644 test-eol-project/node_modules/saucelabs/test/utils.js delete mode 100644 test-eol-project/node_modules/sax/LICENSE.md delete mode 100644 test-eol-project/node_modules/sax/README.md delete mode 100644 test-eol-project/node_modules/sax/lib/sax.js delete mode 100644 test-eol-project/node_modules/sax/package.json delete mode 100644 test-eol-project/node_modules/selenium-webdriver/.npmignore delete mode 100644 test-eol-project/node_modules/selenium-webdriver/CHANGES.md delete mode 100644 test-eol-project/node_modules/selenium-webdriver/LICENSE delete mode 100644 test-eol-project/node_modules/selenium-webdriver/NOTICE delete mode 100644 test-eol-project/node_modules/selenium-webdriver/README.md delete mode 100644 test-eol-project/node_modules/selenium-webdriver/chrome.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/edge.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/async_await_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/chrome_android.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/chrome_mobile_emulation.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/firefox_channels.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/google_search.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/google_search_generator.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/google_search_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/headless.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/logging.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/example/parallel_flows.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/binary.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/extension.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/firefox/profile.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/http/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/http/util.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/ie.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/io/exec.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/io/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/io/zip.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/README delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/actions.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/atoms/get-attribute.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/atoms/is-displayed.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/by.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/capabilities.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/command.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/devmode.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/error.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/events.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/http.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/input.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/logging.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/promise.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/proxy.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/session.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/symbols.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/build.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/ClickTest_testClicksASurroundingStrongTag.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Page.aspx delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Page.aspx.cs delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/banner.gif delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/beach.jpg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/blank.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/disabled_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/disappearing_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/google_map.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/google_map.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/html5_submit_buttons.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/clicks.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/jetpack-sample.xpi delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/sample.xpi delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/webextension.xpi delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/blue.jpg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/green.jpg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/red.jpg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/yellow.jpg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5Page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/icon.gif delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeWithAlert.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeWithIframe.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/injectableContent.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/javascriptEnhancedForm.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/javascriptPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/jquery-1.3.2.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/jquery-1.4.4.min.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/jquery-ui-1.8.10.custom.min.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.svg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.eot delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.woff delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/anchor.gif delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/loader.gif delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/object.gif delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/trans.gif delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.ie7.min.css delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/tinymce.min.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_logger.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/map.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/map_visibility.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/markerTransparent.png delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/messages.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/until.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/net/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/net/portprober.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/opera.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/package.json delete mode 100644 test-eol-project/node_modules/selenium-webdriver/phantomjs.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/proxy.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/remote/index.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/safari.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/actions_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/logging_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/rect_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/remote_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/safari_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/session_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/upload_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/test/window_test.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/testing/assert.js delete mode 100644 test-eol-project/node_modules/selenium-webdriver/testing/index.js delete mode 100644 test-eol-project/node_modules/semver/LICENSE delete mode 100644 test-eol-project/node_modules/semver/README.md delete mode 100644 test-eol-project/node_modules/semver/package.json delete mode 100644 test-eol-project/node_modules/semver/range.bnf delete mode 100644 test-eol-project/node_modules/semver/semver.js delete mode 100644 test-eol-project/node_modules/set-blocking/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/set-blocking/LICENSE.txt delete mode 100644 test-eol-project/node_modules/set-blocking/README.md delete mode 100644 test-eol-project/node_modules/set-blocking/index.js delete mode 100644 test-eol-project/node_modules/set-blocking/package.json delete mode 100644 test-eol-project/node_modules/setimmediate/LICENSE.txt delete mode 100644 test-eol-project/node_modules/setimmediate/package.json delete mode 100644 test-eol-project/node_modules/setimmediate/setImmediate.js delete mode 100644 test-eol-project/node_modules/source-map-support/LICENSE.md delete mode 100644 test-eol-project/node_modules/source-map-support/README.md delete mode 100644 test-eol-project/node_modules/source-map-support/browser-source-map-support.js delete mode 100644 test-eol-project/node_modules/source-map-support/package.json delete mode 100644 test-eol-project/node_modules/source-map-support/register.js delete mode 100644 test-eol-project/node_modules/source-map-support/source-map-support.js delete mode 100644 test-eol-project/node_modules/source-map/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/source-map/LICENSE delete mode 100644 test-eol-project/node_modules/source-map/README.md delete mode 100644 test-eol-project/node_modules/source-map/dist/source-map.debug.js delete mode 100644 test-eol-project/node_modules/source-map/dist/source-map.js delete mode 100644 test-eol-project/node_modules/source-map/dist/source-map.min.js delete mode 100644 test-eol-project/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 test-eol-project/node_modules/source-map/lib/array-set.js delete mode 100644 test-eol-project/node_modules/source-map/lib/base64-vlq.js delete mode 100644 test-eol-project/node_modules/source-map/lib/base64.js delete mode 100644 test-eol-project/node_modules/source-map/lib/binary-search.js delete mode 100644 test-eol-project/node_modules/source-map/lib/mapping-list.js delete mode 100644 test-eol-project/node_modules/source-map/lib/quick-sort.js delete mode 100644 test-eol-project/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 test-eol-project/node_modules/source-map/lib/source-map-generator.js delete mode 100644 test-eol-project/node_modules/source-map/lib/source-node.js delete mode 100644 test-eol-project/node_modules/source-map/lib/util.js delete mode 100644 test-eol-project/node_modules/source-map/package.json delete mode 100644 test-eol-project/node_modules/source-map/source-map.js delete mode 100644 test-eol-project/node_modules/sshpk/.travis.yml delete mode 100644 test-eol-project/node_modules/sshpk/Jenkinsfile delete mode 100644 test-eol-project/node_modules/sshpk/LICENSE delete mode 100644 test-eol-project/node_modules/sshpk/README.md delete mode 100644 test-eol-project/node_modules/sshpk/lib/algs.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/certificate.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/dhe.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/ed-compat.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/errors.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/fingerprint.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/auto.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/dnssec.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/pem.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/putty.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/ssh.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/formats/x509.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/identity.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/index.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/key.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/private-key.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/signature.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/ssh-buffer.js delete mode 100644 test-eol-project/node_modules/sshpk/lib/utils.js delete mode 100644 test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 delete mode 100644 test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 delete mode 100644 test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 delete mode 100644 test-eol-project/node_modules/sshpk/package.json delete mode 100644 test-eol-project/node_modules/string-width/index.d.ts delete mode 100644 test-eol-project/node_modules/string-width/index.js delete mode 100644 test-eol-project/node_modules/string-width/license delete mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts delete mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js delete mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/license delete mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json delete mode 100644 test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md delete mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts delete mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js delete mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/license delete mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json delete mode 100644 test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md delete mode 100644 test-eol-project/node_modules/string-width/package.json delete mode 100644 test-eol-project/node_modules/string-width/readme.md delete mode 100644 test-eol-project/node_modules/string_decoder/.travis.yml delete mode 100644 test-eol-project/node_modules/string_decoder/LICENSE delete mode 100644 test-eol-project/node_modules/string_decoder/README.md delete mode 100644 test-eol-project/node_modules/string_decoder/lib/string_decoder.js delete mode 100644 test-eol-project/node_modules/string_decoder/package.json delete mode 100644 test-eol-project/node_modules/strip-ansi/index.js delete mode 100644 test-eol-project/node_modules/strip-ansi/license delete mode 100644 test-eol-project/node_modules/strip-ansi/package.json delete mode 100644 test-eol-project/node_modules/strip-ansi/readme.md delete mode 100644 test-eol-project/node_modules/supports-color/index.js delete mode 100644 test-eol-project/node_modules/supports-color/license delete mode 100644 test-eol-project/node_modules/supports-color/package.json delete mode 100644 test-eol-project/node_modules/supports-color/readme.md delete mode 100644 test-eol-project/node_modules/tmp/.eslintrc.js delete mode 100644 test-eol-project/node_modules/tmp/.npmignore delete mode 100644 test-eol-project/node_modules/tmp/.travis.yml delete mode 100644 test-eol-project/node_modules/tmp/Gruntfile.js delete mode 100644 test-eol-project/node_modules/tmp/LICENSE delete mode 100644 test-eol-project/node_modules/tmp/README.md delete mode 100755 test-eol-project/node_modules/tmp/cleanup.sh delete mode 100644 test-eol-project/node_modules/tmp/coverage/coverage.json delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/base.css delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/index.html delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/sort-arrow-sprite.png delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov-report/sorter.js delete mode 100644 test-eol-project/node_modules/tmp/coverage/lcov.info delete mode 100644 test-eol-project/node_modules/tmp/lib/tmp.js delete mode 100644 test-eol-project/node_modules/tmp/package.json delete mode 100755 test-eol-project/node_modules/tmp/run-tests delete mode 100644 test-eol-project/node_modules/tmp/test/base.js delete mode 100644 test-eol-project/node_modules/tmp/test/dir-sync-test.js delete mode 100644 test-eol-project/node_modules/tmp/test/dir-test.js delete mode 100644 test-eol-project/node_modules/tmp/test/file-sync-test.js delete mode 100644 test-eol-project/node_modules/tmp/test/file-test.js delete mode 100644 test-eol-project/node_modules/tmp/test/graceful-sync.js delete mode 100644 test-eol-project/node_modules/tmp/test/graceful.js delete mode 100644 test-eol-project/node_modules/tmp/test/issue62-sync.js delete mode 100644 test-eol-project/node_modules/tmp/test/issue62.js delete mode 100644 test-eol-project/node_modules/tmp/test/keep-sync.js delete mode 100644 test-eol-project/node_modules/tmp/test/keep.js delete mode 100644 test-eol-project/node_modules/tmp/test/name-test.js delete mode 100644 test-eol-project/node_modules/tmp/test/spawn-sync.js delete mode 100644 test-eol-project/node_modules/tmp/test/spawn.js delete mode 100644 test-eol-project/node_modules/tmp/test/symlinkme/file.js delete mode 100644 test-eol-project/node_modules/tmp/test/unsafe-sync.js delete mode 100644 test-eol-project/node_modules/tmp/test/unsafe.js delete mode 100644 test-eol-project/node_modules/tough-cookie/LICENSE delete mode 100644 test-eol-project/node_modules/tough-cookie/README.md delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/cookie.js delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/memstore.js delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/store.js delete mode 100644 test-eol-project/node_modules/tough-cookie/lib/version.js delete mode 100644 test-eol-project/node_modules/tough-cookie/package.json delete mode 100644 test-eol-project/node_modules/tunnel-agent/LICENSE delete mode 100644 test-eol-project/node_modules/tunnel-agent/README.md delete mode 100644 test-eol-project/node_modules/tunnel-agent/index.js delete mode 100644 test-eol-project/node_modules/tunnel-agent/package.json delete mode 100644 test-eol-project/node_modules/tweetnacl/.npmignore delete mode 100644 test-eol-project/node_modules/tweetnacl/AUTHORS.md delete mode 100644 test-eol-project/node_modules/tweetnacl/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/tweetnacl/LICENSE delete mode 100644 test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md delete mode 100644 test-eol-project/node_modules/tweetnacl/README.md delete mode 100644 test-eol-project/node_modules/tweetnacl/nacl-fast.js delete mode 100644 test-eol-project/node_modules/tweetnacl/nacl-fast.min.js delete mode 100644 test-eol-project/node_modules/tweetnacl/nacl.d.ts delete mode 100644 test-eol-project/node_modules/tweetnacl/nacl.js delete mode 100644 test-eol-project/node_modules/tweetnacl/nacl.min.js delete mode 100644 test-eol-project/node_modules/tweetnacl/package.json delete mode 100755 test-eol-project/node_modules/uri-js/LICENSE delete mode 100755 test-eol-project/node_modules/uri-js/README.md delete mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/index.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/index.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/uri.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/util.js delete mode 100755 test-eol-project/node_modules/uri-js/dist/esnext/util.js.map delete mode 100755 test-eol-project/node_modules/uri-js/package.json delete mode 100755 test-eol-project/node_modules/uri-js/yarn.lock delete mode 100644 test-eol-project/node_modules/util-deprecate/History.md delete mode 100644 test-eol-project/node_modules/util-deprecate/LICENSE delete mode 100644 test-eol-project/node_modules/util-deprecate/README.md delete mode 100644 test-eol-project/node_modules/util-deprecate/browser.js delete mode 100644 test-eol-project/node_modules/util-deprecate/node.js delete mode 100644 test-eol-project/node_modules/util-deprecate/package.json delete mode 100644 test-eol-project/node_modules/uuid/AUTHORS delete mode 100644 test-eol-project/node_modules/uuid/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/uuid/LICENSE.md delete mode 100644 test-eol-project/node_modules/uuid/README.md delete mode 100644 test-eol-project/node_modules/uuid/index.js delete mode 100644 test-eol-project/node_modules/uuid/lib/bytesToUuid.js delete mode 100644 test-eol-project/node_modules/uuid/lib/md5-browser.js delete mode 100644 test-eol-project/node_modules/uuid/lib/md5.js delete mode 100644 test-eol-project/node_modules/uuid/lib/rng-browser.js delete mode 100644 test-eol-project/node_modules/uuid/lib/rng.js delete mode 100644 test-eol-project/node_modules/uuid/lib/sha1-browser.js delete mode 100644 test-eol-project/node_modules/uuid/lib/sha1.js delete mode 100644 test-eol-project/node_modules/uuid/lib/v35.js delete mode 100644 test-eol-project/node_modules/uuid/package.json delete mode 100644 test-eol-project/node_modules/uuid/v1.js delete mode 100644 test-eol-project/node_modules/uuid/v3.js delete mode 100644 test-eol-project/node_modules/uuid/v4.js delete mode 100644 test-eol-project/node_modules/uuid/v5.js delete mode 100644 test-eol-project/node_modules/verror/.npmignore delete mode 100644 test-eol-project/node_modules/verror/CHANGES.md delete mode 100644 test-eol-project/node_modules/verror/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/verror/LICENSE delete mode 100644 test-eol-project/node_modules/verror/README.md delete mode 100644 test-eol-project/node_modules/verror/lib/verror.js delete mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE delete mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/README.md delete mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch delete mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js delete mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/package.json delete mode 100644 test-eol-project/node_modules/verror/node_modules/core-util-is/test.js delete mode 100644 test-eol-project/node_modules/verror/package.json delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/.travis.yml delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/LICENSE delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/README.md delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/package.json delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/gulpfile.js delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/package.json delete mode 100644 test-eol-project/node_modules/webdriver-js-extender/tsconfig.json delete mode 100644 test-eol-project/node_modules/webdriver-manager/.circleci/config.yml delete mode 100644 test-eol-project/node_modules/webdriver-manager/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/LICENSE delete mode 100644 test-eol-project/node_modules/webdriver-manager/README.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/config.json delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/config.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/utils.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.d.ts delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map delete mode 100644 test-eol-project/node_modules/webdriver-manager/built/package.json delete mode 100644 test-eol-project/node_modules/webdriver-manager/config.json delete mode 100644 test-eol-project/node_modules/webdriver-manager/docs/README.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/docs/mobile.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/docs/protractor.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/docs/versions.md delete mode 100644 test-eol-project/node_modules/webdriver-manager/gulpfile.js delete mode 100644 test-eol-project/node_modules/webdriver-manager/package.json delete mode 100644 test-eol-project/node_modules/which-module/LICENSE delete mode 100644 test-eol-project/node_modules/which-module/README.md delete mode 100644 test-eol-project/node_modules/which-module/index.js delete mode 100644 test-eol-project/node_modules/which-module/package.json delete mode 100755 test-eol-project/node_modules/wrap-ansi/index.js delete mode 100644 test-eol-project/node_modules/wrap-ansi/license delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json delete mode 100644 test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md delete mode 100644 test-eol-project/node_modules/wrap-ansi/package.json delete mode 100644 test-eol-project/node_modules/wrap-ansi/readme.md delete mode 100644 test-eol-project/node_modules/wrappy/LICENSE delete mode 100644 test-eol-project/node_modules/wrappy/README.md delete mode 100644 test-eol-project/node_modules/wrappy/package.json delete mode 100644 test-eol-project/node_modules/wrappy/wrappy.js delete mode 100644 test-eol-project/node_modules/xml2js/LICENSE delete mode 100644 test-eol-project/node_modules/xml2js/README.md delete mode 100644 test-eol-project/node_modules/xml2js/lib/bom.js delete mode 100644 test-eol-project/node_modules/xml2js/lib/builder.js delete mode 100644 test-eol-project/node_modules/xml2js/lib/defaults.js delete mode 100644 test-eol-project/node_modules/xml2js/lib/parser.js delete mode 100644 test-eol-project/node_modules/xml2js/lib/processors.js delete mode 100644 test-eol-project/node_modules/xml2js/lib/xml2js.js delete mode 100644 test-eol-project/node_modules/xml2js/package.json delete mode 100644 test-eol-project/node_modules/xmlbuilder/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/xmlbuilder/LICENSE delete mode 100644 test-eol-project/node_modules/xmlbuilder/README.md delete mode 100644 test-eol-project/node_modules/xmlbuilder/appveyor.yml delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/Derivation.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/NodeType.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/OperationType.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/Utility.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/WriterState.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLText.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLTypeInfo.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLUserDataHandler.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/XMLWriterBase.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/lib/index.js delete mode 100644 test-eol-project/node_modules/xmlbuilder/package.json delete mode 100644 test-eol-project/node_modules/xmlbuilder/typings/index.d.ts delete mode 100644 test-eol-project/node_modules/y18n/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/y18n/LICENSE delete mode 100644 test-eol-project/node_modules/y18n/README.md delete mode 100644 test-eol-project/node_modules/y18n/index.js delete mode 100644 test-eol-project/node_modules/y18n/package.json delete mode 100644 test-eol-project/node_modules/yargs-parser/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/yargs-parser/LICENSE.txt delete mode 100644 test-eol-project/node_modules/yargs-parser/README.md delete mode 100644 test-eol-project/node_modules/yargs-parser/index.js delete mode 100644 test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js delete mode 100644 test-eol-project/node_modules/yargs-parser/package.json delete mode 100644 test-eol-project/node_modules/yargs/CHANGELOG.md delete mode 100644 test-eol-project/node_modules/yargs/LICENSE delete mode 100644 test-eol-project/node_modules/yargs/README.md delete mode 100644 test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/apply-extends.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/argsert.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/argsert.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/command.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/command.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/common-types.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/common-types.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/completion-templates.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/completion.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/completion.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/is-promise.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/levenshtein.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/middleware.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/middleware.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/obj-filter.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/parse-command.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/process-argv.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/usage.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/usage.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/validation.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/validation.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/yargs.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/yargs.js delete mode 100644 test-eol-project/node_modules/yargs/build/lib/yerror.d.ts delete mode 100644 test-eol-project/node_modules/yargs/build/lib/yerror.js delete mode 100644 test-eol-project/node_modules/yargs/index.js delete mode 100644 test-eol-project/node_modules/yargs/locales/be.json delete mode 100644 test-eol-project/node_modules/yargs/locales/de.json delete mode 100644 test-eol-project/node_modules/yargs/locales/en.json delete mode 100644 test-eol-project/node_modules/yargs/locales/es.json delete mode 100644 test-eol-project/node_modules/yargs/locales/fi.json delete mode 100644 test-eol-project/node_modules/yargs/locales/fr.json delete mode 100644 test-eol-project/node_modules/yargs/locales/hi.json delete mode 100644 test-eol-project/node_modules/yargs/locales/hu.json delete mode 100644 test-eol-project/node_modules/yargs/locales/id.json delete mode 100644 test-eol-project/node_modules/yargs/locales/it.json delete mode 100644 test-eol-project/node_modules/yargs/locales/ja.json delete mode 100644 test-eol-project/node_modules/yargs/locales/ko.json delete mode 100644 test-eol-project/node_modules/yargs/locales/nb.json delete mode 100644 test-eol-project/node_modules/yargs/locales/nl.json delete mode 100644 test-eol-project/node_modules/yargs/locales/nn.json delete mode 100644 test-eol-project/node_modules/yargs/locales/pirate.json delete mode 100644 test-eol-project/node_modules/yargs/locales/pl.json delete mode 100644 test-eol-project/node_modules/yargs/locales/pt.json delete mode 100644 test-eol-project/node_modules/yargs/locales/pt_BR.json delete mode 100644 test-eol-project/node_modules/yargs/locales/ru.json delete mode 100644 test-eol-project/node_modules/yargs/locales/th.json delete mode 100644 test-eol-project/node_modules/yargs/locales/tr.json delete mode 100644 test-eol-project/node_modules/yargs/locales/zh_CN.json delete mode 100644 test-eol-project/node_modules/yargs/locales/zh_TW.json delete mode 100644 test-eol-project/node_modules/yargs/package.json delete mode 100644 test-eol-project/node_modules/yargs/yargs.js diff --git a/test-eol-project/node_modules/.bin/blocking-proxy b/test-eol-project/node_modules/.bin/blocking-proxy deleted file mode 120000 index 2b0fa22f..00000000 --- a/test-eol-project/node_modules/.bin/blocking-proxy +++ /dev/null @@ -1 +0,0 @@ -../blocking-proxy/built/lib/bin.js \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/jasmine b/test-eol-project/node_modules/.bin/jasmine deleted file mode 120000 index d2c1bff3..00000000 --- a/test-eol-project/node_modules/.bin/jasmine +++ /dev/null @@ -1 +0,0 @@ -../jasmine/bin/jasmine.js \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/protractor b/test-eol-project/node_modules/.bin/protractor deleted file mode 120000 index 58967e81..00000000 --- a/test-eol-project/node_modules/.bin/protractor +++ /dev/null @@ -1 +0,0 @@ -../protractor/bin/protractor \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/rimraf b/test-eol-project/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49..00000000 --- a/test-eol-project/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/semver b/test-eol-project/node_modules/.bin/semver deleted file mode 120000 index 317eb293..00000000 --- a/test-eol-project/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/sshpk-conv b/test-eol-project/node_modules/.bin/sshpk-conv deleted file mode 120000 index a2a295c8..00000000 --- a/test-eol-project/node_modules/.bin/sshpk-conv +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/sshpk-sign b/test-eol-project/node_modules/.bin/sshpk-sign deleted file mode 120000 index 766b9b3a..00000000 --- a/test-eol-project/node_modules/.bin/sshpk-sign +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/sshpk-verify b/test-eol-project/node_modules/.bin/sshpk-verify deleted file mode 120000 index bfd7e3ad..00000000 --- a/test-eol-project/node_modules/.bin/sshpk-verify +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/uuid b/test-eol-project/node_modules/.bin/uuid deleted file mode 120000 index b3e45bc5..00000000 --- a/test-eol-project/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../uuid/bin/uuid \ No newline at end of file diff --git a/test-eol-project/node_modules/.bin/webdriver-manager b/test-eol-project/node_modules/.bin/webdriver-manager deleted file mode 120000 index bc2ec1ac..00000000 --- a/test-eol-project/node_modules/.bin/webdriver-manager +++ /dev/null @@ -1 +0,0 @@ -../protractor/bin/webdriver-manager \ No newline at end of file diff --git a/test-eol-project/node_modules/.package-lock.json b/test-eol-project/node_modules/.package-lock.json deleted file mode 100644 index 9318a50c..00000000 --- a/test-eol-project/node_modules/.package-lock.json +++ /dev/null @@ -1,1547 +0,0 @@ -{ - "name": "test-eol-project", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@types/q": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", - "integrity": "sha512-qYi3YV9inU/REEfxwVcGZzbS3KG/Xs90lv0Pr+lDtuVjBPGd1A+eciXzVSaRvLify132BfcvhvEjeVahrUl0Ug==", - "license": "MIT" - }, - "node_modules/@types/selenium-webdriver": { - "version": "3.0.26", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.26.tgz", - "integrity": "sha512-dyIGFKXfUFiwkMfNGn1+F6b80ZjR3uSYv1j6xVJSDlft5waZ2cwkHW4e7zNzvq7hiEackcgvBpmnXZrI1GltPg==", - "license": "MIT" - }, - "node_modules/adm-zip": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", - "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", - "license": "MIT", - "engines": { - "node": ">=12.0" - } - }, - "node_modules/agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "license": "MIT", - "dependencies": { - "es6-promisify": "^5.0.0" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", - "license": "MIT", - "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-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", - "license": "MIT", - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "license": "MIT", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", - "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", - "license": "MIT" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "license": "BSD-3-Clause", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/blocking-proxy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", - "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "blocking-proxy": "built/lib/bin.js" - }, - "engines": { - "node": ">=6.9.x" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/browserstack": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.6.1.tgz", - "integrity": "sha512-GxtFjpIaKdbAyzHfFDKixKO8IBT7wR3NjbzrGc78nNs/Ciys9wU3/nBtsqsWv5nDSrdI5tz0peKuzCPuNXNUiw==", - "license": "MIT", - "dependencies": { - "https-proxy-agent": "^2.2.1" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "license": "Apache-2.0" - }, - "node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/cliui/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==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/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==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "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==", - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha512-Z4fzpbIRjOu7lO5jCETSWoqUDVe0IPOlfugBsF6suen2LKDlVb4QZpKEM9P+buNJ4KI1eN7I083w/pbKUpsrWQ==", - "license": "MIT", - "dependencies": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "license": "MIT", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "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==", - "license": "MIT" - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "license": "MIT" - }, - "node_modules/es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", - "license": "MIT", - "dependencies": { - "es6-promise": "^4.0.3" - } - }, - "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": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "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==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, - "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==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha512-HJRTIH2EeH44ka+LWig+EqT2ONSYpVlNfx6pyd592/VF1TbfljJ7elwie7oSwcViLGqOdWocSdu2txwBF9bjmQ==", - "license": "MIT", - "dependencies": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "license": "ISC", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "license": "MIT", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", - "license": "MIT", - "dependencies": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" - }, - "engines": { - "node": ">= 4.5.0" - } - }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "license": "MIT" - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "license": "ISC", - "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==", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" - }, - "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==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "license": "MIT", - "dependencies": { - "is-path-inside": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", - "license": "MIT", - "dependencies": { - "path-is-inside": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "license": "MIT" - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "license": "MIT" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "license": "MIT" - }, - "node_modules/jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha512-KbdGQTf5jbZgltoHs31XGiChAPumMSY64OZMWLNYnEnMfG5uwGBhffePwuskexjT+/Jea/gU3qAU8344hNohSw==", - "license": "MIT", - "dependencies": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.8.0" - }, - "bin": { - "jasmine": "bin/jasmine.js" - } - }, - "node_modules/jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha512-SNkOkS+/jMZvLhuSx1fjhcNWUC/KG6oVyFUGkSBEr9n1axSNduWU8GlI7suaHXr4yxjet6KjrUZxUTE5WzzWwQ==", - "license": "MIT" - }, - "node_modules/jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha512-Rn0nZe4rfDhzA63Al3ZGh0E+JTmM6ESZYXJGKuqKGZObsAB9fwXPD03GjtIEvJBDOhN94T5MzbwZSqzFHSQPzg==", - "license": "MIT", - "engines": { - "node": ">= 6.9.x" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "license": "MIT" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, - "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==", - "license": "MIT" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "license": "ISC" - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "license": "MIT", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "license": "(MIT OR GPL-3.0-or-later)", - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } - }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "license": "MIT", - "dependencies": { - "immediate": "~3.0.5" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "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==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "license": "(MIT AND Zlib)" - }, - "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==", - "license": "MIT", - "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "license": "(WTFPL OR MIT)" - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "license": "MIT" - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "license": "MIT", - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "license": "MIT" - }, - "node_modules/protractor": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-7.0.0.tgz", - "integrity": "sha512-UqkFjivi4GcvUQYzqGYNe0mLzfn5jiLmO8w9nMhQoJRLhy2grJonpga2IWhI6yJO30LibWXJJtA4MOIZD2GgZw==", - "deprecated": "We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular", - "license": "MIT", - "dependencies": { - "@types/q": "^0.0.32", - "@types/selenium-webdriver": "^3.0.0", - "blocking-proxy": "^1.0.0", - "browserstack": "^1.5.1", - "chalk": "^1.1.3", - "glob": "^7.0.3", - "jasmine": "2.8.0", - "jasminewd2": "^2.1.0", - "q": "1.4.1", - "saucelabs": "^1.5.0", - "selenium-webdriver": "3.6.0", - "source-map-support": "~0.4.0", - "webdriver-js-extender": "2.1.0", - "webdriver-manager": "^12.1.7", - "yargs": "^15.3.1" - }, - "bin": { - "protractor": "bin/protractor", - "webdriver-manager": "bin/webdriver-manager" - }, - "engines": { - "node": ">=10.13.x" - } - }, - "node_modules/psl": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", - "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "funding": { - "url": "https://github.com/sponsors/lupomontero" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha512-/CdEdaw49VZVmyIDGUQKDDT53c7qBkO6g5CefWz91Ae+l4+cRtcDYwMTXh6me4O8TMldeGHG3N2Bl84V78Ywbg==", - "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", - "license": "MIT", - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, - "node_modules/qs": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.5.tgz", - "integrity": "sha512-mzR4sElr1bfCaPJe7m8ilJ6ZXdDaGoObcYR0ZHSsktM/Lt21MVHj5De30GQH2eiZ1qGRTO7LCAzQsUeXTNexWQ==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "license": "Apache-2.0", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "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==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "license": "ISC" - }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/saucelabs": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", - "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", - "dependencies": { - "https-proxy-agent": "^2.2.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/sax": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", - "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=11.0.0" - } - }, - "node_modules/selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", - "license": "Apache-2.0", - "dependencies": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" - }, - "engines": { - "node": ">= 6.9.0" - } - }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "license": "MIT" - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "license": "MIT", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "license": "MIT", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/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==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/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==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha512-HXdTB7lvMwcb55XFfrTM8CPr/IYREk4hVBFaQ4b/6nInrluSL86hfHm7vu0luYKCfyBZp2trCjpc8caC3vVM3w==", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "license": "Unlicense" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "license": "MIT" - }, - "node_modules/webdriver-js-extender": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", - "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", - "license": "MIT", - "dependencies": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" - }, - "engines": { - "node": ">=6.9.x" - } - }, - "node_modules/webdriver-manager": { - "version": "12.1.9", - "resolved": "https://registry.npmjs.org/webdriver-manager/-/webdriver-manager-12.1.9.tgz", - "integrity": "sha512-Yl113uKm8z4m/KMUVWHq1Sjtla2uxEBtx2Ue3AmIlnlPAKloDn/Lvmy6pqWCUersVISpdMeVpAaGbNnvMuT2LQ==", - "license": "MIT", - "dependencies": { - "adm-zip": "^0.5.2", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.87.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - }, - "bin": { - "webdriver-manager": "bin/webdriver-manager" - }, - "engines": { - "node": ">=6.9.x" - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "license": "ISC" - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/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==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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==", - "license": "MIT", - "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/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "license": "ISC" - }, - "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - } - } -} diff --git a/test-eol-project/node_modules/@types/q/README.md b/test-eol-project/node_modules/@types/q/README.md deleted file mode 100644 index f5803404..00000000 --- a/test-eol-project/node_modules/@types/q/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Installation -> `npm install --save @types/q` - -# Summary -This package contains type definitions for Q (https://github.com/kriskowal/q). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/q - -Additional Details - * Last updated: Wed, 05 Oct 2016 20:53:38 GMT - * File structure: UMD - * Library Dependencies: none - * Module Dependencies: none - * Global values: Q - -# Credits -These definitions were written by Barrie Nemetchek , Andrew Gaspar , John Reilly . diff --git a/test-eol-project/node_modules/@types/q/index.d.ts b/test-eol-project/node_modules/@types/q/index.d.ts deleted file mode 100644 index b14a6831..00000000 --- a/test-eol-project/node_modules/@types/q/index.d.ts +++ /dev/null @@ -1,360 +0,0 @@ -// Type definitions for Q -// Project: https://github.com/kriskowal/q -// Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = Q; -export as namespace Q; - -/** - * If value is a Q promise, returns the promise. - * If value is a promise from another library it is coerced into a Q promise (where possible). - */ -declare function Q(promise: Q.IPromise): Q.Promise; -/** - * If value is not a promise, returns a promise that is fulfilled with value. - */ -declare function Q(value: T): Q.Promise; -/** - * Calling with nothing at all creates a void promise - */ -declare function Q(): Q.Promise; - -declare namespace Q { - type IWhenable = IPromise | T; - interface IPromise { - then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable): IPromise; - } - - interface Deferred { - promise: Promise; - resolve(value?: IWhenable): void; - reject(reason: any): void; - notify(value: any): void; - makeNodeResolver(): (reason: any, value: T) => void; - } - - interface Promise { - /** - * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. - - * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. - */ - fin(finallyCallback: () => any): Promise; - /** - * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. - - * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. - */ - finally(finallyCallback: () => any): Promise; - - /** - * The then method from the Promises/A+ specification, with an additional progress handler. - */ - then(onFulfill?: (value: T) => IWhenable, onReject?: (error: any) => IWhenable, onProgress?: Function): Promise; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * - * This is especially useful in conjunction with all - */ - spread(onFulfill: (...args: any[]) => IWhenable, onReject?: (reason: any) => IWhenable): Promise; - - fail(onRejected: (reason: any) => IWhenable): Promise; - - /** - * A sugar method, equivalent to promise.then(undefined, onRejected). - */ - catch(onRejected: (reason: any) => IWhenable): Promise; - - /** - * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). - */ - progress(onProgress: (progress: any) => any): Promise; - - /** - * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop. - * - * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object. - * - * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn. - * - * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it. - */ - done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; - - /** - * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise. - */ - nodeify(callback: (reason: any, value: any) => void): Promise; - - /** - * Returns a promise to get the named property of an object. Essentially equivalent to - * - * promise.then(function (o) { - * return o[propertyName]; - * }); - */ - get(propertyName: String): Promise; - set(propertyName: String, value: any): Promise; - delete(propertyName: String): Promise; - /** - * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to - * - * promise.then(function (o) { - * return o[methodName].apply(o, args); - * }); - */ - post(methodName: String, args: any[]): Promise; - /** - * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call. - */ - invoke(methodName: String, ...args: any[]): Promise; - fapply(args: any[]): Promise; - fcall(...args: any[]): Promise; - - /** - * Returns a promise for an array of the property names of an object. Essentially equivalent to - * - * promise.then(function (o) { - * return Object.keys(o); - * }); - */ - keys(): Promise; - - /** - * A sugar method, equivalent to promise.then(function () { return value; }). - */ - thenResolve(value: U): Promise; - /** - * A sugar method, equivalent to promise.then(function () { throw reason; }). - */ - thenReject(reason: any): Promise; - - /** - * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler. - */ - tap(onFulfilled: (value: T) => any): Promise; - - timeout(ms: number, message?: string): Promise; - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - delay(ms: number): Promise; - - /** - * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. - */ - isFulfilled(): boolean; - /** - * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. - */ - isRejected(): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - isPending(): boolean; - - valueOf(): any; - - /** - * Returns a "state snapshot" object, which will be in one of three forms: - * - * - { state: "pending" } - * - { state: "fulfilled", value: } - * - { state: "rejected", reason: } - */ - inspect(): PromiseState; - } - - interface PromiseState { - /** - * "fulfilled", "rejected", "pending" - */ - state: string; - value?: T; - reason?: any; - } - - // If no value provided, returned promise will be of void type - export function when(): Promise; - - // if no fulfill, reject, or progress provided, returned promise will be of same type - export function when(value: IWhenable): Promise; - - // If a non-promise value is provided, it will not reject or progress - export function when(value: IWhenable, onFulfilled: (val: T) => IWhenable, onRejected?: (reason: any) => IWhenable, onProgress?: (progress: any) => any): Promise; - - /** - * Currently "impossible" (and I use the term loosely) to implement due to TypeScript limitations as it is now. - * See: https://github.com/Microsoft/TypeScript/issues/1784 for discussion on it. - */ - // export function try(method: Function, ...args: any[]): Promise; - - export function fbind(method: (...args: any[]) => IWhenable, ...args: any[]): (...args: any[]) => Promise; - - export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; - - export function send(obj: any, functionName: string, ...args: any[]): Promise; - export function invoke(obj: any, functionName: string, ...args: any[]): Promise; - export function mcall(obj: any, functionName: string, ...args: any[]): Promise; - - export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; - export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise; - export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; - export function nfcall(nodeFunction: Function, ...args: any[]): Promise; - export function nfapply(nodeFunction: Function, args: any[]): Promise; - - export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; - export function npost(nodeModule: any, functionName: string, args: any[]): Promise; - export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; - export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise; - - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E, F]>; - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E]>; - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D]>; - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C]>; - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IWhenable<[IWhenable, IWhenable]>): Promise<[A, B]>; - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IWhenable[]>): Promise; - - /** - * Returns a promise for the first of an array of promises to become settled. - */ - export function race(promises: IWhenable[]): Promise; - - /** - * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. - */ - export function allSettled(promises: IWhenable[]>): Promise[]>; - - export function allResolved(promises: IWhenable[]>): Promise[]>; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: IWhenable[], onFulfilled: (...args: T[]) => IWhenable, onRejected?: (reason: any) => IWhenable): Promise; - - /** - * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms". - */ - export function timeout(promise: Promise, ms: number, message?: string): Promise; - - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - export function delay(promise: Promise, ms: number): Promise; - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - export function delay(value: T, ms: number): Promise; - /** - * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. - */ - export function delay(ms: number): Promise ; - /** - * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. - */ - export function isFulfilled(promise: Promise): boolean; - /** - * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. - */ - export function isRejected(promise: Promise): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - export function isPending(promise: Promise): boolean; - - /** - * Returns a "deferred" object with a: - * promise property - * resolve(value) method - * reject(reason) method - * notify(value) method - * makeNodeResolver() method - */ - export function defer(): Deferred; - - /** - * Returns a promise that is rejected with reason. - */ - export function reject(reason?: any): Promise; - - export function Promise(resolver: (resolve: (val: IWhenable) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; - - /** - * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version also always returns a promise: if func does a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. - * - * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that the function always returns a promise even in the face of unintentional thrown exceptions. - */ - export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; - - /** - * Returns whether the given value is a Q promise. - */ - export function isPromise(object: any): boolean; - /** - * Returns whether the given value is a promise (i.e. it's an object with a then function). - */ - export function isPromiseAlike(object: any): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - export function isPending(object: any): boolean; - /** - * If an object is not a promise, it is as "near" as possible. - * If a promise is rejected, it is as "near" as possible too. - * If it’s a fulfilled promise, the fulfillment value is nearer. - * If it’s a deferred promise and the deferred has been resolved, the - * resolution is "nearer". - */ - export function nearer(promise: Promise): T; - - /** - * This is an experimental tool for converting a generator function into a deferred function. This has the potential of reducing nested callbacks in engines that support yield. - */ - export function async(generatorFunction: any): (...args: any[]) => Promise; - export function nextTick(callback: Function): void; - - /** - * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the event loop, usually as a result of done. Can be useful for getting the full stack trace of an error in browsers, which is not usually possible with window.onerror. - */ - export var onerror: (reason: any) => void; - /** - * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack property is inspected in a rejection callback, a long stack trace is produced. - */ - export var longStackSupport: boolean; - - /** - * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). - * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. - * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. - * Calling resolve with a non-promise value causes promise to be fulfilled with that value. - */ - export function resolve(object: IWhenable): Promise; - - /** - * Resets the global "Q" variable to the value it has before Q was loaded. - * This will either be undefined if there was no version or the version of Q which was already loaded before. - * @returns { The last version of Q. } - */ - export function noConflict(): typeof Q; -} diff --git a/test-eol-project/node_modules/@types/q/package.json b/test-eol-project/node_modules/@types/q/package.json deleted file mode 100644 index b5f8915d..00000000 --- a/test-eol-project/node_modules/@types/q/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@types/q", - "version": "0.0.32", - "description": "TypeScript definitions for Q", - "license": "MIT", - "author": "Barrie Nemetchek , Andrew Gaspar , John Reilly ", - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typings": "index.d.ts", - "typesPublisherContentHash": "6597b89d57d9ceec9ef1e6af32e2fd02f4582abaf309f8a76f6746ee1af830d5" -} \ No newline at end of file diff --git a/test-eol-project/node_modules/@types/q/types-metadata.json b/test-eol-project/node_modules/@types/q/types-metadata.json deleted file mode 100644 index de386750..00000000 --- a/test-eol-project/node_modules/@types/q/types-metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "authors": "Barrie Nemetchek , Andrew Gaspar , John Reilly ", - "definitionFilename": "index.d.ts", - "libraryDependencies": [], - "moduleDependencies": [], - "libraryMajorVersion": "0", - "libraryMinorVersion": "0", - "libraryName": "Q", - "typingsPackageName": "q", - "projectName": "https://github.com/kriskowal/q", - "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", - "sourceBranch": "types-2.0", - "kind": "UMD", - "globals": [ - "Q" - ], - "declaredModules": [], - "files": [ - "index.d.ts" - ], - "hasPackageJson": false, - "contentHash": "6597b89d57d9ceec9ef1e6af32e2fd02f4582abaf309f8a76f6746ee1af830d5" -} \ No newline at end of file diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/LICENSE b/test-eol-project/node_modules/@types/selenium-webdriver/LICENSE deleted file mode 100644 index 9e841e7a..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - 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/test-eol-project/node_modules/@types/selenium-webdriver/README.md b/test-eol-project/node_modules/@types/selenium-webdriver/README.md deleted file mode 100644 index 42a02fac..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/selenium-webdriver` - -# Summary -This package contains type definitions for selenium-webdriver (https://github.com/SeleniumHQ/selenium/tree/master/javascript/node/selenium-webdriver). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver/v3. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 20:08:00 GMT - * Dependencies: none - -# Credits -These definitions were written by [Bill Armstrong](https://github.com/BillArmstrong), [Yuki Kokubun](https://github.com/Kuniwak), [Craig Nishina](https://github.com/cnishina), [Simon Gellis](https://github.com/SupernaviX), [Ben Dixon](https://github.com/bendxn), and [Ziyu](https://github.com/oddui). diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts deleted file mode 100644 index 6730a57a..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/chrome.d.ts +++ /dev/null @@ -1,360 +0,0 @@ -import * as http from "./http"; -import * as webdriver from "./index"; -import * as remote from "./remote"; - -/** - * Creates a new WebDriver client for Chrome. - */ -export class Driver extends webdriver.WebDriver { - /** - * Creates a new session with the ChromeDriver. - * - * @param {(Capabilities|Options)=} opt_config The configuration options. - * @param {(remote.DriverService|http.Executor)=} opt_serviceExecutor Either - * a DriverService to use for the remote end, or a preconfigured executor - * for an externally managed endpoint. If neither is provided, the - * {@linkplain ##getDefaultService default service} will be used by - * default. - * @param {promise.ControlFlow=} opt_flow The control flow to use, or `null` - * to use the currently active flow. - * @return {!Driver} A new driver instance. - */ - static createSession( - opt_config?: Options | webdriver.CreateSessionCapabilities, - opt_service?: remote.DriverService | http.Executor, - opt_flow?: webdriver.promise.ControlFlow, - ): Driver; -} - -export interface IOptionsValues { - args: string[]; - binary?: string | undefined; - detach: boolean; - extensions: string[]; - localState?: any; - logFile?: string | undefined; - prefs?: any; -} - -export interface IPerfLoggingPrefs { - enableNetwork: boolean; - enablePage: boolean; - enableTimeline: boolean; - tracingCategories: string; - bufferUsageReportingInterval: number; -} - -/** - * Class for managing ChromeDriver specific options. - */ -export class Options { - /** */ - constructor(); - - /** - * Extracts the ChromeDriver specific options from the given capabilities - * object. - * @param {!webdriver.Capabilities} capabilities The capabilities object. - * @return {!Options} The ChromeDriver options. - */ - static fromCapabilities(capabilities: webdriver.Capabilities): Options; - - /** - * Add additional command line arguments to use when launching the Chrome - * browser. Each argument may be specified with or without the '--' prefix - * (e.g. '--foo' and 'foo'). Arguments with an associated value should be - * delimited by an '=': 'foo=bar'. - * @param {...(string|!Array.)} var_args The arguments to add. - * @return {!Options} A self reference. - */ - addArguments(...var_args: string[]): Options; - - /** - * Configures the chromedriver to start Chrome in headless mode. - * - * > __NOTE:__ Resizing the browser window in headless mode is only supported - * > in Chrome 60. Users are encouraged to set an initial window size with - * > the {@link #windowSize windowSize({width, height})} option. - * - * @return {!Options} A self reference. - */ - headless(): Options; - - /** - * List of Chrome command line switches to exclude that ChromeDriver by default - * passes when starting Chrome. Do not prefix switches with '--'. - * - * @param {...(string|!Array)} var_args The switches to exclude. - * @return {!Options} A self reference. - */ - excludeSwitches(...var_args: string[]): Options; - - /** - * Add additional extensions to install when launching Chrome. Each extension - * should be specified as the path to the packed CRX file, or a Buffer for an - * extension. - * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The - * extensions to add. - * @return {!Options} A self reference. - */ - addExtensions(...var_args: any[]): Options; - - /** - * Sets the path to the Chrome binary to use. On Mac OS X, this path should - * reference the actual Chrome executable, not just the application binary - * (e.g. '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'). - * - * The binary path be absolute or relative to the chromedriver server - * executable, but it must exist on the machine that will launch Chrome. - * - * @param {string} path The path to the Chrome binary to use. - * @return {!Options} A self reference. - */ - setChromeBinaryPath(path: string): Options; - - /** - * Sets whether to leave the started Chrome browser running if the controlling - * ChromeDriver service is killed before {@link webdriver.WebDriver#quit()} is - * called. - * @param {boolean} detach Whether to leave the browser running if the - * chromedriver service is killed before the session. - * @return {!Options} A self reference. - */ - detachDriver(detach: boolean): Options; - - /** - * Sets the user preferences for Chrome's user profile. See the 'Preferences' - * file in Chrome's user data directory for examples. - * @param {!Object} prefs Dictionary of user preferences to use. - * @return {!Options} A self reference. - */ - setUserPreferences(prefs: any): Options; - - /** - * Sets the logging preferences for the new session. - * @param {!webdriver.logging.Preferences} prefs The logging preferences. - * @return {!Options} A self reference. - */ - setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; - - /** - * Sets the performance logging preferences. Options include: - * - * - `enableNetwork`: Whether or not to collect events from Network domain. - * - `enablePage`: Whether or not to collect events from Page domain. - * - `enableTimeline`: Whether or not to collect events from Timeline domain. - * Note: when tracing is enabled, Timeline domain is implicitly disabled, - * unless `enableTimeline` is explicitly set to true. - * - `tracingCategories`: A comma-separated string of Chrome tracing categories - * for which trace events should be collected. An unspecified or empty - * string disables tracing. - * - `bufferUsageReportingInterval`: The requested number of milliseconds - * between DevTools trace buffer usage events. For example, if 1000, then - * once per second, DevTools will report how full the trace buffer is. If a - * report indicates the buffer usage is 100%, a warning will be issued. - * - * @param {{enableNetwork: boolean, - * enablePage: boolean, - * enableTimeline: boolean, - * tracingCategories: string, - * bufferUsageReportingInterval: number}} prefs The performance - * logging preferences. - * @return {!Options} A self reference. - */ - setPerfLoggingPrefs(prefs: IPerfLoggingPrefs): Options; - - /** - * Sets preferences for the 'Local State' file in Chrome's user data - * directory. - * @param {!Object} state Dictionary of local state preferences. - * @return {!Options} A self reference. - */ - setLocalState(state: any): Options; - - /** - * Sets the name of the activity hosting a Chrome-based Android WebView. This - * option must be set to connect to an [Android WebView]( - * https://sites.google.com/a/chromium.org/chromedriver/getting-started/getting-started---android) - * - * @param {string} name The activity name. - * @return {!Options} A self reference. - */ - androidActivity(name: string): Options; - - /** - * Sets the device serial number to connect to via ADB. If not specified, the - * ChromeDriver will select an unused device at random. An error will be - * returned if all devices already have active sessions. - * - * @param {string} serial The device serial number to connect to. - * @return {!Options} A self reference. - */ - androidDeviceSerial(serial: string): Options; - - /** - * Configures the ChromeDriver to launch Chrome on Android via adb. This - * function is shorthand for - * {@link #androidPackage options.androidPackage('com.android.chrome')}. - * @return {!Options} A self reference. - */ - androidChrome(): Options; - - /** - * Sets the package name of the Chrome or WebView app. - * - * @param {?string} pkg The package to connect to, or `null` to disable Android - * and switch back to using desktop Chrome. - * @return {!Options} A self reference. - */ - androidPackage(pkg: string): Options; - - /** - * Sets the process name of the Activity hosting the WebView (as given by `ps`). - * If not specified, the process name is assumed to be the same as - * {@link #androidPackage}. - * - * @param {string} processName The main activity name. - * @return {!Options} A self reference. - */ - androidProcess(processName: string): Options; - - /** - * Sets whether to connect to an already-running instead of the specified - * {@linkplain #androidProcess app} instead of launching the app with a clean - * data directory. - * - * @param {boolean} useRunning Whether to connect to a running instance. - * @return {!Options} A self reference. - */ - androidUseRunningApp(useRunning: boolean): Options; - - /** - * Sets the path to Chrome's log file. This path should exist on the machine - * that will launch Chrome. - * @param {string} path Path to the log file to use. - * @return {!Options} A self reference. - */ - setChromeLogFile(path: string): Options; - - /** - * Sets the directory to store Chrome minidumps in. This option is only - * supported when ChromeDriver is running on Linux. - * @param {string} path The directory path. - * @return {!Options} A self reference. - */ - setChromeMinidumpPath(path: string): Options; - - /** - * Configures Chrome to emulate a mobile device. For more information, refer - * to the ChromeDriver project page on [mobile emulation][em]. Configuration - * options include: - * - * - `deviceName`: The name of a pre-configured [emulated device][devem] - * - `width`: screen width, in pixels - * - `height`: screen height, in pixels - * - `pixelRatio`: screen pixel ratio - * - * __Example 1: Using a Pre-configured Device__ - * - * let options = new chrome.Options().setMobileEmulation( - * {deviceName: 'Google Nexus 5'}); - * - * let driver = new chrome.Driver(options); - * - * __Example 2: Using Custom Screen Configuration__ - * - * let options = new chrome.Options().setMobileEmulation({ - * width: 360, - * height: 640, - * pixelRatio: 3.0 - * }); - * - * let driver = new chrome.Driver(options); - * - * [em]: https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation - * [devem]: https://developer.chrome.com/devtools/docs/device-mode - * - * @param {?({deviceName: string}| - * {width: number, height: number, pixelRatio: number})} config The - * mobile emulation configuration, or `null` to disable emulation. - * @return {!Options} A self reference. - */ - setMobileEmulation(config: any): Options; - - /** - * Sets the proxy settings for the new session. - * @param {webdriver.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy: webdriver.ProxyConfig): Options; - - /** - * Converts this options instance to a {@link webdriver.Capabilities} object. - * @param {webdriver.Capabilities=} opt_capabilities The capabilities to merge - * these options into, if any. - * @return {!webdriver.Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; -} - -/** - * Creates {@link remote.DriverService} instances that manage a ChromeDriver - * server. - */ -export class ServiceBuilder extends remote.DriverService.Builder { - /** - * @param {string=} opt_exe Path to the server executable to use. If omitted, - * the builder will attempt to locate the chromedriver on the current - * PATH. - * @throws {Error} If provided executable does not exist, or the chromedriver - * cannot be found on the PATH. - */ - constructor(opt_exe?: string); - - /** - * Sets which port adb is listening to. _The ChromeDriver will connect to adb - * if an {@linkplain Options#androidPackage Android session} is requested, but - * adb **must** be started beforehand._ - * - * @param {number} port Which port adb is running on. - * @return {!ServiceBuilder} A self reference. - */ - setAdbPort(port: number): this; - - /** - * Sets the path of the log file the driver should log to. If a log file is - * not specified, the driver will log to stderr. - * @param {string} path Path of the log file to use. - * @return {!ServiceBuilder} A self reference. - */ - loggingTo(path: string): this; - - /** - * Enables verbose logging. - * @return {!ServiceBuilder} A self reference. - */ - enableVerboseLogging(): this; - - /** - * Sets the number of threads the driver should use to manage HTTP requests. - * By default, the driver will use 4 threads. - * @param {number} n The number of threads to use. - * @return {!ServiceBuilder} A self reference. - */ - setNumHttpThreads(n: number): this; -} - -/** - * Returns the default ChromeDriver service. If such a service has not been - * configured, one will be constructed using the default configuration for - * a ChromeDriver executable found on the system PATH. - * @return {!remote.DriverService} The default ChromeDriver service. - */ -export function getDefaultService(): remote.DriverService; - -/** - * Sets the default service to use for new ChromeDriver instances. - * @param {!remote.DriverService} service The service to use. - * @throws {Error} If the default service is currently running. - */ -export function setDefaultService(service: remote.DriverService): void; diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts deleted file mode 100644 index b2c41ba3..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/edge.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import * as webdriver from "./index"; -import * as remote from "./remote"; - -export class Driver extends webdriver.WebDriver { - /** - * Creates a new browser session for Microsoft's Edge browser. - * - * @param {(capabilities.Capabilities|Options)=} opt_config The configuration - * options. - * @param {remote.DriverService=} opt_service The session to use; will use - * the {@linkplain #getDefaultService default service} by default. - * @param {promise.ControlFlow=} opt_flow The control flow to use, or - * {@code null} to use the currently active flow. - * @return {!Driver} A new driver instance. - */ - static createSession( - opt_config?: webdriver.CreateSessionCapabilities, - opt_service?: remote.DriverService, - opt_flow?: webdriver.promise.ControlFlow, - ): Driver; - - /** - * This function is a no-op as file detectors are not supported by this - * implementation. - * @override - */ - setFileDetector(): void; -} - -/** - * Class for managing MicrosoftEdgeDriver specific options. - */ -export class Options { - /** - * Extracts the MicrosoftEdgeDriver specific options from the given - * capabilities object. - * @param {!capabilities.Capabilities} caps The capabilities object. - * @return {!Options} The MicrosoftEdgeDriver options. - */ - static fromCapabilities(cap: webdriver.Capabilities): Options; - - /** - * Sets the proxy settings for the new session. - * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy: webdriver.ProxyConfig): Options; - - /** - * Sets the page load strategy for Edge. - * Supported values are 'normal', 'eager', and 'none'; - * - * @param {string} pageLoadStrategy The page load strategy to use. - * @return {!Options} A self reference. - */ - setPageLoadStrategy(pageLoadStrategy: string): Options; - - /** - * Converts this options instance to a {@link capabilities.Capabilities} - * object. - * @param {capabilities.Capabilities=} opt_capabilities The capabilities to - * merge these options into, if any. - * @return {!capabilities.Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; -} - -/** - * Creates {@link remote.DriverService} instances that manage a - * MicrosoftEdgeDriver server in a child process. - */ -export class ServiceBuilder extends remote.DriverService.Builder { - /** - * @param {string=} opt_exe Path to the server executable to use. If omitted, - * the builder will attempt to locate the MicrosoftEdgeDriver on the current - * PATH. - * @throws {Error} If provided executable does not exist, or the - * MicrosoftEdgeDriver cannot be found on the PATH. - */ - constructor(opt_exe?: string); -} - -/** - * Returns the default MicrosoftEdgeDriver service. If such a service has - * not been configured, one will be constructed using the default configuration - * for an MicrosoftEdgeDriver executable found on the system PATH. - * @return {!remote.DriverService} The default MicrosoftEdgeDriver service. - */ -export function getDefaultService(): remote.DriverService; - -/** - * Sets the default service to use for new MicrosoftEdgeDriver instances. - * @param {!remote.DriverService} service The service to use. - * @throws {Error} If the default service is currently running. - */ -export function setDefaultService(service: remote.DriverService): void; diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts deleted file mode 100644 index 7004d39c..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/firefox.d.ts +++ /dev/null @@ -1,337 +0,0 @@ -import * as http from "./http"; -import * as webdriver from "./index"; -import * as remote from "./remote"; - -/** - * Manages a Firefox subprocess configured for use with WebDriver. - */ -export class Binary { - /** - * @param {string=} opt_exe Path to the Firefox binary to use. If not - * specified, will attempt to locate Firefox on the current system. - */ - constructor(opt_exe?: string); - - /** - * Add arguments to the command line used to start Firefox. - * @param {...(string|!Array.)} var_args Either the arguments to add as - * varargs, or the arguments as an array. - */ - addArguments(...var_args: string[]): void; - - /** - * Launches Firefox and eturns a promise that will be fulfilled when the process - * terminates. - * @param {string} profile Path to the profile directory to use. - * @return {!promise.Promise.} A promise for the process result. - * @throws {Error} If this instance has already been started. - */ - launch(profile: string): webdriver.promise.Promise; - - /** - * Kills the managed Firefox process. - * @return {!promise.Promise} A promise for when the process has terminated. - */ - kill(): webdriver.promise.Promise; -} - -/** - * Models a Firefox proifle directory for use with the FirefoxDriver. The - * {@code Proifle} directory uses an in-memory model until {@link #writeToDisk} - * is called. - */ -export class Profile { - /** - * @param {string=} opt_dir Path to an existing Firefox profile directory to - * use a template for this profile. If not specified, a blank profile will - * be used. - */ - constructor(opt_dir?: string); - - /** - * Registers an extension to be included with this profile. - * @param {string} extension Path to the extension to include, as either an - * unpacked extension directory or the path to a xpi file. - */ - addExtension(extension: string): void; - - /** - * Sets a desired preference for this profile. - * @param {string} key The preference key. - * @param {(string|number|boolean)} value The preference value. - * @throws {Error} If attempting to set a frozen preference. - */ - setPreference(key: string, value: string): void; - setPreference(key: string, value: number): void; - setPreference(key: string, value: boolean): void; - - /** - * Returns the currently configured value of a profile preference. This does - * not include any defaults defined in the profile's template directory user.js - * file (if a template were specified on construction). - * @param {string} key The desired preference. - * @return {(string|number|boolean|undefined)} The current value of the - * requested preference. - */ - getPreference(key: string): any; - - /** - * @return {number} The port this profile is currently configured to use, or - * 0 if the port will be selected at random when the profile is written - * to disk. - */ - getPort(): number; - - /** - * Sets the port to use for the WebDriver extension loaded by this profile. - * @param {number} port The desired port, or 0 to use any free port. - */ - setPort(port: number): void; - - /** - * @return {boolean} Whether the FirefoxDriver is configured to automatically - * accept untrusted SSL certificates. - */ - acceptUntrustedCerts(): boolean; - - /** - * Sets whether the FirefoxDriver should automatically accept untrusted SSL - * certificates. - * @param {boolean} value . - */ - setAcceptUntrustedCerts(value: boolean): void; - - /** - * Sets whether to assume untrusted certificates come from untrusted issuers. - * @param {boolean} value . - */ - setAssumeUntrustedCertIssuer(value: boolean): void; - - /** - * @return {boolean} Whether to assume untrusted certs come from untrusted - * issuers. - */ - assumeUntrustedCertIssuer(): boolean; - - /** - * Sets whether to use native events with this profile. - * @param {boolean} enabled . - */ - setNativeEventsEnabled(enabled: boolean): void; - - /** - * Returns whether native events are enabled in this profile. - * @return {boolean} . - */ - nativeEventsEnabled(): boolean; - - /** - * Writes this profile to disk. - * @param {boolean=} opt_excludeWebDriverExt Whether to exclude the WebDriver - * extension from the generated profile. Used to reduce the size of an - * {@link #encode() encoded profile} since the server will always install - * the extension itself. - * @return {!promise.Promise.} A promise for the path to the new - * profile directory. - */ - writeToDisk(opt_excludeWebDriverExt?: boolean): webdriver.promise.Promise; - - /** - * Encodes this profile as a zipped, base64 encoded directory. - * @return {!promise.Promise.} A promise for the encoded profile. - */ - encode(): webdriver.promise.Promise; -} - -/** - * Configuration options for the FirefoxDriver. - */ -export class Options { - /** - * Specify additional command line arguments that should be used when starting - * the Firefox browser. - * - * @param {...(string|!Array)} args The arguments to include. - * @return {!Options} A self reference. - */ - addArguments(...args: string[]): Options; - - /** - * Sets the browser to be in headless mode. - * - * @return {!Options} A self reference. - */ - headless(): Options; - - /** - * Sets the initial window size when running in - * {@linkplain #headless headless} mode. - * - * @param {{width: number, height: number}} size The desired window size. - * @return {!Options} A self reference. - * @throws {TypeError} if width or height is unspecified, not a number, or - * less than or equal to 0. - */ - windowSize(size: { width: number; height: number }): Options; - - /** - * Add extensions that should be installed when starting Firefox. - * - * @param {...string} paths The paths to the extension XPI files to install. - * @return {!Options} A self reference. - */ - addExtensions(...paths: string[]): Options; - - /** - * @param {string} key the preference key. - * @param {(string|number|boolean)} value the preference value. - * @return {!Options} A self reference. - * @throws {TypeError} if either the key or value has an invalid type. - */ - setPreference(key: string, value: string | number | boolean): Options; - - /** - * Sets the profile to use. The profile may be specified as a - * {@link Profile} object or as the path to an existing Firefox profile to use - * as a template. - * - * @param {(string|!Profile)} profile The profile to use. - * @return {!Options} A self reference. - */ - setProfile(profile: string | any): Options; - - /** - * Sets the binary to use. The binary may be specified as the path to a Firefox - * executable, or as a {@link Binary} object. - * - * @param {(string|!Binary)} binary The binary to use. - * @return {!Options} A self reference. - */ - setBinary(binary: string | any): Options; - - /** - * Sets the logging preferences for the new session. - * @param {logging.Preferences} prefs The logging preferences. - * @return {!Options} A self reference. - */ - setLoggingPreferences(prefs: webdriver.logging.Preferences): Options; - - /** - * Sets the proxy to use. - * - * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy: webdriver.ProxyConfig): Options; - - /** - * Sets whether to use Mozilla's geckodriver to drive the browser. This option - * is enabled by default and required for Firefox 47+. - * - * @param {boolean} enable Whether to enable the geckodriver. - * @see https://github.com/mozilla/geckodriver - */ - useGeckoDriver(enable: boolean): Options; - - /** - * Converts these options to a {@link capabilities.Capabilities} instance. - * - * @return {!capabilities.Capabilities} A new capabilities object. - */ - toCapabilities(): webdriver.Capabilities; -} - -/** - * @return {string} . - * @throws {Error} - */ -export function findWires(): string; - -/** - * @param {(string|!Binary)} binary . - * @return {!remote.DriverService} . - */ -export function createWiresService(binary: string | any): remote.DriverService; - -/** - * @param {(Profile|string)} profile The profile to prepare. - * @param {number} port The port the FirefoxDriver should listen on. - * @return {!Promise} a promise for the path to the profile directory. - */ -export function prepareProfile(profile: string | any, port: number): any; - -/** - * A WebDriver client for Firefox. - */ -export class Driver extends webdriver.WebDriver { - /** - * Creates a new Firefox session. - * - * @param {(Options|capabilities.Capabilities|Object)=} opt_config The - * configuration options for this driver, specified as either an - * {@link Options} or {@link capabilities.Capabilities}, or as a raw hash - * object. - * @param {(http.Executor|remote.DriverService)=} opt_executor Either a - * pre-configured command executor to use for communicating with an - * externally managed remote end (which is assumed to already be running), - * or the `DriverService` to use to start the geckodriver in a child - * process. - * - * If an executor is provided, care should e taken not to use reuse it with - * other clients as its internal command mappings will be updated to support - * Firefox-specific commands. - * - * _This parameter may only be used with Mozilla's GeckoDriver._ - * - * @param {promise.ControlFlow=} opt_flow The flow to - * schedule commands through. Defaults to the active flow object. - * @throws {Error} If a custom command executor is provided and the driver is - * configured to use the legacy FirefoxDriver from the Selenium project. - * @return {!Driver} A new driver instance. - */ - static createSession( - opt_config?: Options | webdriver.Capabilities, - opt_executor?: http.Executor | remote.DriverService, - opt_flow?: webdriver.promise.ControlFlow, - ): Driver; - - /** - * This function is a no-op as file detectors are not supported by this - * implementation. - * @override - */ - setFileDetector(): void; -} - -/** - * Creates {@link selenium-webdriver/remote.DriverService} instances that manage - * a [geckodriver](https://github.com/mozilla/geckodriver) server in a child - * process. - */ -export class ServiceBuilder extends remote.DriverService.Builder { - /** - * @param {string=} opt_exe Path to the server executable to use. If omitted, - * the builder will attempt to locate the geckodriver on the system PATH. - */ - constructor(opt_exe?: string); - - /** - * Enables verbose logging. - * - * @param {boolean=} opt_trace Whether to enable trace-level logging. By - * default, only debug logging is enabled. - * @return {!ServiceBuilder} A self reference. - */ - enableVerboseLogging(opt_trace?: boolean): this; - - /** - * Sets the path to the executable Firefox binary that the geckodriver should - * use. If this method is not called, this builder will attempt to locate - * Firefox in the default installation location for the current platform. - * - * @param {(string|!Binary)} binary Path to the executable Firefox binary to use. - * @return {!ServiceBuilder} A self reference. - * @see Binary#locate() - */ - setFirefoxBinary(binary: string | Binary): this; -} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts deleted file mode 100644 index 4fce3f6b..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/http.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -import * as webdriver from "./index"; - -/** - * Converts a headers map to a HTTP header block string. - * @param {!Map} headers The map to convert. - * @return {string} The headers as a string. - */ -export function headersToString(headers: any): string; - -/** - * Represents a HTTP request message. This class is a 'partial' request and only - * defines the path on the server to send a request to. It is each client's - * responsibility to build the full URL for the final request. - * @final - */ -export class Request { - /** - * @param {string} method The HTTP method to use for the request. - * @param {string} path The path on the server to send the request to. - * @param {Object=} opt_data This request's non-serialized JSON payload data. - */ - constructor(method: string, path: string, opt_data?: Object); - - headers: Map; - method: string; - path: string; - data: Object; - - /** @override */ - toString(): string; -} - -/** - * Represents a HTTP response message. - * @final - */ -export class Response { - /** - * @param {number} status The response code. - * @param {!Object} headers The response headers. All header names - * will be converted to lowercase strings for consistent lookups. - * @param {string} body The response body. - */ - constructor(status: number, headers: Object, body: string); - - status: number; - body: string; - headers: Map; - - /** @override */ - toString(): string; -} - -export function post(path: string): any; -export function del(path: string): any; -export function get(path: string): any; -export function resource(method: string, path: string): any; - -/** - * A basic HTTP client used to send messages to a remote end. - */ -export class HttpClient { - /** - * @param {string} serverUrl URL for the WebDriver server to send commands to. - * @param {http.Agent=} opt_agent The agent to use for each request. - * Defaults to `http.globalAgent`. - * @param {?string=} opt_proxy The proxy to use for the connection to the - * server. Default is to use no proxy. - */ - constructor(serverUrl: string, opt_agent?: any, opt_proxy?: string); - - /** - * Sends a request to the server. The client will automatically follow any - * redirects returned by the server, fulfilling the returned promise with the - * final response. - * - * @param {!HttpRequest} httpRequest The request to send. - * @return {!promise.Promise} A promise that will be fulfilled - * with the server's response. - */ - send(httpRequest: Request): webdriver.promise.Promise; -} - -/** - * Sends a single HTTP request. - * @param {!Object} options The request options. - * @param {function(!HttpResponse)} onOk The function to call if the - * request succeeds. - * @param {function(!Error)} onError The function to call if the request fails. - * @param {?string=} opt_data The data to send with the request. - * @param {?string=} opt_proxy The proxy server to use for the request. - */ -export function sendRequest(options: Object, onOk: any, onError: any, opt_data?: string, opt_proxy?: string): any; - -/** - * A command executor that communicates with the server using HTTP + JSON. - * - * By default, each instance of this class will use the legacy wire protocol - * from [Selenium project][json]. The executor will automatically switch to the - * [W3C wire protocol][w3c] if the remote end returns a compliant response to - * a new session command. - * - * [json]: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol - * [w3c]: https://w3c.github.io/webdriver/webdriver-spec.html - */ -export class Executor { - /** - * @param {!(HttpClient|IThenable)} client The client to use for sending - * requests to the server, or a promise-like object that will resolve to - * to the client. - */ - constructor(client: HttpClient | webdriver.promise.IThenable); - - /** - * Defines a new command for use with this executor. When a command is sent, - * the {@code path} will be preprocessed using the command's parameters; any - * path segments prefixed with ':' will be replaced by the parameter of the - * same name. For example, given '/person/:name' and the parameters - * '{name: 'Bob'}', the final command path will be '/person/Bob'. - * - * @param {string} name The command name. - * @param {string} method The HTTP method to use when sending this command. - * @param {string} path The path to send the command to, relative to - * the WebDriver server's command root and of the form - * '/path/:variable/segment'. - */ - defineCommand(name: string, method: string, path: string): void; - - /** @override */ - execute(command: any): any; -} - -/** - * @param {string} str . - * @return {?} . - */ -export function tryParse(str: string): any; - -/** - * Callback used to parse {@link HttpResponse} objects from a - * {@link HttpClient}. - * @param {!HttpResponse} httpResponse The HTTP response to parse. - * @param {boolean} w3c Whether the response should be processed using the - * W3C wire protocol. - * @return {{value: ?}} The parsed response. - * @throws {WebDriverError} If the HTTP response is an error. - */ -export function parseHttpResponse(httpResponse: Response, w3c: boolean): any; - -/** - * Builds a fully qualified path using the given set of command parameters. Each - * path segment prefixed with ':' will be replaced by the value of the - * corresponding parameter. All parameters spliced into the path will be - * removed from the parameter map. - * @param {string} path The original resource path. - * @param {!Object<*>} parameters The parameters object to splice into the path. - * @return {string} The modified path. - */ -export function buildPath(path: string, parameters: Object): string; diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts deleted file mode 100644 index 93673c68..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/ie.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import * as webdriver from "./index"; - -/** - * A WebDriver client for Microsoft's Internet Explorer. - */ -export class Driver extends webdriver.WebDriver { - /** - * Creates a new session for Microsoft's Internet Explorer. - * - * @param {(capabilities.Capabilities|Options)=} opt_config The configuration - * options. - * @param {promise.ControlFlow=} opt_flow The control flow to use, - * or {@code null} to use the currently active flow. - * @return {!Driver} A new driver instance. - */ - static createSession( - opt_config?: webdriver.Capabilities | Options, - opt_flow?: webdriver.promise.ControlFlow, - ): Driver; - - /** - * This function is a no-op as file detectors are not supported by this - * implementation. - * @override - */ - setFileDetector(): void; -} - -/** - * Class for managing IEDriver specific options. - */ -export class Options { - constructor(); - - /** - * Extracts the IEDriver specific options from the given capabilities - * object. - * @param {!capabilities.Capabilities} caps The capabilities object. - * @return {!Options} The IEDriver options. - */ - static fromCapabilities(caps: webdriver.Capabilities): Options; - - /** - * Whether to disable the protected mode settings check when the session is - * created. Disbling this setting may lead to significant instability as the - * browser may become unresponsive/hang. Only 'best effort' support is provided - * when using this capability. - * - * For more information, refer to the IEDriver's - * [required system configuration](http://goo.gl/eH0Yi3). - * - * @param {boolean} ignoreSettings Whether to ignore protected mode settings. - * @return {!Options} A self reference. - */ - introduceFlakinessByIgnoringProtectedModeSettings(ignoreSettings: boolean): Options; - - /** - * Indicates whether to skip the check that the browser's zoom level is set to - * 100%. - * - * @param {boolean} ignore Whether to ignore the browser's zoom level settings. - * @return {!Options} A self reference. - */ - ignoreZoomSetting(ignore: boolean): Options; - - /** - * Sets the initial URL loaded when IE starts. This is intended to be used with - * {@link #ignoreProtectedModeSettings} to allow the user to initialize IE in - * the proper Protected Mode zone. Setting this option may cause browser - * instability or flaky and unresponsive code. Only 'best effort' support is - * provided when using this option. - * - * @param {string} url The initial browser URL. - * @return {!Options} A self reference. - */ - initialBrowserUrl(url: string): Options; - - /** - * Configures whether to enable persistent mouse hovering (true by default). - * Persistent hovering is achieved by continuously firing mouse over events at - * the last location the mouse cursor has been moved to. - * - * @param {boolean} enable Whether to enable persistent hovering. - * @return {!Options} A self reference. - */ - enablePersistentHover(enable: boolean): Options; - - /** - * Configures whether the driver should attempt to remove obsolete - * {@linkplain webdriver.WebElement WebElements} from its internal cache on - * page navigation (true by default). Disabling this option will cause the - * driver to run with a larger memory footprint. - * - * @param {boolean} enable Whether to enable element reference cleanup. - * @return {!Options} A self reference. - */ - enableElementCacheCleanup(enable: boolean): Options; - - /** - * Configures whether to require the IE window to have input focus before - * performing any user interactions (i.e. mouse or keyboard events). This - * option is disabled by default, but delivers much more accurate interaction - * events when enabled. - * - * @param {boolean} require Whether to require window focus. - * @return {!Options} A self reference. - */ - requireWindowFocus(require: boolean): Options; - - /** - * Configures the timeout, in milliseconds, that the driver will attempt to - * located and attach to a newly opened instance of Internet Explorer. The - * default is zero, which indicates waiting indefinitely. - * - * @param {number} timeout How long to wait for IE. - * @return {!Options} A self reference. - */ - browserAttachTimeout(timeout: number): Options; - - /** - * Configures whether to launch Internet Explorer using the CreateProcess API. - * If this option is not specified, IE is launched using IELaunchURL, if - * available. For IE 8 and above, this option requires the TabProcGrowth - * registry value to be set to 0. - * - * @param {boolean} force Whether to use the CreateProcess API. - * @return {!Options} A self reference. - */ - forceCreateProcessApi(force: boolean): Options; - - /** - * Specifies command-line switches to use when launching Internet Explorer. - * This is only valid when used with {@link #forceCreateProcessApi}. - * - * @param {...(string|!Array.)} var_args The arguments to add. - * @return {!Options} A self reference. - */ - addArguments(...var_args: string[]): Options; - - /** - * Configures whether proxies should be configured on a per-process basis. If - * not set, setting a {@linkplain #setProxy proxy} will configure the system - * proxy. The default behavior is to use the system proxy. - * - * @param {boolean} enable Whether to enable per-process proxy settings. - * @return {!Options} A self reference. - */ - usePerProcessProxy(enable: boolean): Options; - - /** - * Configures whether to clear the cache, cookies, history, and saved form data - * before starting the browser. _Using this capability will clear session data - * for all running instances of Internet Explorer, including those started - * manually._ - * - * @param {boolean} cleanSession Whether to clear all session data on startup. - * @return {!Options} A self reference. - */ - ensureCleanSession(cleanSession: boolean): Options; - - /** - * Sets the path to the log file the driver should log to. - * @param {string} file The log file path. - * @return {!Options} A self reference. - */ - setLogFile(file: string): Options; - - /** - * Sets the IEDriverServer's logging {@linkplain Level level}. - * @param {Level} level The logging level. - * @return {!Options} A self reference. - */ - setLogLevel(level: webdriver.logging.Level): Options; - - /** - * Sets the IP address of the driver's host adapter. - * @param {string} host The IP address to use. - * @return {!Options} A self reference. - */ - setHost(host: string): Options; - - /** - * Sets the path of the temporary data directory to use. - * @param {string} path The log file path. - * @return {!Options} A self reference. - */ - setExtractPath(path: string): Options; - - /** - * Sets whether the driver should start in silent mode. - * @param {boolean} silent Whether to run in silent mode. - * @return {!Options} A self reference. - */ - silent(silent: boolean): Options; - - /** - * Sets the proxy settings for the new session. - * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy: webdriver.ProxyConfig): Options; - - /** - * Converts this options instance to a {@link capabilities.Capabilities} - * object. - * @param {capabilities.Capabilities=} opt_capabilities The capabilities to - * merge these options into, if any. - * @return {!capabilities.Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; -} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts deleted file mode 100644 index 5f53b214..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/index.d.ts +++ /dev/null @@ -1,4775 +0,0 @@ -import * as chrome from "./chrome"; -import * as edge from "./edge"; -import * as firefox from "./firefox"; -import * as ie from "./ie"; -import * as opera from "./opera"; -import * as safari from "./safari"; - -export namespace error { - class IError extends Error { - constructor(opt_error?: string); - } - - /** - * The base WebDriver error type. This error type is only used directly when a - * more appropriate category is not defined for the offending error. - */ - class WebDriverError extends IError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An attempt was made to select an element that cannot be selected. - */ - class ElementNotSelectableError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An element command could not be completed because the element is not visible - * on the page. - */ - class ElementNotVisibleError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * The arguments passed to a command are either invalid or malformed. - */ - class InvalidArgumentError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An illegal attempt was made to set a cookie under a different domain than - * the current page. - */ - class InvalidCookieDomainError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * The coordinates provided to an interactions operation are invalid. - */ - class InvalidElementCoordinatesError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An element command could not be completed because the element is in an - * invalid state, e.g. attempting to click an element that is no longer attached - * to the document. - */ - class InvalidElementStateError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * Argument was an invalid selector. - */ - class InvalidSelectorError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * Occurs when a command is directed to a session that does not exist. - */ - class NoSuchSessionError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An error occurred while executing JavaScript supplied by the user. - */ - class JavascriptError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * The target for mouse interaction is not in the browser’s viewport and cannot - * be brought into that viewport. - */ - class MoveTargetOutOfBoundsError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An attempt was made to operate on a modal dialog when one was not open. - */ - class NoSuchAlertError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An element could not be located on the page using the given search - * parameters. - */ - class NoSuchElementError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A request to switch to a frame could not be satisfied because the frame - * could not be found. - */ - class NoSuchFrameError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A request to switch to a window could not be satisfied because the window - * could not be found. - */ - class NoSuchWindowError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A script did not complete before its timeout expired. - */ - class ScriptTimeoutError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A new session could not be created. - */ - class SessionNotCreatedError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An element command failed because the referenced element is no longer - * attached to the DOM. - */ - class StaleElementReferenceError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * An operation did not completErrorCodee before its timeout expired. - */ - class TimeoutError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A request to set a cookie’s value could not be satisfied. - */ - class UnableToSetCookieError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A screen capture operation was not possible. - */ - class UnableToCaptureScreenError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * A modal dialog was open, blocking this operation. - */ - class UnexpectedAlertOpenError extends WebDriverError { - /** - * @param {string=} opt_error the error message, if any. - * @param {string=} opt_text the text of the open dialog, if available. - */ - constructor(opt_error?: string, opt_text?: string); - - /** - * @return {(string|undefined)} The text displayed with the unhandled alert, - * if available. - */ - getAlertText(): string; - } - - /** - * A command could not be executed because the remote end is not aware of it. - */ - class UnknownCommandError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * The requested command matched a known URL but did not match an method for - * that URL. - */ - class UnknownMethodError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } - - /** - * Reports an unsupport operation. - */ - class UnsupportedOperationError extends WebDriverError { - /** @param {string=} opt_error the error message, if any. */ - constructor(opt_error?: string); - } -} - -export namespace logging { - /** - * A hash describing log preferences. - */ - class Preferences { - setLevel(type: string, level: Level | string | number): void; - toJSON(): { [key: string]: string }; - } - - interface IType { - /** Logs originating from the browser. */ - BROWSER: string; - /** Logs from a WebDriver client. */ - CLIENT: string; - /** Logs from a WebDriver implementation. */ - DRIVER: string; - /** Logs related to performance. */ - PERFORMANCE: string; - /** Logs from the remote server. */ - SERVER: string; - } - - /** - * Common log types. - */ - const Type: IType; - - /** - * Defines a message level that may be used to control logging output. - * - * @final - */ - class Level { - name_: string; - value_: number; - /** - * @param {string} name the level's name. - * @param {number} level the level's numeric value. - */ - constructor(name: string, level: number); - - /** @override */ - toString(): string; - - /** This logger's name. */ - name: string; - - /** The numeric log level. */ - value: number; - - /** - * Indicates no log messages should be recorded. - * @constant - */ - static OFF: Level; - /** - * Log messages with a level of `1000` or higher. - * @constant - */ - static SEVERE: Level; - /** - * Log messages with a level of `900` or higher. - * @constant - */ - static WARNING: Level; - /** - * Log messages with a level of `800` or higher. - * @constant - */ - static INFO: Level; - /** - * Log messages with a level of `700` or higher. - * @constant - */ - static DEBUG: Level; - /** - * Log messages with a level of `500` or higher. - * @constant - */ - static FINE: Level; - /** - * Log messages with a level of `400` or higher. - * @constant - */ - static FINER: Level; - /** - * Log messages with a level of `300` or higher. - * @constant - */ - static FINEST: Level; - /** - * Indicates all log messages should be recorded. - * @constant - */ - static ALL: Level; - } - - /** - * Converts a level name or value to a {@link logging.Level} value. - * If the name/value is not recognized, {@link logging.Level.ALL} - * will be returned. - * @param {(number|string)} nameOrValue The log level name, or value, to - * convert . - * @return {!logging.Level} The converted level. - */ - function getLevel(nameOrValue: string | number): Level; - - interface IEntryJSON { - level: string; - message: string; - timestamp: number; - type: string; - } - - /** - * A single log entry. - */ - class Entry { - /** - * @param {(!logging.Level|string)} level The entry level. - * @param {string} message The log message. - * @param {number=} opt_timestamp The time this entry was generated, in - * milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the - * current time will be used. - * @param {string=} opt_type The log type, if known. - */ - constructor(level: Level | string | number, message: string, opt_timestamp?: number, opt_type?: string | IType); - - level: Level; - - message: string; - - timestamp: number; - - type: string; - - /** - * @return {{level: string, message: string, timestamp: number, - * type: string}} The JSON representation of this entry. - */ - toJSON(): IEntryJSON; - } - - /** - * An object used to log debugging messages. Loggers use a hierarchical, - * dot-separated naming scheme. For instance, 'foo' is considered the parent of - * the 'foo.bar' and an ancestor of 'foo.bar.baz'. - * - * Each logger may be assigned a {@linkplain #setLevel log level}, which - * controls which level of messages will be reported to the - * {@linkplain #addHandler handlers} attached to this instance. If a log level - * is not explicitly set on a logger, it will inherit its parent. - * - * This class should never be directly instantiated. Instead, users should - * obtain logger references using the {@linkplain ./logging.getLogger() - * getLogger()} function. - * - * @final - */ - class Logger { - /** - * @param {string} name the name of this logger. - * @param {Level=} opt_level the initial level for this logger. - */ - constructor(name: string, opt_level?: Level); - - name_: string; - level_: Level; - parent_: Logger; - handlers_: any; - - /** @return {string} the name of this logger. */ - getName(): string; - - /** - * @param {Level} level the new level for this logger, or `null` if the logger - * should inherit its level from its parent logger. - */ - setLevel(level: Level): void; - - /** @return {Level} the log level for this logger. */ - getLevel(): Level; - - /** - * @return {!Level} the effective level for this logger. - */ - getEffectiveLevel(): Level; - - /** - * @param {!Level} level the level to check. - * @return {boolean} whether messages recorded at the given level are loggable - * by this instance. - */ - isLoggable(level: Level): boolean; - - /** - * Adds a handler to this logger. The handler will be invoked for each message - * logged with this instance, or any of its descendants. - * - * @param {function(!Entry)} handler the handler to add. - */ - addHandler(handler: any): void; - - /** - * Removes a handler from this logger. - * - * @param {function(!Entry)} handler the handler to remove. - * @return {boolean} whether a handler was successfully removed. - */ - removeHandler(handler: any): void; - - /** - * Logs a message at the given level. The message may be defined as a string - * or as a function that will return the message. If a function is provided, - * it will only be invoked if this logger's - * {@linkplain #getEffectiveLevel() effective log level} includes the given - * `level`. - * - * @param {!Level} level the level at which to log the message. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - log(level: Level, loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.SEVERE} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - severe(loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.WARNING} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - warning(loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.INFO} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - info(loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.DEBUG} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - debug(loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.FINE} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - fine(loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.FINER} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - finer(loggable: string | Function): void; - - /** - * Logs a message at the {@link Level.FINEST} log level. - * @param {(string|function(): string)} loggable the message to log, or a - * function that will return the message. - */ - finest(loggable: string | Function): void; - } - - /** - * Maintains a collection of loggers. - * - * @final - */ - class LogManager { - /** - * Retrieves a named logger, creating it in the process. This function will - * implicitly create the requested logger, and any of its parents, if they - * do not yet exist. - * - * @param {string} name the logger's name. - * @return {!Logger} the requested logger. - */ - getLogger(name?: string): Logger; - - /** - * Creates a new logger. - * - * @param {string} name the logger's name. - * @param {!Logger} parent the logger's parent. - * @return {!Logger} the new logger. - */ - createLogger_(name: string, parent: Logger): Logger; - } - - /** - * Retrieves a named logger, creating it in the process. This function will - * implicitly create the requested logger, and any of its parents, if they - * do not yet exist. - * - * @param {string} name the logger's name. - * @return {!Logger} the requested logger. - */ - function getLogger(name?: string): Logger; - - /** - * Adds the console handler to the given logger. The console handler will log - * all messages using the JavaScript Console API. - * - * @param {Logger=} opt_logger The logger to add the handler to; defaults - * to the root logger. - */ - function addConsoleHandler(opt_logger?: Logger): void; - - /** - * Removes the console log handler from the given logger. - * - * @param {Logger=} opt_logger The logger to remove the handler from; defaults - * to the root logger. - * @see exports.addConsoleHandler - */ - function removeConsoleHandler(opt_logger?: Logger): void; -} - -export namespace promise { - // region Functions - - /** - * Set `USE_PROMISE_MANAGER` to `false` to disable the promise manager. - * This is useful, if you use async/await (see https://github.com/SeleniumHQ/selenium/issues/2969 - * and https://github.com/SeleniumHQ/selenium/issues/3037). - */ - let USE_PROMISE_MANAGER: boolean; - - /** - * Given an array of promises, will return a promise that will be fulfilled - * with the fulfillment values of the input array's values. If any of the - * input array's promises are rejected, the returned promise will be rejected - * with the same reason. - * - * @param {!Array<(T|!ManagedPromise)>} arr An array of - * promises to wait on. - * @return {!ManagedPromise} A promise that is - * fulfilled with an array containing the fulfilled values of the - * input array, or rejected with the same reason as the first - * rejected value. - * @template T - */ - function all(arr: Array>): Promise; - - /** - * Invokes the appropriate callback function as soon as a promised - * {@code value} is resolved. This function is similar to - * {@link promise.when}, except it does not return a new promise. - * @param {*} value The value to observe. - * @param {Function} callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - */ - function asap(value: any, callback: Function, opt_errback?: Function): void; - - /** - * @return {!promise.ControlFlow} The currently active control flow. - */ - function controlFlow(): ControlFlow; - - /** - * Creates a new control flow. The provided callback will be invoked as the - * first task within the new flow, with the flow as its sole argument. Returns - * a promise that resolves to the callback result. - * @param {function(!ControlFlow)} callback The entry point - * to the newly created flow. - * @return {!ManagedPromise} A promise that resolves to the callback - * result. - */ - function createFlow(callback: (flow: ControlFlow) => R): Promise; - - /** - * Determines whether a {@code value} should be treated as a promise. - * Any object whose 'then' property is a function will be considered a promise. - * - * @param {*} value The value to test. - * @return {boolean} Whether the value is a promise. - */ - function isPromise(value: any): boolean; - - /** - * Tests is a function is a generator. - * @param {!Function} fn The function to test. - * @return {boolean} Whether the function is a generator. - */ - function isGenerator(fn: Function): boolean; - - /** - * Creates a promise that will be resolved at a set time in the future. - * @param {number} ms The amount of time, in milliseconds, to wait before - * resolving the promise. - * @return {!ManagedPromise} The promise. - */ - function delayed(ms: number): Promise; - - /** - * Calls a function for each element in an array, and if the function returns - * true adds the element to a new array. - * - * If the return value of the filter function is a promise, this function - * will wait for it to be fulfilled before determining whether to insert the - * element into the new array. - * - * If the filter function throws or returns a rejected promise, the promise - * returned by this function will be rejected with the same reason. Only the - * first failure will be reported; all subsequent errors will be silently - * ignored. - * - * @param {!(Array|ManagedPromise>)} arr The - * array to iterator over, or a promise that will resolve to said array. - * @param {function(this: SELF, TYPE, number, !Array): ( - * boolean|ManagedPromise)} fn The function - * to call for each element in the array. - * @param {SELF=} opt_self The object to be used as the value of 'this' within - * {@code fn}. - * @template TYPE, SELF - */ - function filter( - arr: T[] | Promise, - fn: (element: T, type: any, index: number, array: T[]) => any, - opt_self?: any, - ): Promise; - - /** - * Creates a new deferred object. - * @return {!promise.Deferred} The new deferred object. - */ - function defer(): Deferred; - - /** - * Creates a promise that has been resolved with the given value. - * @param {T=} opt_value The resolved value. - * @return {!Promise} The resolved promise. - * @deprecated Use {@link Promise#resolve Promise.resolve(value)}. - * @template T - */ - function fulfilled(opt_value?: T): Promise; - - /** - * Calls a function for each element in an array and inserts the result into a - * new array, which is used as the fulfillment value of the promise returned - * by this function. - * - * If the return value of the mapping function is a promise, this function - * will wait for it to be fulfilled before inserting it into the new array. - * - * If the mapping function throws or returns a rejected promise, the - * promise returned by this function will be rejected with the same reason. - * Only the first failure will be reported; all subsequent errors will be - * silently ignored. - * - * @param {!(Array|ManagedPromise>)} arr The - * array to iterator over, or a promise that will resolve to said array. - * @param {function(this: SELF, TYPE, number, !Array): ?} fn The - * function to call for each element in the array. This function should - * expect three arguments (the element, the index, and the array itself. - * @param {SELF=} opt_self The object to be used as the value of 'this' within - * {@code fn}. - * @template TYPE, SELF - */ - function map( - arr: T[] | Promise, - fn: (self: any, type: any, index: number, array: T[]) => any, - opt_self?: any, - ): Promise; - - /** - * Creates a promise that has been rejected with the given reason. - * @param {*=} opt_reason The rejection reason; may be any value, but is - * usually an Error or a string. - * @return {!Promise} The rejected promise. - * @deprecated Use {@link Promise#reject Promise.Promise(reason)}. - */ - function rejected(opt_reason?: any): Promise; - - /** - * Wraps a function that expects a node-style callback as its final - * argument. This callback expects two arguments: an error value (which will be - * null if the call succeeded), and the success value as the second argument. - * The callback will the resolve or reject the returned promise, based on its - * arguments. - * @param {!Function} fn The function to wrap. - * @param {...?} var_args The arguments to apply to the function, excluding the - * final callback. - * @return {!ManagedPromise} A promise that will be resolved with the - * result of the provided function's callback. - */ - function checkedNodeCall(fn: Function, ...var_args: any[]): Promise; - - /** - * Consumes a {@code GeneratorFunction}. Each time the generator yields a - * promise, this function will wait for it to be fulfilled before feeding the - * fulfilled value back into {@code next}. Likewise, if a yielded promise is - * rejected, the rejection error will be passed to {@code throw}. - * - * __Example 1:__ the Fibonacci Sequence. - * - * promise.consume(function* fibonacci() { - * var n1 = 1, n2 = 1; - * for (var i = 0; i < 4; ++i) { - * var tmp = yield n1 + n2; - * n1 = n2; - * n2 = tmp; - * } - * return n1 + n2; - * }).then(function(result) { - * console.log(result); // 13 - * }); - * - * __Example 2:__ a generator that throws. - * - * promise.consume(function* () { - * yield promise.delayed(250).then(function() { - * throw Error('boom'); - * }); - * }).catch(function(e) { - * console.log(e.toString()); // Error: boom - * }); - * - * @param {!Function} generatorFn The generator function to execute. - * @param {Object=} opt_self The object to use as 'this' when invoking the - * initial generator. - * @param {...*} var_args Any arguments to pass to the initial generator. - * @return {!ManagedPromise} A promise that will resolve to the - * generator's final result. - * @throws {TypeError} If the given function is not a generator. - */ - function consume(generatorFn: (...args: any[]) => T, opt_self?: any, ...var_args: any[]): Promise; - - /** - * Registers an observer on a promised {@code value}, returning a new promise - * that will be resolved when the value is. If {@code value} is not a promise, - * then the return promise will be immediately resolved. - * @param {*} value The value to observe. - * @param {Function=} opt_callback The function to call when the value is - * resolved successfully. - * @param {Function=} opt_errback The function to call when the value is - * rejected. - * @return {!ManagedPromise} A new promise. - */ - function when( - value: T | Promise, - opt_callback?: (value: T) => any, - opt_errback?: (error: any) => any, - ): Promise; - - /** - * Returns a promise that will be resolved with the input value in a - * fully-resolved state. If the value is an array, each element will be fully - * resolved. Likewise, if the value is an object, all keys will be fully - * resolved. In both cases, all nested arrays and objects will also be - * fully resolved. All fields are resolved in place; the returned promise will - * resolve on {@code value} and not a copy. - * - * Warning: This function makes no checks against objects that contain - * cyclical references: - * - * var value = {}; - * value['self'] = value; - * promise.fullyResolved(value); // Stack overflow. - * - * @param {*} value The value to fully resolve. - * @return {!ManagedPromise} A promise for a fully resolved version - * of the input value. - */ - function fullyResolved(value: any): Promise; - - /** - * Changes the default flow to use when no others are active. - * @param {!ControlFlow} flow The new default flow. - * @throws {Error} If the default flow is not currently active. - */ - function setDefaultFlow(flow: ControlFlow): void; - - // endregion - - /** - * Error used when the computation of a promise is cancelled. - */ - class CancellationError extends Error { - /** - * @param {string=} opt_msg The cancellation message. - */ - constructor(opt_msg?: string); - } - - interface IThenable extends PromiseLike { - /** - * Registers listeners for when this instance is resolved. - * - * @param onfulfilled - * The function to call if this promise is successfully resolved. The function - * should expect a single argument: the promise's resolved value. - * @param onrejected - * The function to call if this promise is rejected. The function should - * expect a single argument: the rejection reason. - * @return A new promise which will be resolved with the result - * of the invoked callback. - * @template R - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | null, - ): PromiseLike; - - /** - * Registers a listener for when this promise is rejected. This is synonymous - * with the {@code catch} clause in a synchronous API: - * - * // Synchronous API: - * try { - * doSynchronousWork(); - * } catch (ex) { - * console.error(ex); - * } - * - * // Asynchronous promise API: - * doAsynchronousWork().catch(function(ex) { - * console.error(ex); - * }); - * - * @param {function(*): (R|IThenable)} errback The - * function to call if this promise is rejected. The function should - * expect a single argument: the rejection reason. - * @return {!ManagedPromise} A new promise which will be - * resolved with the result of the invoked callback. - * @template R - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | null, - ): Promise; - } - - /** - * Thenable is a promise-like object with a {@code then} method which may be - * used to schedule callbacks on a promised value. - * - * @interface - * @template T - */ - interface Thenable extends IThenable {} - class Thenable { - /** - * Registers a listener to invoke when this promise is resolved, regardless - * of whether the promise's value was successfully computed. This function - * is synonymous with the {@code finally} clause in a synchronous API: - * - * // Synchronous API: - * try { - * doSynchronousWork(); - * } finally { - * cleanUp(); - * } - * - * // Asynchronous promise API: - * doAsynchronousWork().finally(cleanUp); - * - * __Note:__ similar to the {@code finally} clause, if the registered - * callback returns a rejected promise or throws an error, it will silently - * replace the rejection error (if any) from this promise: - * - * try { - * throw Error('one'); - * } finally { - * throw Error('two'); // Hides Error: one - * } - * - * promise.rejected(Error('one')) - * .finally(function() { - * throw Error('two'); // Hides Error: one - * }); - * - * @param {function(): (R|IThenable)} callback The function to call when - * this promise is resolved. - * @return {!ManagedPromise} A promise that will be fulfilled - * with the callback result. - * @template R - */ - finally(callback: Function): Promise; - - /** - * Adds a property to a class prototype to allow runtime checks of whether - * instances of that class implement the Thenable interface. This function - * will also ensure the prototype's {@code then} function is exported from - * compiled code. - * @param {function(new: Thenable, ...?)} ctor The - * constructor whose prototype to modify. - */ - static addImplementation(ctor: Function): void; - - /** - * Checks if an object has been tagged for implementing the Thenable - * interface as defined by {@link Thenable.addImplementation}. - * @param {*} object The object to test. - * @return {boolean} Whether the object is an implementation of the Thenable - * interface. - */ - static isImplementation(object: any): boolean; - } - - interface IFulfilledCallback { - (value: T | IThenable | Thenable | undefined): void; - } - - interface IRejectedCallback { - (reason: any): void; - } - - /** - * Represents the eventual value of a completed operation. Each promise may be - * in one of three states: pending, fulfilled, or rejected. Each promise starts - * in the pending state and may make a single transition to either a - * fulfilled or rejected state, at which point the promise is considered - * resolved. - * - * @template T - * @see http://promises-aplus.github.io/promises-spec/ - */ - class Promise implements IThenable, PromiseLike { - /** - * @param {function( - * function((T|IThenable|Thenable)=), - * function(*=))} resolver - * Function that is invoked immediately to begin computation of this - * promise's value. The function should accept a pair of callback - * functions, one for fulfilling the promise and another for rejecting it. - * @param {ControlFlow=} opt_flow The control flow - * this instance was created under. Defaults to the currently active flow. - */ - constructor( - resolver: (resolve: IFulfilledCallback, reject: IRejectedCallback) => void, - opt_flow?: ControlFlow, - ); - - /** - * Creates a promise that is immediately resolved with the given value. - * - * @param {T=} opt_value The value to resolve. - * @return {!ManagedPromise} A promise resolved with the given value. - * @template T - */ - static resolve(opt_value?: T): Promise; - - /** - * Creates a promise that is immediately rejected with the given reason. - * - * @param {*=} opt_reason The rejection reason. - * @return {!ManagedPromise} A new rejected promise. - */ - static reject(opt_reason?: any): Promise; - - /** - * Registers listeners for when this instance is resolved. - * - * @param onfulfilled - * The function to call if this promise is successfully resolved. The function - * should expect a single argument: the promise's resolved value. - * @param onrejected - * The function to call if this promise is rejected. The function should - * expect a single argument: the rejection reason. - * @return A new promise which will be resolved with the result - * of the invoked callback. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | null, - ): Promise; - - /** - * Registers a listener for when this promise is rejected. This is synonymous - * with the {@code catch} clause in a synchronous API: - * - * // Synchronous API: - * try { - * doSynchronousWork(); - * } catch (ex) { - * console.error(ex); - * } - * - * // Asynchronous promise API: - * doAsynchronousWork().catch(function(ex) { - * console.error(ex); - * }); - * - * @param onrejected - * The function to call if this promise is rejected. The function should - * expect a single argument: the rejection reason. - * @return A new promise which will be resolved with the result of the invoked callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | null, - ): Promise; - } - - /** - * Represents a value that will be resolved at some point in the future. This - * class represents the protected 'producer' half of a Promise - each Deferred - * has a {@code promise} property that may be returned to consumers for - * registering callbacks, reserving the ability to resolve the deferred to the - * producer. - * - *

    You may also define the target browser using the {@code SELENIUM_BROWSER} - * environment variable. If set, this environment variable should be of the - * form {@code browser[:[version][:platform]]}. - * - * @param {(string|Browser)} name The name of the target browser; - * common defaults are available on the {@link Browser} enum. - * @param {string=} opt_version A desired version; may be omitted if any - * version should be used. - * @param {string=} opt_platform The desired platform; may be omitted if any - * version may be used. - * @return {!Builder} A self reference. - */ - forBrowser(name: string, opt_version?: string, opt_platform?: string): Builder; - - /** - * Returns the base set of capabilities this instance is currently configured - * to use. - * @return {!Capabilities} The current capabilities for this builder. - */ - getCapabilities(): Capabilities; - - /** - * @return {string} The URL of the WebDriver server this instance is configured - * to use. - */ - getServerUrl(): string; - - /** - * @return {?string} The URL of the proxy server to use for the WebDriver's - * HTTP connections, or `null` if not set. - */ - getWebDriverProxy(): string; - - /** - * Sets the default action to take with an unexpected alert before returning - * an error. - * @param {string} beahvior The desired behavior; should be 'accept', 'dismiss', - * or 'ignore'. Defaults to 'dismiss'. - * @return {!Builder} A self reference. - */ - setAlertBehavior(behavior: string): Builder; - - /** - * Sets Chrome-specific options for drivers created by this builder. Any - * logging or proxy settings defined on the given options will take precedence - * over those set through {@link #setLoggingPrefs} and {@link #setProxy}, - * respectively. - * - * @param {!chrome.Options} options The ChromeDriver options to use. - * @return {!Builder} A self reference. - */ - setChromeOptions(options: chrome.Options): Builder; - - /** - * @return {chrome.Options} the Chrome specific options currently configured - * for this builder. - */ - getChromeOptions(): chrome.Options; - - /** - * Sets the service builder to use for managing the chromedriver child process - * when creating new Chrome sessions. - * - * @param {chrome.ServiceBuilder} service the service to use. - * @return {!Builder} A self reference. - */ - setChromeService(service: chrome.ServiceBuilder): Builder; - - /** - * Sets the control flow that created drivers should execute actions in. If - * the flow is never set, or is set to {@code null}, it will use the active - * flow at the time {@link #build()} is called. - * @param {promise.ControlFlow} flow The control flow to use, or - * {@code null} to - * @return {!Builder} A self reference. - */ - setControlFlow(flow: promise.ControlFlow): Builder; - - /** - * Set {@linkplain edge.Options options} specific to Microsoft's Edge browser - * for drivers created by this builder. Any proxy settings defined on the - * given options will take precedence over those set through - * {@link #setProxy}. - * - * @param {!edge.Options} options The MicrosoftEdgeDriver options to use. - * @return {!Builder} A self reference. - */ - setEdgeOptions(options: edge.Options): Builder; - - /** - * Sets the {@link edge.ServiceBuilder} to use to manage the - * MicrosoftEdgeDriver child process when creating sessions locally. - * - * @param {edge.ServiceBuilder} service the service to use. - * @return {!Builder} a self reference. - */ - setEdgeService(service: edge.ServiceBuilder): Builder; - - /** - * Sets whether native events should be used. - * @param {boolean} enabled Whether to enable native events. - * @return {!Builder} A self reference. - */ - setEnableNativeEvents(enabled: boolean): Builder; - - /** - * Sets Firefox-specific options for drivers created by this builder. Any - * logging or proxy settings defined on the given options will take precedence - * over those set through {@link #setLoggingPrefs} and {@link #setProxy}, - * respectively. - * - * @param {!firefox.Options} options The FirefoxDriver options to use. - * @return {!Builder} A self reference. - */ - setFirefoxOptions(options: firefox.Options): Builder; - - /** - * @return {firefox.Options} the Firefox specific options currently configured - * for this instance. - */ - getFirefoxOptions(): firefox.Options; - - /** - * Sets the {@link firefox.ServiceBuilder} to use to manage the geckodriver - * child process when creating Firefox sessions locally. - * - * @param {firefox.ServiceBuilder} service the service to use. - * @return {!Builder} a self reference. - */ - setFirefoxService(service: firefox.ServiceBuilder): Builder; - - /** - * Set Internet Explorer specific {@linkplain ie.Options options} for drivers - * created by this builder. Any proxy settings defined on the given options - * will take precedence over those set through {@link #setProxy}. - * - * @param {!ie.Options} options The IEDriver options to use. - * @return {!Builder} A self reference. - */ - setIeOptions(options: ie.Options): Builder; - - /** - * Sets the logging preferences for the created session. Preferences may be - * changed by repeated calls, or by calling {@link #withCapabilities}. - * @param {!(logging.Preferences|Object.)} prefs The - * desired logging preferences. - * @return {!Builder} A self reference. - */ - setLoggingPrefs(prefs: logging.Preferences | Object): Builder; - - /** - * Sets Opera specific {@linkplain opera.Options options} for drivers created - * by this builder. Any logging or proxy settings defined on the given options - * will take precedence over those set through {@link #setLoggingPrefs} and - * {@link #setProxy}, respectively. - * - * @param {!opera.Options} options The OperaDriver options to use. - * @return {!Builder} A self reference. - */ - setOperaOptions(options: opera.Options): Builder; - - /** - * Sets the proxy configuration to use for WebDriver clients created by this - * builder. Any calls to {@link #withCapabilities} after this function will - * overwrite these settings. - * @param {!capabilities.ProxyConfig} config The configuration to use. - * @return {!Builder} A self reference. - */ - setProxy(config: ProxyConfig): Builder; - - /** - * Sets Safari specific {@linkplain safari.Options options} for drivers - * created by this builder. Any logging settings defined on the given options - * will take precedence over those set through {@link #setLoggingPrefs}. - * - * @param {!safari.Options} options The Safari options to use. - * @return {!Builder} A self reference. - */ - setSafariOptions(options: safari.Options): Builder; - - /** - * @return {safari.Options} the Safari specific options currently configured - * for this instance. - */ - getSafariOptions(): safari.Options; - - /** - * Sets how elements should be scrolled into view for interaction. - * @param {number} behavior The desired scroll behavior: either 0 to align with - * the top of the viewport or 1 to align with the bottom. - * @return {!Builder} A self reference. - */ - setScrollBehavior(behavior: number): Builder; - - /** - * Sets the http agent to use for each request. - * If this method is not called, the Builder will use http.globalAgent by default. - * - * @param {http.Agent} agent The agent to use for each request. - * @return {!Builder} A self reference. - */ - usingHttpAgent(agent: any): Builder; - - /** - * Sets the URL of a remote WebDriver server to use. Once a remote URL has been - * specified, the builder direct all new clients to that server. If this method - * is never called, the Builder will attempt to create all clients locally. - * - *

    As an alternative to this method, you may also set the - * {@code SELENIUM_REMOTE_URL} environment variable. - * - * @param {string} url The URL of a remote server to use. - * @return {!Builder} A self reference. - */ - usingServer(url: string): Builder; - - /** - * Sets the URL of the proxy to use for the WebDriver's HTTP connections. - * If this method is never called, the Builder will create a connection - * without a proxy. - * - * @param {string} proxy The URL of a proxy to use. - * @return {!Builder} A self reference. - */ - usingWebDriverProxy(proxy: string): Builder; - - /** - * Sets the desired capabilities when requesting a new session. This will - * overwrite any previously set capabilities. - * @param {!(Object|Capabilities)} capabilities The desired - * capabilities for a new session. - * @return {!Builder} A self reference. - */ - withCapabilities(capabilities: Object | Capabilities): Builder; - - // endregion -} - -/** - * Describes a mechanism for locating an element on the page. - * @final - */ -export class By { - /** - * @param {string} using the name of the location strategy to use. - * @param {string} value the value to search for. - */ - constructor(using: string, value: string); - - /** - * Locates elements that have a specific class name. - * - * @param {string} name The class name to search for. - * @return {!By} The new locator. - * @see http://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes - * @see http://www.w3.org/TR/CSS2/selector.html#class-html - */ - static className(name: string): By; - - /** - * Locates elements using a CSS selector. - * - * @param {string} selector The CSS selector to use. - * @return {!By} The new locator. - * @see http://www.w3.org/TR/CSS2/selector.html - */ - static css(selector: string): By; - - /** - * Locates eleemnts by the ID attribute. This locator uses the CSS selector - * `*[id='$ID']`, _not_ `document.getElementById`. - * - * @param {string} id The ID to search for. - * @return {!By} The new locator. - */ - static id(id: string): By; - - /** - * Locates link elements whose - * {@linkplain WebElement#getText visible text} matches the given - * string. - * - * @param {string} text The link text to search for. - * @return {!By} The new locator. - */ - static linkText(text: string): By; - - /** - * Locates an elements by evaluating a - * {@linkplain WebDriver#executeScript JavaScript expression}. - * The result of this expression must be an element or list of elements. - * - * @param {!(string|Function)} script The script to execute. - * @param {...*} var_args The arguments to pass to the script. - * @return {function(!./WebDriver): !./promise.Promise} - * A new JavaScript-based locator function. - */ - static js(script: string | Function, ...var_args: any[]): (webdriver: WebDriver) => promise.Promise; - - /** - * Locates elements whose `name` attribute has the given value. - * - * @param {string} name The name attribute to search for. - * @return {!By} The new locator. - */ - static name(name: string): By; - - /** - * Locates link elements whose - * {@linkplain WebElement#getText visible text} contains the given - * substring. - * - * @param {string} text The substring to check for in a link's visible text. - * @return {!By} The new locator. - */ - static partialLinkText(text: string): By; - - /** - * Locates elements with a given tag name. - * - * @param {string} name The tag name to search for. - * @return {!By} The new locator. - * @deprecated Use {@link By.css() By.css(tagName)} instead. - */ - static tagName(name: string): By; - - /** - * Locates elements matching a XPath selector. Care should be taken when - * using an XPath selector with a {@link WebElement} as WebDriver - * will respect the context in the specified in the selector. For example, - * given the selector `//div`, WebDriver will search from the document root - * regardless of whether the locator was used with a WebElement. - * - * @param {string} xpath The XPath selector to use. - * @return {!By} The new locator. - * @see http://www.w3.org/TR/xpath/ - */ - static xpath(xpath: string): By; - - /** @override */ - toString(): string; -} - -/** - * Short-hand expressions for the primary element locator strategies. - * For example the following two statements are equivalent: - * - * var e1 = driver.findElement(By.id('foo')); - * var e2 = driver.findElement({id: 'foo'}); - * - * Care should be taken when using JavaScript minifiers (such as the - * Closure compiler), as locator hashes will always be parsed using - * the un-obfuscated properties listed. - */ -export type ByHash = - | { className: string } - | { css: string } - | { id: string } - | { js: string } - | { linkText: string } - | { name: string } - | { partialLinkText: string } - | { tagName: string } - | { xpath: string }; - -export type Locator = By | Function | ByHash; - -/** - * Common webdriver capability keys. - */ -export interface ICapability { - /** - * Indicates whether a driver should accept all SSL certs by default. This - * capability only applies when requesting a new session. To query whether - * a driver can handle insecure SSL certs, see - * {@link Capability.SECURE_SSL}. - */ - ACCEPT_SSL_CERTS: string; - - /** - * The browser name. Common browser names are defined in the - * {@link Browser} enum. - */ - BROWSER_NAME: string; - - /** - * Defines how elements should be scrolled into the viewport for interaction. - * This capability will be set to zero (0) if elements are aligned with the - * top of the viewport, or one (1) if aligned with the bottom. The default - * behavior is to align with the top of the viewport. - */ - ELEMENT_SCROLL_BEHAVIOR: string; - - /** - * Whether the driver is capable of handling modal alerts (e.g. alert, - * confirm, prompt). To define how a driver should handle alerts, - * use {@link Capability.UNEXPECTED_ALERT_BEHAVIOR}. - */ - HANDLES_ALERTS: string; - - /** - * Key for the logging driver logging preferences. - */ - LOGGING_PREFS: string; - - /** - * Whether this session generates native events when simulating user input. - */ - NATIVE_EVENTS: string; - - /** - * Describes the platform the browser is running on. Will be one of - * ANDROID, IOS, LINUX, MAC, UNIX, or WINDOWS. When requesting a - * session, ANY may be used to indicate no platform preference (this is - * semantically equivalent to omitting the platform capability). - */ - PLATFORM: string; - - /** - * Describes the proxy configuration to use for a new WebDriver session. - */ - PROXY: string; - - /** Whether the driver supports changing the brower's orientation. */ - ROTATABLE: string; - - /** - * Whether a driver is only capable of handling secure SSL certs. To request - * that a driver accept insecure SSL certs by default, use - * {@link Capability.ACCEPT_SSL_CERTS}. - */ - SECURE_SSL: string; - - /** Whether the driver supports manipulating the app cache. */ - SUPPORTS_APPLICATION_CACHE: string; - - /** Whether the driver supports locating elements with CSS selectors. */ - SUPPORTS_CSS_SELECTORS: string; - - /** Whether the browser supports JavaScript. */ - SUPPORTS_JAVASCRIPT: string; - - /** Whether the driver supports controlling the browser's location info. */ - SUPPORTS_LOCATION_CONTEXT: string; - - /** Whether the driver supports taking screenshots. */ - TAKES_SCREENSHOT: string; - - /** - * Defines how the driver should handle unexpected alerts. The value should - * be one of 'accept', 'dismiss', or 'ignore. - */ - UNEXPECTED_ALERT_BEHAVIOR: string; - - /** Defines the browser version. */ - VERSION: string; -} - -export const Capability: ICapability; - -export class Capabilities { - // region Constructors - - /** - * @param {(Capabilities|Object)=} opt_other Another set of - * capabilities to merge into this instance. - */ - constructor(opt_other?: Capabilities | Object); - - // endregion - - // region Methods - - /** @return {!Object} The JSON representation of this instance. */ - toJSON(): any; - - /** - * Merges another set of capabilities into this instance. Any duplicates in - * the provided set will override those already set on this instance. - * @param {!(Capabilities|Object)} other The capabilities to - * merge into this instance. - * @return {!Capabilities} A self reference. - */ - merge(other: Capabilities | Object): Capabilities; - - /** - * @param {string} key The capability to set. - * @param {*} value The capability value. Capability values must be JSON - * serializable. Pass {@code null} to unset the capability. - * @return {!Capabilities} A self reference. - */ - set(key: string, value: any): Capabilities; - - /** - * Sets the logging preferences. Preferences may be specified as a - * {@link logging.Preferences} instance, or a as a map of log-type to - * log-level. - * @param {!(logging.Preferences|Object.)} prefs The - * logging preferences. - * @return {!Capabilities} A self reference. - */ - setLoggingPrefs(prefs: logging.Preferences | Object): Capabilities; - - /** - * Sets the proxy configuration for this instance. - * @param {ProxyConfig} proxy The desired proxy configuration. - * @return {!Capabilities} A self reference. - */ - setProxy(proxy: ProxyConfig): Capabilities; - - /** - * Sets whether native events should be used. - * @param {boolean} enabled Whether to enable native events. - * @return {!Capabilities} A self reference. - */ - setEnableNativeEvents(enabled: boolean): Capabilities; - - /** - * Sets how elements should be scrolled into view for interaction. - * @param {number} behavior The desired scroll behavior: either 0 to align with - * the top of the viewport or 1 to align with the bottom. - * @return {!Capabilities} A self reference. - */ - setScrollBehavior(behavior: number): Capabilities; - - /** - * Sets the default action to take with an unexpected alert before returning - * an error. - * @param {string} behavior The desired behavior; should be 'accept', 'dismiss', - * or 'ignore'. Defaults to 'dismiss'. - * @return {!Capabilities} A self reference. - */ - setAlertBehavior(behavior: string): Capabilities; - - /** - * @param {string} key The capability to return. - * @return {*} The capability with the given key, or {@code null} if it has - * not been set. - */ - get(key: string): any; - - /** - * @param {string} key The capability to check. - * @return {boolean} Whether the specified capability is set. - */ - has(key: string): boolean; - - // endregion - - // region Static Methods - - /** - * @return {!Capabilities} A basic set of capabilities for Android. - */ - static android(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for Chrome. - */ - static chrome(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for Microsoft Edge. - */ - static edge(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for Firefox. - */ - static firefox(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for - * Internet Explorer. - */ - static ie(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for iPad. - */ - static ipad(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for iPhone. - */ - static iphone(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for Opera. - */ - static opera(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for - * PhantomJS. - */ - static phantomjs(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for Safari. - */ - static safari(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for HTMLUnit. - */ - static htmlunit(): Capabilities; - - /** - * @return {!Capabilities} A basic set of capabilities for HTMLUnit - * with enabled Javascript. - */ - static htmlunitwithjs(): Capabilities; - - // endregion -} - -/** - * An enumeration of valid command string. - */ -export interface ICommandName { - GET_SERVER_STATUS: string; - - NEW_SESSION: string; - GET_SESSIONS: string; - DESCRIBE_SESSION: string; - - CLOSE: string; - QUIT: string; - - GET_CURRENT_URL: string; - GET: string; - GO_BACK: string; - GO_FORWARD: string; - REFRESH: string; - - ADD_COOKIE: string; - GET_COOKIE: string; - GET_ALL_COOKIES: string; - DELETE_COOKIE: string; - DELETE_ALL_COOKIES: string; - - GET_ACTIVE_ELEMENT: string; - FIND_ELEMENT: string; - FIND_ELEMENTS: string; - FIND_CHILD_ELEMENT: string; - FIND_CHILD_ELEMENTS: string; - - CLEAR_ELEMENT: string; - CLICK_ELEMENT: string; - SEND_KEYS_TO_ELEMENT: string; - SUBMIT_ELEMENT: string; - - GET_CURRENT_WINDOW_HANDLE: string; - GET_WINDOW_HANDLES: string; - GET_WINDOW_POSITION: string; - SET_WINDOW_POSITION: string; - GET_WINDOW_SIZE: string; - SET_WINDOW_SIZE: string; - MAXIMIZE_WINDOW: string; - - SWITCH_TO_WINDOW: string; - SWITCH_TO_FRAME: string; - GET_PAGE_SOURCE: string; - GET_TITLE: string; - - EXECUTE_SCRIPT: string; - EXECUTE_ASYNC_SCRIPT: string; - - GET_ELEMENT_TEXT: string; - GET_ELEMENT_TAG_NAME: string; - IS_ELEMENT_SELECTED: string; - IS_ELEMENT_ENABLED: string; - IS_ELEMENT_DISPLAYED: string; - GET_ELEMENT_LOCATION: string; - GET_ELEMENT_LOCATION_IN_VIEW: string; - GET_ELEMENT_SIZE: string; - GET_ELEMENT_ATTRIBUTE: string; - GET_ELEMENT_VALUE_OF_CSS_PROPERTY: string; - ELEMENT_EQUALS: string; - - SCREENSHOT: string; - IMPLICITLY_WAIT: string; - SET_SCRIPT_TIMEOUT: string; - SET_TIMEOUT: string; - - ACCEPT_ALERT: string; - DISMISS_ALERT: string; - GET_ALERT_TEXT: string; - SET_ALERT_TEXT: string; - - EXECUTE_SQL: string; - GET_LOCATION: string; - SET_LOCATION: string; - GET_APP_CACHE: string; - GET_APP_CACHE_STATUS: string; - CLEAR_APP_CACHE: string; - IS_BROWSER_ONLINE: string; - SET_BROWSER_ONLINE: string; - - GET_LOCAL_STORAGE_ITEM: string; - GET_LOCAL_STORAGE_KEYS: string; - SET_LOCAL_STORAGE_ITEM: string; - REMOVE_LOCAL_STORAGE_ITEM: string; - CLEAR_LOCAL_STORAGE: string; - GET_LOCAL_STORAGE_SIZE: string; - - GET_SESSION_STORAGE_ITEM: string; - GET_SESSION_STORAGE_KEYS: string; - SET_SESSION_STORAGE_ITEM: string; - REMOVE_SESSION_STORAGE_ITEM: string; - CLEAR_SESSION_STORAGE: string; - GET_SESSION_STORAGE_SIZE: string; - - SET_SCREEN_ORIENTATION: string; - GET_SCREEN_ORIENTATION: string; - - // These belong to the Advanced user interactions - an element is - // optional for these commands. - CLICK: string; - DOUBLE_CLICK: string; - MOUSE_DOWN: string; - MOUSE_UP: string; - MOVE_TO: string; - SEND_KEYS_TO_ACTIVE_ELEMENT: string; - - // These belong to the Advanced Touch API - TOUCH_SINGLE_TAP: string; - TOUCH_DOWN: string; - TOUCH_UP: string; - TOUCH_MOVE: string; - TOUCH_SCROLL: string; - TOUCH_DOUBLE_TAP: string; - TOUCH_LONG_PRESS: string; - TOUCH_FLICK: string; - - GET_AVAILABLE_LOG_TYPES: string; - GET_LOG: string; - GET_SESSION_LOGS: string; - - UPLOAD_FILE: string; -} - -export const CommandName: ICommandName; - -/** - * Describes a command to be executed by the WebDriverJS framework. - * @param {!CommandName} name The name of this command. - */ -export class Command { - // region Constructors - - /** - * @param {!CommandName} name The name of this command. - */ - constructor(name: string); - - // endregion - - // region Methods - - /** - * @return {!CommandName} This command's name. - */ - getName(): string; - - /** - * Sets a parameter to send with this command. - * @param {string} name The parameter name. - * @param {*} value The parameter value. - * @return {!Command} A self reference. - */ - setParameter(name: string, value: any): Command; - - /** - * Sets the parameters for this command. - * @param {!Object.<*>} parameters The command parameters. - * @return {!Command} A self reference. - */ - setParameters(parameters: any): Command; - - /** - * Returns a named command parameter. - * @param {string} key The parameter key to look up. - * @return {*} The parameter value, or undefined if it has not been set. - */ - getParameter(key: string): any; - - /** - * @return {!Object.<*>} The parameters to send with this command. - */ - getParameters(): any; - - // endregion -} - -/** - * Handles the execution of WebDriver {@link Command commands}. - * @interface - */ -export class Executor { - /** - * Executes the given {@code command}. If there is an error executing the - * command, the provided callback will be invoked with the offending error. - * Otherwise, the callback will be invoked with a null Error and non-null - * response object. - * - * @param {!Command} command The command to execute. - * @return {!promise.Promise} A promise that will be fulfilled with - * the command result. - */ - execute(command: Command): promise.Promise; -} - -/** - * Describes an event listener registered on an {@linkplain EventEmitter}. - */ -export class Listener { - /** - * @param {!Function} fn The acutal listener function. - * @param {(Object|undefined)} scope The object in whose scope to invoke the - * listener. - * @param {boolean} oneshot Whether this listener should only be used once. - */ - constructor(fn: Function, scope: Object, oneshot: boolean); -} - -/** - * Object that can emit events for others to listen for. This is used instead - * of Closure's event system because it is much more light weight. The API is - * based on Node's EventEmitters. - */ -export class EventEmitter { - // region Constructors - - /** */ - constructor(); - - // endregion - - // region Methods - - /** - * Fires an event and calls all listeners. - * @param {string} type The type of event to emit. - * @param {...*} var_args Any arguments to pass to each listener. - */ - emit(type: string, ...var_args: any[]): void; - - /** - * Returns a mutable list of listeners for a specific type of event. - * @param {string} type The type of event to retrieve the listeners for. - * @return {!Set} The registered listeners for the given event - * type. - */ - listeners(type: string): any; - - /** - * Registers a listener. - * @param {string} type The type of event to listen for. - * @param {!Function} fn The function to invoke when the event is fired. - * @param {Object=} opt_self The object in whose scope to invoke the listener. - * @param {boolean=} opt_oneshot Whether the listener should b (e removed after - * the first event is fired. - * @return {!EventEmitter} A self reference. - */ - addListener(type: string, fn: Function, opt_scope?: any, opt_oneshot?: boolean): EventEmitter; - - /** - * Registers a one-time listener which will be called only the first time an - * event is emitted, after which it will be removed. - * @param {string} type The type of event to listen for. - * @param {!Function} fn The function to invoke when the event is fired. - * @param {Object=} opt_scope The object in whose scope to invoke the listener. - * @return {!EventEmitter} A self reference. - */ - once(type: string, fn: any, opt_scope?: any): EventEmitter; - - /** - * An alias for {@code #addListener()}. - * @param {string} type The type of event to listen for. - * @param {!Function} fn The function to invoke when the event is fired. - * @param {Object=} opt_scope The object in whose scope to invoke the listener. - * @return {!EventEmitter} A self reference. - */ - on(type: string, fn: Function, opt_scope?: any): EventEmitter; - - /** - * Removes a previously registered event listener. - * @param {string} type The type of event to unregister. - * @param {!Function} listenerFn The handler function to remove. - * @return {!EventEmitter} A self reference. - */ - removeListener(type: string, listenerFn: Function): EventEmitter; - - /** - * Removes all listeners for a specific type of event. If no event is - * specified, all listeners across all types will be removed. - * @param {string=} opt_type The type of event to remove listeners from. - * @return {!EventEmitter} A self reference. - */ - removeAllListeners(opt_type?: string): EventEmitter; - - // endregion -} - -/** - * Interface for navigating back and forth in the browser history. - */ -export class Navigation { - // region Constructors - - /** - * Interface for navigating back and forth in the browser history. - * - * This class should never be instantiated directly. Insead, obtain an instance - * with - * - * navigate() - * - * @see WebDriver#navigate() - */ - constructor(driver: WebDriver); - - // endregion - - // region Methods - - /** - * Schedules a command to navigate to a new URL. - * @param {string} url The URL to navigate to. - * @return {!promise.Promise.} A promise that will be resolved - * when the URL has been loaded. - */ - to(url: string): promise.Promise; - - /** - * Schedules a command to move backwards in the browser history. - * @return {!promise.Promise.} A promise that will be resolved - * when the navigation event has completed. - */ - back(): promise.Promise; - - /** - * Schedules a command to move forwards in the browser history. - * @return {!promise.Promise.} A promise that will be resolved - * when the navigation event has completed. - */ - forward(): promise.Promise; - - /** - * Schedules a command to refresh the current page. - * @return {!promise.Promise.} A promise that will be resolved - * when the navigation event has completed. - */ - refresh(): promise.Promise; - - // endregion -} - -export interface IWebDriverOptionsCookie { - /** - * The name of the cookie. - */ - name: string; - - /** - * The cookie value. - */ - value: string; - - /** - * The cookie path. Defaults to "/" when adding a cookie. - */ - path?: string | undefined; - - /** - * The domain the cookie is visible to. Defaults to the current browsing - * context's document's URL when adding a cookie. - */ - domain?: string | undefined; - - /** - * Whether the cookie is a secure cookie. Defaults to false when adding a new - * cookie. - */ - secure?: boolean | undefined; - - /** - * Whether the cookie is an HTTP only cookie. Defaults to false when adding a - * new cookie. - */ - httpOnly?: boolean | undefined; - - /** - * When the cookie expires. - * - * When {@linkplain Options#addCookie() adding a cookie}, this may be specified - * in _seconds_ since Unix epoch (January 1, 1970). The expiry will default to - * 20 years in the future if omitted. - * - * The expiry is always returned in seconds since epoch when - * {@linkplain Options#getCookies() retrieving cookies} from the browser. - */ - expiry?: number | Date | undefined; -} - -export interface IWebDriverCookie extends IWebDriverOptionsCookie { - /** - * When the cookie expires. - * - * The expiry is always returned in seconds since epoch when - * {@linkplain Options#getCookies() retrieving cookies} from the browser. - */ - expiry?: number | undefined; -} - -/** - * Provides methods for managing browser and driver state. - */ -export class Options { - // region Constructors - - /** - * @param {!WebDriver} driver The parent driver. - */ - constructor(driver: WebDriver); - - // endregion - - // region Methods - - /** - * Schedules a command to add a cookie. - * @param {IWebDriverOptionsCookie} spec Defines the cookie to add. - * @return {!promise.Promise} A promise that will be resolved - * when the cookie has been added to the page. - * @throws {error.InvalidArgumentError} if any of the cookie parameters are - * invalid. - * @throws {TypeError} if `spec` is not a cookie object. - */ - addCookie(spec: IWebDriverOptionsCookie): promise.Promise; - - /** - * Schedules a command to delete all cookies visible to the current page. - * @return {!promise.Promise} A promise that will be resolved when all - * cookies have been deleted. - */ - deleteAllCookies(): promise.Promise; - - /** - * Schedules a command to delete the cookie with the given name. This command is - * a no-op if there is no cookie with the given name visible to the current - * page. - * @param {string} name The name of the cookie to delete. - * @return {!promise.Promise} A promise that will be resolved when the - * cookie has been deleted. - */ - deleteCookie(name: string): promise.Promise; - - /** - * Schedules a command to retrieve all cookies visible to the current page. - * Each cookie will be returned as a JSON object as described by the WebDriver - * wire protocol. - * @return {!promise.Promise} A promise that will be resolved with the - * cookies visible to the current page. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object - */ - getCookies(): promise.Promise; - - /** - * Schedules a command to retrieve the cookie with the given name. Returns null - * if there is no such cookie. The cookie will be returned as a JSON object as - * described by the WebDriver wire protocol. - * @param {string} name The name of the cookie to retrieve. - * @return {!promise.Promise} A promise that will be resolved with the - * named cookie, or {@code null} if there is no such cookie. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object - */ - getCookie(name: string): promise.Promise; - - /** - * @return {!Logs} The interface for managing driver - * logs. - */ - logs(): Logs; - - /** - * @return {!Timeouts} The interface for managing driver - * timeouts. - */ - timeouts(): Timeouts; - - /** - * @return {!Window} The interface for managing the - * current window. - */ - window(): Window; - - // endregion -} - -/** - * An interface for managing timeout behavior for WebDriver instances. - */ -export class Timeouts { - // region Constructors - - /** - * @param {!WebDriver} driver The parent driver. - */ - constructor(driver: WebDriver); - - // endregion - - // region Methods - - /** - * Specifies the amount of time the driver should wait when searching for an - * element if it is not immediately present. - *

    - * When searching for a single element, the driver should poll the page - * until the element has been found, or this timeout expires before failing - * with a {@code bot.ErrorCode.NO_SUCH_ELEMENT} error. When searching - * for multiple elements, the driver should poll the page until at least one - * element has been found or this timeout has expired. - *

    - * Setting the wait timeout to 0 (its default value), disables implicit - * waiting. - *

    - * Increasing the implicit wait timeout should be used judiciously as it - * will have an adverse effect on test run time, especially when used with - * slower location strategies like XPath. - * - * @param {number} ms The amount of time to wait, in milliseconds. - * @return {!promise.Promise} A promise that will be resolved when the - * implicit wait timeout has been set. - */ - implicitlyWait(ms: number): promise.Promise; - - /** - * Sets the amount of time to wait, in milliseconds, for an asynchronous script - * to finish execution before returning an error. If the timeout is less than or - * equal to 0, the script will be allowed to run indefinitely. - * - * @param {number} ms The amount of time to wait, in milliseconds. - * @return {!promise.Promise} A promise that will be resolved when the - * script timeout has been set. - */ - setScriptTimeout(ms: number): promise.Promise; - - /** - * Sets the amount of time to wait for a page load to complete before returning - * an error. If the timeout is negative, page loads may be indefinite. - * @param {number} ms The amount of time to wait, in milliseconds. - * @return {!promise.Promise} A promise that will be resolved when - * the timeout has been set. - */ - pageLoadTimeout(ms: number): promise.Promise; - - // endregion -} - -/** - * An interface for managing the current window. - */ -export class Window { - // region Constructors - - /** - * @param {!WebDriver} driver The parent driver. - */ - constructor(driver: WebDriver); - - // endregion - - // region Methods - - /** - * Retrieves the window's current position, relative to the top left corner of - * the screen. - * @return {!promise.Promise} A promise that will be resolved with the - * window's position in the form of a {x:number, y:number} object literal. - */ - getPosition(): promise.Promise; - - /** - * Repositions the current window. - * @param {number} x The desired horizontal position, relative to the left side - * of the screen. - * @param {number} y The desired vertical position, relative to the top of the - * of the screen. - * @return {!promise.Promise} A promise that will be resolved when the - * command has completed. - */ - setPosition(x: number, y: number): promise.Promise; - - /** - * Retrieves the window's current size. - * @return {!promise.Promise} A promise that will be resolved with the - * window's size in the form of a {width:number, height:number} object - * literal. - */ - getSize(): promise.Promise; - - /** - * Resizes the current window. - * @param {number} width The desired window width. - * @param {number} height The desired window height. - * @return {!promise.Promise} A promise that will be resolved when the - * command has completed. - */ - setSize(width: number, height: number): promise.Promise; - - /** - * Maximizes the current window. - * @return {!promise.Promise} A promise that will be resolved when the - * command has completed. - */ - maximize(): promise.Promise; - - // endregion -} - -/** - * Interface for managing WebDriver log records. - */ -export class Logs { - // region Constructors - - /** - * @param {!WebDriver} driver The parent driver. - */ - constructor(driver: WebDriver); - - // endregion - - // region - - /** - * Fetches available log entries for the given type. - * - *

    Note that log buffers are reset after each call, meaning that - * available log entries correspond to those entries not yet returned for a - * given log type. In practice, this means that this call will return the - * available log entries since the last call, or from the start of the - * session. - * - * @param {!logging.Type} type The desired log type. - * @return {!promise.Promise.>} A - * promise that will resolve to a list of log entries for the specified - * type. - */ - get(type: string): promise.Promise; - - /** - * Retrieves the log types available to this driver. - * @return {!promise.Promise.>} A - * promise that will resolve to a list of available log types. - */ - getAvailableLogTypes(): promise.Promise; - - // endregion -} - -/** - * An interface for changing the focus of the driver to another frame or window. - */ -export class TargetLocator { - // region Constructors - - /** - * @param {!WebDriver} driver The parent driver. - */ - constructor(driver: WebDriver); - - // endregion - - // region Methods - - /** - * Schedules a command retrieve the {@code document.activeElement} element on - * the current document, or {@code document.body} if activeElement is not - * available. - * @return {!WebElement} The active element. - */ - activeElement(): WebElementPromise; - - /** - * Schedules a command to switch focus of all future commands to the first frame - * on the page. - * @return {!promise.Promise} A promise that will be resolved when the - * driver has changed focus to the default content. - */ - defaultContent(): promise.Promise; - - /** - * Schedules a command to switch the focus of all future commands to another - * frame on the page. The target frame may be specified as one of the - * following: - * - * - A number that specifies a (zero-based) index into [window.frames]( - * https://developer.mozilla.org/en-US/docs/Web/API/Window.frames). - * - A {@link WebElement} reference, which correspond to a `frame` or `iframe` - * DOM element. - * - The `null` value, to select the topmost frame on the page. Passing `null` - * is the same as calling {@link #defaultContent defaultContent()}. - * - * If the specified frame can not be found, the returned promise will be - * rejected with a {@linkplain error.NoSuchFrameError}. - * - * @param {(number|WebElement|null)} id The frame locator. - * @return {!promise.Promise} A promise that will be resolved - * when the driver has changed focus to the specified frame. - */ - frame(nameOrIndex: number | WebElement | null): promise.Promise; - - /** - * Schedules a command to switch the focus of all future commands to another - * window. Windows may be specified by their {@code window.name} attribute or - * by its handle (as returned by {@link WebDriver#getWindowHandles}). - * - * If the specified window cannot be found, the returned promise will be - * rejected with a {@linkplain error.NoSuchWindowError}. - * - * @param {string} nameOrHandle The name or window handle of the window to - * switch focus to. - * @return {!promise.Promise} A promise that will be resolved - * when the driver has changed focus to the specified window. - */ - window(nameOrHandle: string): promise.Promise; - - /** - * Schedules a command to change focus to the active modal dialog, such as - * those opened by `window.alert()`, `window.confirm()`, and - * `window.prompt()`. The returned promise will be rejected with a - * {@linkplain error.NoSuchAlertError} if there are no open alerts. - * - * @return {!AlertPromise} The open alert. - */ - alert(): AlertPromise; - - // endregion -} - -/** - * Used with {@link WebElement#sendKeys WebElement#sendKeys} on file - * input elements ({@code }) to detect when the entered key - * sequence defines the path to a file. - * - * By default, {@linkplain WebElement WebElement's} will enter all - * key sequences exactly as entered. You may set a - * {@linkplain WebDriver#setFileDetector file detector} on the parent - * WebDriver instance to define custom behavior for handling file elements. Of - * particular note is the {@link selenium-webdriver/remote.FileDetector}, which - * should be used when running against a remote - * [Selenium Server](http://docs.seleniumhq.org/download/). - */ -export class FileDetector { - constructor(); - - /** - * Handles the file specified by the given path, preparing it for use with - * the current browser. If the path does not refer to a valid file, it will - * be returned unchanged, otherwisee a path suitable for use with the current - * browser will be returned. - * - * This default implementation is a no-op. Subtypes may override this - * function for custom tailored file handling. - * - * @param {!WebDriver} driver The driver for the current browser. - * @param {string} path The path to process. - * @return {!promise.Promise} A promise for the processed - * file path. - * @package - */ - handleFile(driver: WebDriver, path: string): promise.Promise; -} - -export type CreateSessionCapabilities = - | Capabilities - | { - desired?: Capabilities | undefined; - required?: Capabilities | undefined; - }; - -/** - * Creates a new WebDriver client, which provides control over a browser. - * - * Every WebDriver command returns a {@code promise.Promise} that - * represents the result of that command. Callbacks may be registered on this - * object to manipulate the command result or catch an expected error. Any - * commands scheduled with a callback are considered sub-commands and will - * execute before the next command in the current frame. For example: - * - * var message = []; - * driver.call(message.push, message, 'a').then(function() { - * driver.call(message.push, message, 'b'); - * }); - * driver.call(message.push, message, 'c'); - * driver.call(function() { - * alert('message is abc? ' + (message.join('') == 'abc')); - * }); - */ -export class WebDriver { - // region Constructors - - /** - * @param {!(Session|promise.Promise)} session Either a - * known session or a promise that will be resolved to a session. - * @param {!command.Executor} executor The executor to use when sending - * commands to the browser. - * @param {promise.ControlFlow=} opt_flow The flow to - * schedule commands through. Defaults to the active flow object. - */ - constructor(session: Session | promise.Promise, executor: Executor, opt_flow?: promise.ControlFlow); - - // endregion - - // region StaticMethods - - /** - * Creates a new WebDriver client for an existing session. - * @param {!command.Executor} executor Command executor to use when querying - * for session details. - * @param {string} sessionId ID of the session to attach to. - * @param {promise.ControlFlow=} opt_flow The control flow all - * driver commands should execute under. Defaults to the - * {@link promise.controlFlow() currently active} control flow. - * @return {!WebDriver} A new client for the specified session. - */ - static attachToSession(executor: Executor, sessionId: string, opt_flow?: promise.ControlFlow): WebDriver; - - /** - * Creates a new WebDriver session. - * - * By default, the requested session `capabilities` are merely "desired" and - * the remote end will still create a new session even if it cannot satisfy - * all of the requested capabilities. You can query which capabilities a - * session actually has using the - * {@linkplain #getCapabilities() getCapabilities()} method on the returned - * WebDriver instance. - * - * To define _required capabilities_, provide the `capabilities` as an object - * literal with `required` and `desired` keys. The `desired` key may be - * omitted if all capabilities are required, and vice versa. If the server - * cannot create a session with all of the required capabilities, it will - * return an {@linkplain error.SessionNotCreatedError}. - * - * let required = new Capabilities().set('browserName', 'firefox'); - * let desired = new Capabilities().set('version', '45'); - * let driver = WebDriver.createSession(executor, {required, desired}); - * - * This function will always return a WebDriver instance. If there is an error - * creating the session, such as the aforementioned SessionNotCreatedError, - * the driver will have a rejected {@linkplain #getSession session} promise. - * It is recommended that this promise is left _unhandled_ so it will - * propagate through the {@linkplain promise.ControlFlow control flow} and - * cause subsequent commands to fail. - * - * let required = Capabilities.firefox(); - * let driver = WebDriver.createSession(executor, {required}); - * - * // If the createSession operation failed, then this command will also - * // also fail, propagating the creation failure. - * driver.get('http://www.google.com').catch(e => console.log(e)); - * - * @param {!command.Executor} executor The executor to create the new session - * with. - * @param {(!Capabilities| - * {desired: (Capabilities|undefined), - * required: (Capabilities|undefined)})} capabilities The desired - * capabilities for the new session. - * @param {promise.ControlFlow=} opt_flow The control flow all driver - * commands should execute under, including the initial session creation. - * Defaults to the {@link promise.controlFlow() currently active} - * control flow. - * @param {(function(new: WebDriver, - * !IThenable, - * !command.Executor, - * promise.ControlFlow=))=} opt_ctor - * A reference to the constructor of the specific type of WebDriver client - * to instantiate. Will create a vanilla {@linkplain WebDriver} instance - * if a constructor is not provided. - * @param {(function(this: void): ?)=} opt_onQuit A callback to invoke when - * the newly created session is terminated. This should be used to clean - * up any resources associated with the session. - * @return {!WebDriver} The driver for the newly created session. - */ - // This method's arguments are untyped so that its overloads can have correct types. - // Typescript doesn't allow static methods to be overridden with incompatible signatures. - static createSession(...var_args: any[]): WebDriver; - - // endregion - - // region Methods - - /** - * @return {!promise.ControlFlow} The control flow used by this - * instance. - */ - controlFlow(): promise.ControlFlow; - - /** - * Schedules a {@link command.Command} to be executed by this driver's - * {@link command.Executor}. - * - * @param {!command.Command} command The command to schedule. - * @param {string} description A description of the command for debugging. - * @return {!promise.Promise} A promise that will be resolved - * with the command result. - * @template T - */ - schedule(command: Command, description: string): promise.Promise; - - /** - * Sets the {@linkplain input.FileDetector file detector} that should be - * used with this instance. - * @param {input.FileDetector} detector The detector to use or {@code null}. - */ - setFileDetector(detector: FileDetector): void; - - /** - * @return {!promise.Promise.} A promise for this - * client's session. - */ - getSession(): promise.Promise; - - /** - * @return {!promise.Promise.} A promise - * that will resolve with the this instance's capabilities. - */ - getCapabilities(): promise.Promise; - - /** - * Schedules a command to quit the current session. After calling quit, this - * instance will be invalidated and may no longer be used to issue commands - * against the browser. - * @return {!promise.Promise.} A promise that will be resolved - * when the command has completed. - */ - quit(): promise.Promise; - - /** - * Creates a new action sequence using this driver. The sequence will not be - * scheduled for execution until {@link actions.ActionSequence#perform} is - * called. Example: - * - * driver.actions(). - * mouseDown(element1). - * mouseMove(element2). - * mouseUp(). - * perform(); - * - * @return {!actions.ActionSequence} A new action sequence for this instance. - */ - actions(): ActionSequence; - - /** - * Creates a new touch sequence using this driver. The sequence will not be - * scheduled for execution until {@link actions.TouchSequence#perform} is - * called. Example: - * - * driver.touchActions(). - * tap(element1). - * doubleTap(element2). - * perform(); - * - * @return {!actions.TouchSequence} A new touch sequence for this instance. - */ - touchActions(): TouchSequence; - - /** - * Schedules a command to execute JavaScript in the context of the currently - * selected frame or window. The script fragment will be executed as the body - * of an anonymous function. If the script is provided as a function object, - * that function will be converted to a string for injection into the target - * window. - * - * Any arguments provided in addition to the script will be included as script - * arguments and may be referenced using the {@code arguments} object. - * Arguments may be a boolean, number, string, or {@code WebElement}. - * Arrays and objects may also be used as script arguments as long as each item - * adheres to the types previously mentioned. - * - * The script may refer to any variables accessible from the current window. - * Furthermore, the script will execute in the window's context, thus - * {@code document} may be used to refer to the current document. Any local - * variables will not be available once the script has finished executing, - * though global variables will persist. - * - * If the script has a return value (i.e. if the script contains a return - * statement), then the following steps will be taken for resolving this - * functions return value: - * - * - For a HTML element, the value will resolve to a - * {@link WebElement} - * - Null and undefined return values will resolve to null - * - Booleans, numbers, and strings will resolve as is - * - Functions will resolve to their string representation - * - For arrays and objects, each member item will be converted according to - * the rules above - * - * @param {!(string|Function)} script The script to execute. - * @param {...*} var_args The arguments to pass to the script. - * @return {!promise.Promise.} A promise that will resolve to the - * scripts return value. - * @template T - */ - executeScript(script: string | Function, ...var_args: any[]): promise.Promise; - - /** - * Schedules a command to execute asynchronous JavaScript in the context of the - * currently selected frame or window. The script fragment will be executed as - * the body of an anonymous function. If the script is provided as a function - * object, that function will be converted to a string for injection into the - * target window. - * - * Any arguments provided in addition to the script will be included as script - * arguments and may be referenced using the {@code arguments} object. - * Arguments may be a boolean, number, string, or {@code WebElement}. - * Arrays and objects may also be used as script arguments as long as each item - * adheres to the types previously mentioned. - * - * Unlike executing synchronous JavaScript with {@link #executeScript}, - * scripts executed with this function must explicitly signal they are finished - * by invoking the provided callback. This callback will always be injected - * into the executed function as the last argument, and thus may be referenced - * with {@code arguments[arguments.length - 1]}. The following steps will be - * taken for resolving this functions return value against the first argument - * to the script's callback function: - * - * - For a HTML element, the value will resolve to a - * {@link WebElement} - * - Null and undefined return values will resolve to null - * - Booleans, numbers, and strings will resolve as is - * - Functions will resolve to their string representation - * - For arrays and objects, each member item will be converted according to - * the rules above - * - * __Example #1:__ Performing a sleep that is synchronized with the currently - * selected window: - * - * var start = new Date().getTime(); - * driver.executeAsyncScript( - * 'window.setTimeout(arguments[arguments.length - 1], 500);'). - * then(function() { - * console.log( - * 'Elapsed time: ' + (new Date().getTime() - start) + ' ms'); - * }); - * - * __Example #2:__ Synchronizing a test with an AJAX application: - * - * var button = driver.findElement(By.id('compose-button')); - * button.click(); - * driver.executeAsyncScript( - * 'var callback = arguments[arguments.length - 1];' + - * 'mailClient.getComposeWindowWidget().onload(callback);'); - * driver.switchTo().frame('composeWidget'); - * driver.findElement(By.id('to')).sendKeys('dog@example.com'); - * - * __Example #3:__ Injecting a XMLHttpRequest and waiting for the result. In - * this example, the inject script is specified with a function literal. When - * using this format, the function is converted to a string for injection, so it - * should not reference any symbols not defined in the scope of the page under - * test. - * - * driver.executeAsyncScript(function() { - * var callback = arguments[arguments.length - 1]; - * var xhr = new XMLHttpRequest(); - * xhr.open('GET', '/resource/data.json', true); - * xhr.onreadystatechange = function() { - * if (xhr.readyState == 4) { - * callback(xhr.responseText); - * } - * } - * xhr.send(''); - * }).then(function(str) { - * console.log(JSON.parse(str)['food']); - * }); - * - * @param {!(string|Function)} script The script to execute. - * @param {...*} var_args The arguments to pass to the script. - * @return {!promise.Promise.} A promise that will resolve to the - * scripts return value. - * @template T - */ - executeAsyncScript(script: string | Function, ...var_args: any[]): promise.Promise; - - /** - * Schedules a command to execute a custom function. - * @param {function(...): (T|promise.Promise.)} fn The function to - * execute. - * @param {Object=} opt_scope The object in whose scope to execute the function. - * @param {...*} var_args Any arguments to pass to the function. - * @return {!promise.Promise.} A promise that will be resolved' - * with the function's result. - * @template T - */ - call( - fn: (...var_args: any[]) => T | promise.Promise, - opt_scope?: any, - ...var_args: any[] - ): promise.Promise; - - /** - * Schedules a command to wait for a condition to hold. The condition may be - * specified by a {@link Condition}, as a custom function, or - * as a {@link promise.Promise}. - * - * For a {@link Condition} or function, the wait will repeatedly - * evaluate the condition until it returns a truthy value. If any errors occur - * while evaluating the condition, they will be allowed to propagate. In the - * event a condition returns a {@link promise.Promise promise}, the - * polling loop will wait for it to be resolved and use the resolved value for - * whether the condition has been satisified. Note the resolution time for - * a promise is factored into whether a wait has timed out. - * - * Note, if the provided condition is a {@link WebElementCondition}, then - * the wait will return a {@link WebElementPromise} that will resolve to the - * element that satisified the condition. - * - * *Example:* waiting up to 10 seconds for an element to be present and visible - * on the page. - * - * var button = driver.wait(until.elementLocated(By.id('foo'), 10000); - * button.click(); - * - * This function may also be used to block the command flow on the resolution - * of a {@link promise.Promise promise}. When given a promise, the - * command will simply wait for its resolution before completing. A timeout may - * be provided to fail the command if the promise does not resolve before the - * timeout expires. - * - * *Example:* Suppose you have a function, `startTestServer`, that returns a - * promise for when a server is ready for requests. You can block a `WebDriver` - * client on this promise with: - * - * var started = startTestServer(); - * driver.wait(started, 5 * 1000, 'Server should start within 5 seconds'); - * driver.get(getServerUrl()); - * - * @param {!WebElementCondition} condition The condition to - * wait on, defined as a promise, condition object, or a function to - * evaluate as a condition. - * @param {number=} opt_timeout How long to wait for the condition to be true. - * @param {string=} opt_message An optional message to use if the wait times - * out. - * @return {!WebElementPromise} A promise that will be fulfilled - * with the first truthy value returned by the condition function, or - * rejected if the condition times out. - * @template T - */ - wait(condition: WebElementCondition, opt_timeout?: number, opt_message?: string): WebElementPromise; - - /** - * Schedules a command to wait for a condition to hold. The condition may be - * specified by a {@link webdriver.Condition}, as a custom function, or - * as a {@link webdriver.promise.Promise}. - * - * For a {@link webdriver.Condition} or function, the wait will repeatedly - * evaluate the condition until it returns a truthy value. If any errors occur - * while evaluating the condition, they will be allowed to propagate. In the - * event a condition returns a {@link webdriver.promise.Promise promise}, the - * polling loop will wait for it to be resolved and use the resolved value for - * whether the condition has been satisified. Note the resolution time for - * a promise is factored into whether a wait has timed out. - * - * Note, if the provided condition is a {@link WebElementCondition}, then - * the wait will return a {@link WebElementPromise} that will resolve to the - * element that satisified the condition. - * - * *Example:* waiting up to 10 seconds for an element to be present and visible - * on the page. - * - * var button = driver.wait(until.elementLocated(By.id('foo'), 10000); - * button.click(); - * - * This function may also be used to block the command flow on the resolution - * of a {@link webdriver.promise.Promise promise}. When given a promise, the - * command will simply wait for its resolution before completing. A timeout may - * be provided to fail the command if the promise does not resolve before the - * timeout expires. - * - * *Example:* Suppose you have a function, `startTestServer`, that returns a - * promise for when a server is ready for requests. You can block a `WebDriver` - * client on this promise with: - * - * var started = startTestServer(); - * driver.wait(started, 5 * 1000, 'Server should start within 5 seconds'); - * driver.get(getServerUrl()); - * - * @param {!(promise.Promise| - * Condition| - * function(!WebDriver): T)} condition The condition to - * wait on, defined as a promise, condition object, or a function to - * evaluate as a condition. - * @param {number=} opt_timeout How long to wait for the condition to be true. - * @param {string=} opt_message An optional message to use if the wait times - * out. - * @return {!promise.Promise} A promise that will be fulfilled - * with the first truthy value returned by the condition function, or - * rejected if the condition times out. - * @template T - */ - wait( - condition: PromiseLike | Condition | ((driver: WebDriver) => T | PromiseLike) | Function, - opt_timeout?: number, - opt_message?: string, - ): promise.Promise; - - /** - * Schedules a command to make the driver sleep for the given amount of time. - * @param {number} ms The amount of time, in milliseconds, to sleep. - * @return {!promise.Promise.} A promise that will be resolved - * when the sleep has finished. - */ - sleep(ms: number): promise.Promise; - - /** - * Schedules a command to retrieve they current window handle. - * @return {!promise.Promise.} A promise that will be - * resolved with the current window handle. - */ - getWindowHandle(): promise.Promise; - - /** - * Schedules a command to retrieve the current list of available window handles. - * @return {!promise.Promise.>} A promise that will - * be resolved with an array of window handles. - */ - getAllWindowHandles(): promise.Promise; - - /** - * Schedules a command to retrieve the current page's source. The page source - * returned is a representation of the underlying DOM: do not expect it to be - * formatted or escaped in the same way as the response sent from the web - * server. - * @return {!promise.Promise.} A promise that will be - * resolved with the current page source. - */ - getPageSource(): promise.Promise; - - /** - * Schedules a command to close the current window. - * @return {!promise.Promise.} A promise that will be resolved - * when this command has completed. - */ - close(): promise.Promise; - - /** - * Schedules a command to navigate to the given URL. - * @param {string} url The fully qualified URL to open. - * @return {!promise.Promise.} A promise that will be resolved - * when the document has finished loading. - */ - get(url: string): promise.Promise; - - /** - * Schedules a command to retrieve the URL of the current page. - * @return {!promise.Promise.} A promise that will be - * resolved with the current URL. - */ - getCurrentUrl(): promise.Promise; - - /** - * Schedules a command to retrieve the current page's title. - * @return {!promise.Promise.} A promise that will be - * resolved with the current page's title. - */ - getTitle(): promise.Promise; - - /** - * Schedule a command to find an element on the page. If the element cannot be - * found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned - * by the driver. Unlike other commands, this error cannot be suppressed. In - * other words, scheduling a command to find an element doubles as an assert - * that the element is present on the page. To test whether an element is - * present on the page, use {@link #findElements}. - * - * The search criteria for an element may be defined using one of the - * factories in the {@link By} namespace, or as a short-hand - * {@link By.Hash} object. For example, the following two statements - * are equivalent: - * - * var e1 = driver.findElement(By.id('foo')); - * var e2 = driver.findElement({id:'foo'}); - * - * You may also provide a custom locator function, which takes as input this - * instance and returns a {@link WebElement}, or a promise that will resolve - * to a WebElement. If the returned promise resolves to an array of - * WebElements, WebDriver will use the first element. For example, to find the - * first visible link on a page, you could write: - * - * var link = driver.findElement(firstVisibleLink); - * - * function firstVisibleLink(driver) { - * var links = driver.findElements(By.tagName('a')); - * return promise.filter(links, function(link) { - * return link.isDisplayed(); - * }); - * } - * - * @param {!(by.By|Function)} locator The locator to use. - * @return {!WebElementPromise} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator: Locator): WebElementPromise; - - /** - * Schedule a command to search for multiple elements on the page. - * - * @param {!(by.By|Function)} locator The locator to use. - * @return {!promise.Promise.>} A - * promise that will resolve to an array of WebElements. - */ - findElements(locator: Locator): promise.Promise; - - /** - * Schedule a command to take a screenshot. The driver makes a best effort to - * return a screenshot of the following, in order of preference: - * - * 1. Entire page - * 2. Current window - * 3. Visible portion of the current frame - * 4. The entire display containing the browser - * - * @return {!promise.Promise} A promise that will be - * resolved to the screenshot as a base-64 encoded PNG. - */ - takeScreenshot(): promise.Promise; - - /** - * @return {!Options} The options interface for this - * instance. - */ - manage(): Options; - - /** - * @return {!Navigation} The navigation interface for this - * instance. - */ - navigate(): Navigation; - - /** - * @return {!TargetLocator} The target locator interface for - * this instance. - */ - switchTo(): TargetLocator; - - // endregion -} - -/** - * A thenable wrapper around a {@linkplain webdriver.IWebDriver IWebDriver} - * instance that allows commands to be issued directly instead of having to - * repeatedly call `then`: - * - * let driver = new Builder().build(); - * driver.then(d => d.get(url)); // You can do this... - * driver.get(url); // ...or this - * - * If the driver instance fails to resolve (e.g. the session cannot be created), - * every issued command will fail. - * - * @interface - */ -export interface ThenableWebDriver extends WebDriver, promise.IThenable {} - -export interface IWebElementId { - [ELEMENT: string]: string; -} - -/** - * Represents a DOM element. WebElements can be found by searching from the - * document root using a {@code WebDriver} instance, or by searching - * under another {@code WebElement}: - *

    
    - *   driver.get('http://www.google.com');
    - *   var searchForm = driver.findElement(By.tagName('form'));
    - *   var searchBox = searchForm.findElement(By.name('q'));
    - *   searchBox.sendKeys('webdriver');
    - * 
    - * - * The WebElement is implemented as a promise for compatibility with the promise - * API. It will always resolve itself when its internal state has been fully - * resolved and commands may be issued against the element. This can be used to - * catch errors when an element cannot be located on the page: - *
    
    - *   driver.findElement(By.id('not-there')).then(function(element) {
    - *     alert('Found an element that was not expected to be there!');
    - *   }, function(error) {
    - *     alert('The element was not found, as expected');
    - *   });
    - * 
    - */ -export interface IWebElement { - // region Methods - - /** - * Schedules a command to click on this element. - * @return {!promise.Promise} A promise that will be resolved when - * the click command has completed. - */ - click(): promise.Promise; - - /** - * Schedules a command to type a sequence on the DOM element represented by - * this instance. - * - * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is - * processed in the key sequence, that key state is toggled until one of the - * following occurs: - * - * - The modifier key is encountered again in the sequence. At this point the - * state of the key is toggled (along with the appropriate keyup/down - * events). - * - The {@link input.Key.NULL} key is encountered in the sequence. When - * this key is encountered, all modifier keys current in the down state are - * released (with accompanying keyup events). The NULL key can be used to - * simulate common keyboard shortcuts: - * - * element.sendKeys('text was', - * Key.CONTROL, 'a', Key.NULL, - * 'now text is'); - * // Alternatively: - * element.sendKeys('text was', - * Key.chord(Key.CONTROL, 'a'), - * 'now text is'); - * - * - The end of the key sequence is encountered. When there are no more keys - * to type, all depressed modifier keys are released (with accompanying - * keyup events). - * - * If this element is a file input ({@code }), the - * specified key sequence should specify the path to the file to attach to - * the element. This is analogous to the user clicking 'Browse...' and entering - * the path into the file select dialog. - * - * var form = driver.findElement(By.css('form')); - * var element = form.findElement(By.css('input[type=file]')); - * element.sendKeys('/path/to/file.txt'); - * form.submit(); - * - * For uploads to function correctly, the entered path must reference a file - * on the _browser's_ machine, not the local machine running this script. When - * running against a remote Selenium server, a {@link input.FileDetector} - * may be used to transparently copy files to the remote machine before - * attempting to upload them in the browser. - * - * __Note:__ On browsers where native keyboard events are not supported - * (e.g. Firefox on OS X), key events will be synthesized. Special - * punctuation keys will be synthesized according to a standard QWERTY en-us - * keyboard layout. - * - * @param {...(number|string|!IThenable<(number|string)>)} var_args The - * sequence of keys to type. Number keys may be referenced numerically or - * by string (1 or '1'). All arguments will be joined into a single - * sequence. - * @return {!promise.Promise} A promise that will be resolved when all - * keys have been typed. - */ - sendKeys(...var_args: Array>): promise.Promise; - - /** - * Schedules a command to query for the tag/node name of this element. - * @return {!promise.Promise} A promise that will be resolved with the - * element's tag name. - */ - getTagName(): promise.Promise; - - /** - * Schedules a command to query for the computed style of the element - * represented by this instance. If the element inherits the named style from - * its parent, the parent will be queried for its value. Where possible, color - * values will be converted to their hex representation (e.g. #00ff00 instead of - * rgb(0, 255, 0)). - *

    - * Warning: the value returned will be as the browser interprets it, so - * it may be tricky to form a proper assertion. - * - * @param {string} cssStyleProperty The name of the CSS style property to look - * up. - * @return {!promise.Promise} A promise that will be resolved with the - * requested CSS value. - */ - getCssValue(cssStyleProperty: string): promise.Promise; - - /** - * Schedules a command to query for the value of the given attribute of the - * element. Will return the current value even if it has been modified after the - * page has been loaded. More exactly, this method will return the value of the - * given attribute, unless that attribute is not present, in which case the - * value of the property with the same name is returned. If neither value is - * set, null is returned. The 'style' attribute is converted as best can be to a - * text representation with a trailing semi-colon. The following are deemed to - * be 'boolean' attributes and will be returned as thus: - * - *

    async, autofocus, autoplay, checked, compact, complete, controls, declare, - * defaultchecked, defaultselected, defer, disabled, draggable, ended, - * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, - * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, - * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, - * selected, spellcheck, truespeed, willvalidate - * - *

    Finally, the following commonly mis-capitalized attribute/property names - * are evaluated as expected: - *

      - *
    • 'class' - *
    • 'readonly' - *
    - * @param {string} attributeName The name of the attribute to query. - * @return {!promise.Promise} A promise that will be resolved with the - * attribute's value. - */ - getAttribute(attributeName: string): promise.Promise; - - /** - * Get the visible (i.e. not hidden by CSS) innerText of this element, including - * sub-elements, without any leading or trailing whitespace. - * @return {!promise.Promise} A promise that will be resolved with the - * element's visible text. - */ - getText(): promise.Promise; - - /** - * Schedules a command to compute the size of this element's bounding box, in - * pixels. - * @return {!promise.Promise} A promise that will be resolved with the - * element's size as a {@code {width:number, height:number}} object. - */ - getSize(): promise.Promise; - - /** - * Schedules a command to compute the location of this element in page space. - * @return {!promise.Promise} A promise that will be resolved to the - * element's location as a {@code {x:number, y:number}} object. - */ - getLocation(): promise.Promise; - - /** - * Schedules a command to query whether the DOM element represented by this - * instance is enabled, as dicted by the {@code disabled} attribute. - * @return {!promise.Promise} A promise that will be resolved with - * whether this element is currently enabled. - */ - isEnabled(): promise.Promise; - - /** - * Schedules a command to query whether this element is selected. - * @return {!promise.Promise} A promise that will be resolved with - * whether this element is currently selected. - */ - isSelected(): promise.Promise; - - /** - * Schedules a command to submit the form containing this element (or this - * element if it is a FORM element). This command is a no-op if the element is - * not contained in a form. - * @return {!promise.Promise} A promise that will be resolved when - * the form has been submitted. - */ - submit(): promise.Promise; - - /** - * Schedules a command to clear the {@code value} of this element. This command - * has no effect if the underlying DOM element is neither a text INPUT element - * nor a TEXTAREA element. - * @return {!promise.Promise} A promise that will be resolved when - * the element has been cleared. - */ - clear(): promise.Promise; - - /** - * Schedules a command to test whether this element is currently displayed. - * @return {!promise.Promise} A promise that will be resolved with - * whether this element is currently visible on the page. - */ - isDisplayed(): promise.Promise; - - /** - * @return {!promise.Promise.} A promise - * that resolves to this element's JSON representation as defined by the - * WebDriver wire protocol. - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ - getId(): promise.Promise; - - // endregion -} - -export interface IWebElementFinders { - /** - * Schedule a command to find a descendant of this element. If the element - * cannot be found, a {@code bot.ErrorCode.NO_SUCH_ELEMENT} result will - * be returned by the driver. Unlike other commands, this error cannot be - * suppressed. In other words, scheduling a command to find an element doubles - * as an assert that the element is present on the page. To test whether an - * element is present on the page, use {@code #findElements}. - * - *

    The search criteria for an element may be defined using one of the - * factories in the {@link By} namespace, or as a short-hand - * {@link By.Hash} object. For example, the following two statements - * are equivalent: - *

    -     * var e1 = element.findElement(By.id('foo'));
    -     * var e2 = element.findElement({id:'foo'});
    -     * 
    - * - *

    You may also provide a custom locator function, which takes as input - * this WebDriver instance and returns a {@link WebElement}, or a - * promise that will resolve to a WebElement. For example, to find the first - * visible link on a page, you could write: - *

    -     * var link = element.findElement(firstVisibleLink);
    -     *
    -     * function firstVisibleLink(element) {
    -     *   var links = element.findElements(By.tagName('a'));
    -     *   return promise.filter(links, function(link) {
    -     *     return links.isDisplayed();
    -     *   }).then(function(visibleLinks) {
    -     *     return visibleLinks[0];
    -     *   });
    -     * }
    -     * 
    - * - * @param {!(Locator|By.Hash|Function)} locator The - * locator strategy to use when searching for the element. - * @return {!WebElement} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator: Locator): WebElementPromise; - - /** - * Schedules a command to find all of the descendants of this element that - * match the given search criteria. - * - * @param {!(Locator|By.Hash|Function)} locator The - * locator strategy to use when searching for the elements. - * @return {!promise.Promise.>} A - * promise that will resolve to an array of WebElements. - */ - findElements(locator: Locator): promise.Promise; -} - -/** - * Defines an object that can be asynchronously serialized to its WebDriver - * wire representation. - * - * @template T - */ -export interface Serializable { - /** - * Returns either this instance's serialized represention, if immediately - * available, or a promise for its serialized representation. This function is - * conceptually equivalent to objects that have a {@code toJSON()} property, - * except the serialize() result may be a promise or an object containing a - * promise (which are not directly JSON friendly). - * - * @return {!(T|IThenable.)} This instance's serialized wire format. - */ - serialize(): T | promise.IThenable; -} - -/** - * Represents a DOM element. WebElements can be found by searching from the - * document root using a {@link WebDriver} instance, or by searching - * under another WebElement: - * - * driver.get('http://www.google.com'); - * var searchForm = driver.findElement(By.tagName('form')); - * var searchBox = searchForm.findElement(By.name('q')); - * searchBox.sendKeys('webdriver'); - * - * The WebElement is implemented as a promise for compatibility with the promise - * API. It will always resolve itself when its internal state has been fully - * resolved and commands may be issued against the element. This can be used to - * catch errors when an element cannot be located on the page: - * - * driver.findElement(By.id('not-there')).then(function(element) { - * alert('Found an element that was not expected to be there!'); - * }, function(error) { - * alert('The element was not found, as expected'); - * }); - */ -export class WebElement implements Serializable { - /** - * @param {!WebDriver} driver the parent WebDriver instance for this element. - * @param {(!IThenable|string)} id The server-assigned opaque ID for - * the underlying DOM element. - */ - constructor(driver: WebDriver, id: promise.Promise | string); - - /** - * @param {string} id The raw ID. - * @param {boolean=} opt_noLegacy Whether to exclude the legacy element key. - * @return {!Object} The element ID for use with WebDriver's wire protocol. - */ - static buildId(id: string, opt_noLegacy?: boolean): Object; - - /** - * Extracts the encoded WebElement ID from the object. - * - * @param {?} obj The object to extract the ID from. - * @return {string} the extracted ID. - * @throws {TypeError} if the object is not a valid encoded ID. - */ - static extractId(obj: IWebElementId): string; - - /** - * @param {?} obj the object to test. - * @return {boolean} whether the object is a valid encoded WebElement ID. - */ - static isId(obj: IWebElementId): boolean; - - /** - * Compares two WebElements for equality. - * - * @param {!WebElement} a A WebElement. - * @param {!WebElement} b A WebElement. - * @return {!promise.Promise} A promise that will be - * resolved to whether the two WebElements are equal. - */ - static equals(a: WebElement, b: WebElement): promise.Promise; - - /** - * @return {!WebDriver} The parent driver for this instance. - */ - getDriver(): WebDriver; - - /** - * @return {!promise.Promise} A promise that resolves to - * the server-assigned opaque ID assigned to this element. - */ - getId(): promise.Promise; - - /** - * Schedule a command to find a descendant of this element. If the element - * cannot be found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will - * be returned by the driver. Unlike other commands, this error cannot be - * suppressed. In other words, scheduling a command to find an element doubles - * as an assert that the element is present on the page. To test whether an - * element is present on the page, use {@link #findElements}. - * - * The search criteria for an element may be defined using one of the - * factories in the {@link By} namespace, or as a short-hand - * {@link By.Hash} object. For example, the following two statements - * are equivalent: - * - * var e1 = element.findElement(By.id('foo')); - * var e2 = element.findElement({id:'foo'}); - * - * You may also provide a custom locator function, which takes as input - * this WebDriver instance and returns a {@link WebElement}, or a - * promise that will resolve to a WebElement. For example, to find the first - * visible link on a page, you could write: - * - * var link = element.findElement(firstVisibleLink); - * - * function firstVisibleLink(element) { - * var links = element.findElements(By.tagName('a')); - * return promise.filter(links, function(link) { - * return links.isDisplayed(); - * }).then(function(visibleLinks) { - * return visibleLinks[0]; - * }); - * } - * - * @param {!(by.By|Function)} locator The locator strategy to use when - * searching for the element. - * @return {!WebElementPromise} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator: Locator): WebElementPromise; - - /** - * Schedules a command to find all of the descendants of this element that - * match the given search criteria. - * - * @param {!(by.By|Function)} locator The locator strategy to use when - * searching for the element. - * @return {!promise.Promise>} A - * promise that will resolve to an array of WebElements. - */ - findElements(locator: Locator): promise.Promise; - - /** - * Schedules a command to click on this element. - * @return {!promise.Promise.} A promise that will be resolved - * when the click command has completed. - */ - click(): promise.Promise; - - /** - * Schedules a command to type a sequence on the DOM element represented by this - * promsieinstance. - * - * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is - * processed in the keysequence, that key state is toggled until one of the - * following occurs: - * - * - The modifier key is encountered again in the sequence. At this point the - * state of the key is toggled (along with the appropriate keyup/down events). - * - The {@link Key.NULL} key is encountered in the sequence. When - * this key is encountered, all modifier keys current in the down state are - * released (with accompanying keyup events). The NULL key can be used to - * simulate common keyboard shortcuts: - * - * element.sendKeys('text was', - * Key.CONTROL, 'a', Key.NULL, - * 'now text is'); - * // Alternatively: - * element.sendKeys('text was', - * Key.chord(Key.CONTROL, 'a'), - * 'now text is'); - * - * - The end of the keysequence is encountered. When there are no more keys - * to type, all depressed modifier keys are released (with accompanying keyup - * events). - * - * If this element is a file input ({@code }), the - * specified key sequence should specify the path to the file to attach to - * the element. This is analgous to the user clicking 'Browse...' and entering - * the path into the file select dialog. - * - * var form = driver.findElement(By.css('form')); - * var element = form.findElement(By.css('input[type=file]')); - * element.sendKeys('/path/to/file.txt'); - * form.submit(); - * - * For uploads to function correctly, the entered path must reference a file - * on the _browser's_ machine, not the local machine running this script. When - * running against a remote Selenium server, a {@link FileDetector} - * may be used to transparently copy files to the remote machine before - * attempting to upload them in the browser. - * - * __Note:__ On browsers where native keyboard events are not supported - * (e.g. Firefox on OS X), key events will be synthesized. Special - * punctionation keys will be synthesized according to a standard QWERTY en-us - * keyboard layout. - * - * @param {...(string|!promise.Promise)} var_args The sequence - * of keys to type. All arguments will be joined into a single sequence. - * @return {!promise.Promise.} A promise that will be resolved - * when all keys have been typed. - */ - sendKeys(...var_args: Array>): promise.Promise; - - /** - * Schedules a command to query for the tag/node name of this element. - * @return {!promise.Promise.} A promise that will be - * resolved with the element's tag name. - */ - getTagName(): promise.Promise; - - /** - * Schedules a command to query for the computed style of the element - * represented by this instance. If the element inherits the named style from - * its parent, the parent will be queried for its value. Where possible, color - * values will be converted to their hex representation (e.g. #00ff00 instead of - * rgb(0, 255, 0)). - * - * _Warning:_ the value returned will be as the browser interprets it, so - * it may be tricky to form a proper assertion. - * - * @param {string} cssStyleProperty The name of the CSS style property to look - * up. - * @return {!promise.Promise} A promise that will be - * resolved with the requested CSS value. - */ - getCssValue(cssStyleProperty: string): promise.Promise; - - /** - * Schedules a command to query for the value of the given attribute of the - * element. Will return the current value, even if it has been modified after - * the page has been loaded. More exactly, this method will return the value of - * the given attribute, unless that attribute is not present, in which case the - * value of the property with the same name is returned. If neither value is - * set, null is returned (for example, the 'value' property of a textarea - * element). The 'style' attribute is converted as best can be to a - * text representation with a trailing semi-colon. The following are deemed to - * be 'boolean' attributes and will return either 'true' or null: - * - * async, autofocus, autoplay, checked, compact, complete, controls, declare, - * defaultchecked, defaultselected, defer, disabled, draggable, ended, - * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, - * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, - * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, - * selected, spellcheck, truespeed, willvalidate - * - * Finally, the following commonly mis-capitalized attribute/property names - * are evaluated as expected: - * - * - 'class' - * - 'readonly' - * - * @param {string} attributeName The name of the attribute to query. - * @return {!promise.Promise.} A promise that will be - * resolved with the attribute's value. The returned value will always be - * either a string or null. - */ - getAttribute(attributeName: string): promise.Promise; - - /** - * Get the visible (i.e. not hidden by CSS) innerText of this element, including - * sub-elements, without any leading or trailing whitespace. - * @return {!promise.Promise.} A promise that will be - * resolved with the element's visible text. - */ - getText(): promise.Promise; - - /** - * Schedules a command to compute the size of this element's bounding box, in - * pixels. - * @return {!promise.Promise.<{width: number, height: number}>} A - * promise that will be resolved with the element's size as a - * {@code {width:number, height:number}} object. - */ - getSize(): promise.Promise; - - /** - * Schedules a command to compute the location of this element in page space. - * @return {!promise.Promise.<{x: number, y: number}>} A promise that - * will be resolved to the element's location as a - * {@code {x:number, y:number}} object. - */ - getLocation(): promise.Promise; - - /** - * Schedules a command to query whether the DOM element represented by this - * instance is enabled, as dicted by the {@code disabled} attribute. - * @return {!promise.Promise.} A promise that will be - * resolved with whether this element is currently enabled. - */ - isEnabled(): promise.Promise; - - /** - * Schedules a command to query whether this element is selected. - * @return {!promise.Promise.} A promise that will be - * resolved with whether this element is currently selected. - */ - isSelected(): promise.Promise; - - /** - * Schedules a command to submit the form containing this element (or this - * element if it is a FORM element). This command is a no-op if the element is - * not contained in a form. - * @return {!promise.Promise.} A promise that will be resolved - * when the form has been submitted. - */ - submit(): promise.Promise; - - /** - * Schedules a command to clear the `value` of this element. This command has - * no effect if the underlying DOM element is neither a text INPUT element - * nor a TEXTAREA element. - * @return {!promise.Promise} A promise that will be resolved - * when the element has been cleared. - */ - clear(): promise.Promise; - - /** - * Schedules a command to test whether this element is currently displayed. - * @return {!promise.Promise.} A promise that will be - * resolved with whether this element is currently visible on the page. - */ - isDisplayed(): promise.Promise; - - /** - * Take a screenshot of the visible region encompassed by this element's - * bounding rectangle. - * - * @param {boolean=} opt_scroll Optional argument that indicates whether the - * element should be scrolled into view before taking a screenshot. - * Defaults to false. - * @return {!promise.Promise} A promise that will be - * resolved to the screenshot as a base-64 encoded PNG. - */ - takeScreenshot(opt_scroll?: boolean): promise.Promise; - - /** @override */ - serialize(): promise.Promise; -} - -/** - * WebElementPromise is a promise that will be fulfilled with a WebElement. - * This serves as a forward proxy on WebElement, allowing calls to be - * scheduled without directly on this instance before the underlying - * WebElement has been fulfilled. In other words, the following two statements - * are equivalent: - *
    
    - *     driver.findElement({id: 'my-button'}).click();
    - *     driver.findElement({id: 'my-button'}).then(function(el) {
    - *       return el.click();
    - *     });
    - * 
    - * - * @param {!WebDriver} driver The parent WebDriver instance for this - * element. - * @param {!promise.Promise.} el A promise - * that will resolve to the promised element. - * @final - */ -export interface WebElementPromise extends promise.IThenable {} -export class WebElementPromise extends WebElement { - /** - * @param {!WebDriver} driver The parent WebDriver instance for this - * element. - * @param {!promise.Promise} el A promise - * that will resolve to the promised element. - */ - constructor(driver: WebDriver, el: promise.Promise); -} - -/** - * Contains information about a WebDriver session. - */ -export class Session { - // region Constructors - - /** - * @param {string} id The session ID. - * @param {!(Object|Capabilities)} capabilities The session - * capabilities. - */ - constructor(id: string, capabilities: Capabilities | Object); - - // endregion - - // region Methods - - /** - * @return {string} This session's ID. - */ - getId(): string; - - /** - * @return {!Capabilities} This session's capabilities. - */ - getCapabilities(): Capabilities; - - /** - * Retrieves the value of a specific capability. - * @param {string} key The capability to retrieve. - * @return {*} The capability value. - */ - getCapability(key: string): any; - - /** - * Returns the JSON representation of this object, which is just the string - * session ID. - * @return {string} The JSON representation of this Session. - */ - toJSON(): string; - - // endregion -} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts deleted file mode 100644 index 7999e0ae..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/opera.d.ts +++ /dev/null @@ -1,180 +0,0 @@ -import * as webdriver from "./index"; -import * as remote from "./remote"; - -/** - * Creates {@link remote.DriverService} instances that manages an - * [OperaDriver](https://github.com/operasoftware/operachromiumdriver) - * server in a child process. - */ -export class ServiceBuilder { - /** - * @param {string=} opt_exe Path to the server executable to use. If omitted, - * the builder will attempt to locate the operadriver on the current - * PATH. - * @throws {Error} If provided executable does not exist, or the operadriver - * cannot be found on the PATH. - */ - constructor(opt_exe?: string); - - /** - * Sets the port to start the OperaDriver on. - * @param {number} port The port to use, or 0 for any free port. - * @return {!ServiceBuilder} A self reference. - * @throws {Error} If the port is invalid. - */ - usingPort(port: number): ServiceBuilder; - - /** - * Sets the path of the log file the driver should log to. If a log file is - * not specified, the driver will log to stderr. - * @param {string} path Path of the log file to use. - * @return {!ServiceBuilder} A self reference. - */ - loggingTo(path: string): ServiceBuilder; - - /** - * Enables verbose logging. - * @return {!ServiceBuilder} A self reference. - */ - enableVerboseLogging(): ServiceBuilder; - - /** - * Silence sthe drivers output. - * @return {!ServiceBuilder} A self reference. - */ - silent(): ServiceBuilder; - - /** - * Defines the stdio configuration for the driver service. See - * {@code child_process.spawn} for more information. - * @param {(string|!Array)} - * config The configuration to use. - * @return {!ServiceBuilder} A self reference. - */ - setStdio(config: string | Array): ServiceBuilder; - - /** - * Defines the environment to start the server under. This settings will be - * inherited by every browser session started by the server. - * @param {!Object.} env The environment to use. - * @return {!ServiceBuilder} A self reference. - */ - withEnvironment(env: Object): ServiceBuilder; - - /** - * Creates a new DriverService using this instance's current configuration. - * @return {!remote.DriverService} A new driver service using this instance's - * current configuration. - * @throws {Error} If the driver exectuable was not specified and a default - * could not be found on the current PATH. - */ - build(): remote.DriverService; -} - -/** - * Sets the default service to use for new OperaDriver instances. - * @param {!remote.DriverService} service The service to use. - * @throws {Error} If the default service is currently running. - */ -export function setDefaultService(service: remote.DriverService): any; - -/** - * Returns the default OperaDriver service. If such a service has not been - * configured, one will be constructed using the default configuration for - * a OperaDriver executable found on the system PATH. - * @return {!remote.DriverService} The default OperaDriver service. - */ -export function getDefaultService(): remote.DriverService; - -/** - * Class for managing {@linkplain Driver OperaDriver} specific options. - */ -export class Options { - /** - * Extracts the OperaDriver specific options from the given capabilities - * object. - * @param {!capabilities.Capabilities} caps The capabilities object. - * @return {!Options} The OperaDriver options. - */ - static fromCapabilities(caps: webdriver.Capabilities): Options; - - /** - * Add additional command line arguments to use when launching the Opera - * browser. Each argument may be specified with or without the '--' prefix - * (e.g. '--foo' and 'foo'). Arguments with an associated value should be - * delimited by an '=': 'foo=bar'. - * @param {...(string|!Array.)} var_args The arguments to add. - * @return {!Options} A self reference. - */ - addArguments(...var_args: string[]): Options; - - /** - * Add additional extensions to install when launching Opera. Each extension - * should be specified as the path to the packed CRX file, or a Buffer for an - * extension. - * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The - * extensions to add. - * @return {!Options} A self reference. - */ - addExtensions(...var_args: any[]): Options; - - /** - * Sets the path to the Opera binary to use. On Mac OS X, this path should - * reference the actual Opera executable, not just the application binary. The - * binary path be absolute or relative to the operadriver server executable, but - * it must exist on the machine that will launch Opera. - * - * @param {string} path The path to the Opera binary to use. - * @return {!Options} A self reference. - */ - setOperaBinaryPath(path: string): Options; - - /** - * Sets the logging preferences for the new session. - * @param {!./lib/logging.Preferences} prefs The logging preferences. - * @return {!Options} A self reference. - */ - setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; - - /** - * Sets the proxy settings for the new session. - * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy: webdriver.ProxyConfig): Options; - - /** - * Converts this options instance to a {@link capabilities.Capabilities} - * object. - * @param {capabilities.Capabilities=} opt_capabilities The capabilities to - * merge these options into, if any. - * @return {!capabilities.Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; -} - -export class Driver extends webdriver.WebDriver { - /** - * Creates a new session for Opera. - * - * @param {(capabilities.Capabilities|Options)=} opt_config The configuration - * options. - * @param {remote.DriverService=} opt_service The session to use; will use - * the {@link getDefaultService default service} by default. - * @param {promise.ControlFlow=} opt_flow The control flow to use, - * or {@code null} to use the currently active flow. - * @return {!Driver} A new driver instance. - */ - static createSession( - opt_config?: webdriver.Capabilities | Options, - opt_service?: remote.DriverService, - opt_flow?: webdriver.promise.ControlFlow, - ): Driver; - - /** - * This function is a no-op as file detectors are not supported by this - * implementation. - * @override - */ - setFileDetector(): void; -} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/package.json b/test-eol-project/node_modules/@types/selenium-webdriver/package.json deleted file mode 100644 index 55d34aec..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@types/selenium-webdriver", - "version": "3.0.26", - "description": "TypeScript definitions for selenium-webdriver", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver", - "license": "MIT", - "contributors": [ - { - "name": "Bill Armstrong", - "githubUsername": "BillArmstrong", - "url": "https://github.com/BillArmstrong" - }, - { - "name": "Yuki Kokubun", - "githubUsername": "Kuniwak", - "url": "https://github.com/Kuniwak" - }, - { - "name": "Craig Nishina", - "githubUsername": "cnishina", - "url": "https://github.com/cnishina" - }, - { - "name": "Simon Gellis", - "githubUsername": "SupernaviX", - "url": "https://github.com/SupernaviX" - }, - { - "name": "Ben Dixon", - "githubUsername": "bendxn", - "url": "https://github.com/bendxn" - }, - { - "name": "Ziyu", - "githubUsername": "oddui", - "url": "https://github.com/oddui" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/selenium-webdriver" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "fa3688820548519d3250cc924949bca3d2ac35c1e6219dfa95a7a76f77eeabe8", - "typeScriptVersion": "4.5" -} \ No newline at end of file diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts deleted file mode 100644 index 14f3fa1b..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/remote.d.ts +++ /dev/null @@ -1,239 +0,0 @@ -import * as webdriver from "./index"; - -/** - * A record object that defines the configuration options for a DriverService - * instance. - * - * @record - */ -export interface ServiceOptions {} - -/** - * Manages the life and death of a native executable WebDriver server. - * - * It is expected that the driver server implements the - * https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. - * Furthermore, the managed server should support multiple concurrent sessions, - * so that this class may be reused for multiple clients. - */ -export class DriverService { - /** - * @param {string} executable Path to the executable to run. - * @param {!ServiceOptions} options Configuration options for the service. - */ - constructor(executable: string, options: ServiceOptions); - - /** - * @return {!promise.Promise} A promise that resolves to - * the server's address. - * @throws {Error} If the server has not been started. - */ - address(): webdriver.promise.Promise; - - /** - * Returns whether the underlying process is still running. This does not take - * into account whether the process is in the process of shutting down. - * @return {boolean} Whether the underlying service process is running. - */ - isRunning(): boolean; - - /** - * Starts the server if it is not already running. - * @param {number=} opt_timeoutMs How long to wait, in milliseconds, for the - * server to start accepting requests. Defaults to 30 seconds. - * @return {!promise.Promise} A promise that will resolve - * to the server's base URL when it has started accepting requests. If the - * timeout expires before the server has started, the promise will be - * rejected. - */ - start(opt_timeoutMs?: number): webdriver.promise.Promise; - - /** - * Stops the service if it is not currently running. This function will kill - * the server immediately. To synchronize with the active control flow, use - * {@link #stop()}. - * @return {!promise.Promise} A promise that will be resolved when - * the server has been stopped. - */ - kill(): webdriver.promise.Promise; - - /** - * Schedules a task in the current control flow to stop the server if it is - * currently running. - * @return {!promise.Promise} A promise that will be resolved when - * the server has been stopped. - */ - stop(): webdriver.promise.Promise; -} - -export namespace DriverService { - /** - * Creates {@link DriverService} objects that manage a WebDriver server in a - * child process. - */ - class Builder { - /** - * @param {string} exe Path to the executable to use. This executable must - * accept the `--port` flag for defining the port to start the server on. - * @throws {Error} If the provided executable path does not exist. - */ - constructor(exe: string); - - /** - * Define additional command line arguments to use when starting the server. - * - * @param {...CommandLineFlag} var_args The arguments to include. - * @return {!THIS} A self reference. - * @template THIS - */ - addArguments(...var_args: string[]): this; - - /** - * Sets the host name to access the server on. If specified, the - * {@linkplain #setLoopback() loopback} setting will be ignored. - * - * @param {string} hostname - * @return {!DriverService.Builder} A self reference. - */ - setHostname(hostname: string): this; - - /** - * Sets whether the service should be accessed at this host's loopback - * address. - * - * @param {boolean} loopback - * @return {!DriverService.Builder} A self reference. - */ - setLoopback(loopback: boolean): this; - - /** - * Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). - * By default, the driver will accept commands relative to "/". - * - * @param {?string} basePath The base path to use, or `null` to use the - * default. - * @return {!DriverService.Builder} A self reference. - */ - setPath(basePath: string | null): this; - - /** - * Sets the port to start the server on. - * - * @param {number} port The port to use, or 0 for any free port. - * @return {!DriverService.Builder} A self reference. - * @throws {Error} If an invalid port is specified. - */ - setPort(port: number): this; - - /** - * Defines the environment to start the server under. This setting will be - * inherited by every browser session started by the server. By default, the - * server will inherit the enviroment of the current process. - * - * @param {(Map|Object|null)} env The desired - * environment to use, or `null` if the server should inherit the - * current environment. - * @return {!DriverService.Builder} A self reference. - */ - setEnvironment(env: Map | { [name: string]: string } | null): this; - - /** - * IO configuration for the spawned server process. For more information, - * refer to the documentation of `child_process.spawn`. - * - * @param {StdIoOptions} config The desired IO configuration. - * @return {!DriverService.Builder} A self reference. - * @see https://nodejs.org/dist/latest-v4.x/docs/api/child_process.html#child_process_options_stdio - */ - setStdio(config: any): this; - - /** - * Creates a new DriverService using this instance's current configuration. - * - * @return {!DriverService} A new driver service. - */ - build(): DriverService; - } -} - -/** - * Manages the life and death of the - * - * standalone Selenium server. - */ -export class SeleniumServer extends DriverService { - /** - * @param {string} jar Path to the Selenium server jar. - * @param {SeleniumServer.Options=} opt_options Configuration options for the - * server. - * @throws {Error} If the path to the Selenium jar is not specified or if an - * invalid port is specified. - */ - constructor(jar: string, opt_options?: SeleniumServer.Options); -} - -export namespace SeleniumServer { - /** - * Options for the Selenium server - */ - interface Options { - /** Whether the server should only be accessed on this host's loopback address.*/ - loopback?: boolean | undefined; - - /** The port to start the server on (must be > 0). If the port is provided - as a promise, the service will wait for the promise to resolve before starting. */ - port?: number | webdriver.promise.IThenable | undefined; - - /** The arguments to pass to the service. If a promise is provided, the - service will wait for it to resolve before starting. */ - args?: string[] | webdriver.promise.IThenable | undefined; - - /** The arguments to pass to the JVM. If a promise is provided, the service - will wait for it to resolve before starting. */ - jvmArgs?: string[] | webdriver.promise.IThenable | undefined; - - /** The environment variables that should be visible to the server process. - Defaults to inheriting the current process's environment.*/ - env?: { [key: string]: string } | undefined; - - /** IO configuration for the spawned server process. For more information, - refer to the documentation of `child_process.spawn`*/ - stdio?: string | Array | undefined; - } -} - -/** - * A {@link webdriver.FileDetector} that may be used when running - * against a remote - * [Selenium server](http://selenium-release.storage.googleapis.com/index.html). - * - * When a file path on the local machine running this script is entered with - * {@link webdriver.WebElement#sendKeys WebElement#sendKeys}, this file detector - * will transfer the specified file to the Selenium server's host; the sendKeys - * command will be updated to use the transfered file's path. - * - * __Note:__ This class depends on a non-standard command supported on the - * Java Selenium server. The file detector will fail if used with a server that - * only supports standard WebDriver commands (such as the ChromeDriver). - * - * @final - */ -export class FileDetector extends webdriver.FileDetector { - /** */ - constructor(); - - /** - * Prepares a `file` for use with the remote browser. If the provided path - * does not reference a normal file (i.e. it does not exist or is a - * directory), then the promise returned by this method will be resolved with - * the original file path. Otherwise, this method will upload the file to the - * remote server, which will return the file's path on the remote system so - * it may be referenced in subsequent commands. - * - * @param {!webdriver.WebDriver} driver The driver for the current browser. - * @param {string} file The path of the file to process. - * @return {!webdriver.promise.Promise} A promise for the processed - * file path. - */ - handleFile(driver: webdriver.WebDriver, file: string): webdriver.promise.Promise; -} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts deleted file mode 100644 index 3e9ab602..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/safari.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import * as webdriver from "./index"; - -export class Server {} - -/** - * @return {!Promise} A promise that will resolve with the path - * to Safari on the current system. - */ -export function findSafariExecutable(): any; - -/** - * @param {string} serverUrl The URL to connect to. - * @return {!Promise} A promise for the path to a file that Safari can - * open on start-up to trigger a new connection to the WebSocket server. - */ -export function createConnectFile(serverUrl: string): any; - -/** - * Deletes all session data files if so desired. - * @param {!Object} desiredCapabilities . - * @return {!Array} A list of promises for the deleted files. - */ -export function cleanSession(desiredCapabilities: webdriver.Capabilities): any[]; - -/** @return {string} . */ -export function getRandomString(): string; - -/** */ -export class CommandExecutor {} - -/** - * Configuration options specific to the {@link Driver SafariDriver}. - */ -export class Options { - /** - * Extracts the SafariDriver specific options from the given capabilities - * object. - * @param {!Capabilities} capabilities The capabilities object. - * @return {!Options} The ChromeDriver options. - */ - static fromCapabilities(capabilities: webdriver.Capabilities): Options; - - /** - * Sets whether to force Safari to start with a clean session. Enabling this - * option will cause all global browser data to be deleted. - * @param {boolean} clean Whether to make sure the session has no cookies, - * cache entries, local storage, or databases. - * @return {!Options} A self reference. - */ - setCleanSession(clean: boolean): Options; - - /** - * Sets the logging preferences for the new session. - * @param {!./lib/logging.Preferences} prefs The logging preferences. - * @return {!Options} A self reference. - */ - setLoggingPrefs(prefs: webdriver.logging.Preferences): Options; - - /** - * Converts this options instance to a {@link Capabilities} object. - * @param {Capabilities=} opt_capabilities The capabilities to - * merge these options into, if any. - * @return {!Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities?: webdriver.Capabilities): webdriver.Capabilities; -} - -/** - * A WebDriver client for Safari. This class should never be instantiated - * directly; instead, use the {@linkplain ./builder.Builder Builder}: - * - * var driver = new Builder() - * .forBrowser('safari') - * .build(); - */ -export class Driver extends webdriver.WebDriver { - /** - * Creates a new Safari session. - * - * @param {(Options|Capabilities)=} opt_config The configuration - * options for the new session. - * @param {promise.ControlFlow=} opt_flow The control flow to create - * the driver under. - * @return {!Driver} A new driver instance. - */ - static createSession( - opt_config?: Options | webdriver.Capabilities, - opt_flow?: webdriver.promise.ControlFlow, - ): Driver; -} diff --git a/test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts b/test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts deleted file mode 100644 index 3e267049..00000000 --- a/test-eol-project/node_modules/@types/selenium-webdriver/testing.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { promise } from "./index"; -import * as Testing from "./testing"; - -export const describe: { - /** - * Registers a new test suite. - * @param name The suite name. - * @param fn The suite function, or {@code undefined} to define a pending test suite. - */ - (name: string, fn: Function): void; - - /** - * An alias for {@link #describe()} that marks the suite as exclusive, - * suppressing all other test suites. - * @param {string} name The suite name. - * @param {function()=} opt_fn The suite function, or `undefined` to define - * a pending test suite. - */ - only(name: string, fn: Function): void; - - /** - * Defines a suppressed test suite. - * @param name The suite name. - * @param fn The suite function, or {@code undefined} to define a pending test suite. - */ - skip(name: string, fn: Function): void; -}; - -/** - * Defines a suppressed test suite. - * @param name The suite name. - * @param fn The suite function, or {@code undefined} to define a pending test suite. - */ -export function xdescribe(name: string, fn: Function): void; - -/** - * Register a function to call after the current suite finishes. - * @param fn - */ -export function after(fn: Function): void; - -/** - * Register a function to call after each test in a suite. - * @param fn - */ -export function afterEach(fn: Function): void; - -/** - * Register a function to call before the current suite starts. - * @param fn - */ -export function before(fn: Function): void; - -/** - * Register a function to call before each test in a suite. - * @param fn - */ -export function beforeEach(fn: Function): void; - -export const it: { - /** - * Add a test to the current suite. - * @param name The test name. - * @param fn The test function, or {@code undefined} to define a pending test case. - */ - (name: string, fn: Function): void; - - /** - * An alias for {@link #it()} that flags the test as the only one that should - * be run within the current suite. - * @param {string} name The test name. - * @param {function()=} opt_fn The test function, or `undefined` to define - * a pending test case. - */ - only(name: string, fn: Function): void; - - /** - * Adds a test to the current suite while suppressing it so it is not run. - * @param name The test name. - * @param fn The test function, or {@code undefined} to define a pending test case. - */ - skip(name: string, fn: Function): void; -}; - -/** - * Adds a test to the current suite while suppressing it so it is not run. - * @param name The test name. - * @param fn The test function, or {@code undefined} to define a pending test case. - */ -export function xit(name: string, fn: Function): void; - -/** - * @return {!promise.ControlFlow} the control flow instance used by this module - * to coordinate test actions. - */ -export function controlFlow(): promise.ControlFlow; - -/** - * Ignores the test chained to this function if the provided predicate returns - * true. - * @param {function(): boolean} predicateFn A predicate to call to determine - * if the test should be suppressed. This function MUST be synchronous. - * @return {!Object} An object with wrapped versions of {@link #it()} and - * {@link #describe()} that ignore tests as indicated by the predicate. - */ -export function ignore(predicateFn: () => boolean): typeof Testing; diff --git a/test-eol-project/node_modules/adm-zip/LICENSE b/test-eol-project/node_modules/adm-zip/LICENSE deleted file mode 100644 index f748c3de..00000000 --- a/test-eol-project/node_modules/adm-zip/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012 Another-D-Mention Software and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/test-eol-project/node_modules/adm-zip/README.md b/test-eol-project/node_modules/adm-zip/README.md deleted file mode 100644 index 61f62123..00000000 --- a/test-eol-project/node_modules/adm-zip/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# ADM-ZIP for NodeJS - -ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](https://nodejs.org/). - - - Build Status - - -# Installation - -With [npm](https://www.npmjs.com/) do: - - $ npm install adm-zip - -**Electron** file system support described below. - -## What is it good for? - -The library allows you to: - -- decompress zip files directly to disk or in memory buffers -- compress files and store them to disk in .zip format or in compressed buffers -- update content of/add new/delete files from an existing .zip - -# Dependencies - -There are no other nodeJS libraries that ADM-ZIP is dependent of - -# Examples - -## Basic usage - -```javascript -var AdmZip = require("adm-zip"); - -// reading archives -var zip = new AdmZip("./my_file.zip"); -var password = "1234567890"; -var zipEntries = zip.getEntries(); // an array of ZipEntry records - add password parameter if entries are password protected - -zipEntries.forEach(function (zipEntry) { - console.log(zipEntry.toString()); // outputs zip entries information - if (zipEntry.entryName == "my_file.txt") { - console.log(zipEntry.getData().toString("utf8")); - } -}); -// outputs the content of some_folder/my_file.txt -console.log(zip.readAsText("some_folder/my_file.txt")); -// extracts the specified file to the specified location -zip.extractEntryTo(/*entry name*/ "some_folder/my_file.txt", /*target path*/ "/home/me/tempfolder", /*maintainEntryPath*/ false, /*overwrite*/ true); -// extracts everything -zip.extractAllTo(/*target path*/ "/home/me/zipcontent/", /*overwrite*/ true); - -// creating archives -var zip = new AdmZip(); - -// add file directly -var content = "inner content of the file"; -zip.addFile("test.txt", Buffer.from(content, "utf8"), "entry comment goes here"); -// add local file -zip.addLocalFile("/home/me/some_picture.png"); -// get everything as a buffer -var willSendthis = zip.toBuffer(); -// or write everything to disk -zip.writeZip(/*target file name*/ "/home/me/files.zip"); - -// ... more examples in the wiki -``` - -For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). - -## Electron original-fs - -ADM-ZIP has supported electron **original-fs** for years without any user interractions but it causes problem with bundlers like rollup etc. For continuing support **original-fs** or any other custom file system module. There is possible specify your module by **fs** option in ADM-ZIP constructor. - -Example: - -```javascript -const AdmZip = require("adm-zip"); -const OriginalFs = require("original-fs"); - -// reading archives -const zip = new AdmZip("./my_file.zip", { fs: OriginalFs }); -. -. -. -``` diff --git a/test-eol-project/node_modules/adm-zip/adm-zip.js b/test-eol-project/node_modules/adm-zip/adm-zip.js deleted file mode 100644 index 31dddf2b..00000000 --- a/test-eol-project/node_modules/adm-zip/adm-zip.js +++ /dev/null @@ -1,949 +0,0 @@ -const Utils = require("./util"); -const pth = require("path"); -const ZipEntry = require("./zipEntry"); -const ZipFile = require("./zipFile"); - -const get_Bool = (...val) => Utils.findLast(val, (c) => typeof c === "boolean"); -const get_Str = (...val) => Utils.findLast(val, (c) => typeof c === "string"); -const get_Fun = (...val) => Utils.findLast(val, (c) => typeof c === "function"); - -const defaultOptions = { - // option "noSort" : if true it disables files sorting - noSort: false, - // read entries during load (initial loading may be slower) - readEntries: false, - // default method is none - method: Utils.Constants.NONE, - // file system - fs: null -}; - -module.exports = function (/**String*/ input, /** object */ options) { - let inBuffer = null; - - // create object based default options, allowing them to be overwritten - const opts = Object.assign(Object.create(null), defaultOptions); - - // test input variable - if (input && "object" === typeof input) { - // if value is not buffer we accept it to be object with options - if (!(input instanceof Uint8Array)) { - Object.assign(opts, input); - input = opts.input ? opts.input : undefined; - if (opts.input) delete opts.input; - } - - // if input is buffer - if (Buffer.isBuffer(input)) { - inBuffer = input; - opts.method = Utils.Constants.BUFFER; - input = undefined; - } - } - - // assign options - Object.assign(opts, options); - - // instanciate utils filesystem - const filetools = new Utils(opts); - - if (typeof opts.decoder !== "object" || typeof opts.decoder.encode !== "function" || typeof opts.decoder.decode !== "function") { - opts.decoder = Utils.decoder; - } - - // if input is file name we retrieve its content - if (input && "string" === typeof input) { - // load zip file - if (filetools.fs.existsSync(input)) { - opts.method = Utils.Constants.FILE; - opts.filename = input; - inBuffer = filetools.fs.readFileSync(input); - } else { - throw Utils.Errors.INVALID_FILENAME(); - } - } - - // create variable - const _zip = new ZipFile(inBuffer, opts); - - const { canonical, sanitize, zipnamefix } = Utils; - - function getEntry(/**Object*/ entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") item = _zip.getEntry(pth.posix.normalize(entry)); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && typeof entry.entryName !== "undefined" && typeof entry.header !== "undefined") item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - function fixPath(zipPath) { - const { join, normalize, sep } = pth.posix; - // convert windows file separators and normalize - return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep)); - } - - function filenameFilter(filterfn) { - if (filterfn instanceof RegExp) { - // if filter is RegExp wrap it - return (function (rx) { - return function (filename) { - return rx.test(filename); - }; - })(filterfn); - } else if ("function" !== typeof filterfn) { - // if filter is not function we will replace it - return () => true; - } - return filterfn; - } - - // keep last character on folders - const relativePath = (local, entry) => { - let lastChar = entry.slice(-1); - lastChar = lastChar === filetools.sep ? filetools.sep : ""; - return pth.relative(local, entry) + lastChar; - }; - - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry - * @param {Buffer|string} [pass] - password - * @return Buffer or Null in case of error - */ - readFile: function (entry, pass) { - var item = getEntry(entry); - return (item && item.getData(pass)) || null; - }, - - /** - * Returns how many child elements has on entry (directories) on files it is always 0 - * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry - * @returns {integer} - */ - childCount: function (entry) { - const item = getEntry(entry); - if (item) { - return _zip.getChildCount(item); - } - }, - - /** - * Asynchronous readFile - * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry - * @param {callback} callback - * - * @return Buffer or Null in case of error - */ - readFileAsync: function (entry, callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null, "getEntry failed for:" + entry); - } - }, - - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param {ZipEntry|string} entry - ZipEntry object or String with the full path of the entry - * @param {string} encoding - Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText: function (entry, encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, - - /** - * Asynchronous readAsText - * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry - * @param {callback} callback - * @param {string} [encoding] - Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync: function (entry, callback, encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function (data, err) { - if (err) { - callback(data, err); - return; - } - - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }); - } else { - callback(""); - } - }, - - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param {ZipEntry|string} entry - * @returns {void} - */ - deleteFile: function (entry, withsubfolders = true) { - // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteFile(item.entryName, withsubfolders); - } - }, - - /** - * Remove the entry from the file or directory without affecting any nested entries - * - * @param {ZipEntry|string} entry - * @returns {void} - */ - deleteEntry: function (entry) { - // @TODO: test deleteEntry - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, - - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param {string} comment - */ - addZipComment: function (comment) { - // @TODO: test addZipComment - _zip.comment = comment; - }, - - /** - * Returns the zip comment - * - * @return String - */ - getZipComment: function () { - return _zip.comment || ""; - }, - - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param {ZipEntry} entry - * @param {string} comment - */ - addZipEntryComment: function (entry, comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, - - /** - * Returns the comment of the specified entry - * - * @param {ZipEntry} entry - * @return String - */ - getZipEntryComment: function (entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ""; - } - return ""; - }, - - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param {ZipEntry} entry - * @param {Buffer} content - */ - updateFile: function (entry, content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, - - /** - * Adds a file from the disk to the archive - * - * @param {string} localPath File to add to zip - * @param {string} [zipPath] Optional path inside the zip - * @param {string} [zipName] Optional name for the file - * @param {string} [comment] Optional file comment - */ - addLocalFile: function (localPath, zipPath, zipName, comment) { - if (filetools.fs.existsSync(localPath)) { - // fix ZipPath - zipPath = zipPath ? fixPath(zipPath) : ""; - - // p - local file name - const p = pth.win32.basename(pth.win32.normalize(localPath)); - - // add file name into zippath - zipPath += zipName ? zipName : p; - - // read file attributes - const _attr = filetools.fs.statSync(localPath); - - // get file content - const data = _attr.isFile() ? filetools.fs.readFileSync(localPath) : Buffer.alloc(0); - - // if folder - if (_attr.isDirectory()) zipPath += filetools.sep; - - // add file into zip file - this.addFile(zipPath, data, comment, _attr); - } else { - throw Utils.Errors.FILE_NOT_FOUND(localPath); - } - }, - - /** - * Callback for showing if everything was done. - * - * @callback doneCallback - * @param {Error} err - Error object - * @param {boolean} done - was request fully completed - */ - - /** - * Adds a file from the disk to the archive - * - * @param {(object|string)} options - options object, if it is string it us used as localPath. - * @param {string} options.localPath - Local path to the file. - * @param {string} [options.comment] - Optional file comment. - * @param {string} [options.zipPath] - Optional path inside the zip - * @param {string} [options.zipName] - Optional name for the file - * @param {doneCallback} callback - The callback that handles the response. - */ - addLocalFileAsync: function (options, callback) { - options = typeof options === "object" ? options : { localPath: options }; - const localPath = pth.resolve(options.localPath); - const { comment } = options; - let { zipPath, zipName } = options; - const self = this; - - filetools.fs.stat(localPath, function (err, stats) { - if (err) return callback(err, false); - // fix ZipPath - zipPath = zipPath ? fixPath(zipPath) : ""; - // p - local file name - const p = pth.win32.basename(pth.win32.normalize(localPath)); - // add file name into zippath - zipPath += zipName ? zipName : p; - - if (stats.isFile()) { - filetools.fs.readFile(localPath, function (err, data) { - if (err) return callback(err, false); - self.addFile(zipPath, data, comment, stats); - return setImmediate(callback, undefined, true); - }); - } else if (stats.isDirectory()) { - zipPath += filetools.sep; - self.addFile(zipPath, Buffer.alloc(0), comment, stats); - return setImmediate(callback, undefined, true); - } - }); - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param {string} localPath - local path to the folder - * @param {string} [zipPath] - optional path inside zip - * @param {(RegExp|function)} [filter] - optional RegExp or Function if files match will be included. - */ - addLocalFolder: function (localPath, zipPath, filter) { - // Prepare filter - filter = filenameFilter(filter); - - // fix ZipPath - zipPath = zipPath ? fixPath(zipPath) : ""; - - // normalize the path first - localPath = pth.normalize(localPath); - - if (filetools.fs.existsSync(localPath)) { - const items = filetools.findFiles(localPath); - const self = this; - - if (items.length) { - for (const filepath of items) { - const p = pth.join(zipPath, relativePath(localPath, filepath)); - if (filter(p)) { - self.addLocalFile(filepath, pth.dirname(p)); - } - } - } - } else { - throw Utils.Errors.FILE_NOT_FOUND(localPath); - } - }, - - /** - * Asynchronous addLocalFolder - * @param {string} localPath - * @param {callback} callback - * @param {string} [zipPath] optional path inside zip - * @param {RegExp|function} [filter] optional RegExp or Function if files match will - * be included. - */ - addLocalFolderAsync: function (localPath, callback, zipPath, filter) { - // Prepare filter - filter = filenameFilter(filter); - - // fix ZipPath - zipPath = zipPath ? fixPath(zipPath) : ""; - - // normalize the path first - localPath = pth.normalize(localPath); - - var self = this; - filetools.fs.open(localPath, "r", function (err) { - if (err && err.code === "ENOENT") { - callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath)); - } else if (err) { - callback(undefined, err); - } else { - var items = filetools.findFiles(localPath); - var i = -1; - - var next = function () { - i += 1; - if (i < items.length) { - var filepath = items[i]; - var p = relativePath(localPath, filepath).split("\\").join("/"); //windows fix - p = p - .normalize("NFD") - .replace(/[\u0300-\u036f]/g, "") - .replace(/[^\x20-\x7E]/g, ""); // accent fix - if (filter(p)) { - filetools.fs.stat(filepath, function (er0, stats) { - if (er0) callback(undefined, er0); - if (stats.isFile()) { - filetools.fs.readFile(filepath, function (er1, data) { - if (er1) { - callback(undefined, er1); - } else { - self.addFile(zipPath + p, data, "", stats); - next(); - } - }); - } else { - self.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); - next(); - } - }); - } else { - process.nextTick(() => { - next(); - }); - } - } else { - callback(true, undefined); - } - }; - - next(); - } - }); - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param {object | string} options - options object, if it is string it us used as localPath. - * @param {string} options.localPath - Local path to the folder. - * @param {string} [options.zipPath] - optional path inside zip. - * @param {RegExp|function} [options.filter] - optional RegExp or Function if files match will be included. - * @param {function|string} [options.namefix] - optional function to help fix filename - * @param {doneCallback} callback - The callback that handles the response. - * - */ - addLocalFolderAsync2: function (options, callback) { - const self = this; - options = typeof options === "object" ? options : { localPath: options }; - localPath = pth.resolve(fixPath(options.localPath)); - let { zipPath, filter, namefix } = options; - - if (filter instanceof RegExp) { - filter = (function (rx) { - return function (filename) { - return rx.test(filename); - }; - })(filter); - } else if ("function" !== typeof filter) { - filter = function () { - return true; - }; - } - - // fix ZipPath - zipPath = zipPath ? fixPath(zipPath) : ""; - - // Check Namefix function - if (namefix == "latin1") { - namefix = (str) => - str - .normalize("NFD") - .replace(/[\u0300-\u036f]/g, "") - .replace(/[^\x20-\x7E]/g, ""); // accent fix (latin1 characers only) - } - - if (typeof namefix !== "function") namefix = (str) => str; - - // internal, create relative path + fix the name - const relPathFix = (entry) => pth.join(zipPath, namefix(relativePath(localPath, entry))); - const fileNameFix = (entry) => pth.win32.basename(pth.win32.normalize(namefix(entry))); - - filetools.fs.open(localPath, "r", function (err) { - if (err && err.code === "ENOENT") { - callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath)); - } else if (err) { - callback(undefined, err); - } else { - filetools.findFilesAsync(localPath, function (err, fileEntries) { - if (err) return callback(err); - fileEntries = fileEntries.filter((dir) => filter(relPathFix(dir))); - if (!fileEntries.length) callback(undefined, false); - - setImmediate( - fileEntries.reverse().reduce(function (next, entry) { - return function (err, done) { - if (err || done === false) return setImmediate(next, err, false); - - self.addLocalFileAsync( - { - localPath: entry, - zipPath: pth.dirname(relPathFix(entry)), - zipName: fileNameFix(entry) - }, - next - ); - }; - }, callback) - ); - }); - } - }); - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param {string} localPath - path where files will be extracted - * @param {object} props - optional properties - * @param {string} [props.zipPath] - optional path inside zip - * @param {RegExp|function} [props.filter] - optional RegExp or Function if files match will be included. - * @param {function|string} [props.namefix] - optional function to help fix filename - */ - addLocalFolderPromise: function (localPath, props) { - return new Promise((resolve, reject) => { - this.addLocalFolderAsync2(Object.assign({ localPath }, props), (err, done) => { - if (err) reject(err); - if (done) resolve(this); - }); - }); - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param {string} entryName - * @param {Buffer | string} content - file content as buffer or utf8 coded string - * @param {string} [comment] - file comment - * @param {number | object} [attr] - number as unix file permissions, object as filesystem Stats object - */ - addFile: function (entryName, content, comment, attr) { - entryName = zipnamefix(entryName); - let entry = getEntry(entryName); - const update = entry != null; - - // prepare new entry - if (!update) { - entry = new ZipEntry(opts); - entry.entryName = entryName; - } - entry.comment = comment || ""; - - const isStat = "object" === typeof attr && attr instanceof filetools.fs.Stats; - - // last modification time from file stats - if (isStat) { - entry.header.time = attr.mtime; - } - - // Set file attribute - var fileattr = entry.isDirectory ? 0x10 : 0; // (MS-DOS directory flag) - - // extended attributes field for Unix - // set file type either S_IFDIR / S_IFREG - let unix = entry.isDirectory ? 0x4000 : 0x8000; - - if (isStat) { - // File attributes from file stats - unix |= 0xfff & attr.mode; - } else if ("number" === typeof attr) { - // attr from given attr values - unix |= 0xfff & attr; - } else { - // Default values: - unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--) - } - - fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes - - entry.attr = fileattr; - - entry.setData(content); - if (!update) _zip.setEntry(entry); - - return entry; - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @param {string} [password] - * @returns Array - */ - getEntries: function (password) { - _zip.password = password; - return _zip ? _zip.entries : []; - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param {string} name - * @return ZipEntry - */ - getEntry: function (/**String*/ name) { - return getEntry(name); - }, - - getEntryCount: function () { - return _zip.getEntryCount(); - }, - - forEach: function (callback) { - return _zip.forEach(callback); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param {string|ZipEntry} entry - ZipEntry object or String with the full path of the entry - * @param {string} targetPath - Target folder where to write the file - * @param {boolean} [maintainEntryPath=true] - If maintainEntryPath is true and the entry is inside a folder, the entry folder will be created in targetPath as well. Default is TRUE - * @param {boolean} [overwrite=false] - If the file already exists at the target path, the file will be overwriten if this is true. - * @param {boolean} [keepOriginalPermission=false] - The file will be set as the permission from the entry if this is true. - * @param {string} [outFileName] - String If set will override the filename of the extracted file (Only works if the entry is a file) - * - * @return Boolean - */ - extractEntryTo: function (entry, targetPath, maintainEntryPath, overwrite, keepOriginalPermission, outFileName) { - overwrite = get_Bool(false, overwrite); - keepOriginalPermission = get_Bool(false, keepOriginalPermission); - maintainEntryPath = get_Bool(true, maintainEntryPath); - outFileName = get_Str(keepOriginalPermission, outFileName); - - var item = getEntry(entry); - if (!item) { - throw Utils.Errors.NO_ENTRY(); - } - - var entryName = canonical(item.entryName); - - var target = sanitize(targetPath, outFileName && !item.isDirectory ? outFileName : maintainEntryPath ? entryName : pth.basename(entryName)); - - if (item.isDirectory) { - var children = _zip.getEntryChildren(item); - children.forEach(function (child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE(); - } - var name = canonical(child.entryName); - var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name)); - // The reverse operation for attr depend on method addFile() - const fileAttr = keepOriginalPermission ? child.header.fileAttr : undefined; - filetools.writeFileTo(childName, content, overwrite, fileAttr); - }); - return true; - } - - var content = item.getData(_zip.password); - if (!content) throw Utils.Errors.CANT_EXTRACT_FILE(); - - if (filetools.fs.existsSync(target) && !overwrite) { - throw Utils.Errors.CANT_OVERRIDE(); - } - // The reverse operation for attr depend on method addFile() - const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; - filetools.writeFileTo(target, content, overwrite, fileAttr); - - return true; - }, - - /** - * Test the archive - * @param {string} [pass] - */ - test: function (pass) { - if (!_zip) { - return false; - } - - for (var entry in _zip.entries) { - try { - if (entry.isDirectory) { - continue; - } - var content = _zip.entries[entry].getData(pass); - if (!content) { - return false; - } - } catch (err) { - return false; - } - } - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param {string} targetPath Target location - * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true. - * Default is FALSE - * @param {string|Buffer} [pass] password - */ - extractAllTo: function (targetPath, overwrite, keepOriginalPermission, pass) { - keepOriginalPermission = get_Bool(false, keepOriginalPermission); - pass = get_Str(keepOriginalPermission, pass); - overwrite = get_Bool(false, overwrite); - if (!_zip) throw Utils.Errors.NO_ZIP(); - - _zip.entries.forEach(function (entry) { - var entryName = sanitize(targetPath, canonical(entry.entryName)); - if (entry.isDirectory) { - filetools.makeDir(entryName); - return; - } - var content = entry.getData(pass); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE(); - } - // The reverse operation for attr depend on method addFile() - const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; - filetools.writeFileTo(entryName, content, overwrite, fileAttr); - try { - filetools.fs.utimesSync(entryName, entry.header.time, entry.header.time); - } catch (err) { - throw Utils.Errors.CANT_EXTRACT_FILE(); - } - }); - }, - - /** - * Asynchronous extractAllTo - * - * @param {string} targetPath Target location - * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true. - * Default is FALSE - * @param {function} callback The callback will be executed when all entries are extracted successfully or any error is thrown. - */ - extractAllToAsync: function (targetPath, overwrite, keepOriginalPermission, callback) { - callback = get_Fun(overwrite, keepOriginalPermission, callback); - keepOriginalPermission = get_Bool(false, keepOriginalPermission); - overwrite = get_Bool(false, overwrite); - if (!callback) { - return new Promise((resolve, reject) => { - this.extractAllToAsync(targetPath, overwrite, keepOriginalPermission, function (err) { - if (err) { - reject(err); - } else { - resolve(this); - } - }); - }); - } - if (!_zip) { - callback(Utils.Errors.NO_ZIP()); - return; - } - - targetPath = pth.resolve(targetPath); - // convert entryName to - const getPath = (entry) => sanitize(targetPath, pth.normalize(canonical(entry.entryName))); - const getError = (msg, file) => new Error(msg + ': "' + file + '"'); - - // separate directories from files - const dirEntries = []; - const fileEntries = []; - _zip.entries.forEach((e) => { - if (e.isDirectory) { - dirEntries.push(e); - } else { - fileEntries.push(e); - } - }); - - // Create directory entries first synchronously - // this prevents race condition and assures folders are there before writing files - for (const entry of dirEntries) { - const dirPath = getPath(entry); - // The reverse operation for attr depend on method addFile() - const dirAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; - try { - filetools.makeDir(dirPath); - if (dirAttr) filetools.fs.chmodSync(dirPath, dirAttr); - // in unix timestamp will change if files are later added to folder, but still - filetools.fs.utimesSync(dirPath, entry.header.time, entry.header.time); - } catch (er) { - callback(getError("Unable to create folder", dirPath)); - } - } - - fileEntries.reverse().reduce(function (next, entry) { - return function (err) { - if (err) { - next(err); - } else { - const entryName = pth.normalize(canonical(entry.entryName)); - const filePath = sanitize(targetPath, entryName); - entry.getDataAsync(function (content, err_1) { - if (err_1) { - next(err_1); - } else if (!content) { - next(Utils.Errors.CANT_EXTRACT_FILE()); - } else { - // The reverse operation for attr depend on method addFile() - const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; - filetools.writeFileToAsync(filePath, content, overwrite, fileAttr, function (succ) { - if (!succ) { - next(getError("Unable to write file", filePath)); - } - filetools.fs.utimes(filePath, entry.header.time, entry.header.time, function (err_2) { - if (err_2) { - next(getError("Unable to set times", filePath)); - } else { - next(); - } - }); - }); - } - }); - } - }; - }, callback)(); - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param {string} targetFileName - * @param {function} callback - */ - writeZip: function (targetFileName, callback) { - if (arguments.length === 1) { - if (typeof targetFileName === "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && opts.filename) { - targetFileName = opts.filename; - } - if (!targetFileName) return; - - var zipData = _zip.compressToBuffer(); - if (zipData) { - var ok = filetools.writeFileTo(targetFileName, zipData, true); - if (typeof callback === "function") callback(!ok ? new Error("failed") : null, ""); - } - }, - - /** - * - * @param {string} targetFileName - * @param {object} [props] - * @param {boolean} [props.overwrite=true] If the file already exists at the target path, the file will be overwriten if this is true. - * @param {boolean} [props.perm] The file will be set as the permission from the entry if this is true. - - * @returns {Promise} - */ - writeZipPromise: function (/**String*/ targetFileName, /* object */ props) { - const { overwrite, perm } = Object.assign({ overwrite: true }, props); - - return new Promise((resolve, reject) => { - // find file name - if (!targetFileName && opts.filename) targetFileName = opts.filename; - if (!targetFileName) reject("ADM-ZIP: ZIP File Name Missing"); - - this.toBufferPromise().then((zipData) => { - const ret = (done) => (done ? resolve(done) : reject("ADM-ZIP: Wasn't able to write zip file")); - filetools.writeFileToAsync(targetFileName, zipData, overwrite, perm, ret); - }, reject); - }); - }, - - /** - * @returns {Promise} A promise to the Buffer. - */ - toBufferPromise: function () { - return new Promise((resolve, reject) => { - _zip.toAsyncBuffer(resolve, reject); - }); - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @prop {function} [onSuccess] - * @prop {function} [onFail] - * @prop {function} [onItemStart] - * @prop {function} [onItemEnd] - * @returns {Buffer} - */ - toBuffer: function (onSuccess, onFail, onItemStart, onItemEnd) { - if (typeof onSuccess === "function") { - _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd); - return null; - } - return _zip.compressToBuffer(); - } - }; -}; diff --git a/test-eol-project/node_modules/adm-zip/headers/entryHeader.js b/test-eol-project/node_modules/adm-zip/headers/entryHeader.js deleted file mode 100644 index 61000ad3..00000000 --- a/test-eol-project/node_modules/adm-zip/headers/entryHeader.js +++ /dev/null @@ -1,374 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The central directory file header */ -module.exports = function () { - var _verMade = 20, // v2.0 - _version = 10, // v1.0 - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0, - _comLen = 0, - _diskStart = 0, - _inattr = 0, - _attr = 0, - _offset = 0; - - _verMade |= Utils.isWin ? 0x0a00 : 0x0300; - - // Set EFS flag since filename and comment fields are all by default encoded using UTF-8. - // Without it file names may be corrupted for other apps when file names use unicode chars - _flags |= Constants.FLG_EFS; - - const _localHeader = { - extraLen: 0 - }; - - // casting - const uint32 = (val) => Math.max(0, val) >>> 0; - const uint16 = (val) => Math.max(0, val) & 0xffff; - const uint8 = (val) => Math.max(0, val) & 0xff; - - _time = Utils.fromDate2DOS(new Date()); - - return { - get made() { - return _verMade; - }, - set made(val) { - _verMade = val; - }, - - get version() { - return _version; - }, - set version(val) { - _version = val; - }, - - get flags() { - return _flags; - }, - set flags(val) { - _flags = val; - }, - - get flags_efs() { - return (_flags & Constants.FLG_EFS) > 0; - }, - set flags_efs(val) { - if (val) { - _flags |= Constants.FLG_EFS; - } else { - _flags &= ~Constants.FLG_EFS; - } - }, - - get flags_desc() { - return (_flags & Constants.FLG_DESC) > 0; - }, - set flags_desc(val) { - if (val) { - _flags |= Constants.FLG_DESC; - } else { - _flags &= ~Constants.FLG_DESC; - } - }, - - get method() { - return _method; - }, - set method(val) { - switch (val) { - case Constants.STORED: - this.version = 10; - case Constants.DEFLATED: - default: - this.version = 20; - } - _method = val; - }, - - get time() { - return Utils.fromDOS2Date(this.timeval); - }, - set time(val) { - this.timeval = Utils.fromDate2DOS(val); - }, - - get timeval() { - return _time; - }, - set timeval(val) { - _time = uint32(val); - }, - - get timeHighByte() { - return uint8(_time >>> 8); - }, - get crc() { - return _crc; - }, - set crc(val) { - _crc = uint32(val); - }, - - get compressedSize() { - return _compressedSize; - }, - set compressedSize(val) { - _compressedSize = uint32(val); - }, - - get size() { - return _size; - }, - set size(val) { - _size = uint32(val); - }, - - get fileNameLength() { - return _fnameLen; - }, - set fileNameLength(val) { - _fnameLen = val; - }, - - get extraLength() { - return _extraLen; - }, - set extraLength(val) { - _extraLen = val; - }, - - get extraLocalLength() { - return _localHeader.extraLen; - }, - set extraLocalLength(val) { - _localHeader.extraLen = val; - }, - - get commentLength() { - return _comLen; - }, - set commentLength(val) { - _comLen = val; - }, - - get diskNumStart() { - return _diskStart; - }, - set diskNumStart(val) { - _diskStart = uint32(val); - }, - - get inAttr() { - return _inattr; - }, - set inAttr(val) { - _inattr = uint32(val); - }, - - get attr() { - return _attr; - }, - set attr(val) { - _attr = uint32(val); - }, - - // get Unix file permissions - get fileAttr() { - return (_attr || 0) >> 16 & 0xfff; - }, - - get offset() { - return _offset; - }, - set offset(val) { - _offset = uint32(val); - }, - - get encrypted() { - return (_flags & Constants.FLG_ENC) === Constants.FLG_ENC; - }, - - get centralHeaderSize() { - return Constants.CENHDR + _fnameLen + _extraLen + _comLen; - }, - - get realDataOffset() { - return _offset + Constants.LOCHDR + _localHeader.fnameLen + _localHeader.extraLen; - }, - - get localHeader() { - return _localHeader; - }, - - loadLocalHeaderFromBinary: function (/*Buffer*/ input) { - var data = input.slice(_offset, _offset + Constants.LOCHDR); - // 30 bytes and should start with "PK\003\004" - if (data.readUInt32LE(0) !== Constants.LOCSIG) { - throw Utils.Errors.INVALID_LOC(); - } - - // version needed to extract - _localHeader.version = data.readUInt16LE(Constants.LOCVER); - // general purpose bit flag - _localHeader.flags = data.readUInt16LE(Constants.LOCFLG); - // compression method - _localHeader.method = data.readUInt16LE(Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - _localHeader.time = data.readUInt32LE(Constants.LOCTIM); - // uncompressed file crc-32 valu - _localHeader.crc = data.readUInt32LE(Constants.LOCCRC); - // compressed size - _localHeader.compressedSize = data.readUInt32LE(Constants.LOCSIZ); - // uncompressed size - _localHeader.size = data.readUInt32LE(Constants.LOCLEN); - // filename length - _localHeader.fnameLen = data.readUInt16LE(Constants.LOCNAM); - // extra field length - _localHeader.extraLen = data.readUInt16LE(Constants.LOCEXT); - - // read extra data - const extraStart = _offset + Constants.LOCHDR + _localHeader.fnameLen; - const extraEnd = extraStart + _localHeader.extraLen; - return input.slice(extraStart, extraEnd); - }, - - loadFromBinary: function (/*Buffer*/ data) { - // data should be 46 bytes and start with "PK 01 02" - if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) { - throw Utils.Errors.INVALID_CEN(); - } - // version made by - _verMade = data.readUInt16LE(Constants.CENVEM); - // version needed to extract - _version = data.readUInt16LE(Constants.CENVER); - // encrypt, decrypt flags - _flags = data.readUInt16LE(Constants.CENFLG); - // compression method - _method = data.readUInt16LE(Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.CENTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.CENCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.CENSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.CENLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.CENNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.CENEXT); - // file comment length - _comLen = data.readUInt16LE(Constants.CENCOM); - // volume number start - _diskStart = data.readUInt16LE(Constants.CENDSK); - // internal file attributes - _inattr = data.readUInt16LE(Constants.CENATT); - // external file attributes - _attr = data.readUInt32LE(Constants.CENATX); - // LOC header offset - _offset = data.readUInt32LE(Constants.CENOFF); - }, - - localHeaderToBinary: function () { - // LOC header size (30 bytes) - var data = Buffer.alloc(Constants.LOCHDR); - // "PK\003\004" - data.writeUInt32LE(Constants.LOCSIG, 0); - // version needed to extract - data.writeUInt16LE(_version, Constants.LOCVER); - // general purpose bit flag - data.writeUInt16LE(_flags, Constants.LOCFLG); - // compression method - data.writeUInt16LE(_method, Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.LOCTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.LOCCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.LOCLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.LOCNAM); - // extra field length - data.writeUInt16LE(_localHeader.extraLen, Constants.LOCEXT); - return data; - }, - - centralHeaderToBinary: function () { - // CEN header size (46 bytes) - var data = Buffer.alloc(Constants.CENHDR + _fnameLen + _extraLen + _comLen); - // "PK\001\002" - data.writeUInt32LE(Constants.CENSIG, 0); - // version made by - data.writeUInt16LE(_verMade, Constants.CENVEM); - // version needed to extract - data.writeUInt16LE(_version, Constants.CENVER); - // encrypt, decrypt flags - data.writeUInt16LE(_flags, Constants.CENFLG); - // compression method - data.writeUInt16LE(_method, Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.CENTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.CENCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.CENSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.CENLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.CENNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.CENEXT); - // file comment length - data.writeUInt16LE(_comLen, Constants.CENCOM); - // volume number start - data.writeUInt16LE(_diskStart, Constants.CENDSK); - // internal file attributes - data.writeUInt16LE(_inattr, Constants.CENATT); - // external file attributes - data.writeUInt32LE(_attr, Constants.CENATX); - // LOC header offset - data.writeUInt32LE(_offset, Constants.CENOFF); - return data; - }, - - toJSON: function () { - const bytes = function (nr) { - return nr + " bytes"; - }; - - return { - made: _verMade, - version: _version, - flags: _flags, - method: Utils.methodToString(_method), - time: this.time, - crc: "0x" + _crc.toString(16).toUpperCase(), - compressedSize: bytes(_compressedSize), - size: bytes(_size), - fileNameLength: bytes(_fnameLen), - extraLength: bytes(_extraLen), - commentLength: bytes(_comLen), - diskNumStart: _diskStart, - inAttr: _inattr, - attr: _attr, - offset: _offset, - centralHeaderSize: bytes(Constants.CENHDR + _fnameLen + _extraLen + _comLen) - }; - }, - - toString: function () { - return JSON.stringify(this.toJSON(), null, "\t"); - } - }; -}; diff --git a/test-eol-project/node_modules/adm-zip/headers/index.js b/test-eol-project/node_modules/adm-zip/headers/index.js deleted file mode 100644 index b54a7222..00000000 --- a/test-eol-project/node_modules/adm-zip/headers/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.EntryHeader = require("./entryHeader"); -exports.MainHeader = require("./mainHeader"); diff --git a/test-eol-project/node_modules/adm-zip/headers/mainHeader.js b/test-eol-project/node_modules/adm-zip/headers/mainHeader.js deleted file mode 100644 index bb3e8a39..00000000 --- a/test-eol-project/node_modules/adm-zip/headers/mainHeader.js +++ /dev/null @@ -1,130 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The entries in the end of central directory */ -module.exports = function () { - var _volumeEntries = 0, - _totalEntries = 0, - _size = 0, - _offset = 0, - _commentLength = 0; - - return { - get diskEntries() { - return _volumeEntries; - }, - set diskEntries(/*Number*/ val) { - _volumeEntries = _totalEntries = val; - }, - - get totalEntries() { - return _totalEntries; - }, - set totalEntries(/*Number*/ val) { - _totalEntries = _volumeEntries = val; - }, - - get size() { - return _size; - }, - set size(/*Number*/ val) { - _size = val; - }, - - get offset() { - return _offset; - }, - set offset(/*Number*/ val) { - _offset = val; - }, - - get commentLength() { - return _commentLength; - }, - set commentLength(/*Number*/ val) { - _commentLength = val; - }, - - get mainHeaderSize() { - return Constants.ENDHDR + _commentLength; - }, - - loadFromBinary: function (/*Buffer*/ data) { - // data should be 22 bytes and start with "PK 05 06" - // or be 56+ bytes and start with "PK 06 06" for Zip64 - if ( - (data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) && - (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG) - ) { - throw Utils.Errors.INVALID_END(); - } - - if (data.readUInt32LE(0) === Constants.ENDSIG) { - // number of entries on this volume - _volumeEntries = data.readUInt16LE(Constants.ENDSUB); - // total number of entries - _totalEntries = data.readUInt16LE(Constants.ENDTOT); - // central directory size in bytes - _size = data.readUInt32LE(Constants.ENDSIZ); - // offset of first CEN header - _offset = data.readUInt32LE(Constants.ENDOFF); - // zip file comment length - _commentLength = data.readUInt16LE(Constants.ENDCOM); - } else { - // number of entries on this volume - _volumeEntries = Utils.readBigUInt64LE(data, Constants.ZIP64SUB); - // total number of entries - _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT); - // central directory size in bytes - _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZE); - // offset of first CEN header - _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF); - - _commentLength = 0; - } - }, - - toBinary: function () { - var b = Buffer.alloc(Constants.ENDHDR + _commentLength); - // "PK 05 06" signature - b.writeUInt32LE(Constants.ENDSIG, 0); - b.writeUInt32LE(0, 4); - // number of entries on this volume - b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); - // total number of entries - b.writeUInt16LE(_totalEntries, Constants.ENDTOT); - // central directory size in bytes - b.writeUInt32LE(_size, Constants.ENDSIZ); - // offset of first CEN header - b.writeUInt32LE(_offset, Constants.ENDOFF); - // zip file comment length - b.writeUInt16LE(_commentLength, Constants.ENDCOM); - // fill comment memory with spaces so no garbage is left there - b.fill(" ", Constants.ENDHDR); - - return b; - }, - - toJSON: function () { - // creates 0x0000 style output - const offset = function (nr, len) { - let offs = nr.toString(16).toUpperCase(); - while (offs.length < len) offs = "0" + offs; - return "0x" + offs; - }; - - return { - diskEntries: _volumeEntries, - totalEntries: _totalEntries, - size: _size + " bytes", - offset: offset(_offset, 4), - commentLength: _commentLength - }; - }, - - toString: function () { - return JSON.stringify(this.toJSON(), null, "\t"); - } - }; -}; -// Misspelled diff --git a/test-eol-project/node_modules/adm-zip/methods/deflater.js b/test-eol-project/node_modules/adm-zip/methods/deflater.js deleted file mode 100644 index 992de8f1..00000000 --- a/test-eol-project/node_modules/adm-zip/methods/deflater.js +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = function (/*Buffer*/ inbuf) { - var zlib = require("zlib"); - - var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 }; - - return { - deflate: function () { - return zlib.deflateRawSync(inbuf, opts); - }, - - deflateAsync: function (/*Function*/ callback) { - var tmp = zlib.createDeflateRaw(opts), - parts = [], - total = 0; - tmp.on("data", function (data) { - parts.push(data); - total += data.length; - }); - tmp.on("end", function () { - var buf = Buffer.alloc(total), - written = 0; - buf.fill(0); - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf); - } - }; -}; diff --git a/test-eol-project/node_modules/adm-zip/methods/index.js b/test-eol-project/node_modules/adm-zip/methods/index.js deleted file mode 100644 index 5285677f..00000000 --- a/test-eol-project/node_modules/adm-zip/methods/index.js +++ /dev/null @@ -1,3 +0,0 @@ -exports.Deflater = require("./deflater"); -exports.Inflater = require("./inflater"); -exports.ZipCrypto = require("./zipcrypto"); diff --git a/test-eol-project/node_modules/adm-zip/methods/inflater.js b/test-eol-project/node_modules/adm-zip/methods/inflater.js deleted file mode 100644 index 8769e66e..00000000 --- a/test-eol-project/node_modules/adm-zip/methods/inflater.js +++ /dev/null @@ -1,34 +0,0 @@ -const version = +(process.versions ? process.versions.node : "").split(".")[0] || 0; - -module.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) { - var zlib = require("zlib"); - const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {}; - - return { - inflate: function () { - return zlib.inflateRawSync(inbuf, option); - }, - - inflateAsync: function (/*Function*/ callback) { - var tmp = zlib.createInflateRaw(option), - parts = [], - total = 0; - tmp.on("data", function (data) { - parts.push(data); - total += data.length; - }); - tmp.on("end", function () { - var buf = Buffer.alloc(total), - written = 0; - buf.fill(0); - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf); - } - }; -}; diff --git a/test-eol-project/node_modules/adm-zip/methods/zipcrypto.js b/test-eol-project/node_modules/adm-zip/methods/zipcrypto.js deleted file mode 100644 index e1018f6f..00000000 --- a/test-eol-project/node_modules/adm-zip/methods/zipcrypto.js +++ /dev/null @@ -1,175 +0,0 @@ -"use strict"; - -// node crypt, we use it for generate salt -// eslint-disable-next-line node/no-unsupported-features/node-builtins -const { randomFillSync } = require("crypto"); -const Errors = require("../util/errors"); - -// generate CRC32 lookup table -const crctable = new Uint32Array(256).map((t, crc) => { - for (let j = 0; j < 8; j++) { - if (0 !== (crc & 1)) { - crc = (crc >>> 1) ^ 0xedb88320; - } else { - crc >>>= 1; - } - } - return crc >>> 0; -}); - -// C-style uInt32 Multiply (discards higher bits, when JS multiply discards lower bits) -const uMul = (a, b) => Math.imul(a, b) >>> 0; - -// crc32 byte single update (actually same function is part of utils.crc32 function :) ) -const crc32update = (pCrc32, bval) => { - return crctable[(pCrc32 ^ bval) & 0xff] ^ (pCrc32 >>> 8); -}; - -// function for generating salt for encrytion header -const genSalt = () => { - if ("function" === typeof randomFillSync) { - return randomFillSync(Buffer.alloc(12)); - } else { - // fallback if function is not defined - return genSalt.node(); - } -}; - -// salt generation with node random function (mainly as fallback) -genSalt.node = () => { - const salt = Buffer.alloc(12); - const len = salt.length; - for (let i = 0; i < len; i++) salt[i] = (Math.random() * 256) & 0xff; - return salt; -}; - -// general config -const config = { - genSalt -}; - -// Class Initkeys handles same basic ops with keys -function Initkeys(pw) { - const pass = Buffer.isBuffer(pw) ? pw : Buffer.from(pw); - this.keys = new Uint32Array([0x12345678, 0x23456789, 0x34567890]); - for (let i = 0; i < pass.length; i++) { - this.updateKeys(pass[i]); - } -} - -Initkeys.prototype.updateKeys = function (byteValue) { - const keys = this.keys; - keys[0] = crc32update(keys[0], byteValue); - keys[1] += keys[0] & 0xff; - keys[1] = uMul(keys[1], 134775813) + 1; - keys[2] = crc32update(keys[2], keys[1] >>> 24); - return byteValue; -}; - -Initkeys.prototype.next = function () { - const k = (this.keys[2] | 2) >>> 0; // key - return (uMul(k, k ^ 1) >> 8) & 0xff; // decode -}; - -function make_decrypter(/*Buffer*/ pwd) { - // 1. Stage initialize key - const keys = new Initkeys(pwd); - - // return decrypter function - return function (/*Buffer*/ data) { - // result - we create new Buffer for results - const result = Buffer.alloc(data.length); - let pos = 0; - // process input data - for (let c of data) { - //c ^= keys.next(); - //result[pos++] = c; // decode & Save Value - result[pos++] = keys.updateKeys(c ^ keys.next()); // update keys with decoded byte - } - return result; - }; -} - -function make_encrypter(/*Buffer*/ pwd) { - // 1. Stage initialize key - const keys = new Initkeys(pwd); - - // return encrypting function, result and pos is here so we dont have to merge buffers later - return function (/*Buffer*/ data, /*Buffer*/ result, /* Number */ pos = 0) { - // result - we create new Buffer for results - if (!result) result = Buffer.alloc(data.length); - // process input data - for (let c of data) { - const k = keys.next(); // save key byte - result[pos++] = c ^ k; // save val - keys.updateKeys(c); // update keys with decoded byte - } - return result; - }; -} - -function decrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd) { - if (!data || !Buffer.isBuffer(data) || data.length < 12) { - return Buffer.alloc(0); - } - - // 1. We Initialize and generate decrypting function - const decrypter = make_decrypter(pwd); - - // 2. decrypt salt what is always 12 bytes and is a part of file content - const salt = decrypter(data.slice(0, 12)); - - // if bit 3 (0x08) of the general-purpose flags field is set, check salt[11] with the high byte of the header time - // 2 byte data block (as per Info-Zip spec), otherwise check with the high byte of the header entry - const verifyByte = (header.flags & 0x8) === 0x8 ? header.timeHighByte : header.crc >>> 24; - - //3. does password meet expectations - if (salt[11] !== verifyByte) { - throw Errors.WRONG_PASSWORD(); - } - - // 4. decode content - return decrypter(data.slice(12)); -} - -// lets add way to populate salt, NOT RECOMMENDED for production but maybe useful for testing general functionality -function _salter(data) { - if (Buffer.isBuffer(data) && data.length >= 12) { - // be aware - currently salting buffer data is modified - config.genSalt = function () { - return data.slice(0, 12); - }; - } else if (data === "node") { - // test salt generation with node random function - config.genSalt = genSalt.node; - } else { - // if value is not acceptable config gets reset. - config.genSalt = genSalt; - } -} - -function encrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd, /*Boolean*/ oldlike = false) { - // 1. test data if data is not Buffer we make buffer from it - if (data == null) data = Buffer.alloc(0); - // if data is not buffer be make buffer from it - if (!Buffer.isBuffer(data)) data = Buffer.from(data.toString()); - - // 2. We Initialize and generate encrypting function - const encrypter = make_encrypter(pwd); - - // 3. generate salt (12-bytes of random data) - const salt = config.genSalt(); - salt[11] = (header.crc >>> 24) & 0xff; - - // old implementations (before PKZip 2.04g) used two byte check - if (oldlike) salt[10] = (header.crc >>> 16) & 0xff; - - // 4. create output - const result = Buffer.alloc(data.length + 12); - encrypter(salt, result); - - // finally encode content - return encrypter(data, result, 12); -} - -module.exports = { decrypt, encrypt, _salter }; diff --git a/test-eol-project/node_modules/adm-zip/package.json b/test-eol-project/node_modules/adm-zip/package.json deleted file mode 100644 index 59b8baf7..00000000 --- a/test-eol-project/node_modules/adm-zip/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "adm-zip", - "version": "0.5.16", - "description": "Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk", - "scripts": { - "test": "mocha -R spec", - "test:format": "npm run format:prettier:raw -- --check", - "format": "npm run format:prettier", - "format:prettier": "npm run format:prettier:raw -- --write", - "format:prettier:raw": "prettier \"**/*.{js,yml,json}\"" - }, - "keywords": [ - "zip", - "methods", - "archive", - "unzip" - ], - "homepage": "https://github.com/cthackers/adm-zip", - "author": "Nasca Iacob (https://github.com/cthackers)", - "bugs": { - "email": "sy@another-d-mention.ro", - "url": "https://github.com/cthackers/adm-zip/issues" - }, - "license": "MIT", - "files": [ - "adm-zip.js", - "headers", - "methods", - "util", - "zipEntry.js", - "zipFile.js", - "LICENSE" - ], - "main": "adm-zip.js", - "repository": { - "type": "git", - "url": "https://github.com/cthackers/adm-zip.git" - }, - "engines": { - "node": ">=12.0" - }, - "devDependencies": { - "chai": "^4.3.4", - "iconv-lite": "^0.6.3", - "mocha": "^10.2.0", - "prettier": "^3.3.2", - "rimraf": "^3.0.2" - } -} diff --git a/test-eol-project/node_modules/adm-zip/util/constants.js b/test-eol-project/node_modules/adm-zip/util/constants.js deleted file mode 100644 index 119954ba..00000000 --- a/test-eol-project/node_modules/adm-zip/util/constants.js +++ /dev/null @@ -1,142 +0,0 @@ -module.exports = { - /* The local file header */ - LOCHDR : 30, // LOC header size - LOCSIG : 0x04034b50, // "PK\003\004" - LOCVER : 4, // version needed to extract - LOCFLG : 6, // general purpose bit flag - LOCHOW : 8, // compression method - LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) - LOCCRC : 14, // uncompressed file crc-32 value - LOCSIZ : 18, // compressed size - LOCLEN : 22, // uncompressed size - LOCNAM : 26, // filename length - LOCEXT : 28, // extra field length - - /* The Data descriptor */ - EXTSIG : 0x08074b50, // "PK\007\008" - EXTHDR : 16, // EXT header size - EXTCRC : 4, // uncompressed file crc-32 value - EXTSIZ : 8, // compressed size - EXTLEN : 12, // uncompressed size - - /* The central directory file header */ - CENHDR : 46, // CEN header size - CENSIG : 0x02014b50, // "PK\001\002" - CENVEM : 4, // version made by - CENVER : 6, // version needed to extract - CENFLG : 8, // encrypt, decrypt flags - CENHOW : 10, // compression method - CENTIM : 12, // modification time (2 bytes time, 2 bytes date) - CENCRC : 16, // uncompressed file crc-32 value - CENSIZ : 20, // compressed size - CENLEN : 24, // uncompressed size - CENNAM : 28, // filename length - CENEXT : 30, // extra field length - CENCOM : 32, // file comment length - CENDSK : 34, // volume number start - CENATT : 36, // internal file attributes - CENATX : 38, // external file attributes (host system dependent) - CENOFF : 42, // LOC header offset - - /* The entries in the end of central directory */ - ENDHDR : 22, // END header size - ENDSIG : 0x06054b50, // "PK\005\006" - ENDSUB : 8, // number of entries on this disk - ENDTOT : 10, // total number of entries - ENDSIZ : 12, // central directory size in bytes - ENDOFF : 16, // offset of first CEN header - ENDCOM : 20, // zip file comment length - - END64HDR : 20, // zip64 END header size - END64SIG : 0x07064b50, // zip64 Locator signature, "PK\006\007" - END64START : 4, // number of the disk with the start of the zip64 - END64OFF : 8, // relative offset of the zip64 end of central directory - END64NUMDISKS : 16, // total number of disks - - ZIP64SIG : 0x06064b50, // zip64 signature, "PK\006\006" - ZIP64HDR : 56, // zip64 record minimum size - ZIP64LEAD : 12, // leading bytes at the start of the record, not counted by the value stored in ZIP64SIZE - ZIP64SIZE : 4, // zip64 size of the central directory record - ZIP64VEM : 12, // zip64 version made by - ZIP64VER : 14, // zip64 version needed to extract - ZIP64DSK : 16, // zip64 number of this disk - ZIP64DSKDIR : 20, // number of the disk with the start of the record directory - ZIP64SUB : 24, // number of entries on this disk - ZIP64TOT : 32, // total number of entries - ZIP64SIZB : 40, // zip64 central directory size in bytes - ZIP64OFF : 48, // offset of start of central directory with respect to the starting disk number - ZIP64EXTRA : 56, // extensible data sector - - /* Compression methods */ - STORED : 0, // no compression - SHRUNK : 1, // shrunk - REDUCED1 : 2, // reduced with compression factor 1 - REDUCED2 : 3, // reduced with compression factor 2 - REDUCED3 : 4, // reduced with compression factor 3 - REDUCED4 : 5, // reduced with compression factor 4 - IMPLODED : 6, // imploded - // 7 reserved for Tokenizing compression algorithm - DEFLATED : 8, // deflated - ENHANCED_DEFLATED: 9, // enhanced deflated - PKWARE : 10,// PKWare DCL imploded - // 11 reserved by PKWARE - BZIP2 : 12, // compressed using BZIP2 - // 13 reserved by PKWARE - LZMA : 14, // LZMA - // 15-17 reserved by PKWARE - IBM_TERSE : 18, // compressed using IBM TERSE - IBM_LZ77 : 19, // IBM LZ77 z - AES_ENCRYPT : 99, // WinZIP AES encryption method - - /* General purpose bit flag */ - // values can obtained with expression 2**bitnr - FLG_ENC : 1, // Bit 0: encrypted file - FLG_COMP1 : 2, // Bit 1, compression option - FLG_COMP2 : 4, // Bit 2, compression option - FLG_DESC : 8, // Bit 3, data descriptor - FLG_ENH : 16, // Bit 4, enhanced deflating - FLG_PATCH : 32, // Bit 5, indicates that the file is compressed patched data. - FLG_STR : 64, // Bit 6, strong encryption (patented) - // Bits 7-10: Currently unused. - FLG_EFS : 2048, // Bit 11: Language encoding flag (EFS) - // Bit 12: Reserved by PKWARE for enhanced compression. - // Bit 13: encrypted the Central Directory (patented). - // Bits 14-15: Reserved by PKWARE. - FLG_MSK : 4096, // mask header values - - /* Load type */ - FILE : 2, - BUFFER : 1, - NONE : 0, - - /* 4.5 Extensible data fields */ - EF_ID : 0, - EF_SIZE : 2, - - /* Header IDs */ - ID_ZIP64 : 0x0001, - ID_AVINFO : 0x0007, - ID_PFS : 0x0008, - ID_OS2 : 0x0009, - ID_NTFS : 0x000a, - ID_OPENVMS : 0x000c, - ID_UNIX : 0x000d, - ID_FORK : 0x000e, - ID_PATCH : 0x000f, - ID_X509_PKCS7 : 0x0014, - ID_X509_CERTID_F : 0x0015, - ID_X509_CERTID_C : 0x0016, - ID_STRONGENC : 0x0017, - ID_RECORD_MGT : 0x0018, - ID_X509_PKCS7_RL : 0x0019, - ID_IBM1 : 0x0065, - ID_IBM2 : 0x0066, - ID_POSZIP : 0x4690, - - EF_ZIP64_OR_32 : 0xffffffff, - EF_ZIP64_OR_16 : 0xffff, - EF_ZIP64_SUNCOMP : 0, - EF_ZIP64_SCOMP : 8, - EF_ZIP64_RHO : 16, - EF_ZIP64_DSN : 24 -}; diff --git a/test-eol-project/node_modules/adm-zip/util/decoder.js b/test-eol-project/node_modules/adm-zip/util/decoder.js deleted file mode 100644 index d8b98f08..00000000 --- a/test-eol-project/node_modules/adm-zip/util/decoder.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - efs: true, - encode: (data) => Buffer.from(data, "utf8"), - decode: (data) => data.toString("utf8") -}; diff --git a/test-eol-project/node_modules/adm-zip/util/errors.js b/test-eol-project/node_modules/adm-zip/util/errors.js deleted file mode 100644 index ad594ed6..00000000 --- a/test-eol-project/node_modules/adm-zip/util/errors.js +++ /dev/null @@ -1,63 +0,0 @@ -const errors = { - /* Header error messages */ - INVALID_LOC: "Invalid LOC header (bad signature)", - INVALID_CEN: "Invalid CEN header (bad signature)", - INVALID_END: "Invalid END header (bad signature)", - - /* Descriptor */ - DESCRIPTOR_NOT_EXIST: "No descriptor present", - DESCRIPTOR_UNKNOWN: "Unknown descriptor format", - DESCRIPTOR_FAULTY: "Descriptor data is malformed", - - /* ZipEntry error messages*/ - NO_DATA: "Nothing to decompress", - BAD_CRC: "CRC32 checksum failed {0}", - FILE_IN_THE_WAY: "There is a file in the way: {0}", - UNKNOWN_METHOD: "Invalid/unsupported compression method", - - /* Inflater error messages */ - AVAIL_DATA: "inflate::Available inflate data did not terminate", - INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block", - TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes", - INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths", - INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length", - INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete", - INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths", - INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths", - INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement", - INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - CANT_EXTRACT_FILE: "Could not extract the file", - CANT_OVERRIDE: "Target file already exists", - DISK_ENTRY_TOO_LARGE: "Number of disk entries is too large", - NO_ZIP: "No zip file was loaded", - NO_ENTRY: "Entry doesn't exist", - DIRECTORY_CONTENT_ERROR: "A directory cannot have content", - FILE_NOT_FOUND: 'File not found: "{0}"', - NOT_IMPLEMENTED: "Not implemented", - INVALID_FILENAME: "Invalid filename", - INVALID_FORMAT: "Invalid or unsupported zip format. No END header found", - INVALID_PASS_PARAM: "Incompatible password parameter", - WRONG_PASSWORD: "Wrong Password", - - /* ADM-ZIP */ - COMMENT_TOO_LONG: "Comment is too long", // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space) - EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error" -}; - -// template -function E(message) { - return function (...args) { - if (args.length) { // Allow {0} .. {9} arguments in error message, based on argument number - message = message.replace(/\{(\d)\}/g, (_, n) => args[n] || ''); - } - - return new Error('ADM-ZIP: ' + message); - }; -} - -// Init errors with template -for (const msg of Object.keys(errors)) { - exports[msg] = E(errors[msg]); -} diff --git a/test-eol-project/node_modules/adm-zip/util/fattr.js b/test-eol-project/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 720b8278..00000000 --- a/test-eol-project/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,76 +0,0 @@ -const pth = require("path"); - -module.exports = function (/*String*/ path, /*Utils object*/ { fs }) { - var _path = path || "", - _obj = newAttr(), - _stat = null; - - function newAttr() { - return { - directory: false, - readonly: false, - hidden: false, - executable: false, - mtime: 0, - atime: 0 - }; - } - - if (_path && fs.existsSync(_path)) { - _stat = fs.statSync(_path); - _obj.directory = _stat.isDirectory(); - _obj.mtime = _stat.mtime; - _obj.atime = _stat.atime; - _obj.executable = (0o111 & _stat.mode) !== 0; // file is executable who ever har right not just owner - _obj.readonly = (0o200 & _stat.mode) === 0; // readonly if owner has no write right - _obj.hidden = pth.basename(_path)[0] === "."; - } else { - console.warn("Invalid path: " + _path); - } - - return { - get directory() { - return _obj.directory; - }, - - get readOnly() { - return _obj.readonly; - }, - - get hidden() { - return _obj.hidden; - }, - - get mtime() { - return _obj.mtime; - }, - - get atime() { - return _obj.atime; - }, - - get executable() { - return _obj.executable; - }, - - decodeAttributes: function () {}, - - encodeAttributes: function () {}, - - toJSON: function () { - return { - path: _path, - isDirectory: _obj.directory, - isReadOnly: _obj.readonly, - isHidden: _obj.hidden, - isExecutable: _obj.executable, - mTime: _obj.mtime, - aTime: _obj.atime - }; - }, - - toString: function () { - return JSON.stringify(this.toJSON(), null, "\t"); - } - }; -}; diff --git a/test-eol-project/node_modules/adm-zip/util/index.js b/test-eol-project/node_modules/adm-zip/util/index.js deleted file mode 100644 index 10119cfe..00000000 --- a/test-eol-project/node_modules/adm-zip/util/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = require("./utils"); -module.exports.Constants = require("./constants"); -module.exports.Errors = require("./errors"); -module.exports.FileAttr = require("./fattr"); -module.exports.decoder = require("./decoder"); diff --git a/test-eol-project/node_modules/adm-zip/util/utils.js b/test-eol-project/node_modules/adm-zip/util/utils.js deleted file mode 100644 index 56807698..00000000 --- a/test-eol-project/node_modules/adm-zip/util/utils.js +++ /dev/null @@ -1,336 +0,0 @@ -const fsystem = require("fs"); -const pth = require("path"); -const Constants = require("./constants"); -const Errors = require("./errors"); -const isWin = typeof process === "object" && "win32" === process.platform; - -const is_Obj = (obj) => typeof obj === "object" && obj !== null; - -// generate CRC32 lookup table -const crcTable = new Uint32Array(256).map((t, c) => { - for (let k = 0; k < 8; k++) { - if ((c & 1) !== 0) { - c = 0xedb88320 ^ (c >>> 1); - } else { - c >>>= 1; - } - } - return c >>> 0; -}); - -// UTILS functions - -function Utils(opts) { - this.sep = pth.sep; - this.fs = fsystem; - - if (is_Obj(opts)) { - // custom filesystem - if (is_Obj(opts.fs) && typeof opts.fs.statSync === "function") { - this.fs = opts.fs; - } - } -} - -module.exports = Utils; - -// INSTANTIABLE functions - -Utils.prototype.makeDir = function (/*String*/ folder) { - const self = this; - - // Sync - make directories tree - function mkdirSync(/*String*/ fpath) { - let resolvedPath = fpath.split(self.sep)[0]; - fpath.split(self.sep).forEach(function (name) { - if (!name || name.substr(-1, 1) === ":") return; - resolvedPath += self.sep + name; - var stat; - try { - stat = self.fs.statSync(resolvedPath); - } catch (e) { - self.fs.mkdirSync(resolvedPath); - } - if (stat && stat.isFile()) throw Errors.FILE_IN_THE_WAY(`"${resolvedPath}"`); - }); - } - - mkdirSync(folder); -}; - -Utils.prototype.writeFileTo = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr) { - const self = this; - if (self.fs.existsSync(path)) { - if (!overwrite) return false; // cannot overwrite - - var stat = self.fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!self.fs.existsSync(folder)) { - self.makeDir(folder); - } - - var fd; - try { - fd = self.fs.openSync(path, "w", 0o666); // 0666 - } catch (e) { - self.fs.chmodSync(path, 0o666); - fd = self.fs.openSync(path, "w", 0o666); - } - if (fd) { - try { - self.fs.writeSync(fd, content, 0, content.length, 0); - } finally { - self.fs.closeSync(fd); - } - } - self.fs.chmodSync(path, attr || 0o666); - return true; -}; - -Utils.prototype.writeFileToAsync = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr, /*Function*/ callback) { - if (typeof attr === "function") { - callback = attr; - attr = undefined; - } - - const self = this; - - self.fs.exists(path, function (exist) { - if (exist && !overwrite) return callback(false); - - self.fs.stat(path, function (err, stat) { - if (exist && stat.isDirectory()) { - return callback(false); - } - - var folder = pth.dirname(path); - self.fs.exists(folder, function (exists) { - if (!exists) self.makeDir(folder); - - self.fs.open(path, "w", 0o666, function (err, fd) { - if (err) { - self.fs.chmod(path, 0o666, function () { - self.fs.open(path, "w", 0o666, function (err, fd) { - self.fs.write(fd, content, 0, content.length, 0, function () { - self.fs.close(fd, function () { - self.fs.chmod(path, attr || 0o666, function () { - callback(true); - }); - }); - }); - }); - }); - } else if (fd) { - self.fs.write(fd, content, 0, content.length, 0, function () { - self.fs.close(fd, function () { - self.fs.chmod(path, attr || 0o666, function () { - callback(true); - }); - }); - }); - } else { - self.fs.chmod(path, attr || 0o666, function () { - callback(true); - }); - } - }); - }); - }); - }); -}; - -Utils.prototype.findFiles = function (/*String*/ path) { - const self = this; - - function findSync(/*String*/ dir, /*RegExp*/ pattern, /*Boolean*/ recursive) { - if (typeof pattern === "boolean") { - recursive = pattern; - pattern = undefined; - } - let files = []; - self.fs.readdirSync(dir).forEach(function (file) { - const path = pth.join(dir, file); - const stat = self.fs.statSync(path); - - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (stat.isDirectory() ? self.sep : "")); - } - - if (stat.isDirectory() && recursive) files = files.concat(findSync(path, pattern, recursive)); - }); - return files; - } - - return findSync(path, undefined, true); -}; - -/** - * Callback for showing if everything was done. - * - * @callback filelistCallback - * @param {Error} err - Error object - * @param {string[]} list - was request fully completed - */ - -/** - * - * @param {string} dir - * @param {filelistCallback} cb - */ -Utils.prototype.findFilesAsync = function (dir, cb) { - const self = this; - let results = []; - self.fs.readdir(dir, function (err, list) { - if (err) return cb(err); - let list_length = list.length; - if (!list_length) return cb(null, results); - list.forEach(function (file) { - file = pth.join(dir, file); - self.fs.stat(file, function (err, stat) { - if (err) return cb(err); - if (stat) { - results.push(pth.normalize(file) + (stat.isDirectory() ? self.sep : "")); - if (stat.isDirectory()) { - self.findFilesAsync(file, function (err, res) { - if (err) return cb(err); - results = results.concat(res); - if (!--list_length) cb(null, results); - }); - } else { - if (!--list_length) cb(null, results); - } - } - }); - }); - }); -}; - -Utils.prototype.getAttributes = function () {}; - -Utils.prototype.setAttributes = function () {}; - -// STATIC functions - -// crc32 single update (it is part of crc32) -Utils.crc32update = function (crc, byte) { - return crcTable[(crc ^ byte) & 0xff] ^ (crc >>> 8); -}; - -Utils.crc32 = function (buf) { - if (typeof buf === "string") { - buf = Buffer.from(buf, "utf8"); - } - - let len = buf.length; - let crc = ~0; - for (let off = 0; off < len; ) crc = Utils.crc32update(crc, buf[off++]); - // xor and cast as uint32 number - return ~crc >>> 0; -}; - -Utils.methodToString = function (/*Number*/ method) { - switch (method) { - case Constants.STORED: - return "STORED (" + method + ")"; - case Constants.DEFLATED: - return "DEFLATED (" + method + ")"; - default: - return "UNSUPPORTED (" + method + ")"; - } -}; - -/** - * removes ".." style path elements - * @param {string} path - fixable path - * @returns string - fixed filepath - */ -Utils.canonical = function (/*string*/ path) { - if (!path) return ""; - // trick normalize think path is absolute - const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/")); - return pth.join(".", safeSuffix); -}; - -/** - * fix file names in achive - * @param {string} path - fixable path - * @returns string - fixed filepath - */ - -Utils.zipnamefix = function (path) { - if (!path) return ""; - // trick normalize think path is absolute - const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/")); - return pth.posix.join(".", safeSuffix); -}; - -/** - * - * @param {Array} arr - * @param {function} callback - * @returns - */ -Utils.findLast = function (arr, callback) { - if (!Array.isArray(arr)) throw new TypeError("arr is not array"); - - const len = arr.length >>> 0; - for (let i = len - 1; i >= 0; i--) { - if (callback(arr[i], i, arr)) { - return arr[i]; - } - } - return void 0; -}; - -// make abolute paths taking prefix as root folder -Utils.sanitize = function (/*string*/ prefix, /*string*/ name) { - prefix = pth.resolve(pth.normalize(prefix)); - var parts = name.split("/"); - for (var i = 0, l = parts.length; i < l; i++) { - var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep))); - if (path.indexOf(prefix) === 0) { - return path; - } - } - return pth.normalize(pth.join(prefix, pth.basename(name))); -}; - -// converts buffer, Uint8Array, string types to buffer -Utils.toBuffer = function toBuffer(/*buffer, Uint8Array, string*/ input, /* function */ encoder) { - if (Buffer.isBuffer(input)) { - return input; - } else if (input instanceof Uint8Array) { - return Buffer.from(input); - } else { - // expect string all other values are invalid and return empty buffer - return typeof input === "string" ? encoder(input) : Buffer.alloc(0); - } -}; - -Utils.readBigUInt64LE = function (/*Buffer*/ buffer, /*int*/ index) { - var slice = Buffer.from(buffer.slice(index, index + 8)); - slice.swap64(); - - return parseInt(`0x${slice.toString("hex")}`); -}; - -Utils.fromDOS2Date = function (val) { - return new Date(((val >> 25) & 0x7f) + 1980, Math.max(((val >> 21) & 0x0f) - 1, 0), Math.max((val >> 16) & 0x1f, 1), (val >> 11) & 0x1f, (val >> 5) & 0x3f, (val & 0x1f) << 1); -}; - -Utils.fromDate2DOS = function (val) { - let date = 0; - let time = 0; - if (val.getFullYear() > 1979) { - date = (((val.getFullYear() - 1980) & 0x7f) << 9) | ((val.getMonth() + 1) << 5) | val.getDate(); - time = (val.getHours() << 11) | (val.getMinutes() << 5) | (val.getSeconds() >> 1); - } - return (date << 16) | time; -}; - -Utils.isWin = isWin; // Do we have windows system -Utils.crcTable = crcTable; diff --git a/test-eol-project/node_modules/adm-zip/zipEntry.js b/test-eol-project/node_modules/adm-zip/zipEntry.js deleted file mode 100644 index e7804b6c..00000000 --- a/test-eol-project/node_modules/adm-zip/zipEntry.js +++ /dev/null @@ -1,405 +0,0 @@ -var Utils = require("./util"), - Headers = require("./headers"), - Constants = Utils.Constants, - Methods = require("./methods"); - -module.exports = function (/** object */ options, /*Buffer*/ input) { - var _centralHeader = new Headers.EntryHeader(), - _entryName = Buffer.alloc(0), - _comment = Buffer.alloc(0), - _isDirectory = false, - uncompressedData = null, - _extra = Buffer.alloc(0), - _extralocal = Buffer.alloc(0), - _efs = true; - - // assign options - const opts = options; - - const decoder = typeof opts.decoder === "object" ? opts.decoder : Utils.decoder; - _efs = decoder.hasOwnProperty("efs") ? decoder.efs : false; - - function getCompressedDataFromZip() { - //if (!input || !Buffer.isBuffer(input)) { - if (!input || !(input instanceof Uint8Array)) { - return Buffer.alloc(0); - } - _extralocal = _centralHeader.loadLocalHeaderFromBinary(input); - return input.slice(_centralHeader.realDataOffset, _centralHeader.realDataOffset + _centralHeader.compressedSize); - } - - function crc32OK(data) { - // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the local header is written - if (!_centralHeader.flags_desc) { - if (Utils.crc32(data) !== _centralHeader.localHeader.crc) { - return false; - } - } else { - const descriptor = {}; - const dataEndOffset = _centralHeader.realDataOffset + _centralHeader.compressedSize; - // no descriptor after compressed data, instead new local header - if (input.readUInt32LE(dataEndOffset) == Constants.LOCSIG || input.readUInt32LE(dataEndOffset) == Constants.CENSIG) { - throw Utils.Errors.DESCRIPTOR_NOT_EXIST(); - } - - // get decriptor data - if (input.readUInt32LE(dataEndOffset) == Constants.EXTSIG) { - // descriptor with signature - descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC); - descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ); - descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN); - } else if (input.readUInt16LE(dataEndOffset + 12) === 0x4b50) { - // descriptor without signature (we check is new header starting where we expect) - descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC - 4); - descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ - 4); - descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN - 4); - } else { - throw Utils.Errors.DESCRIPTOR_UNKNOWN(); - } - - // check data integrity - if (descriptor.compressedSize !== _centralHeader.compressedSize || descriptor.size !== _centralHeader.size || descriptor.crc !== _centralHeader.crc) { - throw Utils.Errors.DESCRIPTOR_FAULTY(); - } - if (Utils.crc32(data) !== descriptor.crc) { - return false; - } - - // @TODO: zip64 bit descriptor fields - // if bit 3 is set and any value in local header "zip64 Extended information" extra field are set 0 (place holder) - // then 64-bit descriptor format is used instead of 32-bit - // central header - "zip64 Extended information" extra field should store real values and not place holders - } - return true; - } - - function decompress(/*Boolean*/ async, /*Function*/ callback, /*String, Buffer*/ pass) { - if (typeof callback === "undefined" && typeof async === "string") { - pass = async; - async = void 0; - } - if (_isDirectory) { - if (async && callback) { - callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR()); //si added error. - } - return Buffer.alloc(0); - } - - var compressedData = getCompressedDataFromZip(); - - if (compressedData.length === 0) { - // File is empty, nothing to decompress. - if (async && callback) callback(compressedData); - return compressedData; - } - - if (_centralHeader.encrypted) { - if ("string" !== typeof pass && !Buffer.isBuffer(pass)) { - throw Utils.Errors.INVALID_PASS_PARAM(); - } - compressedData = Methods.ZipCrypto.decrypt(compressedData, _centralHeader, pass); - } - - var data = Buffer.alloc(_centralHeader.size); - - switch (_centralHeader.method) { - case Utils.Constants.STORED: - compressedData.copy(data); - if (!crc32OK(data)) { - if (async && callback) callback(data, Utils.Errors.BAD_CRC()); //si added error - throw Utils.Errors.BAD_CRC(); - } else { - //si added otherwise did not seem to return data. - if (async && callback) callback(data); - return data; - } - case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(compressedData, _centralHeader.size); - if (!async) { - const result = inflater.inflate(data); - result.copy(data, 0); - if (!crc32OK(data)) { - throw Utils.Errors.BAD_CRC(`"${decoder.decode(_entryName)}"`); - } - return data; - } else { - inflater.inflateAsync(function (result) { - result.copy(result, 0); - if (callback) { - if (!crc32OK(result)) { - callback(result, Utils.Errors.BAD_CRC()); //si added error - } else { - callback(result); - } - } - }); - } - break; - default: - if (async && callback) callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD()); - throw Utils.Errors.UNKNOWN_METHOD(); - } - } - - function compress(/*Boolean*/ async, /*Function*/ callback) { - if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { - // no data set or the data wasn't changed to require recompression - if (async && callback) callback(getCompressedDataFromZip()); - return getCompressedDataFromZip(); - } - - if (uncompressedData.length && !_isDirectory) { - var compressedData; - // Local file header - switch (_centralHeader.method) { - case Utils.Constants.STORED: - _centralHeader.compressedSize = _centralHeader.size; - - compressedData = Buffer.alloc(uncompressedData.length); - uncompressedData.copy(compressedData); - - if (async && callback) callback(compressedData); - return compressedData; - default: - case Utils.Constants.DEFLATED: - var deflater = new Methods.Deflater(uncompressedData); - if (!async) { - var deflated = deflater.deflate(); - _centralHeader.compressedSize = deflated.length; - return deflated; - } else { - deflater.deflateAsync(function (data) { - compressedData = Buffer.alloc(data.length); - _centralHeader.compressedSize = data.length; - data.copy(compressedData); - callback && callback(compressedData); - }); - } - deflater = null; - break; - } - } else if (async && callback) { - callback(Buffer.alloc(0)); - } else { - return Buffer.alloc(0); - } - } - - function readUInt64LE(buffer, offset) { - return (buffer.readUInt32LE(offset + 4) << 4) + buffer.readUInt32LE(offset); - } - - function parseExtra(data) { - try { - var offset = 0; - var signature, size, part; - while (offset + 4 < data.length) { - signature = data.readUInt16LE(offset); - offset += 2; - size = data.readUInt16LE(offset); - offset += 2; - part = data.slice(offset, offset + size); - offset += size; - if (Constants.ID_ZIP64 === signature) { - parseZip64ExtendedInformation(part); - } - } - } catch (error) { - throw Utils.Errors.EXTRA_FIELD_PARSE_ERROR(); - } - } - - //Override header field values with values from the ZIP64 extra field - function parseZip64ExtendedInformation(data) { - var size, compressedSize, offset, diskNumStart; - - if (data.length >= Constants.EF_ZIP64_SCOMP) { - size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP); - if (_centralHeader.size === Constants.EF_ZIP64_OR_32) { - _centralHeader.size = size; - } - } - if (data.length >= Constants.EF_ZIP64_RHO) { - compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP); - if (_centralHeader.compressedSize === Constants.EF_ZIP64_OR_32) { - _centralHeader.compressedSize = compressedSize; - } - } - if (data.length >= Constants.EF_ZIP64_DSN) { - offset = readUInt64LE(data, Constants.EF_ZIP64_RHO); - if (_centralHeader.offset === Constants.EF_ZIP64_OR_32) { - _centralHeader.offset = offset; - } - } - if (data.length >= Constants.EF_ZIP64_DSN + 4) { - diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN); - if (_centralHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { - _centralHeader.diskNumStart = diskNumStart; - } - } - } - - return { - get entryName() { - return decoder.decode(_entryName); - }, - get rawEntryName() { - return _entryName; - }, - set entryName(val) { - _entryName = Utils.toBuffer(val, decoder.encode); - var lastChar = _entryName[_entryName.length - 1]; - _isDirectory = lastChar === 47 || lastChar === 92; - _centralHeader.fileNameLength = _entryName.length; - }, - - get efs() { - if (typeof _efs === "function") { - return _efs(this.entryName); - } else { - return _efs; - } - }, - - get extra() { - return _extra; - }, - set extra(val) { - _extra = val; - _centralHeader.extraLength = val.length; - parseExtra(val); - }, - - get comment() { - return decoder.decode(_comment); - }, - set comment(val) { - _comment = Utils.toBuffer(val, decoder.encode); - _centralHeader.commentLength = _comment.length; - if (_comment.length > 0xffff) throw Utils.Errors.COMMENT_TOO_LONG(); - }, - - get name() { - var n = decoder.decode(_entryName); - return _isDirectory - ? n - .substr(n.length - 1) - .split("/") - .pop() - : n.split("/").pop(); - }, - get isDirectory() { - return _isDirectory; - }, - - getCompressedData: function () { - return compress(false, null); - }, - - getCompressedDataAsync: function (/*Function*/ callback) { - compress(true, callback); - }, - - setData: function (value) { - uncompressedData = Utils.toBuffer(value, Utils.decoder.encode); - if (!_isDirectory && uncompressedData.length) { - _centralHeader.size = uncompressedData.length; - _centralHeader.method = Utils.Constants.DEFLATED; - _centralHeader.crc = Utils.crc32(value); - _centralHeader.changed = true; - } else { - // folders and blank files should be stored - _centralHeader.method = Utils.Constants.STORED; - } - }, - - getData: function (pass) { - if (_centralHeader.changed) { - return uncompressedData; - } else { - return decompress(false, null, pass); - } - }, - - getDataAsync: function (/*Function*/ callback, pass) { - if (_centralHeader.changed) { - callback(uncompressedData); - } else { - decompress(true, callback, pass); - } - }, - - set attr(attr) { - _centralHeader.attr = attr; - }, - get attr() { - return _centralHeader.attr; - }, - - set header(/*Buffer*/ data) { - _centralHeader.loadFromBinary(data); - }, - - get header() { - return _centralHeader; - }, - - packCentralHeader: function () { - _centralHeader.flags_efs = this.efs; - _centralHeader.extraLength = _extra.length; - // 1. create header (buffer) - var header = _centralHeader.centralHeaderToBinary(); - var addpos = Utils.Constants.CENHDR; - // 2. add file name - _entryName.copy(header, addpos); - addpos += _entryName.length; - // 3. add extra data - _extra.copy(header, addpos); - addpos += _centralHeader.extraLength; - // 4. add file comment - _comment.copy(header, addpos); - return header; - }, - - packLocalHeader: function () { - let addpos = 0; - _centralHeader.flags_efs = this.efs; - _centralHeader.extraLocalLength = _extralocal.length; - // 1. construct local header Buffer - const localHeaderBuf = _centralHeader.localHeaderToBinary(); - // 2. localHeader - crate header buffer - const localHeader = Buffer.alloc(localHeaderBuf.length + _entryName.length + _centralHeader.extraLocalLength); - // 2.1 add localheader - localHeaderBuf.copy(localHeader, addpos); - addpos += localHeaderBuf.length; - // 2.2 add file name - _entryName.copy(localHeader, addpos); - addpos += _entryName.length; - // 2.3 add extra field - _extralocal.copy(localHeader, addpos); - addpos += _extralocal.length; - - return localHeader; - }, - - toJSON: function () { - const bytes = function (nr) { - return "<" + ((nr && nr.length + " bytes buffer") || "null") + ">"; - }; - - return { - entryName: this.entryName, - name: this.name, - comment: this.comment, - isDirectory: this.isDirectory, - header: _centralHeader.toJSON(), - compressedData: bytes(input), - data: bytes(uncompressedData) - }; - }, - - toString: function () { - return JSON.stringify(this.toJSON(), null, "\t"); - } - }; -}; diff --git a/test-eol-project/node_modules/adm-zip/zipFile.js b/test-eol-project/node_modules/adm-zip/zipFile.js deleted file mode 100644 index a52db943..00000000 --- a/test-eol-project/node_modules/adm-zip/zipFile.js +++ /dev/null @@ -1,446 +0,0 @@ -const ZipEntry = require("./zipEntry"); -const Headers = require("./headers"); -const Utils = require("./util"); - -module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) { - var entryList = [], - entryTable = {}, - _comment = Buffer.alloc(0), - mainHeader = new Headers.MainHeader(), - loadedEntries = false; - var password = null; - const temporary = new Set(); - - // assign options - const opts = options; - - const { noSort, decoder } = opts; - - if (inBuffer) { - // is a memory buffer - readMainHeader(opts.readEntries); - } else { - // none. is a new file - loadedEntries = true; - } - - function makeTemporaryFolders() { - const foldersList = new Set(); - - // Make list of all folders in file - for (const elem of Object.keys(entryTable)) { - const elements = elem.split("/"); - elements.pop(); // filename - if (!elements.length) continue; // no folders - for (let i = 0; i < elements.length; i++) { - const sub = elements.slice(0, i + 1).join("/") + "/"; - foldersList.add(sub); - } - } - - // create missing folders as temporary - for (const elem of foldersList) { - if (!(elem in entryTable)) { - const tempfolder = new ZipEntry(opts); - tempfolder.entryName = elem; - tempfolder.attr = 0x10; - tempfolder.temporary = true; - entryList.push(tempfolder); - entryTable[tempfolder.entryName] = tempfolder; - temporary.add(tempfolder); - } - } - } - - function readEntries() { - loadedEntries = true; - entryTable = {}; - if (mainHeader.diskEntries > (inBuffer.length - mainHeader.offset) / Utils.Constants.CENHDR) { - throw Utils.Errors.DISK_ENTRY_TOO_LARGE(); - } - entryList = new Array(mainHeader.diskEntries); // total number of entries - var index = mainHeader.offset; // offset of first CEN header - for (var i = 0; i < entryList.length; i++) { - var tmp = index, - entry = new ZipEntry(opts, inBuffer); - entry.header = inBuffer.slice(tmp, (tmp += Utils.Constants.CENHDR)); - - entry.entryName = inBuffer.slice(tmp, (tmp += entry.header.fileNameLength)); - - if (entry.header.extraLength) { - entry.extra = inBuffer.slice(tmp, (tmp += entry.header.extraLength)); - } - - if (entry.header.commentLength) entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); - - index += entry.header.centralHeaderSize; - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - temporary.clear(); - makeTemporaryFolders(); - } - - function readMainHeader(/*Boolean*/ readNow) { - var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size - max = Math.max(0, i - 0xffff), // 0xFFFF is the max zip file comment length - n = max, - endStart = inBuffer.length, - endOffset = -1, // Start offset of the END header - commentEnd = 0; - - // option to search header form entire file - const trailingSpace = typeof opts.trailingSpace === "boolean" ? opts.trailingSpace : false; - if (trailingSpace) max = 0; - - for (i; i >= n; i--) { - if (inBuffer[i] !== 0x50) continue; // quick check that the byte is 'P' - if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) { - // "PK\005\006" - endOffset = i; - commentEnd = i; - endStart = i + Utils.Constants.ENDHDR; - // We already found a regular signature, let's look just a bit further to check if there's any zip64 signature - n = i - Utils.Constants.END64HDR; - continue; - } - - if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) { - // Found a zip64 signature, let's continue reading the whole zip64 record - n = max; - continue; - } - - if (inBuffer.readUInt32LE(i) === Utils.Constants.ZIP64SIG) { - // Found the zip64 record, let's determine it's size - endOffset = i; - endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD; - break; - } - } - - if (endOffset == -1) throw Utils.Errors.INVALID_FORMAT(); - - mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart)); - if (mainHeader.commentLength) { - _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR); - } - if (readNow) readEntries(); - } - - function sortEntries() { - if (entryList.length > 1 && !noSort) { - entryList.sort((a, b) => a.entryName.toLowerCase().localeCompare(b.entryName.toLowerCase())); - } - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries() { - if (!loadedEntries) { - readEntries(); - } - return entryList.filter((e) => !temporary.has(e)); - }, - - /** - * Archive comment - * @return {String} - */ - get comment() { - return decoder.decode(_comment); - }, - set comment(val) { - _comment = Utils.toBuffer(val, decoder.encode); - mainHeader.commentLength = _comment.length; - }, - - getEntryCount: function () { - if (!loadedEntries) { - return mainHeader.diskEntries; - } - - return entryList.length; - }, - - forEach: function (callback) { - this.entries.forEach(callback); - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry: function (/*String*/ entryName) { - if (!loadedEntries) { - readEntries(); - } - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry: function (/*ZipEntry*/ entry) { - if (!loadedEntries) { - readEntries(); - } - entryList.push(entry); - entryTable[entry.entryName] = entry; - mainHeader.totalEntries = entryList.length; - }, - - /** - * Removes the file with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - * @returns {void} - */ - deleteFile: function (/*String*/ entryName, withsubfolders = true) { - if (!loadedEntries) { - readEntries(); - } - const entry = entryTable[entryName]; - const list = this.getEntryChildren(entry, withsubfolders).map((child) => child.entryName); - - list.forEach(this.deleteEntry); - }, - - /** - * Removes the entry with the given name from the entry list. - * - * @param {string} entryName - * @returns {void} - */ - deleteEntry: function (/*String*/ entryName) { - if (!loadedEntries) { - readEntries(); - } - const entry = entryTable[entryName]; - const index = entryList.indexOf(entry); - if (index >= 0) { - entryList.splice(index, 1); - delete entryTable[entryName]; - mainHeader.totalEntries = entryList.length; - } - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren: function (/*ZipEntry*/ entry, subfolders = true) { - if (!loadedEntries) { - readEntries(); - } - if (typeof entry === "object") { - if (entry.isDirectory && subfolders) { - const list = []; - const name = entry.entryName; - - for (const zipEntry of entryList) { - if (zipEntry.entryName.startsWith(name)) { - list.push(zipEntry); - } - } - return list; - } else { - return [entry]; - } - } - return []; - }, - - /** - * How many child elements entry has - * - * @param {ZipEntry} entry - * @return {integer} - */ - getChildCount: function (entry) { - if (entry && entry.isDirectory) { - const list = this.getEntryChildren(entry); - return list.includes(entry) ? list.length - 1 : list.length; - } - return 0; - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - compressToBuffer: function () { - if (!loadedEntries) { - readEntries(); - } - sortEntries(); - - const dataBlock = []; - const headerBlocks = []; - let totalSize = 0; - let dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - let totalEntries = 0; - - for (const entry of this.entries) { - // compress data and set local and entry header accordingly. Reason why is called first - const compressedData = entry.getCompressedData(); - entry.header.offset = dindex; - - // 1. construct local header - const localHeader = entry.packLocalHeader(); - - // 2. offsets - const dataLength = localHeader.length + compressedData.length; - dindex += dataLength; - - // 3. store values in sequence - dataBlock.push(localHeader); - dataBlock.push(compressedData); - - // 4. construct central header - const centralHeader = entry.packCentralHeader(); - headerBlocks.push(centralHeader); - // 5. update main header - mainHeader.size += centralHeader.length; - totalSize += dataLength + centralHeader.length; - totalEntries++; - } - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and beginning of central directory first record - mainHeader.offset = dindex; - mainHeader.totalEntries = totalEntries; - - dindex = 0; - const outBuffer = Buffer.alloc(totalSize); - // write data blocks - for (const content of dataBlock) { - content.copy(outBuffer, dindex); - dindex += content.length; - } - - // write central directory entries - for (const content of headerBlocks) { - content.copy(outBuffer, dindex); - dindex += content.length; - } - - // write main header - const mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - mh.copy(outBuffer, dindex); - - // Since we update entry and main header offsets, - // they are no longer valid and we have to reset content - // (Issue 64) - - inBuffer = outBuffer; - loadedEntries = false; - - return outBuffer; - }, - - toAsyncBuffer: function (/*Function*/ onSuccess, /*Function*/ onFail, /*Function*/ onItemStart, /*Function*/ onItemEnd) { - try { - if (!loadedEntries) { - readEntries(); - } - sortEntries(); - - const dataBlock = []; - const centralHeaders = []; - let totalSize = 0; - let dindex = 0; - let totalEntries = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - const compress2Buffer = function (entryLists) { - if (entryLists.length > 0) { - const entry = entryLists.shift(); - const name = entry.entryName + entry.extra.toString(); - if (onItemStart) onItemStart(name); - entry.getCompressedDataAsync(function (compressedData) { - if (onItemEnd) onItemEnd(name); - entry.header.offset = dindex; - - // 1. construct local header - const localHeader = entry.packLocalHeader(); - - // 2. offsets - const dataLength = localHeader.length + compressedData.length; - dindex += dataLength; - - // 3. store values in sequence - dataBlock.push(localHeader); - dataBlock.push(compressedData); - - // central header - const centalHeader = entry.packCentralHeader(); - centralHeaders.push(centalHeader); - mainHeader.size += centalHeader.length; - totalSize += dataLength + centalHeader.length; - totalEntries++; - - compress2Buffer(entryLists); - }); - } else { - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and beginning of central directory first record - mainHeader.offset = dindex; - mainHeader.totalEntries = totalEntries; - - dindex = 0; - const outBuffer = Buffer.alloc(totalSize); - dataBlock.forEach(function (content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - centralHeaders.forEach(function (content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - const mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - // Since we update entry and main header offsets, they are no - // longer valid and we have to reset content using our new buffer - // (Issue 64) - - inBuffer = outBuffer; - loadedEntries = false; - - onSuccess(outBuffer); - } - }; - - compress2Buffer(Array.from(this.entries)); - } catch (e) { - onFail(e); - } - } - }; -}; diff --git a/test-eol-project/node_modules/agent-base/.travis.yml b/test-eol-project/node_modules/agent-base/.travis.yml deleted file mode 100644 index 76200951..00000000 --- a/test-eol-project/node_modules/agent-base/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "4" - - "5" - - "6" - - "7" - - "8" - - "9" - - "10" - -install: - - PATH="`npm bin`:`npm bin -g`:$PATH" - # Install dependencies and build - - npm install - -script: - # Output useful info for debugging - - node --version - - npm --version - # Run tests - - npm test diff --git a/test-eol-project/node_modules/agent-base/History.md b/test-eol-project/node_modules/agent-base/History.md deleted file mode 100644 index 80c88dc4..00000000 --- a/test-eol-project/node_modules/agent-base/History.md +++ /dev/null @@ -1,113 +0,0 @@ - -4.2.0 / 2018-01-15 -================== - - * Add support for returning an `http.Agent` instance - * Optimize promisifying logic - * Set `timeout` to null for proper cleanup - * Remove Node.js <= 0.11.3 special-casing from test case - -4.1.2 / 2017-11-20 -================== - - * test Node 9 on Travis - * ensure that `https.get()` uses the patched `https.request()` - -4.1.1 / 2017-07-20 -================== - - * Correct `https.request()` with a String (#9) - -4.1.0 / 2017-06-26 -================== - - * mix in Agent options into Request options - * throw when nothing is returned from agent-base callback - * do not modify the options object for https requests - -4.0.1 / 2017-06-13 -================== - - * add `this` context tests and fixes - -4.0.0 / 2017-06-06 -================== - - * drop support for Node.js < 4 - * drop old versions of Node.js from Travis-CI - * specify Node.js >= 4.0.0 in `engines.node` - * remove more old code - * remove "extend" dependency - * remove "semver" dependency - * make the Promise logic a bit cleaner - * add async function pseudo-example to README - * use direct return in README example - -3.0.0 / 2017-06-02 -================== - - * drop support for Node.js v0.8 and v0.10 - * add support for async, Promises, and direct return - * add a couple `options` test cases - * implement a `"timeout"` option - * rename main file to `index.js` - * test Node 8 on Travis - -2.1.1 / 2017-05-30 -================== - - * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) - -2.1.0 / 2017-05-26 -================== - - * unref is not supported for node < 0.9.1 (@pi0) - * add tests to dangling socket (@pi0) - * check unref() is supported (@pi0) - * fix dangling sockets problem (@pi0) - * add basic "ws" module tests - * make `Agent` be subclassable - * turn `addRequest()` into a named function - * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) - * travis: test node v4, v5, v6 and v7 - -2.0.1 / 2015-09-10 -================== - - * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet) - -2.0.0 / 2015-07-10 -================== - - * refactor to patch Node.js core for more consistent `opts` values - * ensure that HTTP(s) default port numbers are always given - * test: use ssl-cert-snakeoil SSL certs - * test: add tests for arbitrary options - * README: add API section - * README: make the Agent HTTP/HTTPS generic in the example - * README: use SVG for Travis-CI badge - -1.0.2 / 2015-06-27 -================== - - * agent: set `req._hadError` to true after emitting "error" - * package: update "mocha" to v2 - * test: add artificial HTTP GET request test - * test: add artificial data events test - * test: fix artifical GET response test on node > v0.11.3 - * test: use a real timeout for the async error test - -1.0.1 / 2013-09-09 -================== - - * Fix passing an "error" object to the callback function on the first tick - -1.0.0 / 2013-09-09 -================== - - * New API: now you pass a callback function directly - -0.0.1 / 2013-07-09 -================== - - * Initial release diff --git a/test-eol-project/node_modules/agent-base/README.md b/test-eol-project/node_modules/agent-base/README.md deleted file mode 100644 index dbeceab8..00000000 --- a/test-eol-project/node_modules/agent-base/README.md +++ /dev/null @@ -1,145 +0,0 @@ -agent-base -========== -### Turn a function into an [`http.Agent`][http.Agent] instance -[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base) - -This module provides an `http.Agent` generator. That is, you pass it an async -callback function, and it returns a new `http.Agent` instance that will invoke the -given callback function when sending outbound HTTP requests. - -#### Some subclasses: - -Here's some more interesting uses of `agent-base`. -Send a pull request to list yours! - - * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints - * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints - * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS - * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install agent-base -``` - - -Example -------- - -Here's a minimal example that creates a new `net.Socket` connection to the server -for every HTTP request (i.e. the equivalent of `agent: false` option): - -```js -var net = require('net'); -var tls = require('tls'); -var url = require('url'); -var http = require('http'); -var agent = require('agent-base'); - -var endpoint = 'http://nodejs.org/api/'; -var parsed = url.parse(endpoint); - -// This is the important part! -parsed.agent = agent(function (req, opts) { - var socket; - // `secureEndpoint` is true when using the https module - if (opts.secureEndpoint) { - socket = tls.connect(opts); - } else { - socket = net.connect(opts); - } - return socket; -}); - -// Everything else works just like normal... -http.get(parsed, function (res) { - console.log('"response" event!', res.headers); - res.pipe(process.stdout); -}); -``` - -Returning a Promise or using an `async` function is also supported: - -```js -agent(async function (req, opts) { - await sleep(1000); - // etc… -}); -``` - -Return another `http.Agent` instance to "pass through" the responsibility -for that HTTP request to that agent: - -```js -agent(function (req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); -``` - - -API ---- - -## Agent(Function callback[, Object options]) → [http.Agent][] - -Creates a base `http.Agent` that will execute the callback function `callback` -for every HTTP request that it is used as the `agent` for. The callback function -is responsible for creating a `stream.Duplex` instance of some kind that will be -used as the underlying socket in the HTTP request. - -The `options` object accepts the following properties: - - * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). - -The callback function should have the following signature: - -### callback(http.ClientRequest req, Object options, Function cb) → undefined - -The ClientRequest `req` can be accessed to read request headers and -and the path, etc. The `options` object contains the options passed -to the `http.request()`/`https.request()` function call, and is formatted -to be directly passed to `net.connect()`/`tls.connect()`, or however -else you want a Socket to be created. Pass the created socket to -the callback function `cb` once created, and the HTTP request will -continue to proceed. - -If the `https` module is used to invoke the HTTP request, then the -`secureEndpoint` property on `options` _will be set to `true`_. - - -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -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. - -[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent -[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent -[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent -[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent -[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/test-eol-project/node_modules/agent-base/index.d.ts b/test-eol-project/node_modules/agent-base/index.d.ts deleted file mode 100644 index ff6788bd..00000000 --- a/test-eol-project/node_modules/agent-base/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Type definitions for agent-base 4.2.1 -// Project: https://github.com/TooTallNate/node-agent-base -// Definitions by: Christopher Quadflieg - -/// -import { EventEmitter } from 'events'; - -declare namespace Agent { - export type AgentCallback = ( - req?: any, - opts?: { - secureEndpoint: boolean; - } - ) => void; - - export interface AgentOptions { - timeout?: number; - host?: string; - port?: number; - [key: string]: any; - } - - export interface Agent extends EventEmitter { - _promisifiedCallback: boolean; - timeout: number | null; - options?: AgentOptions; - callback: AgentCallback; - addRequest: (req?: any, opts?: any) => void; - freeSocket: (socket: any, opts: any) => void; - } -} - -/** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - */ -declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; -declare function Agent( - callback: Agent.AgentCallback, - opts?: Agent.AgentOptions -): Agent.Agent; - -export = Agent; diff --git a/test-eol-project/node_modules/agent-base/index.js b/test-eol-project/node_modules/agent-base/index.js deleted file mode 100644 index 0ee6b296..00000000 --- a/test-eol-project/node_modules/agent-base/index.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict'; -require('./patch-core'); -const inherits = require('util').inherits; -const promisify = require('es6-promisify'); -const EventEmitter = require('events').EventEmitter; - -module.exports = Agent; - -function isAgent(v) { - return v && typeof v.addRequest === 'function'; -} - -/** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ -function Agent(callback, _opts) { - if (!(this instanceof Agent)) { - return new Agent(callback, _opts); - } - - EventEmitter.call(this); - - // The callback gets promisified if it has 3 parameters - // (i.e. it has a callback function) lazily - this._promisifiedCallback = false; - - let opts = _opts; - if ('function' === typeof callback) { - this.callback = callback; - } else if (callback) { - opts = callback; - } - - // timeout for the socket to be returned from the callback - this.timeout = (opts && opts.timeout) || null; - - this.options = opts; -} -inherits(Agent, EventEmitter); - -/** - * Override this function in your subclass! - */ -Agent.prototype.callback = function callback(req, opts) { - throw new Error( - '"agent-base" has no default implementation, you must subclass and override `callback()`' - ); -}; - -/** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ -Agent.prototype.addRequest = function addRequest(req, _opts) { - const ownOpts = Object.assign({}, _opts); - - // Set default `host` for HTTP to localhost - if (null == ownOpts.host) { - ownOpts.host = 'localhost'; - } - - // Set default `port` for HTTP if none was explicitly specified - if (null == ownOpts.port) { - ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; - } - - const opts = Object.assign({}, this.options, ownOpts); - - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most likely the - // result of a `url.parse()` call... we need to remove the `path` portion so - // that `net.connect()` doesn't attempt to open that as a unix socket file. - delete opts.path; - } - - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - - // Create the `stream.Duplex` instance - let timeout; - let timedOut = false; - const timeoutMs = this.timeout; - const freeSocket = this.freeSocket; - - function onerror(err) { - if (req._hadError) return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - } - - function ontimeout() { - timeout = null; - timedOut = true; - const err = new Error( - 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms' - ); - err.code = 'ETIMEOUT'; - onerror(err); - } - - function callbackError(err) { - if (timedOut) return; - if (timeout != null) { - clearTimeout(timeout); - timeout = null; - } - onerror(err); - } - - function onsocket(socket) { - if (timedOut) return; - if (timeout != null) { - clearTimeout(timeout); - timeout = null; - } - if (isAgent(socket)) { - // `socket` is actually an http.Agent instance, so relinquish - // responsibility for this `req` to the Agent from here on - socket.addRequest(req, opts); - } else if (socket) { - function onfree() { - freeSocket(socket, opts); - } - socket.on('free', onfree); - req.onSocket(socket); - } else { - const err = new Error( - 'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`' - ); - onerror(err); - } - } - - if (!this._promisifiedCallback && this.callback.length >= 3) { - // Legacy callback function - convert to a Promise - this.callback = promisify(this.callback, this); - this._promisifiedCallback = true; - } - - if (timeoutMs > 0) { - timeout = setTimeout(ontimeout, timeoutMs); - } - - try { - Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); - } catch (err) { - Promise.reject(err).catch(callbackError); - } -}; - -Agent.prototype.freeSocket = function freeSocket(socket, opts) { - // TODO reuse sockets - socket.destroy(); -}; diff --git a/test-eol-project/node_modules/agent-base/package.json b/test-eol-project/node_modules/agent-base/package.json deleted file mode 100644 index 9958cbc0..00000000 --- a/test-eol-project/node_modules/agent-base/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "agent-base", - "version": "4.3.0", - "description": "Turn a function into an `http.Agent` instance", - "main": "./index.js", - "scripts": { - "test": "mocha --reporter spec" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-agent-base.git" - }, - "keywords": [ - "http", - "agent", - "base", - "barebones", - "https" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/node-agent-base/issues" - }, - "devDependencies": { - "@types/es6-promisify": "^5.0.0", - "@types/node": "^10.5.3", - "mocha": "^3.4.2", - "ws": "^3.0.0" - }, - "dependencies": { - "es6-promisify": "^5.0.0" - }, - "engines": { - "node": ">= 4.0.0" - } -} diff --git a/test-eol-project/node_modules/agent-base/patch-core.js b/test-eol-project/node_modules/agent-base/patch-core.js deleted file mode 100644 index 21cbbb67..00000000 --- a/test-eol-project/node_modules/agent-base/patch-core.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const url = require('url'); -const https = require('https'); - -/** - * This currently needs to be applied to all Node.js versions - * in order to determine if the `req` is an HTTP or HTTPS request. - * - * There is currently no PR attempting to move this property upstream. - */ -const patchMarker = "__agent_base_https_request_patched__"; -if (!https.request[patchMarker]) { - https.request = (function(request) { - return function(_options, cb) { - let options; - if (typeof _options === 'string') { - options = url.parse(_options); - } else { - options = Object.assign({}, _options); - } - if (null == options.port) { - options.port = 443; - } - options.secureEndpoint = true; - return request.call(https, options, cb); - }; - })(https.request); - https.request[patchMarker] = true; -} - -/** - * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the - * patched `https.request()`. - * - * Ref: https://github.com/nodejs/node/commit/5118f31 - */ -https.get = function (_url, _options, cb) { - let options; - if (typeof _url === 'string' && _options && typeof _options !== 'function') { - options = Object.assign({}, url.parse(_url), _options); - } else if (!_options && !cb) { - options = _url; - } else if (!cb) { - options = _url; - cb = _options; - } - - const req = https.request(options, cb); - req.end(); - return req; -}; diff --git a/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key b/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key deleted file mode 100644 index fd125012..00000000 --- a/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.key +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr -bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y -b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB -AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd -Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x -1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ -5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW -T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX -uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N -Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw -h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J -bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ -ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== ------END RSA PRIVATE KEY----- diff --git a/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem deleted file mode 100644 index b115a5e9..00000000 --- a/test-eol-project/node_modules/agent-base/test/ssl-cert-snakeoil.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 -NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 -NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 -NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB -ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay -OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn -g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN -AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 -1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J -QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= ------END CERTIFICATE----- diff --git a/test-eol-project/node_modules/agent-base/test/test.js b/test-eol-project/node_modules/agent-base/test/test.js deleted file mode 100644 index 0f372c07..00000000 --- a/test-eol-project/node_modules/agent-base/test/test.js +++ /dev/null @@ -1,728 +0,0 @@ -/** - * Module dependencies. - */ - -var fs = require('fs'); -var url = require('url'); -var net = require('net'); -var tls = require('tls'); -var http = require('http'); -var https = require('https'); -var WebSocket = require('ws'); -var assert = require('assert'); -var events = require('events'); -var inherits = require('util').inherits; -var Agent = require('../'); - -var PassthroughAgent = Agent(function(req, opts) { - return opts.secureEndpoint ? https.globalAgent : http.globalAgent; -}); - -describe('Agent', function() { - describe('subclass', function() { - it('should be subclassable', function(done) { - function MyAgent() { - Agent.call(this); - } - inherits(MyAgent, Agent); - - MyAgent.prototype.callback = function(req, opts, fn) { - assert.equal(req.path, '/foo'); - assert.equal(req.getHeader('host'), '127.0.0.1:1234'); - assert.equal(opts.secureEndpoint, true); - done(); - }; - - var info = url.parse('https://127.0.0.1:1234/foo'); - info.agent = new MyAgent(); - https.get(info); - }); - }); - describe('options', function() { - it('should support an options Object as first argument', function() { - var agent = new Agent({ timeout: 1000 }); - assert.equal(1000, agent.timeout); - }); - it('should support an options Object as second argument', function() { - var agent = new Agent(function() {}, { timeout: 1000 }); - assert.equal(1000, agent.timeout); - }); - it('should be mixed in with HTTP request options', function(done) { - var agent = new Agent({ - host: 'my-proxy.com', - port: 3128, - foo: 'bar' - }); - agent.callback = function(req, opts, fn) { - assert.equal('bar', opts.foo); - assert.equal('a', opts.b); - - // `host` and `port` are special-cases, and should always be - // overwritten in the request `opts` inside the agent-base callback - assert.equal('localhost', opts.host); - assert.equal(80, opts.port); - done(); - }; - var opts = { - b: 'a', - agent: agent - }; - http.get(opts); - }); - }); - describe('`this` context', function() { - it('should be the Agent instance', function(done) { - var called = false; - var agent = new Agent(); - agent.callback = function() { - called = true; - assert.equal(this, agent); - }; - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert(/no Duplex stream was returned/.test(err.message)); - done(); - }); - }); - it('should be the Agent instance with callback signature', function(done) { - var called = false; - var agent = new Agent(); - agent.callback = function(req, opts, fn) { - called = true; - assert.equal(this, agent); - fn(); - }; - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert(/no Duplex stream was returned/.test(err.message)); - done(); - }); - }); - }); - describe('"error" event', function() { - it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function( - done - ) { - var agent = new Agent(); - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert.equal( - '"agent-base" has no default implementation, you must subclass and override `callback()`', - err.message - ); - done(); - }); - }); - it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function( - done - ) { - var agent = new Agent(function(req, opts, fn) { - fn(new Error('is this caught?')); - }); - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert.equal('is this caught?', err.message); - done(); - }); - }); - it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function( - done - ) { - var agent = new Agent(function(req, opts, fn) { - setTimeout(function() { - fn(new Error('is this caught?')); - }, 10); - }); - var info = url.parse('http://127.0.0.1/foo'); - info.agent = agent; - var req = http.get(info); - req.on('error', function(err) { - assert.equal('is this caught?', err.message); - done(); - }); - }); - }); - describe('artificial "streams"', function() { - it('should send a GET request', function(done) { - var stream = new events.EventEmitter(); - - // needed for the `http` module to call .write() on the stream - stream.writable = true; - - stream.write = function(str) { - assert(0 == str.indexOf('GET / HTTP/1.1')); - done(); - }; - - // needed for `http` module in Node.js 4 - stream.cork = function() {}; - - var opts = { - method: 'GET', - host: '127.0.0.1', - path: '/', - port: 80, - agent: new Agent(function(req, opts, fn) { - fn(null, stream); - }) - }; - var req = http.request(opts); - req.end(); - }); - it('should receive a GET response', function(done) { - var stream = new events.EventEmitter(); - var opts = { - method: 'GET', - host: '127.0.0.1', - path: '/', - port: 80, - agent: new Agent(function(req, opts, fn) { - fn(null, stream); - }) - }; - var req = http.request(opts, function(res) { - assert.equal('1.0', res.httpVersion); - assert.equal(200, res.statusCode); - assert.equal('bar', res.headers.foo); - assert.deepEqual(['1', '2'], res.headers['set-cookie']); - done(); - }); - - // have to wait for the "socket" event since `http.ClientRequest` - // doesn't *actually* attach the listeners to the "stream" until - // this happens - req.once('socket', function() { - var buf = Buffer.from( - 'HTTP/1.0 200\r\n' + - 'Foo: bar\r\n' + - 'Set-Cookie: 1\r\n' + - 'Set-Cookie: 2\r\n\r\n' - ); - stream.emit('data', buf); - }); - - req.end(); - }); - }); -}); - -describe('"http" module', function() { - var server; - var port; - - // setup test HTTP server - before(function(done) { - server = http.createServer(); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should work for basic HTTP requests', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - var socket = net.connect(opts); - fn(null, socket); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should support direct return in `connect()`', function(done) { - var called = false; - var agent = new Agent(function(req, opts) { - called = true; - return net.connect(opts); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should support returning a Promise in `connect()`', function(done) { - var called = false; - var agent = new Agent(function(req, opts) { - return new Promise(function(resolve, reject) { - called = true; - resolve(net.connect(opts)); - }); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should set the `Connection: close` response header', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - var socket = net.connect(opts); - fn(null, socket); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Url', req.url); - assert.equal('close', req.headers.connection); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/bar'); - info.agent = agent; - http.get(info, function(res) { - assert.equal('/bar', res.headers['x-url']); - assert.equal('close', res.headers.connection); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should pass through options from `http.request()`', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal('google.com', opts.host); - assert.equal('bar', opts.foo); - done(); - }); - - http.get({ - host: 'google.com', - foo: 'bar', - agent: agent - }); - }); - - it('should default to port 80', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal(80, opts.port); - done(); - }); - - // (probably) not hitting a real HTTP server here, - // so no need to add a httpServer request listener - http.get({ - host: '127.0.0.1', - path: '/foo', - agent: agent - }); - }); - - it('should support the "timeout" option', function(done) { - // ensure we timeout after the "error" event had a chance to trigger - this.timeout(1000); - this.slow(800); - - var agent = new Agent( - function(req, opts, fn) { - // this function will time out - }, - { timeout: 100 } - ); - - var opts = url.parse('http://nodejs.org'); - opts.agent = agent; - - var req = http.get(opts); - req.once('error', function(err) { - assert.equal('ETIMEOUT', err.code); - req.abort(); - done(); - }); - }); - - it('should free sockets after use', function(done) { - var agent = new Agent(function(req, opts, fn) { - var socket = net.connect(opts); - fn(null, socket); - }); - - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = agent; - http.get(info, function(res) { - res.socket.emit('free'); - assert.equal(true, res.socket.destroyed); - assert(gotReq); - done(); - }); - }); - - - describe('PassthroughAgent', function() { - it('should pass through to `http.globalAgent`', function(done) { - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('http://127.0.0.1:' + port + '/foo'); - info.agent = PassthroughAgent; - http.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - done(); - }); - }); - }); -}); - -describe('"https" module', function() { - var server; - var port; - - // setup test HTTPS server - before(function(done) { - var options = { - key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), - cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') - }; - server = https.createServer(options); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should not modify the passed in Options object', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - assert.equal(true, opts.secureEndpoint); - assert.equal(443, opts.port); - assert.equal('localhost', opts.host); - }); - var opts = { agent: agent }; - var req = https.request(opts); - assert.equal(true, called); - assert.equal(false, 'secureEndpoint' in opts); - assert.equal(false, 'port' in opts); - done(); - }); - - it('should work with a String URL', function(done) { - var endpoint = 'https://127.0.0.1:' + port; - var req = https.get(endpoint); - - // it's gonna error out since `rejectUnauthorized` is not being passed in - req.on('error', function(err) { - assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); - done(); - }); - }); - - it('should work for basic HTTPS requests', function(done) { - var called = false; - var agent = new Agent(function(req, opts, fn) { - called = true; - assert(opts.secureEndpoint); - var socket = tls.connect(opts); - fn(null, socket); - }); - - // add HTTPS server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('https://127.0.0.1:' + port + '/foo'); - info.agent = agent; - info.rejectUnauthorized = false; - https.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - assert(called); - done(); - }); - }); - - it('should pass through options from `https.request()`', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal('google.com', opts.host); - assert.equal('bar', opts.foo); - done(); - }); - - https.get({ - host: 'google.com', - foo: 'bar', - agent: agent - }); - }); - - it('should support the 3-argument `https.get()`', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal('google.com', opts.host); - assert.equal('/q', opts.pathname || opts.path); - assert.equal('881', opts.port); - assert.equal('bar', opts.foo); - done(); - }); - - https.get( - 'https://google.com:881/q', - { - host: 'google.com', - foo: 'bar', - agent: agent - } - ); - }); - - it('should default to port 443', function(done) { - var agent = new Agent(function(req, opts, fn) { - assert.equal(true, opts.secureEndpoint); - assert.equal(false, opts.rejectUnauthorized); - assert.equal(443, opts.port); - done(); - }); - - // (probably) not hitting a real HTTPS server here, - // so no need to add a httpsServer request listener - https.get({ - host: '127.0.0.1', - path: '/foo', - agent: agent, - rejectUnauthorized: false - }); - }); - - it('should not re-patch https.request', () => { - var patchModulePath = "../patch-core"; - var patchedRequest = https.request; - - delete require.cache[require.resolve(patchModulePath)]; - require(patchModulePath); - - assert.equal(patchedRequest, https.request); - assert.equal(true, https.request.__agent_base_https_request_patched__); - }); - - describe('PassthroughAgent', function() { - it('should pass through to `https.globalAgent`', function(done) { - // add HTTP server "request" listener - var gotReq = false; - server.once('request', function(req, res) { - gotReq = true; - res.setHeader('X-Foo', 'bar'); - res.setHeader('X-Url', req.url); - res.end(); - }); - - var info = url.parse('https://127.0.0.1:' + port + '/foo'); - info.agent = PassthroughAgent; - info.rejectUnauthorized = false; - https.get(info, function(res) { - assert.equal('bar', res.headers['x-foo']); - assert.equal('/foo', res.headers['x-url']); - assert(gotReq); - done(); - }); - }); - }); -}); - -describe('"ws" server', function() { - var wss; - var server; - var port; - - // setup test HTTP server - before(function(done) { - server = http.createServer(); - wss = new WebSocket.Server({ server: server }); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should work for basic WebSocket connections', function(done) { - function onconnection(ws) { - ws.on('message', function(data) { - assert.equal('ping', data); - ws.send('pong'); - }); - } - wss.on('connection', onconnection); - - var agent = new Agent(function(req, opts, fn) { - var socket = net.connect(opts); - fn(null, socket); - }); - - var client = new WebSocket('ws://127.0.0.1:' + port + '/', { - agent: agent - }); - - client.on('open', function() { - client.send('ping'); - }); - - client.on('message', function(data) { - assert.equal('pong', data); - client.close(); - wss.removeListener('connection', onconnection); - done(); - }); - }); -}); - -describe('"wss" server', function() { - var wss; - var server; - var port; - - // setup test HTTP server - before(function(done) { - var options = { - key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), - cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') - }; - server = https.createServer(options); - wss = new WebSocket.Server({ server: server }); - server.listen(0, function() { - port = server.address().port; - done(); - }); - }); - - // shut down test HTTP server - after(function(done) { - server.once('close', function() { - done(); - }); - server.close(); - }); - - it('should work for secure WebSocket connections', function(done) { - function onconnection(ws) { - ws.on('message', function(data) { - assert.equal('ping', data); - ws.send('pong'); - }); - } - wss.on('connection', onconnection); - - var agent = new Agent(function(req, opts, fn) { - var socket = tls.connect(opts); - fn(null, socket); - }); - - var client = new WebSocket('wss://127.0.0.1:' + port + '/', { - agent: agent, - rejectUnauthorized: false - }); - - client.on('open', function() { - client.send('ping'); - }); - - client.on('message', function(data) { - assert.equal('pong', data); - client.close(); - wss.removeListener('connection', onconnection); - done(); - }); - }); -}); diff --git a/test-eol-project/node_modules/ajv/.tonic_example.js b/test-eol-project/node_modules/ajv/.tonic_example.js deleted file mode 100644 index aa11812d..00000000 --- a/test-eol-project/node_modules/ajv/.tonic_example.js +++ /dev/null @@ -1,20 +0,0 @@ -var Ajv = require('ajv'); -var ajv = new Ajv({allErrors: true}); - -var schema = { - "properties": { - "foo": { "type": "string" }, - "bar": { "type": "number", "maximum": 3 } - } -}; - -var validate = ajv.compile(schema); - -test({"foo": "abc", "bar": 2}); -test({"foo": 2, "bar": 4}); - -function test(data) { - var valid = validate(data); - if (valid) console.log('Valid!'); - else console.log('Invalid: ' + ajv.errorsText(validate.errors)); -} \ No newline at end of file diff --git a/test-eol-project/node_modules/ajv/LICENSE b/test-eol-project/node_modules/ajv/LICENSE deleted file mode 100644 index 96ee7199..00000000 --- a/test-eol-project/node_modules/ajv/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017 Evgeny Poberezkin - -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/test-eol-project/node_modules/ajv/README.md b/test-eol-project/node_modules/ajv/README.md deleted file mode 100644 index 65077a0b..00000000 --- a/test-eol-project/node_modules/ajv/README.md +++ /dev/null @@ -1,1505 +0,0 @@ -Ajv logo - -# Ajv: Another JSON Schema Validator - -The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. - -[![Build Status](https://travis-ci.org/ajv-validator/ajv.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv) -[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) -[![npm (beta)](https://img.shields.io/npm/v/ajv/beta)](https://www.npmjs.com/package/ajv/v/7.0.0-beta.4) -[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) -[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master) -[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) -[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) - - -## Ajv v7 beta is released - -[Ajv version 7 (beta)](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes: - -- support of JSON Schema draft-2019-09 features: [`unevaluatedProperties`](./json-schema.md#unevaluatedproperties) and [`unevaluatedItems`](./json-schema.md#unevaluateditems), [dynamic recursive references](./validation.md#extending-recursive-schemas) and other [additional keywords](./json-schema.md#json-schema-draft-2019-09). -- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements. -- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe and to allow code optimization (compiled schema code size is reduced by more than 10%). -- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas. [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package was updated to use the new API (in [v4.0.0-beta.0](https://github.com/ajv-validator/ajv-keywords/releases/tag/v4.0.0-beta.0)) -- schemas are compiled to ES6 code (ES5 code generation is also supported with an option). -- to improve reliability and maintainability the code is migrated to TypeScript. - -**Please note**: - -- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021). -- all formats are separated to ajv-formats package - they have to be explicitely added if you use them. - -See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details. - -To install the new version: - -```bash -npm install ajv@beta -``` - -See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example. - - -## Mozilla MOSS grant and OpenJS Foundation - -[](https://www.mozilla.org/en-US/moss/)     [](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/) - -Ajv has been awarded a grant from Mozilla’s [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the “Foundational Technology” track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04). - -Ajv also joined [OpenJS Foundation](https://openjsf.org/) – having this support will help ensure the longevity and stability of Ajv for all its users. - -This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details. - -I am looking for the long term maintainers of Ajv – working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community. - - -## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin) - -Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant! - -Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released. - -Please sponsor Ajv via: -- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it) -- [Ajv Open Collective️](https://opencollective.com/ajv) - -Thank you. - - -#### Open Collective sponsors - - - - - - - - - - - - - - - -## Using version 6 - -[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. - -[Ajv version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). - -__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: - -```javascript -ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); -``` - -To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId: - -```javascript -var ajv = new Ajv({schemaId: 'id'}); -// If you want to use both draft-04 and draft-06/07 schemas: -// var ajv = new Ajv({schemaId: 'auto'}); -ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); -``` - - -## Contents - -- [Performance](#performance) -- [Features](#features) -- [Getting started](#getting-started) -- [Frequently Asked Questions](https://github.com/ajv-validator/ajv/blob/master/FAQ.md) -- [Using in browser](#using-in-browser) - - [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) -- [Command line interface](#command-line-interface) -- Validation - - [Keywords](#validation-keywords) - - [Annotation keywords](#annotation-keywords) - - [Formats](#formats) - - [Combining schemas with $ref](#ref) - - [$data reference](#data-reference) - - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) - - [Defining custom keywords](#defining-custom-keywords) - - [Asynchronous schema compilation](#asynchronous-schema-compilation) - - [Asynchronous validation](#asynchronous-validation) -- [Security considerations](#security-considerations) - - [Security contact](#security-contact) - - [Untrusted schemas](#untrusted-schemas) - - [Circular references in objects](#circular-references-in-javascript-objects) - - [Trusted schemas](#security-risks-of-trusted-schemas) - - [ReDoS attack](#redos-attack) -- Modifying data during validation - - [Filtering data](#filtering-data) - - [Assigning defaults](#assigning-defaults) - - [Coercing data types](#coercing-data-types) -- API - - [Methods](#api) - - [Options](#options) - - [Validation errors](#validation-errors) -- [Plugins](#plugins) -- [Related packages](#related-packages) -- [Some packages using Ajv](#some-packages-using-ajv) -- [Tests, Contributing, Changes history](#tests) -- [Support, Code of conduct, License](#open-source-software-support) - - -## Performance - -Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. - -Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: - -- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place -- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster -- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) -- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) - - -Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): - -[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) - - -## Features - -- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: - - all validation keywords (see [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md)) - - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) - - support of circular references between schemas - - correct string lengths for strings with unicode pairs (can be turned off) - - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off) - - [validates schemas against meta-schema](#api-validateschema) -- supports [browsers](#using-in-browser) and Node.js 0.10-14.x -- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation -- "All errors" validation mode with [option allErrors](#options) -- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages -- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package -- [filtering data](#filtering-data) from additional properties -- [assigning defaults](#assigning-defaults) to missing properties and items -- [coercing data](#coercing-data-types) to the types specified in `type` keywords -- [custom keywords](#defining-custom-keywords) -- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else` -- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail). -- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package -- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords -- [asynchronous validation](#asynchronous-validation) of custom formats and keywords - - -## Install - -``` -npm install ajv -``` - - -## Getting started - -Try it in the Node.js REPL: https://tonicdev.com/npm/ajv - - -The fastest validation call: - -```javascript -// Node.js require: -var Ajv = require('ajv'); -// or ESM/TypeScript import -import Ajv from 'ajv'; - -var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} -var validate = ajv.compile(schema); -var valid = validate(data); -if (!valid) console.log(validate.errors); -``` - -or with less code - -```javascript -// ... -var valid = ajv.validate(schema, data); -if (!valid) console.log(ajv.errors); -// ... -``` - -or - -```javascript -// ... -var valid = ajv.addSchema(schema, 'mySchema') - .validate('mySchema', data); -if (!valid) console.log(ajv.errorsText()); -// ... -``` - -See [API](#api) and [Options](#options) for more details. - -Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. - -The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). - -__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) - -__Note for TypeScript users__: `ajv` provides its own TypeScript declarations -out of the box, so you don't need to install the deprecated `@types/ajv` -module. - - -## Using in browser - -You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. - -If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). - -Then you need to load Ajv in the browser: -```html - -``` - -This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. - -The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). - -Ajv is tested with these browsers: - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) - -__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/ajv-validator/ajv/issues/234)). - - -### Ajv and Content Security Policies (CSP) - -If you're using Ajv to compile a schema (the typical use) in a browser document that is loaded with a Content Security Policy (CSP), that policy will require a `script-src` directive that includes the value `'unsafe-eval'`. -:warning: NOTE, however, that `unsafe-eval` is NOT recommended in a secure CSP[[1]](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval), as it has the potential to open the document to cross-site scripting (XSS) attacks. - -In order to make use of Ajv without easing your CSP, you can [pre-compile a schema using the CLI](https://github.com/ajv-validator/ajv-cli#compile-schemas). This will transpile the schema JSON into a JavaScript file that exports a `validate` function that works simlarly to a schema compiled at runtime. - -Note that pre-compilation of schemas is performed using [ajv-pack](https://github.com/ajv-validator/ajv-pack) and there are [some limitations to the schema features it can compile](https://github.com/ajv-validator/ajv-pack#limitations). A successfully pre-compiled schema is equivalent to the same schema compiled at runtime. - - -## Command line interface - -CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/ajv-cli). It supports: - -- compiling JSON Schemas to test their validity -- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/ajv-validator/ajv-pack)) -- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) -- validating data file(s) against JSON Schema -- testing expected validity of data against JSON Schema -- referenced schemas -- custom meta-schemas -- files in JSON, JSON5, YAML, and JavaScript format -- all Ajv options -- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format - - -## Validation keywords - -Ajv supports all validation keywords from draft-07 of JSON Schema standard: - -- [type](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#type) -- [for numbers](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf -- [for strings](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format -- [for arrays](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#contains) -- [for objects](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#propertynames) -- [for all types](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#const) -- [compound keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#ifthenelse) - -With [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: - -- [patternRequired](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. -- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. - -See [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md) for more details. - - -## Annotation keywords - -JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation. - -- `title` and `description`: information about the data represented by that schema -- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options). -- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults). -- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema. -- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.). -- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64". -- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png". - -__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance. - - -## Formats - -Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack). - -__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios. - -The following formats are implemented for string validation with "format" keyword: - -- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). -- _time_: time with optional time-zone. -- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). -- _uri_: full URI. -- _uri-reference_: URI reference, including full and relative URIs. -- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) -- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url). -- _email_: email address. -- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). -- _ipv4_: IP address v4. -- _ipv6_: IP address v6. -- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. -- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). -- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). -- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). - -__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here. - -There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, and `email`. See [Options](#options) for details. - -You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. - -The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allow specific format(s) that will be ignored. See [Options](#options) for details. - -You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js). - - -## Combining schemas with $ref - -You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. - -Example: - -```javascript -var schema = { - "$id": "http://example.com/schemas/schema.json", - "type": "object", - "properties": { - "foo": { "$ref": "defs.json#/definitions/int" }, - "bar": { "$ref": "defs.json#/definitions/str" } - } -}; - -var defsSchema = { - "$id": "http://example.com/schemas/defs.json", - "definitions": { - "int": { "type": "integer" }, - "str": { "type": "string" } - } -}; -``` - -Now to compile your schema you can either pass all schemas to Ajv instance: - -```javascript -var ajv = new Ajv({schemas: [schema, defsSchema]}); -var validate = ajv.getSchema('http://example.com/schemas/schema.json'); -``` - -or use `addSchema` method: - -```javascript -var ajv = new Ajv; -var validate = ajv.addSchema(defsSchema) - .compile(schema); -``` - -See [Options](#options) and [addSchema](#api) method. - -__Please note__: -- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). -- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). -- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. -- The actual location of the schema file in the file system is not used. -- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. -- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. -- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). - - -## $data reference - -With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema-org/json-schema-spec/issues/51) for more information about how it works. - -`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. - -The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). - -Examples. - -This schema requires that the value in property `smaller` is less or equal than the value in the property larger: - -```javascript -var ajv = new Ajv({$data: true}); - -var schema = { - "properties": { - "smaller": { - "type": "number", - "maximum": { "$data": "1/larger" } - }, - "larger": { "type": "number" } - } -}; - -var validData = { - smaller: 5, - larger: 7 -}; - -ajv.validate(schema, validData); // true -``` - -This schema requires that the properties have the same format as their field names: - -```javascript -var schema = { - "additionalProperties": { - "type": "string", - "format": { "$data": "0#" } - } -}; - -var validData = { - 'date-time': '1963-06-19T08:30:06.283185Z', - email: 'joe.bloggs@example.com' -} -``` - -`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. - - -## $merge and $patch keywords - -With the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). - -To add keywords `$merge` and `$patch` to Ajv instance use this code: - -```javascript -require('ajv-merge-patch')(ajv); -``` - -Examples. - -Using `$merge`: - -```json -{ - "$merge": { - "source": { - "type": "object", - "properties": { "p": { "type": "string" } }, - "additionalProperties": false - }, - "with": { - "properties": { "q": { "type": "number" } } - } - } -} -``` - -Using `$patch`: - -```json -{ - "$patch": { - "source": { - "type": "object", - "properties": { "p": { "type": "string" } }, - "additionalProperties": false - }, - "with": [ - { "op": "add", "path": "/properties/q", "value": { "type": "number" } } - ] - } -} -``` - -The schemas above are equivalent to this schema: - -```json -{ - "type": "object", - "properties": { - "p": { "type": "string" }, - "q": { "type": "number" } - }, - "additionalProperties": false -} -``` - -The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. - -See the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) for more information. - - -## Defining custom keywords - -The advantages of using custom keywords are: - -- allow creating validation scenarios that cannot be expressed using JSON Schema -- simplify your schemas -- help bringing a bigger part of the validation logic to your schemas -- make your schemas more expressive, less verbose and closer to your application domain -- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated - -If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). - -The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. - -You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. - -Ajv allows defining keywords with: -- validation function -- compilation function -- macro function -- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. - -Example. `range` and `exclusiveRange` keywords using compiled schema: - -```javascript -ajv.addKeyword('range', { - type: 'number', - compile: function (sch, parentSchema) { - var min = sch[0]; - var max = sch[1]; - - return parentSchema.exclusiveRange === true - ? function (data) { return data > min && data < max; } - : function (data) { return data >= min && data <= max; } - } -}); - -var schema = { "range": [2, 4], "exclusiveRange": true }; -var validate = ajv.compile(schema); -console.log(validate(2.01)); // true -console.log(validate(3.99)); // true -console.log(validate(2)); // false -console.log(validate(4)); // false -``` - -Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. - -See [Defining custom keywords](https://github.com/ajv-validator/ajv/blob/master/CUSTOM.md) for more details. - - -## Asynchronous schema compilation - -During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). - -Example: - -```javascript -var ajv = new Ajv({ loadSchema: loadSchema }); - -ajv.compileAsync(schema).then(function (validate) { - var valid = validate(data); - // ... -}); - -function loadSchema(uri) { - return request.json(uri).then(function (res) { - if (res.statusCode >= 400) - throw new Error('Loading error: ' + res.statusCode); - return res.body; - }); -} -``` - -__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. - - -## Asynchronous validation - -Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation - -You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). - -If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. - -__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. - -Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). - -Ajv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options). - -The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. - -Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. - - -Example: - -```javascript -var ajv = new Ajv; -// require('ajv-async')(ajv); - -ajv.addKeyword('idExists', { - async: true, - type: 'number', - validate: checkIdExists -}); - - -function checkIdExists(schema, data) { - return knex(schema.table) - .select('id') - .where('id', data) - .then(function (rows) { - return !!rows.length; // true if record is found - }); -} - -var schema = { - "$async": true, - "properties": { - "userId": { - "type": "integer", - "idExists": { "table": "users" } - }, - "postId": { - "type": "integer", - "idExists": { "table": "posts" } - } - } -}; - -var validate = ajv.compile(schema); - -validate({ userId: 1, postId: 19 }) -.then(function (data) { - console.log('Data is valid', data); // { userId: 1, postId: 19 } -}) -.catch(function (err) { - if (!(err instanceof Ajv.ValidationError)) throw err; - // data is invalid - console.log('Validation errors:', err.errors); -}); -``` - -### Using transpilers with asynchronous validation functions. - -[ajv-async](https://github.com/ajv-validator/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). - - -#### Using nodent - -```javascript -var ajv = new Ajv; -require('ajv-async')(ajv); -// in the browser if you want to load ajv-async bundle separately you can: -// window.ajvAsync(ajv); -var validate = ajv.compile(schema); // transpiled es7 async function -validate(data).then(successFunc).catch(errorFunc); -``` - - -#### Using other transpilers - -```javascript -var ajv = new Ajv({ processCode: transpileFunc }); -var validate = ajv.compile(schema); // transpiled es7 async function -validate(data).then(successFunc).catch(errorFunc); -``` - -See [Options](#options). - - -## Security considerations - -JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider. - - -##### Security contact - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues. - - -##### Untrusted schemas - -Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application. - -If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent: -- compiling schemas can cause stack overflow (if they are too deep) -- compiling schemas can be slow (e.g. [#557](https://github.com/ajv-validator/ajv/issues/557)) -- validating certain data can be slow - -It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords. - -Regardless the measures you take, using untrusted schemas increases security risks. - - -##### Circular references in JavaScript objects - -Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/ajv-validator/ajv/issues/802). - -An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references. - - -##### Security risks of trusted schemas - -Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to): - -- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)). -- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well. -- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate - -__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors). - -You can validate your JSON schemas against [this meta-schema](https://github.com/ajv-validator/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: - -```javascript -const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json')); - -const schema1 = {format: 'email'}; -isSchemaSecure(schema1); // false - -const schema2 = {format: 'email', maxLength: MAX_LENGTH}; -isSchemaSecure(schema2); // true -``` - -__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results. - - -##### Content Security Policies (CSP) -See [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) - - -## ReDoS attack - -Certain regular expressions can lead to the exponential evaluation time even with relatively short strings. - -Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example. - -__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following: - -- making assessment of "format" implementations in Ajv. -- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe). -- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method. -- disabling format validation by ignoring "format" keyword with option `format: false` - -Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios. - - -## Filtering data - -With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. - -This option modifies original data. - -Example: - -```javascript -var ajv = new Ajv({ removeAdditional: true }); -var schema = { - "additionalProperties": false, - "properties": { - "foo": { "type": "number" }, - "bar": { - "additionalProperties": { "type": "number" }, - "properties": { - "baz": { "type": "string" } - } - } - } -} - -var data = { - "foo": 0, - "additional1": 1, // will be removed; `additionalProperties` == false - "bar": { - "baz": "abc", - "additional2": 2 // will NOT be removed; `additionalProperties` != false - }, -} - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } -``` - -If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. - -If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). - -__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: - -```json -{ - "type": "object", - "oneOf": [ - { - "properties": { - "foo": { "type": "string" } - }, - "required": [ "foo" ], - "additionalProperties": false - }, - { - "properties": { - "bar": { "type": "integer" } - }, - "required": [ "bar" ], - "additionalProperties": false - } - ] -} -``` - -The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. - -With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). - -While this behaviour is unexpected (issues [#129](https://github.com/ajv-validator/ajv/issues/129), [#134](https://github.com/ajv-validator/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: - -```json -{ - "type": "object", - "properties": { - "foo": { "type": "string" }, - "bar": { "type": "integer" } - }, - "additionalProperties": false, - "oneOf": [ - { "required": [ "foo" ] }, - { "required": [ "bar" ] } - ] -} -``` - -The schema above is also more efficient - it will compile into a faster function. - - -## Assigning defaults - -With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. - -With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults. - -This option modifies original data. - -__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema. - - -Example 1 (`default` in `properties`): - -```javascript -var ajv = new Ajv({ useDefaults: true }); -var schema = { - "type": "object", - "properties": { - "foo": { "type": "number" }, - "bar": { "type": "string", "default": "baz" } - }, - "required": [ "foo", "bar" ] -}; - -var data = { "foo": 1 }; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": 1, "bar": "baz" } -``` - -Example 2 (`default` in `items`): - -```javascript -var schema = { - "type": "array", - "items": [ - { "type": "number" }, - { "type": "string", "default": "foo" } - ] -} - -var data = [ 1 ]; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // [ 1, "foo" ] -``` - -`default` keywords in other cases are ignored: - -- not in `properties` or `items` subschemas -- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/ajv-validator/ajv/issues/42)) -- in `if` subschema of `switch` keyword -- in schemas generated by custom macro keywords - -The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning). - - -## Coercing data types - -When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. - -This option modifies original data. - -__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. - - -Example 1: - -```javascript -var ajv = new Ajv({ coerceTypes: true }); -var schema = { - "type": "object", - "properties": { - "foo": { "type": "number" }, - "bar": { "type": "boolean" } - }, - "required": [ "foo", "bar" ] -}; - -var data = { "foo": "1", "bar": "false" }; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": 1, "bar": false } -``` - -Example 2 (array coercions): - -```javascript -var ajv = new Ajv({ coerceTypes: 'array' }); -var schema = { - "properties": { - "foo": { "type": "array", "items": { "type": "number" } }, - "bar": { "type": "boolean" } - } -}; - -var data = { "foo": "1", "bar": ["false"] }; - -var validate = ajv.compile(schema); - -console.log(validate(data)); // true -console.log(data); // { "foo": [1], "bar": false } -``` - -The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). - -See [Coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md) for details. - - -## API - -##### new Ajv(Object options) -> Object - -Create Ajv instance. - - -##### .compile(Object schema) -> Function<Object data> - -Generate validating function and cache the compiled schema for future use. - -Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema. - -The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options). - - -##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise - -Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: - -- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). -- a schema containing a missing reference is loaded, but the reference cannot be resolved. -- schema (or some loaded/referenced schema) is invalid. - -The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. - -You can asynchronously compile meta-schema by passing `true` as the second parameter. - -See example in [Asynchronous compilation](#asynchronous-schema-compilation). - - -##### .validate(Object schema|String key|String ref, data) -> Boolean - -Validate data using passed schema (it will be compiled and cached). - -Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. - -Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). - -__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. - -If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). - - -##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv - -Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. - -Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. - -Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. - - -Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. - -Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. - -By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. - -__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. -This allows you to do nice things like the following. - -```javascript -var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); -``` - -##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv - -Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). - -There is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. - - -##### .validateSchema(Object schema) -> Boolean - -Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. - -By default this method is called automatically when the schema is added, so you rarely need to use it directly. - -If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). - -If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. - -Errors will be available at `ajv.errors`. - - -##### .getSchema(String key) -> Function<Object data> - -Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. - - -##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv - -Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. - -Schema can be removed using: -- key passed to `addSchema` -- it's full reference (id) -- RegExp that should match schema id or key (meta-schemas won't be removed) -- actual schema object that will be stable-stringified to remove schema from cache - -If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. - - -##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv - -Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. - -Strings are converted to RegExp. - -Function should return validation result as `true` or `false`. - -If object is passed it should have properties `validate`, `compare` and `async`: - -- _validate_: a string, RegExp or a function as described above. -- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. -- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. -- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/ajv-validator/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. - -Custom formats can be also added via `formats` option. - - -##### .addKeyword(String keyword, Object definition) -> Ajv - -Add custom validation keyword to Ajv instance. - -Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. - -Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. -It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. - -Example Keywords: -- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. -- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc. -- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword - -Keyword definition is an object with the following properties: - -- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. -- _validate_: validating function -- _compile_: compiling function -- _macro_: macro function -- _inline_: compiling function that returns code (as string) -- _schema_: an optional `false` value used with "validate" keyword to not pass schema -- _metaSchema_: an optional meta-schema for keyword schema -- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation -- _modifying_: `true` MUST be passed if keyword modifies data -- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression) -- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. -- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). -- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. -- _errors_: an optional boolean or string `"full"` indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. - -_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. - -__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. - -See [Defining custom keywords](#defining-custom-keywords) for more details. - - -##### .getKeyword(String keyword) -> Object|Boolean - -Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. - - -##### .removeKeyword(String keyword) -> Ajv - -Removes custom or pre-defined keyword so you can redefine them. - -While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. - -__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. - - -##### .errorsText([Array<Object> errors [, Object options]]) -> String - -Returns the text with all errors in a String. - -Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). - - -## Options - -Defaults: - -```javascript -{ - // validation and reporting options: - $data: false, - allErrors: false, - verbose: false, - $comment: false, // NEW in Ajv version 6.0 - jsonPointers: false, - uniqueItems: true, - unicode: true, - nullable: false, - format: 'fast', - formats: {}, - unknownFormats: true, - schemas: {}, - logger: undefined, - // referenced schema options: - schemaId: '$id', - missingRefs: true, - extendRefs: 'ignore', // recommended 'fail' - loadSchema: undefined, // function(uri: string): Promise {} - // options to modify validated data: - removeAdditional: false, - useDefaults: false, - coerceTypes: false, - // strict mode options - strictDefaults: false, - strictKeywords: false, - strictNumbers: false, - // asynchronous validation options: - transpile: undefined, // requires ajv-async package - // advanced options: - meta: true, - validateSchema: true, - addUsedSchema: true, - inlineRefs: true, - passContext: false, - loopRequired: Infinity, - ownProperties: false, - multipleOfPrecision: false, - errorDataPath: 'object', // deprecated - messages: true, - sourceCode: false, - processCode: undefined, // function (str: string, schema: object): string {} - cache: new Cache, - serialize: undefined, - regExp: undefined // custom RegExp engine -} -``` - -##### Validation and reporting options - -- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). -- _allErrors_: check all rules collecting all errors. Default is to return after the first error. -- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). -- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values: - - `false` (default): ignore $comment keyword. - - `true`: log the keyword value to console. - - function: pass the keyword value, its schema path and root schema to the specified function -- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. -- _uniqueItems_: validate `uniqueItems` keyword (true by default). -- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. -- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/). -- _format_: formats validation mode. Option values: - - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option). - - `"full"` - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. - - `false` - ignore all format keywords. -- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. -- _keywords_: an object with custom keywords. Keys and values will be passed to `addKeyword` method. -- _unknownFormats_: handling of unknown formats. Option values: - - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. - - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. - - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification. -- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. -- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. See [Error logging](#error-logging). Option values: - - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. - - `false` - logging is disabled. - - -##### Referenced schema options - -- _schemaId_: this option defines which keywords are used as schema URI. Option value: - - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged). - - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). - - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. -- _missingRefs_: handling of missing referenced schemas. Option values: - - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). - - `"ignore"` - to log error during compilation and always pass validation. - - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. -- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: - - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. - - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. - - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). -- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). - - -##### Options to modify validated data - -- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: - - `false` (default) - not to remove additional properties - - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). - - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. - - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). -- _useDefaults_: replace missing or undefined properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: - - `false` (default) - do not use defaults - - `true` - insert defaults by value (object literal is used). - - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string). - - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. -- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md). Option values: - - `false` (default) - no type coercion. - - `true` - coerce scalar data types. - - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). - - -##### Strict mode options - -- _strictDefaults_: report ignored `default` keywords in schemas. Option values: - - `false` (default) - ignored defaults are not reported - - `true` - if an ignored default is present, throw an error - - `"log"` - if an ignored default is present, log warning -- _strictKeywords_: report unknown keywords in schemas. Option values: - - `false` (default) - unknown keywords are not reported - - `true` - if an unknown keyword is present, throw an error - - `"log"` - if an unknown keyword is present, log warning -- _strictNumbers_: validate numbers strictly, failing validation for NaN and Infinity. Option values: - - `false` (default) - NaN or Infinity will pass validation for numeric types - - `true` - NaN or Infinity will not pass validation for numeric types - -##### Asynchronous validation options - -- _transpile_: Requires [ajv-async](https://github.com/ajv-validator/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: - - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. - - `true` - always transpile with nodent. - - `false` - do not transpile; if async functions are not supported an exception will be thrown. - - -##### Advanced options - -- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. -- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: - - `true` (default) - if the validation fails, throw the exception. - - `"log"` - if the validation fails, log error. - - `false` - skip schema validation. -- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. -- _inlineRefs_: Affects compilation of referenced schemas. Option values: - - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. - - `false` - to not inline referenced schemas (they will be compiled as separate functions). - - integer number - to limit the maximum number of keywords of the schema that will be inlined. -- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. -- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. -- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. -- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/ajv-validator/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). -- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. -- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n)). -- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). -- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: - - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass a function calling `require('js-beautify').js_beautify` as `processCode: code => js_beautify(code)`. - - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. -- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. -- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. -- _regExp_: an optional function to create RegExp objects. This allows using a custom RegExp engine (e.g., [RE2](https://github.com/uhop/node-re2)) to mitigate ReDoS attacks. The function must have the signature `(pattern: string) => RegExpLike` where `RegExpLike` is an object with a `test(string) => boolean` method. Example with RE2: - ```javascript - var ajv = new Ajv({regExp: require('re2')}); - ``` - By default (`undefined`), native `RegExp` constructor is used. - - -## Validation errors - -In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. - - -### Error objects - -Each error is an object with the following properties: - -- _keyword_: validation keyword. -- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). -- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. -- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package). See below for parameters set by all keywords. -- _message_: the standard error message (can be excluded with option `messages` set to false). -- _schema_: the schema of the keyword (added with `verbose` option). -- _parentSchema_: the schema containing the keyword (added with `verbose` option) -- _data_: the data validated by the keyword (added with `verbose` option). - -__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. - - -### Error parameters - -Properties of `params` object in errors depend on the keyword that failed validation. - -- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). -- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). -- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). -- `dependencies` - properties: - - `property` (dependent property), - - `missingProperty` (required missing dependency - only the first one is reported currently) - - `deps` (required dependencies, comma separated list as a string), - - `depsCount` (the number of required dependencies). -- `format` - property `format` (the schema of the keyword). -- `maximum`, `minimum` - properties: - - `limit` (number, the schema of the keyword), - - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), - - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") -- `multipleOf` - property `multipleOf` (the schema of the keyword) -- `pattern` - property `pattern` (the schema of the keyword) -- `required` - property `missingProperty` (required property that is missing). -- `propertyNames` - property `propertyName` (an invalid property name). -- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). -- `type` - property `type` (required type(s), a string, can be a comma-separated list) -- `uniqueItems` - properties `i` and `j` (indices of duplicate items). -- `const` - property `allowedValue` pointing to the value (the schema of the keyword). -- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). -- `$ref` - property `ref` with the referenced schema URI. -- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes). -- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). - - -### Error logging - -Using the `logger` option when initiallizing Ajv will allow you to define custom logging. Here you can build upon the exisiting logging. The use of other logging packages is supported as long as the package or its associated wrapper exposes the required methods. If any of the required methods are missing an exception will be thrown. -- **Required Methods**: `log`, `warn`, `error` - -```javascript -var otherLogger = new OtherLogger(); -var ajv = new Ajv({ - logger: { - log: console.log.bind(console), - warn: function warn() { - otherLogger.logWarn.apply(otherLogger, arguments); - }, - error: function error() { - otherLogger.logError.apply(otherLogger, arguments); - console.error.apply(console, arguments); - } - } -}); -``` - - -## Plugins - -Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: - -- it exports a function -- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining -- this function can accept an optional configuration as the second parameter - -If you have published a useful plugin please submit a PR to add it to the next section. - - -## Related packages - -- [ajv-async](https://github.com/ajv-validator/ajv-async) - plugin to configure async validation mode -- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats -- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface -- [ajv-errors](https://github.com/ajv-validator/ajv-errors) - plugin for custom error messages -- [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) - internationalised error messages -- [ajv-istanbul](https://github.com/ajv-validator/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas -- [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) -- [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) - plugin with keywords $merge and $patch -- [ajv-pack](https://github.com/ajv-validator/ajv-pack) - produces a compact module exporting validation functions -- [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) - format validators for draft2019 that aren't already included in ajv (ie. `idn-hostname`, `idn-email`, `iri`, `iri-reference` and `duration`). - -## Some packages using Ajv - -- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser -- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services -- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition -- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator -- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org -- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com -- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js -- [table](https://github.com/gajus/table) - formats data into a string table -- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser -- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content -- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation -- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation -- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages -- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema -- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests -- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema -- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file -- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app -- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter -- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages -- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX -- [Spectral](https://github.com/stoplightio/spectral) - the customizable linting utility for JSON/YAML, OpenAPI, AsyncAPI, and JSON Schema - - -## Tests - -``` -npm install -git submodule update --init -npm test -``` - -## Contributing - -All validation functions are generated using doT templates in [dot](https://github.com/ajv-validator/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. - -`npm run build` - compiles templates to [dotjs](https://github.com/ajv-validator/ajv/tree/master/lib/dotjs) folder. - -`npm run watch` - automatically compiles templates when files in dot folder change - -Please see [Contributing guidelines](https://github.com/ajv-validator/ajv/blob/master/CONTRIBUTING.md) - - -## Changes history - -See https://github.com/ajv-validator/ajv/releases - -__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) - -[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). - -## Code of conduct - -Please review and follow the [Code of conduct](https://github.com/ajv-validator/ajv/blob/master/CODE_OF_CONDUCT.md). - -Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team. - - -## Open-source software support - -Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers. - - -## License - -[MIT](https://github.com/ajv-validator/ajv/blob/master/LICENSE) diff --git a/test-eol-project/node_modules/ajv/dist/ajv.bundle.js b/test-eol-project/node_modules/ajv/dist/ajv.bundle.js deleted file mode 100644 index 3243c9fc..00000000 --- a/test-eol-project/node_modules/ajv/dist/ajv.bundle.js +++ /dev/null @@ -1,7201 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-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-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} - -},{"./util":10}],5:[function(require,module,exports){ -'use strict'; - -var resolve = require('./resolve') - , util = require('./util') - , errorClasses = require('./error_classes') - , stableStringify = require('fast-json-stable-stringify'); - -var validateGenerator = require('../dotjs/validate'); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = require('fast-deep-equal'); - -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; - -module.exports = compile; - - -/** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function - */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; - - function patternCode(i, patterns) { - var regExpCode = opts.regExp ? 'regExp' : 'new RegExp'; - return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');'; - } - - root = root || { schema: schema, refVal: refVal, refs: refs }; - - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); - - var formats = this._formats; - var RULES = this.RULES; - - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } - - /* @this {*} - custom context, see passContext option */ - function callValidate() { - /* jshint validthis: true */ - var validate = compilation.validate; - var result = validate.apply(this, arguments); - callValidate.errors = validate.errors; - return result; - } - - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); - - var $async = _schema.$async === true; - - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); - - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - - if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'equal', - 'ucs2length', - 'ValidationError', - 'regExp', - sourceCode - ); - - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError, - opts.regExp - ); - - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } - - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } - - return validate; - } - - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } - - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } - - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } - - function removeLocalRef(ref) { - delete refs[ref]; - } - - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } - - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && !!refVal.$async }; - } - - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } - - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; - } - } - - function useCustomRule(rule, schema, parentSchema, it) { - if (self._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error('parent schema must have all required keywords: ' + deps.join(',')); - - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } - } - - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; - - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - - var index = customRules.length; - customRules[index] = validate; - - return { - code: 'customRule' + index, - validate: validate - }; - } -} - - -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} - - -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} - - -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } - } - return length; -}; - -},{}],10:[function(require,module,exports){ -'use strict'; - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: require('fast-deep-equal'), - ucs2length: require('./ucs2length'), - varOccurences: varOccurences, - varReplace: varReplace, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if (!($isData || typeof $schema == 'number' || $schema === undefined)) { - throw new Error($keyword + ' must be number'); - } - if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { - throw new Error($exclusiveKeyword + ' must be number or boolean'); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],14:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],15:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],16:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],17:[function(require,module,exports){ -'use strict'; -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - return out; -} - -},{}],18:[function(require,module,exports){ -'use strict'; -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - -},{}],19:[function(require,module,exports){ -'use strict'; -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} - -},{}],20:[function(require,module,exports){ -'use strict'; -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],21:[function(require,module,exports){ -'use strict'; -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - -},{}],22:[function(require,module,exports){ -'use strict'; -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += 'await '; - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - -},{}],24:[function(require,module,exports){ -'use strict'; -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],25:[function(require,module,exports){ -'use strict'; -module.exports = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],26:[function(require,module,exports){ -'use strict'; -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - -},{}],27:[function(require,module,exports){ -'use strict'; - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': require('./ref'), - allOf: require('./allOf'), - anyOf: require('./anyOf'), - '$comment': require('./comment'), - const: require('./const'), - contains: require('./contains'), - dependencies: require('./dependencies'), - 'enum': require('./enum'), - format: require('./format'), - 'if': require('./if'), - items: require('./items'), - maximum: require('./_limit'), - minimum: require('./_limit'), - maxItems: require('./_limitItems'), - minItems: require('./_limitItems'), - maxLength: require('./_limitLength'), - minLength: require('./_limitLength'), - maxProperties: require('./_limitProperties'), - minProperties: require('./_limitProperties'), - multipleOf: require('./multipleOf'), - not: require('./not'), - oneOf: require('./oneOf'), - pattern: require('./pattern'), - properties: require('./properties'), - propertyNames: require('./propertyNames'), - required: require('./required'), - uniqueItems: require('./uniqueItems'), - validate: require('./validate') -}; - -},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){ -'use strict'; -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - -},{}],29:[function(require,module,exports){ -'use strict'; -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],30:[function(require,module,exports){ -'use strict'; -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; -} - -},{}],31:[function(require,module,exports){ -'use strict'; -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - -},{}],32:[function(require,module,exports){ -'use strict'; -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; - if ($isData) { - out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($valid) + ') {'; - } else { - var $regexp = it.usePattern($schema); - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - -},{}],33:[function(require,module,exports){ -'use strict'; -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties).filter(notProto), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - - function notProto(p) { - return p !== '__proto__'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - -},{}],34:[function(require,module,exports){ -'use strict'; -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} - -},{}],37:[function(require,module,exports){ -'use strict'; -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - -},{}],38:[function(require,module,exports){ -'use strict'; -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; - } - out += ' if (' + ($coerced) + ' !== undefined) ; '; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == 'string') { - out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' else { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } if (' + ($coerced) + ' !== undefined) { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} - -},{}],39:[function(require,module,exports){ -'use strict'; - -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = require('./dotjs/custom'); -var definitionSchema = require('./definition_schema'); - -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword -}; - - -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); - - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); - - if (definition) { - this.validateKeyword(definition, true); - - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i=0; i 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} -function subexp(str) { - return "(?:" + str + ")"; -} -function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); -} -function toUpperCase(str) { - return str.toUpperCase(); -} -function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; -} -function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; -} - -function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), - //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), - //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), - //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), - //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), - //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), - //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), - //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), - //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -var URI_PROTOCOL = buildExps(false); - -var IRI_PROTOCOL = buildExps(true); - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - - - - - - - - - - - - - -var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}; - -/** Highest positive signed 32-bit float value */ - -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' - -/** Regular expressions */ -var regexPunycode = /^xn--/; -var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error$1(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); -}; - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -var digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -var decode = function decode(input) { - // Don't use UCS-2. - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (var j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - var oldi = i; - for (var w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error$1('invalid-input'); - } - - var digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - - w *= baseMinusT; - } - - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - - return String.fromCodePoint.apply(String, output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -var encode = function encode(input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - - // Handle the basic code points. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var basicLength = output.length; - var handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base;; /* no condition */k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -var SCHEMES = {}; -function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; -} -function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} - -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } -} -var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; -function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - //fix port number - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} - -function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} - -var RDS1 = /^\.\.?\//; -var RDS2 = /^\/\.(\/|$)/; -var RDS3 = /^\/\.\.(\/|$)/; -var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} - -function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) {} - //TODO: normalize IPv6 address as per RFC 5952 - - //if host component is a domain name - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - //convert IDN via punycode - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} - -function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} - -function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} - -function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} - -function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} - -function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); -} - -function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); -} - -var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - //normalize the default port - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; - -var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize -}; - -function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; -} -//RFC 6455 -var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse(components, options) { - var wsComponents = components; - //indicate if the secure flag is set - wsComponents.secure = isSecure(wsComponents); - //construct resouce name - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function serialize(wsComponents, options) { - //normalize the default port - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - //ensure scheme matches secure flag - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; - wsComponents.secure = undefined; - } - //reconstruct path from resource name - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split('?'), - _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), - path = _wsComponents$resourc2[0], - query = _wsComponents$resourc2[1]; - - wsComponents.path = path && path !== '/' ? path : undefined; - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - //forbid fragment component - wsComponents.fragment = undefined; - return wsComponents; - } -}; - -var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize -}; - -var O = {}; -var isIRI = true; -//RFC 3986 -var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -var UNRESERVED = new RegExp(UNRESERVED$$, "g"); -var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -var NOT_HFVALUE = NOT_HFNAME; -function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; -} -var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; - -var URN_PARSE = /^([^\:]+)\:(.*)/; -//RFC 2141 -var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } -}; - -var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -//RFC 4122 -var handler$6 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } -}; - -SCHEMES[handler.scheme] = handler; -SCHEMES[handler$1.scheme] = handler$1; -SCHEMES[handler$2.scheme] = handler$2; -SCHEMES[handler$3.scheme] = handler$3; -SCHEMES[handler$4.scheme] = handler$4; -SCHEMES[handler$5.scheme] = handler$5; -SCHEMES[handler$6.scheme] = handler$6; - -exports.SCHEMES = SCHEMES; -exports.pctEncChar = pctEncChar; -exports.pctDecChars = pctDecChars; -exports.parse = parse; -exports.removeDotSegments = removeDotSegments; -exports.serialize = serialize; -exports.resolveComponents = resolveComponents; -exports.resolve = resolve; -exports.normalize = normalize; -exports.equal = equal; -exports.escapeComponent = escapeComponent; -exports.unescapeComponent = unescapeComponent; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - - -},{}],"ajv":[function(require,module,exports){ -'use strict'; - -var compileSchema = require('./compile') - , resolve = require('./compile/resolve') - , Cache = require('./cache') - , SchemaObject = require('./compile/schema_obj') - , stableStringify = require('fast-json-stable-stringify') - , formats = require('./compile/formats') - , rules = require('./compile/rules') - , $dataMetaSchema = require('./data') - , util = require('./compile/util'); - -module.exports = Ajv; - -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; - -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; - -Ajv.prototype.compileAsync = require('./compile/async'); -var customKeyword = require('./keyword'); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = require('./compile/error_classes'); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; - -var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; - -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; -var META_SUPPORT_DATA = ['/properties']; - -/** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance - */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - - if (opts.formats) addInitialFormats(this); - if (opts.keywords) addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); - addInitialSchemas(this); -} - - - -/** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } - - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; -} - - -/** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function - */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); -} - - -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,e())})(function(){return function a(s,o,i){function n(r,e){if(!o[r]){if(!s[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);throw(e=new Error("Cannot find module '"+r+"'")).code="MODULE_NOT_FOUND",e}t=o[r]={exports:{}},s[r][0].call(t.exports,function(e){return n(s[r][1][e]||e)},t,t.exports,a,s,o,i)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,u=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,d=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(e){return a.copy(f[e="full"==e?"full":"fast"])}function m(e){var r,t,e=e.match(s);return!!e&&(t=+e[3],1<=(r=+e[2]))&&r<=12&&1<=t&&t<=(2!=r||(t=+e[1])%4!=0||t%100==0&&t%400!=0?o[r]:29)}function v(e,r){var t,a,s,e=e.match(i);return!!e&&(a=e[2],s=e[3],(t=e[1])<=23&&a<=59&&s<=59||23==t&&59==a&&60==s)&&(!r||e[5])}(r.exports=f).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":l,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:e,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:u,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":p},f.full={date:m,time:v,"date-time":function(e){e=e.split(y);return 2==e.length&&m(e[0])&&v(e[1],!0)},uri:function(e){return g.test(e)&&n.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(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:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:u,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":p};var y=/t|\s/i;var g=/\/|:/;var P=/[^\\]\\Z/;function E(e){if(P.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){var $=e("./resolve"),j=e("./util"),D=e("./error_classes"),O=e("fast-json-stable-stringify"),I=e("../dotjs/validate"),A=j.ucs2length,k=e("fast-deep-equal"),C=D.Validation;function L(e,i,n,r){var l=this,c=this._opts,u=[void 0],h={},d=[],t={},p=[],a={},f=[];function m(e,r){return"var pattern"+e+" = "+(c.regExp?"regExp":"new RegExp")+"("+j.toQuotedString(r[e])+");"}i=i||{schema:e,refVal:u,refs:h};var s=function(e,r,t){var a=N.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:(this._compilations[a=this._compilations.length]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,e,i,r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=E;var v=this._formats,y=this.RULES;try{var g=w(e,i,n,r),P=(o.validate=g,o.callValidate);return P&&(P.schema=g.schema,P.errors=null,P.refs=g.refs,P.refVal=g.refVal,P.root=g.root,P.$async=g.$async,c.sourceCode)&&(P.source=g.source),g}finally{!function(e,r,t){e=N.call(this,e,r,t);0<=e&&this._compilations.splice(e,1)}.call(this,e,i,r)}function E(){var e=o.validate,r=e.apply(this,arguments);return E.errors=e.errors,r}function w(e,r,t,a){var s=!r||r.schema==e;if(r.schema!=i.schema)return L.call(l,e,r,t,a);t=!0===e.$async,a=I({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:D.MissingRef,RULES:y,validate:I,util:j,resolve:$,resolveRef:b,usePattern:F,useDefault:x,useCustomRule:R,opts:c,formats:v,logger:l.logger,self:l}),a=Q(u,q)+Q(d,m)+Q(p,z)+Q(f,T)+a;c.processCode&&(a=c.processCode(a,e));try{var o=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError","regExp",a)(l,y,v,i,u,p,f,k,A,C,c.regExp);u[0]=o}catch(e){throw l.logger.error("Error compiling schema, function code:",a),e}return o.schema=e,o.errors=null,o.refs=h,o.refVal=u,o.root=s?o:r,t&&(o.$async=!0),!0===c.sourceCode&&(o.source={code:a,patterns:d,defaults:p}),o}function b(e,r,t){r=$.url(e,r);var a=h[r];if(void 0!==a)return _(s=u[a],o="refVal["+a+"]");if(!t&&i.refs){a=i.refs[r];if(void 0!==a)return _(s=i.refVal[a],o=S(r,s))}var s,o=S(r),t=$.call(l,w,i,r);if(void 0!==(t=void 0===t&&(a=n&&n[r])?$.inlineRef(a,c.inlineRefs)?a:L.call(l,a,i,n,e):t))return s=t,u[h[r]]=s,_(t,o);delete h[r]}function S(e,r){var t=u.length;return u[t]=r,"refVal"+(h[e]=t)}function _(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function F(e){var r=t[e];return void 0===r&&(r=t[e]=d.length,d[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return j.toQuotedString(e);case"object":var r,t;return null===e?"null":(r=O(e),void 0===(t=a[r])&&(t=a[r]=p.length,p[t]=e),"default"+t)}}function R(e,r,t,a){if(!1!==l._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));s=e.definition.validateSchema;if(s)if(!s(r)){s="keyword schema is invalid: "+l.errorsText(s.errors);if("log"!=l._opts.validateSchema)throw new Error(s);l.logger.error(s)}}var o,s=e.definition.compile,i=e.definition.inline,n=e.definition.macro;if(s)o=s.call(l,r,t,a);else if(n)o=n.call(l,r,t,a),!1!==c.validateSchema&&l.validateSchema(o,!0);else if(i)o=i.call(l,a,e.keyword,r,t);else if(!(o=e.definition.validate))return;if(void 0===o)throw new Error('custom keyword "'+e.keyword+'"failed to compile');s=f.length;return{code:"customRule"+s,validate:f[s]=o}}}function N(e,r,t){for(var a=0;a",S=g?">":"<",_=void 0;if(!v&&"number"!=typeof h&&void 0!==h)throw new Error(r+" must be number");if(!w&&void 0!==E&&"number"!=typeof E&&"boolean"!=typeof E)throw new Error(P+" must be number or boolean");w?(u=e.util.getData(E.$data,u,e.dataPathArr),o="exclIsNumber"+c,i="' + "+(n="op"+c)+" + '",_=P,(F=F||[]).push(l=l+(" var schemaExcl"+c+" = "+u+"; ")+(" var "+(a="exclusive"+c)+"; var "+(s="exclType"+c)+" = typeof "+(u="schemaExcl"+c)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { ")),l="",!1!==e.createErrors?(l+=" { keyword: '"+(_||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(l+=" , message: '"+P+" should be boolean' "),e.opts.verbose&&(l+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ",x=l,l=(l=F.pop())+(!e.compositeRule&&f?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+" } else if ( ",v&&(l+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),l+=" "+s+" == 'number' ? ( ("+a+" = "+y+" === undefined || "+u+" "+b+"= "+y+") ? "+m+" "+S+"= "+u+" : "+m+" "+S+" "+y+" ) : ( ("+a+" = "+u+" === true) ? "+m+" "+S+"= "+y+" : "+m+" "+S+" "+y+" ) || "+m+" !== "+m+") { var op"+c+" = "+a+" ? '"+b+"' : '"+b+"='; ",void 0===h&&(p=e.errSchemaPath+"/"+(_=P),y=u,v=w)):(i=b,(o="number"==typeof E)&&v?(n="'"+i+"'",l+=" if ( ",v&&(l+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),l+=" ( "+y+" === undefined || "+E+" "+b+"= "+y+" ? "+m+" "+S+"= "+E+" : "+m+" "+S+" "+y+" ) || "+m+" !== "+m+") { "):(o&&void 0===h?(a=!0,p=e.errSchemaPath+"/"+(_=P),y=E,S+="="):(o&&(y=Math[g?"min":"max"](E,h)),E===(!o||y)?(a=!0,p=e.errSchemaPath+"/"+(_=P),S+="="):(a=!1,i+="=")),n="'"+i+"'",l+=" if ( ",v&&(l+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),l+=" "+m+" "+S+" "+y+" || "+m+" !== "+m+") { ")),_=_||r;(F=F||[]).push(l),l="",!1!==e.createErrors?(l+=" { keyword: '"+(_||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { comparison: "+n+", limit: "+y+", exclusive: "+a+" } ",!1!==e.opts.messages&&(l=l+" , message: 'should be "+i+" "+(v?"' + "+y:y+"'")),e.opts.verbose&&(l=(l+=" , schema: ")+(v?"validate.schema"+d:""+h)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ";var F,x=l;return l=(l=F.pop())+(!e.compositeRule&&f?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+" } ",f&&(l+=" else { "),l}},{}],14:[function(e,r,t){r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data,i=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n;if(d||"number"==typeof n)return s+="if ( ",d&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),(o=[]).push(s+=" "+h+".length "+("maxItems"==(a=r)?">":"<")+" "+i+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s=(s=(s+=" , message: 'should NOT have ")+("maxItems"==r?"more":"fewer")+" than ")+(d?"' + "+i+" + '":""+n)+" items' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",a=s,s=(s=o.pop())+(!e.compositeRule&&u?e.async?" throw new ValidationError(["+a+"]); ":" validate.errors = ["+a+"]; return false; ":" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",u&&(s+=" else { "),s;throw new Error(r+" must be number")}},{}],15:[function(e,r,t){r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data,i=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n;if(d||"number"==typeof n)return s+="if ( ",d&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),(o=[]).push(s=s+(!1===e.opts.unicode?" "+h+".length ":" ucs2length("+h+") ")+(" "+("maxLength"==(a=r)?">":"<")+" "+i+") { ")),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s=(s=(s+=" , message: 'should NOT be ")+("maxLength"==r?"longer":"shorter")+" than ")+(d?"' + "+i+" + '":""+n)+" characters' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",a=s,s=(s=o.pop())+(!e.compositeRule&&u?e.async?" throw new ValidationError(["+a+"]); ":" validate.errors = ["+a+"]; return false; ":" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",u&&(s+=" else { "),s;throw new Error(r+" must be number")}},{}],16:[function(e,r,t){r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,h="data"+(i||""),d=e.opts.$data&&n&&n.$data,i=d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ","schema"+o):n;if(d||"number"==typeof n)return s+="if ( ",d&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),(o=[]).push(s+=" Object.keys("+h+").length "+("maxProperties"==(a=r)?">":"<")+" "+i+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(a||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s=(s=(s+=" , message: 'should NOT have ")+("maxProperties"==r?"more":"fewer")+" than ")+(d?"' + "+i+" + '":""+n)+" properties' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",a=s,s=(s=o.pop())+(!e.compositeRule&&u?e.async?" throw new ValidationError(["+a+"]); ":" validate.errors = ["+a+"]; return false; ":" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",u&&(s+=" else { "),s;throw new Error(r+" must be number")}},{}],17:[function(e,r,t){r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),c="",u=(l.level++,"valid"+l.level),h=l.baseId,d=!0,p=s;if(p)for(var f,m=-1,v=p.length-1;m "+w+") { ",S=u+"["+w+"]",h.schema=F,h.schemaPath=n+"["+w+"]",h.errSchemaPath=l+"/"+w,h.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0),h.dataPathArr[f]=w,_=e.validate(h),h.baseId=v,e.util.varOccurences(_,m)<2?a+=" "+e.util.varReplace(_,m,S)+" ":a+=" var "+m+" = "+S+"; "+_+" ",a+=" } ",c)&&(a+=" if ("+p+") { ",d+="}")}"object"==typeof P&&(e.opts.strictKeywords?"object"==typeof P&&0 "+i.length+") { for (var "+s+" = "+i.length+"; "+s+" < "+u+".length; "+s+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,s,e.opts.jsonPointers,!0),S=u+"["+s+"]",h.dataPathArr[f]=s,_=e.validate(h),h.baseId=v,e.util.varOccurences(_,m)<2?a+=" "+e.util.varReplace(_,m,S)+" ":a+=" var "+m+" = "+S+"; "+_+" ",c&&(a+=" if (!"+p+") break; "),a+=" } } ",c)&&(a+=" if ("+p+") { ",d+="}")}else(e.opts.strictKeywords?"object"==typeof i&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+s+" !== parseInt(division"+s+") ")+" ) ",h&&(a+=" ) ");r=[],r.push(a+=" ) { "),a="",!1!==e.createErrors?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+o+" } ",!1!==e.opts.messages&&(a=a+" , message: 'should be multiple of "+(h?"' + "+o:o+"'")),e.opts.verbose&&(a=(a+=" , schema: ")+(h?"validate.schema"+n:""+i)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",s=a;return a=(a=r.pop())+(!e.compositeRule&&c?e.async?" throw new ValidationError(["+s+"]); ":" validate.errors = ["+s+"]; return false; ":" var err = "+s+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+"} ",c&&(a+=" else { "),a}},{}],30:[function(e,r,t){r.exports=function(e,r,t){var a,s,o=" ",i=e.level,n=e.dataLevel,l=e.schema[r],c=e.schemaPath+e.util.getProperty(r),r=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,n="data"+(n||""),i="errs__"+i,h=e.util.copy(e),d=(h.level++,"valid"+h.level);return(e.opts.strictKeywords?"object"==typeof l&&0 1) { ",o=e.schema.items&&e.schema.items.type,i=Array.isArray(o),!o||"object"==o||"array"==o||i&&(0<=o.indexOf("object")||0<=o.indexOf("array"))?s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+h+" = false; break outer; } } } ":(s=(s+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ")+" if ("+e.util["checkDataType"+(i?"s":"")](o,"item",e.opts.strictNumbers,!0)+") continue; ",i&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),s+=" } ",d&&(s+=" } "),(a=a||[]).push(s+=" if (!"+h+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(r)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s=(s+=" , schema: ")+(d?"validate.schema"+l:""+n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ",o=s,s=(s=a.pop())+(!e.compositeRule&&c?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ")+" } ",c&&(s+=" else { ")):c&&(s+=" if (true) { "),s}},{}],38:[function(e,r,t){r.exports=function(a,e,L){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){i="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(i);a.logger.warn(i)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o)&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ "),"boolean"==typeof a.schema||!s&&!a.schema.$ref)l=a.level,c=a.dataLevel,j=a.schema[e="false schema"],E=a.schemaPath+a.util.getProperty(e),w=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,u="data"+(c||""),d="valid"+l,!1===a.schema?(a.isTop?p=!0:r+=" var "+d+" = false; ",(k=k||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",R=r,r=k.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+R+"]); ":" validate.errors = ["+R+"]; return false; ":" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+d+" = true; ",a.isTop&&(r+=" }; return validate; ");else{if(a.isTop){var n=a.isTop,l=a.level=0,c=a.dataLevel=0,u="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var h="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(h);a.logger.warn(h)}r=(r+=" var vErrors = null; ")+" var errors = 0; "+" if (rootData === undefined) rootData = data; "}else{l=a.level,u="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var d="valid"+l,p=!a.opts.allErrors,f="",m="",v=a.schema.type,y=Array.isArray(v);if(v&&a.opts.nullable&&!0===a.schema.nullable&&(y?-1==v.indexOf("null")&&(v=v.concat("null")):"null"!=v&&(v=[v,"null"],y=!0)),y&&1==v.length&&(v=v[0],y=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),v){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,v));var g,P=a.RULES.types[v];if(g||y||!0===P||P&&!B(P)){var E=a.schemaPath+".type",w=a.errSchemaPath+"/type",E=a.schemaPath+".type",w=a.errSchemaPath+"/type";if(r+=" if ("+a.util[y?"checkDataTypes":"checkDataType"](v,u,a.opts.strictNumbers,!0)+") { ",g){var b="dataType"+l,S="coerced"+l,_=(r+=" var "+b+" = typeof "+u+"; var "+S+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+b+" == 'object' && Array.isArray("+u+") && "+u+".length == 1) { "+u+" = "+u+"[0]; "+b+" = typeof "+u+"; if ("+a.util.checkDataType(a.schema.type,u,a.opts.strictNumbers)+") "+S+" = "+u+"; } "),r+=" if ("+S+" !== undefined) ; ",g);if(_)for(var F,x=-1,N=_.length-1;x{for(var r=e.implements,t=0;t= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=I-1,k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(Q[e])}function t(e,r){var t=e.split("@"),a="",t=(1{for(var t=[],a=e.length;a--;)t[a]=r(e[a]);return t})(t,r).join(".")}function V(e){for(var r=[],t=0,a=e.length;t>1,e+=k(e/r);s*A>>1k((O-a)/u))&&L("overflow"),a+=d*u,h<=o?1:o+A<=h?A:h-o);if(dk(O/d)&&L("overflow"),u*=d}var f=r.length+1,o=z(a-c,f,0==c);k(a/f)>O-s&&L("overflow"),s+=k(a/f),a%=f,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function H(e){var r=[],t=(e=V(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((O-s)/w)&&L("overflow"),s+=(f-a)*w,a=f,!0),v=!1,y=void 0;try{for(var S,_=e[Symbol.iterator]();!(b=(S=_.next()).done);b=!0){var F=S.value;if(FO&&L("overflow"),F==a){for(var x=s,R=I;;R+=I){var $=R<=o?1:o+A<=R?A:R-o;if(x<$)break;var j=x-$,D=I-$;r.push(C(N($+j%D,0))),x=k(j/D)}r.push(C(N(x,0))),o=z(s,w,p==d),s=0,++p}}}catch(e){v=!0,y=e}finally{try{!b&&_.return&&_.return()}finally{if(v)throw y}}++s,++a}return r.join("")}var v=function(e){return t(e,function(e){return q.test(e)?"xn--"+H(e):e})},M=function(e){return t(e,function(e){return D.test(e)?U(e.slice(4).toLowerCase()):e})},c={};function f(e){e=e.charCodeAt(0);return e<16?"%0"+e.toString(16).toUpperCase():e<128?"%"+e.toString(16).toUpperCase():e<2048?"%"+(e>>6|192).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase():"%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase()}function u(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]'),se=new RegExp(_,"g"),x=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),oe=new RegExp(g("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',F),"g"),ie=new RegExp(g("[^]",_,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ne=ie;function R(e){var r=u(e);return r.match(se)?r:e}var F={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n{var t=e;if(r)for(var a in r)t[a]=r[a];return t})({scheme:"null"},t),i(X(o(e,t),o(r,t),t,!0),t)},e.normalize=function(e,r){return"string"==typeof e?e=i(o(e,r),r):"object"===a(e)&&(e=o(i(e,r),r)),e},e.equal=function(e,r,t){return"string"==typeof e?e=i(o(e,t),t):"object"===a(e)&&(e=i(e,t)),"string"==typeof r?r=i(o(r,t),t):"object"===a(r)&&(r=i(r,t)),e===r},e.escapeComponent=function(e,r){return e&&e.toString().replace((r&&r.iri?l:n).ESCAPE,f)},e.unescapeComponent=w,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof t&&void 0!==r?t:a.URI=a.URI||{})},{}],ajv:[function(h,e,r){var i=h("./compile"),l=h("./compile/resolve"),d=h("./cache"),c=h("./compile/schema_obj"),p=h("fast-json-stable-stringify"),f=h("./compile/formats"),m=h("./compile/rules"),v=h("./data"),y=h("./compile/util"),e=((e.exports=w).prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{e=this._addSchema(e);t=e.validate||this._compile(e)}e=t(r);!0!==t.$async&&(this.errors=t.errors);return e},w.prototype.compile=function(e,r){e=this._addSchema(e,void 0,r);return e.validate||this._compile(e)},w.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e))for(var s=0;s{var r=e._opts.meta;return e._opts.defaultMeta="object"==typeof r?e._getId(r)||r:e.getSchema(g)?g:void 0,e._opts.defaultMeta})(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);t=this.validate(t,e);if(!t&&r){e="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(e);this.logger.error(e)}return t},w.prototype.getSchema=function(e){var r=t(this,e);switch(typeof r){case"object":return r.validate||this._compile(r);case"string":return this.getSchema(r);case"undefined":return((e,r)=>{var t,a,s,o=l.schema.call(e,{schema:{}},r);if(o)return s=i.call(e,t=o.schema,a=o.root,void 0,o=o.baseId),e._fragments[r]=new c({ref:r,fragment:!0,schema:t,root:a,baseId:o,validate:s}),s})(this,e)}},w.prototype.removeSchema=function(e){if(e instanceof RegExp)a(this,this._schemas,e),a(this,this._refs,e);else switch(typeof e){case"undefined":return a(this,this._schemas),a(this,this._refs),this._cache.clear(),this;case"string":var r=t(this,e);return r&&this._cache.del(r.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":r=this._opts.serialize,r=r?r(e):e,r=(this._cache.del(r),this._getId(e));r&&(r=l.normalizeId(r),delete this._schemas[r],delete this._refs[r])}return this},w.prototype.addFormat=function(e,r){"string"==typeof r&&(r=new RegExp(r));return this._formats[e]=r,this},w.prototype.errorsText=function(e,r){if(!(e=e||this.errors))return"No errors";for(var t=void 0===(r=r||{}).separator?", ":r.separator,a=void 0===r.dataVar?"data":r.dataVar,s="",o=0;o{switch(e.schemaId){case"auto":return _;case"id":return b;default:return S}})(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=p),this._metaOpts=(e=>{for(var r=y.copy(e._opts),t=0;t); - - message: string; - errors: Array; - ajv: true; - validation: true; - } - - class MissingRefError extends Error { - constructor(baseId: string, ref: string, message?: string); - static message: (baseId: string, ref: string) => string; - - message: string; - missingRef: string; - missingSchema: string; - } -} - -declare namespace ajv { - type ValidationError = AjvErrors.ValidationError; - - type MissingRefError = AjvErrors.MissingRefError; - - interface Ajv { - /** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default). - * @param {string|object|Boolean} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ - validate(schemaKeyRef: object | string | boolean, data: any): boolean | PromiseLike; - /** - * Create validating function for passed schema. - * @param {object|Boolean} schema schema object - * @return {Function} validating function - */ - compile(schema: object | boolean): ValidateFunction; - /** - * Creates validating function for passed schema with asynchronous loading of missing schemas. - * `loadSchema` option should be a function that accepts schema uri and node-style callback. - * @this Ajv - * @param {object|Boolean} schema schema object - * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped - * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function. - * @return {PromiseLike} validating function - */ - compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike; - /** - * Adds schema to the instance. - * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @return {Ajv} this for method chaining - */ - addSchema(schema: Array | object, key?: string): Ajv; - /** - * Add schema that will be used to validate other schemas - * options in META_IGNORE_OPTIONS are alway set to false - * @param {object} schema schema object - * @param {string} key optional schema key - * @return {Ajv} this for method chaining - */ - addMetaSchema(schema: object, key?: string): Ajv; - /** - * Validate schema - * @param {object|Boolean} schema schema to validate - * @return {Boolean} true if schema is valid - */ - validateSchema(schema: object | boolean): boolean; - /** - * Get compiled schema from the instance by `key` or `ref`. - * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). - * @return {Function} schema validating function (with property `schema`). Returns undefined if keyRef can't be resolved to an existing schema. - */ - getSchema(keyRef: string): ValidateFunction | undefined; - /** - * Remove cached schema(s). - * If no parameter is passed all schemas but meta-schemas are removed. - * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. - * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. - * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object - * @return {Ajv} this for method chaining - */ - removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; - /** - * Add custom format - * @param {string} name format name - * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) - * @return {Ajv} this for method chaining - */ - addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; - /** - * Define custom keyword - * @this Ajv - * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. - * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ - addKeyword(keyword: string, definition: KeywordDefinition): Ajv; - /** - * Get keyword definition - * @this Ajv - * @param {string} keyword pre-defined or custom keyword. - * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. - */ - getKeyword(keyword: string): object | boolean; - /** - * Remove keyword - * @this Ajv - * @param {string} keyword pre-defined or custom keyword. - * @return {Ajv} this for method chaining - */ - removeKeyword(keyword: string): Ajv; - /** - * Validate keyword - * @this Ajv - * @param {object} definition keyword definition object - * @param {boolean} throwError true to throw exception if definition is invalid - * @return {boolean} validation result - */ - validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean; - /** - * Convert array of error message objects to string - * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {object} options optional options with properties `separator` and `dataVar`. - * @return {string} human readable string with all errors descriptions - */ - errorsText(errors?: Array | null, options?: ErrorsTextOptions): string; - errors?: Array | null; - _opts: Options; - } - - interface CustomLogger { - log(...args: any[]): any; - warn(...args: any[]): any; - error(...args: any[]): any; - } - - interface ValidateFunction { - ( - data: any, - dataPath?: string, - parentData?: object | Array, - parentDataProperty?: string | number, - rootData?: object | Array - ): boolean | PromiseLike; - schema?: object | boolean; - errors?: null | Array; - refs?: object; - refVal?: Array; - root?: ValidateFunction | object; - $async?: true; - source?: object; - } - - interface Options { - $data?: boolean; - allErrors?: boolean; - verbose?: boolean; - jsonPointers?: boolean; - uniqueItems?: boolean; - unicode?: boolean; - format?: false | string; - formats?: object; - keywords?: object; - unknownFormats?: true | string[] | 'ignore'; - schemas?: Array | object; - schemaId?: '$id' | 'id' | 'auto'; - missingRefs?: true | 'ignore' | 'fail'; - extendRefs?: true | 'ignore' | 'fail'; - loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike; - removeAdditional?: boolean | 'all' | 'failing'; - useDefaults?: boolean | 'empty' | 'shared'; - coerceTypes?: boolean | 'array'; - strictDefaults?: boolean | 'log'; - strictKeywords?: boolean | 'log'; - strictNumbers?: boolean; - async?: boolean | string; - transpile?: string | ((code: string) => string); - meta?: boolean | object; - validateSchema?: boolean | 'log'; - addUsedSchema?: boolean; - inlineRefs?: boolean | number; - passContext?: boolean; - loopRequired?: number; - ownProperties?: boolean; - multipleOfPrecision?: boolean | number; - errorDataPath?: string, - messages?: boolean; - sourceCode?: boolean; - processCode?: (code: string, schema: object) => string; - cache?: object; - logger?: CustomLogger | false; - nullable?: boolean; - serialize?: ((schema: object | boolean) => any) | false; - regExp?: (pattern: string) => RegExpLike; - } - - interface RegExpLike { - test: (s: string) => boolean; - } - - type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike); - type NumberFormatValidator = ((data: number) => boolean | PromiseLike); - - interface NumberFormatDefinition { - type: "number", - validate: NumberFormatValidator; - compare?: (data1: number, data2: number) => number; - async?: boolean; - } - - interface StringFormatDefinition { - type?: "string", - validate: FormatValidator; - compare?: (data1: string, data2: string) => number; - async?: boolean; - } - - type FormatDefinition = NumberFormatDefinition | StringFormatDefinition; - - interface KeywordDefinition { - type?: string | Array; - async?: boolean; - $data?: boolean; - errors?: boolean | string; - metaSchema?: object; - // schema: false makes validate not to expect schema (ValidateFunction) - schema?: boolean; - statements?: boolean; - dependencies?: Array; - modifying?: boolean; - valid?: boolean; - // one and only one of the following properties should be present - validate?: SchemaValidateFunction | ValidateFunction; - compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction; - macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean; - inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string; - } - - interface CompilationContext { - level: number; - dataLevel: number; - dataPathArr: string[]; - schema: any; - schemaPath: string; - baseId: string; - async: boolean; - opts: Options; - formats: { - [index: string]: FormatDefinition | undefined; - }; - keywords: { - [index: string]: KeywordDefinition | undefined; - }; - compositeRule: boolean; - validate: (schema: object) => boolean; - util: { - copy(obj: any, target?: any): any; - toHash(source: string[]): { [index: string]: true | undefined }; - equal(obj: any, target: any): boolean; - getProperty(str: string): string; - schemaHasRules(schema: object, rules: any): string; - escapeQuotes(str: string): string; - toQuotedString(str: string): string; - getData(jsonPointer: string, dataLevel: number, paths: string[]): string; - escapeJsonPointer(str: string): string; - unescapeJsonPointer(str: string): string; - escapeFragment(str: string): string; - unescapeFragment(str: string): string; - }; - self: Ajv; - } - - interface SchemaValidateFunction { - ( - schema: any, - data: any, - parentSchema?: object, - dataPath?: string, - parentData?: object | Array, - parentDataProperty?: string | number, - rootData?: object | Array - ): boolean | PromiseLike; - errors?: Array; - } - - interface ErrorsTextOptions { - separator?: string; - dataVar?: string; - } - - interface ErrorObject { - keyword: string; - dataPath: string; - schemaPath: string; - params: ErrorParameters; - // Added to validation errors of propertyNames keyword schema - propertyName?: string; - // Excluded if messages set to false. - message?: string; - // These are added with the `verbose` option. - schema?: any; - parentSchema?: object; - data?: any; - } - - type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | - DependenciesParams | FormatParams | ComparisonParams | - MultipleOfParams | PatternParams | RequiredParams | - TypeParams | UniqueItemsParams | CustomParams | - PatternRequiredParams | PropertyNamesParams | - IfParams | SwitchParams | NoParams | EnumParams; - - interface RefParams { - ref: string; - } - - interface LimitParams { - limit: number; - } - - interface AdditionalPropertiesParams { - additionalProperty: string; - } - - interface DependenciesParams { - property: string; - missingProperty: string; - depsCount: number; - deps: string; - } - - interface FormatParams { - format: string - } - - interface ComparisonParams { - comparison: string; - limit: number | string; - exclusive: boolean; - } - - interface MultipleOfParams { - multipleOf: number; - } - - interface PatternParams { - pattern: string; - } - - interface RequiredParams { - missingProperty: string; - } - - interface TypeParams { - type: string; - } - - interface UniqueItemsParams { - i: number; - j: number; - } - - interface CustomParams { - keyword: string; - } - - interface PatternRequiredParams { - missingPattern: string; - } - - interface PropertyNamesParams { - propertyName: string; - } - - interface IfParams { - failingKeyword: string; - } - - interface SwitchParams { - caseIndex: number; - } - - interface NoParams { } - - interface EnumParams { - allowedValues: Array; - } -} - -export = ajv; diff --git a/test-eol-project/node_modules/ajv/lib/ajv.js b/test-eol-project/node_modules/ajv/lib/ajv.js deleted file mode 100644 index 06a45b65..00000000 --- a/test-eol-project/node_modules/ajv/lib/ajv.js +++ /dev/null @@ -1,506 +0,0 @@ -'use strict'; - -var compileSchema = require('./compile') - , resolve = require('./compile/resolve') - , Cache = require('./cache') - , SchemaObject = require('./compile/schema_obj') - , stableStringify = require('fast-json-stable-stringify') - , formats = require('./compile/formats') - , rules = require('./compile/rules') - , $dataMetaSchema = require('./data') - , util = require('./compile/util'); - -module.exports = Ajv; - -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; - -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; - -Ajv.prototype.compileAsync = require('./compile/async'); -var customKeyword = require('./keyword'); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = require('./compile/error_classes'); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; - -var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; - -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; -var META_SUPPORT_DATA = ['/properties']; - -/** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance - */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); - - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); - - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); - - if (opts.formats) addInitialFormats(this); - if (opts.keywords) addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); - addInitialSchemas(this); -} - - - -/** - * Validate data using schema - * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } - - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; -} - - -/** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function - */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); -} - - -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25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{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} diff --git a/test-eol-project/node_modules/ajv/lib/compile/index.js b/test-eol-project/node_modules/ajv/lib/compile/index.js deleted file mode 100644 index 32169902..00000000 --- a/test-eol-project/node_modules/ajv/lib/compile/index.js +++ /dev/null @@ -1,389 +0,0 @@ -'use strict'; - -var resolve = require('./resolve') - , util = require('./util') - , errorClasses = require('./error_classes') - , stableStringify = require('fast-json-stable-stringify'); - -var validateGenerator = require('../dotjs/validate'); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = require('fast-deep-equal'); - -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; - -module.exports = compile; - - -/** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function - */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; - - function patternCode(i, patterns) { - var regExpCode = opts.regExp ? 'regExp' : 'new RegExp'; - return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');'; - } - - root = root || { schema: schema, refVal: refVal, refs: refs }; - - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); - - var formats = this._formats; - var RULES = this.RULES; - - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } - - /* @this {*} - custom context, see passContext option */ - function callValidate() { - /* jshint validthis: true */ - var validate = compilation.validate; - var result = validate.apply(this, arguments); - callValidate.errors = validate.errors; - return result; - } - - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); - - var $async = _schema.$async === true; - - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); - - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - - if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'equal', - 'ucs2length', - 'ValidationError', - 'regExp', - sourceCode - ); - - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError, - opts.regExp - ); - - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } - - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } - - return validate; - } - - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } - - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } - - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } - - function removeLocalRef(ref) { - delete refs[ref]; - } - - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } - - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && !!refVal.$async }; - } - - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } - - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; - } - } - - function useCustomRule(rule, schema, parentSchema, it) { - if (self._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error('parent schema must have all required keywords: ' + deps.join(',')); - - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } - } - - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; - - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - - var index = customRules.length; - customRules[index] = validate; - - return { - code: 'customRule' + index, - validate: validate - }; - } -} - - -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} - - -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} - - -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } - } - return length; -}; diff --git a/test-eol-project/node_modules/ajv/lib/compile/util.js b/test-eol-project/node_modules/ajv/lib/compile/util.js deleted file mode 100644 index ef07b8c7..00000000 --- a/test-eol-project/node_modules/ajv/lib/compile/util.js +++ /dev/null @@ -1,239 +0,0 @@ -'use strict'; - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: require('fast-deep-equal'), - ucs2length: require('./ucs2length'), - varOccurences: varOccurences, - varReplace: varReplace, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i' - , $notOp = $isMax ? '>' : '<' - , $errorKeyword = undefined; - - if (!($isData || typeof $schema == 'number' || $schema === undefined)) { - throw new Error($keyword + ' must be number'); - } - if (!($isDataExcl || $schemaExcl === undefined - || typeof $schemaExcl == 'number' - || typeof $schemaExcl == 'boolean')) { - throw new Error($exclusiveKeyword + ' must be number or boolean'); - } -}} - -{{? $isDataExcl }} - {{ - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) - , $exclusive = 'exclusive' + $lvl - , $exclType = 'exclType' + $lvl - , $exclIsNumber = 'exclIsNumber' + $lvl - , $opExpr = 'op' + $lvl - , $opStr = '\' + ' + $opExpr + ' + \''; - }} - var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; - {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} - - var {{=$exclusive}}; - var {{=$exclType}} = typeof {{=$schemaValueExcl}}; - if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') { - {{ var $errorKeyword = $exclusiveKeyword; }} - {{# def.error:'_exclusiveLimit' }} - } else if ({{# def.$dataNotType:'number' }} - {{=$exclType}} == 'number' - ? ( - ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}}) - ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}} - : {{=$data}} {{=$notOp}} {{=$schemaValue}} - ) - : ( - ({{=$exclusive}} = {{=$schemaValueExcl}} === true) - ? {{=$data}} {{=$notOp}}= {{=$schemaValue}} - : {{=$data}} {{=$notOp}} {{=$schemaValue}} - ) - || {{=$data}} !== {{=$data}}) { - var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; - {{ - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - }} -{{??}} - {{ - var $exclIsNumber = typeof $schemaExcl == 'number' - , $opStr = $op; /*used in error*/ - }} - - {{? $exclIsNumber && $isData }} - {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }} - if ({{# def.$dataNotType:'number' }} - ( {{=$schemaValue}} === undefined - || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}} - ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}} - : {{=$data}} {{=$notOp}} {{=$schemaValue}} ) - || {{=$data}} !== {{=$data}}) { - {{??}} - {{ - if ($exclIsNumber && $schema === undefined) { - {{# def.setExclusiveLimit }} - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) - $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - {{# def.setExclusiveLimit }} - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - - var $opExpr = '\'' + $opStr + '\''; /*used in error*/ - }} - - if ({{# def.$dataNotType:'number' }} - {{=$data}} {{=$notOp}} {{=$schemaValue}} - || {{=$data}} !== {{=$data}}) { - {{?}} -{{?}} - {{ $errorKeyword = $errorKeyword || $keyword; }} - {{# def.error:'_limit' }} - } {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst b/test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst deleted file mode 100644 index 741329e7..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/_limitItems.jst +++ /dev/null @@ -1,12 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{# def.numberKeyword }} - -{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} -if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { - {{ var $errorKeyword = $keyword; }} - {{# def.error:'_limitItems' }} -} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst b/test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst deleted file mode 100644 index 285c66bd..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/_limitLength.jst +++ /dev/null @@ -1,12 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{# def.numberKeyword }} - -{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} -if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { - {{ var $errorKeyword = $keyword; }} - {{# def.error:'_limitLength' }} -} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst b/test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst deleted file mode 100644 index c4c21551..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/_limitProperties.jst +++ /dev/null @@ -1,12 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{# def.numberKeyword }} - -{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} -if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { - {{ var $errorKeyword = $keyword; }} - {{# def.error:'_limitProperties' }} -} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/allOf.jst b/test-eol-project/node_modules/ajv/lib/dot/allOf.jst deleted file mode 100644 index 0e782fe9..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/allOf.jst +++ /dev/null @@ -1,32 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{ - var $currentBaseId = $it.baseId - , $allSchemasEmpty = true; -}} - -{{~ $schema:$sch:$i }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{ - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - }} - - {{# def.insertSubschemaCode }} - - {{# def.ifResultValid }} - {{?}} -{{~}} - -{{? $breakOnError }} - {{? $allSchemasEmpty }} - if (true) { - {{??}} - {{= $closingBraces.slice(0,-1) }} - {{?}} -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/anyOf.jst b/test-eol-project/node_modules/ajv/lib/dot/anyOf.jst deleted file mode 100644 index ea909ee6..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/anyOf.jst +++ /dev/null @@ -1,46 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{ - var $noEmptySchema = $schema.every(function($sch) { - return {{# def.nonEmptySchema:$sch }}; - }); -}} -{{? $noEmptySchema }} - {{ var $currentBaseId = $it.baseId; }} - var {{=$errs}} = errors; - var {{=$valid}} = false; - - {{# def.setCompositeRule }} - - {{~ $schema:$sch:$i }} - {{ - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - }} - - {{# def.insertSubschemaCode }} - - {{=$valid}} = {{=$valid}} || {{=$nextValid}}; - - if (!{{=$valid}}) { - {{ $closingBraces += '}'; }} - {{~}} - - {{# def.resetCompositeRule }} - - {{= $closingBraces }} - - if (!{{=$valid}}) { - {{# def.extraError:'anyOf' }} - } else { - {{# def.resetErrors }} - {{? it.opts.allErrors }} } {{?}} -{{??}} - {{? $breakOnError }} - if (true) { - {{?}} -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/coerce.def b/test-eol-project/node_modules/ajv/lib/dot/coerce.def deleted file mode 100644 index c947ed6a..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/coerce.def +++ /dev/null @@ -1,51 +0,0 @@ -{{## def.coerceType: - {{ - var $dataType = 'dataType' + $lvl - , $coerced = 'coerced' + $lvl; - }} - var {{=$dataType}} = typeof {{=$data}}; - var {{=$coerced}} = undefined; - - {{? it.opts.coerceTypes == 'array' }} - if ({{=$dataType}} == 'object' && Array.isArray({{=$data}}) && {{=$data}}.length == 1) { - {{=$data}} = {{=$data}}[0]; - {{=$dataType}} = typeof {{=$data}}; - if ({{=it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)}}) {{=$coerced}} = {{=$data}}; - } - {{?}} - - if ({{=$coerced}} !== undefined) ; - {{~ $coerceToTypes:$type:$i }} - {{? $type == 'string' }} - else if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') - {{=$coerced}} = '' + {{=$data}}; - else if ({{=$data}} === null) {{=$coerced}} = ''; - {{?? $type == 'number' || $type == 'integer' }} - else if ({{=$dataType}} == 'boolean' || {{=$data}} === null - || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} - {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) - {{=$coerced}} = +{{=$data}}; - {{?? $type == 'boolean' }} - else if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) - {{=$coerced}} = false; - else if ({{=$data}} === 'true' || {{=$data}} === 1) - {{=$coerced}} = true; - {{?? $type == 'null' }} - else if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) - {{=$coerced}} = null; - {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} - else if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) - {{=$coerced}} = [{{=$data}}]; - {{?}} - {{~}} - else { - {{# def.error:'type' }} - } - - if ({{=$coerced}} !== undefined) { - {{# def.setParentData }} - {{=$data}} = {{=$coerced}}; - {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} - {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; - } -#}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/comment.jst b/test-eol-project/node_modules/ajv/lib/dot/comment.jst deleted file mode 100644 index f9591503..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/comment.jst +++ /dev/null @@ -1,9 +0,0 @@ -{{# def.definitions }} -{{# def.setupKeyword }} - -{{ var $comment = it.util.toQuotedString($schema); }} -{{? it.opts.$comment === true }} - console.log({{=$comment}}); -{{?? typeof it.opts.$comment == 'function' }} - self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema); -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/const.jst b/test-eol-project/node_modules/ajv/lib/dot/const.jst deleted file mode 100644 index 2aa22980..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/const.jst +++ /dev/null @@ -1,11 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{? !$isData }} - var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; -{{?}} -var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); -{{# def.checkError:'const' }} -{{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/contains.jst b/test-eol-project/node_modules/ajv/lib/dot/contains.jst deleted file mode 100644 index 4dc99674..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/contains.jst +++ /dev/null @@ -1,55 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{ - var $idx = 'i' + $lvl - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $currentBaseId = it.baseId - , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; -}} - -var {{=$errs}} = errors; -var {{=$valid}}; - -{{? $nonEmptySchema }} - {{# def.setCompositeRule }} - - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - - var {{=$nextValid}} = false; - - for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { - {{ - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - - if ({{=$nextValid}}) break; - } - - {{# def.resetCompositeRule }} - {{= $closingBraces }} - - if (!{{=$nextValid}}) { -{{??}} - if ({{=$data}}.length == 0) { -{{?}} - - {{# def.error:'contains' }} - } else { - {{? $nonEmptySchema }} - {{# def.resetErrors }} - {{?}} - {{? it.opts.allErrors }} } {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/custom.jst b/test-eol-project/node_modules/ajv/lib/dot/custom.jst deleted file mode 100644 index d30588fb..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/custom.jst +++ /dev/null @@ -1,191 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ - var $rule = this - , $definition = 'definition' + $lvl - , $rDef = $rule.definition - , $closingBraces = ''; - var $validate = $rDef.validate; - var $compile, $inline, $macro, $ruleValidate, $validateCode; -}} - -{{? $isData && $rDef.$data }} - {{ - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - }} - var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; - var {{=$validateCode}} = {{=$definition}}.validate; -{{??}} - {{ - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - }} -{{?}} - -{{ - var $ruleErrs = $validateCode + '.errors' - , $i = 'i' + $lvl - , $ruleErr = 'ruleErr' + $lvl - , $asyncKeyword = $rDef.async; - - if ($asyncKeyword && !it.async) - throw new Error('async keyword in sync schema'); -}} - - -{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} -var {{=$errs}} = errors; -var {{=$valid}}; - -{{## def.callRuleValidate: - {{=$validateCode}}.call( - {{? it.opts.passContext }}this{{??}}self{{?}} - {{? $compile || $rDef.schema === false }} - , {{=$data}} - {{??}} - , {{=$schemaValue}} - , {{=$data}} - , validate.schema{{=it.schemaPath}} - {{?}} - , {{# def.dataPath }} - {{# def.passParentData }} - , rootData - ) -#}} - -{{## def.extendErrors:_inline: - for (var {{=$i}}={{=$errs}}; {{=$i}} 0) - || _schema === false - : it.util.schemaHasRules(_schema, it.RULES.all)) -#}} - - -{{## def.strLength: - {{? it.opts.unicode === false }} - {{=$data}}.length - {{??}} - ucs2length({{=$data}}) - {{?}} -#}} - - -{{## def.willOptimize: - it.util.varOccurences($code, $nextData) < 2 -#}} - - -{{## def.generateSubschemaCode: - {{ - var $code = it.validate($it); - $it.baseId = $currentBaseId; - }} -#}} - - -{{## def.insertSubschemaCode: - {{= it.validate($it) }} - {{ $it.baseId = $currentBaseId; }} -#}} - - -{{## def._optimizeValidate: - it.util.varReplace($code, $nextData, $passData) -#}} - - -{{## def.optimizeValidate: - {{? {{# def.willOptimize}} }} - {{= {{# def._optimizeValidate }} }} - {{??}} - var {{=$nextData}} = {{=$passData}}; - {{= $code }} - {{?}} -#}} - - -{{## def.$data: - {{ - var $isData = it.opts.$data && $schema && $schema.$data - , $schemaValue; - }} - {{? $isData }} - var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }}; - {{ $schemaValue = 'schema' + $lvl; }} - {{??}} - {{ $schemaValue = $schema; }} - {{?}} -#}} - - -{{## def.$dataNotType:_type: - {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}} -#}} - - -{{## def.check$dataIsArray: - if (schema{{=$lvl}} === undefined) {{=$valid}} = true; - else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false; - else { -#}} - - -{{## def.numberKeyword: - {{? !($isData || typeof $schema == 'number') }} - {{ throw new Error($keyword + ' must be number'); }} - {{?}} -#}} - - -{{## def.beginDefOut: - {{ - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - }} -#}} - - -{{## def.storeDefOut:_variable: - {{ - var _variable = out; - out = $$outStack.pop(); - }} -#}} - - -{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}} - -{{## def.setParentData: - {{ - var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData' - , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - }} -#}} - -{{## def.passParentData: - {{# def.setParentData }} - , {{= $parentData }} - , {{= $parentDataProperty }} -#}} - - -{{## def.iterateProperties: - {{? $ownProperties }} - {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}}); - for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) { - var {{=$key}} = {{=$dataProperties}}[{{=$idx}}]; - {{??}} - for (var {{=$key}} in {{=$data}}) { - {{?}} -#}} - - -{{## def.noPropertyInData: - {{=$useData}} === undefined - {{? $ownProperties }} - || !{{# def.isOwnProperty }} - {{?}} -#}} - - -{{## def.isOwnProperty: - Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}') -#}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/dependencies.jst b/test-eol-project/node_modules/ajv/lib/dot/dependencies.jst deleted file mode 100644 index e4bdddec..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/dependencies.jst +++ /dev/null @@ -1,79 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.missing }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.propertyInData: - {{=$data}}{{= it.util.getProperty($property) }} !== undefined - {{? $ownProperties }} - && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}') - {{?}} -#}} - - -{{ - var $schemaDeps = {} - , $propertyDeps = {} - , $ownProperties = it.opts.ownProperties; - - for ($property in $schema) { - if ($property == '__proto__') continue; - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } -}} - -var {{=$errs}} = errors; - -{{ var $currentErrorPath = it.errorPath; }} - -var missing{{=$lvl}}; -{{ for (var $property in $propertyDeps) { }} - {{ $deps = $propertyDeps[$property]; }} - {{? $deps.length }} - if ({{# def.propertyInData }} - {{? $breakOnError }} - && ({{# def.checkMissingProperty:$deps }})) { - {{# def.errorMissingProperty:'dependencies' }} - {{??}} - ) { - {{~ $deps:$propertyKey }} - {{# def.allErrorsMissingProperty:'dependencies' }} - {{~}} - {{?}} - } {{# def.elseIfValid }} - {{?}} -{{ } }} - -{{ - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; -}} - - -{{ for (var $property in $schemaDeps) { }} - {{ var $sch = $schemaDeps[$property]; }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{=$nextValid}} = true; - - if ({{# def.propertyInData }}) { - {{ - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - }} - - {{# def.insertSubschemaCode }} - } - - {{# def.ifResultValid }} - {{?}} -{{ } }} - -{{? $breakOnError }} - {{= $closingBraces }} - if ({{=$errs}} == errors) { -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/enum.jst b/test-eol-project/node_modules/ajv/lib/dot/enum.jst deleted file mode 100644 index 357c2e8c..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/enum.jst +++ /dev/null @@ -1,30 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ - var $i = 'i' + $lvl - , $vSchema = 'schema' + $lvl; -}} - -{{? !$isData }} - var {{=$vSchema}} = validate.schema{{=$schemaPath}}; -{{?}} -var {{=$valid}}; - -{{?$isData}}{{# def.check$dataIsArray }}{{?}} - -{{=$valid}} = false; - -for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) - if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { - {{=$valid}} = true; - break; - } - -{{? $isData }} } {{?}} - -{{# def.checkError:'enum' }} - -{{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/errors.def b/test-eol-project/node_modules/ajv/lib/dot/errors.def deleted file mode 100644 index 5c5752cb..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/errors.def +++ /dev/null @@ -1,194 +0,0 @@ -{{# def.definitions }} - -{{## def._error:_rule: - {{ 'istanbul ignore else'; }} - {{? it.createErrors !== false }} - { - keyword: '{{= $errorKeyword || _rule }}' - , dataPath: (dataPath || '') + {{= it.errorPath }} - , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}} - , params: {{# def._errorParams[_rule] }} - {{? it.opts.messages !== false }} - , message: {{# def._errorMessages[_rule] }} - {{?}} - {{? it.opts.verbose }} - , schema: {{# def._errorSchemas[_rule] }} - , parentSchema: validate.schema{{=it.schemaPath}} - , data: {{=$data}} - {{?}} - } - {{??}} - {} - {{?}} -#}} - - -{{## def._addError:_rule: - if (vErrors === null) vErrors = [err]; - else vErrors.push(err); - errors++; -#}} - - -{{## def.addError:_rule: - var err = {{# def._error:_rule }}; - {{# def._addError:_rule }} -#}} - - -{{## def.error:_rule: - {{# def.beginDefOut}} - {{# def._error:_rule }} - {{# def.storeDefOut:__err }} - - {{? !it.compositeRule && $breakOnError }} - {{ 'istanbul ignore if'; }} - {{? it.async }} - throw new ValidationError([{{=__err}}]); - {{??}} - validate.errors = [{{=__err}}]; - return false; - {{?}} - {{??}} - var err = {{=__err}}; - {{# def._addError:_rule }} - {{?}} -#}} - - -{{## def.extraError:_rule: - {{# def.addError:_rule}} - {{? !it.compositeRule && $breakOnError }} - {{ 'istanbul ignore if'; }} - {{? it.async }} - throw new ValidationError(vErrors); - {{??}} - validate.errors = vErrors; - return false; - {{?}} - {{?}} -#}} - - -{{## def.checkError:_rule: - if (!{{=$valid}}) { - {{# def.error:_rule }} - } -#}} - - -{{## def.resetErrors: - errors = {{=$errs}}; - if (vErrors !== null) { - if ({{=$errs}}) vErrors.length = {{=$errs}}; - else vErrors = null; - } -#}} - - -{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}} -{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}} -{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}} - -{{## def._errorMessages = { - 'false schema': "'boolean schema is false'", - $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'", - additionalItems: "'should NOT have more than {{=$schema.length}} items'", - additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'", - anyOf: "'should match some schema in anyOf'", - const: "'should be equal to constant'", - contains: "'should contain a valid item'", - dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'", - 'enum': "'should be equal to one of the allowed values'", - format: "'should match format \"{{#def.concatSchemaEQ}}\"'", - 'if': "'should match \"' + {{=$ifClause}} + '\" schema'", - _limit: "'should be {{=$opStr}} {{#def.appendSchema}}", - _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'", - _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'", - _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'", - _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'", - multipleOf: "'should be multiple of {{#def.appendSchema}}", - not: "'should NOT be valid'", - oneOf: "'should match exactly one schema in oneOf'", - pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'", - propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'", - required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'", - type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'", - uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'", - custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'", - patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''", - switch: "'should pass \"switch\" keyword validation'", - _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'", - _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'" -} #}} - - -{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}} -{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} - -{{## def._errorSchemas = { - 'false schema': "false", - $ref: "{{=it.util.toQuotedString($schema)}}", - additionalItems: "false", - additionalProperties: "false", - anyOf: "validate.schema{{=$schemaPath}}", - const: "validate.schema{{=$schemaPath}}", - contains: "validate.schema{{=$schemaPath}}", - dependencies: "validate.schema{{=$schemaPath}}", - 'enum': "validate.schema{{=$schemaPath}}", - format: "{{#def.schemaRefOrQS}}", - 'if': "validate.schema{{=$schemaPath}}", - _limit: "{{#def.schemaRefOrVal}}", - _exclusiveLimit: "validate.schema{{=$schemaPath}}", - _limitItems: "{{#def.schemaRefOrVal}}", - _limitLength: "{{#def.schemaRefOrVal}}", - _limitProperties:"{{#def.schemaRefOrVal}}", - multipleOf: "{{#def.schemaRefOrVal}}", - not: "validate.schema{{=$schemaPath}}", - oneOf: "validate.schema{{=$schemaPath}}", - pattern: "{{#def.schemaRefOrQS}}", - propertyNames: "validate.schema{{=$schemaPath}}", - required: "validate.schema{{=$schemaPath}}", - type: "validate.schema{{=$schemaPath}}", - uniqueItems: "{{#def.schemaRefOrVal}}", - custom: "validate.schema{{=$schemaPath}}", - patternRequired: "validate.schema{{=$schemaPath}}", - switch: "validate.schema{{=$schemaPath}}", - _formatLimit: "{{#def.schemaRefOrQS}}", - _formatExclusiveLimit: "validate.schema{{=$schemaPath}}" -} #}} - - -{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} - -{{## def._errorParams = { - 'false schema': "{}", - $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }", - additionalItems: "{ limit: {{=$schema.length}} }", - additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }", - anyOf: "{}", - const: "{ allowedValue: schema{{=$lvl}} }", - contains: "{}", - dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }", - 'enum': "{ allowedValues: schema{{=$lvl}} }", - format: "{ format: {{#def.schemaValueQS}} }", - 'if': "{ failingKeyword: {{=$ifClause}} }", - _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }", - _exclusiveLimit: "{}", - _limitItems: "{ limit: {{=$schemaValue}} }", - _limitLength: "{ limit: {{=$schemaValue}} }", - _limitProperties:"{ limit: {{=$schemaValue}} }", - multipleOf: "{ multipleOf: {{=$schemaValue}} }", - not: "{}", - oneOf: "{ passingSchemas: {{=$passingSchemas}} }", - pattern: "{ pattern: {{#def.schemaValueQS}} }", - propertyNames: "{ propertyName: '{{=$invalidName}}' }", - required: "{ missingProperty: '{{=$missingProperty}}' }", - type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }", - uniqueItems: "{ i: i, j: j }", - custom: "{ keyword: '{{=$rule.keyword}}' }", - patternRequired: "{ missingPattern: '{{=$missingPattern}}' }", - switch: "{ caseIndex: {{=$caseIndex}} }", - _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }", - _formatExclusiveLimit: "{}" -} #}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/format.jst b/test-eol-project/node_modules/ajv/lib/dot/format.jst deleted file mode 100644 index 37f14da8..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/format.jst +++ /dev/null @@ -1,106 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} - -{{## def.skipFormat: - {{? $breakOnError }} if (true) { {{?}} - {{ return out; }} -#}} - -{{? it.opts.format === false }}{{# def.skipFormat }}{{?}} - - -{{# def.$data }} - - -{{## def.$dataCheckFormat: - {{# def.$dataNotType:'string' }} - ({{? $unknownFormats != 'ignore' }} - ({{=$schemaValue}} && !{{=$format}} - {{? $allowUnknown }} - && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1 - {{?}}) || - {{?}} - ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}' - && !(typeof {{=$format}} == 'function' - ? {{? it.async}} - (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}})) - {{??}} - {{=$format}}({{=$data}}) - {{?}} - : {{=$format}}.test({{=$data}})))) -#}} - -{{## def.checkFormat: - {{ - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - }} - {{? typeof $format == 'function' }} - {{=$formatRef}}({{=$data}}) - {{??}} - {{=$formatRef}}.test({{=$data}}) - {{?}} -#}} - - -{{ - var $unknownFormats = it.opts.unknownFormats - , $allowUnknown = Array.isArray($unknownFormats); -}} - -{{? $isData }} - {{ - var $format = 'format' + $lvl - , $isObject = 'isObject' + $lvl - , $formatType = 'formatType' + $lvl; - }} - var {{=$format}} = formats[{{=$schemaValue}}]; - var {{=$isObject}} = typeof {{=$format}} == 'object' - && !({{=$format}} instanceof RegExp) - && {{=$format}}.validate; - var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string'; - if ({{=$isObject}}) { - {{? it.async}} - var async{{=$lvl}} = {{=$format}}.async; - {{?}} - {{=$format}} = {{=$format}}.validate; - } - if ({{# def.$dataCheckFormat }}) { -{{??}} - {{ var $format = it.formats[$schema]; }} - {{? !$format }} - {{? $unknownFormats == 'ignore' }} - {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }} - {{# def.skipFormat }} - {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }} - {{# def.skipFormat }} - {{??}} - {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }} - {{?}} - {{?}} - {{ - var $isObject = typeof $format == 'object' - && !($format instanceof RegExp) - && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - }} - {{? $formatType != $ruleType }} - {{# def.skipFormat }} - {{?}} - {{? $async }} - {{ - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - }} - if (!(await {{=$formatRef}}({{=$data}}))) { - {{??}} - if (!{{# def.checkFormat }}) { - {{?}} -{{?}} - {{# def.error:'format' }} - } {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/if.jst b/test-eol-project/node_modules/ajv/lib/dot/if.jst deleted file mode 100644 index adb50361..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/if.jst +++ /dev/null @@ -1,73 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.validateIfClause:_clause: - {{ - $it.schema = it.schema['_clause']; - $it.schemaPath = it.schemaPath + '._clause'; - $it.errSchemaPath = it.errSchemaPath + '/_clause'; - }} - {{# def.insertSubschemaCode }} - {{=$valid}} = {{=$nextValid}}; - {{? $thenPresent && $elsePresent }} - {{ $ifClause = 'ifClause' + $lvl; }} - var {{=$ifClause}} = '_clause'; - {{??}} - {{ $ifClause = '\'_clause\''; }} - {{?}} -#}} - -{{ - var $thenSch = it.schema['then'] - , $elseSch = it.schema['else'] - , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }} - , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }} - , $currentBaseId = $it.baseId; -}} - -{{? $thenPresent || $elsePresent }} - {{ - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - var {{=$errs}} = errors; - var {{=$valid}} = true; - - {{# def.setCompositeRule }} - {{# def.insertSubschemaCode }} - {{ $it.createErrors = true; }} - {{# def.resetErrors }} - {{# def.resetCompositeRule }} - - {{? $thenPresent }} - if ({{=$nextValid}}) { - {{# def.validateIfClause:then }} - } - {{? $elsePresent }} - else { - {{?}} - {{??}} - if (!{{=$nextValid}}) { - {{?}} - - {{? $elsePresent }} - {{# def.validateIfClause:else }} - } - {{?}} - - if (!{{=$valid}}) { - {{# def.extraError:'if' }} - } - {{? $breakOnError }} else { {{?}} -{{??}} - {{? $breakOnError }} - if (true) { - {{?}} -{{?}} - diff --git a/test-eol-project/node_modules/ajv/lib/dot/items.jst b/test-eol-project/node_modules/ajv/lib/dot/items.jst deleted file mode 100644 index acc932a2..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/items.jst +++ /dev/null @@ -1,98 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.validateItems:startFrom: - for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { - {{ - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - - {{? $breakOnError }} - if (!{{=$nextValid}}) break; - {{?}} - } -#}} - -{{ - var $idx = 'i' + $lvl - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $currentBaseId = it.baseId; -}} - -var {{=$errs}} = errors; -var {{=$valid}}; - -{{? Array.isArray($schema) }} - {{ /* 'items' is an array of schemas */}} - {{ var $additionalItems = it.schema.additionalItems; }} - {{? $additionalItems === false }} - {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; - {{ - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - }} - {{# def.checkError:'additionalItems' }} - {{ $errSchemaPath = $currErrSchemaPath; }} - {{# def.elseIfValid}} - {{?}} - - {{~ $schema:$sch:$i }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{=$nextValid}} = true; - - if ({{=$data}}.length > {{=$i}}) { - {{ - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - } - - {{# def.ifResultValid }} - {{?}} - {{~}} - - {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} - {{ - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - }} - {{=$nextValid}} = true; - - if ({{=$data}}.length > {{= $schema.length }}) { - {{# def.validateItems: $schema.length }} - } - - {{# def.ifResultValid }} - {{?}} - -{{?? {{# def.nonEmptySchema:$schema }} }} - {{ /* 'items' is a single schema */}} - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - {{# def.validateItems: 0 }} -{{?}} - -{{? $breakOnError }} - {{= $closingBraces }} - if ({{=$errs}} == errors) { -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/missing.def b/test-eol-project/node_modules/ajv/lib/dot/missing.def deleted file mode 100644 index a73b9f96..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/missing.def +++ /dev/null @@ -1,39 +0,0 @@ -{{## def.checkMissingProperty:_properties: - {{~ _properties:$propertyKey:$i }} - {{?$i}} || {{?}} - {{ - var $prop = it.util.getProperty($propertyKey) - , $useData = $data + $prop; - }} - ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) - {{~}} -#}} - - -{{## def.errorMissingProperty:_error: - {{ - var $propertyPath = 'missing' + $lvl - , $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers - ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) - : $currentErrorPath + ' + ' + $propertyPath; - } - }} - {{# def.error:_error }} -#}} - - -{{## def.allErrorsMissingProperty:_error: - {{ - var $prop = it.util.getProperty($propertyKey) - , $missingProperty = it.util.escapeQuotes($propertyKey) - , $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - }} - if ({{# def.noPropertyInData }}) { - {{# def.addError:_error }} - } -#}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst b/test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst deleted file mode 100644 index 6d88a456..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/multipleOf.jst +++ /dev/null @@ -1,22 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{# def.numberKeyword }} - -var division{{=$lvl}}; -if ({{?$isData}} - {{=$schemaValue}} !== undefined && ( - typeof {{=$schemaValue}} != 'number' || - {{?}} - (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, - {{? it.opts.multipleOfPrecision }} - Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} - {{??}} - division{{=$lvl}} !== parseInt(division{{=$lvl}}) - {{?}} - ) - {{?$isData}} ) {{?}} ) { - {{# def.error:'multipleOf' }} -} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/not.jst b/test-eol-project/node_modules/ajv/lib/dot/not.jst deleted file mode 100644 index e03185ae..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/not.jst +++ /dev/null @@ -1,43 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{? {{# def.nonEmptySchema:$schema }} }} - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - - var {{=$errs}} = errors; - - {{# def.setCompositeRule }} - - {{ - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - }} - {{= it.validate($it) }} - {{ - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - }} - - {{# def.resetCompositeRule }} - - if ({{=$nextValid}}) { - {{# def.error:'not' }} - } else { - {{# def.resetErrors }} - {{? it.opts.allErrors }} } {{?}} -{{??}} - {{# def.addError:'not' }} - {{? $breakOnError}} - if (false) { - {{?}} -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/oneOf.jst b/test-eol-project/node_modules/ajv/lib/dot/oneOf.jst deleted file mode 100644 index bcce2c6e..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/oneOf.jst +++ /dev/null @@ -1,54 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -{{ - var $currentBaseId = $it.baseId - , $prevValid = 'prevValid' + $lvl - , $passingSchemas = 'passingSchemas' + $lvl; -}} - -var {{=$errs}} = errors - , {{=$prevValid}} = false - , {{=$valid}} = false - , {{=$passingSchemas}} = null; - -{{# def.setCompositeRule }} - -{{~ $schema:$sch:$i }} - {{? {{# def.nonEmptySchema:$sch }} }} - {{ - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - }} - - {{# def.insertSubschemaCode }} - {{??}} - var {{=$nextValid}} = true; - {{?}} - - {{? $i }} - if ({{=$nextValid}} && {{=$prevValid}}) { - {{=$valid}} = false; - {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}]; - } else { - {{ $closingBraces += '}'; }} - {{?}} - - if ({{=$nextValid}}) { - {{=$valid}} = {{=$prevValid}} = true; - {{=$passingSchemas}} = {{=$i}}; - } -{{~}} - -{{# def.resetCompositeRule }} - -{{= $closingBraces }} - -if (!{{=$valid}}) { - {{# def.extraError:'oneOf' }} -} else { - {{# def.resetErrors }} -{{? it.opts.allErrors }} } {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/pattern.jst b/test-eol-project/node_modules/ajv/lib/dot/pattern.jst deleted file mode 100644 index 8f7f9993..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/pattern.jst +++ /dev/null @@ -1,25 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - -{{ - var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; -}} - -{{? $isData }} - var {{=$valid}} = true; - try { - {{=$valid}} = {{=$regExpCode}}({{=$schemaValue}}).test({{=$data}}); - } catch(e) { - {{=$valid}} = false; - } - if ({{# def.$dataNotType:'string' }} !{{=$valid}}) { -{{??}} - {{ - var $regexp = it.usePattern($schema); - }} - if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { -{{?}} - {{# def.error:'pattern' }} -} {{? $breakOnError }} else { {{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/properties.jst b/test-eol-project/node_modules/ajv/lib/dot/properties.jst deleted file mode 100644 index 5cebb9b1..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/properties.jst +++ /dev/null @@ -1,245 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - - -{{## def.validateAdditional: - {{ /* additionalProperties is schema */ - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty - ? it.errorPath - : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} -#}} - - -{{ - var $key = 'key' + $lvl - , $idx = 'idx' + $lvl - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $dataProperties = 'dataProperties' + $lvl; - - var $schemaKeys = Object.keys($schema || {}).filter(notProto) - , $pProperties = it.schema.patternProperties || {} - , $pPropertyKeys = Object.keys($pProperties).filter(notProto) - , $aProperties = it.schema.additionalProperties - , $someProperties = $schemaKeys.length || $pPropertyKeys.length - , $noAdditional = $aProperties === false - , $additionalIsSchema = typeof $aProperties == 'object' - && Object.keys($aProperties).length - , $removeAdditional = it.opts.removeAdditional - , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional - , $ownProperties = it.opts.ownProperties - , $currentBaseId = it.baseId; - - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - - function notProto(p) { return p !== '__proto__'; } -}} - - -var {{=$errs}} = errors; -var {{=$nextValid}} = true; -{{? $ownProperties }} - var {{=$dataProperties}} = undefined; -{{?}} - -{{? $checkAdditional }} - {{# def.iterateProperties }} - {{? $someProperties }} - var isAdditional{{=$lvl}} = !(false - {{? $schemaKeys.length }} - {{? $schemaKeys.length > 8 }} - || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}}) - {{??}} - {{~ $schemaKeys:$propertyKey }} - || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} - {{~}} - {{?}} - {{?}} - {{? $pPropertyKeys.length }} - {{~ $pPropertyKeys:$pProperty:$i }} - || {{= it.usePattern($pProperty) }}.test({{=$key}}) - {{~}} - {{?}} - ); - - if (isAdditional{{=$lvl}}) { - {{?}} - {{? $removeAdditional == 'all' }} - delete {{=$data}}[{{=$key}}]; - {{??}} - {{ - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - }} - {{? $noAdditional }} - {{? $removeAdditional }} - delete {{=$data}}[{{=$key}}]; - {{??}} - {{=$nextValid}} = false; - {{ - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - }} - {{# def.error:'additionalProperties' }} - {{ $errSchemaPath = $currErrSchemaPath; }} - {{? $breakOnError }} break; {{?}} - {{?}} - {{?? $additionalIsSchema }} - {{? $removeAdditional == 'failing' }} - var {{=$errs}} = errors; - {{# def.setCompositeRule }} - - {{# def.validateAdditional }} - - if (!{{=$nextValid}}) { - errors = {{=$errs}}; - if (validate.errors !== null) { - if (errors) validate.errors.length = errors; - else validate.errors = null; - } - delete {{=$data}}[{{=$key}}]; - } - - {{# def.resetCompositeRule }} - {{??}} - {{# def.validateAdditional }} - {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} - {{?}} - {{?}} - {{ it.errorPath = $currentErrorPath; }} - {{?}} - {{? $someProperties }} - } - {{?}} - } - - {{# def.ifResultValid }} -{{?}} - -{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} - -{{? $schemaKeys.length }} - {{~ $schemaKeys:$propertyKey }} - {{ var $sch = $schema[$propertyKey]; }} - - {{? {{# def.nonEmptySchema:$sch}} }} - {{ - var $prop = it.util.getProperty($propertyKey) - , $passData = $data + $prop - , $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - }} - - {{# def.generateSubschemaCode }} - - {{? {{# def.willOptimize }} }} - {{ - $code = {{# def._optimizeValidate }}; - var $useData = $passData; - }} - {{??}} - {{ var $useData = $nextData; }} - var {{=$nextData}} = {{=$passData}}; - {{?}} - - {{? $hasDefault }} - {{= $code }} - {{??}} - {{? $requiredHash && $requiredHash[$propertyKey] }} - if ({{# def.noPropertyInData }}) { - {{=$nextValid}} = false; - {{ - var $currentErrorPath = it.errorPath - , $currErrSchemaPath = $errSchemaPath - , $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - }} - {{# def.error:'required' }} - {{ $errSchemaPath = $currErrSchemaPath; }} - {{ it.errorPath = $currentErrorPath; }} - } else { - {{??}} - {{? $breakOnError }} - if ({{# def.noPropertyInData }}) { - {{=$nextValid}} = true; - } else { - {{??}} - if ({{=$useData}} !== undefined - {{? $ownProperties }} - && {{# def.isOwnProperty }} - {{?}} - ) { - {{?}} - {{?}} - - {{= $code }} - } - {{?}} {{ /* $hasDefault */ }} - {{?}} {{ /* def.nonEmptySchema */ }} - - {{# def.ifResultValid }} - {{~}} -{{?}} - -{{? $pPropertyKeys.length }} - {{~ $pPropertyKeys:$pProperty }} - {{ var $sch = $pProperties[$pProperty]; }} - - {{? {{# def.nonEmptySchema:$sch}} }} - {{ - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' - + it.util.escapeFragment($pProperty); - }} - - {{# def.iterateProperties }} - if ({{= it.usePattern($pProperty) }}.test({{=$key}})) { - {{ - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - }} - - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - - {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} - } - {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} - } - - {{# def.ifResultValid }} - {{?}} {{ /* def.nonEmptySchema */ }} - {{~}} -{{?}} - - -{{? $breakOnError }} - {{= $closingBraces }} - if ({{=$errs}} == errors) { -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst b/test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst deleted file mode 100644 index d456ccaf..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/propertyNames.jst +++ /dev/null @@ -1,52 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.setupNextLevel }} - -var {{=$errs}} = errors; - -{{? {{# def.nonEmptySchema:$schema }} }} - {{ - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - }} - - {{ - var $key = 'key' + $lvl - , $idx = 'idx' + $lvl - , $i = 'i' + $lvl - , $invalidName = '\' + ' + $key + ' + \'' - , $dataNxt = $it.dataLevel = it.dataLevel + 1 - , $nextData = 'data' + $dataNxt - , $dataProperties = 'dataProperties' + $lvl - , $ownProperties = it.opts.ownProperties - , $currentBaseId = it.baseId; - }} - - {{? $ownProperties }} - var {{=$dataProperties}} = undefined; - {{?}} - {{# def.iterateProperties }} - var startErrs{{=$lvl}} = errors; - - {{ var $passData = $key; }} - {{# def.setCompositeRule }} - {{# def.generateSubschemaCode }} - {{# def.optimizeValidate }} - {{# def.resetCompositeRule }} - - if (!{{=$nextValid}}) { - for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired - , $ownProperties = it.opts.ownProperties; - }} - - {{? $breakOnError }} - var missing{{=$lvl}}; - {{? $loopRequired }} - {{# def.setupLoop }} - var {{=$valid}} = true; - - {{?$isData}}{{# def.check$dataIsArray }}{{?}} - - for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { - {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined - {{? $ownProperties }} - && {{# def.isRequiredOwnProperty }} - {{?}}; - if (!{{=$valid}}) break; - } - - {{? $isData }} } {{?}} - - {{# def.checkError:'required' }} - else { - {{??}} - if ({{# def.checkMissingProperty:$required }}) { - {{# def.errorMissingProperty:'required' }} - } else { - {{?}} - {{??}} - {{? $loopRequired }} - {{# def.setupLoop }} - {{? $isData }} - if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { - {{# def.addError:'required' }} - } else if ({{=$vSchema}} !== undefined) { - {{?}} - - for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { - if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined - {{? $ownProperties }} - || !{{# def.isRequiredOwnProperty }} - {{?}}) { - {{# def.addError:'required' }} - } - } - - {{? $isData }} } {{?}} - {{??}} - {{~ $required:$propertyKey }} - {{# def.allErrorsMissingProperty:'required' }} - {{~}} - {{?}} - {{?}} - - {{ it.errorPath = $currentErrorPath; }} - -{{?? $breakOnError }} - if (true) { -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst b/test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst deleted file mode 100644 index e69b8308..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/uniqueItems.jst +++ /dev/null @@ -1,62 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.setupKeyword }} -{{# def.$data }} - - -{{? ($schema || $isData) && it.opts.uniqueItems !== false }} - {{? $isData }} - var {{=$valid}}; - if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) - {{=$valid}} = true; - else if (typeof {{=$schemaValue}} != 'boolean') - {{=$valid}} = false; - else { - {{?}} - - var i = {{=$data}}.length - , {{=$valid}} = true - , j; - if (i > 1) { - {{ - var $itemType = it.schema.items && it.schema.items.type - , $typeIsArray = Array.isArray($itemType); - }} - {{? !$itemType || $itemType == 'object' || $itemType == 'array' || - ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }} - outer: - for (;i--;) { - for (j = i; j--;) { - if (equal({{=$data}}[i], {{=$data}}[j])) { - {{=$valid}} = false; - break outer; - } - } - } - {{??}} - var itemIndices = {}, item; - for (;i--;) { - var item = {{=$data}}[i]; - {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }} - if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue; - {{? $typeIsArray}} - if (typeof item == 'string') item = '"' + item; - {{?}} - if (typeof itemIndices[item] == 'number') { - {{=$valid}} = false; - j = itemIndices[item]; - break; - } - itemIndices[item] = i; - } - {{?}} - } - - {{? $isData }} } {{?}} - - if (!{{=$valid}}) { - {{# def.error:'uniqueItems' }} - } {{? $breakOnError }} else { {{?}} -{{??}} - {{? $breakOnError }} if (true) { {{?}} -{{?}} diff --git a/test-eol-project/node_modules/ajv/lib/dot/validate.jst b/test-eol-project/node_modules/ajv/lib/dot/validate.jst deleted file mode 100644 index 32087e71..00000000 --- a/test-eol-project/node_modules/ajv/lib/dot/validate.jst +++ /dev/null @@ -1,276 +0,0 @@ -{{# def.definitions }} -{{# def.errors }} -{{# def.defaults }} -{{# def.coerce }} - -{{ /** - * schema compilation (render) time: - * it = { schema, RULES, _validate, opts } - * it.validate - this template function, - * it is used recursively to generate code for subschemas - * - * runtime: - * "validate" is a variable name to which this function will be assigned - * validateRef etc. are defined in the parent scope in index.js - */ }} - -{{ - var $async = it.schema.$async === true - , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') - , $id = it.self._getId(it.schema); -}} - -{{ - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } -}} - -{{? it.isTop }} - var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) { - 'use strict'; - {{? $id && (it.opts.sourceCode || it.opts.processCode) }} - {{= '/\*# sourceURL=' + $id + ' */' }} - {{?}} -{{?}} - -{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }} - {{ var $keyword = 'false schema'; }} - {{# def.setupKeyword }} - {{? it.schema === false}} - {{? it.isTop}} - {{ $breakOnError = true; }} - {{??}} - var {{=$valid}} = false; - {{?}} - {{# def.error:'false schema' }} - {{??}} - {{? it.isTop}} - {{? $async }} - return data; - {{??}} - validate.errors = null; - return true; - {{?}} - {{??}} - var {{=$valid}} = true; - {{?}} - {{?}} - - {{? it.isTop}} - }; - return validate; - {{?}} - - {{ return out; }} -{{?}} - - -{{? it.isTop }} - {{ - var $top = it.isTop - , $lvl = it.level = 0 - , $dataLvl = it.dataLevel = 0 - , $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - - it.dataPathArr = [""]; - - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - }} - - var vErrors = null; {{ /* don't edit, used in replace */ }} - var errors = 0; {{ /* don't edit, used in replace */ }} - if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }} -{{??}} - {{ - var $lvl = it.level - , $dataLvl = it.dataLevel - , $data = 'data' + ($dataLvl || ''); - - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - - if ($async && !it.async) throw new Error('async schema in sync schema'); - }} - - var errs_{{=$lvl}} = errors; -{{?}} - -{{ - var $valid = 'valid' + $lvl - , $breakOnError = !it.opts.allErrors - , $closingBraces1 = '' - , $closingBraces2 = ''; - - var $errorKeyword; - var $typeSchema = it.schema.type - , $typeIsArray = Array.isArray($typeSchema); - - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) - $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } -}} - -{{## def.checkType: - {{ - var $schemaPath = it.schemaPath + '.type' - , $errSchemaPath = it.errSchemaPath + '/type' - , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - }} - - if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) { -#}} - -{{? it.schema.$ref && $refKeywords }} - {{? it.opts.extendRefs == 'fail' }} - {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }} - {{?? it.opts.extendRefs !== true }} - {{ - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - }} - {{?}} -{{?}} - -{{? it.schema.$comment && it.opts.$comment }} - {{= it.RULES.all.$comment.code(it, '$comment') }} -{{?}} - -{{? $typeSchema }} - {{? it.opts.coerceTypes }} - {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }} - {{?}} - - {{ var $rulesGroup = it.RULES.types[$typeSchema]; }} - {{? $coerceToTypes || $typeIsArray || $rulesGroup === true || - ($rulesGroup && !$shouldUseGroup($rulesGroup)) }} - {{ - var $schemaPath = it.schemaPath + '.type' - , $errSchemaPath = it.errSchemaPath + '/type'; - }} - {{# def.checkType }} - {{? $coerceToTypes }} - {{# def.coerceType }} - {{??}} - {{# def.error:'type' }} - {{?}} - } - {{?}} -{{?}} - - -{{? it.schema.$ref && !$refKeywords }} - {{= it.RULES.all.$ref.code(it, '$ref') }} - {{? $breakOnError }} - } - if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { - {{ $closingBraces2 += '}'; }} - {{?}} -{{??}} - {{~ it.RULES:$rulesGroup }} - {{? $shouldUseGroup($rulesGroup) }} - {{? $rulesGroup.type }} - if ({{= it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) }}) { - {{?}} - {{? it.opts.useDefaults }} - {{? $rulesGroup.type == 'object' && it.schema.properties }} - {{# def.defaultProperties }} - {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} - {{# def.defaultItems }} - {{?}} - {{?}} - {{~ $rulesGroup.rules:$rule }} - {{? $shouldUseRule($rule) }} - {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} - {{? $code }} - {{= $code }} - {{? $breakOnError }} - {{ $closingBraces1 += '}'; }} - {{?}} - {{?}} - {{?}} - {{~}} - {{? $breakOnError }} - {{= $closingBraces1 }} - {{ $closingBraces1 = ''; }} - {{?}} - {{? $rulesGroup.type }} - } - {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} - else { - {{ - var $schemaPath = it.schemaPath + '.type' - , $errSchemaPath = it.errSchemaPath + '/type'; - }} - {{# def.error:'type' }} - } - {{?}} - {{?}} - - {{? $breakOnError }} - if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { - {{ $closingBraces2 += '}'; }} - {{?}} - {{?}} - {{~}} -{{?}} - -{{? $breakOnError }} {{= $closingBraces2 }} {{?}} - -{{? $top }} - {{? $async }} - if (errors === 0) return data; {{ /* don't edit, used in replace */ }} - else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} - {{??}} - validate.errors = vErrors; {{ /* don't edit, used in replace */ }} - return errors === 0; {{ /* don't edit, used in replace */ }} - {{?}} - }; - - return validate; -{{??}} - var {{=$valid}} = errors === errs_{{=$lvl}}; -{{?}} - -{{ - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i=0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) - return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || - ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i=0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) - return true; - } -}} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/README.md b/test-eol-project/node_modules/ajv/lib/dotjs/README.md deleted file mode 100644 index 4d994846..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -These files are compiled dot templates from dot folder. - -Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limit.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limit.js deleted file mode 100644 index 05a1979d..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/_limit.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; -module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == 'maximum', - $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if (!($isData || typeof $schema == 'number' || $schema === undefined)) { - throw new Error($keyword + ' must be number'); - } - if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { - throw new Error($exclusiveKeyword + ' must be number or boolean'); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js deleted file mode 100644 index e092a559..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/_limitItems.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js deleted file mode 100644 index ecbd3fe1..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/_limitLength.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js b/test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js deleted file mode 100644 index d232755a..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/_limitProperties.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/allOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/allOf.js deleted file mode 100644 index fb8c2e4b..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/allOf.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js deleted file mode 100644 index 0600a9d4..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/anyOf.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/comment.js b/test-eol-project/node_modules/ajv/lib/dotjs/comment.js deleted file mode 100644 index dd66bb8f..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/comment.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/const.js b/test-eol-project/node_modules/ajv/lib/dotjs/const.js deleted file mode 100644 index 15b7c619..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/const.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/contains.js b/test-eol-project/node_modules/ajv/lib/dotjs/contains.js deleted file mode 100644 index 7d763009..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/contains.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/custom.js b/test-eol-project/node_modules/ajv/lib/dotjs/custom.js deleted file mode 100644 index f3e641e7..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/custom.js +++ /dev/null @@ -1,228 +0,0 @@ -'use strict'; -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += 'await '; - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/enum.js b/test-eol-project/node_modules/ajv/lib/dotjs/enum.js deleted file mode 100644 index 90580b9f..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/enum.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/format.js b/test-eol-project/node_modules/ajv/lib/dotjs/format.js deleted file mode 100644 index cd9a5693..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/format.js +++ /dev/null @@ -1,150 +0,0 @@ -'use strict'; -module.exports = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/if.js b/test-eol-project/node_modules/ajv/lib/dotjs/if.js deleted file mode 100644 index 94d27ad8..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/if.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/index.js b/test-eol-project/node_modules/ajv/lib/dotjs/index.js deleted file mode 100644 index 2fb1b00e..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': require('./ref'), - allOf: require('./allOf'), - anyOf: require('./anyOf'), - '$comment': require('./comment'), - const: require('./const'), - contains: require('./contains'), - dependencies: require('./dependencies'), - 'enum': require('./enum'), - format: require('./format'), - 'if': require('./if'), - items: require('./items'), - maximum: require('./_limit'), - minimum: require('./_limit'), - maxItems: require('./_limitItems'), - minItems: require('./_limitItems'), - maxLength: require('./_limitLength'), - minLength: require('./_limitLength'), - maxProperties: require('./_limitProperties'), - minProperties: require('./_limitProperties'), - multipleOf: require('./multipleOf'), - not: require('./not'), - oneOf: require('./oneOf'), - pattern: require('./pattern'), - properties: require('./properties'), - propertyNames: require('./propertyNames'), - required: require('./required'), - uniqueItems: require('./uniqueItems'), - validate: require('./validate') -}; diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/items.js b/test-eol-project/node_modules/ajv/lib/dotjs/items.js deleted file mode 100644 index bee5d67d..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/items.js +++ /dev/null @@ -1,140 +0,0 @@ -'use strict'; -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js deleted file mode 100644 index 9d6401b8..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/multipleOf.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/not.js b/test-eol-project/node_modules/ajv/lib/dotjs/not.js deleted file mode 100644 index f50c9378..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/not.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js b/test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js deleted file mode 100644 index dfe2fd55..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/oneOf.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/pattern.js b/test-eol-project/node_modules/ajv/lib/dotjs/pattern.js deleted file mode 100644 index 7efafef3..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/pattern.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; - if ($isData) { - out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($valid) + ') {'; - } else { - var $regexp = it.usePattern($schema); - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/properties.js b/test-eol-project/node_modules/ajv/lib/dotjs/properties.js deleted file mode 100644 index bc5ee554..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/properties.js +++ /dev/null @@ -1,335 +0,0 @@ -'use strict'; -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties).filter(notProto), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - - function notProto(p) { - return p !== '__proto__'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js b/test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js deleted file mode 100644 index 2a54a08f..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/propertyNames.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js b/test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js deleted file mode 100644 index 0736a0ed..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/uniqueItems.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/dotjs/validate.js b/test-eol-project/node_modules/ajv/lib/dotjs/validate.js deleted file mode 100644 index f295824b..00000000 --- a/test-eol-project/node_modules/ajv/lib/dotjs/validate.js +++ /dev/null @@ -1,482 +0,0 @@ -'use strict'; -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; - } - out += ' if (' + ($coerced) + ' !== undefined) ; '; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == 'string') { - out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' else { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } if (' + ($coerced) + ' !== undefined) { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} diff --git a/test-eol-project/node_modules/ajv/lib/keyword.js b/test-eol-project/node_modules/ajv/lib/keyword.js deleted file mode 100644 index 06da9a2d..00000000 --- a/test-eol-project/node_modules/ajv/lib/keyword.js +++ /dev/null @@ -1,146 +0,0 @@ -'use strict'; - -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = require('./dotjs/custom'); -var definitionSchema = require('./definition_schema'); - -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword -}; - - -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); - - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); - - if (definition) { - this.validateKeyword(definition, true); - - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i=0; i ../ajv-dist/bower.json - cd ../ajv-dist - - if [[ `git status --porcelain` ]]; then - echo "Changes detected. Updating master branch..." - git add -A - git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" - git push --quiet origin master > /dev/null 2>&1 - fi - - echo "Publishing tag..." - - git tag $TRAVIS_TAG - git push --tags > /dev/null 2>&1 - - echo "Done" -fi diff --git a/test-eol-project/node_modules/ajv/scripts/travis-gh-pages b/test-eol-project/node_modules/ajv/scripts/travis-gh-pages deleted file mode 100755 index b3d4f3d0..00000000 --- a/test-eol-project/node_modules/ajv/scripts/travis-gh-pages +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then - git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { - rm -rf ../gh-pages - git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv.git ../gh-pages - mkdir -p ../gh-pages/_source - cp *.md ../gh-pages/_source - cp LICENSE ../gh-pages/_source - currentDir=$(pwd) - cd ../gh-pages - $currentDir/node_modules/.bin/gh-pages-generator - # remove logo from README - sed -i -E "s/]+ajv_logo[^>]+>//" index.md - git config user.email "$GIT_USER_EMAIL" - git config user.name "$GIT_USER_NAME" - git add . - git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" - git push --quiet origin gh-pages > /dev/null 2>&1 - } -fi diff --git a/test-eol-project/node_modules/ansi-regex/index.js b/test-eol-project/node_modules/ansi-regex/index.js deleted file mode 100644 index b9574ed7..00000000 --- a/test-eol-project/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; -}; diff --git a/test-eol-project/node_modules/ansi-regex/license b/test-eol-project/node_modules/ansi-regex/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/ansi-regex/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/ansi-regex/package.json b/test-eol-project/node_modules/ansi-regex/package.json deleted file mode 100644 index eb44fb5c..00000000 --- a/test-eol-project/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "ansi-regex", - "version": "2.1.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Appelman (jbnicolai.com)", - "JD Ballard (github.com/qix-)" - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava --verbose", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "0.17.0", - "xo": "0.16.0" - }, - "xo": { - "rules": { - "guard-for-in": 0, - "no-loop-func": 0 - } - } -} diff --git a/test-eol-project/node_modules/ansi-regex/readme.md b/test-eol-project/node_modules/ansi-regex/readme.md deleted file mode 100644 index 6a928edf..00000000 --- a/test-eol-project/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install --save ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001b[4mcake\u001b[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001b[4mcake\u001b[0m'.match(ansiRegex()); -//=> ['\u001b[4m', '\u001b[0m'] -``` - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/ansi-styles/index.js b/test-eol-project/node_modules/ansi-styles/index.js deleted file mode 100644 index 78945278..00000000 --- a/test-eol-project/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -function assembleStyles () { - var styles = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } - }; - - // fix humans - styles.colors.grey = styles.colors.gray; - - Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; - - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; - - styles[styleName] = group[styleName] = { - open: '\u001b[' + style[0] + 'm', - close: '\u001b[' + style[1] + 'm' - }; - }); - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - }); - - return styles; -} - -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/test-eol-project/node_modules/ansi-styles/license b/test-eol-project/node_modules/ansi-styles/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/ansi-styles/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/ansi-styles/package.json b/test-eol-project/node_modules/ansi-styles/package.json deleted file mode 100644 index 78c535f7..00000000 --- a/test-eol-project/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "ansi-styles", - "version": "2.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Appelman (jbnicolai.com)" - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "*" - } -} diff --git a/test-eol-project/node_modules/ansi-styles/readme.md b/test-eol-project/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3f933f61..00000000 --- a/test-eol-project/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - -![](screenshot.png) - - -## Install - -``` -$ npm install --save ansi-styles -``` - - -## Usage - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` - - -## Advanced usage - -By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `ansi.modifiers` -- `ansi.colors` -- `ansi.bgColors` - - -###### Example - -```js -console.log(ansi.colors.green.open); -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/array-union/index.js b/test-eol-project/node_modules/array-union/index.js deleted file mode 100644 index e33f38a1..00000000 --- a/test-eol-project/node_modules/array-union/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var arrayUniq = require('array-uniq'); - -module.exports = function () { - return arrayUniq([].concat.apply([], arguments)); -}; diff --git a/test-eol-project/node_modules/array-union/license b/test-eol-project/node_modules/array-union/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/array-union/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/array-union/package.json b/test-eol-project/node_modules/array-union/package.json deleted file mode 100644 index 367c844b..00000000 --- a/test-eol-project/node_modules/array-union/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "array-union", - "version": "1.0.2", - "description": "Create an array of unique values, in order, from the input arrays", - "license": "MIT", - "repository": "sindresorhus/array-union", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "set", - "uniq", - "unique", - "duplicate", - "remove", - "union", - "combine", - "merge" - ], - "dependencies": { - "array-uniq": "^1.0.1" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/test-eol-project/node_modules/array-union/readme.md b/test-eol-project/node_modules/array-union/readme.md deleted file mode 100644 index ea472dd0..00000000 --- a/test-eol-project/node_modules/array-union/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) - -> Create an array of unique values, in order, from the input arrays - - -## Install - -``` -$ npm install --save array-union -``` - - -## Usage - -```js -const arrayUnion = require('array-union'); - -arrayUnion([1, 1, 2, 3], [2, 3]); -//=> [1, 2, 3] - -arrayUnion(['foo', 'foo', 'bar'], ['foo']); -//=> ['foo', 'bar'] -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/test-eol-project/node_modules/array-uniq/index.js b/test-eol-project/node_modules/array-uniq/index.js deleted file mode 100644 index edd09f81..00000000 --- a/test-eol-project/node_modules/array-uniq/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -// there's 3 implementations written in increasing order of efficiency - -// 1 - no Set type is defined -function uniqNoSet(arr) { - var ret = []; - - for (var i = 0; i < arr.length; i++) { - if (ret.indexOf(arr[i]) === -1) { - ret.push(arr[i]); - } - } - - return ret; -} - -// 2 - a simple Set type is defined -function uniqSet(arr) { - var seen = new Set(); - return arr.filter(function (el) { - if (!seen.has(el)) { - seen.add(el); - return true; - } - - return false; - }); -} - -// 3 - a standard Set type is defined and it has a forEach method -function uniqSetWithForEach(arr) { - var ret = []; - - (new Set(arr)).forEach(function (el) { - ret.push(el); - }); - - return ret; -} - -// V8 currently has a broken implementation -// https://github.com/joyent/node/issues/8449 -function doesForEachActuallyWork() { - var ret = false; - - (new Set([true])).forEach(function (el) { - ret = el; - }); - - return ret === true; -} - -if ('Set' in global) { - if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { - module.exports = uniqSetWithForEach; - } else { - module.exports = uniqSet; - } -} else { - module.exports = uniqNoSet; -} diff --git a/test-eol-project/node_modules/array-uniq/license b/test-eol-project/node_modules/array-uniq/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/array-uniq/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/array-uniq/package.json b/test-eol-project/node_modules/array-uniq/package.json deleted file mode 100644 index 106a3a95..00000000 --- a/test-eol-project/node_modules/array-uniq/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "array-uniq", - "version": "1.0.3", - "description": "Create an array without duplicates", - "license": "MIT", - "repository": "sindresorhus/array-uniq", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "set", - "uniq", - "unique", - "es6", - "duplicate", - "remove" - ], - "devDependencies": { - "ava": "*", - "es6-set": "^0.1.0", - "require-uncached": "^1.0.2", - "xo": "*" - } -} diff --git a/test-eol-project/node_modules/array-uniq/readme.md b/test-eol-project/node_modules/array-uniq/readme.md deleted file mode 100644 index f0bd98c4..00000000 --- a/test-eol-project/node_modules/array-uniq/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) - -> Create an array without duplicates - -It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). - - -## Install - -``` -$ npm install --save array-uniq -``` - - -## Usage - -```js -const arrayUniq = require('array-uniq'); - -arrayUniq([1, 1, 2, 3, 3]); -//=> [1, 2, 3] - -arrayUniq(['foo', 'foo', 'bar', 'foo']); -//=> ['foo', 'bar'] -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/test-eol-project/node_modules/arrify/index.js b/test-eol-project/node_modules/arrify/index.js deleted file mode 100644 index 2a2fdeeb..00000000 --- a/test-eol-project/node_modules/arrify/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = function (val) { - if (val === null || val === undefined) { - return []; - } - - return Array.isArray(val) ? val : [val]; -}; diff --git a/test-eol-project/node_modules/arrify/license b/test-eol-project/node_modules/arrify/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/arrify/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/arrify/package.json b/test-eol-project/node_modules/arrify/package.json deleted file mode 100644 index 1e63e597..00000000 --- a/test-eol-project/node_modules/arrify/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "arrify", - "version": "1.0.1", - "description": "Convert a value to an array", - "license": "MIT", - "repository": "sindresorhus/arrify", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "array", - "arr", - "arrify", - "arrayify", - "convert", - "value" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/test-eol-project/node_modules/arrify/readme.md b/test-eol-project/node_modules/arrify/readme.md deleted file mode 100644 index 183d0757..00000000 --- a/test-eol-project/node_modules/arrify/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) - -> Convert a value to an array - - -## Install - -``` -$ npm install --save arrify -``` - - -## Usage - -```js -const arrify = require('arrify'); - -arrify('unicorn'); -//=> ['unicorn'] - -arrify(['unicorn']); -//=> ['unicorn'] - -arrify(null); -//=> [] - -arrify(undefined); -//=> [] -``` - -*Supplying `null` or `undefined` results in an empty array.* - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/asn1/Jenkinsfile b/test-eol-project/node_modules/asn1/Jenkinsfile deleted file mode 100644 index d1b45937..00000000 --- a/test-eol-project/node_modules/asn1/Jenkinsfile +++ /dev/null @@ -1,65 +0,0 @@ -@Library('jenkins-joylib@v1.0.8') _ - -pipeline { - - agent none - - options { - buildDiscarder(logRotator(numToKeepStr: '45')) - timestamps() - } - - stages { - stage('top') { - parallel { - stage('v4-zone') { - agent { - label joyCommonLabels(image_ver: '15.4.1') - } - tools { - nodejs 'sdcnode-v4-zone' - } - stages { - stage('check') { - steps{ - sh('make check') - } - } - stage('test') { - steps{ - sh('make test') - } - } - } - } - - stage('v6-zone64') { - agent { - label joyCommonLabels(image_ver: '18.4.0') - } - tools { - nodejs 'sdcnode-v6-zone64' - } - stages { - stage('check') { - steps{ - sh('make check') - } - } - stage('test') { - steps{ - sh('make test') - } - } - } - } - } - } - } - - post { - always { - joySlackNotifications() - } - } -} diff --git a/test-eol-project/node_modules/asn1/LICENSE b/test-eol-project/node_modules/asn1/LICENSE deleted file mode 100644 index 9b5dcdb7..00000000 --- a/test-eol-project/node_modules/asn1/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Mark Cavage, 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/test-eol-project/node_modules/asn1/README.md b/test-eol-project/node_modules/asn1/README.md deleted file mode 100644 index 2208210a..00000000 --- a/test-eol-project/node_modules/asn1/README.md +++ /dev/null @@ -1,50 +0,0 @@ -node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. -Currently BER encoding is supported; at some point I'll likely have to do DER. - -## Usage - -Mostly, if you're *actually* needing to read and write ASN.1, you probably don't -need this readme to explain what and why. If you have no idea what ASN.1 is, -see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -The source is pretty much self-explanatory, and has read/write methods for the -common types out there. - -### Decoding - -The following reads an ASN.1 sequence with a boolean. - - var Ber = require('asn1').Ber; - - var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff])); - - reader.readSequence(); - console.log('Sequence len: ' + reader.length); - if (reader.peek() === Ber.Boolean) - console.log(reader.readBoolean()); - -### Encoding - -The following generates the same payload as above. - - var Ber = require('asn1').Ber; - - var writer = new Ber.Writer(); - - writer.startSequence(); - writer.writeBoolean(true); - writer.endSequence(); - - console.log(writer.buffer); - -## Installation - - npm install asn1 - -## License - -MIT. - -## Bugs - -See . diff --git a/test-eol-project/node_modules/asn1/lib/ber/errors.js b/test-eol-project/node_modules/asn1/lib/ber/errors.js deleted file mode 100644 index 4557b8ae..00000000 --- a/test-eol-project/node_modules/asn1/lib/ber/errors.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - - -module.exports = { - - newInvalidAsn1Error: function (msg) { - var e = new Error(); - e.name = 'InvalidAsn1Error'; - e.message = msg || ''; - return e; - } - -}; diff --git a/test-eol-project/node_modules/asn1/lib/ber/index.js b/test-eol-project/node_modules/asn1/lib/ber/index.js deleted file mode 100644 index 387d1326..00000000 --- a/test-eol-project/node_modules/asn1/lib/ber/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -var errors = require('./errors'); -var types = require('./types'); - -var Reader = require('./reader'); -var Writer = require('./writer'); - - -// --- Exports - -module.exports = { - - Reader: Reader, - - Writer: Writer - -}; - -for (var t in types) { - if (types.hasOwnProperty(t)) - module.exports[t] = types[t]; -} -for (var e in errors) { - if (errors.hasOwnProperty(e)) - module.exports[e] = errors[e]; -} diff --git a/test-eol-project/node_modules/asn1/lib/ber/reader.js b/test-eol-project/node_modules/asn1/lib/ber/reader.js deleted file mode 100644 index 8a7e4ca0..00000000 --- a/test-eol-project/node_modules/asn1/lib/ber/reader.js +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -var assert = require('assert'); -var Buffer = require('safer-buffer').Buffer; - -var ASN1 = require('./types'); -var errors = require('./errors'); - - -// --- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - - - -// --- API - -function Reader(data) { - if (!data || !Buffer.isBuffer(data)) - throw new TypeError('data must be a node Buffer'); - - this._buf = data; - this._size = data.length; - - // These hold the "current" state - this._len = 0; - this._offset = 0; -} - -Object.defineProperty(Reader.prototype, 'length', { - enumerable: true, - get: function () { return (this._len); } -}); - -Object.defineProperty(Reader.prototype, 'offset', { - enumerable: true, - get: function () { return (this._offset); } -}); - -Object.defineProperty(Reader.prototype, 'remain', { - get: function () { return (this._size - this._offset); } -}); - -Object.defineProperty(Reader.prototype, 'buffer', { - get: function () { return (this._buf.slice(this._offset)); } -}); - - -/** - * Reads a single byte and advances offset; you can pass in `true` to make this - * a "peek" operation (i.e., get the byte, but don't advance the offset). - * - * @param {Boolean} peek true means don't move offset. - * @return {Number} the next byte, null if not enough data. - */ -Reader.prototype.readByte = function (peek) { - if (this._size - this._offset < 1) - return null; - - var b = this._buf[this._offset] & 0xff; - - if (!peek) - this._offset += 1; - - return b; -}; - - -Reader.prototype.peek = function () { - return this.readByte(true); -}; - - -/** - * Reads a (potentially) variable length off the BER buffer. This call is - * not really meant to be called directly, as callers have to manipulate - * the internal buffer afterwards. - * - * As a result of this call, you can call `Reader.length`, until the - * next thing called that does a readLength. - * - * @return {Number} the amount of offset to advance the buffer. - * @throws {InvalidAsn1Error} on bad ASN.1 - */ -Reader.prototype.readLength = function (offset) { - if (offset === undefined) - offset = this._offset; - - if (offset >= this._size) - return null; - - var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; - - if ((lenB & 0x80) === 0x80) { - lenB &= 0x7f; - - if (lenB === 0) - throw newInvalidAsn1Error('Indefinite length not supported'); - - if (lenB > 4) - throw newInvalidAsn1Error('encoding too long'); - - if (this._size - offset < lenB) - return null; - - this._len = 0; - for (var i = 0; i < lenB; i++) - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); - - } else { - // Wasn't a variable length - this._len = lenB; - } - - return offset; -}; - - -/** - * Parses the next sequence in this BER buffer. - * - * To get the length of the sequence, call `Reader.length`. - * - * @return {Number} the sequence's tag. - */ -Reader.prototype.readSequence = function (tag) { - var seq = this.peek(); - if (seq === null) - return null; - if (tag !== undefined && tag !== seq) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + seq.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - this._offset = o; - return seq; -}; - - -Reader.prototype.readInt = function () { - return this._readTag(ASN1.Integer); -}; - - -Reader.prototype.readBoolean = function () { - return (this._readTag(ASN1.Boolean) === 0 ? false : true); -}; - - -Reader.prototype.readEnumeration = function () { - return this._readTag(ASN1.Enumeration); -}; - - -Reader.prototype.readString = function (tag, retbuf) { - if (!tag) - tag = ASN1.OctetString; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - if (this.length === 0) - return retbuf ? Buffer.alloc(0) : ''; - - var str = this._buf.slice(this._offset, this._offset + this.length); - this._offset += this.length; - - return retbuf ? str : str.toString('utf8'); -}; - -Reader.prototype.readOID = function (tag) { - if (!tag) - tag = ASN1.OID; - - var b = this.readString(tag, true); - if (b === null) - return null; - - var values = []; - var value = 0; - - for (var i = 0; i < b.length; i++) { - var byte = b[i] & 0xff; - - value <<= 7; - value += byte & 0x7f; - if ((byte & 0x80) === 0) { - values.push(value); - value = 0; - } - } - - value = values.shift(); - values.unshift(value % 40); - values.unshift((value / 40) >> 0); - - return values.join('.'); -}; - - -Reader.prototype._readTag = function (tag) { - assert.ok(tag !== undefined); - - var b = this.peek(); - - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > 4) - throw newInvalidAsn1Error('Integer too long: ' + this.length); - - if (this.length > this._size - o) - return null; - this._offset = o; - - var fb = this._buf[this._offset]; - var value = 0; - - for (var i = 0; i < this.length; i++) { - value <<= 8; - value |= (this._buf[this._offset++] & 0xff); - } - - if ((fb & 0x80) === 0x80 && i !== 4) - value -= (1 << (i * 8)); - - return value >> 0; -}; - - - -// --- Exported API - -module.exports = Reader; diff --git a/test-eol-project/node_modules/asn1/lib/ber/types.js b/test-eol-project/node_modules/asn1/lib/ber/types.js deleted file mode 100644 index 8aea0001..00000000 --- a/test-eol-project/node_modules/asn1/lib/ber/types.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - - -module.exports = { - EOC: 0, - Boolean: 1, - Integer: 2, - BitString: 3, - OctetString: 4, - Null: 5, - OID: 6, - ObjectDescriptor: 7, - External: 8, - Real: 9, // float - Enumeration: 10, - PDV: 11, - Utf8String: 12, - RelativeOID: 13, - Sequence: 16, - Set: 17, - NumericString: 18, - PrintableString: 19, - T61String: 20, - VideotexString: 21, - IA5String: 22, - UTCTime: 23, - GeneralizedTime: 24, - GraphicString: 25, - VisibleString: 26, - GeneralString: 28, - UniversalString: 29, - CharacterString: 30, - BMPString: 31, - Constructor: 32, - Context: 128 -}; diff --git a/test-eol-project/node_modules/asn1/lib/ber/writer.js b/test-eol-project/node_modules/asn1/lib/ber/writer.js deleted file mode 100644 index 3515acf7..00000000 --- a/test-eol-project/node_modules/asn1/lib/ber/writer.js +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -var assert = require('assert'); -var Buffer = require('safer-buffer').Buffer; -var ASN1 = require('./types'); -var errors = require('./errors'); - - -// --- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - -var DEFAULT_OPTS = { - size: 1024, - growthFactor: 8 -}; - - -// --- Helpers - -function merge(from, to) { - assert.ok(from); - assert.equal(typeof (from), 'object'); - assert.ok(to); - assert.equal(typeof (to), 'object'); - - var keys = Object.getOwnPropertyNames(from); - keys.forEach(function (key) { - if (to[key]) - return; - - var value = Object.getOwnPropertyDescriptor(from, key); - Object.defineProperty(to, key, value); - }); - - return to; -} - - - -// --- API - -function Writer(options) { - options = merge(DEFAULT_OPTS, options || {}); - - this._buf = Buffer.alloc(options.size || 1024); - this._size = this._buf.length; - this._offset = 0; - this._options = options; - - // A list of offsets in the buffer where we need to insert - // sequence tag/len pairs. - this._seq = []; -} - -Object.defineProperty(Writer.prototype, 'buffer', { - get: function () { - if (this._seq.length) - throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); - - return (this._buf.slice(0, this._offset)); - } -}); - -Writer.prototype.writeByte = function (b) { - if (typeof (b) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(1); - this._buf[this._offset++] = b; -}; - - -Writer.prototype.writeInt = function (i, tag) { - if (typeof (i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof (tag) !== 'number') - tag = ASN1.Integer; - - var sz = 4; - - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && - (sz > 1)) { - sz--; - i <<= 8; - } - - if (sz > 4) - throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); - - this._ensure(2 + sz); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = sz; - - while (sz-- > 0) { - this._buf[this._offset++] = ((i & 0xff000000) >>> 24); - i <<= 8; - } - -}; - - -Writer.prototype.writeNull = function () { - this.writeByte(ASN1.Null); - this.writeByte(0x00); -}; - - -Writer.prototype.writeEnumeration = function (i, tag) { - if (typeof (i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof (tag) !== 'number') - tag = ASN1.Enumeration; - - return this.writeInt(i, tag); -}; - - -Writer.prototype.writeBoolean = function (b, tag) { - if (typeof (b) !== 'boolean') - throw new TypeError('argument must be a Boolean'); - if (typeof (tag) !== 'number') - tag = ASN1.Boolean; - - this._ensure(3); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = 0x01; - this._buf[this._offset++] = b ? 0xff : 0x00; -}; - - -Writer.prototype.writeString = function (s, tag) { - if (typeof (s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); - if (typeof (tag) !== 'number') - tag = ASN1.OctetString; - - var len = Buffer.byteLength(s); - this.writeByte(tag); - this.writeLength(len); - if (len) { - this._ensure(len); - this._buf.write(s, this._offset); - this._offset += len; - } -}; - - -Writer.prototype.writeBuffer = function (buf, tag) { - if (typeof (tag) !== 'number') - throw new TypeError('tag must be a number'); - if (!Buffer.isBuffer(buf)) - throw new TypeError('argument must be a buffer'); - - this.writeByte(tag); - this.writeLength(buf.length); - this._ensure(buf.length); - buf.copy(this._buf, this._offset, 0, buf.length); - this._offset += buf.length; -}; - - -Writer.prototype.writeStringArray = function (strings) { - if ((!strings instanceof Array)) - throw new TypeError('argument must be an Array[String]'); - - var self = this; - strings.forEach(function (s) { - self.writeString(s); - }); -}; - -// This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function (s, tag) { - if (typeof (s) !== 'string') - throw new TypeError('argument must be a string'); - if (typeof (tag) !== 'number') - tag = ASN1.OID; - - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) - throw new Error('argument is not a valid OID string'); - - function encodeOctet(bytes, octet) { - if (octet < 128) { - bytes.push(octet); - } else if (octet < 16384) { - bytes.push((octet >>> 7) | 0x80); - bytes.push(octet & 0x7F); - } else if (octet < 2097152) { - bytes.push((octet >>> 14) | 0x80); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else if (octet < 268435456) { - bytes.push((octet >>> 21) | 0x80); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else { - bytes.push(((octet >>> 28) | 0x80) & 0xFF); - bytes.push(((octet >>> 21) | 0x80) & 0xFF); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } - } - - var tmp = s.split('.'); - var bytes = []; - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function (b) { - encodeOctet(bytes, parseInt(b, 10)); - }); - - var self = this; - this._ensure(2 + bytes.length); - this.writeByte(tag); - this.writeLength(bytes.length); - bytes.forEach(function (b) { - self.writeByte(b); - }); -}; - - -Writer.prototype.writeLength = function (len) { - if (typeof (len) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(4); - - if (len <= 0x7f) { - this._buf[this._offset++] = len; - } else if (len <= 0xff) { - this._buf[this._offset++] = 0x81; - this._buf[this._offset++] = len; - } else if (len <= 0xffff) { - this._buf[this._offset++] = 0x82; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else if (len <= 0xffffff) { - this._buf[this._offset++] = 0x83; - this._buf[this._offset++] = len >> 16; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else { - throw newInvalidAsn1Error('Length too long (> 4 bytes)'); - } -}; - -Writer.prototype.startSequence = function (tag) { - if (typeof (tag) !== 'number') - tag = ASN1.Sequence | ASN1.Constructor; - - this.writeByte(tag); - this._seq.push(this._offset); - this._ensure(3); - this._offset += 3; -}; - - -Writer.prototype.endSequence = function () { - var seq = this._seq.pop(); - var start = seq + 3; - var len = this._offset - start; - - if (len <= 0x7f) { - this._shift(start, len, -2); - this._buf[seq] = len; - } else if (len <= 0xff) { - this._shift(start, len, -1); - this._buf[seq] = 0x81; - this._buf[seq + 1] = len; - } else if (len <= 0xffff) { - this._buf[seq] = 0x82; - this._buf[seq + 1] = len >> 8; - this._buf[seq + 2] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[seq] = 0x83; - this._buf[seq + 1] = len >> 16; - this._buf[seq + 2] = len >> 8; - this._buf[seq + 3] = len; - } else { - throw newInvalidAsn1Error('Sequence too long'); - } -}; - - -Writer.prototype._shift = function (start, len, shift) { - assert.ok(start !== undefined); - assert.ok(len !== undefined); - assert.ok(shift); - - this._buf.copy(this._buf, start + shift, start, start + len); - this._offset += shift; -}; - -Writer.prototype._ensure = function (len) { - assert.ok(len); - - if (this._size - this._offset < len) { - var sz = this._size * this._options.growthFactor; - if (sz - this._offset < len) - sz += len; - - var buf = Buffer.alloc(sz); - - this._buf.copy(buf, 0, 0, this._offset); - this._buf = buf; - this._size = sz; - } -}; - - - -// --- Exported API - -module.exports = Writer; diff --git a/test-eol-project/node_modules/asn1/lib/index.js b/test-eol-project/node_modules/asn1/lib/index.js deleted file mode 100644 index ede3ab23..00000000 --- a/test-eol-project/node_modules/asn1/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2011 Mark Cavage All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = require('./ber/index'); - - - -// --- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; diff --git a/test-eol-project/node_modules/asn1/package.json b/test-eol-project/node_modules/asn1/package.json deleted file mode 100644 index e31cce5e..00000000 --- a/test-eol-project/node_modules/asn1/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "author": "Joyent (joyent.com)", - "contributors": [ - "Mark Cavage ", - "David Gwynne ", - "Yunong Xiao ", - "Alex Wilson " - ], - "name": "asn1", - "description": "Contains parsers and serializers for ASN.1 (currently BER only)", - "version": "0.2.6", - "repository": { - "type": "git", - "url": "https://github.com/joyent/node-asn1.git" - }, - "main": "lib/index.js", - "dependencies": { - "safer-buffer": "~2.1.0" - }, - "devDependencies": { - "istanbul": "^0.3.6", - "faucet": "0.0.1", - "tape": "^3.5.0", - "eslint": "2.13.1", - "eslint-plugin-joyent": "~1.3.0" - }, - "scripts": { - "test": "./node_modules/.bin/tape ./test/ber/*.test.js" - }, - "license": "MIT" -} diff --git a/test-eol-project/node_modules/assert-plus/AUTHORS b/test-eol-project/node_modules/assert-plus/AUTHORS deleted file mode 100644 index 1923524f..00000000 --- a/test-eol-project/node_modules/assert-plus/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -Dave Eddy -Fred Kuo -Lars-Magnus Skog -Mark Cavage -Patrick Mooney -Rob Gulewich diff --git a/test-eol-project/node_modules/assert-plus/CHANGES.md b/test-eol-project/node_modules/assert-plus/CHANGES.md deleted file mode 100644 index 57d92bfd..00000000 --- a/test-eol-project/node_modules/assert-plus/CHANGES.md +++ /dev/null @@ -1,14 +0,0 @@ -# assert-plus Changelog - -## 1.0.0 - -- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input -- Add assert.finite check. Previous assert.number callers should use this if - they expect Infinity inputs to throw. - -## 0.2.0 - -- Fix `assert.object(null)` so it throws -- Fix optional/arrayOf exports for non-type-of asserts -- Add optiona/arrayOf exports for Stream/Date/Regex/uuid -- Add basic unit test coverage diff --git a/test-eol-project/node_modules/assert-plus/README.md b/test-eol-project/node_modules/assert-plus/README.md deleted file mode 100644 index ec200d16..00000000 --- a/test-eol-project/node_modules/assert-plus/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - -```javascript - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id'); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } -``` - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object. (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - -```javascript - function test(foo) { - assert.string(foo, 'foo'); - } -``` - -There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: - -```javascript - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } -``` - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - -```javascript - assert.optionalString(foo, 'foo'); -``` - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. Be advised: The standard functions re-exported from `assert` are -also disabled in assert-plus if NDEBUG is specified. Using them directly from -the `assert` module avoids this behavior. - -The complete list of APIs is: - -* assert.array -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.finite -* assert.object -* assert.string -* assert.stream -* assert.date -* assert.regexp -* assert.uuid -* assert.arrayOfArray -* assert.arrayOfBool -* assert.arrayOfBuffer -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfFinite -* assert.arrayOfObject -* assert.arrayOfString -* assert.arrayOfStream -* assert.arrayOfDate -* assert.arrayOfRegexp -* assert.arrayOfUuid -* assert.optionalArray -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalFinite -* assert.optionalObject -* assert.optionalString -* assert.optionalStream -* assert.optionalDate -* assert.optionalRegexp -* assert.optionalUuid -* assert.optionalArrayOfArray -* assert.optionalArrayOfBool -* assert.optionalArrayOfBuffer -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfFinite -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.optionalArrayOfStream -* assert.optionalArrayOfDate -* assert.optionalArrayOfRegexp -* assert.optionalArrayOfUuid -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -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. - -## Bugs - -See . diff --git a/test-eol-project/node_modules/assert-plus/assert.js b/test-eol-project/node_modules/assert-plus/assert.js deleted file mode 100644 index 26f944ee..00000000 --- a/test-eol-project/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. -// Copyright 2015 Joyent, Inc. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - -///--- Globals - -/* JSSTYLED */ -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - - -///--- Internal - -function _capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function _toss(name, expected, oper, arg, actual) { - throw new assert.AssertionError({ - message: util.format('%s (%s) is required', name, expected), - actual: (actual === undefined) ? typeof (arg) : actual(arg), - expected: expected, - operator: oper || '===', - stackStartFunction: _toss.caller - }); -} - -function _getClass(arg) { - return (Object.prototype.toString.call(arg).slice(8, -1)); -} - -function noop() { - // Why even bother with asserts? -} - - -///--- Exports - -var types = { - bool: { - check: function (arg) { return typeof (arg) === 'boolean'; } - }, - func: { - check: function (arg) { return typeof (arg) === 'function'; } - }, - string: { - check: function (arg) { return typeof (arg) === 'string'; } - }, - object: { - check: function (arg) { - return typeof (arg) === 'object' && arg !== null; - } - }, - number: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg); - } - }, - finite: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); - } - }, - buffer: { - check: function (arg) { return Buffer.isBuffer(arg); }, - operator: 'Buffer.isBuffer' - }, - array: { - check: function (arg) { return Array.isArray(arg); }, - operator: 'Array.isArray' - }, - stream: { - check: function (arg) { return arg instanceof Stream; }, - operator: 'instanceof', - actual: _getClass - }, - date: { - check: function (arg) { return arg instanceof Date; }, - operator: 'instanceof', - actual: _getClass - }, - regexp: { - check: function (arg) { return arg instanceof RegExp; }, - operator: 'instanceof', - actual: _getClass - }, - uuid: { - check: function (arg) { - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); - }, - operator: 'isUUID' - } -}; - -function _setExports(ndebug) { - var keys = Object.keys(types); - var out; - - /* re-export standard assert */ - if (process.env.NODE_NDEBUG) { - out = noop; - } else { - out = function (arg, msg) { - if (!arg) { - _toss(msg, 'true', arg); - } - }; - } - - /* standard checks */ - keys.forEach(function (k) { - if (ndebug) { - out[k] = noop; - return; - } - var type = types[k]; - out[k] = function (arg, msg) { - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* optional checks */ - keys.forEach(function (k) { - var name = 'optional' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* arrayOf checks */ - keys.forEach(function (k) { - var name = 'arrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* optionalArrayOf checks */ - keys.forEach(function (k) { - var name = 'optionalArrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* re-export built-in assertions */ - Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - out[k] = assert[k]; - return; - } - if (ndebug) { - out[k] = noop; - return; - } - out[k] = assert[k]; - }); - - /* export ourselves (for unit tests _only_) */ - out._setExports = _setExports; - - return out; -} - -module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/test-eol-project/node_modules/assert-plus/package.json b/test-eol-project/node_modules/assert-plus/package.json deleted file mode 100644 index 40d6a5cd..00000000 --- a/test-eol-project/node_modules/assert-plus/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "author": "Mark Cavage ", - "name": "assert-plus", - "description": "Extra assertions on top of node's assert module", - "version": "1.0.0", - "license": "MIT", - "main": "./assert.js", - "devDependencies": { - "tape": "4.2.2", - "faucet": "0.0.1" - }, - "optionalDependencies": {}, - "scripts": { - "test": "./node_modules/.bin/tape tests/*.js | ./node_modules/.bin/faucet" - }, - "repository": { - "type": "git", - "url": "https://github.com/mcavage/node-assert-plus.git" - }, - "engines": { - "node": ">=0.8" - } -} diff --git a/test-eol-project/node_modules/asynckit/LICENSE b/test-eol-project/node_modules/asynckit/LICENSE deleted file mode 100644 index c9eca5dd..00000000 --- a/test-eol-project/node_modules/asynckit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Alex Indigo - -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/test-eol-project/node_modules/asynckit/README.md b/test-eol-project/node_modules/asynckit/README.md deleted file mode 100644 index ddcc7e6b..00000000 --- a/test-eol-project/node_modules/asynckit/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) - -Minimal async jobs utility library, with streams support. - -[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) -[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) -[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) - -[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) -[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) -[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) - - - -AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. -Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. - -It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. - -| compression | size | -| :----------------- | -------: | -| asynckit.js | 12.34 kB | -| asynckit.min.js | 4.11 kB | -| asynckit.min.js.gz | 1.47 kB | - - -## Install - -```sh -$ npm install --save asynckit -``` - -## Examples - -### Parallel Jobs - -Runs iterator over provided array in parallel. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will terminate rest of the active jobs (if abort function is provided) -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var parallel = require('asynckit').parallel - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , target = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// async job accepts one element from the array -// and a callback function -function asyncJob(item, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var parallel = require('asynckit/parallel') - , assert = require('assert') - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] - , target = [] - , keys = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); - assert.deepEqual(keys, expectedKeys); -}); - -// supports full value, key, callback (shortcut) interface -function asyncJob(item, key, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - keys.push(key); - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). - -### Serial Jobs - -Runs iterator over provided array sequentially. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will not proceed to the rest of the items in the list -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var serial = require('asynckit/serial') - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// extended interface (item, key, callback) -// also supported for arrays -function asyncJob(item, key, cb) -{ - target.push(key); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var serial = require('asynckit').serial - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , target = [] - ; - - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// shortcut interface (item, callback) -// works for object as well as for the arrays -function asyncJob(item, cb) -{ - target.push(item); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). - -_Note: Since _object_ is an _unordered_ collection of properties, -it may produce unexpected results with sequential iterations. -Whenever order of the jobs' execution is important please use `serialOrdered` method._ - -### Ordered Serial Iterations - -TBD - -For example [compare-property](compare-property) package. - -### Streaming interface - -TBD - -## Want to Know More? - -More examples can be found in [test folder](test/). - -Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. - -## License - -AsyncKit is licensed under the MIT license. diff --git a/test-eol-project/node_modules/asynckit/bench.js b/test-eol-project/node_modules/asynckit/bench.js deleted file mode 100644 index c612f1a5..00000000 --- a/test-eol-project/node_modules/asynckit/bench.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-console: "off" */ - -var asynckit = require('./') - , async = require('async') - , assert = require('assert') - , expected = 0 - ; - -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -var source = []; -for (var z = 1; z < 100; z++) -{ - source.push(z); - expected += z; -} - -suite -// add tests - -.add('async.map', function(deferred) -{ - var total = 0; - - async.map(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -.add('asynckit.parallel', function(deferred) -{ - var total = 0; - - asynckit.parallel(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -// add listeners -.on('cycle', function(ev) -{ - console.log(String(ev.target)); -}) -.on('complete', function() -{ - console.log('Fastest is ' + this.filter('fastest').map('name')); -}) -// run async -.run({ 'async': true }); diff --git a/test-eol-project/node_modules/asynckit/index.js b/test-eol-project/node_modules/asynckit/index.js deleted file mode 100644 index 455f9454..00000000 --- a/test-eol-project/node_modules/asynckit/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = -{ - parallel : require('./parallel.js'), - serial : require('./serial.js'), - serialOrdered : require('./serialOrdered.js') -}; diff --git a/test-eol-project/node_modules/asynckit/lib/abort.js b/test-eol-project/node_modules/asynckit/lib/abort.js deleted file mode 100644 index 114367e5..00000000 --- a/test-eol-project/node_modules/asynckit/lib/abort.js +++ /dev/null @@ -1,29 +0,0 @@ -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} diff --git a/test-eol-project/node_modules/asynckit/lib/async.js b/test-eol-project/node_modules/asynckit/lib/async.js deleted file mode 100644 index 7f1288a4..00000000 --- a/test-eol-project/node_modules/asynckit/lib/async.js +++ /dev/null @@ -1,34 +0,0 @@ -var defer = require('./defer.js'); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} diff --git a/test-eol-project/node_modules/asynckit/lib/defer.js b/test-eol-project/node_modules/asynckit/lib/defer.js deleted file mode 100644 index b67110c7..00000000 --- a/test-eol-project/node_modules/asynckit/lib/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} diff --git a/test-eol-project/node_modules/asynckit/lib/iterate.js b/test-eol-project/node_modules/asynckit/lib/iterate.js deleted file mode 100644 index 5d2839a5..00000000 --- a/test-eol-project/node_modules/asynckit/lib/iterate.js +++ /dev/null @@ -1,75 +0,0 @@ -var async = require('./async.js') - , abort = require('./abort.js') - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_asynckit.js b/test-eol-project/node_modules/asynckit/lib/readable_asynckit.js deleted file mode 100644 index 78ad240f..00000000 --- a/test-eol-project/node_modules/asynckit/lib/readable_asynckit.js +++ /dev/null @@ -1,91 +0,0 @@ -var streamify = require('./streamify.js') - , defer = require('./defer.js') - ; - -// API -module.exports = ReadableAsyncKit; - -/** - * Base constructor for all streams - * used to hold properties/methods - */ -function ReadableAsyncKit() -{ - ReadableAsyncKit.super_.apply(this, arguments); - - // list of active jobs - this.jobs = {}; - - // add stream methods - this.destroy = destroy; - this._start = _start; - this._read = _read; -} - -/** - * Destroys readable stream, - * by aborting outstanding jobs - * - * @returns {void} - */ -function destroy() -{ - if (this.destroyed) - { - return; - } - - this.destroyed = true; - - if (typeof this.terminator == 'function') - { - this.terminator(); - } -} - -/** - * Starts provided jobs in async manner - * - * @private - */ -function _start() -{ - // first argument – runner function - var runner = arguments[0] - // take away first argument - , args = Array.prototype.slice.call(arguments, 1) - // second argument - input data - , input = args[0] - // last argument - result callback - , endCb = streamify.callback.call(this, args[args.length - 1]) - ; - - args[args.length - 1] = endCb; - // third argument - iterator - args[1] = streamify.iterator.call(this, args[1]); - - // allow time for proper setup - defer(function() - { - if (!this.destroyed) - { - this.terminator = runner.apply(null, args); - } - else - { - endCb(null, Array.isArray(input) ? [] : {}); - } - }.bind(this)); -} - - -/** - * Implement _read to comply with Readable streams - * Doesn't really make sense for flowing object mode - * - * @private - */ -function _read() -{ - -} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_parallel.js b/test-eol-project/node_modules/asynckit/lib/readable_parallel.js deleted file mode 100644 index 5d2929f7..00000000 --- a/test-eol-project/node_modules/asynckit/lib/readable_parallel.js +++ /dev/null @@ -1,25 +0,0 @@ -var parallel = require('../parallel.js'); - -// API -module.exports = ReadableParallel; - -/** - * Streaming wrapper to `asynckit.parallel` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableParallel(list, iterator, callback) -{ - if (!(this instanceof ReadableParallel)) - { - return new ReadableParallel(list, iterator, callback); - } - - // turn on object mode - ReadableParallel.super_.call(this, {objectMode: true}); - - this._start(parallel, list, iterator, callback); -} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_serial.js b/test-eol-project/node_modules/asynckit/lib/readable_serial.js deleted file mode 100644 index 78226982..00000000 --- a/test-eol-project/node_modules/asynckit/lib/readable_serial.js +++ /dev/null @@ -1,25 +0,0 @@ -var serial = require('../serial.js'); - -// API -module.exports = ReadableSerial; - -/** - * Streaming wrapper to `asynckit.serial` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerial(list, iterator, callback) -{ - if (!(this instanceof ReadableSerial)) - { - return new ReadableSerial(list, iterator, callback); - } - - // turn on object mode - ReadableSerial.super_.call(this, {objectMode: true}); - - this._start(serial, list, iterator, callback); -} diff --git a/test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js b/test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js deleted file mode 100644 index 3de89c47..00000000 --- a/test-eol-project/node_modules/asynckit/lib/readable_serial_ordered.js +++ /dev/null @@ -1,29 +0,0 @@ -var serialOrdered = require('../serialOrdered.js'); - -// API -module.exports = ReadableSerialOrdered; -// expose sort helpers -module.exports.ascending = serialOrdered.ascending; -module.exports.descending = serialOrdered.descending; - -/** - * Streaming wrapper to `asynckit.serialOrdered` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerialOrdered(list, iterator, sortMethod, callback) -{ - if (!(this instanceof ReadableSerialOrdered)) - { - return new ReadableSerialOrdered(list, iterator, sortMethod, callback); - } - - // turn on object mode - ReadableSerialOrdered.super_.call(this, {objectMode: true}); - - this._start(serialOrdered, list, iterator, sortMethod, callback); -} diff --git a/test-eol-project/node_modules/asynckit/lib/state.js b/test-eol-project/node_modules/asynckit/lib/state.js deleted file mode 100644 index cbea7ad8..00000000 --- a/test-eol-project/node_modules/asynckit/lib/state.js +++ /dev/null @@ -1,37 +0,0 @@ -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} diff --git a/test-eol-project/node_modules/asynckit/lib/streamify.js b/test-eol-project/node_modules/asynckit/lib/streamify.js deleted file mode 100644 index f56a1c92..00000000 --- a/test-eol-project/node_modules/asynckit/lib/streamify.js +++ /dev/null @@ -1,141 +0,0 @@ -var async = require('./async.js'); - -// API -module.exports = { - iterator: wrapIterator, - callback: wrapCallback -}; - -/** - * Wraps iterators with long signature - * - * @this ReadableAsyncKit# - * @param {function} iterator - function to wrap - * @returns {function} - wrapped function - */ -function wrapIterator(iterator) -{ - var stream = this; - - return function(item, key, cb) - { - var aborter - , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) - ; - - stream.jobs[key] = wrappedCb; - - // it's either shortcut (item, cb) - if (iterator.length == 2) - { - aborter = iterator(item, wrappedCb); - } - // or long format (item, key, cb) - else - { - aborter = iterator(item, key, wrappedCb); - } - - return aborter; - }; -} - -/** - * Wraps provided callback function - * allowing to execute snitch function before - * real callback - * - * @this ReadableAsyncKit# - * @param {function} callback - function to wrap - * @returns {function} - wrapped function - */ -function wrapCallback(callback) -{ - var stream = this; - - var wrapped = function(error, result) - { - return finisher.call(stream, error, result, callback); - }; - - return wrapped; -} - -/** - * Wraps provided iterator callback function - * makes sure snitch only called once, - * but passes secondary calls to the original callback - * - * @this ReadableAsyncKit# - * @param {function} callback - callback to wrap - * @param {number|string} key - iteration key - * @returns {function} wrapped callback - */ -function wrapIteratorCallback(callback, key) -{ - var stream = this; - - return function(error, output) - { - // don't repeat yourself - if (!(key in stream.jobs)) - { - callback(error, output); - return; - } - - // clean up jobs - delete stream.jobs[key]; - - return streamer.call(stream, error, {key: key, value: output}, callback); - }; -} - -/** - * Stream wrapper for iterator callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects iterator results - */ -function streamer(error, output, callback) -{ - if (error && !this.error) - { - this.error = error; - this.pause(); - this.emit('error', error); - // send back value only, as expected - callback(error, output && output.value); - return; - } - - // stream stuff - this.push(output); - - // back to original track - // send back value only, as expected - callback(error, output && output.value); -} - -/** - * Stream wrapper for finishing callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects final results - */ -function finisher(error, output, callback) -{ - // signal end of the stream - // only for successfully finished streams - if (!error) - { - this.push(null); - } - - // back to original track - callback(error, output); -} diff --git a/test-eol-project/node_modules/asynckit/lib/terminator.js b/test-eol-project/node_modules/asynckit/lib/terminator.js deleted file mode 100644 index d6eb9921..00000000 --- a/test-eol-project/node_modules/asynckit/lib/terminator.js +++ /dev/null @@ -1,29 +0,0 @@ -var abort = require('./abort.js') - , async = require('./async.js') - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} diff --git a/test-eol-project/node_modules/asynckit/package.json b/test-eol-project/node_modules/asynckit/package.json deleted file mode 100644 index 51147d65..00000000 --- a/test-eol-project/node_modules/asynckit/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "asynckit", - "version": "0.4.0", - "description": "Minimal async jobs utility library, with streams support", - "main": "index.js", - "scripts": { - "clean": "rimraf coverage", - "lint": "eslint *.js lib/*.js test/*.js", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js", - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "debug": "tape test/test-*.js" - }, - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "author": "Alex Indigo ", - "license": "MIT", - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "homepage": "https://github.com/alexindigo/asynckit#readme", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "dependencies": {} -} diff --git a/test-eol-project/node_modules/asynckit/parallel.js b/test-eol-project/node_modules/asynckit/parallel.js deleted file mode 100644 index 3c50344d..00000000 --- a/test-eol-project/node_modules/asynckit/parallel.js +++ /dev/null @@ -1,43 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} diff --git a/test-eol-project/node_modules/asynckit/serial.js b/test-eol-project/node_modules/asynckit/serial.js deleted file mode 100644 index 6cd949a6..00000000 --- a/test-eol-project/node_modules/asynckit/serial.js +++ /dev/null @@ -1,17 +0,0 @@ -var serialOrdered = require('./serialOrdered.js'); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} diff --git a/test-eol-project/node_modules/asynckit/serialOrdered.js b/test-eol-project/node_modules/asynckit/serialOrdered.js deleted file mode 100644 index 607eafea..00000000 --- a/test-eol-project/node_modules/asynckit/serialOrdered.js +++ /dev/null @@ -1,75 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} diff --git a/test-eol-project/node_modules/asynckit/stream.js b/test-eol-project/node_modules/asynckit/stream.js deleted file mode 100644 index d43465f9..00000000 --- a/test-eol-project/node_modules/asynckit/stream.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('util').inherits - , Readable = require('stream').Readable - , ReadableAsyncKit = require('./lib/readable_asynckit.js') - , ReadableParallel = require('./lib/readable_parallel.js') - , ReadableSerial = require('./lib/readable_serial.js') - , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') - ; - -// API -module.exports = -{ - parallel : ReadableParallel, - serial : ReadableSerial, - serialOrdered : ReadableSerialOrdered, -}; - -inherits(ReadableAsyncKit, Readable); - -inherits(ReadableParallel, ReadableAsyncKit); -inherits(ReadableSerial, ReadableAsyncKit); -inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/test-eol-project/node_modules/aws-sign2/LICENSE b/test-eol-project/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/test-eol-project/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/test-eol-project/node_modules/aws-sign2/README.md b/test-eol-project/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0..00000000 --- a/test-eol-project/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/test-eol-project/node_modules/aws-sign2/index.js b/test-eol-project/node_modules/aws-sign2/index.js deleted file mode 100644 index fb35f6db..00000000 --- a/test-eol-project/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,212 +0,0 @@ - -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.stringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/test-eol-project/node_modules/aws-sign2/package.json b/test-eol-project/node_modules/aws-sign2/package.json deleted file mode 100644 index 4c3d57e5..00000000 --- a/test-eol-project/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "Mikeal Rogers (http://www.futurealoof.com)", - "name": "aws-sign2", - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "version": "0.7.0", - "repository": { - "url": "https://github.com/mikeal/aws-sign" - }, - "license": "Apache-2.0", - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - } -} diff --git a/test-eol-project/node_modules/aws4/LICENSE b/test-eol-project/node_modules/aws4/LICENSE deleted file mode 100644 index 4f321e59..00000000 --- a/test-eol-project/node_modules/aws4/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2013 Michael Hart (michael.hart.au@gmail.com) - -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/test-eol-project/node_modules/aws4/README.md b/test-eol-project/node_modules/aws4/README.md deleted file mode 100644 index fa4d5946..00000000 --- a/test-eol-project/node_modules/aws4/README.md +++ /dev/null @@ -1,211 +0,0 @@ -aws4 ----- - -A small utility to sign [vanilla Node.js http(s)](https://nodejs.org/api/http.html) request options using Amazon's -[AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). - -If you want to sign and send AWS requests using [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), then check out [aws4fetch](https://github.com/mhart/aws4fetch) – otherwise you can also bundle this library for use [in older browsers](./browser). - -The only AWS service I know of that *doesn't* support v4 is -[SimpleDB](https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) -(it only supports [AWS Signature Version 2](https://github.com/mhart/aws2)). - -It also provides defaults for a number of core AWS headers and -request parameters, making it very easy to query AWS services, or -build out a fully-featured AWS library. - -Example -------- - -```javascript -var https = require('https') -var aws4 = require('aws4') - -// to illustrate usage, we'll create a utility function to request and pipe to stdout -function request(opts) { https.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') } - -// aws4 will sign an options object as you'd pass to http.request, with an AWS service and region -var opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object', service: 's3', region: 'us-west-1' } - -// aws4.sign() will sign and modify these options, ready to pass to http.request -aws4.sign(opts, { accessKeyId: '', secretAccessKey: '' }) - -// or it can get credentials from process.env.AWS_ACCESS_KEY_ID, etc -aws4.sign(opts) - -// for most AWS services, aws4 can figure out the service and region if you pass a host -opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object' } - -// usually it will add/modify request headers, but you can also sign the query: -opts = { host: 'my-bucket.s3.amazonaws.com', path: '/?X-Amz-Expires=12345', signQuery: true } - -// and for services with simple hosts, aws4 can infer the host from service and region: -opts = { service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues' } - -// and if you're using us-east-1, it's the default: -opts = { service: 'sqs', path: '/?Action=ListQueues' } - -aws4.sign(opts) -console.log(opts) -/* -{ - host: 'sqs.us-east-1.amazonaws.com', - path: '/?Action=ListQueues', - headers: { - Host: 'sqs.us-east-1.amazonaws.com', - 'X-Amz-Date': '20121226T061030Z', - Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' - } -} -*/ - -// we can now use this to query AWS -request(opts) -/* - - -... -*/ - -// aws4 can infer the HTTP method if a body is passed in -// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' -request(aws4.sign({ service: 'iam', body: 'Action=ListGroups&Version=2010-05-08' })) -/* - -... -*/ - -// you can specify any custom option or header as per usual -request(aws4.sign({ - service: 'dynamodb', - region: 'ap-southeast-2', - method: 'POST', - path: '/', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'DynamoDB_20120810.ListTables' - }, - body: '{}' -})) -/* -{"TableNames":[]} -... -*/ - -// you can also specify extra headers to ignore during signing -request(aws4.sign({ - host: '07tjusf2h91cunochc.us-east-1.aoss.amazonaws.com', - method: 'PUT', - path: '/my-index', - body: '{"mappings":{}}', - headers: { - 'Content-Type': 'application/json', - 'X-Amz-Content-Sha256': 'UNSIGNED-PAYLOAD' - }, - extraHeadersToIgnore: { - 'content-length': true - } -})) - -// and headers to include that would normally be ignored -request(aws4.sign({ - service: 'mycustomservice', - path: '/whatever', - headers: { - 'Range': 'bytes=200-1000, 2000-6576, 19000-' - }, - extraHeadersToInclude: { - 'range': true - } -})) - - -// The raw RequestSigner can be used to generate CodeCommit Git passwords -var signer = new aws4.RequestSigner({ - service: 'codecommit', - host: 'git-codecommit.us-east-1.amazonaws.com', - method: 'GIT', - path: '/v1/repos/MyAwesomeRepo', -}) -var password = signer.getDateTime() + 'Z' + signer.signature() - -// see example.js for examples with other services -``` - -API ---- - -### aws4.sign(requestOptions, [credentials]) - -Calculates and populates any necessary AWS headers and/or request -options on `requestOptions`. Returns `requestOptions` as a convenience for chaining. - -`requestOptions` is an object holding the same options that the Node.js -[http.request](https://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) -function takes. - -The following properties of `requestOptions` are used in the signing or -populated if they don't already exist: - -- `hostname` or `host` (will try to be determined from `service` and `region` if not given) -- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) -- `path` (will use `'/'` if not given) -- `body` (will use `''` if not given) -- `service` (will try to be calculated from `hostname` or `host` if not given) -- `region` (will try to be calculated from `hostname` or `host` or use `'us-east-1'` if not given) -- `signQuery` (to sign the query instead of adding an `Authorization` header, defaults to false) -- `extraHeadersToIgnore` (an object with lowercase header keys to ignore when signing, eg `{ 'content-length': true }`) -- `extraHeadersToInclude` (an object with lowercase header keys to include when signing, overriding any ignores) -- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) -- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` - if not given and there is a `body`) -- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) - -Your AWS credentials (which can be found in your -[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) -can be specified in one of two ways: - -- As the second argument, like this: - -```javascript -aws4.sign(requestOptions, { - secretAccessKey: "", - accessKeyId: "", - sessionToken: "" -}) -``` - -- From `process.env`, such as this: - -``` -export AWS_ACCESS_KEY_ID="" -export AWS_SECRET_ACCESS_KEY="" -export AWS_SESSION_TOKEN="" -``` - -(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) - -The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing -with [IAM STS temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html). - -Installation ------------- - -With [npm](https://www.npmjs.com/) do: - -``` -npm install aws4 -``` - -Can also be used [in the browser](./browser). - -Thanks ------- - -Thanks to [@jed](https://github.com/jed) for his -[dynamo-client](https://github.com/jed/dynamo-client) lib where I first -committed and subsequently extracted this code. - -Also thanks to the -[official Node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving -me a start on implementing the v4 signature. diff --git a/test-eol-project/node_modules/aws4/aws4.js b/test-eol-project/node_modules/aws4/aws4.js deleted file mode 100644 index 6a96676f..00000000 --- a/test-eol-project/node_modules/aws4/aws4.js +++ /dev/null @@ -1,383 +0,0 @@ -var aws4 = exports, - url = require('url'), - querystring = require('querystring'), - crypto = require('crypto'), - lru = require('./lru'), - credentialsCache = lru(1000) - -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html - -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} - -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) -} - -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -function encodeRfc3986Full(str) { - return encodeRfc3986(encodeURIComponent(str)) -} - -// A bit of a combination of: -// https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59 -// https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199 -// https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34 -var HEADERS_TO_IGNORE = { - 'authorization': true, - 'connection': true, - 'x-amzn-trace-id': true, - 'user-agent': true, - 'expect': true, - 'presigned-expires': true, - 'range': true, -} - -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = Object.assign({}, (request.headers || {})), - hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() - - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host - - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' - - this.extraHeadersToIgnore = request.extraHeadersToIgnore || Object.create(null) - this.extraHeadersToInclude = request.extraHeadersToInclude || Object.create(null) -} - -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]{1,63})\.(?:([^\.]{0,63})\.)?amazonaws\.com(\.cn)?$/) - var hostParts = (match || []).slice(1, 3) - - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es' || hostParts[1] === 'aoss') - hostParts = hostParts.reverse() - - if (hostParts[1] == 's3') { - hostParts[0] = 's3' - hostParts[1] = 'us-east-1' - } else { - for (var i = 0; i < 2; i++) { - if (/^s3-/.test(hostParts[i])) { - hostParts[1] = hostParts[i].slice(3) - hostParts[0] = 's3' - break - } - } - } - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : '.' + this.region, - subdomain = this.service === 'ses' ? 'email' : this.service - return subdomain + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash - - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } - - if (query) { - var reducedQuery = Object.keys(query).reduce(function(obj, key) { - if (!key) return obj - obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key]) - return obj - }, {}) - var encodedQueryPieces = [] - Object.keys(reducedQuery).sort().forEach(function(key) { - if (!Array.isArray(reducedQuery[key])) { - encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) - } else { - reducedQuery[key].map(encodeRfc3986Full).sort() - .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) - } - }) - queryStr = encodedQueryPieces.join('&') - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) - path.push(encodeRfc3986Full(piece)) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.filterHeaders = function() { - var headers = this.request.headers, - extraHeadersToInclude = this.extraHeadersToInclude, - extraHeadersToIgnore = this.extraHeadersToIgnore - this.filteredHeaders = Object.keys(headers) - .map(function(key) { return [key.toLowerCase(), headers[key]] }) - .filter(function(entry) { - return extraHeadersToInclude[entry[0]] || - (HEADERS_TO_IGNORE[entry[0]] == null && !extraHeadersToIgnore[entry[0]]) - }) - .sort(function(a, b) { return a[0] < b[0] ? -1 : 1 }) -} - -RequestSigner.prototype.canonicalHeaders = function() { - if (!this.filteredHeaders) this.filterHeaders() - - return this.filteredHeaders.map(function(entry) { - return entry[0] + ':' + entry[1].toString().trim().replace(/\s+/g, ' ') - }).join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - if (!this.filteredHeaders) this.filterHeaders() - - return this.filteredHeaders.map(function(entry) { return entry[0] }).join(';') -} - -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} - -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} - -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/' - - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { - path = encodeURI(decodeURI(path)) - } - - var queryIx = path.indexOf('?'), - query = null - - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } - - this.parsedPath = { - path: path, - query: query, - } -} - -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query - - if (!query) return path - - // Services don't support empty query string keys - if (query[''] != null) delete query[''] - - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} - -aws4.RequestSigner = RequestSigner - -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} diff --git a/test-eol-project/node_modules/aws4/lru.js b/test-eol-project/node_modules/aws4/lru.js deleted file mode 100644 index 333f66a4..00000000 --- a/test-eol-project/node_modules/aws4/lru.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports = function(size) { - return new LruCache(size) -} - -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} - -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} - -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true -} - -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} - -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } -} - - -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null -} - -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) - - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } -} - -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} - -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } -} - - -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null -} diff --git a/test-eol-project/node_modules/aws4/package.json b/test-eol-project/node_modules/aws4/package.json deleted file mode 100644 index fbd6195e..00000000 --- a/test-eol-project/node_modules/aws4/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "aws4", - "version": "1.13.2", - "description": "Signs and prepares requests using AWS Signature Version 4", - "author": "Michael Hart (https://github.com/mhart)", - "license": "MIT", - "repository": "github:mhart/aws4", - "main": "aws4.js", - "files": [ - "aws4.js", - "lru.js" - ], - "scripts": { - "test": "mocha ./test/fast.js -R list", - "integration": "node ./test/slow.js" - }, - "devDependencies": { - "mocha": "^10.7.3", - "should": "^13.2.3" - } -} diff --git a/test-eol-project/node_modules/balanced-match/.github/FUNDING.yml b/test-eol-project/node_modules/balanced-match/.github/FUNDING.yml deleted file mode 100644 index cea8b16e..00000000 --- a/test-eol-project/node_modules/balanced-match/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -tidelift: "npm/balanced-match" -patreon: juliangruber diff --git a/test-eol-project/node_modules/balanced-match/LICENSE.md b/test-eol-project/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e41..00000000 --- a/test-eol-project/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -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/test-eol-project/node_modules/balanced-match/README.md b/test-eol-project/node_modules/balanced-match/README.md deleted file mode 100644 index d2a48b6b..00000000 --- a/test-eol-project/node_modules/balanced-match/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -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/test-eol-project/node_modules/balanced-match/index.js b/test-eol-project/node_modules/balanced-match/index.js deleted file mode 100644 index c67a6460..00000000 --- a/test-eol-project/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/test-eol-project/node_modules/balanced-match/package.json b/test-eol-project/node_modules/balanced-match/package.json deleted file mode 100644 index ce6073e0..00000000 --- a/test-eol-project/node_modules/balanced-match/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.2", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "tape test/test.js", - "bench": "matcha test/bench.js" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md deleted file mode 100644 index 401d34ed..00000000 --- a/test-eol-project/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/LICENSE b/test-eol-project/node_modules/bcrypt-pbkdf/LICENSE deleted file mode 100644 index fc58d2ab..00000000 --- a/test-eol-project/node_modules/bcrypt-pbkdf/LICENSE +++ /dev/null @@ -1,66 +0,0 @@ -The Blowfish portions are under the following license: - -Blowfish block cipher for OpenBSD -Copyright 1997 Niels Provos -All rights reserved. - -Implementation advice by David Mazieres . - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The bcrypt_pbkdf portions are under the following license: - -Copyright (c) 2013 Ted Unangst - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - -Performance improvements (Javascript-specific): - -Copyright 2016, Joyent Inc -Author: Alex Wilson - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/README.md b/test-eol-project/node_modules/bcrypt-pbkdf/README.md deleted file mode 100644 index 7551f335..00000000 --- a/test-eol-project/node_modules/bcrypt-pbkdf/README.md +++ /dev/null @@ -1,45 +0,0 @@ -Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified -version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), -with some minor performance improvements. The code is copied verbatim (and -un-styled) from Devi's work. - -This product includes software developed by Niels Provos. - -## API - -### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` - -Derive a cryptographic key of arbitrary length from a given password and salt, -using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and -SHA-512. - -See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for -further information. - -Parameters: - - * `pass`, a Uint8Array of length `passlen` - * `passlen`, an integer Number - * `salt`, a Uint8Array of length `saltlen` - * `saltlen`, an integer Number - * `key`, a Uint8Array of length `keylen`, will be filled with output - * `keylen`, an integer Number - * `rounds`, an integer Number, number of rounds of the PBKDF to run - -### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` - -Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as -part of the inner round function in the PBKDF. - -Parameters: - - * `sha2pass`, a Uint8Array of length 64 - * `sha2salt`, a Uint8Array of length 64 - * `out`, a Uint8Array of length 32, will be filled with output - -## License - -This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`. -As a result, it retains the original copyright and license. The two files are -under slightly different (but compatible) licenses, and are here combined in -one file. For each of the full license texts see `LICENSE`. diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/index.js b/test-eol-project/node_modules/bcrypt-pbkdf/index.js deleted file mode 100644 index b1b5ad4b..00000000 --- a/test-eol-project/node_modules/bcrypt-pbkdf/index.js +++ /dev/null @@ -1,556 +0,0 @@ -'use strict'; - -var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; - -/* - * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a - * result, it retains the original copyright and license. The two files are - * under slightly different (but compatible) licenses, and are here combined in - * one file. - * - * Credit for the actual porting work goes to: - * Devi Mandiri - */ - -/* - * The Blowfish portions are under the following license: - * - * Blowfish block cipher for OpenBSD - * Copyright 1997 Niels Provos - * All rights reserved. - * - * Implementation advice by David Mazieres . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * The bcrypt_pbkdf portions are under the following license: - * - * Copyright (c) 2013 Ted Unangst - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Performance improvements (Javascript-specific): - * - * Copyright 2016, Joyent Inc - * Author: Alex Wilson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Ported from OpenBSD bcrypt_pbkdf.c v1.9 - -var BLF_J = 0; - -var Blowfish = function() { - this.S = [ - new Uint32Array([ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), - new Uint32Array([ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), - new Uint32Array([ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), - new Uint32Array([ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) - ]; - this.P = new Uint32Array([ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, - 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, - 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, - 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, - 0x9216d5d9, 0x8979fb1b]); -}; - -function F(S, x8, i) { - return (((S[0][x8[i+3]] + - S[1][x8[i+2]]) ^ - S[2][x8[i+1]]) + - S[3][x8[i]]); -}; - -Blowfish.prototype.encipher = function(x, x8) { - if (x8 === undefined) { - x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - } - x[0] ^= this.P[0]; - for (var i = 1; i < 16; i += 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[17]; - x[1] = t; -}; - -Blowfish.prototype.decipher = function(x) { - var x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - x[0] ^= this.P[17]; - for (var i = 16; i > 0; i -= 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[0]; - x[1] = t; -}; - -function stream2word(data, databytes){ - var i, temp = 0; - for (i = 0; i < 4; i++, BLF_J++) { - if (BLF_J >= databytes) BLF_J = 0; - temp = (temp << 8) | data[BLF_J]; - } - return temp; -}; - -Blowfish.prototype.expand0state = function(key, keybytes) { - var d = new Uint32Array(2), i, k; - var d8 = new Uint8Array(d.buffer); - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - BLF_J = 0; - - for (i = 0; i < 18; i += 2) { - this.encipher(d, d8); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - this.encipher(d, d8); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } -}; - -Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { - var d = new Uint32Array(2), i, k; - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - - for (i = 0, BLF_J = 0; i < 18; i += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } - BLF_J = 0; -}; - -Blowfish.prototype.enc = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.encipher(data.subarray(i*2)); - } -}; - -Blowfish.prototype.dec = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.decipher(data.subarray(i*2)); - } -}; - -var BCRYPT_BLOCKS = 8, - BCRYPT_HASHSIZE = 32; - -function bcrypt_hash(sha2pass, sha2salt, out) { - var state = new Blowfish(), - cdata = new Uint32Array(BCRYPT_BLOCKS), i, - ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, - 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, - 105,116,101]); //"OxychromaticBlowfishSwatDynamite" - - state.expandstate(sha2salt, 64, sha2pass, 64); - for (i = 0; i < 64; i++) { - state.expand0state(sha2salt, 64); - state.expand0state(sha2pass, 64); - } - - for (i = 0; i < BCRYPT_BLOCKS; i++) - cdata[i] = stream2word(ciphertext, ciphertext.byteLength); - for (i = 0; i < 64; i++) - state.enc(cdata, cdata.byteLength / 8); - - for (i = 0; i < BCRYPT_BLOCKS; i++) { - out[4*i+3] = cdata[i] >>> 24; - out[4*i+2] = cdata[i] >>> 16; - out[4*i+1] = cdata[i] >>> 8; - out[4*i+0] = cdata[i]; - } -}; - -function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { - var sha2pass = new Uint8Array(64), - sha2salt = new Uint8Array(64), - out = new Uint8Array(BCRYPT_HASHSIZE), - tmpout = new Uint8Array(BCRYPT_HASHSIZE), - countsalt = new Uint8Array(saltlen+4), - i, j, amt, stride, dest, count, - origkeylen = keylen; - - if (rounds < 1) - return -1; - if (passlen === 0 || saltlen === 0 || keylen === 0 || - keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) - return -1; - - stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); - amt = Math.floor((keylen + stride - 1) / stride); - - for (i = 0; i < saltlen; i++) - countsalt[i] = salt[i]; - - crypto_hash_sha512(sha2pass, pass, passlen); - - for (count = 1; keylen > 0; count++) { - countsalt[saltlen+0] = count >>> 24; - countsalt[saltlen+1] = count >>> 16; - countsalt[saltlen+2] = count >>> 8; - countsalt[saltlen+3] = count; - - crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (i = out.byteLength; i--;) - out[i] = tmpout[i]; - - for (i = 1; i < rounds; i++) { - crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (j = 0; j < out.byteLength; j++) - out[j] ^= tmpout[j]; - } - - amt = Math.min(amt, keylen); - for (i = 0; i < amt; i++) { - dest = i * stride + (count - 1); - if (dest >= origkeylen) - break; - key[dest] = out[i]; - } - keylen -= i; - } - - return 0; -}; - -module.exports = { - BLOCKS: BCRYPT_BLOCKS, - HASHSIZE: BCRYPT_HASHSIZE, - hash: bcrypt_hash, - pbkdf: bcrypt_pbkdf -}; diff --git a/test-eol-project/node_modules/bcrypt-pbkdf/package.json b/test-eol-project/node_modules/bcrypt-pbkdf/package.json deleted file mode 100644 index e93a969b..00000000 --- a/test-eol-project/node_modules/bcrypt-pbkdf/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "bcrypt-pbkdf", - "version": "1.0.2", - "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-bcrypt-pbkdf.git" - }, - "main": "index.js", - "dependencies": { - "tweetnacl": "^0.14.3" - }, - "devDependencies": {}, - "license": "BSD-3-Clause" -} diff --git a/test-eol-project/node_modules/blocking-proxy/.clang-format b/test-eol-project/node_modules/blocking-proxy/.clang-format deleted file mode 100644 index 8d1c3c31..00000000 --- a/test-eol-project/node_modules/blocking-proxy/.clang-format +++ /dev/null @@ -1,3 +0,0 @@ -Language: JavaScript -BasedOnStyle: Google -ColumnLimit: 100 diff --git a/test-eol-project/node_modules/blocking-proxy/.nvmrc b/test-eol-project/node_modules/blocking-proxy/.nvmrc deleted file mode 100644 index b3d791d7..00000000 --- a/test-eol-project/node_modules/blocking-proxy/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -4.6 diff --git a/test-eol-project/node_modules/blocking-proxy/LICENSE b/test-eol-project/node_modules/blocking-proxy/LICENSE deleted file mode 100644 index de60465e..00000000 --- a/test-eol-project/node_modules/blocking-proxy/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Angular - -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/test-eol-project/node_modules/blocking-proxy/README.md b/test-eol-project/node_modules/blocking-proxy/README.md deleted file mode 100644 index 2acfaf54..00000000 --- a/test-eol-project/node_modules/blocking-proxy/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Blocking Proxy [![Build Status](https://circleci.com/gh/angular/blocking-proxy.svg?style=shield)](https://circleci.com/gh/angular/blocking-proxy) - -Blocking Proxy is a tool for adding functionality to WebDriver-based -tests. It sits between your tests and the Selenium Server. For each -WebDriver command, it runs a set of 'barriers' that will block -forwarding the command to the Selenium server until some condition -is met. - -Because it interacts with WebDriver at the network level, Blocking Proxy can be -used regardless of which language your tests are written in. See [the example](https://github.com/angular/blocking-proxy/blob/master/examples/README.md) -for a demonstration of using Blocking Proxy with WebDriver tests written in Python. - -Although Blocking Proxy can handle multiple WebDriver sessions, it can not yet handle -multiple concurrent clients. Thus, it's recommended to start a separate instance -for each test process. - -# Usage - -Blocking Proxy can be installed globally with `npm install -g blocking-proxy`. -You can also use it by cloning this repo and running these commands: - -``` -npm install -webdriver-manager update && webdriver-manager start (in another terminal) -node ./built/lib/bin.js --seleniumAddress http://localhost:4444/wd/hub -``` - -# Features - -## Wait for Angular - -When testing an Angular application, Blocking Proxy can block webdriver commands -until Angular's change detection is finished, and thus make your tests less flaky. - -## Highlight Delay - -If `--highlightDelay ` is specified, Blocking Proxy will wait for -the specified delay (in milliseconds) before executing click commands or sending -keys. It will also highlight the element that is the target of the command. - -Here's an example of highlight delay in action: - -![Highlight Delay](http://i.giphy.com/jg7B2HHPIkwak.gif) - -## WebDriver logging - -When `--logDir ` is set, Blocking Proxy will create a readable log of -WebDriver commands at the specified path. The log will look something like this: - -``` -20:08:14.830 | 834ms | 37f13c | NewSession - {"browserName":"chrome"} -20:08:15.674 | 4ms | 37f13c | SetTimeouts -20:08:15.681 | 578ms | 37f13c | Go http://localhost:8081/ng1/#/interaction -20:08:16.300 | 438ms | 37f13c | FindElement - Using css selector \'.invalid\' - ERROR: no such element -``` -Each line shows the command that was executed and how long it took. For some -commands, extra data or the response from WebDriver will be shown on following -lines. - -# Development - -## Formatting and lint - -`gulp format` runs clang-format. `gulp lint` validates format and runs tslint. - -## Running tests - -Unit tests live in `spec/unit` and can be run with `npm test`. Run `npm run test:auto` to automatically watch for changes and run unit tests. - -## Running e2e tests - -Start webdriver - - webdriver-manager update - webdriver-manager start - -in another terminal, start the testapp - - npm run testapp - -Start the proxy with - - npm start - -in yet another terminal, run the tests - - npm run test:e2e diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts deleted file mode 100644 index e505b54d..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { SimpleWebDriverClient } from './simple_webdriver_client'; -import { WebDriverCommand } from './webdriver_commands'; -import { WebDriverLogger } from './webdriver_logger'; -import { WebDriverBarrier } from './webdriver_proxy'; -/** - * A barrier that uses Angular's Testability API to block commands until the application is stable. - */ -export declare class AngularWaitBarrier implements WebDriverBarrier { - private client; - rootSelector: string; - enabled: boolean; - logger: WebDriverLogger; - constructor(client: SimpleWebDriverClient); - /** - * A CSS Selector for a DOM element within your Angular application. - * BlockingProxy will attempt to automatically find your application, but it is - * necessary to set rootElement in certain cases. - * - * In Angular 1, BlockingProxy will use the element your app bootstrapped to by - * default. If that doesn't work, it will then search for hooks in `body` or - * `ng-app` elements (details here: https://git.io/v1b2r). - * - * In later versions of Angular, BlockingProxy will try to hook into all angular - * apps on the page. Use rootElement to limit the scope of which apps - * BlockingProxy waits for and searches within. - * - * @param rootSelector A selector for the root element of the Angular app. - */ - setRootSelector(selector: string): void; - private waitForAngularData(); - /** - * Turn on WebDriver logging. - * - * @param logDir The directory to create logs in. - */ - enableLogging(logDir: string): void; - /** - * Override the logger instance. Only used for testing. - */ - setLogger(logger: WebDriverLogger): void; - private sendRequestToStabilize(command); - private shouldStabilize(command); - onCommand(command: WebDriverCommand): Promise; -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js deleted file mode 100644 index 8f84f3cd..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const webdriver_logger_1 = require("./webdriver_logger"); -const angularWaits = require('./client_scripts/wait.js'); -/** - * A barrier that uses Angular's Testability API to block commands until the application is stable. - */ -class AngularWaitBarrier { - constructor(client) { - this.client = client; - this.enabled = true; - this.rootSelector = ''; - } - /** - * A CSS Selector for a DOM element within your Angular application. - * BlockingProxy will attempt to automatically find your application, but it is - * necessary to set rootElement in certain cases. - * - * In Angular 1, BlockingProxy will use the element your app bootstrapped to by - * default. If that doesn't work, it will then search for hooks in `body` or - * `ng-app` elements (details here: https://git.io/v1b2r). - * - * In later versions of Angular, BlockingProxy will try to hook into all angular - * apps on the page. Use rootElement to limit the scope of which apps - * BlockingProxy waits for and searches within. - * - * @param rootSelector A selector for the root element of the Angular app. - */ - setRootSelector(selector) { - this.rootSelector = selector; - } - waitForAngularData() { - return JSON.stringify({ - script: 'return (' + angularWaits.NG_WAIT_FN + ').apply(null, arguments);', - args: [this.rootSelector] - }); - } - /** - * Turn on WebDriver logging. - * - * @param logDir The directory to create logs in. - */ - enableLogging(logDir) { - if (!this.logger) { - this.logger = new webdriver_logger_1.WebDriverLogger(); - } - this.logger.setLogDir(logDir); - } - /** - * Override the logger instance. Only used for testing. - */ - setLogger(logger) { - this.logger = logger; - } - sendRequestToStabilize(command) { - return this.client.executeAsync(command.sessionId, this.waitForAngularData()).then((value) => { - // waitForAngular only returns a value if there was an error - // in the browser. - if (value) { - throw new Error('Error from waitForAngular: ' + value); - } - }); - } - shouldStabilize(command) { - const url = command.url; - if (!this.enabled) { - return false; - } - // TODO - should this implement some state, and be smart about whether - // stabilization is necessary or not? Would that be as simple as GET/POST? - // e.g. two gets in a row don't require a wait btwn. - // - // See https://code.google.com/p/selenium/wiki/JsonWireProtocol for - // descriptions of the paths. - // We shouldn't stabilize if we haven't loaded the page yet. - const parts = url.split('/'); - if (parts.length < 4) { - return false; - } - const commandsToWaitFor = [ - 'executeScript', 'screenshot', 'source', 'title', 'element', 'elements', 'execute', 'keys', - 'moveto', 'click', 'buttondown', 'buttonup', 'doubleclick', 'touch', 'get' - ]; - if (commandsToWaitFor.indexOf(parts[3]) != -1) { - return true; - } - return false; - } - onCommand(command) { - if (this.logger) { - command.on('data', () => { - this.logger.logWebDriverCommand(command); - }); - } - if (this.shouldStabilize(command)) { - const started = Date.now(); - return this.sendRequestToStabilize(command).then(() => { - const ended = Date.now(); - if (this.logger) { - this.logger.logEvent('Waiting for Angular', command.sessionId, (ended - started)); - } - }); - } - return Promise.resolve(null); - } -} -exports.AngularWaitBarrier = AngularWaitBarrier; -//# sourceMappingURL=angular_wait_barrier.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map deleted file mode 100644 index 69fafa1f..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/angular_wait_barrier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"angular_wait_barrier.js","sourceRoot":"","sources":["../../lib/angular_wait_barrier.ts"],"names":[],"mappings":";;AAEA,yDAAmD;AAGnD,MAAM,YAAY,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAEzD;;GAEG;AACH;IAME,YAAoB,MAA6B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AAC,GAAG,EAAE;gBACpD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACzB,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;oBAChB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC;gBACpF,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAjHD,gDAiHC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.d.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js deleted file mode 100755 index 3ee7eb7e..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const blockingproxy_1 = require("./blockingproxy"); -const config_1 = require("./config"); -/** - * Starts up a proxy server which modifies calls between the test process - * and the selenium server. - */ -const argv = config_1.processArgs(process.argv.slice(2)); -if (argv.help) { - config_1.printHelp(); - process.exit(0); -} -const proxy = new blockingproxy_1.BlockingProxy(argv.seleniumAddress, parseInt(argv.highlightDelay)); -if (argv.logDir) { - proxy.enableLogging(argv.logDir); -} -let port = proxy.listen(argv.port); -console.log(`Listening on :${port}`); -if (argv.fork) { - process.send({ ready: true, port: port }); - process.on('disconnect', function () { - console.log('parent exited, quitting'); - process.exit(); - }); -} -//# sourceMappingURL=bin.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map deleted file mode 100644 index b2adc103..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/bin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../lib/bin.ts"],"names":[],"mappings":";;;AAEA,mDAA8C;AAC9C,qCAAgD;AAEhD;;;GAGG;AAEH,MAAM,IAAI,GAAG,oBAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhD,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACd,kBAAS,EAAE,CAAC;IACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,KAAK,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;AACrF,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AACD,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;AACrC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE;QACvB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts deleted file mode 100644 index 329e16cb..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/// -import * as http from 'http'; -import { AngularWaitBarrier } from './angular_wait_barrier'; -import { HighlightDelayBarrier } from './highlight_delay_barrier'; -import { WebDriverLogger } from './webdriver_logger'; -export declare const BP_PREFIX = "bpproxy"; -/** - * The stability proxy is an http server responsible for intercepting - * JSON webdriver commands. It keeps track of whether the page under test - * needs to wait for page stability, and initiates a wait if so. - */ -export declare class BlockingProxy { - server: http.Server; - logger: WebDriverLogger; - waitBarrier: AngularWaitBarrier; - highlightBarrier: HighlightDelayBarrier; - private proxy; - constructor(seleniumAddress: string, highlightDelay?: number); - /** - * This command is for the proxy server, not to be forwarded to Selenium. - */ - static isProxyCommand(commandPath: string): boolean; - /** - * Turn on WebDriver logging. - * - * @param logDir The directory to create logs in. - */ - enableLogging(logDir: string): void; - /** - * Override the logger instance. Only used for testing. - */ - setLogger(logger: WebDriverLogger): void; - /** - * Change the parameters used by the wait function. - */ - setWaitParams(rootEl: any): void; - handleProxyCommand(message: any, data: any, response: any): void; - requestListener(originalRequest: http.IncomingMessage, response: http.ServerResponse): void; - listen(port: number): number; - quit(): Promise<{}>; -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js deleted file mode 100644 index b4945535..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const angular_wait_barrier_1 = require("./angular_wait_barrier"); -const highlight_delay_barrier_1 = require("./highlight_delay_barrier"); -const simple_webdriver_client_1 = require("./simple_webdriver_client"); -const webdriver_proxy_1 = require("./webdriver_proxy"); -exports.BP_PREFIX = 'bpproxy'; -/** - * The stability proxy is an http server responsible for intercepting - * JSON webdriver commands. It keeps track of whether the page under test - * needs to wait for page stability, and initiates a wait if so. - */ -class BlockingProxy { - constructor(seleniumAddress, highlightDelay = null) { - this.server = http.createServer(this.requestListener.bind(this)); - this.proxy = new webdriver_proxy_1.WebDriverProxy(seleniumAddress); - let client = new simple_webdriver_client_1.SimpleWebDriverClient(seleniumAddress); - this.waitBarrier = new angular_wait_barrier_1.AngularWaitBarrier(client); - this.highlightBarrier = new highlight_delay_barrier_1.HighlightDelayBarrier(client, highlightDelay); - this.proxy.addBarrier(this.waitBarrier); - this.proxy.addBarrier(this.highlightBarrier); - } - /** - * This command is for the proxy server, not to be forwarded to Selenium. - */ - static isProxyCommand(commandPath) { - return (commandPath.split('/')[1] === exports.BP_PREFIX); - } - /** - * Turn on WebDriver logging. - * - * @param logDir The directory to create logs in. - */ - enableLogging(logDir) { - this.waitBarrier.enableLogging(logDir); - } - /** - * Override the logger instance. Only used for testing. - */ - setLogger(logger) { - this.waitBarrier.setLogger(logger); - } - /** - * Change the parameters used by the wait function. - */ - setWaitParams(rootEl) { - this.waitBarrier.setRootSelector(rootEl); - } - handleProxyCommand(message, data, response) { - let command = message.url.split('/')[2]; - switch (command) { - case 'waitEnabled': - if (message.method === 'GET') { - response.writeHead(200); - response.write(JSON.stringify({ value: this.waitBarrier.enabled })); - response.end(); - } - else if (message.method === 'POST') { - response.writeHead(200); - this.waitBarrier.enabled = JSON.parse(data).value; - response.end(); - } - else { - response.writeHead(405); - response.write('Invalid method'); - response.end(); - } - break; - case 'waitParams': - if (message.method === 'GET') { - response.writeHead(200); - response.write(JSON.stringify({ rootSelector: this.waitBarrier.rootSelector })); - response.end(); - } - else if (message.method === 'POST') { - response.writeHead(200); - this.waitBarrier.rootSelector = JSON.parse(data).rootSelector; - response.end(); - } - else { - response.writeHead(405); - response.write('Invalid method'); - response.end(); - } - break; - default: - response.writeHead(404); - response.write('Unknown stabilizer proxy command'); - response.end(); - } - } - requestListener(originalRequest, response) { - if (BlockingProxy.isProxyCommand(originalRequest.url)) { - let commandData = ''; - originalRequest.on('data', (d) => { - commandData += d; - }); - originalRequest.on('end', () => { - this.handleProxyCommand(originalRequest, commandData, response); - }); - return; - } - // OK to ignore the promise returned by this. - this.proxy.handleRequest(originalRequest, response); - } - listen(port) { - this.server.listen(port); - let actualPort = this.server.address().port; - return actualPort; - } - quit() { - return new Promise((resolve) => { - this.server.close(resolve); - }); - } -} -exports.BlockingProxy = BlockingProxy; -//# sourceMappingURL=blockingproxy.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map deleted file mode 100644 index 5ede0bba..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/blockingproxy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"blockingproxy.js","sourceRoot":"","sources":["../../lib/blockingproxy.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,iEAA0D;AAC1D,uEAAgE;AAChE,uEAAgE;AAEhE,uDAAiD;AAEpC,QAAA,SAAS,GAAG,SAAS,CAAC;AAEnC;;;;GAIG;AACH;IAOE,YAAY,eAAuB,EAAE,iBAAyB,IAAI;QAChE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,KAAK,GAAG,IAAI,gCAAc,CAAC,eAAe,CAAC,CAAC;QAEjD,IAAI,MAAM,GAAG,IAAI,+CAAqB,CAAC,eAAe,CAAC,CAAC;QACxD,IAAI,CAAC,WAAW,GAAG,IAAI,yCAAkB,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,gBAAgB,GAAG,IAAI,+CAAqB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAC1E,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAA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CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;gBACnD,QAAQ,CAAC,GAAG,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IAED,eAAe,CAAC,eAAqC,EAAE,QAA6B;QAClF,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtD,IAAI,WAAW,GAAG,EAAE,CAAC;YACrB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;gBAC/B,WAAW,IAAI,CAAC,CAAC;YACnB,CAAC,CAAC,CAAC;YACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBAC7B,IAAI,CAAC,kBAAkB,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;YAClE,CAAC,CAAC,CAAC;YACH,MAAM,CAAC;QACT,CAAC;QAED,6CAA6C;QAC7C,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC;QAC5C,MAAM,CAAC,UAAU,CAAC;IACpB,CAAC;IAED,IAAI;QACF,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAnHD,sCAmHC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts deleted file mode 100644 index 1758880e..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/client.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export declare class BPClient { - hostname: string; - port: number; - constructor(bpUrlValue: string); - /** - * Toggle whether waiting for Angular is enabled. - * - * @param enabled Whether or not to enable waiting for angular. - * @returns {Promise} - */ - setWaitEnabled(enabled: boolean): Promise; - /** - * Set the selector used to find the root element of the Angular application to wait for. See - * AngularWaitBarrier for more details. - * - * @param selector A selector, or empty string to wait for all Angular apps. - */ - setWaitParams(rootSelector: string): Promise; - isWaitEnabled(): Promise<{}>; -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client.js b/test-eol-project/node_modules/blocking-proxy/built/lib/client.js deleted file mode 100644 index e4ce2c49..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/client.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const url = require("url"); -const blockingproxy_1 = require("./blockingproxy"); -class BPClient { - constructor(bpUrlValue) { - let bpUrl = url.parse(bpUrlValue); - this.hostname = bpUrl.hostname; - this.port = parseInt(bpUrl.port); - } - /** - * Toggle whether waiting for Angular is enabled. - * - * @param enabled Whether or not to enable waiting for angular. - * @returns {Promise} - */ - setWaitEnabled(enabled) { - return new Promise((resolve, reject) => { - let options = { host: this.hostname, port: this.port, method: 'POST', path: `/${blockingproxy_1.BP_PREFIX}/waitEnabled` }; - let request = http.request(options, (response) => { - response.on('data', () => { }); - response.on('error', (err) => reject(err)); - response.on('end', () => { - resolve(); - }); - }); - request.write(JSON.stringify({ value: enabled })); - request.end(); - }); - } - /** - * Set the selector used to find the root element of the Angular application to wait for. See - * AngularWaitBarrier for more details. - * - * @param selector A selector, or empty string to wait for all Angular apps. - */ - setWaitParams(rootSelector) { - return new Promise((resolve, reject) => { - let options = { host: this.hostname, port: this.port, method: 'POST', path: `/${blockingproxy_1.BP_PREFIX}/waitParams` }; - let request = http.request(options, (response) => { - response.on('data', () => { }); - response.on('error', (err) => reject(err)); - response.on('end', () => { - resolve(); - }); - }); - request.write(JSON.stringify({ rootSelector: rootSelector })); - request.end(); - }); - } - isWaitEnabled() { - return new Promise((res) => { - let options = { host: this.hostname, port: this.port, path: `/${blockingproxy_1.BP_PREFIX}/waitEnabled` }; - http.get(options, (response) => { - let body = ''; - response.on('data', (data) => { - body += data; - }); - response.on('end', () => { - res(JSON.parse(body).value); - }); - }); - }); - } -} -exports.BPClient = BPClient; -//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map deleted file mode 100644 index bc6131d1..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,2BAA2B;AAC3B,mDAA0C;AAE1C;IAIE,YAAY,UAAkB;QAC5B,IAAI,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,cAAc,CAAC,OAAgB;QAC7B,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,OAAO,GACP,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,yBAAS,cAAc,EAAC,CAAC;YAE9F,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC/C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,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O,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,aAAa;QACX,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACzB,IAAI,OAAO,GAAG,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,yBAAS,cAAc,EAAC,CAAC;YAExF,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC7B,IAAI,IAAI,GAAG,EAAE,CAAC;gBACd,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;oBAC3B,IAAI,IAAI,IAAI,CAAC;gBACf,CAAC,CAAC,CAAC;gBACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBACtB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvED,4BAuEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js b/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js deleted file mode 100644 index b2432967..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/highlight.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Creates a floating translucent div at the specified location in order to highlight a particular - * element. Note that these scripts are run directly in the browser under test, so they need to - * be ES5 compatible and serializable. - */ -exports.HIGHLIGHT_FN = function(top, left, width, height) { - console.log('Highlighting at ', top, left, width, height); - var el = document.createElement('div'); - el.id = 'BP_ELEMENT_HIGHLIGHT__'; - document.body.appendChild(el); - el.style['position'] = 'absolute'; - el.style['background-color'] = 'lightblue'; - el.style['opacity'] = '0.7'; - el.style['top'] = top + 'px'; - el.style['left'] = left + 'px'; - el.style['width'] = width + 'px'; - el.style['height'] = height + 'px'; -}; - -/** - * Removes the highlight - */ -exports.REMOVE_HIGHLIGHT_FN = function() { - var el = document.getElementById('BP_ELEMENT_HIGHLIGHT__'); - if (el) { - el.parentElement.removeChild(el); - } -}; - diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js b/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js deleted file mode 100644 index 09e634d1..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/client_scripts/wait.js +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copied from Protractor 5.2.0 - * - * Wait until Angular has finished rendering and has - * no outstanding $http calls before continuing. The specific Angular app - * is determined by the rootSelector. - * - * Asynchronous. - * - * @param {string} rootSelector The selector housing an ng-app - * @param {function(string)} callback callback. If a failure occurs, it will - * be passed as a parameter. - */ -function waitForAngular(rootSelector, callback) { - - try { - // Wait for both angular1 testability and angular2 testability. - - var testCallback = callback; - - // Wait for angular1 testability first and run waitForAngular2 as a callback - var waitForAngular1 = function(callback) { - - if (window.angular) { - var hooks = getNg1Hooks(rootSelector); - if (!hooks){ - callback(); // not an angular1 app - } - else{ - if (hooks.$$testability) { - hooks.$$testability.whenStable(callback); - } else if (hooks.$injector) { - hooks.$injector.get('$browser') - .notifyWhenNoOutstandingRequests(callback); - } else if (!!rootSelector) { - throw new Error( - 'Could not automatically find injector on page: "' + - window.location.toString() + '". Consider using config.rootEl'); - } else { - throw new Error( - 'root element (' + rootSelector + ') has no injector.' + - ' this may mean it is not inside ng-app.'); - } - } - } - else {callback();} // not an angular1 app - }; - - // Wait for Angular2 testability and then run test callback - var waitForAngular2 = function() { - if (window.getAngularTestability) { - if (rootSelector) { - var testability = null; - var el = document.querySelector(rootSelector); - try{ - testability = window.getAngularTestability(el); - } - catch(e){} - if (testability) { - return testability.whenStable(testCallback); - } - } - - // Didn't specify root element or testability could not be found - // by rootSelector. This may happen in a hybrid app, which could have - // more than one root. - var testabilities = window.getAllAngularTestabilities(); - var count = testabilities.length; - - // No angular2 testability, this happens when - // going to a hybrid page and going back to a pure angular1 page - if (count === 0) { - return testCallback(); - } - - var decrement = function() { - count--; - if (count === 0) { - testCallback(); - } - }; - testabilities.forEach(function(testability) { - testability.whenStable(decrement); - }); - - } - else {testCallback();} // not an angular2 app - }; - - if (!(window.angular) && !(window.getAngularTestability)) { - // no testability hook - throw new Error( - 'both angularJS testability and angular testability are undefined.' + - ' This could be either ' + - 'because this is a non-angular page or because your test involves ' + - 'client-side navigation, which can interfere with Protractor\'s ' + - 'bootstrapping. See http://git.io/v4gXM for details'); - } else {waitForAngular1(waitForAngular2);} // Wait for angular1 and angular2 - // Testability hooks sequentially - - } catch (err) { - callback(err.message); - } - - }; - -/* Tries to find $$testability and possibly $injector for an ng1 app - * - * By default, doesn't care about $injector if it finds $$testability. However, - * these priorities can be reversed. - * - * @param {string=} selector The selector for the element with the injector. If - * falsy, tries a variety of methods to find an injector - * @param {boolean=} injectorPlease Prioritize finding an injector - * @return {$$testability?: Testability, $injector?: Injector} Returns whatever - * ng1 app hooks it finds - */ -function getNg1Hooks(selector, injectorPlease) { - function tryEl(el) { - try { - if (!injectorPlease && angular.getTestability) { - var $$testability = angular.getTestability(el); - if ($$testability) { - return {$$testability: $$testability}; - } - } else { - var $injector = angular.element(el).injector(); - if ($injector) { - return {$injector: $injector}; - } - } - } catch(err) {} - } - function trySelector(selector) { - var els = document.querySelectorAll(selector); - for (var i = 0; i < els.length; i++) { - var elHooks = tryEl(els[i]); - if (elHooks) { - return elHooks; - } - } - } - - if (selector) { - return trySelector(selector); - } else if (window.__TESTABILITY__NG1_APP_ROOT_INJECTOR__) { - var $injector = window.__TESTABILITY__NG1_APP_ROOT_INJECTOR__; - var $$testability = null; - try { - $$testability = $injector.get('$$testability'); - } catch (e) {} - return {$injector: $injector, $$testability: $$testability}; - } else { - return tryEl(document.body) || - trySelector('[ng-app]') || trySelector('[ng\\:app]') || - trySelector('[ng-controller]') || trySelector('[ng\\:controller]'); - } -} - -/* Wraps a function up into a string with its helper functions so that it can - * call those helper functions client side - * - * @param {function} fun The function to wrap up with its helpers - * @param {...function} The helper functions. Each function must be named - * - * @return {string} The string which, when executed, will invoke fun in such a - * way that it has access to its helper functions - */ -function wrapWithHelpers(fun) { - var helpers = Array.prototype.slice.call(arguments, 1); - if (!helpers.length) { - return fun; - } - var FunClass = Function; // Get the linter to allow this eval - return new FunClass( - helpers.join(';') + String.fromCharCode(59) + - ' return (' + fun.toString() + ').apply(this, arguments);'); -} - -exports.NG_WAIT_FN = wrapWithHelpers(waitForAngular, getNg1Hooks); diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts deleted file mode 100644 index 935b4846..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/config.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface Config { - help?: boolean; - fork?: boolean; - highlightDelay?: string; - seleniumAddress?: string; - logDir?: string; - port?: number; -} -export declare function processArgs(argv: string[]): Config; -export declare function printHelp(): void; diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/config.js b/test-eol-project/node_modules/blocking-proxy/built/lib/config.js deleted file mode 100644 index b7cf659c..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/config.js +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const minimist = require("minimist"); -const opts = { - boolean: ['help', 'fork'], - string: ['port', 'seleniumAddress', 'highlightDelay', 'logDir'], - alias: { - help: ['h'], - port: ['p'], - seleniumAddress: ['s'], - }, - default: { - port: process.env.BP_PORT || 0, - seleniumAddress: process.env.BP_SELENIUM_ADDRESS || 'http://localhost:4444/wd/hub', - } -}; -function processArgs(argv) { - return minimist(argv, opts); -} -exports.processArgs = processArgs; -function printHelp() { - console.log(` -Usage: blocking-proxy - -Options: - --help, -h Show help. - --port, -p The port to listen on. If unset, will choose a random free port. - --fork Start in fork mode. BlockingProxy will use process.send() to communicate - with the parent process. - --selenumAddress, -s The address of the selenium remote server to proxy. - --highlightDelay If specified, will highlight elements before interacting with them and - wait the specified amount of time (in ms) before allowing WebDriver - to continue. - --logDir If specified, will create a log of WebDriver commands in this directory. - --rootElement Element housing ng-app, if not html or body. -`); -} -exports.printHelp = printHelp; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map deleted file mode 100644 index 3ae13c9e..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AAWrC,MAAM,IAAI,GAAkB;IAC1B,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,CAAC;IAC/D,KAAK,EAAE;QACL,IAAI,EAAE,CAAC,GAAG,CAAC;QACX,IAAI,EAAE,CAAC,GAAG,CAAC;QACX,eAAe,EAAE,CAAC,GAAG,CAAC;KACvB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC;QAC9B,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,8BAA8B;KACnF;CACF,CAAC;AAEF,qBAA4B,IAAc;IACxC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAW,CAAC;AACxC,CAAC;AAFD,kCAEC;AAED;IACE,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;CAcb,CAAC,CAAC;AACH,CAAC;AAhBD,8BAgBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts deleted file mode 100644 index 21808706..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SimpleWebDriverClient } from './simple_webdriver_client'; -import { WebDriverCommand } from './webdriver_commands'; -import { WebDriverBarrier } from './webdriver_proxy'; -/** - * A barrier that delays forwarding WebDriver commands that can affect the app (ie, clicks or - * sending text) for a fixed amount of time. During the delay, the element that's the target - * of the command will be highlighted by drawing a transparent div on top of it. - */ -export declare class HighlightDelayBarrier implements WebDriverBarrier { - private client; - delay: number; - constructor(client: SimpleWebDriverClient, delay: number); - private isHighlightCommand(command); - private highlightData(top, left, width, height); - private removeHighlightData(); - private sleep(delay); - onCommand(command: WebDriverCommand): Promise; -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js deleted file mode 100644 index 8df43c4c..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const webdriver_commands_1 = require("./webdriver_commands"); -const HIGHLIGHT_COMMAND = [webdriver_commands_1.CommandName.ElementClick, webdriver_commands_1.CommandName.ElementSendKeys, webdriver_commands_1.CommandName.ElementClear]; -let clientScripts = require('./client_scripts/highlight.js'); -/** - * A barrier that delays forwarding WebDriver commands that can affect the app (ie, clicks or - * sending text) for a fixed amount of time. During the delay, the element that's the target - * of the command will be highlighted by drawing a transparent div on top of it. - */ -class HighlightDelayBarrier { - constructor(client, delay) { - this.client = client; - this.delay = delay; - } - isHighlightCommand(command) { - return HIGHLIGHT_COMMAND.indexOf(command.commandName) !== -1; - } - highlightData(top, left, width, height) { - return JSON.stringify({ - script: 'return (' + clientScripts.HIGHLIGHT_FN + ').apply(null, arguments);', - args: [top, left, width, height] - }); - } - removeHighlightData() { - return JSON.stringify({ - script: 'return (' + clientScripts.REMOVE_HIGHLIGHT_FN + ').apply(null, arguments);', - args: [] - }); - } - // Simple promise-based sleep so we can use async/await - sleep(delay) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, delay); - }); - } - onCommand(command) { - return __awaiter(this, void 0, void 0, function* () { - if (!this.isHighlightCommand(command) || !this.delay) { - return; - } - const sessId = command.sessionId; - const el = command.getParam('elementId'); - // The W3C spec does have a 'getRect', but the standalone server doesn't support it yet. - const loc = yield this.client.getLocation(sessId, el); - const size = yield this.client.getSize(sessId, el); - // Set the highlight - yield this.client.execute(sessId, this.highlightData(loc['y'], loc['x'], size['width'], size['height'])); - // Wait - yield this.sleep(this.delay); - // Clear the highlight - yield this.client.execute(sessId, this.removeHighlightData()); - }); - } -} -exports.HighlightDelayBarrier = HighlightDelayBarrier; -//# sourceMappingURL=highlight_delay_barrier.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map deleted file mode 100644 index af8d3623..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/highlight_delay_barrier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"highlight_delay_barrier.js","sourceRoot":"","sources":["../../lib/highlight_delay_barrier.ts"],"names":[],"mappings":";;;;;;;;;;AACA,6DAAmE;AAGnE,MAAM,iBAAiB,GACnB,C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AAC;YACT,CAAC;YACD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;YACjC,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAEzC,wFAAwF;YACxF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACtD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAEnD,oBAAoB;YACpB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACrB,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAEnF,OAAO;YACP,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7B,sBAAsB;YACtB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAChE,CAAC;KAAA;CACF;AAnDD,sDAmDC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts deleted file mode 100644 index 24432527..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { BlockingProxy } from './blockingproxy'; -export { BPClient } from './client'; diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/index.js b/test-eol-project/node_modules/blocking-proxy/built/lib/index.js deleted file mode 100644 index 855d25f9..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var blockingproxy_1 = require("./blockingproxy"); -exports.BlockingProxy = blockingproxy_1.BlockingProxy; -var client_1 = require("./client"); -exports.BPClient = client_1.BPClient; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map deleted file mode 100644 index e9e98ba3..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAAtC,wCAAA,aAAa,CAAA;AACrB,mCAAkC;AAA1B,4BAAA,QAAQ,CAAA"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts deleted file mode 100644 index bd95c1c4..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Super dumb and simple WebDriver client. Works with selenium standalone, may or may not work yet - * directly with other drivers. - */ -export declare class SimpleWebDriverClient { - seleniumAddress: string; - constructor(seleniumAddress: string); - /** - * Send an execute script command. - * - * @param sessionId - * @param data A JSON blob with the script and arguments to execute. - */ - execute(sessionId: string, data: string): Promise; - /** - * Send an execute async script command. - * - * @param sessionId - * @param data A JSON blob with the script and arguments to execute. - */ - executeAsync(sessionId: string, data: string): Promise; - /** - * Get the location of an element. - * - * @param sessionId - * @param elementId - * @returns Promise<{}> A promise that resolves with the x and y coordinates of the element. - */ - getLocation(sessionId: string, elementId: string): Promise; - /** - * Get the size of an element. - * - * @param sessionId - * @param elementId - * @returns Promise<{}> A promise that resolves with the height and width of the element. - */ - getSize(sessionId: string, elementId: string): Promise; - private createSeleniumRequest(method, messageUrl, data?); -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js deleted file mode 100644 index d7353567..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const url = require("url"); -/** - * Super dumb and simple WebDriver client. Works with selenium standalone, may or may not work yet - * directly with other drivers. - */ -class SimpleWebDriverClient { - constructor(seleniumAddress) { - this.seleniumAddress = seleniumAddress; - } - /** - * Send an execute script command. - * - * @param sessionId - * @param data A JSON blob with the script and arguments to execute. - */ - execute(sessionId, data) { - const url = ['session', sessionId, 'execute'].join('/'); - return this.createSeleniumRequest('POST', url, data); - } - /** - * Send an execute async script command. - * - * @param sessionId - * @param data A JSON blob with the script and arguments to execute. - */ - executeAsync(sessionId, data) { - const url = ['session', sessionId, 'execute_async'].join('/'); - return this.createSeleniumRequest('POST', url, data); - } - /** - * Get the location of an element. - * - * @param sessionId - * @param elementId - * @returns Promise<{}> A promise that resolves with the x and y coordinates of the element. - */ - getLocation(sessionId, elementId) { - const url = ['session', sessionId, 'element', elementId, 'location'].join('/'); - return this.createSeleniumRequest('GET', url); - } - /** - * Get the size of an element. - * - * @param sessionId - * @param elementId - * @returns Promise<{}> A promise that resolves with the height and width of the element. - */ - getSize(sessionId, elementId) { - const url = ['session', sessionId, 'element', elementId, 'size'].join('/'); - return this.createSeleniumRequest('GET', url); - } - createSeleniumRequest(method, messageUrl, data) { - let parsedUrl = url.parse(this.seleniumAddress); - let options = {}; - options['method'] = method; - options['path'] = parsedUrl.path + '/' + messageUrl; - options['hostname'] = parsedUrl.hostname; - options['port'] = parseInt(parsedUrl.port); - let request = http.request(options); - return new Promise((resolve, reject) => { - if (data) { - request.write(data); - } - request.end(); - request.on('response', (resp) => { - let respData = ''; - resp.on('data', (d) => { - respData += d; - }); - resp.on('error', (err) => { - reject(err); - }); - resp.on('end', () => { - let response = JSON.parse(respData); - // Selenium 3.5.x or greater - if (response.status && response.status > 0) { - console.error(`Got status ${response.status} from selenium`, response.value); - reject(JSON.stringify(response.value)); - } - // Selenium 3.0.x - if (response.state && response.state !== 'success') { - console.error(`Got response ${response.state} from selenium`, response.value); - reject(JSON.stringify(response.value)); - } - resolve(response.value); - }); - }); - }); - } - ; -} -exports.SimpleWebDriverClient = SimpleWebDriverClient; -//# sourceMappingURL=simple_webdriver_client.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map deleted file mode 100644 index e8cb52ba..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/simple_webdriver_client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"simple_webdriver_client.js","sourceRoot":"","sources":["../../lib/simple_webdriver_client.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,2BAA2B;AAE3B;;;GAGG;AACH;IAGE,YAAY,eAAuB;QACjC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACI,OAAO,CAAC,SAAiB,EAAE,IAAY;QAC5C,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,SAAiB,EAAE,IAAY;QACjD,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;OAMG;IAC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,CAAC,CAAC;IACL,CAAC;IAAA,CAAC;CACH;AA9FD,sDA8FC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts deleted file mode 100644 index cda03be2..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/// -/** - * Utilities for parsing WebDriver commands from HTTP Requests. - */ -import * as events from 'events'; -export declare type HttpMethod = 'GET' | 'POST' | 'DELETE'; -export declare type paramKey = 'sessionId' | 'elementId' | 'name' | 'propertyName'; -export declare enum CommandName { - NewSession = 0, - DeleteSession = 1, - Status = 2, - GetTimeouts = 3, - SetTimeouts = 4, - Go = 5, - GetCurrentURL = 6, - Back = 7, - Forward = 8, - Refresh = 9, - GetTitle = 10, - FindElement = 11, - FindElements = 12, - FindElementFromElement = 13, - FindElementsFromElement = 14, - IsElementSelected = 15, - GetElementAttribute = 16, - GetElementProperty = 17, - GetElementCSSValue = 18, - GetElementText = 19, - GetElementTagName = 20, - GetElementRect = 21, - IsElementEnabled = 22, - ElementClick = 23, - ElementClear = 24, - ElementSendKeys = 25, - WireMoveTo = 26, - WireButtonDown = 27, - WireButtonUp = 28, - GetAlertText = 29, - AcceptAlert = 30, - DismissAlert = 31, - UNKNOWN = 32, -} -/** - * An instance of a WebDriver command, containing the params and data for that request. - * - * @param commandName The enum identifying the command. - * @param params Parameters for the command taken from the request's url. - * @param data Optional data included with the command, taken from the body of the request. - */ -export declare class WebDriverCommand extends events.EventEmitter { - commandName: CommandName; - readonly url: string; - readonly method: HttpMethod; - private params; - data: any; - responseStatus: number; - responseData: any; - readonly sessionId: string; - constructor(commandName: CommandName, url: string, method: HttpMethod, params?: any); - getParam(key: paramKey): string; - handleData(data?: any): void; - handleResponse(statusCode: number, data?: any): void; -} -/** - * Returns a new WebdriverCommand object for the resource at the given URL. - */ -export declare function parseWebDriverCommand(url: any, method: any): WebDriverCommand; diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js deleted file mode 100644 index 56af1db3..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js +++ /dev/null @@ -1,212 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Utilities for parsing WebDriver commands from HTTP Requests. - */ -const events = require("events"); -var CommandName; -(function (CommandName) { - CommandName[CommandName["NewSession"] = 0] = "NewSession"; - CommandName[CommandName["DeleteSession"] = 1] = "DeleteSession"; - CommandName[CommandName["Status"] = 2] = "Status"; - CommandName[CommandName["GetTimeouts"] = 3] = "GetTimeouts"; - CommandName[CommandName["SetTimeouts"] = 4] = "SetTimeouts"; - CommandName[CommandName["Go"] = 5] = "Go"; - CommandName[CommandName["GetCurrentURL"] = 6] = "GetCurrentURL"; - CommandName[CommandName["Back"] = 7] = "Back"; - CommandName[CommandName["Forward"] = 8] = "Forward"; - CommandName[CommandName["Refresh"] = 9] = "Refresh"; - CommandName[CommandName["GetTitle"] = 10] = "GetTitle"; - CommandName[CommandName["FindElement"] = 11] = "FindElement"; - CommandName[CommandName["FindElements"] = 12] = "FindElements"; - CommandName[CommandName["FindElementFromElement"] = 13] = "FindElementFromElement"; - CommandName[CommandName["FindElementsFromElement"] = 14] = "FindElementsFromElement"; - CommandName[CommandName["IsElementSelected"] = 15] = "IsElementSelected"; - CommandName[CommandName["GetElementAttribute"] = 16] = "GetElementAttribute"; - CommandName[CommandName["GetElementProperty"] = 17] = "GetElementProperty"; - CommandName[CommandName["GetElementCSSValue"] = 18] = "GetElementCSSValue"; - CommandName[CommandName["GetElementText"] = 19] = "GetElementText"; - CommandName[CommandName["GetElementTagName"] = 20] = "GetElementTagName"; - CommandName[CommandName["GetElementRect"] = 21] = "GetElementRect"; - CommandName[CommandName["IsElementEnabled"] = 22] = "IsElementEnabled"; - CommandName[CommandName["ElementClick"] = 23] = "ElementClick"; - CommandName[CommandName["ElementClear"] = 24] = "ElementClear"; - CommandName[CommandName["ElementSendKeys"] = 25] = "ElementSendKeys"; - CommandName[CommandName["WireMoveTo"] = 26] = "WireMoveTo"; - CommandName[CommandName["WireButtonDown"] = 27] = "WireButtonDown"; - CommandName[CommandName["WireButtonUp"] = 28] = "WireButtonUp"; - CommandName[CommandName["GetAlertText"] = 29] = "GetAlertText"; - CommandName[CommandName["AcceptAlert"] = 30] = "AcceptAlert"; - CommandName[CommandName["DismissAlert"] = 31] = "DismissAlert"; - CommandName[CommandName["UNKNOWN"] = 32] = "UNKNOWN"; -})(CommandName = exports.CommandName || (exports.CommandName = {})); -/** - * Represents an endpoint in the WebDriver spec. Endpoints are defined by - * the CommandName enum and the url pattern that they match. - * - * For example, the pattern - * /session/:sessionId/element/:elementId/click - * will match urls such as - * /session/d9e52b96-9b6a-4cb3-b017-76e8b4236646/element/1c2855ba-213d-4466-ba16-b14a7e6c3699/click - * - * @param pattern The url pattern - * @param method The HTTP method, ie GET, POST, DELETE - * @param name The CommandName of this endpoint. - */ -class Endpoint { - constructor(pattern, method, name) { - this.pattern = pattern; - this.method = method; - this.name = name; - } - /** - * Tests whether a given url from a request matches this endpoint. - * - * @param url A url from a request to test against the endpoint. - * @param method The HTTP method. - * @returns {boolean} Whether the endpoint matches. - */ - matches(url, method) { - let urlParts = url.split('/'); - let patternParts = this.pattern.split('/'); - if (method != this.method || urlParts.length != patternParts.length) { - return false; - } - // TODO: Replace this naive search with better parsing. - for (let idx in patternParts) { - if (!patternParts[idx].startsWith(':') && patternParts[idx] != urlParts[idx]) { - return false; - } - } - return true; - } - /** - * Given a url from a http request, create an object containing parameters from the URL. - * - * Parameters are the parts of the endpoint's pattern that start with ':'. The ':' is dropped - * from the parameter key. - * - * @param url The url from the request. - * @returns An object mapping parameter keys to values from the url. - */ - getParams(url) { - let urlParts = url.split('/'); - let patternParts = this.pattern.split('/'); - let params = {}; - for (let idx in patternParts) { - if (patternParts[idx].startsWith(':')) { - let paramName = patternParts[idx].slice(1); - params[paramName] = urlParts[idx]; - } - } - return params; - } -} -/** - * An instance of a WebDriver command, containing the params and data for that request. - * - * @param commandName The enum identifying the command. - * @param params Parameters for the command taken from the request's url. - * @param data Optional data included with the command, taken from the body of the request. - */ -class WebDriverCommand extends events.EventEmitter { - constructor(commandName, url, method, params) { - super(); - this.commandName = commandName; - this.url = url; - this.method = method; - this.params = params; - } - // All WebDriver commands have a session Id, except for two. - // NewSession will have a session Id in the data - // Status just doesn't - get sessionId() { - if (!this.getParam('sessionId') && this.url.startsWith('/session')) { - return this.url.split('/')[2]; - } - return this.getParam('sessionId'); - } - getParam(key) { - return this.params[key]; - } - handleData(data) { - try { - this.data = JSON.parse(data); - } - catch (err) { - this.data = data; - } - this.emit('data'); - } - handleResponse(statusCode, data) { - this.responseStatus = statusCode; - try { - this.responseData = JSON.parse(data); - } - catch (err) { - this.responseData = data; - } - this.emit('response'); - } -} -exports.WebDriverCommand = WebDriverCommand; -/** - * The set of known endpoints. - */ -let endpoints = []; -function addWebDriverCommand(command, method, pattern) { - endpoints.push(new Endpoint(pattern, method, command)); -} -/** - * Returns a new WebdriverCommand object for the resource at the given URL. - */ -function parseWebDriverCommand(url, method) { - for (let endpoint of endpoints) { - if (endpoint.matches(url, method)) { - let params = endpoint.getParams(url); - return new WebDriverCommand(endpoint.name, url, method, params); - } - } - return new WebDriverCommand(CommandName.UNKNOWN, url, method, {}); -} -exports.parseWebDriverCommand = parseWebDriverCommand; -let sessionPrefix = '/session/:sessionId'; -addWebDriverCommand(CommandName.NewSession, 'POST', '/session'); -addWebDriverCommand(CommandName.DeleteSession, 'DELETE', '/session/:sessionId'); -addWebDriverCommand(CommandName.Status, 'GET', '/status'); -addWebDriverCommand(CommandName.GetTimeouts, 'GET', sessionPrefix + '/timeouts'); -addWebDriverCommand(CommandName.SetTimeouts, 'POST', sessionPrefix + '/timeouts'); -addWebDriverCommand(CommandName.Go, 'POST', sessionPrefix + '/url'); -addWebDriverCommand(CommandName.GetCurrentURL, 'GET', sessionPrefix + '/url'); -addWebDriverCommand(CommandName.Back, 'POST', sessionPrefix + '/back'); -addWebDriverCommand(CommandName.Forward, 'POST', sessionPrefix + '/forward'); -addWebDriverCommand(CommandName.Refresh, 'POST', sessionPrefix + '/refresh'); -addWebDriverCommand(CommandName.GetTitle, 'GET', sessionPrefix + '/title'); -addWebDriverCommand(CommandName.FindElement, 'POST', sessionPrefix + '/element'); -addWebDriverCommand(CommandName.FindElements, 'POST', sessionPrefix + '/elements'); -addWebDriverCommand(CommandName.FindElementFromElement, 'POST', sessionPrefix + '/element/:elementId/element'); -addWebDriverCommand(CommandName.FindElementsFromElement, 'POST', sessionPrefix + '/element/:elementId/elements'); -addWebDriverCommand(CommandName.IsElementSelected, 'POST', sessionPrefix + '/element/:elementId/selected'); -addWebDriverCommand(CommandName.GetElementAttribute, 'GET', sessionPrefix + '/element/:elementId/attribute/:attributeName'); -addWebDriverCommand(CommandName.GetElementProperty, 'GET', sessionPrefix + '/element/:elementId/property/:propertyName'); -addWebDriverCommand(CommandName.GetElementCSSValue, 'GET', sessionPrefix + '/element/:elementId/css/:cssPropertyName'); -addWebDriverCommand(CommandName.GetElementText, 'GET', sessionPrefix + '/element/:elementId/text'); -addWebDriverCommand(CommandName.GetElementTagName, 'GET', sessionPrefix + '/element/:elementId/name'); -addWebDriverCommand(CommandName.GetElementRect, 'GET', sessionPrefix + '/element/:elementId/rect'); -addWebDriverCommand(CommandName.GetElementRect, 'GET', sessionPrefix + '/element/:elementId/size'); -addWebDriverCommand(CommandName.IsElementEnabled, 'GET', sessionPrefix + '/element/:elementId/enabled'); -addWebDriverCommand(CommandName.ElementClick, 'POST', sessionPrefix + '/element/:elementId/click'); -addWebDriverCommand(CommandName.ElementClear, 'POST', sessionPrefix + '/element/:elementId/clear'); -addWebDriverCommand(CommandName.ElementSendKeys, 'POST', sessionPrefix + '/element/:elementId/value'); -addWebDriverCommand(CommandName.GetAlertText, 'GET', sessionPrefix + '/alert_text'); -addWebDriverCommand(CommandName.GetAlertText, 'GET', sessionPrefix + '/alert/text'); -addWebDriverCommand(CommandName.AcceptAlert, 'POST', sessionPrefix + '/alert/accept'); -addWebDriverCommand(CommandName.AcceptAlert, 'POST', sessionPrefix + '/accept_alert'); -addWebDriverCommand(CommandName.DismissAlert, 'POST', sessionPrefix + '/alert/dismiss'); -addWebDriverCommand(CommandName.DismissAlert, 'POST', sessionPrefix + '/dismiss_alert'); -// These commands are part of the JSON protocol, and were replaced by Perform Actions in the W3C -// spec -addWebDriverCommand(CommandName.WireMoveTo, 'POST', sessionPrefix + '/moveto'); -addWebDriverCommand(CommandName.WireButtonDown, 'POST', sessionPrefix + '/buttondown'); -addWebDriverCommand(CommandName.WireButtonUp, 'POST', sessionPrefix + '/buttonup'); -//# sourceMappingURL=webdriver_commands.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map deleted file mode 100644 index 563c4cea..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_commands.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webdriver_commands.js","sourceRoot":"","sources":["../../lib/webdriver_commands.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,iCAAiC;AAKjC,IAAY,WAkCX;AAlCD,WAAY,WAAW;IACrB,yDAAU,CAAA;IACV,+DAAa,CAAA;IACb,iDAAM,CAAA;IACN,2DAAW,CAAA;IACX,2DAAW,CAAA;IACX,yCAAE,CAAA;IACF,+DAAa,CAAA;IACb,6CAAI,CAAA;IACJ,mDAAO,CAAA;IACP,mDAAO,CAAA;IACP,sDAAQ,CAAA;IACR,4DAAW,CAAA;IACX,8DAAY,CAAA;IACZ,kFAAsB,CAAA;IACtB,oFAAuB,CAAA;IACvB,wEAAiB,CAAA;IACjB,4EAAmB,CAAA;IACnB,0EAAkB,CAAA;I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MAAM,EAAE,aAAa,GAAG,2BAA2B,CAAC,CAAC;AACnG,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,2BAA2B,CAAC,CAAC;AACnG,mBAAmB,CACf,WAAW,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,GAAG,2BAA2B,CAAC,CAAC;AAEtF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACpF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACpF,mBAAmB,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC;AACtF,mBAAmB,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC;AACtF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC;AACxF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC;AAExF,gGAAgG;AAChG,OAAO;AACP,mBAAmB,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC,CAAC;AAC/E,mBAAmB,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACvF,mBAAmB,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts deleted file mode 100644 index ce4cbb17..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/// -import * as stream from 'stream'; -import { WebDriverCommand } from './webdriver_commands'; -/** - * Logs WebDriver commands, transforming the command into a user-friendly description. - */ -export declare class WebDriverLogger { - logStream: stream.Writable; - readonly logName: string; - constructor(); - /** - * Start logging to the specified directory. Will create a file named - * 'webdriver_log_.txt' - * - * @param logDir The directory to create log files in. - */ - setLogDir(logDir: string): void; - /** - * Logs a webdriver command to the log file. - * - * @param command The command to log. - */ - logWebDriverCommand(command: WebDriverCommand): void; - /** - * Log an arbitrary event to the log file. - * - * @param msg The message to log. - * @param sessionId The session id associated with the event. - * @param elapsedMs How long the event took, in ms. - */ - logEvent(msg: string, sessionId: string, elapsedMs: number): void; - private renderData(command); - private renderResponse(command); - private timestamp(); -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js deleted file mode 100644 index 215d84aa..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const path = require("path"); -const webdriver_commands_1 = require("./webdriver_commands"); -// Generate a random 8 character ID to avoid collisions. -function getLogId() { - return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(36).slice(0, 8); -} -// Super proprietary left pad implementation. Do not copy plzkthx. -function leftPad(field) { - const fieldWidth = 6; - let padding = fieldWidth - field.length; - if (padding > 0) { - return ' '.repeat(padding) + field; - } - return field; -} -const FINDERS = [ - webdriver_commands_1.CommandName.FindElement, webdriver_commands_1.CommandName.FindElementFromElement, webdriver_commands_1.CommandName.FindElements, - webdriver_commands_1.CommandName.FindElementsFromElement -]; -const READERS = [ - webdriver_commands_1.CommandName.GetElementTagName, webdriver_commands_1.CommandName.GetElementText, webdriver_commands_1.CommandName.GetElementAttribute, - webdriver_commands_1.CommandName.GetElementProperty, webdriver_commands_1.CommandName.GetElementCSSValue, webdriver_commands_1.CommandName.GetElementRect -]; -const PAD = ' '; -/** - * Logs WebDriver commands, transforming the command into a user-friendly description. - */ -class WebDriverLogger { - constructor() { - this.logName = `webdriver_log_${getLogId()}.txt`; - } - /** - * Start logging to the specified directory. Will create a file named - * 'webdriver_log_.txt' - * - * @param logDir The directory to create log files in. - */ - setLogDir(logDir) { - this.logStream = fs.createWriteStream(path.join(logDir, this.logName), { flags: 'a' }); - } - /** - * Logs a webdriver command to the log file. - * - * @param command The command to log. - */ - logWebDriverCommand(command) { - if (!this.logStream) { - return; - } - let logLine; - logLine = `${this.timestamp()} `; - let started = Date.now(); - command.on('response', () => { - let done = Date.now(); - let elapsed = leftPad((done - started) + ''); - logLine += `| ${elapsed}ms `; - if (command.getParam('sessionId')) { - let session = command.getParam('sessionId').slice(0, 6); - logLine += `| ${session} `; - } - else if (command.commandName == webdriver_commands_1.CommandName.NewSession) { - // Only for new session commands, the sessionId is in the response. - let session = command.responseData['sessionId'].slice(0, 6); - logLine += `| ${session} `; - } - if (command.commandName == webdriver_commands_1.CommandName.UNKNOWN) { - logLine += `| ${command.url}`; - } - else { - logLine += `| ${webdriver_commands_1.CommandName[command.commandName]}`; - } - if (command.commandName == webdriver_commands_1.CommandName.Go) { - logLine += ' ' + command.data['url']; - } - else if (command.getParam('elementId')) { - logLine += ` (${command.getParam('elementId')})`; - } - logLine += '\n'; - this.logStream.write(logLine); - this.renderData(command); - this.renderResponse(command); - }); - } - /** - * Log an arbitrary event to the log file. - * - * @param msg The message to log. - * @param sessionId The session id associated with the event. - * @param elapsedMs How long the event took, in ms. - */ - logEvent(msg, sessionId, elapsedMs) { - let elapsed = leftPad(elapsedMs.toString()); - let logLine = `${this.timestamp()} | ${elapsed}ms | ${sessionId.slice(0, 6)} | ${msg}\n`; - this.logStream.write(logLine); - } - renderData(command) { - let dataLine = ''; - if (command.commandName === webdriver_commands_1.CommandName.NewSession) { - dataLine = JSON.stringify(command.data['desiredCapabilities']); - } - else if (command.commandName === webdriver_commands_1.CommandName.ElementSendKeys) { - let value = command.data['value'].join(''); - dataLine = `Send: ${value}`; - } - else if (FINDERS.indexOf(command.commandName) !== -1) { - const using = command.data['using']; - const value = command.data['value']; - dataLine = `Using ${using} '${value}'`; - } - if (dataLine) { - this.logStream.write(PAD + dataLine + '\n'); - } - } - renderResponse(command) { - let respLine = ''; - const data = command.responseData; - if (data['status'] > 0) { - respLine = `ERROR ${data['status']}: ${data['value']['message']}`; - } - else if (FINDERS.indexOf(command.commandName) !== -1) { - let els = command.responseData['value']; - if (!Array.isArray(els)) { - els = [els]; - } - els = els.map((e) => e['ELEMENT']); - respLine = 'Elements: ' + els; - } - else if (READERS.indexOf(command.commandName) !== -1) { - respLine = command.responseData['value']; - if (typeof respLine == 'object') { - respLine = JSON.stringify(respLine); - } - } - if (respLine) { - this.logStream.write(PAD + respLine + '\n'); - } - } - timestamp() { - let d = new Date(); - let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours(); - let minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes(); - let seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(); - let millis = d.getMilliseconds().toString(); - millis = '000'.slice(0, 3 - millis.length) + millis; - return `${hours}:${minutes}:${seconds}.${millis}`; - } -} -exports.WebDriverLogger = WebDriverLogger; -//# sourceMappingURL=webdriver_logger.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map deleted file mode 100644 index e0d61c3e..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_logger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webdriver_logger.js","sourceRoot":"","sources":["../../lib/webdriver_logger.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAG7B,6DAAmE;AAEnE,wDAAwD;AACxD;IACE,MAAM,CAAC,IAAI,CAAC,KAAK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CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QAC1E,IAAI,MAAM,GAAG,CAAC,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;QACpD,MAAM,CAAC,GAAG,KAAK,IAAI,OAAO,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;IACpD,CAAC;CACF;AAjID,0CAiIC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts deleted file mode 100644 index 0407f0cd..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -import * as http from 'http'; -import { WebDriverCommand } from './webdriver_commands'; -/** - * A proxy that understands WebDriver commands. Users can add barriers (similar to middleware in - * express) that will be called before forwarding the request to WebDriver. The proxy will wait for - * each barrier to finish, calling them in the order in which they were added. - */ -export declare class WebDriverProxy { - barriers: WebDriverBarrier[]; - seleniumAddress: string; - constructor(seleniumAddress: string); - addBarrier(barrier: WebDriverBarrier): void; - handleRequest(originalRequest: http.IncomingMessage, response: http.ServerResponse): Promise; -} -/** - * When the proxy receives a WebDriver command, it will call onCommand() for each of it's barriers. - * Barriers may return a promise for the proxy to wait for before proceeding. If the promise is - * rejected, the proxy will reply with an error code and the result of the promise and the command - * will not be forwarded to Selenium. - */ -export interface WebDriverBarrier { - onCommand(command: WebDriverCommand): Promise; -} diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js deleted file mode 100644 index 7b074d35..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const url = require("url"); -const webdriver_commands_1 = require("./webdriver_commands"); -/** - * A proxy that understands WebDriver commands. Users can add barriers (similar to middleware in - * express) that will be called before forwarding the request to WebDriver. The proxy will wait for - * each barrier to finish, calling them in the order in which they were added. - */ -class WebDriverProxy { - constructor(seleniumAddress) { - this.barriers = []; - this.seleniumAddress = seleniumAddress; - } - addBarrier(barrier) { - this.barriers.push(barrier); - } - handleRequest(originalRequest, response) { - return __awaiter(this, void 0, void 0, function* () { - let command = webdriver_commands_1.parseWebDriverCommand(originalRequest.url, originalRequest.method); - let replyWithError = (err) => { - response.writeHead(502); - if (err && err.toString) { - response.write(err.toString()); - } - response.end(); - }; - // Process barriers in order, one at a time. - try { - for (let barrier of this.barriers) { - yield barrier.onCommand(command); - } - } - catch (err) { - replyWithError(err); - // Don't call through if a barrier fails. - return; - } - let parsedUrl = url.parse(this.seleniumAddress); - let options = {}; - options.method = originalRequest.method; - options.path = parsedUrl.path + originalRequest.url; - options.hostname = parsedUrl.hostname; - options.port = parseInt(parsedUrl.port); - options.headers = originalRequest.headers; - let forwardedRequest = http.request(options); - // clang-format off - let reqData = ''; - originalRequest.on('data', (d) => { - reqData += d; - forwardedRequest.write(d); - }).on('end', () => { - command.handleData(reqData); - forwardedRequest.end(); - }).on('error', replyWithError); - forwardedRequest.on('response', (seleniumResponse) => { - response.writeHead(seleniumResponse.statusCode, seleniumResponse.headers); - let respData = ''; - seleniumResponse.on('data', (d) => { - respData += d; - response.write(d); - }).on('end', () => { - command.handleResponse(seleniumResponse.statusCode, respData); - response.end(); - }).on('error', replyWithError); - }).on('error', replyWithError); - // clang-format on - }); - } -} -exports.WebDriverProxy = WebDriverProxy; -//# sourceMappingURL=webdriver_proxy.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map b/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map deleted file mode 100644 index 5c84d0a3..00000000 --- a/test-eol-project/node_modules/blocking-proxy/built/lib/webdriver_proxy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webdriver_proxy.js","sourceRoot":"","sources":["../../lib/webdriver_proxy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6BAA6B;AAC7B,2BAA2B;AAE3B,6DAA6E;AAE7E;;;;GAIG;AACH;IAIE,YAAY,eAAuB;QACjC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED,UAAU,CAAC,OAAyB;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAEK,aAAa,CAAC,eAAqC,EAAE,QAA6B;;YACtF,IAAI,OAAO,GAAG,0CAAqB,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;YAEjF,IAAI,cAAc,GAAG,CAAC,GAAG,EAAE,EAAE;gBAC3B,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBACxB,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACjC,CAAC;gBACD,QAAQ,CAAC,GAAG,EAAE,CAAC;YACjB,CAAC,CAAC;YAEF,4CAA4C;YAC5C,IAA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CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,gBAAgB,EAAE,EAAE;gBACnD,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;gBAE1E,IAAI,QAAQ,GAAG,EAAE,CAAC;gBAClB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;oBAChC,QAAQ,IAAI,CAAC,CAAC;oBACd,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBAChB,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;oBAC9D,QAAQ,CAAC,GAAG,EAAE,CAAC;gBACjB,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAEjC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAC/B,kBAAkB;QACpB,CAAC;KAAA;CACF;AAtED,wCAsEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/blocking-proxy/circle.yml b/test-eol-project/node_modules/blocking-proxy/circle.yml deleted file mode 100644 index fae08cea..00000000 --- a/test-eol-project/node_modules/blocking-proxy/circle.yml +++ /dev/null @@ -1,29 +0,0 @@ -machine: - node: - version: 6.9.1 - environment: - # Fix issue with selenium-server in containers. - # See http://github.com/SeleniumHQ/docker-selenium/issues/87 - DBUS_SESSION_BUS_ADDRESS: /dev/null - -dependencies: - override: - - npm update - cache_directories: - - testapp/node_modules - post: - # Install the latest Chrome - - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - - sudo dpkg -i google-chrome.deb - - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome - - rm google-chrome.deb - - npm run webdriver: - background: true - - cd testapp && npm update - - npm run testapp: - background: true -test: - override: - - ./node_modules/.bin/gulp lint - - npm test - - npm run test:e2e diff --git a/test-eol-project/node_modules/blocking-proxy/examples/README.md b/test-eol-project/node_modules/blocking-proxy/examples/README.md deleted file mode 100644 index e15ad33c..00000000 --- a/test-eol-project/node_modules/blocking-proxy/examples/README.md +++ /dev/null @@ -1,22 +0,0 @@ -This is an example test that makes use of Blocking Proxy. - -## Running the example - -The example requires python 2.7 and the python selenium module. Assuming you -have pip and python, you can run the example like so: - -``` -pip install selenium -./run_example.sh -``` - -## What it does - -The example test is a simple WebDriver test of angularjs.io. It starts a -selenium server (using [WebDriver Manager](https://github.com/angular/webdriver-manager), -starts a Blocking Proxy instance, then runs the test. - -Blocking Proxy is set to use a 3 second highlight delay, so you'll see elements -highlighted before they're interacted with. It will also generate a log of WebDriver -commands in the current directory, with the file like `webdriver_log_xxxxxxxx.txt`. - diff --git a/test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py b/test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py deleted file mode 100644 index e6b72e43..00000000 --- a/test-eol-project/node_modules/blocking-proxy/examples/e2e_test.py +++ /dev/null @@ -1,31 +0,0 @@ -from selenium import webdriver - -capabilities = webdriver.DesiredCapabilities.CHROME.copy() -WD_URL = 'http://localhost:8001' - -driver = webdriver.Remote(desired_capabilities=capabilities, command_executor=WD_URL) - -print "Loading angularjs.org" -driver.get('https://angularjs.org/') - -print "Testing hello app" -sample_app = driver.find_element_by_css_selector("[app-run='hello.html']") -sample_app.location_once_scrolled_into_view -name_box = sample_app.find_element_by_css_selector('[ng-model="yourName"]') -hello_box = sample_app.find_element_by_css_selector('h1') - -name_box.send_keys('Bob') - -assert "Hello Bob!" in hello_box.text - -print "Testing todo app" -todo_app = driver.find_element_by_css_selector("[app-run='todo.html']") -todo_app.location_once_scrolled_into_view -todo_input = todo_app.find_element_by_css_selector('[ng-model="todoList.todoText"]') -todo_list = todo_app.find_element_by_css_selector('ul') - -todo_input.send_keys('write some tests'); -add_button = todo_app.find_element_by_css_selector('[value="add"]') -add_button.click() - -assert 'write some tests' in todo_list.text diff --git a/test-eol-project/node_modules/blocking-proxy/examples/run_example.sh b/test-eol-project/node_modules/blocking-proxy/examples/run_example.sh deleted file mode 100755 index a9c54293..00000000 --- a/test-eol-project/node_modules/blocking-proxy/examples/run_example.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -trap "kill -- -$$" EXIT - -cd .. -npm install - -# Start Selenium Server -./node_modules/.bin/webdriver-manager update -./node_modules/.bin/webdriver-manager start &> /dev/null & - -# Start Blocking Proxy -node ./built/lib/bin.js \ - --seleniumAddress http://localhost:4444/wd/hub \ - --port 8001 \ - --highlightDelay 3000 \ - --logDir examples/ &> /dev/null & - -# Wait a bit for things to come up -sleep 2 - -# Run the test -python examples/e2e_test.py diff --git a/test-eol-project/node_modules/blocking-proxy/gulpfile.js b/test-eol-project/node_modules/blocking-proxy/gulpfile.js deleted file mode 100644 index 28fce9f5..00000000 --- a/test-eol-project/node_modules/blocking-proxy/gulpfile.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -var gulp = require('gulp'); -var runSequence = require('run-sequence'); -var spawn = require('child_process').spawn; -var tslint = require('gulp-tslint'); - -var runSpawn = function(done, task, opt_arg) { - var child = spawn(task, opt_arg, {stdio: 'inherit'}); - child.on('close', function() { - done(); - }); -}; - -gulp.task('built:copy', function() { - return gulp.src(['lib/**/*','!lib/**/*.ts']) - .pipe(gulp.dest('built/lib/')); -}); - -gulp.task('webdriver:update', function(done) { - runSpawn(done, 'webdriver-manager', ['update']); -}); - -gulp.task('tslint', function() { - return gulp.src(['lib/**/*.ts', 'spec/**/*.ts']).pipe(tslint()).pipe(tslint.report()); -}); - -gulp.task('format:enforce', () => { - const format = require('gulp-clang-format'); - const clangFormat = require('clang-format'); - return gulp.src(['lib/**/*.ts', 'spec/**/*.ts']).pipe( - format.checkFormat('file', clangFormat, {verbose: true, fail: true})); -}); - -gulp.task('format', () => { - const format = require('gulp-clang-format'); - const clangFormat = require('clang-format'); - return gulp.src(['lib/**/*.ts', 'spec/**/*.ts'], { base: '.' }).pipe( - format.format('file', clangFormat)).pipe(gulp.dest('.')); -}); - -gulp.task('tsc', function(done) { - runSpawn(done, 'node', ['node_modules/typescript/bin/tsc']); -}); - -gulp.task('lint', function(done) { - runSequence('tslint', 'format:enforce', done); -}); - -gulp.task('prepublish', function(done) { - runSequence('lint' ,'tsc', 'built:copy', done); -}); - -gulp.task('pretest', function(done) { - runSequence( - ['webdriver:update', 'tslint', 'clang'], 'tsc', 'built:copy', done); -}); - -gulp.task('default', ['prepublish']); -gulp.task('build', ['prepublish']); - -gulp.task('test:copy', function(done) { - return gulp.src(['spec/**/*','!spec/**/*.ts']) - .pipe(gulp.dest('built/spec/')); -}); diff --git a/test-eol-project/node_modules/blocking-proxy/package.json b/test-eol-project/node_modules/blocking-proxy/package.json deleted file mode 100644 index 9d26f6a5..00000000 --- a/test-eol-project/node_modules/blocking-proxy/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "blocking-proxy", - "description": "WebDriver Proxy for testing rich clients. It block certain calls until Angular is done updating the page under test.", - "homepage": "https://github.com/angular/blocking-proxy", - "keywords": [ - "test", - "testing", - "webdriver", - "webdriverjs", - "selenium" - ], - "contributors": [ - "Michael Giambalvo ", - "Julie Ralph " - ], - "dependencies": { - "minimist": "^1.2.0" - }, - "devDependencies": { - "@types/jasmine": "2.5.45", - "@types/minimist": "^1.1.29", - "@types/nock": "^8.2.0", - "@types/node": "^6.0.45", - "@types/rimraf": "0.0.28", - "@types/selenium-webdriver": "^2.53.39", - "body-parser": "1.14.2", - "clang-format": "^1.0.34", - "gulp": "^3.9.1", - "gulp-clang-format": "^1.0.23", - "gulp-tslint": "^7.0.1", - "jasmine": "^2.3.2", - "jasmine-co": "^1.2.2", - "jasmine-ts": "^0.2.1", - "jshint": "2.9.1", - "nock": "^9.0.2", - "rimraf": "^2.5.4", - "run-sequence": "^1.2.2", - "selenium-mock": "^0.1.5", - "selenium-webdriver": "^3.6.0", - "ts-node": "^2.1.2", - "tslint": "^4.3.1", - "tslint-eslint-rules": "^3.1.0", - "typescript": "^2.1.5", - "vrsource-tslint-rules": "^0.14.1", - "webdriver-manager": "^12.0.6" - }, - "repository": { - "type": "git", - "url": "git://github.com/angular/jasminewd.git" - }, - "typings": "built/lib/index.d.ts", - "main": "built/lib/index.js", - "bin": { - "blocking-proxy": "built/lib/bin.js" - }, - "scripts": { - "prepublish": "gulp prepublish", - "start": "node built/lib/bin.js", - "webdriver": "webdriver-manager update && webdriver-manager start", - "test": "JASMINE_CONFIG_PATH=spec/jasmine_unit.json jasmine-ts", - "test:auto": "find lib spec | entr npm test", - "testapp": "cd testapp && npm start", - "test:e2e": "JASMINE_CONFIG_PATH=spec/jasmine_e2e.json jasmine-ts" - }, - "jshintConfig": { - "esversion": 6 - }, - "engines": { - "node": ">=6.9.x" - }, - "license": "MIT", - "version": "1.0.1" -} diff --git a/test-eol-project/node_modules/blocking-proxy/tsconfig.json b/test-eol-project/node_modules/blocking-proxy/tsconfig.json deleted file mode 100644 index c23dc499..00000000 --- a/test-eol-project/node_modules/blocking-proxy/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "noUnusedLocals": true, - "sourceMap": true, - "declaration": true, - "removeComments": false, - "noImplicitAny": false, - "outDir": "built/" - }, - "exclude": [ - "built", - "node_modules", - "selenium", - "testapp", - "typings/browser", - "typings/browser.d.ts" - ], - "filesGlob": [ - "**/*.ts" - ] -} diff --git a/test-eol-project/node_modules/blocking-proxy/tslint.json b/test-eol-project/node_modules/blocking-proxy/tslint.json deleted file mode 100644 index 5935ad95..00000000 --- a/test-eol-project/node_modules/blocking-proxy/tslint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/vrsource-tslint-rules/rules", - "node_modules/tslint-eslint-rules/dist/rules" - ], - "rules": { - "no-duplicate-imports": true, - "no-duplicate-variable": true, - "no-jasmine-focus": true, - "no-var-keyword": true, - "semicolon": [true], - "variable-name": [true, "ban-keywords"], - "no-inner-declarations": [true, "function"] - } -} diff --git a/test-eol-project/node_modules/brace-expansion/LICENSE b/test-eol-project/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de322667..00000000 --- a/test-eol-project/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber - -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/test-eol-project/node_modules/brace-expansion/README.md b/test-eol-project/node_modules/brace-expansion/README.md deleted file mode 100644 index 6b4e0e16..00000000 --- a/test-eol-project/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -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/test-eol-project/node_modules/brace-expansion/index.js b/test-eol-project/node_modules/brace-expansion/index.js deleted file mode 100644 index bd19fe68..00000000 --- a/test-eol-project/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/test-eol-project/node_modules/brace-expansion/package.json b/test-eol-project/node_modules/brace-expansion/package.json deleted file mode 100644 index 34478881..00000000 --- a/test-eol-project/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.12", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "publishConfig": { - "tag": "1.x" - } -} diff --git a/test-eol-project/node_modules/browserstack/.editorconfig b/test-eol-project/node_modules/browserstack/.editorconfig deleted file mode 100644 index 861e6aff..00000000 --- a/test-eol-project/node_modules/browserstack/.editorconfig +++ /dev/null @@ -1,11 +0,0 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -root = true - -[lib/*] -indent_style = tab -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true diff --git a/test-eol-project/node_modules/browserstack/.jscsrc b/test-eol-project/node_modules/browserstack/.jscsrc deleted file mode 100644 index 07d407b3..00000000 --- a/test-eol-project/node_modules/browserstack/.jscsrc +++ /dev/null @@ -1,74 +0,0 @@ -{ - "disallowKeywords": [ "with" ], - "disallowMixedSpacesAndTabs": "smart", - "disallowMultipleLineBreaks": true, - "disallowMultipleLineStrings": true, - "disallowMultipleSpaces": true, - "disallowOperatorBeforeLineBreak": [ "." ], - "disallowSpaceAfterObjectKeys": true, - "disallowSpaceAfterPrefixUnaryOperators": true, - "disallowSpaceBeforeBinaryOperators": [ ",", ":" ], - "disallowSpaceBeforePostfixUnaryOperators": true, - "disallowSpacesInAnonymousFunctionExpression": { - "beforeOpeningRoundBrace": true - }, - "disallowSpacesInCallExpression": true, - "disallowSpacesInFunction": { - "beforeOpeningRoundBrace": true - }, - "disallowSpacesInsideBrackets": true, - "disallowSpacesInsideParentheses": true, - "disallowTrailingComma": true, - "disallowTrailingWhitespace": true, - "maximumLineLength": { - "value": 100, - "tabSize": 4, - "allowUrlComments": true, - "allowRegex": true - }, - "requireCommaBeforeLineBreak": true, - "requireCurlyBraces": [ - "if", - "else", - "for", - "while", - "do", - "try", - "catch" - ], - "requireDotNotation": true, - "requireLineBreakAfterVariableAssignment": true, - "requireLineFeedAtFileEnd": true, - "requireOperatorBeforeLineBreak": true, - "requirePaddingNewLinesBeforeLineComments": true, - "requireParenthesesAroundIIFE": true, - "requireSemicolons": true, - "requireSpaceAfterBinaryOperators": true, - "requireSpaceAfterKeywords": [ - "if", - "else", - "for", - "while", - "do", - "switch", - "return", - "try", - "catch" - ], - "requireSpaceAfterLineComment": true, - "requireSpaceBeforeBinaryOperators": true, - "requireSpaceBeforeBlockStatements": true, - "requireSpaceBeforeObjectValues": true, - "requireSpaceBetweenArguments": true, - "requireSpacesInAnonymousFunctionExpression": { - "beforeOpeningCurlyBrace": true - }, - "requireSpacesInConditionalExpression": true, - "requireSpacesInForStatement": true, - "requireSpacesInFunction": { - "beforeOpeningCurlyBrace": true - }, - "requireSpacesInsideObjectBrackets": "all", - "validateLineBreaks": "LF", - "validateQuoteMarks": "\"" -} diff --git a/test-eol-project/node_modules/browserstack/.jshintrc b/test-eol-project/node_modules/browserstack/.jshintrc deleted file mode 100644 index 19e2a2e8..00000000 --- a/test-eol-project/node_modules/browserstack/.jshintrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "boss": true, - "curly": true, - "eqeqeq": true, - "eqnull": true, - "expr": true, - "immed": true, - "noarg": true, - "smarttabs": true, - "trailing": true, - "undef": true, - "unused": true, - - "node": true, - "esnext": true, - - "globals": { - "afterEach": false, - "beforeEach": false, - "define": false, - "describe": false, - "it": false - } -} diff --git a/test-eol-project/node_modules/browserstack/.travis.yml b/test-eol-project/node_modules/browserstack/.travis.yml deleted file mode 100644 index ebc97d3a..00000000 --- a/test-eol-project/node_modules/browserstack/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -sudo: false -language: node_js -node_js: -- node diff --git a/test-eol-project/node_modules/browserstack/LICENSE-MIT.txt b/test-eol-project/node_modules/browserstack/LICENSE-MIT.txt deleted file mode 100644 index ceaf503a..00000000 --- a/test-eol-project/node_modules/browserstack/LICENSE-MIT.txt +++ /dev/null @@ -1,26 +0,0 @@ -Copyright node-browserstack contributors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/scottgonzalez/node-browserstack. - -==== - -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/test-eol-project/node_modules/browserstack/lib/api.js b/test-eol-project/node_modules/browserstack/lib/api.js deleted file mode 100644 index 0674acd3..00000000 --- a/test-eol-project/node_modules/browserstack/lib/api.js +++ /dev/null @@ -1,280 +0,0 @@ -var util = require("util"); -var BaseClient = require("./client"); -var extend = require("./extend"); - -function ApiBaseClient(settings) { - this.server = { - host: "api.browserstack.com" - }; - BaseClient.call(this, settings); -} - -util.inherits(ApiBaseClient, BaseClient); - -// public API -extend(ApiBaseClient.prototype, { - getBrowsers: function(fn) { - this._getBrowsers(function(error, browsers) { - if (!error) { - this.updateLatest(browsers); - } - - fn(error, browsers); - }.bind(this)); - }, - - createWorker: function(options, fn) { - if (options[this.versionField] === "latest") { - return this.getLatest(options, function(error, version) { - if (error) { - return fn(error); - } - - options = extend({}, options); - options[this.versionField] = version; - this.createWorker(options, fn); - }.bind(this)); - } - - var data = JSON.stringify(options); - this.request({ - path: this.path("/worker"), - method: "POST" - }, data, fn); - }, - - getWorker: function(id, fn) { - this.request({ - path: this.path("/worker/" + id) - }, fn); - }, - - changeUrl: function(id, options, fn) { - var data = JSON.stringify(options); - this.request({ - path: this.path("/worker/" + id + "/url.json"), - method: "PUT" - }, data, fn); - }, - - terminateWorker: function(id, fn) { - this.request({ - path: this.path("/worker/" + id), - method: "DELETE" - }, fn); - }, - - getWorkers: function(fn) { - this.request({ - path: this.path("/workers") - }, fn); - }, - - getLatest: function(browser, fn) { - var latest = this.latest; - - if (typeof browser === "function") { - fn = browser; - browser = null; - } - - // there may be a lot of createWorker() calls with "latest" version - // so minimize the number of calls to getBrowsers() - if (this.latestPending) { - return setTimeout(function() { - this.getLatest(browser, fn); - }.bind(this), 50); - } - - // only cache browsers for one day - if (!latest || this.latestUpdate < (new Date() - 864e5)) { - this.latestPending = true; - return this.getBrowsers(function(error) { - this.latestPending = false; - - if (error) { - return fn(error); - } - - this.getLatest(browser, fn); - }.bind(this)); - } - - process.nextTick(function() { - fn(null, browser ? latest[this.getBrowserId(browser)] : extend({}, latest)); - }.bind(this)); - }, - - takeScreenshot: function(id, fn) { - this.request({ - path: this.path("/worker/" + id + "/screenshot.json") - }, fn); - } -}); - -// internal API -extend(ApiBaseClient.prototype, { - latest: null, - latestUpdate: 0, - latestPending: false, - - path: function(path) { - return "/" + this.version + path; - }, - - updateLatest: function(browsers) { - var latest = this.latest = {}; - var getBrowserId = this.getBrowserId.bind(this); - var versionField = this.versionField; - - this.latestUpdate = new Date(); - browsers.forEach(function(browser) { - var version = browser[versionField]; - var browserId = getBrowserId(browser); - - // ignore devices that don't have versions - if (!version) { - return; - } - - // ignore pre-release versions - if (/\s/.test(version)) { - return; - } - - if (parseFloat(version) > (parseFloat(latest[browserId]) || 0)) { - latest[browserId] = version; - } - }); - }, - - getBrowserId: function(browser) { - return this._getBrowserId(browser).toLowerCase(); - } -}); - -// Versions - -ApiBaseClient.versions = {}; -ApiBaseClient.latestVersion = 0; -ApiBaseClient.createVersion = function(version, prototype) { - function ApiClient(settings) { - ApiBaseClient.call(this, settings); - } - - util.inherits(ApiClient, ApiBaseClient); - - ApiClient.prototype.version = version; - extend(ApiClient.prototype, prototype); - - ApiBaseClient.versions[version] = ApiClient; - ApiBaseClient.latestVersion = Math.max(ApiBaseClient.latestVersion, version); -}; - -ApiBaseClient.createVersion(1, { - useHttp: true, - - versionField: "version", - - _getBrowsers: function(fn) { - this.request({ - path: this.path("/browsers") - }, fn); - }, - - _getBrowserId: function(browser) { - return browser.browser; - } -}); - -ApiBaseClient.createVersion(2, { - useHttp: true, - - versionField: "version", - - _getBrowsers: function(fn) { - this.request({ - path: this.path("/browsers") - }, function(error, osBrowsers) { - if (error) { - return fn(error); - } - - fn(null, [].concat.apply([], - Object.keys(osBrowsers).map(function(os) { - return osBrowsers[os].map(function(browser) { - browser.os = os; - return browser; - }); - }) - )); - }); - }, - - _getBrowserId: function(browser) { - return browser.os + ":" + (browser.browser || browser.device); - } -}); - -ApiBaseClient.createVersion(3, { - useHttp: true, - - versionField: "browser_version", - - _getBrowsers: function(fn) { - this.request({ - path: this.path("/browsers?flat=true") - }, fn); - }, - - _getBrowserId: function(browser) { - var id = browser.os + ":" + browser.os_version + ":" + browser.browser; - if (browser.device) { - id += ":" + browser.device; - } - - return id; - }, - - getApiStatus: function(fn) { - this.request({ - path: this.path("/status") - }, fn); - } -}); - -ApiBaseClient.createVersion(4, { - versionField: "browser_version", - - _getBrowsers: function(fn) { - this.request({ - path: this.path("/browsers?flat=true") - }, fn); - }, - - _getBrowserId: function(browser) { - var id = browser.os + ":" + browser.os_version + ":" + browser.browser; - if (browser.device) { - id += ":" + browser.device; - } - - return id; - }, - - getApiStatus: function(fn) { - this.request({ - path: this.path("/status") - }, fn); - } -}); - -module.exports = { - createClient: function(settings) { - var ApiClient = ApiBaseClient.versions[settings.version || ApiBaseClient.latestVersion]; - if (!ApiClient) { - throw new Error("Invalid version"); - } - - return new ApiClient(settings); - } -}; diff --git a/test-eol-project/node_modules/browserstack/lib/app-automate.js b/test-eol-project/node_modules/browserstack/lib/app-automate.js deleted file mode 100644 index f07951ea..00000000 --- a/test-eol-project/node_modules/browserstack/lib/app-automate.js +++ /dev/null @@ -1,119 +0,0 @@ -var util = require("util"); -var querystring = require("querystring"); -var BaseClient = require("./client"); -var extend = require("./extend"); - -function AppAutomateClient(settings) { - this.server = { - host: "api.browserstack.com" - }; - BaseClient.call(this, settings); -} - -util.inherits(AppAutomateClient, BaseClient); - -// public API -extend(AppAutomateClient.prototype, { - getPlan: function(fn) { - this.request({ - path: this.path("/plan.json") - }, fn); - }, - - getProjects: function(fn) { - this.request({ - path: this.path("/projects.json") - }, this.handleResponse(fn, this.stripChildKeys("automation_project"))); - }, - - getProject: function(id, fn) { - this.request({ - path: this.path("/projects/" + id + ".json") - }, this.handleResponse(fn, function(project) { - project = project.project; - project.builds = this.stripChildKeys("automation_build")(project.builds); - return project; - }.bind(this))); - }, - - getBuilds: function(options, fn) { - if (typeof options === "function") { - fn = options; - options = {}; - } - - this.request({ - path: this.path("/builds.json?" + querystring.stringify(options)) - }, this.handleResponse(fn, this.stripChildKeys("automation_build"))); - }, - - getSessions: function(buildId, options, fn) { - if (typeof fn === "undefined") { - fn = options; - options = {}; - } - - this.request({ - path: this.path("/builds/" + buildId + "/sessions.json?" + - querystring.stringify(options)) - }, this.handleResponse(fn, this.stripChildKeys("automation_session"))); - }, - - getSession: function(id, fn) { - this.request({ - path: this.path("/sessions/" + id + ".json") - }, this.handleResponse(fn, this.stripKey("automation_session"))); - }, - - updateSession: function(id, options, fn) { - var data = JSON.stringify(options); - this.request({ - method: "PUT", - path: this.path("/sessions/" + id + ".json") - }, data, this.handleResponse(fn, this.stripKey("automation_session"))); - }, - - deleteSession: function(id, fn) { - this.request({ - method: "DELETE", - path: this.path("/sessions/" + id + ".json") - }, fn); - } -}); - -// internal API -extend(AppAutomateClient.prototype, { - path: function(path) { - return "/app-automate" + path; - }, - - handleResponse: function(fn, modifier) { - return function(error, data) { - if (error) { - return fn(error); - } - - fn(null, modifier(data)); - }; - }, - - stripKey: function(key) { - return function(item) { - return item[key]; - }; - }, - - stripChildKeys: function(key) { - return function(items) { - return items.map(function(item) { - return item[key]; - }); - }; - } -}); - -module.exports = { - createClient: function(settings) { - return new AppAutomateClient(settings); - } -}; diff --git a/test-eol-project/node_modules/browserstack/lib/automate.js b/test-eol-project/node_modules/browserstack/lib/automate.js deleted file mode 100644 index f9914056..00000000 --- a/test-eol-project/node_modules/browserstack/lib/automate.js +++ /dev/null @@ -1,125 +0,0 @@ -var util = require("util"); -var querystring = require("querystring"); -var BaseClient = require("./client"); -var extend = require("./extend"); - -function AutomateClient(settings) { - this.server = { - host: "api.browserstack.com" - }; - BaseClient.call(this, settings); -} - -util.inherits(AutomateClient, BaseClient); - -// public API -extend(AutomateClient.prototype, { - getPlan: function(fn) { - this.request({ - path: this.path("/plan.json") - }, fn); - }, - - getBrowsers: function(fn) { - this.request({ - path: this.path("/browsers.json") - }, fn); - }, - - getProjects: function(fn) { - this.request({ - path: this.path("/projects.json") - }, this.handleResponse(fn, this.stripChildKeys("automation_project"))); - }, - - getProject: function(id, fn) { - this.request({ - path: this.path("/projects/" + id + ".json") - }, this.handleResponse(fn, function(project) { - project = project.project; - project.builds = this.stripChildKeys("automation_build")(project.builds); - return project; - }.bind(this))); - }, - - getBuilds: function(options, fn) { - if (typeof options === "function") { - fn = options; - options = {}; - } - - this.request({ - path: this.path("/builds.json?" + querystring.stringify(options)) - }, this.handleResponse(fn, this.stripChildKeys("automation_build"))); - }, - - getSessions: function(buildId, options, fn) { - if (typeof fn === "undefined") { - fn = options; - options = {}; - } - - this.request({ - path: this.path("/builds/" + buildId + "/sessions.json?" + - querystring.stringify(options)) - }, this.handleResponse(fn, this.stripChildKeys("automation_session"))); - }, - - getSession: function(id, fn) { - this.request({ - path: this.path("/sessions/" + id + ".json") - }, this.handleResponse(fn, this.stripKey("automation_session"))); - }, - - updateSession: function(id, options, fn) { - var data = JSON.stringify(options); - this.request({ - method: "PUT", - path: this.path("/sessions/" + id + ".json") - }, data, this.handleResponse(fn, this.stripKey("automation_session"))); - }, - - deleteSession: function(id, fn) { - this.request({ - method: "DELETE", - path: this.path("/sessions/" + id + ".json") - }, fn); - } -}); - -// internal API -extend(AutomateClient.prototype, { - path: function(path) { - return "/automate" + path; - }, - - handleResponse: function(fn, modifier) { - return function(error, data) { - if (error) { - return fn(error); - } - - fn(null, modifier(data)); - }; - }, - - stripKey: function(key) { - return function(item) { - return item[key]; - }; - }, - - stripChildKeys: function(key) { - return function(items) { - return items.map(function(item) { - return item[key]; - }); - }; - } -}); - -module.exports = { - createClient: function(settings) { - return new AutomateClient(settings); - } -}; diff --git a/test-eol-project/node_modules/browserstack/lib/browserstack.js b/test-eol-project/node_modules/browserstack/lib/browserstack.js deleted file mode 100644 index 28b98644..00000000 --- a/test-eol-project/node_modules/browserstack/lib/browserstack.js +++ /dev/null @@ -1,11 +0,0 @@ -var browserstackApi = require("./api"); -var browserstackAutomate = require("./automate"); -var browserstackAppAutomate = require("./app-automate"); -var browserstackScreenshot = require("./screenshot"); - -module.exports = { - createClient: browserstackApi.createClient, - createAutomateClient: browserstackAutomate.createClient, - createAppAutomateClient: browserstackAppAutomate.createClient, - createScreenshotClient: browserstackScreenshot.createClient -}; diff --git a/test-eol-project/node_modules/browserstack/lib/client.js b/test-eol-project/node_modules/browserstack/lib/client.js deleted file mode 100644 index 2df5dfd1..00000000 --- a/test-eol-project/node_modules/browserstack/lib/client.js +++ /dev/null @@ -1,94 +0,0 @@ -var https = require("https"); -var http = require("http"); -var extend = require("./extend"); -var HttpsProxyAgent = require("https-proxy-agent"); -var userAgent = getUA(); - -function getUA() { - var os = require("os"); - var version = require("../package.json").version; - - return os.platform() + "/" + os.release() + " " + - "node/" + process.versions.node + " " + - "node-browserstack/" + version; -} - -var BaseClient = function(settings) { - if (!settings.username) { - throw new Error("Username is required."); - } - if (!settings.password) { - throw new Error("Password is required."); - } - - extend(this, settings); - - this.authHeader = "Basic " + - Buffer.from(this.username + ":" + this.password).toString("base64"); -}; - -BaseClient.prototype.request = function(options, data, fn) { - if (typeof data === "function") { - fn = data; - data = null; - } - - fn = fn || function() {}; - - var reqOptions = extend({ - host: this.server.host, - port: this.server.port, - method: "GET", - headers: { - authorization: this.authHeader, - "content-type": "application/json", - "user-agent": userAgent, - "content-length": typeof data === "string" ? data.length : 0 - }, - agent: (this.proxy) ? new HttpsProxyAgent(this.proxy) : null - }, options); - - var req = (this.useHttp ? http : https).request(reqOptions, function(res) { - var response = ""; - res.setEncoding("utf8"); - res.on("data", function(chunk) { - response += chunk; - }); - res.on("end", function() { - if (res.statusCode !== 200) { - var message; - if (res.headers["content-type"].indexOf("json") !== -1) { - response = JSON.parse(response); - message = response.message; - if (response.errors) { - if (Array.isArray(response.errors) && response.errors.length) { - message += " - " + response.errors.map(function(error) { - return "`" + error.field + "` " + error.code; - }).join(", "); - } else { - message += " - " + response.errors.toString(); - } - } - } else { - message = response; - } - if (!message && res.statusCode === 403) { - message = "Forbidden"; - } - fn(new Error(message)); - } else { - fn(null, JSON.parse(response)); - } - }); - }); - - req.on("error", fn); - - if (data) { - req.write(data); - } - - req.end(); -}; - -module.exports = BaseClient; diff --git a/test-eol-project/node_modules/browserstack/lib/extend.js b/test-eol-project/node_modules/browserstack/lib/extend.js deleted file mode 100644 index 8ea5f7d0..00000000 --- a/test-eol-project/node_modules/browserstack/lib/extend.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function(a, b) { - for (var p in b) { - a[p] = b[p]; - } - - return a; -}; diff --git a/test-eol-project/node_modules/browserstack/lib/screenshot.js b/test-eol-project/node_modules/browserstack/lib/screenshot.js deleted file mode 100644 index 2329e98d..00000000 --- a/test-eol-project/node_modules/browserstack/lib/screenshot.js +++ /dev/null @@ -1,48 +0,0 @@ -var util = require("util"); -var BaseClient = require("./client"); -var extend = require("./extend"); - -function ScreenshotClient(settings) { - this.server = { - host: "www.browserstack.com" - }; - BaseClient.call(this, settings); -} - -util.inherits(ScreenshotClient, BaseClient); - -// public API -extend(ScreenshotClient.prototype, { - getBrowsers: function(fn) { - this.request({ - path: this.path("/browsers.json") - }, fn); - }, - - generateScreenshots: function(options, fn) { - var data = JSON.stringify(options); - this.request({ - method: "POST", - path: this.path("") - }, data, fn); - }, - - getJob: function(id, fn) { - this.request({ - path: this.path("/" + id + ".json") - }, fn); - } -}); - -// internal API -extend(ScreenshotClient.prototype, { - path: function(path) { - return "/screenshots" + path; - } -}); - -module.exports = { - createClient: function(settings) { - return new ScreenshotClient(settings); - } -}; diff --git a/test-eol-project/node_modules/browserstack/package.json b/test-eol-project/node_modules/browserstack/package.json deleted file mode 100644 index 9f23de0a..00000000 --- a/test-eol-project/node_modules/browserstack/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "browserstack", - "title": "BrowserStack Client", - "description": "A client for working with the BrowserStack APIs.", - "version": "1.6.1", - "homepage": "https://github.com/scottgonzalez/node-browserstack", - "author": "Scott González (http://scottgonzalez.com)", - "contributors": [ - "Simon Tarchichi " - ], - "repository": { - "type": "git", - "url": "git://github.com/scottgonzalez/node-browserstack.git" - }, - "bugs": "https://github.com/scottgonzalez/node-browserstack/issues", - "license": "MIT", - "dependencies": { - "https-proxy-agent": "^2.2.1" - }, - "devDependencies": { - "jscs": "2.8.0", - "jshint": "2.8.0", - "mocha": "2.4.5", - "should": "8.2.1" - }, - "main": "lib/browserstack.js", - "scripts": { - "jscs": "jscs lib/* test/*", - "jscs-fix": "jscs lib/* test/* --fix", - "jshint": "jshint lib/* test/*", - "lint": "npm run jscs && npm run jshint", - "test": "npm run lint && mocha" - }, - "keywords": [ - "automation", - "browser", - "browserstack", - "screenshot", - "testing" - ] -} diff --git a/test-eol-project/node_modules/browserstack/readme.md b/test-eol-project/node_modules/browserstack/readme.md deleted file mode 100644 index fb9ff819..00000000 --- a/test-eol-project/node_modules/browserstack/readme.md +++ /dev/null @@ -1,477 +0,0 @@ -# node-browserstack - -A node.js JavaScript client for working with [BrowserStack](http://browserstack.com) through its [REST API](https://github.com/browserstack/api) (*aka* Javascript Testing API), [Automate API](https://www.browserstack.com/automate/rest-api), [App Automate API](https://www.browserstack.com/app-automate/rest-api), and [Screenshots API](https://www.browserstack.com/screenshots/api). - -## Installation - -``` -npm install browserstack -``` - -## Usage - -```javascript -var BrowserStack = require("browserstack"); -var browserStackCredentials = { - username: "foo", - password: "p455w0rd!!1" -}; - -// REST API -var client = BrowserStack.createClient(browserStackCredentials); - -client.getBrowsers(function(error, browsers) { - console.log("The following browsers are available for testing"); - console.log(browsers); -}); - -// Automate API -var automateClient = BrowserStack.createAutomateClient(browserStackCredentials); - -automateClient.getBrowsers(function(error, browsers) { - console.log("The following browsers are available for automated testing"); - console.log(browsers); -}); - -// App Automate API -// Show the upload builds for mobile app automation -var appAutomateClient = BrowserStack.createAppAutomateClient(browserStackCredentials); - -appAutomateClient.getBuilds(function(error, builds) { - console.log("The following builds are available for app automated testing"); - console.log(builds); -}); - -// Screenshots API -var screenshotClient = BrowserStack.createScreenshotClient(browserStackCredentials); - -screenshotClient.getBrowsers(function(error, browsers) { - console.log("The following browsers are available for screenshots"); - console.log(browsers); -}); -``` - -## API - -### Objects - -#### browser objects - -A common pattern in the APIs is a "browser object" which is just a plain object with the following properties: - -* `os`: The operating system. -* `os_version`: The operating system version. -* `browser`: The browser name. -* `browser_version`: The browser version. -* `device`: The device name. - -A browser object may only have one of `browser` or `device` set; which property is set will depend on `os`. - -#### worker objects - -Worker objects are extended [browser objects](#browser-objects) which contain the following additional properties: - -* `id`: The worker id. -* `status`: A string representing the current status of the worker. - * Possible statuses: `"running"`, `"queue"`. - -#### project objects - -Project objects are plain objects which contain the following properties: - -* `id`: The id of the project. -* `name`: The name of the project. -* `created_at`: When the project was created. -* `updated_at`: When the project was most recently updated. -* `user_id` -* `group_id` - -#### build objects - -Build objects are plain objects which contain the following properties: - -* `hashed_id`: The hashed if of the build. -* `name`: The name of the build. -* `status`: The status of the build. -* `duration` - -#### extended build objects - -Extended build objects are [build objects](#build-objects) with the following additional properties: - -* `id`: The id of the build. -* `automation_project_id`: The id of the project this build belongs to. -* `updated_at`: When the build was created. -* `created_at`: When the build was most recently updated. -* `delta` -* `tags` -* `user_id` -* `group_id` - -#### session objects - -Session objects are extended [browser objects](#browser-objects) which contain the following additional properties: - -* `hashed_id`: The hashed ID of the session. -* `name`: The name of the session. -* `build_name`: The name of the build this session belongs to. -* `project_name`: The name of the project this session belongs to. -* `status`: The status of the session. -* `browser_url`: The most recenly loaded URL the worker. -* `duration`: The duration in seconds that the session has been active. -* `logs`: The URL for the session logs. -* `video_url`: The URL for the session video. -* `reason`: The reason the session was terminated. - -#### screenshot job objects - -Screenshot job objects are plain objects which contain the following properties: - -* `job_id`: The id of the job. -* `state`: The state of the job. -* `win_res`: The screen resolution for browsers running on Windows. May be one of: `"1024x768"`, `"1280x1024"`. -* `mac_res`: The screen resolution for browsers running on Mac OS X. May be one of: `"1024x768"`, `"1280x960"`, `"1280x1024"`, `"1600x1200"`, `"1920x1080"`. -* `orientation`: The screen orientation for devices. May be one of: `"portrait"`, `"landscape"`. -* `quality`: The quality of the screenshot. May be one of: `"original"`, `"compressed"`. -* `wait_time`: The number of seconds to wait before taking the screenshot. May be one of: `2`, `5`, `10`, `15`, `20`, `60`. -* `local`: Boolean indicating whether a local testing connection should be used. -* `browsers`: A collection of [browser objects](#browser-objects) indicating which browsers and devices to take screenshots with. - -### screenshot state objects - -Screenshot state objects are extended [browser objects](#browser-objects) which contain the following additional properties: - -* `id`: The id of the screenshot object. -* `state`: The state of the screenshot. -* `url`: The URL of the page the screenshot was generated from. -* `thumb_url`: The URL for the screenshot thumbnail. -* `image_url`: The URL for the full-size screenshot. -* `created_at`: The timestamp indicating when the screenshot was generated. - -### REST API v4 - -*Note: For earlier versions of the API, please see [the wiki](https://github.com/scottgonzalez/node-browserstack/wiki/API).* - -#### BrowserStack.createClient(settings) - -Creates a new client instance. - -* `settings`: A hash of settings that apply to all requests for the new client. - * `username`: The username for the BrowserStack account. - * `password`: The password for the BrowserStack account. - * `version` (optional; default: `4`): Which version of the BrowserStack API to use. - * `server` (optional; default: `{ host: "api.browserstack.com", port: 80 }`): An object containing `host` and `port` to connect to a different BrowserStack API compatible service. - * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack (or `settings.server`). e.g. `"http://proxy.example.com:1234"` - -#### client.getBrowsers(callback) - -Gets the list of available browsers. - -* `callback` (`function(error, browsers)`): A callback to invoke when the API call is complete. - * `browsers`: An array of [browser objects](#browser-objects). - -#### client.createWorker(settings, callback) - -Creates a worker. - -* `settings`: A hash of settings for the worker (an extended [browser object](#browser-objects)). - * `os`: See [browser object](#browser-objects) for details. - * `os_version`: See [browser object](#browser-objects) for details. - * `browser`: See [browser object](#browser-objects) for details. - * `browser_version`: See [browser object](#browser-objects) for details. - * `device`: See [browser object](#browser-objects) for details. - * `url` (optional): Which URL to navigate to upon creation. - * `timeout` (optional): Maximum life of the worker (in seconds). Maximum value of `1800`. Specifying `0` will use the default of `300`. - * `name` (optional): Provide a name for the worker. - * `build` (optional): Group workers into a build. - * `project` (optional): Provide the project the worker belongs to. - * `browserstack.video` (optional): Set to `false` to disable video recording. -* `callback` (`function(error, worker)`): A callback to invoke when the API call is complete. - * `worker` A [worker object](#worker-objects). - -*Note: A special value of `"latest"` is supported for `browser_version`, which will use the latest stable version.* - -#### client.getWorker(id, callback) - -Gets the status of a worker. - -* `id`: The id of the worker. -* `callback` (`function(error, worker)`): A callback to invoke when the API call is complete. - * `worker`: A [worker object](#worker-objects). - -#### client.changeUrl(id, options, callback) - -Change the URL of a worker. - -* `id`: The id of the worker. -* `options`: Configuration for the URL change. - * `url`: The new URL to set. - * `timeout` (optional): Set a new timeout for this worker, see [createWorker](#client.CreateWorker) for details. -* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. - * `data`: An object with a `message`, confirming the URL change. - -#### client.terminateWorker(id, callback) - -Terminates an active worker. - -* `id`: The id of the worker to terminate. -* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. - * `data`: An object with a `time` property indicating how long the worker was alive. - -#### client.getWorkers(callback) - -Gets the status of all workers. - -* `callback` (`function(error, workers)`): A callback to invoke when the API call is complete. - * `workers`: An array of [worker objects](#worker-objects). - -#### client.takeScreenshot(id, callback) - -Take a screenshot at current state of worker. - -* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. - * `data`: An object with a `url` property having the public url for the screenshot. - -#### client.getLatest(browser, callback) - -Gets the latest version of a browser. - -* `browser`: Which browser to get the latest version for. See [browser object](#browser-objects) for details. -* `callback` (`function(error, version)`): A callback to invoke when the version is determined. - * `version`: The latest version of the browser. - -*Note: Since mobile devices do not have version numbers, there is no latest version.* - -#### client.getLatest(callback) - -Gets the latest version of all browsers. - -* `callback` (`function(error, versions)`): A callback to invoke when the versions are determined. - * `versions`: A hash of browser names and versions. - -#### client.getApiStatus(callback) - -* `callback` (`function(error, status)`): A callback to invoke when the status is determined. - * `used_time`: Time used so far this month, in seconds. - * `total_available_time`: Total available time, in seconds. Paid plans have unlimited API time and will receive the string `"Unlimited Testing Time"` instead of a number. - * `running_sessions`: Number of running sessions. - * `sessions_limit`: Number of allowable concurrent sessions. - -### Automate API - -#### BrowserStack.createAutomateClient(settings) - -Creates a new client instance. - -* `settings`: A hash of settings that apply to all requests for the new client. - * `username`: The username for the BrowserStack account. - * `password`: The password for the BrowserStack account. - * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack. e.g. `"http://proxy.example.com:1234"` - -#### automateClient.getPlan(callback) - -Gets information about your group's Automate plan, including the maximum number of parallel sessions allowed and the number of parallel sessions currently running. - -* `callback` (`function(error, plan)`): A callback to invoke when the API call is complete. - * `plan`: An object with `parallel_sessions_max_allowed`, `parallel_sessions_running`, and `automate_plan` showing the current state of your plan. - -#### automateClient.getBrowsers(callback) - -Gets the list of available browsers. - -* `callback` (`function(error, browsers)`): A callback to invoke when the API call is complete. - * `browsers`: An array of [browser objects](#browser-objects). - -#### automateClient.getProjects(callback) - -Gets the list of projects. - -* `callback` (`function(error, projects)`): A callback to invoke when the API call is complete. - * `projects`: An array of [project objects](#project-objects). - -#### automateClient.getProject(id, callback) - -Gets information about a project. - -* `id`: The ID of the project. -* `callback` (`function(error, project)`): A callback to invoke when the API call is complete. - * `project`: A [project object](#project-objects) including an array of [extended build objects](#build-objects). - -#### automateClient.getBuilds([options,] callback) - -Gets the list of builds. - -* `options` (optional): An object containing search parameters. - * `limit`: The number of builds to return. Defaults to `10`. - * `status`: Filter builds based on status. May be one of `"running"`, `"done"`, `"failed"`, `"timeout"`. -* `callback` (`function(error, builds)`): A callback to invoke when the API call is complete. - * `builds`: An array of [build objects](#build-objects). - -#### automateClient.getSessions(buildId, [options,] callback) - -Gets the list of sessions in a build. - -* `buildId`: The hashed ID of the build. -* `options` (optional): An object containing search parameters. - * `limit`: The number of sessions to return. Defaults to `10`. - * `status`: Filter sessions based on status. May be one of `"running"`, `"done"`, `"failed"`. -* `callback` (`function(error, sessions)`): A callback to invoke when the API call is complete. - * `sessions`: An array of [session objects](#session-objects). - -#### automateClient.getSession(id, callback) - -Gets the details for a session. - -* `id`: The hashed ID of the session. -* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. - * `session`: A [session object](#session-objects). - -#### automateClient.updateSession(id, options, callback) - -Updates the status of a session. - -* `id`: The hashed ID of the session. -* `options`: An object containing the parameters. - * `status`: New status value. [May be one of](https://www.browserstack.com/automate/rest-api#rest-api-sessions) `"completed"` or `"error"`. -* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. - * `session`: The updated [session object](#session-objects). - -#### automateClient.deleteSession(id, callback) - -Deletes a session. - -* `id`: The hashed ID of the session. -* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. - * `data`: An object with a `message`, confirming the deletion. - -### App Automate API - -#### BrowserStack.createAppAutomateClient(settings) - -Creates a new client instance. - -* `settings`: A hash of settings that apply to all requests for the new client. - * `username`: The username for the BrowserStack account. - * `password`: The password for the BrowserStack account. - * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack. e.g. `"http://proxy.example.com:1234"` - -#### automateClient.getPlan(callback) - -Gets information about your group's App Automate plan, including the maximum number of parallel sessions allowed and the number of parallel sessions currently running. - -* `callback` (`function(error, plan)`): A callback to invoke when the API call is complete. - * `plan`: An object with `parallel_sessions_max_allowed`, `parallel_sessions_running`, and `automate_plan` showing the current state of your plan. - -#### automateClient.getProjects(callback) - -Gets the list of projects. - -* `callback` (`function(error, projects)`): A callback to invoke when the API call is complete. - * `projects`: An array of [project objects](#project-objects). - -#### automateClient.getProject(id, callback) - -Gets information about a project. - -* `id`: The ID of the project. -* `callback` (`function(error, project)`): A callback to invoke when the API call is complete. - * `project`: A [project object](#project-objects) including an array of [extended build objects](#build-objects). - -#### automateClient.getBuilds([options,] callback) - -Gets the list of builds. - -* `options` (optional): An object containing search parameters. - * `limit`: The number of builds to return. Defaults to `10`. - * `status`: Filter builds based on status. May be one of `"running"`, `"done"`, `"failed"`, `"timeout"`. -* `callback` (`function(error, builds)`): A callback to invoke when the API call is complete. - * `builds`: An array of [build objects](#build-objects). - -#### automateClient.getSessions(buildId, [options,] callback) - -Gets the list of sessions in a build. - -* `buildId`: The hashed ID of the build. -* `options` (optional): An object containing search parameters. - * `limit`: The number of sessions to return. Defaults to `10`. - * `status`: Filter sessions based on status. May be one of `"running"`, `"done"`, `"failed"`. -* `callback` (`function(error, sessions)`): A callback to invoke when the API call is complete. - * `sessions`: An array of [session objects](#session-objects). - -#### automateClient.getSession(id, callback) - -Gets the details for a session. - -* `id`: The hashed ID of the session. -* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. - * `session`: A [session object](#session-objects). - -#### automateClient.updateSession(id, options, callback) - -Updates the status of a session. - -* `id`: The hashed ID of the session. -* `options`: An object containing the parameters. - * `status`: New status value. [May be one of](https://www.browserstack.com/automate/rest-api#rest-api-sessions) `"completed"` or `"error"`. -* `callback` (`function(error, session)`): A callback to invoke when the API call is complete. - * `session`: The updated [session object](#session-objects). - -#### automateClient.deleteSession(id, callback) - -Deletes a session. - -* `id`: The hashed ID of the session. -* `callback` (`function(error, data)`): A callback to invoke when the API call is complete. - * `data`: An object with a `message`, confirming the deletion. - -### Screenshots API - -#### BrowserStack.createScreenshotClient(settings) - -Creates a new client instance. - -* `settings`: A hash of settings that apply to all requests for the new client. - * `username`: The username for the BrowserStack account. - * `password`: The password for the BrowserStack account. - * `proxy` (optional; default: `null`): Proxy server supporting HTTPS to be used for connecting to BrowserStack. e.g. `"http://proxy.example.com:1234"` - -#### screenshotClient.getBrowsers(callback) - -Gets the list of available browsers. - -* `callback` (`function(error, browsers)`): A callback to invoke when the API call is complete. - * `browsers`: An array of [browser objects](#browser-objects). - -#### screenshotClient.generateScreenshots(options, callback) - -Creates a job to take screenshots. - -* `options`: A hash of settings for the screenshots. See [screenshot job objects](#screenshot-job-objects) for details. - * `url`: The URL of the desired page. - * `browsers`: A collection of [browser objects](#browser-objects) indicating which browsers and devices to take screenshots with. - * `win_res` (optional): Only required if taking a screenshot on Windows. Defaults to `"1024x768"`. - * `mac_res` (optional): Only required if taking a screenshot on Mac OS X. Defaults to "1024x768"`. - * `orientation` (optional): Defaults to `"portrait"`. - * `quality` (optional): Defaults to `"compressed"`. - * `wait_time` (optional): Defaults to `5`. - * `local` (optional): Defaults to `false`. -* `callback` (`function(error, job)`): A callback to invoke when the API call is complete. - * `job`: A [screenshot job object](#screenshot-job-objects) containing [screenshot state objects](#screenshot-state-objects) in place of [browser objects](#browser-objects). - -#### screenshotClient.getJob(id, callback) - -Gets details about the current status of a screenshot job. - -* `id`: The id of the job. -* `callback` (`function(error, job)`): A callback to invoke when the API call is complete. - * `job`: A [screenshot job object](#screenshot-job-objects) containing [screenshot state objects](#screenshot-state-objects) in place of [browser objects](#browser-objects). - -## Tests - -To run the full test suite, you must have a BrowserStack account. Run `npm test` with the `BROWSERSTACK_USERNAME` and `BROWSERSTACK_KEY` environment variables set. - -To run just the lint checks, run `npm lint`. - -## License - -Copyright node-browserstack contributors. Released under the terms of the MIT license. diff --git a/test-eol-project/node_modules/browserstack/test/api.js b/test-eol-project/node_modules/browserstack/test/api.js deleted file mode 100644 index 2db15534..00000000 --- a/test-eol-project/node_modules/browserstack/test/api.js +++ /dev/null @@ -1,352 +0,0 @@ -"use strict"; - -var should = require("should"); -var BrowserStack = require("../lib/browserstack"); -var util = require("./util"); - -var username = util.browserStack.username; -var password = util.browserStack.password; - -if (!username || !password) { - throw new Error("Please set BROWSERSTACK_USERNAME and BROWSERSTACK_KEY environment variables."); -} - -describe("BrowserStack API", function() { - this.timeout(60000); // 60s - - var client; - var workers = []; - - beforeEach(function() { - client = BrowserStack.createClient({ - username: username, - password: password - }); - }); - - afterEach(function(done) { - util.terminateWorkers(client, workers, function() { - workers = []; - done(); - }); - }); - - describe("API Status", function() { - it("should get API status", function(done) { - client.getApiStatus(function(err, status) { - should.ifError(err); - - status.should.be.an.Object().and.have.keys([ - "running_sessions", - "sessions_limit", - "used_time", - "total_available_time" - ]); - - done(err); - }); - }); - }); - - describe("Browser Listing", function() { - it("should list browsers", function(done) { - client.getBrowsers(function(err, browsers) { - should.ifError(err); - - browsers.should.be.an.Array().and.not.be.empty(); - browsers.map(util.validateBrowserObject); - - done(err); - }); - }); - - it("should get latest browser versions", function(done) { - client.getLatest(function(err, versions) { - should.ifError(err); - - versions.should.be.an.Object().and.not.be.empty(); - done(err); - }); - }); - - it("should get the latest version for specified browser", function(done) { - client.getBrowsers(function(err, browsers) { - should.ifError(err); - - browsers = browsers.filter(function(browser) { - return !browser.device; - }); - - var requests = browsers.length; - - browsers.forEach(function(browser) { - client.getLatest(browser, function(err, version) { - should.ifError(err); - version.should.match(/\d+(\.)*\d*/); - - if (err || --requests < 1) { - if (done) { - done(err); - done = null; - } - } - }); - }); - }); - }); - - it("should fail to get the latest version for invalid browser", function(done) { - client.getLatest({ - os: "Windows", - os_version: "10", - browser: "mosaic" - }, function(err, version) { - should.ifError(err); - should.equal(undefined, version); - - done(err); - }); - }); - }); - - describe("Worker API", function() { - var sampleDesktopBrowser = { - os: "Windows", - os_version: "10", - browser: "chrome", - browser_version: "47.0", - timeout: 20 - }; - - var sampleDeviceBrowser = { - device: "Google Nexus 6", - os: "android", - os_version: "5.0", - browser: "Android Browser", - timeout: 20 - }; - - it("should create worker", function(done) { - client.createWorker(util.merge(sampleDesktopBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - done(err); - }); - }); - - it("should create worker with latest edge", function(done) { - client.createWorker({ - os: "Windows", - os_version: "10", - browser: "Edge", - browser_version: "latest", - url: "http://www.example.com", - timeout: 20 - }, function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - done(err); - }); - }); - - it("should fail to create worker for invalid browser", function(done) { - client.createWorker(util.merge(sampleDesktopBrowser, { - url: "http://www.example.com", - browser: "mosaic" - }), function(err, worker) { - err.should.be.an.Error(); - err.message.should.match(/validation failed/i); - - should.not.exist(worker); - done(); - }); - }); - - it("should create a worker with details", function(done) { - client.createWorker(util.merge(sampleDesktopBrowser, { - url: "http://www.example.com", - name: "worker-1", - build: "build-1", - project: "project-1" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - done(err); - }); - }); - - it("should create a worker for a device browser", function(done) { - client.createWorker(util.merge(sampleDeviceBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - done(err); - }); - }); - - it("should fail to create worker for invalid device", function(done) { - client.createWorker(util.merge(sampleDeviceBrowser, { - url: "http://www.example.com", - device: "Nexus 5S" - }), function(err, worker) { - - err.should.be.an.Error(); - err.message.should.match(/validation failed/i); - - should.not.exist(worker); - done(); - }); - }); - - it("should get created worker by id", function(done) { - client.createWorker(util.merge(sampleDeviceBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - - client.getWorker(worker.id, function(err, worker2) { - should.ifError(err); - - util.validateWorker(worker2); - should.equal(worker.id, worker2.id, "Worker id mismatch"); - done(err); - }); - }); - }); - - it("should fetch list of workers", function(done) { - client.createWorker(util.merge(sampleDeviceBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - - client.getWorkers(function(err, workers) { - should.ifError(err); - - workers.should.be.an.Array().and.not.be.empty(); - - var workerExists = workers.filter(function(w) { - util.validateWorker(w); - return (w.id === worker.id); - }).shift(); - - done(workerExists ? null : new Error("failed to fetch created worker")); - }); - }); - }); - - it("should terminate a worker by id", function(done) { - client.createWorker(util.merge(sampleDeviceBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - - client.terminateWorker(worker.id, function(err, data) { - should.ifError(err); - - data.should.be.an.Object(); - data.time.should.match(/\d+/); - - done(err); - }); - }); - }); - }); - - describe("Worker Session APIs", function() { - this.timeout(100000); - - var sampleDesktopBrowser = { - os: "Windows", - os_version: "10", - browser: "chrome", - browser_version: "47.0", - timeout: 120 - }; - - it("should change worker url", function(done) { - client.createWorker(util.merge(sampleDesktopBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - - util.validateWorker(worker); - workers.push(worker); - - util.pollApiWorker(client, worker, function(err, isRunning) { - if (isRunning) { - return client.changeUrl(worker.id, { - url: "http://www.example.net", - timeout: 20 - }, function(err, data) { - should.ifError(err); - - data.should.be.an.Object(); - data.message.should.match(/browser updated with new url/i); - - done(err); - }); - } - - should.ifError(err); - return done(err || new Error("worker remained in queue until timeout")); - }); - - }); - }); - - it("should take screenshot of worker session", function(done) { - client.createWorker(util.merge(sampleDesktopBrowser, { - url: "http://www.example.com" - }), function(err, worker) { - should.ifError(err); - util.validateWorker(worker); - workers.push(worker); - - util.pollApiWorker(client, worker, function(err, isRunning) { - if (isRunning) { - - // wait for page load - var pageLoadTime = 5000; - - return setTimeout(function() { - client.takeScreenshot(worker.id, function(err, data) { - should.ifError(err); - - data.should.be.an.Object(); - data.url.should.match(/^http(s)?:\/\/.*\.png$/i); - - done(err); - }); - }, pageLoadTime); - } - - should.ifError(err); - return done(err || new Error("worker remained in queue until timeout")); - }); - - }); - }); - - }); -}); diff --git a/test-eol-project/node_modules/browserstack/test/client.js b/test-eol-project/node_modules/browserstack/test/client.js deleted file mode 100644 index d33da98a..00000000 --- a/test-eol-project/node_modules/browserstack/test/client.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; - -var assert = require("assert"); -var BrowserStack = require("../lib/browserstack"); -var util = require("./util"); - -var apiLatestVersion = 4; - -var username = util.browserStack.username; -var password = util.browserStack.password; - -if (!username || !password) { - throw new Error("Please set BROWSERSTACK_USERNAME and BROWSERSTACK_KEY environment variables."); -} - -describe("Public API", function() { - it("exposes API and Screenshots clients", function() { - [ - "createClient", - "createScreenshotClient" - ].forEach(function(fn) { - assert.equal("function", typeof BrowserStack[fn]); - }); - }); - - describe("new ApiClient", function() { - var className = "ApiClient"; - - it("should return an API client", function() { - var client = BrowserStack.createClient({ - username: username, - password: password - }); - - assert.equal(className, client.constructor.name, "instance of " + className); - }); - - it("should return an API client of a particular version", function() { - for (var version = 1; version <= apiLatestVersion; version++) { - var client = BrowserStack.createClient({ - username: username, - password: password, - version: version - }); - - assert.equal(className, client.constructor.name, "instance of ApiClient"); - assert.equal(version, client.version, "ApiClient version mismatch"); - } - }); - - it("should throw an error for invalid ApiClient version", function() { - try { - BrowserStack.createClient({ - username: username, - password: password, - version: -1 - }); - } catch (err) { - assert.ok(err.toString().match(/invalid version/i)); - } - }); - }); - - describe("new ScreenshotClient", function() { - var className = "ScreenshotClient"; - - it("should return a screenshot client", function() { - var client = BrowserStack.createScreenshotClient({ - username: username, - password: password - }); - - assert.equal(className, client.constructor.name, "instance of " + className); - }); - }); -}); diff --git a/test-eol-project/node_modules/browserstack/test/screenshot.js b/test-eol-project/node_modules/browserstack/test/screenshot.js deleted file mode 100644 index fd1cd5dd..00000000 --- a/test-eol-project/node_modules/browserstack/test/screenshot.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; - -var should = require("should"); -var BrowserStack = require("../lib/browserstack"); -var util = require("./util"); - -var username = util.browserStack.username; -var password = util.browserStack.password; - -if (!username || !password) { - throw new Error("Please set BROWSERSTACK_USERNAME and BROWSERSTACK_KEY environment variables."); -} - -describe("Screenshot API", function() { - this.timeout(300000); // 300s - - var client; - - beforeEach(function() { - client = BrowserStack.createScreenshotClient({ - username: username, - password: password - }); - }); - - it("should list browsers", function(done) { - client.getBrowsers(function(err, browsers) { - should.ifError(err); - - browsers.should.be.an.Array().and.not.be.empty(); - browsers.map(util.validateBrowserObject); - - done(err); - }); - }); - - it("should generate screenshots for multiple browsers", function(done) { - var options = { - url: "http://www.example.com", - browsers: ["40.0", "41.0", "42.0"].map(function(v) { - return { - os: "Windows", - os_version: "7", - browser: "chrome", - browser_version: v - }; - }) - }; - - client.generateScreenshots(options, function(err, job) { - should.ifError(err); - util.validateScreenshotJob(job); - - util.pollScreenshotWorker(client, job, function(err, isRunning) { - if (!err && !isRunning) { - - // this is highly dependent on demand and queue time at BrowserStack; - // little point in stalling the test run waiting for this job to complete - - // print warning in console for user to decide - console.warn("\t[WARN] worker %s did not run within timeout", job.job_id); - } - - done(err); - }); - }); - }); - - it("should fetch a screenshot job", function(done) { - var options = { - url: "http://www.example.com", - browsers: [ - { - os: "Windows", - os_version: "7", - browser: "chrome", - browser_version: "42.0" - } - ] - }; - - client.generateScreenshots(options, function(err, job) { - should.ifError(err); - util.validateScreenshotJob(job); - - client.getJob(job.job_id, function(err, job) { - if (!err) { - util.validateScreenshotJob(job); - } - - done(err); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/browserstack/test/util.js b/test-eol-project/node_modules/browserstack/test/util.js deleted file mode 100644 index 3a0e097b..00000000 --- a/test-eol-project/node_modules/browserstack/test/util.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -var extend = require("../lib/extend"); - -var pollWorkerRetries = 30; -var pollWorkerRetryInterval = 2000; - -var encoding = process.env.TRAVIS ? "base64" : "utf8"; -module.exports.browserStack = { - username: Buffer.from(process.env.BROWSERSTACK_USERNAME || "", encoding).toString(), - password: Buffer.from(process.env.BROWSERSTACK_KEY || "", encoding).toString() -}; - -module.exports.terminateWorkers = function terminateWorkers(client, workers, callback) { - if (!workers.length) { - return callback(null); - } - - if (workers[0].id) { - workers = workers.map(function(w) { - return w.id; - }); - } - - client.terminateWorker(workers.shift(), function() { - if (!workers.length) { - return callback(null); - } - - terminateWorkers(client, workers, callback); - }); -}; - -module.exports.pollApiWorker = function pollApiWorker(client, worker, callback) { - pollWorker(worker, - client.getWorker.bind(client), - function getWorkerId(worker) { - return worker && worker.id; - }, - function isWorkerRunning(worker) { - return worker && worker.status === "running"; - }, callback); -}; - -module.exports.pollScreenshotWorker = function pollScreenshotWorker(client, worker, callback) { - pollWorker(worker, - client.getJob.bind(client), - function getWorkerId(worker) { - return worker && (worker.job_id || worker.id); - }, - function isWorkerRunning(worker) { - return worker && worker.state === "running"; - }, callback); -}; - -module.exports.validateBrowserObject = function validateBrowserObject(browser) { - [ - "os", - "os_version", - "browser", - browser.device ? "device" : "browser_version" - ].forEach(function(attr) { - if (attr.match(/version/)) { - browser[attr].should.be.a.String().and.match(/\S+/); - } else { - browser[attr].should.be.a.String().and.match(/^[a-zA-Z]+/); - } - }); - - return browser; -}; - -module.exports.validateScreenshotJob = function validateScreenshotJob(job) { - job.should.be.an.Object().and.not.be.empty(); - (job.job_id || job.id).should.match(/[a-zA-Z0-9]+/); - - [ - "quality", - "win_res", - "wait_time" - ].forEach(function(k) { - job.should.have.property(k); - }); - - job.screenshots - .map(this.validateBrowserObject) - .forEach(function(screenshotState) { - screenshotState.id.should.match(/[a-zA-Z0-9]+/); - ["processing", "pending", "queue", "running"].should.containEql(screenshotState.state); - }); -}; - -module.exports.validateWorker = function validateWorker(w) { - w.should.be.an.Object(); - w.id.should.match(/\d+/); - return w; -}; - -module.exports.merge = function merge(o, a) { - return extend(extend({}, o), a); -}; - -function pollWorker(worker, getWorkerStatusFn, getWorkerIdFn, isWorkerRunningFn, callback) { - var maxRetries = pollWorkerRetries; - var retryInterval = pollWorkerRetryInterval; - var workerId = getWorkerIdFn(worker); - var timer; - - var pollWorkerState = function(id, callback) { - if (--maxRetries < 1) { - clearTimeout(timer); - return callback(null, false); - } - - getWorkerStatusFn(workerId, function(err, worker) { - workerId = getWorkerIdFn(worker); - - if (err || !workerId) { - clearTimeout(timer); - return callback(err, false); - } - - if (isWorkerRunningFn(worker)) { - return callback(null, true); - } - - setTimeout(function() { - pollWorkerState(id, callback); - }, retryInterval); - }); - }; - - pollWorkerState(workerId, callback); -} diff --git a/test-eol-project/node_modules/camelcase/index.d.ts b/test-eol-project/node_modules/camelcase/index.d.ts deleted file mode 100644 index 58f2069a..00000000 --- a/test-eol-project/node_modules/camelcase/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -declare namespace camelcase { - interface Options { - /** - Uppercase the first character: `foo-bar` → `FooBar`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -declare const camelcase: { - /** - Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. - - @param input - String to convert to camel case. - - @example - ``` - import camelCase = require('camelcase'); - - camelCase('foo-bar'); - //=> 'fooBar' - - camelCase('foo_bar'); - //=> 'fooBar' - - camelCase('Foo-Bar'); - //=> 'fooBar' - - camelCase('Foo-Bar', {pascalCase: true}); - //=> 'FooBar' - - camelCase('--foo.bar', {pascalCase: false}); - //=> 'fooBar' - - camelCase('foo bar'); - //=> 'fooBar' - - console.log(process.argv[3]); - //=> '--foo-bar' - camelCase(process.argv[3]); - //=> 'fooBar' - - camelCase(['foo', 'bar']); - //=> 'fooBar' - - camelCase(['__foo__', '--bar'], {pascalCase: true}); - //=> 'FooBar' - ``` - */ - (input: string | ReadonlyArray, options?: camelcase.Options): string; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function camelcase( - // input: string | ReadonlyArray, - // options?: camelcase.Options - // ): string; - // export = camelcase; - default: typeof camelcase; -}; - -export = camelcase; diff --git a/test-eol-project/node_modules/camelcase/index.js b/test-eol-project/node_modules/camelcase/index.js deleted file mode 100644 index 579f99b4..00000000 --- a/test-eol-project/node_modules/camelcase/index.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const preserveCamelCase = string => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < string.length; i++) { - const character = string[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { - string = string.slice(0, i) + '-' + string.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { - string = string.slice(0, i - 1) + '-' + string.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; - } - } - - return string; -}; - -const camelCase = (input, options) => { - if (!(typeof input === 'string' || Array.isArray(input))) { - throw new TypeError('Expected the input to be `string | string[]`'); - } - - options = Object.assign({ - pascalCase: false - }, options); - - const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - if (input.length === 1) { - return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); - } - - const hasUpperCase = input !== input.toLowerCase(); - - if (hasUpperCase) { - input = preserveCamelCase(input); - } - - input = input - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) - .replace(/\d+(\w|$)/g, m => m.toUpperCase()); - - return postProcess(input); -}; - -module.exports = camelCase; -// TODO: Remove this for the next major release -module.exports.default = camelCase; diff --git a/test-eol-project/node_modules/camelcase/license b/test-eol-project/node_modules/camelcase/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/camelcase/package.json b/test-eol-project/node_modules/camelcase/package.json deleted file mode 100644 index fbdbaaa7..00000000 --- a/test-eol-project/node_modules/camelcase/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "camelcase", - "version": "5.3.1", - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "license": "MIT", - "repository": "sindresorhus/camelcase", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/test-eol-project/node_modules/camelcase/readme.md b/test-eol-project/node_modules/camelcase/readme.md deleted file mode 100644 index fde27261..00000000 --- a/test-eol-project/node_modules/camelcase/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - ---- - - - ---- - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`
    -Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/test-eol-project/node_modules/caseless/LICENSE b/test-eol-project/node_modules/caseless/LICENSE deleted file mode 100644 index 61789f4a..00000000 --- a/test-eol-project/node_modules/caseless/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/test-eol-project/node_modules/caseless/README.md b/test-eol-project/node_modules/caseless/README.md deleted file mode 100644 index e5077a21..00000000 --- a/test-eol-project/node_modules/caseless/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. - -This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. - -## Usage - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'asdf') -c.get('a-header') === 'asdf' -``` - -## has(key) - -Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. - -```javascript -c.has('a-header') === 'a-Header' -``` - -## set(key, value[, clobber=true]) - -Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. - -```javascript -c.set('a-Header', 'fdas') -c.set('a-HEADER', 'more', false) -c.get('a-header') === 'fdsa,more' -``` - -## swap(key) - -Swaps the casing of a header with the new one that is passed in. - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'fdas') -c.swap('a-HEADER') -c.has('a-header') === 'a-HEADER' -headers === {'a-HEADER': 'fdas'} -``` diff --git a/test-eol-project/node_modules/caseless/index.js b/test-eol-project/node_modules/caseless/index.js deleted file mode 100644 index b194734e..00000000 --- a/test-eol-project/node_modules/caseless/index.js +++ /dev/null @@ -1,67 +0,0 @@ -function Caseless (dict) { - this.dict = dict || {} -} -Caseless.prototype.set = function (name, value, clobber) { - if (typeof name === 'object') { - for (var i in name) { - this.set(i, name[i], value) - } - } else { - if (typeof clobber === 'undefined') clobber = true - var has = this.has(name) - - if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value - else this.dict[has || name] = value - return has - } -} -Caseless.prototype.has = function (name) { - var keys = Object.keys(this.dict) - , name = name.toLowerCase() - ; - for (var i=0;i", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mikeal/caseless/issues" - }, - "devDependencies": { - "tape": "^2.10.2" - } -} diff --git a/test-eol-project/node_modules/caseless/test.js b/test-eol-project/node_modules/caseless/test.js deleted file mode 100644 index f55196cc..00000000 --- a/test-eol-project/node_modules/caseless/test.js +++ /dev/null @@ -1,67 +0,0 @@ -var tape = require('tape') - , caseless = require('./') - ; - -tape('set get has', function (t) { - var headers = {} - , c = caseless(headers) - ; - t.plan(17) - c.set('a-Header', 'asdf') - t.equal(c.get('a-header'), 'asdf') - t.equal(c.has('a-header'), 'a-Header') - t.ok(!c.has('nothing')) - // old bug where we used the wrong regex - t.ok(!c.has('a-hea')) - c.set('a-header', 'fdsa') - t.equal(c.get('a-header'), 'fdsa') - t.equal(c.get('a-Header'), 'fdsa') - c.set('a-HEADER', 'more', false) - t.equal(c.get('a-header'), 'fdsa,more') - - t.deepEqual(headers, {'a-Header': 'fdsa,more'}) - c.swap('a-HEADER') - t.deepEqual(headers, {'a-HEADER': 'fdsa,more'}) - - c.set('deleteme', 'foobar') - t.ok(c.has('deleteme')) - t.ok(c.del('deleteme')) - t.notOk(c.has('deleteme')) - t.notOk(c.has('idonotexist')) - t.ok(c.del('idonotexist')) - - c.set('tva', 'test1') - c.set('tva-header', 'test2') - t.equal(c.has('tva'), 'tva') - t.notOk(c.has('header')) - - t.equal(c.get('tva'), 'test1') - -}) - -tape('swap', function (t) { - var headers = {} - , c = caseless(headers) - ; - t.plan(4) - // No Header to Swap. - t.throws(function () { - c.swap('content-type') - }) - // Set Header. - c.set('content-type', 'application/json') - // Swap Header With Itself. - c.swap('content-type') - // Does Not Delete Itself. - t.ok(c.has('content-type')) - // Swap Header With a Different Header. - c.swap('Content-Type') - // Still Has Header. - t.ok(c.has('Content-Type')) - // Delete Header. - c.del('Content-Type') - // No Header to Swap. - t.throws(function () { - c.swap('content-type') - }) -}) diff --git a/test-eol-project/node_modules/chalk/index.js b/test-eol-project/node_modules/chalk/index.js deleted file mode 100644 index 2d85a917..00000000 --- a/test-eol-project/node_modules/chalk/index.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; -var escapeStringRegexp = require('escape-string-regexp'); -var ansiStyles = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasAnsi = require('has-ansi'); -var supportsColor = require('supports-color'); -var defineProps = Object.defineProperties; -var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - -function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; -} - -// use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001b[94m'; -} - -var styles = (function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; -})(); - -var proto = defineProps(function chalk() {}, styles); - -function build(_styles) { - var builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; - - return builder; -} - -function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - var i = nestedStyles.length; - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } - - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; - - return str; -} - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - - return ret; -} - -defineProps(Chalk.prototype, init()); - -module.exports = new Chalk(); -module.exports.styles = ansiStyles; -module.exports.hasColor = hasAnsi; -module.exports.stripColor = stripAnsi; -module.exports.supportsColor = supportsColor; diff --git a/test-eol-project/node_modules/chalk/license b/test-eol-project/node_modules/chalk/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/chalk/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/chalk/package.json b/test-eol-project/node_modules/chalk/package.json deleted file mode 100644 index 2b5881e9..00000000 --- a/test-eol-project/node_modules/chalk/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "chalk", - "version": "1.1.3", - "description": "Terminal string styling done right. Much color.", - "license": "MIT", - "repository": "chalk/chalk", - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Appelman (jbnicolai.com)", - "JD Ballard (github.com/qix-)" - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && mocha", - "bench": "matcha benchmark.js", - "coverage": "nyc npm test && nyc report", - "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "devDependencies": { - "coveralls": "^2.11.2", - "matcha": "^0.6.0", - "mocha": "*", - "nyc": "^3.0.0", - "require-uncached": "^1.0.2", - "resolve-from": "^1.0.0", - "semver": "^4.3.3", - "xo": "*" - }, - "xo": { - "envs": [ - "node", - "mocha" - ] - } -} diff --git a/test-eol-project/node_modules/chalk/readme.md b/test-eol-project/node_modules/chalk/readme.md deleted file mode 100644 index 5cf111e3..00000000 --- a/test-eol-project/node_modules/chalk/readme.md +++ /dev/null @@ -1,213 +0,0 @@ -

    -
    -
    - chalk -
    -
    -
    -

    - -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) -[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) -[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) - - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) - - -## Why - -- Highly performant -- Doesn't extend `String.prototype` -- Expressive API -- Ability to nest styles -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 - - -## Install - -``` -$ npm install --save chalk -``` - - -## Usage - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -chalk.blue('Hello world!'); - -// combine styled and normal strings -chalk.blue('Hello') + 'World' + chalk.red('!'); - -// compose multiple styles using the chainable API -chalk.blue.bgRed.bold('Hello world!'); - -// pass in multiple arguments -chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); - -// nest styles -chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); - -// nest styles of the same type even (color, underline, background) -chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -); -``` - -Easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - -Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). - -```js -var name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> Hello Sindre -``` - - -## API - -### chalk.` -Browserstack-logo-white - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-eol-project/node_modules/psl/data/rules.js b/test-eol-project/node_modules/psl/data/rules.js deleted file mode 100644 index 7c167fb7..00000000 --- a/test-eol-project/node_modules/psl/data/rules.js +++ /dev/null @@ -1,9778 +0,0 @@ -export default [ - "ac", - "com.ac", - "edu.ac", - "gov.ac", - "mil.ac", - "net.ac", - "org.ac", - "ad", - "ae", - "ac.ae", - "co.ae", - "gov.ae", - "mil.ae", - "net.ae", - "org.ae", - "sch.ae", - "aero", - "airline.aero", - "airport.aero", - "accident-investigation.aero", - "accident-prevention.aero", - "aerobatic.aero", - "aeroclub.aero", - "aerodrome.aero", - "agents.aero", - "air-surveillance.aero", - "air-traffic-control.aero", - "aircraft.aero", - "airtraffic.aero", - "ambulance.aero", - "association.aero", - "author.aero", - "ballooning.aero", - "broker.aero", - "caa.aero", - "cargo.aero", - "catering.aero", - "certification.aero", - "championship.aero", - "charter.aero", - "civilaviation.aero", - "club.aero", - "conference.aero", - "consultant.aero", - "consulting.aero", - "control.aero", - "council.aero", - "crew.aero", - "design.aero", - "dgca.aero", - "educator.aero", - "emergency.aero", - "engine.aero", - "engineer.aero", - "entertainment.aero", - "equipment.aero", - "exchange.aero", - "express.aero", - "federation.aero", - "flight.aero", - "freight.aero", - "fuel.aero", - "gliding.aero", - "government.aero", - "groundhandling.aero", - "group.aero", - "hanggliding.aero", - "homebuilt.aero", - "insurance.aero", - "journal.aero", - "journalist.aero", - "leasing.aero", - "logistics.aero", - "magazine.aero", - "maintenance.aero", - "marketplace.aero", - "media.aero", - "microlight.aero", - "modelling.aero", - "navigation.aero", - "parachuting.aero", - "paragliding.aero", - "passenger-association.aero", - "pilot.aero", - "press.aero", - "production.aero", - "recreation.aero", - "repbody.aero", - "res.aero", - "research.aero", - "rotorcraft.aero", - "safety.aero", - "scientist.aero", - "services.aero", - "show.aero", - "skydiving.aero", - "software.aero", - "student.aero", - "taxi.aero", - "trader.aero", - "trading.aero", - "trainer.aero", - "union.aero", - "workinggroup.aero", - "works.aero", - "af", - "com.af", - "edu.af", - "gov.af", - "net.af", - "org.af", - "ag", - "co.ag", - "com.ag", - "net.ag", - "nom.ag", - "org.ag", - "ai", - "com.ai", - "net.ai", - "off.ai", - "org.ai", - "al", - "com.al", - "edu.al", - "gov.al", - "mil.al", - "net.al", - "org.al", - "am", - "co.am", - "com.am", - "commune.am", - "net.am", - "org.am", - "ao", - "co.ao", - "ed.ao", - "edu.ao", - "gov.ao", - "gv.ao", - "it.ao", - "og.ao", - "org.ao", - "pb.ao", - "aq", - "ar", - "bet.ar", - "com.ar", - "coop.ar", - "edu.ar", - "gob.ar", - "gov.ar", - "int.ar", - "mil.ar", - "musica.ar", - "mutual.ar", - "net.ar", - "org.ar", - "senasa.ar", - "tur.ar", - "arpa", - "e164.arpa", - "home.arpa", - "in-addr.arpa", - "ip6.arpa", - "iris.arpa", - "uri.arpa", - "urn.arpa", - "as", - "gov.as", - "asia", - "at", - "ac.at", - "sth.ac.at", - "co.at", - "gv.at", - "or.at", - "au", - "asn.au", - "com.au", - "edu.au", - "gov.au", - "id.au", - "net.au", - "org.au", - "conf.au", - "oz.au", - "act.au", - "nsw.au", - "nt.au", - "qld.au", - "sa.au", - "tas.au", - "vic.au", - "wa.au", - "act.edu.au", - "catholic.edu.au", - "nsw.edu.au", - "nt.edu.au", - "qld.edu.au", - "sa.edu.au", - "tas.edu.au", - "vic.edu.au", - "wa.edu.au", - "qld.gov.au", - "sa.gov.au", - "tas.gov.au", - "vic.gov.au", - "wa.gov.au", - "schools.nsw.edu.au", - "aw", - "com.aw", - "ax", - "az", - "biz.az", - "com.az", - "edu.az", - "gov.az", - "info.az", - "int.az", - "mil.az", - "name.az", - "net.az", - "org.az", - "pp.az", - "pro.az", - "ba", - "com.ba", - "edu.ba", - "gov.ba", - "mil.ba", - "net.ba", - "org.ba", - "bb", - "biz.bb", - "co.bb", - "com.bb", - "edu.bb", - "gov.bb", - "info.bb", - "net.bb", - "org.bb", - "store.bb", - "tv.bb", - "*.bd", - "be", - "ac.be", - "bf", - "gov.bf", - "bg", - "0.bg", - "1.bg", - "2.bg", - "3.bg", - "4.bg", - "5.bg", - "6.bg", - "7.bg", - "8.bg", - "9.bg", - "a.bg", - "b.bg", - "c.bg", - "d.bg", - "e.bg", - "f.bg", - "g.bg", - "h.bg", - "i.bg", - "j.bg", - "k.bg", - "l.bg", - "m.bg", - "n.bg", - "o.bg", - "p.bg", - "q.bg", - "r.bg", - "s.bg", - "t.bg", - "u.bg", - "v.bg", - "w.bg", - "x.bg", - "y.bg", - "z.bg", - "bh", - "com.bh", - "edu.bh", - "gov.bh", - "net.bh", - "org.bh", - "bi", - "co.bi", - "com.bi", - "edu.bi", - "or.bi", - "org.bi", - "biz", - "bj", - "africa.bj", - "agro.bj", - "architectes.bj", - "assur.bj", - "avocats.bj", - "co.bj", - "com.bj", - "eco.bj", - "econo.bj", - "edu.bj", - "info.bj", - "loisirs.bj", - "money.bj", - "net.bj", - "org.bj", - "ote.bj", - "restaurant.bj", - "resto.bj", - "tourism.bj", - "univ.bj", - "bm", - "com.bm", - "edu.bm", - "gov.bm", - "net.bm", - "org.bm", - "bn", - "com.bn", - "edu.bn", - "gov.bn", - "net.bn", - "org.bn", - "bo", - "com.bo", - "edu.bo", - "gob.bo", - "int.bo", - "mil.bo", - "net.bo", - "org.bo", - "tv.bo", - "web.bo", - "academia.bo", - "agro.bo", - "arte.bo", - "blog.bo", - "bolivia.bo", - "ciencia.bo", - "cooperativa.bo", - "democracia.bo", - "deporte.bo", - "ecologia.bo", - "economia.bo", - "empresa.bo", - "indigena.bo", - "industria.bo", - "info.bo", - "medicina.bo", - "movimiento.bo", - "musica.bo", - "natural.bo", - "nombre.bo", - "noticias.bo", - "patria.bo", - "plurinacional.bo", - "politica.bo", - "profesional.bo", - "pueblo.bo", - "revista.bo", - "salud.bo", - "tecnologia.bo", - "tksat.bo", - "transporte.bo", - "wiki.bo", - "br", - "9guacu.br", - "abc.br", - "adm.br", - "adv.br", - "agr.br", - "aju.br", - "am.br", - "anani.br", - "aparecida.br", - "app.br", - "arq.br", - "art.br", - "ato.br", - "b.br", - "barueri.br", - "belem.br", - "bet.br", - "bhz.br", - "bib.br", - "bio.br", - "blog.br", - "bmd.br", - "boavista.br", - "bsb.br", - "campinagrande.br", - "campinas.br", - "caxias.br", - "cim.br", - "cng.br", - "cnt.br", - "com.br", - "contagem.br", - "coop.br", - "coz.br", - "cri.br", - "cuiaba.br", - "curitiba.br", - "def.br", - "des.br", - "det.br", - "dev.br", - "ecn.br", - "eco.br", - "edu.br", - "emp.br", - "enf.br", - "eng.br", - "esp.br", - "etc.br", - "eti.br", - "far.br", - "feira.br", - "flog.br", - "floripa.br", - "fm.br", - "fnd.br", - "fortal.br", - "fot.br", - "foz.br", - "fst.br", - "g12.br", - "geo.br", - "ggf.br", - "goiania.br", - "gov.br", - "ac.gov.br", - "al.gov.br", - "am.gov.br", - "ap.gov.br", - "ba.gov.br", - "ce.gov.br", - "df.gov.br", - "es.gov.br", - "go.gov.br", - "ma.gov.br", - "mg.gov.br", - "ms.gov.br", - "mt.gov.br", - "pa.gov.br", - "pb.gov.br", - "pe.gov.br", - "pi.gov.br", - "pr.gov.br", - "rj.gov.br", - "rn.gov.br", - "ro.gov.br", - "rr.gov.br", - "rs.gov.br", - "sc.gov.br", - "se.gov.br", - "sp.gov.br", - "to.gov.br", - "gru.br", - "imb.br", - "ind.br", - "inf.br", - "jab.br", - "jampa.br", - "jdf.br", - "joinville.br", - "jor.br", - "jus.br", - "leg.br", - "leilao.br", - "lel.br", - "log.br", - "londrina.br", - "macapa.br", - "maceio.br", - "manaus.br", - "maringa.br", - "mat.br", - "med.br", - "mil.br", - "morena.br", - "mp.br", - "mus.br", - "natal.br", - "net.br", - "niteroi.br", - "*.nom.br", - "not.br", - "ntr.br", - "odo.br", - "ong.br", - "org.br", - "osasco.br", - "palmas.br", - "poa.br", - "ppg.br", - "pro.br", - "psc.br", - "psi.br", - "pvh.br", - "qsl.br", - "radio.br", - "rec.br", - "recife.br", - "rep.br", - "ribeirao.br", - "rio.br", - "riobranco.br", - "riopreto.br", - "salvador.br", - "sampa.br", - "santamaria.br", - "santoandre.br", - "saobernardo.br", - "saogonca.br", - "seg.br", - "sjc.br", - "slg.br", - "slz.br", - "sorocaba.br", - "srv.br", - "taxi.br", - "tc.br", - "tec.br", - "teo.br", - "the.br", - "tmp.br", - "trd.br", - "tur.br", - "tv.br", - "udi.br", - "vet.br", - "vix.br", - "vlog.br", - "wiki.br", - "zlg.br", - "bs", - "com.bs", - "edu.bs", - "gov.bs", - "net.bs", - "org.bs", - "bt", - "com.bt", - "edu.bt", - "gov.bt", - "net.bt", - "org.bt", - "bv", - "bw", - "co.bw", - "org.bw", - "by", - "gov.by", - "mil.by", - "com.by", - "of.by", - "bz", - "co.bz", - "com.bz", - "edu.bz", - "gov.bz", - "net.bz", - "org.bz", - "ca", - "ab.ca", - "bc.ca", - "mb.ca", - "nb.ca", - "nf.ca", - "nl.ca", - "ns.ca", - "nt.ca", - "nu.ca", - "on.ca", - "pe.ca", - "qc.ca", - "sk.ca", - "yk.ca", - "gc.ca", - "cat", - "cc", - "cd", - "gov.cd", - "cf", - "cg", - "ch", - "ci", - "ac.ci", - "aéroport.ci", - "asso.ci", - "co.ci", - "com.ci", - "ed.ci", - "edu.ci", - "go.ci", - "gouv.ci", - "int.ci", - "net.ci", - "or.ci", - "org.ci", - "*.ck", - "!www.ck", - "cl", - "co.cl", - "gob.cl", - "gov.cl", - "mil.cl", - "cm", - "co.cm", - "com.cm", - "gov.cm", - "net.cm", - "cn", - "ac.cn", - "com.cn", - "edu.cn", - "gov.cn", - "mil.cn", - "net.cn", - "org.cn", - "公司.cn", - "網絡.cn", - "网络.cn", - "ah.cn", - "bj.cn", - "cq.cn", - "fj.cn", - "gd.cn", - "gs.cn", - "gx.cn", - "gz.cn", - "ha.cn", - "hb.cn", - "he.cn", - "hi.cn", - "hk.cn", - "hl.cn", - "hn.cn", - "jl.cn", - "js.cn", - "jx.cn", - "ln.cn", - "mo.cn", - "nm.cn", - "nx.cn", - "qh.cn", - "sc.cn", - "sd.cn", - "sh.cn", - "sn.cn", - "sx.cn", - "tj.cn", - "tw.cn", - "xj.cn", - "xz.cn", - "yn.cn", - "zj.cn", - "co", - "com.co", - "edu.co", - "gov.co", - "mil.co", - "net.co", - "nom.co", - "org.co", - "com", - "coop", - "cr", - "ac.cr", - "co.cr", - "ed.cr", - "fi.cr", - "go.cr", - "or.cr", - "sa.cr", - "cu", - "com.cu", - "edu.cu", - "gob.cu", - "inf.cu", - "nat.cu", - "net.cu", - "org.cu", - "cv", - "com.cv", - "edu.cv", - "id.cv", - "int.cv", - "net.cv", - "nome.cv", - "org.cv", - "publ.cv", - "cw", - "com.cw", - "edu.cw", - "net.cw", - "org.cw", - "cx", - "gov.cx", - "cy", - "ac.cy", - "biz.cy", - "com.cy", - "ekloges.cy", - "gov.cy", - "ltd.cy", - "mil.cy", - "net.cy", - "org.cy", - "press.cy", - "pro.cy", - "tm.cy", - "cz", - "de", - "dj", - "dk", - "dm", - "co.dm", - "com.dm", - "edu.dm", - "gov.dm", - "net.dm", - "org.dm", - "do", - "art.do", - "com.do", - "edu.do", - "gob.do", - "gov.do", - "mil.do", - "net.do", - "org.do", - "sld.do", - "web.do", - "dz", - "art.dz", - "asso.dz", - "com.dz", - "edu.dz", - "gov.dz", - "net.dz", - "org.dz", - "pol.dz", - "soc.dz", - "tm.dz", - "ec", - "com.ec", - "edu.ec", - "fin.ec", - "gob.ec", - "gov.ec", - "info.ec", - "k12.ec", - "med.ec", - "mil.ec", - "net.ec", - "org.ec", - "pro.ec", - "edu", - "ee", - "aip.ee", - "com.ee", - "edu.ee", - "fie.ee", - "gov.ee", - "lib.ee", - "med.ee", - "org.ee", - "pri.ee", - "riik.ee", - "eg", - "ac.eg", - "com.eg", - "edu.eg", - "eun.eg", - "gov.eg", - "info.eg", - "me.eg", - "mil.eg", - "name.eg", - "net.eg", - "org.eg", - "sci.eg", - "sport.eg", - "tv.eg", - "*.er", - "es", - "com.es", - "edu.es", - "gob.es", - "nom.es", - "org.es", - "et", - "biz.et", - "com.et", - "edu.et", - "gov.et", - "info.et", - "name.et", - "net.et", - "org.et", - "eu", - "fi", - "aland.fi", - "fj", - "ac.fj", - "biz.fj", - "com.fj", - "gov.fj", - "info.fj", - "mil.fj", - "name.fj", - "net.fj", - "org.fj", - "pro.fj", - "*.fk", - "fm", - "com.fm", - "edu.fm", - "net.fm", - "org.fm", - "fo", - "fr", - "asso.fr", - "com.fr", - "gouv.fr", - "nom.fr", - "prd.fr", - "tm.fr", - "avoues.fr", - "cci.fr", - "greta.fr", - "huissier-justice.fr", - "ga", - "gb", - "gd", - "edu.gd", - "gov.gd", - "ge", - "com.ge", - "edu.ge", - "gov.ge", - "net.ge", - "org.ge", - "pvt.ge", - "school.ge", - "gf", - "gg", - "co.gg", - "net.gg", - "org.gg", - "gh", - "com.gh", - "edu.gh", - "gov.gh", - "mil.gh", - "org.gh", - "gi", - "com.gi", - "edu.gi", - "gov.gi", - "ltd.gi", - "mod.gi", - "org.gi", - "gl", - "co.gl", - "com.gl", - "edu.gl", - "net.gl", - "org.gl", - "gm", - "gn", - "ac.gn", - "com.gn", - "edu.gn", - "gov.gn", - "net.gn", - "org.gn", - "gov", - "gp", - "asso.gp", - "com.gp", - "edu.gp", - "mobi.gp", - "net.gp", - "org.gp", - "gq", - "gr", - "com.gr", - "edu.gr", - "gov.gr", - "net.gr", - "org.gr", - "gs", - "gt", - "com.gt", - "edu.gt", - "gob.gt", - "ind.gt", - "mil.gt", - "net.gt", - "org.gt", - "gu", - "com.gu", - "edu.gu", - "gov.gu", - "guam.gu", - "info.gu", - "net.gu", - "org.gu", - "web.gu", - "gw", - "gy", - "co.gy", - "com.gy", - "edu.gy", - "gov.gy", - "net.gy", - "org.gy", - "hk", - "com.hk", - "edu.hk", - "gov.hk", - "idv.hk", - "net.hk", - "org.hk", - "个人.hk", - "個人.hk", - "公司.hk", - "政府.hk", - "敎育.hk", - "教育.hk", - "箇人.hk", - "組織.hk", - "組织.hk", - "網絡.hk", - "網络.hk", - "组織.hk", - "组织.hk", - "网絡.hk", - "网络.hk", - "hm", - "hn", - "com.hn", - "edu.hn", - "gob.hn", - "mil.hn", - "net.hn", - "org.hn", - "hr", - "com.hr", - "from.hr", - "iz.hr", - "name.hr", - "ht", - "adult.ht", - "art.ht", - "asso.ht", - "com.ht", - "coop.ht", - "edu.ht", - "firm.ht", - "gouv.ht", - "info.ht", - "med.ht", - "net.ht", - "org.ht", - "perso.ht", - "pol.ht", - "pro.ht", - "rel.ht", - "shop.ht", - "hu", - "2000.hu", - "agrar.hu", - "bolt.hu", - "casino.hu", - "city.hu", - "co.hu", - "erotica.hu", - "erotika.hu", - "film.hu", - "forum.hu", - "games.hu", - "hotel.hu", - "info.hu", - "ingatlan.hu", - "jogasz.hu", - "konyvelo.hu", - "lakas.hu", - "media.hu", - "news.hu", - "org.hu", - "priv.hu", - "reklam.hu", - "sex.hu", - "shop.hu", - "sport.hu", - "suli.hu", - "szex.hu", - "tm.hu", - "tozsde.hu", - "utazas.hu", - "video.hu", - "id", - "ac.id", - "biz.id", - "co.id", - "desa.id", - "go.id", - "mil.id", - "my.id", - "net.id", - "or.id", - "ponpes.id", - "sch.id", - "web.id", - "ie", - "gov.ie", - "il", - "ac.il", - "co.il", - "gov.il", - "idf.il", - "k12.il", - "muni.il", - "net.il", - "org.il", - "ישראל", - "אקדמיה.ישראל", - "ישוב.ישראל", - "צהל.ישראל", - "ממשל.ישראל", - "im", - "ac.im", - "co.im", - "ltd.co.im", - "plc.co.im", - "com.im", - "net.im", - "org.im", - "tt.im", - "tv.im", - "in", - "5g.in", - "6g.in", - "ac.in", - "ai.in", - "am.in", - "bihar.in", - "biz.in", - "business.in", - "ca.in", - "cn.in", - "co.in", - "com.in", - "coop.in", - "cs.in", - "delhi.in", - "dr.in", - "edu.in", - "er.in", - "firm.in", - "gen.in", - "gov.in", - "gujarat.in", - "ind.in", - "info.in", - "int.in", - "internet.in", - "io.in", - "me.in", - "mil.in", - "net.in", - "nic.in", - "org.in", - "pg.in", - "post.in", - "pro.in", - "res.in", - "travel.in", - "tv.in", - "uk.in", - "up.in", - "us.in", - "info", - "int", - "eu.int", - "io", - "co.io", - "com.io", - "edu.io", - "gov.io", - "mil.io", - "net.io", - "nom.io", - "org.io", - "iq", - "com.iq", - "edu.iq", - "gov.iq", - "mil.iq", - "net.iq", - "org.iq", - "ir", - "ac.ir", - "co.ir", - "gov.ir", - "id.ir", - "net.ir", - "org.ir", - "sch.ir", - "ایران.ir", - "ايران.ir", - "is", - "it", - "edu.it", - "gov.it", - "abr.it", - "abruzzo.it", - "aosta-valley.it", - "aostavalley.it", - "bas.it", - "basilicata.it", - "cal.it", - "calabria.it", - "cam.it", - "campania.it", - "emilia-romagna.it", - "emiliaromagna.it", - "emr.it", - "friuli-v-giulia.it", - "friuli-ve-giulia.it", - "friuli-vegiulia.it", - "friuli-venezia-giulia.it", - "friuli-veneziagiulia.it", - "friuli-vgiulia.it", - "friuliv-giulia.it", - "friulive-giulia.it", - "friulivegiulia.it", - "friulivenezia-giulia.it", - "friuliveneziagiulia.it", - "friulivgiulia.it", - "fvg.it", - "laz.it", - "lazio.it", - "lig.it", - "liguria.it", - "lom.it", - "lombardia.it", - "lombardy.it", - "lucania.it", - "mar.it", - "marche.it", - "mol.it", - "molise.it", - "piedmont.it", - "piemonte.it", - "pmn.it", - "pug.it", - "puglia.it", - "sar.it", - "sardegna.it", - "sardinia.it", - "sic.it", - "sicilia.it", - "sicily.it", - "taa.it", - "tos.it", - "toscana.it", - "trentin-sud-tirol.it", - "trentin-süd-tirol.it", - "trentin-sudtirol.it", - "trentin-südtirol.it", - "trentin-sued-tirol.it", - "trentin-suedtirol.it", - "trentino.it", - "trentino-a-adige.it", - "trentino-aadige.it", - "trentino-alto-adige.it", - "trentino-altoadige.it", - "trentino-s-tirol.it", - "trentino-stirol.it", - "trentino-sud-tirol.it", - "trentino-süd-tirol.it", - "trentino-sudtirol.it", - "trentino-südtirol.it", - "trentino-sued-tirol.it", - "trentino-suedtirol.it", - "trentinoa-adige.it", - "trentinoaadige.it", - "trentinoalto-adige.it", - "trentinoaltoadige.it", - "trentinos-tirol.it", - "trentinostirol.it", - "trentinosud-tirol.it", - "trentinosüd-tirol.it", - "trentinosudtirol.it", - "trentinosüdtirol.it", - "trentinosued-tirol.it", - "trentinosuedtirol.it", - "trentinsud-tirol.it", - "trentinsüd-tirol.it", - "trentinsudtirol.it", - "trentinsüdtirol.it", - "trentinsued-tirol.it", - "trentinsuedtirol.it", - "tuscany.it", - "umb.it", - "umbria.it", - "val-d-aosta.it", - "val-daosta.it", - "vald-aosta.it", - "valdaosta.it", - "valle-aosta.it", - "valle-d-aosta.it", - "valle-daosta.it", - "valleaosta.it", - "valled-aosta.it", - "valledaosta.it", - "vallee-aoste.it", - "vallée-aoste.it", - "vallee-d-aoste.it", - "vallée-d-aoste.it", - "valleeaoste.it", - "valléeaoste.it", - "valleedaoste.it", - "valléedaoste.it", - "vao.it", - "vda.it", - "ven.it", - "veneto.it", - "ag.it", - "agrigento.it", - "al.it", - "alessandria.it", - "alto-adige.it", - "altoadige.it", - "an.it", - "ancona.it", - "andria-barletta-trani.it", - "andria-trani-barletta.it", - "andriabarlettatrani.it", - "andriatranibarletta.it", - "ao.it", - "aosta.it", - "aoste.it", - "ap.it", - "aq.it", - "aquila.it", - "ar.it", - "arezzo.it", - "ascoli-piceno.it", - "ascolipiceno.it", - "asti.it", - "at.it", - "av.it", - "avellino.it", - "ba.it", - "balsan.it", - "balsan-sudtirol.it", - "balsan-südtirol.it", - "balsan-suedtirol.it", - "bari.it", - "barletta-trani-andria.it", - "barlettatraniandria.it", - "belluno.it", - "benevento.it", - "bergamo.it", - "bg.it", - "bi.it", - "biella.it", - "bl.it", - "bn.it", - "bo.it", - "bologna.it", - "bolzano.it", - "bolzano-altoadige.it", - "bozen.it", - "bozen-sudtirol.it", - "bozen-südtirol.it", - "bozen-suedtirol.it", - "br.it", - "brescia.it", - "brindisi.it", - "bs.it", - "bt.it", - "bulsan.it", - "bulsan-sudtirol.it", - "bulsan-südtirol.it", - "bulsan-suedtirol.it", - "bz.it", - "ca.it", - "cagliari.it", - "caltanissetta.it", - "campidano-medio.it", - "campidanomedio.it", - "campobasso.it", - "carbonia-iglesias.it", - "carboniaiglesias.it", - "carrara-massa.it", - "carraramassa.it", - "caserta.it", - "catania.it", - "catanzaro.it", - "cb.it", - "ce.it", - "cesena-forli.it", - "cesena-forlì.it", - "cesenaforli.it", - "cesenaforlì.it", - "ch.it", - "chieti.it", - "ci.it", - "cl.it", - "cn.it", - "co.it", - "como.it", - "cosenza.it", - "cr.it", - "cremona.it", - "crotone.it", - "cs.it", - "ct.it", - "cuneo.it", - "cz.it", - "dell-ogliastra.it", - "dellogliastra.it", - "en.it", - "enna.it", - "fc.it", - "fe.it", - "fermo.it", - "ferrara.it", - "fg.it", - "fi.it", - "firenze.it", - "florence.it", - "fm.it", - "foggia.it", - "forli-cesena.it", - "forlì-cesena.it", - "forlicesena.it", - "forlìcesena.it", - "fr.it", - "frosinone.it", - "ge.it", - "genoa.it", - "genova.it", - "go.it", - "gorizia.it", - "gr.it", - "grosseto.it", - "iglesias-carbonia.it", - "iglesiascarbonia.it", - "im.it", - "imperia.it", - "is.it", - "isernia.it", - "kr.it", - "la-spezia.it", - "laquila.it", - "laspezia.it", - "latina.it", - "lc.it", - "le.it", - "lecce.it", - "lecco.it", - "li.it", - "livorno.it", - "lo.it", - "lodi.it", - "lt.it", - "lu.it", - "lucca.it", - "macerata.it", - "mantova.it", - "massa-carrara.it", - "massacarrara.it", - "matera.it", - "mb.it", - "mc.it", - "me.it", - "medio-campidano.it", - "mediocampidano.it", - "messina.it", - "mi.it", - "milan.it", - "milano.it", - "mn.it", - "mo.it", - "modena.it", - "monza.it", - "monza-brianza.it", - "monza-e-della-brianza.it", - "monzabrianza.it", - "monzaebrianza.it", - "monzaedellabrianza.it", - "ms.it", - "mt.it", - "na.it", - "naples.it", - "napoli.it", - "no.it", - "novara.it", - "nu.it", - "nuoro.it", - "og.it", - "ogliastra.it", - "olbia-tempio.it", - "olbiatempio.it", - "or.it", - "oristano.it", - "ot.it", - "pa.it", - "padova.it", - "padua.it", - "palermo.it", - "parma.it", - "pavia.it", - "pc.it", - "pd.it", - "pe.it", - "perugia.it", - "pesaro-urbino.it", - "pesarourbino.it", - "pescara.it", - "pg.it", - "pi.it", - "piacenza.it", - "pisa.it", - "pistoia.it", - "pn.it", - "po.it", - "pordenone.it", - "potenza.it", - "pr.it", - "prato.it", - "pt.it", - "pu.it", - "pv.it", - "pz.it", - "ra.it", - "ragusa.it", - "ravenna.it", - "rc.it", - "re.it", - "reggio-calabria.it", - "reggio-emilia.it", - "reggiocalabria.it", - "reggioemilia.it", - "rg.it", - "ri.it", - "rieti.it", - "rimini.it", - "rm.it", - "rn.it", - "ro.it", - "roma.it", - "rome.it", - "rovigo.it", - "sa.it", - "salerno.it", - "sassari.it", - "savona.it", - "si.it", - "siena.it", - "siracusa.it", - "so.it", - "sondrio.it", - "sp.it", - "sr.it", - "ss.it", - "südtirol.it", - "suedtirol.it", - "sv.it", - "ta.it", - "taranto.it", - "te.it", - "tempio-olbia.it", - "tempioolbia.it", - "teramo.it", - "terni.it", - "tn.it", - "to.it", - "torino.it", - "tp.it", - "tr.it", - "trani-andria-barletta.it", - "trani-barletta-andria.it", - "traniandriabarletta.it", - "tranibarlettaandria.it", - "trapani.it", - "trento.it", - "treviso.it", - "trieste.it", - "ts.it", - "turin.it", - "tv.it", - "ud.it", - "udine.it", - "urbino-pesaro.it", - "urbinopesaro.it", - "va.it", - "varese.it", - "vb.it", - "vc.it", - "ve.it", - "venezia.it", - "venice.it", - "verbania.it", - "vercelli.it", - "verona.it", - "vi.it", - "vibo-valentia.it", - "vibovalentia.it", - "vicenza.it", - "viterbo.it", - "vr.it", - "vs.it", - "vt.it", - "vv.it", - "je", - "co.je", - "net.je", - "org.je", - "*.jm", - "jo", - "agri.jo", - "ai.jo", - "com.jo", - "edu.jo", - "eng.jo", - "fm.jo", - "gov.jo", - "mil.jo", - "net.jo", - "org.jo", - "per.jo", - "phd.jo", - "sch.jo", - "tv.jo", - "jobs", - "jp", - "ac.jp", - "ad.jp", - "co.jp", - "ed.jp", - "go.jp", - "gr.jp", - "lg.jp", - "ne.jp", - "or.jp", - "aichi.jp", - "akita.jp", - "aomori.jp", - "chiba.jp", - "ehime.jp", - "fukui.jp", - "fukuoka.jp", - "fukushima.jp", - "gifu.jp", - "gunma.jp", - "hiroshima.jp", - "hokkaido.jp", - "hyogo.jp", - "ibaraki.jp", - "ishikawa.jp", - "iwate.jp", - "kagawa.jp", - "kagoshima.jp", - "kanagawa.jp", - "kochi.jp", - "kumamoto.jp", - "kyoto.jp", - "mie.jp", - "miyagi.jp", - "miyazaki.jp", - "nagano.jp", - "nagasaki.jp", - "nara.jp", - "niigata.jp", - "oita.jp", - "okayama.jp", - "okinawa.jp", - "osaka.jp", - "saga.jp", - "saitama.jp", - "shiga.jp", - "shimane.jp", - "shizuoka.jp", - "tochigi.jp", - "tokushima.jp", - "tokyo.jp", - "tottori.jp", - "toyama.jp", - "wakayama.jp", - "yamagata.jp", - "yamaguchi.jp", - "yamanashi.jp", - "三重.jp", - "京都.jp", - "佐賀.jp", - "兵庫.jp", - "北海道.jp", - "千葉.jp", - "和歌山.jp", - "埼玉.jp", - "大分.jp", - "大阪.jp", - "奈良.jp", - "宮城.jp", - "宮崎.jp", - "富山.jp", - "山口.jp", - "山形.jp", - "山梨.jp", - "岐阜.jp", - "岡山.jp", - "岩手.jp", - "島根.jp", - "広島.jp", - "徳島.jp", - "愛媛.jp", - "愛知.jp", - "新潟.jp", - "東京.jp", - "栃木.jp", - "沖縄.jp", - "滋賀.jp", - "熊本.jp", - "石川.jp", - "神奈川.jp", - "福井.jp", - "福岡.jp", - "福島.jp", - "秋田.jp", - "群馬.jp", - "茨城.jp", - "長崎.jp", - "長野.jp", - "青森.jp", - "静岡.jp", - "香川.jp", - "高知.jp", - "鳥取.jp", - "鹿児島.jp", - "*.kawasaki.jp", - "!city.kawasaki.jp", - "*.kitakyushu.jp", - "!city.kitakyushu.jp", - "*.kobe.jp", - "!city.kobe.jp", - "*.nagoya.jp", - "!city.nagoya.jp", - "*.sapporo.jp", - "!city.sapporo.jp", - "*.sendai.jp", - "!city.sendai.jp", - "*.yokohama.jp", - "!city.yokohama.jp", - "aisai.aichi.jp", - "ama.aichi.jp", - "anjo.aichi.jp", - "asuke.aichi.jp", - "chiryu.aichi.jp", - "chita.aichi.jp", - "fuso.aichi.jp", - "gamagori.aichi.jp", - "handa.aichi.jp", - "hazu.aichi.jp", - "hekinan.aichi.jp", - "higashiura.aichi.jp", - "ichinomiya.aichi.jp", - "inazawa.aichi.jp", - "inuyama.aichi.jp", - "isshiki.aichi.jp", - "iwakura.aichi.jp", - "kanie.aichi.jp", - "kariya.aichi.jp", - "kasugai.aichi.jp", - "kira.aichi.jp", - "kiyosu.aichi.jp", - "komaki.aichi.jp", - "konan.aichi.jp", - "kota.aichi.jp", - "mihama.aichi.jp", - "miyoshi.aichi.jp", - "nishio.aichi.jp", - "nisshin.aichi.jp", - "obu.aichi.jp", - "oguchi.aichi.jp", - "oharu.aichi.jp", - "okazaki.aichi.jp", - "owariasahi.aichi.jp", - "seto.aichi.jp", - "shikatsu.aichi.jp", - "shinshiro.aichi.jp", - "shitara.aichi.jp", - "tahara.aichi.jp", - "takahama.aichi.jp", - "tobishima.aichi.jp", - "toei.aichi.jp", - "togo.aichi.jp", - "tokai.aichi.jp", - "tokoname.aichi.jp", - "toyoake.aichi.jp", - "toyohashi.aichi.jp", - "toyokawa.aichi.jp", - "toyone.aichi.jp", - "toyota.aichi.jp", - "tsushima.aichi.jp", - "yatomi.aichi.jp", - "akita.akita.jp", - "daisen.akita.jp", - "fujisato.akita.jp", - "gojome.akita.jp", - "hachirogata.akita.jp", - "happou.akita.jp", - "higashinaruse.akita.jp", - "honjo.akita.jp", - "honjyo.akita.jp", - "ikawa.akita.jp", - "kamikoani.akita.jp", - "kamioka.akita.jp", - "katagami.akita.jp", - "kazuno.akita.jp", - "kitaakita.akita.jp", - "kosaka.akita.jp", - "kyowa.akita.jp", - "misato.akita.jp", - "mitane.akita.jp", - "moriyoshi.akita.jp", - "nikaho.akita.jp", - "noshiro.akita.jp", - "odate.akita.jp", - "oga.akita.jp", - "ogata.akita.jp", - "semboku.akita.jp", - "yokote.akita.jp", - "yurihonjo.akita.jp", - "aomori.aomori.jp", - "gonohe.aomori.jp", - "hachinohe.aomori.jp", - "hashikami.aomori.jp", - "hiranai.aomori.jp", - "hirosaki.aomori.jp", - "itayanagi.aomori.jp", - "kuroishi.aomori.jp", - "misawa.aomori.jp", - "mutsu.aomori.jp", - "nakadomari.aomori.jp", - "noheji.aomori.jp", - "oirase.aomori.jp", - "owani.aomori.jp", - "rokunohe.aomori.jp", - "sannohe.aomori.jp", - "shichinohe.aomori.jp", - "shingo.aomori.jp", - "takko.aomori.jp", - "towada.aomori.jp", - "tsugaru.aomori.jp", - "tsuruta.aomori.jp", - "abiko.chiba.jp", - "asahi.chiba.jp", - "chonan.chiba.jp", - "chosei.chiba.jp", - "choshi.chiba.jp", - "chuo.chiba.jp", - "funabashi.chiba.jp", - "futtsu.chiba.jp", - "hanamigawa.chiba.jp", - "ichihara.chiba.jp", - "ichikawa.chiba.jp", - "ichinomiya.chiba.jp", - "inzai.chiba.jp", - "isumi.chiba.jp", - "kamagaya.chiba.jp", - "kamogawa.chiba.jp", - "kashiwa.chiba.jp", - "katori.chiba.jp", - "katsuura.chiba.jp", - "kimitsu.chiba.jp", - "kisarazu.chiba.jp", - "kozaki.chiba.jp", - "kujukuri.chiba.jp", - "kyonan.chiba.jp", - "matsudo.chiba.jp", - "midori.chiba.jp", - "mihama.chiba.jp", - "minamiboso.chiba.jp", - "mobara.chiba.jp", - "mutsuzawa.chiba.jp", - "nagara.chiba.jp", - "nagareyama.chiba.jp", - "narashino.chiba.jp", - "narita.chiba.jp", - "noda.chiba.jp", - "oamishirasato.chiba.jp", - "omigawa.chiba.jp", - "onjuku.chiba.jp", - "otaki.chiba.jp", - "sakae.chiba.jp", - "sakura.chiba.jp", - "shimofusa.chiba.jp", - "shirako.chiba.jp", - "shiroi.chiba.jp", - "shisui.chiba.jp", - "sodegaura.chiba.jp", - "sosa.chiba.jp", - "tako.chiba.jp", - "tateyama.chiba.jp", - "togane.chiba.jp", - "tohnosho.chiba.jp", - "tomisato.chiba.jp", - "urayasu.chiba.jp", - "yachimata.chiba.jp", - "yachiyo.chiba.jp", - "yokaichiba.chiba.jp", - "yokoshibahikari.chiba.jp", - "yotsukaido.chiba.jp", - "ainan.ehime.jp", - "honai.ehime.jp", - "ikata.ehime.jp", - "imabari.ehime.jp", - "iyo.ehime.jp", - "kamijima.ehime.jp", - "kihoku.ehime.jp", - "kumakogen.ehime.jp", - "masaki.ehime.jp", - "matsuno.ehime.jp", - "matsuyama.ehime.jp", - "namikata.ehime.jp", - "niihama.ehime.jp", - "ozu.ehime.jp", - "saijo.ehime.jp", - "seiyo.ehime.jp", - "shikokuchuo.ehime.jp", - "tobe.ehime.jp", - "toon.ehime.jp", - "uchiko.ehime.jp", - "uwajima.ehime.jp", - "yawatahama.ehime.jp", - "echizen.fukui.jp", - "eiheiji.fukui.jp", - "fukui.fukui.jp", - "ikeda.fukui.jp", - "katsuyama.fukui.jp", - "mihama.fukui.jp", - "minamiechizen.fukui.jp", - "obama.fukui.jp", - "ohi.fukui.jp", - "ono.fukui.jp", - "sabae.fukui.jp", - "sakai.fukui.jp", - "takahama.fukui.jp", - "tsuruga.fukui.jp", - "wakasa.fukui.jp", - "ashiya.fukuoka.jp", - "buzen.fukuoka.jp", - "chikugo.fukuoka.jp", - "chikuho.fukuoka.jp", - "chikujo.fukuoka.jp", - "chikushino.fukuoka.jp", - "chikuzen.fukuoka.jp", - "chuo.fukuoka.jp", - "dazaifu.fukuoka.jp", - "fukuchi.fukuoka.jp", - "hakata.fukuoka.jp", - "higashi.fukuoka.jp", - "hirokawa.fukuoka.jp", - "hisayama.fukuoka.jp", - "iizuka.fukuoka.jp", - "inatsuki.fukuoka.jp", - "kaho.fukuoka.jp", - "kasuga.fukuoka.jp", - "kasuya.fukuoka.jp", - "kawara.fukuoka.jp", - "keisen.fukuoka.jp", - "koga.fukuoka.jp", - "kurate.fukuoka.jp", - "kurogi.fukuoka.jp", - "kurume.fukuoka.jp", - "minami.fukuoka.jp", - "miyako.fukuoka.jp", - "miyama.fukuoka.jp", - "miyawaka.fukuoka.jp", - "mizumaki.fukuoka.jp", - "munakata.fukuoka.jp", - "nakagawa.fukuoka.jp", - "nakama.fukuoka.jp", - "nishi.fukuoka.jp", - "nogata.fukuoka.jp", - "ogori.fukuoka.jp", - "okagaki.fukuoka.jp", - "okawa.fukuoka.jp", - "oki.fukuoka.jp", - "omuta.fukuoka.jp", - "onga.fukuoka.jp", - "onojo.fukuoka.jp", - "oto.fukuoka.jp", - "saigawa.fukuoka.jp", - "sasaguri.fukuoka.jp", - "shingu.fukuoka.jp", - "shinyoshitomi.fukuoka.jp", - "shonai.fukuoka.jp", - "soeda.fukuoka.jp", - "sue.fukuoka.jp", - "tachiarai.fukuoka.jp", - "tagawa.fukuoka.jp", - "takata.fukuoka.jp", - "toho.fukuoka.jp", - "toyotsu.fukuoka.jp", - "tsuiki.fukuoka.jp", - "ukiha.fukuoka.jp", - "umi.fukuoka.jp", - "usui.fukuoka.jp", - "yamada.fukuoka.jp", - "yame.fukuoka.jp", - "yanagawa.fukuoka.jp", - "yukuhashi.fukuoka.jp", - "aizubange.fukushima.jp", - "aizumisato.fukushima.jp", - "aizuwakamatsu.fukushima.jp", - "asakawa.fukushima.jp", - "bandai.fukushima.jp", - "date.fukushima.jp", - "fukushima.fukushima.jp", - "furudono.fukushima.jp", - "futaba.fukushima.jp", - "hanawa.fukushima.jp", - "higashi.fukushima.jp", - "hirata.fukushima.jp", - "hirono.fukushima.jp", - "iitate.fukushima.jp", - "inawashiro.fukushima.jp", - "ishikawa.fukushima.jp", - "iwaki.fukushima.jp", - "izumizaki.fukushima.jp", - "kagamiishi.fukushima.jp", - "kaneyama.fukushima.jp", - "kawamata.fukushima.jp", - "kitakata.fukushima.jp", - "kitashiobara.fukushima.jp", - "koori.fukushima.jp", - "koriyama.fukushima.jp", - "kunimi.fukushima.jp", - "miharu.fukushima.jp", - "mishima.fukushima.jp", - "namie.fukushima.jp", - "nango.fukushima.jp", - "nishiaizu.fukushima.jp", - "nishigo.fukushima.jp", - "okuma.fukushima.jp", - "omotego.fukushima.jp", - "ono.fukushima.jp", - "otama.fukushima.jp", - "samegawa.fukushima.jp", - "shimogo.fukushima.jp", - "shirakawa.fukushima.jp", - "showa.fukushima.jp", - "soma.fukushima.jp", - "sukagawa.fukushima.jp", - "taishin.fukushima.jp", - "tamakawa.fukushima.jp", - "tanagura.fukushima.jp", - "tenei.fukushima.jp", - "yabuki.fukushima.jp", - "yamato.fukushima.jp", - "yamatsuri.fukushima.jp", - "yanaizu.fukushima.jp", - "yugawa.fukushima.jp", - "anpachi.gifu.jp", - "ena.gifu.jp", - "gifu.gifu.jp", - "ginan.gifu.jp", - "godo.gifu.jp", - "gujo.gifu.jp", - "hashima.gifu.jp", - "hichiso.gifu.jp", - "hida.gifu.jp", - "higashishirakawa.gifu.jp", - "ibigawa.gifu.jp", - "ikeda.gifu.jp", - "kakamigahara.gifu.jp", - "kani.gifu.jp", - "kasahara.gifu.jp", - "kasamatsu.gifu.jp", - "kawaue.gifu.jp", - "kitagata.gifu.jp", - "mino.gifu.jp", - "minokamo.gifu.jp", - "mitake.gifu.jp", - "mizunami.gifu.jp", - "motosu.gifu.jp", - "nakatsugawa.gifu.jp", - "ogaki.gifu.jp", - "sakahogi.gifu.jp", - "seki.gifu.jp", - "sekigahara.gifu.jp", - "shirakawa.gifu.jp", - "tajimi.gifu.jp", - "takayama.gifu.jp", - "tarui.gifu.jp", - "toki.gifu.jp", - "tomika.gifu.jp", - "wanouchi.gifu.jp", - "yamagata.gifu.jp", - "yaotsu.gifu.jp", - "yoro.gifu.jp", - "annaka.gunma.jp", - "chiyoda.gunma.jp", - "fujioka.gunma.jp", - "higashiagatsuma.gunma.jp", - "isesaki.gunma.jp", - "itakura.gunma.jp", - "kanna.gunma.jp", - "kanra.gunma.jp", - "katashina.gunma.jp", - "kawaba.gunma.jp", - "kiryu.gunma.jp", - "kusatsu.gunma.jp", - "maebashi.gunma.jp", - "meiwa.gunma.jp", - "midori.gunma.jp", - "minakami.gunma.jp", - "naganohara.gunma.jp", - "nakanojo.gunma.jp", - "nanmoku.gunma.jp", - "numata.gunma.jp", - "oizumi.gunma.jp", - "ora.gunma.jp", - "ota.gunma.jp", - "shibukawa.gunma.jp", - "shimonita.gunma.jp", - "shinto.gunma.jp", - "showa.gunma.jp", - "takasaki.gunma.jp", - "takayama.gunma.jp", - "tamamura.gunma.jp", - "tatebayashi.gunma.jp", - "tomioka.gunma.jp", - "tsukiyono.gunma.jp", - "tsumagoi.gunma.jp", - "ueno.gunma.jp", - "yoshioka.gunma.jp", - "asaminami.hiroshima.jp", - "daiwa.hiroshima.jp", - "etajima.hiroshima.jp", - "fuchu.hiroshima.jp", - "fukuyama.hiroshima.jp", - "hatsukaichi.hiroshima.jp", - "higashihiroshima.hiroshima.jp", - "hongo.hiroshima.jp", - "jinsekikogen.hiroshima.jp", - "kaita.hiroshima.jp", - "kui.hiroshima.jp", - "kumano.hiroshima.jp", - "kure.hiroshima.jp", - "mihara.hiroshima.jp", - "miyoshi.hiroshima.jp", - "naka.hiroshima.jp", - "onomichi.hiroshima.jp", - "osakikamijima.hiroshima.jp", - "otake.hiroshima.jp", - "saka.hiroshima.jp", - "sera.hiroshima.jp", - "seranishi.hiroshima.jp", - "shinichi.hiroshima.jp", - "shobara.hiroshima.jp", - "takehara.hiroshima.jp", - "abashiri.hokkaido.jp", - "abira.hokkaido.jp", - "aibetsu.hokkaido.jp", - "akabira.hokkaido.jp", - "akkeshi.hokkaido.jp", - "asahikawa.hokkaido.jp", - "ashibetsu.hokkaido.jp", - "ashoro.hokkaido.jp", - "assabu.hokkaido.jp", - "atsuma.hokkaido.jp", - "bibai.hokkaido.jp", - "biei.hokkaido.jp", - "bifuka.hokkaido.jp", - "bihoro.hokkaido.jp", - "biratori.hokkaido.jp", - "chippubetsu.hokkaido.jp", - "chitose.hokkaido.jp", - "date.hokkaido.jp", - "ebetsu.hokkaido.jp", - "embetsu.hokkaido.jp", - "eniwa.hokkaido.jp", - "erimo.hokkaido.jp", - "esan.hokkaido.jp", - "esashi.hokkaido.jp", - "fukagawa.hokkaido.jp", - "fukushima.hokkaido.jp", - "furano.hokkaido.jp", - "furubira.hokkaido.jp", - "haboro.hokkaido.jp", - "hakodate.hokkaido.jp", - "hamatonbetsu.hokkaido.jp", - "hidaka.hokkaido.jp", - "higashikagura.hokkaido.jp", - "higashikawa.hokkaido.jp", - "hiroo.hokkaido.jp", - "hokuryu.hokkaido.jp", - "hokuto.hokkaido.jp", - "honbetsu.hokkaido.jp", - "horokanai.hokkaido.jp", - "horonobe.hokkaido.jp", - "ikeda.hokkaido.jp", - "imakane.hokkaido.jp", - "ishikari.hokkaido.jp", - "iwamizawa.hokkaido.jp", - "iwanai.hokkaido.jp", - "kamifurano.hokkaido.jp", - "kamikawa.hokkaido.jp", - "kamishihoro.hokkaido.jp", - "kamisunagawa.hokkaido.jp", - "kamoenai.hokkaido.jp", - "kayabe.hokkaido.jp", - "kembuchi.hokkaido.jp", - "kikonai.hokkaido.jp", - "kimobetsu.hokkaido.jp", - "kitahiroshima.hokkaido.jp", - "kitami.hokkaido.jp", - "kiyosato.hokkaido.jp", - "koshimizu.hokkaido.jp", - "kunneppu.hokkaido.jp", - "kuriyama.hokkaido.jp", - "kuromatsunai.hokkaido.jp", - "kushiro.hokkaido.jp", - "kutchan.hokkaido.jp", - "kyowa.hokkaido.jp", - "mashike.hokkaido.jp", - "matsumae.hokkaido.jp", - "mikasa.hokkaido.jp", - "minamifurano.hokkaido.jp", - "mombetsu.hokkaido.jp", - "moseushi.hokkaido.jp", - "mukawa.hokkaido.jp", - "muroran.hokkaido.jp", - "naie.hokkaido.jp", - "nakagawa.hokkaido.jp", - "nakasatsunai.hokkaido.jp", - "nakatombetsu.hokkaido.jp", - "nanae.hokkaido.jp", - "nanporo.hokkaido.jp", - "nayoro.hokkaido.jp", - "nemuro.hokkaido.jp", - "niikappu.hokkaido.jp", - "niki.hokkaido.jp", - "nishiokoppe.hokkaido.jp", - "noboribetsu.hokkaido.jp", - "numata.hokkaido.jp", - "obihiro.hokkaido.jp", - "obira.hokkaido.jp", - "oketo.hokkaido.jp", - "okoppe.hokkaido.jp", - "otaru.hokkaido.jp", - "otobe.hokkaido.jp", - "otofuke.hokkaido.jp", - "otoineppu.hokkaido.jp", - "oumu.hokkaido.jp", - "ozora.hokkaido.jp", - "pippu.hokkaido.jp", - "rankoshi.hokkaido.jp", - "rebun.hokkaido.jp", - "rikubetsu.hokkaido.jp", - "rishiri.hokkaido.jp", - "rishirifuji.hokkaido.jp", - "saroma.hokkaido.jp", - "sarufutsu.hokkaido.jp", - "shakotan.hokkaido.jp", - "shari.hokkaido.jp", - "shibecha.hokkaido.jp", - "shibetsu.hokkaido.jp", - "shikabe.hokkaido.jp", - "shikaoi.hokkaido.jp", - "shimamaki.hokkaido.jp", - "shimizu.hokkaido.jp", - "shimokawa.hokkaido.jp", - "shinshinotsu.hokkaido.jp", - "shintoku.hokkaido.jp", - "shiranuka.hokkaido.jp", - "shiraoi.hokkaido.jp", - "shiriuchi.hokkaido.jp", - "sobetsu.hokkaido.jp", - "sunagawa.hokkaido.jp", - "taiki.hokkaido.jp", - "takasu.hokkaido.jp", - "takikawa.hokkaido.jp", - "takinoue.hokkaido.jp", - "teshikaga.hokkaido.jp", - "tobetsu.hokkaido.jp", - "tohma.hokkaido.jp", - "tomakomai.hokkaido.jp", - "tomari.hokkaido.jp", - "toya.hokkaido.jp", - "toyako.hokkaido.jp", - "toyotomi.hokkaido.jp", - "toyoura.hokkaido.jp", - "tsubetsu.hokkaido.jp", - "tsukigata.hokkaido.jp", - "urakawa.hokkaido.jp", - "urausu.hokkaido.jp", - "uryu.hokkaido.jp", - "utashinai.hokkaido.jp", - "wakkanai.hokkaido.jp", - "wassamu.hokkaido.jp", - "yakumo.hokkaido.jp", - "yoichi.hokkaido.jp", - "aioi.hyogo.jp", - "akashi.hyogo.jp", - "ako.hyogo.jp", - "amagasaki.hyogo.jp", - "aogaki.hyogo.jp", - "asago.hyogo.jp", - "ashiya.hyogo.jp", - "awaji.hyogo.jp", - "fukusaki.hyogo.jp", - "goshiki.hyogo.jp", - "harima.hyogo.jp", - "himeji.hyogo.jp", - "ichikawa.hyogo.jp", - "inagawa.hyogo.jp", - "itami.hyogo.jp", - "kakogawa.hyogo.jp", - "kamigori.hyogo.jp", - "kamikawa.hyogo.jp", - "kasai.hyogo.jp", - "kasuga.hyogo.jp", - "kawanishi.hyogo.jp", - "miki.hyogo.jp", - "minamiawaji.hyogo.jp", - "nishinomiya.hyogo.jp", - "nishiwaki.hyogo.jp", - "ono.hyogo.jp", - "sanda.hyogo.jp", - "sannan.hyogo.jp", - "sasayama.hyogo.jp", - "sayo.hyogo.jp", - "shingu.hyogo.jp", - "shinonsen.hyogo.jp", - "shiso.hyogo.jp", - "sumoto.hyogo.jp", - "taishi.hyogo.jp", - "taka.hyogo.jp", - "takarazuka.hyogo.jp", - "takasago.hyogo.jp", - "takino.hyogo.jp", - "tamba.hyogo.jp", - "tatsuno.hyogo.jp", - "toyooka.hyogo.jp", - "yabu.hyogo.jp", - "yashiro.hyogo.jp", - "yoka.hyogo.jp", - "yokawa.hyogo.jp", - "ami.ibaraki.jp", - "asahi.ibaraki.jp", - "bando.ibaraki.jp", - "chikusei.ibaraki.jp", - "daigo.ibaraki.jp", - "fujishiro.ibaraki.jp", - "hitachi.ibaraki.jp", - "hitachinaka.ibaraki.jp", - "hitachiomiya.ibaraki.jp", - "hitachiota.ibaraki.jp", - "ibaraki.ibaraki.jp", - "ina.ibaraki.jp", - "inashiki.ibaraki.jp", - "itako.ibaraki.jp", - "iwama.ibaraki.jp", - "joso.ibaraki.jp", - "kamisu.ibaraki.jp", - "kasama.ibaraki.jp", - "kashima.ibaraki.jp", - "kasumigaura.ibaraki.jp", - "koga.ibaraki.jp", - "miho.ibaraki.jp", - "mito.ibaraki.jp", - "moriya.ibaraki.jp", - "naka.ibaraki.jp", - "namegata.ibaraki.jp", - "oarai.ibaraki.jp", - "ogawa.ibaraki.jp", - "omitama.ibaraki.jp", - "ryugasaki.ibaraki.jp", - "sakai.ibaraki.jp", - "sakuragawa.ibaraki.jp", - "shimodate.ibaraki.jp", - "shimotsuma.ibaraki.jp", - "shirosato.ibaraki.jp", - "sowa.ibaraki.jp", - "suifu.ibaraki.jp", - "takahagi.ibaraki.jp", - "tamatsukuri.ibaraki.jp", - "tokai.ibaraki.jp", - "tomobe.ibaraki.jp", - "tone.ibaraki.jp", - "toride.ibaraki.jp", - "tsuchiura.ibaraki.jp", - "tsukuba.ibaraki.jp", - "uchihara.ibaraki.jp", - "ushiku.ibaraki.jp", - "yachiyo.ibaraki.jp", - "yamagata.ibaraki.jp", - "yawara.ibaraki.jp", - "yuki.ibaraki.jp", - "anamizu.ishikawa.jp", - "hakui.ishikawa.jp", - "hakusan.ishikawa.jp", - "kaga.ishikawa.jp", - "kahoku.ishikawa.jp", - "kanazawa.ishikawa.jp", - "kawakita.ishikawa.jp", - "komatsu.ishikawa.jp", - "nakanoto.ishikawa.jp", - "nanao.ishikawa.jp", - "nomi.ishikawa.jp", - "nonoichi.ishikawa.jp", - "noto.ishikawa.jp", - "shika.ishikawa.jp", - "suzu.ishikawa.jp", - "tsubata.ishikawa.jp", - "tsurugi.ishikawa.jp", - "uchinada.ishikawa.jp", - "wajima.ishikawa.jp", - "fudai.iwate.jp", - "fujisawa.iwate.jp", - "hanamaki.iwate.jp", - "hiraizumi.iwate.jp", - "hirono.iwate.jp", - "ichinohe.iwate.jp", - "ichinoseki.iwate.jp", - "iwaizumi.iwate.jp", - "iwate.iwate.jp", - "joboji.iwate.jp", - "kamaishi.iwate.jp", - "kanegasaki.iwate.jp", - "karumai.iwate.jp", - "kawai.iwate.jp", - "kitakami.iwate.jp", - "kuji.iwate.jp", - "kunohe.iwate.jp", - "kuzumaki.iwate.jp", - "miyako.iwate.jp", - "mizusawa.iwate.jp", - "morioka.iwate.jp", - "ninohe.iwate.jp", - "noda.iwate.jp", - "ofunato.iwate.jp", - "oshu.iwate.jp", - "otsuchi.iwate.jp", - "rikuzentakata.iwate.jp", - "shiwa.iwate.jp", - "shizukuishi.iwate.jp", - "sumita.iwate.jp", - "tanohata.iwate.jp", - "tono.iwate.jp", - "yahaba.iwate.jp", - "yamada.iwate.jp", - "ayagawa.kagawa.jp", - "higashikagawa.kagawa.jp", - "kanonji.kagawa.jp", - "kotohira.kagawa.jp", - "manno.kagawa.jp", - "marugame.kagawa.jp", - "mitoyo.kagawa.jp", - "naoshima.kagawa.jp", - "sanuki.kagawa.jp", - "tadotsu.kagawa.jp", - "takamatsu.kagawa.jp", - "tonosho.kagawa.jp", - "uchinomi.kagawa.jp", - "utazu.kagawa.jp", - "zentsuji.kagawa.jp", - "akune.kagoshima.jp", - "amami.kagoshima.jp", - "hioki.kagoshima.jp", - "isa.kagoshima.jp", - "isen.kagoshima.jp", - "izumi.kagoshima.jp", - "kagoshima.kagoshima.jp", - "kanoya.kagoshima.jp", - "kawanabe.kagoshima.jp", - "kinko.kagoshima.jp", - "kouyama.kagoshima.jp", - "makurazaki.kagoshima.jp", - "matsumoto.kagoshima.jp", - "minamitane.kagoshima.jp", - "nakatane.kagoshima.jp", - "nishinoomote.kagoshima.jp", - "satsumasendai.kagoshima.jp", - "soo.kagoshima.jp", - "tarumizu.kagoshima.jp", - "yusui.kagoshima.jp", - "aikawa.kanagawa.jp", - "atsugi.kanagawa.jp", - "ayase.kanagawa.jp", - "chigasaki.kanagawa.jp", - "ebina.kanagawa.jp", - "fujisawa.kanagawa.jp", - "hadano.kanagawa.jp", - "hakone.kanagawa.jp", - "hiratsuka.kanagawa.jp", - "isehara.kanagawa.jp", - "kaisei.kanagawa.jp", - "kamakura.kanagawa.jp", - "kiyokawa.kanagawa.jp", - "matsuda.kanagawa.jp", - "minamiashigara.kanagawa.jp", - "miura.kanagawa.jp", - "nakai.kanagawa.jp", - "ninomiya.kanagawa.jp", - "odawara.kanagawa.jp", - "oi.kanagawa.jp", - "oiso.kanagawa.jp", - "sagamihara.kanagawa.jp", - "samukawa.kanagawa.jp", - "tsukui.kanagawa.jp", - "yamakita.kanagawa.jp", - "yamato.kanagawa.jp", - "yokosuka.kanagawa.jp", - "yugawara.kanagawa.jp", - "zama.kanagawa.jp", - "zushi.kanagawa.jp", - "aki.kochi.jp", - "geisei.kochi.jp", - "hidaka.kochi.jp", - "higashitsuno.kochi.jp", - "ino.kochi.jp", - "kagami.kochi.jp", - "kami.kochi.jp", - "kitagawa.kochi.jp", - "kochi.kochi.jp", - "mihara.kochi.jp", - "motoyama.kochi.jp", - "muroto.kochi.jp", - "nahari.kochi.jp", - "nakamura.kochi.jp", - "nankoku.kochi.jp", - "nishitosa.kochi.jp", - "niyodogawa.kochi.jp", - "ochi.kochi.jp", - "okawa.kochi.jp", - "otoyo.kochi.jp", - "otsuki.kochi.jp", - "sakawa.kochi.jp", - "sukumo.kochi.jp", - "susaki.kochi.jp", - "tosa.kochi.jp", - "tosashimizu.kochi.jp", - "toyo.kochi.jp", - "tsuno.kochi.jp", - "umaji.kochi.jp", - "yasuda.kochi.jp", - "yusuhara.kochi.jp", - "amakusa.kumamoto.jp", - "arao.kumamoto.jp", - "aso.kumamoto.jp", - "choyo.kumamoto.jp", - "gyokuto.kumamoto.jp", - "kamiamakusa.kumamoto.jp", - "kikuchi.kumamoto.jp", - "kumamoto.kumamoto.jp", - "mashiki.kumamoto.jp", - "mifune.kumamoto.jp", - "minamata.kumamoto.jp", - "minamioguni.kumamoto.jp", - "nagasu.kumamoto.jp", - "nishihara.kumamoto.jp", - "oguni.kumamoto.jp", - "ozu.kumamoto.jp", - "sumoto.kumamoto.jp", - "takamori.kumamoto.jp", - "uki.kumamoto.jp", - "uto.kumamoto.jp", - "yamaga.kumamoto.jp", - "yamato.kumamoto.jp", - "yatsushiro.kumamoto.jp", - "ayabe.kyoto.jp", - "fukuchiyama.kyoto.jp", - "higashiyama.kyoto.jp", - "ide.kyoto.jp", - "ine.kyoto.jp", - "joyo.kyoto.jp", - "kameoka.kyoto.jp", - "kamo.kyoto.jp", - "kita.kyoto.jp", - "kizu.kyoto.jp", - "kumiyama.kyoto.jp", - "kyotamba.kyoto.jp", - "kyotanabe.kyoto.jp", - "kyotango.kyoto.jp", - "maizuru.kyoto.jp", - "minami.kyoto.jp", - "minamiyamashiro.kyoto.jp", - "miyazu.kyoto.jp", - "muko.kyoto.jp", - "nagaokakyo.kyoto.jp", - "nakagyo.kyoto.jp", - "nantan.kyoto.jp", - "oyamazaki.kyoto.jp", - "sakyo.kyoto.jp", - "seika.kyoto.jp", - "tanabe.kyoto.jp", - "uji.kyoto.jp", - "ujitawara.kyoto.jp", - "wazuka.kyoto.jp", - "yamashina.kyoto.jp", - "yawata.kyoto.jp", - "asahi.mie.jp", - "inabe.mie.jp", - "ise.mie.jp", - "kameyama.mie.jp", - "kawagoe.mie.jp", - "kiho.mie.jp", - "kisosaki.mie.jp", - "kiwa.mie.jp", - "komono.mie.jp", - "kumano.mie.jp", - "kuwana.mie.jp", - "matsusaka.mie.jp", - "meiwa.mie.jp", - "mihama.mie.jp", - "minamiise.mie.jp", - "misugi.mie.jp", - "miyama.mie.jp", - "nabari.mie.jp", - "shima.mie.jp", - "suzuka.mie.jp", - "tado.mie.jp", - "taiki.mie.jp", - "taki.mie.jp", - "tamaki.mie.jp", - "toba.mie.jp", - "tsu.mie.jp", - "udono.mie.jp", - "ureshino.mie.jp", - "watarai.mie.jp", - "yokkaichi.mie.jp", - "furukawa.miyagi.jp", - "higashimatsushima.miyagi.jp", - "ishinomaki.miyagi.jp", - "iwanuma.miyagi.jp", - "kakuda.miyagi.jp", - "kami.miyagi.jp", - "kawasaki.miyagi.jp", - "marumori.miyagi.jp", - "matsushima.miyagi.jp", - "minamisanriku.miyagi.jp", - "misato.miyagi.jp", - "murata.miyagi.jp", - "natori.miyagi.jp", - "ogawara.miyagi.jp", - "ohira.miyagi.jp", - "onagawa.miyagi.jp", - "osaki.miyagi.jp", - "rifu.miyagi.jp", - "semine.miyagi.jp", - "shibata.miyagi.jp", - "shichikashuku.miyagi.jp", - "shikama.miyagi.jp", - "shiogama.miyagi.jp", - "shiroishi.miyagi.jp", - "tagajo.miyagi.jp", - "taiwa.miyagi.jp", - "tome.miyagi.jp", - "tomiya.miyagi.jp", - "wakuya.miyagi.jp", - "watari.miyagi.jp", - "yamamoto.miyagi.jp", - "zao.miyagi.jp", - "aya.miyazaki.jp", - "ebino.miyazaki.jp", - "gokase.miyazaki.jp", - "hyuga.miyazaki.jp", - "kadogawa.miyazaki.jp", - "kawaminami.miyazaki.jp", - "kijo.miyazaki.jp", - "kitagawa.miyazaki.jp", - "kitakata.miyazaki.jp", - "kitaura.miyazaki.jp", - "kobayashi.miyazaki.jp", - "kunitomi.miyazaki.jp", - "kushima.miyazaki.jp", - "mimata.miyazaki.jp", - "miyakonojo.miyazaki.jp", - "miyazaki.miyazaki.jp", - "morotsuka.miyazaki.jp", - "nichinan.miyazaki.jp", - "nishimera.miyazaki.jp", - "nobeoka.miyazaki.jp", - "saito.miyazaki.jp", - "shiiba.miyazaki.jp", - "shintomi.miyazaki.jp", - "takaharu.miyazaki.jp", - "takanabe.miyazaki.jp", - "takazaki.miyazaki.jp", - "tsuno.miyazaki.jp", - "achi.nagano.jp", - "agematsu.nagano.jp", - "anan.nagano.jp", - "aoki.nagano.jp", - "asahi.nagano.jp", - "azumino.nagano.jp", - "chikuhoku.nagano.jp", - "chikuma.nagano.jp", - "chino.nagano.jp", - "fujimi.nagano.jp", - "hakuba.nagano.jp", - "hara.nagano.jp", - "hiraya.nagano.jp", - "iida.nagano.jp", - "iijima.nagano.jp", - "iiyama.nagano.jp", - "iizuna.nagano.jp", - "ikeda.nagano.jp", - "ikusaka.nagano.jp", - "ina.nagano.jp", - "karuizawa.nagano.jp", - "kawakami.nagano.jp", - "kiso.nagano.jp", - "kisofukushima.nagano.jp", - "kitaaiki.nagano.jp", - "komagane.nagano.jp", - "komoro.nagano.jp", - "matsukawa.nagano.jp", - "matsumoto.nagano.jp", - "miasa.nagano.jp", - "minamiaiki.nagano.jp", - "minamimaki.nagano.jp", - "minamiminowa.nagano.jp", - "minowa.nagano.jp", - "miyada.nagano.jp", - "miyota.nagano.jp", - "mochizuki.nagano.jp", - "nagano.nagano.jp", - "nagawa.nagano.jp", - "nagiso.nagano.jp", - "nakagawa.nagano.jp", - "nakano.nagano.jp", - "nozawaonsen.nagano.jp", - "obuse.nagano.jp", - "ogawa.nagano.jp", - "okaya.nagano.jp", - "omachi.nagano.jp", - "omi.nagano.jp", - "ookuwa.nagano.jp", - "ooshika.nagano.jp", - "otaki.nagano.jp", - "otari.nagano.jp", - "sakae.nagano.jp", - "sakaki.nagano.jp", - "saku.nagano.jp", - "sakuho.nagano.jp", - "shimosuwa.nagano.jp", - "shinanomachi.nagano.jp", - "shiojiri.nagano.jp", - "suwa.nagano.jp", - "suzaka.nagano.jp", - "takagi.nagano.jp", - "takamori.nagano.jp", - "takayama.nagano.jp", - "tateshina.nagano.jp", - "tatsuno.nagano.jp", - "togakushi.nagano.jp", - "togura.nagano.jp", - "tomi.nagano.jp", - "ueda.nagano.jp", - "wada.nagano.jp", - "yamagata.nagano.jp", - "yamanouchi.nagano.jp", - "yasaka.nagano.jp", - "yasuoka.nagano.jp", - "chijiwa.nagasaki.jp", - "futsu.nagasaki.jp", - "goto.nagasaki.jp", - "hasami.nagasaki.jp", - "hirado.nagasaki.jp", - "iki.nagasaki.jp", - "isahaya.nagasaki.jp", - "kawatana.nagasaki.jp", - "kuchinotsu.nagasaki.jp", - "matsuura.nagasaki.jp", - "nagasaki.nagasaki.jp", - "obama.nagasaki.jp", - "omura.nagasaki.jp", - "oseto.nagasaki.jp", - "saikai.nagasaki.jp", - "sasebo.nagasaki.jp", - "seihi.nagasaki.jp", - "shimabara.nagasaki.jp", - "shinkamigoto.nagasaki.jp", - "togitsu.nagasaki.jp", - "tsushima.nagasaki.jp", - "unzen.nagasaki.jp", - "ando.nara.jp", - "gose.nara.jp", - "heguri.nara.jp", - "higashiyoshino.nara.jp", - "ikaruga.nara.jp", - "ikoma.nara.jp", - "kamikitayama.nara.jp", - "kanmaki.nara.jp", - "kashiba.nara.jp", - "kashihara.nara.jp", - "katsuragi.nara.jp", - "kawai.nara.jp", - "kawakami.nara.jp", - "kawanishi.nara.jp", - "koryo.nara.jp", - "kurotaki.nara.jp", - "mitsue.nara.jp", - "miyake.nara.jp", - "nara.nara.jp", - "nosegawa.nara.jp", - "oji.nara.jp", - "ouda.nara.jp", - "oyodo.nara.jp", - "sakurai.nara.jp", - "sango.nara.jp", - "shimoichi.nara.jp", - "shimokitayama.nara.jp", - "shinjo.nara.jp", - "soni.nara.jp", - "takatori.nara.jp", - "tawaramoto.nara.jp", - "tenkawa.nara.jp", - "tenri.nara.jp", - "uda.nara.jp", - "yamatokoriyama.nara.jp", - "yamatotakada.nara.jp", - "yamazoe.nara.jp", - "yoshino.nara.jp", - "aga.niigata.jp", - "agano.niigata.jp", - "gosen.niigata.jp", - "itoigawa.niigata.jp", - "izumozaki.niigata.jp", - "joetsu.niigata.jp", - "kamo.niigata.jp", - "kariwa.niigata.jp", - "kashiwazaki.niigata.jp", - "minamiuonuma.niigata.jp", - "mitsuke.niigata.jp", - "muika.niigata.jp", - "murakami.niigata.jp", - "myoko.niigata.jp", - "nagaoka.niigata.jp", - "niigata.niigata.jp", - "ojiya.niigata.jp", - "omi.niigata.jp", - "sado.niigata.jp", - "sanjo.niigata.jp", - "seiro.niigata.jp", - "seirou.niigata.jp", - "sekikawa.niigata.jp", - "shibata.niigata.jp", - "tagami.niigata.jp", - "tainai.niigata.jp", - "tochio.niigata.jp", - "tokamachi.niigata.jp", - "tsubame.niigata.jp", - "tsunan.niigata.jp", - "uonuma.niigata.jp", - "yahiko.niigata.jp", - "yoita.niigata.jp", - "yuzawa.niigata.jp", - "beppu.oita.jp", - "bungoono.oita.jp", - "bungotakada.oita.jp", - "hasama.oita.jp", - "hiji.oita.jp", - "himeshima.oita.jp", - "hita.oita.jp", - "kamitsue.oita.jp", - "kokonoe.oita.jp", - "kuju.oita.jp", - "kunisaki.oita.jp", - "kusu.oita.jp", - "oita.oita.jp", - "saiki.oita.jp", - "taketa.oita.jp", - "tsukumi.oita.jp", - "usa.oita.jp", - "usuki.oita.jp", - "yufu.oita.jp", - "akaiwa.okayama.jp", - "asakuchi.okayama.jp", - "bizen.okayama.jp", - "hayashima.okayama.jp", - "ibara.okayama.jp", - "kagamino.okayama.jp", - "kasaoka.okayama.jp", - "kibichuo.okayama.jp", - "kumenan.okayama.jp", - "kurashiki.okayama.jp", - "maniwa.okayama.jp", - "misaki.okayama.jp", - "nagi.okayama.jp", - "niimi.okayama.jp", - "nishiawakura.okayama.jp", - "okayama.okayama.jp", - "satosho.okayama.jp", - "setouchi.okayama.jp", - "shinjo.okayama.jp", - "shoo.okayama.jp", - "soja.okayama.jp", - "takahashi.okayama.jp", - "tamano.okayama.jp", - "tsuyama.okayama.jp", - "wake.okayama.jp", - "yakage.okayama.jp", - "aguni.okinawa.jp", - "ginowan.okinawa.jp", - "ginoza.okinawa.jp", - "gushikami.okinawa.jp", - "haebaru.okinawa.jp", - "higashi.okinawa.jp", - "hirara.okinawa.jp", - "iheya.okinawa.jp", - "ishigaki.okinawa.jp", - "ishikawa.okinawa.jp", - "itoman.okinawa.jp", - "izena.okinawa.jp", - "kadena.okinawa.jp", - "kin.okinawa.jp", - "kitadaito.okinawa.jp", - "kitanakagusuku.okinawa.jp", - "kumejima.okinawa.jp", - "kunigami.okinawa.jp", - "minamidaito.okinawa.jp", - "motobu.okinawa.jp", - "nago.okinawa.jp", - "naha.okinawa.jp", - "nakagusuku.okinawa.jp", - "nakijin.okinawa.jp", - "nanjo.okinawa.jp", - "nishihara.okinawa.jp", - "ogimi.okinawa.jp", - "okinawa.okinawa.jp", - "onna.okinawa.jp", - "shimoji.okinawa.jp", - "taketomi.okinawa.jp", - "tarama.okinawa.jp", - "tokashiki.okinawa.jp", - "tomigusuku.okinawa.jp", - "tonaki.okinawa.jp", - "urasoe.okinawa.jp", - "uruma.okinawa.jp", - "yaese.okinawa.jp", - "yomitan.okinawa.jp", - "yonabaru.okinawa.jp", - "yonaguni.okinawa.jp", - "zamami.okinawa.jp", - "abeno.osaka.jp", - "chihayaakasaka.osaka.jp", - "chuo.osaka.jp", - "daito.osaka.jp", - "fujiidera.osaka.jp", - "habikino.osaka.jp", - "hannan.osaka.jp", - "higashiosaka.osaka.jp", - "higashisumiyoshi.osaka.jp", - "higashiyodogawa.osaka.jp", - "hirakata.osaka.jp", - "ibaraki.osaka.jp", - "ikeda.osaka.jp", - "izumi.osaka.jp", - "izumiotsu.osaka.jp", - "izumisano.osaka.jp", - "kadoma.osaka.jp", - "kaizuka.osaka.jp", - "kanan.osaka.jp", - "kashiwara.osaka.jp", - "katano.osaka.jp", - "kawachinagano.osaka.jp", - "kishiwada.osaka.jp", - "kita.osaka.jp", - "kumatori.osaka.jp", - "matsubara.osaka.jp", - "minato.osaka.jp", - "minoh.osaka.jp", - "misaki.osaka.jp", - "moriguchi.osaka.jp", - "neyagawa.osaka.jp", - "nishi.osaka.jp", - "nose.osaka.jp", - "osakasayama.osaka.jp", - "sakai.osaka.jp", - "sayama.osaka.jp", - "sennan.osaka.jp", - "settsu.osaka.jp", - "shijonawate.osaka.jp", - "shimamoto.osaka.jp", - "suita.osaka.jp", - "tadaoka.osaka.jp", - "taishi.osaka.jp", - "tajiri.osaka.jp", - "takaishi.osaka.jp", - "takatsuki.osaka.jp", - "tondabayashi.osaka.jp", - "toyonaka.osaka.jp", - "toyono.osaka.jp", - "yao.osaka.jp", - "ariake.saga.jp", - "arita.saga.jp", - "fukudomi.saga.jp", - "genkai.saga.jp", - "hamatama.saga.jp", - "hizen.saga.jp", - "imari.saga.jp", - "kamimine.saga.jp", - "kanzaki.saga.jp", - "karatsu.saga.jp", - "kashima.saga.jp", - "kitagata.saga.jp", - "kitahata.saga.jp", - "kiyama.saga.jp", - "kouhoku.saga.jp", - "kyuragi.saga.jp", - "nishiarita.saga.jp", - "ogi.saga.jp", - "omachi.saga.jp", - "ouchi.saga.jp", - "saga.saga.jp", - "shiroishi.saga.jp", - "taku.saga.jp", - "tara.saga.jp", - "tosu.saga.jp", - "yoshinogari.saga.jp", - "arakawa.saitama.jp", - "asaka.saitama.jp", - "chichibu.saitama.jp", - "fujimi.saitama.jp", - "fujimino.saitama.jp", - "fukaya.saitama.jp", - "hanno.saitama.jp", - "hanyu.saitama.jp", - "hasuda.saitama.jp", - "hatogaya.saitama.jp", - "hatoyama.saitama.jp", - "hidaka.saitama.jp", - "higashichichibu.saitama.jp", - "higashimatsuyama.saitama.jp", - "honjo.saitama.jp", - "ina.saitama.jp", - "iruma.saitama.jp", - "iwatsuki.saitama.jp", - "kamiizumi.saitama.jp", - "kamikawa.saitama.jp", - "kamisato.saitama.jp", - "kasukabe.saitama.jp", - "kawagoe.saitama.jp", - "kawaguchi.saitama.jp", - "kawajima.saitama.jp", - "kazo.saitama.jp", - "kitamoto.saitama.jp", - "koshigaya.saitama.jp", - "kounosu.saitama.jp", - "kuki.saitama.jp", - "kumagaya.saitama.jp", - "matsubushi.saitama.jp", - "minano.saitama.jp", - "misato.saitama.jp", - "miyashiro.saitama.jp", - "miyoshi.saitama.jp", - "moroyama.saitama.jp", - "nagatoro.saitama.jp", - "namegawa.saitama.jp", - "niiza.saitama.jp", - "ogano.saitama.jp", - "ogawa.saitama.jp", - "ogose.saitama.jp", - "okegawa.saitama.jp", - "omiya.saitama.jp", - "otaki.saitama.jp", - "ranzan.saitama.jp", - "ryokami.saitama.jp", - "saitama.saitama.jp", - "sakado.saitama.jp", - "satte.saitama.jp", - "sayama.saitama.jp", - "shiki.saitama.jp", - "shiraoka.saitama.jp", - "soka.saitama.jp", - "sugito.saitama.jp", - "toda.saitama.jp", - "tokigawa.saitama.jp", - "tokorozawa.saitama.jp", - "tsurugashima.saitama.jp", - "urawa.saitama.jp", - "warabi.saitama.jp", - "yashio.saitama.jp", - "yokoze.saitama.jp", - "yono.saitama.jp", - "yorii.saitama.jp", - "yoshida.saitama.jp", - "yoshikawa.saitama.jp", - "yoshimi.saitama.jp", - "aisho.shiga.jp", - "gamo.shiga.jp", - "higashiomi.shiga.jp", - "hikone.shiga.jp", - "koka.shiga.jp", - "konan.shiga.jp", - "kosei.shiga.jp", - "koto.shiga.jp", - "kusatsu.shiga.jp", - "maibara.shiga.jp", - "moriyama.shiga.jp", - "nagahama.shiga.jp", - "nishiazai.shiga.jp", - "notogawa.shiga.jp", - "omihachiman.shiga.jp", - "otsu.shiga.jp", - "ritto.shiga.jp", - "ryuoh.shiga.jp", - "takashima.shiga.jp", - "takatsuki.shiga.jp", - "torahime.shiga.jp", - "toyosato.shiga.jp", - "yasu.shiga.jp", - "akagi.shimane.jp", - "ama.shimane.jp", - "gotsu.shimane.jp", - "hamada.shimane.jp", - "higashiizumo.shimane.jp", - "hikawa.shimane.jp", - "hikimi.shimane.jp", - "izumo.shimane.jp", - "kakinoki.shimane.jp", - "masuda.shimane.jp", - "matsue.shimane.jp", - "misato.shimane.jp", - "nishinoshima.shimane.jp", - "ohda.shimane.jp", - "okinoshima.shimane.jp", - "okuizumo.shimane.jp", - "shimane.shimane.jp", - "tamayu.shimane.jp", - "tsuwano.shimane.jp", - "unnan.shimane.jp", - "yakumo.shimane.jp", - "yasugi.shimane.jp", - "yatsuka.shimane.jp", - "arai.shizuoka.jp", - "atami.shizuoka.jp", - "fuji.shizuoka.jp", - "fujieda.shizuoka.jp", - "fujikawa.shizuoka.jp", - "fujinomiya.shizuoka.jp", - "fukuroi.shizuoka.jp", - "gotemba.shizuoka.jp", - "haibara.shizuoka.jp", - "hamamatsu.shizuoka.jp", - "higashiizu.shizuoka.jp", - "ito.shizuoka.jp", - "iwata.shizuoka.jp", - "izu.shizuoka.jp", - "izunokuni.shizuoka.jp", - "kakegawa.shizuoka.jp", - "kannami.shizuoka.jp", - "kawanehon.shizuoka.jp", - "kawazu.shizuoka.jp", - "kikugawa.shizuoka.jp", - "kosai.shizuoka.jp", - "makinohara.shizuoka.jp", - "matsuzaki.shizuoka.jp", - "minamiizu.shizuoka.jp", - "mishima.shizuoka.jp", - "morimachi.shizuoka.jp", - "nishiizu.shizuoka.jp", - "numazu.shizuoka.jp", - "omaezaki.shizuoka.jp", - "shimada.shizuoka.jp", - "shimizu.shizuoka.jp", - "shimoda.shizuoka.jp", - "shizuoka.shizuoka.jp", - "susono.shizuoka.jp", - "yaizu.shizuoka.jp", - "yoshida.shizuoka.jp", - "ashikaga.tochigi.jp", - "bato.tochigi.jp", - "haga.tochigi.jp", - "ichikai.tochigi.jp", - "iwafune.tochigi.jp", - "kaminokawa.tochigi.jp", - "kanuma.tochigi.jp", - "karasuyama.tochigi.jp", - "kuroiso.tochigi.jp", - "mashiko.tochigi.jp", - "mibu.tochigi.jp", - "moka.tochigi.jp", - "motegi.tochigi.jp", - "nasu.tochigi.jp", - "nasushiobara.tochigi.jp", - "nikko.tochigi.jp", - "nishikata.tochigi.jp", - "nogi.tochigi.jp", - "ohira.tochigi.jp", - "ohtawara.tochigi.jp", - "oyama.tochigi.jp", - "sakura.tochigi.jp", - "sano.tochigi.jp", - "shimotsuke.tochigi.jp", - "shioya.tochigi.jp", - "takanezawa.tochigi.jp", - "tochigi.tochigi.jp", - "tsuga.tochigi.jp", - "ujiie.tochigi.jp", - "utsunomiya.tochigi.jp", - "yaita.tochigi.jp", - "aizumi.tokushima.jp", - "anan.tokushima.jp", - "ichiba.tokushima.jp", - "itano.tokushima.jp", - "kainan.tokushima.jp", - "komatsushima.tokushima.jp", - "matsushige.tokushima.jp", - "mima.tokushima.jp", - "minami.tokushima.jp", - "miyoshi.tokushima.jp", - "mugi.tokushima.jp", - "nakagawa.tokushima.jp", - "naruto.tokushima.jp", - "sanagochi.tokushima.jp", - "shishikui.tokushima.jp", - "tokushima.tokushima.jp", - "wajiki.tokushima.jp", - "adachi.tokyo.jp", - "akiruno.tokyo.jp", - "akishima.tokyo.jp", - "aogashima.tokyo.jp", - "arakawa.tokyo.jp", - "bunkyo.tokyo.jp", - "chiyoda.tokyo.jp", - "chofu.tokyo.jp", - "chuo.tokyo.jp", - "edogawa.tokyo.jp", - "fuchu.tokyo.jp", - "fussa.tokyo.jp", - "hachijo.tokyo.jp", - "hachioji.tokyo.jp", - "hamura.tokyo.jp", - "higashikurume.tokyo.jp", - "higashimurayama.tokyo.jp", - "higashiyamato.tokyo.jp", - "hino.tokyo.jp", - "hinode.tokyo.jp", - "hinohara.tokyo.jp", - "inagi.tokyo.jp", - "itabashi.tokyo.jp", - "katsushika.tokyo.jp", - "kita.tokyo.jp", - "kiyose.tokyo.jp", - "kodaira.tokyo.jp", - "koganei.tokyo.jp", - "kokubunji.tokyo.jp", - "komae.tokyo.jp", - "koto.tokyo.jp", - "kouzushima.tokyo.jp", - "kunitachi.tokyo.jp", - "machida.tokyo.jp", - "meguro.tokyo.jp", - "minato.tokyo.jp", - "mitaka.tokyo.jp", - "mizuho.tokyo.jp", - "musashimurayama.tokyo.jp", - "musashino.tokyo.jp", - "nakano.tokyo.jp", - "nerima.tokyo.jp", - "ogasawara.tokyo.jp", - "okutama.tokyo.jp", - "ome.tokyo.jp", - "oshima.tokyo.jp", - "ota.tokyo.jp", - "setagaya.tokyo.jp", - "shibuya.tokyo.jp", - "shinagawa.tokyo.jp", - "shinjuku.tokyo.jp", - "suginami.tokyo.jp", - "sumida.tokyo.jp", - "tachikawa.tokyo.jp", - "taito.tokyo.jp", - "tama.tokyo.jp", - "toshima.tokyo.jp", - "chizu.tottori.jp", - "hino.tottori.jp", - "kawahara.tottori.jp", - "koge.tottori.jp", - "kotoura.tottori.jp", - "misasa.tottori.jp", - "nanbu.tottori.jp", - "nichinan.tottori.jp", - "sakaiminato.tottori.jp", - "tottori.tottori.jp", - "wakasa.tottori.jp", - "yazu.tottori.jp", - "yonago.tottori.jp", - "asahi.toyama.jp", - "fuchu.toyama.jp", - "fukumitsu.toyama.jp", - "funahashi.toyama.jp", - "himi.toyama.jp", - "imizu.toyama.jp", - "inami.toyama.jp", - "johana.toyama.jp", - "kamiichi.toyama.jp", - "kurobe.toyama.jp", - "nakaniikawa.toyama.jp", - "namerikawa.toyama.jp", - "nanto.toyama.jp", - "nyuzen.toyama.jp", - "oyabe.toyama.jp", - "taira.toyama.jp", - "takaoka.toyama.jp", - "tateyama.toyama.jp", - "toga.toyama.jp", - "tonami.toyama.jp", - "toyama.toyama.jp", - "unazuki.toyama.jp", - "uozu.toyama.jp", - "yamada.toyama.jp", - "arida.wakayama.jp", - "aridagawa.wakayama.jp", - "gobo.wakayama.jp", - "hashimoto.wakayama.jp", - "hidaka.wakayama.jp", - "hirogawa.wakayama.jp", - "inami.wakayama.jp", - "iwade.wakayama.jp", - "kainan.wakayama.jp", - "kamitonda.wakayama.jp", - "katsuragi.wakayama.jp", - "kimino.wakayama.jp", - "kinokawa.wakayama.jp", - "kitayama.wakayama.jp", - "koya.wakayama.jp", - "koza.wakayama.jp", - "kozagawa.wakayama.jp", - "kudoyama.wakayama.jp", - "kushimoto.wakayama.jp", - "mihama.wakayama.jp", - "misato.wakayama.jp", - "nachikatsuura.wakayama.jp", - "shingu.wakayama.jp", - "shirahama.wakayama.jp", - "taiji.wakayama.jp", - "tanabe.wakayama.jp", - "wakayama.wakayama.jp", - "yuasa.wakayama.jp", - "yura.wakayama.jp", - "asahi.yamagata.jp", - "funagata.yamagata.jp", - "higashine.yamagata.jp", - "iide.yamagata.jp", - "kahoku.yamagata.jp", - "kaminoyama.yamagata.jp", - "kaneyama.yamagata.jp", - "kawanishi.yamagata.jp", - "mamurogawa.yamagata.jp", - "mikawa.yamagata.jp", - "murayama.yamagata.jp", - "nagai.yamagata.jp", - "nakayama.yamagata.jp", - "nanyo.yamagata.jp", - "nishikawa.yamagata.jp", - "obanazawa.yamagata.jp", - "oe.yamagata.jp", - "oguni.yamagata.jp", - "ohkura.yamagata.jp", - "oishida.yamagata.jp", - "sagae.yamagata.jp", - "sakata.yamagata.jp", - "sakegawa.yamagata.jp", - "shinjo.yamagata.jp", - "shirataka.yamagata.jp", - "shonai.yamagata.jp", - "takahata.yamagata.jp", - "tendo.yamagata.jp", - "tozawa.yamagata.jp", - "tsuruoka.yamagata.jp", - "yamagata.yamagata.jp", - "yamanobe.yamagata.jp", - "yonezawa.yamagata.jp", - "yuza.yamagata.jp", - "abu.yamaguchi.jp", - "hagi.yamaguchi.jp", - "hikari.yamaguchi.jp", - "hofu.yamaguchi.jp", - "iwakuni.yamaguchi.jp", - "kudamatsu.yamaguchi.jp", - "mitou.yamaguchi.jp", - "nagato.yamaguchi.jp", - "oshima.yamaguchi.jp", - "shimonoseki.yamaguchi.jp", - "shunan.yamaguchi.jp", - "tabuse.yamaguchi.jp", - "tokuyama.yamaguchi.jp", - "toyota.yamaguchi.jp", - "ube.yamaguchi.jp", - "yuu.yamaguchi.jp", - "chuo.yamanashi.jp", - "doshi.yamanashi.jp", - "fuefuki.yamanashi.jp", - "fujikawa.yamanashi.jp", - "fujikawaguchiko.yamanashi.jp", - "fujiyoshida.yamanashi.jp", - "hayakawa.yamanashi.jp", - "hokuto.yamanashi.jp", - "ichikawamisato.yamanashi.jp", - "kai.yamanashi.jp", - "kofu.yamanashi.jp", - "koshu.yamanashi.jp", - "kosuge.yamanashi.jp", - "minami-alps.yamanashi.jp", - "minobu.yamanashi.jp", - "nakamichi.yamanashi.jp", - "nanbu.yamanashi.jp", - "narusawa.yamanashi.jp", - "nirasaki.yamanashi.jp", - "nishikatsura.yamanashi.jp", - "oshino.yamanashi.jp", - "otsuki.yamanashi.jp", - "showa.yamanashi.jp", - "tabayama.yamanashi.jp", - "tsuru.yamanashi.jp", - "uenohara.yamanashi.jp", - "yamanakako.yamanashi.jp", - "yamanashi.yamanashi.jp", - "ke", - "ac.ke", - "co.ke", - "go.ke", - "info.ke", - "me.ke", - "mobi.ke", - "ne.ke", - "or.ke", - "sc.ke", - "kg", - "com.kg", - "edu.kg", - "gov.kg", - "mil.kg", - "net.kg", - "org.kg", - "*.kh", - "ki", - "biz.ki", - "com.ki", - "edu.ki", - "gov.ki", - "info.ki", - "net.ki", - "org.ki", - "km", - "ass.km", - "com.km", - "edu.km", - "gov.km", - "mil.km", - "nom.km", - "org.km", - "prd.km", - "tm.km", - "asso.km", - "coop.km", - "gouv.km", - "medecin.km", - "notaires.km", - "pharmaciens.km", - "presse.km", - "veterinaire.km", - "kn", - "edu.kn", - "gov.kn", - "net.kn", - "org.kn", - "kp", - "com.kp", - "edu.kp", - "gov.kp", - "org.kp", - "rep.kp", - "tra.kp", - "kr", - "ac.kr", - "co.kr", - "es.kr", - "go.kr", - "hs.kr", - "kg.kr", - "mil.kr", - "ms.kr", - "ne.kr", - "or.kr", - "pe.kr", - "re.kr", - "sc.kr", - "busan.kr", - "chungbuk.kr", - "chungnam.kr", - "daegu.kr", - "daejeon.kr", - "gangwon.kr", - "gwangju.kr", - "gyeongbuk.kr", - "gyeonggi.kr", - "gyeongnam.kr", - "incheon.kr", - "jeju.kr", - "jeonbuk.kr", - "jeonnam.kr", - "seoul.kr", - "ulsan.kr", - "kw", - "com.kw", - "edu.kw", - "emb.kw", - "gov.kw", - "ind.kw", - "net.kw", - "org.kw", - "ky", - "com.ky", - "edu.ky", - "net.ky", - "org.ky", - "kz", - "com.kz", - "edu.kz", - "gov.kz", - "mil.kz", - "net.kz", - "org.kz", - "la", - "com.la", - "edu.la", - "gov.la", - "info.la", - "int.la", - "net.la", - "org.la", - "per.la", - "lb", - "com.lb", - "edu.lb", - "gov.lb", - "net.lb", - "org.lb", - "lc", - "co.lc", - "com.lc", - "edu.lc", - "gov.lc", - "net.lc", - "org.lc", - "li", - "lk", - "ac.lk", - "assn.lk", - "com.lk", - "edu.lk", - "gov.lk", - "grp.lk", - "hotel.lk", - "int.lk", - "ltd.lk", - "net.lk", - "ngo.lk", - "org.lk", - "sch.lk", - "soc.lk", - "web.lk", - "lr", - "com.lr", - "edu.lr", - "gov.lr", - "net.lr", - "org.lr", - "ls", - "ac.ls", - "biz.ls", - "co.ls", - "edu.ls", - "gov.ls", - "info.ls", - "net.ls", - "org.ls", - "sc.ls", - "lt", - "gov.lt", - "lu", - "lv", - "asn.lv", - "com.lv", - "conf.lv", - "edu.lv", - "gov.lv", - "id.lv", - "mil.lv", - "net.lv", - "org.lv", - "ly", - "com.ly", - "edu.ly", - "gov.ly", - "id.ly", - "med.ly", - "net.ly", - "org.ly", - "plc.ly", - "sch.ly", - "ma", - "ac.ma", - "co.ma", - "gov.ma", - "net.ma", - "org.ma", - "press.ma", - "mc", - "asso.mc", - "tm.mc", - "md", - "me", - "ac.me", - "co.me", - "edu.me", - "gov.me", - "its.me", - "net.me", - "org.me", - "priv.me", - "mg", - "co.mg", - "com.mg", - "edu.mg", - "gov.mg", - "mil.mg", - "nom.mg", - "org.mg", - "prd.mg", - "mh", - "mil", - "mk", - "com.mk", - "edu.mk", - "gov.mk", - "inf.mk", - "name.mk", - "net.mk", - "org.mk", - "ml", - "com.ml", - "edu.ml", - "gouv.ml", - "gov.ml", - "net.ml", - "org.ml", - "presse.ml", - "*.mm", - "mn", - "edu.mn", - "gov.mn", - "org.mn", - "mo", - "com.mo", - "edu.mo", - "gov.mo", - "net.mo", - "org.mo", - "mobi", - "mp", - "mq", - "mr", - "gov.mr", - "ms", - "com.ms", - "edu.ms", - "gov.ms", - "net.ms", - "org.ms", - "mt", - "com.mt", - "edu.mt", - "net.mt", - "org.mt", - "mu", - "ac.mu", - "co.mu", - "com.mu", - "gov.mu", - "net.mu", - "or.mu", - "org.mu", - "museum", - "mv", - "aero.mv", - "biz.mv", - "com.mv", - "coop.mv", - "edu.mv", - "gov.mv", - "info.mv", - "int.mv", - "mil.mv", - "museum.mv", - "name.mv", - "net.mv", - "org.mv", - "pro.mv", - "mw", - "ac.mw", - "biz.mw", - "co.mw", - "com.mw", - "coop.mw", - "edu.mw", - "gov.mw", - "int.mw", - "net.mw", - "org.mw", - "mx", - "com.mx", - "edu.mx", - "gob.mx", - "net.mx", - "org.mx", - "my", - "biz.my", - "com.my", - "edu.my", - "gov.my", - "mil.my", - "name.my", - "net.my", - "org.my", - "mz", - "ac.mz", - "adv.mz", - "co.mz", - "edu.mz", - "gov.mz", - "mil.mz", - "net.mz", - "org.mz", - "na", - "alt.na", - "co.na", - "com.na", - "gov.na", - "net.na", - "org.na", - "name", - "nc", - "asso.nc", - "nom.nc", - "ne", - "net", - "nf", - "arts.nf", - "com.nf", - "firm.nf", - "info.nf", - "net.nf", - "other.nf", - "per.nf", - "rec.nf", - "store.nf", - "web.nf", - "ng", - "com.ng", - "edu.ng", - "gov.ng", - "i.ng", - "mil.ng", - "mobi.ng", - "name.ng", - "net.ng", - "org.ng", - "sch.ng", - "ni", - "ac.ni", - "biz.ni", - "co.ni", - "com.ni", - "edu.ni", - "gob.ni", - "in.ni", - "info.ni", - "int.ni", - "mil.ni", - "net.ni", - "nom.ni", - "org.ni", - "web.ni", - "nl", - "no", - "fhs.no", - "folkebibl.no", - "fylkesbibl.no", - "idrett.no", - "museum.no", - "priv.no", - "vgs.no", - "dep.no", - "herad.no", - "kommune.no", - "mil.no", - "stat.no", - "aa.no", - "ah.no", - "bu.no", - "fm.no", - "hl.no", - "hm.no", - "jan-mayen.no", - "mr.no", - "nl.no", - "nt.no", - "of.no", - "ol.no", - "oslo.no", - "rl.no", - "sf.no", - "st.no", - "svalbard.no", - "tm.no", - "tr.no", - "va.no", - "vf.no", - "gs.aa.no", - "gs.ah.no", - "gs.bu.no", - "gs.fm.no", - "gs.hl.no", - "gs.hm.no", - "gs.jan-mayen.no", - "gs.mr.no", - "gs.nl.no", - "gs.nt.no", - "gs.of.no", - "gs.ol.no", - "gs.oslo.no", - "gs.rl.no", - "gs.sf.no", - "gs.st.no", - "gs.svalbard.no", - "gs.tm.no", - "gs.tr.no", - "gs.va.no", - "gs.vf.no", - "akrehamn.no", - "åkrehamn.no", - "algard.no", - "ålgård.no", - "arna.no", - "bronnoysund.no", - "brønnøysund.no", - "brumunddal.no", - "bryne.no", - "drobak.no", - "drøbak.no", - "egersund.no", - "fetsund.no", - "floro.no", - "florø.no", - "fredrikstad.no", - "hokksund.no", - "honefoss.no", - "hønefoss.no", - "jessheim.no", - "jorpeland.no", - "jørpeland.no", - "kirkenes.no", - "kopervik.no", - "krokstadelva.no", - "langevag.no", - "langevåg.no", - "leirvik.no", - "mjondalen.no", - "mjøndalen.no", - "mo-i-rana.no", - "mosjoen.no", - "mosjøen.no", - "nesoddtangen.no", - "orkanger.no", - "osoyro.no", - "osøyro.no", - "raholt.no", - "råholt.no", - "sandnessjoen.no", - "sandnessjøen.no", - "skedsmokorset.no", - "slattum.no", - "spjelkavik.no", - "stathelle.no", - "stavern.no", - "stjordalshalsen.no", - "stjørdalshalsen.no", - "tananger.no", - "tranby.no", - "vossevangen.no", - "aarborte.no", - "aejrie.no", - "afjord.no", - "åfjord.no", - "agdenes.no", - "nes.akershus.no", - "aknoluokta.no", - "ákŋoluokta.no", - "al.no", - "ål.no", - "alaheadju.no", - "álaheadju.no", - "alesund.no", - "ålesund.no", - "alstahaug.no", - "alta.no", - "áltá.no", - "alvdal.no", - "amli.no", - "åmli.no", - "amot.no", - "åmot.no", - "andasuolo.no", - "andebu.no", - "andoy.no", - "andøy.no", - "ardal.no", - "årdal.no", - "aremark.no", - "arendal.no", - "ås.no", - "aseral.no", - "åseral.no", - "asker.no", - "askim.no", - "askoy.no", - "askøy.no", - "askvoll.no", - "asnes.no", - "åsnes.no", - "audnedaln.no", - "aukra.no", - "aure.no", - "aurland.no", - "aurskog-holand.no", - "aurskog-høland.no", - "austevoll.no", - "austrheim.no", - "averoy.no", - "averøy.no", - "badaddja.no", - "bådåddjå.no", - "bærum.no", - "bahcavuotna.no", - "báhcavuotna.no", - "bahccavuotna.no", - "báhccavuotna.no", - "baidar.no", - "báidár.no", - "bajddar.no", - "bájddar.no", - "balat.no", - "bálát.no", - "balestrand.no", - "ballangen.no", - "balsfjord.no", - "bamble.no", - "bardu.no", - "barum.no", - "batsfjord.no", - "båtsfjord.no", - "bearalvahki.no", - "bearalváhki.no", - "beardu.no", - "beiarn.no", - "berg.no", - "bergen.no", - "berlevag.no", - "berlevåg.no", - "bievat.no", - "bievát.no", - "bindal.no", - "birkenes.no", - "bjarkoy.no", - "bjarkøy.no", - "bjerkreim.no", - "bjugn.no", - "bodo.no", - "bodø.no", - "bokn.no", - "bomlo.no", - "bømlo.no", - "bremanger.no", - "bronnoy.no", - "brønnøy.no", - "budejju.no", - "nes.buskerud.no", - "bygland.no", - "bykle.no", - "cahcesuolo.no", - "čáhcesuolo.no", - "davvenjarga.no", - "davvenjárga.no", - "davvesiida.no", - "deatnu.no", - "dielddanuorri.no", - "divtasvuodna.no", - "divttasvuotna.no", - "donna.no", - "dønna.no", - "dovre.no", - "drammen.no", - "drangedal.no", - "dyroy.no", - "dyrøy.no", - "eid.no", - "eidfjord.no", - "eidsberg.no", - "eidskog.no", - "eidsvoll.no", - "eigersund.no", - "elverum.no", - "enebakk.no", - "engerdal.no", - "etne.no", - "etnedal.no", - "evenassi.no", - "evenášši.no", - "evenes.no", - "evje-og-hornnes.no", - "farsund.no", - "fauske.no", - "fedje.no", - "fet.no", - "finnoy.no", - "finnøy.no", - "fitjar.no", - "fjaler.no", - "fjell.no", - "fla.no", - "flå.no", - "flakstad.no", - "flatanger.no", - "flekkefjord.no", - "flesberg.no", - "flora.no", - "folldal.no", - "forde.no", - "førde.no", - "forsand.no", - "fosnes.no", - "fræna.no", - "frana.no", - "frei.no", - "frogn.no", - "froland.no", - "frosta.no", - "froya.no", - "frøya.no", - "fuoisku.no", - "fuossko.no", - "fusa.no", - "fyresdal.no", - "gaivuotna.no", - "gáivuotna.no", - "galsa.no", - "gálsá.no", - "gamvik.no", - "gangaviika.no", - "gáŋgaviika.no", - "gaular.no", - "gausdal.no", - "giehtavuoatna.no", - "gildeskal.no", - "gildeskål.no", - "giske.no", - "gjemnes.no", - "gjerdrum.no", - "gjerstad.no", - "gjesdal.no", - "gjovik.no", - "gjøvik.no", - "gloppen.no", - "gol.no", - "gran.no", - "grane.no", - "granvin.no", - "gratangen.no", - "grimstad.no", - "grong.no", - "grue.no", - "gulen.no", - "guovdageaidnu.no", - "ha.no", - "hå.no", - "habmer.no", - "hábmer.no", - "hadsel.no", - "hægebostad.no", - "hagebostad.no", - "halden.no", - "halsa.no", - "hamar.no", - "hamaroy.no", - "hammarfeasta.no", - "hámmárfeasta.no", - "hammerfest.no", - "hapmir.no", - "hápmir.no", - "haram.no", - "hareid.no", - "harstad.no", - "hasvik.no", - "hattfjelldal.no", - "haugesund.no", - "os.hedmark.no", - "valer.hedmark.no", - "våler.hedmark.no", - "hemne.no", - "hemnes.no", - "hemsedal.no", - "hitra.no", - "hjartdal.no", - "hjelmeland.no", - "hobol.no", - "hobøl.no", - "hof.no", - "hol.no", - "hole.no", - "holmestrand.no", - "holtalen.no", - "holtålen.no", - "os.hordaland.no", - "hornindal.no", - "horten.no", - "hoyanger.no", - "høyanger.no", - "hoylandet.no", - "høylandet.no", - "hurdal.no", - "hurum.no", - "hvaler.no", - "hyllestad.no", - "ibestad.no", - "inderoy.no", - "inderøy.no", - "iveland.no", - "ivgu.no", - "jevnaker.no", - "jolster.no", - "jølster.no", - "jondal.no", - "kafjord.no", - "kåfjord.no", - "karasjohka.no", - "kárášjohka.no", - "karasjok.no", - "karlsoy.no", - "karmoy.no", - "karmøy.no", - "kautokeino.no", - "klabu.no", - "klæbu.no", - "klepp.no", - "kongsberg.no", - "kongsvinger.no", - "kraanghke.no", - "kråanghke.no", - "kragero.no", - "kragerø.no", - "kristiansand.no", - "kristiansund.no", - "krodsherad.no", - "krødsherad.no", - "kvæfjord.no", - "kvænangen.no", - "kvafjord.no", - "kvalsund.no", - "kvam.no", - "kvanangen.no", - "kvinesdal.no", - "kvinnherad.no", - "kviteseid.no", - "kvitsoy.no", - "kvitsøy.no", - "laakesvuemie.no", - "lærdal.no", - "lahppi.no", - "láhppi.no", - "lardal.no", - "larvik.no", - "lavagis.no", - "lavangen.no", - "leangaviika.no", - "leaŋgaviika.no", - "lebesby.no", - "leikanger.no", - "leirfjord.no", - "leka.no", - "leksvik.no", - "lenvik.no", - "lerdal.no", - "lesja.no", - "levanger.no", - "lier.no", - "lierne.no", - "lillehammer.no", - "lillesand.no", - "lindas.no", - "lindås.no", - "lindesnes.no", - "loabat.no", - "loabát.no", - "lodingen.no", - "lødingen.no", - "lom.no", - "loppa.no", - "lorenskog.no", - "lørenskog.no", - "loten.no", - "løten.no", - "lund.no", - "lunner.no", - "luroy.no", - "lurøy.no", - "luster.no", - "lyngdal.no", - "lyngen.no", - "malatvuopmi.no", - "málatvuopmi.no", - "malselv.no", - "målselv.no", - "malvik.no", - "mandal.no", - "marker.no", - "marnardal.no", - "masfjorden.no", - "masoy.no", - "måsøy.no", - "matta-varjjat.no", - "mátta-várjjat.no", - "meland.no", - "meldal.no", - "melhus.no", - "meloy.no", - "meløy.no", - "meraker.no", - "meråker.no", - "midsund.no", - "midtre-gauldal.no", - "moareke.no", - "moåreke.no", - "modalen.no", - "modum.no", - "molde.no", - "heroy.more-og-romsdal.no", - "sande.more-og-romsdal.no", - "herøy.møre-og-romsdal.no", - "sande.møre-og-romsdal.no", - "moskenes.no", - "moss.no", - "mosvik.no", - "muosat.no", - "muosát.no", - "naamesjevuemie.no", - "nååmesjevuemie.no", - "nærøy.no", - "namdalseid.no", - "namsos.no", - "namsskogan.no", - "nannestad.no", - "naroy.no", - "narviika.no", - "narvik.no", - "naustdal.no", - "navuotna.no", - "návuotna.no", - "nedre-eiker.no", - "nesna.no", - "nesodden.no", - "nesseby.no", - "nesset.no", - "nissedal.no", - "nittedal.no", - "nord-aurdal.no", - "nord-fron.no", - "nord-odal.no", - "norddal.no", - "nordkapp.no", - "bo.nordland.no", - "bø.nordland.no", - "heroy.nordland.no", - "herøy.nordland.no", - "nordre-land.no", - "nordreisa.no", - "nore-og-uvdal.no", - "notodden.no", - "notteroy.no", - "nøtterøy.no", - "odda.no", - "oksnes.no", - "øksnes.no", - "omasvuotna.no", - "oppdal.no", - "oppegard.no", - "oppegård.no", - "orkdal.no", - "orland.no", - "ørland.no", - "orskog.no", - "ørskog.no", - "orsta.no", - "ørsta.no", - "osen.no", - "osteroy.no", - "osterøy.no", - "valer.ostfold.no", - "våler.østfold.no", - "ostre-toten.no", - "østre-toten.no", - "overhalla.no", - "ovre-eiker.no", - "øvre-eiker.no", - "oyer.no", - "øyer.no", - "oygarden.no", - "øygarden.no", - "oystre-slidre.no", - "øystre-slidre.no", - "porsanger.no", - "porsangu.no", - "porsáŋgu.no", - "porsgrunn.no", - "rade.no", - "råde.no", - "radoy.no", - "radøy.no", - "rælingen.no", - "rahkkeravju.no", - "ráhkkerávju.no", - "raisa.no", - "ráisa.no", - "rakkestad.no", - "ralingen.no", - "rana.no", - "randaberg.no", - "rauma.no", - "rendalen.no", - "rennebu.no", - "rennesoy.no", - "rennesøy.no", - "rindal.no", - "ringebu.no", - "ringerike.no", - "ringsaker.no", - "risor.no", - "risør.no", - "rissa.no", - "roan.no", - "rodoy.no", - "rødøy.no", - "rollag.no", - "romsa.no", - "romskog.no", - "rømskog.no", - "roros.no", - "røros.no", - "rost.no", - "røst.no", - "royken.no", - "røyken.no", - "royrvik.no", - "røyrvik.no", - "ruovat.no", - "rygge.no", - "salangen.no", - "salat.no", - "sálat.no", - "sálát.no", - "saltdal.no", - "samnanger.no", - "sandefjord.no", - "sandnes.no", - "sandoy.no", - "sandøy.no", - "sarpsborg.no", - "sauda.no", - "sauherad.no", - "sel.no", - "selbu.no", - "selje.no", - "seljord.no", - "siellak.no", - "sigdal.no", - "siljan.no", - "sirdal.no", - "skanit.no", - "skánit.no", - "skanland.no", - "skånland.no", - "skaun.no", - "skedsmo.no", - "ski.no", - "skien.no", - "skierva.no", - "skiervá.no", - "skiptvet.no", - "skjak.no", - "skjåk.no", - "skjervoy.no", - "skjervøy.no", - "skodje.no", - "smola.no", - "smøla.no", - "snaase.no", - "snåase.no", - "snasa.no", - "snåsa.no", - "snillfjord.no", - "snoasa.no", - "sogndal.no", - "sogne.no", - "søgne.no", - "sokndal.no", - "sola.no", - "solund.no", - "somna.no", - "sømna.no", - "sondre-land.no", - "søndre-land.no", - "songdalen.no", - "sor-aurdal.no", - "sør-aurdal.no", - "sor-fron.no", - "sør-fron.no", - "sor-odal.no", - "sør-odal.no", - "sor-varanger.no", - "sør-varanger.no", - "sorfold.no", - "sørfold.no", - "sorreisa.no", - "sørreisa.no", - "sortland.no", - "sorum.no", - "sørum.no", - "spydeberg.no", - "stange.no", - "stavanger.no", - "steigen.no", - "steinkjer.no", - "stjordal.no", - "stjørdal.no", - "stokke.no", - "stor-elvdal.no", - "stord.no", - "stordal.no", - "storfjord.no", - "strand.no", - "stranda.no", - "stryn.no", - "sula.no", - "suldal.no", - "sund.no", - "sunndal.no", - "surnadal.no", - "sveio.no", - "svelvik.no", - "sykkylven.no", - "tana.no", - "bo.telemark.no", - "bø.telemark.no", - "time.no", - "tingvoll.no", - "tinn.no", - "tjeldsund.no", - "tjome.no", - "tjøme.no", - "tokke.no", - "tolga.no", - "tonsberg.no", - "tønsberg.no", - "torsken.no", - "træna.no", - "trana.no", - "tranoy.no", - "tranøy.no", - "troandin.no", - "trogstad.no", - "trøgstad.no", - "tromsa.no", - "tromso.no", - "tromsø.no", - "trondheim.no", - "trysil.no", - "tvedestrand.no", - "tydal.no", - "tynset.no", - "tysfjord.no", - "tysnes.no", - "tysvær.no", - "tysvar.no", - "ullensaker.no", - "ullensvang.no", - "ulvik.no", - "unjarga.no", - "unjárga.no", - "utsira.no", - "vaapste.no", - "vadso.no", - "vadsø.no", - "værøy.no", - "vaga.no", - "vågå.no", - "vagan.no", - "vågan.no", - "vagsoy.no", - "vågsøy.no", - "vaksdal.no", - "valle.no", - "vang.no", - "vanylven.no", - "vardo.no", - "vardø.no", - "varggat.no", - "várggát.no", - "varoy.no", - "vefsn.no", - "vega.no", - "vegarshei.no", - "vegårshei.no", - "vennesla.no", - "verdal.no", - "verran.no", - "vestby.no", - "sande.vestfold.no", - "vestnes.no", - "vestre-slidre.no", - "vestre-toten.no", - "vestvagoy.no", - "vestvågøy.no", - "vevelstad.no", - "vik.no", - "vikna.no", - "vindafjord.no", - "voagat.no", - "volda.no", - "voss.no", - "*.np", - "nr", - "biz.nr", - "com.nr", - "edu.nr", - "gov.nr", - "info.nr", - "net.nr", - "org.nr", - "nu", - "nz", - "ac.nz", - "co.nz", - "cri.nz", - "geek.nz", - "gen.nz", - "govt.nz", - "health.nz", - "iwi.nz", - "kiwi.nz", - "maori.nz", - "māori.nz", - "mil.nz", - "net.nz", - "org.nz", - "parliament.nz", - "school.nz", - "om", - "co.om", - "com.om", - "edu.om", - "gov.om", - "med.om", - "museum.om", - "net.om", - "org.om", - "pro.om", - "onion", - "org", - "pa", - "abo.pa", - "ac.pa", - "com.pa", - "edu.pa", - "gob.pa", - "ing.pa", - "med.pa", - "net.pa", - "nom.pa", - "org.pa", - "sld.pa", - "pe", - "com.pe", - "edu.pe", - "gob.pe", - "mil.pe", - "net.pe", - "nom.pe", - "org.pe", - "pf", - "com.pf", - "edu.pf", - "org.pf", - "*.pg", - "ph", - "com.ph", - "edu.ph", - "gov.ph", - "i.ph", - "mil.ph", - "net.ph", - "ngo.ph", - "org.ph", - "pk", - "ac.pk", - "biz.pk", - "com.pk", - "edu.pk", - "fam.pk", - "gkp.pk", - "gob.pk", - "gog.pk", - "gok.pk", - "gon.pk", - "gop.pk", - "gos.pk", - "gov.pk", - "net.pk", - "org.pk", - "web.pk", - "pl", - "com.pl", - "net.pl", - "org.pl", - "agro.pl", - "aid.pl", - "atm.pl", - "auto.pl", - "biz.pl", - "edu.pl", - "gmina.pl", - "gsm.pl", - "info.pl", - "mail.pl", - "media.pl", - "miasta.pl", - "mil.pl", - "nieruchomosci.pl", - "nom.pl", - "pc.pl", - "powiat.pl", - "priv.pl", - "realestate.pl", - "rel.pl", - "sex.pl", - "shop.pl", - "sklep.pl", - "sos.pl", - "szkola.pl", - "targi.pl", - "tm.pl", - "tourism.pl", - "travel.pl", - "turystyka.pl", - "gov.pl", - "ap.gov.pl", - "griw.gov.pl", - "ic.gov.pl", - "is.gov.pl", - "kmpsp.gov.pl", - "konsulat.gov.pl", - "kppsp.gov.pl", - "kwp.gov.pl", - "kwpsp.gov.pl", - "mup.gov.pl", - "mw.gov.pl", - "oia.gov.pl", - "oirm.gov.pl", - "oke.gov.pl", - "oow.gov.pl", - "oschr.gov.pl", - "oum.gov.pl", - "pa.gov.pl", - "pinb.gov.pl", - "piw.gov.pl", - "po.gov.pl", - "pr.gov.pl", - "psp.gov.pl", - "psse.gov.pl", - "pup.gov.pl", - "rzgw.gov.pl", - "sa.gov.pl", - "sdn.gov.pl", - "sko.gov.pl", - "so.gov.pl", - "sr.gov.pl", - "starostwo.gov.pl", - "ug.gov.pl", - "ugim.gov.pl", - "um.gov.pl", - "umig.gov.pl", - "upow.gov.pl", - "uppo.gov.pl", - "us.gov.pl", - "uw.gov.pl", - "uzs.gov.pl", - "wif.gov.pl", - "wiih.gov.pl", - "winb.gov.pl", - "wios.gov.pl", - "witd.gov.pl", - "wiw.gov.pl", - "wkz.gov.pl", - "wsa.gov.pl", - "wskr.gov.pl", - "wsse.gov.pl", - "wuoz.gov.pl", - "wzmiuw.gov.pl", - "zp.gov.pl", - "zpisdn.gov.pl", - "augustow.pl", - "babia-gora.pl", - "bedzin.pl", - "beskidy.pl", - "bialowieza.pl", - "bialystok.pl", - "bielawa.pl", - "bieszczady.pl", - "boleslawiec.pl", - "bydgoszcz.pl", - "bytom.pl", - "cieszyn.pl", - "czeladz.pl", - "czest.pl", - "dlugoleka.pl", - "elblag.pl", - "elk.pl", - "glogow.pl", - "gniezno.pl", - "gorlice.pl", - "grajewo.pl", - "ilawa.pl", - "jaworzno.pl", - "jelenia-gora.pl", - "jgora.pl", - "kalisz.pl", - "karpacz.pl", - "kartuzy.pl", - "kaszuby.pl", - "katowice.pl", - "kazimierz-dolny.pl", - "kepno.pl", - "ketrzyn.pl", - "klodzko.pl", - "kobierzyce.pl", - "kolobrzeg.pl", - "konin.pl", - "konskowola.pl", - "kutno.pl", - "lapy.pl", - "lebork.pl", - "legnica.pl", - "lezajsk.pl", - "limanowa.pl", - "lomza.pl", - "lowicz.pl", - "lubin.pl", - "lukow.pl", - "malbork.pl", - "malopolska.pl", - "mazowsze.pl", - "mazury.pl", - "mielec.pl", - "mielno.pl", - "mragowo.pl", - "naklo.pl", - "nowaruda.pl", - "nysa.pl", - "olawa.pl", - "olecko.pl", - "olkusz.pl", - "olsztyn.pl", - "opoczno.pl", - "opole.pl", - "ostroda.pl", - "ostroleka.pl", - "ostrowiec.pl", - "ostrowwlkp.pl", - "pila.pl", - "pisz.pl", - "podhale.pl", - "podlasie.pl", - "polkowice.pl", - "pomorskie.pl", - "pomorze.pl", - "prochowice.pl", - "pruszkow.pl", - "przeworsk.pl", - "pulawy.pl", - "radom.pl", - "rawa-maz.pl", - "rybnik.pl", - "rzeszow.pl", - "sanok.pl", - "sejny.pl", - "skoczow.pl", - "slask.pl", - "slupsk.pl", - "sosnowiec.pl", - "stalowa-wola.pl", - "starachowice.pl", - "stargard.pl", - "suwalki.pl", - "swidnica.pl", - "swiebodzin.pl", - "swinoujscie.pl", - "szczecin.pl", - "szczytno.pl", - "tarnobrzeg.pl", - "tgory.pl", - "turek.pl", - "tychy.pl", - "ustka.pl", - "walbrzych.pl", - "warmia.pl", - "warszawa.pl", - "waw.pl", - "wegrow.pl", - "wielun.pl", - "wlocl.pl", - "wloclawek.pl", - "wodzislaw.pl", - "wolomin.pl", - "wroclaw.pl", - "zachpomor.pl", - "zagan.pl", - "zarow.pl", - "zgora.pl", - "zgorzelec.pl", - "pm", - "pn", - "co.pn", - "edu.pn", - "gov.pn", - "net.pn", - "org.pn", - "post", - "pr", - "biz.pr", - "com.pr", - "edu.pr", - "gov.pr", - "info.pr", - "isla.pr", - "name.pr", - "net.pr", - "org.pr", - "pro.pr", - "ac.pr", - "est.pr", - "prof.pr", - "pro", - "aaa.pro", - "aca.pro", - "acct.pro", - "avocat.pro", - "bar.pro", - "cpa.pro", - "eng.pro", - "jur.pro", - "law.pro", - "med.pro", - "recht.pro", - "ps", - "com.ps", - "edu.ps", - "gov.ps", - "net.ps", - "org.ps", - "plo.ps", - "sec.ps", - "pt", - "com.pt", - "edu.pt", - "gov.pt", - "int.pt", - "net.pt", - "nome.pt", - "org.pt", - "publ.pt", - "pw", - "belau.pw", - "co.pw", - "ed.pw", - "go.pw", - "or.pw", - "py", - "com.py", - "coop.py", - "edu.py", - "gov.py", - "mil.py", - "net.py", - "org.py", - "qa", - "com.qa", - "edu.qa", - "gov.qa", - "mil.qa", - "name.qa", - "net.qa", - "org.qa", - "sch.qa", - "re", - "asso.re", - "com.re", - "ro", - "arts.ro", - "com.ro", - "firm.ro", - "info.ro", - "nom.ro", - "nt.ro", - "org.ro", - "rec.ro", - "store.ro", - "tm.ro", - "www.ro", - "rs", - "ac.rs", - "co.rs", - "edu.rs", - "gov.rs", - "in.rs", - "org.rs", - "ru", - "rw", - "ac.rw", - "co.rw", - "coop.rw", - "gov.rw", - "mil.rw", - "net.rw", - "org.rw", - "sa", - "com.sa", - "edu.sa", - "gov.sa", - "med.sa", - "net.sa", - "org.sa", - "pub.sa", - "sch.sa", - "sb", - "com.sb", - "edu.sb", - "gov.sb", - "net.sb", - "org.sb", - "sc", - "com.sc", - "edu.sc", - "gov.sc", - "net.sc", - "org.sc", - "sd", - "com.sd", - "edu.sd", - "gov.sd", - "info.sd", - "med.sd", - "net.sd", - "org.sd", - "tv.sd", - "se", - "a.se", - "ac.se", - "b.se", - "bd.se", - "brand.se", - "c.se", - "d.se", - "e.se", - "f.se", - "fh.se", - "fhsk.se", - "fhv.se", - "g.se", - "h.se", - "i.se", - "k.se", - "komforb.se", - "kommunalforbund.se", - "komvux.se", - "l.se", - "lanbib.se", - "m.se", - "n.se", - "naturbruksgymn.se", - "o.se", - "org.se", - "p.se", - "parti.se", - "pp.se", - "press.se", - "r.se", - "s.se", - "t.se", - "tm.se", - "u.se", - "w.se", - "x.se", - "y.se", - "z.se", - "sg", - "com.sg", - "edu.sg", - "gov.sg", - "net.sg", - "org.sg", - "sh", - "com.sh", - "gov.sh", - "mil.sh", - "net.sh", - "org.sh", - "si", - "sj", - "sk", - "sl", - "com.sl", - "edu.sl", - "gov.sl", - "net.sl", - "org.sl", - "sm", - "sn", - "art.sn", - "com.sn", - "edu.sn", - "gouv.sn", - "org.sn", - "perso.sn", - "univ.sn", - "so", - "com.so", - "edu.so", - "gov.so", - "me.so", - "net.so", - "org.so", - "sr", - "ss", - "biz.ss", - "co.ss", - "com.ss", - "edu.ss", - "gov.ss", - "me.ss", - "net.ss", - "org.ss", - "sch.ss", - "st", - "co.st", - "com.st", - "consulado.st", - "edu.st", - "embaixada.st", - "mil.st", - "net.st", - "org.st", - "principe.st", - "saotome.st", - "store.st", - "su", - "sv", - "com.sv", - "edu.sv", - "gob.sv", - "org.sv", - "red.sv", - "sx", - "gov.sx", - "sy", - "com.sy", - "edu.sy", - "gov.sy", - "mil.sy", - "net.sy", - "org.sy", - "sz", - "ac.sz", - "co.sz", - "org.sz", - "tc", - "td", - "tel", - "tf", - "tg", - "th", - "ac.th", - "co.th", - "go.th", - "in.th", - "mi.th", - "net.th", - "or.th", - "tj", - "ac.tj", - "biz.tj", - "co.tj", - "com.tj", - "edu.tj", - "go.tj", - "gov.tj", - "int.tj", - "mil.tj", - "name.tj", - "net.tj", - "nic.tj", - "org.tj", - "test.tj", - "web.tj", - "tk", - "tl", - "gov.tl", - "tm", - "co.tm", - "com.tm", - "edu.tm", - "gov.tm", - "mil.tm", - "net.tm", - "nom.tm", - "org.tm", - "tn", - "com.tn", - "ens.tn", - "fin.tn", - "gov.tn", - "ind.tn", - "info.tn", - "intl.tn", - "mincom.tn", - "nat.tn", - "net.tn", - "org.tn", - "perso.tn", - "tourism.tn", - "to", - "com.to", - "edu.to", - "gov.to", - "mil.to", - "net.to", - "org.to", - "tr", - "av.tr", - "bbs.tr", - "bel.tr", - "biz.tr", - "com.tr", - "dr.tr", - "edu.tr", - "gen.tr", - "gov.tr", - "info.tr", - "k12.tr", - "kep.tr", - "mil.tr", - "name.tr", - "net.tr", - "org.tr", - "pol.tr", - "tel.tr", - "tsk.tr", - "tv.tr", - "web.tr", - "nc.tr", - "gov.nc.tr", - "tt", - "biz.tt", - "co.tt", - "com.tt", - "edu.tt", - "gov.tt", - "info.tt", - "mil.tt", - "name.tt", - "net.tt", - "org.tt", - "pro.tt", - "tv", - "tw", - "club.tw", - "com.tw", - "ebiz.tw", - "edu.tw", - "game.tw", - "gov.tw", - "idv.tw", - "mil.tw", - "net.tw", - "org.tw", - "tz", - "ac.tz", - "co.tz", - "go.tz", - "hotel.tz", - "info.tz", - "me.tz", - "mil.tz", - "mobi.tz", - "ne.tz", - "or.tz", - "sc.tz", - "tv.tz", - "ua", - "com.ua", - "edu.ua", - "gov.ua", - "in.ua", - "net.ua", - "org.ua", - "cherkassy.ua", - "cherkasy.ua", - "chernigov.ua", - "chernihiv.ua", - "chernivtsi.ua", - "chernovtsy.ua", - "ck.ua", - "cn.ua", - "cr.ua", - "crimea.ua", - "cv.ua", - "dn.ua", - "dnepropetrovsk.ua", - "dnipropetrovsk.ua", - "donetsk.ua", - "dp.ua", - "if.ua", - "ivano-frankivsk.ua", - "kh.ua", - "kharkiv.ua", - "kharkov.ua", - "kherson.ua", - "khmelnitskiy.ua", - "khmelnytskyi.ua", - "kiev.ua", - "kirovograd.ua", - "km.ua", - "kr.ua", - "kropyvnytskyi.ua", - "krym.ua", - "ks.ua", - "kv.ua", - "kyiv.ua", - "lg.ua", - "lt.ua", - "lugansk.ua", - "luhansk.ua", - "lutsk.ua", - "lv.ua", - "lviv.ua", - "mk.ua", - "mykolaiv.ua", - "nikolaev.ua", - "od.ua", - "odesa.ua", - "odessa.ua", - "pl.ua", - "poltava.ua", - "rivne.ua", - "rovno.ua", - "rv.ua", - "sb.ua", - "sebastopol.ua", - "sevastopol.ua", - "sm.ua", - "sumy.ua", - "te.ua", - "ternopil.ua", - "uz.ua", - "uzhgorod.ua", - "uzhhorod.ua", - "vinnica.ua", - "vinnytsia.ua", - "vn.ua", - "volyn.ua", - "yalta.ua", - "zakarpattia.ua", - "zaporizhzhe.ua", - "zaporizhzhia.ua", - "zhitomir.ua", - "zhytomyr.ua", - "zp.ua", - "zt.ua", - "ug", - "ac.ug", - "co.ug", - "com.ug", - "go.ug", - "ne.ug", - "or.ug", - "org.ug", - "sc.ug", - "uk", - "ac.uk", - "co.uk", - "gov.uk", - "ltd.uk", - "me.uk", - "net.uk", - "nhs.uk", - "org.uk", - "plc.uk", - "police.uk", - "*.sch.uk", - "us", - "dni.us", - "fed.us", - "isa.us", - "kids.us", - "nsn.us", - "ak.us", - "al.us", - "ar.us", - "as.us", - "az.us", - "ca.us", - "co.us", - "ct.us", - "dc.us", - "de.us", - "fl.us", - "ga.us", - "gu.us", - "hi.us", - "ia.us", - "id.us", - "il.us", - "in.us", - "ks.us", - "ky.us", - "la.us", - "ma.us", - "md.us", - "me.us", - "mi.us", - "mn.us", - "mo.us", - "ms.us", - "mt.us", - "nc.us", - "nd.us", - "ne.us", - "nh.us", - "nj.us", - "nm.us", - "nv.us", - "ny.us", - "oh.us", - "ok.us", - "or.us", - "pa.us", - "pr.us", - "ri.us", - "sc.us", - "sd.us", - "tn.us", - "tx.us", - "ut.us", - "va.us", - "vi.us", - "vt.us", - "wa.us", - "wi.us", - "wv.us", - "wy.us", - "k12.ak.us", - "k12.al.us", - "k12.ar.us", - "k12.as.us", - "k12.az.us", - "k12.ca.us", - "k12.co.us", - "k12.ct.us", - "k12.dc.us", - "k12.fl.us", - "k12.ga.us", - "k12.gu.us", - "k12.ia.us", - "k12.id.us", - "k12.il.us", - "k12.in.us", - "k12.ks.us", - "k12.ky.us", - "k12.la.us", - "k12.ma.us", - "k12.md.us", - "k12.me.us", - "k12.mi.us", - "k12.mn.us", - "k12.mo.us", - "k12.ms.us", - "k12.mt.us", - "k12.nc.us", - "k12.ne.us", - "k12.nh.us", - "k12.nj.us", - "k12.nm.us", - "k12.nv.us", - "k12.ny.us", - "k12.oh.us", - "k12.ok.us", - "k12.or.us", - "k12.pa.us", - "k12.pr.us", - "k12.sc.us", - "k12.tn.us", - "k12.tx.us", - "k12.ut.us", - "k12.va.us", - "k12.vi.us", - "k12.vt.us", - "k12.wa.us", - "k12.wi.us", - "cc.ak.us", - "lib.ak.us", - "cc.al.us", - "lib.al.us", - "cc.ar.us", - "lib.ar.us", - "cc.as.us", - "lib.as.us", - "cc.az.us", - "lib.az.us", - "cc.ca.us", - "lib.ca.us", - "cc.co.us", - "lib.co.us", - "cc.ct.us", - "lib.ct.us", - "cc.dc.us", - "lib.dc.us", - "cc.de.us", - "cc.fl.us", - "cc.ga.us", - "cc.gu.us", - "cc.hi.us", - "cc.ia.us", - "cc.id.us", - "cc.il.us", - "cc.in.us", - "cc.ks.us", - "cc.ky.us", - "cc.la.us", - "cc.ma.us", - "cc.md.us", - "cc.me.us", - "cc.mi.us", - "cc.mn.us", - "cc.mo.us", - "cc.ms.us", - "cc.mt.us", - "cc.nc.us", - "cc.nd.us", - "cc.ne.us", - "cc.nh.us", - "cc.nj.us", - "cc.nm.us", - "cc.nv.us", - "cc.ny.us", - "cc.oh.us", - "cc.ok.us", - "cc.or.us", - "cc.pa.us", - "cc.pr.us", - "cc.ri.us", - "cc.sc.us", - "cc.sd.us", - "cc.tn.us", - "cc.tx.us", - "cc.ut.us", - "cc.va.us", - "cc.vi.us", - "cc.vt.us", - "cc.wa.us", - "cc.wi.us", - "cc.wv.us", - "cc.wy.us", - "k12.wy.us", - "lib.fl.us", - "lib.ga.us", - "lib.gu.us", - "lib.hi.us", - "lib.ia.us", - "lib.id.us", - "lib.il.us", - "lib.in.us", - "lib.ks.us", - "lib.ky.us", - "lib.la.us", - "lib.ma.us", - "lib.md.us", - "lib.me.us", - "lib.mi.us", - "lib.mn.us", - "lib.mo.us", - "lib.ms.us", - "lib.mt.us", - "lib.nc.us", - "lib.nd.us", - "lib.ne.us", - "lib.nh.us", - "lib.nj.us", - "lib.nm.us", - "lib.nv.us", - "lib.ny.us", - "lib.oh.us", - "lib.ok.us", - "lib.or.us", - "lib.pa.us", - "lib.pr.us", - "lib.ri.us", - "lib.sc.us", - "lib.sd.us", - "lib.tn.us", - "lib.tx.us", - "lib.ut.us", - "lib.va.us", - "lib.vi.us", - "lib.vt.us", - "lib.wa.us", - "lib.wi.us", - "lib.wy.us", - "chtr.k12.ma.us", - "paroch.k12.ma.us", - "pvt.k12.ma.us", - "ann-arbor.mi.us", - "cog.mi.us", - "dst.mi.us", - "eaton.mi.us", - "gen.mi.us", - "mus.mi.us", - "tec.mi.us", - "washtenaw.mi.us", - "uy", - "com.uy", - "edu.uy", - "gub.uy", - "mil.uy", - "net.uy", - "org.uy", - "uz", - "co.uz", - "com.uz", - "net.uz", - "org.uz", - "va", - "vc", - "com.vc", - "edu.vc", - "gov.vc", - "mil.vc", - "net.vc", - "org.vc", - "ve", - "arts.ve", - "bib.ve", - "co.ve", - "com.ve", - "e12.ve", - "edu.ve", - "firm.ve", - "gob.ve", - "gov.ve", - "info.ve", - "int.ve", - "mil.ve", - "net.ve", - "nom.ve", - "org.ve", - "rar.ve", - "rec.ve", - "store.ve", - "tec.ve", - "web.ve", - "vg", - "vi", - "co.vi", - "com.vi", - "k12.vi", - "net.vi", - "org.vi", - "vn", - "ac.vn", - "ai.vn", - "biz.vn", - "com.vn", - "edu.vn", - "gov.vn", - "health.vn", - "id.vn", - "info.vn", - "int.vn", - "io.vn", - "name.vn", - "net.vn", - "org.vn", - "pro.vn", - "angiang.vn", - "bacgiang.vn", - "backan.vn", - "baclieu.vn", - "bacninh.vn", - "baria-vungtau.vn", - "bentre.vn", - "binhdinh.vn", - "binhduong.vn", - "binhphuoc.vn", - "binhthuan.vn", - "camau.vn", - "cantho.vn", - "caobang.vn", - "daklak.vn", - "daknong.vn", - "danang.vn", - "dienbien.vn", - "dongnai.vn", - "dongthap.vn", - "gialai.vn", - "hagiang.vn", - "haiduong.vn", - "haiphong.vn", - "hanam.vn", - "hanoi.vn", - "hatinh.vn", - "haugiang.vn", - "hoabinh.vn", - "hungyen.vn", - "khanhhoa.vn", - "kiengiang.vn", - "kontum.vn", - "laichau.vn", - "lamdong.vn", - "langson.vn", - "laocai.vn", - "longan.vn", - "namdinh.vn", - "nghean.vn", - "ninhbinh.vn", - "ninhthuan.vn", - "phutho.vn", - "phuyen.vn", - "quangbinh.vn", - "quangnam.vn", - "quangngai.vn", - "quangninh.vn", - "quangtri.vn", - "soctrang.vn", - "sonla.vn", - "tayninh.vn", - "thaibinh.vn", - "thainguyen.vn", - "thanhhoa.vn", - "thanhphohochiminh.vn", - "thuathienhue.vn", - "tiengiang.vn", - "travinh.vn", - "tuyenquang.vn", - "vinhlong.vn", - "vinhphuc.vn", - "yenbai.vn", - "vu", - "com.vu", - "edu.vu", - "net.vu", - "org.vu", - "wf", - "ws", - "com.ws", - "edu.ws", - "gov.ws", - "net.ws", - "org.ws", - "yt", - "امارات", - "հայ", - "বাংলা", - "бг", - "البحرين", - "бел", - "中国", - "中國", - "الجزائر", - "مصر", - "ею", - "ευ", - "موريتانيا", - "გე", - "ελ", - "香港", - "個人.香港", - "公司.香港", - "政府.香港", - "教育.香港", - "組織.香港", - "網絡.香港", - "ಭಾರತ", - "ଭାରତ", - "ভাৰত", - "भारतम्", - "भारोत", - "ڀارت", - "ഭാരതം", - "भारत", - "بارت", - "بھارت", - "భారత్", - "ભારત", - "ਭਾਰਤ", - "ভারত", - "இந்தியா", - "ایران", - "ايران", - "عراق", - "الاردن", - "한국", - "қаз", - "ລາວ", - "ලංකා", - "இலங்கை", - "المغرب", - "мкд", - "мон", - "澳門", - "澳门", - "مليسيا", - "عمان", - "پاکستان", - "پاكستان", - "فلسطين", - "срб", - "ак.срб", - "обр.срб", - "од.срб", - "орг.срб", - "пр.срб", - "упр.срб", - "рф", - "قطر", - "السعودية", - "السعودیة", - "السعودیۃ", - "السعوديه", - "سودان", - "新加坡", - "சிங்கப்பூர்", - "سورية", - "سوريا", - "ไทย", - "ทหาร.ไทย", - "ธุรกิจ.ไทย", - "เน็ต.ไทย", - "รัฐบาล.ไทย", - "ศึกษา.ไทย", - "องค์กร.ไทย", - "تونس", - "台灣", - "台湾", - "臺灣", - "укр", - "اليمن", - "xxx", - "ye", - "com.ye", - "edu.ye", - "gov.ye", - "mil.ye", - "net.ye", - "org.ye", - "ac.za", - "agric.za", - "alt.za", - "co.za", - "edu.za", - "gov.za", - "grondar.za", - "law.za", - "mil.za", - "net.za", - "ngo.za", - "nic.za", - "nis.za", - "nom.za", - "org.za", - "school.za", - "tm.za", - "web.za", - "zm", - "ac.zm", - "biz.zm", - "co.zm", - "com.zm", - "edu.zm", - "gov.zm", - "info.zm", - "mil.zm", - "net.zm", - "org.zm", - "sch.zm", - "zw", - "ac.zw", - "co.zw", - "gov.zw", - "mil.zw", - "org.zw", - "aaa", - "aarp", - "abb", - "abbott", - "abbvie", - "abc", - "able", - "abogado", - "abudhabi", - "academy", - "accenture", - "accountant", - "accountants", - "aco", - "actor", - "ads", - "adult", - "aeg", - "aetna", - "afl", - "africa", - "agakhan", - "agency", - "aig", - "airbus", - "airforce", - "airtel", - "akdn", - "alibaba", - "alipay", - "allfinanz", - "allstate", - "ally", - "alsace", - "alstom", - "amazon", - "americanexpress", - "americanfamily", - "amex", - "amfam", - "amica", - "amsterdam", - "analytics", - "android", - "anquan", - "anz", - "aol", - "apartments", - "app", - "apple", - "aquarelle", - "arab", - "aramco", - "archi", - "army", - "art", - "arte", - "asda", - "associates", - "athleta", - "attorney", - "auction", - "audi", - "audible", - "audio", - "auspost", - "author", - "auto", - "autos", - "aws", - "axa", - "azure", - "baby", - "baidu", - "banamex", - "band", - "bank", - "bar", - "barcelona", - "barclaycard", - "barclays", - "barefoot", - "bargains", - "baseball", - "basketball", - "bauhaus", - "bayern", - "bbc", - "bbt", - "bbva", - "bcg", - "bcn", - "beats", - "beauty", - "beer", - "bentley", - "berlin", - "best", - "bestbuy", - "bet", - "bharti", - "bible", - "bid", - "bike", - "bing", - "bingo", - "bio", - "black", - "blackfriday", - "blockbuster", - "blog", - "bloomberg", - "blue", - "bms", - "bmw", - "bnpparibas", - "boats", - "boehringer", - "bofa", - "bom", - "bond", - "boo", - "book", - "booking", - "bosch", - "bostik", - "boston", - "bot", - "boutique", - "box", - "bradesco", - "bridgestone", - "broadway", - "broker", - "brother", - "brussels", - "build", - "builders", - "business", - "buy", - "buzz", - "bzh", - "cab", - "cafe", - "cal", - "call", - "calvinklein", - "cam", - "camera", - "camp", - "canon", - "capetown", - "capital", - "capitalone", - "car", - "caravan", - "cards", - "care", - "career", - "careers", - "cars", - "casa", - "case", - "cash", - "casino", - "catering", - "catholic", - "cba", - "cbn", - "cbre", - "center", - "ceo", - "cern", - "cfa", - "cfd", - "chanel", - "channel", - "charity", - "chase", - "chat", - "cheap", - "chintai", - "christmas", - "chrome", - "church", - "cipriani", - "circle", - "cisco", - "citadel", - "citi", - "citic", - "city", - "claims", - "cleaning", - "click", - "clinic", - "clinique", - "clothing", - "cloud", - "club", - "clubmed", - "coach", - "codes", - "coffee", - "college", - "cologne", - "commbank", - "community", - "company", - "compare", - "computer", - "comsec", - "condos", - "construction", - "consulting", - "contact", - "contractors", - "cooking", - "cool", - "corsica", - "country", - "coupon", - "coupons", - "courses", - "cpa", - "credit", - "creditcard", - "creditunion", - "cricket", - "crown", - "crs", - "cruise", - "cruises", - "cuisinella", - "cymru", - "cyou", - "dad", - "dance", - "data", - "date", - "dating", - "datsun", - "day", - "dclk", - "dds", - "deal", - "dealer", - "deals", - "degree", - "delivery", - "dell", - "deloitte", - "delta", - "democrat", - "dental", - "dentist", - "desi", - "design", - "dev", - "dhl", - "diamonds", - "diet", - "digital", - "direct", - "directory", - "discount", - "discover", - "dish", - "diy", - "dnp", - "docs", - "doctor", - "dog", - "domains", - "dot", - "download", - "drive", - "dtv", - "dubai", - "dunlop", - "dupont", - "durban", - "dvag", - "dvr", - "earth", - "eat", - "eco", - "edeka", - "education", - "email", - "emerck", - "energy", - "engineer", - "engineering", - "enterprises", - "epson", - "equipment", - "ericsson", - "erni", - "esq", - "estate", - "eurovision", - "eus", - "events", - "exchange", - "expert", - "exposed", - "express", - "extraspace", - "fage", - "fail", - "fairwinds", - "faith", - "family", - "fan", - "fans", - "farm", - "farmers", - "fashion", - "fast", - "fedex", - "feedback", - "ferrari", - "ferrero", - "fidelity", - "fido", - "film", - "final", - "finance", - "financial", - "fire", - "firestone", - "firmdale", - "fish", - "fishing", - "fit", - "fitness", - "flickr", - "flights", - "flir", - "florist", - "flowers", - "fly", - "foo", - "food", - "football", - "ford", - "forex", - "forsale", - "forum", - "foundation", - "fox", - "free", - "fresenius", - "frl", - "frogans", - "frontier", - "ftr", - "fujitsu", - "fun", - "fund", - "furniture", - "futbol", - "fyi", - "gal", - "gallery", - "gallo", - "gallup", - "game", - "games", - "gap", - "garden", - "gay", - "gbiz", - "gdn", - "gea", - "gent", - "genting", - "george", - "ggee", - "gift", - "gifts", - "gives", - "giving", - "glass", - "gle", - "global", - "globo", - "gmail", - "gmbh", - "gmo", - "gmx", - "godaddy", - "gold", - "goldpoint", - "golf", - "goo", - "goodyear", - "goog", - "google", - "gop", - "got", - "grainger", - "graphics", - "gratis", - "green", - "gripe", - "grocery", - "group", - "gucci", - "guge", - "guide", - "guitars", - "guru", - "hair", - "hamburg", - "hangout", - "haus", - "hbo", - "hdfc", - "hdfcbank", - "health", - "healthcare", - "help", - "helsinki", - "here", - "hermes", - "hiphop", - "hisamitsu", - "hitachi", - "hiv", - "hkt", - "hockey", - "holdings", - "holiday", - "homedepot", - "homegoods", - "homes", - "homesense", - "honda", - "horse", - "hospital", - "host", - "hosting", - "hot", - "hotels", - "hotmail", - "house", - "how", - "hsbc", - "hughes", - "hyatt", - "hyundai", - "ibm", - "icbc", - "ice", - "icu", - "ieee", - "ifm", - "ikano", - "imamat", - "imdb", - "immo", - "immobilien", - "inc", - "industries", - "infiniti", - "ing", - "ink", - "institute", - "insurance", - "insure", - "international", - "intuit", - "investments", - "ipiranga", - "irish", - "ismaili", - "ist", - "istanbul", - "itau", - "itv", - "jaguar", - "java", - "jcb", - "jeep", - "jetzt", - "jewelry", - "jio", - "jll", - "jmp", - "jnj", - "joburg", - "jot", - "joy", - "jpmorgan", - "jprs", - "juegos", - "juniper", - "kaufen", - "kddi", - "kerryhotels", - "kerrylogistics", - "kerryproperties", - "kfh", - "kia", - "kids", - "kim", - "kindle", - "kitchen", - "kiwi", - "koeln", - "komatsu", - "kosher", - "kpmg", - "kpn", - "krd", - "kred", - "kuokgroup", - "kyoto", - "lacaixa", - "lamborghini", - "lamer", - "lancaster", - "land", - "landrover", - "lanxess", - "lasalle", - "lat", - "latino", - "latrobe", - "law", - "lawyer", - "lds", - "lease", - "leclerc", - "lefrak", - "legal", - "lego", - "lexus", - "lgbt", - "lidl", - "life", - "lifeinsurance", - "lifestyle", - "lighting", - "like", - "lilly", - "limited", - "limo", - "lincoln", - "link", - "lipsy", - "live", - "living", - "llc", - "llp", - "loan", - "loans", - "locker", - "locus", - "lol", - "london", - "lotte", - "lotto", - "love", - "lpl", - "lplfinancial", - "ltd", - "ltda", - "lundbeck", - "luxe", - "luxury", - "madrid", - "maif", - "maison", - "makeup", - "man", - "management", - "mango", - "map", - "market", - "marketing", - "markets", - "marriott", - "marshalls", - "mattel", - "mba", - "mckinsey", - "med", - "media", - "meet", - "melbourne", - "meme", - "memorial", - "men", - "menu", - "merck", - "merckmsd", - "miami", - "microsoft", - "mini", - "mint", - "mit", - "mitsubishi", - "mlb", - "mls", - "mma", - "mobile", - "moda", - "moe", - "moi", - "mom", - "monash", - "money", - "monster", - "mormon", - "mortgage", - "moscow", - "moto", - "motorcycles", - "mov", - "movie", - "msd", - "mtn", - "mtr", - "music", - "nab", - "nagoya", - "navy", - "nba", - "nec", - "netbank", - "netflix", - "network", - "neustar", - "new", - "news", - "next", - "nextdirect", - "nexus", - "nfl", - "ngo", - "nhk", - "nico", - "nike", - "nikon", - "ninja", - "nissan", - "nissay", - "nokia", - "norton", - "now", - "nowruz", - "nowtv", - "nra", - "nrw", - "ntt", - "nyc", - "obi", - "observer", - "office", - "okinawa", - "olayan", - "olayangroup", - "ollo", - "omega", - "one", - "ong", - "onl", - "online", - "ooo", - "open", - "oracle", - "orange", - "organic", - "origins", - "osaka", - "otsuka", - "ott", - "ovh", - "page", - "panasonic", - "paris", - "pars", - "partners", - "parts", - "party", - "pay", - "pccw", - "pet", - "pfizer", - "pharmacy", - "phd", - "philips", - "phone", - "photo", - "photography", - "photos", - "physio", - "pics", - "pictet", - "pictures", - "pid", - "pin", - "ping", - "pink", - "pioneer", - "pizza", - "place", - "play", - "playstation", - "plumbing", - "plus", - "pnc", - "pohl", - "poker", - "politie", - "porn", - "pramerica", - "praxi", - "press", - "prime", - "prod", - "productions", - "prof", - "progressive", - "promo", - "properties", - "property", - "protection", - "pru", - "prudential", - "pub", - "pwc", - "qpon", - "quebec", - "quest", - "racing", - "radio", - "read", - "realestate", - "realtor", - "realty", - "recipes", - "red", - "redstone", - "redumbrella", - "rehab", - "reise", - "reisen", - "reit", - "reliance", - "ren", - "rent", - "rentals", - "repair", - "report", - "republican", - "rest", - "restaurant", - "review", - "reviews", - "rexroth", - "rich", - "richardli", - "ricoh", - "ril", - "rio", - "rip", - "rocks", - "rodeo", - "rogers", - "room", - "rsvp", - "rugby", - "ruhr", - "run", - "rwe", - "ryukyu", - "saarland", - "safe", - "safety", - "sakura", - "sale", - "salon", - "samsclub", - "samsung", - "sandvik", - "sandvikcoromant", - "sanofi", - "sap", - "sarl", - "sas", - "save", - "saxo", - "sbi", - "sbs", - "scb", - "schaeffler", - "schmidt", - "scholarships", - "school", - "schule", - "schwarz", - "science", - "scot", - "search", - "seat", - "secure", - "security", - "seek", - "select", - "sener", - "services", - "seven", - "sew", - "sex", - "sexy", - "sfr", - "shangrila", - "sharp", - "shell", - "shia", - "shiksha", - "shoes", - "shop", - "shopping", - "shouji", - "show", - "silk", - "sina", - "singles", - "site", - "ski", - "skin", - "sky", - "skype", - "sling", - "smart", - "smile", - "sncf", - "soccer", - "social", - "softbank", - "software", - "sohu", - "solar", - "solutions", - "song", - "sony", - "soy", - "spa", - "space", - "sport", - "spot", - "srl", - "stada", - "staples", - "star", - "statebank", - "statefarm", - "stc", - "stcgroup", - "stockholm", - "storage", - "store", - "stream", - "studio", - "study", - "style", - "sucks", - "supplies", - "supply", - "support", - "surf", - "surgery", - "suzuki", - "swatch", - "swiss", - "sydney", - "systems", - "tab", - "taipei", - "talk", - "taobao", - "target", - "tatamotors", - "tatar", - "tattoo", - "tax", - "taxi", - "tci", - "tdk", - "team", - "tech", - "technology", - "temasek", - "tennis", - "teva", - "thd", - "theater", - "theatre", - "tiaa", - "tickets", - "tienda", - "tips", - "tires", - "tirol", - "tjmaxx", - "tjx", - "tkmaxx", - "tmall", - "today", - "tokyo", - "tools", - "top", - "toray", - "toshiba", - "total", - "tours", - "town", - "toyota", - "toys", - "trade", - "trading", - "training", - "travel", - "travelers", - "travelersinsurance", - "trust", - "trv", - "tube", - "tui", - "tunes", - "tushu", - "tvs", - "ubank", - "ubs", - "unicom", - "university", - "uno", - "uol", - "ups", - "vacations", - "vana", - "vanguard", - "vegas", - "ventures", - "verisign", - "versicherung", - "vet", - "viajes", - "video", - "vig", - "viking", - "villas", - "vin", - "vip", - "virgin", - "visa", - "vision", - "viva", - "vivo", - "vlaanderen", - "vodka", - "volvo", - "vote", - "voting", - "voto", - "voyage", - "wales", - "walmart", - "walter", - "wang", - "wanggou", - "watch", - "watches", - "weather", - "weatherchannel", - "webcam", - "weber", - "website", - "wed", - "wedding", - "weibo", - "weir", - "whoswho", - "wien", - "wiki", - "williamhill", - "win", - "windows", - "wine", - "winners", - "wme", - "wolterskluwer", - "woodside", - "work", - "works", - "world", - "wow", - "wtc", - "wtf", - "xbox", - "xerox", - "xihuan", - "xin", - "कॉम", - "セール", - "佛山", - "慈善", - "集团", - "在线", - "点看", - "คอม", - "八卦", - "موقع", - "公益", - "公司", - "香格里拉", - "网站", - "移动", - "我爱你", - "москва", - "католик", - "онлайн", - "сайт", - "联通", - "קום", - "时尚", - "微博", - "淡马锡", - "ファッション", - "орг", - "नेट", - "ストア", - "アマゾン", - "삼성", - "商标", - "商店", - "商城", - "дети", - "ポイント", - "新闻", - "家電", - "كوم", - "中文网", - "中信", - "娱乐", - "谷歌", - "電訊盈科", - "购物", - "クラウド", - "通販", - "网店", - "संगठन", - "餐厅", - "网络", - "ком", - "亚马逊", - "食品", - "飞利浦", - "手机", - "ارامكو", - "العليان", - "بازار", - "ابوظبي", - "كاثوليك", - "همراه", - "닷컴", - "政府", - "شبكة", - "بيتك", - "عرب", - "机构", - "组织机构", - "健康", - "招聘", - "рус", - "大拿", - "みんな", - "グーグル", - "世界", - "書籍", - "网址", - "닷넷", - "コム", - "天主教", - "游戏", - "vermögensberater", - "vermögensberatung", - "企业", - "信息", - "嘉里大酒店", - "嘉里", - "广东", - "政务", - "xyz", - "yachts", - "yahoo", - "yamaxun", - "yandex", - "yodobashi", - "yoga", - "yokohama", - "you", - "youtube", - "yun", - "zappos", - "zara", - "zero", - "zip", - "zone", - "zuerich", - "co.krd", - "edu.krd", - "art.pl", - "gliwice.pl", - "krakow.pl", - "poznan.pl", - "wroc.pl", - "zakopane.pl", - "lib.de.us", - "12chars.dev", - "12chars.it", - "12chars.pro", - "cc.ua", - "inf.ua", - "ltd.ua", - "611.to", - "a2hosted.com", - "cpserver.com", - "aaa.vodka", - "*.on-acorn.io", - "activetrail.biz", - "adaptable.app", - "adobeaemcloud.com", - "*.dev.adobeaemcloud.com", - "aem.live", - "hlx.live", - "adobeaemcloud.net", - "aem.page", - "hlx.page", - "hlx3.page", - "adobeio-static.net", - "adobeioruntime.net", - "africa.com", - "beep.pl", - "airkitapps.com", - "airkitapps-au.com", - "airkitapps.eu", - "aivencloud.com", - "akadns.net", - "akamai.net", - "akamai-staging.net", - "akamaiedge.net", - "akamaiedge-staging.net", - "akamaihd.net", - "akamaihd-staging.net", - "akamaiorigin.net", - "akamaiorigin-staging.net", - "akamaized.net", - "akamaized-staging.net", - "edgekey.net", - "edgekey-staging.net", - "edgesuite.net", - "edgesuite-staging.net", - "barsy.ca", - "*.compute.estate", - "*.alces.network", - "kasserver.com", - "altervista.org", - "alwaysdata.net", - "myamaze.net", - "execute-api.cn-north-1.amazonaws.com.cn", - "execute-api.cn-northwest-1.amazonaws.com.cn", - "execute-api.af-south-1.amazonaws.com", - "execute-api.ap-east-1.amazonaws.com", - "execute-api.ap-northeast-1.amazonaws.com", - "execute-api.ap-northeast-2.amazonaws.com", - "execute-api.ap-northeast-3.amazonaws.com", - "execute-api.ap-south-1.amazonaws.com", - "execute-api.ap-south-2.amazonaws.com", - "execute-api.ap-southeast-1.amazonaws.com", - "execute-api.ap-southeast-2.amazonaws.com", - "execute-api.ap-southeast-3.amazonaws.com", - "execute-api.ap-southeast-4.amazonaws.com", - "execute-api.ap-southeast-5.amazonaws.com", - "execute-api.ca-central-1.amazonaws.com", - "execute-api.ca-west-1.amazonaws.com", - "execute-api.eu-central-1.amazonaws.com", - "execute-api.eu-central-2.amazonaws.com", - "execute-api.eu-north-1.amazonaws.com", - "execute-api.eu-south-1.amazonaws.com", - "execute-api.eu-south-2.amazonaws.com", - "execute-api.eu-west-1.amazonaws.com", - "execute-api.eu-west-2.amazonaws.com", - "execute-api.eu-west-3.amazonaws.com", - "execute-api.il-central-1.amazonaws.com", - "execute-api.me-central-1.amazonaws.com", - "execute-api.me-south-1.amazonaws.com", - "execute-api.sa-east-1.amazonaws.com", - "execute-api.us-east-1.amazonaws.com", - "execute-api.us-east-2.amazonaws.com", - "execute-api.us-gov-east-1.amazonaws.com", - "execute-api.us-gov-west-1.amazonaws.com", - "execute-api.us-west-1.amazonaws.com", - "execute-api.us-west-2.amazonaws.com", - "cloudfront.net", - "auth.af-south-1.amazoncognito.com", - "auth.ap-east-1.amazoncognito.com", - "auth.ap-northeast-1.amazoncognito.com", - "auth.ap-northeast-2.amazoncognito.com", - "auth.ap-northeast-3.amazoncognito.com", - "auth.ap-south-1.amazoncognito.com", - "auth.ap-south-2.amazoncognito.com", - "auth.ap-southeast-1.amazoncognito.com", - "auth.ap-southeast-2.amazoncognito.com", - "auth.ap-southeast-3.amazoncognito.com", - "auth.ap-southeast-4.amazoncognito.com", - "auth.ca-central-1.amazoncognito.com", - "auth.ca-west-1.amazoncognito.com", - "auth.eu-central-1.amazoncognito.com", - "auth.eu-central-2.amazoncognito.com", - "auth.eu-north-1.amazoncognito.com", - "auth.eu-south-1.amazoncognito.com", - "auth.eu-south-2.amazoncognito.com", - "auth.eu-west-1.amazoncognito.com", - "auth.eu-west-2.amazoncognito.com", - "auth.eu-west-3.amazoncognito.com", - "auth.il-central-1.amazoncognito.com", - "auth.me-central-1.amazoncognito.com", - "auth.me-south-1.amazoncognito.com", - "auth.sa-east-1.amazoncognito.com", - "auth.us-east-1.amazoncognito.com", - "auth-fips.us-east-1.amazoncognito.com", - "auth.us-east-2.amazoncognito.com", - "auth-fips.us-east-2.amazoncognito.com", - "auth-fips.us-gov-west-1.amazoncognito.com", - "auth.us-west-1.amazoncognito.com", - "auth-fips.us-west-1.amazoncognito.com", - "auth.us-west-2.amazoncognito.com", - "auth-fips.us-west-2.amazoncognito.com", - "*.compute.amazonaws.com.cn", - "*.compute.amazonaws.com", - "*.compute-1.amazonaws.com", - "us-east-1.amazonaws.com", - "emrappui-prod.cn-north-1.amazonaws.com.cn", - "emrnotebooks-prod.cn-north-1.amazonaws.com.cn", - "emrstudio-prod.cn-north-1.amazonaws.com.cn", - "emrappui-prod.cn-northwest-1.amazonaws.com.cn", - "emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn", - "emrstudio-prod.cn-northwest-1.amazonaws.com.cn", - "emrappui-prod.af-south-1.amazonaws.com", - "emrnotebooks-prod.af-south-1.amazonaws.com", - "emrstudio-prod.af-south-1.amazonaws.com", - "emrappui-prod.ap-east-1.amazonaws.com", - "emrnotebooks-prod.ap-east-1.amazonaws.com", - "emrstudio-prod.ap-east-1.amazonaws.com", - "emrappui-prod.ap-northeast-1.amazonaws.com", - "emrnotebooks-prod.ap-northeast-1.amazonaws.com", - "emrstudio-prod.ap-northeast-1.amazonaws.com", - "emrappui-prod.ap-northeast-2.amazonaws.com", - "emrnotebooks-prod.ap-northeast-2.amazonaws.com", - "emrstudio-prod.ap-northeast-2.amazonaws.com", - "emrappui-prod.ap-northeast-3.amazonaws.com", - "emrnotebooks-prod.ap-northeast-3.amazonaws.com", - "emrstudio-prod.ap-northeast-3.amazonaws.com", - "emrappui-prod.ap-south-1.amazonaws.com", - "emrnotebooks-prod.ap-south-1.amazonaws.com", - "emrstudio-prod.ap-south-1.amazonaws.com", - "emrappui-prod.ap-south-2.amazonaws.com", - "emrnotebooks-prod.ap-south-2.amazonaws.com", - "emrstudio-prod.ap-south-2.amazonaws.com", - "emrappui-prod.ap-southeast-1.amazonaws.com", - "emrnotebooks-prod.ap-southeast-1.amazonaws.com", - "emrstudio-prod.ap-southeast-1.amazonaws.com", - "emrappui-prod.ap-southeast-2.amazonaws.com", - "emrnotebooks-prod.ap-southeast-2.amazonaws.com", - "emrstudio-prod.ap-southeast-2.amazonaws.com", - "emrappui-prod.ap-southeast-3.amazonaws.com", - "emrnotebooks-prod.ap-southeast-3.amazonaws.com", - "emrstudio-prod.ap-southeast-3.amazonaws.com", - "emrappui-prod.ap-southeast-4.amazonaws.com", - "emrnotebooks-prod.ap-southeast-4.amazonaws.com", - "emrstudio-prod.ap-southeast-4.amazonaws.com", - "emrappui-prod.ca-central-1.amazonaws.com", - "emrnotebooks-prod.ca-central-1.amazonaws.com", - "emrstudio-prod.ca-central-1.amazonaws.com", - "emrappui-prod.ca-west-1.amazonaws.com", - "emrnotebooks-prod.ca-west-1.amazonaws.com", - "emrstudio-prod.ca-west-1.amazonaws.com", - "emrappui-prod.eu-central-1.amazonaws.com", - "emrnotebooks-prod.eu-central-1.amazonaws.com", - "emrstudio-prod.eu-central-1.amazonaws.com", - "emrappui-prod.eu-central-2.amazonaws.com", - "emrnotebooks-prod.eu-central-2.amazonaws.com", - "emrstudio-prod.eu-central-2.amazonaws.com", - "emrappui-prod.eu-north-1.amazonaws.com", - "emrnotebooks-prod.eu-north-1.amazonaws.com", - "emrstudio-prod.eu-north-1.amazonaws.com", - "emrappui-prod.eu-south-1.amazonaws.com", - "emrnotebooks-prod.eu-south-1.amazonaws.com", - "emrstudio-prod.eu-south-1.amazonaws.com", - "emrappui-prod.eu-south-2.amazonaws.com", - "emrnotebooks-prod.eu-south-2.amazonaws.com", - "emrstudio-prod.eu-south-2.amazonaws.com", - "emrappui-prod.eu-west-1.amazonaws.com", - "emrnotebooks-prod.eu-west-1.amazonaws.com", - "emrstudio-prod.eu-west-1.amazonaws.com", - "emrappui-prod.eu-west-2.amazonaws.com", - "emrnotebooks-prod.eu-west-2.amazonaws.com", - "emrstudio-prod.eu-west-2.amazonaws.com", - "emrappui-prod.eu-west-3.amazonaws.com", - "emrnotebooks-prod.eu-west-3.amazonaws.com", - "emrstudio-prod.eu-west-3.amazonaws.com", - "emrappui-prod.il-central-1.amazonaws.com", - "emrnotebooks-prod.il-central-1.amazonaws.com", - "emrstudio-prod.il-central-1.amazonaws.com", - "emrappui-prod.me-central-1.amazonaws.com", - "emrnotebooks-prod.me-central-1.amazonaws.com", - "emrstudio-prod.me-central-1.amazonaws.com", - "emrappui-prod.me-south-1.amazonaws.com", - "emrnotebooks-prod.me-south-1.amazonaws.com", - "emrstudio-prod.me-south-1.amazonaws.com", - "emrappui-prod.sa-east-1.amazonaws.com", - "emrnotebooks-prod.sa-east-1.amazonaws.com", - "emrstudio-prod.sa-east-1.amazonaws.com", - "emrappui-prod.us-east-1.amazonaws.com", - "emrnotebooks-prod.us-east-1.amazonaws.com", - "emrstudio-prod.us-east-1.amazonaws.com", - "emrappui-prod.us-east-2.amazonaws.com", - "emrnotebooks-prod.us-east-2.amazonaws.com", - "emrstudio-prod.us-east-2.amazonaws.com", - "emrappui-prod.us-gov-east-1.amazonaws.com", - "emrnotebooks-prod.us-gov-east-1.amazonaws.com", - "emrstudio-prod.us-gov-east-1.amazonaws.com", - "emrappui-prod.us-gov-west-1.amazonaws.com", - "emrnotebooks-prod.us-gov-west-1.amazonaws.com", - "emrstudio-prod.us-gov-west-1.amazonaws.com", - "emrappui-prod.us-west-1.amazonaws.com", - "emrnotebooks-prod.us-west-1.amazonaws.com", - "emrstudio-prod.us-west-1.amazonaws.com", - "emrappui-prod.us-west-2.amazonaws.com", - "emrnotebooks-prod.us-west-2.amazonaws.com", - "emrstudio-prod.us-west-2.amazonaws.com", - "*.cn-north-1.airflow.amazonaws.com.cn", - "*.cn-northwest-1.airflow.amazonaws.com.cn", - "*.af-south-1.airflow.amazonaws.com", - "*.ap-east-1.airflow.amazonaws.com", - "*.ap-northeast-1.airflow.amazonaws.com", - "*.ap-northeast-2.airflow.amazonaws.com", - "*.ap-northeast-3.airflow.amazonaws.com", - "*.ap-south-1.airflow.amazonaws.com", - "*.ap-south-2.airflow.amazonaws.com", - "*.ap-southeast-1.airflow.amazonaws.com", - "*.ap-southeast-2.airflow.amazonaws.com", - "*.ap-southeast-3.airflow.amazonaws.com", - "*.ap-southeast-4.airflow.amazonaws.com", - "*.ca-central-1.airflow.amazonaws.com", - "*.ca-west-1.airflow.amazonaws.com", - "*.eu-central-1.airflow.amazonaws.com", - "*.eu-central-2.airflow.amazonaws.com", - "*.eu-north-1.airflow.amazonaws.com", - "*.eu-south-1.airflow.amazonaws.com", - "*.eu-south-2.airflow.amazonaws.com", - "*.eu-west-1.airflow.amazonaws.com", - "*.eu-west-2.airflow.amazonaws.com", - "*.eu-west-3.airflow.amazonaws.com", - "*.il-central-1.airflow.amazonaws.com", - "*.me-central-1.airflow.amazonaws.com", - "*.me-south-1.airflow.amazonaws.com", - "*.sa-east-1.airflow.amazonaws.com", - "*.us-east-1.airflow.amazonaws.com", - "*.us-east-2.airflow.amazonaws.com", - "*.us-west-1.airflow.amazonaws.com", - "*.us-west-2.airflow.amazonaws.com", - "s3.dualstack.cn-north-1.amazonaws.com.cn", - "s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn", - "s3-website.dualstack.cn-north-1.amazonaws.com.cn", - "s3.cn-north-1.amazonaws.com.cn", - "s3-accesspoint.cn-north-1.amazonaws.com.cn", - "s3-deprecated.cn-north-1.amazonaws.com.cn", - "s3-object-lambda.cn-north-1.amazonaws.com.cn", - "s3-website.cn-north-1.amazonaws.com.cn", - "s3.dualstack.cn-northwest-1.amazonaws.com.cn", - "s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn", - "s3.cn-northwest-1.amazonaws.com.cn", - "s3-accesspoint.cn-northwest-1.amazonaws.com.cn", - "s3-object-lambda.cn-northwest-1.amazonaws.com.cn", - "s3-website.cn-northwest-1.amazonaws.com.cn", - "s3.dualstack.af-south-1.amazonaws.com", - "s3-accesspoint.dualstack.af-south-1.amazonaws.com", - "s3-website.dualstack.af-south-1.amazonaws.com", - "s3.af-south-1.amazonaws.com", - "s3-accesspoint.af-south-1.amazonaws.com", - "s3-object-lambda.af-south-1.amazonaws.com", - "s3-website.af-south-1.amazonaws.com", - "s3.dualstack.ap-east-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-east-1.amazonaws.com", - "s3.ap-east-1.amazonaws.com", - "s3-accesspoint.ap-east-1.amazonaws.com", - "s3-object-lambda.ap-east-1.amazonaws.com", - "s3-website.ap-east-1.amazonaws.com", - "s3.dualstack.ap-northeast-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com", - "s3-website.dualstack.ap-northeast-1.amazonaws.com", - "s3.ap-northeast-1.amazonaws.com", - "s3-accesspoint.ap-northeast-1.amazonaws.com", - "s3-object-lambda.ap-northeast-1.amazonaws.com", - "s3-website.ap-northeast-1.amazonaws.com", - "s3.dualstack.ap-northeast-2.amazonaws.com", - "s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com", - "s3-website.dualstack.ap-northeast-2.amazonaws.com", - "s3.ap-northeast-2.amazonaws.com", - "s3-accesspoint.ap-northeast-2.amazonaws.com", - "s3-object-lambda.ap-northeast-2.amazonaws.com", - "s3-website.ap-northeast-2.amazonaws.com", - "s3.dualstack.ap-northeast-3.amazonaws.com", - "s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com", - "s3-website.dualstack.ap-northeast-3.amazonaws.com", - "s3.ap-northeast-3.amazonaws.com", - "s3-accesspoint.ap-northeast-3.amazonaws.com", - "s3-object-lambda.ap-northeast-3.amazonaws.com", - "s3-website.ap-northeast-3.amazonaws.com", - "s3.dualstack.ap-south-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-south-1.amazonaws.com", - "s3-website.dualstack.ap-south-1.amazonaws.com", - "s3.ap-south-1.amazonaws.com", - "s3-accesspoint.ap-south-1.amazonaws.com", - "s3-object-lambda.ap-south-1.amazonaws.com", - "s3-website.ap-south-1.amazonaws.com", - "s3.dualstack.ap-south-2.amazonaws.com", - "s3-accesspoint.dualstack.ap-south-2.amazonaws.com", - "s3-website.dualstack.ap-south-2.amazonaws.com", - "s3.ap-south-2.amazonaws.com", - "s3-accesspoint.ap-south-2.amazonaws.com", - "s3-object-lambda.ap-south-2.amazonaws.com", - "s3-website.ap-south-2.amazonaws.com", - "s3.dualstack.ap-southeast-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com", - "s3-website.dualstack.ap-southeast-1.amazonaws.com", - "s3.ap-southeast-1.amazonaws.com", - "s3-accesspoint.ap-southeast-1.amazonaws.com", - "s3-object-lambda.ap-southeast-1.amazonaws.com", - "s3-website.ap-southeast-1.amazonaws.com", - "s3.dualstack.ap-southeast-2.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com", - "s3-website.dualstack.ap-southeast-2.amazonaws.com", - "s3.ap-southeast-2.amazonaws.com", - "s3-accesspoint.ap-southeast-2.amazonaws.com", - "s3-object-lambda.ap-southeast-2.amazonaws.com", - "s3-website.ap-southeast-2.amazonaws.com", - "s3.dualstack.ap-southeast-3.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com", - "s3-website.dualstack.ap-southeast-3.amazonaws.com", - "s3.ap-southeast-3.amazonaws.com", - "s3-accesspoint.ap-southeast-3.amazonaws.com", - "s3-object-lambda.ap-southeast-3.amazonaws.com", - "s3-website.ap-southeast-3.amazonaws.com", - "s3.dualstack.ap-southeast-4.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com", - "s3-website.dualstack.ap-southeast-4.amazonaws.com", - "s3.ap-southeast-4.amazonaws.com", - "s3-accesspoint.ap-southeast-4.amazonaws.com", - "s3-object-lambda.ap-southeast-4.amazonaws.com", - "s3-website.ap-southeast-4.amazonaws.com", - "s3.dualstack.ap-southeast-5.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com", - "s3-website.dualstack.ap-southeast-5.amazonaws.com", - "s3.ap-southeast-5.amazonaws.com", - "s3-accesspoint.ap-southeast-5.amazonaws.com", - "s3-deprecated.ap-southeast-5.amazonaws.com", - "s3-object-lambda.ap-southeast-5.amazonaws.com", - "s3-website.ap-southeast-5.amazonaws.com", - "s3.dualstack.ca-central-1.amazonaws.com", - "s3-accesspoint.dualstack.ca-central-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com", - "s3-fips.dualstack.ca-central-1.amazonaws.com", - "s3-website.dualstack.ca-central-1.amazonaws.com", - "s3.ca-central-1.amazonaws.com", - "s3-accesspoint.ca-central-1.amazonaws.com", - "s3-accesspoint-fips.ca-central-1.amazonaws.com", - "s3-fips.ca-central-1.amazonaws.com", - "s3-object-lambda.ca-central-1.amazonaws.com", - "s3-website.ca-central-1.amazonaws.com", - "s3.dualstack.ca-west-1.amazonaws.com", - "s3-accesspoint.dualstack.ca-west-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.ca-west-1.amazonaws.com", - "s3-fips.dualstack.ca-west-1.amazonaws.com", - "s3-website.dualstack.ca-west-1.amazonaws.com", - "s3.ca-west-1.amazonaws.com", - "s3-accesspoint.ca-west-1.amazonaws.com", - "s3-accesspoint-fips.ca-west-1.amazonaws.com", - "s3-fips.ca-west-1.amazonaws.com", - "s3-object-lambda.ca-west-1.amazonaws.com", - "s3-website.ca-west-1.amazonaws.com", - "s3.dualstack.eu-central-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-central-1.amazonaws.com", - "s3-website.dualstack.eu-central-1.amazonaws.com", - "s3.eu-central-1.amazonaws.com", - "s3-accesspoint.eu-central-1.amazonaws.com", - "s3-object-lambda.eu-central-1.amazonaws.com", - "s3-website.eu-central-1.amazonaws.com", - "s3.dualstack.eu-central-2.amazonaws.com", - "s3-accesspoint.dualstack.eu-central-2.amazonaws.com", - "s3-website.dualstack.eu-central-2.amazonaws.com", - "s3.eu-central-2.amazonaws.com", - "s3-accesspoint.eu-central-2.amazonaws.com", - "s3-object-lambda.eu-central-2.amazonaws.com", - "s3-website.eu-central-2.amazonaws.com", - "s3.dualstack.eu-north-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-north-1.amazonaws.com", - "s3.eu-north-1.amazonaws.com", - "s3-accesspoint.eu-north-1.amazonaws.com", - "s3-object-lambda.eu-north-1.amazonaws.com", - "s3-website.eu-north-1.amazonaws.com", - "s3.dualstack.eu-south-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-south-1.amazonaws.com", - "s3-website.dualstack.eu-south-1.amazonaws.com", - "s3.eu-south-1.amazonaws.com", - "s3-accesspoint.eu-south-1.amazonaws.com", - "s3-object-lambda.eu-south-1.amazonaws.com", - "s3-website.eu-south-1.amazonaws.com", - "s3.dualstack.eu-south-2.amazonaws.com", - "s3-accesspoint.dualstack.eu-south-2.amazonaws.com", - "s3-website.dualstack.eu-south-2.amazonaws.com", - "s3.eu-south-2.amazonaws.com", - "s3-accesspoint.eu-south-2.amazonaws.com", - "s3-object-lambda.eu-south-2.amazonaws.com", - "s3-website.eu-south-2.amazonaws.com", - "s3.dualstack.eu-west-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-west-1.amazonaws.com", - "s3-website.dualstack.eu-west-1.amazonaws.com", - "s3.eu-west-1.amazonaws.com", - "s3-accesspoint.eu-west-1.amazonaws.com", - "s3-deprecated.eu-west-1.amazonaws.com", - "s3-object-lambda.eu-west-1.amazonaws.com", - "s3-website.eu-west-1.amazonaws.com", - "s3.dualstack.eu-west-2.amazonaws.com", - "s3-accesspoint.dualstack.eu-west-2.amazonaws.com", - "s3.eu-west-2.amazonaws.com", - "s3-accesspoint.eu-west-2.amazonaws.com", - "s3-object-lambda.eu-west-2.amazonaws.com", - "s3-website.eu-west-2.amazonaws.com", - "s3.dualstack.eu-west-3.amazonaws.com", - "s3-accesspoint.dualstack.eu-west-3.amazonaws.com", - "s3-website.dualstack.eu-west-3.amazonaws.com", - "s3.eu-west-3.amazonaws.com", - "s3-accesspoint.eu-west-3.amazonaws.com", - "s3-object-lambda.eu-west-3.amazonaws.com", - "s3-website.eu-west-3.amazonaws.com", - "s3.dualstack.il-central-1.amazonaws.com", - "s3-accesspoint.dualstack.il-central-1.amazonaws.com", - "s3-website.dualstack.il-central-1.amazonaws.com", - "s3.il-central-1.amazonaws.com", - "s3-accesspoint.il-central-1.amazonaws.com", - "s3-object-lambda.il-central-1.amazonaws.com", - "s3-website.il-central-1.amazonaws.com", - "s3.dualstack.me-central-1.amazonaws.com", - "s3-accesspoint.dualstack.me-central-1.amazonaws.com", - "s3-website.dualstack.me-central-1.amazonaws.com", - "s3.me-central-1.amazonaws.com", - "s3-accesspoint.me-central-1.amazonaws.com", - "s3-object-lambda.me-central-1.amazonaws.com", - "s3-website.me-central-1.amazonaws.com", - "s3.dualstack.me-south-1.amazonaws.com", - "s3-accesspoint.dualstack.me-south-1.amazonaws.com", - "s3.me-south-1.amazonaws.com", - "s3-accesspoint.me-south-1.amazonaws.com", - "s3-object-lambda.me-south-1.amazonaws.com", - "s3-website.me-south-1.amazonaws.com", - "s3.amazonaws.com", - "s3-1.amazonaws.com", - "s3-ap-east-1.amazonaws.com", - "s3-ap-northeast-1.amazonaws.com", - "s3-ap-northeast-2.amazonaws.com", - "s3-ap-northeast-3.amazonaws.com", - "s3-ap-south-1.amazonaws.com", - "s3-ap-southeast-1.amazonaws.com", - "s3-ap-southeast-2.amazonaws.com", - "s3-ca-central-1.amazonaws.com", - "s3-eu-central-1.amazonaws.com", - "s3-eu-north-1.amazonaws.com", - "s3-eu-west-1.amazonaws.com", - "s3-eu-west-2.amazonaws.com", - "s3-eu-west-3.amazonaws.com", - "s3-external-1.amazonaws.com", - "s3-fips-us-gov-east-1.amazonaws.com", - "s3-fips-us-gov-west-1.amazonaws.com", - "mrap.accesspoint.s3-global.amazonaws.com", - "s3-me-south-1.amazonaws.com", - "s3-sa-east-1.amazonaws.com", - "s3-us-east-2.amazonaws.com", - "s3-us-gov-east-1.amazonaws.com", - "s3-us-gov-west-1.amazonaws.com", - "s3-us-west-1.amazonaws.com", - "s3-us-west-2.amazonaws.com", - "s3-website-ap-northeast-1.amazonaws.com", - "s3-website-ap-southeast-1.amazonaws.com", - "s3-website-ap-southeast-2.amazonaws.com", - "s3-website-eu-west-1.amazonaws.com", - "s3-website-sa-east-1.amazonaws.com", - "s3-website-us-east-1.amazonaws.com", - "s3-website-us-gov-west-1.amazonaws.com", - "s3-website-us-west-1.amazonaws.com", - "s3-website-us-west-2.amazonaws.com", - "s3.dualstack.sa-east-1.amazonaws.com", - "s3-accesspoint.dualstack.sa-east-1.amazonaws.com", - "s3-website.dualstack.sa-east-1.amazonaws.com", - "s3.sa-east-1.amazonaws.com", - "s3-accesspoint.sa-east-1.amazonaws.com", - "s3-object-lambda.sa-east-1.amazonaws.com", - "s3-website.sa-east-1.amazonaws.com", - "s3.dualstack.us-east-1.amazonaws.com", - "s3-accesspoint.dualstack.us-east-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com", - "s3-fips.dualstack.us-east-1.amazonaws.com", - "s3-website.dualstack.us-east-1.amazonaws.com", - "s3.us-east-1.amazonaws.com", - "s3-accesspoint.us-east-1.amazonaws.com", - "s3-accesspoint-fips.us-east-1.amazonaws.com", - "s3-deprecated.us-east-1.amazonaws.com", - "s3-fips.us-east-1.amazonaws.com", - "s3-object-lambda.us-east-1.amazonaws.com", - "s3-website.us-east-1.amazonaws.com", - "s3.dualstack.us-east-2.amazonaws.com", - "s3-accesspoint.dualstack.us-east-2.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com", - "s3-fips.dualstack.us-east-2.amazonaws.com", - "s3-website.dualstack.us-east-2.amazonaws.com", - "s3.us-east-2.amazonaws.com", - "s3-accesspoint.us-east-2.amazonaws.com", - "s3-accesspoint-fips.us-east-2.amazonaws.com", - "s3-deprecated.us-east-2.amazonaws.com", - "s3-fips.us-east-2.amazonaws.com", - "s3-object-lambda.us-east-2.amazonaws.com", - "s3-website.us-east-2.amazonaws.com", - "s3.dualstack.us-gov-east-1.amazonaws.com", - "s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com", - "s3-fips.dualstack.us-gov-east-1.amazonaws.com", - "s3.us-gov-east-1.amazonaws.com", - "s3-accesspoint.us-gov-east-1.amazonaws.com", - "s3-accesspoint-fips.us-gov-east-1.amazonaws.com", - "s3-fips.us-gov-east-1.amazonaws.com", - "s3-object-lambda.us-gov-east-1.amazonaws.com", - "s3-website.us-gov-east-1.amazonaws.com", - "s3.dualstack.us-gov-west-1.amazonaws.com", - "s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com", - "s3-fips.dualstack.us-gov-west-1.amazonaws.com", - "s3.us-gov-west-1.amazonaws.com", - "s3-accesspoint.us-gov-west-1.amazonaws.com", - "s3-accesspoint-fips.us-gov-west-1.amazonaws.com", - "s3-fips.us-gov-west-1.amazonaws.com", - "s3-object-lambda.us-gov-west-1.amazonaws.com", - "s3-website.us-gov-west-1.amazonaws.com", - "s3.dualstack.us-west-1.amazonaws.com", - "s3-accesspoint.dualstack.us-west-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com", - "s3-fips.dualstack.us-west-1.amazonaws.com", - "s3-website.dualstack.us-west-1.amazonaws.com", - "s3.us-west-1.amazonaws.com", - "s3-accesspoint.us-west-1.amazonaws.com", - "s3-accesspoint-fips.us-west-1.amazonaws.com", - "s3-fips.us-west-1.amazonaws.com", - "s3-object-lambda.us-west-1.amazonaws.com", - "s3-website.us-west-1.amazonaws.com", - "s3.dualstack.us-west-2.amazonaws.com", - "s3-accesspoint.dualstack.us-west-2.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com", - "s3-fips.dualstack.us-west-2.amazonaws.com", - "s3-website.dualstack.us-west-2.amazonaws.com", - "s3.us-west-2.amazonaws.com", - "s3-accesspoint.us-west-2.amazonaws.com", - "s3-accesspoint-fips.us-west-2.amazonaws.com", - "s3-deprecated.us-west-2.amazonaws.com", - "s3-fips.us-west-2.amazonaws.com", - "s3-object-lambda.us-west-2.amazonaws.com", - "s3-website.us-west-2.amazonaws.com", - "labeling.ap-northeast-1.sagemaker.aws", - "labeling.ap-northeast-2.sagemaker.aws", - "labeling.ap-south-1.sagemaker.aws", - "labeling.ap-southeast-1.sagemaker.aws", - "labeling.ap-southeast-2.sagemaker.aws", - "labeling.ca-central-1.sagemaker.aws", - "labeling.eu-central-1.sagemaker.aws", - "labeling.eu-west-1.sagemaker.aws", - "labeling.eu-west-2.sagemaker.aws", - "labeling.us-east-1.sagemaker.aws", - "labeling.us-east-2.sagemaker.aws", - "labeling.us-west-2.sagemaker.aws", - "notebook.af-south-1.sagemaker.aws", - "notebook.ap-east-1.sagemaker.aws", - "notebook.ap-northeast-1.sagemaker.aws", - "notebook.ap-northeast-2.sagemaker.aws", - "notebook.ap-northeast-3.sagemaker.aws", - "notebook.ap-south-1.sagemaker.aws", - "notebook.ap-south-2.sagemaker.aws", - "notebook.ap-southeast-1.sagemaker.aws", - "notebook.ap-southeast-2.sagemaker.aws", - "notebook.ap-southeast-3.sagemaker.aws", - "notebook.ap-southeast-4.sagemaker.aws", - "notebook.ca-central-1.sagemaker.aws", - "notebook-fips.ca-central-1.sagemaker.aws", - "notebook.ca-west-1.sagemaker.aws", - "notebook-fips.ca-west-1.sagemaker.aws", - "notebook.eu-central-1.sagemaker.aws", - "notebook.eu-central-2.sagemaker.aws", - "notebook.eu-north-1.sagemaker.aws", - "notebook.eu-south-1.sagemaker.aws", - "notebook.eu-south-2.sagemaker.aws", - "notebook.eu-west-1.sagemaker.aws", - "notebook.eu-west-2.sagemaker.aws", - "notebook.eu-west-3.sagemaker.aws", - "notebook.il-central-1.sagemaker.aws", - "notebook.me-central-1.sagemaker.aws", - "notebook.me-south-1.sagemaker.aws", - "notebook.sa-east-1.sagemaker.aws", - "notebook.us-east-1.sagemaker.aws", - "notebook-fips.us-east-1.sagemaker.aws", - "notebook.us-east-2.sagemaker.aws", - "notebook-fips.us-east-2.sagemaker.aws", - "notebook.us-gov-east-1.sagemaker.aws", - "notebook-fips.us-gov-east-1.sagemaker.aws", - "notebook.us-gov-west-1.sagemaker.aws", - "notebook-fips.us-gov-west-1.sagemaker.aws", - "notebook.us-west-1.sagemaker.aws", - "notebook-fips.us-west-1.sagemaker.aws", - "notebook.us-west-2.sagemaker.aws", - "notebook-fips.us-west-2.sagemaker.aws", - "notebook.cn-north-1.sagemaker.com.cn", - "notebook.cn-northwest-1.sagemaker.com.cn", - "studio.af-south-1.sagemaker.aws", - "studio.ap-east-1.sagemaker.aws", - "studio.ap-northeast-1.sagemaker.aws", - "studio.ap-northeast-2.sagemaker.aws", - "studio.ap-northeast-3.sagemaker.aws", - "studio.ap-south-1.sagemaker.aws", - "studio.ap-southeast-1.sagemaker.aws", - "studio.ap-southeast-2.sagemaker.aws", - "studio.ap-southeast-3.sagemaker.aws", - "studio.ca-central-1.sagemaker.aws", - "studio.eu-central-1.sagemaker.aws", - "studio.eu-north-1.sagemaker.aws", - "studio.eu-south-1.sagemaker.aws", - "studio.eu-south-2.sagemaker.aws", - "studio.eu-west-1.sagemaker.aws", - "studio.eu-west-2.sagemaker.aws", - "studio.eu-west-3.sagemaker.aws", - "studio.il-central-1.sagemaker.aws", - "studio.me-central-1.sagemaker.aws", - "studio.me-south-1.sagemaker.aws", - "studio.sa-east-1.sagemaker.aws", - "studio.us-east-1.sagemaker.aws", - "studio.us-east-2.sagemaker.aws", - "studio.us-gov-east-1.sagemaker.aws", - "studio-fips.us-gov-east-1.sagemaker.aws", - "studio.us-gov-west-1.sagemaker.aws", - "studio-fips.us-gov-west-1.sagemaker.aws", - "studio.us-west-1.sagemaker.aws", - "studio.us-west-2.sagemaker.aws", - "studio.cn-north-1.sagemaker.com.cn", - "studio.cn-northwest-1.sagemaker.com.cn", - "*.experiments.sagemaker.aws", - "analytics-gateway.ap-northeast-1.amazonaws.com", - "analytics-gateway.ap-northeast-2.amazonaws.com", - "analytics-gateway.ap-south-1.amazonaws.com", - "analytics-gateway.ap-southeast-1.amazonaws.com", - "analytics-gateway.ap-southeast-2.amazonaws.com", - "analytics-gateway.eu-central-1.amazonaws.com", - "analytics-gateway.eu-west-1.amazonaws.com", - "analytics-gateway.us-east-1.amazonaws.com", - "analytics-gateway.us-east-2.amazonaws.com", - "analytics-gateway.us-west-2.amazonaws.com", - "amplifyapp.com", - "*.awsapprunner.com", - "webview-assets.aws-cloud9.af-south-1.amazonaws.com", - "vfs.cloud9.af-south-1.amazonaws.com", - "webview-assets.cloud9.af-south-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-east-1.amazonaws.com", - "vfs.cloud9.ap-east-1.amazonaws.com", - "webview-assets.cloud9.ap-east-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com", - "vfs.cloud9.ap-northeast-1.amazonaws.com", - "webview-assets.cloud9.ap-northeast-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com", - "vfs.cloud9.ap-northeast-2.amazonaws.com", - "webview-assets.cloud9.ap-northeast-2.amazonaws.com", - "webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com", - "vfs.cloud9.ap-northeast-3.amazonaws.com", - "webview-assets.cloud9.ap-northeast-3.amazonaws.com", - "webview-assets.aws-cloud9.ap-south-1.amazonaws.com", - "vfs.cloud9.ap-south-1.amazonaws.com", - "webview-assets.cloud9.ap-south-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com", - "vfs.cloud9.ap-southeast-1.amazonaws.com", - "webview-assets.cloud9.ap-southeast-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com", - "vfs.cloud9.ap-southeast-2.amazonaws.com", - "webview-assets.cloud9.ap-southeast-2.amazonaws.com", - "webview-assets.aws-cloud9.ca-central-1.amazonaws.com", - "vfs.cloud9.ca-central-1.amazonaws.com", - "webview-assets.cloud9.ca-central-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-central-1.amazonaws.com", - "vfs.cloud9.eu-central-1.amazonaws.com", - "webview-assets.cloud9.eu-central-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-north-1.amazonaws.com", - "vfs.cloud9.eu-north-1.amazonaws.com", - "webview-assets.cloud9.eu-north-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-south-1.amazonaws.com", - "vfs.cloud9.eu-south-1.amazonaws.com", - "webview-assets.cloud9.eu-south-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-west-1.amazonaws.com", - "vfs.cloud9.eu-west-1.amazonaws.com", - "webview-assets.cloud9.eu-west-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-west-2.amazonaws.com", - "vfs.cloud9.eu-west-2.amazonaws.com", - "webview-assets.cloud9.eu-west-2.amazonaws.com", - "webview-assets.aws-cloud9.eu-west-3.amazonaws.com", - "vfs.cloud9.eu-west-3.amazonaws.com", - "webview-assets.cloud9.eu-west-3.amazonaws.com", - "webview-assets.aws-cloud9.il-central-1.amazonaws.com", - "vfs.cloud9.il-central-1.amazonaws.com", - "webview-assets.aws-cloud9.me-south-1.amazonaws.com", - "vfs.cloud9.me-south-1.amazonaws.com", - "webview-assets.cloud9.me-south-1.amazonaws.com", - "webview-assets.aws-cloud9.sa-east-1.amazonaws.com", - "vfs.cloud9.sa-east-1.amazonaws.com", - "webview-assets.cloud9.sa-east-1.amazonaws.com", - "webview-assets.aws-cloud9.us-east-1.amazonaws.com", - "vfs.cloud9.us-east-1.amazonaws.com", - "webview-assets.cloud9.us-east-1.amazonaws.com", - "webview-assets.aws-cloud9.us-east-2.amazonaws.com", - "vfs.cloud9.us-east-2.amazonaws.com", - "webview-assets.cloud9.us-east-2.amazonaws.com", - "webview-assets.aws-cloud9.us-west-1.amazonaws.com", - "vfs.cloud9.us-west-1.amazonaws.com", - "webview-assets.cloud9.us-west-1.amazonaws.com", - "webview-assets.aws-cloud9.us-west-2.amazonaws.com", - "vfs.cloud9.us-west-2.amazonaws.com", - "webview-assets.cloud9.us-west-2.amazonaws.com", - "awsapps.com", - "cn-north-1.eb.amazonaws.com.cn", - "cn-northwest-1.eb.amazonaws.com.cn", - "elasticbeanstalk.com", - "af-south-1.elasticbeanstalk.com", - "ap-east-1.elasticbeanstalk.com", - "ap-northeast-1.elasticbeanstalk.com", - "ap-northeast-2.elasticbeanstalk.com", - "ap-northeast-3.elasticbeanstalk.com", - "ap-south-1.elasticbeanstalk.com", - "ap-southeast-1.elasticbeanstalk.com", - "ap-southeast-2.elasticbeanstalk.com", - "ap-southeast-3.elasticbeanstalk.com", - "ca-central-1.elasticbeanstalk.com", - "eu-central-1.elasticbeanstalk.com", - "eu-north-1.elasticbeanstalk.com", - "eu-south-1.elasticbeanstalk.com", - "eu-west-1.elasticbeanstalk.com", - "eu-west-2.elasticbeanstalk.com", - "eu-west-3.elasticbeanstalk.com", - "il-central-1.elasticbeanstalk.com", - "me-south-1.elasticbeanstalk.com", - "sa-east-1.elasticbeanstalk.com", - "us-east-1.elasticbeanstalk.com", - "us-east-2.elasticbeanstalk.com", - "us-gov-east-1.elasticbeanstalk.com", - "us-gov-west-1.elasticbeanstalk.com", - "us-west-1.elasticbeanstalk.com", - "us-west-2.elasticbeanstalk.com", - "*.elb.amazonaws.com.cn", - "*.elb.amazonaws.com", - "awsglobalaccelerator.com", - "*.private.repost.aws", - "eero.online", - "eero-stage.online", - "apigee.io", - "panel.dev", - "siiites.com", - "appspacehosted.com", - "appspaceusercontent.com", - "appudo.net", - "on-aptible.com", - "f5.si", - "arvanedge.ir", - "user.aseinet.ne.jp", - "gv.vc", - "d.gv.vc", - "user.party.eus", - "pimienta.org", - "poivron.org", - "potager.org", - "sweetpepper.org", - "myasustor.com", - "cdn.prod.atlassian-dev.net", - "translated.page", - "myfritz.link", - "myfritz.net", - "onavstack.net", - "*.awdev.ca", - "*.advisor.ws", - "ecommerce-shop.pl", - "b-data.io", - "balena-devices.com", - "base.ec", - "official.ec", - "buyshop.jp", - "fashionstore.jp", - "handcrafted.jp", - "kawaiishop.jp", - "supersale.jp", - "theshop.jp", - "shopselect.net", - "base.shop", - "beagleboard.io", - "*.beget.app", - "pages.gay", - "bnr.la", - "bitbucket.io", - "blackbaudcdn.net", - "of.je", - "bluebite.io", - "boomla.net", - "boutir.com", - "boxfuse.io", - "square7.ch", - "bplaced.com", - "bplaced.de", - "square7.de", - "bplaced.net", - "square7.net", - "*.s.brave.io", - "shop.brendly.hr", - "shop.brendly.rs", - "browsersafetymark.io", - "radio.am", - "radio.fm", - "uk0.bigv.io", - "dh.bytemark.co.uk", - "vm.bytemark.co.uk", - "cafjs.com", - "canva-apps.cn", - "*.my.canvasite.cn", - "canva-apps.com", - "*.my.canva.site", - "drr.ac", - "uwu.ai", - "carrd.co", - "crd.co", - "ju.mp", - "api.gov.uk", - "cdn77-storage.com", - "rsc.contentproxy9.cz", - "r.cdn77.net", - "cdn77-ssl.net", - "c.cdn77.org", - "rsc.cdn77.org", - "ssl.origin.cdn77-secure.org", - "za.bz", - "br.com", - "cn.com", - "de.com", - "eu.com", - "jpn.com", - "mex.com", - "ru.com", - "sa.com", - "uk.com", - "us.com", - "za.com", - "com.de", - "gb.net", - "hu.net", - "jp.net", - "se.net", - "uk.net", - "ae.org", - "com.se", - "cx.ua", - "discourse.group", - "discourse.team", - "clerk.app", - "clerkstage.app", - "*.lcl.dev", - "*.lclstage.dev", - "*.stg.dev", - "*.stgstage.dev", - "cleverapps.cc", - "*.services.clever-cloud.com", - "cleverapps.io", - "cleverapps.tech", - "clickrising.net", - "cloudns.asia", - "cloudns.be", - "cloud-ip.biz", - "cloudns.biz", - "cloudns.cc", - "cloudns.ch", - "cloudns.cl", - "cloudns.club", - "dnsabr.com", - "ip-ddns.com", - "cloudns.cx", - "cloudns.eu", - "cloudns.in", - "cloudns.info", - "ddns-ip.net", - "dns-cloud.net", - "dns-dynamic.net", - "cloudns.nz", - "cloudns.org", - "ip-dynamic.org", - "cloudns.ph", - "cloudns.pro", - "cloudns.pw", - "cloudns.us", - "c66.me", - "cloud66.ws", - "cloud66.zone", - "jdevcloud.com", - "wpdevcloud.com", - "cloudaccess.host", - "freesite.host", - "cloudaccess.net", - "*.cloudera.site", - "cf-ipfs.com", - "cloudflare-ipfs.com", - "trycloudflare.com", - "pages.dev", - "r2.dev", - "workers.dev", - "cloudflare.net", - "cdn.cloudflare.net", - "cdn.cloudflareanycast.net", - "cdn.cloudflarecn.net", - "cdn.cloudflareglobal.net", - "cust.cloudscale.ch", - "objects.lpg.cloudscale.ch", - "objects.rma.cloudscale.ch", - "wnext.app", - "cnpy.gdn", - "*.otap.co", - "co.ca", - "co.com", - "codeberg.page", - "csb.app", - "preview.csb.app", - "co.nl", - "co.no", - "webhosting.be", - "hosting-cluster.nl", - "ctfcloud.net", - "convex.site", - "ac.ru", - "edu.ru", - "gov.ru", - "int.ru", - "mil.ru", - "test.ru", - "dyn.cosidns.de", - "dnsupdater.de", - "dynamisches-dns.de", - "internet-dns.de", - "l-o-g-i-n.de", - "dynamic-dns.info", - "feste-ip.net", - "knx-server.net", - "static-access.net", - "craft.me", - "realm.cz", - "on.crisp.email", - "*.cryptonomic.net", - "curv.dev", - "cfolks.pl", - "cyon.link", - "cyon.site", - "platform0.app", - "fnwk.site", - "folionetwork.site", - "biz.dk", - "co.dk", - "firm.dk", - "reg.dk", - "store.dk", - "dyndns.dappnode.io", - "builtwithdark.com", - "darklang.io", - "demo.datadetect.com", - "instance.datadetect.com", - "edgestack.me", - "dattolocal.com", - "dattorelay.com", - "dattoweb.com", - "mydatto.com", - "dattolocal.net", - "mydatto.net", - "ddnss.de", - "dyn.ddnss.de", - "dyndns.ddnss.de", - "dyn-ip24.de", - "dyndns1.de", - "home-webserver.de", - "dyn.home-webserver.de", - "myhome-server.de", - "ddnss.org", - "debian.net", - "definima.io", - "definima.net", - "deno.dev", - "deno-staging.dev", - "dedyn.io", - "deta.app", - "deta.dev", - "dfirma.pl", - "dkonto.pl", - "you2.pl", - "ondigitalocean.app", - "*.digitaloceanspaces.com", - "us.kg", - "rss.my.id", - "diher.solutions", - "discordsays.com", - "discordsez.com", - "jozi.biz", - "dnshome.de", - "online.th", - "shop.th", - "drayddns.com", - "shoparena.pl", - "dreamhosters.com", - "durumis.com", - "mydrobo.com", - "drud.io", - "drud.us", - "duckdns.org", - "dy.fi", - "tunk.org", - "dyndns.biz", - "for-better.biz", - "for-more.biz", - "for-some.biz", - "for-the.biz", - "selfip.biz", - "webhop.biz", - "ftpaccess.cc", - "game-server.cc", - "myphotos.cc", - "scrapping.cc", - "blogdns.com", - "cechire.com", - "dnsalias.com", - "dnsdojo.com", - "doesntexist.com", - "dontexist.com", - "doomdns.com", - "dyn-o-saur.com", - "dynalias.com", - "dyndns-at-home.com", - "dyndns-at-work.com", - "dyndns-blog.com", - "dyndns-free.com", - "dyndns-home.com", - "dyndns-ip.com", - "dyndns-mail.com", - "dyndns-office.com", - "dyndns-pics.com", - "dyndns-remote.com", - "dyndns-server.com", - "dyndns-web.com", - "dyndns-wiki.com", - "dyndns-work.com", - "est-a-la-maison.com", - "est-a-la-masion.com", - "est-le-patron.com", - "est-mon-blogueur.com", - "from-ak.com", - "from-al.com", - "from-ar.com", - "from-ca.com", - "from-ct.com", - "from-dc.com", - "from-de.com", - "from-fl.com", - "from-ga.com", - "from-hi.com", - "from-ia.com", - "from-id.com", - "from-il.com", - "from-in.com", - "from-ks.com", - "from-ky.com", - "from-ma.com", - "from-md.com", - "from-mi.com", - "from-mn.com", - "from-mo.com", - "from-ms.com", - "from-mt.com", - "from-nc.com", - "from-nd.com", - "from-ne.com", - "from-nh.com", - "from-nj.com", - "from-nm.com", - "from-nv.com", - "from-oh.com", - "from-ok.com", - "from-or.com", - "from-pa.com", - "from-pr.com", - "from-ri.com", - "from-sc.com", - "from-sd.com", - "from-tn.com", - "from-tx.com", - "from-ut.com", - "from-va.com", - "from-vt.com", - "from-wa.com", - "from-wi.com", - "from-wv.com", - "from-wy.com", - "getmyip.com", - "gotdns.com", - "hobby-site.com", - "homelinux.com", - "homeunix.com", - "iamallama.com", - "is-a-anarchist.com", - "is-a-blogger.com", - "is-a-bookkeeper.com", - "is-a-bulls-fan.com", - "is-a-caterer.com", - "is-a-chef.com", - "is-a-conservative.com", - "is-a-cpa.com", - "is-a-cubicle-slave.com", - "is-a-democrat.com", - "is-a-designer.com", - "is-a-doctor.com", - "is-a-financialadvisor.com", - "is-a-geek.com", - "is-a-green.com", - "is-a-guru.com", - "is-a-hard-worker.com", - "is-a-hunter.com", - "is-a-landscaper.com", - "is-a-lawyer.com", - "is-a-liberal.com", - "is-a-libertarian.com", - "is-a-llama.com", - "is-a-musician.com", - "is-a-nascarfan.com", - "is-a-nurse.com", - "is-a-painter.com", - "is-a-personaltrainer.com", - "is-a-photographer.com", - "is-a-player.com", - "is-a-republican.com", - "is-a-rockstar.com", - "is-a-socialist.com", - "is-a-student.com", - "is-a-teacher.com", - "is-a-techie.com", - "is-a-therapist.com", - "is-an-accountant.com", - "is-an-actor.com", - "is-an-actress.com", - "is-an-anarchist.com", - "is-an-artist.com", - "is-an-engineer.com", - "is-an-entertainer.com", - "is-certified.com", - "is-gone.com", - "is-into-anime.com", - "is-into-cars.com", - "is-into-cartoons.com", - "is-into-games.com", - "is-leet.com", - "is-not-certified.com", - "is-slick.com", - "is-uberleet.com", - "is-with-theband.com", - "isa-geek.com", - "isa-hockeynut.com", - "issmarterthanyou.com", - "likes-pie.com", - "likescandy.com", - "neat-url.com", - "saves-the-whales.com", - "selfip.com", - "sells-for-less.com", - "sells-for-u.com", - "servebbs.com", - "simple-url.com", - "space-to-rent.com", - "teaches-yoga.com", - "writesthisblog.com", - "ath.cx", - "fuettertdasnetz.de", - "isteingeek.de", - "istmein.de", - "lebtimnetz.de", - "leitungsen.de", - "traeumtgerade.de", - "barrel-of-knowledge.info", - "barrell-of-knowledge.info", - "dyndns.info", - "for-our.info", - "groks-the.info", - "groks-this.info", - "here-for-more.info", - "knowsitall.info", - "selfip.info", - "webhop.info", - "forgot.her.name", - "forgot.his.name", - "at-band-camp.net", - "blogdns.net", - "broke-it.net", - "buyshouses.net", - "dnsalias.net", - "dnsdojo.net", - "does-it.net", - "dontexist.net", - "dynalias.net", - "dynathome.net", - "endofinternet.net", - "from-az.net", - "from-co.net", - "from-la.net", - "from-ny.net", - "gets-it.net", - "ham-radio-op.net", - "homeftp.net", - "homeip.net", - "homelinux.net", - "homeunix.net", - "in-the-band.net", - "is-a-chef.net", - "is-a-geek.net", - "isa-geek.net", - "kicks-ass.net", - "office-on-the.net", - "podzone.net", - "scrapper-site.net", - "selfip.net", - "sells-it.net", - "servebbs.net", - "serveftp.net", - "thruhere.net", - "webhop.net", - "merseine.nu", - "mine.nu", - "shacknet.nu", - "blogdns.org", - "blogsite.org", - "boldlygoingnowhere.org", - "dnsalias.org", - "dnsdojo.org", - "doesntexist.org", - "dontexist.org", - "doomdns.org", - "dvrdns.org", - "dynalias.org", - "dyndns.org", - "go.dyndns.org", - "home.dyndns.org", - "endofinternet.org", - "endoftheinternet.org", - "from-me.org", - "game-host.org", - "gotdns.org", - "hobby-site.org", - "homedns.org", - "homeftp.org", - "homelinux.org", - "homeunix.org", - "is-a-bruinsfan.org", - "is-a-candidate.org", - "is-a-celticsfan.org", - "is-a-chef.org", - "is-a-geek.org", - "is-a-knight.org", - "is-a-linux-user.org", - "is-a-patsfan.org", - "is-a-soxfan.org", - "is-found.org", - "is-lost.org", - "is-saved.org", - "is-very-bad.org", - "is-very-evil.org", - "is-very-good.org", - "is-very-nice.org", - "is-very-sweet.org", - "isa-geek.org", - "kicks-ass.org", - "misconfused.org", - "podzone.org", - "readmyblog.org", - "selfip.org", - "sellsyourhome.org", - "servebbs.org", - "serveftp.org", - "servegame.org", - "stuff-4-sale.org", - "webhop.org", - "better-than.tv", - "dyndns.tv", - "on-the-web.tv", - "worse-than.tv", - "is-by.us", - "land-4-sale.us", - "stuff-4-sale.us", - "dyndns.ws", - "mypets.ws", - "ddnsfree.com", - "ddnsgeek.com", - "giize.com", - "gleeze.com", - "kozow.com", - "loseyourip.com", - "ooguy.com", - "theworkpc.com", - "casacam.net", - "dynu.net", - "accesscam.org", - "camdvr.org", - "freeddns.org", - "mywire.org", - "webredirect.org", - "myddns.rocks", - "dynv6.net", - "e4.cz", - "easypanel.app", - "easypanel.host", - "*.ewp.live", - "twmail.cc", - "twmail.net", - "twmail.org", - "mymailer.com.tw", - "url.tw", - "at.emf.camp", - "rt.ht", - "elementor.cloud", - "elementor.cool", - "en-root.fr", - "mytuleap.com", - "tuleap-partners.com", - "encr.app", - "encoreapi.com", - "eu.encoway.cloud", - "eu.org", - "al.eu.org", - "asso.eu.org", - "at.eu.org", - "au.eu.org", - "be.eu.org", - "bg.eu.org", - "ca.eu.org", - "cd.eu.org", - "ch.eu.org", - "cn.eu.org", - "cy.eu.org", - "cz.eu.org", - "de.eu.org", - "dk.eu.org", - "edu.eu.org", - "ee.eu.org", - "es.eu.org", - "fi.eu.org", - "fr.eu.org", - "gr.eu.org", - "hr.eu.org", - "hu.eu.org", - "ie.eu.org", - "il.eu.org", - "in.eu.org", - "int.eu.org", - "is.eu.org", - "it.eu.org", - "jp.eu.org", - "kr.eu.org", - "lt.eu.org", - "lu.eu.org", - "lv.eu.org", - "me.eu.org", - "mk.eu.org", - "mt.eu.org", - "my.eu.org", - "net.eu.org", - "ng.eu.org", - "nl.eu.org", - "no.eu.org", - "nz.eu.org", - "pl.eu.org", - "pt.eu.org", - "ro.eu.org", - "ru.eu.org", - "se.eu.org", - "si.eu.org", - "sk.eu.org", - "tr.eu.org", - "uk.eu.org", - "us.eu.org", - "eurodir.ru", - "eu-1.evennode.com", - "eu-2.evennode.com", - "eu-3.evennode.com", - "eu-4.evennode.com", - "us-1.evennode.com", - "us-2.evennode.com", - "us-3.evennode.com", - "us-4.evennode.com", - "relay.evervault.app", - "relay.evervault.dev", - "expo.app", - "staging.expo.app", - "onfabrica.com", - "ru.net", - "adygeya.ru", - "bashkiria.ru", - "bir.ru", - "cbg.ru", - "com.ru", - "dagestan.ru", - "grozny.ru", - "kalmykia.ru", - "kustanai.ru", - "marine.ru", - "mordovia.ru", - "msk.ru", - "mytis.ru", - "nalchik.ru", - "nov.ru", - "pyatigorsk.ru", - "spb.ru", - "vladikavkaz.ru", - "vladimir.ru", - "abkhazia.su", - "adygeya.su", - "aktyubinsk.su", - "arkhangelsk.su", - "armenia.su", - "ashgabad.su", - "azerbaijan.su", - "balashov.su", - "bashkiria.su", - "bryansk.su", - "bukhara.su", - "chimkent.su", - "dagestan.su", - "east-kazakhstan.su", - "exnet.su", - "georgia.su", - "grozny.su", - "ivanovo.su", - "jambyl.su", - "kalmykia.su", - "kaluga.su", - "karacol.su", - "karaganda.su", - "karelia.su", - "khakassia.su", - "krasnodar.su", - "kurgan.su", - "kustanai.su", - "lenug.su", - "mangyshlak.su", - "mordovia.su", - "msk.su", - "murmansk.su", - "nalchik.su", - "navoi.su", - "north-kazakhstan.su", - "nov.su", - "obninsk.su", - "penza.su", - "pokrovsk.su", - "sochi.su", - "spb.su", - "tashkent.su", - "termez.su", - "togliatti.su", - "troitsk.su", - "tselinograd.su", - "tula.su", - "tuva.su", - "vladikavkaz.su", - "vladimir.su", - "vologda.su", - "channelsdvr.net", - "u.channelsdvr.net", - "edgecompute.app", - "fastly-edge.com", - "fastly-terrarium.com", - "freetls.fastly.net", - "map.fastly.net", - "a.prod.fastly.net", - "global.prod.fastly.net", - "a.ssl.fastly.net", - "b.ssl.fastly.net", - "global.ssl.fastly.net", - "fastlylb.net", - "map.fastlylb.net", - "*.user.fm", - "fastvps-server.com", - "fastvps.host", - "myfast.host", - "fastvps.site", - "myfast.space", - "conn.uk", - "copro.uk", - "hosp.uk", - "fedorainfracloud.org", - "fedorapeople.org", - "cloud.fedoraproject.org", - "app.os.fedoraproject.org", - "app.os.stg.fedoraproject.org", - "mydobiss.com", - "fh-muenster.io", - "filegear.me", - "firebaseapp.com", - "fldrv.com", - "flutterflow.app", - "fly.dev", - "shw.io", - "edgeapp.net", - "forgeblocks.com", - "id.forgerock.io", - "framer.ai", - "framer.app", - "framercanvas.com", - "framer.media", - "framer.photos", - "framer.website", - "framer.wiki", - "0e.vc", - "freebox-os.com", - "freeboxos.com", - "fbx-os.fr", - "fbxos.fr", - "freebox-os.fr", - "freeboxos.fr", - "freedesktop.org", - "freemyip.com", - "*.frusky.de", - "wien.funkfeuer.at", - "daemon.asia", - "dix.asia", - "mydns.bz", - "0am.jp", - "0g0.jp", - "0j0.jp", - "0t0.jp", - "mydns.jp", - "pgw.jp", - "wjg.jp", - "keyword-on.net", - "live-on.net", - "server-on.net", - "mydns.tw", - "mydns.vc", - "*.futurecms.at", - "*.ex.futurecms.at", - "*.in.futurecms.at", - "futurehosting.at", - "futuremailing.at", - "*.ex.ortsinfo.at", - "*.kunden.ortsinfo.at", - "*.statics.cloud", - "aliases121.com", - "campaign.gov.uk", - "service.gov.uk", - "independent-commission.uk", - "independent-inquest.uk", - "independent-inquiry.uk", - "independent-panel.uk", - "independent-review.uk", - "public-inquiry.uk", - "royal-commission.uk", - "gehirn.ne.jp", - "usercontent.jp", - "gentapps.com", - "gentlentapis.com", - "lab.ms", - "cdn-edges.net", - "localcert.net", - "localhostcert.net", - "gsj.bz", - "githubusercontent.com", - "githubpreview.dev", - "github.io", - "gitlab.io", - "gitapp.si", - "gitpage.si", - "glitch.me", - "nog.community", - "co.ro", - "shop.ro", - "lolipop.io", - "angry.jp", - "babyblue.jp", - "babymilk.jp", - "backdrop.jp", - "bambina.jp", - "bitter.jp", - "blush.jp", - "boo.jp", - "boy.jp", - "boyfriend.jp", - "but.jp", - "candypop.jp", - "capoo.jp", - "catfood.jp", - "cheap.jp", - "chicappa.jp", - "chillout.jp", - "chips.jp", - "chowder.jp", - "chu.jp", - "ciao.jp", - "cocotte.jp", - "coolblog.jp", - "cranky.jp", - "cutegirl.jp", - "daa.jp", - "deca.jp", - "deci.jp", - "digick.jp", - "egoism.jp", - "fakefur.jp", - "fem.jp", - "flier.jp", - "floppy.jp", - "fool.jp", - "frenchkiss.jp", - "girlfriend.jp", - "girly.jp", - "gloomy.jp", - "gonna.jp", - "greater.jp", - "hacca.jp", - "heavy.jp", - "her.jp", - "hiho.jp", - "hippy.jp", - "holy.jp", - "hungry.jp", - "icurus.jp", - "itigo.jp", - "jellybean.jp", - "kikirara.jp", - "kill.jp", - "kilo.jp", - "kuron.jp", - "littlestar.jp", - "lolipopmc.jp", - "lolitapunk.jp", - "lomo.jp", - "lovepop.jp", - "lovesick.jp", - "main.jp", - "mods.jp", - "mond.jp", - "mongolian.jp", - "moo.jp", - "namaste.jp", - "nikita.jp", - "nobushi.jp", - "noor.jp", - "oops.jp", - "parallel.jp", - "parasite.jp", - "pecori.jp", - "peewee.jp", - "penne.jp", - "pepper.jp", - "perma.jp", - "pigboat.jp", - "pinoko.jp", - "punyu.jp", - "pupu.jp", - "pussycat.jp", - "pya.jp", - "raindrop.jp", - "readymade.jp", - "sadist.jp", - "schoolbus.jp", - "secret.jp", - "staba.jp", - "stripper.jp", - "sub.jp", - "sunnyday.jp", - "thick.jp", - "tonkotsu.jp", - "under.jp", - "upper.jp", - "velvet.jp", - "verse.jp", - "versus.jp", - "vivian.jp", - "watson.jp", - "weblike.jp", - "whitesnow.jp", - "zombie.jp", - "heteml.net", - "graphic.design", - "goip.de", - "blogspot.ae", - "blogspot.al", - "blogspot.am", - "*.hosted.app", - "*.run.app", - "web.app", - "blogspot.com.ar", - "blogspot.co.at", - "blogspot.com.au", - "blogspot.ba", - "blogspot.be", - "blogspot.bg", - "blogspot.bj", - "blogspot.com.br", - "blogspot.com.by", - "blogspot.ca", - "blogspot.cf", - "blogspot.ch", - "blogspot.cl", - "blogspot.com.co", - "*.0emm.com", - "appspot.com", - "*.r.appspot.com", - "blogspot.com", - "codespot.com", - "googleapis.com", - "googlecode.com", - "pagespeedmobilizer.com", - "withgoogle.com", - "withyoutube.com", - "blogspot.cv", - "blogspot.com.cy", - "blogspot.cz", - "blogspot.de", - "*.gateway.dev", - "blogspot.dk", - "blogspot.com.ee", - "blogspot.com.eg", - "blogspot.com.es", - "blogspot.fi", - "blogspot.fr", - "cloud.goog", - "translate.goog", - "*.usercontent.goog", - "blogspot.gr", - "blogspot.hk", - "blogspot.hr", - "blogspot.hu", - "blogspot.co.id", - "blogspot.ie", - "blogspot.co.il", - "blogspot.in", - "blogspot.is", - "blogspot.it", - "blogspot.jp", - "blogspot.co.ke", - "blogspot.kr", - "blogspot.li", - "blogspot.lt", - "blogspot.lu", - "blogspot.md", - "blogspot.mk", - "blogspot.com.mt", - "blogspot.mx", - "blogspot.my", - "cloudfunctions.net", - "blogspot.com.ng", - "blogspot.nl", - "blogspot.no", - "blogspot.co.nz", - "blogspot.pe", - "blogspot.pt", - "blogspot.qa", - "blogspot.re", - "blogspot.ro", - "blogspot.rs", - "blogspot.ru", - "blogspot.se", - "blogspot.sg", - "blogspot.si", - "blogspot.sk", - "blogspot.sn", - "blogspot.td", - "blogspot.com.tr", - "blogspot.tw", - "blogspot.ug", - "blogspot.co.uk", - "blogspot.com.uy", - "blogspot.vn", - "blogspot.co.za", - "goupile.fr", - "pymnt.uk", - "cloudapps.digital", - "london.cloudapps.digital", - "gov.nl", - "grafana-dev.net", - "grayjayleagues.com", - "günstigbestellen.de", - "günstigliefern.de", - "fin.ci", - "free.hr", - "caa.li", - "ua.rs", - "conf.se", - "häkkinen.fi", - "hrsn.dev", - "hashbang.sh", - "hasura.app", - "hasura-app.io", - "hatenablog.com", - "hatenadiary.com", - "hateblo.jp", - "hatenablog.jp", - "hatenadiary.jp", - "hatenadiary.org", - "pages.it.hs-heilbronn.de", - "pages-research.it.hs-heilbronn.de", - "heiyu.space", - "helioho.st", - "heliohost.us", - "hepforge.org", - "herokuapp.com", - "herokussl.com", - "heyflow.page", - "heyflow.site", - "ravendb.cloud", - "ravendb.community", - "development.run", - "ravendb.run", - "homesklep.pl", - "*.kin.one", - "*.id.pub", - "*.kin.pub", - "secaas.hk", - "hoplix.shop", - "orx.biz", - "biz.gl", - "biz.ng", - "co.biz.ng", - "dl.biz.ng", - "go.biz.ng", - "lg.biz.ng", - "on.biz.ng", - "col.ng", - "firm.ng", - "gen.ng", - "ltd.ng", - "ngo.ng", - "plc.ng", - "ie.ua", - "hostyhosting.io", - "hf.space", - "static.hf.space", - "hypernode.io", - "iobb.net", - "co.cz", - "*.moonscale.io", - "moonscale.net", - "gr.com", - "iki.fi", - "ibxos.it", - "iliadboxos.it", - "smushcdn.com", - "wphostedmail.com", - "wpmucdn.com", - "tempurl.host", - "wpmudev.host", - "dyn-berlin.de", - "in-berlin.de", - "in-brb.de", - "in-butter.de", - "in-dsl.de", - "in-vpn.de", - "in-dsl.net", - "in-vpn.net", - "in-dsl.org", - "in-vpn.org", - "biz.at", - "info.at", - "info.cx", - "ac.leg.br", - "al.leg.br", - "am.leg.br", - "ap.leg.br", - "ba.leg.br", - "ce.leg.br", - "df.leg.br", - "es.leg.br", - "go.leg.br", - "ma.leg.br", - "mg.leg.br", - "ms.leg.br", - "mt.leg.br", - "pa.leg.br", - "pb.leg.br", - "pe.leg.br", - "pi.leg.br", - "pr.leg.br", - "rj.leg.br", - "rn.leg.br", - "ro.leg.br", - "rr.leg.br", - "rs.leg.br", - "sc.leg.br", - "se.leg.br", - "sp.leg.br", - "to.leg.br", - "pixolino.com", - "na4u.ru", - "apps-1and1.com", - "live-website.com", - "apps-1and1.net", - "websitebuilder.online", - "app-ionos.space", - "iopsys.se", - "*.dweb.link", - "ipifony.net", - "ir.md", - "is-a-good.dev", - "is-a.dev", - "iservschule.de", - "mein-iserv.de", - "schulplattform.de", - "schulserver.de", - "test-iserv.de", - "iserv.dev", - "mel.cloudlets.com.au", - "cloud.interhostsolutions.be", - "alp1.ae.flow.ch", - "appengine.flow.ch", - "es-1.axarnet.cloud", - "diadem.cloud", - "vip.jelastic.cloud", - "jele.cloud", - "it1.eur.aruba.jenv-aruba.cloud", - "it1.jenv-aruba.cloud", - "keliweb.cloud", - "cs.keliweb.cloud", - "oxa.cloud", - "tn.oxa.cloud", - "uk.oxa.cloud", - "primetel.cloud", - "uk.primetel.cloud", - "ca.reclaim.cloud", - "uk.reclaim.cloud", - "us.reclaim.cloud", - "ch.trendhosting.cloud", - "de.trendhosting.cloud", - "jele.club", - "dopaas.com", - "paas.hosted-by-previder.com", - "rag-cloud.hosteur.com", - "rag-cloud-ch.hosteur.com", - "jcloud.ik-server.com", - "jcloud-ver-jpc.ik-server.com", - "demo.jelastic.com", - "paas.massivegrid.com", - "jed.wafaicloud.com", - "ryd.wafaicloud.com", - "j.scaleforce.com.cy", - "jelastic.dogado.eu", - "fi.cloudplatform.fi", - "demo.datacenter.fi", - "paas.datacenter.fi", - "jele.host", - "mircloud.host", - "paas.beebyte.io", - "sekd1.beebyteapp.io", - "jele.io", - "jc.neen.it", - "jcloud.kz", - "cloudjiffy.net", - "fra1-de.cloudjiffy.net", - "west1-us.cloudjiffy.net", - "jls-sto1.elastx.net", - "jls-sto2.elastx.net", - "jls-sto3.elastx.net", - "fr-1.paas.massivegrid.net", - "lon-1.paas.massivegrid.net", - "lon-2.paas.massivegrid.net", - "ny-1.paas.massivegrid.net", - "ny-2.paas.massivegrid.net", - "sg-1.paas.massivegrid.net", - "jelastic.saveincloud.net", - "nordeste-idc.saveincloud.net", - "j.scaleforce.net", - "sdscloud.pl", - "unicloud.pl", - "mircloud.ru", - "enscaled.sg", - "jele.site", - "jelastic.team", - "orangecloud.tn", - "j.layershift.co.uk", - "phx.enscaled.us", - "mircloud.us", - "myjino.ru", - "*.hosting.myjino.ru", - "*.landing.myjino.ru", - "*.spectrum.myjino.ru", - "*.vps.myjino.ru", - "jotelulu.cloud", - "webadorsite.com", - "jouwweb.site", - "*.cns.joyent.com", - "*.triton.zone", - "js.org", - "kaas.gg", - "khplay.nl", - "kapsi.fi", - "ezproxy.kuleuven.be", - "kuleuven.cloud", - "keymachine.de", - "kinghost.net", - "uni5.net", - "knightpoint.systems", - "koobin.events", - "webthings.io", - "krellian.net", - "oya.to", - "git-repos.de", - "lcube-server.de", - "svn-repos.de", - "leadpages.co", - "lpages.co", - "lpusercontent.com", - "lelux.site", - "libp2p.direct", - "runcontainers.dev", - "co.business", - "co.education", - "co.events", - "co.financial", - "co.network", - "co.place", - "co.technology", - "linkyard-cloud.ch", - "linkyard.cloud", - "members.linode.com", - "*.nodebalancer.linode.com", - "*.linodeobjects.com", - "ip.linodeusercontent.com", - "we.bs", - "filegear-sg.me", - "ggff.net", - "*.user.localcert.dev", - "lodz.pl", - "pabianice.pl", - "plock.pl", - "sieradz.pl", - "skierniewice.pl", - "zgierz.pl", - "loginline.app", - "loginline.dev", - "loginline.io", - "loginline.services", - "loginline.site", - "lohmus.me", - "servers.run", - "krasnik.pl", - "leczna.pl", - "lubartow.pl", - "lublin.pl", - "poniatowa.pl", - "swidnik.pl", - "glug.org.uk", - "lug.org.uk", - "lugs.org.uk", - "barsy.bg", - "barsy.club", - "barsycenter.com", - "barsyonline.com", - "barsy.de", - "barsy.dev", - "barsy.eu", - "barsy.gr", - "barsy.in", - "barsy.info", - "barsy.io", - "barsy.me", - "barsy.menu", - "barsyonline.menu", - "barsy.mobi", - "barsy.net", - "barsy.online", - "barsy.org", - "barsy.pro", - "barsy.pub", - "barsy.ro", - "barsy.rs", - "barsy.shop", - "barsyonline.shop", - "barsy.site", - "barsy.store", - "barsy.support", - "barsy.uk", - "barsy.co.uk", - "barsyonline.co.uk", - "*.magentosite.cloud", - "hb.cldmail.ru", - "matlab.cloud", - "modelscape.com", - "mwcloudnonprod.com", - "polyspace.com", - "mayfirst.info", - "mayfirst.org", - "mazeplay.com", - "mcdir.me", - "mcdir.ru", - "vps.mcdir.ru", - "mcpre.ru", - "mediatech.by", - "mediatech.dev", - "hra.health", - "medusajs.app", - "miniserver.com", - "memset.net", - "messerli.app", - "atmeta.com", - "apps.fbsbx.com", - "*.cloud.metacentrum.cz", - "custom.metacentrum.cz", - "flt.cloud.muni.cz", - "usr.cloud.muni.cz", - "meteorapp.com", - "eu.meteorapp.com", - "co.pl", - "*.azurecontainer.io", - "azure-api.net", - "azure-mobile.net", - "azureedge.net", - "azurefd.net", - "azurestaticapps.net", - "1.azurestaticapps.net", - "2.azurestaticapps.net", - "3.azurestaticapps.net", - "4.azurestaticapps.net", - "5.azurestaticapps.net", - "6.azurestaticapps.net", - "7.azurestaticapps.net", - "centralus.azurestaticapps.net", - "eastasia.azurestaticapps.net", - "eastus2.azurestaticapps.net", - "westeurope.azurestaticapps.net", - "westus2.azurestaticapps.net", - "azurewebsites.net", - "cloudapp.net", - "trafficmanager.net", - "blob.core.windows.net", - "servicebus.windows.net", - "routingthecloud.com", - "sn.mynetname.net", - "routingthecloud.net", - "routingthecloud.org", - "csx.cc", - "mydbserver.com", - "webspaceconfig.de", - "mittwald.info", - "mittwaldserver.info", - "typo3server.info", - "project.space", - "modx.dev", - "bmoattachments.org", - "net.ru", - "org.ru", - "pp.ru", - "hostedpi.com", - "caracal.mythic-beasts.com", - "customer.mythic-beasts.com", - "fentiger.mythic-beasts.com", - "lynx.mythic-beasts.com", - "ocelot.mythic-beasts.com", - "oncilla.mythic-beasts.com", - "onza.mythic-beasts.com", - "sphinx.mythic-beasts.com", - "vs.mythic-beasts.com", - "x.mythic-beasts.com", - "yali.mythic-beasts.com", - "cust.retrosnub.co.uk", - "ui.nabu.casa", - "cloud.nospamproxy.com", - "netfy.app", - "netlify.app", - "4u.com", - "nfshost.com", - "ipfs.nftstorage.link", - "ngo.us", - "ngrok.app", - "ngrok-free.app", - "ngrok.dev", - "ngrok-free.dev", - "ngrok.io", - "ap.ngrok.io", - "au.ngrok.io", - "eu.ngrok.io", - "in.ngrok.io", - "jp.ngrok.io", - "sa.ngrok.io", - "us.ngrok.io", - "ngrok.pizza", - "ngrok.pro", - "torun.pl", - "nh-serv.co.uk", - "nimsite.uk", - "mmafan.biz", - "myftp.biz", - "no-ip.biz", - "no-ip.ca", - "fantasyleague.cc", - "gotdns.ch", - "3utilities.com", - "blogsyte.com", - "ciscofreak.com", - "damnserver.com", - "ddnsking.com", - "ditchyourip.com", - "dnsiskinky.com", - "dynns.com", - "geekgalaxy.com", - "health-carereform.com", - "homesecuritymac.com", - "homesecuritypc.com", - "myactivedirectory.com", - "mysecuritycamera.com", - "myvnc.com", - "net-freaks.com", - "onthewifi.com", - "point2this.com", - "quicksytes.com", - "securitytactics.com", - "servebeer.com", - "servecounterstrike.com", - "serveexchange.com", - "serveftp.com", - "servegame.com", - "servehalflife.com", - "servehttp.com", - "servehumour.com", - "serveirc.com", - "servemp3.com", - "servep2p.com", - "servepics.com", - "servequake.com", - "servesarcasm.com", - "stufftoread.com", - "unusualperson.com", - "workisboring.com", - "dvrcam.info", - "ilovecollege.info", - "no-ip.info", - "brasilia.me", - "ddns.me", - "dnsfor.me", - "hopto.me", - "loginto.me", - "noip.me", - "webhop.me", - "bounceme.net", - "ddns.net", - "eating-organic.net", - "mydissent.net", - "myeffect.net", - "mymediapc.net", - "mypsx.net", - "mysecuritycamera.net", - "nhlfan.net", - "no-ip.net", - "pgafan.net", - "privatizehealthinsurance.net", - "redirectme.net", - "serveblog.net", - "serveminecraft.net", - "sytes.net", - "cable-modem.org", - "collegefan.org", - "couchpotatofries.org", - "hopto.org", - "mlbfan.org", - "myftp.org", - "mysecuritycamera.org", - "nflfan.org", - "no-ip.org", - "read-books.org", - "ufcfan.org", - "zapto.org", - "no-ip.co.uk", - "golffan.us", - "noip.us", - "pointto.us", - "stage.nodeart.io", - "*.developer.app", - "noop.app", - "*.northflank.app", - "*.build.run", - "*.code.run", - "*.database.run", - "*.migration.run", - "noticeable.news", - "notion.site", - "dnsking.ch", - "mypi.co", - "n4t.co", - "001www.com", - "myiphost.com", - "forumz.info", - "soundcast.me", - "tcp4.me", - "dnsup.net", - "hicam.net", - "now-dns.net", - "ownip.net", - "vpndns.net", - "dynserv.org", - "now-dns.org", - "x443.pw", - "now-dns.top", - "ntdll.top", - "freeddns.us", - "nsupdate.info", - "nerdpol.ovh", - "nyc.mn", - "prvcy.page", - "obl.ong", - "observablehq.cloud", - "static.observableusercontent.com", - "omg.lol", - "cloudycluster.net", - "omniwe.site", - "123webseite.at", - "123website.be", - "simplesite.com.br", - "123website.ch", - "simplesite.com", - "123webseite.de", - "123hjemmeside.dk", - "123miweb.es", - "123kotisivu.fi", - "123siteweb.fr", - "simplesite.gr", - "123homepage.it", - "123website.lu", - "123website.nl", - "123hjemmeside.no", - "service.one", - "simplesite.pl", - "123paginaweb.pt", - "123minsida.se", - "is-a-fullstack.dev", - "is-cool.dev", - "is-not-a.dev", - "localplayer.dev", - "is-local.org", - "opensocial.site", - "opencraft.hosting", - "16-b.it", - "32-b.it", - "64-b.it", - "orsites.com", - "operaunite.com", - "*.customer-oci.com", - "*.oci.customer-oci.com", - "*.ocp.customer-oci.com", - "*.ocs.customer-oci.com", - "*.oraclecloudapps.com", - "*.oraclegovcloudapps.com", - "*.oraclegovcloudapps.uk", - "tech.orange", - "can.re", - "authgear-staging.com", - "authgearapps.com", - "skygearapp.com", - "outsystemscloud.com", - "*.hosting.ovh.net", - "*.webpaas.ovh.net", - "ownprovider.com", - "own.pm", - "*.owo.codes", - "ox.rs", - "oy.lc", - "pgfog.com", - "pagexl.com", - "gotpantheon.com", - "pantheonsite.io", - "*.paywhirl.com", - "*.xmit.co", - "xmit.dev", - "madethis.site", - "srv.us", - "gh.srv.us", - "gl.srv.us", - "lk3.ru", - "mypep.link", - "perspecta.cloud", - "on-web.fr", - "*.upsun.app", - "upsunapp.com", - "ent.platform.sh", - "eu.platform.sh", - "us.platform.sh", - "*.platformsh.site", - "*.tst.site", - "platter-app.com", - "platter-app.dev", - "platterp.us", - "pley.games", - "onporter.run", - "co.bn", - "postman-echo.com", - "pstmn.io", - "mock.pstmn.io", - "httpbin.org", - "prequalifyme.today", - "xen.prgmr.com", - "priv.at", - "protonet.io", - "chirurgiens-dentistes-en-france.fr", - "byen.site", - "pubtls.org", - "pythonanywhere.com", - "eu.pythonanywhere.com", - "qa2.com", - "qcx.io", - "*.sys.qcx.io", - "myqnapcloud.cn", - "alpha-myqnapcloud.com", - "dev-myqnapcloud.com", - "mycloudnas.com", - "mynascloud.com", - "myqnapcloud.com", - "qoto.io", - "qualifioapp.com", - "ladesk.com", - "qbuser.com", - "*.quipelements.com", - "vapor.cloud", - "vaporcloud.io", - "rackmaze.com", - "rackmaze.net", - "cloudsite.builders", - "myradweb.net", - "servername.us", - "web.in", - "in.net", - "myrdbx.io", - "site.rb-hosting.io", - "*.on-rancher.cloud", - "*.on-k3s.io", - "*.on-rio.io", - "ravpage.co.il", - "readthedocs-hosted.com", - "readthedocs.io", - "rhcloud.com", - "instances.spawn.cc", - "onrender.com", - "app.render.com", - "replit.app", - "id.replit.app", - "firewalledreplit.co", - "id.firewalledreplit.co", - "repl.co", - "id.repl.co", - "replit.dev", - "archer.replit.dev", - "bones.replit.dev", - "canary.replit.dev", - "global.replit.dev", - "hacker.replit.dev", - "id.replit.dev", - "janeway.replit.dev", - "kim.replit.dev", - "kira.replit.dev", - "kirk.replit.dev", - "odo.replit.dev", - "paris.replit.dev", - "picard.replit.dev", - "pike.replit.dev", - "prerelease.replit.dev", - "reed.replit.dev", - "riker.replit.dev", - "sisko.replit.dev", - "spock.replit.dev", - "staging.replit.dev", - "sulu.replit.dev", - "tarpit.replit.dev", - "teams.replit.dev", - "tucker.replit.dev", - "wesley.replit.dev", - "worf.replit.dev", - "repl.run", - "resindevice.io", - "devices.resinstaging.io", - "hzc.io", - "adimo.co.uk", - "itcouldbewor.se", - "aus.basketball", - "nz.basketball", - "git-pages.rit.edu", - "rocky.page", - "rub.de", - "ruhr-uni-bochum.de", - "io.noc.ruhr-uni-bochum.de", - "биз.рус", - "ком.рус", - "крым.рус", - "мир.рус", - "мск.рус", - "орг.рус", - "самара.рус", - "сочи.рус", - "спб.рус", - "я.рус", - "ras.ru", - "nyat.app", - "180r.com", - "dojin.com", - "sakuratan.com", - "sakuraweb.com", - "x0.com", - "2-d.jp", - "bona.jp", - "crap.jp", - "daynight.jp", - "eek.jp", - "flop.jp", - "halfmoon.jp", - "jeez.jp", - "matrix.jp", - "mimoza.jp", - "ivory.ne.jp", - "mail-box.ne.jp", - "mints.ne.jp", - "mokuren.ne.jp", - "opal.ne.jp", - "sakura.ne.jp", - "sumomo.ne.jp", - "topaz.ne.jp", - "netgamers.jp", - "nyanta.jp", - "o0o0.jp", - "rdy.jp", - "rgr.jp", - "rulez.jp", - "s3.isk01.sakurastorage.jp", - "s3.isk02.sakurastorage.jp", - "saloon.jp", - "sblo.jp", - "skr.jp", - "tank.jp", - "uh-oh.jp", - "undo.jp", - "rs.webaccel.jp", - "user.webaccel.jp", - "websozai.jp", - "xii.jp", - "squares.net", - "jpn.org", - "kirara.st", - "x0.to", - "from.tv", - "sakura.tv", - "*.builder.code.com", - "*.dev-builder.code.com", - "*.stg-builder.code.com", - "*.001.test.code-builder-stg.platform.salesforce.com", - "*.d.crm.dev", - "*.w.crm.dev", - "*.wa.crm.dev", - "*.wb.crm.dev", - "*.wc.crm.dev", - "*.wd.crm.dev", - "*.we.crm.dev", - "*.wf.crm.dev", - "sandcats.io", - "logoip.com", - "logoip.de", - "fr-par-1.baremetal.scw.cloud", - "fr-par-2.baremetal.scw.cloud", - "nl-ams-1.baremetal.scw.cloud", - "cockpit.fr-par.scw.cloud", - "fnc.fr-par.scw.cloud", - "functions.fnc.fr-par.scw.cloud", - "k8s.fr-par.scw.cloud", - "nodes.k8s.fr-par.scw.cloud", - "s3.fr-par.scw.cloud", - "s3-website.fr-par.scw.cloud", - "whm.fr-par.scw.cloud", - "priv.instances.scw.cloud", - "pub.instances.scw.cloud", - "k8s.scw.cloud", - "cockpit.nl-ams.scw.cloud", - "k8s.nl-ams.scw.cloud", - "nodes.k8s.nl-ams.scw.cloud", - "s3.nl-ams.scw.cloud", - "s3-website.nl-ams.scw.cloud", - "whm.nl-ams.scw.cloud", - "cockpit.pl-waw.scw.cloud", - "k8s.pl-waw.scw.cloud", - "nodes.k8s.pl-waw.scw.cloud", - "s3.pl-waw.scw.cloud", - "s3-website.pl-waw.scw.cloud", - "scalebook.scw.cloud", - "smartlabeling.scw.cloud", - "dedibox.fr", - "schokokeks.net", - "gov.scot", - "service.gov.scot", - "scrysec.com", - "client.scrypted.io", - "firewall-gateway.com", - "firewall-gateway.de", - "my-gateway.de", - "my-router.de", - "spdns.de", - "spdns.eu", - "firewall-gateway.net", - "my-firewall.org", - "myfirewall.org", - "spdns.org", - "seidat.net", - "sellfy.store", - "minisite.ms", - "senseering.net", - "servebolt.cloud", - "biz.ua", - "co.ua", - "pp.ua", - "as.sh.cn", - "sheezy.games", - "shiftedit.io", - "myshopblocks.com", - "myshopify.com", - "shopitsite.com", - "shopware.shop", - "shopware.store", - "mo-siemens.io", - "1kapp.com", - "appchizi.com", - "applinzi.com", - "sinaapp.com", - "vipsinaapp.com", - "siteleaf.net", - "small-web.org", - "aeroport.fr", - "avocat.fr", - "chambagri.fr", - "chirurgiens-dentistes.fr", - "experts-comptables.fr", - "medecin.fr", - "notaires.fr", - "pharmacien.fr", - "port.fr", - "veterinaire.fr", - "vp4.me", - "*.snowflake.app", - "*.privatelink.snowflake.app", - "streamlit.app", - "streamlitapp.com", - "try-snowplow.com", - "mafelo.net", - "playstation-cloud.com", - "srht.site", - "apps.lair.io", - "*.stolos.io", - "spacekit.io", - "ind.mom", - "customer.speedpartner.de", - "myspreadshop.at", - "myspreadshop.com.au", - "myspreadshop.be", - "myspreadshop.ca", - "myspreadshop.ch", - "myspreadshop.com", - "myspreadshop.de", - "myspreadshop.dk", - "myspreadshop.es", - "myspreadshop.fi", - "myspreadshop.fr", - "myspreadshop.ie", - "myspreadshop.it", - "myspreadshop.net", - "myspreadshop.nl", - "myspreadshop.no", - "myspreadshop.pl", - "myspreadshop.se", - "myspreadshop.co.uk", - "w-corp-staticblitz.com", - "w-credentialless-staticblitz.com", - "w-staticblitz.com", - "stackhero-network.com", - "runs.onstackit.cloud", - "stackit.gg", - "stackit.rocks", - "stackit.run", - "stackit.zone", - "musician.io", - "novecore.site", - "api.stdlib.com", - "feedback.ac", - "forms.ac", - "assessments.cx", - "calculators.cx", - "funnels.cx", - "paynow.cx", - "quizzes.cx", - "researched.cx", - "tests.cx", - "surveys.so", - "storebase.store", - "storipress.app", - "storj.farm", - "strapiapp.com", - "media.strapiapp.com", - "vps-host.net", - "atl.jelastic.vps-host.net", - "njs.jelastic.vps-host.net", - "ric.jelastic.vps-host.net", - "streak-link.com", - "streaklinks.com", - "streakusercontent.com", - "soc.srcf.net", - "user.srcf.net", - "utwente.io", - "temp-dns.com", - "supabase.co", - "supabase.in", - "supabase.net", - "syncloud.it", - "dscloud.biz", - "direct.quickconnect.cn", - "dsmynas.com", - "familyds.com", - "diskstation.me", - "dscloud.me", - "i234.me", - "myds.me", - "synology.me", - "dscloud.mobi", - "dsmynas.net", - "familyds.net", - "dsmynas.org", - "familyds.org", - "direct.quickconnect.to", - "vpnplus.to", - "mytabit.com", - "mytabit.co.il", - "tabitorder.co.il", - "taifun-dns.de", - "ts.net", - "*.c.ts.net", - "gda.pl", - "gdansk.pl", - "gdynia.pl", - "med.pl", - "sopot.pl", - "taveusercontent.com", - "p.tawk.email", - "p.tawkto.email", - "site.tb-hosting.com", - "edugit.io", - "s3.teckids.org", - "telebit.app", - "telebit.io", - "*.telebit.xyz", - "*.firenet.ch", - "*.svc.firenet.ch", - "reservd.com", - "thingdustdata.com", - "cust.dev.thingdust.io", - "reservd.dev.thingdust.io", - "cust.disrec.thingdust.io", - "reservd.disrec.thingdust.io", - "cust.prod.thingdust.io", - "cust.testing.thingdust.io", - "reservd.testing.thingdust.io", - "tickets.io", - "arvo.network", - "azimuth.network", - "tlon.network", - "torproject.net", - "pages.torproject.net", - "townnews-staging.com", - "12hp.at", - "2ix.at", - "4lima.at", - "lima-city.at", - "12hp.ch", - "2ix.ch", - "4lima.ch", - "lima-city.ch", - "trafficplex.cloud", - "de.cool", - "12hp.de", - "2ix.de", - "4lima.de", - "lima-city.de", - "1337.pictures", - "clan.rip", - "lima-city.rocks", - "webspace.rocks", - "lima.zone", - "*.transurl.be", - "*.transurl.eu", - "site.transip.me", - "*.transurl.nl", - "tuxfamily.org", - "dd-dns.de", - "dray-dns.de", - "draydns.de", - "dyn-vpn.de", - "dynvpn.de", - "mein-vigor.de", - "my-vigor.de", - "my-wan.de", - "syno-ds.de", - "synology-diskstation.de", - "synology-ds.de", - "diskstation.eu", - "diskstation.org", - "typedream.app", - "pro.typeform.com", - "*.uberspace.de", - "uber.space", - "hk.com", - "inc.hk", - "ltd.hk", - "hk.org", - "it.com", - "unison-services.cloud", - "virtual-user.de", - "virtualuser.de", - "name.pm", - "sch.tf", - "biz.wf", - "sch.wf", - "org.yt", - "rs.ba", - "bielsko.pl", - "upli.io", - "urown.cloud", - "dnsupdate.info", - "us.org", - "v.ua", - "express.val.run", - "web.val.run", - "vercel.app", - "v0.build", - "vercel.dev", - "vusercontent.net", - "now.sh", - "2038.io", - "router.management", - "v-info.info", - "voorloper.cloud", - "*.vultrobjects.com", - "wafflecell.com", - "webflow.io", - "webflowtest.io", - "*.webhare.dev", - "bookonline.app", - "hotelwithflight.com", - "reserve-online.com", - "reserve-online.net", - "cprapid.com", - "pleskns.com", - "wp2.host", - "pdns.page", - "plesk.page", - "wpsquared.site", - "*.wadl.top", - "remotewd.com", - "box.ca", - "pages.wiardweb.com", - "toolforge.org", - "wmcloud.org", - "wmflabs.org", - "wdh.app", - "panel.gg", - "daemon.panel.gg", - "wixsite.com", - "wixstudio.com", - "editorx.io", - "wixstudio.io", - "wix.run", - "messwithdns.com", - "woltlab-demo.com", - "myforum.community", - "community-pro.de", - "diskussionsbereich.de", - "community-pro.net", - "meinforum.net", - "affinitylottery.org.uk", - "raffleentry.org.uk", - "weeklylottery.org.uk", - "wpenginepowered.com", - "js.wpenginepowered.com", - "half.host", - "xnbay.com", - "u2.xnbay.com", - "u2-local.xnbay.com", - "cistron.nl", - "demon.nl", - "xs4all.space", - "yandexcloud.net", - "storage.yandexcloud.net", - "website.yandexcloud.net", - "official.academy", - "yolasite.com", - "yombo.me", - "ynh.fr", - "nohost.me", - "noho.st", - "za.net", - "za.org", - "zap.cloud", - "zeabur.app", - "bss.design", - "basicserver.io", - "virtualserver.io", - "enterprisecloud.nu" -]; \ No newline at end of file diff --git a/test-eol-project/node_modules/psl/dist/psl.cjs b/test-eol-project/node_modules/psl/dist/psl.cjs deleted file mode 100644 index a84438ad..00000000 --- a/test-eol-project/node_modules/psl/dist/psl.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function K(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,F;function Q(){if(F)return O;F=1;const e=2147483647,s=36,c=1,o=26,t=38,d=700,z=72,y=128,g="-",P=/^xn--/,V=/[^\0-\x7F]/,G=/[\x2E\u3002\uFF0E\uFF61]/g,W={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=s-c,h=Math.floor,I=String.fromCharCode;function v(a){throw new RangeError(W[a])}function U(a,i){const m=[];let n=a.length;for(;n--;)m[n]=i(a[n]);return m}function S(a,i){const m=a.split("@");let n="";m.length>1&&(n=m[0]+"@",a=m[1]),a=a.replace(G,".");const r=a.split("."),p=U(r,i).join(".");return n+p}function L(a){const i=[];let m=0;const n=a.length;for(;m=55296&&r<=56319&&mString.fromCodePoint(...a),J=function(a){return a>=48&&a<58?26+(a-48):a>=65&&a<91?a-65:a>=97&&a<123?a-97:s},D=function(a,i){return a+22+75*(a<26)-((i!=0)<<5)},T=function(a,i,m){let n=0;for(a=m?h(a/d):a>>1,a+=h(a/i);a>C*o>>1;n+=s)a=h(a/C);return h(n+(C+1)*a/(a+t))},E=function(a){const i=[],m=a.length;let n=0,r=y,p=z,j=a.lastIndexOf(g);j<0&&(j=0);for(let u=0;u=128&&v("not-basic"),i.push(a.charCodeAt(u));for(let u=j>0?j+1:0;u=m&&v("invalid-input");const w=J(a.charCodeAt(u++));w>=s&&v("invalid-input"),w>h((e-n)/l)&&v("overflow"),n+=w*l;const x=b<=p?c:b>=p+o?o:b-p;if(wh(e/q)&&v("overflow"),l*=q}const f=i.length+1;p=T(n-k,f,k==0),h(n/f)>e-r&&v("overflow"),r+=h(n/f),n%=f,i.splice(n++,0,r)}return String.fromCodePoint(...i)},B=function(a){const i=[];a=L(a);const m=a.length;let n=y,r=0,p=z;for(const k of a)k<128&&i.push(I(k));const j=i.length;let u=j;for(j&&i.push(g);u=n&&lh((e-r)/f)&&v("overflow"),r+=(k-n)*f,n=k;for(const l of a)if(le&&v("overflow"),l===n){let b=r;for(let w=s;;w+=s){const x=w<=p?c:w>=p+o?o:w-p;if(b{const c=s.replace(/^(\*\.|\!)/,""),o=A.toASCII(c),t=s.charAt(0);if(e.has(o))throw new Error(`Multiple rules found for ${s} (${o})`);return e.set(o,{rule:s,suffix:c,punySuffix:o,wildcard:t==="*",exception:t==="!"}),e},new Map),aa=e=>{const c=A.toASCII(e).split(".");for(let o=0;o{const s=A.toASCII(e);if(s.length<1)return"DOMAIN_TOO_SHORT";if(s.length>255)return"DOMAIN_TOO_LONG";const c=s.split(".");let o;for(let t=0;t63)return"LABEL_TOO_LONG";if(o.charAt(0)==="-")return"LABEL_STARTS_WITH_DASH";if(o.charAt(o.length-1)==="-")return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-_]+$/.test(o))return"LABEL_INVALID_CHARS"}},_=e=>{if(typeof e!="string")throw new TypeError("Domain name must be a string.");let s=e.slice(0).toLowerCase();s.charAt(s.length-1)==="."&&(s=s.slice(0,s.length-1));const c=oa(s);if(c)return{input:e,error:{message:H[c],code:c}};const o={input:e,tld:null,sld:null,domain:null,subdomain:null,listed:!1},t=s.split(".");if(t[t.length-1]==="local")return o;const d=()=>(/xn--/.test(s)&&(o.domain&&(o.domain=A.toASCII(o.domain)),o.subdomain&&(o.subdomain=A.toASCII(o.subdomain))),o),z=aa(s);if(!z)return t.length<2?o:(o.tld=t.pop(),o.sld=t.pop(),o.domain=[o.sld,o.tld].join("."),t.length&&(o.subdomain=t.pop()),d());o.listed=!0;const y=z.suffix.split("."),g=t.slice(0,t.length-y.length);return z.exception&&g.push(y.shift()),o.tld=y.join("."),!g.length||(z.wildcard&&(y.unshift(g.pop()),o.tld=y.join(".")),!g.length)||(o.sld=g.pop(),o.domain=[o.sld,o.tld].join("."),g.length&&(o.subdomain=g.join("."))),d()},N=e=>e&&_(e).domain||null,R=e=>{const s=_(e);return!!(s.domain&&s.listed)},sa={parse:_,get:N,isValid:R};exports.default=sa;exports.errorCodes=H;exports.get=N;exports.isValid=R;exports.parse=_; diff --git a/test-eol-project/node_modules/psl/dist/psl.mjs b/test-eol-project/node_modules/psl/dist/psl.mjs deleted file mode 100644 index 07758bb0..00000000 --- a/test-eol-project/node_modules/psl/dist/psl.mjs +++ /dev/null @@ -1,10008 +0,0 @@ -function U(e) { - return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; -} -var C, F; -function $() { - if (F) return C; - F = 1; - const e = 2147483647, s = 36, c = 1, o = 26, t = 38, d = 700, z = 72, y = 128, g = "-", H = /^xn--/, N = /[^\0-\x7F]/, R = /[\x2E\u3002\uFF0E\uFF61]/g, P = { - overflow: "Overflow: input needs wider integers to process", - "not-basic": "Illegal input >= 0x80 (not a basic code point)", - "invalid-input": "Invalid input" - }, _ = s - c, h = Math.floor, I = String.fromCharCode; - function v(a) { - throw new RangeError(P[a]); - } - function V(a, i) { - const m = []; - let n = a.length; - for (; n--; ) - m[n] = i(a[n]); - return m; - } - function L(a, i) { - const m = a.split("@"); - let n = ""; - m.length > 1 && (n = m[0] + "@", a = m[1]), a = a.replace(R, "."); - const r = a.split("."), p = V(r, i).join("."); - return n + p; - } - function S(a) { - const i = []; - let m = 0; - const n = a.length; - for (; m < n; ) { - const r = a.charCodeAt(m++); - if (r >= 55296 && r <= 56319 && m < n) { - const p = a.charCodeAt(m++); - (p & 64512) == 56320 ? i.push(((r & 1023) << 10) + (p & 1023) + 65536) : (i.push(r), m--); - } else - i.push(r); - } - return i; - } - const G = (a) => String.fromCodePoint(...a), W = function(a) { - return a >= 48 && a < 58 ? 26 + (a - 48) : a >= 65 && a < 91 ? a - 65 : a >= 97 && a < 123 ? a - 97 : s; - }, D = function(a, i) { - return a + 22 + 75 * (a < 26) - ((i != 0) << 5); - }, T = function(a, i, m) { - let n = 0; - for (a = m ? h(a / d) : a >> 1, a += h(a / i); a > _ * o >> 1; n += s) - a = h(a / _); - return h(n + (_ + 1) * a / (a + t)); - }, E = function(a) { - const i = [], m = a.length; - let n = 0, r = y, p = z, j = a.lastIndexOf(g); - j < 0 && (j = 0); - for (let u = 0; u < j; ++u) - a.charCodeAt(u) >= 128 && v("not-basic"), i.push(a.charCodeAt(u)); - for (let u = j > 0 ? j + 1 : 0; u < m; ) { - const k = n; - for (let l = 1, b = s; ; b += s) { - u >= m && v("invalid-input"); - const w = W(a.charCodeAt(u++)); - w >= s && v("invalid-input"), w > h((e - n) / l) && v("overflow"), n += w * l; - const x = b <= p ? c : b >= p + o ? o : b - p; - if (w < x) - break; - const q = s - x; - l > h(e / q) && v("overflow"), l *= q; - } - const f = i.length + 1; - p = T(n - k, f, k == 0), h(n / f) > e - r && v("overflow"), r += h(n / f), n %= f, i.splice(n++, 0, r); - } - return String.fromCodePoint(...i); - }, B = function(a) { - const i = []; - a = S(a); - const m = a.length; - let n = y, r = 0, p = z; - for (const k of a) - k < 128 && i.push(I(k)); - const j = i.length; - let u = j; - for (j && i.push(g); u < m; ) { - let k = e; - for (const l of a) - l >= n && l < k && (k = l); - const f = u + 1; - k - n > h((e - r) / f) && v("overflow"), r += (k - n) * f, n = k; - for (const l of a) - if (l < n && ++r > e && v("overflow"), l === n) { - let b = r; - for (let w = s; ; w += s) { - const x = w <= p ? c : w >= p + o ? o : w - p; - if (b < x) - break; - const q = b - x, M = s - x; - i.push( - I(D(x + q % M, 0)) - ), b = h(q / M); - } - i.push(I(D(b, 0))), p = T(r, f, u === j), r = 0, ++u; - } - ++r, ++n; - } - return i.join(""); - }; - return C = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - version: "2.3.1", - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - ucs2: { - decode: S, - encode: G - }, - decode: E, - encode: B, - toASCII: function(a) { - return L(a, function(i) { - return N.test(i) ? "xn--" + B(i) : i; - }); - }, - toUnicode: function(a) { - return L(a, function(i) { - return H.test(i) ? E(i.slice(4).toLowerCase()) : i; - }); - } - }, C; -} -var J = $(); -const A = /* @__PURE__ */ U(J), K = [ - "ac", - "com.ac", - "edu.ac", - "gov.ac", - "mil.ac", - "net.ac", - "org.ac", - "ad", - "ae", - "ac.ae", - "co.ae", - "gov.ae", - "mil.ae", - "net.ae", - "org.ae", - "sch.ae", - "aero", - "airline.aero", - "airport.aero", - "accident-investigation.aero", - "accident-prevention.aero", - "aerobatic.aero", - "aeroclub.aero", - "aerodrome.aero", - "agents.aero", - "air-surveillance.aero", - "air-traffic-control.aero", - "aircraft.aero", - "airtraffic.aero", - "ambulance.aero", - "association.aero", - "author.aero", - "ballooning.aero", - "broker.aero", - "caa.aero", - "cargo.aero", - "catering.aero", - "certification.aero", - "championship.aero", - "charter.aero", - "civilaviation.aero", - "club.aero", - "conference.aero", - "consultant.aero", - "consulting.aero", - "control.aero", - "council.aero", - "crew.aero", - "design.aero", - "dgca.aero", - "educator.aero", - "emergency.aero", - "engine.aero", - "engineer.aero", - "entertainment.aero", - "equipment.aero", - "exchange.aero", - "express.aero", - "federation.aero", - "flight.aero", - "freight.aero", - "fuel.aero", - "gliding.aero", - "government.aero", - "groundhandling.aero", - "group.aero", - "hanggliding.aero", - "homebuilt.aero", - "insurance.aero", - "journal.aero", - "journalist.aero", - "leasing.aero", - "logistics.aero", - "magazine.aero", - "maintenance.aero", - "marketplace.aero", - "media.aero", - "microlight.aero", - "modelling.aero", - "navigation.aero", - "parachuting.aero", - "paragliding.aero", - "passenger-association.aero", - "pilot.aero", - "press.aero", - "production.aero", - "recreation.aero", - "repbody.aero", - "res.aero", - "research.aero", - "rotorcraft.aero", - "safety.aero", - "scientist.aero", - "services.aero", - "show.aero", - "skydiving.aero", - "software.aero", - "student.aero", - "taxi.aero", - "trader.aero", - "trading.aero", - "trainer.aero", - "union.aero", - "workinggroup.aero", - "works.aero", - "af", - "com.af", - "edu.af", - "gov.af", - "net.af", - "org.af", - "ag", - "co.ag", - "com.ag", - "net.ag", - "nom.ag", - "org.ag", - "ai", - "com.ai", - "net.ai", - "off.ai", - "org.ai", - "al", - "com.al", - "edu.al", - "gov.al", - "mil.al", - "net.al", - "org.al", - "am", - "co.am", - "com.am", - "commune.am", - "net.am", - "org.am", - "ao", - "co.ao", - "ed.ao", - "edu.ao", - "gov.ao", - "gv.ao", - "it.ao", - "og.ao", - "org.ao", - "pb.ao", - "aq", - "ar", - "bet.ar", - "com.ar", - "coop.ar", - "edu.ar", - "gob.ar", - "gov.ar", - "int.ar", - "mil.ar", - "musica.ar", - "mutual.ar", - "net.ar", - "org.ar", - "senasa.ar", - "tur.ar", - "arpa", - "e164.arpa", - "home.arpa", - "in-addr.arpa", - "ip6.arpa", - "iris.arpa", - "uri.arpa", - "urn.arpa", - "as", - "gov.as", - "asia", - "at", - "ac.at", - "sth.ac.at", - "co.at", - "gv.at", - "or.at", - "au", - "asn.au", - "com.au", - "edu.au", - "gov.au", - "id.au", - "net.au", - "org.au", - "conf.au", - "oz.au", - "act.au", - "nsw.au", - "nt.au", - "qld.au", - "sa.au", - "tas.au", - "vic.au", - "wa.au", - "act.edu.au", - "catholic.edu.au", - "nsw.edu.au", - "nt.edu.au", - "qld.edu.au", - "sa.edu.au", - "tas.edu.au", - "vic.edu.au", - "wa.edu.au", - "qld.gov.au", - "sa.gov.au", - "tas.gov.au", - "vic.gov.au", - "wa.gov.au", - "schools.nsw.edu.au", - "aw", - "com.aw", - "ax", - "az", - "biz.az", - "com.az", - "edu.az", - "gov.az", - "info.az", - "int.az", - "mil.az", - "name.az", - "net.az", - "org.az", - "pp.az", - "pro.az", - "ba", - "com.ba", - "edu.ba", - "gov.ba", - "mil.ba", - "net.ba", - "org.ba", - "bb", - "biz.bb", - "co.bb", - "com.bb", - "edu.bb", - "gov.bb", - "info.bb", - "net.bb", - "org.bb", - "store.bb", - "tv.bb", - "*.bd", - "be", - "ac.be", - "bf", - "gov.bf", - "bg", - "0.bg", - "1.bg", - "2.bg", - "3.bg", - "4.bg", - "5.bg", - "6.bg", - "7.bg", - "8.bg", - "9.bg", - "a.bg", - "b.bg", - "c.bg", - "d.bg", - "e.bg", - "f.bg", - "g.bg", - "h.bg", - "i.bg", - "j.bg", - "k.bg", - "l.bg", - "m.bg", - "n.bg", - "o.bg", - "p.bg", - "q.bg", - "r.bg", - "s.bg", - "t.bg", - "u.bg", - "v.bg", - "w.bg", - "x.bg", - "y.bg", - "z.bg", - "bh", - "com.bh", - "edu.bh", - "gov.bh", - "net.bh", - "org.bh", - "bi", - "co.bi", - "com.bi", - "edu.bi", - "or.bi", - "org.bi", - "biz", - "bj", - "africa.bj", - "agro.bj", - "architectes.bj", - "assur.bj", - "avocats.bj", - "co.bj", - "com.bj", - "eco.bj", - "econo.bj", - "edu.bj", - "info.bj", - "loisirs.bj", - "money.bj", - "net.bj", - "org.bj", - "ote.bj", - "restaurant.bj", - "resto.bj", - "tourism.bj", - "univ.bj", - "bm", - "com.bm", - "edu.bm", - "gov.bm", - "net.bm", - "org.bm", - "bn", - "com.bn", - "edu.bn", - "gov.bn", - "net.bn", - "org.bn", - "bo", - "com.bo", - "edu.bo", - "gob.bo", - "int.bo", - "mil.bo", - "net.bo", - "org.bo", - "tv.bo", - "web.bo", - "academia.bo", - "agro.bo", - "arte.bo", - "blog.bo", - "bolivia.bo", - "ciencia.bo", - "cooperativa.bo", - "democracia.bo", - "deporte.bo", - "ecologia.bo", - "economia.bo", - "empresa.bo", - "indigena.bo", - "industria.bo", - "info.bo", - "medicina.bo", - "movimiento.bo", - "musica.bo", - "natural.bo", - "nombre.bo", - "noticias.bo", - "patria.bo", - "plurinacional.bo", - "politica.bo", - "profesional.bo", - "pueblo.bo", - "revista.bo", - "salud.bo", - "tecnologia.bo", - "tksat.bo", - "transporte.bo", - "wiki.bo", - "br", - "9guacu.br", - "abc.br", - "adm.br", - "adv.br", - "agr.br", - "aju.br", - "am.br", - "anani.br", - "aparecida.br", - "app.br", - "arq.br", - "art.br", - "ato.br", - "b.br", - "barueri.br", - "belem.br", - "bet.br", - "bhz.br", - "bib.br", - "bio.br", - "blog.br", - "bmd.br", - "boavista.br", - "bsb.br", - "campinagrande.br", - "campinas.br", - "caxias.br", - "cim.br", - "cng.br", - "cnt.br", - "com.br", - "contagem.br", - "coop.br", - "coz.br", - "cri.br", - "cuiaba.br", - "curitiba.br", - "def.br", - "des.br", - "det.br", - "dev.br", - "ecn.br", - "eco.br", - "edu.br", - "emp.br", - "enf.br", - "eng.br", - "esp.br", - "etc.br", - "eti.br", - "far.br", - "feira.br", - "flog.br", - "floripa.br", - "fm.br", - "fnd.br", - "fortal.br", - "fot.br", - "foz.br", - "fst.br", - "g12.br", - "geo.br", - "ggf.br", - "goiania.br", - "gov.br", - "ac.gov.br", - "al.gov.br", - "am.gov.br", - "ap.gov.br", - "ba.gov.br", - "ce.gov.br", - "df.gov.br", - "es.gov.br", - "go.gov.br", - "ma.gov.br", - "mg.gov.br", - "ms.gov.br", - "mt.gov.br", - "pa.gov.br", - "pb.gov.br", - "pe.gov.br", - "pi.gov.br", - "pr.gov.br", - "rj.gov.br", - "rn.gov.br", - "ro.gov.br", - "rr.gov.br", - "rs.gov.br", - "sc.gov.br", - "se.gov.br", - "sp.gov.br", - "to.gov.br", - "gru.br", - "imb.br", - "ind.br", - "inf.br", - "jab.br", - "jampa.br", - "jdf.br", - "joinville.br", - "jor.br", - "jus.br", - "leg.br", - "leilao.br", - "lel.br", - "log.br", - "londrina.br", - "macapa.br", - "maceio.br", - "manaus.br", - "maringa.br", - "mat.br", - "med.br", - "mil.br", - "morena.br", - "mp.br", - "mus.br", - "natal.br", - "net.br", - "niteroi.br", - "*.nom.br", - "not.br", - "ntr.br", - "odo.br", - "ong.br", - "org.br", - "osasco.br", - "palmas.br", - "poa.br", - "ppg.br", - "pro.br", - "psc.br", - "psi.br", - "pvh.br", - "qsl.br", - "radio.br", - "rec.br", - "recife.br", - "rep.br", - "ribeirao.br", - "rio.br", - "riobranco.br", - "riopreto.br", - "salvador.br", - "sampa.br", - "santamaria.br", - "santoandre.br", - "saobernardo.br", - "saogonca.br", - "seg.br", - "sjc.br", - "slg.br", - "slz.br", - "sorocaba.br", - "srv.br", - "taxi.br", - "tc.br", - "tec.br", - "teo.br", - "the.br", - "tmp.br", - "trd.br", - "tur.br", - "tv.br", - "udi.br", - "vet.br", - "vix.br", - "vlog.br", - "wiki.br", - "zlg.br", - "bs", - "com.bs", - "edu.bs", - "gov.bs", - "net.bs", - "org.bs", - "bt", - "com.bt", - "edu.bt", - "gov.bt", - "net.bt", - "org.bt", - "bv", - "bw", - "co.bw", - "org.bw", - "by", - "gov.by", - "mil.by", - "com.by", - "of.by", - "bz", - "co.bz", - "com.bz", - "edu.bz", - "gov.bz", - "net.bz", - "org.bz", - "ca", - "ab.ca", - "bc.ca", - "mb.ca", - "nb.ca", - "nf.ca", - "nl.ca", - "ns.ca", - "nt.ca", - "nu.ca", - "on.ca", - "pe.ca", - "qc.ca", - "sk.ca", - "yk.ca", - "gc.ca", - "cat", - "cc", - "cd", - "gov.cd", - "cf", - "cg", - "ch", - "ci", - "ac.ci", - "aéroport.ci", - "asso.ci", - "co.ci", - "com.ci", - "ed.ci", - "edu.ci", - "go.ci", - "gouv.ci", - "int.ci", - "net.ci", - "or.ci", - "org.ci", - "*.ck", - "!www.ck", - "cl", - "co.cl", - "gob.cl", - "gov.cl", - "mil.cl", - "cm", - "co.cm", - "com.cm", - "gov.cm", - "net.cm", - "cn", - "ac.cn", - "com.cn", - "edu.cn", - "gov.cn", - "mil.cn", - "net.cn", - "org.cn", - "公司.cn", - "網絡.cn", - "网络.cn", - "ah.cn", - "bj.cn", - "cq.cn", - "fj.cn", - "gd.cn", - "gs.cn", - "gx.cn", - "gz.cn", - "ha.cn", - "hb.cn", - "he.cn", - "hi.cn", - "hk.cn", - "hl.cn", - "hn.cn", - "jl.cn", - "js.cn", - "jx.cn", - "ln.cn", - "mo.cn", - "nm.cn", - "nx.cn", - "qh.cn", - "sc.cn", - "sd.cn", - "sh.cn", - "sn.cn", - "sx.cn", - "tj.cn", - "tw.cn", - "xj.cn", - "xz.cn", - "yn.cn", - "zj.cn", - "co", - "com.co", - "edu.co", - "gov.co", - "mil.co", - "net.co", - "nom.co", - "org.co", - "com", - "coop", - "cr", - "ac.cr", - "co.cr", - "ed.cr", - "fi.cr", - "go.cr", - "or.cr", - "sa.cr", - "cu", - "com.cu", - "edu.cu", - "gob.cu", - "inf.cu", - "nat.cu", - "net.cu", - "org.cu", - "cv", - "com.cv", - "edu.cv", - "id.cv", - "int.cv", - "net.cv", - "nome.cv", - "org.cv", - "publ.cv", - "cw", - "com.cw", - "edu.cw", - "net.cw", - "org.cw", - "cx", - "gov.cx", - "cy", - "ac.cy", - "biz.cy", - "com.cy", - "ekloges.cy", - "gov.cy", - "ltd.cy", - "mil.cy", - "net.cy", - "org.cy", - "press.cy", - "pro.cy", - "tm.cy", - "cz", - "de", - "dj", - "dk", - "dm", - "co.dm", - "com.dm", - "edu.dm", - "gov.dm", - "net.dm", - "org.dm", - "do", - "art.do", - "com.do", - "edu.do", - "gob.do", - "gov.do", - "mil.do", - "net.do", - "org.do", - "sld.do", - "web.do", - "dz", - "art.dz", - "asso.dz", - "com.dz", - "edu.dz", - "gov.dz", - "net.dz", - "org.dz", - "pol.dz", - "soc.dz", - "tm.dz", - "ec", - "com.ec", - "edu.ec", - "fin.ec", - "gob.ec", - "gov.ec", - "info.ec", - "k12.ec", - "med.ec", - "mil.ec", - "net.ec", - "org.ec", - "pro.ec", - "edu", - "ee", - "aip.ee", - "com.ee", - "edu.ee", - "fie.ee", - "gov.ee", - "lib.ee", - "med.ee", - "org.ee", - "pri.ee", - "riik.ee", - "eg", - "ac.eg", - "com.eg", - "edu.eg", - "eun.eg", - "gov.eg", - "info.eg", - "me.eg", - "mil.eg", - "name.eg", - "net.eg", - "org.eg", - "sci.eg", - "sport.eg", - "tv.eg", - "*.er", - "es", - "com.es", - "edu.es", - "gob.es", - "nom.es", - "org.es", - "et", - "biz.et", - "com.et", - "edu.et", - "gov.et", - "info.et", - "name.et", - "net.et", - "org.et", - "eu", - "fi", - "aland.fi", - "fj", - "ac.fj", - "biz.fj", - "com.fj", - "gov.fj", - "info.fj", - "mil.fj", - "name.fj", - "net.fj", - "org.fj", - "pro.fj", - "*.fk", - "fm", - "com.fm", - "edu.fm", - "net.fm", - "org.fm", - "fo", - "fr", - "asso.fr", - "com.fr", - "gouv.fr", - "nom.fr", - "prd.fr", - "tm.fr", - "avoues.fr", - "cci.fr", - "greta.fr", - "huissier-justice.fr", - "ga", - "gb", - "gd", - "edu.gd", - "gov.gd", - "ge", - "com.ge", - "edu.ge", - "gov.ge", - "net.ge", - "org.ge", - "pvt.ge", - "school.ge", - "gf", - "gg", - "co.gg", - "net.gg", - "org.gg", - "gh", - "com.gh", - "edu.gh", - "gov.gh", - "mil.gh", - "org.gh", - "gi", - "com.gi", - "edu.gi", - "gov.gi", - "ltd.gi", - "mod.gi", - "org.gi", - "gl", - "co.gl", - "com.gl", - "edu.gl", - "net.gl", - "org.gl", - "gm", - "gn", - "ac.gn", - "com.gn", - "edu.gn", - "gov.gn", - "net.gn", - "org.gn", - "gov", - "gp", - "asso.gp", - "com.gp", - "edu.gp", - "mobi.gp", - "net.gp", - "org.gp", - "gq", - "gr", - "com.gr", - "edu.gr", - "gov.gr", - "net.gr", - "org.gr", - "gs", - "gt", - "com.gt", - "edu.gt", - "gob.gt", - "ind.gt", - "mil.gt", - "net.gt", - "org.gt", - "gu", - "com.gu", - "edu.gu", - "gov.gu", - "guam.gu", - "info.gu", - "net.gu", - "org.gu", - "web.gu", - "gw", - "gy", - "co.gy", - "com.gy", - "edu.gy", - "gov.gy", - "net.gy", - "org.gy", - "hk", - "com.hk", - "edu.hk", - "gov.hk", - "idv.hk", - "net.hk", - "org.hk", - "个人.hk", - "個人.hk", - "公司.hk", - "政府.hk", - "敎育.hk", - "教育.hk", - "箇人.hk", - "組織.hk", - "組织.hk", - "網絡.hk", - "網络.hk", - "组織.hk", - "组织.hk", - "网絡.hk", - "网络.hk", - "hm", - "hn", - "com.hn", - "edu.hn", - "gob.hn", - "mil.hn", - "net.hn", - "org.hn", - "hr", - "com.hr", - "from.hr", - "iz.hr", - "name.hr", - "ht", - "adult.ht", - "art.ht", - "asso.ht", - "com.ht", - "coop.ht", - "edu.ht", - "firm.ht", - "gouv.ht", - "info.ht", - "med.ht", - "net.ht", - "org.ht", - "perso.ht", - "pol.ht", - "pro.ht", - "rel.ht", - "shop.ht", - "hu", - "2000.hu", - "agrar.hu", - "bolt.hu", - "casino.hu", - "city.hu", - "co.hu", - "erotica.hu", - "erotika.hu", - "film.hu", - "forum.hu", - "games.hu", - "hotel.hu", - "info.hu", - "ingatlan.hu", - "jogasz.hu", - "konyvelo.hu", - "lakas.hu", - "media.hu", - "news.hu", - "org.hu", - "priv.hu", - "reklam.hu", - "sex.hu", - "shop.hu", - "sport.hu", - "suli.hu", - "szex.hu", - "tm.hu", - "tozsde.hu", - "utazas.hu", - "video.hu", - "id", - "ac.id", - "biz.id", - "co.id", - "desa.id", - "go.id", - "mil.id", - "my.id", - "net.id", - "or.id", - "ponpes.id", - "sch.id", - "web.id", - "ie", - "gov.ie", - "il", - "ac.il", - "co.il", - "gov.il", - "idf.il", - "k12.il", - "muni.il", - "net.il", - "org.il", - "ישראל", - "אקדמיה.ישראל", - "ישוב.ישראל", - "צהל.ישראל", - "ממשל.ישראל", - "im", - "ac.im", - "co.im", - "ltd.co.im", - "plc.co.im", - "com.im", - "net.im", - "org.im", - "tt.im", - "tv.im", - "in", - "5g.in", - "6g.in", - "ac.in", - "ai.in", - "am.in", - "bihar.in", - "biz.in", - "business.in", - "ca.in", - "cn.in", - "co.in", - "com.in", - "coop.in", - "cs.in", - "delhi.in", - "dr.in", - "edu.in", - "er.in", - "firm.in", - "gen.in", - "gov.in", - "gujarat.in", - "ind.in", - "info.in", - "int.in", - "internet.in", - "io.in", - "me.in", - "mil.in", - "net.in", - "nic.in", - "org.in", - "pg.in", - "post.in", - "pro.in", - "res.in", - "travel.in", - "tv.in", - "uk.in", - "up.in", - "us.in", - "info", - "int", - "eu.int", - "io", - "co.io", - "com.io", - "edu.io", - "gov.io", - "mil.io", - "net.io", - "nom.io", - "org.io", - "iq", - "com.iq", - "edu.iq", - "gov.iq", - "mil.iq", - "net.iq", - "org.iq", - "ir", - "ac.ir", - "co.ir", - "gov.ir", - "id.ir", - "net.ir", - "org.ir", - "sch.ir", - "ایران.ir", - "ايران.ir", - "is", - "it", - "edu.it", - "gov.it", - "abr.it", - "abruzzo.it", - "aosta-valley.it", - "aostavalley.it", - "bas.it", - "basilicata.it", - "cal.it", - "calabria.it", - "cam.it", - "campania.it", - "emilia-romagna.it", - "emiliaromagna.it", - "emr.it", - "friuli-v-giulia.it", - "friuli-ve-giulia.it", - "friuli-vegiulia.it", - "friuli-venezia-giulia.it", - "friuli-veneziagiulia.it", - "friuli-vgiulia.it", - "friuliv-giulia.it", - "friulive-giulia.it", - "friulivegiulia.it", - "friulivenezia-giulia.it", - "friuliveneziagiulia.it", - "friulivgiulia.it", - "fvg.it", - "laz.it", - "lazio.it", - "lig.it", - "liguria.it", - "lom.it", - "lombardia.it", - "lombardy.it", - "lucania.it", - "mar.it", - "marche.it", - "mol.it", - "molise.it", - "piedmont.it", - "piemonte.it", - "pmn.it", - "pug.it", - "puglia.it", - "sar.it", - "sardegna.it", - "sardinia.it", - "sic.it", - "sicilia.it", - "sicily.it", - "taa.it", - "tos.it", - "toscana.it", - "trentin-sud-tirol.it", - "trentin-süd-tirol.it", - "trentin-sudtirol.it", - "trentin-südtirol.it", - "trentin-sued-tirol.it", - "trentin-suedtirol.it", - "trentino.it", - "trentino-a-adige.it", - "trentino-aadige.it", - "trentino-alto-adige.it", - "trentino-altoadige.it", - "trentino-s-tirol.it", - "trentino-stirol.it", - "trentino-sud-tirol.it", - "trentino-süd-tirol.it", - "trentino-sudtirol.it", - "trentino-südtirol.it", - "trentino-sued-tirol.it", - "trentino-suedtirol.it", - "trentinoa-adige.it", - "trentinoaadige.it", - "trentinoalto-adige.it", - "trentinoaltoadige.it", - "trentinos-tirol.it", - "trentinostirol.it", - "trentinosud-tirol.it", - "trentinosüd-tirol.it", - "trentinosudtirol.it", - "trentinosüdtirol.it", - "trentinosued-tirol.it", - "trentinosuedtirol.it", - "trentinsud-tirol.it", - "trentinsüd-tirol.it", - "trentinsudtirol.it", - "trentinsüdtirol.it", - "trentinsued-tirol.it", - "trentinsuedtirol.it", - "tuscany.it", - "umb.it", - "umbria.it", - "val-d-aosta.it", - "val-daosta.it", - "vald-aosta.it", - "valdaosta.it", - "valle-aosta.it", - "valle-d-aosta.it", - "valle-daosta.it", - "valleaosta.it", - "valled-aosta.it", - "valledaosta.it", - "vallee-aoste.it", - "vallée-aoste.it", - "vallee-d-aoste.it", - "vallée-d-aoste.it", - "valleeaoste.it", - "valléeaoste.it", - "valleedaoste.it", - "valléedaoste.it", - "vao.it", - "vda.it", - "ven.it", - "veneto.it", - "ag.it", - "agrigento.it", - "al.it", - "alessandria.it", - "alto-adige.it", - "altoadige.it", - "an.it", - "ancona.it", - "andria-barletta-trani.it", - "andria-trani-barletta.it", - "andriabarlettatrani.it", - "andriatranibarletta.it", - "ao.it", - "aosta.it", - "aoste.it", - "ap.it", - "aq.it", - "aquila.it", - "ar.it", - "arezzo.it", - "ascoli-piceno.it", - "ascolipiceno.it", - "asti.it", - "at.it", - "av.it", - "avellino.it", - "ba.it", - "balsan.it", - "balsan-sudtirol.it", - "balsan-südtirol.it", - "balsan-suedtirol.it", - "bari.it", - "barletta-trani-andria.it", - "barlettatraniandria.it", - "belluno.it", - "benevento.it", - "bergamo.it", - "bg.it", - "bi.it", - "biella.it", - "bl.it", - "bn.it", - "bo.it", - "bologna.it", - "bolzano.it", - "bolzano-altoadige.it", - "bozen.it", - "bozen-sudtirol.it", - "bozen-südtirol.it", - "bozen-suedtirol.it", - "br.it", - "brescia.it", - "brindisi.it", - "bs.it", - "bt.it", - "bulsan.it", - "bulsan-sudtirol.it", - "bulsan-südtirol.it", - "bulsan-suedtirol.it", - "bz.it", - "ca.it", - "cagliari.it", - "caltanissetta.it", - "campidano-medio.it", - "campidanomedio.it", - "campobasso.it", - "carbonia-iglesias.it", - "carboniaiglesias.it", - "carrara-massa.it", - "carraramassa.it", - "caserta.it", - "catania.it", - "catanzaro.it", - "cb.it", - "ce.it", - "cesena-forli.it", - "cesena-forlì.it", - "cesenaforli.it", - "cesenaforlì.it", - "ch.it", - "chieti.it", - "ci.it", - "cl.it", - "cn.it", - "co.it", - "como.it", - "cosenza.it", - "cr.it", - "cremona.it", - "crotone.it", - "cs.it", - "ct.it", - "cuneo.it", - "cz.it", - "dell-ogliastra.it", - "dellogliastra.it", - "en.it", - "enna.it", - "fc.it", - "fe.it", - "fermo.it", - "ferrara.it", - "fg.it", - "fi.it", - "firenze.it", - "florence.it", - "fm.it", - "foggia.it", - "forli-cesena.it", - "forlì-cesena.it", - "forlicesena.it", - "forlìcesena.it", - "fr.it", - "frosinone.it", - "ge.it", - "genoa.it", - "genova.it", - "go.it", - "gorizia.it", - "gr.it", - "grosseto.it", - "iglesias-carbonia.it", - "iglesiascarbonia.it", - "im.it", - "imperia.it", - "is.it", - "isernia.it", - "kr.it", - "la-spezia.it", - "laquila.it", - "laspezia.it", - "latina.it", - "lc.it", - "le.it", - "lecce.it", - "lecco.it", - "li.it", - "livorno.it", - "lo.it", - "lodi.it", - "lt.it", - "lu.it", - "lucca.it", - "macerata.it", - "mantova.it", - "massa-carrara.it", - "massacarrara.it", - "matera.it", - "mb.it", - "mc.it", - "me.it", - "medio-campidano.it", - "mediocampidano.it", - "messina.it", - "mi.it", - "milan.it", - "milano.it", - "mn.it", - "mo.it", - "modena.it", - "monza.it", - "monza-brianza.it", - "monza-e-della-brianza.it", - "monzabrianza.it", - "monzaebrianza.it", - "monzaedellabrianza.it", - "ms.it", - "mt.it", - "na.it", - "naples.it", - "napoli.it", - "no.it", - "novara.it", - "nu.it", - "nuoro.it", - "og.it", - "ogliastra.it", - "olbia-tempio.it", - "olbiatempio.it", - "or.it", - "oristano.it", - "ot.it", - "pa.it", - "padova.it", - "padua.it", - "palermo.it", - "parma.it", - "pavia.it", - "pc.it", - "pd.it", - "pe.it", - "perugia.it", - "pesaro-urbino.it", - "pesarourbino.it", - "pescara.it", - "pg.it", - "pi.it", - "piacenza.it", - "pisa.it", - "pistoia.it", - "pn.it", - "po.it", - "pordenone.it", - "potenza.it", - "pr.it", - "prato.it", - "pt.it", - "pu.it", - "pv.it", - "pz.it", - "ra.it", - "ragusa.it", - "ravenna.it", - "rc.it", - "re.it", - "reggio-calabria.it", - "reggio-emilia.it", - "reggiocalabria.it", - "reggioemilia.it", - "rg.it", - "ri.it", - "rieti.it", - "rimini.it", - "rm.it", - "rn.it", - "ro.it", - "roma.it", - "rome.it", - "rovigo.it", - "sa.it", - "salerno.it", - "sassari.it", - "savona.it", - "si.it", - "siena.it", - "siracusa.it", - "so.it", - "sondrio.it", - "sp.it", - "sr.it", - "ss.it", - "südtirol.it", - "suedtirol.it", - "sv.it", - "ta.it", - "taranto.it", - "te.it", - "tempio-olbia.it", - "tempioolbia.it", - "teramo.it", - "terni.it", - "tn.it", - "to.it", - "torino.it", - "tp.it", - "tr.it", - "trani-andria-barletta.it", - "trani-barletta-andria.it", - "traniandriabarletta.it", - "tranibarlettaandria.it", - "trapani.it", - "trento.it", - "treviso.it", - "trieste.it", - "ts.it", - "turin.it", - "tv.it", - "ud.it", - "udine.it", - "urbino-pesaro.it", - "urbinopesaro.it", - "va.it", - "varese.it", - "vb.it", - "vc.it", - "ve.it", - "venezia.it", - "venice.it", - "verbania.it", - "vercelli.it", - "verona.it", - "vi.it", - "vibo-valentia.it", - "vibovalentia.it", - "vicenza.it", - "viterbo.it", - "vr.it", - "vs.it", - "vt.it", - "vv.it", - "je", - "co.je", - "net.je", - "org.je", - "*.jm", - "jo", - "agri.jo", - "ai.jo", - "com.jo", - "edu.jo", - "eng.jo", - "fm.jo", - "gov.jo", - "mil.jo", - "net.jo", - "org.jo", - "per.jo", - "phd.jo", - "sch.jo", - "tv.jo", - "jobs", - "jp", - "ac.jp", - "ad.jp", - "co.jp", - "ed.jp", - "go.jp", - "gr.jp", - "lg.jp", - "ne.jp", - "or.jp", - "aichi.jp", - "akita.jp", - "aomori.jp", - "chiba.jp", - "ehime.jp", - "fukui.jp", - "fukuoka.jp", - "fukushima.jp", - "gifu.jp", - "gunma.jp", - "hiroshima.jp", - "hokkaido.jp", - "hyogo.jp", - "ibaraki.jp", - "ishikawa.jp", - "iwate.jp", - "kagawa.jp", - "kagoshima.jp", - "kanagawa.jp", - "kochi.jp", - "kumamoto.jp", - "kyoto.jp", - "mie.jp", - "miyagi.jp", - "miyazaki.jp", - "nagano.jp", - "nagasaki.jp", - "nara.jp", - "niigata.jp", - "oita.jp", - "okayama.jp", - "okinawa.jp", - "osaka.jp", - "saga.jp", - "saitama.jp", - "shiga.jp", - "shimane.jp", - "shizuoka.jp", - "tochigi.jp", - "tokushima.jp", - "tokyo.jp", - "tottori.jp", - "toyama.jp", - "wakayama.jp", - "yamagata.jp", - "yamaguchi.jp", - "yamanashi.jp", - "三重.jp", - "京都.jp", - "佐賀.jp", - "兵庫.jp", - "北海道.jp", - "千葉.jp", - "和歌山.jp", - "埼玉.jp", - "大分.jp", - "大阪.jp", - "奈良.jp", - "宮城.jp", - "宮崎.jp", - "富山.jp", - "山口.jp", - "山形.jp", - "山梨.jp", - "岐阜.jp", - "岡山.jp", - "岩手.jp", - "島根.jp", - "広島.jp", - "徳島.jp", - "愛媛.jp", - "愛知.jp", - "新潟.jp", - "東京.jp", - "栃木.jp", - "沖縄.jp", - "滋賀.jp", - "熊本.jp", - "石川.jp", - "神奈川.jp", - "福井.jp", - "福岡.jp", - "福島.jp", - "秋田.jp", - "群馬.jp", - "茨城.jp", - "長崎.jp", - "長野.jp", - "青森.jp", - "静岡.jp", - "香川.jp", - "高知.jp", - "鳥取.jp", - "鹿児島.jp", - "*.kawasaki.jp", - "!city.kawasaki.jp", - "*.kitakyushu.jp", - "!city.kitakyushu.jp", - "*.kobe.jp", - "!city.kobe.jp", - "*.nagoya.jp", - "!city.nagoya.jp", - "*.sapporo.jp", - "!city.sapporo.jp", - "*.sendai.jp", - "!city.sendai.jp", - "*.yokohama.jp", - "!city.yokohama.jp", - "aisai.aichi.jp", - "ama.aichi.jp", - "anjo.aichi.jp", - "asuke.aichi.jp", - "chiryu.aichi.jp", - "chita.aichi.jp", - "fuso.aichi.jp", - "gamagori.aichi.jp", - "handa.aichi.jp", - "hazu.aichi.jp", - "hekinan.aichi.jp", - "higashiura.aichi.jp", - "ichinomiya.aichi.jp", - "inazawa.aichi.jp", - "inuyama.aichi.jp", - "isshiki.aichi.jp", - "iwakura.aichi.jp", - "kanie.aichi.jp", - "kariya.aichi.jp", - "kasugai.aichi.jp", - "kira.aichi.jp", - "kiyosu.aichi.jp", - "komaki.aichi.jp", - "konan.aichi.jp", - "kota.aichi.jp", - "mihama.aichi.jp", - "miyoshi.aichi.jp", - "nishio.aichi.jp", - "nisshin.aichi.jp", - "obu.aichi.jp", - "oguchi.aichi.jp", - "oharu.aichi.jp", - "okazaki.aichi.jp", - "owariasahi.aichi.jp", - "seto.aichi.jp", - "shikatsu.aichi.jp", - "shinshiro.aichi.jp", - "shitara.aichi.jp", - "tahara.aichi.jp", - "takahama.aichi.jp", - "tobishima.aichi.jp", - "toei.aichi.jp", - "togo.aichi.jp", - "tokai.aichi.jp", - "tokoname.aichi.jp", - "toyoake.aichi.jp", - "toyohashi.aichi.jp", - "toyokawa.aichi.jp", - "toyone.aichi.jp", - "toyota.aichi.jp", - "tsushima.aichi.jp", - "yatomi.aichi.jp", - "akita.akita.jp", - "daisen.akita.jp", - "fujisato.akita.jp", - "gojome.akita.jp", - "hachirogata.akita.jp", - "happou.akita.jp", - "higashinaruse.akita.jp", - "honjo.akita.jp", - "honjyo.akita.jp", - "ikawa.akita.jp", - "kamikoani.akita.jp", - "kamioka.akita.jp", - "katagami.akita.jp", - "kazuno.akita.jp", - "kitaakita.akita.jp", - "kosaka.akita.jp", - "kyowa.akita.jp", - "misato.akita.jp", - "mitane.akita.jp", - "moriyoshi.akita.jp", - "nikaho.akita.jp", - "noshiro.akita.jp", - "odate.akita.jp", - "oga.akita.jp", - "ogata.akita.jp", - "semboku.akita.jp", - "yokote.akita.jp", - "yurihonjo.akita.jp", - "aomori.aomori.jp", - "gonohe.aomori.jp", - "hachinohe.aomori.jp", - "hashikami.aomori.jp", - "hiranai.aomori.jp", - "hirosaki.aomori.jp", - "itayanagi.aomori.jp", - "kuroishi.aomori.jp", - "misawa.aomori.jp", - "mutsu.aomori.jp", - "nakadomari.aomori.jp", - "noheji.aomori.jp", - "oirase.aomori.jp", - "owani.aomori.jp", - "rokunohe.aomori.jp", - "sannohe.aomori.jp", - "shichinohe.aomori.jp", - "shingo.aomori.jp", - "takko.aomori.jp", - "towada.aomori.jp", - "tsugaru.aomori.jp", - "tsuruta.aomori.jp", - "abiko.chiba.jp", - "asahi.chiba.jp", - "chonan.chiba.jp", - "chosei.chiba.jp", - "choshi.chiba.jp", - "chuo.chiba.jp", - "funabashi.chiba.jp", - "futtsu.chiba.jp", - "hanamigawa.chiba.jp", - "ichihara.chiba.jp", - "ichikawa.chiba.jp", - "ichinomiya.chiba.jp", - "inzai.chiba.jp", - "isumi.chiba.jp", - "kamagaya.chiba.jp", - "kamogawa.chiba.jp", - "kashiwa.chiba.jp", - "katori.chiba.jp", - "katsuura.chiba.jp", - "kimitsu.chiba.jp", - "kisarazu.chiba.jp", - "kozaki.chiba.jp", - "kujukuri.chiba.jp", - "kyonan.chiba.jp", - "matsudo.chiba.jp", - "midori.chiba.jp", - "mihama.chiba.jp", - "minamiboso.chiba.jp", - "mobara.chiba.jp", - "mutsuzawa.chiba.jp", - "nagara.chiba.jp", - "nagareyama.chiba.jp", - "narashino.chiba.jp", - "narita.chiba.jp", - "noda.chiba.jp", - "oamishirasato.chiba.jp", - "omigawa.chiba.jp", - "onjuku.chiba.jp", - "otaki.chiba.jp", - "sakae.chiba.jp", - "sakura.chiba.jp", - "shimofusa.chiba.jp", - "shirako.chiba.jp", - "shiroi.chiba.jp", - "shisui.chiba.jp", - "sodegaura.chiba.jp", - "sosa.chiba.jp", - "tako.chiba.jp", - "tateyama.chiba.jp", - "togane.chiba.jp", - "tohnosho.chiba.jp", - "tomisato.chiba.jp", - "urayasu.chiba.jp", - "yachimata.chiba.jp", - "yachiyo.chiba.jp", - "yokaichiba.chiba.jp", - "yokoshibahikari.chiba.jp", - "yotsukaido.chiba.jp", - "ainan.ehime.jp", - "honai.ehime.jp", - "ikata.ehime.jp", - "imabari.ehime.jp", - "iyo.ehime.jp", - "kamijima.ehime.jp", - "kihoku.ehime.jp", - "kumakogen.ehime.jp", - "masaki.ehime.jp", - "matsuno.ehime.jp", - "matsuyama.ehime.jp", - "namikata.ehime.jp", - "niihama.ehime.jp", - "ozu.ehime.jp", - "saijo.ehime.jp", - "seiyo.ehime.jp", - "shikokuchuo.ehime.jp", - "tobe.ehime.jp", - "toon.ehime.jp", - "uchiko.ehime.jp", - "uwajima.ehime.jp", - "yawatahama.ehime.jp", - "echizen.fukui.jp", - "eiheiji.fukui.jp", - "fukui.fukui.jp", - "ikeda.fukui.jp", - "katsuyama.fukui.jp", - "mihama.fukui.jp", - "minamiechizen.fukui.jp", - "obama.fukui.jp", - "ohi.fukui.jp", - "ono.fukui.jp", - "sabae.fukui.jp", - "sakai.fukui.jp", - "takahama.fukui.jp", - "tsuruga.fukui.jp", - "wakasa.fukui.jp", - "ashiya.fukuoka.jp", - "buzen.fukuoka.jp", - "chikugo.fukuoka.jp", - "chikuho.fukuoka.jp", - "chikujo.fukuoka.jp", - "chikushino.fukuoka.jp", - "chikuzen.fukuoka.jp", - "chuo.fukuoka.jp", - "dazaifu.fukuoka.jp", - "fukuchi.fukuoka.jp", - "hakata.fukuoka.jp", - "higashi.fukuoka.jp", - "hirokawa.fukuoka.jp", - "hisayama.fukuoka.jp", - "iizuka.fukuoka.jp", - "inatsuki.fukuoka.jp", - "kaho.fukuoka.jp", - "kasuga.fukuoka.jp", - "kasuya.fukuoka.jp", - "kawara.fukuoka.jp", - "keisen.fukuoka.jp", - "koga.fukuoka.jp", - "kurate.fukuoka.jp", - "kurogi.fukuoka.jp", - "kurume.fukuoka.jp", - "minami.fukuoka.jp", - "miyako.fukuoka.jp", - "miyama.fukuoka.jp", - "miyawaka.fukuoka.jp", - "mizumaki.fukuoka.jp", - "munakata.fukuoka.jp", - "nakagawa.fukuoka.jp", - "nakama.fukuoka.jp", - "nishi.fukuoka.jp", - "nogata.fukuoka.jp", - "ogori.fukuoka.jp", - "okagaki.fukuoka.jp", - "okawa.fukuoka.jp", - "oki.fukuoka.jp", - "omuta.fukuoka.jp", - "onga.fukuoka.jp", - "onojo.fukuoka.jp", - "oto.fukuoka.jp", - "saigawa.fukuoka.jp", - "sasaguri.fukuoka.jp", - "shingu.fukuoka.jp", - "shinyoshitomi.fukuoka.jp", - "shonai.fukuoka.jp", - "soeda.fukuoka.jp", - "sue.fukuoka.jp", - "tachiarai.fukuoka.jp", - "tagawa.fukuoka.jp", - "takata.fukuoka.jp", - "toho.fukuoka.jp", - "toyotsu.fukuoka.jp", - "tsuiki.fukuoka.jp", - "ukiha.fukuoka.jp", - "umi.fukuoka.jp", - "usui.fukuoka.jp", - "yamada.fukuoka.jp", - "yame.fukuoka.jp", - "yanagawa.fukuoka.jp", - "yukuhashi.fukuoka.jp", - "aizubange.fukushima.jp", - "aizumisato.fukushima.jp", - "aizuwakamatsu.fukushima.jp", - "asakawa.fukushima.jp", - "bandai.fukushima.jp", - "date.fukushima.jp", - "fukushima.fukushima.jp", - "furudono.fukushima.jp", - "futaba.fukushima.jp", - "hanawa.fukushima.jp", - "higashi.fukushima.jp", - "hirata.fukushima.jp", - "hirono.fukushima.jp", - "iitate.fukushima.jp", - "inawashiro.fukushima.jp", - "ishikawa.fukushima.jp", - "iwaki.fukushima.jp", - "izumizaki.fukushima.jp", - "kagamiishi.fukushima.jp", - "kaneyama.fukushima.jp", - "kawamata.fukushima.jp", - "kitakata.fukushima.jp", - "kitashiobara.fukushima.jp", - "koori.fukushima.jp", - "koriyama.fukushima.jp", - "kunimi.fukushima.jp", - "miharu.fukushima.jp", - "mishima.fukushima.jp", - "namie.fukushima.jp", - "nango.fukushima.jp", - "nishiaizu.fukushima.jp", - "nishigo.fukushima.jp", - "okuma.fukushima.jp", - "omotego.fukushima.jp", - "ono.fukushima.jp", - "otama.fukushima.jp", - "samegawa.fukushima.jp", - "shimogo.fukushima.jp", - "shirakawa.fukushima.jp", - "showa.fukushima.jp", - "soma.fukushima.jp", - "sukagawa.fukushima.jp", - "taishin.fukushima.jp", - "tamakawa.fukushima.jp", - "tanagura.fukushima.jp", - "tenei.fukushima.jp", - "yabuki.fukushima.jp", - "yamato.fukushima.jp", - "yamatsuri.fukushima.jp", - "yanaizu.fukushima.jp", - "yugawa.fukushima.jp", - "anpachi.gifu.jp", - "ena.gifu.jp", - "gifu.gifu.jp", - "ginan.gifu.jp", - "godo.gifu.jp", - "gujo.gifu.jp", - "hashima.gifu.jp", - "hichiso.gifu.jp", - "hida.gifu.jp", - "higashishirakawa.gifu.jp", - "ibigawa.gifu.jp", - "ikeda.gifu.jp", - "kakamigahara.gifu.jp", - "kani.gifu.jp", - "kasahara.gifu.jp", - "kasamatsu.gifu.jp", - "kawaue.gifu.jp", - "kitagata.gifu.jp", - "mino.gifu.jp", - "minokamo.gifu.jp", - "mitake.gifu.jp", - "mizunami.gifu.jp", - "motosu.gifu.jp", - "nakatsugawa.gifu.jp", - "ogaki.gifu.jp", - "sakahogi.gifu.jp", - "seki.gifu.jp", - "sekigahara.gifu.jp", - "shirakawa.gifu.jp", - "tajimi.gifu.jp", - "takayama.gifu.jp", - "tarui.gifu.jp", - "toki.gifu.jp", - "tomika.gifu.jp", - "wanouchi.gifu.jp", - "yamagata.gifu.jp", - "yaotsu.gifu.jp", - "yoro.gifu.jp", - "annaka.gunma.jp", - "chiyoda.gunma.jp", - "fujioka.gunma.jp", - "higashiagatsuma.gunma.jp", - "isesaki.gunma.jp", - "itakura.gunma.jp", - "kanna.gunma.jp", - "kanra.gunma.jp", - "katashina.gunma.jp", - "kawaba.gunma.jp", - "kiryu.gunma.jp", - "kusatsu.gunma.jp", - "maebashi.gunma.jp", - "meiwa.gunma.jp", - "midori.gunma.jp", - "minakami.gunma.jp", - "naganohara.gunma.jp", - "nakanojo.gunma.jp", - "nanmoku.gunma.jp", - "numata.gunma.jp", - "oizumi.gunma.jp", - "ora.gunma.jp", - "ota.gunma.jp", - "shibukawa.gunma.jp", - "shimonita.gunma.jp", - "shinto.gunma.jp", - "showa.gunma.jp", - "takasaki.gunma.jp", - "takayama.gunma.jp", - "tamamura.gunma.jp", - "tatebayashi.gunma.jp", - "tomioka.gunma.jp", - "tsukiyono.gunma.jp", - "tsumagoi.gunma.jp", - "ueno.gunma.jp", - "yoshioka.gunma.jp", - "asaminami.hiroshima.jp", - "daiwa.hiroshima.jp", - "etajima.hiroshima.jp", - "fuchu.hiroshima.jp", - "fukuyama.hiroshima.jp", - "hatsukaichi.hiroshima.jp", - "higashihiroshima.hiroshima.jp", - "hongo.hiroshima.jp", - "jinsekikogen.hiroshima.jp", - "kaita.hiroshima.jp", - "kui.hiroshima.jp", - "kumano.hiroshima.jp", - "kure.hiroshima.jp", - "mihara.hiroshima.jp", - "miyoshi.hiroshima.jp", - "naka.hiroshima.jp", - "onomichi.hiroshima.jp", - "osakikamijima.hiroshima.jp", - "otake.hiroshima.jp", - "saka.hiroshima.jp", - "sera.hiroshima.jp", - "seranishi.hiroshima.jp", - "shinichi.hiroshima.jp", - "shobara.hiroshima.jp", - "takehara.hiroshima.jp", - "abashiri.hokkaido.jp", - "abira.hokkaido.jp", - "aibetsu.hokkaido.jp", - "akabira.hokkaido.jp", - "akkeshi.hokkaido.jp", - "asahikawa.hokkaido.jp", - "ashibetsu.hokkaido.jp", - "ashoro.hokkaido.jp", - "assabu.hokkaido.jp", - "atsuma.hokkaido.jp", - "bibai.hokkaido.jp", - "biei.hokkaido.jp", - "bifuka.hokkaido.jp", - "bihoro.hokkaido.jp", - "biratori.hokkaido.jp", - "chippubetsu.hokkaido.jp", - "chitose.hokkaido.jp", - "date.hokkaido.jp", - "ebetsu.hokkaido.jp", - "embetsu.hokkaido.jp", - "eniwa.hokkaido.jp", - "erimo.hokkaido.jp", - "esan.hokkaido.jp", - "esashi.hokkaido.jp", - "fukagawa.hokkaido.jp", - "fukushima.hokkaido.jp", - "furano.hokkaido.jp", - "furubira.hokkaido.jp", - "haboro.hokkaido.jp", - "hakodate.hokkaido.jp", - "hamatonbetsu.hokkaido.jp", - "hidaka.hokkaido.jp", - "higashikagura.hokkaido.jp", - "higashikawa.hokkaido.jp", - "hiroo.hokkaido.jp", - "hokuryu.hokkaido.jp", - "hokuto.hokkaido.jp", - "honbetsu.hokkaido.jp", - "horokanai.hokkaido.jp", - "horonobe.hokkaido.jp", - "ikeda.hokkaido.jp", - "imakane.hokkaido.jp", - "ishikari.hokkaido.jp", - "iwamizawa.hokkaido.jp", - "iwanai.hokkaido.jp", - "kamifurano.hokkaido.jp", - "kamikawa.hokkaido.jp", - "kamishihoro.hokkaido.jp", - "kamisunagawa.hokkaido.jp", - "kamoenai.hokkaido.jp", - "kayabe.hokkaido.jp", - "kembuchi.hokkaido.jp", - "kikonai.hokkaido.jp", - "kimobetsu.hokkaido.jp", - "kitahiroshima.hokkaido.jp", - "kitami.hokkaido.jp", - "kiyosato.hokkaido.jp", - "koshimizu.hokkaido.jp", - "kunneppu.hokkaido.jp", - "kuriyama.hokkaido.jp", - "kuromatsunai.hokkaido.jp", - "kushiro.hokkaido.jp", - "kutchan.hokkaido.jp", - "kyowa.hokkaido.jp", - "mashike.hokkaido.jp", - "matsumae.hokkaido.jp", - "mikasa.hokkaido.jp", - "minamifurano.hokkaido.jp", - "mombetsu.hokkaido.jp", - "moseushi.hokkaido.jp", - "mukawa.hokkaido.jp", - "muroran.hokkaido.jp", - "naie.hokkaido.jp", - "nakagawa.hokkaido.jp", - "nakasatsunai.hokkaido.jp", - "nakatombetsu.hokkaido.jp", - "nanae.hokkaido.jp", - "nanporo.hokkaido.jp", - "nayoro.hokkaido.jp", - "nemuro.hokkaido.jp", - "niikappu.hokkaido.jp", - "niki.hokkaido.jp", - "nishiokoppe.hokkaido.jp", - "noboribetsu.hokkaido.jp", - "numata.hokkaido.jp", - "obihiro.hokkaido.jp", - "obira.hokkaido.jp", - "oketo.hokkaido.jp", - "okoppe.hokkaido.jp", - "otaru.hokkaido.jp", - "otobe.hokkaido.jp", - "otofuke.hokkaido.jp", - "otoineppu.hokkaido.jp", - "oumu.hokkaido.jp", - "ozora.hokkaido.jp", - "pippu.hokkaido.jp", - "rankoshi.hokkaido.jp", - "rebun.hokkaido.jp", - "rikubetsu.hokkaido.jp", - "rishiri.hokkaido.jp", - "rishirifuji.hokkaido.jp", - "saroma.hokkaido.jp", - "sarufutsu.hokkaido.jp", - "shakotan.hokkaido.jp", - "shari.hokkaido.jp", - "shibecha.hokkaido.jp", - "shibetsu.hokkaido.jp", - "shikabe.hokkaido.jp", - "shikaoi.hokkaido.jp", - "shimamaki.hokkaido.jp", - "shimizu.hokkaido.jp", - "shimokawa.hokkaido.jp", - "shinshinotsu.hokkaido.jp", - "shintoku.hokkaido.jp", - "shiranuka.hokkaido.jp", - "shiraoi.hokkaido.jp", - "shiriuchi.hokkaido.jp", - "sobetsu.hokkaido.jp", - "sunagawa.hokkaido.jp", - "taiki.hokkaido.jp", - "takasu.hokkaido.jp", - "takikawa.hokkaido.jp", - "takinoue.hokkaido.jp", - "teshikaga.hokkaido.jp", - "tobetsu.hokkaido.jp", - "tohma.hokkaido.jp", - "tomakomai.hokkaido.jp", - "tomari.hokkaido.jp", - "toya.hokkaido.jp", - "toyako.hokkaido.jp", - "toyotomi.hokkaido.jp", - "toyoura.hokkaido.jp", - "tsubetsu.hokkaido.jp", - "tsukigata.hokkaido.jp", - "urakawa.hokkaido.jp", - "urausu.hokkaido.jp", - "uryu.hokkaido.jp", - "utashinai.hokkaido.jp", - "wakkanai.hokkaido.jp", - "wassamu.hokkaido.jp", - "yakumo.hokkaido.jp", - "yoichi.hokkaido.jp", - "aioi.hyogo.jp", - "akashi.hyogo.jp", - "ako.hyogo.jp", - "amagasaki.hyogo.jp", - "aogaki.hyogo.jp", - "asago.hyogo.jp", - "ashiya.hyogo.jp", - "awaji.hyogo.jp", - "fukusaki.hyogo.jp", - "goshiki.hyogo.jp", - "harima.hyogo.jp", - "himeji.hyogo.jp", - "ichikawa.hyogo.jp", - "inagawa.hyogo.jp", - "itami.hyogo.jp", - "kakogawa.hyogo.jp", - "kamigori.hyogo.jp", - "kamikawa.hyogo.jp", - "kasai.hyogo.jp", - "kasuga.hyogo.jp", - "kawanishi.hyogo.jp", - "miki.hyogo.jp", - "minamiawaji.hyogo.jp", - "nishinomiya.hyogo.jp", - "nishiwaki.hyogo.jp", - "ono.hyogo.jp", - "sanda.hyogo.jp", - "sannan.hyogo.jp", - "sasayama.hyogo.jp", - "sayo.hyogo.jp", - "shingu.hyogo.jp", - "shinonsen.hyogo.jp", - "shiso.hyogo.jp", - "sumoto.hyogo.jp", - "taishi.hyogo.jp", - "taka.hyogo.jp", - "takarazuka.hyogo.jp", - "takasago.hyogo.jp", - "takino.hyogo.jp", - "tamba.hyogo.jp", - "tatsuno.hyogo.jp", - "toyooka.hyogo.jp", - "yabu.hyogo.jp", - "yashiro.hyogo.jp", - "yoka.hyogo.jp", - "yokawa.hyogo.jp", - "ami.ibaraki.jp", - "asahi.ibaraki.jp", - "bando.ibaraki.jp", - "chikusei.ibaraki.jp", - "daigo.ibaraki.jp", - "fujishiro.ibaraki.jp", - "hitachi.ibaraki.jp", - "hitachinaka.ibaraki.jp", - "hitachiomiya.ibaraki.jp", - "hitachiota.ibaraki.jp", - "ibaraki.ibaraki.jp", - "ina.ibaraki.jp", - "inashiki.ibaraki.jp", - "itako.ibaraki.jp", - "iwama.ibaraki.jp", - "joso.ibaraki.jp", - "kamisu.ibaraki.jp", - "kasama.ibaraki.jp", - "kashima.ibaraki.jp", - "kasumigaura.ibaraki.jp", - "koga.ibaraki.jp", - "miho.ibaraki.jp", - "mito.ibaraki.jp", - "moriya.ibaraki.jp", - "naka.ibaraki.jp", - "namegata.ibaraki.jp", - "oarai.ibaraki.jp", - "ogawa.ibaraki.jp", - "omitama.ibaraki.jp", - "ryugasaki.ibaraki.jp", - "sakai.ibaraki.jp", - "sakuragawa.ibaraki.jp", - "shimodate.ibaraki.jp", - "shimotsuma.ibaraki.jp", - "shirosato.ibaraki.jp", - "sowa.ibaraki.jp", - "suifu.ibaraki.jp", - "takahagi.ibaraki.jp", - "tamatsukuri.ibaraki.jp", - "tokai.ibaraki.jp", - "tomobe.ibaraki.jp", - "tone.ibaraki.jp", - "toride.ibaraki.jp", - "tsuchiura.ibaraki.jp", - "tsukuba.ibaraki.jp", - "uchihara.ibaraki.jp", - "ushiku.ibaraki.jp", - "yachiyo.ibaraki.jp", - "yamagata.ibaraki.jp", - "yawara.ibaraki.jp", - "yuki.ibaraki.jp", - "anamizu.ishikawa.jp", - "hakui.ishikawa.jp", - "hakusan.ishikawa.jp", - "kaga.ishikawa.jp", - "kahoku.ishikawa.jp", - "kanazawa.ishikawa.jp", - "kawakita.ishikawa.jp", - "komatsu.ishikawa.jp", - "nakanoto.ishikawa.jp", - "nanao.ishikawa.jp", - "nomi.ishikawa.jp", - "nonoichi.ishikawa.jp", - "noto.ishikawa.jp", - "shika.ishikawa.jp", - "suzu.ishikawa.jp", - "tsubata.ishikawa.jp", - "tsurugi.ishikawa.jp", - "uchinada.ishikawa.jp", - "wajima.ishikawa.jp", - "fudai.iwate.jp", - "fujisawa.iwate.jp", - "hanamaki.iwate.jp", - "hiraizumi.iwate.jp", - "hirono.iwate.jp", - "ichinohe.iwate.jp", - "ichinoseki.iwate.jp", - "iwaizumi.iwate.jp", - "iwate.iwate.jp", - "joboji.iwate.jp", - "kamaishi.iwate.jp", - "kanegasaki.iwate.jp", - "karumai.iwate.jp", - "kawai.iwate.jp", - "kitakami.iwate.jp", - "kuji.iwate.jp", - "kunohe.iwate.jp", - "kuzumaki.iwate.jp", - "miyako.iwate.jp", - "mizusawa.iwate.jp", - "morioka.iwate.jp", - "ninohe.iwate.jp", - "noda.iwate.jp", - "ofunato.iwate.jp", - "oshu.iwate.jp", - "otsuchi.iwate.jp", - "rikuzentakata.iwate.jp", - "shiwa.iwate.jp", - "shizukuishi.iwate.jp", - "sumita.iwate.jp", - "tanohata.iwate.jp", - "tono.iwate.jp", - "yahaba.iwate.jp", - "yamada.iwate.jp", - "ayagawa.kagawa.jp", - "higashikagawa.kagawa.jp", - "kanonji.kagawa.jp", - "kotohira.kagawa.jp", - "manno.kagawa.jp", - "marugame.kagawa.jp", - "mitoyo.kagawa.jp", - "naoshima.kagawa.jp", - "sanuki.kagawa.jp", - "tadotsu.kagawa.jp", - "takamatsu.kagawa.jp", - "tonosho.kagawa.jp", - "uchinomi.kagawa.jp", - "utazu.kagawa.jp", - "zentsuji.kagawa.jp", - "akune.kagoshima.jp", - "amami.kagoshima.jp", - "hioki.kagoshima.jp", - "isa.kagoshima.jp", - "isen.kagoshima.jp", - "izumi.kagoshima.jp", - "kagoshima.kagoshima.jp", - "kanoya.kagoshima.jp", - "kawanabe.kagoshima.jp", - "kinko.kagoshima.jp", - "kouyama.kagoshima.jp", - "makurazaki.kagoshima.jp", - "matsumoto.kagoshima.jp", - "minamitane.kagoshima.jp", - "nakatane.kagoshima.jp", - "nishinoomote.kagoshima.jp", - "satsumasendai.kagoshima.jp", - "soo.kagoshima.jp", - "tarumizu.kagoshima.jp", - "yusui.kagoshima.jp", - "aikawa.kanagawa.jp", - "atsugi.kanagawa.jp", - "ayase.kanagawa.jp", - "chigasaki.kanagawa.jp", - "ebina.kanagawa.jp", - "fujisawa.kanagawa.jp", - "hadano.kanagawa.jp", - "hakone.kanagawa.jp", - "hiratsuka.kanagawa.jp", - "isehara.kanagawa.jp", - "kaisei.kanagawa.jp", - "kamakura.kanagawa.jp", - "kiyokawa.kanagawa.jp", - "matsuda.kanagawa.jp", - "minamiashigara.kanagawa.jp", - "miura.kanagawa.jp", - "nakai.kanagawa.jp", - "ninomiya.kanagawa.jp", - "odawara.kanagawa.jp", - "oi.kanagawa.jp", - "oiso.kanagawa.jp", - "sagamihara.kanagawa.jp", - "samukawa.kanagawa.jp", - "tsukui.kanagawa.jp", - "yamakita.kanagawa.jp", - "yamato.kanagawa.jp", - "yokosuka.kanagawa.jp", - "yugawara.kanagawa.jp", - "zama.kanagawa.jp", - "zushi.kanagawa.jp", - "aki.kochi.jp", - "geisei.kochi.jp", - "hidaka.kochi.jp", - "higashitsuno.kochi.jp", - "ino.kochi.jp", - "kagami.kochi.jp", - "kami.kochi.jp", - "kitagawa.kochi.jp", - "kochi.kochi.jp", - "mihara.kochi.jp", - "motoyama.kochi.jp", - "muroto.kochi.jp", - "nahari.kochi.jp", - "nakamura.kochi.jp", - "nankoku.kochi.jp", - "nishitosa.kochi.jp", - "niyodogawa.kochi.jp", - "ochi.kochi.jp", - "okawa.kochi.jp", - "otoyo.kochi.jp", - "otsuki.kochi.jp", - "sakawa.kochi.jp", - "sukumo.kochi.jp", - "susaki.kochi.jp", - "tosa.kochi.jp", - "tosashimizu.kochi.jp", - "toyo.kochi.jp", - "tsuno.kochi.jp", - "umaji.kochi.jp", - "yasuda.kochi.jp", - "yusuhara.kochi.jp", - "amakusa.kumamoto.jp", - "arao.kumamoto.jp", - "aso.kumamoto.jp", - "choyo.kumamoto.jp", - "gyokuto.kumamoto.jp", - "kamiamakusa.kumamoto.jp", - "kikuchi.kumamoto.jp", - "kumamoto.kumamoto.jp", - "mashiki.kumamoto.jp", - "mifune.kumamoto.jp", - "minamata.kumamoto.jp", - "minamioguni.kumamoto.jp", - "nagasu.kumamoto.jp", - "nishihara.kumamoto.jp", - "oguni.kumamoto.jp", - "ozu.kumamoto.jp", - "sumoto.kumamoto.jp", - "takamori.kumamoto.jp", - "uki.kumamoto.jp", - "uto.kumamoto.jp", - "yamaga.kumamoto.jp", - "yamato.kumamoto.jp", - "yatsushiro.kumamoto.jp", - "ayabe.kyoto.jp", - "fukuchiyama.kyoto.jp", - "higashiyama.kyoto.jp", - "ide.kyoto.jp", - "ine.kyoto.jp", - "joyo.kyoto.jp", - "kameoka.kyoto.jp", - "kamo.kyoto.jp", - "kita.kyoto.jp", - "kizu.kyoto.jp", - "kumiyama.kyoto.jp", - "kyotamba.kyoto.jp", - "kyotanabe.kyoto.jp", - "kyotango.kyoto.jp", - "maizuru.kyoto.jp", - "minami.kyoto.jp", - "minamiyamashiro.kyoto.jp", - "miyazu.kyoto.jp", - "muko.kyoto.jp", - "nagaokakyo.kyoto.jp", - "nakagyo.kyoto.jp", - "nantan.kyoto.jp", - "oyamazaki.kyoto.jp", - "sakyo.kyoto.jp", - "seika.kyoto.jp", - "tanabe.kyoto.jp", - "uji.kyoto.jp", - "ujitawara.kyoto.jp", - "wazuka.kyoto.jp", - "yamashina.kyoto.jp", - "yawata.kyoto.jp", - "asahi.mie.jp", - "inabe.mie.jp", - "ise.mie.jp", - "kameyama.mie.jp", - "kawagoe.mie.jp", - "kiho.mie.jp", - "kisosaki.mie.jp", - "kiwa.mie.jp", - "komono.mie.jp", - "kumano.mie.jp", - "kuwana.mie.jp", - "matsusaka.mie.jp", - "meiwa.mie.jp", - "mihama.mie.jp", - "minamiise.mie.jp", - "misugi.mie.jp", - "miyama.mie.jp", - "nabari.mie.jp", - "shima.mie.jp", - "suzuka.mie.jp", - "tado.mie.jp", - "taiki.mie.jp", - "taki.mie.jp", - "tamaki.mie.jp", - "toba.mie.jp", - "tsu.mie.jp", - "udono.mie.jp", - "ureshino.mie.jp", - "watarai.mie.jp", - "yokkaichi.mie.jp", - "furukawa.miyagi.jp", - "higashimatsushima.miyagi.jp", - "ishinomaki.miyagi.jp", - "iwanuma.miyagi.jp", - "kakuda.miyagi.jp", - "kami.miyagi.jp", - "kawasaki.miyagi.jp", - "marumori.miyagi.jp", - "matsushima.miyagi.jp", - "minamisanriku.miyagi.jp", - "misato.miyagi.jp", - "murata.miyagi.jp", - "natori.miyagi.jp", - "ogawara.miyagi.jp", - "ohira.miyagi.jp", - "onagawa.miyagi.jp", - "osaki.miyagi.jp", - "rifu.miyagi.jp", - "semine.miyagi.jp", - "shibata.miyagi.jp", - "shichikashuku.miyagi.jp", - "shikama.miyagi.jp", - "shiogama.miyagi.jp", - "shiroishi.miyagi.jp", - "tagajo.miyagi.jp", - "taiwa.miyagi.jp", - "tome.miyagi.jp", - "tomiya.miyagi.jp", - "wakuya.miyagi.jp", - "watari.miyagi.jp", - "yamamoto.miyagi.jp", - "zao.miyagi.jp", - "aya.miyazaki.jp", - "ebino.miyazaki.jp", - "gokase.miyazaki.jp", - "hyuga.miyazaki.jp", - "kadogawa.miyazaki.jp", - "kawaminami.miyazaki.jp", - "kijo.miyazaki.jp", - "kitagawa.miyazaki.jp", - "kitakata.miyazaki.jp", - "kitaura.miyazaki.jp", - "kobayashi.miyazaki.jp", - "kunitomi.miyazaki.jp", - "kushima.miyazaki.jp", - "mimata.miyazaki.jp", - "miyakonojo.miyazaki.jp", - "miyazaki.miyazaki.jp", - "morotsuka.miyazaki.jp", - "nichinan.miyazaki.jp", - "nishimera.miyazaki.jp", - "nobeoka.miyazaki.jp", - "saito.miyazaki.jp", - "shiiba.miyazaki.jp", - "shintomi.miyazaki.jp", - "takaharu.miyazaki.jp", - "takanabe.miyazaki.jp", - "takazaki.miyazaki.jp", - "tsuno.miyazaki.jp", - "achi.nagano.jp", - "agematsu.nagano.jp", - "anan.nagano.jp", - "aoki.nagano.jp", - "asahi.nagano.jp", - "azumino.nagano.jp", - "chikuhoku.nagano.jp", - "chikuma.nagano.jp", - "chino.nagano.jp", - "fujimi.nagano.jp", - "hakuba.nagano.jp", - "hara.nagano.jp", - "hiraya.nagano.jp", - "iida.nagano.jp", - "iijima.nagano.jp", - "iiyama.nagano.jp", - "iizuna.nagano.jp", - "ikeda.nagano.jp", - "ikusaka.nagano.jp", - "ina.nagano.jp", - "karuizawa.nagano.jp", - "kawakami.nagano.jp", - "kiso.nagano.jp", - "kisofukushima.nagano.jp", - "kitaaiki.nagano.jp", - "komagane.nagano.jp", - "komoro.nagano.jp", - "matsukawa.nagano.jp", - "matsumoto.nagano.jp", - "miasa.nagano.jp", - "minamiaiki.nagano.jp", - "minamimaki.nagano.jp", - "minamiminowa.nagano.jp", - "minowa.nagano.jp", - "miyada.nagano.jp", - "miyota.nagano.jp", - "mochizuki.nagano.jp", - "nagano.nagano.jp", - "nagawa.nagano.jp", - "nagiso.nagano.jp", - "nakagawa.nagano.jp", - "nakano.nagano.jp", - "nozawaonsen.nagano.jp", - "obuse.nagano.jp", - "ogawa.nagano.jp", - "okaya.nagano.jp", - "omachi.nagano.jp", - "omi.nagano.jp", - "ookuwa.nagano.jp", - "ooshika.nagano.jp", - "otaki.nagano.jp", - "otari.nagano.jp", - "sakae.nagano.jp", - "sakaki.nagano.jp", - "saku.nagano.jp", - "sakuho.nagano.jp", - "shimosuwa.nagano.jp", - "shinanomachi.nagano.jp", - "shiojiri.nagano.jp", - "suwa.nagano.jp", - "suzaka.nagano.jp", - "takagi.nagano.jp", - "takamori.nagano.jp", - "takayama.nagano.jp", - "tateshina.nagano.jp", - "tatsuno.nagano.jp", - "togakushi.nagano.jp", - "togura.nagano.jp", - "tomi.nagano.jp", - "ueda.nagano.jp", - "wada.nagano.jp", - "yamagata.nagano.jp", - "yamanouchi.nagano.jp", - "yasaka.nagano.jp", - "yasuoka.nagano.jp", - "chijiwa.nagasaki.jp", - "futsu.nagasaki.jp", - "goto.nagasaki.jp", - "hasami.nagasaki.jp", - "hirado.nagasaki.jp", - "iki.nagasaki.jp", - "isahaya.nagasaki.jp", - "kawatana.nagasaki.jp", - "kuchinotsu.nagasaki.jp", - "matsuura.nagasaki.jp", - "nagasaki.nagasaki.jp", - "obama.nagasaki.jp", - "omura.nagasaki.jp", - "oseto.nagasaki.jp", - "saikai.nagasaki.jp", - "sasebo.nagasaki.jp", - "seihi.nagasaki.jp", - "shimabara.nagasaki.jp", - "shinkamigoto.nagasaki.jp", - "togitsu.nagasaki.jp", - "tsushima.nagasaki.jp", - "unzen.nagasaki.jp", - "ando.nara.jp", - "gose.nara.jp", - "heguri.nara.jp", - "higashiyoshino.nara.jp", - "ikaruga.nara.jp", - "ikoma.nara.jp", - "kamikitayama.nara.jp", - "kanmaki.nara.jp", - "kashiba.nara.jp", - "kashihara.nara.jp", - "katsuragi.nara.jp", - "kawai.nara.jp", - "kawakami.nara.jp", - "kawanishi.nara.jp", - "koryo.nara.jp", - "kurotaki.nara.jp", - "mitsue.nara.jp", - "miyake.nara.jp", - "nara.nara.jp", - "nosegawa.nara.jp", - "oji.nara.jp", - "ouda.nara.jp", - "oyodo.nara.jp", - "sakurai.nara.jp", - "sango.nara.jp", - "shimoichi.nara.jp", - "shimokitayama.nara.jp", - "shinjo.nara.jp", - "soni.nara.jp", - "takatori.nara.jp", - "tawaramoto.nara.jp", - "tenkawa.nara.jp", - "tenri.nara.jp", - "uda.nara.jp", - "yamatokoriyama.nara.jp", - "yamatotakada.nara.jp", - "yamazoe.nara.jp", - "yoshino.nara.jp", - "aga.niigata.jp", - "agano.niigata.jp", - "gosen.niigata.jp", - "itoigawa.niigata.jp", - "izumozaki.niigata.jp", - "joetsu.niigata.jp", - "kamo.niigata.jp", - "kariwa.niigata.jp", - "kashiwazaki.niigata.jp", - "minamiuonuma.niigata.jp", - "mitsuke.niigata.jp", - "muika.niigata.jp", - "murakami.niigata.jp", - "myoko.niigata.jp", - "nagaoka.niigata.jp", - "niigata.niigata.jp", - "ojiya.niigata.jp", - "omi.niigata.jp", - "sado.niigata.jp", - "sanjo.niigata.jp", - "seiro.niigata.jp", - "seirou.niigata.jp", - "sekikawa.niigata.jp", - "shibata.niigata.jp", - "tagami.niigata.jp", - "tainai.niigata.jp", - "tochio.niigata.jp", - "tokamachi.niigata.jp", - "tsubame.niigata.jp", - "tsunan.niigata.jp", - "uonuma.niigata.jp", - "yahiko.niigata.jp", - "yoita.niigata.jp", - "yuzawa.niigata.jp", - "beppu.oita.jp", - "bungoono.oita.jp", - "bungotakada.oita.jp", - "hasama.oita.jp", - "hiji.oita.jp", - "himeshima.oita.jp", - "hita.oita.jp", - "kamitsue.oita.jp", - "kokonoe.oita.jp", - "kuju.oita.jp", - "kunisaki.oita.jp", - "kusu.oita.jp", - "oita.oita.jp", - "saiki.oita.jp", - "taketa.oita.jp", - "tsukumi.oita.jp", - "usa.oita.jp", - "usuki.oita.jp", - "yufu.oita.jp", - "akaiwa.okayama.jp", - "asakuchi.okayama.jp", - "bizen.okayama.jp", - "hayashima.okayama.jp", - "ibara.okayama.jp", - "kagamino.okayama.jp", - "kasaoka.okayama.jp", - "kibichuo.okayama.jp", - "kumenan.okayama.jp", - "kurashiki.okayama.jp", - "maniwa.okayama.jp", - "misaki.okayama.jp", - "nagi.okayama.jp", - "niimi.okayama.jp", - "nishiawakura.okayama.jp", - "okayama.okayama.jp", - "satosho.okayama.jp", - "setouchi.okayama.jp", - "shinjo.okayama.jp", - "shoo.okayama.jp", - "soja.okayama.jp", - "takahashi.okayama.jp", - "tamano.okayama.jp", - "tsuyama.okayama.jp", - "wake.okayama.jp", - "yakage.okayama.jp", - "aguni.okinawa.jp", - "ginowan.okinawa.jp", - "ginoza.okinawa.jp", - "gushikami.okinawa.jp", - "haebaru.okinawa.jp", - "higashi.okinawa.jp", - "hirara.okinawa.jp", - "iheya.okinawa.jp", - "ishigaki.okinawa.jp", - "ishikawa.okinawa.jp", - "itoman.okinawa.jp", - "izena.okinawa.jp", - "kadena.okinawa.jp", - "kin.okinawa.jp", - "kitadaito.okinawa.jp", - "kitanakagusuku.okinawa.jp", - "kumejima.okinawa.jp", - "kunigami.okinawa.jp", - "minamidaito.okinawa.jp", - "motobu.okinawa.jp", - "nago.okinawa.jp", - "naha.okinawa.jp", - "nakagusuku.okinawa.jp", - "nakijin.okinawa.jp", - "nanjo.okinawa.jp", - "nishihara.okinawa.jp", - "ogimi.okinawa.jp", - "okinawa.okinawa.jp", - "onna.okinawa.jp", - "shimoji.okinawa.jp", - "taketomi.okinawa.jp", - "tarama.okinawa.jp", - "tokashiki.okinawa.jp", - "tomigusuku.okinawa.jp", - "tonaki.okinawa.jp", - "urasoe.okinawa.jp", - "uruma.okinawa.jp", - "yaese.okinawa.jp", - "yomitan.okinawa.jp", - "yonabaru.okinawa.jp", - "yonaguni.okinawa.jp", - "zamami.okinawa.jp", - "abeno.osaka.jp", - "chihayaakasaka.osaka.jp", - "chuo.osaka.jp", - "daito.osaka.jp", - "fujiidera.osaka.jp", - "habikino.osaka.jp", - "hannan.osaka.jp", - "higashiosaka.osaka.jp", - "higashisumiyoshi.osaka.jp", - "higashiyodogawa.osaka.jp", - "hirakata.osaka.jp", - "ibaraki.osaka.jp", - "ikeda.osaka.jp", - "izumi.osaka.jp", - "izumiotsu.osaka.jp", - "izumisano.osaka.jp", - "kadoma.osaka.jp", - "kaizuka.osaka.jp", - "kanan.osaka.jp", - "kashiwara.osaka.jp", - "katano.osaka.jp", - "kawachinagano.osaka.jp", - "kishiwada.osaka.jp", - "kita.osaka.jp", - "kumatori.osaka.jp", - "matsubara.osaka.jp", - "minato.osaka.jp", - "minoh.osaka.jp", - "misaki.osaka.jp", - "moriguchi.osaka.jp", - "neyagawa.osaka.jp", - "nishi.osaka.jp", - "nose.osaka.jp", - "osakasayama.osaka.jp", - "sakai.osaka.jp", - "sayama.osaka.jp", - "sennan.osaka.jp", - "settsu.osaka.jp", - "shijonawate.osaka.jp", - "shimamoto.osaka.jp", - "suita.osaka.jp", - "tadaoka.osaka.jp", - "taishi.osaka.jp", - "tajiri.osaka.jp", - "takaishi.osaka.jp", - "takatsuki.osaka.jp", - "tondabayashi.osaka.jp", - "toyonaka.osaka.jp", - "toyono.osaka.jp", - "yao.osaka.jp", - "ariake.saga.jp", - "arita.saga.jp", - "fukudomi.saga.jp", - "genkai.saga.jp", - "hamatama.saga.jp", - "hizen.saga.jp", - "imari.saga.jp", - "kamimine.saga.jp", - "kanzaki.saga.jp", - "karatsu.saga.jp", - "kashima.saga.jp", - "kitagata.saga.jp", - "kitahata.saga.jp", - "kiyama.saga.jp", - "kouhoku.saga.jp", - "kyuragi.saga.jp", - "nishiarita.saga.jp", - "ogi.saga.jp", - "omachi.saga.jp", - "ouchi.saga.jp", - "saga.saga.jp", - "shiroishi.saga.jp", - "taku.saga.jp", - "tara.saga.jp", - "tosu.saga.jp", - "yoshinogari.saga.jp", - "arakawa.saitama.jp", - "asaka.saitama.jp", - "chichibu.saitama.jp", - "fujimi.saitama.jp", - "fujimino.saitama.jp", - "fukaya.saitama.jp", - "hanno.saitama.jp", - "hanyu.saitama.jp", - "hasuda.saitama.jp", - "hatogaya.saitama.jp", - "hatoyama.saitama.jp", - "hidaka.saitama.jp", - "higashichichibu.saitama.jp", - "higashimatsuyama.saitama.jp", - "honjo.saitama.jp", - "ina.saitama.jp", - "iruma.saitama.jp", - "iwatsuki.saitama.jp", - "kamiizumi.saitama.jp", - "kamikawa.saitama.jp", - "kamisato.saitama.jp", - "kasukabe.saitama.jp", - "kawagoe.saitama.jp", - "kawaguchi.saitama.jp", - "kawajima.saitama.jp", - "kazo.saitama.jp", - "kitamoto.saitama.jp", - "koshigaya.saitama.jp", - "kounosu.saitama.jp", - "kuki.saitama.jp", - "kumagaya.saitama.jp", - "matsubushi.saitama.jp", - "minano.saitama.jp", - "misato.saitama.jp", - "miyashiro.saitama.jp", - "miyoshi.saitama.jp", - "moroyama.saitama.jp", - "nagatoro.saitama.jp", - "namegawa.saitama.jp", - "niiza.saitama.jp", - "ogano.saitama.jp", - "ogawa.saitama.jp", - "ogose.saitama.jp", - "okegawa.saitama.jp", - "omiya.saitama.jp", - "otaki.saitama.jp", - "ranzan.saitama.jp", - "ryokami.saitama.jp", - "saitama.saitama.jp", - "sakado.saitama.jp", - "satte.saitama.jp", - "sayama.saitama.jp", - "shiki.saitama.jp", - "shiraoka.saitama.jp", - "soka.saitama.jp", - "sugito.saitama.jp", - "toda.saitama.jp", - "tokigawa.saitama.jp", - "tokorozawa.saitama.jp", - "tsurugashima.saitama.jp", - "urawa.saitama.jp", - "warabi.saitama.jp", - "yashio.saitama.jp", - "yokoze.saitama.jp", - "yono.saitama.jp", - "yorii.saitama.jp", - "yoshida.saitama.jp", - "yoshikawa.saitama.jp", - "yoshimi.saitama.jp", - "aisho.shiga.jp", - "gamo.shiga.jp", - "higashiomi.shiga.jp", - "hikone.shiga.jp", - "koka.shiga.jp", - "konan.shiga.jp", - "kosei.shiga.jp", - "koto.shiga.jp", - "kusatsu.shiga.jp", - "maibara.shiga.jp", - "moriyama.shiga.jp", - "nagahama.shiga.jp", - "nishiazai.shiga.jp", - "notogawa.shiga.jp", - "omihachiman.shiga.jp", - "otsu.shiga.jp", - "ritto.shiga.jp", - "ryuoh.shiga.jp", - "takashima.shiga.jp", - "takatsuki.shiga.jp", - "torahime.shiga.jp", - "toyosato.shiga.jp", - "yasu.shiga.jp", - "akagi.shimane.jp", - "ama.shimane.jp", - "gotsu.shimane.jp", - "hamada.shimane.jp", - "higashiizumo.shimane.jp", - "hikawa.shimane.jp", - "hikimi.shimane.jp", - "izumo.shimane.jp", - "kakinoki.shimane.jp", - "masuda.shimane.jp", - "matsue.shimane.jp", - "misato.shimane.jp", - "nishinoshima.shimane.jp", - "ohda.shimane.jp", - "okinoshima.shimane.jp", - "okuizumo.shimane.jp", - "shimane.shimane.jp", - "tamayu.shimane.jp", - "tsuwano.shimane.jp", - "unnan.shimane.jp", - "yakumo.shimane.jp", - "yasugi.shimane.jp", - "yatsuka.shimane.jp", - "arai.shizuoka.jp", - "atami.shizuoka.jp", - "fuji.shizuoka.jp", - "fujieda.shizuoka.jp", - "fujikawa.shizuoka.jp", - "fujinomiya.shizuoka.jp", - "fukuroi.shizuoka.jp", - "gotemba.shizuoka.jp", - "haibara.shizuoka.jp", - "hamamatsu.shizuoka.jp", - "higashiizu.shizuoka.jp", - "ito.shizuoka.jp", - "iwata.shizuoka.jp", - "izu.shizuoka.jp", - "izunokuni.shizuoka.jp", - "kakegawa.shizuoka.jp", - "kannami.shizuoka.jp", - "kawanehon.shizuoka.jp", - "kawazu.shizuoka.jp", - "kikugawa.shizuoka.jp", - "kosai.shizuoka.jp", - "makinohara.shizuoka.jp", - "matsuzaki.shizuoka.jp", - "minamiizu.shizuoka.jp", - "mishima.shizuoka.jp", - "morimachi.shizuoka.jp", - "nishiizu.shizuoka.jp", - "numazu.shizuoka.jp", - "omaezaki.shizuoka.jp", - "shimada.shizuoka.jp", - "shimizu.shizuoka.jp", - "shimoda.shizuoka.jp", - "shizuoka.shizuoka.jp", - "susono.shizuoka.jp", - "yaizu.shizuoka.jp", - "yoshida.shizuoka.jp", - "ashikaga.tochigi.jp", - "bato.tochigi.jp", - "haga.tochigi.jp", - "ichikai.tochigi.jp", - "iwafune.tochigi.jp", - "kaminokawa.tochigi.jp", - "kanuma.tochigi.jp", - "karasuyama.tochigi.jp", - "kuroiso.tochigi.jp", - "mashiko.tochigi.jp", - "mibu.tochigi.jp", - "moka.tochigi.jp", - "motegi.tochigi.jp", - "nasu.tochigi.jp", - "nasushiobara.tochigi.jp", - "nikko.tochigi.jp", - "nishikata.tochigi.jp", - "nogi.tochigi.jp", - "ohira.tochigi.jp", - "ohtawara.tochigi.jp", - "oyama.tochigi.jp", - "sakura.tochigi.jp", - "sano.tochigi.jp", - "shimotsuke.tochigi.jp", - "shioya.tochigi.jp", - "takanezawa.tochigi.jp", - "tochigi.tochigi.jp", - "tsuga.tochigi.jp", - "ujiie.tochigi.jp", - "utsunomiya.tochigi.jp", - "yaita.tochigi.jp", - "aizumi.tokushima.jp", - "anan.tokushima.jp", - "ichiba.tokushima.jp", - "itano.tokushima.jp", - "kainan.tokushima.jp", - "komatsushima.tokushima.jp", - "matsushige.tokushima.jp", - "mima.tokushima.jp", - "minami.tokushima.jp", - "miyoshi.tokushima.jp", - "mugi.tokushima.jp", - "nakagawa.tokushima.jp", - "naruto.tokushima.jp", - "sanagochi.tokushima.jp", - "shishikui.tokushima.jp", - "tokushima.tokushima.jp", - "wajiki.tokushima.jp", - "adachi.tokyo.jp", - "akiruno.tokyo.jp", - "akishima.tokyo.jp", - "aogashima.tokyo.jp", - "arakawa.tokyo.jp", - "bunkyo.tokyo.jp", - "chiyoda.tokyo.jp", - "chofu.tokyo.jp", - "chuo.tokyo.jp", - "edogawa.tokyo.jp", - "fuchu.tokyo.jp", - "fussa.tokyo.jp", - "hachijo.tokyo.jp", - "hachioji.tokyo.jp", - "hamura.tokyo.jp", - "higashikurume.tokyo.jp", - "higashimurayama.tokyo.jp", - "higashiyamato.tokyo.jp", - "hino.tokyo.jp", - "hinode.tokyo.jp", - "hinohara.tokyo.jp", - "inagi.tokyo.jp", - "itabashi.tokyo.jp", - "katsushika.tokyo.jp", - "kita.tokyo.jp", - "kiyose.tokyo.jp", - "kodaira.tokyo.jp", - "koganei.tokyo.jp", - "kokubunji.tokyo.jp", - "komae.tokyo.jp", - "koto.tokyo.jp", - "kouzushima.tokyo.jp", - "kunitachi.tokyo.jp", - "machida.tokyo.jp", - "meguro.tokyo.jp", - "minato.tokyo.jp", - "mitaka.tokyo.jp", - "mizuho.tokyo.jp", - "musashimurayama.tokyo.jp", - "musashino.tokyo.jp", - "nakano.tokyo.jp", - "nerima.tokyo.jp", - "ogasawara.tokyo.jp", - "okutama.tokyo.jp", - "ome.tokyo.jp", - "oshima.tokyo.jp", - "ota.tokyo.jp", - "setagaya.tokyo.jp", - "shibuya.tokyo.jp", - "shinagawa.tokyo.jp", - "shinjuku.tokyo.jp", - "suginami.tokyo.jp", - "sumida.tokyo.jp", - "tachikawa.tokyo.jp", - "taito.tokyo.jp", - "tama.tokyo.jp", - "toshima.tokyo.jp", - "chizu.tottori.jp", - "hino.tottori.jp", - "kawahara.tottori.jp", - "koge.tottori.jp", - "kotoura.tottori.jp", - "misasa.tottori.jp", - "nanbu.tottori.jp", - "nichinan.tottori.jp", - "sakaiminato.tottori.jp", - "tottori.tottori.jp", - "wakasa.tottori.jp", - "yazu.tottori.jp", - "yonago.tottori.jp", - "asahi.toyama.jp", - "fuchu.toyama.jp", - "fukumitsu.toyama.jp", - "funahashi.toyama.jp", - "himi.toyama.jp", - "imizu.toyama.jp", - "inami.toyama.jp", - "johana.toyama.jp", - "kamiichi.toyama.jp", - "kurobe.toyama.jp", - "nakaniikawa.toyama.jp", - "namerikawa.toyama.jp", - "nanto.toyama.jp", - "nyuzen.toyama.jp", - "oyabe.toyama.jp", - "taira.toyama.jp", - "takaoka.toyama.jp", - "tateyama.toyama.jp", - "toga.toyama.jp", - "tonami.toyama.jp", - "toyama.toyama.jp", - "unazuki.toyama.jp", - "uozu.toyama.jp", - "yamada.toyama.jp", - "arida.wakayama.jp", - "aridagawa.wakayama.jp", - "gobo.wakayama.jp", - "hashimoto.wakayama.jp", - "hidaka.wakayama.jp", - "hirogawa.wakayama.jp", - "inami.wakayama.jp", - "iwade.wakayama.jp", - "kainan.wakayama.jp", - "kamitonda.wakayama.jp", - "katsuragi.wakayama.jp", - "kimino.wakayama.jp", - "kinokawa.wakayama.jp", - "kitayama.wakayama.jp", - "koya.wakayama.jp", - "koza.wakayama.jp", - "kozagawa.wakayama.jp", - "kudoyama.wakayama.jp", - "kushimoto.wakayama.jp", - "mihama.wakayama.jp", - "misato.wakayama.jp", - "nachikatsuura.wakayama.jp", - "shingu.wakayama.jp", - "shirahama.wakayama.jp", - "taiji.wakayama.jp", - "tanabe.wakayama.jp", - "wakayama.wakayama.jp", - "yuasa.wakayama.jp", - "yura.wakayama.jp", - "asahi.yamagata.jp", - "funagata.yamagata.jp", - "higashine.yamagata.jp", - "iide.yamagata.jp", - "kahoku.yamagata.jp", - "kaminoyama.yamagata.jp", - "kaneyama.yamagata.jp", - "kawanishi.yamagata.jp", - "mamurogawa.yamagata.jp", - "mikawa.yamagata.jp", - "murayama.yamagata.jp", - "nagai.yamagata.jp", - "nakayama.yamagata.jp", - "nanyo.yamagata.jp", - "nishikawa.yamagata.jp", - "obanazawa.yamagata.jp", - "oe.yamagata.jp", - "oguni.yamagata.jp", - "ohkura.yamagata.jp", - "oishida.yamagata.jp", - "sagae.yamagata.jp", - "sakata.yamagata.jp", - "sakegawa.yamagata.jp", - "shinjo.yamagata.jp", - "shirataka.yamagata.jp", - "shonai.yamagata.jp", - "takahata.yamagata.jp", - "tendo.yamagata.jp", - "tozawa.yamagata.jp", - "tsuruoka.yamagata.jp", - "yamagata.yamagata.jp", - "yamanobe.yamagata.jp", - "yonezawa.yamagata.jp", - "yuza.yamagata.jp", - "abu.yamaguchi.jp", - "hagi.yamaguchi.jp", - "hikari.yamaguchi.jp", - "hofu.yamaguchi.jp", - "iwakuni.yamaguchi.jp", - "kudamatsu.yamaguchi.jp", - "mitou.yamaguchi.jp", - "nagato.yamaguchi.jp", - "oshima.yamaguchi.jp", - "shimonoseki.yamaguchi.jp", - "shunan.yamaguchi.jp", - "tabuse.yamaguchi.jp", - "tokuyama.yamaguchi.jp", - "toyota.yamaguchi.jp", - "ube.yamaguchi.jp", - "yuu.yamaguchi.jp", - "chuo.yamanashi.jp", - "doshi.yamanashi.jp", - "fuefuki.yamanashi.jp", - "fujikawa.yamanashi.jp", - "fujikawaguchiko.yamanashi.jp", - "fujiyoshida.yamanashi.jp", - "hayakawa.yamanashi.jp", - "hokuto.yamanashi.jp", - "ichikawamisato.yamanashi.jp", - "kai.yamanashi.jp", - "kofu.yamanashi.jp", - "koshu.yamanashi.jp", - "kosuge.yamanashi.jp", - "minami-alps.yamanashi.jp", - "minobu.yamanashi.jp", - "nakamichi.yamanashi.jp", - "nanbu.yamanashi.jp", - "narusawa.yamanashi.jp", - "nirasaki.yamanashi.jp", - "nishikatsura.yamanashi.jp", - "oshino.yamanashi.jp", - "otsuki.yamanashi.jp", - "showa.yamanashi.jp", - "tabayama.yamanashi.jp", - "tsuru.yamanashi.jp", - "uenohara.yamanashi.jp", - "yamanakako.yamanashi.jp", - "yamanashi.yamanashi.jp", - "ke", - "ac.ke", - "co.ke", - "go.ke", - "info.ke", - "me.ke", - "mobi.ke", - "ne.ke", - "or.ke", - "sc.ke", - "kg", - "com.kg", - "edu.kg", - "gov.kg", - "mil.kg", - "net.kg", - "org.kg", - "*.kh", - "ki", - "biz.ki", - "com.ki", - "edu.ki", - "gov.ki", - "info.ki", - "net.ki", - "org.ki", - "km", - "ass.km", - "com.km", - "edu.km", - "gov.km", - "mil.km", - "nom.km", - "org.km", - "prd.km", - "tm.km", - "asso.km", - "coop.km", - "gouv.km", - "medecin.km", - "notaires.km", - "pharmaciens.km", - "presse.km", - "veterinaire.km", - "kn", - "edu.kn", - "gov.kn", - "net.kn", - "org.kn", - "kp", - "com.kp", - "edu.kp", - "gov.kp", - "org.kp", - "rep.kp", - "tra.kp", - "kr", - "ac.kr", - "co.kr", - "es.kr", - "go.kr", - "hs.kr", - "kg.kr", - "mil.kr", - "ms.kr", - "ne.kr", - "or.kr", - "pe.kr", - "re.kr", - "sc.kr", - "busan.kr", - "chungbuk.kr", - "chungnam.kr", - "daegu.kr", - "daejeon.kr", - "gangwon.kr", - "gwangju.kr", - "gyeongbuk.kr", - "gyeonggi.kr", - "gyeongnam.kr", - "incheon.kr", - "jeju.kr", - "jeonbuk.kr", - "jeonnam.kr", - "seoul.kr", - "ulsan.kr", - "kw", - "com.kw", - "edu.kw", - "emb.kw", - "gov.kw", - "ind.kw", - "net.kw", - "org.kw", - "ky", - "com.ky", - "edu.ky", - "net.ky", - "org.ky", - "kz", - "com.kz", - "edu.kz", - "gov.kz", - "mil.kz", - "net.kz", - "org.kz", - "la", - "com.la", - "edu.la", - "gov.la", - "info.la", - "int.la", - "net.la", - "org.la", - "per.la", - "lb", - "com.lb", - "edu.lb", - "gov.lb", - "net.lb", - "org.lb", - "lc", - "co.lc", - "com.lc", - "edu.lc", - "gov.lc", - "net.lc", - "org.lc", - "li", - "lk", - "ac.lk", - "assn.lk", - "com.lk", - "edu.lk", - "gov.lk", - "grp.lk", - "hotel.lk", - "int.lk", - "ltd.lk", - "net.lk", - "ngo.lk", - "org.lk", - "sch.lk", - "soc.lk", - "web.lk", - "lr", - "com.lr", - "edu.lr", - "gov.lr", - "net.lr", - "org.lr", - "ls", - "ac.ls", - "biz.ls", - "co.ls", - "edu.ls", - "gov.ls", - "info.ls", - "net.ls", - "org.ls", - "sc.ls", - "lt", - "gov.lt", - "lu", - "lv", - "asn.lv", - "com.lv", - "conf.lv", - "edu.lv", - "gov.lv", - "id.lv", - "mil.lv", - "net.lv", - "org.lv", - "ly", - "com.ly", - "edu.ly", - "gov.ly", - "id.ly", - "med.ly", - "net.ly", - "org.ly", - "plc.ly", - "sch.ly", - "ma", - "ac.ma", - "co.ma", - "gov.ma", - "net.ma", - "org.ma", - "press.ma", - "mc", - "asso.mc", - "tm.mc", - "md", - "me", - "ac.me", - "co.me", - "edu.me", - "gov.me", - "its.me", - "net.me", - "org.me", - "priv.me", - "mg", - "co.mg", - "com.mg", - "edu.mg", - "gov.mg", - "mil.mg", - "nom.mg", - "org.mg", - "prd.mg", - "mh", - "mil", - "mk", - "com.mk", - "edu.mk", - "gov.mk", - "inf.mk", - "name.mk", - "net.mk", - "org.mk", - "ml", - "com.ml", - "edu.ml", - "gouv.ml", - "gov.ml", - "net.ml", - "org.ml", - "presse.ml", - "*.mm", - "mn", - "edu.mn", - "gov.mn", - "org.mn", - "mo", - "com.mo", - "edu.mo", - "gov.mo", - "net.mo", - "org.mo", - "mobi", - "mp", - "mq", - "mr", - "gov.mr", - "ms", - "com.ms", - "edu.ms", - "gov.ms", - "net.ms", - "org.ms", - "mt", - "com.mt", - "edu.mt", - "net.mt", - "org.mt", - "mu", - "ac.mu", - "co.mu", - "com.mu", - "gov.mu", - "net.mu", - "or.mu", - "org.mu", - "museum", - "mv", - "aero.mv", - "biz.mv", - "com.mv", - "coop.mv", - "edu.mv", - "gov.mv", - "info.mv", - "int.mv", - "mil.mv", - "museum.mv", - "name.mv", - "net.mv", - "org.mv", - "pro.mv", - "mw", - "ac.mw", - "biz.mw", - "co.mw", - "com.mw", - "coop.mw", - "edu.mw", - "gov.mw", - "int.mw", - "net.mw", - "org.mw", - "mx", - "com.mx", - "edu.mx", - "gob.mx", - "net.mx", - "org.mx", - "my", - "biz.my", - "com.my", - "edu.my", - "gov.my", - "mil.my", - "name.my", - "net.my", - "org.my", - "mz", - "ac.mz", - "adv.mz", - "co.mz", - "edu.mz", - "gov.mz", - "mil.mz", - "net.mz", - "org.mz", - "na", - "alt.na", - "co.na", - "com.na", - "gov.na", - "net.na", - "org.na", - "name", - "nc", - "asso.nc", - "nom.nc", - "ne", - "net", - "nf", - "arts.nf", - "com.nf", - "firm.nf", - "info.nf", - "net.nf", - "other.nf", - "per.nf", - "rec.nf", - "store.nf", - "web.nf", - "ng", - "com.ng", - "edu.ng", - "gov.ng", - "i.ng", - "mil.ng", - "mobi.ng", - "name.ng", - "net.ng", - "org.ng", - "sch.ng", - "ni", - "ac.ni", - "biz.ni", - "co.ni", - "com.ni", - "edu.ni", - "gob.ni", - "in.ni", - "info.ni", - "int.ni", - "mil.ni", - "net.ni", - "nom.ni", - "org.ni", - "web.ni", - "nl", - "no", - "fhs.no", - "folkebibl.no", - "fylkesbibl.no", - "idrett.no", - "museum.no", - "priv.no", - "vgs.no", - "dep.no", - "herad.no", - "kommune.no", - "mil.no", - "stat.no", - "aa.no", - "ah.no", - "bu.no", - "fm.no", - "hl.no", - "hm.no", - "jan-mayen.no", - "mr.no", - "nl.no", - "nt.no", - "of.no", - "ol.no", - "oslo.no", - "rl.no", - "sf.no", - "st.no", - "svalbard.no", - "tm.no", - "tr.no", - "va.no", - "vf.no", - "gs.aa.no", - "gs.ah.no", - "gs.bu.no", - "gs.fm.no", - "gs.hl.no", - "gs.hm.no", - "gs.jan-mayen.no", - "gs.mr.no", - "gs.nl.no", - "gs.nt.no", - "gs.of.no", - "gs.ol.no", - "gs.oslo.no", - "gs.rl.no", - "gs.sf.no", - "gs.st.no", - "gs.svalbard.no", - "gs.tm.no", - "gs.tr.no", - "gs.va.no", - "gs.vf.no", - "akrehamn.no", - "åkrehamn.no", - "algard.no", - "ålgård.no", - "arna.no", - "bronnoysund.no", - "brønnøysund.no", - "brumunddal.no", - "bryne.no", - "drobak.no", - "drøbak.no", - "egersund.no", - "fetsund.no", - "floro.no", - "florø.no", - "fredrikstad.no", - "hokksund.no", - "honefoss.no", - "hønefoss.no", - "jessheim.no", - "jorpeland.no", - "jørpeland.no", - "kirkenes.no", - "kopervik.no", - "krokstadelva.no", - "langevag.no", - "langevåg.no", - "leirvik.no", - "mjondalen.no", - "mjøndalen.no", - "mo-i-rana.no", - "mosjoen.no", - "mosjøen.no", - "nesoddtangen.no", - "orkanger.no", - "osoyro.no", - "osøyro.no", - "raholt.no", - "råholt.no", - "sandnessjoen.no", - "sandnessjøen.no", - "skedsmokorset.no", - "slattum.no", - "spjelkavik.no", - "stathelle.no", - "stavern.no", - "stjordalshalsen.no", - "stjørdalshalsen.no", - "tananger.no", - "tranby.no", - "vossevangen.no", - "aarborte.no", - "aejrie.no", - "afjord.no", - "åfjord.no", - "agdenes.no", - "nes.akershus.no", - "aknoluokta.no", - "ákŋoluokta.no", - "al.no", - "ål.no", - "alaheadju.no", - "álaheadju.no", - "alesund.no", - "ålesund.no", - "alstahaug.no", - "alta.no", - "áltá.no", - "alvdal.no", - "amli.no", - "åmli.no", - "amot.no", - "åmot.no", - "andasuolo.no", - "andebu.no", - "andoy.no", - "andøy.no", - "ardal.no", - "årdal.no", - "aremark.no", - "arendal.no", - "ås.no", - "aseral.no", - "åseral.no", - "asker.no", - "askim.no", - "askoy.no", - "askøy.no", - "askvoll.no", - "asnes.no", - "åsnes.no", - "audnedaln.no", - "aukra.no", - "aure.no", - "aurland.no", - "aurskog-holand.no", - "aurskog-høland.no", - "austevoll.no", - "austrheim.no", - "averoy.no", - "averøy.no", - "badaddja.no", - "bådåddjå.no", - "bærum.no", - "bahcavuotna.no", - "báhcavuotna.no", - "bahccavuotna.no", - "báhccavuotna.no", - "baidar.no", - "báidár.no", - "bajddar.no", - "bájddar.no", - "balat.no", - "bálát.no", - "balestrand.no", - "ballangen.no", - "balsfjord.no", - "bamble.no", - "bardu.no", - "barum.no", - "batsfjord.no", - "båtsfjord.no", - "bearalvahki.no", - "bearalváhki.no", - "beardu.no", - "beiarn.no", - "berg.no", - "bergen.no", - "berlevag.no", - "berlevåg.no", - "bievat.no", - "bievát.no", - "bindal.no", - "birkenes.no", - "bjarkoy.no", - "bjarkøy.no", - "bjerkreim.no", - "bjugn.no", - "bodo.no", - "bodø.no", - "bokn.no", - "bomlo.no", - "bømlo.no", - "bremanger.no", - "bronnoy.no", - "brønnøy.no", - "budejju.no", - "nes.buskerud.no", - "bygland.no", - "bykle.no", - "cahcesuolo.no", - "čáhcesuolo.no", - "davvenjarga.no", - "davvenjárga.no", - "davvesiida.no", - "deatnu.no", - "dielddanuorri.no", - "divtasvuodna.no", - "divttasvuotna.no", - "donna.no", - "dønna.no", - "dovre.no", - "drammen.no", - "drangedal.no", - "dyroy.no", - "dyrøy.no", - "eid.no", - "eidfjord.no", - "eidsberg.no", - "eidskog.no", - "eidsvoll.no", - "eigersund.no", - "elverum.no", - "enebakk.no", - "engerdal.no", - "etne.no", - "etnedal.no", - "evenassi.no", - "evenášši.no", - "evenes.no", - "evje-og-hornnes.no", - "farsund.no", - "fauske.no", - "fedje.no", - "fet.no", - "finnoy.no", - "finnøy.no", - "fitjar.no", - "fjaler.no", - "fjell.no", - "fla.no", - "flå.no", - "flakstad.no", - "flatanger.no", - "flekkefjord.no", - "flesberg.no", - "flora.no", - "folldal.no", - "forde.no", - "førde.no", - "forsand.no", - "fosnes.no", - "fræna.no", - "frana.no", - "frei.no", - "frogn.no", - "froland.no", - "frosta.no", - "froya.no", - "frøya.no", - "fuoisku.no", - "fuossko.no", - "fusa.no", - "fyresdal.no", - "gaivuotna.no", - "gáivuotna.no", - "galsa.no", - "gálsá.no", - "gamvik.no", - "gangaviika.no", - "gáŋgaviika.no", - "gaular.no", - "gausdal.no", - "giehtavuoatna.no", - "gildeskal.no", - "gildeskål.no", - "giske.no", - "gjemnes.no", - "gjerdrum.no", - "gjerstad.no", - "gjesdal.no", - "gjovik.no", - "gjøvik.no", - "gloppen.no", - "gol.no", - "gran.no", - "grane.no", - "granvin.no", - "gratangen.no", - "grimstad.no", - "grong.no", - "grue.no", - "gulen.no", - "guovdageaidnu.no", - "ha.no", - "hå.no", - "habmer.no", - "hábmer.no", - "hadsel.no", - "hægebostad.no", - "hagebostad.no", - "halden.no", - "halsa.no", - "hamar.no", - "hamaroy.no", - "hammarfeasta.no", - "hámmárfeasta.no", - "hammerfest.no", - "hapmir.no", - "hápmir.no", - "haram.no", - "hareid.no", - "harstad.no", - "hasvik.no", - "hattfjelldal.no", - "haugesund.no", - "os.hedmark.no", - "valer.hedmark.no", - "våler.hedmark.no", - "hemne.no", - "hemnes.no", - "hemsedal.no", - "hitra.no", - "hjartdal.no", - "hjelmeland.no", - "hobol.no", - "hobøl.no", - "hof.no", - "hol.no", - "hole.no", - "holmestrand.no", - "holtalen.no", - "holtålen.no", - "os.hordaland.no", - "hornindal.no", - "horten.no", - "hoyanger.no", - "høyanger.no", - "hoylandet.no", - "høylandet.no", - "hurdal.no", - "hurum.no", - "hvaler.no", - "hyllestad.no", - "ibestad.no", - "inderoy.no", - "inderøy.no", - "iveland.no", - "ivgu.no", - "jevnaker.no", - "jolster.no", - "jølster.no", - "jondal.no", - "kafjord.no", - "kåfjord.no", - "karasjohka.no", - "kárášjohka.no", - "karasjok.no", - "karlsoy.no", - "karmoy.no", - "karmøy.no", - "kautokeino.no", - "klabu.no", - "klæbu.no", - "klepp.no", - "kongsberg.no", - "kongsvinger.no", - "kraanghke.no", - "kråanghke.no", - "kragero.no", - "kragerø.no", - "kristiansand.no", - "kristiansund.no", - "krodsherad.no", - "krødsherad.no", - "kvæfjord.no", - "kvænangen.no", - "kvafjord.no", - "kvalsund.no", - "kvam.no", - "kvanangen.no", - "kvinesdal.no", - "kvinnherad.no", - "kviteseid.no", - "kvitsoy.no", - "kvitsøy.no", - "laakesvuemie.no", - "lærdal.no", - "lahppi.no", - "láhppi.no", - "lardal.no", - "larvik.no", - "lavagis.no", - "lavangen.no", - "leangaviika.no", - "leaŋgaviika.no", - "lebesby.no", - "leikanger.no", - "leirfjord.no", - "leka.no", - "leksvik.no", - "lenvik.no", - "lerdal.no", - "lesja.no", - "levanger.no", - "lier.no", - "lierne.no", - "lillehammer.no", - "lillesand.no", - "lindas.no", - "lindås.no", - "lindesnes.no", - "loabat.no", - "loabát.no", - "lodingen.no", - "lødingen.no", - "lom.no", - "loppa.no", - "lorenskog.no", - "lørenskog.no", - "loten.no", - "løten.no", - "lund.no", - "lunner.no", - "luroy.no", - "lurøy.no", - "luster.no", - "lyngdal.no", - "lyngen.no", - "malatvuopmi.no", - "málatvuopmi.no", - "malselv.no", - "målselv.no", - "malvik.no", - "mandal.no", - "marker.no", - "marnardal.no", - "masfjorden.no", - "masoy.no", - "måsøy.no", - "matta-varjjat.no", - "mátta-várjjat.no", - "meland.no", - "meldal.no", - "melhus.no", - "meloy.no", - "meløy.no", - "meraker.no", - "meråker.no", - "midsund.no", - "midtre-gauldal.no", - "moareke.no", - "moåreke.no", - "modalen.no", - "modum.no", - "molde.no", - "heroy.more-og-romsdal.no", - "sande.more-og-romsdal.no", - "herøy.møre-og-romsdal.no", - "sande.møre-og-romsdal.no", - "moskenes.no", - "moss.no", - "mosvik.no", - "muosat.no", - "muosát.no", - "naamesjevuemie.no", - "nååmesjevuemie.no", - "nærøy.no", - "namdalseid.no", - "namsos.no", - "namsskogan.no", - "nannestad.no", - "naroy.no", - "narviika.no", - "narvik.no", - "naustdal.no", - "navuotna.no", - "návuotna.no", - "nedre-eiker.no", - "nesna.no", - "nesodden.no", - "nesseby.no", - "nesset.no", - "nissedal.no", - "nittedal.no", - "nord-aurdal.no", - "nord-fron.no", - "nord-odal.no", - "norddal.no", - "nordkapp.no", - "bo.nordland.no", - "bø.nordland.no", - "heroy.nordland.no", - "herøy.nordland.no", - "nordre-land.no", - "nordreisa.no", - "nore-og-uvdal.no", - "notodden.no", - "notteroy.no", - "nøtterøy.no", - "odda.no", - "oksnes.no", - "øksnes.no", - "omasvuotna.no", - "oppdal.no", - "oppegard.no", - "oppegård.no", - "orkdal.no", - "orland.no", - "ørland.no", - "orskog.no", - "ørskog.no", - "orsta.no", - "ørsta.no", - "osen.no", - "osteroy.no", - "osterøy.no", - "valer.ostfold.no", - "våler.østfold.no", - "ostre-toten.no", - "østre-toten.no", - "overhalla.no", - "ovre-eiker.no", - "øvre-eiker.no", - "oyer.no", - "øyer.no", - "oygarden.no", - "øygarden.no", - "oystre-slidre.no", - "øystre-slidre.no", - "porsanger.no", - "porsangu.no", - "porsáŋgu.no", - "porsgrunn.no", - "rade.no", - "råde.no", - "radoy.no", - "radøy.no", - "rælingen.no", - "rahkkeravju.no", - "ráhkkerávju.no", - "raisa.no", - "ráisa.no", - "rakkestad.no", - "ralingen.no", - "rana.no", - "randaberg.no", - "rauma.no", - "rendalen.no", - "rennebu.no", - "rennesoy.no", - "rennesøy.no", - "rindal.no", - "ringebu.no", - "ringerike.no", - "ringsaker.no", - "risor.no", - "risør.no", - "rissa.no", - "roan.no", - "rodoy.no", - "rødøy.no", - "rollag.no", - "romsa.no", - "romskog.no", - "rømskog.no", - "roros.no", - "røros.no", - "rost.no", - "røst.no", - "royken.no", - "røyken.no", - "royrvik.no", - "røyrvik.no", - "ruovat.no", - "rygge.no", - "salangen.no", - "salat.no", - "sálat.no", - "sálát.no", - "saltdal.no", - "samnanger.no", - "sandefjord.no", - "sandnes.no", - "sandoy.no", - "sandøy.no", - "sarpsborg.no", - "sauda.no", - "sauherad.no", - "sel.no", - "selbu.no", - "selje.no", - "seljord.no", - "siellak.no", - "sigdal.no", - "siljan.no", - "sirdal.no", - "skanit.no", - "skánit.no", - "skanland.no", - "skånland.no", - "skaun.no", - "skedsmo.no", - "ski.no", - "skien.no", - "skierva.no", - "skiervá.no", - "skiptvet.no", - "skjak.no", - "skjåk.no", - "skjervoy.no", - "skjervøy.no", - "skodje.no", - "smola.no", - "smøla.no", - "snaase.no", - "snåase.no", - "snasa.no", - "snåsa.no", - "snillfjord.no", - "snoasa.no", - "sogndal.no", - "sogne.no", - "søgne.no", - "sokndal.no", - "sola.no", - "solund.no", - "somna.no", - "sømna.no", - "sondre-land.no", - "søndre-land.no", - "songdalen.no", - "sor-aurdal.no", - "sør-aurdal.no", - "sor-fron.no", - "sør-fron.no", - "sor-odal.no", - "sør-odal.no", - "sor-varanger.no", - "sør-varanger.no", - "sorfold.no", - "sørfold.no", - "sorreisa.no", - "sørreisa.no", - "sortland.no", - "sorum.no", - "sørum.no", - "spydeberg.no", - "stange.no", - "stavanger.no", - "steigen.no", - "steinkjer.no", - "stjordal.no", - "stjørdal.no", - "stokke.no", - "stor-elvdal.no", - "stord.no", - "stordal.no", - "storfjord.no", - "strand.no", - "stranda.no", - "stryn.no", - "sula.no", - "suldal.no", - "sund.no", - "sunndal.no", - "surnadal.no", - "sveio.no", - "svelvik.no", - "sykkylven.no", - "tana.no", - "bo.telemark.no", - "bø.telemark.no", - "time.no", - "tingvoll.no", - "tinn.no", - "tjeldsund.no", - "tjome.no", - "tjøme.no", - "tokke.no", - "tolga.no", - "tonsberg.no", - "tønsberg.no", - "torsken.no", - "træna.no", - "trana.no", - "tranoy.no", - "tranøy.no", - "troandin.no", - "trogstad.no", - "trøgstad.no", - "tromsa.no", - "tromso.no", - "tromsø.no", - "trondheim.no", - "trysil.no", - "tvedestrand.no", - "tydal.no", - "tynset.no", - "tysfjord.no", - "tysnes.no", - "tysvær.no", - "tysvar.no", - "ullensaker.no", - "ullensvang.no", - "ulvik.no", - "unjarga.no", - "unjárga.no", - "utsira.no", - "vaapste.no", - "vadso.no", - "vadsø.no", - "værøy.no", - "vaga.no", - "vågå.no", - "vagan.no", - "vågan.no", - "vagsoy.no", - "vågsøy.no", - "vaksdal.no", - "valle.no", - "vang.no", - "vanylven.no", - "vardo.no", - "vardø.no", - "varggat.no", - "várggát.no", - "varoy.no", - "vefsn.no", - "vega.no", - "vegarshei.no", - "vegårshei.no", - "vennesla.no", - "verdal.no", - "verran.no", - "vestby.no", - "sande.vestfold.no", - "vestnes.no", - "vestre-slidre.no", - "vestre-toten.no", - "vestvagoy.no", - "vestvågøy.no", - "vevelstad.no", - "vik.no", - "vikna.no", - "vindafjord.no", - "voagat.no", - "volda.no", - "voss.no", - "*.np", - "nr", - "biz.nr", - "com.nr", - "edu.nr", - "gov.nr", - "info.nr", - "net.nr", - "org.nr", - "nu", - "nz", - "ac.nz", - "co.nz", - "cri.nz", - "geek.nz", - "gen.nz", - "govt.nz", - "health.nz", - "iwi.nz", - "kiwi.nz", - "maori.nz", - "māori.nz", - "mil.nz", - "net.nz", - "org.nz", - "parliament.nz", - "school.nz", - "om", - "co.om", - "com.om", - "edu.om", - "gov.om", - "med.om", - "museum.om", - "net.om", - "org.om", - "pro.om", - "onion", - "org", - "pa", - "abo.pa", - "ac.pa", - "com.pa", - "edu.pa", - "gob.pa", - "ing.pa", - "med.pa", - "net.pa", - "nom.pa", - "org.pa", - "sld.pa", - "pe", - "com.pe", - "edu.pe", - "gob.pe", - "mil.pe", - "net.pe", - "nom.pe", - "org.pe", - "pf", - "com.pf", - "edu.pf", - "org.pf", - "*.pg", - "ph", - "com.ph", - "edu.ph", - "gov.ph", - "i.ph", - "mil.ph", - "net.ph", - "ngo.ph", - "org.ph", - "pk", - "ac.pk", - "biz.pk", - "com.pk", - "edu.pk", - "fam.pk", - "gkp.pk", - "gob.pk", - "gog.pk", - "gok.pk", - "gon.pk", - "gop.pk", - "gos.pk", - "gov.pk", - "net.pk", - "org.pk", - "web.pk", - "pl", - "com.pl", - "net.pl", - "org.pl", - "agro.pl", - "aid.pl", - "atm.pl", - "auto.pl", - "biz.pl", - "edu.pl", - "gmina.pl", - "gsm.pl", - "info.pl", - "mail.pl", - "media.pl", - "miasta.pl", - "mil.pl", - "nieruchomosci.pl", - "nom.pl", - "pc.pl", - "powiat.pl", - "priv.pl", - "realestate.pl", - "rel.pl", - "sex.pl", - "shop.pl", - "sklep.pl", - "sos.pl", - "szkola.pl", - "targi.pl", - "tm.pl", - "tourism.pl", - "travel.pl", - "turystyka.pl", - "gov.pl", - "ap.gov.pl", - "griw.gov.pl", - "ic.gov.pl", - "is.gov.pl", - "kmpsp.gov.pl", - "konsulat.gov.pl", - "kppsp.gov.pl", - "kwp.gov.pl", - "kwpsp.gov.pl", - "mup.gov.pl", - "mw.gov.pl", - "oia.gov.pl", - "oirm.gov.pl", - "oke.gov.pl", - "oow.gov.pl", - "oschr.gov.pl", - "oum.gov.pl", - "pa.gov.pl", - "pinb.gov.pl", - "piw.gov.pl", - "po.gov.pl", - "pr.gov.pl", - "psp.gov.pl", - "psse.gov.pl", - "pup.gov.pl", - "rzgw.gov.pl", - "sa.gov.pl", - "sdn.gov.pl", - "sko.gov.pl", - "so.gov.pl", - "sr.gov.pl", - "starostwo.gov.pl", - "ug.gov.pl", - "ugim.gov.pl", - "um.gov.pl", - "umig.gov.pl", - "upow.gov.pl", - "uppo.gov.pl", - "us.gov.pl", - "uw.gov.pl", - "uzs.gov.pl", - "wif.gov.pl", - "wiih.gov.pl", - "winb.gov.pl", - "wios.gov.pl", - "witd.gov.pl", - "wiw.gov.pl", - "wkz.gov.pl", - "wsa.gov.pl", - "wskr.gov.pl", - "wsse.gov.pl", - "wuoz.gov.pl", - "wzmiuw.gov.pl", - "zp.gov.pl", - "zpisdn.gov.pl", - "augustow.pl", - "babia-gora.pl", - "bedzin.pl", - "beskidy.pl", - "bialowieza.pl", - "bialystok.pl", - "bielawa.pl", - "bieszczady.pl", - "boleslawiec.pl", - "bydgoszcz.pl", - "bytom.pl", - "cieszyn.pl", - "czeladz.pl", - "czest.pl", - "dlugoleka.pl", - "elblag.pl", - "elk.pl", - "glogow.pl", - "gniezno.pl", - "gorlice.pl", - "grajewo.pl", - "ilawa.pl", - "jaworzno.pl", - "jelenia-gora.pl", - "jgora.pl", - "kalisz.pl", - "karpacz.pl", - "kartuzy.pl", - "kaszuby.pl", - "katowice.pl", - "kazimierz-dolny.pl", - "kepno.pl", - "ketrzyn.pl", - "klodzko.pl", - "kobierzyce.pl", - "kolobrzeg.pl", - "konin.pl", - "konskowola.pl", - "kutno.pl", - "lapy.pl", - "lebork.pl", - "legnica.pl", - "lezajsk.pl", - "limanowa.pl", - "lomza.pl", - "lowicz.pl", - "lubin.pl", - "lukow.pl", - "malbork.pl", - "malopolska.pl", - "mazowsze.pl", - "mazury.pl", - "mielec.pl", - "mielno.pl", - "mragowo.pl", - "naklo.pl", - "nowaruda.pl", - "nysa.pl", - "olawa.pl", - "olecko.pl", - "olkusz.pl", - "olsztyn.pl", - "opoczno.pl", - "opole.pl", - "ostroda.pl", - "ostroleka.pl", - "ostrowiec.pl", - "ostrowwlkp.pl", - "pila.pl", - "pisz.pl", - "podhale.pl", - "podlasie.pl", - "polkowice.pl", - "pomorskie.pl", - "pomorze.pl", - "prochowice.pl", - "pruszkow.pl", - "przeworsk.pl", - "pulawy.pl", - "radom.pl", - "rawa-maz.pl", - "rybnik.pl", - "rzeszow.pl", - "sanok.pl", - "sejny.pl", - "skoczow.pl", - "slask.pl", - "slupsk.pl", - "sosnowiec.pl", - "stalowa-wola.pl", - "starachowice.pl", - "stargard.pl", - "suwalki.pl", - "swidnica.pl", - "swiebodzin.pl", - "swinoujscie.pl", - "szczecin.pl", - "szczytno.pl", - "tarnobrzeg.pl", - "tgory.pl", - "turek.pl", - "tychy.pl", - "ustka.pl", - "walbrzych.pl", - "warmia.pl", - "warszawa.pl", - "waw.pl", - "wegrow.pl", - "wielun.pl", - "wlocl.pl", - "wloclawek.pl", - "wodzislaw.pl", - "wolomin.pl", - "wroclaw.pl", - "zachpomor.pl", - "zagan.pl", - "zarow.pl", - "zgora.pl", - "zgorzelec.pl", - "pm", - "pn", - "co.pn", - "edu.pn", - "gov.pn", - "net.pn", - "org.pn", - "post", - "pr", - "biz.pr", - "com.pr", - "edu.pr", - "gov.pr", - "info.pr", - "isla.pr", - "name.pr", - "net.pr", - "org.pr", - "pro.pr", - "ac.pr", - "est.pr", - "prof.pr", - "pro", - "aaa.pro", - "aca.pro", - "acct.pro", - "avocat.pro", - "bar.pro", - "cpa.pro", - "eng.pro", - "jur.pro", - "law.pro", - "med.pro", - "recht.pro", - "ps", - "com.ps", - "edu.ps", - "gov.ps", - "net.ps", - "org.ps", - "plo.ps", - "sec.ps", - "pt", - "com.pt", - "edu.pt", - "gov.pt", - "int.pt", - "net.pt", - "nome.pt", - "org.pt", - "publ.pt", - "pw", - "belau.pw", - "co.pw", - "ed.pw", - "go.pw", - "or.pw", - "py", - "com.py", - "coop.py", - "edu.py", - "gov.py", - "mil.py", - "net.py", - "org.py", - "qa", - "com.qa", - "edu.qa", - "gov.qa", - "mil.qa", - "name.qa", - "net.qa", - "org.qa", - "sch.qa", - "re", - "asso.re", - "com.re", - "ro", - "arts.ro", - "com.ro", - "firm.ro", - "info.ro", - "nom.ro", - "nt.ro", - "org.ro", - "rec.ro", - "store.ro", - "tm.ro", - "www.ro", - "rs", - "ac.rs", - "co.rs", - "edu.rs", - "gov.rs", - "in.rs", - "org.rs", - "ru", - "rw", - "ac.rw", - "co.rw", - "coop.rw", - "gov.rw", - "mil.rw", - "net.rw", - "org.rw", - "sa", - "com.sa", - "edu.sa", - "gov.sa", - "med.sa", - "net.sa", - "org.sa", - "pub.sa", - "sch.sa", - "sb", - "com.sb", - "edu.sb", - "gov.sb", - "net.sb", - "org.sb", - "sc", - "com.sc", - "edu.sc", - "gov.sc", - "net.sc", - "org.sc", - "sd", - "com.sd", - "edu.sd", - "gov.sd", - "info.sd", - "med.sd", - "net.sd", - "org.sd", - "tv.sd", - "se", - "a.se", - "ac.se", - "b.se", - "bd.se", - "brand.se", - "c.se", - "d.se", - "e.se", - "f.se", - "fh.se", - "fhsk.se", - "fhv.se", - "g.se", - "h.se", - "i.se", - "k.se", - "komforb.se", - "kommunalforbund.se", - "komvux.se", - "l.se", - "lanbib.se", - "m.se", - "n.se", - "naturbruksgymn.se", - "o.se", - "org.se", - "p.se", - "parti.se", - "pp.se", - "press.se", - "r.se", - "s.se", - "t.se", - "tm.se", - "u.se", - "w.se", - "x.se", - "y.se", - "z.se", - "sg", - "com.sg", - "edu.sg", - "gov.sg", - "net.sg", - "org.sg", - "sh", - "com.sh", - "gov.sh", - "mil.sh", - "net.sh", - "org.sh", - "si", - "sj", - "sk", - "sl", - "com.sl", - "edu.sl", - "gov.sl", - "net.sl", - "org.sl", - "sm", - "sn", - "art.sn", - "com.sn", - "edu.sn", - "gouv.sn", - "org.sn", - "perso.sn", - "univ.sn", - "so", - "com.so", - "edu.so", - "gov.so", - "me.so", - "net.so", - "org.so", - "sr", - "ss", - "biz.ss", - "co.ss", - "com.ss", - "edu.ss", - "gov.ss", - "me.ss", - "net.ss", - "org.ss", - "sch.ss", - "st", - "co.st", - "com.st", - "consulado.st", - "edu.st", - "embaixada.st", - "mil.st", - "net.st", - "org.st", - "principe.st", - "saotome.st", - "store.st", - "su", - "sv", - "com.sv", - "edu.sv", - "gob.sv", - "org.sv", - "red.sv", - "sx", - "gov.sx", - "sy", - "com.sy", - "edu.sy", - "gov.sy", - "mil.sy", - "net.sy", - "org.sy", - "sz", - "ac.sz", - "co.sz", - "org.sz", - "tc", - "td", - "tel", - "tf", - "tg", - "th", - "ac.th", - "co.th", - "go.th", - "in.th", - "mi.th", - "net.th", - "or.th", - "tj", - "ac.tj", - "biz.tj", - "co.tj", - "com.tj", - "edu.tj", - "go.tj", - "gov.tj", - "int.tj", - "mil.tj", - "name.tj", - "net.tj", - "nic.tj", - "org.tj", - "test.tj", - "web.tj", - "tk", - "tl", - "gov.tl", - "tm", - "co.tm", - "com.tm", - "edu.tm", - "gov.tm", - "mil.tm", - "net.tm", - "nom.tm", - "org.tm", - "tn", - "com.tn", - "ens.tn", - "fin.tn", - "gov.tn", - "ind.tn", - "info.tn", - "intl.tn", - "mincom.tn", - "nat.tn", - "net.tn", - "org.tn", - "perso.tn", - "tourism.tn", - "to", - "com.to", - "edu.to", - "gov.to", - "mil.to", - "net.to", - "org.to", - "tr", - "av.tr", - "bbs.tr", - "bel.tr", - "biz.tr", - "com.tr", - "dr.tr", - "edu.tr", - "gen.tr", - "gov.tr", - "info.tr", - "k12.tr", - "kep.tr", - "mil.tr", - "name.tr", - "net.tr", - "org.tr", - "pol.tr", - "tel.tr", - "tsk.tr", - "tv.tr", - "web.tr", - "nc.tr", - "gov.nc.tr", - "tt", - "biz.tt", - "co.tt", - "com.tt", - "edu.tt", - "gov.tt", - "info.tt", - "mil.tt", - "name.tt", - "net.tt", - "org.tt", - "pro.tt", - "tv", - "tw", - "club.tw", - "com.tw", - "ebiz.tw", - "edu.tw", - "game.tw", - "gov.tw", - "idv.tw", - "mil.tw", - "net.tw", - "org.tw", - "tz", - "ac.tz", - "co.tz", - "go.tz", - "hotel.tz", - "info.tz", - "me.tz", - "mil.tz", - "mobi.tz", - "ne.tz", - "or.tz", - "sc.tz", - "tv.tz", - "ua", - "com.ua", - "edu.ua", - "gov.ua", - "in.ua", - "net.ua", - "org.ua", - "cherkassy.ua", - "cherkasy.ua", - "chernigov.ua", - "chernihiv.ua", - "chernivtsi.ua", - "chernovtsy.ua", - "ck.ua", - "cn.ua", - "cr.ua", - "crimea.ua", - "cv.ua", - "dn.ua", - "dnepropetrovsk.ua", - "dnipropetrovsk.ua", - "donetsk.ua", - "dp.ua", - "if.ua", - "ivano-frankivsk.ua", - "kh.ua", - "kharkiv.ua", - "kharkov.ua", - "kherson.ua", - "khmelnitskiy.ua", - "khmelnytskyi.ua", - "kiev.ua", - "kirovograd.ua", - "km.ua", - "kr.ua", - "kropyvnytskyi.ua", - "krym.ua", - "ks.ua", - "kv.ua", - "kyiv.ua", - "lg.ua", - "lt.ua", - "lugansk.ua", - "luhansk.ua", - "lutsk.ua", - "lv.ua", - "lviv.ua", - "mk.ua", - "mykolaiv.ua", - "nikolaev.ua", - "od.ua", - "odesa.ua", - "odessa.ua", - "pl.ua", - "poltava.ua", - "rivne.ua", - "rovno.ua", - "rv.ua", - "sb.ua", - "sebastopol.ua", - "sevastopol.ua", - "sm.ua", - "sumy.ua", - "te.ua", - "ternopil.ua", - "uz.ua", - "uzhgorod.ua", - "uzhhorod.ua", - "vinnica.ua", - "vinnytsia.ua", - "vn.ua", - "volyn.ua", - "yalta.ua", - "zakarpattia.ua", - "zaporizhzhe.ua", - "zaporizhzhia.ua", - "zhitomir.ua", - "zhytomyr.ua", - "zp.ua", - "zt.ua", - "ug", - "ac.ug", - "co.ug", - "com.ug", - "go.ug", - "ne.ug", - "or.ug", - "org.ug", - "sc.ug", - "uk", - "ac.uk", - "co.uk", - "gov.uk", - "ltd.uk", - "me.uk", - "net.uk", - "nhs.uk", - "org.uk", - "plc.uk", - "police.uk", - "*.sch.uk", - "us", - "dni.us", - "fed.us", - "isa.us", - "kids.us", - "nsn.us", - "ak.us", - "al.us", - "ar.us", - "as.us", - "az.us", - "ca.us", - "co.us", - "ct.us", - "dc.us", - "de.us", - "fl.us", - "ga.us", - "gu.us", - "hi.us", - "ia.us", - "id.us", - "il.us", - "in.us", - "ks.us", - "ky.us", - "la.us", - "ma.us", - "md.us", - "me.us", - "mi.us", - "mn.us", - "mo.us", - "ms.us", - "mt.us", - "nc.us", - "nd.us", - "ne.us", - "nh.us", - "nj.us", - "nm.us", - "nv.us", - "ny.us", - "oh.us", - "ok.us", - "or.us", - "pa.us", - "pr.us", - "ri.us", - "sc.us", - "sd.us", - "tn.us", - "tx.us", - "ut.us", - "va.us", - "vi.us", - "vt.us", - "wa.us", - "wi.us", - "wv.us", - "wy.us", - "k12.ak.us", - "k12.al.us", - "k12.ar.us", - "k12.as.us", - "k12.az.us", - "k12.ca.us", - "k12.co.us", - "k12.ct.us", - "k12.dc.us", - "k12.fl.us", - "k12.ga.us", - "k12.gu.us", - "k12.ia.us", - "k12.id.us", - "k12.il.us", - "k12.in.us", - "k12.ks.us", - "k12.ky.us", - "k12.la.us", - "k12.ma.us", - "k12.md.us", - "k12.me.us", - "k12.mi.us", - "k12.mn.us", - "k12.mo.us", - "k12.ms.us", - "k12.mt.us", - "k12.nc.us", - "k12.ne.us", - "k12.nh.us", - "k12.nj.us", - "k12.nm.us", - "k12.nv.us", - "k12.ny.us", - "k12.oh.us", - "k12.ok.us", - "k12.or.us", - "k12.pa.us", - "k12.pr.us", - "k12.sc.us", - "k12.tn.us", - "k12.tx.us", - "k12.ut.us", - "k12.va.us", - "k12.vi.us", - "k12.vt.us", - "k12.wa.us", - "k12.wi.us", - "cc.ak.us", - "lib.ak.us", - "cc.al.us", - "lib.al.us", - "cc.ar.us", - "lib.ar.us", - "cc.as.us", - "lib.as.us", - "cc.az.us", - "lib.az.us", - "cc.ca.us", - "lib.ca.us", - "cc.co.us", - "lib.co.us", - "cc.ct.us", - "lib.ct.us", - "cc.dc.us", - "lib.dc.us", - "cc.de.us", - "cc.fl.us", - "cc.ga.us", - "cc.gu.us", - "cc.hi.us", - "cc.ia.us", - "cc.id.us", - "cc.il.us", - "cc.in.us", - "cc.ks.us", - "cc.ky.us", - "cc.la.us", - "cc.ma.us", - "cc.md.us", - "cc.me.us", - "cc.mi.us", - "cc.mn.us", - "cc.mo.us", - "cc.ms.us", - "cc.mt.us", - "cc.nc.us", - "cc.nd.us", - "cc.ne.us", - "cc.nh.us", - "cc.nj.us", - "cc.nm.us", - "cc.nv.us", - "cc.ny.us", - "cc.oh.us", - "cc.ok.us", - "cc.or.us", - "cc.pa.us", - "cc.pr.us", - "cc.ri.us", - "cc.sc.us", - "cc.sd.us", - "cc.tn.us", - "cc.tx.us", - "cc.ut.us", - "cc.va.us", - "cc.vi.us", - "cc.vt.us", - "cc.wa.us", - "cc.wi.us", - "cc.wv.us", - "cc.wy.us", - "k12.wy.us", - "lib.fl.us", - "lib.ga.us", - "lib.gu.us", - "lib.hi.us", - "lib.ia.us", - "lib.id.us", - "lib.il.us", - "lib.in.us", - "lib.ks.us", - "lib.ky.us", - "lib.la.us", - "lib.ma.us", - "lib.md.us", - "lib.me.us", - "lib.mi.us", - "lib.mn.us", - "lib.mo.us", - "lib.ms.us", - "lib.mt.us", - "lib.nc.us", - "lib.nd.us", - "lib.ne.us", - "lib.nh.us", - "lib.nj.us", - "lib.nm.us", - "lib.nv.us", - "lib.ny.us", - "lib.oh.us", - "lib.ok.us", - "lib.or.us", - "lib.pa.us", - "lib.pr.us", - "lib.ri.us", - "lib.sc.us", - "lib.sd.us", - "lib.tn.us", - "lib.tx.us", - "lib.ut.us", - "lib.va.us", - "lib.vi.us", - "lib.vt.us", - "lib.wa.us", - "lib.wi.us", - "lib.wy.us", - "chtr.k12.ma.us", - "paroch.k12.ma.us", - "pvt.k12.ma.us", - "ann-arbor.mi.us", - "cog.mi.us", - "dst.mi.us", - "eaton.mi.us", - "gen.mi.us", - "mus.mi.us", - "tec.mi.us", - "washtenaw.mi.us", - "uy", - "com.uy", - "edu.uy", - "gub.uy", - "mil.uy", - "net.uy", - "org.uy", - "uz", - "co.uz", - "com.uz", - "net.uz", - "org.uz", - "va", - "vc", - "com.vc", - "edu.vc", - "gov.vc", - "mil.vc", - "net.vc", - "org.vc", - "ve", - "arts.ve", - "bib.ve", - "co.ve", - "com.ve", - "e12.ve", - "edu.ve", - "firm.ve", - "gob.ve", - "gov.ve", - "info.ve", - "int.ve", - "mil.ve", - "net.ve", - "nom.ve", - "org.ve", - "rar.ve", - "rec.ve", - "store.ve", - "tec.ve", - "web.ve", - "vg", - "vi", - "co.vi", - "com.vi", - "k12.vi", - "net.vi", - "org.vi", - "vn", - "ac.vn", - "ai.vn", - "biz.vn", - "com.vn", - "edu.vn", - "gov.vn", - "health.vn", - "id.vn", - "info.vn", - "int.vn", - "io.vn", - "name.vn", - "net.vn", - "org.vn", - "pro.vn", - "angiang.vn", - "bacgiang.vn", - "backan.vn", - "baclieu.vn", - "bacninh.vn", - "baria-vungtau.vn", - "bentre.vn", - "binhdinh.vn", - "binhduong.vn", - "binhphuoc.vn", - "binhthuan.vn", - "camau.vn", - "cantho.vn", - "caobang.vn", - "daklak.vn", - "daknong.vn", - "danang.vn", - "dienbien.vn", - "dongnai.vn", - "dongthap.vn", - "gialai.vn", - "hagiang.vn", - "haiduong.vn", - "haiphong.vn", - "hanam.vn", - "hanoi.vn", - "hatinh.vn", - "haugiang.vn", - "hoabinh.vn", - "hungyen.vn", - "khanhhoa.vn", - "kiengiang.vn", - "kontum.vn", - "laichau.vn", - "lamdong.vn", - "langson.vn", - "laocai.vn", - "longan.vn", - "namdinh.vn", - "nghean.vn", - "ninhbinh.vn", - "ninhthuan.vn", - "phutho.vn", - "phuyen.vn", - "quangbinh.vn", - "quangnam.vn", - "quangngai.vn", - "quangninh.vn", - "quangtri.vn", - "soctrang.vn", - "sonla.vn", - "tayninh.vn", - "thaibinh.vn", - "thainguyen.vn", - "thanhhoa.vn", - "thanhphohochiminh.vn", - "thuathienhue.vn", - "tiengiang.vn", - "travinh.vn", - "tuyenquang.vn", - "vinhlong.vn", - "vinhphuc.vn", - "yenbai.vn", - "vu", - "com.vu", - "edu.vu", - "net.vu", - "org.vu", - "wf", - "ws", - "com.ws", - "edu.ws", - "gov.ws", - "net.ws", - "org.ws", - "yt", - "امارات", - "հայ", - "বাংলা", - "бг", - "البحرين", - "бел", - "中国", - "中國", - "الجزائر", - "مصر", - "ею", - "ευ", - "موريتانيا", - "გე", - "ελ", - "香港", - "個人.香港", - "公司.香港", - "政府.香港", - "教育.香港", - "組織.香港", - "網絡.香港", - "ಭಾರತ", - "ଭାରତ", - "ভাৰত", - "भारतम्", - "भारोत", - "ڀارت", - "ഭാരതം", - "भारत", - "بارت", - "بھارت", - "భారత్", - "ભારત", - "ਭਾਰਤ", - "ভারত", - "இந்தியா", - "ایران", - "ايران", - "عراق", - "الاردن", - "한국", - "қаз", - "ລາວ", - "ලංකා", - "இலங்கை", - "المغرب", - "мкд", - "мон", - "澳門", - "澳门", - "مليسيا", - "عمان", - "پاکستان", - "پاكستان", - "فلسطين", - "срб", - "ак.срб", - "обр.срб", - "од.срб", - "орг.срб", - "пр.срб", - "упр.срб", - "рф", - "قطر", - "السعودية", - "السعودیة", - "السعودیۃ", - "السعوديه", - "سودان", - "新加坡", - "சிங்கப்பூர்", - "سورية", - "سوريا", - "ไทย", - "ทหาร.ไทย", - "ธุรกิจ.ไทย", - "เน็ต.ไทย", - "รัฐบาล.ไทย", - "ศึกษา.ไทย", - "องค์กร.ไทย", - "تونس", - "台灣", - "台湾", - "臺灣", - "укр", - "اليمن", - "xxx", - "ye", - "com.ye", - "edu.ye", - "gov.ye", - "mil.ye", - "net.ye", - "org.ye", - "ac.za", - "agric.za", - "alt.za", - "co.za", - "edu.za", - "gov.za", - "grondar.za", - "law.za", - "mil.za", - "net.za", - "ngo.za", - "nic.za", - "nis.za", - "nom.za", - "org.za", - "school.za", - "tm.za", - "web.za", - "zm", - "ac.zm", - "biz.zm", - "co.zm", - "com.zm", - "edu.zm", - "gov.zm", - "info.zm", - "mil.zm", - "net.zm", - "org.zm", - "sch.zm", - "zw", - "ac.zw", - "co.zw", - "gov.zw", - "mil.zw", - "org.zw", - "aaa", - "aarp", - "abb", - "abbott", - "abbvie", - "abc", - "able", - "abogado", - "abudhabi", - "academy", - "accenture", - "accountant", - "accountants", - "aco", - "actor", - "ads", - "adult", - "aeg", - "aetna", - "afl", - "africa", - "agakhan", - "agency", - "aig", - "airbus", - "airforce", - "airtel", - "akdn", - "alibaba", - "alipay", - "allfinanz", - "allstate", - "ally", - "alsace", - "alstom", - "amazon", - "americanexpress", - "americanfamily", - "amex", - "amfam", - "amica", - "amsterdam", - "analytics", - "android", - "anquan", - "anz", - "aol", - "apartments", - "app", - "apple", - "aquarelle", - "arab", - "aramco", - "archi", - "army", - "art", - "arte", - "asda", - "associates", - "athleta", - "attorney", - "auction", - "audi", - "audible", - "audio", - "auspost", - "author", - "auto", - "autos", - "aws", - "axa", - "azure", - "baby", - "baidu", - "banamex", - "band", - "bank", - "bar", - "barcelona", - "barclaycard", - "barclays", - "barefoot", - "bargains", - "baseball", - "basketball", - "bauhaus", - "bayern", - "bbc", - "bbt", - "bbva", - "bcg", - "bcn", - "beats", - "beauty", - "beer", - "bentley", - "berlin", - "best", - "bestbuy", - "bet", - "bharti", - "bible", - "bid", - "bike", - "bing", - "bingo", - "bio", - "black", - "blackfriday", - "blockbuster", - "blog", - "bloomberg", - "blue", - "bms", - "bmw", - "bnpparibas", - "boats", - "boehringer", - "bofa", - "bom", - "bond", - "boo", - "book", - "booking", - "bosch", - "bostik", - "boston", - "bot", - "boutique", - "box", - "bradesco", - "bridgestone", - "broadway", - "broker", - "brother", - "brussels", - "build", - "builders", - "business", - "buy", - "buzz", - "bzh", - "cab", - "cafe", - "cal", - "call", - "calvinklein", - "cam", - "camera", - "camp", - "canon", - "capetown", - "capital", - "capitalone", - "car", - "caravan", - "cards", - "care", - "career", - "careers", - "cars", - "casa", - "case", - "cash", - "casino", - "catering", - "catholic", - "cba", - "cbn", - "cbre", - "center", - "ceo", - "cern", - "cfa", - "cfd", - "chanel", - "channel", - "charity", - "chase", - "chat", - "cheap", - "chintai", - "christmas", - "chrome", - "church", - "cipriani", - "circle", - "cisco", - "citadel", - "citi", - "citic", - "city", - "claims", - "cleaning", - "click", - "clinic", - "clinique", - "clothing", - "cloud", - "club", - "clubmed", - "coach", - "codes", - "coffee", - "college", - "cologne", - "commbank", - "community", - "company", - "compare", - "computer", - "comsec", - "condos", - "construction", - "consulting", - "contact", - "contractors", - "cooking", - "cool", - "corsica", - "country", - "coupon", - "coupons", - "courses", - "cpa", - "credit", - "creditcard", - "creditunion", - "cricket", - "crown", - "crs", - "cruise", - "cruises", - "cuisinella", - "cymru", - "cyou", - "dad", - "dance", - "data", - "date", - "dating", - "datsun", - "day", - "dclk", - "dds", - "deal", - "dealer", - "deals", - "degree", - "delivery", - "dell", - "deloitte", - "delta", - "democrat", - "dental", - "dentist", - "desi", - "design", - "dev", - "dhl", - "diamonds", - "diet", - "digital", - "direct", - "directory", - "discount", - "discover", - "dish", - "diy", - "dnp", - "docs", - "doctor", - "dog", - "domains", - "dot", - "download", - "drive", - "dtv", - "dubai", - "dunlop", - "dupont", - "durban", - "dvag", - "dvr", - "earth", - "eat", - "eco", - "edeka", - "education", - "email", - "emerck", - "energy", - "engineer", - "engineering", - "enterprises", - "epson", - "equipment", - "ericsson", - "erni", - "esq", - "estate", - "eurovision", - "eus", - "events", - "exchange", - "expert", - "exposed", - "express", - "extraspace", - "fage", - "fail", - "fairwinds", - "faith", - "family", - "fan", - "fans", - "farm", - "farmers", - "fashion", - "fast", - "fedex", - "feedback", - "ferrari", - "ferrero", - "fidelity", - "fido", - "film", - "final", - "finance", - "financial", - "fire", - "firestone", - "firmdale", - "fish", - "fishing", - "fit", - "fitness", - "flickr", - "flights", - "flir", - "florist", - "flowers", - "fly", - "foo", - "food", - "football", - "ford", - "forex", - "forsale", - "forum", - "foundation", - "fox", - "free", - "fresenius", - "frl", - "frogans", - "frontier", - "ftr", - "fujitsu", - "fun", - "fund", - "furniture", - "futbol", - "fyi", - "gal", - "gallery", - "gallo", - "gallup", - "game", - "games", - "gap", - "garden", - "gay", - "gbiz", - "gdn", - "gea", - "gent", - "genting", - "george", - "ggee", - "gift", - "gifts", - "gives", - "giving", - "glass", - "gle", - "global", - "globo", - "gmail", - "gmbh", - "gmo", - "gmx", - "godaddy", - "gold", - "goldpoint", - "golf", - "goo", - "goodyear", - "goog", - "google", - "gop", - "got", - "grainger", - "graphics", - "gratis", - "green", - "gripe", - "grocery", - "group", - "gucci", - "guge", - "guide", - "guitars", - "guru", - "hair", - "hamburg", - "hangout", - "haus", - "hbo", - "hdfc", - "hdfcbank", - "health", - "healthcare", - "help", - "helsinki", - "here", - "hermes", - "hiphop", - "hisamitsu", - "hitachi", - "hiv", - "hkt", - "hockey", - "holdings", - "holiday", - "homedepot", - "homegoods", - "homes", - "homesense", - "honda", - "horse", - "hospital", - "host", - "hosting", - "hot", - "hotels", - "hotmail", - "house", - "how", - "hsbc", - "hughes", - "hyatt", - "hyundai", - "ibm", - "icbc", - "ice", - "icu", - "ieee", - "ifm", - "ikano", - "imamat", - "imdb", - "immo", - "immobilien", - "inc", - "industries", - "infiniti", - "ing", - "ink", - "institute", - "insurance", - "insure", - "international", - "intuit", - "investments", - "ipiranga", - "irish", - "ismaili", - "ist", - "istanbul", - "itau", - "itv", - "jaguar", - "java", - "jcb", - "jeep", - "jetzt", - "jewelry", - "jio", - "jll", - "jmp", - "jnj", - "joburg", - "jot", - "joy", - "jpmorgan", - "jprs", - "juegos", - "juniper", - "kaufen", - "kddi", - "kerryhotels", - "kerrylogistics", - "kerryproperties", - "kfh", - "kia", - "kids", - "kim", - "kindle", - "kitchen", - "kiwi", - "koeln", - "komatsu", - "kosher", - "kpmg", - "kpn", - "krd", - "kred", - "kuokgroup", - "kyoto", - "lacaixa", - "lamborghini", - "lamer", - "lancaster", - "land", - "landrover", - "lanxess", - "lasalle", - "lat", - "latino", - "latrobe", - "law", - "lawyer", - "lds", - "lease", - "leclerc", - "lefrak", - "legal", - "lego", - "lexus", - "lgbt", - "lidl", - "life", - "lifeinsurance", - "lifestyle", - "lighting", - "like", - "lilly", - "limited", - "limo", - "lincoln", - "link", - "lipsy", - "live", - "living", - "llc", - "llp", - "loan", - "loans", - "locker", - "locus", - "lol", - "london", - "lotte", - "lotto", - "love", - "lpl", - "lplfinancial", - "ltd", - "ltda", - "lundbeck", - "luxe", - "luxury", - "madrid", - "maif", - "maison", - "makeup", - "man", - "management", - "mango", - "map", - "market", - "marketing", - "markets", - "marriott", - "marshalls", - "mattel", - "mba", - "mckinsey", - "med", - "media", - "meet", - "melbourne", - "meme", - "memorial", - "men", - "menu", - "merck", - "merckmsd", - "miami", - "microsoft", - "mini", - "mint", - "mit", - "mitsubishi", - "mlb", - "mls", - "mma", - "mobile", - "moda", - "moe", - "moi", - "mom", - "monash", - "money", - "monster", - "mormon", - "mortgage", - "moscow", - "moto", - "motorcycles", - "mov", - "movie", - "msd", - "mtn", - "mtr", - "music", - "nab", - "nagoya", - "navy", - "nba", - "nec", - "netbank", - "netflix", - "network", - "neustar", - "new", - "news", - "next", - "nextdirect", - "nexus", - "nfl", - "ngo", - "nhk", - "nico", - "nike", - "nikon", - "ninja", - "nissan", - "nissay", - "nokia", - "norton", - "now", - "nowruz", - "nowtv", - "nra", - "nrw", - "ntt", - "nyc", - "obi", - "observer", - "office", - "okinawa", - "olayan", - "olayangroup", - "ollo", - "omega", - "one", - "ong", - "onl", - "online", - "ooo", - "open", - "oracle", - "orange", - "organic", - "origins", - "osaka", - "otsuka", - "ott", - "ovh", - "page", - "panasonic", - "paris", - "pars", - "partners", - "parts", - "party", - "pay", - "pccw", - "pet", - "pfizer", - "pharmacy", - "phd", - "philips", - "phone", - "photo", - "photography", - "photos", - "physio", - "pics", - "pictet", - "pictures", - "pid", - "pin", - "ping", - "pink", - "pioneer", - "pizza", - "place", - "play", - "playstation", - "plumbing", - "plus", - "pnc", - "pohl", - "poker", - "politie", - "porn", - "pramerica", - "praxi", - "press", - "prime", - "prod", - "productions", - "prof", - "progressive", - "promo", - "properties", - "property", - "protection", - "pru", - "prudential", - "pub", - "pwc", - "qpon", - "quebec", - "quest", - "racing", - "radio", - "read", - "realestate", - "realtor", - "realty", - "recipes", - "red", - "redstone", - "redumbrella", - "rehab", - "reise", - "reisen", - "reit", - "reliance", - "ren", - "rent", - "rentals", - "repair", - "report", - "republican", - "rest", - "restaurant", - "review", - "reviews", - "rexroth", - "rich", - "richardli", - "ricoh", - "ril", - "rio", - "rip", - "rocks", - "rodeo", - "rogers", - "room", - "rsvp", - "rugby", - "ruhr", - "run", - "rwe", - "ryukyu", - "saarland", - "safe", - "safety", - "sakura", - "sale", - "salon", - "samsclub", - "samsung", - "sandvik", - "sandvikcoromant", - "sanofi", - "sap", - "sarl", - "sas", - "save", - "saxo", - "sbi", - "sbs", - "scb", - "schaeffler", - "schmidt", - "scholarships", - "school", - "schule", - "schwarz", - "science", - "scot", - "search", - "seat", - "secure", - "security", - "seek", - "select", - "sener", - "services", - "seven", - "sew", - "sex", - "sexy", - "sfr", - "shangrila", - "sharp", - "shell", - "shia", - "shiksha", - "shoes", - "shop", - "shopping", - "shouji", - "show", - "silk", - "sina", - "singles", - "site", - "ski", - "skin", - "sky", - "skype", - "sling", - "smart", - "smile", - "sncf", - "soccer", - "social", - "softbank", - "software", - "sohu", - "solar", - "solutions", - "song", - "sony", - "soy", - "spa", - "space", - "sport", - "spot", - "srl", - "stada", - "staples", - "star", - "statebank", - "statefarm", - "stc", - "stcgroup", - "stockholm", - "storage", - "store", - "stream", - "studio", - "study", - "style", - "sucks", - "supplies", - "supply", - "support", - "surf", - "surgery", - "suzuki", - "swatch", - "swiss", - "sydney", - "systems", - "tab", - "taipei", - "talk", - "taobao", - "target", - "tatamotors", - "tatar", - "tattoo", - "tax", - "taxi", - "tci", - "tdk", - "team", - "tech", - "technology", - "temasek", - "tennis", - "teva", - "thd", - "theater", - "theatre", - "tiaa", - "tickets", - "tienda", - "tips", - "tires", - "tirol", - "tjmaxx", - "tjx", - "tkmaxx", - "tmall", - "today", - "tokyo", - "tools", - "top", - "toray", - "toshiba", - "total", - "tours", - "town", - "toyota", - "toys", - "trade", - "trading", - "training", - "travel", - "travelers", - "travelersinsurance", - "trust", - "trv", - "tube", - "tui", - "tunes", - "tushu", - "tvs", - "ubank", - "ubs", - "unicom", - "university", - "uno", - "uol", - "ups", - "vacations", - "vana", - "vanguard", - "vegas", - "ventures", - "verisign", - "versicherung", - "vet", - "viajes", - "video", - "vig", - "viking", - "villas", - "vin", - "vip", - "virgin", - "visa", - "vision", - "viva", - "vivo", - "vlaanderen", - "vodka", - "volvo", - "vote", - "voting", - "voto", - "voyage", - "wales", - "walmart", - "walter", - "wang", - "wanggou", - "watch", - "watches", - "weather", - "weatherchannel", - "webcam", - "weber", - "website", - "wed", - "wedding", - "weibo", - "weir", - "whoswho", - "wien", - "wiki", - "williamhill", - "win", - "windows", - "wine", - "winners", - "wme", - "wolterskluwer", - "woodside", - "work", - "works", - "world", - "wow", - "wtc", - "wtf", - "xbox", - "xerox", - "xihuan", - "xin", - "कॉम", - "セール", - "佛山", - "慈善", - "集团", - "在线", - "点看", - "คอม", - "八卦", - "موقع", - "公益", - "公司", - "香格里拉", - "网站", - "移动", - "我爱你", - "москва", - "католик", - "онлайн", - "сайт", - "联通", - "קום", - "时尚", - "微博", - "淡马锡", - "ファッション", - "орг", - "नेट", - "ストア", - "アマゾン", - "삼성", - "商标", - "商店", - "商城", - "дети", - "ポイント", - "新闻", - "家電", - "كوم", - "中文网", - "中信", - "娱乐", - "谷歌", - "電訊盈科", - "购物", - "クラウド", - "通販", - "网店", - "संगठन", - "餐厅", - "网络", - "ком", - "亚马逊", - "食品", - "飞利浦", - "手机", - "ارامكو", - "العليان", - "بازار", - "ابوظبي", - "كاثوليك", - "همراه", - "닷컴", - "政府", - "شبكة", - "بيتك", - "عرب", - "机构", - "组织机构", - "健康", - "招聘", - "рус", - "大拿", - "みんな", - "グーグル", - "世界", - "書籍", - "网址", - "닷넷", - "コム", - "天主教", - "游戏", - "vermögensberater", - "vermögensberatung", - "企业", - "信息", - "嘉里大酒店", - "嘉里", - "广东", - "政务", - "xyz", - "yachts", - "yahoo", - "yamaxun", - "yandex", - "yodobashi", - "yoga", - "yokohama", - "you", - "youtube", - "yun", - "zappos", - "zara", - "zero", - "zip", - "zone", - "zuerich", - "co.krd", - "edu.krd", - "art.pl", - "gliwice.pl", - "krakow.pl", - "poznan.pl", - "wroc.pl", - "zakopane.pl", - "lib.de.us", - "12chars.dev", - "12chars.it", - "12chars.pro", - "cc.ua", - "inf.ua", - "ltd.ua", - "611.to", - "a2hosted.com", - "cpserver.com", - "aaa.vodka", - "*.on-acorn.io", - "activetrail.biz", - "adaptable.app", - "adobeaemcloud.com", - "*.dev.adobeaemcloud.com", - "aem.live", - "hlx.live", - "adobeaemcloud.net", - "aem.page", - "hlx.page", - "hlx3.page", - "adobeio-static.net", - "adobeioruntime.net", - "africa.com", - "beep.pl", - "airkitapps.com", - "airkitapps-au.com", - "airkitapps.eu", - "aivencloud.com", - "akadns.net", - "akamai.net", - "akamai-staging.net", - "akamaiedge.net", - "akamaiedge-staging.net", - "akamaihd.net", - "akamaihd-staging.net", - "akamaiorigin.net", - "akamaiorigin-staging.net", - "akamaized.net", - "akamaized-staging.net", - "edgekey.net", - "edgekey-staging.net", - "edgesuite.net", - "edgesuite-staging.net", - "barsy.ca", - "*.compute.estate", - "*.alces.network", - "kasserver.com", - "altervista.org", - "alwaysdata.net", - "myamaze.net", - "execute-api.cn-north-1.amazonaws.com.cn", - "execute-api.cn-northwest-1.amazonaws.com.cn", - "execute-api.af-south-1.amazonaws.com", - "execute-api.ap-east-1.amazonaws.com", - "execute-api.ap-northeast-1.amazonaws.com", - "execute-api.ap-northeast-2.amazonaws.com", - "execute-api.ap-northeast-3.amazonaws.com", - "execute-api.ap-south-1.amazonaws.com", - "execute-api.ap-south-2.amazonaws.com", - "execute-api.ap-southeast-1.amazonaws.com", - "execute-api.ap-southeast-2.amazonaws.com", - "execute-api.ap-southeast-3.amazonaws.com", - "execute-api.ap-southeast-4.amazonaws.com", - "execute-api.ap-southeast-5.amazonaws.com", - "execute-api.ca-central-1.amazonaws.com", - "execute-api.ca-west-1.amazonaws.com", - "execute-api.eu-central-1.amazonaws.com", - "execute-api.eu-central-2.amazonaws.com", - "execute-api.eu-north-1.amazonaws.com", - "execute-api.eu-south-1.amazonaws.com", - "execute-api.eu-south-2.amazonaws.com", - "execute-api.eu-west-1.amazonaws.com", - "execute-api.eu-west-2.amazonaws.com", - "execute-api.eu-west-3.amazonaws.com", - "execute-api.il-central-1.amazonaws.com", - "execute-api.me-central-1.amazonaws.com", - "execute-api.me-south-1.amazonaws.com", - "execute-api.sa-east-1.amazonaws.com", - "execute-api.us-east-1.amazonaws.com", - "execute-api.us-east-2.amazonaws.com", - "execute-api.us-gov-east-1.amazonaws.com", - "execute-api.us-gov-west-1.amazonaws.com", - "execute-api.us-west-1.amazonaws.com", - "execute-api.us-west-2.amazonaws.com", - "cloudfront.net", - "auth.af-south-1.amazoncognito.com", - "auth.ap-east-1.amazoncognito.com", - "auth.ap-northeast-1.amazoncognito.com", - "auth.ap-northeast-2.amazoncognito.com", - "auth.ap-northeast-3.amazoncognito.com", - "auth.ap-south-1.amazoncognito.com", - "auth.ap-south-2.amazoncognito.com", - "auth.ap-southeast-1.amazoncognito.com", - "auth.ap-southeast-2.amazoncognito.com", - "auth.ap-southeast-3.amazoncognito.com", - "auth.ap-southeast-4.amazoncognito.com", - "auth.ca-central-1.amazoncognito.com", - "auth.ca-west-1.amazoncognito.com", - "auth.eu-central-1.amazoncognito.com", - "auth.eu-central-2.amazoncognito.com", - "auth.eu-north-1.amazoncognito.com", - "auth.eu-south-1.amazoncognito.com", - "auth.eu-south-2.amazoncognito.com", - "auth.eu-west-1.amazoncognito.com", - "auth.eu-west-2.amazoncognito.com", - "auth.eu-west-3.amazoncognito.com", - "auth.il-central-1.amazoncognito.com", - "auth.me-central-1.amazoncognito.com", - "auth.me-south-1.amazoncognito.com", - "auth.sa-east-1.amazoncognito.com", - "auth.us-east-1.amazoncognito.com", - "auth-fips.us-east-1.amazoncognito.com", - "auth.us-east-2.amazoncognito.com", - "auth-fips.us-east-2.amazoncognito.com", - "auth-fips.us-gov-west-1.amazoncognito.com", - "auth.us-west-1.amazoncognito.com", - "auth-fips.us-west-1.amazoncognito.com", - "auth.us-west-2.amazoncognito.com", - "auth-fips.us-west-2.amazoncognito.com", - "*.compute.amazonaws.com.cn", - "*.compute.amazonaws.com", - "*.compute-1.amazonaws.com", - "us-east-1.amazonaws.com", - "emrappui-prod.cn-north-1.amazonaws.com.cn", - "emrnotebooks-prod.cn-north-1.amazonaws.com.cn", - "emrstudio-prod.cn-north-1.amazonaws.com.cn", - "emrappui-prod.cn-northwest-1.amazonaws.com.cn", - "emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn", - "emrstudio-prod.cn-northwest-1.amazonaws.com.cn", - "emrappui-prod.af-south-1.amazonaws.com", - "emrnotebooks-prod.af-south-1.amazonaws.com", - "emrstudio-prod.af-south-1.amazonaws.com", - "emrappui-prod.ap-east-1.amazonaws.com", - "emrnotebooks-prod.ap-east-1.amazonaws.com", - "emrstudio-prod.ap-east-1.amazonaws.com", - "emrappui-prod.ap-northeast-1.amazonaws.com", - "emrnotebooks-prod.ap-northeast-1.amazonaws.com", - "emrstudio-prod.ap-northeast-1.amazonaws.com", - "emrappui-prod.ap-northeast-2.amazonaws.com", - "emrnotebooks-prod.ap-northeast-2.amazonaws.com", - "emrstudio-prod.ap-northeast-2.amazonaws.com", - "emrappui-prod.ap-northeast-3.amazonaws.com", - "emrnotebooks-prod.ap-northeast-3.amazonaws.com", - "emrstudio-prod.ap-northeast-3.amazonaws.com", - "emrappui-prod.ap-south-1.amazonaws.com", - "emrnotebooks-prod.ap-south-1.amazonaws.com", - "emrstudio-prod.ap-south-1.amazonaws.com", - "emrappui-prod.ap-south-2.amazonaws.com", - "emrnotebooks-prod.ap-south-2.amazonaws.com", - "emrstudio-prod.ap-south-2.amazonaws.com", - "emrappui-prod.ap-southeast-1.amazonaws.com", - "emrnotebooks-prod.ap-southeast-1.amazonaws.com", - "emrstudio-prod.ap-southeast-1.amazonaws.com", - "emrappui-prod.ap-southeast-2.amazonaws.com", - "emrnotebooks-prod.ap-southeast-2.amazonaws.com", - "emrstudio-prod.ap-southeast-2.amazonaws.com", - "emrappui-prod.ap-southeast-3.amazonaws.com", - "emrnotebooks-prod.ap-southeast-3.amazonaws.com", - "emrstudio-prod.ap-southeast-3.amazonaws.com", - "emrappui-prod.ap-southeast-4.amazonaws.com", - "emrnotebooks-prod.ap-southeast-4.amazonaws.com", - "emrstudio-prod.ap-southeast-4.amazonaws.com", - "emrappui-prod.ca-central-1.amazonaws.com", - "emrnotebooks-prod.ca-central-1.amazonaws.com", - "emrstudio-prod.ca-central-1.amazonaws.com", - "emrappui-prod.ca-west-1.amazonaws.com", - "emrnotebooks-prod.ca-west-1.amazonaws.com", - "emrstudio-prod.ca-west-1.amazonaws.com", - "emrappui-prod.eu-central-1.amazonaws.com", - "emrnotebooks-prod.eu-central-1.amazonaws.com", - "emrstudio-prod.eu-central-1.amazonaws.com", - "emrappui-prod.eu-central-2.amazonaws.com", - "emrnotebooks-prod.eu-central-2.amazonaws.com", - "emrstudio-prod.eu-central-2.amazonaws.com", - "emrappui-prod.eu-north-1.amazonaws.com", - "emrnotebooks-prod.eu-north-1.amazonaws.com", - "emrstudio-prod.eu-north-1.amazonaws.com", - "emrappui-prod.eu-south-1.amazonaws.com", - "emrnotebooks-prod.eu-south-1.amazonaws.com", - "emrstudio-prod.eu-south-1.amazonaws.com", - "emrappui-prod.eu-south-2.amazonaws.com", - "emrnotebooks-prod.eu-south-2.amazonaws.com", - "emrstudio-prod.eu-south-2.amazonaws.com", - "emrappui-prod.eu-west-1.amazonaws.com", - "emrnotebooks-prod.eu-west-1.amazonaws.com", - "emrstudio-prod.eu-west-1.amazonaws.com", - "emrappui-prod.eu-west-2.amazonaws.com", - "emrnotebooks-prod.eu-west-2.amazonaws.com", - "emrstudio-prod.eu-west-2.amazonaws.com", - "emrappui-prod.eu-west-3.amazonaws.com", - "emrnotebooks-prod.eu-west-3.amazonaws.com", - "emrstudio-prod.eu-west-3.amazonaws.com", - "emrappui-prod.il-central-1.amazonaws.com", - "emrnotebooks-prod.il-central-1.amazonaws.com", - "emrstudio-prod.il-central-1.amazonaws.com", - "emrappui-prod.me-central-1.amazonaws.com", - "emrnotebooks-prod.me-central-1.amazonaws.com", - "emrstudio-prod.me-central-1.amazonaws.com", - "emrappui-prod.me-south-1.amazonaws.com", - "emrnotebooks-prod.me-south-1.amazonaws.com", - "emrstudio-prod.me-south-1.amazonaws.com", - "emrappui-prod.sa-east-1.amazonaws.com", - "emrnotebooks-prod.sa-east-1.amazonaws.com", - "emrstudio-prod.sa-east-1.amazonaws.com", - "emrappui-prod.us-east-1.amazonaws.com", - "emrnotebooks-prod.us-east-1.amazonaws.com", - "emrstudio-prod.us-east-1.amazonaws.com", - "emrappui-prod.us-east-2.amazonaws.com", - "emrnotebooks-prod.us-east-2.amazonaws.com", - "emrstudio-prod.us-east-2.amazonaws.com", - "emrappui-prod.us-gov-east-1.amazonaws.com", - "emrnotebooks-prod.us-gov-east-1.amazonaws.com", - "emrstudio-prod.us-gov-east-1.amazonaws.com", - "emrappui-prod.us-gov-west-1.amazonaws.com", - "emrnotebooks-prod.us-gov-west-1.amazonaws.com", - "emrstudio-prod.us-gov-west-1.amazonaws.com", - "emrappui-prod.us-west-1.amazonaws.com", - "emrnotebooks-prod.us-west-1.amazonaws.com", - "emrstudio-prod.us-west-1.amazonaws.com", - "emrappui-prod.us-west-2.amazonaws.com", - "emrnotebooks-prod.us-west-2.amazonaws.com", - "emrstudio-prod.us-west-2.amazonaws.com", - "*.cn-north-1.airflow.amazonaws.com.cn", - "*.cn-northwest-1.airflow.amazonaws.com.cn", - "*.af-south-1.airflow.amazonaws.com", - "*.ap-east-1.airflow.amazonaws.com", - "*.ap-northeast-1.airflow.amazonaws.com", - "*.ap-northeast-2.airflow.amazonaws.com", - "*.ap-northeast-3.airflow.amazonaws.com", - "*.ap-south-1.airflow.amazonaws.com", - "*.ap-south-2.airflow.amazonaws.com", - "*.ap-southeast-1.airflow.amazonaws.com", - "*.ap-southeast-2.airflow.amazonaws.com", - "*.ap-southeast-3.airflow.amazonaws.com", - "*.ap-southeast-4.airflow.amazonaws.com", - "*.ca-central-1.airflow.amazonaws.com", - "*.ca-west-1.airflow.amazonaws.com", - "*.eu-central-1.airflow.amazonaws.com", - "*.eu-central-2.airflow.amazonaws.com", - "*.eu-north-1.airflow.amazonaws.com", - "*.eu-south-1.airflow.amazonaws.com", - "*.eu-south-2.airflow.amazonaws.com", - "*.eu-west-1.airflow.amazonaws.com", - "*.eu-west-2.airflow.amazonaws.com", - "*.eu-west-3.airflow.amazonaws.com", - "*.il-central-1.airflow.amazonaws.com", - "*.me-central-1.airflow.amazonaws.com", - "*.me-south-1.airflow.amazonaws.com", - "*.sa-east-1.airflow.amazonaws.com", - "*.us-east-1.airflow.amazonaws.com", - "*.us-east-2.airflow.amazonaws.com", - "*.us-west-1.airflow.amazonaws.com", - "*.us-west-2.airflow.amazonaws.com", - "s3.dualstack.cn-north-1.amazonaws.com.cn", - "s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn", - "s3-website.dualstack.cn-north-1.amazonaws.com.cn", - "s3.cn-north-1.amazonaws.com.cn", - "s3-accesspoint.cn-north-1.amazonaws.com.cn", - "s3-deprecated.cn-north-1.amazonaws.com.cn", - "s3-object-lambda.cn-north-1.amazonaws.com.cn", - "s3-website.cn-north-1.amazonaws.com.cn", - "s3.dualstack.cn-northwest-1.amazonaws.com.cn", - "s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn", - "s3.cn-northwest-1.amazonaws.com.cn", - "s3-accesspoint.cn-northwest-1.amazonaws.com.cn", - "s3-object-lambda.cn-northwest-1.amazonaws.com.cn", - "s3-website.cn-northwest-1.amazonaws.com.cn", - "s3.dualstack.af-south-1.amazonaws.com", - "s3-accesspoint.dualstack.af-south-1.amazonaws.com", - "s3-website.dualstack.af-south-1.amazonaws.com", - "s3.af-south-1.amazonaws.com", - "s3-accesspoint.af-south-1.amazonaws.com", - "s3-object-lambda.af-south-1.amazonaws.com", - "s3-website.af-south-1.amazonaws.com", - "s3.dualstack.ap-east-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-east-1.amazonaws.com", - "s3.ap-east-1.amazonaws.com", - "s3-accesspoint.ap-east-1.amazonaws.com", - "s3-object-lambda.ap-east-1.amazonaws.com", - "s3-website.ap-east-1.amazonaws.com", - "s3.dualstack.ap-northeast-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com", - "s3-website.dualstack.ap-northeast-1.amazonaws.com", - "s3.ap-northeast-1.amazonaws.com", - "s3-accesspoint.ap-northeast-1.amazonaws.com", - "s3-object-lambda.ap-northeast-1.amazonaws.com", - "s3-website.ap-northeast-1.amazonaws.com", - "s3.dualstack.ap-northeast-2.amazonaws.com", - "s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com", - "s3-website.dualstack.ap-northeast-2.amazonaws.com", - "s3.ap-northeast-2.amazonaws.com", - "s3-accesspoint.ap-northeast-2.amazonaws.com", - "s3-object-lambda.ap-northeast-2.amazonaws.com", - "s3-website.ap-northeast-2.amazonaws.com", - "s3.dualstack.ap-northeast-3.amazonaws.com", - "s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com", - "s3-website.dualstack.ap-northeast-3.amazonaws.com", - "s3.ap-northeast-3.amazonaws.com", - "s3-accesspoint.ap-northeast-3.amazonaws.com", - "s3-object-lambda.ap-northeast-3.amazonaws.com", - "s3-website.ap-northeast-3.amazonaws.com", - "s3.dualstack.ap-south-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-south-1.amazonaws.com", - "s3-website.dualstack.ap-south-1.amazonaws.com", - "s3.ap-south-1.amazonaws.com", - "s3-accesspoint.ap-south-1.amazonaws.com", - "s3-object-lambda.ap-south-1.amazonaws.com", - "s3-website.ap-south-1.amazonaws.com", - "s3.dualstack.ap-south-2.amazonaws.com", - "s3-accesspoint.dualstack.ap-south-2.amazonaws.com", - "s3-website.dualstack.ap-south-2.amazonaws.com", - "s3.ap-south-2.amazonaws.com", - "s3-accesspoint.ap-south-2.amazonaws.com", - "s3-object-lambda.ap-south-2.amazonaws.com", - "s3-website.ap-south-2.amazonaws.com", - "s3.dualstack.ap-southeast-1.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com", - "s3-website.dualstack.ap-southeast-1.amazonaws.com", - "s3.ap-southeast-1.amazonaws.com", - "s3-accesspoint.ap-southeast-1.amazonaws.com", - "s3-object-lambda.ap-southeast-1.amazonaws.com", - "s3-website.ap-southeast-1.amazonaws.com", - "s3.dualstack.ap-southeast-2.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com", - "s3-website.dualstack.ap-southeast-2.amazonaws.com", - "s3.ap-southeast-2.amazonaws.com", - "s3-accesspoint.ap-southeast-2.amazonaws.com", - "s3-object-lambda.ap-southeast-2.amazonaws.com", - "s3-website.ap-southeast-2.amazonaws.com", - "s3.dualstack.ap-southeast-3.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com", - "s3-website.dualstack.ap-southeast-3.amazonaws.com", - "s3.ap-southeast-3.amazonaws.com", - "s3-accesspoint.ap-southeast-3.amazonaws.com", - "s3-object-lambda.ap-southeast-3.amazonaws.com", - "s3-website.ap-southeast-3.amazonaws.com", - "s3.dualstack.ap-southeast-4.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com", - "s3-website.dualstack.ap-southeast-4.amazonaws.com", - "s3.ap-southeast-4.amazonaws.com", - "s3-accesspoint.ap-southeast-4.amazonaws.com", - "s3-object-lambda.ap-southeast-4.amazonaws.com", - "s3-website.ap-southeast-4.amazonaws.com", - "s3.dualstack.ap-southeast-5.amazonaws.com", - "s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com", - "s3-website.dualstack.ap-southeast-5.amazonaws.com", - "s3.ap-southeast-5.amazonaws.com", - "s3-accesspoint.ap-southeast-5.amazonaws.com", - "s3-deprecated.ap-southeast-5.amazonaws.com", - "s3-object-lambda.ap-southeast-5.amazonaws.com", - "s3-website.ap-southeast-5.amazonaws.com", - "s3.dualstack.ca-central-1.amazonaws.com", - "s3-accesspoint.dualstack.ca-central-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com", - "s3-fips.dualstack.ca-central-1.amazonaws.com", - "s3-website.dualstack.ca-central-1.amazonaws.com", - "s3.ca-central-1.amazonaws.com", - "s3-accesspoint.ca-central-1.amazonaws.com", - "s3-accesspoint-fips.ca-central-1.amazonaws.com", - "s3-fips.ca-central-1.amazonaws.com", - "s3-object-lambda.ca-central-1.amazonaws.com", - "s3-website.ca-central-1.amazonaws.com", - "s3.dualstack.ca-west-1.amazonaws.com", - "s3-accesspoint.dualstack.ca-west-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.ca-west-1.amazonaws.com", - "s3-fips.dualstack.ca-west-1.amazonaws.com", - "s3-website.dualstack.ca-west-1.amazonaws.com", - "s3.ca-west-1.amazonaws.com", - "s3-accesspoint.ca-west-1.amazonaws.com", - "s3-accesspoint-fips.ca-west-1.amazonaws.com", - "s3-fips.ca-west-1.amazonaws.com", - "s3-object-lambda.ca-west-1.amazonaws.com", - "s3-website.ca-west-1.amazonaws.com", - "s3.dualstack.eu-central-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-central-1.amazonaws.com", - "s3-website.dualstack.eu-central-1.amazonaws.com", - "s3.eu-central-1.amazonaws.com", - "s3-accesspoint.eu-central-1.amazonaws.com", - "s3-object-lambda.eu-central-1.amazonaws.com", - "s3-website.eu-central-1.amazonaws.com", - "s3.dualstack.eu-central-2.amazonaws.com", - "s3-accesspoint.dualstack.eu-central-2.amazonaws.com", - "s3-website.dualstack.eu-central-2.amazonaws.com", - "s3.eu-central-2.amazonaws.com", - "s3-accesspoint.eu-central-2.amazonaws.com", - "s3-object-lambda.eu-central-2.amazonaws.com", - "s3-website.eu-central-2.amazonaws.com", - "s3.dualstack.eu-north-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-north-1.amazonaws.com", - "s3.eu-north-1.amazonaws.com", - "s3-accesspoint.eu-north-1.amazonaws.com", - "s3-object-lambda.eu-north-1.amazonaws.com", - "s3-website.eu-north-1.amazonaws.com", - "s3.dualstack.eu-south-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-south-1.amazonaws.com", - "s3-website.dualstack.eu-south-1.amazonaws.com", - "s3.eu-south-1.amazonaws.com", - "s3-accesspoint.eu-south-1.amazonaws.com", - "s3-object-lambda.eu-south-1.amazonaws.com", - "s3-website.eu-south-1.amazonaws.com", - "s3.dualstack.eu-south-2.amazonaws.com", - "s3-accesspoint.dualstack.eu-south-2.amazonaws.com", - "s3-website.dualstack.eu-south-2.amazonaws.com", - "s3.eu-south-2.amazonaws.com", - "s3-accesspoint.eu-south-2.amazonaws.com", - "s3-object-lambda.eu-south-2.amazonaws.com", - "s3-website.eu-south-2.amazonaws.com", - "s3.dualstack.eu-west-1.amazonaws.com", - "s3-accesspoint.dualstack.eu-west-1.amazonaws.com", - "s3-website.dualstack.eu-west-1.amazonaws.com", - "s3.eu-west-1.amazonaws.com", - "s3-accesspoint.eu-west-1.amazonaws.com", - "s3-deprecated.eu-west-1.amazonaws.com", - "s3-object-lambda.eu-west-1.amazonaws.com", - "s3-website.eu-west-1.amazonaws.com", - "s3.dualstack.eu-west-2.amazonaws.com", - "s3-accesspoint.dualstack.eu-west-2.amazonaws.com", - "s3.eu-west-2.amazonaws.com", - "s3-accesspoint.eu-west-2.amazonaws.com", - "s3-object-lambda.eu-west-2.amazonaws.com", - "s3-website.eu-west-2.amazonaws.com", - "s3.dualstack.eu-west-3.amazonaws.com", - "s3-accesspoint.dualstack.eu-west-3.amazonaws.com", - "s3-website.dualstack.eu-west-3.amazonaws.com", - "s3.eu-west-3.amazonaws.com", - "s3-accesspoint.eu-west-3.amazonaws.com", - "s3-object-lambda.eu-west-3.amazonaws.com", - "s3-website.eu-west-3.amazonaws.com", - "s3.dualstack.il-central-1.amazonaws.com", - "s3-accesspoint.dualstack.il-central-1.amazonaws.com", - "s3-website.dualstack.il-central-1.amazonaws.com", - "s3.il-central-1.amazonaws.com", - "s3-accesspoint.il-central-1.amazonaws.com", - "s3-object-lambda.il-central-1.amazonaws.com", - "s3-website.il-central-1.amazonaws.com", - "s3.dualstack.me-central-1.amazonaws.com", - "s3-accesspoint.dualstack.me-central-1.amazonaws.com", - "s3-website.dualstack.me-central-1.amazonaws.com", - "s3.me-central-1.amazonaws.com", - "s3-accesspoint.me-central-1.amazonaws.com", - "s3-object-lambda.me-central-1.amazonaws.com", - "s3-website.me-central-1.amazonaws.com", - "s3.dualstack.me-south-1.amazonaws.com", - "s3-accesspoint.dualstack.me-south-1.amazonaws.com", - "s3.me-south-1.amazonaws.com", - "s3-accesspoint.me-south-1.amazonaws.com", - "s3-object-lambda.me-south-1.amazonaws.com", - "s3-website.me-south-1.amazonaws.com", - "s3.amazonaws.com", - "s3-1.amazonaws.com", - "s3-ap-east-1.amazonaws.com", - "s3-ap-northeast-1.amazonaws.com", - "s3-ap-northeast-2.amazonaws.com", - "s3-ap-northeast-3.amazonaws.com", - "s3-ap-south-1.amazonaws.com", - "s3-ap-southeast-1.amazonaws.com", - "s3-ap-southeast-2.amazonaws.com", - "s3-ca-central-1.amazonaws.com", - "s3-eu-central-1.amazonaws.com", - "s3-eu-north-1.amazonaws.com", - "s3-eu-west-1.amazonaws.com", - "s3-eu-west-2.amazonaws.com", - "s3-eu-west-3.amazonaws.com", - "s3-external-1.amazonaws.com", - "s3-fips-us-gov-east-1.amazonaws.com", - "s3-fips-us-gov-west-1.amazonaws.com", - "mrap.accesspoint.s3-global.amazonaws.com", - "s3-me-south-1.amazonaws.com", - "s3-sa-east-1.amazonaws.com", - "s3-us-east-2.amazonaws.com", - "s3-us-gov-east-1.amazonaws.com", - "s3-us-gov-west-1.amazonaws.com", - "s3-us-west-1.amazonaws.com", - "s3-us-west-2.amazonaws.com", - "s3-website-ap-northeast-1.amazonaws.com", - "s3-website-ap-southeast-1.amazonaws.com", - "s3-website-ap-southeast-2.amazonaws.com", - "s3-website-eu-west-1.amazonaws.com", - "s3-website-sa-east-1.amazonaws.com", - "s3-website-us-east-1.amazonaws.com", - "s3-website-us-gov-west-1.amazonaws.com", - "s3-website-us-west-1.amazonaws.com", - "s3-website-us-west-2.amazonaws.com", - "s3.dualstack.sa-east-1.amazonaws.com", - "s3-accesspoint.dualstack.sa-east-1.amazonaws.com", - "s3-website.dualstack.sa-east-1.amazonaws.com", - "s3.sa-east-1.amazonaws.com", - "s3-accesspoint.sa-east-1.amazonaws.com", - "s3-object-lambda.sa-east-1.amazonaws.com", - "s3-website.sa-east-1.amazonaws.com", - "s3.dualstack.us-east-1.amazonaws.com", - "s3-accesspoint.dualstack.us-east-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com", - "s3-fips.dualstack.us-east-1.amazonaws.com", - "s3-website.dualstack.us-east-1.amazonaws.com", - "s3.us-east-1.amazonaws.com", - "s3-accesspoint.us-east-1.amazonaws.com", - "s3-accesspoint-fips.us-east-1.amazonaws.com", - "s3-deprecated.us-east-1.amazonaws.com", - "s3-fips.us-east-1.amazonaws.com", - "s3-object-lambda.us-east-1.amazonaws.com", - "s3-website.us-east-1.amazonaws.com", - "s3.dualstack.us-east-2.amazonaws.com", - "s3-accesspoint.dualstack.us-east-2.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com", - "s3-fips.dualstack.us-east-2.amazonaws.com", - "s3-website.dualstack.us-east-2.amazonaws.com", - "s3.us-east-2.amazonaws.com", - "s3-accesspoint.us-east-2.amazonaws.com", - "s3-accesspoint-fips.us-east-2.amazonaws.com", - "s3-deprecated.us-east-2.amazonaws.com", - "s3-fips.us-east-2.amazonaws.com", - "s3-object-lambda.us-east-2.amazonaws.com", - "s3-website.us-east-2.amazonaws.com", - "s3.dualstack.us-gov-east-1.amazonaws.com", - "s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com", - "s3-fips.dualstack.us-gov-east-1.amazonaws.com", - "s3.us-gov-east-1.amazonaws.com", - "s3-accesspoint.us-gov-east-1.amazonaws.com", - "s3-accesspoint-fips.us-gov-east-1.amazonaws.com", - "s3-fips.us-gov-east-1.amazonaws.com", - "s3-object-lambda.us-gov-east-1.amazonaws.com", - "s3-website.us-gov-east-1.amazonaws.com", - "s3.dualstack.us-gov-west-1.amazonaws.com", - "s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com", - "s3-fips.dualstack.us-gov-west-1.amazonaws.com", - "s3.us-gov-west-1.amazonaws.com", - "s3-accesspoint.us-gov-west-1.amazonaws.com", - "s3-accesspoint-fips.us-gov-west-1.amazonaws.com", - "s3-fips.us-gov-west-1.amazonaws.com", - "s3-object-lambda.us-gov-west-1.amazonaws.com", - "s3-website.us-gov-west-1.amazonaws.com", - "s3.dualstack.us-west-1.amazonaws.com", - "s3-accesspoint.dualstack.us-west-1.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com", - "s3-fips.dualstack.us-west-1.amazonaws.com", - "s3-website.dualstack.us-west-1.amazonaws.com", - "s3.us-west-1.amazonaws.com", - "s3-accesspoint.us-west-1.amazonaws.com", - "s3-accesspoint-fips.us-west-1.amazonaws.com", - "s3-fips.us-west-1.amazonaws.com", - "s3-object-lambda.us-west-1.amazonaws.com", - "s3-website.us-west-1.amazonaws.com", - "s3.dualstack.us-west-2.amazonaws.com", - "s3-accesspoint.dualstack.us-west-2.amazonaws.com", - "s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com", - "s3-fips.dualstack.us-west-2.amazonaws.com", - "s3-website.dualstack.us-west-2.amazonaws.com", - "s3.us-west-2.amazonaws.com", - "s3-accesspoint.us-west-2.amazonaws.com", - "s3-accesspoint-fips.us-west-2.amazonaws.com", - "s3-deprecated.us-west-2.amazonaws.com", - "s3-fips.us-west-2.amazonaws.com", - "s3-object-lambda.us-west-2.amazonaws.com", - "s3-website.us-west-2.amazonaws.com", - "labeling.ap-northeast-1.sagemaker.aws", - "labeling.ap-northeast-2.sagemaker.aws", - "labeling.ap-south-1.sagemaker.aws", - "labeling.ap-southeast-1.sagemaker.aws", - "labeling.ap-southeast-2.sagemaker.aws", - "labeling.ca-central-1.sagemaker.aws", - "labeling.eu-central-1.sagemaker.aws", - "labeling.eu-west-1.sagemaker.aws", - "labeling.eu-west-2.sagemaker.aws", - "labeling.us-east-1.sagemaker.aws", - "labeling.us-east-2.sagemaker.aws", - "labeling.us-west-2.sagemaker.aws", - "notebook.af-south-1.sagemaker.aws", - "notebook.ap-east-1.sagemaker.aws", - "notebook.ap-northeast-1.sagemaker.aws", - "notebook.ap-northeast-2.sagemaker.aws", - "notebook.ap-northeast-3.sagemaker.aws", - "notebook.ap-south-1.sagemaker.aws", - "notebook.ap-south-2.sagemaker.aws", - "notebook.ap-southeast-1.sagemaker.aws", - "notebook.ap-southeast-2.sagemaker.aws", - "notebook.ap-southeast-3.sagemaker.aws", - "notebook.ap-southeast-4.sagemaker.aws", - "notebook.ca-central-1.sagemaker.aws", - "notebook-fips.ca-central-1.sagemaker.aws", - "notebook.ca-west-1.sagemaker.aws", - "notebook-fips.ca-west-1.sagemaker.aws", - "notebook.eu-central-1.sagemaker.aws", - "notebook.eu-central-2.sagemaker.aws", - "notebook.eu-north-1.sagemaker.aws", - "notebook.eu-south-1.sagemaker.aws", - "notebook.eu-south-2.sagemaker.aws", - "notebook.eu-west-1.sagemaker.aws", - "notebook.eu-west-2.sagemaker.aws", - "notebook.eu-west-3.sagemaker.aws", - "notebook.il-central-1.sagemaker.aws", - "notebook.me-central-1.sagemaker.aws", - "notebook.me-south-1.sagemaker.aws", - "notebook.sa-east-1.sagemaker.aws", - "notebook.us-east-1.sagemaker.aws", - "notebook-fips.us-east-1.sagemaker.aws", - "notebook.us-east-2.sagemaker.aws", - "notebook-fips.us-east-2.sagemaker.aws", - "notebook.us-gov-east-1.sagemaker.aws", - "notebook-fips.us-gov-east-1.sagemaker.aws", - "notebook.us-gov-west-1.sagemaker.aws", - "notebook-fips.us-gov-west-1.sagemaker.aws", - "notebook.us-west-1.sagemaker.aws", - "notebook-fips.us-west-1.sagemaker.aws", - "notebook.us-west-2.sagemaker.aws", - "notebook-fips.us-west-2.sagemaker.aws", - "notebook.cn-north-1.sagemaker.com.cn", - "notebook.cn-northwest-1.sagemaker.com.cn", - "studio.af-south-1.sagemaker.aws", - "studio.ap-east-1.sagemaker.aws", - "studio.ap-northeast-1.sagemaker.aws", - "studio.ap-northeast-2.sagemaker.aws", - "studio.ap-northeast-3.sagemaker.aws", - "studio.ap-south-1.sagemaker.aws", - "studio.ap-southeast-1.sagemaker.aws", - "studio.ap-southeast-2.sagemaker.aws", - "studio.ap-southeast-3.sagemaker.aws", - "studio.ca-central-1.sagemaker.aws", - "studio.eu-central-1.sagemaker.aws", - "studio.eu-north-1.sagemaker.aws", - "studio.eu-south-1.sagemaker.aws", - "studio.eu-south-2.sagemaker.aws", - "studio.eu-west-1.sagemaker.aws", - "studio.eu-west-2.sagemaker.aws", - "studio.eu-west-3.sagemaker.aws", - "studio.il-central-1.sagemaker.aws", - "studio.me-central-1.sagemaker.aws", - "studio.me-south-1.sagemaker.aws", - "studio.sa-east-1.sagemaker.aws", - "studio.us-east-1.sagemaker.aws", - "studio.us-east-2.sagemaker.aws", - "studio.us-gov-east-1.sagemaker.aws", - "studio-fips.us-gov-east-1.sagemaker.aws", - "studio.us-gov-west-1.sagemaker.aws", - "studio-fips.us-gov-west-1.sagemaker.aws", - "studio.us-west-1.sagemaker.aws", - "studio.us-west-2.sagemaker.aws", - "studio.cn-north-1.sagemaker.com.cn", - "studio.cn-northwest-1.sagemaker.com.cn", - "*.experiments.sagemaker.aws", - "analytics-gateway.ap-northeast-1.amazonaws.com", - "analytics-gateway.ap-northeast-2.amazonaws.com", - "analytics-gateway.ap-south-1.amazonaws.com", - "analytics-gateway.ap-southeast-1.amazonaws.com", - "analytics-gateway.ap-southeast-2.amazonaws.com", - "analytics-gateway.eu-central-1.amazonaws.com", - "analytics-gateway.eu-west-1.amazonaws.com", - "analytics-gateway.us-east-1.amazonaws.com", - "analytics-gateway.us-east-2.amazonaws.com", - "analytics-gateway.us-west-2.amazonaws.com", - "amplifyapp.com", - "*.awsapprunner.com", - "webview-assets.aws-cloud9.af-south-1.amazonaws.com", - "vfs.cloud9.af-south-1.amazonaws.com", - "webview-assets.cloud9.af-south-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-east-1.amazonaws.com", - "vfs.cloud9.ap-east-1.amazonaws.com", - "webview-assets.cloud9.ap-east-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com", - "vfs.cloud9.ap-northeast-1.amazonaws.com", - "webview-assets.cloud9.ap-northeast-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com", - "vfs.cloud9.ap-northeast-2.amazonaws.com", - "webview-assets.cloud9.ap-northeast-2.amazonaws.com", - "webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com", - "vfs.cloud9.ap-northeast-3.amazonaws.com", - "webview-assets.cloud9.ap-northeast-3.amazonaws.com", - "webview-assets.aws-cloud9.ap-south-1.amazonaws.com", - "vfs.cloud9.ap-south-1.amazonaws.com", - "webview-assets.cloud9.ap-south-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com", - "vfs.cloud9.ap-southeast-1.amazonaws.com", - "webview-assets.cloud9.ap-southeast-1.amazonaws.com", - "webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com", - "vfs.cloud9.ap-southeast-2.amazonaws.com", - "webview-assets.cloud9.ap-southeast-2.amazonaws.com", - "webview-assets.aws-cloud9.ca-central-1.amazonaws.com", - "vfs.cloud9.ca-central-1.amazonaws.com", - "webview-assets.cloud9.ca-central-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-central-1.amazonaws.com", - "vfs.cloud9.eu-central-1.amazonaws.com", - "webview-assets.cloud9.eu-central-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-north-1.amazonaws.com", - "vfs.cloud9.eu-north-1.amazonaws.com", - "webview-assets.cloud9.eu-north-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-south-1.amazonaws.com", - "vfs.cloud9.eu-south-1.amazonaws.com", - "webview-assets.cloud9.eu-south-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-west-1.amazonaws.com", - "vfs.cloud9.eu-west-1.amazonaws.com", - "webview-assets.cloud9.eu-west-1.amazonaws.com", - "webview-assets.aws-cloud9.eu-west-2.amazonaws.com", - "vfs.cloud9.eu-west-2.amazonaws.com", - "webview-assets.cloud9.eu-west-2.amazonaws.com", - "webview-assets.aws-cloud9.eu-west-3.amazonaws.com", - "vfs.cloud9.eu-west-3.amazonaws.com", - "webview-assets.cloud9.eu-west-3.amazonaws.com", - "webview-assets.aws-cloud9.il-central-1.amazonaws.com", - "vfs.cloud9.il-central-1.amazonaws.com", - "webview-assets.aws-cloud9.me-south-1.amazonaws.com", - "vfs.cloud9.me-south-1.amazonaws.com", - "webview-assets.cloud9.me-south-1.amazonaws.com", - "webview-assets.aws-cloud9.sa-east-1.amazonaws.com", - "vfs.cloud9.sa-east-1.amazonaws.com", - "webview-assets.cloud9.sa-east-1.amazonaws.com", - "webview-assets.aws-cloud9.us-east-1.amazonaws.com", - "vfs.cloud9.us-east-1.amazonaws.com", - "webview-assets.cloud9.us-east-1.amazonaws.com", - "webview-assets.aws-cloud9.us-east-2.amazonaws.com", - "vfs.cloud9.us-east-2.amazonaws.com", - "webview-assets.cloud9.us-east-2.amazonaws.com", - "webview-assets.aws-cloud9.us-west-1.amazonaws.com", - "vfs.cloud9.us-west-1.amazonaws.com", - "webview-assets.cloud9.us-west-1.amazonaws.com", - "webview-assets.aws-cloud9.us-west-2.amazonaws.com", - "vfs.cloud9.us-west-2.amazonaws.com", - "webview-assets.cloud9.us-west-2.amazonaws.com", - "awsapps.com", - "cn-north-1.eb.amazonaws.com.cn", - "cn-northwest-1.eb.amazonaws.com.cn", - "elasticbeanstalk.com", - "af-south-1.elasticbeanstalk.com", - "ap-east-1.elasticbeanstalk.com", - "ap-northeast-1.elasticbeanstalk.com", - "ap-northeast-2.elasticbeanstalk.com", - "ap-northeast-3.elasticbeanstalk.com", - "ap-south-1.elasticbeanstalk.com", - "ap-southeast-1.elasticbeanstalk.com", - "ap-southeast-2.elasticbeanstalk.com", - "ap-southeast-3.elasticbeanstalk.com", - "ca-central-1.elasticbeanstalk.com", - "eu-central-1.elasticbeanstalk.com", - "eu-north-1.elasticbeanstalk.com", - "eu-south-1.elasticbeanstalk.com", - "eu-west-1.elasticbeanstalk.com", - "eu-west-2.elasticbeanstalk.com", - "eu-west-3.elasticbeanstalk.com", - "il-central-1.elasticbeanstalk.com", - "me-south-1.elasticbeanstalk.com", - "sa-east-1.elasticbeanstalk.com", - "us-east-1.elasticbeanstalk.com", - "us-east-2.elasticbeanstalk.com", - "us-gov-east-1.elasticbeanstalk.com", - "us-gov-west-1.elasticbeanstalk.com", - "us-west-1.elasticbeanstalk.com", - "us-west-2.elasticbeanstalk.com", - "*.elb.amazonaws.com.cn", - "*.elb.amazonaws.com", - "awsglobalaccelerator.com", - "*.private.repost.aws", - "eero.online", - "eero-stage.online", - "apigee.io", - "panel.dev", - "siiites.com", - "appspacehosted.com", - "appspaceusercontent.com", - "appudo.net", - "on-aptible.com", - "f5.si", - "arvanedge.ir", - "user.aseinet.ne.jp", - "gv.vc", - "d.gv.vc", - "user.party.eus", - "pimienta.org", - "poivron.org", - "potager.org", - "sweetpepper.org", - "myasustor.com", - "cdn.prod.atlassian-dev.net", - "translated.page", - "myfritz.link", - "myfritz.net", - "onavstack.net", - "*.awdev.ca", - "*.advisor.ws", - "ecommerce-shop.pl", - "b-data.io", - "balena-devices.com", - "base.ec", - "official.ec", - "buyshop.jp", - "fashionstore.jp", - "handcrafted.jp", - "kawaiishop.jp", - "supersale.jp", - "theshop.jp", - "shopselect.net", - "base.shop", - "beagleboard.io", - "*.beget.app", - "pages.gay", - "bnr.la", - "bitbucket.io", - "blackbaudcdn.net", - "of.je", - "bluebite.io", - "boomla.net", - "boutir.com", - "boxfuse.io", - "square7.ch", - "bplaced.com", - "bplaced.de", - "square7.de", - "bplaced.net", - "square7.net", - "*.s.brave.io", - "shop.brendly.hr", - "shop.brendly.rs", - "browsersafetymark.io", - "radio.am", - "radio.fm", - "uk0.bigv.io", - "dh.bytemark.co.uk", - "vm.bytemark.co.uk", - "cafjs.com", - "canva-apps.cn", - "*.my.canvasite.cn", - "canva-apps.com", - "*.my.canva.site", - "drr.ac", - "uwu.ai", - "carrd.co", - "crd.co", - "ju.mp", - "api.gov.uk", - "cdn77-storage.com", - "rsc.contentproxy9.cz", - "r.cdn77.net", - "cdn77-ssl.net", - "c.cdn77.org", - "rsc.cdn77.org", - "ssl.origin.cdn77-secure.org", - "za.bz", - "br.com", - "cn.com", - "de.com", - "eu.com", - "jpn.com", - "mex.com", - "ru.com", - "sa.com", - "uk.com", - "us.com", - "za.com", - "com.de", - "gb.net", - "hu.net", - "jp.net", - "se.net", - "uk.net", - "ae.org", - "com.se", - "cx.ua", - "discourse.group", - "discourse.team", - "clerk.app", - "clerkstage.app", - "*.lcl.dev", - "*.lclstage.dev", - "*.stg.dev", - "*.stgstage.dev", - "cleverapps.cc", - "*.services.clever-cloud.com", - "cleverapps.io", - "cleverapps.tech", - "clickrising.net", - "cloudns.asia", - "cloudns.be", - "cloud-ip.biz", - "cloudns.biz", - "cloudns.cc", - "cloudns.ch", - "cloudns.cl", - "cloudns.club", - "dnsabr.com", - "ip-ddns.com", - "cloudns.cx", - "cloudns.eu", - "cloudns.in", - "cloudns.info", - "ddns-ip.net", - "dns-cloud.net", - "dns-dynamic.net", - "cloudns.nz", - "cloudns.org", - "ip-dynamic.org", - "cloudns.ph", - "cloudns.pro", - "cloudns.pw", - "cloudns.us", - "c66.me", - "cloud66.ws", - "cloud66.zone", - "jdevcloud.com", - "wpdevcloud.com", - "cloudaccess.host", - "freesite.host", - "cloudaccess.net", - "*.cloudera.site", - "cf-ipfs.com", - "cloudflare-ipfs.com", - "trycloudflare.com", - "pages.dev", - "r2.dev", - "workers.dev", - "cloudflare.net", - "cdn.cloudflare.net", - "cdn.cloudflareanycast.net", - "cdn.cloudflarecn.net", - "cdn.cloudflareglobal.net", - "cust.cloudscale.ch", - "objects.lpg.cloudscale.ch", - "objects.rma.cloudscale.ch", - "wnext.app", - "cnpy.gdn", - "*.otap.co", - "co.ca", - "co.com", - "codeberg.page", - "csb.app", - "preview.csb.app", - "co.nl", - "co.no", - "webhosting.be", - "hosting-cluster.nl", - "ctfcloud.net", - "convex.site", - "ac.ru", - "edu.ru", - "gov.ru", - "int.ru", - "mil.ru", - "test.ru", - "dyn.cosidns.de", - "dnsupdater.de", - "dynamisches-dns.de", - "internet-dns.de", - "l-o-g-i-n.de", - "dynamic-dns.info", - "feste-ip.net", - "knx-server.net", - "static-access.net", - "craft.me", - "realm.cz", - "on.crisp.email", - "*.cryptonomic.net", - "curv.dev", - "cfolks.pl", - "cyon.link", - "cyon.site", - "platform0.app", - "fnwk.site", - "folionetwork.site", - "biz.dk", - "co.dk", - "firm.dk", - "reg.dk", - "store.dk", - "dyndns.dappnode.io", - "builtwithdark.com", - "darklang.io", - "demo.datadetect.com", - "instance.datadetect.com", - "edgestack.me", - "dattolocal.com", - "dattorelay.com", - "dattoweb.com", - "mydatto.com", - "dattolocal.net", - "mydatto.net", - "ddnss.de", - "dyn.ddnss.de", - "dyndns.ddnss.de", - "dyn-ip24.de", - "dyndns1.de", - "home-webserver.de", - "dyn.home-webserver.de", - "myhome-server.de", - "ddnss.org", - "debian.net", - "definima.io", - "definima.net", - "deno.dev", - "deno-staging.dev", - "dedyn.io", - "deta.app", - "deta.dev", - "dfirma.pl", - "dkonto.pl", - "you2.pl", - "ondigitalocean.app", - "*.digitaloceanspaces.com", - "us.kg", - "rss.my.id", - "diher.solutions", - "discordsays.com", - "discordsez.com", - "jozi.biz", - "dnshome.de", - "online.th", - "shop.th", - "drayddns.com", - "shoparena.pl", - "dreamhosters.com", - "durumis.com", - "mydrobo.com", - "drud.io", - "drud.us", - "duckdns.org", - "dy.fi", - "tunk.org", - "dyndns.biz", - "for-better.biz", - "for-more.biz", - "for-some.biz", - "for-the.biz", - "selfip.biz", - "webhop.biz", - "ftpaccess.cc", - "game-server.cc", - "myphotos.cc", - "scrapping.cc", - "blogdns.com", - "cechire.com", - "dnsalias.com", - "dnsdojo.com", - "doesntexist.com", - "dontexist.com", - "doomdns.com", - "dyn-o-saur.com", - "dynalias.com", - "dyndns-at-home.com", - "dyndns-at-work.com", - "dyndns-blog.com", - "dyndns-free.com", - "dyndns-home.com", - "dyndns-ip.com", - "dyndns-mail.com", - "dyndns-office.com", - "dyndns-pics.com", - "dyndns-remote.com", - "dyndns-server.com", - "dyndns-web.com", - "dyndns-wiki.com", - "dyndns-work.com", - "est-a-la-maison.com", - "est-a-la-masion.com", - "est-le-patron.com", - "est-mon-blogueur.com", - "from-ak.com", - "from-al.com", - "from-ar.com", - "from-ca.com", - "from-ct.com", - "from-dc.com", - "from-de.com", - "from-fl.com", - "from-ga.com", - "from-hi.com", - "from-ia.com", - "from-id.com", - "from-il.com", - "from-in.com", - "from-ks.com", - "from-ky.com", - "from-ma.com", - "from-md.com", - "from-mi.com", - "from-mn.com", - "from-mo.com", - "from-ms.com", - "from-mt.com", - "from-nc.com", - "from-nd.com", - "from-ne.com", - "from-nh.com", - "from-nj.com", - "from-nm.com", - "from-nv.com", - "from-oh.com", - "from-ok.com", - "from-or.com", - "from-pa.com", - "from-pr.com", - "from-ri.com", - "from-sc.com", - "from-sd.com", - "from-tn.com", - "from-tx.com", - "from-ut.com", - "from-va.com", - "from-vt.com", - "from-wa.com", - "from-wi.com", - "from-wv.com", - "from-wy.com", - "getmyip.com", - "gotdns.com", - "hobby-site.com", - "homelinux.com", - "homeunix.com", - "iamallama.com", - "is-a-anarchist.com", - "is-a-blogger.com", - "is-a-bookkeeper.com", - "is-a-bulls-fan.com", - "is-a-caterer.com", - "is-a-chef.com", - "is-a-conservative.com", - "is-a-cpa.com", - "is-a-cubicle-slave.com", - "is-a-democrat.com", - "is-a-designer.com", - "is-a-doctor.com", - "is-a-financialadvisor.com", - "is-a-geek.com", - "is-a-green.com", - "is-a-guru.com", - "is-a-hard-worker.com", - "is-a-hunter.com", - "is-a-landscaper.com", - "is-a-lawyer.com", - "is-a-liberal.com", - "is-a-libertarian.com", - "is-a-llama.com", - "is-a-musician.com", - "is-a-nascarfan.com", - "is-a-nurse.com", - "is-a-painter.com", - "is-a-personaltrainer.com", - "is-a-photographer.com", - "is-a-player.com", - "is-a-republican.com", - "is-a-rockstar.com", - "is-a-socialist.com", - "is-a-student.com", - "is-a-teacher.com", - "is-a-techie.com", - "is-a-therapist.com", - "is-an-accountant.com", - "is-an-actor.com", - "is-an-actress.com", - "is-an-anarchist.com", - "is-an-artist.com", - "is-an-engineer.com", - "is-an-entertainer.com", - "is-certified.com", - "is-gone.com", - "is-into-anime.com", - "is-into-cars.com", - "is-into-cartoons.com", - "is-into-games.com", - "is-leet.com", - "is-not-certified.com", - "is-slick.com", - "is-uberleet.com", - "is-with-theband.com", - "isa-geek.com", - "isa-hockeynut.com", - "issmarterthanyou.com", - "likes-pie.com", - "likescandy.com", - "neat-url.com", - "saves-the-whales.com", - "selfip.com", - "sells-for-less.com", - "sells-for-u.com", - "servebbs.com", - "simple-url.com", - "space-to-rent.com", - "teaches-yoga.com", - "writesthisblog.com", - "ath.cx", - "fuettertdasnetz.de", - "isteingeek.de", - "istmein.de", - "lebtimnetz.de", - "leitungsen.de", - "traeumtgerade.de", - "barrel-of-knowledge.info", - "barrell-of-knowledge.info", - "dyndns.info", - "for-our.info", - "groks-the.info", - "groks-this.info", - "here-for-more.info", - "knowsitall.info", - "selfip.info", - "webhop.info", - "forgot.her.name", - "forgot.his.name", - "at-band-camp.net", - "blogdns.net", - "broke-it.net", - "buyshouses.net", - "dnsalias.net", - "dnsdojo.net", - "does-it.net", - "dontexist.net", - "dynalias.net", - "dynathome.net", - "endofinternet.net", - "from-az.net", - "from-co.net", - "from-la.net", - "from-ny.net", - "gets-it.net", - "ham-radio-op.net", - "homeftp.net", - "homeip.net", - "homelinux.net", - "homeunix.net", - "in-the-band.net", - "is-a-chef.net", - "is-a-geek.net", - "isa-geek.net", - "kicks-ass.net", - "office-on-the.net", - "podzone.net", - "scrapper-site.net", - "selfip.net", - "sells-it.net", - "servebbs.net", - "serveftp.net", - "thruhere.net", - "webhop.net", - "merseine.nu", - "mine.nu", - "shacknet.nu", - "blogdns.org", - "blogsite.org", - "boldlygoingnowhere.org", - "dnsalias.org", - "dnsdojo.org", - "doesntexist.org", - "dontexist.org", - "doomdns.org", - "dvrdns.org", - "dynalias.org", - "dyndns.org", - "go.dyndns.org", - "home.dyndns.org", - "endofinternet.org", - "endoftheinternet.org", - "from-me.org", - "game-host.org", - "gotdns.org", - "hobby-site.org", - "homedns.org", - "homeftp.org", - "homelinux.org", - "homeunix.org", - "is-a-bruinsfan.org", - "is-a-candidate.org", - "is-a-celticsfan.org", - "is-a-chef.org", - "is-a-geek.org", - "is-a-knight.org", - "is-a-linux-user.org", - "is-a-patsfan.org", - "is-a-soxfan.org", - "is-found.org", - "is-lost.org", - "is-saved.org", - "is-very-bad.org", - "is-very-evil.org", - "is-very-good.org", - "is-very-nice.org", - "is-very-sweet.org", - "isa-geek.org", - "kicks-ass.org", - "misconfused.org", - "podzone.org", - "readmyblog.org", - "selfip.org", - "sellsyourhome.org", - "servebbs.org", - "serveftp.org", - "servegame.org", - "stuff-4-sale.org", - "webhop.org", - "better-than.tv", - "dyndns.tv", - "on-the-web.tv", - "worse-than.tv", - "is-by.us", - "land-4-sale.us", - "stuff-4-sale.us", - "dyndns.ws", - "mypets.ws", - "ddnsfree.com", - "ddnsgeek.com", - "giize.com", - "gleeze.com", - "kozow.com", - "loseyourip.com", - "ooguy.com", - "theworkpc.com", - "casacam.net", - "dynu.net", - "accesscam.org", - "camdvr.org", - "freeddns.org", - "mywire.org", - "webredirect.org", - "myddns.rocks", - "dynv6.net", - "e4.cz", - "easypanel.app", - "easypanel.host", - "*.ewp.live", - "twmail.cc", - "twmail.net", - "twmail.org", - "mymailer.com.tw", - "url.tw", - "at.emf.camp", - "rt.ht", - "elementor.cloud", - "elementor.cool", - "en-root.fr", - "mytuleap.com", - "tuleap-partners.com", - "encr.app", - "encoreapi.com", - "eu.encoway.cloud", - "eu.org", - "al.eu.org", - "asso.eu.org", - "at.eu.org", - "au.eu.org", - "be.eu.org", - "bg.eu.org", - "ca.eu.org", - "cd.eu.org", - "ch.eu.org", - "cn.eu.org", - "cy.eu.org", - "cz.eu.org", - "de.eu.org", - "dk.eu.org", - "edu.eu.org", - "ee.eu.org", - "es.eu.org", - "fi.eu.org", - "fr.eu.org", - "gr.eu.org", - "hr.eu.org", - "hu.eu.org", - "ie.eu.org", - "il.eu.org", - "in.eu.org", - "int.eu.org", - "is.eu.org", - "it.eu.org", - "jp.eu.org", - "kr.eu.org", - "lt.eu.org", - "lu.eu.org", - "lv.eu.org", - "me.eu.org", - "mk.eu.org", - "mt.eu.org", - "my.eu.org", - "net.eu.org", - "ng.eu.org", - "nl.eu.org", - "no.eu.org", - "nz.eu.org", - "pl.eu.org", - "pt.eu.org", - "ro.eu.org", - "ru.eu.org", - "se.eu.org", - "si.eu.org", - "sk.eu.org", - "tr.eu.org", - "uk.eu.org", - "us.eu.org", - "eurodir.ru", - "eu-1.evennode.com", - "eu-2.evennode.com", - "eu-3.evennode.com", - "eu-4.evennode.com", - "us-1.evennode.com", - "us-2.evennode.com", - "us-3.evennode.com", - "us-4.evennode.com", - "relay.evervault.app", - "relay.evervault.dev", - "expo.app", - "staging.expo.app", - "onfabrica.com", - "ru.net", - "adygeya.ru", - "bashkiria.ru", - "bir.ru", - "cbg.ru", - "com.ru", - "dagestan.ru", - "grozny.ru", - "kalmykia.ru", - "kustanai.ru", - "marine.ru", - "mordovia.ru", - "msk.ru", - "mytis.ru", - "nalchik.ru", - "nov.ru", - "pyatigorsk.ru", - "spb.ru", - "vladikavkaz.ru", - "vladimir.ru", - "abkhazia.su", - "adygeya.su", - "aktyubinsk.su", - "arkhangelsk.su", - "armenia.su", - "ashgabad.su", - "azerbaijan.su", - "balashov.su", - "bashkiria.su", - "bryansk.su", - "bukhara.su", - "chimkent.su", - "dagestan.su", - "east-kazakhstan.su", - "exnet.su", - "georgia.su", - "grozny.su", - "ivanovo.su", - "jambyl.su", - "kalmykia.su", - "kaluga.su", - "karacol.su", - "karaganda.su", - "karelia.su", - "khakassia.su", - "krasnodar.su", - "kurgan.su", - "kustanai.su", - "lenug.su", - "mangyshlak.su", - "mordovia.su", - "msk.su", - "murmansk.su", - "nalchik.su", - "navoi.su", - "north-kazakhstan.su", - "nov.su", - "obninsk.su", - "penza.su", - "pokrovsk.su", - "sochi.su", - "spb.su", - "tashkent.su", - "termez.su", - "togliatti.su", - "troitsk.su", - "tselinograd.su", - "tula.su", - "tuva.su", - "vladikavkaz.su", - "vladimir.su", - "vologda.su", - "channelsdvr.net", - "u.channelsdvr.net", - "edgecompute.app", - "fastly-edge.com", - "fastly-terrarium.com", - "freetls.fastly.net", - "map.fastly.net", - "a.prod.fastly.net", - "global.prod.fastly.net", - "a.ssl.fastly.net", - "b.ssl.fastly.net", - "global.ssl.fastly.net", - "fastlylb.net", - "map.fastlylb.net", - "*.user.fm", - "fastvps-server.com", - "fastvps.host", - "myfast.host", - "fastvps.site", - "myfast.space", - "conn.uk", - "copro.uk", - "hosp.uk", - "fedorainfracloud.org", - "fedorapeople.org", - "cloud.fedoraproject.org", - "app.os.fedoraproject.org", - "app.os.stg.fedoraproject.org", - "mydobiss.com", - "fh-muenster.io", - "filegear.me", - "firebaseapp.com", - "fldrv.com", - "flutterflow.app", - "fly.dev", - "shw.io", - "edgeapp.net", - "forgeblocks.com", - "id.forgerock.io", - "framer.ai", - "framer.app", - "framercanvas.com", - "framer.media", - "framer.photos", - "framer.website", - "framer.wiki", - "0e.vc", - "freebox-os.com", - "freeboxos.com", - "fbx-os.fr", - "fbxos.fr", - "freebox-os.fr", - "freeboxos.fr", - "freedesktop.org", - "freemyip.com", - "*.frusky.de", - "wien.funkfeuer.at", - "daemon.asia", - "dix.asia", - "mydns.bz", - "0am.jp", - "0g0.jp", - "0j0.jp", - "0t0.jp", - "mydns.jp", - "pgw.jp", - "wjg.jp", - "keyword-on.net", - "live-on.net", - "server-on.net", - "mydns.tw", - "mydns.vc", - "*.futurecms.at", - "*.ex.futurecms.at", - "*.in.futurecms.at", - "futurehosting.at", - "futuremailing.at", - "*.ex.ortsinfo.at", - "*.kunden.ortsinfo.at", - "*.statics.cloud", - "aliases121.com", - "campaign.gov.uk", - "service.gov.uk", - "independent-commission.uk", - "independent-inquest.uk", - "independent-inquiry.uk", - "independent-panel.uk", - "independent-review.uk", - "public-inquiry.uk", - "royal-commission.uk", - "gehirn.ne.jp", - "usercontent.jp", - "gentapps.com", - "gentlentapis.com", - "lab.ms", - "cdn-edges.net", - "localcert.net", - "localhostcert.net", - "gsj.bz", - "githubusercontent.com", - "githubpreview.dev", - "github.io", - "gitlab.io", - "gitapp.si", - "gitpage.si", - "glitch.me", - "nog.community", - "co.ro", - "shop.ro", - "lolipop.io", - "angry.jp", - "babyblue.jp", - "babymilk.jp", - "backdrop.jp", - "bambina.jp", - "bitter.jp", - "blush.jp", - "boo.jp", - "boy.jp", - "boyfriend.jp", - "but.jp", - "candypop.jp", - "capoo.jp", - "catfood.jp", - "cheap.jp", - "chicappa.jp", - "chillout.jp", - "chips.jp", - "chowder.jp", - "chu.jp", - "ciao.jp", - "cocotte.jp", - "coolblog.jp", - "cranky.jp", - "cutegirl.jp", - "daa.jp", - "deca.jp", - "deci.jp", - "digick.jp", - "egoism.jp", - "fakefur.jp", - "fem.jp", - "flier.jp", - "floppy.jp", - "fool.jp", - "frenchkiss.jp", - "girlfriend.jp", - "girly.jp", - "gloomy.jp", - "gonna.jp", - "greater.jp", - "hacca.jp", - "heavy.jp", - "her.jp", - "hiho.jp", - "hippy.jp", - "holy.jp", - "hungry.jp", - "icurus.jp", - "itigo.jp", - "jellybean.jp", - "kikirara.jp", - "kill.jp", - "kilo.jp", - "kuron.jp", - "littlestar.jp", - "lolipopmc.jp", - "lolitapunk.jp", - "lomo.jp", - "lovepop.jp", - "lovesick.jp", - "main.jp", - "mods.jp", - "mond.jp", - "mongolian.jp", - "moo.jp", - "namaste.jp", - "nikita.jp", - "nobushi.jp", - "noor.jp", - "oops.jp", - "parallel.jp", - "parasite.jp", - "pecori.jp", - "peewee.jp", - "penne.jp", - "pepper.jp", - "perma.jp", - "pigboat.jp", - "pinoko.jp", - "punyu.jp", - "pupu.jp", - "pussycat.jp", - "pya.jp", - "raindrop.jp", - "readymade.jp", - "sadist.jp", - "schoolbus.jp", - "secret.jp", - "staba.jp", - "stripper.jp", - "sub.jp", - "sunnyday.jp", - "thick.jp", - "tonkotsu.jp", - "under.jp", - "upper.jp", - "velvet.jp", - "verse.jp", - "versus.jp", - "vivian.jp", - "watson.jp", - "weblike.jp", - "whitesnow.jp", - "zombie.jp", - "heteml.net", - "graphic.design", - "goip.de", - "blogspot.ae", - "blogspot.al", - "blogspot.am", - "*.hosted.app", - "*.run.app", - "web.app", - "blogspot.com.ar", - "blogspot.co.at", - "blogspot.com.au", - "blogspot.ba", - "blogspot.be", - "blogspot.bg", - "blogspot.bj", - "blogspot.com.br", - "blogspot.com.by", - "blogspot.ca", - "blogspot.cf", - "blogspot.ch", - "blogspot.cl", - "blogspot.com.co", - "*.0emm.com", - "appspot.com", - "*.r.appspot.com", - "blogspot.com", - "codespot.com", - "googleapis.com", - "googlecode.com", - "pagespeedmobilizer.com", - "withgoogle.com", - "withyoutube.com", - "blogspot.cv", - "blogspot.com.cy", - "blogspot.cz", - "blogspot.de", - "*.gateway.dev", - "blogspot.dk", - "blogspot.com.ee", - "blogspot.com.eg", - "blogspot.com.es", - "blogspot.fi", - "blogspot.fr", - "cloud.goog", - "translate.goog", - "*.usercontent.goog", - "blogspot.gr", - "blogspot.hk", - "blogspot.hr", - "blogspot.hu", - "blogspot.co.id", - "blogspot.ie", - "blogspot.co.il", - "blogspot.in", - "blogspot.is", - "blogspot.it", - "blogspot.jp", - "blogspot.co.ke", - "blogspot.kr", - "blogspot.li", - "blogspot.lt", - "blogspot.lu", - "blogspot.md", - "blogspot.mk", - "blogspot.com.mt", - "blogspot.mx", - "blogspot.my", - "cloudfunctions.net", - "blogspot.com.ng", - "blogspot.nl", - "blogspot.no", - "blogspot.co.nz", - "blogspot.pe", - "blogspot.pt", - "blogspot.qa", - "blogspot.re", - "blogspot.ro", - "blogspot.rs", - "blogspot.ru", - "blogspot.se", - "blogspot.sg", - "blogspot.si", - "blogspot.sk", - "blogspot.sn", - "blogspot.td", - "blogspot.com.tr", - "blogspot.tw", - "blogspot.ug", - "blogspot.co.uk", - "blogspot.com.uy", - "blogspot.vn", - "blogspot.co.za", - "goupile.fr", - "pymnt.uk", - "cloudapps.digital", - "london.cloudapps.digital", - "gov.nl", - "grafana-dev.net", - "grayjayleagues.com", - "günstigbestellen.de", - "günstigliefern.de", - "fin.ci", - "free.hr", - "caa.li", - "ua.rs", - "conf.se", - "häkkinen.fi", - "hrsn.dev", - "hashbang.sh", - "hasura.app", - "hasura-app.io", - "hatenablog.com", - "hatenadiary.com", - "hateblo.jp", - "hatenablog.jp", - "hatenadiary.jp", - "hatenadiary.org", - "pages.it.hs-heilbronn.de", - "pages-research.it.hs-heilbronn.de", - "heiyu.space", - "helioho.st", - "heliohost.us", - "hepforge.org", - "herokuapp.com", - "herokussl.com", - "heyflow.page", - "heyflow.site", - "ravendb.cloud", - "ravendb.community", - "development.run", - "ravendb.run", - "homesklep.pl", - "*.kin.one", - "*.id.pub", - "*.kin.pub", - "secaas.hk", - "hoplix.shop", - "orx.biz", - "biz.gl", - "biz.ng", - "co.biz.ng", - "dl.biz.ng", - "go.biz.ng", - "lg.biz.ng", - "on.biz.ng", - "col.ng", - "firm.ng", - "gen.ng", - "ltd.ng", - "ngo.ng", - "plc.ng", - "ie.ua", - "hostyhosting.io", - "hf.space", - "static.hf.space", - "hypernode.io", - "iobb.net", - "co.cz", - "*.moonscale.io", - "moonscale.net", - "gr.com", - "iki.fi", - "ibxos.it", - "iliadboxos.it", - "smushcdn.com", - "wphostedmail.com", - "wpmucdn.com", - "tempurl.host", - "wpmudev.host", - "dyn-berlin.de", - "in-berlin.de", - "in-brb.de", - "in-butter.de", - "in-dsl.de", - "in-vpn.de", - "in-dsl.net", - "in-vpn.net", - "in-dsl.org", - "in-vpn.org", - "biz.at", - "info.at", - "info.cx", - "ac.leg.br", - "al.leg.br", - "am.leg.br", - "ap.leg.br", - "ba.leg.br", - "ce.leg.br", - "df.leg.br", - "es.leg.br", - "go.leg.br", - "ma.leg.br", - "mg.leg.br", - "ms.leg.br", - "mt.leg.br", - "pa.leg.br", - "pb.leg.br", - "pe.leg.br", - "pi.leg.br", - "pr.leg.br", - "rj.leg.br", - "rn.leg.br", - "ro.leg.br", - "rr.leg.br", - "rs.leg.br", - "sc.leg.br", - "se.leg.br", - "sp.leg.br", - "to.leg.br", - "pixolino.com", - "na4u.ru", - "apps-1and1.com", - "live-website.com", - "apps-1and1.net", - "websitebuilder.online", - "app-ionos.space", - "iopsys.se", - "*.dweb.link", - "ipifony.net", - "ir.md", - "is-a-good.dev", - "is-a.dev", - "iservschule.de", - "mein-iserv.de", - "schulplattform.de", - "schulserver.de", - "test-iserv.de", - "iserv.dev", - "mel.cloudlets.com.au", - "cloud.interhostsolutions.be", - "alp1.ae.flow.ch", - "appengine.flow.ch", - "es-1.axarnet.cloud", - "diadem.cloud", - "vip.jelastic.cloud", - "jele.cloud", - "it1.eur.aruba.jenv-aruba.cloud", - "it1.jenv-aruba.cloud", - "keliweb.cloud", - "cs.keliweb.cloud", - "oxa.cloud", - "tn.oxa.cloud", - "uk.oxa.cloud", - "primetel.cloud", - "uk.primetel.cloud", - "ca.reclaim.cloud", - "uk.reclaim.cloud", - "us.reclaim.cloud", - "ch.trendhosting.cloud", - "de.trendhosting.cloud", - "jele.club", - "dopaas.com", - "paas.hosted-by-previder.com", - "rag-cloud.hosteur.com", - "rag-cloud-ch.hosteur.com", - "jcloud.ik-server.com", - "jcloud-ver-jpc.ik-server.com", - "demo.jelastic.com", - "paas.massivegrid.com", - "jed.wafaicloud.com", - "ryd.wafaicloud.com", - "j.scaleforce.com.cy", - "jelastic.dogado.eu", - "fi.cloudplatform.fi", - "demo.datacenter.fi", - "paas.datacenter.fi", - "jele.host", - "mircloud.host", - "paas.beebyte.io", - "sekd1.beebyteapp.io", - "jele.io", - "jc.neen.it", - "jcloud.kz", - "cloudjiffy.net", - "fra1-de.cloudjiffy.net", - "west1-us.cloudjiffy.net", - "jls-sto1.elastx.net", - "jls-sto2.elastx.net", - "jls-sto3.elastx.net", - "fr-1.paas.massivegrid.net", - "lon-1.paas.massivegrid.net", - "lon-2.paas.massivegrid.net", - "ny-1.paas.massivegrid.net", - "ny-2.paas.massivegrid.net", - "sg-1.paas.massivegrid.net", - "jelastic.saveincloud.net", - "nordeste-idc.saveincloud.net", - "j.scaleforce.net", - "sdscloud.pl", - "unicloud.pl", - "mircloud.ru", - "enscaled.sg", - "jele.site", - "jelastic.team", - "orangecloud.tn", - "j.layershift.co.uk", - "phx.enscaled.us", - "mircloud.us", - "myjino.ru", - "*.hosting.myjino.ru", - "*.landing.myjino.ru", - "*.spectrum.myjino.ru", - "*.vps.myjino.ru", - "jotelulu.cloud", - "webadorsite.com", - "jouwweb.site", - "*.cns.joyent.com", - "*.triton.zone", - "js.org", - "kaas.gg", - "khplay.nl", - "kapsi.fi", - "ezproxy.kuleuven.be", - "kuleuven.cloud", - "keymachine.de", - "kinghost.net", - "uni5.net", - "knightpoint.systems", - "koobin.events", - "webthings.io", - "krellian.net", - "oya.to", - "git-repos.de", - "lcube-server.de", - "svn-repos.de", - "leadpages.co", - "lpages.co", - "lpusercontent.com", - "lelux.site", - "libp2p.direct", - "runcontainers.dev", - "co.business", - "co.education", - "co.events", - "co.financial", - "co.network", - "co.place", - "co.technology", - "linkyard-cloud.ch", - "linkyard.cloud", - "members.linode.com", - "*.nodebalancer.linode.com", - "*.linodeobjects.com", - "ip.linodeusercontent.com", - "we.bs", - "filegear-sg.me", - "ggff.net", - "*.user.localcert.dev", - "lodz.pl", - "pabianice.pl", - "plock.pl", - "sieradz.pl", - "skierniewice.pl", - "zgierz.pl", - "loginline.app", - "loginline.dev", - "loginline.io", - "loginline.services", - "loginline.site", - "lohmus.me", - "servers.run", - "krasnik.pl", - "leczna.pl", - "lubartow.pl", - "lublin.pl", - "poniatowa.pl", - "swidnik.pl", - "glug.org.uk", - "lug.org.uk", - "lugs.org.uk", - "barsy.bg", - "barsy.club", - "barsycenter.com", - "barsyonline.com", - "barsy.de", - "barsy.dev", - "barsy.eu", - "barsy.gr", - "barsy.in", - "barsy.info", - "barsy.io", - "barsy.me", - "barsy.menu", - "barsyonline.menu", - "barsy.mobi", - "barsy.net", - "barsy.online", - "barsy.org", - "barsy.pro", - "barsy.pub", - "barsy.ro", - "barsy.rs", - "barsy.shop", - "barsyonline.shop", - "barsy.site", - "barsy.store", - "barsy.support", - "barsy.uk", - "barsy.co.uk", - "barsyonline.co.uk", - "*.magentosite.cloud", - "hb.cldmail.ru", - "matlab.cloud", - "modelscape.com", - "mwcloudnonprod.com", - "polyspace.com", - "mayfirst.info", - "mayfirst.org", - "mazeplay.com", - "mcdir.me", - "mcdir.ru", - "vps.mcdir.ru", - "mcpre.ru", - "mediatech.by", - "mediatech.dev", - "hra.health", - "medusajs.app", - "miniserver.com", - "memset.net", - "messerli.app", - "atmeta.com", - "apps.fbsbx.com", - "*.cloud.metacentrum.cz", - "custom.metacentrum.cz", - "flt.cloud.muni.cz", - "usr.cloud.muni.cz", - "meteorapp.com", - "eu.meteorapp.com", - "co.pl", - "*.azurecontainer.io", - "azure-api.net", - "azure-mobile.net", - "azureedge.net", - "azurefd.net", - "azurestaticapps.net", - "1.azurestaticapps.net", - "2.azurestaticapps.net", - "3.azurestaticapps.net", - "4.azurestaticapps.net", - "5.azurestaticapps.net", - "6.azurestaticapps.net", - "7.azurestaticapps.net", - "centralus.azurestaticapps.net", - "eastasia.azurestaticapps.net", - "eastus2.azurestaticapps.net", - "westeurope.azurestaticapps.net", - "westus2.azurestaticapps.net", - "azurewebsites.net", - "cloudapp.net", - "trafficmanager.net", - "blob.core.windows.net", - "servicebus.windows.net", - "routingthecloud.com", - "sn.mynetname.net", - "routingthecloud.net", - "routingthecloud.org", - "csx.cc", - "mydbserver.com", - "webspaceconfig.de", - "mittwald.info", - "mittwaldserver.info", - "typo3server.info", - "project.space", - "modx.dev", - "bmoattachments.org", - "net.ru", - "org.ru", - "pp.ru", - "hostedpi.com", - "caracal.mythic-beasts.com", - "customer.mythic-beasts.com", - "fentiger.mythic-beasts.com", - "lynx.mythic-beasts.com", - "ocelot.mythic-beasts.com", - "oncilla.mythic-beasts.com", - "onza.mythic-beasts.com", - "sphinx.mythic-beasts.com", - "vs.mythic-beasts.com", - "x.mythic-beasts.com", - "yali.mythic-beasts.com", - "cust.retrosnub.co.uk", - "ui.nabu.casa", - "cloud.nospamproxy.com", - "netfy.app", - "netlify.app", - "4u.com", - "nfshost.com", - "ipfs.nftstorage.link", - "ngo.us", - "ngrok.app", - "ngrok-free.app", - "ngrok.dev", - "ngrok-free.dev", - "ngrok.io", - "ap.ngrok.io", - "au.ngrok.io", - "eu.ngrok.io", - "in.ngrok.io", - "jp.ngrok.io", - "sa.ngrok.io", - "us.ngrok.io", - "ngrok.pizza", - "ngrok.pro", - "torun.pl", - "nh-serv.co.uk", - "nimsite.uk", - "mmafan.biz", - "myftp.biz", - "no-ip.biz", - "no-ip.ca", - "fantasyleague.cc", - "gotdns.ch", - "3utilities.com", - "blogsyte.com", - "ciscofreak.com", - "damnserver.com", - "ddnsking.com", - "ditchyourip.com", - "dnsiskinky.com", - "dynns.com", - "geekgalaxy.com", - "health-carereform.com", - "homesecuritymac.com", - "homesecuritypc.com", - "myactivedirectory.com", - "mysecuritycamera.com", - "myvnc.com", - "net-freaks.com", - "onthewifi.com", - "point2this.com", - "quicksytes.com", - "securitytactics.com", - "servebeer.com", - "servecounterstrike.com", - "serveexchange.com", - "serveftp.com", - "servegame.com", - "servehalflife.com", - "servehttp.com", - "servehumour.com", - "serveirc.com", - "servemp3.com", - "servep2p.com", - "servepics.com", - "servequake.com", - "servesarcasm.com", - "stufftoread.com", - "unusualperson.com", - "workisboring.com", - "dvrcam.info", - "ilovecollege.info", - "no-ip.info", - "brasilia.me", - "ddns.me", - "dnsfor.me", - "hopto.me", - "loginto.me", - "noip.me", - "webhop.me", - "bounceme.net", - "ddns.net", - "eating-organic.net", - "mydissent.net", - "myeffect.net", - "mymediapc.net", - "mypsx.net", - "mysecuritycamera.net", - "nhlfan.net", - "no-ip.net", - "pgafan.net", - "privatizehealthinsurance.net", - "redirectme.net", - "serveblog.net", - "serveminecraft.net", - "sytes.net", - "cable-modem.org", - "collegefan.org", - "couchpotatofries.org", - "hopto.org", - "mlbfan.org", - "myftp.org", - "mysecuritycamera.org", - "nflfan.org", - "no-ip.org", - "read-books.org", - "ufcfan.org", - "zapto.org", - "no-ip.co.uk", - "golffan.us", - "noip.us", - "pointto.us", - "stage.nodeart.io", - "*.developer.app", - "noop.app", - "*.northflank.app", - "*.build.run", - "*.code.run", - "*.database.run", - "*.migration.run", - "noticeable.news", - "notion.site", - "dnsking.ch", - "mypi.co", - "n4t.co", - "001www.com", - "myiphost.com", - "forumz.info", - "soundcast.me", - "tcp4.me", - "dnsup.net", - "hicam.net", - "now-dns.net", - "ownip.net", - "vpndns.net", - "dynserv.org", - "now-dns.org", - "x443.pw", - "now-dns.top", - "ntdll.top", - "freeddns.us", - "nsupdate.info", - "nerdpol.ovh", - "nyc.mn", - "prvcy.page", - "obl.ong", - "observablehq.cloud", - "static.observableusercontent.com", - "omg.lol", - "cloudycluster.net", - "omniwe.site", - "123webseite.at", - "123website.be", - "simplesite.com.br", - "123website.ch", - "simplesite.com", - "123webseite.de", - "123hjemmeside.dk", - "123miweb.es", - "123kotisivu.fi", - "123siteweb.fr", - "simplesite.gr", - "123homepage.it", - "123website.lu", - "123website.nl", - "123hjemmeside.no", - "service.one", - "simplesite.pl", - "123paginaweb.pt", - "123minsida.se", - "is-a-fullstack.dev", - "is-cool.dev", - "is-not-a.dev", - "localplayer.dev", - "is-local.org", - "opensocial.site", - "opencraft.hosting", - "16-b.it", - "32-b.it", - "64-b.it", - "orsites.com", - "operaunite.com", - "*.customer-oci.com", - "*.oci.customer-oci.com", - "*.ocp.customer-oci.com", - "*.ocs.customer-oci.com", - "*.oraclecloudapps.com", - "*.oraclegovcloudapps.com", - "*.oraclegovcloudapps.uk", - "tech.orange", - "can.re", - "authgear-staging.com", - "authgearapps.com", - "skygearapp.com", - "outsystemscloud.com", - "*.hosting.ovh.net", - "*.webpaas.ovh.net", - "ownprovider.com", - "own.pm", - "*.owo.codes", - "ox.rs", - "oy.lc", - "pgfog.com", - "pagexl.com", - "gotpantheon.com", - "pantheonsite.io", - "*.paywhirl.com", - "*.xmit.co", - "xmit.dev", - "madethis.site", - "srv.us", - "gh.srv.us", - "gl.srv.us", - "lk3.ru", - "mypep.link", - "perspecta.cloud", - "on-web.fr", - "*.upsun.app", - "upsunapp.com", - "ent.platform.sh", - "eu.platform.sh", - "us.platform.sh", - "*.platformsh.site", - "*.tst.site", - "platter-app.com", - "platter-app.dev", - "platterp.us", - "pley.games", - "onporter.run", - "co.bn", - "postman-echo.com", - "pstmn.io", - "mock.pstmn.io", - "httpbin.org", - "prequalifyme.today", - "xen.prgmr.com", - "priv.at", - "protonet.io", - "chirurgiens-dentistes-en-france.fr", - "byen.site", - "pubtls.org", - "pythonanywhere.com", - "eu.pythonanywhere.com", - "qa2.com", - "qcx.io", - "*.sys.qcx.io", - "myqnapcloud.cn", - "alpha-myqnapcloud.com", - "dev-myqnapcloud.com", - "mycloudnas.com", - "mynascloud.com", - "myqnapcloud.com", - "qoto.io", - "qualifioapp.com", - "ladesk.com", - "qbuser.com", - "*.quipelements.com", - "vapor.cloud", - "vaporcloud.io", - "rackmaze.com", - "rackmaze.net", - "cloudsite.builders", - "myradweb.net", - "servername.us", - "web.in", - "in.net", - "myrdbx.io", - "site.rb-hosting.io", - "*.on-rancher.cloud", - "*.on-k3s.io", - "*.on-rio.io", - "ravpage.co.il", - "readthedocs-hosted.com", - "readthedocs.io", - "rhcloud.com", - "instances.spawn.cc", - "onrender.com", - "app.render.com", - "replit.app", - "id.replit.app", - "firewalledreplit.co", - "id.firewalledreplit.co", - "repl.co", - "id.repl.co", - "replit.dev", - "archer.replit.dev", - "bones.replit.dev", - "canary.replit.dev", - "global.replit.dev", - "hacker.replit.dev", - "id.replit.dev", - "janeway.replit.dev", - "kim.replit.dev", - "kira.replit.dev", - "kirk.replit.dev", - "odo.replit.dev", - "paris.replit.dev", - "picard.replit.dev", - "pike.replit.dev", - "prerelease.replit.dev", - "reed.replit.dev", - "riker.replit.dev", - "sisko.replit.dev", - "spock.replit.dev", - "staging.replit.dev", - "sulu.replit.dev", - "tarpit.replit.dev", - "teams.replit.dev", - "tucker.replit.dev", - "wesley.replit.dev", - "worf.replit.dev", - "repl.run", - "resindevice.io", - "devices.resinstaging.io", - "hzc.io", - "adimo.co.uk", - "itcouldbewor.se", - "aus.basketball", - "nz.basketball", - "git-pages.rit.edu", - "rocky.page", - "rub.de", - "ruhr-uni-bochum.de", - "io.noc.ruhr-uni-bochum.de", - "биз.рус", - "ком.рус", - "крым.рус", - "мир.рус", - "мск.рус", - "орг.рус", - "самара.рус", - "сочи.рус", - "спб.рус", - "я.рус", - "ras.ru", - "nyat.app", - "180r.com", - "dojin.com", - "sakuratan.com", - "sakuraweb.com", - "x0.com", - "2-d.jp", - "bona.jp", - "crap.jp", - "daynight.jp", - "eek.jp", - "flop.jp", - "halfmoon.jp", - "jeez.jp", - "matrix.jp", - "mimoza.jp", - "ivory.ne.jp", - "mail-box.ne.jp", - "mints.ne.jp", - "mokuren.ne.jp", - "opal.ne.jp", - "sakura.ne.jp", - "sumomo.ne.jp", - "topaz.ne.jp", - "netgamers.jp", - "nyanta.jp", - "o0o0.jp", - "rdy.jp", - "rgr.jp", - "rulez.jp", - "s3.isk01.sakurastorage.jp", - "s3.isk02.sakurastorage.jp", - "saloon.jp", - "sblo.jp", - "skr.jp", - "tank.jp", - "uh-oh.jp", - "undo.jp", - "rs.webaccel.jp", - "user.webaccel.jp", - "websozai.jp", - "xii.jp", - "squares.net", - "jpn.org", - "kirara.st", - "x0.to", - "from.tv", - "sakura.tv", - "*.builder.code.com", - "*.dev-builder.code.com", - "*.stg-builder.code.com", - "*.001.test.code-builder-stg.platform.salesforce.com", - "*.d.crm.dev", - "*.w.crm.dev", - "*.wa.crm.dev", - "*.wb.crm.dev", - "*.wc.crm.dev", - "*.wd.crm.dev", - "*.we.crm.dev", - "*.wf.crm.dev", - "sandcats.io", - "logoip.com", - "logoip.de", - "fr-par-1.baremetal.scw.cloud", - "fr-par-2.baremetal.scw.cloud", - "nl-ams-1.baremetal.scw.cloud", - "cockpit.fr-par.scw.cloud", - "fnc.fr-par.scw.cloud", - "functions.fnc.fr-par.scw.cloud", - "k8s.fr-par.scw.cloud", - "nodes.k8s.fr-par.scw.cloud", - "s3.fr-par.scw.cloud", - "s3-website.fr-par.scw.cloud", - "whm.fr-par.scw.cloud", - "priv.instances.scw.cloud", - "pub.instances.scw.cloud", - "k8s.scw.cloud", - "cockpit.nl-ams.scw.cloud", - "k8s.nl-ams.scw.cloud", - "nodes.k8s.nl-ams.scw.cloud", - "s3.nl-ams.scw.cloud", - "s3-website.nl-ams.scw.cloud", - "whm.nl-ams.scw.cloud", - "cockpit.pl-waw.scw.cloud", - "k8s.pl-waw.scw.cloud", - "nodes.k8s.pl-waw.scw.cloud", - "s3.pl-waw.scw.cloud", - "s3-website.pl-waw.scw.cloud", - "scalebook.scw.cloud", - "smartlabeling.scw.cloud", - "dedibox.fr", - "schokokeks.net", - "gov.scot", - "service.gov.scot", - "scrysec.com", - "client.scrypted.io", - "firewall-gateway.com", - "firewall-gateway.de", - "my-gateway.de", - "my-router.de", - "spdns.de", - "spdns.eu", - "firewall-gateway.net", - "my-firewall.org", - "myfirewall.org", - "spdns.org", - "seidat.net", - "sellfy.store", - "minisite.ms", - "senseering.net", - "servebolt.cloud", - "biz.ua", - "co.ua", - "pp.ua", - "as.sh.cn", - "sheezy.games", - "shiftedit.io", - "myshopblocks.com", - "myshopify.com", - "shopitsite.com", - "shopware.shop", - "shopware.store", - "mo-siemens.io", - "1kapp.com", - "appchizi.com", - "applinzi.com", - "sinaapp.com", - "vipsinaapp.com", - "siteleaf.net", - "small-web.org", - "aeroport.fr", - "avocat.fr", - "chambagri.fr", - "chirurgiens-dentistes.fr", - "experts-comptables.fr", - "medecin.fr", - "notaires.fr", - "pharmacien.fr", - "port.fr", - "veterinaire.fr", - "vp4.me", - "*.snowflake.app", - "*.privatelink.snowflake.app", - "streamlit.app", - "streamlitapp.com", - "try-snowplow.com", - "mafelo.net", - "playstation-cloud.com", - "srht.site", - "apps.lair.io", - "*.stolos.io", - "spacekit.io", - "ind.mom", - "customer.speedpartner.de", - "myspreadshop.at", - "myspreadshop.com.au", - "myspreadshop.be", - "myspreadshop.ca", - "myspreadshop.ch", - "myspreadshop.com", - "myspreadshop.de", - "myspreadshop.dk", - "myspreadshop.es", - "myspreadshop.fi", - "myspreadshop.fr", - "myspreadshop.ie", - "myspreadshop.it", - "myspreadshop.net", - "myspreadshop.nl", - "myspreadshop.no", - "myspreadshop.pl", - "myspreadshop.se", - "myspreadshop.co.uk", - "w-corp-staticblitz.com", - "w-credentialless-staticblitz.com", - "w-staticblitz.com", - "stackhero-network.com", - "runs.onstackit.cloud", - "stackit.gg", - "stackit.rocks", - "stackit.run", - "stackit.zone", - "musician.io", - "novecore.site", - "api.stdlib.com", - "feedback.ac", - "forms.ac", - "assessments.cx", - "calculators.cx", - "funnels.cx", - "paynow.cx", - "quizzes.cx", - "researched.cx", - "tests.cx", - "surveys.so", - "storebase.store", - "storipress.app", - "storj.farm", - "strapiapp.com", - "media.strapiapp.com", - "vps-host.net", - "atl.jelastic.vps-host.net", - "njs.jelastic.vps-host.net", - "ric.jelastic.vps-host.net", - "streak-link.com", - "streaklinks.com", - "streakusercontent.com", - "soc.srcf.net", - "user.srcf.net", - "utwente.io", - "temp-dns.com", - "supabase.co", - "supabase.in", - "supabase.net", - "syncloud.it", - "dscloud.biz", - "direct.quickconnect.cn", - "dsmynas.com", - "familyds.com", - "diskstation.me", - "dscloud.me", - "i234.me", - "myds.me", - "synology.me", - "dscloud.mobi", - "dsmynas.net", - "familyds.net", - "dsmynas.org", - "familyds.org", - "direct.quickconnect.to", - "vpnplus.to", - "mytabit.com", - "mytabit.co.il", - "tabitorder.co.il", - "taifun-dns.de", - "ts.net", - "*.c.ts.net", - "gda.pl", - "gdansk.pl", - "gdynia.pl", - "med.pl", - "sopot.pl", - "taveusercontent.com", - "p.tawk.email", - "p.tawkto.email", - "site.tb-hosting.com", - "edugit.io", - "s3.teckids.org", - "telebit.app", - "telebit.io", - "*.telebit.xyz", - "*.firenet.ch", - "*.svc.firenet.ch", - "reservd.com", - "thingdustdata.com", - "cust.dev.thingdust.io", - "reservd.dev.thingdust.io", - "cust.disrec.thingdust.io", - "reservd.disrec.thingdust.io", - "cust.prod.thingdust.io", - "cust.testing.thingdust.io", - "reservd.testing.thingdust.io", - "tickets.io", - "arvo.network", - "azimuth.network", - "tlon.network", - "torproject.net", - "pages.torproject.net", - "townnews-staging.com", - "12hp.at", - "2ix.at", - "4lima.at", - "lima-city.at", - "12hp.ch", - "2ix.ch", - "4lima.ch", - "lima-city.ch", - "trafficplex.cloud", - "de.cool", - "12hp.de", - "2ix.de", - "4lima.de", - "lima-city.de", - "1337.pictures", - "clan.rip", - "lima-city.rocks", - "webspace.rocks", - "lima.zone", - "*.transurl.be", - "*.transurl.eu", - "site.transip.me", - "*.transurl.nl", - "tuxfamily.org", - "dd-dns.de", - "dray-dns.de", - "draydns.de", - "dyn-vpn.de", - "dynvpn.de", - "mein-vigor.de", - "my-vigor.de", - "my-wan.de", - "syno-ds.de", - "synology-diskstation.de", - "synology-ds.de", - "diskstation.eu", - "diskstation.org", - "typedream.app", - "pro.typeform.com", - "*.uberspace.de", - "uber.space", - "hk.com", - "inc.hk", - "ltd.hk", - "hk.org", - "it.com", - "unison-services.cloud", - "virtual-user.de", - "virtualuser.de", - "name.pm", - "sch.tf", - "biz.wf", - "sch.wf", - "org.yt", - "rs.ba", - "bielsko.pl", - "upli.io", - "urown.cloud", - "dnsupdate.info", - "us.org", - "v.ua", - "express.val.run", - "web.val.run", - "vercel.app", - "v0.build", - "vercel.dev", - "vusercontent.net", - "now.sh", - "2038.io", - "router.management", - "v-info.info", - "voorloper.cloud", - "*.vultrobjects.com", - "wafflecell.com", - "webflow.io", - "webflowtest.io", - "*.webhare.dev", - "bookonline.app", - "hotelwithflight.com", - "reserve-online.com", - "reserve-online.net", - "cprapid.com", - "pleskns.com", - "wp2.host", - "pdns.page", - "plesk.page", - "wpsquared.site", - "*.wadl.top", - "remotewd.com", - "box.ca", - "pages.wiardweb.com", - "toolforge.org", - "wmcloud.org", - "wmflabs.org", - "wdh.app", - "panel.gg", - "daemon.panel.gg", - "wixsite.com", - "wixstudio.com", - "editorx.io", - "wixstudio.io", - "wix.run", - "messwithdns.com", - "woltlab-demo.com", - "myforum.community", - "community-pro.de", - "diskussionsbereich.de", - "community-pro.net", - "meinforum.net", - "affinitylottery.org.uk", - "raffleentry.org.uk", - "weeklylottery.org.uk", - "wpenginepowered.com", - "js.wpenginepowered.com", - "half.host", - "xnbay.com", - "u2.xnbay.com", - "u2-local.xnbay.com", - "cistron.nl", - "demon.nl", - "xs4all.space", - "yandexcloud.net", - "storage.yandexcloud.net", - "website.yandexcloud.net", - "official.academy", - "yolasite.com", - "yombo.me", - "ynh.fr", - "nohost.me", - "noho.st", - "za.net", - "za.org", - "zap.cloud", - "zeabur.app", - "bss.design", - "basicserver.io", - "virtualserver.io", - "enterprisecloud.nu" -], Q = K.reduce( - (e, s) => { - const c = s.replace(/^(\*\.|\!)/, ""), o = A.toASCII(c), t = s.charAt(0); - if (e.has(o)) - throw new Error(`Multiple rules found for ${s} (${o})`); - return e.set(o, { - rule: s, - suffix: c, - punySuffix: o, - wildcard: t === "*", - exception: t === "!" - }), e; - }, - /* @__PURE__ */ new Map() -), X = (e) => { - const c = A.toASCII(e).split("."); - for (let o = 0; o < c.length; o++) { - const t = c.slice(o).join("."), d = Q.get(t); - if (d) - return d; - } - return null; -}, Y = { - DOMAIN_TOO_SHORT: "Domain name too short.", - DOMAIN_TOO_LONG: "Domain name too long. It should be no more than 255 chars.", - LABEL_STARTS_WITH_DASH: "Domain name label can not start with a dash.", - LABEL_ENDS_WITH_DASH: "Domain name label can not end with a dash.", - LABEL_TOO_LONG: "Domain name label should be at most 63 chars long.", - LABEL_TOO_SHORT: "Domain name label should be at least 1 character long.", - LABEL_INVALID_CHARS: "Domain name label can only contain alphanumeric characters or dashes." -}, Z = (e) => { - const s = A.toASCII(e); - if (s.length < 1) - return "DOMAIN_TOO_SHORT"; - if (s.length > 255) - return "DOMAIN_TOO_LONG"; - const c = s.split("."); - let o; - for (let t = 0; t < c.length; ++t) { - if (o = c[t], !o.length) - return "LABEL_TOO_SHORT"; - if (o.length > 63) - return "LABEL_TOO_LONG"; - if (o.charAt(0) === "-") - return "LABEL_STARTS_WITH_DASH"; - if (o.charAt(o.length - 1) === "-") - return "LABEL_ENDS_WITH_DASH"; - if (!/^[a-z0-9\-_]+$/.test(o)) - return "LABEL_INVALID_CHARS"; - } -}, O = (e) => { - if (typeof e != "string") - throw new TypeError("Domain name must be a string."); - let s = e.slice(0).toLowerCase(); - s.charAt(s.length - 1) === "." && (s = s.slice(0, s.length - 1)); - const c = Z(s); - if (c) - return { - input: e, - error: { - message: Y[c], - code: c - } - }; - const o = { - input: e, - tld: null, - sld: null, - domain: null, - subdomain: null, - listed: !1 - }, t = s.split("."); - if (t[t.length - 1] === "local") - return o; - const d = () => (/xn--/.test(s) && (o.domain && (o.domain = A.toASCII(o.domain)), o.subdomain && (o.subdomain = A.toASCII(o.subdomain))), o), z = X(s); - if (!z) - return t.length < 2 ? o : (o.tld = t.pop(), o.sld = t.pop(), o.domain = [o.sld, o.tld].join("."), t.length && (o.subdomain = t.pop()), d()); - o.listed = !0; - const y = z.suffix.split("."), g = t.slice(0, t.length - y.length); - return z.exception && g.push(y.shift()), o.tld = y.join("."), !g.length || (z.wildcard && (y.unshift(g.pop()), o.tld = y.join(".")), !g.length) || (o.sld = g.pop(), o.domain = [o.sld, o.tld].join("."), g.length && (o.subdomain = g.join("."))), d(); -}, aa = (e) => e && O(e).domain || null, oa = (e) => { - const s = O(e); - return !!(s.domain && s.listed); -}, na = { parse: O, get: aa, isValid: oa }; -export { - na as default, - Y as errorCodes, - aa as get, - oa as isValid, - O as parse -}; diff --git a/test-eol-project/node_modules/psl/dist/psl.umd.cjs b/test-eol-project/node_modules/psl/dist/psl.umd.cjs deleted file mode 100644 index 04de8b0a..00000000 --- a/test-eol-project/node_modules/psl/dist/psl.umd.cjs +++ /dev/null @@ -1 +0,0 @@ -(function(g,A){typeof exports=="object"&&typeof module!="undefined"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(g=typeof globalThis!="undefined"?globalThis:g||self,A(g.psl={}))})(this,function(g){"use strict";function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,T;function G(){if(T)return O;T=1;const e=2147483647,s=36,c=1,o=26,t=38,j=700,x=72,v=128,h="-",Q=/^xn--/,X=/[^\0-\x7F]/,Y=/[\x2E\u3002\uFF0E\uFF61]/g,Z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=s-c,d=Math.floor,L=String.fromCharCode;function f(a){throw new RangeError(Z[a])}function aa(a,i){const m=[];let n=a.length;for(;n--;)m[n]=i(a[n]);return m}function M(a,i){const m=a.split("@");let n="";m.length>1&&(n=m[0]+"@",a=m[1]),a=a.replace(Y,".");const r=a.split("."),p=aa(r,i).join(".");return n+p}function F(a){const i=[];let m=0;const n=a.length;for(;m=55296&&r<=56319&&mString.fromCodePoint(...a),sa=function(a){return a>=48&&a<58?26+(a-48):a>=65&&a<91?a-65:a>=97&&a<123?a-97:s},H=function(a,i){return a+22+75*(a<26)-((i!=0)<<5)},N=function(a,i,m){let n=0;for(a=m?d(a/j):a>>1,a+=d(a/i);a>S*o>>1;n+=s)a=d(a/S);return d(n+(S+1)*a/(a+t))},R=function(a){const i=[],m=a.length;let n=0,r=v,p=x,b=a.lastIndexOf(h);b<0&&(b=0);for(let u=0;u=128&&f("not-basic"),i.push(a.charCodeAt(u));for(let u=b>0?b+1:0;u=m&&f("invalid-input");const y=sa(a.charCodeAt(u++));y>=s&&f("invalid-input"),y>d((e-n)/l)&&f("overflow"),n+=y*l;const q=w<=p?c:w>=p+o?o:w-p;if(yd(e/C)&&f("overflow"),l*=C}const z=i.length+1;p=N(n-k,z,k==0),d(n/z)>e-r&&f("overflow"),r+=d(n/z),n%=z,i.splice(n++,0,r)}return String.fromCodePoint(...i)},P=function(a){const i=[];a=F(a);const m=a.length;let n=v,r=0,p=x;for(const k of a)k<128&&i.push(L(k));const b=i.length;let u=b;for(b&&i.push(h);u=n&&ld((e-r)/z)&&f("overflow"),r+=(k-n)*z,n=k;for(const l of a)if(le&&f("overflow"),l===n){let w=r;for(let y=s;;y+=s){const q=y<=p?c:y>=p+o?o:y-p;if(w{const c=s.replace(/^(\*\.|\!)/,""),o=_.toASCII(c),t=s.charAt(0);if(e.has(o))throw new Error(`Multiple rules found for ${s} (${o})`);return e.set(o,{rule:s,suffix:c,punySuffix:o,wildcard:t==="*",exception:t==="!"}),e},new Map),$=e=>{const c=_.toASCII(e).split(".");for(let o=0;o{const s=_.toASCII(e);if(s.length<1)return"DOMAIN_TOO_SHORT";if(s.length>255)return"DOMAIN_TOO_LONG";const c=s.split(".");let o;for(let t=0;t63)return"LABEL_TOO_LONG";if(o.charAt(0)==="-")return"LABEL_STARTS_WITH_DASH";if(o.charAt(o.length-1)==="-")return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-_]+$/.test(o))return"LABEL_INVALID_CHARS"}},I=e=>{if(typeof e!="string")throw new TypeError("Domain name must be a string.");let s=e.slice(0).toLowerCase();s.charAt(s.length-1)==="."&&(s=s.slice(0,s.length-1));const c=J(s);if(c)return{input:e,error:{message:D[c],code:c}};const o={input:e,tld:null,sld:null,domain:null,subdomain:null,listed:!1},t=s.split(".");if(t[t.length-1]==="local")return o;const j=()=>(/xn--/.test(s)&&(o.domain&&(o.domain=_.toASCII(o.domain)),o.subdomain&&(o.subdomain=_.toASCII(o.subdomain))),o),x=$(s);if(!x)return t.length<2?o:(o.tld=t.pop(),o.sld=t.pop(),o.domain=[o.sld,o.tld].join("."),t.length&&(o.subdomain=t.pop()),j());o.listed=!0;const v=x.suffix.split("."),h=t.slice(0,t.length-v.length);return x.exception&&h.push(v.shift()),o.tld=v.join("."),!h.length||(x.wildcard&&(v.unshift(h.pop()),o.tld=v.join(".")),!h.length)||(o.sld=h.pop(),o.domain=[o.sld,o.tld].join("."),h.length&&(o.subdomain=h.join("."))),j()},E=e=>e&&I(e).domain||null,B=e=>{const s=I(e);return!!(s.domain&&s.listed)},K={parse:I,get:E,isValid:B};g.default=K,g.errorCodes=D,g.get=E,g.isValid=B,g.parse=I,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/test-eol-project/node_modules/psl/index.js b/test-eol-project/node_modules/psl/index.js deleted file mode 100644 index e23601d4..00000000 --- a/test-eol-project/node_modules/psl/index.js +++ /dev/null @@ -1,247 +0,0 @@ -import punycode from 'punycode/punycode.js'; -import rules from './data/rules.js'; - -// -// Parse rules from file. -// -const rulesByPunySuffix = rules.reduce( - (map, rule) => { - const suffix = rule.replace(/^(\*\.|\!)/, ''); - const punySuffix = punycode.toASCII(suffix); - const firstChar = rule.charAt(0); - - if (map.has(punySuffix)) { - throw new Error(`Multiple rules found for ${rule} (${punySuffix})`); - } - - map.set(punySuffix, { - rule, - suffix, - punySuffix, - wildcard: firstChar === '*', - exception: firstChar === '!' - }); - - return map; - }, - new Map(), -); - -// -// Find rule for a given domain. -// -const findRule = (domain) => { - const punyDomain = punycode.toASCII(domain); - const punyDomainChunks = punyDomain.split('.'); - - for (let i = 0; i < punyDomainChunks.length; i++) { - const suffix = punyDomainChunks.slice(i).join('.'); - const matchingRules = rulesByPunySuffix.get(suffix); - if (matchingRules) { - return matchingRules; - } - } - - return null; -}; - -// -// Error codes and messages. -// -export const errorCodes = { - DOMAIN_TOO_SHORT: 'Domain name too short.', - DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', - LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', - LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', - LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', - LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', - LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' -}; - -// -// Validate domain name and throw if not valid. -// -// From wikipedia: -// -// Hostnames are composed of series of labels concatenated with dots, as are all -// domain names. Each label must be between 1 and 63 characters long, and the -// entire hostname (including the delimiting dots) has a maximum of 255 chars. -// -// Allowed chars: -// -// * `a-z` -// * `0-9` -// * `-` but not as a starting or ending character -// * `.` as a separator for the textual portions of a domain name -// -// * http://en.wikipedia.org/wiki/Domain_name -// * http://en.wikipedia.org/wiki/Hostname -// -const validate = (input) => { - // Before we can validate we need to take care of IDNs with unicode chars. - const ascii = punycode.toASCII(input); - - if (ascii.length < 1) { - return 'DOMAIN_TOO_SHORT'; - } - if (ascii.length > 255) { - return 'DOMAIN_TOO_LONG'; - } - - // Check each part's length and allowed chars. - const labels = ascii.split('.'); - let label; - - for (let i = 0; i < labels.length; ++i) { - label = labels[i]; - if (!label.length) { - return 'LABEL_TOO_SHORT'; - } - if (label.length > 63) { - return 'LABEL_TOO_LONG'; - } - if (label.charAt(0) === '-') { - return 'LABEL_STARTS_WITH_DASH'; - } - if (label.charAt(label.length - 1) === '-') { - return 'LABEL_ENDS_WITH_DASH'; - } - if (!/^[a-z0-9\-_]+$/.test(label)) { - return 'LABEL_INVALID_CHARS'; - } - } -}; - -// -// Public API -// - -// -// Parse domain. -// -export const parse = (input) => { - if (typeof input !== 'string') { - throw new TypeError('Domain name must be a string.'); - } - - // Force domain to lowercase. - let domain = input.slice(0).toLowerCase(); - - // Handle FQDN. - // TODO: Simply remove trailing dot? - if (domain.charAt(domain.length - 1) === '.') { - domain = domain.slice(0, domain.length - 1); - } - - // Validate and sanitise input. - const error = validate(domain); - if (error) { - return { - input: input, - error: { - message: errorCodes[error], - code: error - } - }; - } - - const parsed = { - input: input, - tld: null, - sld: null, - domain: null, - subdomain: null, - listed: false - }; - - const domainParts = domain.split('.'); - - // Non-Internet TLD - if (domainParts[domainParts.length - 1] === 'local') { - return parsed; - } - - const handlePunycode = () => { - if (!/xn--/.test(domain)) { - return parsed; - } - if (parsed.domain) { - parsed.domain = punycode.toASCII(parsed.domain); - } - if (parsed.subdomain) { - parsed.subdomain = punycode.toASCII(parsed.subdomain); - } - return parsed; - }; - - const rule = findRule(domain); - - // Unlisted tld. - if (!rule) { - if (domainParts.length < 2) { - return parsed; - } - parsed.tld = domainParts.pop(); - parsed.sld = domainParts.pop(); - parsed.domain = [parsed.sld, parsed.tld].join('.'); - if (domainParts.length) { - parsed.subdomain = domainParts.pop(); - } - - return handlePunycode(); - } - - // At this point we know the public suffix is listed. - parsed.listed = true; - - const tldParts = rule.suffix.split('.'); - const privateParts = domainParts.slice(0, domainParts.length - tldParts.length); - - if (rule.exception) { - privateParts.push(tldParts.shift()); - } - - parsed.tld = tldParts.join('.'); - - if (!privateParts.length) { - return handlePunycode(); - } - - if (rule.wildcard) { - tldParts.unshift(privateParts.pop()); - parsed.tld = tldParts.join('.'); - } - - if (!privateParts.length) { - return handlePunycode(); - } - - parsed.sld = privateParts.pop(); - parsed.domain = [parsed.sld, parsed.tld].join('.'); - - if (privateParts.length) { - parsed.subdomain = privateParts.join('.'); - } - - return handlePunycode(); -}; - -// -// Get domain. -// -export const get = (domain) => { - if (!domain) { - return null; - } - return parse(domain).domain || null; -}; - -// -// Check whether domain belongs to a known public suffix. -// -export const isValid = (domain) => { - const parsed = parse(domain); - return Boolean(parsed.domain && parsed.listed); -}; - -export default { parse, get, isValid }; diff --git a/test-eol-project/node_modules/psl/package.json b/test-eol-project/node_modules/psl/package.json deleted file mode 100644 index e0de4730..00000000 --- a/test-eol-project/node_modules/psl/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "psl", - "version": "1.15.0", - "description": "Domain name parser based on the Public Suffix List", - "repository": { - "type": "git", - "url": "git@github.com:lupomontero/psl.git" - }, - "type": "module", - "main": "./dist/psl.cjs", - "exports": { - ".": { - "import": "./dist/psl.mjs", - "require": "./dist/psl.cjs" - } - }, - "types": "types/index.d.ts", - "scripts": { - "lint": "eslint .", - "test": "mocha test/*.spec.js", - "test:browserstack": "browserstack-node-sdk playwright test", - "watch": "mocha test/*.spec.js --watch", - "update-rules": "./scripts/update-rules.js", - "build": "vite build", - "postbuild": "ln -s ./psl.umd.cjs dist/psl.js && ln -s ./psl.umd.cjs dist/psl.min.js", - "benchmark": "node --experimental-vm-modules --no-warnings benchmark/suite.js", - "changelog": "git log $(git describe --tags --abbrev=0)..HEAD --oneline --format=\"%h %s (%an <%ae>)\"" - }, - "keywords": [ - "publicsuffix", - "publicsuffixlist" - ], - "author": "Lupo Montero (https://lupomontero.com/)", - "funding": "https://github.com/sponsors/lupomontero", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "devDependencies": { - "@eslint/js": "^9.16.0", - "@playwright/test": "^1.49.0", - "@types/eslint__js": "^8.42.3", - "benchmark": "^2.1.4", - "browserstack-node-sdk": "^1.34.27", - "eslint": "^9.16.0", - "mocha": "^10.8.2", - "typescript": "^5.7.2", - "typescript-eslint": "^8.16.0", - "vite": "^6.0.2" - } -} diff --git a/test-eol-project/node_modules/psl/types/index.d.ts b/test-eol-project/node_modules/psl/types/index.d.ts deleted file mode 100644 index 15632c93..00000000 --- a/test-eol-project/node_modules/psl/types/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -// TypeScript Version: 2.4 - -/** - * Result returned when a given domain name was not parsable (not exported) - */ -export type ErrorResult = { - input: string; - error: { - code: T; - message: errorCodes[T]; - }; -} - -/** - * Error codes and descriptions for domain name parsing errors - */ -export const enum errorCodes { - DOMAIN_TOO_SHORT = 'Domain name too short', - DOMAIN_TOO_LONG = 'Domain name too long. It should be no more than 255 chars.', - LABEL_STARTS_WITH_DASH = 'Domain name label can not start with a dash.', - LABEL_ENDS_WITH_DASH = 'Domain name label can not end with a dash.', - LABEL_TOO_LONG = 'Domain name label should be at most 63 chars long.', - LABEL_TOO_SHORT = 'Domain name label should be at least 1 character long.', - LABEL_INVALID_CHARS = 'Domain name label can only contain alphanumeric characters or dashes.' -} - -// Export the browser global variable name additionally to the CJS/AMD exports below -export as namespace psl; - -export type ParsedDomain = { - input: string; - tld: string | null; - sld: string | null; - domain: string | null; - subdomain: string | null; - listed: boolean; -} - -/** - * Parse a domain name and return its components - */ -export function parse(input: string): ParsedDomain | ErrorResult; - -/** - * Get the base domain for full domain name - */ -export function get(domain: string): string | null; - -/** - * Check whether the given domain belongs to a known public suffix - */ -export function isValid(domain: string): boolean; diff --git a/test-eol-project/node_modules/psl/types/test.ts b/test-eol-project/node_modules/psl/types/test.ts deleted file mode 100644 index 072f5249..00000000 --- a/test-eol-project/node_modules/psl/types/test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as psl from 'psl'; -import type { ParsedDomain, ErrorResult, errorCodes } from './index.d.ts'; - -const x = (a: ParsedDomain | ErrorResult) => { - return a; -}; - -console.log(x(psl.parse(''))); - -// $ExpectType string | null -console.log(psl.get('example.com')); - -// $ExpectType boolean -console.log(psl.isValid('example.com')); diff --git a/test-eol-project/node_modules/psl/types/tsconfig.json b/test-eol-project/node_modules/psl/types/tsconfig.json deleted file mode 100644 index 2f1719c4..00000000 --- a/test-eol-project/node_modules/psl/types/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "lib": [ - "es5" - ], - "strict": true, - "noEmit": false, - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - // Expose module under its CJS/AMD name - "baseUrl": ".", - "paths": { - "psl": [ - "./index.d.ts" - ] - } - } -} \ No newline at end of file diff --git a/test-eol-project/node_modules/psl/vite.config.js b/test-eol-project/node_modules/psl/vite.config.js deleted file mode 100644 index 0195416c..00000000 --- a/test-eol-project/node_modules/psl/vite.config.js +++ /dev/null @@ -1,20 +0,0 @@ -import { resolve } from 'node:path'; -import { defineConfig } from 'vite'; - -export default defineConfig({ - build: { - target: 'es2015', - lib: { - entry: resolve(__dirname, 'index.js'), - name: 'psl', - formats: ['es', 'cjs', 'umd'], - fileName: format => ( - format === 'umd' - ? 'psl.umd.cjs' - : format === 'cjs' - ? 'psl.cjs' - : 'psl.mjs' - ), - }, - }, -}); diff --git a/test-eol-project/node_modules/punycode/LICENSE-MIT.txt b/test-eol-project/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/test-eol-project/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/test-eol-project/node_modules/punycode/README.md b/test-eol-project/node_modules/punycode/README.md deleted file mode 100644 index f611016b..00000000 --- a/test-eol-project/node_modules/punycode/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) - -Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). - -This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install punycode --save -``` - -In [Node.js](https://nodejs.org/): - -> ⚠️ Note that userland modules don't hide core modules. -> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. -> Use `require('punycode/')` to import userland modules rather than core modules. - -```js -const punycode = require('punycode/'); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## For maintainers - -### How to publish a new release - -1. On the `main` branch, bump the version number in `package.json`: - - ```sh - npm version patch -m 'Release v%s' - ``` - - Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). - - Note that this produces a Git commit + tag. - -1. Push the release commit and tag: - - ```sh - git push && git push --tags - ``` - - Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/test-eol-project/node_modules/punycode/package.json b/test-eol-project/node_modules/punycode/package.json deleted file mode 100644 index b8b76fc7..00000000 --- a/test-eol-project/node_modules/punycode/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "punycode", - "version": "2.3.1", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "jsnext:main": "punycode.es6.js", - "module": "punycode.es6.js", - "engines": { - "node": ">=6" - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/punycode.js.git" - }, - "bugs": "https://github.com/mathiasbynens/punycode.js/issues", - "files": [ - "LICENSE-MIT.txt", - "punycode.js", - "punycode.es6.js" - ], - "scripts": { - "test": "mocha tests", - "build": "node scripts/prepublish.js" - }, - "devDependencies": { - "codecov": "^3.8.3", - "nyc": "^15.1.0", - "mocha": "^10.2.0" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - } -} diff --git a/test-eol-project/node_modules/punycode/punycode.es6.js b/test-eol-project/node_modules/punycode/punycode.es6.js deleted file mode 100644 index dadece25..00000000 --- a/test-eol-project/node_modules/punycode/punycode.es6.js +++ /dev/null @@ -1,444 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; -export default punycode; diff --git a/test-eol-project/node_modules/punycode/punycode.js b/test-eol-project/node_modules/punycode/punycode.js deleted file mode 100644 index a1ef2519..00000000 --- a/test-eol-project/node_modules/punycode/punycode.js +++ /dev/null @@ -1,443 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -module.exports = punycode; diff --git a/test-eol-project/node_modules/q/CHANGES.md b/test-eol-project/node_modules/q/CHANGES.md deleted file mode 100644 index cd351fdb..00000000 --- a/test-eol-project/node_modules/q/CHANGES.md +++ /dev/null @@ -1,786 +0,0 @@ - -## 1.4.1 - - - Address an issue that prevented Q from being used as a `")' - Response.Output.Write(""); - } -} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx deleted file mode 100644 index 52d2e678..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx +++ /dev/null @@ -1,11 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Redirect.aspx.cs" Inherits="Redirect" %> - - - - - - Untitled Page - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs deleted file mode 100644 index 9e0650bf..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Redirect.aspx.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -public partial class Redirect : Page -{ - protected new void Page_Load(object sender, EventArgs e) - { - Response.Redirect("resultPage.html"); - } -} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop deleted file mode 100644 index fc955f81..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Settings.StyleCop +++ /dev/null @@ -1,759 +0,0 @@ - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config deleted file mode 100644 index 68b648f8..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/Web.Config +++ /dev/null @@ -1,59 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml deleted file mode 100644 index a0f54703..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/actualXhtmlPage.xhtml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Title - - - -

    - Foo -

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html deleted file mode 100644 index 4b34031d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/ajaxy_page.html +++ /dev/null @@ -1,81 +0,0 @@ - - - -
    - - -
    - - Red - Green -
    - -
    - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html deleted file mode 100644 index 1add0db9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/alerts.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Testing Alerts - - - - - -

    Testing Alerts and Stuff

    - -

    This tests alerts: click me

    - -

    This tests alerts: click me

    - -

    Let's make the prompt happen

    - -

    Let's make the prompt with default happen

    - -

    Let's make TWO prompts happen

    - -

    A SLOW alert

    - -

    This is a test of a confirm: - test confirm

    - -

    This is a test of showModalDialog: test dialog

    - -

    This is a test of an alert in an iframe: - -

    - -

    This is a test of an alert in a nested iframe: - -

    - -

    This is a test of an alert open from onload event handler: open new page

    - -

    This is a test of an alert open from onload event handler: open new window

    - -

    This is a test of an alert open from onunload event handler: open new page

    - -

    This is a test of an alert open from onclose event handler: open new window

    - -

    This is a test of an alert open from onclose event handler: open new window

    - -
    -
    -
    - -

    -

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/banner.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/banner.gif deleted file mode 100644 index 3f3435401f878af30930bfb19ee1e340d823e706..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2109 zcmeIx`BxJM0>E+bD*8|&JPjI1kjMrM8g;584s?(K1|8O+jxuP} z0iy5TvQK34$RI0^h!UJ2^Qi1chB)T>?Px z@#9B6!0+zvo}Qkrudkn(nK7HqJb)*Y%SZ{S)oImQwcel~9v;R>j014wYB@zy2#&Bo z7JvgXg-nPDAq*0L0)#*$5(yz8>&edT3|}A|OnR8JY}yh~M7cPD)8O z#O8n;0V0qqZG6_!M9EigM zc`{limWss^F&kuy|0EMjje-un92%5}-z_sW;S1Wm1_^CZQ!tr4m2@f+8Ri zf>21IP=FYy)F>&65}_iRrj=?XilchHUIdG@S}lShAP#CY8o69fQY0m#*f5)i@L&Qa zNJ6TRN@*!dqLh@v37l5YQn?gGQ5c1B92Y?%gTcTD`51+vViZPTT1mIIwkp($rluwl zCW1*A#n9RR`(J^zR)6~M3syF>R=XFvh21S~$h2`_9B8>)@{jX&t9S)rRf@(e=MC^c zOI2y}WseZbjjJs)=6FY`4;Z!OPp$_XX)WMZD@`{xr;ZO8t5v(NTaj}{?#5UeNa%An`r>a+3HRbxBBTjB?HC;WK8teC=K>GA>J=-`281s7BK z{&o5jPq%;n{Qie2$C%PX)(>Zo-a54Yb5GbgbW;|P7*jdwv;>(Bf=`mt-|n5~zpwkH z=S+a=OzKWkj7QRpwVgZha!hBJ+z~8v%}_-L7K{2%p7-NOSDE%@!+Y7Z_-M*nG$``=>8lsa8FB7A1}_BJyA&p+{^nGaeH>5?pXqn0 zS(!Na^ix?T2T={>el6bFU-0DS8n2QXpEZ3YXI*{ligI*8%E(iYF1pldiR);Fquymq zl?O1(E@z_CKZH0d8D6PJW@epeX^3affI>RL7~k&DJ(iGtu$y*GIxPwkR%wUkS6&=k zoW5sYoj>)aB7EIf9_(gV{RWl{1^S+?W$qE~jnv52=Ji6lHyLq(wUun(1O3Z=xB7+3 zINup{(uw^zb1c2jb;2*U(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~o-9Y#$sjTW)5cV; zyAcXZ+o`z15fNOviXaNJ%>~s9v-w~xazGuxG*ST7T0f4W#iiPK3ve(~gj96`Iirwt zkTM9TBKJ0ZXzeI9HQ3dVE>Ar+##$1H=494`n)s?p z){6K$Wids50aNOL*7q7sm!0n(plAz;a0MMn!k@Kum{$5c2x>dD%%2avCF9TmevXYKT||DpmM`4rRz9C}g&YW@{`RMADA1(odJr761t z#a3LY!po z#fvTGWh<3a;VEX-K@Nlwcq*fS527{-q12#*OnpGn6PH>--#{e)ZV0_EcT1orvobc< zZ?&mT8x~V2s1Z&XLM{fioaVS0_44NQm#V$Wrbmo!TC4Vp`O36KaIIEBWHn(6{&4Ax zOB}gCIh%32^QkAz;leg=IT$XkACTES|HCNZhrGNNQj`hE!qg@T;W-#RSxq|(6Z{-3 zj5eyJWBUvEVeBRw>k5sRaY1@HY;m!MMn)m$M8F=q?~Ydqo)xTaaJ=iZ@HpP94s1&h zOm)3*nKUv~XSs#A-*JocOI9zmA?OcnSjq#`xen7Rm8hAaXL^cJmxXQbfx&4;hmcC8 zWYrnF^-8M3?X0az-_{*@w3mv16!Y?eNP8(O-26;O-Q)o`c%%`oob7{9k+%l`yw_vQ zLXz7&=b>7-y0)F|YAoKfZRtlMhQ@7$NeCg-WfD=Oad?|;VY88Jeq{!K<%pzSgnQKL zD|EmIQ2?CqU|vrESSuoi(n*kV#Pvzj7&7Wi1x7W8iZ>)f?}|ayM;bHOwYQWEbni4F z@b(`v-wTU0d!?)s7wqhSO(u zOXoKP-kvwQQ(&N%blank diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html deleted file mode 100644 index f2b1939f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/bodyTypingTest.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - Testing Typing into body - - - - -

    Type Stuff

    - -
    -   -
    - -
    -   -
    - - - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html deleted file mode 100644 index 16fbbe9f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/booleanAttributes.html +++ /dev/null @@ -1,19 +0,0 @@ - - - Elements with boolean attributes - - -
    - - - - - -
    - - -
    - -
    Unwrappable text
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html deleted file mode 100644 index 9192b54a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/childPage.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Depth one child page - - -

    I'm a page in a child directory

    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html deleted file mode 100644 index f52685e0..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/child/grandchild/grandchildPage.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Depth two child page - - -

    I'm a page in a grandchild directory! How cute!

    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html deleted file mode 100644 index 8e0355d9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/clickEventPage.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Testing click events - - - -
    - Click me to view my coordinates -
    - -
    -

     

    -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html deleted file mode 100644 index bd055c7c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_frames.html +++ /dev/null @@ -1,10 +0,0 @@ - - - click frames - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html deleted file mode 100644 index 0ff3900e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_jacker.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - click-jacking - - - -
    -
    Click jacked!
    -
    Click Me
    - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html deleted file mode 100644 index 8a51659b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - -
    -
    -
    -
    -
    - -
    -
    -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html deleted file mode 100644 index 15ac17f9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_out_of_bounds_overflow.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    click me
    -
    - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html deleted file mode 100644 index e84fffa9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_rtl.html +++ /dev/null @@ -1,19 +0,0 @@ - - -RTL test - - - -
    - -
    مفتاح معايير الويب
    - -
    פעילות הבינאום
    - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html deleted file mode 100644 index 22e9319a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_source.html +++ /dev/null @@ -1,18 +0,0 @@ - - - Click Source - - - I go to a target - - - - - - Click Source - - - I go to a target - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html deleted file mode 100644 index 7b749bc0..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_iframe.html +++ /dev/null @@ -1,6 +0,0 @@ - - - click iframe - -Click me - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html deleted file mode 100644 index 60b1ccab..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/click_in_iframe.html +++ /dev/null @@ -1,8 +0,0 @@ - - - click in iframe - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html deleted file mode 100644 index d6f4caf1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_frame.html +++ /dev/null @@ -1 +0,0 @@ -Continue \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html deleted file mode 100644 index cbc16e85..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/issue5237_target.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Target page for issue 5237 - - -

    Test passed

    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html deleted file mode 100644 index 04434364..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/link_that_wraps.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Link that continues on next line - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html deleted file mode 100644 index 245f0385..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page1.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Target Page 1 - - -
    Target Page 1
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html deleted file mode 100644 index 6f9636c5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page2.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Target Page 2 - - -
    Target Page 2
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html deleted file mode 100644 index 87a35f38..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/mapped_page3.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Target Page 3 - - -
    Target Page 3
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html deleted file mode 100644 index 6cfa56ad..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/overlapping_elements.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - An element that disappears on click - - - -

    Hello

    -

    Hello

    -
    -
    -

    Log:

    -

    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html deleted file mode 100644 index 2af62526..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/partially_overlapping_elements.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - An element that disappears on click - - - -

    Hello

    -

    Hello

    -
    -
    -
    -
    -
    -
    -

    Log:

    -

    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html deleted file mode 100644 index 77a9d6d5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/span_that_wraps.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Link that continues on next line - - -
    -
    placeholder
    Span that continues on next line -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html deleted file mode 100644 index 0ed2cbac..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/submitted_page.html +++ /dev/null @@ -1,9 +0,0 @@ - - - -Submitted Successfully! - - -

    Submitted Successfully!

    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html deleted file mode 100644 index 1c0c3d03..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_tests/wrapped_overlapping_elements.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - A wrapped element with overlapped first part - - -
    -
    placeholder
    -
    Over
    - Link that continues on next line -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html deleted file mode 100644 index 568ee77e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -
    -       -
    -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html deleted file mode 100644 index cda990ed..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/click_too_big_in_frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - This page has iframes - - -

    This is the heading

    - - - - -
    -I'm a normal link -
    -I go to an anchor -
    -I open a window with javascript -
    -Click me -
    - -
    -I'm a green link -

    looooooooooong short looooooooooong -

    - -333333 -

    I have a span

    And another span

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html deleted file mode 100644 index e64c599c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/closeable_window.html +++ /dev/null @@ -1,8 +0,0 @@ - - -closeable window - - -This window can be closed by clicking on this. - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html deleted file mode 100644 index df846ad4..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cn-test.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - -
    -
    - - -

    չ2008ƣӿ


    -
    - 882008˻ᵹʱһף찲Ź㳡СͼΪףеݳ » - - ӿġҪһԤ⣬ҪԽһʶ
    -
    -й֮
    -
    -
    - -
    - -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html deleted file mode 100644 index 0d1bfc0a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/colorPage.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - Color Page - - -
    namedColor
    -
    rgb
    -
    rgbpct
    -
    hex
    -
    hex
    -
    hsl
    -
    rgba
    -
    rgba
    -
    hsla
    - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html deleted file mode 100644 index 7a7d5581..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/content-editable.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Testing content editable - - -
    - Why hello
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html deleted file mode 100644 index 7db5b493..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cookies.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Testing cookies - - - - -

    Cookie Mashing

    - .com Click
    - . Click
    - google.com Click
    - .google.com Click
    - 127.0.0.1 Click
    - localhost:3001 Click
    - .google:3001 Click
    - 172.16.12.225 Click
    - 172.16.12.225:port Click
    - Set on a different path - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html deleted file mode 100644 index 7714a48a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_frame.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Welcome Page - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html deleted file mode 100644 index b3143b0d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/element_in_nested_frame.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Welcome Page - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html deleted file mode 100644 index 6f2bcd4f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_element_out_of_view.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Page With Element Out Of View - - -
    Placeholder
    -
    Red box
    -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html deleted file mode 100644 index b07972ab..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_empty_element.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Page With Empty Element - - -
    -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html deleted file mode 100644 index 6cbb2738..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_fixed_element.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Page With Fixed Element - - -
    fixed red box
    -
    Placeholder
    -
    Element at the bottom
    -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html deleted file mode 100644 index 286b04b1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_hidden_element.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Page With Hidden Element - - - -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html deleted file mode 100644 index dc33c718..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_invisible_element.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Page With Invisible Element - - - -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html deleted file mode 100644 index d0090d92..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/page_with_transparent_element.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Page With Transparent Element - - -
    Hidden box
    -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html deleted file mode 100644 index 7b857b9d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/coordinates_tests/simple_page.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Simple Page - - -
    Red box
    -
    Tex after box
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png deleted file mode 100644 index 954e22dbd99e8c6dd7091335599abf2d10bf8003..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEr#)R9Ln2z=UU%d=WFXS=@V?HT z#xG*`>Yvsgk=}99w^d^D^d*@m74oMo<%#FcopJf?u00-~YVKV2wzrI*_R6;UORMea zBFVSEnN~eiVA6V&z`E)YLz5Aok^D)In}Yn=OzDpgR5Wv0XfT8pOkmV{sKAJ-PO9#T zZK}IXj&Q-V!U)!LcB_3K0&C*{ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png deleted file mode 100644 index 64ece5707d91a6edf9fad4bfcce0c4dbcafcf58d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmVbvPcjKS|RKP(6sDcCAB(_QB%0978a<$Ah$!b|E zwn;|HO0i8cQj@~)s!ajF0S002ovPDHLkV1oEp BYH0uf diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png deleted file mode 100644 index abdc01082bf3534eafecc5819d28c9574d44ea89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQY-ImG zFPf9b{J;c_6SHRK%WcbN_hZpM=(Ry;4Rxv2@@2Y=$K57eF$X$=!PC{xWt~$(69B)$ BI)4BF diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png deleted file mode 100644 index 9b383f4d2eab09c0f2a739d6b232c32934bc620b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnour1U*q978O6-yYw{%b*}|_(02F z@qbE9)0CJMo;*v*PWv`Vh2h6EmG8IS-Cm{3U~` zFlmZ}YMcJY=eo?o%*@I?2`NblNeMudl#t?{+tN>ySr~=F{k$>;_x^_y?afmf9pRKH0)6?eSP?3s5hEr>mdKI;Vst E0O;M1& diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png deleted file mode 100644 index 39d5824d6af5456f1e89fc7847ea3599ea5fd815..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3762 zcmb_eYgiKKwx-=Q?Pdi0+w!yaC|_1uvA>yaxz|iX3eBv#HR0ASmSVIKMS&kf`CSAV4g0DJLgPkRO79xj%J<(hH6`bTGj zrr^$JeiHJI?;s&<5pRw-^kj}=E;X0OX+pgz+f5GVt0NQv_gbu0>-8J+F$O>HpW?Lx z+YFO`CV&6VV9fsEwG#js0_-|v*!ujZ*M=jfo457?0Do-z<^}+8bI+qk+W~+$zz%Z& z;L7&@&ns`l8Ofh*WdU0pO%RP^?Xa_h7I}7K#}4Xt`s%-(m-enaPWX$O&- zX~a1aOzn?!r?5wJVBNPJ_o8-(9Fz<_c1LYGxUl(E+Wdx?wkNHH2T%eWq9Kz00h#RB zYKI~=a<9_QqC^n<>hyWlS66waWgyAP#t&TfTWP=Sxa)ukRY%j7WH}(@r=B^W_;b&M zRzPYsb*j^Kou%%`K6VP+dKtR@x~qEHq4rXMxoX-gcSf&->lMY%TMXF!Gw_A)(tp6} z2A%kN3twbr%KyUrrmw24V3d%wzK<-q(M;MTr41}un`P!!xejADEv_CJ{CTif907B& zEP`pDJIZHVgnmxh$E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xB4@+sqdq}xvvBhTngZ(N1LUCS-ei=5sgE-Tbc z7HK+A_O23MP@sUoc?I?*ZB|F)&%us|2O$#G7V$6z zq>G%6!cu7OEf+_#^A=23Hd6Db9-yK*NQ#S+kjJI7 zhLiLz{>zKKtHH>H;B-cALzj`>@+-~?X2aP7ypf9WMf8q0m)wS!Nkf+&R&&zEjFOUx zlq^>v#VAq}=)?dKRMe+010g9O;qAiaTA4dV+==mw%i3Re)DwZ$Wd5CK1m4Ivy&&Ef zO8W!SpcgA>zfTGAE!{IPJMhdZ`T4{K#7ndDT8K2&*jf=J8O>H*iDJ}ZK}z|$C3U62 z$nZhk4v$QIYzMaV+0`B8S!=9RSYzi*QG#tp>ZY|lY_`}A-zI7)(tV$B9G-tC#zt8m zre~pD7oIFkmIAM=s zw+Iili%nSC?yks)t~q4lTlZW(#5^yUV@+^KvIuQzZDO^*TBz!j#nX%*uiW|{x9q0w diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png deleted file mode 100644 index f1273672d253263b7564e9e21d69d7d9d0b337d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l%l7LV~E7mxPQ=F85a&M@g_{ d|GeK{$Y5lo%PMu^>wln`44$rjF6*2UngE4^EGqy2 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png deleted file mode 100644 index b273ff111d219c9b9a8b96d57683d0075fb7871a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNk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w8a3G`nTcXVNL6{B7Hj@i& zbVB{;ApEtHk76q08DJ48dSxd$C(;$K6=FpU<~l9pVoT9arW^Vu{%Bcn4`eIpkOVC| z$)AKYG_`ypM{0@BUb3^9lqi_c?ONH|4UJMJWDowMVjacycX7}9g={O7swOB+{;+?; zjBo!9?+nd)ie#x5IbFW-zBOo0c4q@9wGVt5;pNt`=-~Zgcw#*`m($6ibxtZ`H=e=} zF#GZ~5$%AUn};8U#tRem0J(JTR}d4vR(dgK2ML~lZsPhayJ2h1%sD4FVst| zKF)+@`iNzLRjg4=K8@**0=5cE>%?FDc({I^+g9USk<8$&^qD~@%W0i4b|yMG*p4`N zh}I!ltTRI8Ex$+@V{02Br%xq#O?UlhO{r8WsaZnZCZq0MK9%AXU%MDLT;3=0A9(BV z9VxxxJd7jo$hw3q;3o?yBLmA=azBUrd9>-<_ANs0n3?-Ic*6&ytb@H~?0E(*d>T5n z-HiH2jsDf6uWhID%#n>SzOqrFCPDfUcu5QPd?<(=w6pv1BE#nsxS{n!UnC9qAha1< z;3cpZ9A-e$+Y)%b;w@!!YRA9p%Kf9IHGGg^{+p`mh;q8i7}&e@V3EQaMsItEMS&=X plT@$;k0WcB_jb;cn%_Idz4HO$QU*abf4}+wi?e96N>fbq{{i|W0@(ln diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png deleted file mode 100644 index a641a371afa0fbb08ba599dc7ddf14b9bfc3c84f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~Gmw z<@?HsG!Qg3zaV+-xQ3ldtad!U<6iGz_enGH*2akP_r)o1D&8p^5M)_c8IIj6Wy*7HJo&CBLuo~nj>(63pZzO(Vv^ZuB3 zMYigjkwA;F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KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@e{{5C=l}o! diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png deleted file mode 100644 index 85e63e9f604ce042d59eb06a8428eeb7cb7896c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~GmC-Ajq!3AfU8Dx90^_ zp3}MKjJzYC+`T(&egFXQ#9Ek{*oVAaa!zrZtmlRFnwQPRJXH<%pkK2*eP`pT=lwD7 zifq+4BY_rUTa+U|2#&?i7>PVvD?7R4ZfOLPT{e9G~G!Ls3s8JtQE`jMM9wl2V9&Q+K2DHW0M+uQmEr%nYJ^7cK?uIpU-)=wn71ZZ-=@ar0;3^AY z5+TI{2b(e%t{2PZ^HKF*vu@+Xr&BAc@2BC4 z_vCgww#i=)ea5Vo$glEEVBBg_VPBj!)OO>)f@}#dg6ULOeC>LBHz<;*5Y;YfE0lNx zg{N+4@lO~ozxpF69qV@VOGnc248Iuag4C1T)P^(hWkpP!{h!JekX}m^Q#b2B4f1oT zIjsGz)4}-$rQ*-tSuc%qG>%<4xM#E& zN)7lRK~^2VdiloY4>;#}A!yHOAXEmEi^+eA#05pawGXs>!z)gSoDuI#>bRCq-qjJe zZ)r=A`*EMX6+)~er1kdv1L^)0-PsAEM7JF$O6G8>496$24lkOSR^RTfUuIz%iSfn5b-t!##cs7sQI);gdAvqmn_v|%I9k;fCPl0Z)R1+hNQONJN zH%3jT9sOq*a`LF*MiY=zlSSQZ;{_FL9M07A=In+O!~wR}=bzGEQpk2!Vc0p)qKAH? zOk{(%06W#)DdICQ_S%Q@<0Y+!?9%#$gWJ%)EO->^YZP{<`oB4~9xh zL9-0*c4@B#O2ylY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&vbDb7)v8CuI(+zzSf3z&P2eOrPNP?D~ zf zn0@)0h;~5F&BG5vOFU!=woW&ZSl~nrs{?1w>nWfW_dnpTd z4qvLDYJ*ft>Sp%M(^_xCZpNBnc66JX}A|ZL9IENM`U>`ph7d<+RQiI}@E8Y)70s zMC*_&))}GlmR}@{v9*nm)29-=rn`Q$rc^4G)GVQHlTr6BpGxtHuU(8AF7Ffh54?5w zj+EYT9>x)PWL-iQ@RNmT?R+|c@=FOmj)5Za6_ z@DkVy4l^L>Z3#SI@s_eVwd3D)<^Ivq8a~J{|4mhOL^<7M4D8){ut;GIqqn`oqCk|x pNh;Wa$C0(mdpqYz&F>xK-uVD=DT5%Jzh8ZT#aXmjr70%*{{RacS`YvL diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png deleted file mode 100644 index e117effa3dca24e7978cfc5f8b967f661e81044f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcwz5Nh&g=McJ3E!;CE1E0ryV5Ro;>nvtvt zk&I==Xd;cVGZ@>q_xtnx{1u%7-D)N|5YqOB>i;(bZ#o62{J2Y9&^D3~R^$o+X? zwbxAEIb)xwCwK3TSR4QVym6N1rVgPmmt0caryBUceHP_&u}{?^Jn7f0PT$#h>UDqI zr!q(F&1jJ2_!jxdAB<)7H$foI*2zuncvu;;$SoU7br=AiJ@4=BC4vNO>DS`&UIB=K z;2)0F*t^FBvVfPuT4FVMSwUw%Xksjyl+;#*DDy%=ocFOyzDLvLR(`zCSOuJ=?FWYn z5ZD!UaoF>-$@=Vt?a&;UQYM$Oqe0ZB?Je?8ZnMxDe&uzzs*zlHd)V58nfJPc8S^({_4bj5HQ_B&EXHWj6wx@B;!mr04b_Mx)UFL)W7`V!c zpMp#C!a!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fD~6VCk0fjO%QwLJ7k00RH*%I8cCqF542VzP^;`OU-_?=< zbV}OoQE)HqV`|)X5+WbgSxGWH>t+7-O;(l~Z+FJJ)sygu^+eF01#Suj+pnAcw!s>p z$-xF}c>7t9X6H$^V9hvT5H{jKv+=zzWHA0pgw8e5fZpm9vIphVq3%S4*N3%&jsY^Q zK%sSPuj=?d{ATs0o0y6#0w3%YT^@-_sTuTUwI(Q{;l3KjeAbVk#Wmi%PDxm`zoqQ~ z((<-}*FSP%5gt7uI3t1&75ne{@1^bpdW1;MMGNkSr~UAuDbB4+VQi|x(gdO^zin_) zncfs2hj8xdiiy)@vVkfkItLKvsGtJhrTb0T~tFl4Q3J!flauS==b& z6Bm!g%dDvlCf(St$kVofvH90|9yl-gmvRvcKS&Ye9DdoTK@2m}iSvC{3m%4E0 z@TJD7c1V?!URM7+t?f3)%{X(6JXg~A9TvGQyX6n(^Yt0NX;>vDPcr~mICPooLWA_` z<1A>FuXr|C)dtDr*PQt%Xs5WePWUB&gBj$zZ#BIY%?jDdpbSA-PV0`dGf^oa_Jp}Z zlrGV7oe`#B^+nPIQ`ZDJeJas=ru#=*YL#+n?Go}f33>1GsZ{TTy2bdBihj}mz*mp! zOzn%{WgLM=*CpiuKUs*GnHa{B$2siJqfNi|Z;|rH%stM*8b26kAMCYY&NHwPGtlYn z7UVx_^sgR$Z8x27foS63FCPt|gtcG_ zy#@C|!VQV~TY}G5e57qp?F4jRxqq~@h6^?-cvD>ySwVLl2m7=gERtEn>Fw_@ND%pO oiVC*mbz<%I+0K1Z`+LWvZ$3~$+A!Gm?^hpSc@||}WrmLVKLvuzv;Y7A diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css deleted file mode 100644 index 1706e220..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css +++ /dev/null @@ -1,573 +0,0 @@ -/* - * jQuery UI CSS Framework 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* - * jQuery UI Resizable 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/* - * jQuery UI Accordion 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/* - * jQuery UI Autocomplete 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.10 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/* - * jQuery UI Button 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/* - * jQuery UI Dialog 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* - * jQuery UI Slider 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* - * jQuery UI Datepicker 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* - * jQuery UI Progressbar 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html deleted file mode 100644 index c3b99648..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform.html +++ /dev/null @@ -1,61 +0,0 @@ - - -
    -You shouldn't see anything other than this sentence on the page -
    -
    - I have a hidden child -
    - I am a hidden child -
    -
    -
    - I have a hidden child -
    - I am a hidden child -
    -
    -
    I am a hidden element
    -
    I am a hidden element
    diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html deleted file mode 100644 index 602924bf..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/cssTransform2.html +++ /dev/null @@ -1,20 +0,0 @@ - - -
    -
    -
    -
    -
    -
    -
    I am not a hidden element
    diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html deleted file mode 100644 index a15fc479..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/document_write_in_onload.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Document Write In Onload - - - -

    hello world

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html deleted file mode 100644 index 0b2ee9a2..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropInsideScrolledDiv.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - -
    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html deleted file mode 100644 index fdee16b0..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragAndDropTest.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - -
    -
    -"Hi there -
    -
    -
    -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html deleted file mode 100644 index ecb25625..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dragDropOverflow.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -
    -
    -
    -
    -
    12am
    -
    1am
    -
    2am
    -
    3am
    -
    4am
    -
    5am
    -
    6am
    -
    7am
    -
    8am
    -
    9am
    -
    10am
    -
    11am
    -
    12pm
    -
    1pm
    -
    2pm
    -
    3pm
    -
    4pm
    -
    5pm
    -
    6pm
    -
    7pm
    -
    8pm
    -
    9pm
    -
    10pm
    -
    11pm
    -
    -
    -
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html deleted file mode 100644 index f7e0dcac..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/draggableLists.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - jQuery UI Sortable - Connect lists - - - - - - - - - -
    -
      -
    • LeftItem 1
    • -
    • LeftItem 2
    • -
    • LeftItem 3
    • -
    • LeftItem 4
    • -
    • LeftItem 5
    • -
    - -
      -
    • RightItem 1
    • -
    • RightItem 2
    • -
    • RightItem 3
    • -
    • RightItem 4
    • -
    • RightItem 5
    • -
    - -
    - -
    -
    -

    Nothing happened.

    -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html deleted file mode 100644 index fc850ac9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/droppableItems.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - jQuery UI Droppable - Default Demo - - - - - - - -
    - -
    -

    Drag me to my target

    -
    - -
    -

    Drop here

    -
    - -
    -

    start

    -
    - -
    - -
    - -

    Taken from the JQuery demo.

    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html deleted file mode 100644 index b9e60678..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamic.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html deleted file mode 100644 index ed7c7ed2..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/dynamicallyModifiedPage.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Delayed remove of an element - - - - - -
    - -
    -

    element

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html deleted file mode 100644 index 78fb9020..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/errors.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/jetpack-sample.xpi b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/jetpack-sample.xpi deleted file mode 100644 index 84d6493dd4f56572a488dc06cf841d9eb2b92d11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7289 zcmai31ymf%w#6a1yK5i;1`QJ2ZSdd_+Z-F(Ro9%gXVz{N1$YE}7#J877d67_^68YX?`5 zv7H^8ievL(tVb67 z6QwDlj{ED3!vn{fR_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1_R zMFj8aM_#aGW?kY$+ouIXtN@Me^v%AUgtrjNm*2szXc#OJKkHzn8t%_Q85~C51Y`8_ zq^$wsqjldkhO}*6T)6C8D)M&mR1{$0@ZtaW8A(*{dcNI!hgEzkG+rB7Yleu^)HY8*TNr%{?lcD?0rN&Y{9=sf7JZ%>HfRR z{s-@2y1=Ce=AS+H-^|CDzb^DqnSWtlZ2e(Je+%5-@gBGS7xu+42>#6bvu^+OX@4;u zuaC<83;SXs|0Ba6s`|gPJSzDw?2EbmCCk4F^xr+sqq6_PzF67crTOcM{=3ruN|hhD p`TwQ*r|$n=+<#ZW-x(>0{<|isC?Fy|Mxj4^@Ze!!RQ|Cw{|5j(nlu0a diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/sample.xpi b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/sample.xpi deleted file mode 100644 index 062f9a1722450df325576503b0722dcdca842141..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1551 zcmWIWW@Zs#U|`^2kSY*#Eoi*G+6lz$0pb~u38{RaY;OWhNCP@i2+4%}vecrS#7e!aVz^mY z{FB@7n9XD;(E9$b=uTB`(+%k_mxkRs)FuAk;f|!Q!a1FrD`KzwzvmgABW@*7!E=B1 z_aZ))nr(aul}@L8Ul2uS|q2=Xrb0qT(mM}rFiSK;2Z2kg^wpKS@k-!?5F#A^*!rZ z#V6+q@9Ozp<@P%&eE*X5xeSb@@A+bnNY;7IjpI5~c1CjYyhSQ|?afv%v$!`i(fWb> zq9wVKY})tTn_Bq=d)CVrng>3uWkv*27%-3=9oUa43~vk9FN% zZ@$9{JTBkoF#TjG+r7474y$XJ(_#M^W($|=cc01nGS4J=nzrlTr)mpRxczGmJes08 z*~R|Llt`U7d#{UMteiLFl>U(y8@KfG$({6m?l${@{k_0x z%elg<^Zx&@I``9gS6=1Ax~7mdBHH<8U-z08UYdS(^KDM2wR@Vcg*FvlHo2@eXIfEz zdZA3R{Q<{@CwlI$G)!_Q1_-}DqH;jDXL|e^jTMQ^_xlY#$jzxZQn*|HZo?^+)g|VQ z-rG~xhR5l;8YOTFdtF}SFo$be^CjlAfCrqn1zjsc4>UJ1v8?|2aB=?BN0T#Vw!3<6 zUw-lU?$ldzpDV6^mMI>^yQp01)un`qGg(%7d&VS7=TCE$*H&n}c=qDX*Q=X~B&uyA z_x2?14e0Jld+%~uswa7eb(yr*_XYB+S0zYpW#4;lkMzSlj!)8?mdgM7$&}jYA868F zB$8k2uz5n8Nn3@W-s1W8C*#bX`RwUc)Nh-jpS4}`R^P80yS?^?&u7_M-n-)?|9}4% z(MgZqy;nP@AK=Z%B*%=aRFME@YG8CRENKKWG0GTLNEw3`TM$EWl@Aa@85jf@-a2-J z4272#K+`~_1y<8=l@-WNJd0!+a>+s1T+Hl+Z0;vu2*6wkGZ&oMfChsy8y*K^rg>z8 gw*hkjN)7-Th$Zz0c(byBf}a%#mjc}q!UEy}0BE8O*Z=?k diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/webextension.xpi b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/firefox/webextension.xpi deleted file mode 100644 index 34b0ae3913f78f6d184a3114cd2fc91561a32105..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4692 zcmZ`-by!sWwjR1c35S%DX6TRx=^m7BBot&oT4ZRD24N&*2th&wM1-NFB!nRbB&Aat z=^WyW-*?aP9`ASee%5dAXFqGL{k|*ySPQI;gG&tn00;q2O0TpO+NSx5$N+%HHvoWN zUv*Utl|Y($YJw2==gzLKb^@MWb~7gacVBH!<;eA!cFo%EQhwd-V~H2Pe@9zo(sek3 z-(K>ju!H`+IEUWmMQQra9(0o4GxvuAPcisoc%R59o%S z)n?RY9YDHE3b#t9F6dO6?-|9NaFiX^pj4t#t1ULAty-&xD>#~k5tk(x)=K9+@+5?O z2XAdKiVjRji>(x*uWrMQ!ZE#e3Qd;LV+ARMD}rnZ#X8!uLa=cCut?}3Do1{v9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ium-webdriver/lib/test/data/fixedFooterNoScroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html deleted file mode 100644 index ca65d1fe..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScroll.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - Fixed footer with no scrollbar - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html deleted file mode 100644 index 2593bf35..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/fixedFooterNoScrollQuirksMode.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Fixed footer with no scrollbar - - -
    -
    - Click me -
    -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html deleted file mode 100644 index 45ae2b7d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formPage.html +++ /dev/null @@ -1,175 +0,0 @@ - - - We Leave From Here - - - - -There should be a form here: - -
    - - - -
    - -
    - -
    - -
    - Here's a checkbox: - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - - Cheese
    - Peas
    - Cheese and peas
    - Not a sausage
    - Not another sausage - - - -

    I like cheese

    - - - Cumberland sausage -
    - -
    - - - - - - - - -
    - -
    - - - - - - - -
    - -
    - - - - - - - -
    - - -
    -
    - -
    - -
    - - -
    -

    - - - -

    -
    - -
    - - - -
    -

    - -

    -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html deleted file mode 100644 index 4890c08e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/formSelectionPage.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - Testing Typing into body - - - - -

    Type Stuff

    - -
    -   -
    - -
    - -
    - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html deleted file mode 100644 index 30231439..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/form_handling_js_submit.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Form with JS action - - -
    - -
    - -

    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html deleted file mode 100644 index 3e62e455..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framePage3.html +++ /dev/null @@ -1,7 +0,0 @@ - - - inner - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html deleted file mode 100644 index 3eb3bf47..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollChild.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Child frame - - -

    This is a scrolling frame test

    -
    - - - - - - - - - - - - - -
    First row
    Second row
    Third row
    Fourth row
    -
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html deleted file mode 100644 index b7fb8f24..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollPage.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Welcome Page - - -
    - -
    -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html deleted file mode 100644 index 8fccb6d3..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameScrollParent.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome Page - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html deleted file mode 100644 index 1e0dc870..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameWithAnimals.html +++ /dev/null @@ -1,11 +0,0 @@ - - - This page has iframes - - -

    This is the heading

    - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html deleted file mode 100644 index 57d47d84..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/bug4876_iframe.html +++ /dev/null @@ -1,9 +0,0 @@ - - - -
    - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html deleted file mode 100644 index 9c27e04c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Deleting frame: main page - - - - -
    - - -
    -
    - -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html deleted file mode 100644 index e4b9723e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Deleting frame: iframe - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html deleted file mode 100644 index 47764eb3..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html +++ /dev/null @@ -1,7 +0,0 @@ - - - Deleting frame: iframe 2 - - -
    Added back
    - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html deleted file mode 100644 index 039c5f21..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/frameset.html +++ /dev/null @@ -1,14 +0,0 @@ - - - Unique title - - - - - - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html deleted file mode 100644 index 4ea35ff7..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage2.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html deleted file mode 100644 index 42a93007..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/framesetPage3.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html deleted file mode 100644 index e4ca97ab..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/globalscope.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - Global scope - - - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html deleted file mode 100644 index 0e8097e9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden.html +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html deleted file mode 100644 index f0f9fe5b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/blue.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/blue.jpg deleted file mode 100644 index 8ea27c42faa7b5e56c43d3db317d5e4ecf1cb613..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbG-5DfXkcJaWSGJLB!991Nd^WT5CM{5U@~s$UwQg1|Kd4YZgp?Ix92y1 s+ar%@&pMaAI<@T`_wi3Y*T3~X|8?&BKYkvr_9KfvcKB$ivocr%04xP0fB*mh diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js deleted file mode 100644 index c6333be8..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/database.js +++ /dev/null @@ -1,84 +0,0 @@ -var database={}; -database.db={}; - -database.onError = function(tx, e) { - var log = document.createElement('div'); - log.setAttribute('name','error'); - log.setAttribute('style','background-color:red'); - log.innerText = e.message; - document.getElementById('logs').appendChild(log); -} - -database.onSuccess = function(tx, r) { - if (r.rows.length) { - var ol; - for (var i = 0; i < r.rows.length; i++) { - ol = document.createElement('ol'); - ol.innerHTML = r.rows.item(i).ID + ": " + r.rows.item(i).docname + " (" + r.rows.item(i).created + ")"; - document.getElementById('logs').appendChild(ol); - } - - } -} - -database.open=function(){ - database.db=openDatabase('HTML5', '1.0', 'Offline document storage', 100*1024); -} - -database.create=function(){ - database.db.transaction(function(tx) { - tx.executeSql("CREATE TABLE IF NOT EXISTS docs(ID INTEGER PRIMARY KEY ASC, docname TEXT, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP)", - [], - database.onSuccess, - database.onError); - });} - -database.add = function(message) { - database.db.transaction(function(tx){ - tx.executeSql("INSERT INTO docs(docname) VALUES (?)", - [message], database.onSuccess, database.onError); - }); -} - -database.selectAll = function() { - database.db.transaction(function(tx) { - tx.executeSql("SELECT * FROM docs", [], database.onSuccess, - database.onError); - }); -} - -database.onDeleteAllSuccess = function(tx, r) { - var doc = document.documentElement; - var db_completed = document.createElement("div"); - db_completed.setAttribute("id", "db_completed"); - db_completed.innerText = "db operation completed"; - doc.appendChild(db_completed); -} - -database.deleteAll = function() { - database.db.transaction(function(tx) { - tx.executeSql("delete from docs", [], database.onDeleteAllSuccess, - database.onError); - }); -} - -var log = document.createElement('div'); -log.setAttribute('name','notice'); -log.setAttribute('style','background-color:yellow'); -log.innerText = typeof window.openDatabase == "function" ? "Web Database is supported." : "Web Database is not supported."; -document.getElementById('logs').appendChild(log); - -try { - database.open(); - database.create(); - database.add('Doc 1'); - database.add('Doc 2'); - database.selectAll(); - database.deleteAll(); -} catch(error) { - var log = document.createElement('div'); - log.setAttribute('name','critical'); - log.setAttribute('style','background-color:pink'); - log.innerText = error; - document.getElementById('logs').appendChild(log); -} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js deleted file mode 100644 index f07af148..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/geolocation.js +++ /dev/null @@ -1,18 +0,0 @@ -function success(position) { - var message = document.getElementById("status"); - message.innerHTML =""; - message.innerHTML += "

    Longitude: " + position.coords.longitude + "

    "; - message.innerHTML += "

    Latitude: " + position.coords.latitude + "

    "; - message.innerHTML += "

    Altitude: " + position.coords.altitude + "

    "; -} - -function error(msg) { - var message = document.getElementById("status"); - message.innerHTML = "Failed to get geolocation."; -} - -if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(success, error); -} else { - error('Geolocation is not supported.'); -} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/green.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/green.jpg deleted file mode 100644 index 6a0d3bea4793a5fe3a3a36e29ba174540540513d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbG-5DfXkcJqT;s&Rz@Ye(1xPY5=zs{23bCU^SwR4 t`P&|OOncV3?A57l@3@bD^11%4_xZ1L-~aLRaJ3&<^s&Q7OP!U$8UQ`xB)R|q diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/red.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/red.jpg deleted file mode 100644 index f296e271956d5d4e0939b9706e86b2c2bc0d65b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbG-5DfXkcLY$H2kBz@Ye(1xPY5=zs{23bCU^SwR4 t`P&|OOncV3?A57l@3@bD^11%4_xZ1L-~aLRaJ3&<^s&Q7OP!U$8URKdB+&o> diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html deleted file mode 100644 index 394116a5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/status.html +++ /dev/null @@ -1 +0,0 @@ -Online diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache deleted file mode 100644 index 3bc4e002..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/test.appcache +++ /dev/null @@ -1,11 +0,0 @@ -CACHE MANIFEST - -CACHE: -# Additional items to cache. -yellow.jpg -red.jpg -blue.jpg -green.jpg - -FALLBACK: -status.html offline.html diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/yellow.jpg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/html5/yellow.jpg deleted file mode 100644 index 7c609b371291aeb672feb6bc24497d5f64d20288..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmZ?wbhEHbG-5DfXkcLYcZ>lD6o0aSC0GH&T#dHOB?;yGJxb#K16=Qn@b rBadm%I+wjVwe21E@lQV2zx6) - -HTML5 - - - -

    Geolocation Test

    -
    Location unknown
    - - -

    Web SQL Database Test

    -
    - - -

    Application Cache Test

    -
    -

    Current network status:

    - - - - - -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/icon.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/icon.gif deleted file mode 100644 index bb994619275674a361f092333cbfa122209d6546..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmZ?wbh9u|6k-r!Si}GX|AAob+W$d8|1~xLfB*iUgX2F?R0kvlQp3RPBO#^gd~AZ^ zsa&ybSCl~e@% diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html deleted file mode 100644 index 47f0834c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/idElements.html +++ /dev/null @@ -1,2 +0,0 @@ - -
    Element with a dot in the id
    diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html deleted file mode 100644 index a686ba31..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframeAtBottom.html +++ /dev/null @@ -1,15 +0,0 @@ - - - This page has iframes - - -

    This is the heading

    - -
    - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html deleted file mode 100644 index e00b482a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/iframes.html +++ /dev/null @@ -1,11 +0,0 @@ - - - This page has iframes - - -

    This is the heading

    - -':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
    ', -o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& -l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
    ";return k},_adjustInstDate:function(a,b,c){var e= -a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, -"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); -c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, -"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= -function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, -[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.10";window["DP_jQuery_"+y]=d})(jQuery); -;/* - * jQuery UI Progressbar 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
    ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); -this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* -this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery); -;/* - * jQuery UI Effects 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/ - */ -jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], -16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, -a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= -a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", -"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, -0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, -211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, -d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0]; -h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c, -a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent", -border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); -return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); -else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), -b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, -a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, -a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== -e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h
    ").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ -e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); -;/* - * jQuery UI Effects Fade 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fade - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Fold 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fold - * - * Depends: - * jquery.effects.core.js - */ -(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], -10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); -;/* - * jQuery UI Effects Highlight 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Highlight - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& -this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Pulsate 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Pulsate - * - * Depends: - * jquery.effects.core.js - */ -(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); -b.dequeue()})})}})(jQuery); -; \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css deleted file mode 100644 index 9f194f6a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.inline.min.css +++ /dev/null @@ -1 +0,0 @@ -.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css deleted file mode 100644 index ea08c689..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/content.min.css +++ /dev/null @@ -1 +0,0 @@ -body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0px}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #F00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md deleted file mode 100644 index fa5d6394..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/readme.md +++ /dev/null @@ -1 +0,0 @@ -Icons are generated and provided by the http://icomoon.io service. diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg deleted file mode 100644 index 578b8695..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg +++ /dev/null @@ -1,175 +0,0 @@ - - - - -This is a custom SVG font generated by IcoMoon. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot deleted file mode 100644 index 60e2d2e5c747caf9d41310976af96c75c696b448..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10316 zcmd5?U2GiJb-s80_iuKWyR$<|i^wk26^Xemt$M6rkdH=-X_ zc2hfUn@JD@L0c3`fwZn+6!X$TeJRuwZ4Vb8MX*7Hq~O^r8=LG0(H0twqkQSbjaN32 zmr#BUx$)xV*I(Fp`X?t)4jF6Sdg=L%=eBPB+fNvqqF1lJgbMk`(iqAwp*;1{l~-ST znP;8=`FkjLFJF6h;}@5H{vl)2G_31aHeTCgXZQmscTsk(Zd`f(ZR_|&#%56D*EX-c z@+#!S<&qo@lO@J)Fcr_v^A}L_Xg~jmjj?Z0yP=Ci?46en5!$@Fg+JZ}H?SFMKxHNt zl-^jyd+BMFDeMe#lNorXq0Z^fc9*;Dt^eD?JmGS>tUK3T5oNyhQ%7-RN9y+$4f;3E zIC>O^-U;RD92FvL%dvNz!W;hN~?WD zUhIgC-(x2tCo7A*-W6cU!l0lxA%H=cg3YENMT|@`lDaSF%}y zKWJpL3JQ3;VoQ?Dr7v@?$?EBR?>$tf*L(aMee%Uq3PeSLy7#`(@2(knjhD5OX(}~I zRu!3lN#@Gw-jDjdzMkY?=UalHabdN#y3olk#z$+>#<1LutIx{|yrr8MqHddVky|zf zrrVvmJjuPzn%uEF?wb4{clDOr?s&E(v30H}s=RW_;a@9Yw0!b9U{t1sG zUtHh+l-+i5H4-iiI`1$CdPXRr11*Y-RT`G~Yxi@9$30&pr`P3_LO=8)B+Sbm{X4t+ z2b^tTQy^_K_%!_^@$#Jl?9u;j`O|T1zaH|RW>x+!zr~KRrvS2lgtaAw?JTb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IX=o{_5h&_Y3Y>@}sk4BKq@`jyS;o2|OmTOBbtC6_$ z!j!dyuS&C@Du{>g*KcC&MhoS7tx%}d%jQ0-s2t&X&dg-3(S3!&zELZiEzt+vQWi0% zH#y5eU-oQ@FFeW%T|KMInPN4Us}?f|e`Ye3a#2ftO1*+*%GIn9gL6mDnnmOO&EP}l zHOxHC!8+!E)~X8RPR+4}<0bvITQMmKsSE9POcjw-718++SVTM|F^{p}0srV8TyTo& z?qC!n;CvUaUYOt+o#B#osgl2S4}Pj{M?3g&iiY3C5b#U#3BN?_>nyNx1lZWbz*}vX zKD9U6u4RL!B!IUpzWETzfv<7Qoxt;A&jV6n{9V8Zlol2u=mv*9FZ8@ZfHu9*kAsNe zJ8Z~&%xAz7EH1)>wqX?~fyOR72n*)nbO~!tXiV5EupT)f8qq1TrS)kY)u)Mv4&YQ= zBEu~fCEP#{{&|23x&m>J#C`jQsbO@s%U}=0n59Yf2>TMv46JnnfxAWpdtl%`jw33q z+xRFh%xS7Ar1=OMFC&UA;?wTX782meZ{IH6a(Mi}p;FIxzE^FG7Od&z@$uzp3+K@C zDST3w(z6%kdLf_JI!Z2|SMXh3)xKM(QN)F|Qj!BX5T58FEZ()v7Ceo#{O~rHcskEzICVnD+r28Cyzxx`mGIZ;KcF?PShp6@ZDtlqSv6SgX9y7 zK27B`ogSj84W;xMOK z{HyW5nQv#$Wq&*S!|XrhjNE+g^SO8O59R+b|M!K}!jpw}3m=>3&B*+|`QOE_7T+qy z#ScpL(pO9WQ+^U}q=`JjkI`>7a6y#2E|dL*Xhm&trtQ;ocKo$IEu((1Pb;9m-ltXk z@N8e7CXf7FpU&b;_Q${^u4GU{JQF(Mna~N(gid%Sbiy;CHT3;rzi-0x{y&Sm_YdIi z+y2#;ufBfe+2;?xa%JQ4 - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf deleted file mode 100644 index afc6ec458b5c032f104c12318ff721d31d9dab8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10128 zcmd5?U2GiJb-s80_iuKWyR$<|i^wk6wXXemexM6rkdH=-X_ zc2g^E>q*c6L0c3`fh4YB6!X$TeJRuwMH9d%#xF%43RKBM;r5}~B0%A`2r3wLP!#U6 z-?_81T#*tDBQKuioqO(`d(WJE@44SO_Y4_ljOAF!WVZDA3yUj8^OygLnsK5`6%C93gUb=Ms#m#4ab`s@~vF5FpU)X$p`_{kyjIpUDJYRbm z74lD|F_d3MdFtiMuf6^X&pZk84^Zx2y87JaFE9S$L&l~rp?vM~=IdMREPnvyF3Qf8 z&C4&mZJoHl*bIvN>ekg)UxS>uT$00Kvc&iersCNX{6*9}+Rr~?W9)aS-O$A$_T85c z5!$@FjUVrV8`umrpfY0;61}mCJ3Xy3g`GuiG6T;v)H&VR?n<}4{eRn-CtOaKb?3XQ zqRh8{?kJAzNd4ZTLI1`XM~~vrJMpg0F(JZ^9Q)TP%z@Bd9z(7%Hp|Xo=E`oPX-ZbP zT9>@W%DU8+J*(BOwAx4IWe>^nTJ6;Z=@3V&3EnDu7FwR*XnB&`7VmEL-ZzRlP0JMx zzC~2*IDQ=aj+)8ov7XDQjvyl<{aHS{MNNA*2A!S?f?gbkAw8!)A@_rn{^F^RX!tVo zA$JV9>+CRl2(-H(>#ix=a$UBkYwJ=+UR#h{9VNH3QkRzPiaJx9sks$#w{=@bX~yP% zep)fjlJ*lVZ)luzC7U()gGM&1pn$h4wj{}1`U>Zote(mD-a~bIy~n@NCto_PKvWc{ zd+!_l?wXO;cv&l%rc#q+Rgw9ZWv-m*{iNUP%_M)5ZwrFPh1J^bLMOWzAFV|j!*V;W zz9291mTqE*x^2ouZrK=^Zg=YPB=wqt>+*x#)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EwCi<-MOM$pM2EC9?#pi4u(I{XbShtzsW1o|yaHZd@ukqZ^}6skGlGOAaeaO9|}j z#?V13_>i9`>FTlnn181Dz(*`6p@Ol0*tm_8dXjJ7>Hil5MWvI+q96UQ4Q=4W@(E7V zCB5+7WapySpsR!A6N^4go=7T z5D=Ksru4tn|JhhFe$V(9<9{>X&OVm?o$QaZ|Clp!3%M`k-pN0d|6cy@3TuU@3hx#^ zHlHvf^M~et7r$0~s~8tQDAh|}EB#OTDZG&;@+dz}|FeM$qU^a$_7|cRwZ)mXPt)1) z*ZZ`L`lUXtfPS-2tE`3+y@7n^0=~m0bQWi_KL#doC4(B`na~N(gid%Sbiy;C6P^jJ zq3@UaeG{Iqu~*m?cAZ^j&#@QS5&SR4WwyyK;rB(9uc7=3yNVVLVw?+*`M&L6d*#aY z%g?=V@3u!&YL;Df#cLw_Cja}f0^KJi}_ Kf?+iKUjGk9se#1+ diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff deleted file mode 100644 index fa72c74b45ba3725a6ff7d8d0901c538467c64e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7848 zcmeHMdwf$>oU`L(I}xEJxM+1g4pdMw3}~}JN5NL8w5Fw{q_m|E z8k(j}e|@BBTKb?5Yk9_^bt(u>!4KslxpUZCddu|e1 zP#D+!cW-je{hi0}dtSfCIp-EFU%Ys^)w-Oqd-t;G49~skOefx7e-KX0=gW2!}+crC=Dgz5E6r_&ki*&9o8*JaM$oSTu8!*nqyc_egq zOz5uI(D(KCPG@(dP7p=kGj1rgg?u49zXu2xZWi&MZ$Zp%M0DpZx3Y%?zk%Jw?qNS* zKV%8)0hWk?C9}ub6KpA4&a5nrt!3+27RzM?tcaB{2XirE9@fe_SuY!4``7{Y3-%Tp zVaM4?c8dKY`-Gjwp#P2ift|<1|C#-_E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EzHRAC}@vf_Uv}>>0prV1;NP1Mt^`V@ptPqt=BC)XHS*(S;Y# U(RlV0x|+w9A&8D)G}nFp2i)urJpcdz diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg deleted file mode 100644 index c87b8cd1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg +++ /dev/null @@ -1,153 +0,0 @@ - - - - -This is a custom SVG font generated by IcoMoon. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.eot b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.eot deleted file mode 100644 index c1085bfd295abcf940871c863165656df8b094c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10024 zcmb_idyE~|SwCmqckcT+`@B2%UhmGX?d*DY_WJq}Z^o7FP$zcQ&Z`O}8OL@WPMj=> zX&ludQze2_M97p%L@J=0qE;YOND)O<70MvspZ)=+f~u-oxQHUC5Wzf(3Ke(xeP?Fw z-re;hshE4uobSB8^PO|P^F7X)S%!*Ks2}Pel`qITSm)F=w*|!**HjuWTKXdW?J@r56Aw7#e_OHG0(k0M|XXYH0Gg)H% zDpOH*F9#Lu?l}Gd8)a`$y`hJL?9GqISg*}{>-g~=umR0b1xhoqaMWW3{ZeU#Da=Eh zVFt<+y7?zod=56 zdl-8UV>dw))h;)RZne>Nts)Qmp2WP+^TK{$b9;K6_xg+@9R&S=2i@*? z|FfXartt$;o$Y4#0+%x{JNisc(#u+1>ZmKSQ>L6fwMuPKcWQfTd!~3-JH)W4>38I^Ocn+2W!v|ccEB;-^|uSwD=F3Hld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wi6i_LuQDO z4e|Y2;|AAj(4R%l3I%&)ZNx@I7dmPeOf9DTaT0#b6f3f<_JCk_*I;;l{>k8k|u&7wHq3=;>W1@Ur!uc1~ zAA0E2eeh5rHAS%FI7uh*-YsQY>rwi31S@Xu$8pl0%E#lpr?-^lkfxB-O=4=3z=+qc zBkd!2ag02+ieMuY5GWlWcrk1vi~QRPPWO(muksmu)$<}eE#H@I{GOYy+O>lK diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg deleted file mode 100644 index feb9ba38..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf deleted file mode 100644 index 58103c2b6287fa209bf1e62c7ea107fd65a351f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9860 zcmb_idyE~|SwCmqckcT!ch>v3JNI7i&aUn3dUy8v`jKqLmF-X`cGgasRDmSp*v`X= zlO-`tqB>-%R3#M=3Z)W}3h1V&6$lklL=mb&83g>(KfqK_RaFZYQ3Mqtm`72e;x51M z%*@@pUO$qG*?Z=E=k=ZMobx@;EaQx^EDM>;_TGEn;-}#q z#wSs}|A{j%tRpX>Ou6yIGcP}W`M%4Kqx=$M&F?&U{>-_JFaJx2vG)CF-}fXc7}Q+^0z3zgYx&DdG73)tEYc>2~D3x`O?KRFRil=vu`mrW1#Fjd*vuN(cVh#!3?@trA zzQp{<_oG4RaA#(M_Xmul9EO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|B>T J6}@lx{2vuDq_zM6 diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.woff b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/fonts/tinymce.woff deleted file mode 100644 index ad1ae396a88239278653cf63ac3630b6b8360102..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7664 zcmd^EeRNbsmah&e@&s&y^qUz5ok?6)9a_|cMi+4QpfEvgMU=(><57@+KF#`x8}ikUk8}tz0ZB*)RLsFoKnEOk8;=~ek7wPC4(je%+1AzZBv$Wvy@&nP>uv}t zjywLjue<8qx^?UK>f_#9x85szASdSmhvNapuKkLQW4NyEVCP#89(-W&E!m9yvIYDVGAY-66IoTTvKYLtPxvOOUUlWnDE09h0U(IIA_6oa-O=OeU&)5_^ z>hIY!b_=tyS?nL#Ja#v`pFPBK*&}QvTf>~Jn7P@L>?!7BTUitHvt6u{^{`$xz@BGE z*sJVy_9pu$_8tqf57di=o$JP2)}JCe`#y)2|c#Pu$$My0hHbx4M6K z>#atXC8=zg&5)T*W;11Wo6K&P*+0l^mdx&y*AgG@v5MIAP*lS5LUwef7|!S(AQ0sn3#SdDPNw39GZz zu=<}r+w${UVwySr*EMt05p}6C2T@FmYD7_oJ;Zf~T@4ZG7CVu!aN&qq)R+a8mLRw` zF$lKpIoe-L`hRnCbZInQo%heYGLXN^O^WU#?xyl`aw`;@&&l0c-c3q0m3TLGc2c)O z;v}c;&Ha@D#pPDFZEf7TZL2bi=tI73>$V2aXXf)g`qwJe;UXo5mUUFuOw9^Kf!B*j+f>Pd3keXD}S1_svi+JYTV?BCGi>U(NGbyHVcAaL+t&D)Q^py*F8Q0qK3UZ2nF_11doymj6N zFL`N8qu1}%8n%<4+8VWHf3w!&_qVmR`CGMS#owfD1D|#@_&t8_wra@xwtDKl%D?`* zT0&)Aw2$_6bs?j!GAf~xva%8=;#_@_>h*3h;JuCBW>2%X#q0OA)%feQdjD1pfc|a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Lj@e|K3zZP5m@6Cnj}>cR zjmSlbSqvYDGb9#r5HU18svcX4^*x3l8>4LYp6^;C}N|F;$-`e8OiB z>GSpZbB562JVgC^9#sVO`OsUq0bYdI`+4dXF05=&4~tsjxqDV0r9aa9Z@>LMy-#m1 zq`9=EVM~3r^4fLkjh}EW(6Sru_4O4;9;SzB#R_CbwAM+xTLPN$$&GwRRae8#T}o3E z-?g)$t7?a$-}An@j*5EeARX-OMMk|vw2syl6|IvRqQU8qy@NV}m^j^1iWwF1Jr@YL z9_ny*zyrK!?*ciO6Z($tYSne~e z!8eu#iTenfjL#*PUZ(U*%Z$xs?Cea_+4K0B&Kh5QOru0H3_1llz5+1|a#?G^$AP)H zPrxUf6woG?arVZuGtd9e`Saj1l-Sv6M#*&k(~Q)NF^P6YrIDGK39?riXh3{viEq+=B_THlR??~Rye|7$BiV1y_-@)S5@`DtUeZ~h1hWhgU&!AxFeb|^6iCeX$VAx{ClAi*C4dTN4B1-&Feb9{g^ zC+M;G=#!nG$FUpPD!Fp0SAZii<8&M|PRB9hbR08I$1&sdShSs$XdB0Lv30DFm9qli zuVxP;m9SFqionfaS?p$ZE4xG{`PuOjCcY1@W>4U|U_QPPmR#BZgI*0V3A_?Dt63g^ ZAIBpz*gbe?5xy=K8ILnYh3xXz{{ll7??M0o diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/anchor.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/anchor.gif deleted file mode 100644 index 606348c7f53dba169a9aca7279a2a973f4b07bdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53 zcmZ?wbhEHbWM^P!XkcUjg8%>jEB<5wG8q|kKzxu40~1eAV&{y5e`l1KFoiKNSOWkz C+YCGa diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/loader.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/loader.gif deleted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0J~ayFXv zi*?7KCXQHkD)O6!0Q%4N+HTODHxJ{kQSuQX$l-rSwkwh(zMkdfzxyGwl@yHC)C4p< z&n2%8#M?)Q@mgHL1ot8`SFdSEj9ye|jHy+U8#@HoUExG=@AVkRAe_qYm4EpzK6L*& zh`)26?V#f4#_h^P9G^%>h2-H3)$QP zQovu6J9qDvsxqweDdNNa!Lb?L4_UF{tLX_nN7r0U_vF14YKcGR-*Gl} zx3oG)bzf|65dBxD-;2ZCp??K;+TuQ9onnK?==5hzbkb^r_g>z4#D8mcv8(+XdoszA zCx-qhdgxMNMotj}SiL_6V(tLcsK7(M(r(%u<}QrVfOvyK6_;~NOTlPGfX@M7S5YQF z&*$(ylJMHJt^_aQeu{C6NaTE$G3HNN@_SnN8YcaKn%`)F@~L1x+ah7-gEJPpc6w%3 zyX}r+Qk$4RHZzfH){e~F*qJ{d*L8a6n4;U?+{de0-t)mal#TVxe)3F}^UBh+zd T)6_**#cgp_+?JL9(ew3BlNF>u diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/object.gif b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/img/object.gif deleted file mode 100644 index cccd7f023fb80908cb33bb7d9604236cd21b7ae7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 152 zcmV;J0B8S4Nk%w1VG#fg0J9GO<>lo+KR<78Z?v?uS65g4{r%Y3*xlXT%F4>`@9+2b z_ww@cot>Tk|Nk>HGXMYpA^8LW000jFEC2ui01*HU000C<(8)=wd#<&tyXIMjHBV`d zBSi|xsj3(;nD0kQ0aJq8eLH~x02P|t2!_J&Wqb%0io?#xD.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css deleted file mode 100644 index 284ac1de..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/skins/lightgray/skin.min.css +++ /dev/null @@ -1 +0,0 @@ -.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td div{border:1px solid #d6d6d6;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:focus{border-color:#a1a1a1}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js deleted file mode 100644 index e25849df..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/js/themes/modern/theme.min.js +++ /dev/null @@ -1 +0,0 @@ -tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var n,o=[];if(t)return d(t.split(/[ ,]/),function(t){function i(){var i=e.selection;"bullist"==r&&i.selectorChanged("ul > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"UL"==n)}),"numlist"==r&&i.selectorChanged("ol > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"OL"==n)}),t.settings.stateSelector&&i.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&i.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?n=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_size),o.push(t),n=null):(n||(n={type:"buttongroup",items:[]},o.push(n)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),n.items.push(t),e.initialized?i():e.on("init",i)))}),i.push({type:"toolbar",layout:"flow",items:o}),!0}var i=[];if(tinymce.isArray(u.toolbar)){if(0===u.toolbar.length)return;tinymce.each(u.toolbar,function(e,t){u["toolbar"+(t+1)]=e}),delete u.toolbar}for(var n=1;10>n&&t(u["toolbar"+n]);n++);return i.length||u.toolbar===!1||t(u.toolbar||f),i.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}:void 0}function i(){function t(t){var i;return"|"==t?{text:"|"}:i=e.menuItems[t]}function i(i){var n,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").split(/[ ,]/)),u.menu?(o=u.menu[i],a=!0):o=h[i],o){n={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var i=t(e);i&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==i&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;lr;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var a=this,s={},l,c,u,d,f;c=o+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,a.domLoaded=!1,a.events=s,a.bind=function(t,o,p,h){function m(e){i(n(e||_.event),g)}var g,v,y,b,C,x,w,_=window;if(t&&3!==t.nodeType&&8!==t.nodeType){for(t[c]?g=t[c]:(g=l++,t[c]=g,s[g]={}),h=h||t,o=o.split(" "),y=o.length;y--;)b=o[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),a.domLoaded&&"ready"===b&&"complete"==t.readyState?p.call(h,n({type:b})):(d||(C=f[b],C&&(x=function(e){var t,r;if(t=e.currentTarget,r=e.relatedTarget,r&&t.contains)r=t.contains(r);else for(;r&&r!==t;)r=r.parentNode;r||(e=n(e||_.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,i(e,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(e){e=n(e||_.event),e.type="focus"===e.type?"focusin":"focusout",i(e,g)}),v=s[g][b],v?"ready"===b&&a.domLoaded?p({type:b}):v.push({func:p,scope:h}):(s[g][b]=v=[{func:p,scope:h}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?r(t,x,a):e(t,C||b,x,w)));return t=v=0,p}},a.unbind=function(e,n,r){var i,o,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return a;if(i=e[c]){if(f=s[i],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],o=f[d]){if(r)for(u=o.length;u--;)if(o[u].func===r){var p=o.nativeHandler,h=o.fakeName,m=o.capture;o=o.slice(0,u).concat(o.slice(u+1)),o.nativeHandler=p,o.fakeName=h,o.capture=m,f[d]=o}r&&0!==o.length||(delete f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture))}}else{for(d in f)o=f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture);f={}}for(d in f)return a;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return a},a.fire=function(e,t,r){var o;if(!e||3===e.nodeType||8===e.nodeType)return a;r=n(null,r),r.type=t,r.target=e;do o=e[c],o&&i(r,o),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!r.isPropagationStopped());return a},a.clean=function(e){var t,n,r=a.unbind;if(!e||3===e.nodeType||8===e.nodeType)return a;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return a},a.destroy=function(){s={}},a.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var o="mce-data-",a=/^(?:mouse|contextmenu)|click/,s={keyLocation:1,layerX:1,layerY:1,returnValue:1};return i.Event=new i,i.Event.bind(window,"ready",function(){}),i}),r(c,[],function(){function e(e){return mt.test(e+"")}function n(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>_.cacheLength&&delete e[t.shift()],e[n]=r,r}}function r(e){return e[I]=!0,e}function i(e){var t=B.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t=null}}function o(e,t,n,r){var i,o,a,s,l,c,f,p,h,m;if((t?t.ownerDocument||t:F)!==B&&A(t),t=t||B,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(L&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&z.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(z.qsa&&!M.test(e)){if(f=!0,p=I,h=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=u(e),(f=t.getAttribute("id"))?p=f.replace(bt,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",l=c.length;l--;)c[l]=p+d(c[l]);h=ht.test(e)&&t.parentNode||t,m=c.join(",")}if(m)try{return Z.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{f||t.removeAttribute("id")}}}return b(e.replace(lt,"$1"),t,n,r)}function a(e,t){var n=t&&e,r=n&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e,t){var n,r,i,a,s,l,c,u=q[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=_.preFilter;s;){(!n||(r=ct.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=ut.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(lt," ")}),s=s.slice(n.length));for(a in _.filter)!(r=pt[a].exec(s))||c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?o.error(e):q(e,l).slice(0)}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function f(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c,u=W+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(c=t[I]||(t[I]={}),(l=c[r])&&l[0]===u){if((s=l[1])===!0||s===w)return s===!0}else if(l=c[r]=[u],l[1]=e(t,n,a)||w,l[1]===!0)return!0}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function m(e,t,n,i,o,a){return i&&!i[I]&&(i=m(i)),o&&!o[I]&&(o=m(o,a)),r(function(r,a,s,l){var c,u,d,f=[],p=[],m=a.length,g=r||y(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?g:h(g,f,e,s,l),b=n?o||(r?e:m||i)?[]:a:v;if(n&&n(v,b,s,l),i)for(c=h(b,p),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[p[u]]=!(v[p[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(v[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?tt.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=h(b===a?b.splice(m,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function g(e){for(var t,n,r,i=e.length,o=_.relative[e[0].type],a=o||_.relative[" "],s=o?1:0,l=f(function(e){return e===t},a,!0),c=f(function(e){return tt.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==k)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=_.relative[e[s].type])u=[f(p(u),n)];else{if(n=_.filter[e[s].type].apply(null,e[s].matches),n[I]){for(r=++s;i>r&&!_.relative[e[r].type];r++);return m(s>1&&p(u),s>1&&d(e.slice(0,s-1)).replace(lt,"$1"),n,r>s&&g(e.slice(s,r)),i>r&&g(e=e.slice(r)),i>r&&d(e))}u.push(n)}return p(u)}function v(e,t){var n=0,i=t.length>0,a=e.length>0,s=function(r,s,l,c,u){var d,f,p,m=[],g=0,v="0",y=r&&[],b=null!=u,C=k,x=r||a&&_.find.TAG("*",u&&s.parentNode||s),N=W+=null==C?1:Math.random()||.1;for(b&&(k=s!==B&&s,w=n);null!=(d=x[v]);v++){if(a&&d){for(f=0;p=e[f++];)if(p(d,s,l)){c.push(d);break}b&&(W=N,w=++n)}i&&((d=!p&&d)&&g--,r&&y.push(d))}if(g+=v,i&&v!==g){for(f=0;p=t[f++];)p(y,m,s,l);if(r){if(g>0)for(;v--;)y[v]||m[v]||(m[v]=J.call(c));m=h(m)}Z.apply(c,m),b&&!r&&m.length>0&&g+t.length>1&&o.uniqueSort(c)}return b&&(W=N,k=C),y};return i?r(s):s}function y(e,t,n){for(var r=0,i=t.length;i>r;r++)o(e,t[r],n);return n}function b(e,t,n,r){var i,o,a,s,l,c=u(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&_.relative[o[1].type]){if(t=(_.find.ID(a.matches[0].replace(xt,wt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?0:o.length;i--&&(a=o[i],!_.relative[s=a.type]);)if((l=_.find[s])&&(r=l(a.matches[0].replace(xt,wt),ht.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Z.apply(n,r),n;break}}return S(e,c)(r,t,!L,n,ht.test(e)),n}function C(){}var x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I="sizzle"+-new Date,F=window.document,z={},W=0,V=0,U=n(),q=n(),$=n(),j=!1,K=function(){return 0},G=typeof t,Y=1<<31,X=[],J=X.pop,Q=X.push,Z=X.push,et=X.slice,tt=X.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",it=rt.replace("w","w#"),ot="([*^$|!~]?=)",at="\\["+nt+"*("+rt+")"+nt+"*(?:"+ot+nt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+it+")|)|)"+nt+"*\\]",st=":("+rt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ct=new RegExp("^"+nt+"*,"+nt+"*"),ut=new RegExp("^"+nt+"*([\\x20\\t\\r\\n\\f>+~])"+nt+"*"),dt=new RegExp(st),ft=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),NAME:new RegExp("^\\[name=['\"]?("+rt+")['\"]?\\]"),TAG:new RegExp("^("+rt.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ht=/[\x20\t\r\n\f]*[+~]/,mt=/^[^{]+\{\s*\[native code/,gt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,vt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,bt=/'|\\/g,Ct=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,wt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{Z.apply(X=et.call(F.childNodes),F.childNodes),X[F.childNodes.length].nodeType}catch(_t){Z={apply:X.length?function(e,t){Q.apply(e,et.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}E=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},A=o.setDocument=function(n){var r=n?n.ownerDocument||n:F;return r!==B&&9===r.nodeType&&r.documentElement?(B=r,D=r.documentElement,L=!E(r),z.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),z.attributes=i(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),z.getElementsByClassName=i(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),z.getByName=i(function(e){e.id=I+0,e.appendChild(B.createElement("a")).setAttribute("name",I),e.appendChild(B.createElement("i")).setAttribute("name",I),D.appendChild(e);var t=r.getElementsByName&&r.getElementsByName(I).length===2+r.getElementsByName(I+0).length;return D.removeChild(e),t}),z.sortDetached=i(function(e){return e.compareDocumentPosition&&1&e.compareDocumentPosition(B.createElement("div"))}),_.attrHandle=i(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==G&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},z.getByName?(_.find.ID=function(e,t){if(typeof t.getElementById!==G&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(e){var t=e.replace(xt,wt);return function(e){return e.getAttribute("id")===t}}):(_.find.ID=function(e,n){if(typeof n.getElementById!==G&&L){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==G&&r.getAttributeNode("id").value===e?[r]:t:[]}},_.filter.ID=function(e){var t=e.replace(xt,wt);return function(e){var n=typeof e.getAttributeNode!==G&&e.getAttributeNode("id");return n&&n.value===t}}),_.find.TAG=z.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==G?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},_.find.NAME=z.getByName&&function(e,t){return typeof t.getElementsByName!==G?t.getElementsByName(name):void 0},_.find.CLASS=z.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==G&&L?t.getElementsByClassName(e):void 0},H=[],M=[":focus"],(z.qsa=e(r.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||M.push("\\["+nt+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||M.push(":checked")}),i(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&M.push("[*^$]="+nt+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(z.matchesSelector=e(P=D.matchesSelector||D.mozMatchesSelector||D.webkitMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&i(function(e){z.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),H.push("!=",st)}),M=new RegExp(M.join("|")),H=H.length&&new RegExp(H.join("|")),O=e(D.contains)||D.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},K=D.compareDocumentPosition?function(e,t){if(e===t)return j=!0,0;var n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return n?1&n||T&&t.compareDocumentPosition(e)===n?e===r||O(F,e)?-1:t===r||O(F,t)?1:R?tt.call(R,e)-tt.call(R,t):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(e===t)return j=!0,0;if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===F?-1:c[i]===F?1:0},B):B},o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){if((e.ownerDocument||e)!==B&&A(e),t=t.replace(Ct,"='$1']"),z.matchesSelector&&L&&(!H||!H.test(t))&&!M.test(t))try{var n=P.call(e,t);if(n||z.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return o(t,B,null,[e]).length>0},o.contains=function(e,t){return(e.ownerDocument||e)!==B&&A(e),O(e,t)},o.attr=function(e,t){var n;return(e.ownerDocument||e)!==B&&A(e),L&&(t=t.toLowerCase()),(n=_.attrHandle[t])?n(e):!L||z.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},o.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},o.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!z.detectDuplicates,T=!z.sortDetached,R=!z.sortStable&&e.slice(0),e.sort(K),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},N=o.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=N(t);return n},_=o.selectors={cacheLength:50,createPseudo:r,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,wt),e[3]=(e[4]||e[5]||"").replace(xt,wt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||o.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&o.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&dt.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,wt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&U(e,function(e){return t.test(e.className||typeof e.getAttribute!==G&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=o.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(u=g[I]||(g[I]={}),c=u[e]||[],p=c[0]===W&&c[1],f=c[0]===W&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(f=p=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,p,f];break}}else if(y&&(c=(t[I]||(t[I]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++p&&d&&d[m]||(f=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[I]||(d[I]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(e,t){var n,i=_.pseudos[e]||_.setFilters[e.toLowerCase()]||o.error("unsupported pseudo: "+e);return i[I]?i(t):i.length>1?(n=[e,e,"",t],_.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=tt.call(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(lt,"$1"));return i[I]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(t){return o(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(e){return ft.test(e||"")||o.error("unsupported lang: "+e),e=e.replace(xt,wt).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===D},focus:function(e){return e===B.activeElement&&(!B.hasFocus||B.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!_.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++rn;n++)t[n]=e[n];return t}function f(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1}function p(e){return null===e||e===t?"":(""+e).replace(N,"")}function h(e,t){var n,r,i,o,a;if(e)if(n=e.length,n===o){for(r in e)if(e.hasOwnProperty(r)&&(a=e[r],t.call(a,a,r)===!1))break}else for(i=0;n>i&&(a=e[i],t.call(a,a,r)!==!1);i++);return e}function m(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!c(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i}function g(e,t,n,r){for(var i=[];e;e=e[n])r&&e.nodeType!==r||e===t||i.push(e);return i}var v=document,y=Array.prototype.push,b=Array.prototype.slice,C=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,x=e.Event,w=l("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"),_=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},N=/^\s*|\s*$/g;return c.fn=c.prototype={constructor:c,selector:"",length:0,init:function(e,t){var n=this,r,a;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(i(e)){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:C.exec(e),!r)return c(t||document).find(e);if(r[1])for(a=o(e).firstChild;a;)this.add(a),a=a.nextSibling;else{if(a=v.getElementById(r[2]),a.id!==r[2])return n.find(e);n.length=1,n[0]=a}}else this.add(e);return n},toArray:function(){return d(this)},add:function(e){var t=this;return _(e)?y.apply(t,e):e instanceof c?t.add(e.toArray()):y.call(t,e),t},attr:function(e,n){var i=this;if("object"==typeof e)h(e,function(e,t){i.attr(t,e)});else{if(!r(n))return i[0]&&1===i[0].nodeType?i[0].getAttribute(e):t;this.each(function(){1===this.nodeType&&this.setAttribute(e,n)})}return i},css:function(e,n){var i=this;if("object"==typeof e)h(e,function(e,t){i.css(t,e)});else{if(e=e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),!r(n))return i[0]?i[0].style[e]:t;"number"!=typeof n||w[e]||(n+="px"),i.each(function(){var t=this.style;"opacity"===e&&this.runtimeStyle&&"undefined"==typeof this.runtimeStyle.opacity&&(t.filter=""===n?"":"alpha(opacity="+100*n+")");try{t[e]=n}catch(r){}})}return i},remove:function(){for(var e=this,t,n=this.length;n--;)t=e[n],x.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var e=this,t,n=this.length;n--;)for(t=e[n];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(e){var t=this,n;if(r(e)){for(n=t.length;n--;)t[n].innerHTML=e;return t}return t[0]?t[0].innerHTML:""},text:function(e){var t=this,n;if(r(e)){for(n=t.length;n--;)t[n].innerText=t[0].textContent=e;return t}return t[0]?t[0].innerText||t[0].textContent:""},append:function(){return a(this,arguments,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return a(this,arguments,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){var e=this;return e[0]&&e[0].parentNode?a(e,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)}):e},after:function(){var e=this;return e[0]&&e[0].parentNode?a(e,arguments,function(e){this.parentNode.insertBefore(e,this)}):e},appendTo:function(e){return c(e).append(this),this},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(e,t){var n=this;return-1!==e.indexOf(" ")?h(e.split(" "),function(){n.toggleClass(this,t)}):n.each(function(n){var r;s(n,e)!==t&&(r=n.className,t?n.className+=r?" "+e:e:n.className=p((" "+r+" ").replace(" "+e+" "," ")))}),n},hasClass:function(e){return s(this[0],e)},each:function(e){return h(this,e)},on:function(e,t){return this.each(function(){x.bind(this,e,t)})},off:function(e,t){return this.each(function(){x.unbind(this,e,t)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new c(b.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},replaceWith:function(e){var t=this;return t[0]&&t[0].parentNode.replaceChild(c(e)[0],t[0]),t},wrap:function(e){return e=c(e)[0],this.each(function(){var t=this,n=e.cloneNode(!1);t.parentNode.insertBefore(n,t),n.appendChild(t)})},unwrap:function(){return this.each(function(){for(var e=this,t=e.firstChild,n;t;)n=t,t=t.nextSibling,e.parentNode.insertBefore(n,e)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),c(e)},find:function(e){var t,n,r=[];for(t=0,n=this.length;n>t;t++)c.find(e,this[t],r);return c(r)},push:y,sort:[].sort,splice:[].splice},u(c,{extend:u,toArray:d,inArray:f,isArray:_,each:h,trim:p,makeMap:l,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,isXMLDoc:n.isXML,contains:n.contains,filter:function(e,t,n){return n&&(e=":not("+e+")"),t=1===t.length?c.find.matchesSelector(t[0],e)?[t[0]]:[]:c.find.matches(e,t)}}),h({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return m(e,"parentNode")},parentsUntil:function(e,t){return m(e,"parentNode",t)},next:function(e){return g(e,"nextSibling",1)},prev:function(e){return g(e,"previousSibling",1)},nextNodes:function(e){return g(e,"nextSibling")},prevNodes:function(e){return g(e,"previousSibling")},children:function(e){return g(e.firstChild,"nextSibling",1)},contents:function(e){return d(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){c.fn[e]=function(n){var r=this,i;if(r.length>1)throw new Error("DomQuery only supports traverse functions on a single node.");return r[0]&&(i=t(r[0],n)),i=c(i),n&&"parentsUntil"!==e?i.filter(n):i}}),c.fn.filter=function(e){return c.filter(e)},c.fn.is=function(e){return!!e&&this.filter(e).length>0},c.fn.init.prototype=c.fn,c}),r(d,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e -}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d="\ufeff";for(e=e||{},u=("\\\" \\' \\; \\: ; : "+d).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function p(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function h(t,n,r,i,o,a){if(o=o||a)return o=p(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=p(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":("color"===v||"background-color"===v)&&(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,h),m[v]=b?p(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,n){function r(n){var r,o,a,l;if(r=t.styles[n])for(o=0,a=r.length;a>o;o++)n=r[o],l=e[n],l!==s&&l.length>0&&(i+=(i.length>0?" ":"")+n+": "+l+";")}var i="",o,a;if(n&&t&&t.styles)r("*"),r(n);else for(o in e)a=e[o],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+o+": "+a+";");return i}}}}),r(f,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}var r=e;this.current=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=function(e){return r=n(r,"lastChild","previousSibling",e)}}}),r(p,[],function(){function e(e){return null===e||e===t?"":(""+e).replace(m,"")}function n(e,n){return n?"array"==n&&g(e)?!0:typeof e==n:e!==t}function r(e){var t=[],n,r;for(n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function i(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function o(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function a(e,t){var n=[];return o(e,function(e){n.push(t(e))}),n}function s(e,t){var n=[];return o(e,function(e){(!t||t(e))&&n.push(e)}),n}function l(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],o[a]=c?function(){return i[s].apply(this,arguments)}:function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function c(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function u(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function d(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),o(e,function(e,i){return t.call(r,e,i,n)===!1?!1:void d(e,t,n,r)}))}function f(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function h(t,r){return!t||n(t,"array")?t:a(t.split(r||","),e)}var m=/^\s*|\s*$/g,g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{trim:e,isArray:g,is:n,toArray:r,makeMap:i,each:o,map:a,grep:s,inArray:c,extend:u,create:l,walk:d,createNS:f,resolve:p,explode:h}}),r(h,[p],function(e){function t(n){function r(){return H.createDocumentFragment()}function i(e,t){_(F,e,t)}function o(e,t){_(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[U]=M[V],M[q]=M[W]):(M[V]=M[U],M[W]=M[q]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function p(e,t){var n=M[V],r=M[W],i=M[U],o=M[q],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function h(){N(I)}function m(){return N(P)}function g(){return N(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return $(new t(n),{startContainer:M[V],startOffset:M[W],endContainer:M[U],endOffset:M[q],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return M[V]==M[U]&&M[W]==M[q]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function _(e,t,r){var i,o;for(e?(M[V]=t,M[W]=r):(M[U]=t,M[q]=r),i=M[U];i.parentNode;)i=i.parentNode;for(o=M[V];o.parentNode;)o=o.parentNode;o==i?w(M[V],M[W],M[U],M[q])>0&&M.collapse(e):M.collapse(e),M.collapsed=x(),M.commonAncestorContainer=n.findCommonAncestor(M[V],M[U])}function N(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[V]==M[U])return E(e);for(t=M[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return S(t,e);++n}for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[U])return k(t,e);++r}for(o=r-n,a=M[V];o>0;)a=a.parentNode,o--;for(s=M[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function E(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[W]==M[q])return t;if(3==M[V].nodeType){if(n=M[V].nodeValue,i=n.substring(M[W],M[q]),e!=O&&(o=M[V],c=M[W],u=M[q]-M[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(H.createTextNode(i)),t}for(o=C(M[V],M[W]),a=M[q]-M[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&M.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[W],0>=a)return t!=O&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(M.setEndBefore(e),M.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[q]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(M.setStartAfter(e),M.collapse(F)),o}function R(e,t){var n=C(M[U],M[q]-1),r,i,o,a,s,l=n!=M[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(M[V],M[W]),r=n!=M[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[W],a=o.substring(l),s=o.substring(0,l)):(l=M[q],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var M=this,H=n.doc,P=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",q="endOffset",$=e.extend,j=n.nodeIndex;return $(M,{startContainer:H,startOffset:0,endContainer:H,endOffset:0,collapsed:F,commonAncestorContainer:H,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:p,deleteContents:h,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(m,[p],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&(#x|#)?([\w]+);/g,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):d[r]||String.fromCharCode(r)):a[e]||i[e]||t(e)})}};return f}),r(g,[],function(){var e=navigator,t=e.userAgent,n,r,i,o,a,s,l;n=window.opera&&window.opera.buildNumber,r=/WebKit/.test(t),i=!r&&!n&&/MSIE/gi.test(t)&&/Explorer/gi.test(e.appName),i=i&&/MSIE (\w+)\./.exec(t)[1],o=-1==t.indexOf("Trident/")||-1==t.indexOf("rv:")&&-1==e.appName.indexOf("Netscape")?!1:11,i=i||o,a=!r&&!o&&/Gecko/.test(t),s=-1!=t.indexOf("Mac"),l=/(iPad|iPhone)/.test(t);var c=!l||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:a,mac:s,iOS:l,contentEditable:c,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window,documentMode:i?document.documentMode||7:10}}),r(v,[],function(){return function(e,t){function n(t){e.getElementsByTagName("head")[0].appendChild(t)}function r(t,r,s){function l(){for(var e=v.passed,t=e.length;t--;)e[t]();v.status=2,v.passed=[],v.failed=[]}function c(){for(var e=v.failed,t=e.length;t--;)e[t]();v.status=3,v.passed=[],v.failed=[]}function u(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function d(e,t){e()||((new Date).getTime()-g0)return m=e.createElement("style"),m.textContent='@import "'+t+'"',p(),void n(m);f()}n(h),h.href=t}}var i=0,o={},a;t=t||{},a=t.maxLoadTime||5e3,this.load=r}}),r(y,[c,d,l,f,h,m,g,p,v],function(e,n,r,i,o,a,s,l,c){function u(e,t){var i=this,o;i.doc=e,i.win=window,i.files={},i.counter=0,i.stdMode=!v||e.documentMode>=8,i.boxModel=!v||"CSS1Compat"==e.compatMode||i.stdMode,i.hasOuterHTML="outerHTML"in e.createElement("a"),i.styleSheetLoader=new c(e),this.boundEvents=[],i.settings=t=m({keep_values:!1,hex_colors:1},t),i.schema=t.schema,i.styles=new n({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),i.fixDoc(e),i.events=t.ownEvents?new r(t.proxy):r.Event,o=t.schema?t.schema.getBlockElements():{},i.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var d=l.each,f=l.is,p=l.grep,h=l.trim,m=l.extend,g=s.webkit,v=s.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/,C=l.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," ");return u.prototype={root:null,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},fixDoc:function(e){var t=this.settings,n;if(v&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!v||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.get(e.settings.root_element)||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),f(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.get(r.settings.root_element)||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(y.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=f(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return this.run(e,function(e){var n,r=e.parentNode;if(!r)return null;if(t)for(;n=e.firstChild;)!v||3!==n.nodeType||n.nodeValue?r.insertBefore(n,e):e.removeChild(n);return r.removeChild(e)})},setStyle:function(e,t,n){return this.run(e,function(e){var r=this,i,o;if(t)if("string"==typeof t){i=e.style,t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"number"!=typeof n||C[t]||(n+="px"),"opacity"===t&&e.runtimeStyle&&"undefined"==typeof e.runtimeStyle.opacity&&(i.filter=""===n?"":"alpha(opacity="+100*n+")"),"float"==t&&(t="cssFloat"in e.style?"cssFloat":"styleFloat");try{i[t]=n}catch(a){}r.settings.update_styles&&e.removeAttribute("data-mce-style")}else for(o in t)r.setStyle(e,o,t[o])})},getStyle:function(e,n,r){if(e=this.get(e)){if(this.doc.defaultView&&r){n=n.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(n)}catch(i){return null}}return n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=v?"styleFloat":"cssFloat"),e.currentStyle&&r?e.currentStyle[n]:e.style?e.style[n]:t}},setStyles:function(e,t){this.setStyle(e,t)},css:function(e,t,n){this.setStyle(e,t,n)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this;if(e&&t)return this.run(e,function(e){var i=r.settings,o=e.getAttribute(t);if(null!==n)switch(t){case"style":if(!f(n,"string"))return void d(n,function(t,n){r.setStyle(e,n,t)});i.keep_values&&(n?e.setAttribute("data-mce-style",n,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=n;break;case"class":e.className=n||"";break;case"src":case"href":i.keep_values&&(i.url_converter&&(n=i.url_converter.call(i.url_converter_scope||r,n,t,e)),r.setAttrib(e,"data-mce-"+t,n,2));break;case"shape":e.setAttribute("data-mce-style",n)}f(n)&&null!==n&&0!==n.length?e.setAttribute(t,""+n,2):e.removeAttribute(t,2),o!=n&&i.onSetAttrib&&i.onSetAttrib({attrElm:e,attrName:t,attrValue:n})})},setAttribs:function(e,t){var n=this;return this.run(e,function(e){d(t,function(t,r){n.setAttrib(e,r,t)})})},getAttrib:function(e,t,n){var r,i=this,o;if(e=i.get(e),!e||1!==e.nodeType)return n===o?!1:n;if(f(n)||(n=""),/^(src|href|style|coords|shape)$/.test(t)&&(r=e.getAttribute("data-mce-"+t)))return r;if(v&&i.props[t]&&(r=e[i.props[t]],r=r&&r.nodeValue?r.nodeValue:r),r||(r=e.getAttribute(t,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(t))return e[i.props[t]]===!0&&""===r?t:r?t:"";if("FORM"===e.nodeName&&e.getAttributeNode(t))return e.getAttributeNode(t).nodeValue;if("style"===t&&(r=r||e.style.cssText,r&&(r=i.serializeStyle(i.parseStyle(r),e.nodeName),i.settings.keep_values&&e.setAttribute("data-mce-style",r))),g&&"class"===t&&r&&(r=r.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),v)switch(t){case"rowspan":case"colspan":1===r&&(r="");break;case"size":("+0"===r||20===r||0===r)&&(r="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===r&&(r="");break;case"hspace":-1===r&&(r="");break;case"maxlength":case"tabindex":(32768===r||2147483647===r||"32768"===r)&&(r="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===r?t:n;case"shape":r=r.toLowerCase();break;default:0===t.indexOf("on")&&r&&(r=(""+r).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1"))}return r!==o&&null!==r&&""!==r?""+r:n},getPos:function(e,t){var n=this,r=0,i=0,o,a=n.doc,s;if(e=n.get(e),t=t||a.body,e){if(t===a.body&&e.getBoundingClientRect)return s=e.getBoundingClientRect(),t=n.boxModel?a.documentElement:a.body,r=s.left+(a.documentElement.scrollLeft||a.body.scrollLeft)-t.clientLeft,i=s.top+(a.documentElement.scrollTop||a.body.scrollTop)-t.clientTop,{x:r,y:i};for(o=e;o&&o!=t&&o.nodeType;)r+=o.offsetLeft||0,i+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)r-=o.scrollLeft||0,i-=o.scrollTop||0,o=o.parentNode}return{x:r,y:i}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==u.DOM&&n===document){var o=u.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,u.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==u.DOM&&n===document?void u.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void d(e.split(","),function(e){var i;t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),v&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){return this.run(e,function(e){var n;return t?this.hasClass(e,t)?e.className:(n=this.removeClass(e,t),e.className=n=(""!==n?n+" ":"")+t,n):0})},removeClass:function(e,t){var n=this,r;return n.run(e,function(e){var i;return n.hasClass(e,t)?(r||(r=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g")),i=e.className.replace(r," "),i=h(" "!=i?i:""),e.className=i,i||(e.removeAttribute("class"),e.removeAttribute("className")),i):e.className})},hasClass:function(e,t){return e=this.get(e),e&&t?-1!==(" "+e.className+" ").indexOf(" "+t+" "):!1},toggleClass:function(e,n,r){r=r===t?!this.hasClass(e,n):r,this.hasClass(e,n)!==r&&(r?this.addClass(e,n):this.removeClass(e,n))},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){var n=this;return n.run(e,function(e){if(v){for(;e.firstChild;)e.removeChild(e.firstChild);try{e.innerHTML="
    "+t,e.removeChild(e.firstChild)}catch(r){var i=n.create("div");i.innerHTML="
    "+t,d(p(i.childNodes),function(t,n){n&&e.canHaveHTML&&e.appendChild(t)})}}else e.innerHTML=t;return t})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){var r=this;return r.run(e,function(e){function i(){var i,o;for(o=n.createElement("body"),o.innerHTML=t,i=o.lastChild;i;)r.insertAfter(i.cloneNode(!0),e),i=i.previousSibling;r.remove(e)}if(1==e.nodeType)if(n=n||e.ownerDocument||r.doc,v)try{1==e.nodeType&&r.hasOuterHTML?e.outerHTML=t:i()}catch(o){i()}else i()})},decode:a.decode,encode:a.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return f(t,"array")&&(e=e.cloneNode(!0)),n&&d(p(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),d(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(l.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],d(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,o,a,s,l,c=0;if(e=e.firstChild){s=new i(e,e.parentNode),t=t||n.schema?n.schema.getNonEmptyElements():null;do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(o=n.getAttribs(e),r=o.length;r--;)if(l=o[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!b.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new o(this)},nodeIndex:function(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n},split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=h(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.replaceChild(n,t):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(l.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(l.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n]; -this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},u.DOM=new u(document),u}),r(b,[y,p],function(e,t){function n(){function e(e,t){function n(){o.remove(s),a&&(a.onreadystatechange=a.onload=a=null),t()}function i(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var o=r,a,s;s=o.uniqueId(),a=document.createElement("script"),a.id=s,a.type="text/javascript",a.src=e,"onreadystatechange"in a?a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&n()}:a.onload=n,a.onerror=i,(document.getElementsByTagName("head")[0]||document.body).appendChild(a)}var t=0,n=1,a=2,s={},l=[],c={},u=[],d=0,f;this.isDone=function(e){return s[e]==a},this.markDone=function(e){s[e]=a},this.add=this.load=function(e,n,r){var i=s[e];i==f&&(l.push(e),s[e]=t),n&&(c[e]||(c[e]=[]),c[e].push({func:n,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(l,e,t)},this.loadScripts=function(t,r,l){function p(e){i(c[e],function(e){e.func.call(e.scope)}),c[e]=f}var h;u.push({func:r,scope:l||this}),(h=function(){var r=o(t);t.length=0,i(r,function(t){return s[t]==a?void p(t):void(s[t]!=n&&(s[t]=n,d++,e(t,function(){s[t]=a,d--,p(t),h()})))}),d||(i(u,function(e){e.func.call(e.scope)}),u.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(C,[b,p],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&a.call(s?s:e)}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(x,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(w,[p],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e){var t={},n,r;for(n=0,r=e.length;r>n;n++)t[e[n]]={};return t}var o,l,c,u=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),l=3;lo;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},s,l,c,u,d,f;return r[e]?r[e]:(s=t("id accesskey class dir lang style tabindex title"),l=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),c=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(s.push.apply(s,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),l.push.apply(l,t("article aside details dialog figure header footer hgroup section nav")),c.push.apply(c,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(s.push("xml:lang"),f=t("acronym applet basefont big font strike tt"),c.push.apply(c,f),o(f,function(e){n(e,"",c)}),d=t("center dir isindex noframes"),l.push.apply(l,d),u=[].concat(l,c),o(d,function(e){n(e,"",u)})),u=u||[].concat(l,c),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),n("address dt dd div caption","",u),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",c),n("blockquote","cite",u),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",u),n("dl","","dt dd"),n("a","href target rel media hreflang type",c),n("q","cite",c),n("ins del","cite datetime",u),n("img","src alt usemap ismap width height"),n("iframe","src name width height",u),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",u,"param"),n("param","name value"),n("map","name",u,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",u),n("th","colspan rowspan headers scope abbr",u),n("form","accept-charset action autocomplete enctype method name novalidate target",u),n("fieldset","disabled form name",u,"legend"),n("label","form for",c),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?u:c),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",u,"li"),n("noscript","",u),"html4"!=e&&(n("wbr"),n("ruby","",c,"rt rp"),n("figcaption","",u),n("mark rt rp summary bdi","",c),n("canvas","width height",u),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",u,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",u,"track source"),n("source","src type media"),n("track","kind src srclang label default"),n("datalist","",c,"option"),n("article section nav aside header footer","",u),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",u,"figcaption"),n("time","datetime",c),n("dialog","open",u),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",c),n("progress","value max",c),n("meter","value min max low high optimum",c),n("details","open",u,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid codebase codetype archive standby align border hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select","onchange"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!=e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("iframe","sandbox seamless allowfullscreen")),o(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,r[e]=a,a)}var r={},i=e.makeMap,o=e.each,a=e.extend,s=e.explode,l=e.inArray;return function(e){function c(t,n,o){var s=e[t];return s?s=i(s,/[, ]/,i(s.toUpperCase(),/[, ]/)):(s=r[t],s||(s=i(n," ",i(n.toUpperCase()," ")),s=a(s,o),r[t]=s)),s}function u(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function d(e){var n,r,o,a,s,c,d,f,p,h,m,g,y,C,x,w,_,N,E,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),v["@"]&&(w=v["@"].attributes,_=v["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(C=s[1],p=s[2],x=s[3],f=s[5],g={},y=[],c={attributes:g,attributesOrder:y},"#"===C&&(c.paddEmpty=!0),"-"===C&&(c.removeEmpty=!0),"!"===s[4]&&(c.removeEmptyAttrs=!0),w){for(N in w)g[N]=w[N];y.push.apply(y,_)}if(f)for(f=t(f,"|"),o=0,a=f.length;a>o;o++)if(s=k.exec(f[o])){if(d={},m=s[1],h=s[2].replace(/::/g,":"),C=s[3],E=s[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(h),d.required=!0),"-"===m){delete g[h],y.splice(l(y,h),1);continue}C&&("="===C&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:h,value:E}),d.defaultValue=E),":"===C&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:h,value:E}),d.forcedValue=E),"<"===C&&(d.validValues=i(E,"?"))),T.test(h)?(c.attributePatterns=c.attributePatterns||[],d.pattern=u(h),c.attributePatterns.push(d)):(g[h]||y.push(h),g[h]=d)}w||"@"!=p||(w=g,_=y),x&&(c.outputName=p,v[x]=c),T.test(p)?(c.pattern=u(p),b.push(c)):v[p]=c}}function f(e){v={},b=[],d(e),o(x,function(e,t){y[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(r.text_block_elements=r.block_elements=null,o(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",s=t[2];if(y[s]=y[i],R[s]=i,r||(S[s.toUpperCase()]={},S[s]={}),!v[s]){var l=v[i];l=a({},l),delete l.removeEmptyAttrs,delete l.removeEmpty,v[s]=l}o(y,function(e,t){e[i]&&(y[t]=e=a({},y[t]),e[s]=e[i])})}))}function h(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&o(t(e,","),function(e){var r=n.exec(e),i,s;r&&(s=r[1],i=s?y[r[2]]:y[r[2]]={"#comment":{}},i=y[r[2]],o(t(r[3],"|"),function(e){"-"===s?(y[r[2]]=i=a({},y[r[2]]),delete i[e]):i[e]={}}))})}function m(e){var t=v[e],n;if(t)return t;for(n=b.length;n--;)if(t=b[n],t.pattern.test(e))return t}var g=this,v={},y={},b=[],C,x,w,_,N,E,S,k,T,R={},A={};e=e||{},x=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),e.valid_styles&&(C={},o(e.valid_styles,function(e,t){C[t]=s(e)})),w=c("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=c("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),N=c("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),E=c("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),k=c("non_empty_elements","td th iframe video audio object script",N),T=c("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),S=c("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",T),o((e.special||"script noscript style textarea").split(" "),function(e){A[e]=new RegExp("]*>","gi")}),e.valid_elements?f(e.valid_elements):(o(x,function(e,t){v[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},y[t]=e.children}),"html5"!=e.schema&&o(t("strong/b em/i"),function(e){e=t(e,"/"),v[e[1]].outputName=e[0]}),v.img.attributesDefault=[{name:"alt",value:""}],o(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){v[e]&&(v[e].removeEmpty=!0)}),o(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){v[e].paddEmpty=!0}),o(t("span"),function(e){v[e].removeEmptyAttrs=!0})),p(e.custom_elements),h(e.valid_children),d(e.extended_valid_elements),h("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&o(s(e.invalid_elements),function(e){v[e]&&delete v[e]}),m("span")||d("span[!data-mce-type|*]"),g.children=y,g.styles=C,g.getBoolAttrs=function(){return E},g.getBlockElements=function(){return S},g.getTextBlockElements=function(){return T},g.getShortEndedElements=function(){return N},g.getSelfClosingElements=function(){return _},g.getNonEmptyElements=function(){return k},g.getWhiteSpaceElements=function(){return w},g.getSpecialElements=function(){return A},g.isValidChild=function(e,t){var n=y[e];return!(!n||!n[t])},g.isValid=function(e,t){var n,r,i=m(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},g.getElementRule=m,g.getCustomElements=function(){return R},g.addValidElements=d,g.setValidElements=f,g.addCustomElements=p,g.addValidChildren=h,g.elements=v}}),r(_,[w,m,p],function(e,t,n){var r=n.each;return function(i,o){function a(){}var s=this;i=i||{},s.schema=o=o||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),r("comment cdata text start end pi doctype".split(" "),function(e){e&&(s[e]=i[e]||a)}),s.parse=function(e){function r(e){var t,n;for(t=f.length;t--&&f[t].name!==e;);if(t>=0){for(n=f.length-1;n>=t;n--)e=f[n],e.valid&&s.end(e.name);f.length=t}}function a(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in C?t:F(n||r||o||""),w&&!v&&0!==t.indexOf("data-")){if(a=k[t],!a&&T){for(s=T.length;s--&&(a=T[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(W[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(V.test(c))return;if(!i.allow_html_data_urls&&U.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var s=this,l,c=0,u,d,f=[],p,h,m,g,v,y,b,C,x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I=0,F=t.decode,z,W=n.makeMap("src,href,data,background,formaction,poster"),V=/((java|vb)script|mhtml):/i,U=/^data:/i;for(M=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,b=o.getShortEndedElements(),L=i.self_closing_elements||o.getSelfClosingElements(),C=o.getBoolAttrs(),w=i.validate,y=i.remove_internals,z=i.fix_self_closing,P=o.getSpecialElements();l=M.exec(e);){if(c0&&f[f.length-1].name===u&&r(u),!w||(_=o.getElementRule(u))){if(N=!0,w&&(k=_.attributes,T=_.attributePatterns),(S=l[8])?(v=-1!==S.indexOf("data-mce-type"),v&&y&&(N=!1),p=[],p.map={},S.replace(H,a)):(p=[],p.map={}),w&&!v){if(R=_.attributesRequired,A=_.attributesDefault,B=_.attributesForced,D=_.removeEmptyAttrs,D&&!p.length&&(N=!1),B)for(h=B.length;h--;)E=B[h],g=E.name,O=E.value,"{$uid}"===O&&(O="mce_"+I++),p.map[g]=O,p.push({name:g,value:O});if(A)for(h=A.length;h--;)E=A[h],g=E.name,g in p.map||(O=E.value,"{$uid}"===O&&(O="mce_"+I++),p.map[g]=O,p.push({name:g,value:O}));if(R){for(h=R.length;h--&&!(R[h]in p.map););-1===h&&(N=!1)}p.map["data-mce-bogus"]&&(N=!1)}N&&s.start(u,p,x)}else N=!1;if(d=P[u]){d.lastIndex=c=l.index+l[0].length,(l=d.exec(e))?(N&&(m=e.substr(c,l.index-c)),c=l.index+l[0].length):(m=e.substr(c),c=e.length),N&&(m.length>0&&s.text(m,!0),s.end(u)),M.lastIndex=c;continue}x||(S&&S.indexOf("/")==S.length-1?N&&s.end(u):f.push({name:u,valid:N}))}else(u=l[1])?(">"===u.charAt(0)&&(u=" "+u),i.allow_conditional_comments||"[if"!==u.substr(0,3)||(u=" "+u),s.comment(u)):(u=l[2])?s.cdata(u):(u=l[3])?s.doctype(u):(u=l[4])&&s.pi(u,l[5]);c=l.index+l[0].length}for(c=0;h--)u=f[h],u.valid&&s.end(u.name)}}}),r(N,[x,w,_,p],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,p,h,m,g,v,y;for(m=i("tr,td,th,tbody,thead,tfoot,table"),h=l.getNonEmptyElements(),g=l.getTextBlockElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),p=0;p0?(t.value=n,t=t.prev):(r=t.prev,t.remove(),t=r)}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,_,N,E,S,k,T,R,A=[],B,D,L,M,H,P,O,I;if(o=o||{},p={},h={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),P=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,H=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=P[b.name],s&&P[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(E=h[a],E?E.push(r):h[a]=[r]);T[e]&&m(r),n||(b=r),!B&&H[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&H[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,b.empty().remove(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in p){for(E=d[S],C=p[S],_=C.length;_--;)C[_].parent||C.splice(_,1);for(x=0,w=E.length;w>x;x++)E[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(E=f[x],E.name in h){for(C=h[E.name],_=C.length;_--;)C[_].parent||C.splice(_,1);for(_=0,N=E.callbacks.length;N>_;_++)E.callbacks[_](C,E.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,p,h;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(p=l.getElementRule(c.name),p&&(p.removeEmpty?c.remove():p.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(h=new e("#text",3),h.value="\xa0",i.replace(h))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}})}}),r(E,[m,p],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');r[r.length]=!n||l?">":" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push(""),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push(""):r.push(""),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(S,[E,w],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,p,h,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(f=[],f.map={},m=r.getElementRule(e.name),p=0,h=m.attributesOrder.length;h>p;p++)u=m.attributesOrder[p],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(p=0,h=c.length;h>p;p++)u=c[p].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(k,[y,N,m,S,x,w,g,p],function(e,t,n,r,i,o,a,s){var l=s.each,c=s.trim,u=e.DOM;return function(e,i){var s,d,f;return i&&(s=i.dom,d=i.schema),s=s||u,d=d||new o(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,f=new t(e,d),f.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),f.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope,u;r--;)i=t[r],o=i.attributes.map[a],o!==u?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=s.serializeStyle(s.parseStyle(o),i.name):l&&(o=l.call(c,o,n,i.name)),i.attr(n,o.length>0?o:null))}),f.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null)}),f.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),f.addAttributeFilter("data-mce-expando",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),f.addNodeFilter("noscript",function(e){for(var t=e.length,r;t--;)r=e[t].firstChild,r&&(r.value=n.decode(r.value))}),f.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o;r--;)if(i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t){var a=(i.attr("type")||"text/javascript").replace(/^mce\-/,"");i.attr("type","text/javascript"===a?null:a),o.length>0&&(i.firstChild.value="// ")}else o.length>0&&(i.firstChild.value="")}),f.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),f.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&f.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,("ul"===r.name||"ol"===r.name)&&n.prev&&"li"===n.prev.name&&n.prev.append(n)}),f.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:d,addNodeFilter:f.addNodeFilter,addAttributeFilter:f.addAttributeFilter,serialize:function(t,n){var i=this,o,u,p,h,m;return a.ie&&s.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),s.setHTML(t,m)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(u=o.createHTMLDocument(""),l("BODY"==t.nodeName?t.childNodes:[t],function(e){u.body.appendChild(u.importNode(e,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,p=s.doc,s.doc=u),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,i.onPreProcess(n)),h=new r(e,d),n.content=h.serialize(f.parse(c(n.getInner?t.innerHTML:s.getOuterHTML(t)),n)),n.cleanup||(n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||i.onPostProcess(n),p&&(s.doc=p),n.node=null,n.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.setValidElements(e)},onPreProcess:function(e){i&&i.fire("PreProcess",e)},onPostProcess:function(e){i&&i.fire("PostProcess",e)}}}}),r(T,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode; -if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(u=l.nodeValue,s+=u.length,s>=i){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(s+=l.nodeValue.length,s>=i){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,h;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),(t==f||t==f.documentElement)&&(t=p,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(h=t.childNodes,h.length?(n>=h.length?i.insertAfter(a,h[h.length-1]):t.insertBefore(a,h[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,p=f.body,h,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=p.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=p.createControlRange(),a.addElement(m),a.select(),h=e.getRng(),h.item&&m===h.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(R,[g],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return(e.mac?t.metaKey:t.ctrlKey)&&!t.altKey}}}),r(A,[R,p,g],function(e,t,n){return function(r,i){function o(e){var t=i.settings.object_resizing;return t===!1||n.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:i.dom.is(e,t))}function a(t){var n,r;n=t.screenX-k,r=t.screenY-T,H=n*E[2]+B,P=r*E[3]+D,H=5>H?5:H,P=5>P?5:P,(e.modifierPressed(t)||"IMG"==w.nodeName&&E[2]*E[3]!==0)&&(H=Math.round(P/L),P=Math.round(H*L)),C.setStyles(_,{width:H,height:P}),E[2]<0&&_.clientWidth<=H&&C.setStyle(_,"left",R+(B-H)),E[3]<0&&_.clientHeight<=P&&C.setStyle(_,"top",A+(D-P)),M||(i.fire("ObjectResizeStart",{target:w,width:B,height:D}),M=!0)}function s(){function e(e,t){t&&(w.style[e]||!i.schema.isValid(w.nodeName.toLowerCase(),e)?C.setStyle(w,e,t):C.setAttrib(w,e,t))}M=!1,e("width",H),e("height",P),C.unbind(O,"mousemove",a),C.unbind(O,"mouseup",s),I!=O&&(C.unbind(I,"mousemove",a),C.unbind(I,"mouseup",s)),C.remove(_),F&&"TABLE"!=w.nodeName||l(w),i.fire("ObjectResized",{target:w,width:H,height:P}),i.nodeChanged()}function l(e,t,r){var l,u,d,f,p,h=i.getBody();g(),l=C.getPos(e,h),R=l.x,A=l.y,p=e.getBoundingClientRect(),u=p.width||p.right-p.left,d=p.height||p.bottom-p.top,w!=e&&(m(),w=e,H=P=0),f=i.fire("ObjectSelected",{target:e}),o(e)&&!f.isDefaultPrevented()?x(N,function(e,o){function l(t){k=t.screenX,T=t.screenY,B=w.clientWidth,D=w.clientHeight,L=D/B,E=e,_=w.cloneNode(!0),C.addClass(_,"mce-clonedresizable"),_.contentEditable=!1,_.unSelectabe=!0,C.setStyles(_,{left:R,top:A,margin:0}),_.removeAttribute("data-mce-selected"),i.getBody().appendChild(_),C.bind(O,"mousemove",a),C.bind(O,"mouseup",s),I!=O&&(C.bind(I,"mousemove",a),C.bind(I,"mouseup",s))}var c,f;return t?void(o==t&&l(r)):(c=C.get("mceResizeHandle"+o),c?C.show(c):(f=i.getBody(),c=C.add(f,"div",{id:"mceResizeHandle"+o,"data-mce-bogus":!0,"class":"mce-resizehandle",unselectable:!0,style:"cursor:"+o+"-resize; margin:0; padding:0"}),n.ie&&(c.contentEditable=!1)),e.elm||(C.bind(c,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),l(e)}),e.elm=c),void C.setStyles(c,{left:u*e[0]+R-c.offsetWidth/2,top:d*e[1]+A-c.offsetHeight/2}))}):c(),w.setAttribute("data-mce-selected","1")}function c(){var e,t;g(),w&&w.removeAttribute("data-mce-selected");for(e in N)t=C.get("mceResizeHandle"+e),t&&(C.unbind(t),C.remove(t))}function u(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n;return x(C.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),n="mousedown"==e.type?e.target:r.getNode(),n=C.getParent(n,F?"table":"table,img,hr"),t(n,i.getBody())&&(v(),t(r.getStart(),n)&&t(r.getEnd(),n)&&(!F||n!=r.getStart()&&"IMG"!==r.getStart().nodeName))?void l(n):void c()}function d(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function f(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function p(e){var t=e.srcElement,n,r,o,a,s,c,u;n=t.getBoundingClientRect(),c=S.clientX-n.left,u=S.clientY-n.top;for(r in N)if(o=N[r],a=t.offsetWidth*o[0],s=t.offsetHeight*o[1],Math.abs(a-c)<8&&Math.abs(s-u)<8){E=o;break}M=!0,i.getDoc().selection.empty(),l(t,r,S)}function h(e){var t=e.srcElement;if(t!=w){if(m(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);("IMG"==t.nodeName||"TABLE"==t.nodeName)&&(c(),w=t,d(t,"resizestart",p))}}function m(){f(w,"resizestart",p)}function g(){for(var e in N){var t=N[e];t.elm&&(C.unbind(t.elm),delete t.elm)}}function v(){try{i.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function y(e){var t;if(F){t=O.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function b(){w=_=null,F&&(m(),f(i.getBody(),"controlselect",h))}var C=i.dom,x=t.each,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O=i.getDoc(),I=document,F=n.ie&&n.ie<11;N={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var z=".mce-content-body";return i.contentStyles.push(z+" div.mce-resizehandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}"+z+" .mce-resizehandle:hover {background: #000}"+z+" img[data-mce-selected], hr[data-mce-selected] {outline: 1px solid black;resize: none}"+z+" .mce-clonedresizable {position: absolute;"+(n.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"),i.on("init",function(){F?(i.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(c(),y(e.target))}),d(i.getBody(),"controlselect",h),i.on("mousedown",function(e){S=e})):(v(),n.ie>=11&&(i.on("mouseup",function(e){var t=e.target.nodeName;/^(TABLE|IMG|HR)$/.test(t)&&(i.selection.select(e.target,"TABLE"==t),i.nodeChanged())}),i.dom.bind(i.getBody(),"mscontrolselect",function(e){/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&window.setTimeout(function(){i.selection.select(e.target)},0))}))),i.on("nodechange mousedown mouseup ResizeEditor",u),i.on("keydown keyup",function(e){w&&"TABLE"==w.nodeName&&u(e)}),i.on("hide",c)}),i.on("remove",g),{isResizable:o,showResizeRect:l,hideResizeRect:c,updateResizeRect:u,controlSelect:y,destroy:b}}}),r(B,[p,f],function(e,t){function n(e){this.walk=function(t,n){function i(e){var t;return t=e[0],3===t.nodeType&&t===l&&c>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===d&&e.length>0&&t===u&&3===t.nodeType&&e.splice(e.length-1,1),e}function o(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,r){var a=r?"nextSibling":"previousSibling";for(m=e,g=m.parentNode;m&&m!=t;m=g)g=m.parentNode,v=o(m==e?m:m[a],a),v.length&&(r||v.reverse(),n(i(v)))}var l=t.startContainer,c=t.startOffset,u=t.endContainer,d=t.endOffset,f,p,h,m,g,v,y;if(y=e.select("td.mce-item-selected,th.mce-item-selected"),y.length>0)return void r(y,function(e){n([e])});if(1==l.nodeType&&l.hasChildNodes()&&(l=l.childNodes[c]),1==u.nodeType&&u.hasChildNodes()&&(u=u.childNodes[Math.min(d-1,u.childNodes.length-1)]),l==u)return n(i([l]));for(f=e.findCommonAncestor(l,u),m=l;m;m=m.parentNode){if(m===u)return s(l,f,!0);if(m===f)break}for(m=u;m;m=m.parentNode){if(m===l)return s(u,f);if(m===f)break}p=a(l,f)||l,h=a(u,f)||u,s(l,p,!0),v=o(p==l?p:p.nextSibling,"nextSibling",h==u?h.nextSibling:h),v.length&&n(i(v)),s(u,h)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return c=p,u=n?p.nodeValue.length:0,void(i=!0);if(e.isBlock(p)||h[p.nodeName.toLowerCase()])return;s=p}o&&s&&(c=s,i=!0,u=0)}var c,u,d,f=e.getRoot(),p,h,m,g;if(c=n[(r?"start":"end")+"Container"],u=n[(r?"start":"end")+"Offset"],g=1==c.nodeType&&u===c.childNodes.length,h=e.schema.getNonEmptyElements(),m=r,1==c.nodeType&&u>c.childNodes.length-1&&(m=!1),9===c.nodeType&&(c=e.getRoot(),u=0),c===f){if(m&&(p=c.childNodes[u>0?u-1:0],p&&(h[p.nodeName]||"TABLE"==p.nodeName)))return;if(c.hasChildNodes()&&(u=Math.min(!m&&u>0?u-1:u,c.childNodes.length-1),c=c.childNodes[u],u=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){p=c,d=new t(c,f);do{if(3===p.nodeType&&p.nodeValue.length>0){u=m?0:p.nodeValue.length,c=p,i=!0;break}if(h[p.nodeName.toLowerCase()]){u=e.nodeIndex(p),c=p.parentNode,"IMG"!=p.nodeName||m||u++,i=!0;break}}while(p=m?d.next():d.prev())}}o&&(3===c.nodeType&&0===u&&l(!0),1===c.nodeType&&(p=c.childNodes[u],p||(p=c.childNodes[u-1]),!p||"BR"!==p.nodeName||s(p,"A")||a(p)||a(p,!0)||l(!0,p))),m&&!o&&3===c.nodeType&&u===c.nodeValue.length&&l(!1),i&&n["set"+(r?"Start":"End")](c,u)}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}var r=e.each;return n.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},n}),r(D,[f,T,A,B,g,p],function(e,n,r,i,o,a){function s(e,t,i,o){var a=this;a.dom=e,a.win=t,a.serializer=i,a.editor=o,a.controlSelection=new r(a,o),a.win.getSelection||(a.tridentSel=new n(a))}var l=a.each,c=a.grep,u=a.trim,d=o.ie,f=o.opera;return s.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
    "+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(){var e=this,t=e.getRng(),n,r,i,o;if(t.duplicate||t.item){if(t.item)return t.item(0);for(i=t.duplicate(),i.collapse(1),n=i.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),r=o=t.parentElement();o=o.parentNode;)if(o==n){n=r;break}return n}return n=t.startContainer,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&3==n.nodeType?n.parentNode:n},getEnd:function(){var e=this,t=e.getRng(),n,r;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collapse(0),n=t.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),n&&"BODY"==n.nodeName?n.lastChild||n:n):(n=t.endContainer,r=t.endOffset,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[r>0?r-1:r]),n&&3==n.nodeType?n.parentNode:n)},getBookmark:function(e,t){function n(e,t){var n=0;return l(a.select(e),function(e,r){e==t&&(n=r)}),n}function r(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function i(){function e(e,n){var i=e[n?"startContainer":"endContainer"],a=e[n?"startOffset":"endOffset"],s=[],l,c,u=0;if(3==i.nodeType){if(t)for(l=i.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=i.childNodes,a>=c.length&&c.length&&(u=1,a=Math.max(0,c.length-1)),s.push(o.dom.nodeIndex(c[a],t)+u);for(;i&&i!=r;i=i.parentNode)s.push(o.dom.nodeIndex(i,t));return s}var n=o.getRng(!0),r=a.getRoot(),i={};return i.start=e(n,!0),o.isCollapsed()||(i.end=e(n)),i}var o=this,a=o.dom,s,c,u,d,f,p,h="",m;if(2==e)return p=o.getNode(),f=p?p.nodeName:null,"IMG"==f?{name:f,index:n(f,p)}:o.tridentSel?o.tridentSel.getBookmark(e):i();if(e)return{rng:o.getRng()};if(s=o.getRng(),u=a.uniqueId(),d=o.isCollapsed(),m="overflow:hidden;line-height:0px",s.duplicate||s.item){if(s.item)return p=s.item(0),f=p.nodeName,{name:f,index:n(f,p)};c=s.duplicate();try{s.collapse(),s.pasteHTML(''+h+""),d||(c.collapse(!1),s.moveToElementText(c.parentElement()),0===s.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML(''+h+""))}catch(g){return null}}else{if(p=o.getNode(),f=p.nodeName,"IMG"==f)return{name:f,index:n(f,p)};c=r(s.cloneRange()),d||(c.collapse(!1),c.insertNode(a.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:m},h))),s=r(s),s.collapse(!0),s.insertNode(a.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:m},h))}return o.moveToBookmark({id:u,keep:1}),{id:u}},moveToBookmark:function(e){function t(t){var n=e[t?"start":"end"],r,i,o,l;if(n){for(o=n[0],i=s,r=n.length-1;r>=1;r--){if(l=i.childNodes,n[r]>l.length-1)return;i=l[n[r]]}3===i.nodeType&&(o=Math.min(n[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(n[0],i.childNodes.length)),t?a.setStart(i,o):a.setEnd(i,o)}return!0}function n(t){var n=o.get(e.id+"_"+t),r,i,a,s,d=e.keep;if(n&&(r=n.parentNode,"start"==t?(d?(r=n.firstChild,i=1):i=o.nodeIndex(n),u=p=r,h=m=i):(d?(r=n.firstChild,i=1):i=o.nodeIndex(n),p=r,m=i),!d)){for(s=n.previousSibling,a=n.nextSibling,l(c(n.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});n=o.get(e.id+"_"+t);)o.remove(n,1);s&&a&&s.nodeType==a.nodeType&&3==s.nodeType&&!f&&(i=s.nodeValue.length,s.appendData(a.nodeValue),o.remove(a),"start"==t?(u=p=s,h=m=i):(p=s,m=i))}}function r(e){return!o.isBlock(e)||e.innerHTML||d||(e.innerHTML='
    '),e}var i=this,o=i.dom,a,s,u,p,h,m;if(e)if(e.start){if(a=o.createRng(),s=o.getRoot(),i.tridentSel)return i.tridentSel.moveToBookmark(e);t(!0)&&t()&&i.setRng(a)}else e.id?(n("start"),n("end"),u&&(a=o.createRng(),a.setStart(r(u),h),a.setEnd(r(p),m),i.setRng(a))):e.name?i.select(o.select(e.name)[e.index]):e.rng&&i.setRng(e.rng)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a=n.win.document,s;if(!e&&n.lastFocusBookmark){var l=n.lastFocusBookmark;return l.startContainer?(i=a.createRange(),i.setStart(l.startContainer,l.startOffset),i.setEnd(l.endContainer,l.endOffset)):i=l,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(c){}if(d&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(c){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r;if(e.select)try{e.select()}catch(i){}else if(n.tridentSel){if(e.cloneRange)try{return void n.tridentSel.addRange(e)}catch(i){}}else if(r=n.getSel()){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(i){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,l=t.dom.getRoot();return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return!d&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};l(n.selectorChangedData,function(e,t){l(o,function(n){return i.is(n,t)?(r[t]||(l(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),l(r,function(e,n){a[n]||(delete r[n],l(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e){function t(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var n,r,i=this,o=i.dom,a=o.getRoot(),s,l;if("BODY"!=a.nodeName){var c=i.getScrollContainer();if(c)return n=t(e).y-t(c).y,l=c.clientHeight,s=c.scrollTop,void((s>n||n+25>s+l)&&(c.scrollTop=s>n?n:n-l+25))}r=o.getViewPort(i.editor.getWin()),n=o.getPos(e).y,s=r.y,l=r.h,(ns+l)&&i.editor.getWin().scrollTo(0,s>n?n:n-l+25)},_moveEndPoint:function(t,n,r){var i=n,a=new e(n,i),s=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==u(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(s[n.nodeName])return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(o.ie&&o.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?a.next():a.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},destroy:function(){this.win=null,this.controlSelection.destroy()}},s}),r(L,[p],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(M,[f,B,p,L],function(e,t,n,r){return function(i){function o(e){return e.nodeType&&(e=e.nodeName),!!i.schema.getTextBlockElements()[e.toLowerCase()]}function a(e,t){return z.getParents(e,t,z.getRoot())}function s(e){return 1===e.nodeType&&"_mce_caret"===e.id}function l(){d({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){nt(n,function(t,n){z.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),nt("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){d(e,{block:e,remove:"all"})}),d(i.settings.formats)}function c(){i.addShortcut("ctrl+b","bold_desc","Bold"),i.addShortcut("ctrl+i","italic_desc","Italic"),i.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)i.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);i.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),i.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),i.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function u(e){return e?F[e]:F}function d(e,t){e&&("string"!=typeof e?nt(e,function(e,t){d(t,e)}):(t=t.length?t:[t],nt(t,function(e){e.deep===Q&&(e.deep=!e.selector),e.split===Q&&(e.split=!e.selector||e.inline),e.remove===Q&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),F[e]=t))}function f(e){var t;return i.dom.getParent(e,function(e){return t=i.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function p(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=f(e.parentNode),i.dom.getStyle(e,"color")&&t?i.dom.setStyle(e,"text-decoration",t):i.dom.getStyle(e,"textdecoration")===t&&i.dom.setStyle(e,"text-decoration",null))}function h(t,n,r){function a(e,t){if(t=t||m,e){if(t.onformat&&t.onformat(e,t,n,r),nt(t.styles,function(t,r){z.setStyle(e,r,k(t,n))}),t.styles){var i=z.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}nt(t.attributes,function(t,r){z.setAttrib(e,r,k(t,n))}),nt(t.classes,function(t){t=k(t,n),z.hasClass(e,t)||z.addClass(e,t)})}}function l(){function t(t,n){var i=new e(n);for(r=i.current();r;r=i.prev())if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}var n=i.selection.getRng(),o=n.startContainer,a=n.endContainer;if(o!=a&&0===n.endOffset){var s=t(o,a),l=3==s.nodeType?s.length:s.childNodes.length;n.setEnd(s,l)}return n}function c(e,t,n,r,i){var o=[],a=-1,s,l=-1,c=-1,u;return nt(e.childNodes,function(e,t){return"UL"===e.nodeName||"OL"===e.nodeName?(a=t,s=e,!1):void 0}),nt(e.childNodes,function(e,n){"SPAN"===e.nodeName&&"bookmark"==z.getAttrib(e,"data-mce-type")&&(e.id==t.id+"_start"?l=n:e.id==t.id+"_end"&&(c=n))}),0>=a||a>l&&c>a?(nt(rt(e.childNodes),i),0):(u=z.clone(n,Y),nt(rt(e.childNodes),function(e,t){(a>l&&a>t||l>a&&t>a)&&(o.push(e),e.parentNode.removeChild(e))}),a>l?e.insertBefore(u,s):l>a&&e.insertBefore(u,s.nextSibling),r.push(u),nt(o,function(e){u.appendChild(e)}),u)}function d(e,r,i){var l=[],u,d,p=!0;u=m.inline||m.block,d=z.create(u),a(d),V.walk(e,function(e){function h(e){var y,C,x,w,_;return _=p,y=e.nodeName.toLowerCase(),C=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&Z(e)&&(_=p,p="true"===Z(e),w=!0),N(y,"br")?(g=0,void(m.block&&z.remove(e))):m.wrapper&&v(e,t,n)?void(g=0):p&&!w&&m.block&&!m.wrapper&&o(y)&&U(C,u)?(e=z.rename(e,u),a(e),l.push(e),void(g=0)):m.selector&&(nt(f,function(t){"collapsed"in t&&t.collapsed!==b||z.is(e,t.selector)&&!s(e)&&(a(e,t),x=!0)}),!m.inline||x)?void(g=0):void(!p||w||!U(u,y)||!U(C,u)||!i&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||s(e)||m.inline&&q(e)?"li"==y&&r?g=c(e,r,d,l,h):(g=0,nt(rt(e.childNodes),h),w&&(p=_),g=0):(g||(g=z.clone(d,Y),e.parentNode.insertBefore(g,e),l.push(g)),g.appendChild(e)))}var g;nt(e,h)}),m.wrap_links===!1&&nt(l,function(e){function t(e){var n,r,i;if("A"===e.nodeName){for(r=z.clone(d,Y),l.push(r),i=rt(e.childNodes),n=0;n1||!q(e))&&0===o)return void z.remove(e,1);if(m.inline||m.wrapper){if(m.exact||1!==o||(e=i(e)),nt(f,function(t){nt(z.select(t.inline,e),function(e){var r;if(!M(e)){if(t.wrap_links===!1){r=e.parentNode;do if("A"===r.nodeName)return;while(r=r.parentNode)}B(t,n,e,t.exact?e:null)}})}),v(e.parentNode,t,n))return z.remove(e,1),e=0,X;m.merge_with_parents&&z.getParent(e.parentNode,function(r){return v(r,t,n)?(z.remove(e,1),e=0,X):void 0}),e&&m.merge_siblings!==!1&&(e=H(L(e),e),e=H(e,L(e,X)))}})}var f=u(t),m=f[0],g,y,b=!r&&W.isCollapsed();if(m)if(r)r.nodeType?(y=z.createRng(),y.setStartBefore(r),y.setEndAfter(r),d(A(y,f),null,!0)):d(r,null,!0);else if(b&&m.inline&&!z.select("td.mce-item-selected,th.mce-item-selected").length)O("apply",t,n);else{var C=i.selection.getNode();$||!f[0].defaultBlock||z.getParent(C,z.isBlock)||h(f[0].defaultBlock),i.selection.setRng(l()),g=W.getBookmark(),d(A(W.getRng(X),f),g),m.styles&&(m.styles.color||m.styles.textDecoration)&&(it(C,p,"childNodes"),p(C)),W.moveToBookmark(g),I(W.getRng(X)),i.nodeChanged()}}function m(e,t,n){function r(e){var n,i,o,a,s;if(1===e.nodeType&&Z(e)&&(a=b,b="true"===Z(e),s=!0),n=rt(e.childNodes),b&&!s)for(i=0,o=p.length;o>i&&!B(p[i],t,e,e);i++);if(h.deep&&n.length){for(i=0,o=n.length;o>i;i++)r(n[i]);s&&(b=a)}}function o(n){var r;return nt(a(n.parentNode).reverse(),function(n){var i;r||"_start"==n.id||"_end"==n.id||(i=v(n,e,t),i&&i.split!==!1&&(r=n))}),r}function s(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=z.clone(o,Y),c=0;c=0;o--){if(s=t[o].selector,!s||t[o].defaultBlock)return X;for(i=r.length-1;i>=0;i--)if(z.is(r[i],s))return X}return Y}function x(e,t,n){var r;return J||(J={},r={},i.on("NodeChange",function(e){var t=a(e.element),n={};nt(J,function(e,i){nt(t,function(o){return v(o,i,{},e.similar)?(r[i]||(nt(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):void 0})}),nt(r,function(i,o){n[o]||(delete r[o],nt(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),nt(e.split(","),function(e){J[e]||(J[e]=[],J[e].similar=n),J[e].push(t)}),this}function w(e){return r.getCssText(i,e)}function _(e,t){return N(e,t.inline)?X:N(e,t.block)?X:t.selector?1==e.nodeType&&z.is(e,t.selector):void 0}function N(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function E(e,t){return S(z.getStyle(e,t),t)}function S(e,t){return("color"==t||"backgroundColor"==t)&&(e=z.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function k(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function T(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function R(e,t,n){var r=z.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function A(t,n,r){function s(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=z.getRoot(),3==r.nodeType&&!T(r)&&(e?v>0:bi?n:i,-1===n||r||n++):(n=a.indexOf(" ",t),i=a.indexOf("\xa0",t),n=-1!==n&&(-1===i||i>n)?n:i),n}var s,l,c,u;if(3===t.nodeType){if(c=a(t,n),-1!==c)return{container:t,offset:c};u=t}for(s=new e(t,z.getParent(t,q)||i.getBody());l=s[o?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=a(l),-1!==c)return{container:l,offset:c}}else if(q(l))break;return u?(n=o?0:u.length,{container:u,offset:n}):void 0}function d(e,r){var i,o,s,l;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=a(e),o=0;op?p:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(p=y.childNodes.length-1,y=y.childNodes[b>p?p:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=c(g),y=c(y),(M(g.parentNode)||M(g))&&(g=M(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(M(y.parentNode)||M(y))&&(y=M(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=u(g,v,!0),m&&(g=m.container,v=m.offset),m=u(y,b),m&&(y=m.container,b=m.offset)),h=l(y,b),h.node)){for(;h.node&&0===h.offset&&h.node.previousSibling;)h=l(h.node.previousSibling);h.node&&h.offset>0&&3===h.node.nodeType&&" "===h.node.nodeValue.charAt(h.offset-1)&&h.offset>1&&(y=h.node,y.splitText(h.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=s(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=s())),n[0].selector&&n[0].expand!==Y&&!n[0].inline&&(g=d(g,"previousSibling"),y=d(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(q(g)||(g=s(!0)),q(y)||(y=s()))),1==g.nodeType&&(v=j(g),g=g.parentNode),1==y.nodeType&&(b=j(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function B(e,t,n,r){var i,o,a;if(!_(n,e))return Y;if("all"!=e.remove)for(nt(e.styles,function(e,i){e=S(k(e,t),i),"number"==typeof i&&(i=e,r=0),(!r||N(E(r,i),e))&&z.setStyle(n,i,""),a=1}),a&&""===z.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),nt(e.attributes,function(e,i){var o;if(e=k(e,t),"number"==typeof i&&(i=e,r=0),!r||N(z.getAttrib(r,i),e)){if("class"==i&&(e=z.getAttrib(n,i),e&&(o="",nt(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void z.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),G.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),nt(e.classes,function(e){e=k(e,t),(!r||z.hasClass(r,e))&&z.removeClass(n,e)}),o=z.getAttribs(n),i=0;ia?a:o]),3===r.nodeType&&n&&o>=r.nodeValue.length&&(r=new e(r,i.getBody()).next()||r),3!==r.nodeType||n||0!==o||(r=new e(r,i.getBody()).prev()||r),r}function O(t,n,r){function a(e){var t=z.create("span",{id:y,"data-mce-bogus":!0,style:b?"color:red":""});return e&&t.appendChild(i.getDoc().createTextNode(K)),t}function s(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==K||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function l(e){for(;e;){if(e.id===y)return e;e=e.parentNode}}function c(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=W.getRng(!0),s(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),z.remove(e)):(n=c(e),n.nodeValue.charAt(0)===K&&(n=n.deleteData(0,1)),z.remove(e,1)),W.setRng(r);else if(e=l(W.getStart()),!e)for(;e=z.get(y);)d(e,!1)}function f(){var e,t,i,o,s,d,f;e=W.getRng(!0),o=e.startOffset,d=e.startContainer,f=d.nodeValue,t=l(W.getStart()),t&&(i=c(t)),f&&o>0&&o=0;p--)c.appendChild(z.clone(f[p],!1)),c=c.firstChild;c.appendChild(z.doc.createTextNode(K)),c=c.firstChild;var g=z.getParent(d,o);g&&z.isEmpty(g)?d.parentNode.replaceChild(h,d):z.insertAfter(h,d),W.setCursorLocation(c,1),z.isEmpty(d)&&z.remove(d)}}function g(){var e;e=l(W.getStart()),e&&!z.isEmpty(e)&&it(e,function(e){1!=e.nodeType||e.id===y||z.isEmpty(e)||z.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var y="_mce_caret",b=i.settings.caret_debug;i._hasCaretEvents||(tt=function(){var e=[],t;if(s(l(W.getStart()),e))for(t=e.length;t--;)z.setAttrib(e[t],"data-mce-bogus","1")},et=function(e){var t=e.keyCode;d(),(8==t||37==t||39==t)&&d(l(W.getStart())),g()},i.on("SetContent",function(e){e.selection&&g()}),i._hasCaretEvents=!0),"apply"==t?f():p()}function I(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if(3==n.nodeType&&r>=n.nodeValue.length&&(r=j(n),n=n.parentNode,i=!0),1==n.nodeType)for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,z.getParent(n,z.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!T(a))return l=z.create("a",null,K),a.parentNode.insertBefore(l,a),t.setStart(a,0),W.setRng(t),void z.remove(l)}var F={},z=i.dom,W=i.selection,V=new t(z),U=i.schema.isValidChild,q=z.isBlock,$=i.settings.forced_root_block,j=z.nodeIndex,K="\ufeff",G=/^(src|href|style)$/,Y=!1,X=!0,J,Q,Z=z.getContentEditable,et,tt,nt=n.each,rt=n.grep,it=n.walk,ot=n.extend;ot(this,{get:u,register:d,apply:h,remove:m,toggle:g,match:y,matchAll:b,matchNode:v,canApply:C,formatChanged:x,getCssText:w}),l(),c(),i.on("BeforeGetContent",function(){tt&&tt()}),i.on("mouseup keydown",function(e){et&&et(e)})}}),r(H,[g,p],function(e,t){var n=t.trim,r;return r=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","]+data-mce-bogus[^>]+><\\/div>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(t){function i(){return n(t.getContent({format:"raw",no_events:1}).replace(r,""))}function o(e){a.typing=!1,a.add({},e)}var a=this,s=0,l=[],c,u,d=0;return t.on("init",function(){a.add()}),t.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&a.beforeChange()}),t.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o(e)}),t.on("ObjectResizeStart",function(){a.beforeChange()}),t.on("SaveContent ObjectResized blur",o),t.on("DragEnd",o),t.on("KeyUp",function(n){var r=n.keyCode;(r>=33&&36>=r||r>=37&&40>=r||45==r||13==r||n.ctrlKey)&&(o(),t.nodeChanged()),(46==r||8==r||e.mac&&(91==r||93==r))&&t.nodeChanged(),u&&a.typing&&(t.isDirty()||(t.isNotDirty=!l[0]||i()==l[0].content,t.isNotDirty||t.fire("change",{level:l[0],lastLevel:null})),t.fire("TypingUndo"),u=!1,t.nodeChanged())}),t.on("KeyDown",function(e){var t=e.keyCode;return t>=33&&36>=t||t>=37&&40>=t||45==t?void(a.typing&&o(e)):void((16>t||t>20)&&224!=t&&91!=t&&!a.typing&&(a.beforeChange(),a.typing=!0,a.add({},e),u=!0))}),t.on("MouseDown",function(e){a.typing&&o(e)}),t.addShortcut("ctrl+z","","Undo"),t.addShortcut("ctrl+y,ctrl+shift+z","","Redo"),t.on("AddUndo Undo Redo ClearUndos MouseUp",function(e){e.isDefaultPrevented()||t.nodeChanged()}),a={data:l,typing:!1,beforeChange:function(){d||(c=t.selection.getBookmark(2,!0))},add:function(e,n){var r,o=t.settings,a;if(e=e||{},e.content=i(),d||t.removed)return null;if(a=l[s],t.fire("BeforeAddUndo",{level:e,lastLevel:a,originalEvent:n}).isDefaultPrevented())return null;if(a&&a.content==e.content)return null;if(l[s]&&(l[s].beforeBookmark=c),o.custom_undo_redo_levels&&l.length>o.custom_undo_redo_levels){for(r=0;r0&&(t.isNotDirty=!1,t.fire("change",u)),e},undo:function(){var e;return a.typing&&(a.add(),a.typing=!1),s>0&&(e=l[--s],0===s&&(t.isNotDirty=!0),t.setContent(e.content,{format:"raw"}),t.selection.moveToBookmark(e.beforeBookmark),t.fire("undo",{level:e})),e},redo:function(){var e;return s0||a.typing&&l[0]&&i()!=l[0].content},hasRedo:function(){return sD)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}function g(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function v(e){var t=R,n,i,o;if(e||"TABLE"==O?(n=a.create(e||F),g(n)):n=B.cloneNode(!1),o=n,l.keep_styles!==!1)do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U|VAR|CITE|DFN|CODE|MARK|Q|SUP|SUB|SAMP)$/.test(t.nodeName)){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while(t=t.parentNode);return r||(o.innerHTML='
    '),n}function y(t){var n,r,i;if(3==R.nodeType&&(t?A>0:A0)return!0}function w(){var e,t,n;R&&3==R.nodeType&&A>=R.nodeValue.length&&(r||x()||(e=a.create("br"),S.insertNode(e),S.setStartAfter(e),S.setEndAfter(e),t=!0)),e=a.create("br"),S.insertNode(e),r&&"PRE"==O&&(!D||8>D)&&e.parentNode.insertBefore(a.doc.createTextNode("\r"),e),n=a.create("span",{}," "),e.parentNode.insertBefore(n,e),s.scrollIntoView(n),a.remove(n),t?(S.setStartBefore(e),S.setEndBefore(e)):(S.setStartAfter(e),S.setEndAfter(e)),s.setRng(S),c.add()}function _(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function N(e){var t=a.getRoot(),n,r;for(n=e;n!==t&&"false"!==a.getContentEditable(n);)"true"===a.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==t?r:t}function E(e){var t;r||(e.normalize(),t=e.lastChild,(!t||/^(left|right)$/gi.test(a.getStyle(t,"float",!0)))&&a.add(e,"br"))}var S,k,T,R,A,B,D,L,M,H,P,O,I,F,z;if(S=s.getRng(!0),!o.isDefaultPrevented()){if(!S.collapsed)return void i.execCommand("Delete");if(new t(a).normalize(S),R=S.startContainer,A=S.startOffset,F=(l.force_p_newlines?"p":"")||l.forced_root_block,F=F?F.toUpperCase():"",D=a.doc.documentMode,L=o.shiftKey,1==R.nodeType&&R.hasChildNodes()&&(z=A>R.childNodes.length-1,R=R.childNodes[Math.min(A,R.childNodes.length-1)]||R,A=z&&3==R.nodeType?R.nodeValue.length:0),T=N(R)){if(c.beforeChange(),!a.isBlock(T)&&T!=a.getRoot())return void((!F||L)&&w());if((F&&!L||!F&&L)&&(R=b(R,A)),B=a.getParent(R,a.isBlock),P=B?a.getParent(B.parentNode,a.isBlock):null,O=B?B.nodeName.toUpperCase():"",I=P?P.nodeName.toUpperCase():"","LI"!=I||o.ctrlKey||(B=P,O=I),"LI"==O){if(!F&&L)return void w();if(a.isEmpty(B))return void C()}if("PRE"==O&&l.br_in_pre!==!1){if(!L)return void w()}else if(!F&&!L&&"LI"!=O||F&&L)return void w();F&&B===i.getBody()||(F=F||"P",y()?(M=/^(H[1-6]|PRE|FIGURE)$/.test(O)&&"HGROUP"!=I?v(F):v(),l.end_container_on_empty_block&&f(P)&&a.isEmpty(B)?M=a.split(P,B):a.insertAfter(M,B),m(M)):y(!0)?(M=B.parentNode.insertBefore(v(),B),p(M),m(B)):(k=S.cloneRange(),k.setEndAfter(B),H=k.extractContents(),_(H),M=H.firstChild,a.insertAfter(H,B),h(M),E(B),m(M)),a.setAttrib(M,"id",""),i.fire("NewBlock",{newBlock:M}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(O,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,p,h,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){h=t,t=t.nextSibling,r.remove(h);continue}p||(p=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(p,t),g=!0),h=t,t=t.nextSibling,p.appendChild(h)}else p=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(I,[S,g,p],function(e,n,r){var i=r.each,o=r.extend,a=r.map,s=r.inArray,l=r.explode,c=n.gecko,u=n.ie,d=!0,f=!1;return function(r){function p(e,t,n){var r;return e=e.toLowerCase(),(r=N.exec[e])?(r(e,t,n),d):f}function h(e){var t;return e=e.toLowerCase(),(t=N.state[e])?t(e):-1}function m(e){var t;return e=e.toLowerCase(),(t=N.value[e])?t(e):f}function g(e,t){t=t||"exec",i(e,function(e,n){i(n.toLowerCase().split(","),function(n){N[t][n]=e})})}function v(e,n,i){return n===t&&(n=f),i===t&&(i=null),r.getDoc().execCommand(e,n,i)}function y(e){return S.match(e)}function b(e,n){S.toggle(e,n?{value:n}:t),r.nodeChanged()}function C(e){k=_.getBookmark(e)}function x(){_.moveToBookmark(k)}var w=r.dom,_=r.selection,N={state:{},exec:{},value:{}},E=r.settings,S=r.formatter,k;o(this,{execCommand:p,queryCommandState:h,queryCommandValue:m,addCommands:g}),g({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{v(e)}catch(o){i=d}if(i||!t.queryCommandSupported(e)){var a=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");n.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),r.windowManager.alert(a)}},unlink:function(){if(_.isCollapsed()){var e=_.getNode();return void("A"==e.tagName&&r.dom.remove(e,!0))}S.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);"full"==t&&(t="justify"),i("left,center,right,justify".split(","),function(e){t!=e&&S.remove("align"+e)}),b("align"+t),p("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;v(e),t=w.getParent(_.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(C(),w.split(n,t),x()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){b(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){b(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=l(E.font_size_style_values),r=l(E.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),b(e,n)},RemoveFormat:function(e){S.remove(e)},mceBlockQuote:function(){b("blockquote")},FormatBlock:function(e,t,n){return b(n||"p")},mceCleanup:function(){var e=_.getBookmark();r.setContent(r.getContent({cleanup:d}),{cleanup:d}),_.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||_.getNode();i!=r.getBody()&&(C(),r.dom.remove(i,d),x())},mceSelectNodeDepth:function(e,t,n){var i=0;w.getParent(_.getNode(),function(e){return 1==e.nodeType&&i++==n?(_.select(e),f):void 0},r.getBody())},mceSelectNode:function(e,t,n){_.select(n)},mceInsertContent:function(t,n,i){function o(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=_.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
    |)$/," "))),e}var a,s,l,c,d,f,p,h,m,g,v;/^ | $/.test(i)&&(i=o(i)),a=r.parser,s=new e({},r.schema),v='ÈB;',f={content:i,format:"html",selection:!0},r.fire("BeforeSetContent",f),i=f.content,-1==i.indexOf("{$caret}")&&(i+="{$caret}"),i=i.replace(/\{\$caret\}/,v),h=_.getRng();var y=h.startContainer||(h.parentElement?h.parentElement():null),b=r.getBody();y===b&&_.isCollapsed()&&w.isBlock(b.firstChild)&&w.isEmpty(b.firstChild)&&(h=w.createRng(),h.setStart(b.firstChild,0),h.setEnd(b.firstChild,0),_.setRng(h)),_.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),l=_.getNode();var C={context:l.nodeName.toLowerCase()};if(d=a.parse(i,C),m=d.lastChild,"mce_marker"==m.attr("id"))for(p=m,m=m.prev;m;m=m.walk(!0))if(3==m.type||!w.isBlock(m.name)){m.parent.insert(p,m,"br"===m.name);break}if(C.invalid){for(_.setContent(v),l=_.getNode(),c=r.getBody(),9==l.nodeType?l=m=c:m=l;m!==c;)l=m,m=m.parentNode;i=l==c?c.innerHTML:w.getOuterHTML(l),i=s.serialize(a.parse(i.replace(//i,function(){return s.serialize(d)}))),l==c?w.setHTML(c,i):w.setOuterHTML(l,i)}else i=s.serialize(d),m=l.firstChild,g=l.lastChild,!m||m===g&&"BR"===m.nodeName?w.setHTML(l,i):_.setContent(i);p=w.get("mce_marker"),_.scrollIntoView(p),h=w.createRng(),m=p.previousSibling,m&&3==m.nodeType?(h.setStart(m,m.nodeValue.length),u||(g=p.nextSibling,g&&3==g.nodeType&&(m.appendData(g.data),g.parentNode.removeChild(g)))):(h.setStartBefore(p),h.setEndBefore(p)),w.remove(p),_.setRng(h),r.fire("SetContent",f),r.addVisual()},mceInsertRawHTML:function(e,t,n){_.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){b(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,o;t=E.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),h("InsertUnorderedList")||h("InsertOrderedList")?v(e):(E.forced_root_block||w.getParent(_.getNode(),w.isBlock)||S.apply("div"),i(_.getSelectedBlocks(),function(i){if("LI"!=i.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==w.getStyle(i,"direction",!0)?"Right":"Left","outdent"==e?(o=Math.max(0,parseInt(i.style[a]||0,10)-t),w.setStyle(i,a,o?o+n:"")):(o=parseInt(i.style[a]||0,10)+t+n,w.setStyle(i,a,o))}}))},mceRepaint:function(){if(c)try{C(d),_.getSel()&&_.getSel().selectAllChildren(r.getBody()),_.collapse(d),x()}catch(e){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"
    ")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,_.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=w.getParent(_.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||S.remove("link"),n.href&&S.apply("link",n,r)},selectAll:function(){var e=w.getRoot(),t;_.getRng().setStart?(t=w.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),_.setRng(t)):(t=_.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){v("Delete");var e=r.getBody();w.isEmpty(e)&&(r.setContent(""),e.firstChild&&w.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")}}),g({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=_.isCollapsed()?[w.getParent(_.getNode(),w.isBlock)]:_.getSelectedBlocks(),r=a(n,function(e){return!!S.matchNode(e,t)});return-1!==s(r,d)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return y(e)},mceBlockQuote:function(){return y("blockquote")},Outdent:function(){var e;if(E.inline_styles){if((e=w.getParent(_.getStart(),w.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return d;if((e=w.getParent(_.getEnd(),w.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return d -}return h("InsertUnorderedList")||h("InsertOrderedList")||!E.inline_styles&&!!w.getParent(_.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=w.getParent(_.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),g({"FontSize,FontName":function(e){var t=0,n;return(n=w.getParent(_.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),g({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(F,[p],function(e){function t(e,i){var o=this,a,s;if(e=r(e),i=o.settings=i||{},/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(o.source=e);var l=0===e.indexOf("//");0!==e.indexOf("/")||l||(e=(i.base_uri?i.base_uri.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(s=i.base_uri?i.base_uri.path:new t(location.href).directory,e=""===i.base_uri.protocol?"//mce_host"+o.toAbsPath(s,e):(i.base_uri&&i.base_uri.protocol||"http")+"://mce_host"+o.toAbsPath(s,e)),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),o[t]=r}),a=i.base_uri,a&&(o.protocol||(o.protocol=a.protocol),o.userInfo||(o.userInfo=a.userInfo),o.port||"mce_host"!==o.host||(o.port=a.port),o.host&&"mce_host"!==o.host||(o.host=a.host),o.source=""),l&&(o.protocol="")}var n=e.each,r=e.trim,i={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=i[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t}),r(z,[p],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){t=t;for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],u[d]="function"==typeof f&&c[d]?s(d,f):f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(W,[p],function(e){function t(e){function t(){return!1}function n(){return!0}function r(r,i){var o,a,s,u;if(r=r.toLowerCase(),i=i||{},i.type=r,i.target||(i.target=l),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=n},i.stopPropagation=function(){i.isPropagationStopped=n},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=n},i.isDefaultPrevented=t,i.isPropagationStopped=t,i.isImmediatePropagationStopped=t),e.beforeFire&&e.beforeFire(i),o=c[r])for(a=0,s=o.length;s>a;a++){if(o[a]=u=o[a],i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(u.call(l,i)===!1)return i.preventDefault(),i}return i}function i(e,n,r){var i,o,a;if(n===!1&&(n=t),n)for(o=e.toLowerCase().split(" "),a=o.length;a--;)e=o[a],i=c[e],i||(i=c[e]=[],u(e,!0)),r?i.unshift(n):i.push(n);return s}function o(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=c[e],!e){for(i in c)u(i,!1),delete c[i];return s}if(r){if(t)for(a=r.length;a--;)r[a]===t&&r.splice(a,1);else r.length=0;r.length||(u(e,!1),delete c[e])}}else{for(e in c)u(e,!1);c={}}return s}function a(e){return e=e.toLowerCase(),!(!c[e]||0===c[e].length)}var s=this,l,c={},u;e=e||{},l=e.scope||s,u=e.toggleEvent||t,s.fire=r,s.on=i,s.off=o,s.has=a}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(V,[z],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.hasClass(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.psuedo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,p,h;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,h=e,p=0,i=o-1;i>=0;i--)for(c=a[i];h;){if(c.psuedo)for(f=h.parent().items(),u=d=f.length;u--&&f[u]!==h;);for(s=0,l=c.length;l>s;s++)if(!c[s](h,u,d)){s=l+1;break}if(s===l){p++;break}if(i===o-1)break;h=h.parent()}if(p===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(U,[p,V,z],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].hasClass(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this}},e.each("fire on off show hide addClass removeClass append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(q,[p,y],function(e,t){return{id:function(){return t.DOM.uniqueId()},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r($,[z,p,W,U,q],function(e,t,n,r,i){function o(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e._rendered&&e.bindPendingEvents())}})),e._eventDispatcher}var a={},s="onmousewheel"in document,l=!1,c="mce-",u=e.extend({Statics:{elementIdCache:a,classPrefix:c},isRtl:function(){return u.rtl},classPrefix:c,init:function(e){var n=this,r,o;if(n.settings=e=t.extend({},n.Defaults,e),n._id=e.id||i.id(),n._text=n._name="",n._width=n._height=0,n._aria={role:e.role},r=e.classes)for(r=r.split(" "),r.map={},o=r.length;o--;)r.map[r[o]]=!0;n._classes=r||[],n.visible(!0),t.each("title text width height name classes visible disabled active value".split(" "),function(t){var r=e[t],i;r!==i?n[t](r):n["_"+t]===i&&(n["_"+t]=!1)}),n.on("click",function(){return n.disabled()?!1:void 0}),e.classes&&t.each(e.classes.split(" "),function(e){n.addClass(e)}),n.settings=e,n._borderBox=n.parseBox(e.border),n._paddingBox=n.parseBox(e.padding),n._marginBox=n.parseBox(e.margin),e.hidden&&n.hide()},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},borderBox:function(){return this._borderBox},paddingBox:function(){return this._paddingBox},marginBox:function(){return this._marginBox},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}},initLayoutRect:function(){var e=this,t=e.settings,n,r,o=e.getEl(),a,s,l,c,u,d,f,p;n=e._borderBox=e._borderBox||e.measureBox(o,"border"),e._paddingBox=e._paddingBox||e.measureBox(o,"padding"),e._marginBox=e._marginBox||e.measureBox(o,"margin"),p=i.getSize(o),d=t.minWidth,f=t.minHeight,l=d||p.width,c=f||p.height,a=t.width,s=t.height,u=t.autoResize,u="undefined"!=typeof u?u:!a&&!s,a=a||l,s=s||c;var h=n.left+n.right,m=n.top+n.bottom,g=t.maxWidth||65535,v=t.maxHeight||65535;return e._layoutRect=r={x:t.x||0,y:t.y||0,w:a,h:s,deltaW:h,deltaH:m,contentW:a-h,contentH:s-m,innerW:a-h,innerH:s-m,startMinWidth:d||0,startMinHeight:f||0,minW:Math.min(l,g),minH:Math.min(c,v),maxW:g,maxH:v,autoResize:u,scrollW:0},e._lastLayoutRect={},r},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=in.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h)&&(l=u.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o=0,a=0,s,l;l=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,r=e._layoutRect,s=e._lastRepaintRect||{},i=e._borderBox,o=i.left+i.right,a=i.top+i.bottom,r.x!==s.x&&(t.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(t.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(t.width=l(r.w-o)+"px",s.w=r.w),r.h!==s.h&&(t.height=l(r.h-a)+"px",s.h=r.h),e._hasBody&&r.innerW!==s.innerW&&(n=e.getEl("body").style,n.width=l(r.innerW)+"px",s.innerW=r.innerW),e._hasBody&&r.innerH!==s.innerH&&(n=n||e.getEl("body").style,n.height=l(r.innerH)+"px",s.innerH=r.innerH),e._lastRepaintRect=s,e.fire("repaint",{},!1)},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t.call(n,i)}}var r=this;return o(r).on(e,n(t)),r},off:function(e,t){return o(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=o(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return o(this).has(e)},parents:function(e){var t=this,n,i=new r;for(n=t.parent();n;n=n.parent())i.add(n);return e&&(i=i.filter(e)),i},parentsAndSelf:function(e){return new r(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},findCommonAncestor:function(e,t){for(var n;e;){for(n=t;n&&e!=n;)n=n.parent();if(e==n)break;e=e.parent()}return e},hasClass:function(e,t){var n=this._classes[t||"control"];return e=this.classPrefix+e,n&&!!n.map[e]},addClass:function(e,t){var n=this,r,i;return e=this.classPrefix+e,r=n._classes[t||"control"],r||(r=[],r.map={},n._classes[t||"control"]=r),r.map[e]||(r.map[e]=e,r.push(e),n._rendered&&(i=n.getEl(t),i&&(i.className=r.join(" ")))),n},removeClass:function(e,t){var n=this,r,i,o;if(e=this.classPrefix+e,r=n._classes[t||"control"],r&&r.map[e])for(delete r.map[e],i=r.length;i--;)r[i]===e&&r.splice(i,1);return n._rendered&&(o=n.getEl(t),o&&(o.className=r.join(" "))),n},toggleClass:function(e,t,n){var r=this;return t?r.addClass(e,n):r.removeClass(e,n),r},classes:function(e){var t=this._classes[e||"control"];return t?t.join(" "):""},innerHtml:function(e){return i.innerHtml(this.getEl(),e),this},getEl:function(e,t){var n,r=e?this._id+"-"+e:this._id;return n=a[r]=(t===!0?null:a[r])||i.get(r)},visible:function(e){var t=this,n;return"undefined"!=typeof e?(t._visible!==e&&(t._rendered&&(t.getEl().style.display=e?"":"none"),t._visible=e,n=t.parent(),n&&(n._lastRect=null),t.fire(e?"show":"hide")),t):t._visible},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n._rendered&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return u.translate?u.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,o;if(e.items){var s=e.items().toArray();for(o=s.length;o--;)s[o].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&i.off(t);var l=e.getRoot().controlIdLookup;if(l&&delete l[e._id],delete a[e._id],t&&t.parentNode){var c=t.getElementsByTagName("*");for(o=c.length;o--;)delete a[c[o].id];t.parentNode.removeChild(t)}return e._rendered=!1,e},renderBefore:function(e){var t=this;return e.parentNode.insertBefore(i.createFragment(t.renderHtml()),e),t.postRender(),t},renderTo:function(e){var t=this;return e=e||t.getContainerElm(),e.appendChild(i.createFragment(t.renderHtml())),t.postRender(),t},postRender:function(){var e=this,t=e.settings,n,r,o,a,s;for(a in t)0===a.indexOf("on")&&e.on(a.substr(2),t[a]);if(e._eventsRoot){for(o=e.parent();!s&&o;o=o.parent())s=o._eventsRoot;if(s)for(a in s._nativeEvents)e._nativeEvents[a]=!0}e.bindPendingEvents(),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e._visible||i.css(e.getEl(),"display","none"),e.settings.border&&(r=e.borderBox(),i.css(e.getEl(),{"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var c in e._aria)e.aria(c,e._aria[c]);e.fire("postrender",{},!1)},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},bindPendingEvents:function(){function e(e){var t=o.getParentCtrl(e.target);t&&t.fire(e.type,e)}function t(){var e=d._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),d._lastHoverCtrl=null)}function n(e){var t=o.getParentCtrl(e.target),n=d._lastHoverCtrl,r=0,i,a,s;if(t!==n){if(d._lastHoverCtrl=t,a=t.parents().toArray().reverse(),a.push(t),n){for(s=n.parents().toArray().reverse(),s.push(n),r=0;r=r;i--)n=s[i],n.fire("mouseleave",{target:n.getEl()})}for(i=r;ia;a++)d=u[a]._eventsRoot;for(d||(d=u[u.length-1]||o),o._eventsRoot=d,c=a,a=0;c>a;a++)u[a]._eventsRoot=d;var h=d._delegates;h||(h=d._delegates={});for(p in f){if(!f)return!1;"wheel"!==p||l?("mouseenter"===p||"mouseleave"===p?d._hasMouseEnter||(i.on(d.getEl(),"mouseleave",t),i.on(d.getEl(),"mouseover",n),d._hasMouseEnter=1):h[p]||(i.on(d.getEl(),p,e),h[p]=!0),f[p]=!1):s?i.on(o.getEl(),"mousewheel",r):i.on(o.getEl(),"DOMMouseScroll",r)}}},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){return this.repaint(),this}});return u}),r(j,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(K,[],function(){return function(e){function t(e){return e=e||b,e&&e.getAttribute("role")}function n(e){for(var n,r=e||b;r=r.parentNode;)if(n=t(r))return n}function r(e){var t=b;return t?t.getAttribute("aria-"+e):void 0}function i(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t}function o(e){return i(e)&&!e.hidden?!0:/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(t(e))?!0:!1}function a(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){o(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function u(e,t){var n=-1,r=s();t=t||a(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r,i;t.parent(e),t._rendered||(r=e.getEl("body"),i=a.createFragment(t.renderHtml()),r.hasChildNodes()&&n<=r.childNodes.length-1?r.insertBefore(i,r.childNodes[n]):r.appendChild(i),t.postRender())}),e._layout.applyClasses(e),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e._rendered=!0,e.settings.style&&a.css(e.getEl(),e.settings.style),e.settings.border&&(t=e.borderBox(),a.css(e.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(Y,[q],function(e){function t(){var e=document,t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}return function(n,r){function i(){return a.getElementById(r.handle||n)}var o,a=document,s,l,c,u,d,f;r=r||{},l=function(n){var l=t(),p,h;n.preventDefault(),s=n.button,p=i(),d=n.screenX,f=n.screenY,h=window.getComputedStyle?window.getComputedStyle(p,null).getPropertyValue("cursor"):p.runtimeStyle.cursor,o=a.createElement("div"),e.css(o,{position:"absolute",top:0,left:0,width:l.width,height:l.height,zIndex:2147483647,opacity:1e-4,background:"red",cursor:h}),a.body.appendChild(o),e.on(a,"mousemove",u),e.on(a,"mouseup",c),r.start(n)},u=function(e){return e.button!==s?c(e):(e.deltaX=e.screenX-d,e.deltaY=e.screenY-f,e.preventDefault(),void r.drag(e))},c=function(t){e.off(a,"mousemove",u),e.off(a,"mouseup",c),o.parentNode.removeChild(o),r.stop&&r.stop(t)},this.destroy=function(){e.off(i())},e.on(i(),"mousedown",l)}}),r(X,[q,Y],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,p,h,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),i.getEl("absend")&&e.css(i.getEl("absend"),y,i.layoutRect()[l]-1),!c)return void e.css(f,"display","none");e.css(f,"display","block"),d=i.getEl("body"),p=i.getEl("scroll"+t+"t"),h=d["client"+s]-2*o,h-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=h/m,v={},v[y]=d["offset"+a]+o,v[b]=h,e.css(f,v),v={},v[y]=d["scroll"+a]*g,v[b]=h*g,e.css(p,v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;i.getEl().appendChild(e.createFragment('
    ')),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e.addClass(e.get(u),d+"active")},drag:function(e){var t,u,d,f,p=i.layoutRect();u=p.contentW>p.innerW,d=p.contentH>p.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e.removeClass(e.get(u),d+"active")}})}i.addClass("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e.on(i.getEl("body"),"scroll",n)),n())}}}),r(J,[G,X],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='
    '+t.renderHtml(e)+"
    ":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
    '+(e._preBodyHtml||"")+n+"
    "}})}),r(Q,[q],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,p;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t._fixed&&(a-=f.x,s-=f.y),i=t.getEl(),p=e.getSize(i),l=p.width,c=p.height,p=e.getSize(n),u=p.width,d=p.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i._rendered?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Z,[q],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(et,[J,Q,Z,q],function(e,t,n,r){function i(e){var t;for(t=s.length;t--;)s[t]===e&&s.splice(t,1);for(t=l.length;t--;)l[t]===e&&l.splice(t,1)}var o,a,s=[],l=[],c,u=e.extend({Mixins:[t,n],init:function(e){function t(){var e,t=u.zIndex||65535,n;if(l.length)for(e=0;en&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY'),n=n.firstChild,d.getContainerElm().appendChild(n),setTimeout(function(){r.addClass(n,i+"in"),r.addClass(d.getEl(),i+"in")},0),c=!0),l.push(d),t()}}),d.on("close hide",function(e){if(e.control==d){for(var n=l.length;n--;)l[n]===d&&l.splice(n,1);t()}}),d.on("show",function(){d.parents().each(function(e){return e._fixed?(d.fixed(!0),!1):void 0})}),e.popover&&(d._preBodyHtml='
    ',d.addClass("popover").addClass("bottom").addClass(d.isRtl()?"end":"start"))},fixed:function(e){var t=this;if(t._fixed!=e){if(t._rendered){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.toggleClass("fixed",e),t._fixed=e}return t},show:function(){var e=this,t,n=e._super();for(t=s.length;t--&&s[t]!==e;);return-1===t&&s.push(e),n},hide:function(){return i(this),this._super()},hideAll:function(){u.hideAll()},close:function(){var e=this;return e.fire("close"),e.remove()},remove:function(){i(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return u.hideAll=function(){for(var e=s.length;e--;){var t=s[e];t&&t.settings.autohide&&(t.hide(),s.splice(e,1))}},u}),r(tt,[et,J,q,Y],function(e,t,n,r){var i=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.addClass("rtl"),n.addClass("window"),n._fixed=!0,e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.addClass("foot"),n.statusbar.parent(n)),n.on("click",function(e){-1!=e.target.className.indexOf(n.classPrefix+"close")&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,r,i,o,a;e._fullscreen&&(e.layoutRect(n.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),r=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=r.headerW,i>r.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=Math.max(0,a.w/2-t.w/2),t.y=Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='
    '+e.encode(i.title)+'
    '),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
    '+o+'
    '+s+"
    "+a+"
    "},fullscreen:function(e){var t=this,r=document.documentElement,i,o=t.classPrefix,a;if(e!=t._fullscreen)if(n.on(window,"resize",function(){var e;if(t._fullscreen)if(i)t._timer||(t._timer=setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(i=!0)}}),a=t.layoutRect(),t._fullscreen=e,e){t._initial={x:a.x,y:a.y,w:a.w,h:a.h},t._borderBox=t.parseBox("0"),t.getEl("head").style.display="none",a.deltaH-=a.headerH+2,n.addClass(r,o+"fullscreen"),n.addClass(document.body,o+"fullscreen"),t.addClass("fullscreen");var s=n.getWindowSize();t.moveTo(0,0).resizeTo(s.w,s.h)}else t._borderBox=t.parseBox(t.settings.border),t.getEl("head").style.display="",a.deltaH+=a.headerH,n.removeClass(r,o+"fullscreen"),n.removeClass(document.body,o+"fullscreen"),t.removeClass("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.addClass("in")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new r(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t=e.classPrefix;e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),e._fullscreen&&(n.removeClass(document.documentElement,t+"fullscreen"),n.removeClass(document.body,t+"fullscreen"))},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return i}),r(nt,[tt],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){var r,i=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}},{type:"button",text:"Cancel",onClick:function(e){e.control.parents()[1].close(),i(!1)}}];break;case t.YES_NO:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}];break;case t.YES_NO_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close()}}];break;default:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:r,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){i(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(rt,[tt,nt],function(e,t){return function(n){function r(){return o.length?o[o.length-1]:void 0}var i=this,o=[];i.windows=o,i.open=function(t,r){var i;return n.editorManager.activeEditor=n,t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),i=new e(t),o.push(i),i.on("close",function(){for(var e=o.length;e--;)o[e]===i&&o.splice(e,1);n.focus()}),t.data&&i.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),i.features=t||{},i.params=r||{},n.nodeChanged(),i.renderTo().reflow()},i.alert=function(e,r,i){t.alert(e,function(){r?r.call(i||this):n.focus()})},i.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})},i.close=function(){r()&&r().close()},i.getParams=function(){return r()?r().params:null},i.setParams=function(e){r()&&(r().params=e)},i.getWindows=function(){return o}}}),r(it,[R,B,x,m,g,p],function(e,t,n,r,i,o){return function(a){function s(e,t){try{a.getDoc().execCommand(e,!1,t)}catch(n){}}function l(){var e=a.getDoc().documentMode;return e?e:6}function c(e){return e.isDefaultPrevented()}function u(){function t(e){var t=new i(function(){});o.each(a.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&a.dom.setAttrib(e,"style",e.getAttribute("style"))}),t.observe(a.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),a.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null);var n=a.selection.getRng(),r=n.startContainer.parentNode;o.each(t.takeRecords(),function(e){if(q.isChildOf(e.target,a.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}o.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),q.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),a.selection.setRng(n))}})}}),t.disconnect(),o.each(a.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")})}var n=a.getDoc(),r="data:text/mce-internal,",i=window.MutationObserver,s,l;i||(s=!0,i=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),a.on("keydown",function(n){var r=n.keyCode==U,i=e.metaKeyPressed(n);if(!c(n)&&(r||n.keyCode==V)){var o=a.selection.getRng(),s=o.startContainer,l=o.startOffset;if(!i&&o.collapsed&&3==s.nodeType&&(r?l0))return;n.preventDefault(),i&&a.selection.getSel().modify("extend",r?"forward":"backward","word"),t(r)}}),a.on("keypress",function(n){c(n)||$.isCollapsed()||!n.charCode||e.metaKeyPressed(n)||(n.preventDefault(),t(!0),a.selection.setContent(String.fromCharCode(n.charCode)))}),a.addCommand("Delete",function(){t()}),a.addCommand("ForwardDelete",function(){t(!0)}),s||(a.on("dragstart",function(e){var t;a.selection.isCollapsed()&&"IMG"==e.target.tagName&&$.select(e.target),l=$.getRng(),t=a.selection.getContent(),t.length>0&&e.dataTransfer.setData("URL","data:text/mce-internal,"+escape(t))}),a.on("drop",function(e){if(!c(e)){var i=e.dataTransfer.getData("URL");if(!i||-1==i.indexOf(r)||!n.caretRangeFromPoint)return;i=unescape(i.substr(r.length)),n.caretRangeFromPoint&&(e.preventDefault(),window.setTimeout(function(){var r=n.caretRangeFromPoint(e.x,e.y);l&&($.setRng(l),l=null),t(),$.setRng(r),a.insertContent(i)},0))}}),a.on("cut",function(e){!c(e)&&e.clipboardData&&(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",a.selection.getContent()),e.clipboardData.setData("text/plain",a.selection.getContent({format:"text"})),t(!0))}))}function d(){function e(e){var t=q.create("body"),n=e.cloneContents();return t.appendChild(n),$.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(a.getBody()),t.compareRanges(n,r)}var i=e(n),o=q.createRng();o.selectNode(a.getBody());var s=e(o);return i===s}a.on("keydown",function(e){var t=e.keyCode,r,i;if(!c(e)&&(t==U||t==V)){if(r=a.selection.isCollapsed(),i=a.getBody(),r&&!q.isEmpty(i))return;if(!r&&!n(a.selection.getRng()))return;e.preventDefault(),a.setContent(""),i.firstChild&&q.isBlock(i.firstChild)?a.selection.setCursorLocation(i.firstChild,0):a.selection.setCursorLocation(i,0),a.nodeChanged()}})}function f(){a.on("keydown",function(t){!c(t)&&65==t.keyCode&&e.metaKeyPressed(t)&&(t.preventDefault(),a.execCommand("SelectAll"))})}function p(){a.settings.content_editable||(q.bind(a.getDoc(),"focusin",function(){$.setRng($.getRng())}),q.bind(a.getDoc(),"mousedown",function(e){e.target==a.getDoc().documentElement&&(a.getBody().focus(),$.setRng($.getRng()))}))}function h(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===V&&$.isCollapsed()&&0===$.getRng(!0).startOffset){var t=$.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return q.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(q.remove(n),e.preventDefault())}})}function m(){window.Range.prototype.getClientRects||a.on("mousedown",function(e){if(!c(e)&&"HTML"===e.target.nodeName){var t=a.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function g(){a.on("click",function(e){e=e.target,/^(IMG|HR)$/.test(e.nodeName)&&$.getSel().setBaseAndExtent(e,0,e,1),"A"==e.nodeName&&q.hasClass(e,"mce-item-anchor")&&$.select(e),a.nodeChanged()})}function v(){function e(){var e=q.getAttribs($.getStart().cloneNode(!1));return function(){var t=$.getStart();t!==a.getBody()&&(q.setAttrib(t,"style",null),W(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!$.isCollapsed()&&q.getParent($.getStart(),q.isBlock)!=q.getParent($.getEnd(),q.isBlock)}a.on("keypress",function(n){var r;return c(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),a.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),q.bind(a.getDoc(),"cut",function(n){var r;!c(n)&&t()&&(r=e(),setTimeout(function(){r()},0))})}function y(){var e,n;a.on("selectionchange",function(){n&&(clearTimeout(n),n=0),n=window.setTimeout(function(){if(!a.removed){var n=$.getRng();e&&t.compareRanges(n,e)||(a.nodeChanged(),e=n)}},50)})}function b(){document.body.setAttribute("role","application")}function C(){a.on("keydown",function(e){if(!c(e)&&e.keyCode===V&&$.isCollapsed()&&0===$.getRng(!0).startOffset){var t=$.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function x(){l()>7||(s("RespectVisibilityInDesign",!0),a.contentStyles.push(".mceHideBrInPre pre br {display: none}"),q.addClass(a.getBody(),"mceHideBrInPre"),K.addNodeFilter("pre",function(e){for(var t=e.length,r,i,o,a;t--;)for(r=e[t].getAll("br"),i=r.length;i--;)o=r[i],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new n("#text",3),o,!0).value="\n"}),G.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function w(){q.bind(a.getBody(),"mouseup",function(){var e,t=$.getNode();"IMG"==t.nodeName&&((e=q.getStyle(t,"width"))&&(q.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"width","")),(e=q.getStyle(t,"height"))&&(q.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),q.setStyle(t,"height","")))})}function _(){a.on("keydown",function(t){var n,r,i,o,s;if(!c(t)&&t.keyCode==e.BACKSPACE&&(n=$.getRng(),r=n.startContainer,i=n.startOffset,o=q.getRoot(),s=r,n.collapsed&&0===i)){for(;s&&s.parentNode&&s.parentNode.firstChild==s&&s.parentNode!=o;)s=s.parentNode;"BLOCKQUOTE"===s.tagName&&(a.formatter.toggle("blockquote",null,s),n=q.createRng(),n.setStart(r,0),n.setEnd(r,0),$.setRng(n))}})}function N(){function e(){a._refreshContentEditable(),s("StyleWithCSS",!1),s("enableInlineTableEditing",!1),j.object_resizing||s("enableObjectResizing",!1)}j.readonly||a.on("BeforeExecCommand MouseDown",e)}function E(){function e(){W(q.select("a"),function(e){var t=e.parentNode,n=q.getRoot();if(t.lastChild===e){for(;t&&!q.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}q.add(t,"br",{"data-mce-bogus":1})}})}a.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&e()})}function S(){j.forced_root_block&&a.on("init",function(){s("DefaultParagraphSeparator",j.forced_root_block)})}function k(){a.on("Undo Redo SetContent",function(e){e.initial||a.execCommand("mceRepaint")})}function T(){a.on("keydown",function(e){var t;c(e)||e.keyCode!=V||(t=a.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),a.undoManager.beforeChange(),q.remove(t.item(0)),a.undoManager.add()))})}function R(){var e;l()>=10&&(e="",W("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),a.contentStyles.push(e+"{padding-right: 1px !important}"))}function A(){l()<9&&(K.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),G.addNodeFilter("noscript",function(e){for(var t=e.length,i,o,a;t--;)i=e[t],o=e[t].firstChild,o?o.value=r.decode(o.value):(a=i.attributes.map["data-mce-innertext"],a&&(i.attr("data-mce-innertext",null),o=new n("#text",3),o.value=a,o.raw=!0,i.append(o)))}))}function B(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),q.unbind(r,"mouseup",n),q.unbind(r,"mousemove",t),a=o=0}var r=q.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,q.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(q.bind(r,"mouseup",n),q.bind(r,"mousemove",t),q.getRoot().focus(),a.select())}})}function D(){a.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||$.normalize()},!0)}function L(){a.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function M(){a.inline||a.on("keydown",function(){document.activeElement==document.body&&a.getWin().focus()})}function H(){a.inline||(a.contentStyles.push("body {min-height: 150px}"),a.on("click",function(e){"HTML"==e.target.nodeName&&(a.getBody().focus(),a.selection.normalize(),a.nodeChanged())}))}function P(){i.mac&&a.on("keydown",function(t){!e.metaKeyPressed(t)||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),a.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","word"))})}function O(){s("AutoUrlDetect",!1)}function I(){a.inline||a.on("focus blur beforegetcontent",function(){var e=a.dom.create("br");a.getBody().appendChild(e),e.parentNode.removeChild(e)},!0)}function F(){a.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),a.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function z(){a.on("init",function(){a.dom.bind(a.getBody(),"submit",function(e){e.preventDefault()})})}var W=o.each,V=e.BACKSPACE,U=e.DELETE,q=a.dom,$=a.selection,j=a.settings,K=a.parser,G=a.serializer,Y=i.gecko,X=i.ie,J=i.webkit;C(),_(),d(),D(),J&&(u(),p(),g(),S(),z(),i.iOS?(y(),M(),H(),F()):f()),X&&i.ie<11&&(h(),b(),x(),w(),T(),R(),A(),B()),i.ie>=11&&(H(),I()),i.ie&&(f(),O()),Y&&(h(),m(),v(),N(),E(),k(),L(),P())}}),r(ot,[W],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(at,[ot,y,p],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop/.test(t)?e.getDoc():e.getBody()}function i(e,t){var n=e.settings.event_root,i=e.editorManager,a=i.eventRootElm||r(e,t);if(n){if(i.rootEvents||(i.rootEvents={},i.on("RemoveEditor",function(){i.activeEditor||(o.unbind(a),delete i.rootEvents)})),i.rootEvents[t])return;a==e.getBody()&&(a=o.select(n)[0],i.eventRootElm=a),i.rootEvents[t]=!0,o.bind(a,t,function(e){for(var n=e.target,r=i.editors,a=r.length;a--;){var s=r[a].getBody();(s===n||o.isChildOf(n,s))&&(r[a].hidden||r[a].fire(t,e))}})}else e.dom.bind(a,t,function(n){e.hidden||e.fire(t,n)})}var o=t.DOM,a={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;n.settings.readonly||"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&n.dom.unbind(r(n,e),e))}};return a=n.extend({},e,a)}),r(st,[p,g],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122};return function(o){var a=this,s={};o.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&n(s,function(n){var r=t.mac?e.metaKey:e.ctrlKey;if(n.ctrl==r&&n.alt==e.altKey&&n.shift==e.shiftKey)return e.keyCode==n.keyCode||e.charCode&&e.charCode==n.charCode?(e.preventDefault(),"keydown"==e.type&&n.func.call(n.scope),!0):void 0})}),a.add=function(t,a,l,c){var u;return u=l,"string"==typeof l?l=function(){o.execCommand(u,!1,null)}:e.isArray(u)&&(l=function(){o.execCommand(u[0],u[1],u[2])}),n(r(t.toLowerCase()),function(e){var t={func:l,scope:c||o,desc:o.translate(a),alt:!1,ctrl:!1,shift:!1};n(r(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":t[e]=!0;break;default:t.charCode=e.charCodeAt(0),t.keyCode=i[e]||e.toUpperCase().charCodeAt(0)}}),s[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t}),!0}}}),r(lt,[y,C,x,k,S,D,M,H,P,O,I,F,b,l,rt,w,N,it,g,p,at,st],function(e,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w){function _(e,t,r){var i=this,o,a;o=i.documentBaseUrl=r.documentBaseURL,a=r.baseURI,i.settings=t=k({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:i.convertURL,url_converter_scope:i,ie7_compat:!0},t),n.language=t.language||"en",n.languageLoad=t.language_load,n.baseURL=r.baseURL,i.id=t.id=e,i.isNotDirty=!0,i.plugins={},i.documentBaseURI=new f(t.document_base_url||o,{base_uri:a}),i.baseURI=a,i.contentCSS=[],i.contentStyles=[],i.shortcuts=new w(i),i.execCommands={},i.queryStateCommands={},i.queryValueCommands={},i.loadedCSS={},i.suffix=r.suffix,i.editorManager=r,i.inline=t.inline,r.fire("SetupEditor",i),i.execCallback("setup",i)}var N=e.DOM,E=n.ThemeManager,S=n.PluginManager,k=C.extend,T=C.each,R=C.explode,A=C.inArray,B=C.trim,D=C.resolve,L=h.Event,M=b.gecko,H=b.ie;return _.prototype={render:function(){function e(){N.unbind(window,"ready",e),n.render()}function t(){var e=p.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!E.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",E.load(r.theme,t)}C.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),T(r.external_plugins,function(e,t){S.load(t,e),r.plugins+=" "+t}),T(r.plugins.split(/[ ,]/),function(e){if(e=B(e),e&&!S.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=S.dependencies(e);T(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=S.createUrl(t,e),S.load(e.resource,e)})}else S.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!L.domLoaded)return void N.bind(window,"ready",e);if(n.getElement()&&b.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||N.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(N.insertAfter(N.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},N.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=!0,a._mceOldSubmit(a)})),n.windowManager=new m(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=N.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=S.get(n),i,o;i=S.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=B(n),r&&-1===A(m,n)&&(T(S.dependencies(n),function(t){e(t)}),o=new r(t,i),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n)))}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,p,h,m=[];if(t.rtl=this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||N.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=E.get(n.theme),t.theme=new c(t,E.urls[n.theme]),t.theme.init&&t.theme.init(t,E.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""))):t.theme=n.theme),T(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,p=/^[0-9\.]+(|px)$/i,p.test(""+i)&&(i=Math.max(parseInt(i,10),100)),p.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(N.setStyles(l.sizeContainer||l.editorContainer,{wi2dth:i,h2eight:o}),o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&T(R(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();for(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!b.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',h=0;h',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),t.iframeHTML+='
    ";var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';if(document.domain!=location.hostname&&(u=v),s=N.add(l.iframeContainer,"iframe",{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}}),H)try{t.getDoc()}catch(y){s.src=u=v}t.contentAreaContainer=l.iframeContainer,l.editorContainer&&(N.get(l.editorContainer).style.display=t.orgDisplay),N.get(t.id).style.display="none",N.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,o=n.settings,f=N.get(n.id),p=n.getDoc(),h,m;o.inline||(n.getElement().style.visibility=n.orgVisibility),t||o.content_editable||(p.open(),p.write(n.iframeHTML),p.close()),o.content_editable&&(n.on("remove",function(){var e=this.getBody();N.removeClass(e,"mce-content-body"),N.removeClass(e,"mce-edit-focus"),N.setAttrib(e,"contentEditable",null)}),N.addClass(f,"mce-content-body"),n.contentDocument=p=o.content_document||document,n.contentWindow=o.content_window||window,n.bodyElement=f,o.content_document=o.content_window=null,o.root_name=f.nodeName.toLowerCase()),h=n.getBody(),h.disabled=!0,o.readonly||(n.inline&&"static"==N.getStyle(h,"position",!0)&&(h.style.position="relative"),h.contentEditable=n.getParam("content_editable_state",!0)),h.disabled=!1,n.schema=new g(o),n.dom=new e(p,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:o.force_hex_style_colors,class_filter:o.class_filter,update_styles:!0,root_element:o.content_editable?n.id:null,collect:o.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e) -}}),n.parser=new v(o,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)i=e[r],a=i.attr(t),s="data-mce-"+t,i.attributes.map[s]||("style"===t?i.attr(s,o.serializeStyle(o.parseStyle(a),i.name)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name)))}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"text/javascript"))}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,i,o=n.schema.getNonEmptyElements();t--;)i=e[t],i.isEmpty(o)&&(i.empty().append(new r("br",1)).shortEnded=!0)}),n.serializer=new i(o,n),n.selection=new a(n.dom,n.getWin(),n.serializer,n),n.formatter=new s(n),n.undoManager=new l(n),n.forceBlocks=new u(n),n.enterKey=new c(n),n.editorCommands=new d(n),n.fire("PreInit"),o.browser_spellcheck||o.gecko_spellcheck||(p.body.spellcheck=!1,N.setAttrib(h,"spellcheck","false")),n.fire("PostRender"),n.quirks=y(n),o.directionality&&(h.dir=o.directionality),o.nowrap&&(h.style.whiteSpace="nowrap"),o.protect&&n.on("BeforeSetContent",function(e){T(o.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),o.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.contentStyles.length>0&&(m="",T(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),T(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),o.auto_focus&&setTimeout(function(){var e=n.editorManager.get(o.auto_focus);e.selection.select(e.getBody(),1),e.selection.collapse(1),e.getBody().focus(),e.getWin().focus()},100),f=p=h=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n._refreshContentEditable(),i||(b.opera||n.getBody().focus(),n.getWin().focus()),M||i){if(l=n.getBody(),l.setActive)try{l.setActive()}catch(c){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.activeEditor!=n&&((t=n.editorManager.activeEditor)&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),n.editorManager.activeEditor=n},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?D(r):0,n=D(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?T(r.split(r.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){e=e.split("="),i[B(e[0])]=B(e.length>1?e[1]:e)}):i=r,i):r},nodeChanged:function(){var e=this,t=e.selection,n,r,i;!e.initialized||e.settings.disable_nodechange||e.settings.readonly||(i=e.getBody(),n=t.getStart()||i,n=H&&n.ownerDocument!=e.getDoc()?e.getBody():n,"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),r=[],e.dom.getParent(n,function(e){return e===i?!0:void r.push(e)}),e.fire("NodeChange",{element:n,parents:r}))},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){var i=this,o=0,a;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||r&&r.skip_focus||i.focus(),r=k({},r),r=i.fire("BeforeExecCommand",{command:e,ui:t,value:n}),r.isDefaultPrevented()?!1:(a=i.execCommands[e])&&a.func.call(a.scope,t,n)!==!0?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):(T(i.plugins,function(r){return r.execCommand&&r.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),o=!0,!1):void 0}),o?o:i.theme&&i.theme.execCommand&&i.theme.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):i.editorCommands.execCommand(e,t,n)?(i.fire("ExecCommand",{command:e,ui:t,value:n}),!0):(i.getDoc().execCommand(e,t,n),void i.fire("ExecCommand",{command:e,ui:t,value:n})))},queryCommandState:function(e){var t=this,n,r;if(!t._isHidden()){if((n=t.queryStateCommands[e])&&(r=n.func.call(n.scope),r!==!0))return r;if(r=t.editorCommands.queryCommandState(e),-1!==r)return r;try{return t.getDoc().queryCommandState(e)}catch(i){}}},queryCommandValue:function(e){var n=this,r,i;if(!n._isHidden()){if((r=n.queryValueCommands[e])&&(i=r.func.call(r.scope),i!==!0))return i;if(i=n.editorCommands.queryCommandValue(e),i!==t)return i;try{return n.getDoc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(N.show(e.getContainer()),N.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(e.hidden=!0,H&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(N.hide(e.getContainer()),N.setStyle(e.id,"display",e.orgDisplay)),e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=N.getParent(t.id,"form"))&&T(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&(t.isNotDirty=!0),r},setContent:function(e,t){var n=this,r=n.getBody(),i;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=H&&11>H?"":'
    ',e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):H||(e='
    '),r.innerHTML=e,n.fire("SetContent",t)):("raw"!==t.format&&(e=new o({},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=B(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),e.content="text"!=e.format?B(n):n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e){this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=N.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return N.get(this.settings.content_element||this.id)},getWin:function(){var e=this,t;return e.contentWindow||(t=N.get(e.id+"_ifr"),t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),T(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||(n.hasVisual?i.addClass(e,o):i.removeClass(e,o)));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&(n.hasVisual?i.addClass(e,o):i.removeClass(e,o))))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;if(!e.removed){e.removed=1,e.save(),e.hasHiddenInput&&N.remove(e.getElement().nextSibling),e.inline||(H&&10>H&&e.getDoc().execCommand("SelectAll",!1,null),N.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null,L.unbind(e.getWin()),L.unbind(e.getDoc()));var t=e.getContainer();L.unbind(e.getBody()),L.unbind(t),e.fire("remove"),e.editorManager.remove(e),N.remove(t),e.destroy()}},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e&&M&&(L.unbind(t.getDoc()),L.unbind(t.getWin()),L.unbind(t.getBody())),e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),N.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return M?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}},k(_.prototype,x),_}),r(ct,[],function(){var e={};return{rtl:!1,add:function(t,n){for(var r in n)e[r]=n[r];this.rtl=this.rtl||"rtl"===e._dir},translate:function(t){if("undefined"==typeof t)return t;if("string"!=typeof t&&t.raw)return t.raw;if(t.push){var n=t.slice(1);t=(e[t[0]]||t[0]).replace(/\{([^\}]+)\}/g,function(e,t){return n[t]})}return e[t]||t},data:e}}),r(ut,[y,g],function(e,t){function n(e){function s(){try{return document.activeElement}catch(e){return document.body}}function l(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function c(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function u(e){return!!a.getParent(e,n.isEditorUIElement)}function d(n){var d=n.editor;d.on("init",function(){(d.inline||t.ie)&&(d.on("nodechange keyup",function(){var e=document.activeElement;e&&e.id==d.id+"_ifr"&&(e=d.getBody()),d.dom.isChildOf(e,d.getBody())&&(d.lastRng=d.selection.getRng())}),t.webkit&&!r&&(r=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(d.lastRng=n)}},a.bind(document,"selectionchange",r)))}),d.on("setcontent",function(){d.lastRng=null}),d.on("mousedown",function(){d.selection.lastFocusBookmark=null}),d.on("focusin",function(){var t=e.focusedEditor;d.selection.lastFocusBookmark&&(d.selection.setRng(c(d,d.selection.lastFocusBookmark)),d.selection.lastFocusBookmark=null),t!=d&&(t&&t.fire("blur",{focusedEditor:d}),e.activeEditor=d,e.focusedEditor=d,d.fire("focus",{blurredEditor:t}),d.focus(!0)),d.lastRng=null}),d.on("focusout",function(){window.setTimeout(function(){var t=e.focusedEditor;u(s())||t!=d||(d.fire("blur",{focusedEditor:null}),e.focusedEditor=null,d.selection&&(d.selection.lastFocusBookmark=null))},0)}),i||(i=function(t){var n=e.activeEditor;n&&t.target.ownerDocument==document&&(n.selection&&(n.selection.lastFocusBookmark=l(n.dom,n.lastRng)),u(t.target)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},a.bind(document,"focusin",i)),d.inline&&!o&&(o=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},a.bind(document,"mouseup",o))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(a.unbind(document,"selectionchange",r),a.unbind(document,"focusin",i),a.unbind(document,"mouseup",o),r=i=o=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var r,i,o,a=e.DOM;return n.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},n}),r(dt,[lt,y,F,g,p,ot,ct,ut],function(e,t,n,r,i,o,a,s){function l(e){var t=g.editors,n;delete t[e.id];for(var r=0;r0&&f(d(c),function(n){u.get(n)?(m=new e(n,t,s),l.push(m),m.render()):f(document.forms,function(e){f(e.elements,function(e){e.name===n&&(n="mce_editor_"+h++,u.setAttrib(e,"id",n),r(n,t))})})});break;case"textareas":case"specific_textareas":f(u.select("textarea"),function(e){t.editor_deselector&&o(e,t.editor_deselector)||(!t.editor_selector||o(e,t.editor_selector))&&r(n(e),t)})}t.oninit&&(c=g=0,f(l,function(e){g++,e.initialized?c++:e.on("init",function(){c++,c==g&&i(t,"oninit")}),c==g&&i(t,"oninit")}))}var s=this,l=[],m;s.settings=t,u.bind(window,"ready",a)},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t.activeEditor=e,t.fire("AddEditor",{editor:e}),m||(m=function(){t.fire("BeforeUnload")},u.bind(window,"beforeunload",m)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void f(u.select(e),function(e){t.remove(r[e.id])})):(i=e,r[i.id]?(l(i)&&t.fire("RemoveEditor",{editor:i}),r.length||u.unbind(window,"beforeunload",m),i.remove(),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){f(this.editors,function(e){e.save()})},addI18n:function(e,t){a.add(e,t)},translate:function(e){return a.translate(e)}},p(g,o),g.setup(),window.tinymce=window.tinyMCE=g,g}),r(ft,[dt,p],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(t,n){e(n,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(pt,[],function(){return{send:function(e){function t(){!e.async||4==n.readyState||r++>1e4?(e.success&&1e4>r&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,r>1e4?"TIMED_OUT":"GENERAL",n,e),n=null):setTimeout(t,10)}var n,r=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",n=new XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(e.data),!e.async)return t();setTimeout(t,10)}}}}),r(ht,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(mt,[ht,pt,p],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(gt,[y],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(vt,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(yt,[y,l,b,C,p,g],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(bt,[z,p],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.addClass(this.settings.containerClass,"body")},applyClasses:function(e){var t=this,n=t.settings,r,i,o;r=e.items().filter(":visible"),i=n.firstControlClass,o=n.lastControlClass,r.each(function(e){e.removeClass(i).removeClass(o),n.controlClass&&e.addClass(n.controlClass)}),r.eq(0).addClass(i),r.eq(-1).addClass(o)},renderHtml:function(e){var t=this,n=t.settings,r,i="";return r=e.items(),r.eq(0).addClass(n.firstControlClass),r.eq(-1).addClass(n.lastControlClass),r.each(function(e){n.controlClass&&e.addClass(n.controlClass),i+=e.renderHtml()}),i},recalc:function(){},postRender:function(){}})}),r(Ct,[bt],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
    '+this._super(e)}})}),r(xt,[$,Q],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().lastChild.innerHTML=t.encode(e)),t):t._value},renderHtml:function(){var e=this,t=e.classPrefix;return'"},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(wt,[$,xt],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.toggleClass("tooltip-n","bc-tc"==i),r.toggleClass("tooltip-nw","bc-tl"==i),r.toggleClass("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},active:function(e){var t=this,n;return e!==n&&(t.aria("pressed",e),t.toggleClass("active",e)),t._super(e)},disabled:function(e){var t=this,n;return e!==n&&(t.aria("disabled",e),t.toggleClass("disabled",e)),t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=!0,e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(_t,[wt],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t.on("click mousedown",function(e){e.preventDefault()}),t._super(e),n=e.size,e.subtype&&t.addClass(e.subtype),n&&t.addClass("btn-"+n)},icon:function(e){var t=this,n=t.classPrefix;if("undefined"==typeof e)return t.settings.icon;if(t.settings.icon=e,e=e?n+"ico "+n+"i-"+t.settings.icon:"",t._rendered){var r=t.getEl().firstChild,i=r.getElementsByTagName("i")[0];e?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=e):i&&r.removeChild(i),t.text(t._text)}return t},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},text:function(e){var t=this;if(t._rendered){var n=t.getEl().lastChild.lastChild;n&&(n.data=t.translate(e))}return t._super(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon,i;return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",r=e.settings.icon?n+"ico "+n+"i-"+r:"",'
    "}})}),r(Nt,[G],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.addClass("btn-group"),e.preRender(),t.preRender(e),'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(Et,[wt],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){var t=this;return"undefined"!=typeof e?(e?t.addClass("checked"):t.removeClass("checked"),t._checked=e,t.aria("checked",e),t):t._checked},value:function(e){return this.checked(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
    '+e.encode(e._text)+"
    "}})}),r(St,[_t,et],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()}})}),r(kt,[St,y],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.addClass("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'
    '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(Tt,[wt,j,q],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("combobox"),t.subinput=!0,t.ariaTarget="inp",e=t.settings,e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){for(var r=n.target,i=t.getEl();r&&r!=i;)r.id&&-1!=r.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),r=r.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){return e.preventDefault(),t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),e.placeholder&&(t.addClass("placeholder"),t.on("focusin",function(){t._hasOnChange||(n.on(t.getEl("inp"),"change",function(){t.fire("change")}),t._hasOnChange=!0),t.hasClass("placeholder")&&(t.getEl("inp").value="",t.removeClass("placeholder"))}),t.on("focusout",function(){0===t.value().length&&(t.getEl("inp").value=e.placeholder,t.addClass("placeholder"))}))},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t.removeClass("placeholder"),t._rendered&&(t.getEl("inp").value=e),t):t._rendered?(e=t.getEl("inp").value,e!=t.settings.placeholder?e:""):t._value},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl("inp").disabled=e),t._super(e)},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),r=e.getEl("open"),i=e.layoutRect(),o,a;o=r?i.w-n.getSize(r).width-10:i.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(a=e.layoutRect().h-2+"px"),n.css(t.firstChild,{width:o,lineHeight:a}),e._super(),e},postRender:function(){var e=this;return n.on(this.getEl("inp"),"change",function(){e.fire("change")}),e._super()},remove:function(){n.off(this.getEl("inp")),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=n.value||n.placeholder||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e._text,(o||a)&&(s='
    ",e.addClass("has-open")),'
    "+s+"
    " -}})}),r(Rt,[wt],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.addClass("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.data()[n],index:n})})},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},data:function(e){var t=this;return"undefined"!=typeof e?(t._data=e,t.update(),t):t._data},update:function(){this.innerHtml(this._getPathHtml())},postRender:function(){var e=this;e._super(),e.data(e.settings.data)},renderHtml:function(){var e=this;return'
    '+e._getPathHtml()+"
    "},_getPathHtml:function(){var e=this,t=e._data||[],n,r,i="",o=e.classPrefix;for(n=0,r=t.length;r>n;n++)i+=(n>0?'":"")+'
    '+t[n].name+"
    ";return i||(i='
    \xa0
    '),i}})}),r(At,[Rt,dt],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return n.on("select",function(t){var n=[],i,o=r.getBody();for(r.focus(),i=r.selection.getStart();i&&i!=o;)e(i)||n.push(i),i=i.parentNode;r.selection.select(n[n.length-1-t.index]),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});i.push({name:s.name})}n.data(i)}),n._super()}})}),r(Bt,[G],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.addClass("formitem"),t.preRender(e),'
    '+(e.settings.title?'
    '+e.settings.title+"
    ":"")+'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(Dt,[G,Bt],function(e,t){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,n=e.items();n.each(function(n){var r,i=n.settings.label;i&&(r=new t({layout:"flex",autoResize:"overflow",defaults:{flex:1},items:[{type:"label",id:n._id+"-l",text:i,flex:0,forId:n._id,disabled:n.disabled()}]}),r.type="formitem",n.aria("labelledby",n._id+"-l"),"undefined"==typeof n.settings.flex&&(n.settings.flex=1),e.replace(n,r),r.add(n))})},recalcLabels:function(){var e=this,t=0,n=[],r,i;if(e.settings.labelGapCalc!==!1)for(e.items().filter("formitem").each(function(e){var r=e.items()[0],i=r.getEl().clientWidth;t=i>t?i:t,n.push(r)}),i=e.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=t+i},visible:function(e){var t=this._super(e);return e===!0&&this._rendered&&this.recalcLabels(),t},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.recalcLabels(),e.fromJSON(e.settings.data)}})}),r(Lt,[Dt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
    '+(e.settings.title?''+e.settings.title+"":"")+'
    '+(e.settings.html||"")+t.renderHtml(e)+"
    "}})}),r(Mt,[Tt],function(e){return e.extend({init:function(e){var t=this,n=tinymce.activeEditor,r;e.spellcheck=!1,r=n.settings.file_browser_callback,r&&(e.icon="browse",e.onaction=function(){r(t.getEl("inp").id,t.getEl("inp").value,e.filetype,window)}),t._super(e)}})}),r(Ht,[Ct],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox();e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Pt,[Ct],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v=[],y,b,C,x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e._paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,("row-reversed"==f||"column-reverse"==f)&&(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",N="h",E="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",P="left",M="w",D="x",L="innerW",H="minW",O="right",I="deltaW",F="contentW"):(S="x",N="w",E="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",P="top",M="h",D="y",L="innerH",H="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],_=u=0,t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),m=p.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,h[k]&&v.push(p),h.flex=g),d-=h[E],y=o[P]+h[H]+o[O],y>_&&(_=y);if(x={},x[E]=0>d?i[E]-d+i[A]:i[R]-d+i[A],x[H]=_+i[I],x[B]=i[R]-d,x[F]=_,x.minW=W(x.minW,i.maxW),x.minH=W(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)p=v[t],h=p.layoutRect(),b=h[k],y=h[E]+h.flex*C,y>b?(d-=h[k]-h[E],u-=h.flex,h.flex=0,h.maxFlexSize=b):h.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[P],t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),y=h.maxFlexSize||h[E],"center"===s?x[D]=Math.round(i[L]/2-h[M]/2):"stretch"===s?(x[M]=z(h[H]||0,i[L]-o[P]-o[O]),x[D]=o[P]):"end"===s&&(x[D]=i[L]-h[M]-o.top),h.flex>0&&(y+=h.flex*C),x[N]=y,x[S]=w,p.layoutRect(x),p.recalc&&p.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(Ot,[bt],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})}})}),r(It,[$,wt,et,p,dt,g],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this,n=this.settings.format;n&&t.parent().on("show",function(){t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))})},onclick:function(){this.settings.format&&d(this.settings.format)}}}}function o(){return e.undoManager?e.undoManager.hasUndo():!1}function a(){return e.undoManager?e.undoManager.hasRedo():!1}function l(){var t=this;t.disabled(!o()),e.on("Undo Redo AddUndo TypingUndo",function(){t.disabled(!o())})}function c(){var t=this;t.disabled(!a()),e.on("Undo Redo AddUndo TypingUndo",function(){t.disabled(!a())})}function u(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function d(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var f;f=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})},onclick:function(){d(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],hr:["Insert horizontal rule","InsertHorizontalRule"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}})}),e.addButton("undo",{tooltip:"Undo",onPostRender:l,cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:c,cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",shortcut:"Ctrl+N",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Ctrl+Z",onPostRender:l,cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ctrl+Y",onPostRender:c,cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:u,cmd:"mceToggleVisualAid"}),s({cut:["Cut","Cut","Ctrl+X"],copy:["Copy","Copy","Ctrl+C"],paste:["Paste","Paste","Ctrl+V"],selectall:["Select all","SelectAll","Ctrl+A"],bold:["Bold","Bold","Ctrl+B"],italic:["Italic","Italic","Ctrl+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:f}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Address=address;Pre=pre;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:d,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){n.push({text:e,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:f})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Ft,[Ct],function(e){return e.extend({recalc:function(e){var t=e.settings,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,N=[],E=[],S,k,T,R;for(t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e._paddingBox,C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]),d=0;r>d;d++)N.push(0);for(f=0;n>f;f++)E.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,N[d]=S>N[d]?S:N[d],E[f]=k>E[f]?k:E[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=N[d]+(d>0?y:0),T-=(d>0?y:0)+N[d];for(R=o.innerH-g.top-g.bottom,_=0,f=0;n>f;f++)_+=E[f]+(f>0?b:0),R-=(f>0?b:0)+E[f];if(w+=g.left+g.right,_+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=_+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var A;A="start"==t.packV?0:R>0?Math.floor(R/n):0;var B=0,D=t.flexWidths;if(D)for(d=0;dd;d++)N[d]+=D?D[d]*L:L;for(h=g.top,f=0;n>f;f++){for(p=g.left,s=E[f]+A,d=0;r>d&&(u=i[f*r+d],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(N[d],c.startMinWidth),c.x=p,c.y=h,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=p+a/2-c.w/2:"right"==v?c.x=p+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=h+s/2-c.h/2:"bottom"==v?c.y=h+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),p+=a+y,u.recalc&&u.recalc();h+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var M=e.parent();M&&(M._lastRect=null,M.recalc())}}})}),r(zt,[wt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):setTimeout(function(){n.html(e)},0),this}})}),r(Wt,[wt,q],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,e.multiline&&t.addClass("autoscroll"),e.strong&&t.addClass("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.addClass("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},text:function(e){var t=this;return t._rendered&&e&&this.innerHtml(t.encode(e)),t._super(e)},renderHtml:function(){var e=this,t=e.settings.forId;return'"}})}),r(Vt,[G],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.addClass("toolbar")},postRender:function(){var e=this;return e.items().addClass("toolbar-item"),e._super()}})}),r(Ut,[Vt],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(qt,[_t,j,Ut],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),t.addClass("menubtn"),e.fixedWidth&&t.addClass("fixed-width"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var e=this,n=e.settings,r;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon?r+"ico "+r+"i-"+e.settings.icon:"";return e.aria("role",e.parent()instanceof n?"menuitem":"button"),'
    '},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},text:function(e){var t=this,n,r;if(t._rendered)for(r=t.getEl("open").getElementsByTagName("span"),n=0;n0&&(o=n[0].text,t._value=n[0].value),e.menu=n}e.text=e.text||o||n[0].text,t._super(e),t.addClass("listbox"),t.on("select",function(n){var r=n.control;a&&(n.lastControl=a),e.multiple?r.active(!r.active()):t.value(n.control.settings.value),a=r})},value:function(e){function t(e,n){e.items().each(function(e){r=e.value()===n,r&&(i=i||e.text()),e.active(r),e.menu&&t(e.menu,n)})}var n=this,r,i,o,a;if("undefined"!=typeof e){if(n.menu)t(n.menu,e);else for(o=n.settings.menu,a=0;a'+("-"!==o?'\xa0":"")+("-"!==o?''+o+"":"")+(l?'
    '+l+"
    ":"")+(r.menu?'
    ':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),e.parent().hideAll()))}),e._super(),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Kt,[et,jt,p],function(e,t,n){var r=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,e.itemDefaults)for(var r=e.items,i=r.length;i--;)r[i]=n.extend({},e.itemDefaults,r[i]);t._super(e),t.addClass("menu")},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.selectable?(e._hasIcons=!0,!1):void 0}),e._super()}});return r}),r(Gt,[Et],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),r(Yt,[wt,Y],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.addClass("resizehandle"),"both"==e.settings.direction&&e.addClass("resizehandle-both"),e.canFocus=!1,'
    '},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(Xt,[wt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("spacer"),e.canFocus=!1,'
    '}})}),r(Jt,[qt,q],function(e,t){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,n=e.getEl(),r=e.layoutRect(),i,o;return e._super(),i=n.firstChild,o=n.lastChild,t.css(i,{width:r.w-t.getSize(o).width,height:r.h-2}),t.css(o,{height:r.h-2}),e},activeMenu:function(e){var n=this;t.toggleClass(n.getEl().lastChild,n.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";return'
    '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void t.call(this,e);n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(Qt,[Ot],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),r(Zt,[J,q],function(e,t){return e.extend({lastIdx:0,Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t.removeClass(n,this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t.addClass(n,this.classPrefix+"active"),e!=this.lastIdx&&(this.items()[this.lastIdx].hide(),this.lastIdx=e),this.items()[e].show().fire("showtab"),this.reflow()},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
    '+n+'
    '+t.renderHtml(e)+"
    "},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,n,r,i;r=t.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(t,n){r=Math.max(r,t.layoutRect().minW),i=Math.max(i,t.layoutRect().minH),e.settings.activeTab!=n&&t.hide()}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=t.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,n=e._super(),n.deltaH+=o,n.innerH=n.h-n.deltaH,n}})}),r(en,[wt,q],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t._value=e.value||"",t.addClass("textbox"),e.multiline?t.addClass("multiline"):t.on("keydown",function(e){13==e.keyCode&&t.parents().reverse().each(function(t){return e.preventDefault(),t.hasEventListeners("submit")&&t.toJSON?(t.fire("submit",{data:t.toJSON()}),!1):void 0})})},disabled:function(e){var t=this;return t._rendered&&"undefined"!=typeof e&&(t.getEl().disabled=e),t._super(e)},value:function(e){var t=this;return"undefined"!=typeof e?(t._value=e,t._rendered&&(t.getEl().value=e),t):t._rendered?t.getEl().value:t._value},repaint:function(){var e=this,t,n,r,i=0,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e._borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e._value,!1),i="";return"spellcheck"in n&&(i+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(i+=' maxlength="'+n.maxLength+'"'),n.size&&(i+=' size="'+n.size+'"'),n.subtype&&(i+=' type="'+n.subtype+'"'),e.disabled()&&(i+=' disabled="disabled"'),n.multiline?'":'"},postRender:function(){var e=this;return t.on(e.getEl(),"change",function(t){e.fire("change",t)}),e._super()},remove:function(){t.off(this.getEl()),this._super()}})}),r(tn,[q,$],function(e,t){return function(n,r){var i=this,o,a=t.classPrefix;i.show=function(t){return i.hide(),o=!0,window.setTimeout(function(){o&&n.appendChild(e.createFragment('
    '))},t||0),i},i.hide=function(){var e=n.lastChild;return e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,i}}}),a([l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,N,E,S,k,T,R,A,B,D,L,M,H,P,O,I,F,z,W,V,U,q,$,j,K,G,Y,X,J,Q,Z,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,pt,ht,mt,gt,vt,yt,bt,Ct,xt,wt,_t,Nt,Et,St,kt,Tt,Rt,At,Bt,Dt,Lt,Mt,Ht,Pt,Ot,It,Ft,zt,Wt,Vt,Ut,qt,$t,jt,Kt,Gt,Yt,Xt,Jt,Qt,Zt,en,tn])}(this);tinymce.PluginManager.add("advlist",function(t){function e(t,e){var n=[];return tinymce.each(e.split(/[ ,]/),function(t){n.push({text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"==t?"":t})}),n}function n(e,n){var o,l=t.dom,a=t.selection;o=l.getParent(a.getNode(),"ol,ul"),o&&o.nodeName==e&&n!==!1||t.execCommand("UL"==e?"InsertUnorderedList":"InsertOrderedList"),n=n===!1?i[e]:n,i[e]=n,o=l.getParent(a.getNode(),"ol,ul"),o&&(l.setStyle(o,"listStyleType",n),o.removeAttribute("data-mce-style")),t.focus()}function o(e){var n=t.dom.getStyle(t.dom.getParent(t.selection.getNode(),"ol,ul"),"listStyleType")||"";e.control.items().each(function(t){t.active(t.settings.data===n)})}var l,a,i={};l=e("OL",t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),a=e("UL",t.getParam("advlist_bullet_styles","default,circle,disc,square")),t.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:l,onshow:o,onselect:function(t){n("OL",t.control.settings.data)},onclick:function(){n("OL",!1)}}),t.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:a,onshow:o,onselect:function(t){n("UL",t.control.settings.data)},onclick:function(){n("UL",!1)}})});tinymce.PluginManager.add("anchor",function(n){function e(){var e=n.selection.getNode();n.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.name||e.id},onsubmit:function(e){n.execCommand("mceInsertContent",!1,n.dom.createHTML("a",{id:e.data.name}))}})}n.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:e,stateSelector:"a:not([href])"}),n.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:e})});tinymce.PluginManager.add("autolink",function(t){function n(t){o(t,-1,"(",!0)}function e(t){o(t,0,"",!0)}function i(t){o(t,-1,"",!1)}function o(t,n,e){function i(t,n){if(0>n&&(n=0),3==t.nodeType){var e=t.data.length;n>e&&(n=e)}return n}function o(t,n){f.setStart(t,i(t,n))}function r(t,n){f.setEnd(t,i(t,n))}var f,d,a,s,c,l,u,g,h;if(f=t.selection.getRng(!0).cloneRange(),f.startOffset<5){if(g=f.endContainer.previousSibling,!g){if(!f.endContainer.firstChild||!f.endContainer.firstChild.nextSibling)return;g=f.endContainer.firstChild.nextSibling}if(h=g.length,o(g,h),r(g,h),f.endOffset<5)return;d=f.endOffset,s=g}else{if(s=f.endContainer,3!=s.nodeType&&s.firstChild){for(;3!=s.nodeType&&s.firstChild;)s=s.firstChild;3==s.nodeType&&(o(s,0),r(s,s.nodeValue.length))}d=1==f.endOffset?2:f.endOffset-1-n}a=d;do o(s,d>=2?d-2:0),r(s,d>=1?d-1:0),d-=1;while(" "!=f.toString()&&""!==f.toString()&&160!=f.toString().charCodeAt(0)&&d-2>=0&&f.toString()!=e);f.toString()==e||160==f.toString().charCodeAt(0)?(o(s,d),r(s,a),d+=1):0===f.startOffset?(o(s,0),r(s,a)):(o(s,d),r(s,a)),l=f.toString(),"."==l.charAt(l.length-1)&&r(s,a-1),l=f.toString(),u=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),u&&("www."==u[1]?u[1]="http://www.":/@$/.test(u[1])&&!/^mailto:/.test(u[1])&&(u[1]="mailto:"+u[1]),c=t.selection.getBookmark(),t.selection.setRng(f),t.execCommand("createlink",!1,u[1]+u[2]),t.selection.moveToBookmark(c),t.nodeChanged())}var r;return t.on("keydown",function(n){return 13==n.keyCode?i(t):void 0}),tinymce.Env.ie?void t.on("focus",function(){if(!r){r=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}}):(t.on("keypress",function(e){return 41==e.keyCode?n(t):void 0}),void t.on("keyup",function(n){return 32==n.keyCode?e(t):void 0}))});tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function i(n){var s,r,g,u,l,m,h,d,f=tinymce.DOM;if(r=e.getDoc()){if(g=r.body,u=r.documentElement,l=o.autoresize_min_height,!g||n&&"setcontent"===n.type&&n.initial||t())return void(g&&u&&(g.style.overflowY="auto",u.style.overflowY="auto"));h=e.dom.getStyle(g,"margin-top",!0),d=e.dom.getStyle(g,"margin-bottom",!0),m=g.offsetHeight+parseInt(h,10)+parseInt(d,10),(isNaN(m)||0>=m)&&(m=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight),m>o.autoresize_min_height&&(l=m),o.autoresize_max_height&&m>o.autoresize_max_height?(l=o.autoresize_max_height,g.style.overflowY="auto",u.style.overflowY="auto"):(g.style.overflowY="hidden",u.style.overflowY="hidden",g.scrollTop=0),l!==a&&(s=l-a,f.setStyle(f.get(e.id+"_ifr"),"height",l+"px"),a=l,tinymce.isWebKit&&0>s&&i(n))}}function n(e,t,o){setTimeout(function(){i({}),e--?n(e,t,o):o&&o()},t)}var o=e.settings,a=0;e.settings.inline||(o.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),o.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t=e.getParam("autoresize_overflow_padding",1);e.dom.setStyles(e.getBody(),{paddingBottom:e.getParam("autoresize_bottom_margin",50),paddingLeft:t,paddingRight:t})}),e.on("nodechange setcontent keyup FullscreenStateChanged",i),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){n(20,100,function(){n(5,1e3)})}),e.addCommand("mceAutoResize",i))});tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(l.getItem(d+"time"),10)||0;return(new Date).getTime()-e>v.autosave_retention?(a(!1),!1):!0}function a(t){l.removeItem(d+"draft"),l.removeItem(d+"time"),t!==!1&&e.fire("RemoveDraft")}function r(){!c()&&e.isDirty()&&(l.setItem(d+"draft",e.getContent({format:"raw",no_events:!0})),l.setItem(d+"time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(l.getItem(d+"draft"),{format:"raw"}),e.fire("RestoreDraft"))}function i(){m||(setInterval(function(){e.removed||r()},v.autosave_interval),m=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),i()}function u(){e.undoManager.beforeChange(),o(),a(),e.undoManager.add()}function f(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+"[^>]*>(( | |[ ]|]*>)+?|)|
    $","i").test(t)}var d,m,v=e.settings,l=tinymce.util.LocalStorage;d=v.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",d=d.replace(/\{path\}/g,document.location.pathname),d=d.replace(/\{query\}/g,document.location.search),d=d.replace(/\{id\}/g,e.id),v.autosave_interval=t(v.autosave_interval,"30s"),v.autosave_retention=t(v.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:u,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:u,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&o()}),e.on("saveContent",function(){a()})),window.onbeforeunload=f,this.hasDraft=n,this.storeDraft=r,this.restoreDraft=o,this.removeDraft=a,this.isEmpty=c});!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(o){var e=this,t=o.getParam("bbcode_dialect","punbb").toLowerCase();o.on("beforeSetContent",function(o){o.content=e["_"+t+"_bbcode2html"](o.content)}),o.on("postProcess",function(o){o.set&&(o.content=e["_"+t+"_bbcode2html"](o.content)),o.get&&(o.content=e["_"+t+"_html2bbcode"](o.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(o){function e(e,t){o=o.replace(e,t)}return o=tinymce.trim(o),e(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),e(/(.*?)<\/font>/gi,"$1"),e(//gi,"[img]$1[/img]"),e(/(.*?)<\/span>/gi,"[code]$1[/code]"),e(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),e(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),e(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),e(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),e(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),e(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),e(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),e(/<\/(strong|b)>/gi,"[/b]"),e(/<(strong|b)>/gi,"[b]"),e(/<\/(em|i)>/gi,"[/i]"),e(/<(em|i)>/gi,"[i]"),e(/<\/u>/gi,"[/u]"),e(/(.*?)<\/span>/gi,"[u]$1[/u]"),e(//gi,"[u]"),e(/]*>/gi,"[quote]"),e(/<\/blockquote>/gi,"[/quote]"),e(/
    /gi,"\n"),e(//gi,"\n"),e(/
    /gi,"\n"),e(/

    /gi,""),e(/<\/p>/gi,"\n"),e(/ |\u00a0/gi," "),e(/"/gi,'"'),e(/</gi,"<"),e(/>/gi,">"),e(/&/gi,"&"),o},_punbb_bbcode2html:function(o){function e(e,t){o=o.replace(e,t)}return o=tinymce.trim(o),e(/\n/gi,"
    "),e(/\[b\]/gi,""),e(/\[\/b\]/gi,""),e(/\[i\]/gi,""),e(/\[\/i\]/gi,""),e(/\[u\]/gi,""),e(/\[\/u\]/gi,""),e(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),e(/\[url\](.*?)\[\/url\]/gi,'$1'),e(/\[img\](.*?)\[\/img\]/gi,''),e(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),e(/\[code\](.*?)\[\/code\]/gi,'$1 '),e(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),o}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();tinymce.PluginManager.add("charmap",function(e){function a(){function a(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var t,r,o,n;t='';var l=25;for(o=0;10>o;o++){for(t+="",r=0;l>r;r++){var s=i[o*l+r];t+='"}t+=""}t+="";var c={type:"container",html:t,onclick:function(a){var i=a.target;"TD"==i.tagName&&(i=i.firstChild),"DIV"==i.tagName&&(e.execCommand("mceInsertContent",!1,i.firstChild.data),a.ctrlKey||n.close())},onmouseover:function(e){var i=a(e.target);i&&n.find("#preview").text(i.firstChild.firstChild.data)}};n=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[c,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){n.close()}}]})}var i=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];e.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:a}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:a,context:"insert"})});tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})});tinymce.PluginManager.add("contextmenu",function(e){var n,t=e.settings.contextmenu_never_use_native;e.on("contextmenu",function(i){var o;if(!i.ctrlKey||t){if(i.preventDefault(),o=e.settings.contextmenu||"link image inserttable | cell row column deletetable",n)n.show();else{var c=[];tinymce.each(o.split(/[ ,]/),function(n){var t=e.menuItems[n];"|"==n&&(t={text:n}),t&&(t.shortcut="",c.push(t))});for(var a=0;a'}),t+=""}),t+=""}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];t.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:a,onclick:function(e){var a=t.dom.getParent(e.target,"a");a&&(t.insertContent(''+a.getAttribute('),this.hide())}},tooltip:"Emoticons"})});tinymce.PluginManager.add("fullpage",function(e){function t(){var t=n();e.windowManager.open({title:"Document properties",data:t,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){l(tinymce.extend(t,e.data))}})}function n(){function t(e,t){var n=e.attr(t);return n||""}var n,l,a=i(),r={};return r.fontface=e.getParam("fullpage_default_fontface",""),r.fontsize=e.getParam("fullpage_default_fontsize",""),n=a.firstChild,7==n.type&&(r.xml_pi=!0,l=/encoding="([^"]+)"/.exec(n.value),l&&(r.docencoding=l[1])),n=a.getAll("#doctype")[0],n&&(r.doctype=""),n=a.getAll("title")[0],n&&n.firstChild&&(r.title=n.firstChild.value),s(a.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?r[n.toLowerCase()]=e.attr("content"):"Content-Type"==l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")),t&&(r.docencoding=t[1]))}),n=a.getAll("html")[0],n&&(r.langcode=t(n,"lang")||t(n,"xml:lang")),r.stylesheets=[],tinymce.each(a.getAll("link"),function(e){"stylesheet"==e.attr("rel")&&r.stylesheets.push(e.attr("href"))}),n=a.getAll("body")[0],n&&(r.langdir=t(n,"dir"),r.style=t(n,"style"),r.visited_color=t(n,"vlink"),r.link_color=t(n,"link"),r.active_color=t(n,"alink")),r}function l(t){function n(e,t,n){e.attr(t,n?n:void 0)}function l(e){r.firstChild?r.insert(e,r.firstChild):r.append(e)}var a,r,o,c,u,f=e.dom;a=i(),r=a.getAll("head")[0],r||(c=a.getAll("html")[0],r=new m("head",1),c.firstChild?c.insert(r,c.firstChild,!0):c.append(r)),c=a.firstChild,t.xml_pi?(u='version="1.0"',t.docencoding&&(u+=' encoding="'+t.docencoding+'"'),7!=c.type&&(c=new m("xml",7),a.insert(c,a.firstChild,!0)),c.value=u):c&&7==c.type&&c.remove(),c=a.getAll("#doctype")[0],t.doctype?(c||(c=new m("#doctype",10),t.xml_pi?a.insert(c,a.firstChild):l(c)),c.value=t.doctype.substring(9,t.doctype.length-1)):c&&c.remove(),c=null,s(a.getAll("meta"),function(e){"Content-Type"==e.attr("http-equiv")&&(c=e)}),t.docencoding?(c||(c=new m("meta",1),c.attr("http-equiv","Content-Type"),c.shortEnded=!0,l(c)),c.attr("content","text/html; charset="+t.docencoding)):c.remove(),c=a.getAll("title")[0],t.title?(c?c.empty():(c=new m("title",1),l(c)),c.append(new m("#text",3)).value=t.title):c&&c.remove(),s("keywords,description,author,copyright,robots".split(","),function(e){var n,i,r=a.getAll("meta"),o=t[e];for(n=0;n"))}function i(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(d)}function a(t){function n(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}var l,a,o,m,u=t.content,f="",g=e.dom;if(!t.selection&&!("raw"==t.format&&d||t.source_view&&e.getParam("fullpage_hide_in_source_view"))){u=u.replace(/<(\/?)BODY/gi,"<$1body"),l=u.indexOf("",l),d=n(u.substring(0,l+1)),a=u.indexOf("\n"),o=i(),s(o.getAll("style"),function(e){e.firstChild&&(f+=e.firstChild.value)}),m=o.getAll("body")[0],m&&g.setAttribs(e.getBody(),{style:m.attr("style")||"",dir:m.attr("dir")||"",vLink:m.attr("vlink")||"",link:m.attr("link")||"",aLink:m.attr("alink")||""}),g.remove("fullpage_styles");var y=e.getDoc().getElementsByTagName("head")[0];f&&(g.add(y,"style",{id:"fullpage_styles"},f),m=g.get("fullpage_styles"),m.styleSheet&&(m.styleSheet.cssText=f));var h={};tinymce.each(y.getElementsByTagName("link"),function(e){"stylesheet"==e.rel&&e.getAttribute("data-mce-fullpage")&&(h[e.href]=e)}),tinymce.each(o.getAll("link"),function(e){var t=e.attr("href");h[t]||"stylesheet"!=e.attr("rel")||g.add(y,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete h[t]}),tinymce.each(h,function(e){e.parentNode.removeChild(e)})}}function r(){var t,n="",l="";return e.getParam("fullpage_default_xml_pi")&&(n+='\n'),n+=e.getParam("fullpage_default_doctype",""),n+="\n\n\n",(t=e.getParam("fullpage_default_title"))&&(n+=""+t+"\n"),(t=e.getParam("fullpage_default_encoding"))&&(n+='\n'),(t=e.getParam("fullpage_default_font_family"))&&(l+="font-family: "+t+";"),(t=e.getParam("fullpage_default_font_size"))&&(l+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(l+="color: "+t+";"),n+="\n\n"}function o(t){t.selection||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(t.content=tinymce.trim(d)+"\n"+tinymce.trim(t.content)+"\n"+tinymce.trim(c))}var d,c,s=tinymce.each,m=tinymce.html.Node;e.addCommand("mceFullPageProperties",t),e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),e.on("BeforeSetContent",a),e.on("GetContent",o)});tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,l=i.body;return l.offsetWidth&&(e=l.offsetWidth,t=l.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){d.setStyle(a,"height",t().h-(h.clientHeight-a.clientHeight))}var u,h,a,f,m=document.body,g=document.documentElement;s=!s,h=e.getContainer(),u=h.style,a=e.getContentAreaContainer().firstChild,f=a.style,s?(i=f.width,l=f.height,f.width=f.height="100%",c=u.width,o=u.height,u.width=u.height="",d.addClass(m,"mce-fullscreen"),d.addClass(g,"mce-fullscreen"),d.addClass(h,"mce-fullscreen"),d.bind(window,"resize",n),n(),r=n):(f.width=i,f.height=l,c&&(u.width=c),o&&(u.height=o),d.removeClass(m,"mce-fullscreen"),d.removeClass(g,"mce-fullscreen"),d.removeClass(h,"mce-fullscreen"),d.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:s})}var i,l,r,c,o,s=!1,d=tinymce.DOM;return e.settings.inline?void 0:(e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&d.unbind(window,"resize",r)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return s}})});tinymce.PluginManager.add("hr",function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"


    ")}),n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});tinymce.PluginManager.add("image",function(e){function t(e,t){function i(e,i){n.parentNode&&n.parentNode.removeChild(n),t({width:e,height:i})}var n=document.createElement("img");n.onload=function(){i(n.clientWidth,n.clientHeight)},n.onerror=function(){i()};var a=n.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(n),n.src=e}function i(t){return tinymce.each(t,function(t){t.textStyle=function(){return e.formatter.getCssText({inline:"img",classes:[t.value]})}}),t}function n(t){return function(){var i=e.settings.image_list;"string"==typeof i?tinymce.util.XHR.send({url:i,success:function(e){t(tinymce.util.JSON.parse(e))}}):"function"==typeof i?i(t):t(i)}}function a(n){function a(t,i,n){var a,l=[];return tinymce.each(e.settings[t]||n,function(e){var t={text:e.text||e.title,value:e.value};l.push(t),(f[i]===e.value||!a&&e.selected)&&(a=t)}),a&&!f[i]&&(f[i]=a.value,a.selected=!0),l}function l(){var t=[{text:"None",value:""}];return tinymce.each(n,function(i){t.push({text:i.text||i.title,value:e.convertURL(i.value||i.url,"src"),menu:i.menu})}),t}function o(){var e,t,i,n;e=u.find("#width")[0],t=u.find("#height")[0],i=e.value(),n=t.value(),u.find("#constrain")[0].checked()&&g&&h&&i&&n&&(g!=i?(n=Math.round(i/g*n),t.value(n)):(i=Math.round(n/h*i),e.value(i))),g=i,h=n}function s(){function t(t){function i(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}t.onload=function(){f.width||f.height||y.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),i()},t.onerror=i}d(),o(),f=tinymce.extend(f,u.toJSON()),f.alt||(f.alt=""),""===f.width&&(f.width=null),""===f.height&&(f.height=null),f.style||(f.style=null),f={src:f.src,alt:f.alt,width:f.width,height:f.height,style:f.style,"class":f["class"]},f["class"]||delete f["class"],e.undoManager.transact(function(){return f.src?(v?y.setAttribs(v,f):(f.id="__mcenew",e.focus(),e.selection.setContent(y.createHTML("img",f)),v=y.get("__mcenew"),y.setAttrib(v,"id",null)),void t(v)):void(v&&(y.remove(v),e.focus(),e.nodeChanged()))})}function r(e){return e&&(e=e.replace(/px$/,"")),e}function c(){m&&m.value(e.convertURL(this.value(),"src")),t(this.value(),function(e){e.width&&e.height&&(g=e.width,h=e.height,u.find("#width").value(g),u.find("#height").value(h))})}function d(){function t(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}if(e.settings.image_advtab){var i=u.toJSON(),n=y.parseStyle(i.style);delete n.margin,n["margin-top"]=n["margin-bottom"]=t(i.vspace),n["margin-left"]=n["margin-right"]=t(i.hspace),n["border-width"]=t(i.border),u.find("#style").value(y.serializeStyle(y.parseStyle(y.serializeStyle(n))))}}var u,g,h,m,p,f={},y=e.dom,v=e.selection.getNode();g=y.getAttrib(v,"width"),h=y.getAttrib(v,"height"),"IMG"!=v.nodeName||v.getAttribute("data-mce-object")||v.getAttribute("data-mce-placeholder")?v=null:f={src:y.getAttrib(v,"src"),alt:y.getAttrib(v,"alt"),"class":y.getAttrib(v,"class"),width:g,height:h},n&&(m={type:"listbox",label:"Image list",values:l(),value:f.src&&e.convertURL(f.src,"src"),onselect:function(e){var t=u.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),u.find("#src").value(e.control.value())},onPostRender:function(){m=this}}),e.settings.image_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("image_class_list","class"))});var b=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:c},m];e.settings.image_description!==!1&&b.push({name:"alt",type:"textbox",label:"Image description"}),e.settings.image_dimensions!==!1&&b.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:o,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),b.push(p),e.settings.image_advtab?(v&&(f.hspace=r(v.style.marginLeft||v.style.marginRight),f.vspace=r(v.style.marginTop||v.style.marginBottom),f.border=r(v.style.borderWidth),f.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(v,"style")))),u=e.windowManager.open({title:"Insert/edit image",data:f,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:d},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:s})):u=e.windowManager.open({title:"Insert/edit image",data:f,body:b,onSubmit:s})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(a),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(a),context:"insert",prependToContext:!0})});tinymce.PluginManager.add("importcss",function(t){function e(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t}function n(e,n){function i(t,e){var c,o=t.href;if(o&&n(o,e)){s(t.imports,function(t){i(t,!0)});try{c=t.cssRules||t.rules}catch(a){}s(c,function(t){t.styleSheet?i(t.styleSheet,!0):t.selectorText&&s(t.selectorText.split(","),function(t){r.push(tinymce.trim(t))})})}}var r=[],c={};s(t.contentCSS,function(t){c[t]=!0}),n||(n=function(t,e){return e||c[t]});try{s(e.styleSheets,function(t){i(t)})}catch(o){}return r}function i(e){var n,i=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(i){var r=i[1],s=i[2].substr(1).split(".").join(" "),c=tinymce.makeMap("a,img");return i[1]?(n={title:e},t.schema.getTextBlockElements()[r]?n.block=r:t.schema.getBlockElements()[r]||c[r.toLowerCase()]?n.selector=r:n.inline=r):i[2]&&(n={inline:"span",title:e.substr(1),classes:s}),t.settings.importcss_merge_classes!==!1?n.classes=s:n.attributes={"class":s},n}}var r=this,s=tinymce.each;t.on("renderFormatsMenu",function(c){var o=t.settings,a={},l=o.importcss_selector_converter||i,f=e(o.importcss_selector_filter),m=c.control;t.settings.importcss_append||m.items().remove();var u=[];tinymce.each(o.importcss_groups,function(t){t=tinymce.extend({},t),t.filter=e(t.filter),u.push(t)}),s(n(c.doc||t.getDoc(),e(o.importcss_file_filter)),function(e){if(-1===e.indexOf(".mce-")&&!a[e]&&(!f||f(e))){var n,i=l.call(r,e);if(i){var s=i.name||tinymce.DOM.uniqueId();if(u)for(var c=0;c'+n+"";var i=e.dom.getParent(e.selection.getStart(),"time");if(i)return void e.dom.setOuterHTML(i,n)}e.insertContent(n)}var n,r,i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),u=[];e.addCommand("mceInsertDate",function(){a(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){a(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){a(n||r)},menu:u}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){r||(r=e),u.push({text:t(e),onclick:function(){n=e,a(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:u,context:"insert"})});!function(e){e.on("AddEditor",function(e){e.editor.settings.inline_styles=!1}),e.PluginManager.add("legacyoutput",function(t){t.on("init",function(){var i="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=e.explode(t.settings.font_size_style_values),l=t.schema;t.formatter.register({alignleft:{selector:i,attributes:{align:"left"}},aligncenter:{selector:i,attributes:{align:"center"}},alignright:{selector:i,attributes:{align:"right"}},alignjustify:{selector:i,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(n,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){l.addValidElements(e+"[*]")}),l.getElementRule("font")||l.addValidElements("font[face|size|color|style]"),e.each(i.split(","),function(e){var t=l.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}(tinymce);tinymce.PluginManager.add("link",function(t){function e(e){return function(){var n=t.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(t){e(tinymce.util.JSON.parse(t))}}):"function"==typeof n?n(e):e(n)}}function n(e){function n(t){var e=d.find("#text");(!e.value()||t.lastControl&&e.value()==t.lastControl.text())&&e.value(t.control.text()),d.find("#href").value(t.control.value())}function l(){var n=[{text:"None",value:""}];return tinymce.each(e,function(e){n.push({text:e.text||e.title,value:t.convertURL(e.value||e.url,"href"),menu:e.menu})}),n}function i(e){return tinymce.each(e,function(e){e.textStyle=function(){return t.formatter.getCssText({inline:"a",classes:[e.value]})}}),e}function a(e,n,l){var i,a=[];return tinymce.each(t.settings[e]||l,function(t){var e={text:t.text||t.title,value:t.value};a.push(e),(b[n]===t.value||!i&&t.selected)&&(i=e)}),i&&!b[n]&&(b[n]=i.value,i.selected=!0),a}function r(e){var l=[];return tinymce.each(t.dom.select("a:not([href])"),function(t){var n=t.name||t.id;n&&l.push({text:n,value:"#"+n,selected:-1!=e.indexOf("#"+n)})}),l.length?(l.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:l,onselect:n}):void 0}function o(){h&&h.value(t.convertURL(this.value(),"href")),!f&&0===b.text.length&&x&&this.parent().parent().find("#text")[0].value(this.value())}function s(t){var e=k.getContent();if(/]+>[^<]+<\/a>$/.test(e)||-1==e.indexOf("href=")))return!1;if(t){var n,l=t.childNodes;if(0===l.length)return!1;for(n=l.length-1;n>=0;n--)if(3!=l[n].nodeType)return!1}return!0}var u,c,f,d,x,v,h,g,m,p,y,b={},k=t.selection,w=t.dom;u=k.getNode(),c=w.getParent(u,"a[href]"),x=s(),b.text=f=c?c.innerText||c.textContent:k.getContent({format:"text"}),b.href=c?w.getAttrib(c,"href"):"",b.target=c?w.getAttrib(c,"target"):t.settings.default_link_target||null,b.rel=c?w.getAttrib(c,"rel"):null,b["class"]=c?w.getAttrib(c,"class"):null,b.title=c?w.getAttrib(c,"title"):"",x&&(v={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){b.text=this.value()}}),e&&(h={type:"listbox",label:"Link list",values:l(),onselect:n,value:t.convertURL(b.href,"href"),onPostRender:function(){h=this}}),t.settings.target_list!==!1&&(m={name:"target",type:"listbox",label:"Target",values:a("target_list","target",[{text:"None",value:""},{text:"New window",value:"_blank"}])}),t.settings.rel_list&&(g={name:"rel",type:"listbox",label:"Rel",values:a("rel_list","rel",[{text:"None",value:""}])}),t.settings.link_class_list&&(p={name:"class",type:"listbox",label:"Class",values:i(a("link_class_list","class"))}),t.settings.link_title!==!1&&(y={name:"title",type:"textbox",label:"Title",value:b.title}),d=t.windowManager.open({title:"Insert link",data:b,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:o},v,y,r(b.href),h,g,m,p],onSubmit:function(e){function n(e,n){var l=t.selection.getRng();window.setTimeout(function(){t.windowManager.confirm(e,function(e){t.selection.setRng(l),n(e)})},0)}function l(){var e={href:i,target:b.target?b.target:null,rel:b.rel?b.rel:null,"class":b["class"]?b["class"]:null,title:b.title?b.title:null};c?(t.focus(),x&&b.text!=f&&("innerText"in c?c.innerText=b.text:c.textContent=b.text),w.setAttribs(c,e),k.select(c),t.undoManager.add()):x?t.insertContent(w.createHTML("a",e,w.encode(b.text))):t.execCommand("mceInsertLink",!1,e)}var i;return b=tinymce.extend(b,e.data),(i=b.href)?i.indexOf("@")>0&&-1==i.indexOf("//")&&-1==i.indexOf("mailto:")?void n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i="mailto:"+i),l()}):/^\s*www\./i.test(i)?void n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i="http://"+i),l()}):void l():void t.execCommand("unlink")}})}t.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]"}),t.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),t.addShortcut("Ctrl+K","",e(n)),this.showDialog=n,t.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:e(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});tinymce.PluginManager.add("lists",function(e){function t(e){return e&&/^(OL|UL)$/.test(e.nodeName)}function n(e){return e.parentNode.firstChild==e}function r(e){return e.parentNode.lastChild==e}function o(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function i(e){return e&&"SPAN"===e.nodeName&&"bookmark"===e.getAttribute("data-mce-type")}var a=this;e.on("init",function(){function d(e){function t(t){var r,o,i;o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],1==o.nodeType&&(r=b.create("span",{"data-mce-type":"bookmark"}),o.hasChildNodes()?(i=Math.min(i,o.childNodes.length-1),t?o.insertBefore(r,o.childNodes[i]):b.insertAfter(r,o.childNodes[i])):o.appendChild(r),o=r,i=0),n[t?"startContainer":"endContainer"]=o,n[t?"startOffset":"endOffset"]=i}var n={};return t(!0),e.collapsed||t(),n}function s(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var r,o,i;r=i=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],r&&(1==r.nodeType&&(o=n(r),r=r.parentNode,b.remove(i)),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=o)}t(!0),t();var n=b.createRng();n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),k.setRng(n)}function f(t,n){var r,o,i,a=b.createFragment(),d=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&(o=b.create(n),o.tagName===e.settings.forced_root_block&&b.setAttribs(o,e.settings.forced_root_block_attrs),a.appendChild(o)),t)for(;r=t.firstChild;){var s=r.nodeName;i||"SPAN"==s&&"bookmark"==r.getAttribute("data-mce-type")||(i=!0),d[s]?(a.appendChild(r),o=null):n?(o||(o=b.create(n),a.appendChild(o)),o.appendChild(r)):a.appendChild(r)}return e.settings.forced_root_block?i||tinymce.Env.ie&&!(tinymce.Env.ie>10)||o.appendChild(b.create("br",{"data-mce-bogus":"1"})):a.appendChild(b.create("br")),a}function l(){return tinymce.grep(k.getSelectedBlocks(),function(e){return"LI"==e.nodeName})}function c(e,t,n){var r,o,i=b.select('span[data-mce-type="bookmark"]',e);n=n||f(t),r=b.createRng(),r.setStartAfter(t),r.setEndAfter(e),o=r.extractContents(),b.isEmpty(o)||b.insertAfter(o,e),b.insertAfter(n,e),b.isEmpty(t.parentNode)&&(tinymce.each(i,function(e){t.parentNode.parentNode.insertBefore(e,t.parentNode)}),b.remove(t.parentNode)),b.remove(t)}function p(e){var n,r;if(n=e.nextSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.appendChild(r);b.remove(n)}if(n=e.previousSibling,n&&t(n)&&n.nodeName==e.nodeName){for(;r=n.firstChild;)e.insertBefore(r,e.firstChild);b.remove(n)}}function u(e){tinymce.each(tinymce.grep(b.select("ol,ul",e)),function(e){var n,r=e.parentNode;"LI"==r.nodeName&&r.firstChild==e&&(n=r.previousSibling,n&&"LI"==n.nodeName&&(n.appendChild(e),b.isEmpty(r)&&b.remove(r))),t(r)&&(n=r.previousSibling,n&&"LI"==n.nodeName&&n.appendChild(e))})}function m(e){function o(e){b.isEmpty(e)&&b.remove(e)}var i,a=e.parentNode,d=a.parentNode;return n(e)&&r(e)?("LI"==d.nodeName?(b.insertAfter(e,d),o(d),b.remove(a)):t(d)?b.remove(a,!0):(d.insertBefore(f(e),a),b.remove(a)),!0):n(e)?("LI"==d.nodeName?(b.insertAfter(e,d),e.appendChild(a),o(d)):t(d)?d.insertBefore(e,a):(d.insertBefore(f(e),a),b.remove(e)),!0):r(e)?("LI"==d.nodeName?b.insertAfter(e,d):t(d)?b.insertAfter(e,a):(b.insertAfter(f(e),a),b.remove(e)),!0):("LI"==d.nodeName?(a=d,i=f(e,"LI")):i=t(d)?f(e,"LI"):f(e),c(a,e,i),u(a.parentNode),!0)}function h(e){function n(n,r){var o;if(t(n)){for(;o=e.lastChild.firstChild;)r.appendChild(o);b.remove(n)}}var r,o;return r=e.previousSibling,r&&t(r)?(r.appendChild(e),!0):r&&"LI"==r.nodeName&&t(r.lastChild)?(r.lastChild.appendChild(e),n(e.lastChild,r.lastChild),!0):(r=e.nextSibling,r&&t(r)?(r.insertBefore(e,r.firstChild),!0):r&&"LI"==r.nodeName&&t(e.lastChild)?!1:(r=e.previousSibling,r&&"LI"==r.nodeName?(o=b.create(e.parentNode.nodeName),r.appendChild(o),o.appendChild(e),n(e.lastChild,o),!0):!1))}function v(){var t=l();if(t.length){for(var n=d(k.getRng(!0)),r=0;r0))return n;for(var o=new tinymce.dom.TreeWalker(e.startContainer);n=o[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function r(e,n){var r,o,i=e.parentNode;for(t(n.lastChild)&&(o=n.lastChild),r=n.lastChild,r&&"BR"==r.nodeName&&e.hasChildNodes()&&b.remove(r);r=e.firstChild;)n.appendChild(r);o&&n.appendChild(o),b.remove(e),b.isEmpty(i)&&b.remove(i)}if(k.isCollapsed()){var o=b.getParent(k.getStart(),"LI");if(o){var i=k.getRng(!0),a=b.getParent(n(i,e),"LI");if(a&&a!=o){var f=d(i);return e?r(a,o):r(o,a),s(f),!0}if(!a&&!e&&N(o.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return v()?void 0:!0}),e.addCommand("Outdent",function(){return C()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){y("UL")}),e.addCommand("InsertOrderedList",function(){y("OL")}),e.on("keydown",function(t){9==t.keyCode&&e.dom.getParent(e.selection.getStart(),"LI")&&(t.preventDefault(),t.shiftKey?C():v())})}),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var t=this;e.on("nodechange",function(){for(var r=e.selection.getSelectedBlocks(),o=!1,i=0,a=r.length;!o&&a>i;i++){var d=r[i].nodeName;o="LI"==d&&n(r[i])||"UL"==d||"OL"==d}t.disabled(o)})}}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?a.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&a.backspaceDelete(!0)&&e.preventDefault()})});tinymce.PluginManager.add("media",function(e,t){function i(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":-1!=e.indexOf(".swf")?"application/x-shockwave-flash":""}function r(t){var i=e.settings.media_scripts;if(i)for(var r=0;r':"application/x-shockwave-flash"==o.source1mime?(a+='',o.poster&&(a+=''),a+=""):-1!=o.source1mime.indexOf("audio")?e.settings.audio_template_callback?a=e.settings.audio_template_callback(o):a+='":"script"==o.type?a+='':a=e.settings.video_template_callback?e.settings.video_template_callback(o):'"}return a}function s(e){var t={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,i){if(t.source1||"param"!=e||(t.source1=i.map.movie),("iframe"==e||"object"==e||"embed"==e||"video"==e||"audio"==e)&&(t.type||(t.type=e),t=tinymce.extend(i.map,t)),"script"==e){var o=r(i.map.src);if(!o)return;t={type:"script",source1:i.map.src,width:o.width,height:o.height}}"source"==e&&(t.source1?t.source2||(t.source2=i.map.src):t.source1=i.map.src),"img"!=e||t.poster||(t.poster=i.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function n(t){return t.getAttribute("data-mce-object")?s(e.serializer.serialize(t,{selection:!0})):{}}function m(e,t,i){function r(e,t){var i,r,o,a;for(i in t)if(o=""+t[i],e.map[i])for(r=e.length;r--;)a=e[r],a.name==i&&(o?(e.map[i]=o,a.value=o):(delete e.map[i],e.splice(r,1)));else o&&(e.push({name:i,value:o}),e.map[i]=o)}var o,a=new tinymce.html.Writer,c=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,s,n){switch(e){case"video":case"object":case"embed":case"img":case"iframe":r(s,{width:t.width,height:t.height})}if(i)switch(e){case"video":r(s,{poster:t.poster,src:""}),t.source2&&r(s,{src:""});break;case"iframe":r(s,{src:t.source1});break;case"source":if(c++,2>=c&&(r(s,{src:t["source"+c],type:t["source"+c+"mime"]}),!t["source"+c]))return;break;case"img":if(!t.poster)return;o=!0}a.start(e,s,n)},end:function(e){if("video"==e&&i)for(var s=1;2>=s;s++)if(t["source"+s]){var n=[];n.map={},s>c&&(r(n,{src:t["source"+s],type:t["source"+s+"mime"]}),a.start("source",n,!0))}if(t.poster&&"object"==e&&i&&!o){var m=[];m.map={},r(m,{src:t.poster,width:t.width,height:t.height}),a.start("img",m,!0)}a.end(e)}},new tinymce.html.Schema({})).parse(e),a.getContent()}var u=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}];e.on("ResolveName",function(e){var t;1==e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("]*>","gi")});var i=e.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){i[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(t,i){for(var o,a,c,s,n,m,u,d,l=t.length;l--;)if(a=t[l],a.parent&&("script"!=a.name||(d=r(a.attr("src"))))){for(c=new tinymce.html.Node("img",1),c.shortEnded=!0,d&&(d.width&&a.attr("width",d.width.toString()),d.height&&a.attr("height",d.height.toString())),m=a.attributes,o=m.length;o--;)s=m[o].name,n=m[o].value,"width"!==s&&"height"!==s&&"style"!==s&&(("data"==s||"src"==s)&&(n=e.convertURL(n,s)),c.attr("data-mce-p-"+s,n));u=a.firstChild&&a.firstChild.value,u&&(c.attr("data-mce-html",escape(u)),c.firstChild=null),c.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==i?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":i,"class":"mce-object mce-object-"+i}),a.replace(c)}}),e.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var i,r,o,a,c,s,n,m=e.length;m--;)if(i=e[m],i.parent){for(n=i.attr(t),r=new tinymce.html.Node(n,1),"audio"!=n&&"script"!=n&&r.attr({width:i.attr("width"),height:i.attr("height")}),r.attr({style:i.attr("style")}),a=i.attributes,o=a.length;o--;){var u=a[o].name;0===u.indexOf("data-mce-p-")&&r.attr(u.substr(11),a[o].value)}"script"==n&&r.attr("type","text/javascript"),c=i.attr("data-mce-html"),c&&(s=new tinymce.html.Node("#text",3),s.raw=!0,s.value=unescape(c),r.append(s)),i.replace(r)}})}),e.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");("audio"==t||"script"==t)&&e.preventDefault()}),e.on("objectResized",function(e){var t,i=e.target;i.getAttribute("data-mce-object")&&(t=i.getAttribute("data-mce-html"),t&&(t=unescape(t),i.setAttribute("data-mce-html",escape(m(t,{width:e.width,height:e.height})))))}),e.addButton("media",{tooltip:"Insert/edit video",onclick:o,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),e.addMenuItem("media",{icon:"media",text:"Insert video",onclick:o,context:"insert",prependToContext:!0})});tinymce.PluginManager.add("nonbreaking",function(n){var e=n.getParam("nonbreaking_force_tab");if(n.addCommand("mceNonBreaking",function(){n.insertContent(n.plugins.visualchars&&n.plugins.visualchars.state?' ':" "),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),n.addButton("nonbreaking",{title:"Insert nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),e){var a=+e>1?+e:3;n.on("keydown",function(e){if(9==e.keyCode){if(e.shiftKey)return;e.preventDefault();for(var t=0;a>t;t++)n.execCommand("mceNonBreaking")}})}});tinymce.PluginManager.add("noneditable",function(e){function t(e){var t;if(1===e.nodeType){if(t=e.getAttribute(u),t&&"inherit"!==t)return t;if(t=e.contentEditable,"inherit"!==t)return t}return null}function n(e){for(var n;e;){if(n=t(e))return"false"===n?e:null;e=e.parentNode}}function r(){function r(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function a(e){var t;if(e)for(t=new f(e,e),e=t.current();e;e=t.next())if(3===e.nodeType)return e}function i(n,r){var a,i;return"false"===t(n)&&u.isBlock(n)?void s.select(n):(i=u.createRng(),"true"===t(n)&&(n.firstChild||n.appendChild(e.getDoc().createTextNode(" ")),n=n.firstChild,r=!0),a=u.create("span",{id:g,"data-mce-bogus":!0},m),r?n.parentNode.insertBefore(a,n):u.insertAfter(a,n),i.setStart(a.firstChild,1),i.collapse(!0),s.setRng(i),a)}function o(e){var t,n,i,o;if(e)t=s.getRng(!0),t.setStartBefore(e),t.setEndBefore(e),n=a(e),n&&n.nodeValue.charAt(0)==m&&(n=n.deleteData(0,1)),u.remove(e,!0),s.setRng(t);else for(i=r(s.getStart());(e=u.get(g))&&e!==o;)i!==e&&(n=a(e),n&&n.nodeValue.charAt(0)==m&&(n=n.deleteData(0,1)),u.remove(e,!0)),o=e}function l(){function e(e,n){var r,a,i,o,l;if(r=d.startContainer,a=d.startOffset,3==r.nodeType){if(l=r.nodeValue.length,a>0&&l>a||(n?a==l:0===a))return}else{if(!(a0?a-1:a;r=r.childNodes[u],r.hasChildNodes()&&(r=r.firstChild)}for(i=new f(r,e);o=i[n?"prev":"next"]();){if(3===o.nodeType&&o.nodeValue.length>0)return;if("true"===t(o))return o}return e}var r,a,l,d,u;o(),l=s.isCollapsed(),r=n(s.getStart()),a=n(s.getEnd()),(r||a)&&(d=s.getRng(!0),l?(r=r||a,(u=e(r,!0))?i(u,!0):(u=e(r,!1))?i(u,!1):s.select(r)):(d=s.getRng(!0),r&&d.setStartBefore(r),a&&d.setEndAfter(a),s.setRng(d)))}function d(a){function i(e,t){for(;e=e[t?"previousSibling":"nextSibling"];)if(3!==e.nodeType||e.nodeValue.length>0)return e}function d(e,t){s.select(e),s.collapse(t)}function g(a){function i(e){for(var t=d;t;){if(t===e)return;t=t.parentNode}u.remove(e),l()}function o(){var r,o,l=e.schema.getNonEmptyElements();for(o=new tinymce.dom.TreeWalker(d,e.getBody());(r=a?o.prev():o.next())&&!l[r.nodeName.toLowerCase()]&&!(3===r.nodeType&&tinymce.trim(r.nodeValue).length>0);)if("false"===t(r))return i(r),!0;return n(r)?!0:!1}var f,d,c,g;if(s.isCollapsed()){if(f=s.getRng(!0),d=f.startContainer,c=f.startOffset,d=r(d)||d,g=n(d))return i(g),!1;if(3==d.nodeType&&(a?c>0:ch||h>124)&&h!=c.DELETE&&h!=c.BACKSPACE){if((tinymce.isMac?a.metaKey:a.ctrlKey)&&(67==h||88==h||86==h))return;if(a.preventDefault(),h==c.LEFT||h==c.RIGHT){var y=h==c.LEFT;if(e.dom.isBlock(m)){var T=y?m.previousSibling:m.nextSibling,C=new f(T,T),b=y?C.prev():C.next();d(b,!y)}else d(m,y)}}else if(h==c.LEFT||h==c.RIGHT||h==c.BACKSPACE||h==c.DELETE){if(p=r(v)){if(h==c.LEFT||h==c.BACKSPACE)if(m=i(p,!0),m&&"false"===t(m)){if(a.preventDefault(),h!=c.LEFT)return void u.remove(m);d(m,!0)}else o(p);if(h==c.RIGHT||h==c.DELETE)if(m=i(p),m&&"false"===t(m)){if(a.preventDefault(),h!=c.RIGHT)return void u.remove(m);d(m,!1)}else o(p)}if((h==c.BACKSPACE||h==c.DELETE)&&!g(h==c.BACKSPACE))return a.preventDefault(),!1}}var u=e.dom,s=e.selection,g="mce_noneditablecaret",m="";e.on("mousedown",function(n){var r=e.selection.getNode();"false"===t(r)&&r==n.target&&l()}),e.on("mouseup keyup",l),e.on("keydown",d)}function a(t){var n=l.length,r=t.content,a=tinymce.trim(o);if("raw"!=t.format){for(;n--;)r=r.replace(l[n],function(t){var n=arguments,i=n[n.length-2];return i>0&&'"'==r.charAt(i-1)?t:''+e.dom.encode("string"==typeof n[1]?n[1]:n[0])+""});t.content=r}}var i,o,l,f=tinymce.dom.TreeWalker,d="contenteditable",u="data-mce-"+d,c=tinymce.util.VK;i=" "+tinymce.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",o=" "+tinymce.trim(e.getParam("noneditable_noneditable_class","mceNonEditable"))+" ",l=e.getParam("noneditable_regexp"),l&&!l.length&&(l=[l]),e.on("PreInit",function(){r(),l&&e.on("BeforeSetContent",a),e.parser.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=e[r],t=" "+n.attr("class")+" ",-1!==t.indexOf(i)?n.attr(u,"true"):-1!==t.indexOf(o)&&n.attr(u,"false")}),e.serializer.addAttributeFilter(u,function(e){for(var t,n=e.length;n--;)t=e[n],l&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):(t.attr(d,null),t.attr(u,null))}),e.parser.addAttributeFilter(d,function(e){for(var t,n=e.length;n--;)t=e[n],t.attr(u,t.attr(d)),t.attr(d,null)})}),e.on("drop",function(e){n(e.target)&&e.preventDefault()})});tinymce.PluginManager.add("pagebreak",function(e){var a="mce-pagebreak",t=e.getParam("pagebreak_separator",""),n=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),r='';e.addCommand("mcePageBreak",function(){e.insertContent(e.settings.pagebreak_split_block?"

    "+r+"

    ":r)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,a)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,a)&&e.selection.select(t)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(a){for(var n,r,c=a.length;c--;)if(n=a[c],r=n.attr("class"),r&&-1!==r.indexOf("mce-pagebreak")){var o=n.parent;if(e.schema.getBlockElements()[o.name]&&e.settings.pagebreak_split_block){o.type=3,o.value=t,o.raw=!0,n.remove();continue}n.type=3,n.value=t,n.raw=!0}})})});!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!o?e=n.filter(e,[[/\n/g,"
    "]]):(e=n.filter(e,[[/\n\n/g,"

    "+a],[/^(.*<\/p>)(

    )$/,a+"$1"],[/\n/g,"
    "]]),-1!=e.indexOf("

    ")&&(e=a+e)),r(e)}function a(){var t=i.dom,n=i.getBody(),r=i.dom.getViewPort(i.getWin()),o=r.y,a=20,s;if(v=i.selection.getRng(),i.inline&&(s=i.selection.getScrollContainer(),s&&s.scrollTop>0&&(o=s.scrollTop)),v.getClientRects){var l=v.getClientRects();if(l.length)a=o+(l[0].top-t.getPos(n).y);else{a=o;var c=v.startContainer;c&&(3==c.nodeType&&c.parentNode!=n&&(c=c.parentNode),1==c.nodeType&&(a=t.getPos(c,s||n).y))}}h=t.add(i.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: absolute; top: "+a+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},y),(e.ie||e.gecko)&&t.setStyle(h,"left","rtl"==t.getStyle(n,"direction",!0)?65535:-65535),t.bind(h,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),h.focus(),i.selection.select(h,!0)}function s(){if(h){for(var e;e=i.dom.get("mcepastebin");)i.dom.remove(e),i.dom.unbind(e);v&&i.selection.setRng(v)}x=!1,h=v=null}function l(){var e=y,t,n;for(t=i.dom.select("div[id=mcepastebin]"),n=t.length;n--;){var r=t[n].innerHTML;e==y&&(e=""),r.length>e.length&&(e=r)}return e}function c(e){var t={};if(e&&e.types){var n=e.getData("Text");n&&n.length>0&&(t["text/plain"]=n);for(var i=0;i')},t.readAsDataURL(e.getAsFile()),!0}}if(!(!i.settings.paste_data_images||"text/html"in t||"text/plain"in t)&&e.clipboardData){var o=e.clipboardData.items;if(o)for(var a=0;a0}function p(){i.on("keydown",function(n){if(!n.isDefaultPrevented()&&(t.metaKeyPressed(n)&&86==n.keyCode||n.shiftKey&&45==n.keyCode)){if(x=n.shiftKey&&86==n.keyCode,n.stopImmediatePropagation(),b=(new Date).getTime(),e.ie&&x)return n.preventDefault(),void i.fire("paste",{ieFake:!0});s(),a()}}),i.on("paste",function(t){var c=d(t),f=(new Date).getTime()-b<1e3,p="text"==g.pasteFormat||x;return t.isDefaultPrevented()?void s():u(t,c)?void s():(f||t.preventDefault(),!e.ie||f&&!t.ieFake||(a(),i.dom.bind(h,"paste",function(e){e.stopPropagation()}),i.getDoc().execCommand("Paste",!1,null),c["text/html"]=l()),void setTimeout(function(){var e=l();return h&&h.firstChild&&"mcepastebin"===h.firstChild.id&&(p=!0),s(),!p&&f&&e&&e!=y&&(c["text/html"]=e),e!=y&&f||(e=c["text/html"]||c["text/plain"]||y,e!=y)?(!m(c,"text/html")&&m(c,"text/plain")&&(p=!0),void(p?o(c["text/plain"]||n.innerText(e)):r(e))):void(f||i.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."))},0))}),i.on("dragstart",function(e){if(e.dataTransfer.types)try{e.dataTransfer.setData("mce-internal",i.selection.getContent())}catch(t){}}),i.on("drop",function(e){var t=f(e);if(t&&!e.isDefaultPrevented()){var n=c(e.dataTransfer),a=n["mce-internal"]||n["text/html"]||n["text/plain"];a&&(e.preventDefault(),i.undoManager.transact(function(){n["mce-internal"]&&i.execCommand("Delete"),i.selection.setRng(t),n["text/html"]?r(a):o(a)}))}})}var g=this,h,v,b=0,y="%MCEPASTEBIN%",x;g.pasteHtml=r,g.pasteText=o,i.on("preInit",function(){p(),i.parser.addNodeFilter("img",function(t){if(!i.settings.paste_data_images)for(var n=t.length;n--;){var r=t[n].attributes.map.src;r&&0===r.indexOf("data:image")&&(t[n].attr("data-mce-object")||r===e.transparentSrc||t[n].remove())}})}),i.on("PreProcess",function(){i.dom.remove(i.dom.get("mcepastebin"))})}}),i(g,[c,d,u,h,v,l],function(e,t,n,i,r,o){function a(e){return/l?n&&(n=n.parent.parent):(i=n,n=null)),n&&n.name==a?n.append(e):(i=i||n,n=new r(a,1),s>1&&n.attr("start",""+s),e.wrap(n)),e.name="li",t.value="";var c=t.next;c&&3==c.type&&(c.value=c.value.replace(/^\u00a0+/,"")),l>o&&i&&i.lastChild.append(n),o=l}for(var n,i,o=1,a=e.getAll("p"),s=0;s/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var g=l.paste_word_valid_elements;g||(g="-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-table[width],-tr,-td[colspan|rowspan|width],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br,del");var h=new n({valid_elements:g,valid_children:"-li[p]"});e.each(h.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var v=new t({},h);v.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",u(n,n.attr("style"))),"span"==n.name&&n.parent&&!n.attributes.length&&n.unwrap()}),v.addAttributeFilter("class",function(e){for(var t=e.length,n,i;t--;)n=e[t],i=n.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(i)&&n.remove(),n.attr("class",null)}),v.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),v.addNodeFilter("a",function(e){for(var t=e.length,n,i,r;t--;)if(n=e[t],i=n.attr("href"),r=n.attr("name"),i&&-1!=i.indexOf("#_msocom_"))n.remove();else if(i&&0===i.indexOf("file://")&&(i=i.split("#")[1],i&&(i="#"+i)),i||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){n.unwrap();continue}n.attr({href:i,name:r})}else n.unwrap()});var b=v.parse(f);d(b),c.content=new i({},h).serialize(b)}})}return s.isWordContent=a,s}),i(b,[m,c,g,l],function(e,t,n,i){return function(r){function o(e){r.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){return e=i.filter(e,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/|/g,[/\u00a0<\/span>/g,"\xa0"],/
    $/i])}function s(e){if(!n.isWordContent(e))return e;var o=[];t.each(r.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:
     [\\s\\r\\n]+|
    )*(<\\/?("+o.join("|")+")[^>]*>)(?:
     [\\s\\r\\n]+|
    )*","g");return e=i.filter(e,[[a,"$1"]]),e=i.filter(e,[[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}function l(e){if(n.isWordContent(e))return e;var t=r.settings.paste_webkit_styles;if(r.settings.paste_remove_styles_if_webkit===!1||"all"==t)return e;if(t&&(t=t.split(/[, ]/)),t){var i=r.dom,o=r.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,n,r,a){var s=i.parseStyle(r,"span"),l={};if("none"===t)return n+a;for(var c=0;c]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,i){return t+' style="'+n+'"'+i})}e.webkit&&(o(l),o(a)),e.ie&&o(s)}}),i(y,[x,f,g,b],function(e,t,n,i){var r;e.add("paste",function(e){function o(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),r||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),r=!0))}var a=this,s,l=e.settings;a.clipboard=s=new t(e),a.quirks=new i(e),a.wordFilter=new n(e),e.settings.paste_as_text&&(a.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(a,a,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(a,a,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&a.clipboard.pasteHtml(t.content),t.text&&a.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:o,active:"text"==a.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:o})})}),a([l,f,g,b,y])}(this);tinymce.PluginManager.add("preview",function(e){var t=e.settings,i=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var n,a="";a+='',tinymce.each(e.contentCSS,function(t){a+=''});var r=t.body_id||"tinymce";-1!=r.indexOf("=")&&(r=e.getParam("body_id","","hash"),r=r[e.id]||r);var d=t.body_class||"";-1!=d.indexOf("=")&&(d=e.getParam("body_class","","hash"),d=d[e.id]||"");var o=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(n=""+a+'"+e.getContent()+"",i)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(n);else{var s=this.getEl("body").firstChild.contentWindow.document;s.open(),s.write(n),s.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})});tinymce.PluginManager.add("print",function(t){t.addCommand("mcePrint",function(){t.getWin().print()}),t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addShortcut("Ctrl+P","","mcePrint"),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})});tinymce.PluginManager.add("save",function(e){function a(){var a;return a=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty",!0)||e.isDirty()?(tinymce.triggerSave(),e.getParam("save_onsavecallback")?void(e.execCallback("save_onsavecallback",e)&&(e.startContent=tinymce.trim(e.getContent({format:"raw"})),e.nodeChanged())):void(a?(e.isNotDirty=!0,(!a.onsubmit||a.onsubmit())&&("function"==typeof a.submit?a.submit():e.windowManager.alert("Error: Form submit field collision.")),e.nodeChanged()):e.windowManager.alert("Error: No form element found."))):void 0}function n(){var a=tinymce.trim(e.startContent);return e.getParam("save_oncancelcallback")?void e.execCallback("save_oncancelcallback",e):(e.setContent(a),e.undoManager.clear(),void e.nodeChanged())}function t(){var a=this;e.on("nodeChange",function(){a.disabled(e.getParam("save_enablewhendirty",!0)&&!e.isDirty())})}e.addCommand("mceSave",a),e.addCommand("mceCancel",n),e.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:t}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:t}),e.addShortcut("ctrl+s","","mceSave")});!function(){function e(e,t,n,a,r){function i(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var a=e[t];if(!a)throw"Invalid capture group";n+=e[0].indexOf(a),e[0]=a}return[n,n+e[0].length,[e[0]]]}function d(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!u[e.nodeName])return"";if(t="",(u[e.nodeName]||m[e.nodeName])&&(t+="\n"),e=e.firstChild)do t+=d(e);while(e=e.nextSibling);return t}function o(e,t,n){var a,r,i,d,o=[],l=0,c=e,s=t.shift(),f=0;e:for(;;){if((u[c.nodeName]||m[c.nodeName])&&l++,3===c.nodeType&&(!r&&c.length+l>=s[1]?(r=c,d=s[1]-l):a&&o.push(c),!a&&c.length+l>s[0]&&(a=c,i=s[0]-l),l+=c.length),a&&r){if(c=n({startNode:a,startNodeIndex:i,endNode:r,endNodeIndex:d,innerNodes:o,match:s[2],matchIndex:f}),l-=r.length-d,a=null,r=null,o=[],s=t.shift(),f++,!s)break}else{if((!h[c.nodeName]||u[c.nodeName])&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function l(e){var t;if("function"!=typeof e){var n=e.nodeType?e:f.createElement(e);t=function(e,t){var a=n.cloneNode(!1);return a.setAttribute("data-mce-index",t),e&&a.appendChild(f.createTextNode(e)),a}}else t=e;return function(e){var n,a,r,i=e.startNode,d=e.endNode,o=e.matchIndex;if(i===d){var l=i;r=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),r.insertBefore(n,l));var c=t(e.match[0],o);return r.insertBefore(c,l),e.endNodeIndexh;++h){var g=e.innerNodes[h],p=t(g.data,o);g.parentNode.replaceChild(p,g),u.push(p)}var x=t(d.data.substring(0,e.endNodeIndex),o);return r=i.parentNode,r.insertBefore(n,i),r.insertBefore(s,i),r.removeChild(i),r=d.parentNode,r.insertBefore(x,d),r.insertBefore(a,d),r.removeChild(d),x}}var c,s,f,u,h,m,g=[],p=0;if(f=t.ownerDocument,u=r.getBlockElements(),h=r.getWhiteSpaceElements(),m=r.getShortEndedElements(),s=d(t)){if(e.global)for(;c=e.exec(s);)g.push(i(c,a));else c=s.match(e),g.push(i(c,a));return g.length&&(p=g.length,o(t,g,l(n))),p}}function t(t){function n(){function e(){r.statusbar.find("#next").disabled(!d(s+1).length),r.statusbar.find("#prev").disabled(!d(s-1).length)}function n(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){r.find("#find")[0].focus()})}var a={},r=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){t.focus(),c.done()},onSubmit:function(t){var i,o,l,f;return t.preventDefault(),o=r.find("#case").checked(),f=r.find("#words").checked(),l=r.find("#find").value(),l.length?a.text==l&&a.caseState==o&&a.wholeWord==f?0===d(s+1).length?void n():(c.next(),void e()):(i=c.find(l,o,f),i||n(),r.statusbar.items().slice(1).disabled(0===i),e(),void(a={text:l,caseState:o,wholeWord:f})):(c.done(!1),void r.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",onclick:function(){r.submit()}},{text:"Replace",disabled:!0,onclick:function(){c.replace(r.find("#replace").value())||(r.statusbar.items().slice(1).disabled(!0),s=-1,a={})}},{text:"Replace all",disabled:!0,onclick:function(){c.replace(r.find("#replace").value(),!0,!0),r.statusbar.items().slice(1).disabled(!0),a={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){c.prev(),e()}},{text:"Next",name:"next",disabled:!0,onclick:function(){c.next(),e()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:t.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function a(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function r(n){var a,r;return r=t.dom.create("span",{"data-mce-bogus":1}),r.className="mce-match-marker",a=t.getBody(),c.done(!1),e(n,a,r,!1,t.schema)}function i(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function d(e){var n,r=[];if(n=tinymce.toArray(t.getBody().getElementsByTagName("span")),n.length)for(var i=0;is&&f[o].setAttribute("data-mce-index",m-1)}return t.undoManager.add(),s=p,n?(g=d(p+1).length>0,c.next()):(g=d(p-1).length>0,c.prev()),!r&&g},c.done=function(e){var n,r,d,o;for(r=tinymce.toArray(t.getBody().getElementsByTagName("span")),n=0;n=d.end?(r=c,a=d.end-s):o&&l.push(c),!o&&c.length+s>d.start&&(o=c,i=d.start-s),s+=c.length),o&&r){if(c=n({startNode:o,startNodeIndex:i,endNode:r,endNodeIndex:a,innerNodes:l,match:d.text,matchIndex:u}),s-=r.length-a,o=null,r=null,l=[],d=t.shift(),u++,!d)break}else{if((!P[c.nodeName]||S[c.nodeName])&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function i(e){function t(t,n){var o=w[n];o.stencil||(o.stencil=e(o));var r=o.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",n),t&&r.appendChild(k.doc.createTextNode(t)),r}return function(e){var n,o,r,i=e.startNode,a=e.endNode,l=e.matchIndex,s=k.doc;if(i===a){var c=i;r=c.parentNode,e.startNodeIndex>0&&(n=s.createTextNode(c.data.substring(0,e.startNodeIndex)),r.insertBefore(n,c));var d=t(e.match,l);return r.insertBefore(d,c),e.endNodeIndexm;++m){var g=e.innerNodes[m],h=t(g.data,l);g.parentNode.replaceChild(h,g),f.push(h)}var v=t(a.data.substring(0,e.endNodeIndex),l);return r=i.parentNode,r.insertBefore(n,i),r.insertBefore(u,i),r.removeChild(i),r=a.parentNode,r.insertBefore(v,a),r.insertBefore(o,a),r.removeChild(a),v}}function a(e){var t=e.parentNode;t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function l(t){var n=e.getElementsByTagName("*"),o=[];t="number"==typeof t?""+t:null;for(var r=0;rt&&e(w[t],t)!==!1;t++);return this}function u(t){return w.length&&r(e,w,i(t)),this}function f(e,t){if(C&&e.global)for(;x=e.exec(C);)w.push(n(x,t));return this}function m(e){var t,n=l(e?s(e):null);for(t=n.length;t--;)a(n[t]);return this}function p(e){return w[e.getAttribute("data-mce-index")]}function g(e){return l(s(e))[0]}function h(e,t,n){return w.push({start:e,end:e+t,text:C.substr(e,t),data:n}),this}function v(e){var n=l(s(e)),o=t.dom.createRng();return o.setStartBefore(n[0]),o.setEndAfter(n[n.length-1]),o}function b(e,n){var o=v(e);return o.deleteContents(),n.length>0&&o.insertNode(t.dom.doc.createTextNode(n)),o}function y(){return w.splice(0,w.length),m(),this}var x,w=[],C,k=t.dom,S,P,N;return S=t.schema.getBlockElements(),P=t.schema.getWhiteSpaceElements(),N=t.schema.getShortEndedElements(),C=o(e),{text:C,matches:w,each:d,filter:c,reset:y,matchFromElement:p,elementFromMatch:g,find:f,add:h,wrap:u,unwrap:m,replace:b,rangeFromMatch:v,indexOf:s}}}),o(c,[s,d,u,f,m,p,g,h],function(e,t,n,o,r,i,a,l){t.add("spellchecker",function(t,s){function c(){return C.textMatcher||(C.textMatcher=new e(t.getBody(),t)),C.textMatcher}function d(e,t){var o=[];return n.each(t,function(e){o.push({selectable:!0,text:e.name,data:e.value})}),o}function u(e){for(var t in e)return!1;return!0}function f(e,i){var a=[],l=k[e];n.each(l,function(e){a.push({text:e,onclick:function(){t.insertContent(t.dom.encode(e)),t.dom.remove(i),g()}})}),a.push.apply(a,[{text:"-"},{text:"Ignore",onclick:function(){h(e,i)}},{text:"Ignore all",onclick:function(){h(e,i,!0)}},{text:"Finish",onclick:v}]),P=new o({items:a,context:"contextmenu",onautohide:function(e){-1!=e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){P.remove(),P=null}}),P.renderTo(document.body);var s=r.DOM.getPos(t.getContentAreaContainer()),c=t.dom.getPos(i[0]),d=t.dom.getRoot();"BODY"==d.nodeName?(c.x-=d.ownerDocument.documentElement.scrollLeft||d.scrollLeft,c.y-=d.ownerDocument.documentElement.scrollTop||d.scrollTop):(c.x-=d.scrollLeft,c.y-=d.scrollTop),s.x+=c.x,s.y+=c.y,P.moveTo(s.x,s.y+i[0].offsetHeight)}function m(){return t.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e]+',"g")}function p(){function e(e){return t.setProgressState(!1),u(e)?(t.windowManager.alert("No misspellings found"),void(S=!1)):(k=e,c().find(m()).filter(function(t){return!!e[t.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":e.text})}),void t.fire("SpellcheckStart"))}function n(e){t.windowManager.alert(e),t.setProgressState(!1),v()}function o(e,t,o){i.send({url:new a(s).toAbsolute(N.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:"text="+encodeURIComponent(t)+"&lang="+N.spellchecker_language,success:function(e){e=l.parse(e),e?e.error?n(e.error):o(e.words):n("Sever response wasn't proper JSON.")},error:function(e,t){n("Spellchecker request error: "+t.status)}})}if(S)return void v();v(),S=!0,t.setProgressState(!0);var r=N.spellchecker_callback||o;r.call(C,"spellcheck",c().text,e,n),t.focus()}function g(){t.dom.select("span.mce-spellchecker-word").length||v()}function h(e,o,r){t.selection.collapse(),r?n.each(t.dom.select("span.mce-spellchecker-word"),function(n){n.getAttribute("data-mce-word")==e&&t.dom.remove(n,!0)}):t.dom.remove(o,!0),g()}function v(){c().reset(),C.textMatcher=null,S&&(S=!1,t.fire("SpellcheckEnd"))}function b(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function y(e){var o,r=[];if(o=n.toArray(t.getBody().getElementsByTagName("span")),o.length)for(var i=0;i0){var r=t.dom.createRng();r.setStartBefore(o[0]),r.setEndAfter(o[o.length-1]),t.selection.setRng(r),f(n.getAttribute("data-mce-word"),o)}}}),t.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:p,selectable:!0,onPostRender:function(){var e=this;t.on("SpellcheckStart SpellcheckEnd",function(){e.active(S)})}});var T={tooltip:"Spellcheck",onclick:p,onPostRender:function(){var e=this;t.on("SpellcheckStart SpellcheckEnd",function(){e.active(S)})}};w.length>1&&(T.type="splitbutton",T.menu=w,T.onshow=x,T.onselect=function(e){N.spellchecker_language=e.control.settings.data}),t.addButton("spellchecker",T),t.addCommand("mceSpellCheck",p),t.on("remove",function(){P&&(P.remove(),P=null)}),t.on("change",g),this.getTextMatcher=c,this.getWordCharPattern=m,this.getLanguage=function(){return N.spellchecker_language},N.spellchecker_language=N.spellchecker_language||N.language||"en"})}),a([s,c])}(this);tinymce.PluginManager.add("tabfocus",function(e){function n(e){9!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}function t(n){function t(n){function t(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&t(e.parentNode)}function r(e){return e.tabIndex||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function c(e){return!r(e)&&"-1"!=e.getAttribute("tabindex")&&t(e)}if(u=i.select(":input:enabled,*[tabindex]:not(iframe)"),o(u,function(n,t){return n.id==e.id?(a=t,!1):void 0}),n>0){for(d=a+1;d=0;d--)if(c(u[d]))return u[d];return null}var a,u,c,d;if(!(9!==n.keyCode||n.ctrlKey||n.altKey||n.metaKey)&&(c=r(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==c.length&&(c[1]=c[0],c[0]=":prev"),u=n.shiftKey?":prev"==c[0]?t(-1):i.get(c[0]):":next"==c[1]?t(1):i.get(c[1]))){var y=tinymce.get(u.id||u.name);u.id&&y?y.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),u.focus()},10),n.preventDefault()}}var i=tinymce.DOM,o=tinymce.each,r=tinymce.explode;e.on("init",function(){e.inline&&tinymce.DOM.setAttrib(e.getBody(),"tabIndex",null)}),e.on("keyup",n),tinymce.Env.gecko?e.on("keypress keydown",t):e.on("keydown",t)});!function(e,t){"use strict";function n(e,t){for(var n,o=[],i=0;i "+t+" tr",a);i(n,function(n,r){r+=e,i(I.select("> td, > th",n),function(e,n){var i,a,l,s;if(A[r])for(;A[r][n];)n++;for(l=o(e,"rowspan"),s=o(e,"colspan"),a=r;r+l>a;a++)for(A[a]||(A[a]=[]),i=n;n+s>i;i++)A[a][i]={part:t,real:a==r&&i==n,elm:e,rowspan:l,colspan:s}})}),e+=n.length})}function s(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function c(e,t){var n;return n=A[t],n?n[e]:void 0}function d(e,t,n){e&&(n=parseInt(n,10),1===n?e.removeAttribute(t,1):e.setAttribute(t,n,1))}function u(e){return e&&(I.hasClass(e.elm,"mce-item-selected")||e==M)}function f(){var e=[];return i(a.rows,function(t){i(t.cells,function(n){return I.hasClass(n,"mce-item-selected")||M&&n==M.elm?(e.push(t),!1):void 0})}),e}function m(){var e=I.createRng();e.setStartAfter(a),e.setEndAfter(a),E.setRng(e),I.remove(a)}function p(t){var o,a={};return r.settings.table_clone_elements!==!1&&(a=e.makeMap((r.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),e.walk(t,function(e){var r;return 3==e.nodeType?(i(I.getParents(e.parentNode,null,t).reverse(),function(e){a[e.nodeName]&&(e=s(e,!1),o?r&&r.appendChild(e):o=r=e,r=e)}),r&&(r.innerHTML=n.ie?" ":'
    '),!1):void 0},"childNodes"),t=s(t,!1),d(t,"rowSpan",1),d(t,"colSpan",1),o?t.appendChild(o):n.ie||(t.innerHTML='
    '),t}function g(){var e=I.createRng(),t;return i(I.select("tr",a),function(e){0===e.cells.length&&I.remove(e)}),0===I.select("tr",a).length?(e.setStartBefore(a),e.setEndBefore(a),E.setRng(e),void I.remove(a)):(i(I.select("thead,tbody,tfoot",a),function(e){0===e.rows.length&&I.remove(e)}),l(),void(B&&(t=A[Math.min(A.length-1,B.y)],t&&(E.select(t[Math.min(t.length-1,B.x)].elm,!0),E.collapse(!0)))))}function h(e,t,n,o){var i,r,a,l,s;for(i=A[t][e].elm.parentNode,a=1;n>=a;a++)if(i=I.getNext(i,"tr")){for(r=e;r>=0;r--)if(s=A[t+a][r].elm,s.parentNode==i){for(l=1;o>=l;l++)I.insertAfter(p(s),s);break}if(-1==r)for(l=1;o>=l;l++)i.insertBefore(p(i.cells[0]),i.cells[0])}}function v(){i(A,function(e,t){i(e,function(e,n){var i,r,a;if(u(e)&&(e=e.elm,i=o(e,"colspan"),r=o(e,"rowspan"),i>1||r>1)){for(d(e,"rowSpan",1),d(e,"colSpan",1),a=0;i-1>a;a++)I.insertAfter(p(e),e);h(n,t,r-1,i)}})})}function b(t,n,o){var r,a,s,f,m,p,h,b,y,w,x;if(t?(r=T(t),a=r.x,s=r.y,f=a+(n-1),m=s+(o-1)):(B=D=null,i(A,function(e,t){i(e,function(e,n){u(e)&&(B||(B={x:n,y:t}),D={x:n,y:t})})}),B&&(a=B.x,s=B.y,f=D.x,m=D.y)),b=c(a,s),y=c(f,m),b&&y&&b.part==y.part){for(v(),l(),b=c(a,s).elm,d(b,"colSpan",f-a+1),d(b,"rowSpan",m-s+1),h=s;m>=h;h++)for(p=a;f>=p;p++)A[h]&&A[h][p]&&(t=A[h][p].elm,t!=b&&(w=e.grep(t.childNodes),i(w,function(e){b.appendChild(e)}),w.length&&(w=e.grep(b.childNodes),x=0,i(w,function(e){"BR"==e.nodeName&&I.getAttrib(e,"data-mce-bogus")&&x++0&&A[n-1][l]&&(g=A[n-1][l].elm,h=o(g,"rowSpan"),h>1)){d(g,"rowSpan",h+1);continue}}else if(h=o(r,"rowspan"),h>1){d(r,"rowSpan",h+1);continue}m=p(r),d(m,"colSpan",r.colSpan),f.appendChild(m),a=r}f.hasChildNodes()&&(e?c.parentNode.insertBefore(f,c):I.insertAfter(f,c))}}function w(e){var t,n;i(A,function(n){return i(n,function(n,o){return u(n)&&(t=o,e)?!1:void 0}),e?!t:void 0}),i(A,function(i,r){var a,l,s;i[t]&&(a=i[t].elm,a!=n&&(s=o(a,"colspan"),l=o(a,"rowspan"),1==s?e?(a.parentNode.insertBefore(p(a),a),h(t,r,l-1,s)):(I.insertAfter(p(a),a),h(t,r,l-1,s)):d(a,"colSpan",a.colSpan+1),n=a))})}function x(){var t=[];i(A,function(n){i(n,function(n,r){u(n)&&-1===e.inArray(t,r)&&(i(A,function(e){var t=e[r].elm,n;n=o(t,"colSpan"),n>1?d(t,"colSpan",n-1):I.remove(t)}),t.push(r))})}),g()}function C(){function e(e){var t,n,r;t=I.getNext(e,"tr"),i(e.cells,function(e){var t=o(e,"rowSpan");t>1&&(d(e,"rowSpan",t-1),n=T(e),h(n.x,n.y,1,1))}),n=T(e.cells[0]),i(A[n.y],function(e){var t;e=e.elm,e!=r&&(t=o(e,"rowSpan"),1>=t?I.remove(e):d(e,"rowSpan",t-1),r=e)})}var t;t=f(),i(t.reverse(),function(t){e(t)}),g()}function P(){var e=f();return I.remove(e),g(),e}function S(){var e=f();return i(e,function(t,n){e[n]=s(t,!0)}),e}function R(e,t){var n=f(),o=n[t?0:n.length-1],r=o.cells.length;e&&(i(A,function(e){var t;return r=0,i(e,function(e){e.real&&(r+=e.colspan),e.elm.parentNode==o&&(t=1)}),t?!1:void 0}),t||e.reverse(),i(e,function(e){var n,i=e.cells.length,a;for(n=0;i>n;n++)a=e.cells[n],d(a,"colSpan",1),d(a,"rowSpan",1);for(n=i;r>n;n++)e.appendChild(p(e.cells[i-1]));for(n=r;i>n;n++)I.remove(e.cells[n]);t?o.parentNode.insertBefore(e,o):I.insertAfter(e,o)}),I.removeClass(I.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function T(e){var t;return i(A,function(n,o){return i(n,function(n,i){return n.elm==e?(t={x:i,y:o},!1):void 0}),!t}),t}function k(e){B=T(e)}function N(){var e,t;return e=t=0,i(A,function(n,o){i(n,function(n,i){var r,a;u(n)&&(n=A[o][i],i>e&&(e=i),o>t&&(t=o),n.real&&(r=n.colspan-1,a=n.rowspan-1,r&&i+r>e&&(e=i+r),a&&o+a>t&&(t=o+a)))})}),{x:e,y:t}}function _(e){var t,n,o,i,r,a,l,s,c,d;if(D=T(e),B&&D){for(t=Math.min(B.x,D.x),n=Math.min(B.y,D.y),o=Math.max(B.x,D.x),i=Math.max(B.y,D.y),r=o,a=i,d=n;a>=d;d++)e=A[d][t],e.real||t-(e.colspan-1)=c;c++)e=A[n][c],e.real||n-(e.rowspan-1)=d;d++)for(c=t;o>=c;c++)e=A[d][c],e.real&&(l=e.colspan-1,s=e.rowspan-1,l&&c+l>r&&(r=c+l),s&&d+s>a&&(a=d+s));for(I.removeClass(I.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),d=n;a>=d;d++)for(c=t;r>=c;c++)A[d][c]&&I.addClass(A[d][c].elm,"mce-item-selected")}}var A,B,D,M,E=r.selection,I=E.dom;a=a||I.getParent(E.getStart(),"table"),l(),M=I.getParent(E.getStart(),"th,td"),M&&(B=T(M),D=N(),M=c(B.x,B.y)),e.extend(this,{deleteTable:m,split:v,merge:b,insertRow:y,insertCol:w,deleteCols:x,deleteRows:C,cutRows:P,copyRows:S,pasteRows:R,getPos:T,setStartCell:k,setEndCell:_})}}),o(u,[f,d,c],function(e,t,n){function o(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=n.each;return function(n){function r(){function t(t){function r(e,o){var i=e?"previousSibling":"nextSibling",r=n.dom.getParent(o,"tr"),l=r[i];if(l)return h(n,o,l,e),t.preventDefault(),!0;var d=n.dom.getParent(r,"table"),u=r.parentNode,f=u.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var m=a(e,d,u,"tbody");if(null!==m)return s(e,m,o)}return c(e,r,i,d)}function a(e,t,o,i){var r=n.dom.select(">"+i,t),a=r.indexOf(o);if(e&&0===a||!e&&a===r.length-1)return l(e,t);if(-1===a){var s="thead"===o.tagName.toLowerCase()?0:r.length-1;return r[s]}return r[a+(e?-1:1)]}function l(e,t){var o=e?"thead":"tfoot",i=n.dom.select(">"+o,t);return 0!==i.length?i[0]:null}function s(e,o,i){var r=d(o,e);return r&&h(n,i,r,e),t.preventDefault(),!0}function c(e,o,i,a){var l=a[i];if(l)return u(l),!0;var s=n.dom.getParent(a,"td,th");if(s)return r(e,s,t);var c=d(o,!e);return u(c),t.preventDefault(),!1}function d(e,t){var o=e&&e[t?"lastChild":"firstChild"];return o&&"BR"===o.nodeName?n.dom.getParent(o,"td,th"):o}function u(e){n.selection.setCursorLocation(e,0)}function f(){return y==e.UP||y==e.DOWN}function m(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"tr");return null!==n}function p(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=o(n,"colspan");return t}function g(e,t){var n=0,r=0;return i(e.children,function(e,i){return n+=o(e,"colspan"),r=i,n>t?!1:void 0}),r}function h(e,t,o,i){var r=p(n.dom.getParent(t,"td,th")),a=g(o,r),l=o.childNodes[a],s=d(l,i);u(s||l)}function v(e){var t=n.selection.getNode(),o=n.dom.getParent(t,"td,th"),i=n.dom.getParent(e,"td,th");return o&&o!==i&&b(o,i)}function b(e,t){return n.dom.getParent(e,"TABLE")===n.dom.getParent(t,"TABLE")}var y=t.keyCode;if(f()&&m(n)){var w=n.selection.getNode();setTimeout(function(){v(w)&&r(!t.shiftKey&&y===e.UP,w,t)},0)}}n.on("KeyDown",function(e){t(e)})}function a(){function e(e,t){var n=t.ownerDocument,o=n.createRange(),i;return o.setStartBefore(t),o.setEnd(e.endContainer,e.endOffset),i=n.createElement("body"),i.appendChild(o.cloneContents()),0===i.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}n.on("KeyDown",function(t){var o,i,r=n.dom;(37==t.keyCode||38==t.keyCode)&&(o=n.selection.getRng(),i=r.getParent(o.startContainer,"table"),i&&n.getBody().firstChild==i&&e(o,i)&&(o=r.createRng(),o.setStartBefore(i),o.setEndBefore(i),n.selection.setRng(o),t.preventDefault()))})}function l(){n.on("KeyDown SetContent VisualAid",function(){var e;for(e=n.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&!e.getAttribute("data-mce-bogus"))break;e&&"TABLE"==e.nodeName&&(n.settings.forced_root_block?n.dom.add(n.getBody(),n.settings.forced_root_block,n.settings.forced_root_block_attrs,t.ie&&t.ie<11?" ":'
    '):n.dom.add(n.getBody(),"br",{"data-mce-bogus":"1"}))}),n.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||"\xa0"==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&n.dom.remove(t)})}function s(){function e(e,t,n,o){var i=3,r=e.dom.getParent(t.startContainer,"TABLE"),a,l,s;return r&&(a=r.parentNode),l=t.startContainer.nodeType==i&&0===t.startOffset&&0===t.endOffset&&o&&("TR"==n.nodeName||n==a),s=("TD"==n.nodeName||"TH"==n.nodeName)&&!o,l||s}function t(){var t=n.selection.getRng(),o=n.selection.getNode(),i=n.dom.getParent(t.startContainer,"TD,TH");if(e(n,t,o,i)){i||(i=o);for(var r=i.lastChild;r.lastChild;)r=r.lastChild;t.setEnd(r,r.nodeValue.length),n.selection.setRng(t)}}n.on("KeyDown",function(){t()}),n.on("MouseDown",function(e){2!=e.button&&t()})}function c(){n.on("keydown",function(t){if((t.keyCode==e.DELETE||t.keyCode==e.BACKSPACE)&&!t.isDefaultPrevented()){var o=n.dom.getParent(n.selection.getStart(),"table");if(o){for(var i=n.dom.select("td,th",o),r=i.length;r--;)if(!n.dom.hasClass(i[r],"mce-item-selected"))return;t.preventDefault(),n.execCommand("mceTableDelete")}}})}c(),t.webkit&&(r(),s()),t.gecko&&(a(),l()),t.ie>10&&(a(),l())}}),o(m,[s,p,c],function(e,t,n){return function(o){function i(){o.getBody().style.webkitUserSelect="",d&&(o.dom.removeClass(o.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),d=!1)}function r(t){var n,i,r=t.target;if(s&&(l||r!=s)&&("TD"==r.nodeName||"TH"==r.nodeName)){i=a.getParent(r,"table"),i==c&&(l||(l=new e(o,i),l.setStartCell(s),o.getBody().style.webkitUserSelect="none"),l.setEndCell(r),d=!0),n=o.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(u){}t.preventDefault()}}var a=o.dom,l,s,c,d=!0;return o.on("MouseDown",function(e){2!=e.button&&(i(),s=a.getParent(e.target,"td,th"),c=a.getParent(s,"table"))}),o.on("mouseover",r),o.on("remove",function(){a.unbind(o.getDoc(),"mouseover",r)}),o.on("MouseUp",function(){function e(e,o){var r=new t(e,e);do{if(3==e.nodeType&&0!==n.trim(e.nodeValue).length)return void(o?i.setStart(e,0):i.setEnd(e,e.nodeValue.length));if("BR"==e.nodeName)return void(o?i.setStartBefore(e):i.setEndBefore(e))}while(e=o?r.next():r.prev())}var i,r=o.selection,d,u,f,m,p;if(s){if(l&&(o.getBody().style.webkitUserSelect=""),d=a.select("td.mce-item-selected,th.mce-item-selected"),d.length>0){i=a.createRng(),f=d[0],p=d[d.length-1],i.setStartBefore(f),i.setEndAfter(f),e(f,1),u=new t(f,a.getParent(d[0],"table"));do if("TD"==f.nodeName||"TH"==f.nodeName){if(!a.hasClass(f,"mce-item-selected"))break;m=f}while(f=u.next());e(m),r.setRng(i)}o.nodeChanged(),s=l=c=null}}),o.on("KeyUp Drop",function(){i(),s=l=c=null}),{clear:i}}}),o(g,[s,u,m,c,p,d,h],function(e,t,n,o,i,r,a){function l(o){function i(e){return e?e.replace(/px$/,""):""}function a(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(e){s("left center right".split(" "),function(t){o.formatter.remove("align"+t,{},e)})}function c(e){s("top middle bottom".split(" "),function(t){o.formatter.remove("valign"+t,{},e)})}function d(){var e=o.dom,t,n,c,d;t=e.getParent(o.selection.getStart(),"table"),d={width:i(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:i(e.getStyle(t,"height")||e.getAttrib(t,"height")),cellspacing:t?e.getAttrib(t,"cellspacing"):"",cellpadding:t?e.getAttrib(t,"cellpadding"):"",border:t?e.getAttrib(t,"border"):"",caption:!!e.select("caption",t)[0]},s("left center right".split(" "),function(e){o.formatter.matchNode(t,"align"+e)&&(d.align=e)}),t||(n={label:"Cols",name:"cols"},c={label:"Rows",name:"rows"}),o.windowManager.open({title:"Table properties",items:{type:"form",layout:"grid",columns:2,data:d,defaults:{type:"textbox",maxWidth:50},items:[n,c,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"},{label:"Alignment",minWidth:90,name:"align",type:"listbox",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]},onsubmit:function(){var n=this.toJSON(),i;o.undoManager.transact(function(){t||(t=g(n.cols||1,n.rows||1)),o.dom.setAttribs(t,{cellspacing:n.cellspacing,cellpadding:n.cellpadding,border:n.border}),o.dom.setStyles(t,{width:a(n.width),height:a(n.height)}),i=e.select("caption",t)[0],i&&!n.caption&&e.remove(i),!i&&n.caption&&(i=e.create("caption"),i.innerHTML=r.ie?"\xa0":'
    ',t.insertBefore(i,t.firstChild)),l(t),n.align&&o.formatter.apply("align"+n.align,{},t),o.focus(),o.addVisual()})}})}function u(e,t){o.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",size:10},{label:"Rows",name:"rows",type:"textbox",size:10}],onsubmit:function(){var n=this.toJSON();o.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})}function f(){var e=o.dom,t,n,r=[];r=o.dom.select("td.mce-item-selected,th.mce-item-selected"),t=o.dom.getParent(o.selection.getStart(),"td,th"),!r.length&&t&&r.push(t),t=t||r[0],t&&(n={width:i(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:i(e.getStyle(t,"height")||e.getAttrib(t,"height")),scope:e.getAttrib(t,"scope")},n.type=t.nodeName.toLowerCase(),s("left center right".split(" "),function(e){o.formatter.matchNode(t,"align"+e)&&(n.align=e)}),s("top middle bottom".split(" "),function(e){o.formatter.matchNode(t,"valign"+e)&&(n.valign=e)}),o.windowManager.open({title:"Cell properties",items:{type:"form",data:n,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},onsubmit:function(){var t=this.toJSON();o.undoManager.transact(function(){s(r,function(n){o.dom.setAttrib(n,"scope",t.scope),o.dom.setStyles(n,{width:a(t.width),height:a(t.height)}),t.type&&n.nodeName.toLowerCase()!=t.type&&(n=e.rename(n,t.type)),l(n),t.align&&o.formatter.apply("align"+t.align,{},n),c(n),t.valign&&o.formatter.apply("valign"+t.valign,{},n)}),o.focus()})}}))}function m(){var e=o.dom,t,n,r,c,d=[];t=o.dom.getParent(o.selection.getStart(),"table"),n=o.dom.getParent(o.selection.getStart(),"td,th"),s(t.rows,function(t){s(t.cells,function(o){return e.hasClass(o,"mce-item-selected")||o==n?(d.push(t),!1):void 0})}),r=d[0],r&&(c={height:i(e.getStyle(r,"height")||e.getAttrib(r,"height")),scope:e.getAttrib(r,"scope")},c.type=r.parentNode.nodeName.toLowerCase(),s("left center right".split(" "),function(e){o.formatter.matchNode(r,"align"+e)&&(c.align=e)}),o.windowManager.open({title:"Row properties",items:{type:"form",data:c,columns:2,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"}]},onsubmit:function(){var t=this.toJSON(),n,i,r;o.undoManager.transact(function(){var c=t.type;s(d,function(s){o.dom.setAttrib(s,"scope",t.scope),o.dom.setStyles(s,{height:a(t.height)}),c!=s.parentNode.nodeName.toLowerCase()&&(n=e.getParent(s,"table"),i=s.parentNode,r=e.select(c,n)[0],r||(r=e.create(c),n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)),r.appendChild(s),i.hasChildNodes()||e.remove(i)),l(s),t.align&&o.formatter.apply("align"+t.align,{},s)}),o.focus()})}}))}function p(e){return function(){o.execCommand(e)}}function g(e,t){var n,i,a;for(a='',n=0;t>n;n++){for(a+="",i=0;e>i;i++)a+="";a+=""}a+="
    "+(r.ie?" ":"
    ")+"
    ",o.insertContent(a);var l=o.dom.get("__mce");return o.dom.setAttrib(l,"id",null),l}function h(e,t){function n(){e.disabled(!o.dom.getParent(o.selection.getStart(),t)),o.selection.selectorChanged(t,function(t){e.disabled(!t)})}o.initialized?n():o.on("init",n)}function v(){h(this,"table")}function b(){h(this,"td,th")}function y(){var e="";e='';for(var t=0;10>t;t++){e+="";for(var n=0;10>n;n++)e+='';e+=""}return e+="
    ",e+='

    '}function w(e,t,n){var i=n.getEl().getElementsByTagName("table")[0],r,a,l,s,c,d=n.isRtl()||"tl-tr"==n.parent().rel;for(i.nextSibling.innerHTML=e+1+" x "+(t+1),d&&(e=9-e),a=0;10>a;a++)for(r=0;10>r;r++)s=i.rows[a].childNodes[r].firstChild,c=(d?r>=e:e>=r)&&t>=a,o.dom.toggleClass(s,"mce-active",c),c&&(l=s);return l.parentNode}var x,C,P=this;o.settings.table_grid===!1?o.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:d}):o.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),d())},onshow:function(){w(0,0,this.menu.items()[0])},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(e,"mce-active"),o.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:y(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t=e.target,n,o;"A"==t.tagName.toUpperCase()&&(n=parseInt(t.getAttribute("data-mce-x"),10),o=parseInt(t.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(n=9-n),(n!==this.lastX||o!==this.lastY)&&(w(n,o,e.control),this.lastX=n,this.lastY=o))},onkeydown:function(e){var t=this.lastX,n=this.lastY,o;switch(e.keyCode){case 37:t>0&&(t--,o=!0);break;case 39:o=!0,9>t&&t++;break;case 38:o=!0,n>0&&n--;break;case 40:o=!0,9>n&&n++}o&&(e.preventDefault(),e.stopPropagation(),w(t,n,e.control).focus(),this.lastX=t,this.lastY=n)},onclick:function(e){"A"==e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),this.parent().cancel(),g(this.lastX+1,this.lastY+1))}}]}),o.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:v,onclick:d}),o.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:v,cmd:"mceTableDelete"}),o.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:p("mceTableCellProps"),onPostRender:b},{text:"Merge cells",onclick:p("mceTableMergeCells"),onPostRender:b},{text:"Split cell",onclick:p("mceTableSplitCells"),onPostRender:b}]}),o.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:p("mceTableInsertRowBefore"),onPostRender:b},{text:"Insert row after",onclick:p("mceTableInsertRowAfter"),onPostRender:b},{text:"Delete row",onclick:p("mceTableDeleteRow"),onPostRender:b},{text:"Row properties",onclick:p("mceTableRowProps"),onPostRender:b},{text:"-"},{text:"Cut row",onclick:p("mceTableCutRow"),onPostRender:b},{text:"Copy row",onclick:p("mceTableCopyRow"),onPostRender:b},{text:"Paste row before",onclick:p("mceTablePasteRowBefore"),onPostRender:b},{text:"Paste row after",onclick:p("mceTablePasteRowAfter"),onPostRender:b}]}),o.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:p("mceTableInsertColBefore"),onPostRender:b},{text:"Insert column after",onclick:p("mceTableInsertColAfter"),onPostRender:b},{text:"Delete column",onclick:p("mceTableDeleteCol"),onPostRender:b}]});var S=[];s("inserttable tableprops deletetable | cell row column".split(" "),function(e){S.push("|"==e?{text:"-"}:o.menuItems[e])}),o.addButton("table",{type:"menubutton",title:"Table",menu:S}),r.isIE||o.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(o.selection.select(e),o.nodeChanged())}),P.quirks=new t(o),o.on("Init",function(){x=o.windowManager,P.cellSelection=new n(o)}),s({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t,n,i;i=o.dom.getParent(o.selection.getStart(),"th,td"),i&&(t=i.rowSpan,n=i.colSpan),o.dom.select("td.mce-item-selected,th.mce-item-selected").length?e.merge():u(e,i)},mceTableInsertRowBefore:function(e){e.insertRow(!0)},mceTableInsertRowAfter:function(e){e.insertRow()},mceTableInsertColBefore:function(e){e.insertCol(!0)},mceTableInsertColAfter:function(e){e.insertCol()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){C=e.cutRows()},mceTableCopyRow:function(e){C=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(C,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(C)},mceTableDelete:function(e){e.deleteTable()}},function(t,n){o.addCommand(n,function(){var n=new e(o);n&&(t(n),o.execCommand("mceRepaint"),P.cellSelection.clear())})}),s({mceInsertTable:function(){d()},mceTableRowProps:m,mceTableCellProps:f},function(e,t){o.addCommand(t,function(t,n){e(n)})})}var s=o.each;a.add("table",l)}),a([s,u,m,g])}(this);tinymce.PluginManager.add("template",function(e){function t(t){return function(){var a=e.settings.templates;"string"==typeof a?tinymce.util.XHR.send({url:a,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(a)}}function a(t){function a(t){function a(t){if(-1==t.indexOf("")){var a="";tinymce.each(e.contentCSS,function(t){a+=''}),t=""+a+""+t+""}t=r(t,"template_preview_replace_values");var l=n.find("iframe")[0].getEl().contentWindow.document;l.open(),l.write(t),l.close()}var c=t.control.value();c.url?tinymce.util.XHR.send({url:c.url,success:function(e){l=e,a(l)}}):(l=c.content,a(l)),n.find("#description")[0].text(t.control.value().description)}var n,l,i=[];return t&&0!==t.length?(tinymce.each(t,function(e){i.push({selected:!i.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),n=e.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:i,onselect:a}}]},{type:"label",name:"description",label:"Description",text:" "},{type:"iframe",flex:1,border:1}],onsubmit:function(){c(!1,l)},width:e.getParam("template_popup_width",600),height:e.getParam("template_popup_height",500)}),void n.find("listbox")[0].fire("select")):void e.windowManager.alert("No templates defined")}function n(t,a){function n(e,t){if(e=""+e,e.length0&&(o=p.create("div",null),o.appendChild(s[0].cloneNode(!0))),i(p.select("*",o),function(t){c(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),c(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),c(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=m)}),l(o),e.execCommand("mceInsertContent",!1,o.innerHTML),e.addVisual()}var i=tinymce.each;e.addCommand("mceInsertTemplate",c),e.addButton("template",{title:"Insert template",onclick:t(a)}),e.addMenuItem("template",{text:"Insert template",onclick:t(a),context:"insert"}),e.on("PreProcess",function(t){var a=e.dom;i(a.select("div",t.node),function(t){a.hasClass(t,"mceTmpl")&&(i(a.select("*",t),function(t){a.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),l(t))})})});tinymce.PluginManager.add("textcolor",function(e){function t(){var t,o,l=[];for(o=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],t=0;t',a=o.length-1,c=e.settings.textcolor_rows||5,i=e.settings.textcolor_cols||8,F=0;c>F;F++){for(r+="",n=0;i>n;n++)d=F*i+n,d>a?r+="":(l=o[d],r+='
    ');r+=""}return r+=""}function l(t){var o,l=this.parent();(o=t.target.getAttribute("data-mce-color"))&&(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,l.hidePanel(),o="#"+o,l.color(o),e.execCommand(l.settings.selectcmd,!1,o))}function r(){var t=this;t._color&&e.execCommand(t.settings.selectcmd,!1,t._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",selectcmd:"ForeColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:l},onclick:r}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",selectcmd:"HiliteColor",panel:{role:"application",ariaRemember:!0,html:o,onclick:l},onclick:r})});tinymce.PluginManager.add("visualblocks",function(e,s){function o(){var s=this;s.active(a),e.on("VisualBlocks",function(){s.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))})}var l,t,a;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var o,c=e.dom;l||(l=c.uniqueId(),o=c.create("link",{id:l,rel:"stylesheet",href:s+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(o)),e.on("PreviewFormats AfterPreviewFormats",function(s){a&&c.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==s.type)}),c.toggleClass(e.getBody(),"mce-visualblocks"),a=e.dom.hasClass(e.getBody(),"mce-visualblocks"),t&&t.active(c.hasClass(e.getBody(),"mce-visualblocks")),e.fire("VisualBlocks")}),e.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:o,selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")}))});tinymce.PluginManager.add("visualchars",function(e){function a(a){var t,s,i,r,c,d,l=e.getBody(),m=e.selection;if(n=!n,o.state=n,e.fire("VisualChars",{state:n}),a&&(d=m.getBookmark()),n)for(s=[],tinymce.walk(l,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&s.push(e)},"childNodes"),i=0;i$1
    '),c=e.dom.create("div",null,r);t=c.lastChild;)e.dom.insertAfter(t,s[i]);e.dom.remove(s[i])}else for(s=e.dom.select("span.mce-nbsp",l),i=s.length-1;i>=0;i--)e.dom.remove(s[i],1);m.moveToBookmark(d)}function t(){var a=this;e.on("VisualChars",function(e){a.active(e.state)})}var n,o=this;e.addCommand("mceVisualChars",a),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:t,selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,a(!1))})});tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,o,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),o=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount",disabled:e.settings.readonly},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),t=t.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),t=t.replace(o,"");var r=t.match(n);r&&(a=r.length)}return a}});tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var n,o=[];if(t)return d(t.split(/[ ,]/),function(t){function i(){var i=e.selection;"bullist"==r&&i.selectorChanged("ul > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"UL"==n)}),"numlist"==r&&i.selectorChanged("ol > li",function(e,i){for(var n,o=i.parents.length;o--&&(n=i.parents[o].nodeName,"OL"!=n&&"UL"!=n););t.active(e&&"OL"==n)}),t.settings.stateSelector&&i.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&i.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?n=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_size),o.push(t),n=null):(n||(n={type:"buttongroup",items:[]},o.push(n)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),n.items.push(t),e.initialized?i():e.on("init",i)))}),i.push({type:"toolbar",layout:"flow",items:o}),!0}var i=[];if(tinymce.isArray(u.toolbar)){if(0===u.toolbar.length)return;tinymce.each(u.toolbar,function(e,t){u["toolbar"+(t+1)]=e}),delete u.toolbar}for(var n=1;10>n&&t(u["toolbar"+n]);n++);return i.length||u.toolbar===!1||t(u.toolbar||f),i.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:i}:void 0}function i(){function t(t){var i;return"|"==t?{text:"|"}:i=e.menuItems[t]}function i(i){var n,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").split(/[ ,]/)),u.menu?(o=u.menu[i],a=!0):o=h[i],o){n={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var i=t(e);i&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==i&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;l - - - - Testing Key Events - - - -
      -
    -

     

    -
    -
    - -
    - - - -
    - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html deleted file mode 100644 index c0f3aab4..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/key_tests/remove_on_keypress.html +++ /dev/null @@ -1,36 +0,0 @@ - -
    Pressing "a" while this checkbox is - focused will remove it from the DOM.
    -
    -
    - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html deleted file mode 100644 index 741d7f4b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/keyboard_shortcut.html +++ /dev/null @@ -1,36 +0,0 @@ - - -
    CTRL + 1: red
    -
    SHIFT + 1: green
    -
    CTRL + SHIFT + 1: yellow
    -
    ALT + 1: lightblue
    -
    CTRL + ALT + 1: lightgreen
    -
    SHIFT + ALT + 1: silver
    -
    CTRL + SHIFT + ALT + 1: magenta
    - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html deleted file mode 100644 index 7c8df003..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/linked_image.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - -Linking with an image - - -banner
    -Click here for next page
    -
    -link to other link
    -Just another link.
    -

    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html deleted file mode 100644 index 42b0442b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Boolean Attribute Selected - - -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html deleted file mode 100644 index 60cd0338..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/locators_tests/boolean_attribute_selected_html4.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Boolean Attribute Selected - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html deleted file mode 100644 index 99a45e77..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/longContentPage.html +++ /dev/null @@ -1,55 +0,0 @@ - - - TouchLongContent - - - -

    Touch API

    -

    Page with long content

    -
                       



    -

    Long text:                                                                                                                          This is a very long text to make the screen horizontally movable, to test the flick gesture at a long horizontal distance Normal link                                                                                                                                           at normal and fast speeds to see results of it Normal link end

    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    - Middle of the screen Normal link -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    -










    - Bottom of the screen Normal link


    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html deleted file mode 100644 index 9fa39d56..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/macbeth.html +++ /dev/null @@ -1,5255 +0,0 @@ - - - - Macbeth: Entire Play - - - - - - - -Quick link to last speech - -

    ACT I

    -

    SCENE I. A desert place.

    -

    -Thunder and lightning. Enter three Witches -
    - -First Witch -
    -When shall we three meet again
    -In thunder, lightning, or in rain?
    -
    - -Second Witch -
    -When the hurlyburly's done,
    -When the battle's lost and won.
    -
    - -Third Witch -
    -That will be ere the set of sun.
    -
    - -First Witch -
    -Where the place?
    -
    - -Second Witch -
    - Upon the heath.
    -
    - -Third Witch -
    -There to meet with Macbeth.
    -
    - -First Witch -
    -I come, Graymalkin!
    -
    - -Second Witch -
    -Paddock calls.
    -
    - -Third Witch -
    -Anon.
    -
    - -ALL -
    -Fair is foul, and foul is fair:
    -Hover through the fog and filthy air.
    -

    Exeunt

    -
    -

    SCENE II. A camp near Forres.

    -

    -Alarum within. Enter DUNCAN, MALCOLM, DONALBAIN, LENNOX, with Attendants, meeting a bleeding Sergeant -
    - -DUNCAN -
    -What bloody man is that? He can report,
    -As seemeth by his plight, of the revolt
    -The newest state.
    -
    - -MALCOLM -
    - This is the sergeant
    -Who like a good and hardy soldier fought
    -'Gainst my captivity. Hail, brave friend!
    -Say to the king the knowledge of the broil
    -As thou didst leave it.
    -
    - -Sergeant -
    -Doubtful it stood;
    -As two spent swimmers, that do cling together
    -And choke their art. The merciless Macdonwald--
    -Worthy to be a rebel, for to that
    -The multiplying villanies of nature
    -Do swarm upon him--from the western isles
    -Of kerns and gallowglasses is supplied;
    -And fortune, on his damned quarrel smiling,
    -Show'd like a rebel's whore: but all's too weak:
    -For brave Macbeth--well he deserves that name--
    -Disdaining fortune, with his brandish'd steel,
    -Which smoked with bloody execution,
    -Like valour's minion carved out his passage
    -Till he faced the slave;
    -Which ne'er shook hands, nor bade farewell to him,
    -Till he unseam'd him from the nave to the chaps,
    -And fix'd his head upon our battlements.
    -
    - -DUNCAN -
    -O valiant cousin! worthy gentleman!
    -
    - -Sergeant -
    -As whence the sun 'gins his reflection
    -Shipwrecking storms and direful thunders break,
    -So from that spring whence comfort seem'd to come
    -Discomfort swells. Mark, king of Scotland, mark:
    -No sooner justice had with valour arm'd
    -Compell'd these skipping kerns to trust their heels,
    -But the Norweyan lord surveying vantage,
    -With furbish'd arms and new supplies of men
    -Began a fresh assault.
    -
    - -DUNCAN -
    -Dismay'd not this
    -Our captains, Macbeth and Banquo?
    -
    - -Sergeant -
    -Yes;
    -As sparrows eagles, or the hare the lion.
    -If I say sooth, I must report they were
    -As cannons overcharged with double cracks, so they
    -Doubly redoubled strokes upon the foe:
    -Except they meant to bathe in reeking wounds,
    -Or memorise another Golgotha,
    -I cannot tell.
    -But I am faint, my gashes cry for help.
    -
    - -DUNCAN -
    -So well thy words become thee as thy wounds;
    -They smack of honour both. Go get him surgeons.
    -

    Exit Sergeant, attended

    -Who comes here?
    -

    Enter ROSS

    -
    - -MALCOLM -
    - The worthy thane of Ross.
    -
    - -LENNOX -
    -What a haste looks through his eyes! So should he look
    -That seems to speak things strange.
    -
    - -ROSS -
    -God save the king!
    -
    - -DUNCAN -
    -Whence camest thou, worthy thane?
    -
    - -ROSS -
    -From Fife, great king;
    -Where the Norweyan banners flout the sky
    -And fan our people cold. Norway himself,
    -With terrible numbers,
    -Assisted by that most disloyal traitor
    -The thane of Cawdor, began a dismal conflict;
    -Till that Bellona's bridegroom, lapp'd in proof,
    -Confronted him with self-comparisons,
    -Point against point rebellious, arm 'gainst arm.
    -Curbing his lavish spirit: and, to conclude,
    -The victory fell on us.
    -
    - -DUNCAN -
    -Great happiness!
    -
    - -ROSS -
    -That now
    -Sweno, the Norways' king, craves composition:
    -Nor would we deign him burial of his men
    -Till he disbursed at Saint Colme's inch
    -Ten thousand dollars to our general use.
    -
    - -DUNCAN -
    -No more that thane of Cawdor shall deceive
    -Our bosom interest: go pronounce his present death,
    -And with his former title greet Macbeth.
    -
    - -ROSS -
    -I'll see it done.
    -
    - -DUNCAN -
    -What he hath lost noble Macbeth hath won.
    -

    Exeunt

    -
    -

    SCENE III. A heath near Forres.

    -

    -Thunder. Enter the three Witches -
    - -First Witch -
    -Where hast thou been, sister?
    -
    - -Second Witch -
    -Killing swine.
    -
    - -Third Witch -
    -Sister, where thou?
    -
    - -First Witch -
    -A sailor's wife had chestnuts in her lap,
    -And munch'd, and munch'd, and munch'd:--
    -'Give me,' quoth I:
    -'Aroint thee, witch!' the rump-fed ronyon cries.
    -Her husband's to Aleppo gone, master o' the Tiger:
    -But in a sieve I'll thither sail,
    -And, like a rat without a tail,
    -I'll do, I'll do, and I'll do.
    -
    - -Second Witch -
    -I'll give thee a wind.
    -
    - -First Witch -
    -Thou'rt kind.
    -
    - -Third Witch -
    -And I another.
    -
    - -First Witch -
    -I myself have all the other,
    -And the very ports they blow,
    -All the quarters that they know
    -I' the shipman's card.
    -I will drain him dry as hay:
    -Sleep shall neither night nor day
    -Hang upon his pent-house lid;
    -He shall live a man forbid:
    -Weary se'nnights nine times nine
    -Shall he dwindle, peak and pine:
    -Though his bark cannot be lost,
    -Yet it shall be tempest-tost.
    -Look what I have.
    -
    - -Second Witch -
    -Show me, show me.
    -
    - -First Witch -
    -Here I have a pilot's thumb,
    -Wreck'd as homeward he did come.
    -

    Drum within

    -
    - -Third Witch -
    -A drum, a drum!
    -Macbeth doth come.
    -
    - -ALL -
    -The weird sisters, hand in hand,
    -Posters of the sea and land,
    -Thus do go about, about:
    -Thrice to thine and thrice to mine
    -And thrice again, to make up nine.
    -Peace! the charm's wound up.
    -

    Enter MACBETH and BANQUO

    -
    - -MACBETH -
    -So foul and fair a day I have not seen.
    -
    - -BANQUO -
    -How far is't call'd to Forres? What are these
    -So wither'd and so wild in their attire,
    -That look not like the inhabitants o' the earth,
    -And yet are on't? Live you? or are you aught
    -That man may question? You seem to understand me,
    -By each at once her chappy finger laying
    -Upon her skinny lips: you should be women,
    -And yet your beards forbid me to interpret
    -That you are so.
    -
    - -MACBETH -
    - Speak, if you can: what are you?
    -
    - -First Witch -
    -All hail, Macbeth! hail to thee, thane of Glamis!
    -
    - -Second Witch -
    -All hail, Macbeth, hail to thee, thane of Cawdor!
    -
    - -Third Witch -
    -All hail, Macbeth, thou shalt be king hereafter!
    -
    - -BANQUO -
    -Good sir, why do you start; and seem to fear
    -Things that do sound so fair? I' the name of truth,
    -Are ye fantastical, or that indeed
    -Which outwardly ye show? My noble partner
    -You greet with present grace and great prediction
    -Of noble having and of royal hope,
    -That he seems rapt withal: to me you speak not.
    -If you can look into the seeds of time,
    -And say which grain will grow and which will not,
    -Speak then to me, who neither beg nor fear
    -Your favours nor your hate.
    -
    - -First Witch -
    -Hail!
    -
    - -Second Witch -
    -Hail!
    -
    - -Third Witch -
    -Hail!
    -
    - -First Witch -
    -Lesser than Macbeth, and greater.
    -
    - -Second Witch -
    -Not so happy, yet much happier.
    -
    - -Third Witch -
    -Thou shalt get kings, though thou be none:
    -So all hail, Macbeth and Banquo!
    -
    - -First Witch -
    -Banquo and Macbeth, all hail!
    -
    - -MACBETH -
    -Stay, you imperfect speakers, tell me more:
    -By Sinel's death I know I am thane of Glamis;
    -But how of Cawdor? the thane of Cawdor lives,
    -A prosperous gentleman; and to be king
    -Stands not within the prospect of belief,
    -No more than to be Cawdor. Say from whence
    -You owe this strange intelligence? or why
    -Upon this blasted heath you stop our way
    -With such prophetic greeting? Speak, I charge you.
    -

    Witches vanish

    -
    - -BANQUO -
    -The earth hath bubbles, as the water has,
    -And these are of them. Whither are they vanish'd?
    -
    - -MACBETH -
    -Into the air; and what seem'd corporal melted
    -As breath into the wind. Would they had stay'd!
    -
    - -BANQUO -
    -Were such things here as we do speak about?
    -Or have we eaten on the insane root
    -That takes the reason prisoner?
    -
    - -MACBETH -
    -Your children shall be kings.
    -
    - -BANQUO -
    -You shall be king.
    -
    - -MACBETH -
    -And thane of Cawdor too: went it not so?
    -
    - -BANQUO -
    -To the selfsame tune and words. Who's here?
    -

    Enter ROSS and ANGUS

    -
    - -ROSS -
    -The king hath happily received, Macbeth,
    -The news of thy success; and when he reads
    -Thy personal venture in the rebels' fight,
    -His wonders and his praises do contend
    -Which should be thine or his: silenced with that,
    -In viewing o'er the rest o' the selfsame day,
    -He finds thee in the stout Norweyan ranks,
    -Nothing afeard of what thyself didst make,
    -Strange images of death. As thick as hail
    -Came post with post; and every one did bear
    -Thy praises in his kingdom's great defence,
    -And pour'd them down before him.
    -
    - -ANGUS -
    -We are sent
    -To give thee from our royal master thanks;
    -Only to herald thee into his sight,
    -Not pay thee.
    -
    - -ROSS -
    -And, for an earnest of a greater honour,
    -He bade me, from him, call thee thane of Cawdor:
    -In which addition, hail, most worthy thane!
    -For it is thine.
    -
    - -BANQUO -
    - What, can the devil speak true?
    -
    - -MACBETH -
    -The thane of Cawdor lives: why do you dress me
    -In borrow'd robes?
    -
    - -ANGUS -
    - Who was the thane lives yet;
    -But under heavy judgment bears that life
    -Which he deserves to lose. Whether he was combined
    -With those of Norway, or did line the rebel
    -With hidden help and vantage, or that with both
    -He labour'd in his country's wreck, I know not;
    -But treasons capital, confess'd and proved,
    -Have overthrown him.
    -
    - -MACBETH -
    -[Aside] Glamis, and thane of Cawdor!
    -The greatest is behind.
    -

    To ROSS and ANGUS

    -Thanks for your pains.
    -

    To BANQUO

    -Do you not hope your children shall be kings,
    -When those that gave the thane of Cawdor to me
    -Promised no less to them?
    -
    - -BANQUO -
    -That trusted home
    -Might yet enkindle you unto the crown,
    -Besides the thane of Cawdor. But 'tis strange:
    -And oftentimes, to win us to our harm,
    -The instruments of darkness tell us truths,
    -Win us with honest trifles, to betray's
    -In deepest consequence.
    -Cousins, a word, I pray you.
    -
    - -MACBETH -
    -[Aside] Two truths are told,
    -As happy prologues to the swelling act
    -Of the imperial theme.--I thank you, gentlemen.
    -

    Aside

    -Cannot be ill, cannot be good: if ill,
    -Why hath it given me earnest of success,
    -Commencing in a truth? I am thane of Cawdor:
    -If good, why do I yield to that suggestion
    -Whose horrid image doth unfix my hair
    -And make my seated heart knock at my ribs,
    -Against the use of nature? Present fears
    -Are less than horrible imaginings:
    -My thought, whose murder yet is but fantastical,
    -Shakes so my single state of man that function
    -Is smother'd in surmise, and nothing is
    -But what is not.
    -
    - -BANQUO -
    - Look, how our partner's rapt.
    -
    - -MACBETH -
    -[Aside] If chance will have me king, why, chance may crown me,
    -Without my stir.
    -
    - -BANQUO -
    - New horrors come upon him,
    -Like our strange garments, cleave not to their mould
    -But with the aid of use.
    -
    - -MACBETH -
    -[Aside] Come what come may,
    -Time and the hour runs through the roughest day.
    -
    - -BANQUO -
    -Worthy Macbeth, we stay upon your leisure.
    -
    - -MACBETH -
    -Give me your favour: my dull brain was wrought
    -With things forgotten. Kind gentlemen, your pains
    -Are register'd where every day I turn
    -The leaf to read them. Let us toward the king.
    -Think upon what hath chanced, and, at more time,
    -The interim having weigh'd it, let us speak
    -Our free hearts each to other.
    -
    - -BANQUO -
    -Very gladly.
    -
    - -MACBETH -
    -Till then, enough. Come, friends.
    -

    Exeunt

    -
    -

    SCENE IV. Forres. The palace.

    -

    -Flourish. Enter DUNCAN, MALCOLM, DONALBAIN, LENNOX, and Attendants -
    - -DUNCAN -
    -Is execution done on Cawdor? Are not
    -Those in commission yet return'd?
    -
    - -MALCOLM -
    -My liege,
    -They are not yet come back. But I have spoke
    -With one that saw him die: who did report
    -That very frankly he confess'd his treasons,
    -Implored your highness' pardon and set forth
    -A deep repentance: nothing in his life
    -Became him like the leaving it; he died
    -As one that had been studied in his death
    -To throw away the dearest thing he owed,
    -As 'twere a careless trifle.
    -
    - -DUNCAN -
    -There's no art
    -To find the mind's construction in the face:
    -He was a gentleman on whom I built
    -An absolute trust.
    -

    Enter MACBETH, BANQUO, ROSS, and ANGUS

    -O worthiest cousin!
    -The sin of my ingratitude even now
    -Was heavy on me: thou art so far before
    -That swiftest wing of recompense is slow
    -To overtake thee. Would thou hadst less deserved,
    -That the proportion both of thanks and payment
    -Might have been mine! only I have left to say,
    -More is thy due than more than all can pay.
    -
    - -MACBETH -
    -The service and the loyalty I owe,
    -In doing it, pays itself. Your highness' part
    -Is to receive our duties; and our duties
    -Are to your throne and state children and servants,
    -Which do but what they should, by doing every thing
    -Safe toward your love and honour.
    -
    - -DUNCAN -
    -Welcome hither:
    -I have begun to plant thee, and will labour
    -To make thee full of growing. Noble Banquo,
    -That hast no less deserved, nor must be known
    -No less to have done so, let me enfold thee
    -And hold thee to my heart.
    -
    - -BANQUO -
    -There if I grow,
    -The harvest is your own.
    -
    - -DUNCAN -
    -My plenteous joys,
    -Wanton in fulness, seek to hide themselves
    -In drops of sorrow. Sons, kinsmen, thanes,
    -And you whose places are the nearest, know
    -We will establish our estate upon
    -Our eldest, Malcolm, whom we name hereafter
    -The Prince of Cumberland; which honour must
    -Not unaccompanied invest him only,
    -But signs of nobleness, like stars, shall shine
    -On all deservers. From hence to Inverness,
    -And bind us further to you.
    -
    - -MACBETH -
    -The rest is labour, which is not used for you:
    -I'll be myself the harbinger and make joyful
    -The hearing of my wife with your approach;
    -So humbly take my leave.
    -
    - -DUNCAN -
    -My worthy Cawdor!
    -
    - -MACBETH -
    -[Aside] The Prince of Cumberland! that is a step
    -On which I must fall down, or else o'erleap,
    -For in my way it lies. Stars, hide your fires;
    -Let not light see my black and deep desires:
    -The eye wink at the hand; yet let that be,
    -Which the eye fears, when it is done, to see.
    -

    Exit

    -
    - -DUNCAN -
    -True, worthy Banquo; he is full so valiant,
    -And in his commendations I am fed;
    -It is a banquet to me. Let's after him,
    -Whose care is gone before to bid us welcome:
    -It is a peerless kinsman.
    -

    Flourish. Exeunt

    -
    -

    SCENE V. Inverness. Macbeth's castle.

    -

    -Enter LADY MACBETH, reading a letter -
    - -LADY MACBETH -
    -'They met me in the day of success: and I have
    -learned by the perfectest report, they have more in
    -them than mortal knowledge. When I burned in desire
    -to question them further, they made themselves air,
    -into which they vanished. Whiles I stood rapt in
    -the wonder of it, came missives from the king, who
    -all-hailed me 'Thane of Cawdor;' by which title,
    -before, these weird sisters saluted me, and referred
    -me to the coming on of time, with 'Hail, king that
    -shalt be!' This have I thought good to deliver
    -thee, my dearest partner of greatness, that thou
    -mightst not lose the dues of rejoicing, by being
    -ignorant of what greatness is promised thee. Lay it
    -to thy heart, and farewell.'
    -Glamis thou art, and Cawdor; and shalt be
    -What thou art promised: yet do I fear thy nature;
    -It is too full o' the milk of human kindness
    -To catch the nearest way: thou wouldst be great;
    -Art not without ambition, but without
    -The illness should attend it: what thou wouldst highly,
    -That wouldst thou holily; wouldst not play false,
    -And yet wouldst wrongly win: thou'ldst have, great Glamis,
    -That which cries 'Thus thou must do, if thou have it;
    -And that which rather thou dost fear to do
    -Than wishest should be undone.' Hie thee hither,
    -That I may pour my spirits in thine ear;
    -And chastise with the valour of my tongue
    -All that impedes thee from the golden round,
    -Which fate and metaphysical aid doth seem
    -To have thee crown'd withal.
    -

    Enter a Messenger

    -What is your tidings?
    -
    - -Messenger -
    -The king comes here to-night.
    -
    - -LADY MACBETH -
    -Thou'rt mad to say it:
    -Is not thy master with him? who, were't so,
    -Would have inform'd for preparation.
    -
    - -Messenger -
    -So please you, it is true: our thane is coming:
    -One of my fellows had the speed of him,
    -Who, almost dead for breath, had scarcely more
    -Than would make up his message.
    -
    - -LADY MACBETH -
    -Give him tending;
    -He brings great news.
    -

    Exit Messenger

    -The raven himself is hoarse
    -That croaks the fatal entrance of Duncan
    -Under my battlements. Come, you spirits
    -That tend on mortal thoughts, unsex me here,
    -And fill me from the crown to the toe top-full
    -Of direst cruelty! make thick my blood;
    -Stop up the access and passage to remorse,
    -That no compunctious visitings of nature
    -Shake my fell purpose, nor keep peace between
    -The effect and it! Come to my woman's breasts,
    -And take my milk for gall, you murdering ministers,
    -Wherever in your sightless substances
    -You wait on nature's mischief! Come, thick night,
    -And pall thee in the dunnest smoke of hell,
    -That my keen knife see not the wound it makes,
    -Nor heaven peep through the blanket of the dark,
    -To cry 'Hold, hold!'
    -

    Enter MACBETH

    -Great Glamis! worthy Cawdor!
    -Greater than both, by the all-hail hereafter!
    -Thy letters have transported me beyond
    -This ignorant present, and I feel now
    -The future in the instant.
    -
    - -MACBETH -
    -My dearest love,
    -Duncan comes here to-night.
    -
    - -LADY MACBETH -
    -And when goes hence?
    -
    - -MACBETH -
    -To-morrow, as he purposes.
    -
    - -LADY MACBETH -
    -O, never
    -Shall sun that morrow see!
    -Your face, my thane, is as a book where men
    -May read strange matters. To beguile the time,
    -Look like the time; bear welcome in your eye,
    -Your hand, your tongue: look like the innocent flower,
    -But be the serpent under't. He that's coming
    -Must be provided for: and you shall put
    -This night's great business into my dispatch;
    -Which shall to all our nights and days to come
    -Give solely sovereign sway and masterdom.
    -
    - -MACBETH -
    -We will speak further.
    -
    - -LADY MACBETH -
    -Only look up clear;
    -To alter favour ever is to fear:
    -Leave all the rest to me.
    -

    Exeunt

    -
    -

    SCENE VI. Before Macbeth's castle.

    -

    -Hautboys and torches. Enter DUNCAN, MALCOLM, DONALBAIN, BANQUO, LENNOX, MACDUFF, ROSS, ANGUS, and Attendants -
    - -DUNCAN -
    -This castle hath a pleasant seat; the air
    -Nimbly and sweetly recommends itself
    -Unto our gentle senses.
    -
    - -BANQUO -
    -This guest of summer,
    -The temple-haunting martlet, does approve,
    -By his loved mansionry, that the heaven's breath
    -Smells wooingly here: no jutty, frieze,
    -Buttress, nor coign of vantage, but this bird
    -Hath made his pendent bed and procreant cradle:
    -Where they most breed and haunt, I have observed,
    -The air is delicate.
    -

    Enter LADY MACBETH

    -
    - -DUNCAN -
    -See, see, our honour'd hostess!
    -The love that follows us sometime is our trouble,
    -Which still we thank as love. Herein I teach you
    -How you shall bid God 'ild us for your pains,
    -And thank us for your trouble.
    -
    - -LADY MACBETH -
    -All our service
    -In every point twice done and then done double
    -Were poor and single business to contend
    -Against those honours deep and broad wherewith
    -Your majesty loads our house: for those of old,
    -And the late dignities heap'd up to them,
    -We rest your hermits.
    -
    - -DUNCAN -
    -Where's the thane of Cawdor?
    -We coursed him at the heels, and had a purpose
    -To be his purveyor: but he rides well;
    -And his great love, sharp as his spur, hath holp him
    -To his home before us. Fair and noble hostess,
    -We are your guest to-night.
    -
    - -LADY MACBETH -
    -Your servants ever
    -Have theirs, themselves and what is theirs, in compt,
    -To make their audit at your highness' pleasure,
    -Still to return your own.
    -
    - -DUNCAN -
    -Give me your hand;
    -Conduct me to mine host: we love him highly,
    -And shall continue our graces towards him.
    -By your leave, hostess.
    -

    Exeunt

    -
    -

    SCENE VII. Macbeth's castle.

    -

    -Hautboys and torches. Enter a Sewer, and divers Servants with dishes and service, and pass over the stage. Then enter MACBETH -
    - -MACBETH -
    -If it were done when 'tis done, then 'twere well
    -It were done quickly: if the assassination
    -Could trammel up the consequence, and catch
    -With his surcease success; that but this blow
    -Might be the be-all and the end-all here,
    -But here, upon this bank and shoal of time,
    -We'ld jump the life to come. But in these cases
    -We still have judgment here; that we but teach
    -Bloody instructions, which, being taught, return
    -To plague the inventor: this even-handed justice
    -Commends the ingredients of our poison'd chalice
    -To our own lips. He's here in double trust;
    -First, as I am his kinsman and his subject,
    -Strong both against the deed; then, as his host,
    -Who should against his murderer shut the door,
    -Not bear the knife myself. Besides, this Duncan
    -Hath borne his faculties so meek, hath been
    -So clear in his great office, that his virtues
    -Will plead like angels, trumpet-tongued, against
    -The deep damnation of his taking-off;
    -And pity, like a naked new-born babe,
    -Striding the blast, or heaven's cherubim, horsed
    -Upon the sightless couriers of the air,
    -Shall blow the horrid deed in every eye,
    -That tears shall drown the wind. I have no spur
    -To prick the sides of my intent, but only
    -Vaulting ambition, which o'erleaps itself
    -And falls on the other.
    -

    Enter LADY MACBETH

    -How now! what news?
    -
    - -LADY MACBETH -
    -He has almost supp'd: why have you left the chamber?
    -
    - -MACBETH -
    -Hath he ask'd for me?
    -
    - -LADY MACBETH -
    -Know you not he has?
    -
    - -MACBETH -
    -We will proceed no further in this business:
    -He hath honour'd me of late; and I have bought
    -Golden opinions from all sorts of people,
    -Which would be worn now in their newest gloss,
    -Not cast aside so soon.
    -
    - -LADY MACBETH -
    -Was the hope drunk
    -Wherein you dress'd yourself? hath it slept since?
    -And wakes it now, to look so green and pale
    -At what it did so freely? From this time
    -Such I account thy love. Art thou afeard
    -To be the same in thine own act and valour
    -As thou art in desire? Wouldst thou have that
    -Which thou esteem'st the ornament of life,
    -And live a coward in thine own esteem,
    -Letting 'I dare not' wait upon 'I would,'
    -Like the poor cat i' the adage?
    -
    - -MACBETH -
    -Prithee, peace:
    -I dare do all that may become a man;
    -Who dares do more is none.
    -
    - -LADY MACBETH -
    -What beast was't, then,
    -That made you break this enterprise to me?
    -When you durst do it, then you were a man;
    -And, to be more than what you were, you would
    -Be so much more the man. Nor time nor place
    -Did then adhere, and yet you would make both:
    -They have made themselves, and that their fitness now
    -Does unmake you. I have given suck, and know
    -How tender 'tis to love the babe that milks me:
    -I would, while it was smiling in my face,
    -Have pluck'd my nipple from his boneless gums,
    -And dash'd the brains out, had I so sworn as you
    -Have done to this.
    -
    - -MACBETH -
    - If we should fail?
    -
    - -LADY MACBETH -
    -We fail!
    -But screw your courage to the sticking-place,
    -And we'll not fail. When Duncan is asleep--
    -Whereto the rather shall his day's hard journey
    -Soundly invite him--his two chamberlains
    -Will I with wine and wassail so convince
    -That memory, the warder of the brain,
    -Shall be a fume, and the receipt of reason
    -A limbeck only: when in swinish sleep
    -Their drenched natures lie as in a death,
    -What cannot you and I perform upon
    -The unguarded Duncan? what not put upon
    -His spongy officers, who shall bear the guilt
    -Of our great quell?
    -
    - -MACBETH -
    -Bring forth men-children only;
    -For thy undaunted mettle should compose
    -Nothing but males. Will it not be received,
    -When we have mark'd with blood those sleepy two
    -Of his own chamber and used their very daggers,
    -That they have done't?
    -
    - -LADY MACBETH -
    -Who dares receive it other,
    -As we shall make our griefs and clamour roar
    -Upon his death?
    -
    - -MACBETH -
    - I am settled, and bend up
    -Each corporal agent to this terrible feat.
    -Away, and mock the time with fairest show:
    -False face must hide what the false heart doth know.
    -

    Exeunt

    -

    -

    ACT II

    -

    SCENE I. Court of Macbeth's castle.

    -

    -Enter BANQUO, and FLEANCE bearing a torch before him -
    - -BANQUO -
    -How goes the night, boy?
    -
    - -FLEANCE -
    -The moon is down; I have not heard the clock.
    -
    - -BANQUO -
    -And she goes down at twelve.
    -
    - -FLEANCE -
    -I take't, 'tis later, sir.
    -
    - -BANQUO -
    -Hold, take my sword. There's husbandry in heaven;
    -Their candles are all out. Take thee that too.
    -A heavy summons lies like lead upon me,
    -And yet I would not sleep: merciful powers,
    -Restrain in me the cursed thoughts that nature
    -Gives way to in repose!
    -

    Enter MACBETH, and a Servant with a torch

    -Give me my sword.
    -Who's there?
    -
    - -MACBETH -
    -A friend.
    -
    - -BANQUO -
    -What, sir, not yet at rest? The king's a-bed:
    -He hath been in unusual pleasure, and
    -Sent forth great largess to your offices.
    -This diamond he greets your wife withal,
    -By the name of most kind hostess; and shut up
    -In measureless content.
    -
    - -MACBETH -
    -Being unprepared,
    -Our will became the servant to defect;
    -Which else should free have wrought.
    -
    - -BANQUO -
    -All's well.
    -I dreamt last night of the three weird sisters:
    -To you they have show'd some truth.
    -
    - -MACBETH -
    -I think not of them:
    -Yet, when we can entreat an hour to serve,
    -We would spend it in some words upon that business,
    -If you would grant the time.
    -
    - -BANQUO -
    -At your kind'st leisure.
    -
    - -MACBETH -
    -If you shall cleave to my consent, when 'tis,
    -It shall make honour for you.
    -
    - -BANQUO -
    -So I lose none
    -In seeking to augment it, but still keep
    -My bosom franchised and allegiance clear,
    -I shall be counsell'd.
    -
    - -MACBETH -
    -Good repose the while!
    -
    - -BANQUO -
    -Thanks, sir: the like to you!
    -

    Exeunt BANQUO and FLEANCE

    -
    - -MACBETH -
    -Go bid thy mistress, when my drink is ready,
    -She strike upon the bell. Get thee to bed.
    -

    Exit Servant

    -Is this a dagger which I see before me,
    -The handle toward my hand? Come, let me clutch thee.
    -I have thee not, and yet I see thee still.
    -Art thou not, fatal vision, sensible
    -To feeling as to sight? or art thou but
    -A dagger of the mind, a false creation,
    -Proceeding from the heat-oppressed brain?
    -I see thee yet, in form as palpable
    -As this which now I draw.
    -Thou marshall'st me the way that I was going;
    -And such an instrument I was to use.
    -Mine eyes are made the fools o' the other senses,
    -Or else worth all the rest; I see thee still,
    -And on thy blade and dudgeon gouts of blood,
    -Which was not so before. There's no such thing:
    -It is the bloody business which informs
    -Thus to mine eyes. Now o'er the one halfworld
    -Nature seems dead, and wicked dreams abuse
    -The curtain'd sleep; witchcraft celebrates
    -Pale Hecate's offerings, and wither'd murder,
    -Alarum'd by his sentinel, the wolf,
    -Whose howl's his watch, thus with his stealthy pace.
    -With Tarquin's ravishing strides, towards his design
    -Moves like a ghost. Thou sure and firm-set earth,
    -Hear not my steps, which way they walk, for fear
    -Thy very stones prate of my whereabout,
    -And take the present horror from the time,
    -Which now suits with it. Whiles I threat, he lives:
    -Words to the heat of deeds too cold breath gives.
    -

    A bell rings

    -I go, and it is done; the bell invites me.
    -Hear it not, Duncan; for it is a knell
    -That summons thee to heaven or to hell.
    -

    Exit

    -
    -

    SCENE II. The same.

    -

    -Enter LADY MACBETH -
    - -LADY MACBETH -
    -That which hath made them drunk hath made me bold;
    -What hath quench'd them hath given me fire.
    -Hark! Peace!
    -It was the owl that shriek'd, the fatal bellman,
    -Which gives the stern'st good-night. He is about it:
    -The doors are open; and the surfeited grooms
    -Do mock their charge with snores: I have drugg'd
    -their possets,
    -That death and nature do contend about them,
    -Whether they live or die.
    -
    - -MACBETH -
    -[Within] Who's there? what, ho!
    -
    - -LADY MACBETH -
    -Alack, I am afraid they have awaked,
    -And 'tis not done. The attempt and not the deed
    -Confounds us. Hark! I laid their daggers ready;
    -He could not miss 'em. Had he not resembled
    -My father as he slept, I had done't.
    -

    Enter MACBETH

    -My husband!
    -
    - -MACBETH -
    -I have done the deed. Didst thou not hear a noise?
    -
    - -LADY MACBETH -
    -I heard the owl scream and the crickets cry.
    -Did not you speak?
    -
    - -MACBETH -
    - When?
    -
    - -LADY MACBETH -
    -Now.
    -
    - -MACBETH -
    -As I descended?
    -
    - -LADY MACBETH -
    -Ay.
    -
    - -MACBETH -
    -Hark!
    -Who lies i' the second chamber?
    -
    - -LADY MACBETH -
    -Donalbain.
    -
    - -MACBETH -
    -This is a sorry sight.
    -

    Looking on his hands

    -
    - -LADY MACBETH -
    -A foolish thought, to say a sorry sight.
    -
    - -MACBETH -
    -There's one did laugh in's sleep, and one cried
    -'Murder!'
    -That they did wake each other: I stood and heard them:
    -But they did say their prayers, and address'd them
    -Again to sleep.
    -
    - -LADY MACBETH -
    - There are two lodged together.
    -
    - -MACBETH -
    -One cried 'God bless us!' and 'Amen' the other;
    -As they had seen me with these hangman's hands.
    -Listening their fear, I could not say 'Amen,'
    -When they did say 'God bless us!'
    -
    - -LADY MACBETH -
    -Consider it not so deeply.
    -
    - -MACBETH -
    -But wherefore could not I pronounce 'Amen'?
    -I had most need of blessing, and 'Amen'
    -Stuck in my throat.
    -
    - -LADY MACBETH -
    -These deeds must not be thought
    -After these ways; so, it will make us mad.
    -
    - -MACBETH -
    -Methought I heard a voice cry 'Sleep no more!
    -Macbeth does murder sleep', the innocent sleep,
    -Sleep that knits up the ravell'd sleeve of care,
    -The death of each day's life, sore labour's bath,
    -Balm of hurt minds, great nature's second course,
    -Chief nourisher in life's feast,--
    -
    - -LADY MACBETH -
    -What do you mean?
    -
    - -MACBETH -
    -Still it cried 'Sleep no more!' to all the house:
    -'Glamis hath murder'd sleep, and therefore Cawdor
    -Shall sleep no more; Macbeth shall sleep no more.'
    -
    - -LADY MACBETH -
    -Who was it that thus cried? Why, worthy thane,
    -You do unbend your noble strength, to think
    -So brainsickly of things. Go get some water,
    -And wash this filthy witness from your hand.
    -Why did you bring these daggers from the place?
    -They must lie there: go carry them; and smear
    -The sleepy grooms with blood.
    -
    - -MACBETH -
    -I'll go no more:
    -I am afraid to think what I have done;
    -Look on't again I dare not.
    -
    - -LADY MACBETH -
    -Infirm of purpose!
    -Give me the daggers: the sleeping and the dead
    -Are but as pictures: 'tis the eye of childhood
    -That fears a painted devil. If he do bleed,
    -I'll gild the faces of the grooms withal;
    -For it must seem their guilt.
    -

    Exit. Knocking within

    -
    - -MACBETH -
    -Whence is that knocking?
    -How is't with me, when every noise appals me?
    -What hands are here? ha! they pluck out mine eyes.
    -Will all great Neptune's ocean wash this blood
    -Clean from my hand? No, this my hand will rather
    -The multitudinous seas in incarnadine,
    -Making the green one red.
    -

    Re-enter LADY MACBETH

    -
    - -LADY MACBETH -
    -My hands are of your colour; but I shame
    -To wear a heart so white.
    -

    Knocking within

    -I hear a knocking
    -At the south entry: retire we to our chamber;
    -A little water clears us of this deed:
    -How easy is it, then! Your constancy
    -Hath left you unattended.
    -

    Knocking within

    -Hark! more knocking.
    -Get on your nightgown, lest occasion call us,
    -And show us to be watchers. Be not lost
    -So poorly in your thoughts.
    -
    - -MACBETH -
    -To know my deed, 'twere best not know myself.
    -

    Knocking within

    -Wake Duncan with thy knocking! I would thou couldst!
    -

    Exeunt

    -
    -

    SCENE III. The same.

    -

    -Knocking within. Enter a Porter -
    - -Porter -
    -Here's a knocking indeed! If a
    -man were porter of hell-gate, he should have
    -old turning the key.
    -

    Knocking within

    -Knock,
    -knock, knock! Who's there, i' the name of
    -Beelzebub? Here's a farmer, that hanged
    -himself on the expectation of plenty: come in
    -time; have napkins enow about you; here
    -you'll sweat for't.
    -

    Knocking within

    -Knock,
    -knock! Who's there, in the other devil's
    -name? Faith, here's an equivocator, that could
    -swear in both the scales against either scale;
    -who committed treason enough for God's sake,
    -yet could not equivocate to heaven: O, come
    -in, equivocator.
    -

    Knocking within

    -Knock,
    -knock, knock! Who's there? Faith, here's an
    -English tailor come hither, for stealing out of
    -a French hose: come in, tailor; here you may
    -roast your goose.
    -

    Knocking within

    -Knock,
    -knock; never at quiet! What are you? But
    -this place is too cold for hell. I'll devil-porter
    -it no further: I had thought to have let in
    -some of all professions that go the primrose
    -way to the everlasting bonfire.
    -

    Knocking within

    -Anon, anon! I pray you, remember the porter.
    -

    Opens the gate

    -

    Enter MACDUFF and LENNOX

    -
    - -MACDUFF -
    -Was it so late, friend, ere you went to bed,
    -That you do lie so late?
    -
    - -Porter -
    -'Faith sir, we were carousing till the
    -second cock: and drink, sir, is a great
    -provoker of three things.
    -
    - -MACDUFF -
    -What three things does drink especially provoke?
    -
    - -Porter -
    -Marry, sir, nose-painting, sleep, and
    -urine. Lechery, sir, it provokes, and unprovokes;
    -it provokes the desire, but it takes
    -away the performance: therefore, much drink
    -may be said to be an equivocator with lechery:
    -it makes him, and it mars him; it sets
    -him on, and it takes him off; it persuades him,
    -and disheartens him; makes him stand to, and
    -not stand to; in conclusion, equivocates him
    -in a sleep, and, giving him the lie, leaves him.
    -
    - -MACDUFF -
    -I believe drink gave thee the lie last night.
    -
    - -Porter -
    -That it did, sir, i' the very throat on
    -me: but I requited him for his lie; and, I
    -think, being too strong for him, though he took
    -up my legs sometime, yet I made a shift to cast
    -him.
    -
    - -MACDUFF -
    -Is thy master stirring?
    -

    Enter MACBETH

    -Our knocking has awaked him; here he comes.
    -
    - -LENNOX -
    -Good morrow, noble sir.
    -
    - -MACBETH -
    -Good morrow, both.
    -
    - -MACDUFF -
    -Is the king stirring, worthy thane?
    -
    - -MACBETH -
    -Not yet.
    -
    - -MACDUFF -
    -He did command me to call timely on him:
    -I have almost slipp'd the hour.
    -
    - -MACBETH -
    -I'll bring you to him.
    -
    - -MACDUFF -
    -I know this is a joyful trouble to you;
    -But yet 'tis one.
    -
    - -MACBETH -
    -The labour we delight in physics pain.
    -This is the door.
    -
    - -MACDUFF -
    - I'll make so bold to call,
    -For 'tis my limited service.
    -

    Exit

    -
    - -LENNOX -
    -Goes the king hence to-day?
    -
    - -MACBETH -
    -He does: he did appoint so.
    -
    - -LENNOX -
    -The night has been unruly: where we lay,
    -Our chimneys were blown down; and, as they say,
    -Lamentings heard i' the air; strange screams of death,
    -And prophesying with accents terrible
    -Of dire combustion and confused events
    -New hatch'd to the woeful time: the obscure bird
    -Clamour'd the livelong night: some say, the earth
    -Was feverous and did shake.
    -
    - -MACBETH -
    -'Twas a rough night.
    -
    - -LENNOX -
    -My young remembrance cannot parallel
    -A fellow to it.
    -

    Re-enter MACDUFF

    -
    - -MACDUFF -
    -O horror, horror, horror! Tongue nor heart
    -Cannot conceive nor name thee!
    -
    - -MACBETH - -LENNOX -
    -What's the matter.
    -
    - -MACDUFF -
    -Confusion now hath made his masterpiece!
    -Most sacrilegious murder hath broke ope
    -The Lord's anointed temple, and stole thence
    -The life o' the building!
    -
    - -MACBETH -
    -What is 't you say? the life?
    -
    - -LENNOX -
    -Mean you his majesty?
    -
    - -MACDUFF -
    -Approach the chamber, and destroy your sight
    -With a new Gorgon: do not bid me speak;
    -See, and then speak yourselves.
    -

    Exeunt MACBETH and LENNOX

    -Awake, awake!
    -Ring the alarum-bell. Murder and treason!
    -Banquo and Donalbain! Malcolm! awake!
    -Shake off this downy sleep, death's counterfeit,
    -And look on death itself! up, up, and see
    -The great doom's image! Malcolm! Banquo!
    -As from your graves rise up, and walk like sprites,
    -To countenance this horror! Ring the bell.
    -

    Bell rings

    -

    Enter LADY MACBETH

    -
    - -LADY MACBETH -
    -What's the business,
    -That such a hideous trumpet calls to parley
    -The sleepers of the house? speak, speak!
    -
    - -MACDUFF -
    -O gentle lady,
    -'Tis not for you to hear what I can speak:
    -The repetition, in a woman's ear,
    -Would murder as it fell.
    -

    Enter BANQUO

    -O Banquo, Banquo,
    -Our royal master 's murder'd!
    -
    - -LADY MACBETH -
    -Woe, alas!
    -What, in our house?
    -
    - -BANQUO -
    -Too cruel any where.
    -Dear Duff, I prithee, contradict thyself,
    -And say it is not so.
    -

    Re-enter MACBETH and LENNOX, with ROSS

    -
    - -MACBETH -
    -Had I but died an hour before this chance,
    -I had lived a blessed time; for, from this instant,
    -There 's nothing serious in mortality:
    -All is but toys: renown and grace is dead;
    -The wine of life is drawn, and the mere lees
    -Is left this vault to brag of.
    -

    Enter MALCOLM and DONALBAIN

    -
    - -DONALBAIN -
    -What is amiss?
    -
    - -MACBETH -
    - You are, and do not know't:
    -The spring, the head, the fountain of your blood
    -Is stopp'd; the very source of it is stopp'd.
    -
    - -MACDUFF -
    -Your royal father 's murder'd.
    -
    - -MALCOLM -
    -O, by whom?
    -
    - -LENNOX -
    -Those of his chamber, as it seem'd, had done 't:
    -Their hands and faces were an badged with blood;
    -So were their daggers, which unwiped we found
    -Upon their pillows:
    -They stared, and were distracted; no man's life
    -Was to be trusted with them.
    -
    - -MACBETH -
    -O, yet I do repent me of my fury,
    -That I did kill them.
    -
    - -MACDUFF -
    -Wherefore did you so?
    -
    - -MACBETH -
    -Who can be wise, amazed, temperate and furious,
    -Loyal and neutral, in a moment? No man:
    -The expedition my violent love
    -Outrun the pauser, reason. Here lay Duncan,
    -His silver skin laced with his golden blood;
    -And his gash'd stabs look'd like a breach in nature
    -For ruin's wasteful entrance: there, the murderers,
    -Steep'd in the colours of their trade, their daggers
    -Unmannerly breech'd with gore: who could refrain,
    -That had a heart to love, and in that heart
    -Courage to make 's love kno wn?
    -
    - -LADY MACBETH -
    -Help me hence, ho!
    -
    - -MACDUFF -
    -Look to the lady.
    -
    - -MALCOLM -
    -[Aside to DONALBAIN] Why do we hold our tongues,
    -That most may claim this argument for ours?
    -
    - -DONALBAIN -
    -[Aside to MALCOLM] What should be spoken here,
    -where our fate,
    -Hid in an auger-hole, may rush, and seize us?
    -Let 's away;
    -Our tears are not yet brew'd.
    -
    - -MALCOLM -
    -[Aside to DONALBAIN] Nor our strong sorrow
    -Upon the foot of motion.
    -
    - -BANQUO -
    -Look to the lady:
    -

    LADY MACBETH is carried out

    -And when we have our naked frailties hid,
    -That suffer in exposure, let us meet,
    -And question this most bloody piece of work,
    -To know it further. Fears and scruples shake us:
    -In the great hand of God I stand; and thence
    -Against the undivulged pretence I fight
    -Of treasonous malice.
    -
    - -MACDUFF -
    -And so do I.
    -
    - -ALL -
    -So all.
    -
    - -MACBETH -
    -Let's briefly put on manly readiness,
    -And meet i' the hall together.
    -
    - -ALL -
    -Well contented.
    -

    Exeunt all but Malcolm and Donalbain.

    -
    - -MALCOLM -
    -What will you do? Let's not consort with them:
    -To show an unfelt sorrow is an office
    -Which the false man does easy. I'll to England.
    -
    - -DONALBAIN -
    -To Ireland, I; our separated fortune
    -Shall keep us both the safer: where we are,
    -There's daggers in men's smiles: the near in blood,
    -The nearer bloody.
    -
    - -MALCOLM -
    - This murderous shaft that's shot
    -Hath not yet lighted, and our safest way
    -Is to avoid the aim. Therefore, to horse;
    -And let us not be dainty of leave-taking,
    -But shift away: there's warrant in that theft
    -Which steals itself, when there's no mercy left.
    -

    Exeunt

    -
    -

    SCENE IV. Outside Macbeth's castle.

    -

    -Enter ROSS and an old Man -
    - -Old Man -
    -Threescore and ten I can remember well:
    -Within the volume of which time I have seen
    -Hours dreadful and things strange; but this sore night
    -Hath trifled former knowings.
    -
    - -ROSS -
    -Ah, good father,
    -Thou seest, the heavens, as troubled with man's act,
    -Threaten his bloody stage: by the clock, 'tis day,
    -And yet dark night strangles the travelling lamp:
    -Is't night's predominance, or the day's shame,
    -That darkness does the face of earth entomb,
    -When living light should kiss it?
    -
    - -Old Man -
    -'Tis unnatural,
    -Even like the deed that's done. On Tuesday last,
    -A falcon, towering in her pride of place,
    -Was by a mousing owl hawk'd at and kill'd.
    -
    - -ROSS -
    -And Duncan's horses--a thing most strange and certain--
    -Beauteous and swift, the minions of their race,
    -Turn'd wild in nature, broke their stalls, flung out,
    -Contending 'gainst obedience, as they would make
    -War with mankind.
    -
    - -Old Man -
    -'Tis said they eat each other.
    -
    - -ROSS -
    -They did so, to the amazement of mine eyes
    -That look'd upon't. Here comes the good Macduff.
    -

    Enter MACDUFF

    -How goes the world, sir, now?
    -
    - -MACDUFF -
    -Why, see you not?
    -
    - -ROSS -
    -Is't known who did this more than bloody deed?
    -
    - -MACDUFF -
    -Those that Macbeth hath slain.
    -
    - -ROSS -
    -Alas, the day!
    -What good could they pretend?
    -
    - -MACDUFF -
    -They were suborn'd:
    -Malcolm and Donalbain, the king's two sons,
    -Are stol'n away and fled; which puts upon them
    -Suspicion of the deed.
    -
    - -ROSS -
    -'Gainst nature still!
    -Thriftless ambition, that wilt ravin up
    -Thine own life's means! Then 'tis most like
    -The sovereignty will fall upon Macbeth.
    -
    - -MACDUFF -
    -He is already named, and gone to Scone
    -To be invested.
    -
    - -ROSS -
    - Where is Duncan's body?
    -
    - -MACDUFF -
    -Carried to Colmekill,
    -The sacred storehouse of his predecessors,
    -And guardian of their bones.
    -
    - -ROSS -
    -Will you to Scone?
    -
    - -MACDUFF -
    -No, cousin, I'll to Fife.
    -
    - -ROSS -
    -Well, I will thither.
    -
    - -MACDUFF -
    -Well, may you see things well done there: adieu!
    -Lest our old robes sit easier than our new!
    -
    - -ROSS -
    -Farewell, father.
    -
    - -Old Man -
    -God's benison go with you; and with those
    -That would make good of bad, and friends of foes!
    -

    Exeunt

    -

    -

    ACT III

    -

    SCENE I. Forres. The palace.

    -

    -Enter BANQUO -
    - -BANQUO -
    -Thou hast it now: king, Cawdor, Glamis, all,
    -As the weird women promised, and, I fear,
    -Thou play'dst most foully for't: yet it was said
    -It should not stand in thy posterity,
    -But that myself should be the root and father
    -Of many kings. If there come truth from them--
    -As upon thee, Macbeth, their speeches shine--
    -Why, by the verities on thee made good,
    -May they not be my oracles as well,
    -And set me up in hope? But hush! no more.
    -

    Sennet sounded. Enter MACBETH, as king, LADY MACBETH, as queen, LENNOX, ROSS, Lords, Ladies, and Attendants

    -
    - -MACBETH -
    -Here's our chief guest.
    -
    - -LADY MACBETH -
    -If he had been forgotten,
    -It had been as a gap in our great feast,
    -And all-thing unbecoming.
    -
    - -MACBETH -
    -To-night we hold a solemn supper sir,
    -And I'll request your presence.
    -
    - -BANQUO -
    -Let your highness
    -Command upon me; to the which my duties
    -Are with a most indissoluble tie
    -For ever knit.
    -
    - -MACBETH -
    - Ride you this afternoon?
    -
    - -BANQUO -
    -Ay, my good lord.
    -
    - -MACBETH -
    -We should have else desired your good advice,
    -Which still hath been both grave and prosperous,
    -In this day's council; but we'll take to-morrow.
    -Is't far you ride?
    -
    - -BANQUO -
    -As far, my lord, as will fill up the time
    -'Twixt this and supper: go not my horse the better,
    -I must become a borrower of the night
    -For a dark hour or twain.
    -
    - -MACBETH -
    -Fail not our feast.
    -
    - -BANQUO -
    -My lord, I will not.
    -
    - -MACBETH -
    -We hear, our bloody cousins are bestow'd
    -In England and in Ireland, not confessing
    -Their cruel parricide, filling their hearers
    -With strange invention: but of that to-morrow,
    -When therewithal we shall have cause of state
    -Craving us jointly. Hie you to horse: adieu,
    -Till you return at night. Goes Fleance with you?
    -
    - -BANQUO -
    -Ay, my good lord: our time does call upon 's.
    -
    - -MACBETH -
    -I wish your horses swift and sure of foot;
    -And so I do commend you to their backs. Farewell.
    -

    Exit BANQUO

    -Let every man be master of his time
    -Till seven at night: to make society
    -The sweeter welcome, we will keep ourself
    -Till supper-time alone: while then, God be with you!
    -

    Exeunt all but MACBETH, and an attendant

    -Sirrah, a word with you: attend those men
    -Our pleasure?
    -
    - -ATTENDANT -
    -They are, my lord, without the palace gate.
    -
    - -MACBETH -
    -Bring them before us.
    -

    Exit Attendant

    -To be thus is nothing;
    -But to be safely thus.--Our fears in Banquo
    -Stick deep; and in his royalty of nature
    -Reigns that which would be fear'd: 'tis much he dares;
    -And, to that dauntless temper of his mind,
    -He hath a wisdom that doth guide his valour
    -To act in safety. There is none but he
    -Whose being I do fear: and, under him,
    -My Genius is rebuked; as, it is said,
    -Mark Antony's was by Caesar. He chid the sisters
    -When first they put the name of king upon me,
    -And bade them speak to him: then prophet-like
    -They hail'd him father to a line of kings:
    -Upon my head they placed a fruitless crown,
    -And put a barren sceptre in my gripe,
    -Thence to be wrench'd with an unlineal hand,
    -No son of mine succeeding. If 't be so,
    -For Banquo's issue have I filed my mind;
    -For them the gracious Duncan have I murder'd;
    -Put rancours in the vessel of my peace
    -Only for them; and mine eternal jewel
    -Given to the common enemy of man,
    -To make them kings, the seed of Banquo kings!
    -Rather than so, come fate into the list.
    -And champion me to the utterance! Who's there!
    -

    Re-enter Attendant, with two Murderers

    -Now go to the door, and stay there till we call.
    -

    Exit Attendant

    -Was it not yesterday we spoke together?
    -
    - -First Murderer -
    -It was, so please your highness.
    -
    - -MACBETH -
    -Well then, now
    -Have you consider'd of my speeches? Know
    -That it was he in the times past which held you
    -So under fortune, which you thought had been
    -Our innocent self: this I made good to you
    -In our last conference, pass'd in probation with you,
    -How you were borne in hand, how cross'd,
    -the instruments,
    -Who wrought with them, and all things else that might
    -To half a soul and to a notion crazed
    -Say 'Thus did Banquo.'
    -
    - -First Murderer -
    -You made it known to us.
    -
    - -MACBETH -
    -I did so, and went further, which is now
    -Our point of second meeting. Do you find
    -Your patience so predominant in your nature
    -That you can let this go? Are you so gospell'd
    -To pray for this good man and for his issue,
    -Whose heavy hand hath bow'd you to the grave
    -And beggar'd yours for ever?
    -
    - -First Murderer -
    -We are men, my liege.
    -
    - -MACBETH -
    -Ay, in the catalogue ye go for men;
    -As hounds and greyhounds, mongrels, spaniels, curs,
    -Shoughs, water-rugs and demi-wolves, are clept
    -All by the name of dogs: the valued file
    -Distinguishes the swift, the slow, the subtle,
    -The housekeeper, the hunter, every one
    -According to the gift which bounteous nature
    -Hath in him closed; whereby he does receive
    -Particular addition. from the bill
    -That writes them all alike: and so of men.
    -Now, if you have a station in the file,
    -Not i' the worst rank of manhood, say 't;
    -And I will put that business in your bosoms,
    -Whose execution takes your enemy off,
    -Grapples you to the heart and love of us,
    -Who wear our health but sickly in his life,
    -Which in his death were perfect.
    -
    - -Second Murderer -
    -I am one, my liege,
    -Whom the vile blows and buffets of the world
    -Have so incensed that I am reckless what
    -I do to spite the world.
    -
    - -First Murderer -
    -And I another
    -So weary with disasters, tugg'd with fortune,
    -That I would set my lie on any chance,
    -To mend it, or be rid on't.
    -
    - -MACBETH -
    -Both of you
    -Know Banquo was your enemy.
    -
    - -Both Murderers -
    -True, my lord.
    -
    - -MACBETH -
    -So is he mine; and in such bloody distance,
    -That every minute of his being thrusts
    -Against my near'st of life: and though I could
    -With barefaced power sweep him from my sight
    -And bid my will avouch it, yet I must not,
    -For certain friends that are both his and mine,
    -Whose loves I may not drop, but wail his fall
    -Who I myself struck down; and thence it is,
    -That I to your assistance do make love,
    -Masking the business from the common eye
    -For sundry weighty reasons.
    -
    - -Second Murderer -
    -We shall, my lord,
    -Perform what you command us.
    -
    - -First Murderer -
    -Though our lives--
    -
    - -MACBETH -
    -Your spirits shine through you. Within this hour at most
    -I will advise you where to plant yourselves;
    -Acquaint you with the perfect spy o' the time,
    -The moment on't; for't must be done to-night,
    -And something from the palace; always thought
    -That I require a clearness: and with him--
    -To leave no rubs nor botches in the work--
    -Fleance his son, that keeps him company,
    -Whose absence is no less material to me
    -Than is his father's, must embrace the fate
    -Of that dark hour. Resolve yourselves apart:
    -I'll come to you anon.
    -
    - -Both Murderers -
    -We are resolved, my lord.
    -
    - -MACBETH -
    -I'll call upon you straight: abide within.
    -

    Exeunt Murderers

    -It is concluded. Banquo, thy soul's flight,
    -If it find heaven, must find it out to-night.
    -

    Exit

    -
    -

    SCENE II. The palace.

    -

    -Enter LADY MACBETH and a Servant -
    - -LADY MACBETH -
    -Is Banquo gone from court?
    -
    - -Servant -
    -Ay, madam, but returns again to-night.
    -
    - -LADY MACBETH -
    -Say to the king, I would attend his leisure
    -For a few words.
    -
    - -Servant -
    - Madam, I will.
    -

    Exit

    -
    - -LADY MACBETH -
    -Nought's had, all's spent,
    -Where our desire is got without content:
    -'Tis safer to be that which we destroy
    -Than by destruction dwell in doubtful joy.
    -

    Enter MACBETH

    -How now, my lord! why do you keep alone,
    -Of sorriest fancies your companions making,
    -Using those thoughts which should indeed have died
    -With them they think on? Things without all remedy
    -Should be without regard: what's done is done.
    -
    - -MACBETH -
    -We have scotch'd the snake, not kill'd it:
    -She'll close and be herself, whilst our poor malice
    -Remains in danger of her former tooth.
    -But let the frame of things disjoint, both the
    -worlds suffer,
    -Ere we will eat our meal in fear and sleep
    -In the affliction of these terrible dreams
    -That shake us nightly: better be with the dead,
    -Whom we, to gain our peace, have sent to peace,
    -Than on the torture of the mind to lie
    -In restless ecstasy. Duncan is in his grave;
    -After life's fitful fever he sleeps well;
    -Treason has done his worst: nor steel, nor poison,
    -Malice domestic, foreign levy, nothing,
    -Can touch him further.
    -
    - -LADY MACBETH -
    -Come on;
    -Gentle my lord, sleek o'er your rugged looks;
    -Be bright and jovial among your guests to-night.
    -
    - -MACBETH -
    -So shall I, love; and so, I pray, be you:
    -Let your remembrance apply to Banquo;
    -Present him eminence, both with eye and tongue:
    -Unsafe the while, that we
    -Must lave our honours in these flattering streams,
    -And make our faces vizards to our hearts,
    -Disguising what they are.
    -
    - -LADY MACBETH -
    -You must leave this.
    -
    - -MACBETH -
    -O, full of scorpions is my mind, dear wife!
    -Thou know'st that Banquo, and his Fleance, lives.
    -
    - -LADY MACBETH -
    -But in them nature's copy's not eterne.
    -
    - -MACBETH -
    -There's comfort yet; they are assailable;
    -Then be thou jocund: ere the bat hath flown
    -His cloister'd flight, ere to black Hecate's summons
    -The shard-borne beetle with his drowsy hums
    -Hath rung night's yawning peal, there shall be done
    -A deed of dreadful note.
    -
    - -LADY MACBETH -
    -What's to be done?
    -
    - -MACBETH -
    -Be innocent of the knowledge, dearest chuck,
    -Till thou applaud the deed. Come, seeling night,
    -Scarf up the tender eye of pitiful day;
    -And with thy bloody and invisible hand
    -Cancel and tear to pieces that great bond
    -Which keeps me pale! Light thickens; and the crow
    -Makes wing to the rooky wood:
    -Good things of day begin to droop and drowse;
    -While night's black agents to their preys do rouse.
    -Thou marvell'st at my words: but hold thee still;
    -Things bad begun make strong themselves by ill.
    -So, prithee, go with me.
    -

    Exeunt

    -
    -

    SCENE III. A park near the palace.

    -

    -Enter three Murderers -
    - -First Murderer -
    -But who did bid thee join with us?
    -
    - -Third Murderer -
    -Macbeth.
    -
    - -Second Murderer -
    -He needs not our mistrust, since he delivers
    -Our offices and what we have to do
    -To the direction just.
    -
    - -First Murderer -
    -Then stand with us.
    -The west yet glimmers with some streaks of day:
    -Now spurs the lated traveller apace
    -To gain the timely inn; and near approaches
    -The subject of our watch.
    -
    - -Third Murderer -
    -Hark! I hear horses.
    -
    - -BANQUO -
    -[Within] Give us a light there, ho!
    -
    - -Second Murderer -
    -Then 'tis he: the rest
    -That are within the note of expectation
    -Already are i' the court.
    -
    - -First Murderer -
    -His horses go about.
    -
    - -Third Murderer -
    -Almost a mile: but he does usually,
    -So all men do, from hence to the palace gate
    -Make it their walk.
    -
    - -Second Murderer -
    -A light, a light!
    -

    Enter BANQUO, and FLEANCE with a torch

    -
    - -Third Murderer -
    -'Tis he.
    -
    - -First Murderer -
    -Stand to't.
    -
    - -BANQUO -
    -It will be rain to-night.
    -
    - -First Murderer -
    -Let it come down.
    -

    They set upon BANQUO

    -
    - -BANQUO -
    -O, treachery! Fly, good Fleance, fly, fly, fly!
    -Thou mayst revenge. O slave!
    -

    Dies. FLEANCE escapes

    -
    - -Third Murderer -
    -Who did strike out the light?
    -
    - -First Murderer -
    -Wast not the way?
    -
    - -Third Murderer -
    -There's but one down; the son is fled.
    -
    - -Second Murderer -
    -We have lost
    -Best half of our affair.
    -
    - -First Murderer -
    -Well, let's away, and say how much is done.
    -

    Exeunt

    -
    -

    SCENE IV. The same. Hall in the palace.

    -

    -A banquet prepared. Enter MACBETH, LADY MACBETH, ROSS, LENNOX, Lords, and Attendants -
    - -MACBETH -
    -You know your own degrees; sit down: at first
    -And last the hearty welcome.
    -
    - -Lords -
    -Thanks to your majesty.
    -
    - -MACBETH -
    -Ourself will mingle with society,
    -And play the humble host.
    -Our hostess keeps her state, but in best time
    -We will require her welcome.
    -
    - -LADY MACBETH -
    -Pronounce it for me, sir, to all our friends;
    -For my heart speaks they are welcome.
    -

    First Murderer appears at the door

    -
    - -MACBETH -
    -See, they encounter thee with their hearts' thanks.
    -Both sides are even: here I'll sit i' the midst:
    -Be large in mirth; anon we'll drink a measure
    -The table round.
    -

    Approaching the door

    -There's blood on thy face.
    -
    - -First Murderer -
    -'Tis Banquo's then.
    -
    - -MACBETH -
    -'Tis better thee without than he within.
    -Is he dispatch'd?
    -
    - -First Murderer -
    -My lord, his throat is cut; that I did for him.
    -
    - -MACBETH -
    -Thou art the best o' the cut-throats: yet he's good
    -That did the like for Fleance: if thou didst it,
    -Thou art the nonpareil.
    -
    - -First Murderer -
    -Most royal sir,
    -Fleance is 'scaped.
    -
    - -MACBETH -
    -Then comes my fit again: I had else been perfect,
    -Whole as the marble, founded as the rock,
    -As broad and general as the casing air:
    -But now I am cabin'd, cribb'd, confined, bound in
    -To saucy doubts and fears. But Banquo's safe?
    -
    - -First Murderer -
    -Ay, my good lord: safe in a ditch he bides,
    -With twenty trenched gashes on his head;
    -The least a death to nature.
    -
    - -MACBETH -
    -Thanks for that:
    -There the grown serpent lies; the worm that's fled
    -Hath nature that in time will venom breed,
    -No teeth for the present. Get thee gone: to-morrow
    -We'll hear, ourselves, again.
    -

    Exit Murderer

    -
    - -LADY MACBETH -
    -My royal lord,
    -You do not give the cheer: the feast is sold
    -That is not often vouch'd, while 'tis a-making,
    -'Tis given with welcome: to feed were best at home;
    -From thence the sauce to meat is ceremony;
    -Meeting were bare without it.
    -
    - -MACBETH -
    -Sweet remembrancer!
    -Now, good digestion wait on appetite,
    -And health on both!
    -
    - -LENNOX -
    -May't please your highness sit.
    -

    The GHOST OF BANQUO enters, and sits in MACBETH's place

    -
    - -MACBETH -
    -Here had we now our country's honour roof'd,
    -Were the graced person of our Banquo present;
    -Who may I rather challenge for unkindness
    -Than pity for mischance!
    -
    - -ROSS -
    -His absence, sir,
    -Lays blame upon his promise. Please't your highness
    -To grace us with your royal company.
    -
    - -MACBETH -
    -The table's full.
    -
    - -LENNOX -
    - Here is a place reserved, sir.
    -
    - -MACBETH -
    -Where?
    -
    - -LENNOX -
    -Here, my good lord. What is't that moves your highness?
    -
    - -MACBETH -
    -Which of you have done this?
    -
    - -Lords -
    -What, my good lord?
    -
    - -MACBETH -
    -Thou canst not say I did it: never shake
    -Thy gory locks at me.
    -
    - -ROSS -
    -Gentlemen, rise: his highness is not well.
    -
    - -LADY MACBETH -
    -Sit, worthy friends: my lord is often thus,
    -And hath been from his youth: pray you, keep seat;
    -The fit is momentary; upon a thought
    -He will again be well: if much you note him,
    -You shall offend him and extend his passion:
    -Feed, and regard him not. Are you a man?
    -
    - -MACBETH -
    -Ay, and a bold one, that dare look on that
    -Which might appal the devil.
    -
    - -LADY MACBETH -
    -O proper stuff!
    -This is the very painting of your fear:
    -This is the air-drawn dagger which, you said,
    -Led you to Duncan. O, these flaws and starts,
    -Impostors to true fear, would well become
    -A woman's story at a winter's fire,
    -Authorized by her grandam. Shame itself!
    -Why do you make such faces? When all's done,
    -You look but on a stool.
    -
    - -MACBETH -
    -Prithee, see there! behold! look! lo!
    -how say you?
    -Why, what care I? If thou canst nod, speak too.
    -If charnel-houses and our graves must send
    -Those that we bury back, our monuments
    -Shall be the maws of kites.
    -

    GHOST OF BANQUO vanishes

    -
    - -LADY MACBETH -
    -What, quite unmann'd in folly?
    -
    - -MACBETH -
    -If I stand here, I saw him.
    -
    - -LADY MACBETH -
    -Fie, for shame!
    -
    - -MACBETH -
    -Blood hath been shed ere now, i' the olden time,
    -Ere human statute purged the gentle weal;
    -Ay, and since too, murders have been perform'd
    -Too terrible for the ear: the times have been,
    -That, when the brains were out, the man would die,
    -And there an end; but now they rise again,
    -With twenty mortal murders on their crowns,
    -And push us from our stools: this is more strange
    -Than such a murder is.
    -
    - -LADY MACBETH -
    -My worthy lord,
    -Your noble friends do lack you.
    -
    - -MACBETH -
    -I do forget.
    -Do not muse at me, my most worthy friends,
    -I have a strange infirmity, which is nothing
    -To those that know me. Come, love and health to all;
    -Then I'll sit down. Give me some wine; fill full.
    -I drink to the general joy o' the whole table,
    -And to our dear friend Banquo, whom we miss;
    -Would he were here! to all, and him, we thirst,
    -And all to all.
    -
    - -Lords -
    - Our duties, and the pledge.
    -

    Re-enter GHOST OF BANQUO

    -
    - -MACBETH -
    -Avaunt! and quit my sight! let the earth hide thee!
    -Thy bones are marrowless, thy blood is cold;
    -Thou hast no speculation in those eyes
    -Which thou dost glare with!
    -
    - -LADY MACBETH -
    -Think of this, good peers,
    -But as a thing of custom: 'tis no other;
    -Only it spoils the pleasure of the time.
    -
    - -MACBETH -
    -What man dare, I dare:
    -Approach thou like the rugged Russian bear,
    -The arm'd rhinoceros, or the Hyrcan tiger;
    -Take any shape but that, and my firm nerves
    -Shall never tremble: or be alive again,
    -And dare me to the desert with thy sword;
    -If trembling I inhabit then, protest me
    -The baby of a girl. Hence, horrible shadow!
    -Unreal mockery, hence!
    -

    GHOST OF BANQUO vanishes

    -Why, so: being gone,
    -I am a man again. Pray you, sit still.
    -
    - -LADY MACBETH -
    -You have displaced the mirth, broke the good meeting,
    -With most admired disorder.
    -
    - -MACBETH -
    -Can such things be,
    -And overcome us like a summer's cloud,
    -Without our special wonder? You make me strange
    -Even to the disposition that I owe,
    -When now I think you can behold such sights,
    -And keep the natural ruby of your cheeks,
    -When mine is blanched with fear.
    -
    - -ROSS -
    -What sights, my lord?
    -
    - -LADY MACBETH -
    -I pray you, speak not; he grows worse and worse;
    -Question enrages him. At once, good night:
    -Stand not upon the order of your going,
    -But go at once.
    -
    - -LENNOX -
    - Good night; and better health
    -Attend his majesty!
    -
    - -LADY MACBETH -
    -A kind good night to all!
    -

    Exeunt all but MACBETH and LADY MACBETH

    -
    - -MACBETH -
    -It will have blood; they say, blood will have blood:
    -Stones have been known to move and trees to speak;
    -Augurs and understood relations have
    -By magot-pies and choughs and rooks brought forth
    -The secret'st man of blood. What is the night?
    -
    - -LADY MACBETH -
    -Almost at odds with morning, which is which.
    -
    - -MACBETH -
    -How say'st thou, that Macduff denies his person
    -At our great bidding?
    -
    - -LADY MACBETH -
    -Did you send to him, sir?
    -
    - -MACBETH -
    -I hear it by the way; but I will send:
    -There's not a one of them but in his house
    -I keep a servant fee'd. I will to-morrow,
    -And betimes I will, to the weird sisters:
    -More shall they speak; for now I am bent to know,
    -By the worst means, the worst. For mine own good,
    -All causes shall give way: I am in blood
    -Stepp'd in so far that, should I wade no more,
    -Returning were as tedious as go o'er:
    -Strange things I have in head, that will to hand;
    -Which must be acted ere they may be scann'd.
    -
    - -LADY MACBETH -
    -You lack the season of all natures, sleep.
    -
    - -MACBETH -
    -Come, we'll to sleep. My strange and self-abuse
    -Is the initiate fear that wants hard use:
    -We are yet but young in deed.
    -

    Exeunt

    -
    -

    SCENE V. A Heath.

    -

    -Thunder. Enter the three Witches meeting HECATE -
    - -First Witch -
    -Why, how now, Hecate! you look angerly.
    -
    - -HECATE -
    -Have I not reason, beldams as you are,
    -Saucy and overbold? How did you dare
    -To trade and traffic with Macbeth
    -In riddles and affairs of death;
    -And I, the mistress of your charms,
    -The close contriver of all harms,
    -Was never call'd to bear my part,
    -Or show the glory of our art?
    -And, which is worse, all you have done
    -Hath been but for a wayward son,
    -Spiteful and wrathful, who, as others do,
    -Loves for his own ends, not for you.
    -But make amends now: get you gone,
    -And at the pit of Acheron
    -Meet me i' the morning: thither he
    -Will come to know his destiny:
    -Your vessels and your spells provide,
    -Your charms and every thing beside.
    -I am for the air; this night I'll spend
    -Unto a dismal and a fatal end:
    -Great business must be wrought ere noon:
    -Upon the corner of the moon
    -There hangs a vaporous drop profound;
    -I'll catch it ere it come to ground:
    -And that distill'd by magic sleights
    -Shall raise such artificial sprites
    -As by the strength of their illusion
    -Shall draw him on to his confusion:
    -He shall spurn fate, scorn death, and bear
    -He hopes 'bove wisdom, grace and fear:
    -And you all know, security
    -Is mortals' chiefest enemy.
    -

    Music and a song within: 'Come away, come away,' & c

    -Hark! I am call'd; my little spirit, see,
    -Sits in a foggy cloud, and stays for me.
    -

    Exit

    -
    - -First Witch -
    -Come, let's make haste; she'll soon be back again.
    -

    Exeunt

    -
    -

    SCENE VI. Forres. The palace.

    -

    -Enter LENNOX and another Lord -
    - -LENNOX -
    -My former speeches have but hit your thoughts,
    -Which can interpret further: only, I say,
    -Things have been strangely borne. The
    -gracious Duncan
    -Was pitied of Macbeth: marry, he was dead:
    -And the right-valiant Banquo walk'd too late;
    -Whom, you may say, if't please you, Fleance kill'd,
    -For Fleance fled: men must not walk too late.
    -Who cannot want the thought how monstrous
    -It was for Malcolm and for Donalbain
    -To kill their gracious father? damned fact!
    -How it did grieve Macbeth! did he not straight
    -In pious rage the two delinquents tear,
    -That were the slaves of drink and thralls of sleep?
    -Was not that nobly done? Ay, and wisely too;
    -For 'twould have anger'd any heart alive
    -To hear the men deny't. So that, I say,
    -He has borne all things well: and I do think
    -That had he Duncan's sons under his key--
    -As, an't please heaven, he shall not--they
    -should find
    -What 'twere to kill a father; so should Fleance.
    -But, peace! for from broad words and 'cause he fail'd
    -His presence at the tyrant's feast, I hear
    -Macduff lives in disgrace: sir, can you tell
    -Where he bestows himself?
    -
    - -Lord -
    -The son of Duncan,
    -From whom this tyrant holds the due of birth
    -Lives in the English court, and is received
    -Of the most pious Edward with such grace
    -That the malevolence of fortune nothing
    -Takes from his high respect: thither Macduff
    -Is gone to pray the holy king, upon his aid
    -To wake Northumberland and warlike Siward:
    -That, by the help of these--with Him above
    -To ratify the work--we may again
    -Give to our tables meat, sleep to our nights,
    -Free from our feasts and banquets bloody knives,
    -Do faithful homage and receive free honours:
    -All which we pine for now: and this report
    -Hath so exasperate the king that he
    -Prepares for some attempt of war.
    -
    - -LENNOX -
    -Sent he to Macduff?
    -
    - -Lord -
    -He did: and with an absolute 'Sir, not I,'
    -The cloudy messenger turns me his back,
    -And hums, as who should say 'You'll rue the time
    -That clogs me with this answer.'
    -
    - -LENNOX -
    -And that well might
    -Advise him to a caution, to hold what distance
    -His wisdom can provide. Some holy angel
    -Fly to the court of England and unfold
    -His message ere he come, that a swift blessing
    -May soon return to this our suffering country
    -Under a hand accursed!
    -
    - -Lord -
    -I'll send my prayers with him.
    -

    Exeunt

    -

    -

    ACT IV

    -

    SCENE I. A cavern. In the middle, a boiling cauldron.

    -

    -Thunder. Enter the three Witches -
    - -First Witch -
    -Thrice the brinded cat hath mew'd.
    -
    - -Second Witch -
    -Thrice and once the hedge-pig whined.
    -
    - -Third Witch -
    -Harpier cries 'Tis time, 'tis time.
    -
    - -First Witch -
    -Round about the cauldron go;
    -In the poison'd entrails throw.
    -Toad, that under cold stone
    -Days and nights has thirty-one
    -Swelter'd venom sleeping got,
    -Boil thou first i' the charmed pot.
    -
    - -ALL -
    -Double, double toil and trouble;
    -Fire burn, and cauldron bubble.
    -
    - -Second Witch -
    -Fillet of a fenny snake,
    -In the cauldron boil and bake;
    -Eye of newt and toe of frog,
    -Wool of bat and tongue of dog,
    -Adder's fork and blind-worm's sting,
    -Lizard's leg and owlet's wing,
    -For a charm of powerful trouble,
    -Like a hell-broth boil and bubble.
    -
    - -ALL -
    -Double, double toil and trouble;
    -Fire burn and cauldron bubble.
    -
    - -Third Witch -
    -Scale of dragon, tooth of wolf,
    -Witches' mummy, maw and gulf
    -Of the ravin'd salt-sea shark,
    -Root of hemlock digg'd i' the dark,
    -Liver of blaspheming Jew,
    -Gall of goat, and slips of yew
    -Silver'd in the moon's eclipse,
    -Nose of Turk and Tartar's lips,
    -Finger of birth-strangled babe
    -Ditch-deliver'd by a drab,
    -Make the gruel thick and slab:
    -Add thereto a tiger's chaudron,
    -For the ingredients of our cauldron.
    -
    - -ALL -
    -Double, double toil and trouble;
    -Fire burn and cauldron bubble.
    -
    - -Second Witch -
    -Cool it with a baboon's blood,
    -Then the charm is firm and good.
    -

    Enter HECATE to the other three Witches

    -
    - -HECATE -
    -O well done! I commend your pains;
    -And every one shall share i' the gains;
    -And now about the cauldron sing,
    -Live elves and fairies in a ring,
    -Enchanting all that you put in.
    -

    Music and a song: 'Black spirits,' & c

    -

    HECATE retires

    -
    - -Second Witch -
    -By the pricking of my thumbs,
    -Something wicked this way comes.
    -Open, locks,
    -Whoever knocks!
    -

    Enter MACBETH

    -
    - -MACBETH -
    -How now, you secret, black, and midnight hags!
    -What is't you do?
    -
    - -ALL -
    - A deed without a name.
    -
    - -MACBETH -
    -I conjure you, by that which you profess,
    -Howe'er you come to know it, answer me:
    -Though you untie the winds and let them fight
    -Against the churches; though the yesty waves
    -Confound and swallow navigation up;
    -Though bladed corn be lodged and trees blown down;
    -Though castles topple on their warders' heads;
    -Though palaces and pyramids do slope
    -Their heads to their foundations; though the treasure
    -Of nature's germens tumble all together,
    -Even till destruction sicken; answer me
    -To what I ask you.
    -
    - -First Witch -
    - Speak.
    -
    - -Second Witch -
    -Demand.
    -
    - -Third Witch -
    -We'll answer.
    -
    - -First Witch -
    -Say, if thou'dst rather hear it from our mouths,
    -Or from our masters?
    -
    - -MACBETH -
    -Call 'em; let me see 'em.
    -
    - -First Witch -
    -Pour in sow's blood, that hath eaten
    -Her nine farrow; grease that's sweaten
    -From the murderer's gibbet throw
    -Into the flame.
    -
    - -ALL -
    - Come, high or low;
    -Thyself and office deftly show!
    -

    Thunder. First Apparition: an armed Head

    -
    - -MACBETH -
    -Tell me, thou unknown power,--
    -
    - -First Witch -
    -He knows thy thought:
    -Hear his speech, but say thou nought.
    -
    - -First Apparition -
    -Macbeth! Macbeth! Macbeth! beware Macduff;
    -Beware the thane of Fife. Dismiss me. Enough.
    -

    Descends

    -
    - -MACBETH -
    -Whate'er thou art, for thy good caution, thanks;
    -Thou hast harp'd my fear aright: but one
    -word more,--
    -
    - -First Witch -
    -He will not be commanded: here's another,
    -More potent than the first.
    -

    Thunder. Second Apparition: A bloody Child

    -
    - -Second Apparition -
    -Macbeth! Macbeth! Macbeth!
    -
    - -MACBETH -
    -Had I three ears, I'ld hear thee.
    -
    - -Second Apparition -
    -Be bloody, bold, and resolute; laugh to scorn
    -The power of man, for none of woman born
    -Shall harm Macbeth.
    -

    Descends

    -
    - -MACBETH -
    -Then live, Macduff: what need I fear of thee?
    -But yet I'll make assurance double sure,
    -And take a bond of fate: thou shalt not live;
    -That I may tell pale-hearted fear it lies,
    -And sleep in spite of thunder.
    -

    Thunder. Third Apparition: a Child crowned, with a tree in his hand

    -What is this
    -That rises like the issue of a king,
    -And wears upon his baby-brow the round
    -And top of sovereignty?
    -
    - -ALL -
    -Listen, but speak not to't.
    -
    - -Third Apparition -
    -Be lion-mettled, proud; and take no care
    -Who chafes, who frets, or where conspirers are:
    -Macbeth shall never vanquish'd be until
    -Great Birnam wood to high Dunsinane hill
    -Shall come against him.
    -

    Descends

    -
    - -MACBETH -
    -That will never be
    -Who can impress the forest, bid the tree
    -Unfix his earth-bound root? Sweet bodements! good!
    -Rebellion's head, rise never till the wood
    -Of Birnam rise, and our high-placed Macbeth
    -Shall live the lease of nature, pay his breath
    -To time and mortal custom. Yet my heart
    -Throbs to know one thing: tell me, if your art
    -Can tell so much: shall Banquo's issue ever
    -Reign in this kingdom?
    -
    - -ALL -
    -Seek to know no more.
    -
    - -MACBETH -
    -I will be satisfied: deny me this,
    -And an eternal curse fall on you! Let me know.
    -Why sinks that cauldron? and what noise is this?
    -

    Hautboys

    -
    - -First Witch -
    -Show!
    -
    - -Second Witch -
    -Show!
    -
    - -Third Witch -
    -Show!
    -
    - -ALL -
    -Show his eyes, and grieve his heart;
    -Come like shadows, so depart!
    -

    A show of Eight Kings, the last with a glass in his hand; GHOST OF BANQUO following

    -
    - -MACBETH -
    -Thou art too like the spirit of Banquo: down!
    -Thy crown does sear mine eye-balls. And thy hair,
    -Thou other gold-bound brow, is like the first.
    -A third is like the former. Filthy hags!
    -Why do you show me this? A fourth! Start, eyes!
    -What, will the line stretch out to the crack of doom?
    -Another yet! A seventh! I'll see no more:
    -And yet the eighth appears, who bears a glass
    -Which shows me many more; and some I see
    -That two-fold balls and treble scepters carry:
    -Horrible sight! Now, I see, 'tis true;
    -For the blood-bolter'd Banquo smiles upon me,
    -And points at them for his.
    -

    Apparitions vanish

    -What, is this so?
    -
    - -First Witch -
    -Ay, sir, all this is so: but why
    -Stands Macbeth thus amazedly?
    -Come, sisters, cheer we up his sprites,
    -And show the best of our delights:
    -I'll charm the air to give a sound,
    -While you perform your antic round:
    -That this great king may kindly say,
    -Our duties did his welcome pay.
    -

    Music. The witches dance and then vanish, with HECATE

    -
    - -MACBETH -
    -Where are they? Gone? Let this pernicious hour
    -Stand aye accursed in the calendar!
    -Come in, without there!
    -

    Enter LENNOX

    -
    - -LENNOX -
    -What's your grace's will?
    -
    - -MACBETH -
    -Saw you the weird sisters?
    -
    - -LENNOX -
    -No, my lord.
    -
    - -MACBETH -
    -Came they not by you?
    -
    - -LENNOX -
    -No, indeed, my lord.
    -
    - -MACBETH -
    -Infected be the air whereon they ride;
    -And damn'd all those that trust them! I did hear
    -The galloping of horse: who was't came by?
    -
    - -LENNOX -
    -'Tis two or three, my lord, that bring you word
    -Macduff is fled to England.
    -
    - -MACBETH -
    -Fled to England!
    -
    - -LENNOX -
    -Ay, my good lord.
    -
    - -MACBETH -
    -Time, thou anticipatest my dread exploits:
    -The flighty purpose never is o'ertook
    -Unless the deed go with it; from this moment
    -The very firstlings of my heart shall be
    -The firstlings of my hand. And even now,
    -To crown my thoughts with acts, be it thought and done:
    -The castle of Macduff I will surprise;
    -Seize upon Fife; give to the edge o' the sword
    -His wife, his babes, and all unfortunate souls
    -That trace him in his line. No boasting like a fool;
    -This deed I'll do before this purpose cool.
    -But no more sights!--Where are these gentlemen?
    -Come, bring me where they are.
    -

    Exeunt

    -
    -

    SCENE II. Fife. Macduff's castle.

    -

    -Enter LADY MACDUFF, her Son, and ROSS -
    - -LADY MACDUFF -
    -What had he done, to make him fly the land?
    -
    - -ROSS -
    -You must have patience, madam.
    -
    - -LADY MACDUFF -
    -He had none:
    -His flight was madness: when our actions do not,
    -Our fears do make us traitors.
    -
    - -ROSS -
    -You know not
    -Whether it was his wisdom or his fear.
    -
    - -LADY MACDUFF -
    -Wisdom! to leave his wife, to leave his babes,
    -His mansion and his titles in a place
    -From whence himself does fly? He loves us not;
    -He wants the natural touch: for the poor wren,
    -The most diminutive of birds, will fight,
    -Her young ones in her nest, against the owl.
    -All is the fear and nothing is the love;
    -As little is the wisdom, where the flight
    -So runs against all reason.
    -
    - -ROSS -
    -My dearest coz,
    -I pray you, school yourself: but for your husband,
    -He is noble, wise, judicious, and best knows
    -The fits o' the season. I dare not speak
    -much further;
    -But cruel are the times, when we are traitors
    -And do not know ourselves, when we hold rumour
    -From what we fear, yet know not what we fear,
    -But float upon a wild and violent sea
    -Each way and move. I take my leave of you:
    -Shall not be long but I'll be here again:
    -Things at the worst will cease, or else climb upward
    -To what they were before. My pretty cousin,
    -Blessing upon you!
    -
    - -LADY MACDUFF -
    -Father'd he is, and yet he's fatherless.
    -
    - -ROSS -
    -I am so much a fool, should I stay longer,
    -It would be my disgrace and your discomfort:
    -I take my leave at once.
    -

    Exit

    -
    - -LADY MACDUFF -
    -Sirrah, your father's dead;
    -And what will you do now? How will you live?
    -
    - -Son -
    -As birds do, mother.
    -
    - -LADY MACDUFF -
    -What, with worms and flies?
    -
    - -Son -
    -With what I get, I mean; and so do they.
    -
    - -LADY MACDUFF -
    -Poor bird! thou'ldst never fear the net nor lime,
    -The pitfall nor the gin.
    -
    - -Son -
    -Why should I, mother? Poor birds they are not set for.
    -My father is not dead, for all your saying.
    -
    - -LADY MACDUFF -
    -Yes, he is dead; how wilt thou do for a father?
    -
    - -Son -
    -Nay, how will you do for a husband?
    -
    - -LADY MACDUFF -
    -Why, I can buy me twenty at any market.
    -
    - -Son -
    -Then you'll buy 'em to sell again.
    -
    - -LADY MACDUFF -
    -Thou speak'st with all thy wit: and yet, i' faith,
    -With wit enough for thee.
    -
    - -Son -
    -Was my father a traitor, mother?
    -
    - -LADY MACDUFF -
    -Ay, that he was.
    -
    - -Son -
    -What is a traitor?
    -
    - -LADY MACDUFF -
    -Why, one that swears and lies.
    -
    - -Son -
    -And be all traitors that do so?
    -
    - -LADY MACDUFF -
    -Every one that does so is a traitor, and must be hanged.
    -
    - -Son -
    -And must they all be hanged that swear and lie?
    -
    - -LADY MACDUFF -
    -Every one.
    -
    - -Son -
    -Who must hang them?
    -
    - -LADY MACDUFF -
    -Why, the honest men.
    -
    - -Son -
    -Then the liars and swearers are fools,
    -for there are liars and swearers enow to beat
    -the honest men and hang up them.
    -
    - -LADY MACDUFF -
    -Now, God help thee, poor monkey!
    -But how wilt thou do for a father?
    -
    - -Son -
    -If he were dead, you'ld weep for
    -him: if you would not, it were a good sign
    -that I should quickly have a new father.
    -
    - -LADY MACDUFF -
    -Poor prattler, how thou talk'st!
    -

    Enter a Messenger

    -
    - -Messenger -
    -Bless you, fair dame! I am not to you known,
    -Though in your state of honour I am perfect.
    -I doubt some danger does approach you nearly:
    -If you will take a homely man's advice,
    -Be not found here; hence, with your little ones.
    -To fright you thus, methinks, I am too savage;
    -To do worse to you were fell cruelty,
    -Which is too nigh your person. Heaven preserve you!
    -I dare abide no longer.
    -

    Exit

    -
    - -LADY MACDUFF -
    -Whither should I fly?
    -I have done no harm. But I remember now
    -I am in this earthly world; where to do harm
    -Is often laudable, to do good sometime
    -Accounted dangerous folly: why then, alas,
    -Do I put up that womanly defence,
    -To say I have done no harm?
    -

    Enter Murderers

    -What are these faces?
    -
    - -First Murderer -
    -Where is your husband?
    -
    - -LADY MACDUFF -
    -I hope, in no place so unsanctified
    -Where such as thou mayst find him.
    -
    - -First Murderer -
    -He's a traitor.
    -
    - -Son -
    -Thou liest, thou shag-hair'd villain!
    -
    - -First Murderer -
    -What, you egg!
    -

    Stabbing him

    -Young fry of treachery!
    -
    - -Son -
    -He has kill'd me, mother:
    -Run away, I pray you!
    -

    Dies

    -

    Exit LADY MACDUFF, crying 'Murder!' Exeunt Murderers, following her

    -
    -

    SCENE III. England. Before the King's palace.

    -

    -Enter MALCOLM and MACDUFF -
    - -MALCOLM -
    -Let us seek out some desolate shade, and there
    -Weep our sad bosoms empty.
    -
    - -MACDUFF -
    -Let us rather
    -Hold fast the mortal sword, and like good men
    -Bestride our down-fall'n birthdom: each new morn
    -New widows howl, new orphans cry, new sorrows
    -Strike heaven on the face, that it resounds
    -As if it felt with Scotland and yell'd out
    -Like syllable of dolour.
    -
    - -MALCOLM -
    -What I believe I'll wail,
    -What know believe, and what I can redress,
    -As I shall find the time to friend, I will.
    -What you have spoke, it may be so perchance.
    -This tyrant, whose sole name blisters our tongues,
    -Was once thought honest: you have loved him well.
    -He hath not touch'd you yet. I am young;
    -but something
    -You may deserve of him through me, and wisdom
    -To offer up a weak poor innocent lamb
    -To appease an angry god.
    -
    - -MACDUFF -
    -I am not treacherous.
    -
    - -MALCOLM -
    -But Macbeth is.
    -A good and virtuous nature may recoil
    -In an imperial charge. But I shall crave
    -your pardon;
    -That which you are my thoughts cannot transpose:
    -Angels are bright still, though the brightest fell;
    -Though all things foul would wear the brows of grace,
    -Yet grace must still look so.
    -
    - -MACDUFF -
    -I have lost my hopes.
    -
    - -MALCOLM -
    -Perchance even there where I did find my doubts.
    -Why in that rawness left you wife and child,
    -Those precious motives, those strong knots of love,
    -Without leave-taking? I pray you,
    -Let not my jealousies be your dishonours,
    -But mine own safeties. You may be rightly just,
    -Whatever I shall think.
    -
    - -MACDUFF -
    -Bleed, bleed, poor country!
    -Great tyranny! lay thou thy basis sure,
    -For goodness dare not cheque thee: wear thou
    -thy wrongs;
    -The title is affeer'd! Fare thee well, lord:
    -I would not be the villain that thou think'st
    -For the whole space that's in the tyrant's grasp,
    -And the rich East to boot.
    -
    - -MALCOLM -
    -Be not offended:
    -I speak not as in absolute fear of you.
    -I think our country sinks beneath the yoke;
    -It weeps, it bleeds; and each new day a gash
    -Is added to her wounds: I think withal
    -There would be hands uplifted in my right;
    -And here from gracious England have I offer
    -Of goodly thousands: but, for all this,
    -When I shall tread upon the tyrant's head,
    -Or wear it on my sword, yet my poor country
    -Shall have more vices than it had before,
    -More suffer and more sundry ways than ever,
    -By him that shall succeed.
    -
    - -MACDUFF -
    -What should he be?
    -
    - -MALCOLM -
    -It is myself I mean: in whom I know
    -All the particulars of vice so grafted
    -That, when they shall be open'd, black Macbeth
    -Will seem as pure as snow, and the poor state
    -Esteem him as a lamb, being compared
    -With my confineless harms.
    -
    - -MACDUFF -
    -Not in the legions
    -Of horrid hell can come a devil more damn'd
    -In evils to top Macbeth.
    -
    - -MALCOLM -
    -I grant him bloody,
    -Luxurious, avaricious, false, deceitful,
    -Sudden, malicious, smacking of every sin
    -That has a name: but there's no bottom, none,
    -In my voluptuousness: your wives, your daughters,
    -Your matrons and your maids, could not fill up
    -The cistern of my lust, and my desire
    -All continent impediments would o'erbear
    -That did oppose my will: better Macbeth
    -Than such an one to reign.
    -
    - -MACDUFF -
    -Boundless intemperance
    -In nature is a tyranny; it hath been
    -The untimely emptying of the happy throne
    -And fall of many kings. But fear not yet
    -To take upon you what is yours: you may
    -Convey your pleasures in a spacious plenty,
    -And yet seem cold, the time you may so hoodwink.
    -We have willing dames enough: there cannot be
    -That vulture in you, to devour so many
    -As will to greatness dedicate themselves,
    -Finding it so inclined.
    -
    - -MALCOLM -
    -With this there grows
    -In my most ill-composed affection such
    -A stanchless avarice that, were I king,
    -I should cut off the nobles for their lands,
    -Desire his jewels and this other's house:
    -And my more-having would be as a sauce
    -To make me hunger more; that I should forge
    -Quarrels unjust against the good and loyal,
    -Destroying them for wealth.
    -
    - -MACDUFF -
    -This avarice
    -Sticks deeper, grows with more pernicious root
    -Than summer-seeming lust, and it hath been
    -The sword of our slain kings: yet do not fear;
    -Scotland hath foisons to fill up your will.
    -Of your mere own: all these are portable,
    -With other graces weigh'd.
    -
    - -MALCOLM -
    -But I have none: the king-becoming graces,
    -As justice, verity, temperance, stableness,
    -Bounty, perseverance, mercy, lowliness,
    -Devotion, patience, courage, fortitude,
    -I have no relish of them, but abound
    -In the division of each several crime,
    -Acting it many ways. Nay, had I power, I should
    -Pour the sweet milk of concord into hell,
    -Uproar the universal peace, confound
    -All unity on earth.
    -
    - -MACDUFF -
    -O Scotland, Scotland!
    -
    - -MALCOLM -
    -If such a one be fit to govern, speak:
    -I am as I have spoken.
    -
    - -MACDUFF -
    -Fit to govern!
    -No, not to live. O nation miserable,
    -With an untitled tyrant bloody-scepter'd,
    -When shalt thou see thy wholesome days again,
    -Since that the truest issue of thy throne
    -By his own interdiction stands accursed,
    -And does blaspheme his breed? Thy royal father
    -Was a most sainted king: the queen that bore thee,
    -Oftener upon her knees than on her feet,
    -Died every day she lived. Fare thee well!
    -These evils thou repeat'st upon thyself
    -Have banish'd me from Scotland. O my breast,
    -Thy hope ends here!
    -
    - -MALCOLM -
    -Macduff, this noble passion,
    -Child of integrity, hath from my soul
    -Wiped the black scruples, reconciled my thoughts
    -To thy good truth and honour. Devilish Macbeth
    -By many of these trains hath sought to win me
    -Into his power, and modest wisdom plucks me
    -From over-credulous haste: but God above
    -Deal between thee and me! for even now
    -I put myself to thy direction, and
    -Unspeak mine own detraction, here abjure
    -The taints and blames I laid upon myself,
    -For strangers to my nature. I am yet
    -Unknown to woman, never was forsworn,
    -Scarcely have coveted what was mine own,
    -At no time broke my faith, would not betray
    -The devil to his fellow and delight
    -No less in truth than life: my first false speaking
    -Was this upon myself: what I am truly,
    -Is thine and my poor country's to command:
    -Whither indeed, before thy here-approach,
    -Old Siward, with ten thousand warlike men,
    -Already at a point, was setting forth.
    -Now we'll together; and the chance of goodness
    -Be like our warranted quarrel! Why are you silent?
    -
    - -MACDUFF -
    -Such welcome and unwelcome things at once
    -'Tis hard to reconcile.
    -

    Enter a Doctor

    -
    - -MALCOLM -
    -Well; more anon.--Comes the king forth, I pray you?
    -
    - -Doctor -
    -Ay, sir; there are a crew of wretched souls
    -That stay his cure: their malady convinces
    -The great assay of art; but at his touch--
    -Such sanctity hath heaven given his hand--
    -They presently amend.
    -
    - -MALCOLM -
    -I thank you, doctor.
    -

    Exit Doctor

    -
    - -MACDUFF -
    -What's the disease he means?
    -
    - -MALCOLM -
    -'Tis call'd the evil:
    -A most miraculous work in this good king;
    -Which often, since my here-remain in England,
    -I have seen him do. How he solicits heaven,
    -Himself best knows: but strangely-visited people,
    -All swoln and ulcerous, pitiful to the eye,
    -The mere despair of surgery, he cures,
    -Hanging a golden stamp about their necks,
    -Put on with holy prayers: and 'tis spoken,
    -To the succeeding royalty he leaves
    -The healing benediction. With this strange virtue,
    -He hath a heavenly gift of prophecy,
    -And sundry blessings hang about his throne,
    -That speak him full of grace.
    -

    Enter ROSS

    -
    - -MACDUFF -
    -See, who comes here?
    -
    - -MALCOLM -
    -My countryman; but yet I know him not.
    -
    - -MACDUFF -
    -My ever-gentle cousin, welcome hither.
    -
    - -MALCOLM -
    -I know him now. Good God, betimes remove
    -The means that makes us strangers!
    -
    - -ROSS -
    -Sir, amen.
    -
    - -MACDUFF -
    -Stands Scotland where it did?
    -
    - -ROSS -
    -Alas, poor country!
    -Almost afraid to know itself. It cannot
    -Be call'd our mother, but our grave; where nothing,
    -But who knows nothing, is once seen to smile;
    -Where sighs and groans and shrieks that rend the air
    -Are made, not mark'd; where violent sorrow seems
    -A modern ecstasy; the dead man's knell
    -Is there scarce ask'd for who; and good men's lives
    -Expire before the flowers in their caps,
    -Dying or ere they sicken.
    -
    - -MACDUFF -
    -O, relation
    -Too nice, and yet too true!
    -
    - -MALCOLM -
    -What's the newest grief?
    -
    - -ROSS -
    -That of an hour's age doth hiss the speaker:
    -Each minute teems a new one.
    -
    - -MACDUFF -
    -How does my wife?
    -
    - -ROSS -
    -Why, well.
    -
    - -MACDUFF -
    - And all my children?
    -
    - -ROSS -
    -Well too.
    -
    - -MACDUFF -
    -The tyrant has not batter'd at their peace?
    -
    - -ROSS -
    -No; they were well at peace when I did leave 'em.
    -
    - -MACDUFF -
    -But not a niggard of your speech: how goes't?
    -
    - -ROSS -
    -When I came hither to transport the tidings,
    -Which I have heavily borne, there ran a rumour
    -Of many worthy fellows that were out;
    -Which was to my belief witness'd the rather,
    -For that I saw the tyrant's power a-foot:
    -Now is the time of help; your eye in Scotland
    -Would create soldiers, make our women fight,
    -To doff their dire distresses.
    -
    - -MALCOLM -
    -Be't their comfort
    -We are coming thither: gracious England hath
    -Lent us good Siward and ten thousand men;
    -An older and a better soldier none
    -That Christendom gives out.
    -
    - -ROSS -
    -Would I could answer
    -This comfort with the like! But I have words
    -That would be howl'd out in the desert air,
    -Where hearing should not latch them.
    -
    - -MACDUFF -
    -What concern they?
    -The general cause? or is it a fee-grief
    -Due to some single breast?
    -
    - -ROSS -
    -No mind that's honest
    -But in it shares some woe; though the main part
    -Pertains to you alone.
    -
    - -MACDUFF -
    -If it be mine,
    -Keep it not from me, quickly let me have it.
    -
    - -ROSS -
    -Let not your ears despise my tongue for ever,
    -Which shall possess them with the heaviest sound
    -That ever yet they heard.
    -
    - -MACDUFF -
    -Hum! I guess at it.
    -
    - -ROSS -
    -Your castle is surprised; your wife and babes
    -Savagely slaughter'd: to relate the manner,
    -Were, on the quarry of these murder'd deer,
    -To add the death of you.
    -
    - -MALCOLM -
    -Merciful heaven!
    -What, man! ne'er pull your hat upon your brows;
    -Give sorrow words: the grief that does not speak
    -Whispers the o'er-fraught heart and bids it break.
    -
    - -MACDUFF -
    -My children too?
    -
    - -ROSS -
    - Wife, children, servants, all
    -That could be found.
    -
    - -MACDUFF -
    -And I must be from thence!
    -My wife kill'd too?
    -
    - -ROSS -
    -I have said.
    -
    - -MALCOLM -
    -Be comforted:
    -Let's make us medicines of our great revenge,
    -To cure this deadly grief.
    -
    - -MACDUFF -
    -He has no children. All my pretty ones?
    -Did you say all? O hell-kite! All?
    -What, all my pretty chickens and their dam
    -At one fell swoop?
    -
    - -MALCOLM -
    -Dispute it like a man.
    -
    - -MACDUFF -
    -I shall do so;
    -But I must also feel it as a man:
    -I cannot but remember such things were,
    -That were most precious to me. Did heaven look on,
    -And would not take their part? Sinful Macduff,
    -They were all struck for thee! naught that I am,
    -Not for their own demerits, but for mine,
    -Fell slaughter on their souls. Heaven rest them now!
    -
    - -MALCOLM -
    -Be this the whetstone of your sword: let grief
    -Convert to anger; blunt not the heart, enrage it.
    -
    - -MACDUFF -
    -O, I could play the woman with mine eyes
    -And braggart with my tongue! But, gentle heavens,
    -Cut short all intermission; front to front
    -Bring thou this fiend of Scotland and myself;
    -Within my sword's length set him; if he 'scape,
    -Heaven forgive him too!
    -
    - -MALCOLM -
    -This tune goes manly.
    -Come, go we to the king; our power is ready;
    -Our lack is nothing but our leave; Macbeth
    -Is ripe for shaking, and the powers above
    -Put on their instruments. Receive what cheer you may:
    -The night is long that never finds the day.
    -

    Exeunt

    -

    -

    ACT V

    -

    SCENE I. Dunsinane. Ante-room in the castle.

    -

    -Enter a Doctor of Physic and a Waiting-Gentlewoman -
    - -Doctor -
    -I have two nights watched with you, but can perceive
    -no truth in your report. When was it she last walked?
    -
    - -Gentlewoman -
    -Since his majesty went into the field, I have seen
    -her rise from her bed, throw her night-gown upon
    -her, unlock her closet, take forth paper, fold it,
    -write upon't, read it, afterwards seal it, and again
    -return to bed; yet all this while in a most fast sleep.
    -
    - -Doctor -
    -A great perturbation in nature, to receive at once
    -the benefit of sleep, and do the effects of
    -watching! In this slumbery agitation, besides her
    -walking and other actual performances, what, at any
    -time, have you heard her say?
    -
    - -Gentlewoman -
    -That, sir, which I will not report after her.
    -
    - -Doctor -
    -You may to me: and 'tis most meet you should.
    -
    - -Gentlewoman -
    -Neither to you nor any one; having no witness to
    -confirm my speech.
    -

    Enter LADY MACBETH, with a taper

    -Lo you, here she comes! This is her very guise;
    -and, upon my life, fast asleep. Observe her; stand close.
    -
    - -Doctor -
    -How came she by that light?
    -
    - -Gentlewoman -
    -Why, it stood by her: she has light by her
    -continually; 'tis her command.
    -
    - -Doctor -
    -You see, her eyes are open.
    -
    - -Gentlewoman -
    -Ay, but their sense is shut.
    -
    - -Doctor -
    -What is it she does now? Look, how she rubs her hands.
    -
    - -Gentlewoman -
    -It is an accustomed action with her, to seem thus
    -washing her hands: I have known her continue in
    -this a quarter of an hour.
    -
    - -LADY MACBETH -
    -Yet here's a spot.
    -
    - -Doctor -
    -Hark! she speaks: I will set down what comes from
    -her, to satisfy my remembrance the more strongly.
    -
    - -LADY MACBETH -
    -Out, damned spot! out, I say!--One: two: why,
    -then, 'tis time to do't.--Hell is murky!--Fie, my
    -lord, fie! a soldier, and afeard? What need we
    -fear who knows it, when none can call our power to
    -account?--Yet who would have thought the old man
    -to have had so much blood in him.
    -
    - -Doctor -
    -Do you mark that?
    -
    - -LADY MACBETH -
    -The thane of Fife had a wife: where is she now?--
    -What, will these hands ne'er be clean?--No more o'
    -that, my lord, no more o' that: you mar all with
    -this starting.
    -
    - -Doctor -
    -Go to, go to; you have known what you should not.
    -
    - -Gentlewoman -
    -She has spoke what she should not, I am sure of
    -that: heaven knows what she has known.
    -
    - -LADY MACBETH -
    -Here's the smell of the blood still: all the
    -perfumes of Arabia will not sweeten this little
    -hand. Oh, oh, oh!
    -
    - -Doctor -
    -What a sigh is there! The heart is sorely charged.
    -
    - -Gentlewoman -
    -I would not have such a heart in my bosom for the
    -dignity of the whole body.
    -
    - -Doctor -
    -Well, well, well,--
    -
    - -Gentlewoman -
    -Pray God it be, sir.
    -
    - -Doctor -
    -This disease is beyond my practise: yet I have known
    -those which have walked in their sleep who have died
    -holily in their beds.
    -
    - -LADY MACBETH -
    -Wash your hands, put on your nightgown; look not so
    -pale.--I tell you yet again, Banquo's buried; he
    -cannot come out on's grave.
    -
    - -Doctor -
    -Even so?
    -
    - -LADY MACBETH -
    -To bed, to bed! there's knocking at the gate:
    -come, come, come, come, give me your hand. What's
    -done cannot be undone.--To bed, to bed, to bed!
    -

    Exit

    -
    - -Doctor -
    -Will she go now to bed?
    -
    - -Gentlewoman -
    -Directly.
    -
    - -Doctor -
    -Foul whisperings are abroad: unnatural deeds
    -Do breed unnatural troubles: infected minds
    -To their deaf pillows will discharge their secrets:
    -More needs she the divine than the physician.
    -God, God forgive us all! Look after her;
    -Remove from her the means of all annoyance,
    -And still keep eyes upon her. So, good night:
    -My mind she has mated, and amazed my sight.
    -I think, but dare not speak.
    -
    - -Gentlewoman -
    -Good night, good doctor.
    -

    Exeunt

    -
    -

    SCENE II. The country near Dunsinane.

    -

    -Drum and colours. Enter MENTEITH, CAITHNESS, ANGUS, LENNOX, and Soldiers -
    - -MENTEITH -
    -The English power is near, led on by Malcolm,
    -His uncle Siward and the good Macduff:
    -Revenges burn in them; for their dear causes
    -Would to the bleeding and the grim alarm
    -Excite the mortified man.
    -
    - -ANGUS -
    -Near Birnam wood
    -Shall we well meet them; that way are they coming.
    -
    - -CAITHNESS -
    -Who knows if Donalbain be with his brother?
    -
    - -LENNOX -
    -For certain, sir, he is not: I have a file
    -Of all the gentry: there is Siward's son,
    -And many unrough youths that even now
    -Protest their first of manhood.
    -
    - -MENTEITH -
    -What does the tyrant?
    -
    - -CAITHNESS -
    -Great Dunsinane he strongly fortifies:
    -Some say he's mad; others that lesser hate him
    -Do call it valiant fury: but, for certain,
    -He cannot buckle his distemper'd cause
    -Within the belt of rule.
    -
    - -ANGUS -
    -Now does he feel
    -His secret murders sticking on his hands;
    -Now minutely revolts upbraid his faith-breach;
    -Those he commands move only in command,
    -Nothing in love: now does he feel his title
    -Hang loose about him, like a giant's robe
    -Upon a dwarfish thief.
    -
    - -MENTEITH -
    -Who then shall blame
    -His pester'd senses to recoil and start,
    -When all that is within him does condemn
    -Itself for being there?
    -
    - -CAITHNESS -
    -Well, march we on,
    -To give obedience where 'tis truly owed:
    -Meet we the medicine of the sickly weal,
    -And with him pour we in our country's purge
    -Each drop of us.
    -
    - -LENNOX -
    - Or so much as it needs,
    -To dew the sovereign flower and drown the weeds.
    -Make we our march towards Birnam.
    -

    Exeunt, marching

    -
    -

    SCENE III. Dunsinane. A room in the castle.

    -

    -Enter MACBETH, Doctor, and Attendants -
    - -MACBETH -
    -Bring me no more reports; let them fly all:
    -Till Birnam wood remove to Dunsinane,
    -I cannot taint with fear. What's the boy Malcolm?
    -Was he not born of woman? The spirits that know
    -All mortal consequences have pronounced me thus:
    -'Fear not, Macbeth; no man that's born of woman
    -Shall e'er have power upon thee.' Then fly,
    -false thanes,
    -And mingle with the English epicures:
    -The mind I sway by and the heart I bear
    -Shall never sag with doubt nor shake with fear.
    -

    Enter a Servant

    -The devil damn thee black, thou cream-faced loon!
    -Where got'st thou that goose look?
    -
    - -Servant -
    -There is ten thousand--
    -
    - -MACBETH -
    -Geese, villain!
    -
    - -Servant -
    -Soldiers, sir.
    -
    - -MACBETH -
    -Go prick thy face, and over-red thy fear,
    -Thou lily-liver'd boy. What soldiers, patch?
    -Death of thy soul! those linen cheeks of thine
    -Are counsellors to fear. What soldiers, whey-face?
    -
    - -Servant -
    -The English force, so please you.
    -
    - -MACBETH -
    -Take thy face hence.
    -

    Exit Servant

    -Seyton!--I am sick at heart,
    -When I behold--Seyton, I say!--This push
    -Will cheer me ever, or disseat me now.
    -I have lived long enough: my way of life
    -Is fall'n into the sear, the yellow leaf;
    -And that which should accompany old age,
    -As honour, love, obedience, troops of friends,
    -I must not look to have; but, in their stead,
    -Curses, not loud but deep, mouth-honour, breath,
    -Which the poor heart would fain deny, and dare not. Seyton!
    -

    Enter SEYTON

    -
    - -SEYTON -
    -What is your gracious pleasure?
    -
    - -MACBETH -
    -What news more?
    -
    - -SEYTON -
    -All is confirm'd, my lord, which was reported.
    -
    - -MACBETH -
    -I'll fight till from my bones my flesh be hack'd.
    -Give me my armour.
    -
    - -SEYTON -
    -'Tis not needed yet.
    -
    - -MACBETH -
    -I'll put it on.
    -Send out more horses; skirr the country round;
    -Hang those that talk of fear. Give me mine armour.
    -How does your patient, doctor?
    -
    - -Doctor -
    -Not so sick, my lord,
    -As she is troubled with thick coming fancies,
    -That keep her from her rest.
    -
    - -MACBETH -
    -Cure her of that.
    -Canst thou not minister to a mind diseased,
    -Pluck from the memory a rooted sorrow,
    -Raze out the written troubles of the brain
    -And with some sweet oblivious antidote
    -Cleanse the stuff'd bosom of that perilous stuff
    -Which weighs upon the heart?
    -
    - -Doctor -
    -Therein the patient
    -Must minister to himself.
    -
    - -MACBETH -
    -Throw physic to the dogs; I'll none of it.
    -Come, put mine armour on; give me my staff.
    -Seyton, send out. Doctor, the thanes fly from me.
    -Come, sir, dispatch. If thou couldst, doctor, cast
    -The water of my land, find her disease,
    -And purge it to a sound and pristine health,
    -I would applaud thee to the very echo,
    -That should applaud again.--Pull't off, I say.--
    -What rhubarb, cyme, or what purgative drug,
    -Would scour these English hence? Hear'st thou of them?
    -
    - -Doctor -
    -Ay, my good lord; your royal preparation
    -Makes us hear something.
    -
    - -MACBETH -
    -Bring it after me.
    -I will not be afraid of death and bane,
    -Till Birnam forest come to Dunsinane.
    -
    - -Doctor -
    -[Aside] Were I from Dunsinane away and clear,
    -Profit again should hardly draw me here.
    -

    Exeunt

    -
    -

    SCENE IV. Country near Birnam wood.

    -

    -Drum and colours. Enter MALCOLM, SIWARD and YOUNG SIWARD, MACDUFF, MENTEITH, CAITHNESS, ANGUS, LENNOX, ROSS, and Soldiers, marching -
    - -MALCOLM -
    -Cousins, I hope the days are near at hand
    -That chambers will be safe.
    -
    - -MENTEITH -
    -We doubt it nothing.
    -
    - -SIWARD -
    -What wood is this before us?
    -
    - -MENTEITH -
    -The wood of Birnam.
    -
    - -MALCOLM -
    -Let every soldier hew him down a bough
    -And bear't before him: thereby shall we shadow
    -The numbers of our host and make discovery
    -Err in report of us.
    -
    - -Soldiers -
    -It shall be done.
    -
    - -SIWARD -
    -We learn no other but the confident tyrant
    -Keeps still in Dunsinane, and will endure
    -Our setting down before 't.
    -
    - -MALCOLM -
    -'Tis his main hope:
    -For where there is advantage to be given,
    -Both more and less have given him the revolt,
    -And none serve with him but constrained things
    -Whose hearts are absent too.
    -
    - -MACDUFF -
    -Let our just censures
    -Attend the true event, and put we on
    -Industrious soldiership.
    -
    - -SIWARD -
    -The time approaches
    -That will with due decision make us know
    -What we shall say we have and what we owe.
    -Thoughts speculative their unsure hopes relate,
    -But certain issue strokes must arbitrate:
    -Towards which advance the war.
    -

    Exeunt, marching

    -
    -

    SCENE V. Dunsinane. Within the castle.

    -

    -Enter MACBETH, SEYTON, and Soldiers, with drum and colours -
    - -MACBETH -
    -Hang out our banners on the outward walls;
    -The cry is still 'They come:' our castle's strength
    -Will laugh a siege to scorn: here let them lie
    -Till famine and the ague eat them up:
    -Were they not forced with those that should be ours,
    -We might have met them dareful, beard to beard,
    -And beat them backward home.
    -

    A cry of women within

    -What is that noise?
    -
    - -SEYTON -
    -It is the cry of women, my good lord.
    -

    Exit

    -
    - -MACBETH -
    -I have almost forgot the taste of fears;
    -The time has been, my senses would have cool'd
    -To hear a night-shriek; and my fell of hair
    -Would at a dismal treatise rouse and stir
    -As life were in't: I have supp'd full with horrors;
    -Direness, familiar to my slaughterous thoughts
    -Cannot once start me.
    -

    Re-enter SEYTON

    -Wherefore was that cry?
    -
    - -SEYTON -
    -The queen, my lord, is dead.
    -
    - -MACBETH -
    -She should have died hereafter;
    -There would have been a time for such a word.
    -To-morrow, and to-morrow, and to-morrow,
    -Creeps in this petty pace from day to day
    -To the last syllable of recorded time,
    -And all our yesterdays have lighted fools
    -The way to dusty death. Out, out, brief candle!
    -Life's but a walking shadow, a poor player
    -That struts and frets his hour upon the stage
    -And then is heard no more: it is a tale
    -Told by an idiot, full of sound and fury,
    -Signifying nothing.
    -

    Enter a Messenger

    -Thou comest to use thy tongue; thy story quickly.
    -
    - -Messenger -
    -Gracious my lord,
    -I should report that which I say I saw,
    -But know not how to do it.
    -
    - -MACBETH -
    -Well, say, sir.
    -
    - -Messenger -
    -As I did stand my watch upon the hill,
    -I look'd toward Birnam, and anon, methought,
    -The wood began to move.
    -
    - -MACBETH -
    -Liar and slave!
    -
    - -Messenger -
    -Let me endure your wrath, if't be not so:
    -Within this three mile may you see it coming;
    -I say, a moving grove.
    -
    - -MACBETH -
    -If thou speak'st false,
    -Upon the next tree shalt thou hang alive,
    -Till famine cling thee: if thy speech be sooth,
    -I care not if thou dost for me as much.
    -I pull in resolution, and begin
    -To doubt the equivocation of the fiend
    -That lies like truth: 'Fear not, till Birnam wood
    -Do come to Dunsinane:' and now a wood
    -Comes toward Dunsinane. Arm, arm, and out!
    -If this which he avouches does appear,
    -There is nor flying hence nor tarrying here.
    -I gin to be aweary of the sun,
    -And wish the estate o' the world were now undone.
    -Ring the alarum-bell! Blow, wind! come, wrack!
    -At least we'll die with harness on our back.
    -

    Exeunt

    -
    -

    SCENE VI. Dunsinane. Before the castle.

    -

    -Drum and colours. Enter MALCOLM, SIWARD, MACDUFF, and their Army, with boughs -
    - -MALCOLM -
    -Now near enough: your leafy screens throw down.
    -And show like those you are. You, worthy uncle,
    -Shall, with my cousin, your right-noble son,
    -Lead our first battle: worthy Macduff and we
    -Shall take upon 's what else remains to do,
    -According to our order.
    -
    - -SIWARD -
    -Fare you well.
    -Do we but find the tyrant's power to-night,
    -Let us be beaten, if we cannot fight.
    -
    - -MACDUFF -
    -Make all our trumpets speak; give them all breath,
    -Those clamorous harbingers of blood and death.
    -

    Exeunt

    -
    -

    SCENE VII. Another part of the field.

    -

    -Alarums. Enter MACBETH -
    - -MACBETH -
    -They have tied me to a stake; I cannot fly,
    -But, bear-like, I must fight the course. What's he
    -That was not born of woman? Such a one
    -Am I to fear, or none.
    -

    Enter YOUNG SIWARD

    -
    - -YOUNG SIWARD -
    -What is thy name?
    -
    - -MACBETH -
    - Thou'lt be afraid to hear it.
    -
    - -YOUNG SIWARD -
    -No; though thou call'st thyself a hotter name
    -Than any is in hell.
    -
    - -MACBETH -
    -My name's Macbeth.
    -
    - -YOUNG SIWARD -
    -The devil himself could not pronounce a title
    -More hateful to mine ear.
    -
    - -MACBETH -
    -No, nor more fearful.
    -
    - -YOUNG SIWARD -
    -Thou liest, abhorred tyrant; with my sword
    -I'll prove the lie thou speak'st.
    -

    They fight and YOUNG SIWARD is slain

    -
    - -MACBETH -
    -Thou wast born of woman
    -But swords I smile at, weapons laugh to scorn,
    -Brandish'd by man that's of a woman born.
    -

    Exit

    -

    Alarums. Enter MACDUFF

    -
    - -MACDUFF -
    -That way the noise is. Tyrant, show thy face!
    -If thou be'st slain and with no stroke of mine,
    -My wife and children's ghosts will haunt me still.
    -I cannot strike at wretched kerns, whose arms
    -Are hired to bear their staves: either thou, Macbeth,
    -Or else my sword with an unbatter'd edge
    -I sheathe again undeeded. There thou shouldst be;
    -By this great clatter, one of greatest note
    -Seems bruited. Let me find him, fortune!
    -And more I beg not.
    -

    Exit. Alarums

    -

    Enter MALCOLM and SIWARD

    -
    - -SIWARD -
    -This way, my lord; the castle's gently render'd:
    -The tyrant's people on both sides do fight;
    -The noble thanes do bravely in the war;
    -The day almost itself professes yours,
    -And little is to do.
    -
    - -MALCOLM -
    -We have met with foes
    -That strike beside us.
    -
    - -SIWARD -
    -Enter, sir, the castle.
    -

    Exeunt. Alarums

    -
    -

    SCENE VIII. Another part of the field.

    -

    -Enter MACBETH -
    - -MACBETH -
    -Why should I play the Roman fool, and die
    -On mine own sword? whiles I see lives, the gashes
    -Do better upon them.
    -

    Enter MACDUFF

    -
    - -MACDUFF -
    -Turn, hell-hound, turn!
    -
    - -MACBETH -
    -Of all men else I have avoided thee:
    -But get thee back; my soul is too much charged
    -With blood of thine already.
    -
    - -MACDUFF -
    -I have no words:
    -My voice is in my sword: thou bloodier villain
    -Than terms can give thee out!
    -

    They fight

    -
    - -MACBETH -
    -Thou losest labour:
    -As easy mayst thou the intrenchant air
    -With thy keen sword impress as make me bleed:
    -Let fall thy blade on vulnerable crests;
    -I bear a charmed life, which must not yield,
    -To one of woman born.
    -
    - -MACDUFF -
    -Despair thy charm;
    -And let the angel whom thou still hast served
    -Tell thee, Macduff was from his mother's womb
    -Untimely ripp'd.
    -
    - -MACBETH -
    -Accursed be that tongue that tells me so,
    -For it hath cow'd my better part of man!
    -And be these juggling fiends no more believed,
    -That palter with us in a double sense;
    -That keep the word of promise to our ear,
    -And break it to our hope. I'll not fight with thee.
    -
    - -MACDUFF -
    -Then yield thee, coward,
    -And live to be the show and gaze o' the time:
    -We'll have thee, as our rarer monsters are,
    -Painted on a pole, and underwrit,
    -'Here may you see the tyrant.'
    -
    - -MACBETH -
    -I will not yield,
    -To kiss the ground before young Malcolm's feet,
    -And to be baited with the rabble's curse.
    -Though Birnam wood be come to Dunsinane,
    -And thou opposed, being of no woman born,
    -Yet I will try the last. Before my body
    -I throw my warlike shield. Lay on, Macduff,
    -And damn'd be him that first cries, 'Hold, enough!'
    -

    Exeunt, fighting. Alarums

    -

    Retreat. Flourish. Enter, with drum and colours, MALCOLM, SIWARD, ROSS, the other Thanes, and Soldiers

    -
    - -MALCOLM -
    -I would the friends we miss were safe arrived.
    -
    - -SIWARD -
    -Some must go off: and yet, by these I see,
    -So great a day as this is cheaply bought.
    -
    - -MALCOLM -
    -Macduff is missing, and your noble son.
    -
    - -ROSS -
    -Your son, my lord, has paid a soldier's debt:
    -He only lived but till he was a man;
    -The which no sooner had his prowess confirm'd
    -In the unshrinking station where he fought,
    -But like a man he died.
    -
    - -SIWARD -
    -Then he is dead?
    -
    - -ROSS -
    -Ay, and brought off the field: your cause of sorrow
    -Must not be measured by his worth, for then
    -It hath no end.
    -
    - -SIWARD -
    - Had he his hurts before?
    -
    - -ROSS -
    -Ay, on the front.
    -
    - -SIWARD -
    - Why then, God's soldier be he!
    -Had I as many sons as I have hairs,
    -I would not wish them to a fairer death:
    -And so, his knell is knoll'd.
    -
    - -MALCOLM -
    -He's worth more sorrow,
    -And that I'll spend for him.
    -
    - -SIWARD -
    -He's worth no more
    -They say he parted well, and paid his score:
    -And so, God be with him! Here comes newer comfort.
    -

    Re-enter MACDUFF, with MACBETH's head

    -
    - -MACDUFF -
    -Hail, king! for so thou art: behold, where stands
    -The usurper's cursed head: the time is free:
    -I see thee compass'd with thy kingdom's pearl,
    -That speak my salutation in their minds;
    -Whose voices I desire aloud with mine:
    -Hail, King of Scotland!
    -
    - -ALL -
    -Hail, King of Scotland!
    -

    Flourish

    -
    - -MALCOLM -
    -We shall not spend a large expense of time
    -Before we reckon with your several loves,
    -And make us even with you. My thanes and kinsmen,
    -Henceforth be earls, the first that ever Scotland
    -In such an honour named. What's more to do,
    -Which would be planted newly with the time,
    -As calling home our exiled friends abroad
    -That fled the snares of watchful tyranny;
    -Producing forth the cruel ministers
    -Of this dead butcher and his fiend-like queen,
    -Who, as 'tis thought, by self and violent hands
    -Took off her life; this, and what needful else
    -That calls upon us, by the grace of Grace,
    -We will perform in measure, time and place:
    -So, thanks to all at once and to each one,
    -Whom we invite to see us crown'd at Scone.
    -

    Flourish. Exeunt

    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/map.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/map.png deleted file mode 100644 index 763f5627995f6f178e8ea78e37f32c80b35f5e2b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26209 zcmW(+WmH?;5)HvpG-%NhT#CCC2$bRu#ob!mrMMF)?(SOLiaW)vxI>Xr+}&QjH!Joh zcinT&T{C<3-V?5@D20hef(8HpFlD4AQ~>}48~ATu5D@+ulh{52|9ayft?di|uu}i` zM(`*Sbprq_@MI*!)IFAuJKQsAHC^d_Cptb~UmPw7gzd|W5X(ToM%_q=H@K0G6E}hZ zwnvS(O+U}8W|j}Tt7>Z<0g)VZ)KLH6U>aqpf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GhJs6ncJ;eKml|PcrAeb7Vt31P9-EZBqXiYWg()- z=7~7DeY*NL?8;Qbc6j7w;+lUHZ`lzOTCRo0RhclcW%>XfqD;kXjBJrB4d(YnN;Yv= zxYa}^#IT|`pMeae`o9dNuqr?iWltJ~_xQI{+H|rg-IzJHjnUwW>x+(wiA8aE1ju)i|6|(qm^L&FrX6HX>rRg3GrT`;gs( - - Map test page - - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/markerTransparent.png b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/markerTransparent.png deleted file mode 100644 index ed4e5e7f4d63fe103983cf3bfa53733a0089ba51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmV+f0sH=mP)6Xw+2uq_(M`6dHE24R1_~SA2W)sEi((o#t%gC<}F#-mygTf~{1syRj83 z$v~+4?^7VUur4s{YzK(ScPqf9AN{Mq%K}&hLakp1D8YW - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html deleted file mode 100644 index 9d9c2f0c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/meta-redirect.html +++ /dev/null @@ -1,11 +0,0 @@ - - - Some test page - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html deleted file mode 100644 index 61677527..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/missedJsReference.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Example page - - -

    This page contains a nested iframe. Execute some JS to locate a reference to an element in this - frame and return it. You should need to switch to that frame in order to use that element.

    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html deleted file mode 100644 index 4eff01ac..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_1.html +++ /dev/null @@ -1,21 +0,0 @@ - - -First Modal - - - - -

    Modal dialog sample

    - - - -lnk2 -
    - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html deleted file mode 100644 index cec3f3f1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_2.html +++ /dev/null @@ -1,21 +0,0 @@ - - -Second Modal - - - - -

    Modal dialog sample

    - - - -lnk3 -
    - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html deleted file mode 100644 index 6c5eb723..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html +++ /dev/null @@ -1,15 +0,0 @@ - - -Third Modal - - - - -

    Modal dialog sample

    - - -
    - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html deleted file mode 100644 index 0a1c4c94..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modalindex.html +++ /dev/null @@ -1,21 +0,0 @@ - - -Main window - - - - -

    Modal dialog sample

    - - - -lnk1 -
    - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html deleted file mode 100644 index d4751bfd..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mouseOver.html +++ /dev/null @@ -1,17 +0,0 @@ - - -
    -
    -
    - -
    diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html deleted file mode 100644 index 39a31cda..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/mousePositionTracker.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - Div tracking mouse position. -
    -
    - Move mouse here. -
    -

    -0, 0 -

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html deleted file mode 100644 index 88eda51f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/nestedElements.html +++ /dev/null @@ -1,164 +0,0 @@ - - -

    outside

    -

    outside

    -
    -

    inside

    -
    -
    -

    space

    -

    css escapes

    -
    -
    -

    second copy for testing plural findElements

    -

    second copy

    -
    - - - Here's a checkbox:
    - - - -
    - Here's a checkbox:
    - - -
    - -hello world - - - - - - -
    - Here's a checkbox:
    - -
    - -
    - Here's a checkbox:
    - - -
    - -hello world - - - - - - -
    - Here's a checkbox:
    - -
    - -
    - Here's a checkbox:
    - - -
    - -hello world - - - - - - -
    - Here's a checkbox:
    - -
    - -
    - Here's a checkbox:
    - - -
    - -hello world - - -Span with class of one -
    - Find me - Also me - But not me -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html deleted file mode 100644 index 2d2264ce..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow-body.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - The Visibility of Everyday Things - - - -

    This image is copyright Simon Stewart and donated to the Selenium project for use in its test suites. -

    -a nice beach - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html deleted file mode 100644 index cf8a6471..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_auto.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html deleted file mode 100644 index 96fd750a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_hidden.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html deleted file mode 100644 index 6f1d90b6..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_auto_y_scroll.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html deleted file mode 100644 index 24dd1928..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_auto.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html deleted file mode 100644 index cae56657..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_hidden.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html deleted file mode 100644 index d4ffa397..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_hidden_y_scroll.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html deleted file mode 100644 index d425a2a8..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_auto.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html deleted file mode 100644 index 4a6ff595..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_hidden.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html deleted file mode 100644 index efa80742..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/overflow/x_scroll_y_scroll.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Page with overflow - - - -
    - -
    - Right clicked:
    - Bottom clicked:
    - Bottom-right clicked:
    -
    - - Click bottom -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html deleted file mode 100644 index cb59707e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnBeforeUnloadMessage.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Page with OnBeforeUnload handler - - -

    Page with onbeforeunload event handler. Click here to navigate to another page.

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html deleted file mode 100644 index 2c644ff9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnLoad.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -

    Page with onload event handler

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html deleted file mode 100644 index 6070341e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/pageWithOnUnload.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -

    Page with onunload event handler

    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html deleted file mode 100644 index ea94f8ec..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/page_with_link_to_slow_loading_page.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -load a slow page - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt deleted file mode 100644 index 8318c86b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/plain.txt +++ /dev/null @@ -1 +0,0 @@ -Test \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html deleted file mode 100644 index 1810f1cd..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page1.html +++ /dev/null @@ -1,20 +0,0 @@ - - - -Page 1 -

    The next query param must be the URL for the next page to -link to. - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html deleted file mode 100644 index d826f174..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page2.html +++ /dev/null @@ -1,24 +0,0 @@ - - - -Page 2 -This page is a middle man for referrer tests. -This page will include a link to a "next" page if the next query -parameter, or the document.referrer is set. -

    - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html deleted file mode 100644 index 27048f72..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/proxy/page3.html +++ /dev/null @@ -1,5 +0,0 @@ - - - -Page 3 -

    diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html deleted file mode 100644 index 8f257fdc..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/readOnlyPage.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - -

    This

    is a

    contentEditable area

    - -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html deleted file mode 100644 index 8ba23398..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rectangles.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Rectangles - - - -
    r1
    -
    r2
    -
    r3
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html deleted file mode 100644 index 94f3e246..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/resultPage.html +++ /dev/null @@ -1,25 +0,0 @@ - - - We Arrive Here - - - -

    Success!

    - -
    -

    List of stuff

    -
      -
    1. Item 1
    2. -
    3. Item 2
    4. -
    -
    -
    -

    Almost empty

    -
    - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html deleted file mode 100644 index a42e43aa..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/rich_text.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -
    -
    -
    - - - - - -
    -
    IFRAME
    - -
    -
    frame.contentWindow.document.designMode: on
    frame.contentWindow.document.body.contentEditable: false
    -
    -
    DIV
    -
    -
    -
    -
    div.ownerDocument.designMode: off
    div.ownerDocument.body.contentEditable: false
    div.contentEditable: true
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    type:[]
    tagName:[]
    id:[]
    keyIdentifier:[]
    keyLocation:[]
    keyCode:[]
    charCode:[]
    which:[]
    isTrusted:[]
    ---------------------
    Modifiers
    alt:[]
    ctrl:[]
    shift:[]
    meta:[]
    -
    - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html deleted file mode 100644 index 8a059255..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/safari/frames_benchmark.html +++ /dev/null @@ -1,31 +0,0 @@ - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css deleted file mode 100644 index 81526185..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.css +++ /dev/null @@ -1,19 +0,0 @@ -* { - margin: 0; -} -html, body, #output { - width: 100%; - height: 100%; -} -table { - border: 0px; - border-collapse: collapse; - border-spacing: 0px; - display: table; -} -table td { - padding: 0px; -} -.cell { - color: black; -} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html deleted file mode 100644 index 166665da..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js deleted file mode 100644 index 1d168598..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen.js +++ /dev/null @@ -1,7 +0,0 @@ -function toColor(num) { - num >>>= 0; - var b = num & 0xFF, - g = (num & 0xFF00) >>> 8, - r = (num & 0xFF0000) >>> 16; - return "rgb(" + [r, g, b].join(",") + ")"; -} \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html deleted file mode 100644 index 35b03ae1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame1.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen frame1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html deleted file mode 100644 index e6e17e63..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frame2.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen frame2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html deleted file mode 100644 index 46852dcf..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_frames.html +++ /dev/null @@ -1,11 +0,0 @@ - - - screen test - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html deleted file mode 100644 index ae3ea1e2..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_iframes.html +++ /dev/null @@ -1,12 +0,0 @@ - - -Screen test - - -
    - - - -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html deleted file mode 100644 index 4d00f027..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_too_long.html +++ /dev/null @@ -1,68 +0,0 @@ - - -screen test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html deleted file mode 100644 index 1a6a1002..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_long.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html deleted file mode 100644 index 3fee005d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_x_too_long.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html deleted file mode 100644 index 31733e07..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_long.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html deleted file mode 100644 index dbef9361..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/screen/screen_y_too_long.html +++ /dev/null @@ -1,72 +0,0 @@ - - -screen test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
         
         
         
         
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html deleted file mode 100644 index cd5214f1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - -
    -
      -
    • line1
    • -
    • line2
    • -
    • line3
    • -
    • line4
    • -
    • line5
    • -
    • line6
    • -
    • line7
    • -
    • line8
    • -
    • line9
    • -
    -
    -Clicked: -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html deleted file mode 100644 index 0ea66d37..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll2.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -
      -
    • -
    • -
    • Text
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html deleted file mode 100644 index 1aa17092..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll3.html +++ /dev/null @@ -1,8 +0,0 @@ - - -



























































































































































    - -



    - -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 -
























































































































































    \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html deleted file mode 100644 index 652a778e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll4.html +++ /dev/null @@ -1,7 +0,0 @@ - - -


































































































    - -


































































































    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html deleted file mode 100644 index b345a8c3..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scroll5.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - -
    -
    -
    -
    -
    -Clicked: -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html deleted file mode 100644 index 3eb3bf47..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_200.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Child frame - - -

    This is a scrolling frame test

    -
    - - - - - - - - - - - - - -
    First row
    Second row
    Third row
    Fourth row
    -
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html deleted file mode 100644 index 61ffe85d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_height_above_2000.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Child frame - - -

    This is a tall frame test

    -
    - - - - - - - - - - - - - -
    First row
    Second row
    Third row
    Fourth row
    -
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html deleted file mode 100644 index 15301386..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome Page - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html deleted file mode 100644 index 5781aeb9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Welcome Page - - -
    Placeholder
    -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html deleted file mode 100644 index 047de0f1..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/frame_with_small_height.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Child frame - - -

    This is a non-scrolling frame test

    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html deleted file mode 100644 index 01b7c305..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - Page with overflow: auto - - - -
    Placeholder
    -
    - Click me! -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html deleted file mode 100644 index c536e41d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Welcome Page - - -
    Placeholder
    -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html deleted file mode 100644 index e5b76022..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome Page - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html deleted file mode 100644 index f79f7c84..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Welcome Page - - -
    Placeholder
    -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html deleted file mode 100644 index 0a493fa5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome Page - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html deleted file mode 100644 index ca5f7151..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_partially_hidden_element.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Page with partially hidden element - - -
    -
    Placeholder
    -
    - -
    -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html deleted file mode 100644 index cb5d53a4..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome Page - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html deleted file mode 100644 index 5df1115c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Welcome Page - - -
    Placeholder
    -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html deleted file mode 100644 index b7cfaf5a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_tall_frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Welcome Page - - -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html deleted file mode 100644 index b5716e73..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Page with overflow: auto - - -
    -
    Placeholder
    -
    - Click me! -
    -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html deleted file mode 100644 index 0457a822..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/scrolling_tests/target_page.html +++ /dev/null @@ -1,9 +0,0 @@ - - - -Clicked Successfully! - - -

    Clicked Successfully!

    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html deleted file mode 100644 index 4028414c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectPage.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - -Multiple Selection test page - - - - - - - - - - - - - - - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html deleted file mode 100644 index 190b2ada..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/selectableItems.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - jQuery UI Selectable - Default functionality - - - - - - - - -
    - -
      -
    1. Item 1
    2. -
    3. Item 2
    4. -
    5. Item 3
    6. -
    7. Item 4
    8. -
    9. Item 5
    10. -
    11. Item 6
    12. -
    13. Item 7
    14. -
    - -
    - -
    - -

    Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections.

    - - - -
    -

    no info

    -
    - - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html deleted file mode 100644 index 0ada24ed..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookie.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html deleted file mode 100644 index f5e2ef2e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/sessionCookieDest.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Session cookie destination - - - -This is the cookie destination page. - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml deleted file mode 100644 index 01f4c87c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simple.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - baz - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html deleted file mode 100644 index 38210b9d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/simpleTest.html +++ /dev/null @@ -1,98 +0,0 @@ - - - Hello WebDriver - - -

    Heading

    - -

    A single line of text

    - - -
    -

    A div containing

    - More than one line of text
    - -
    and block level elements
    -
    - -An inline element - -

    This line has lots - - of spaces. -

    - -

    This line has a non-breaking space

    - -

    This line has a   non-breaking space and spaces

    - -

    These lines  
      have leading and trailing NBSPs  

    - -

    This line has text within elements that are meant to be displayed - inline

    - -
    -

    before pre

    -
       This section has a preformatted
    -    text block    
    -  split in four lines
    -         
    -

    after pre

    -
    - -

    Some text

    Some more text

    - -
    Cheese

    Some text

    Some more text

    and also

    Brie
    - -
    Hello, world
    - -
    - -
    - -
    -

    - - -

    -
    - - - - - -
    Top level
    -
    -
    Nested
    -
    - - - - - -
    beforeSpace afterSpace
    - - - - - -a link to an icon - -{a="b", c=1, d=true} -{a="\\b\\\"'\'"} - -            ​‌‍  ⁠ test            ​‌‍  ⁠  - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html deleted file mode 100644 index 9f583005..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/single_text_input.html +++ /dev/null @@ -1,12 +0,0 @@ - - - BasicKeyboardInterfaceTest - - -
    - -
    - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html deleted file mode 100644 index a6216e37..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingAlert.html +++ /dev/null @@ -1,10 +0,0 @@ - - - -slowLoadingAlert - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html deleted file mode 100644 index 02796c34..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slowLoadingResourcePage.html +++ /dev/null @@ -1,12 +0,0 @@ - - - This page loads something slowly - - -

    Simulate the situation where a web-bug or analytics script takes waaay - too long to respond. Normally these things are loaded in an iframe, which is - what we're doing here.

    - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html deleted file mode 100644 index d007248e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/slow_loading_iframes.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Page with slow loading iFrames - - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html deleted file mode 100644 index 30810f09..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/styledPage.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - Styled Page - - - - -
    - -
    - - -
    - -
    - -
    Content
    - - - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml deleted file mode 100644 index bf060fde..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgPiechart.xhtml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Pie Chart Test - - - -
    - Some text for the chart. -
    -
    Nothing.
    -
    - - - - - Test Chart - - - Apple - - Orange - - Banana - - Orange - - - - - - - - Example RotateScale - Rotate and scale transforms - - - - - - - - - - - - - - ABC (rotate) - - - - - - - - - - - - ABC (scale) - - - - -
    WOrange
    -
    -
    WOrange
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg deleted file mode 100644 index c6cc2839..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/svgTest.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html deleted file mode 100644 index a2bc957b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tables.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - Here be tables - - - - - - - - - -
    HelloWorld(Cheese!)
    - - - - - -
    some text -
    some more text
    -
    - - - - - - - - - -
    Heading
    Data 1Data 2
    - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html deleted file mode 100644 index 067b66cd..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/tinymce.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - TinyMCE - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml deleted file mode 100644 index 0b7e7fd5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - ]> - - -

    Click the button.

    - - Go to another page - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl deleted file mode 100644 index 53db9fde..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transformable.xsl +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -
    - - - - - -
    - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html deleted file mode 100644 index 87b02bfb..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/transparentUpload.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - Upload Form - - - - -
    -
    -
    - Upload - -
    -
    -
    - - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html deleted file mode 100644 index 904a4441..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/underscore.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html deleted file mode 100644 index 245acc74..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/unicode_ltr.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -
    ‎Some notes‎
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html deleted file mode 100644 index aca398ab..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/upload.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - Upload Form - - - -
    -
    - Enter a file to upload: -
    -
    -
    - - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html deleted file mode 100644 index 2453e692..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/userDefinedProperty.html +++ /dev/null @@ -1,8 +0,0 @@ - - -
    - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html deleted file mode 100644 index 54a2aba4..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/veryLargeCanvas.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - Rectangles - - - - -
    -
    First Target
    -
    Second Target
    -
    Third Target
    -
    Fourth Target
    -
    Not a Target
    -
    Not a Target
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html deleted file mode 100644 index 80cc649c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/visibility-css.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -Visibility test via CSS - -
    -

    Hello world. I like cheese.

    -
    - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html deleted file mode 100644 index 108b80f8..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/win32frameset.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html deleted file mode 100644 index b94733b5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/page_with_frame.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - Test page for WindowSwitchingTest.testShouldFocusOnTheTopMostFrameAfterSwitchingToAWindow - - -

    Open new window

    -
    - -
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html deleted file mode 100644 index 52c163cb..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/window_switching_tests/simple_page.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Simple Page - - -
    Simple page with simple test.
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml deleted file mode 100644 index aca53d34..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlFormPage.xhtml +++ /dev/null @@ -1,17 +0,0 @@ - - - - XHTML - - - -
    - - -
    - -

    Here is some content that should not be in the previous p tag - - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html b/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html deleted file mode 100644 index d2f3a5da..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/data/xhtmlTest.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - XHTML Test Page - - -

    - - - -
    -

    XHTML Might Be The Future

    - -

    If you'd like to go elsewhere then click me.

    - -

    Alternatively, this goes to the same place.

    - -
    - -
    - - This link has the same text as another link: click me. -
    - -
    Another div starts here.

    -

    An H2 title

    -

    Some more text

    -
    - -
    - Foo -
      - -
    - -
    -
    -
    - - -
    -
    -
    - - I have width -
    -
    -
    -
    - - -

    -

    -
    Link=equalssign - -

    Spaced out

    - - -
    first_div
    -
    second_div
    - first_span - second_span -
    - -
    I'm a parent -
    I'm a child
    -
    - -
    Woo woo
    - - diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js deleted file mode 100644 index 8194778e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/fileserver.js +++ /dev/null @@ -1,321 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fs = require('fs'), - http = require('http'), - path = require('path'), - url = require('url'); - -var express = require('express'); -var multer = require('multer'); -var serveIndex = require('serve-index'); - -var Server = require('./httpserver').Server, - resources = require('./resources'), - isDevMode = require('../devmode'); - -var WEB_ROOT = '/common'; -var JS_ROOT = '/javascript'; - -var baseDirectory = resources.locate(isDevMode ? 'common/src/web' : '.'); -var jsDirectory = resources.locate(isDevMode ? 'javascript' : '..'); - -var Pages = (function() { - var pages = {}; - function addPage(page, path) { - pages.__defineGetter__(page, function() { - return exports.whereIs(path); - }); - } - - addPage('ajaxyPage', 'ajaxy_page.html'); - addPage('alertsPage', 'alerts.html'); - addPage('bodyTypingPage', 'bodyTypingTest.html'); - addPage('booleanAttributes', 'booleanAttributes.html'); - addPage('childPage', 'child/childPage.html'); - addPage('chinesePage', 'cn-test.html'); - addPage('clickJacker', 'click_jacker.html'); - addPage('clickEventPage', 'clickEventPage.html'); - addPage('clicksPage', 'clicks.html'); - addPage('colorPage', 'colorPage.html'); - addPage('deletingFrame', 'deletingFrame.htm'); - addPage('draggableLists', 'draggableLists.html'); - addPage('dragAndDropPage', 'dragAndDropTest.html'); - addPage('droppableItems', 'droppableItems.html'); - addPage('documentWrite', 'document_write_in_onload.html'); - addPage('dynamicallyModifiedPage', 'dynamicallyModifiedPage.html'); - addPage('dynamicPage', 'dynamic.html'); - addPage('echoPage', 'echo'); - addPage('errorsPage', 'errors.html'); - addPage('xhtmlFormPage', 'xhtmlFormPage.xhtml'); - addPage('formPage', 'formPage.html'); - addPage('formSelectionPage', 'formSelectionPage.html'); - addPage('framesetPage', 'frameset.html'); - addPage('grandchildPage', 'child/grandchild/grandchildPage.html'); - addPage('html5Page', 'html5Page.html'); - addPage('html5OfflinePage', 'html5/offline.html'); - addPage('iframePage', 'iframes.html'); - addPage('javascriptEnhancedForm', 'javascriptEnhancedForm.html'); - addPage('javascriptPage', 'javascriptPage.html'); - addPage('linkedImage', 'linked_image.html'); - addPage('longContentPage', 'longContentPage.html'); - addPage('macbethPage', 'macbeth.html'); - addPage('mapVisibilityPage', 'map_visibility.html'); - addPage('metaRedirectPage', 'meta-redirect.html'); - addPage('missedJsReferencePage', 'missedJsReference.html'); - addPage('mouseTrackerPage', 'mousePositionTracker.html'); - addPage('nestedPage', 'nestedElements.html'); - addPage('readOnlyPage', 'readOnlyPage.html'); - addPage('rectanglesPage', 'rectangles.html'); - addPage('redirectPage', 'redirect'); - addPage('resultPage', 'resultPage.html'); - addPage('richTextPage', 'rich_text.html'); - addPage('selectableItemsPage', 'selectableItems.html'); - addPage('selectPage', 'selectPage.html'); - addPage('simpleTestPage', 'simpleTest.html'); - addPage('simpleXmlDocument', 'simple.xml'); - addPage('sleepingPage', 'sleep'); - addPage('slowIframes', 'slow_loading_iframes.html'); - addPage('slowLoadingAlertPage', 'slowLoadingAlert.html'); - addPage('svgPage', 'svgPiechart.xhtml'); - addPage('tables', 'tables.html'); - addPage('underscorePage', 'underscore.html'); - addPage('unicodeLtrPage', 'utf8/unicode_ltr.html'); - addPage('uploadPage', 'upload.html'); - addPage('veryLargeCanvas', 'veryLargeCanvas.html'); - addPage('xhtmlTestPage', 'xhtmlTest.html'); - - return pages; -})(); - - -var Path = { - BASIC_AUTH: WEB_ROOT + '/basicAuth', - ECHO: WEB_ROOT + '/echo', - GENERATED: WEB_ROOT + '/generated', - MANIFEST: WEB_ROOT + '/manifest', - REDIRECT: WEB_ROOT + '/redirect', - PAGE: WEB_ROOT + '/page', - SLEEP: WEB_ROOT + '/sleep', - UPLOAD: WEB_ROOT + '/upload' -}; - -var app = express(); - -app.get('/', sendIndex) -.get('/favicon.ico', function(req, res) { - res.writeHead(204); - res.end(); -}) -.use(JS_ROOT, serveIndex(jsDirectory), express.static(jsDirectory)) -.post(Path.UPLOAD, handleUpload) -.use(WEB_ROOT, serveIndex(baseDirectory), express.static(baseDirectory)) -.get(Path.ECHO, sendEcho) -.get(Path.PAGE, sendInifinitePage) -.get(Path.PAGE + '/*', sendInifinitePage) -.get(Path.REDIRECT, redirectToResultPage) -.get(Path.SLEEP, sendDelayedResponse) - -if (isDevMode) { - var closureDir = resources.locate('third_party/closure/goog'); - app.use('/third_party/closure/goog', - serveIndex(closureDir), express.static(closureDir)); -} -var server = new Server(app); - - -function redirectToResultPage(_, response) { - response.writeHead(303, { - Location: Pages.resultPage - }); - return response.end(); -} - - -function sendInifinitePage(request, response) { - var pathname = url.parse(request.url).pathname; - var lastIndex = pathname.lastIndexOf('/'); - var pageNumber = - (lastIndex == -1 ? 'Unknown' : pathname.substring(lastIndex + 1)); - var body = [ - '', - 'Page', pageNumber, '', - 'Page number ', pageNumber, '', - '

    top' - ].join(''); - response.writeHead(200, { - 'Content-Length': Buffer.byteLength(body, 'utf8'), - 'Content-Type': 'text/html; charset=utf-8' - }); - response.end(body); -} - - -function sendDelayedResponse(request, response) { - var duration = 0; - var query = url.parse(request.url).query || ''; - var match = query.match(/\btime=(\d+)/); - if (match) { - duration = parseInt(match[1], 10); - } - - setTimeout(function() { - var body = [ - '', - 'Done', - 'Slept for ', duration, 's' - ].join(''); - response.writeHead(200, { - 'Content-Length': Buffer.byteLength(body, 'utf8'), - 'Content-Type': 'text/html; charset=utf-8', - 'Cache-Control': 'no-cache', - 'Pragma': 'no-cache', - 'Expires': 0 - }); - response.end(body); - }, duration * 1000); -} - - -function handleUpload(request, response) { - let upload = multer({storage: multer.memoryStorage()}).any(); - upload(request, response, function(err) { - if (err) { - response.writeHead(500); - response.end(err + ''); - } else { - response.writeHead(200); - response.write(request.files[0].buffer); - response.end(''); - } - }); -} - - -function sendEcho(request, response) { - var body = [ - '', - 'Echo', - '

    ', - request.method, ' ', request.url, ' ', 'HTTP/', request.httpVersion, - '
    ' - ]; - for (var name in request.headers) { - body.push('
    ', - name, ': ', request.headers[name], '
    '); - } - body = body.join(''); - response.writeHead(200, { - 'Content-Length': Buffer.byteLength(body, 'utf8'), - 'Content-Type': 'text/html; charset=utf-8' - }); - response.end(body); -} - - -/** - * Responds to a request for the file server's main index. - * @param {!http.ServerRequest} request The request object. - * @param {!http.ServerResponse} response The response object. - */ -function sendIndex(request, response) { - var pathname = url.parse(request.url).pathname; - - var host = request.headers.host; - if (!host) { - host = server.host(); - } - - var requestUrl = ['http://' + host + pathname].join(''); - - function createListEntry(path) { - var url = requestUrl + path; - return ['
  • ', path, ''].join(''); - } - - var data = ['

    /


      ', - createListEntry('common')]; - if (isDevMode) { - data.push(createListEntry('javascript')); - } - data.push('
    '); - data = data.join(''); - - response.writeHead(200, { - 'Content-Type': 'text/html; charset=UTF-8', - 'Content-Length': Buffer.byteLength(data, 'utf8') - }); - response.end(data); -} - - -// PUBLIC application - - -/** - * Starts the server on the specified port. - * @param {number=} opt_port The port to use, or 0 for any free port. - * @return {!Promise} A promise that will resolve - * with the server host when it has fully started. - */ -exports.start = server.start.bind(server); - - -/** - * Stops the server. - * @return {!Promise} A promise that will resolve when the - * server has closed all connections. - */ -exports.stop = server.stop.bind(server); - - -/** - * Formats a URL for this server. - * @param {string=} opt_pathname The desired pathname on the server. - * @return {string} The formatted URL. - * @throws {Error} If the server is not running. - */ -exports.url = server.url.bind(server); - - -/** - * Builds the URL for a file in the //common/src/web directory of the - * Selenium client. - * @param {string} filePath A path relative to //common/src/web to compute a - * URL for. - * @return {string} The formatted URL. - * @throws {Error} If the server is not running. - */ -exports.whereIs = function(filePath) { - filePath = filePath.replace(/\\/g, '/'); - if (!filePath.startsWith('/')) { - filePath = '/' + filePath; - } - return server.url(WEB_ROOT + filePath); -}; - - -exports.Pages = Pages; - - -if (require.main === module) { - server.start(2310).then(function() { - console.log('Server running at ' + server.url()); - }); -} diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js deleted file mode 100644 index f7847f73..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/httpserver.js +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - http = require('http'), - url = require('url'); - -var net = require('../../net'), - portprober = require('../../net/portprober'), - promise = require('../..').promise; - - - -/** - * Encapsulates a simple HTTP server for testing. The {@code onrequest} - * function should be overridden to define request handling behavior. - * @param {function(!http.ServerRequest, !http.ServerResponse)} requestHandler - * The request handler for the server. - * @constructor - */ -var Server = function(requestHandler) { - var server = http.createServer(function(req, res) { - requestHandler(req, res); - }); - - server.on('connection', function(stream) { - stream.setTimeout(4000); - }); - - /** @typedef {{port: number, address: string, family: string}} */ - var Host; - - /** - * Starts the server on the given port. If no port, or 0, is provided, - * the server will be started on a random port. - * @param {number=} opt_port The port to start on. - * @return {!Promise} A promise that will resolve - * with the server host when it has fully started. - */ - this.start = function(opt_port) { - assert(typeof opt_port !== 'function', - "start invoked with function, not port (mocha callback)?"); - var port = opt_port || portprober.findFreePort('localhost'); - return Promise.resolve(port).then(port => { - return promise.checkedNodeCall( - server.listen.bind(server, port, 'localhost')); - }).then(function() { - return server.address(); - }); - }; - - /** - * Stops the server. - * @return {!Promise} A promise that will resolve when the - * server has closed all connections. - */ - this.stop = function() { - return new Promise(resolve => server.close(resolve)); - }; - - /** - * @return {Host} This server's host info. - * @throws {Error} If the server is not running. - */ - this.address = function() { - var addr = server.address(); - if (!addr) { - throw Error('There server is not running!'); - } - return addr; - }; - - /** - * return {string} The host:port of this server. - * @throws {Error} If the server is not running. - */ - this.host = function() { - return net.getLoopbackAddress() + ':' + - this.address().port; - }; - - /** - * Formats a URL for this server. - * @param {string=} opt_pathname The desired pathname on the server. - * @return {string} The formatted URL. - * @throws {Error} If the server is not running. - */ - this.url = function(opt_pathname) { - var addr = this.address(); - var pathname = opt_pathname || ''; - return url.format({ - protocol: 'http', - hostname: net.getLoopbackAddress(), - port: addr.port, - pathname: pathname - }); - }; -}; - - -// PUBLIC API - - -exports.Server = Server; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/index.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/index.js deleted file mode 100644 index bcfb0eab..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/index.js +++ /dev/null @@ -1,270 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'); - -var build = require('./build'), - isDevMode = require('../devmode'), - webdriver = require('../../'), - flow = webdriver.promise.controlFlow(), - firefox = require('../../firefox'), - logging = require('../../lib/logging'), - safari = require('../../safari'), - remote = require('../../remote'), - testing = require('../../testing'), - fileserver = require('./fileserver'); - - -/** - * Browsers with native support. - * @type {!Array.} - */ -var NATIVE_BROWSERS = [ - webdriver.Browser.CHROME, - webdriver.Browser.EDGE, - webdriver.Browser.FIREFOX, - webdriver.Browser.IE, - webdriver.Browser.OPERA, - webdriver.Browser.PHANTOM_JS, - webdriver.Browser.SAFARI -]; - - -var noBuild = /^1|true$/i.test(process.env['SELENIUM_NO_BUILD']); -var serverJar = process.env['SELENIUM_SERVER_JAR']; -var remoteUrl = process.env['SELENIUM_REMOTE_URL']; -var useLoopback = process.env['SELENIUM_USE_LOOP_BACK'] == '1'; -var startServer = !!serverJar && !remoteUrl; -var nativeRun = !serverJar && !remoteUrl; - -if (/^1|true$/i.test(process.env['SELENIUM_VERBOSE'])) { - logging.installConsoleHandler(); - logging.getLogger('webdriver.http').setLevel(logging.Level.ALL); -} - -var browsersToTest = (function() { - var permitRemoteBrowsers = !!remoteUrl || !!serverJar; - var permitUnknownBrowsers = !nativeRun; - var browsers = process.env['SELENIUM_BROWSER'] || webdriver.Browser.FIREFOX; - - browsers = browsers.split(',').map(function(browser) { - var parts = browser.split(/:/); - if (parts[0] === 'ie') { - parts[0] = webdriver.Browser.IE; - } - if (parts[0] === 'edge') { - parts[0] = webdriver.Browser.EDGE; - } - return parts.join(':'); - }); - - browsers.forEach(function(browser) { - var parts = browser.split(/:/, 3); - if (parts[0] === 'ie') { - parts[0] = webdriver.Browser.IE; - } - - if (NATIVE_BROWSERS.indexOf(parts[0]) == -1 && !permitRemoteBrowsers) { - throw Error('Browser ' + parts[0] + ' requires a WebDriver server and ' + - 'neither the SELENIUM_REMOTE_URL nor the SELENIUM_SERVER_JAR ' + - 'environment variables have been set.'); - } - - var recognized = false; - for (var prop in webdriver.Browser) { - if (webdriver.Browser.hasOwnProperty(prop) && - webdriver.Browser[prop] === parts[0]) { - recognized = true; - break; - } - } - - if (!recognized && !permitUnknownBrowsers) { - throw Error('Unrecognized browser: ' + browser); - } - }); - - console.log('Running tests against [' + browsers.join(',') + ']'); - if (remoteUrl) { - console.log('Using remote server ' + remoteUrl); - } else if (serverJar) { - console.log('Using standalone Selenium server ' + serverJar); - if (useLoopback) { - console.log('Running tests using loopback address') - } - } - console.log( - 'Promise manager is enabled? ' + webdriver.promise.USE_PROMISE_MANAGER); - - return browsers; -})(); - - -/** - * Creates a predicate function that ignores tests for specific browsers. - * @param {string} currentBrowser The name of the current browser. - * @param {!Array.} browsersToIgnore The browsers to ignore. - * @return {function(): boolean} The predicate function. - */ -function browsers(currentBrowser, browsersToIgnore) { - return function() { - return browsersToIgnore.indexOf(currentBrowser) != -1; - }; -} - - -/** - * @param {string} browserName The name to use. - * @param {remote.DriverService} server The server to use, if any. - * @constructor - */ -function TestEnvironment(browserName, server) { - var name = browserName; - - this.currentBrowser = function() { - return browserName; - }; - - this.isRemote = function() { - return server || remoteUrl; - }; - - this.browsers = function(var_args) { - var browsersToIgnore = Array.prototype.slice.apply(arguments, [0]); - return browsers(browserName, browsersToIgnore); - }; - - this.builder = function() { - var builder = new webdriver.Builder(); - var realBuild = builder.build; - - builder.build = function() { - let parts = browserName.split(/:/, 3); - - builder.forBrowser(parts[0], parts[1], parts[2]); - if (server) { - builder.usingServer(server.address()); - } else if (remoteUrl) { - builder.usingServer(remoteUrl); - } - - builder.disableEnvironmentOverrides(); - return realBuild.call(builder); - }; - - return builder; - }; -} - - -var seleniumServer; -var inSuite = false; - - -/** - * Expands a function to cover each of the target browsers. - * @param {function(!TestEnvironment)} fn The top level suite - * function. - * @param {{browsers: !Array.}=} opt_options Suite specific options. - */ -function suite(fn, opt_options) { - assert.ok(!inSuite, 'You may not nest suite calls'); - inSuite = true; - - var suiteOptions = opt_options || {}; - var browsers = suiteOptions.browsers; - if (browsers) { - // Filter out browser specific tests when that browser is not currently - // selected for testing. - browsers = browsers.filter(function(browser) { - return browsersToTest.indexOf(browser) != -1; - }); - } else { - browsers = browsersToTest; - } - - try { - - before(function() { - if (isDevMode && !noBuild) { - return build.of( - '//javascript/atoms/fragments:is-displayed', - '//javascript/webdriver/atoms:get-attribute') - .onlyOnce().go(); - } - }); - - // Server is only started if required for a specific config. - after(function() { - if (seleniumServer) { - return seleniumServer.stop(); - } - }); - - browsers.forEach(function(browser) { - describe('[' + browser + ']', function() { - - var serverToUse = null; - - if (!!serverJar && !remoteUrl) { - if (!(serverToUse = seleniumServer)) { - serverToUse = seleniumServer = new remote.SeleniumServer( - serverJar, {loopback: useLoopback}); - } - - before(function() { - this.timeout(0); - return seleniumServer.start(60 * 1000); - }); - } - fn(new TestEnvironment(browser, serverToUse)); - }); - }); - } finally { - inSuite = false; - } -} - - -// GLOBAL TEST SETUP - -before(function() { - // Do not pass register fileserver.start directly with testing.before, - // as start takes an optional port, which before assumes is an async - // callback. - return fileserver.start(); -}); - -after(function() { - return fileserver.stop(); -}); - -// PUBLIC API - - -exports.suite = suite; -exports.after = testing.after; -exports.afterEach = testing.afterEach; -exports.before = testing.before; -exports.beforeEach = testing.beforeEach; -exports.it = testing.it; -exports.ignore = testing.ignore; - -exports.Pages = fileserver.Pages; -exports.whereIs = fileserver.whereIs; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js deleted file mode 100644 index 073e21d6..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/promise.js +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - - -/** - * Configures a block of mocha tests, ensuring the promise manager is either - * enabled or disabled for the tests' execution. - * for their execution. - */ -function withPromiseManager(enabled, fn) { - describe(`SELENIUM_PROMISE_MANAGER=${enabled}`, function() { - let saved; - - function changeState() { - saved = process.env.SELENIUM_PROMISE_MANAGER; - process.env.SELENIUM_PROMISE_MANAGER = enabled; - } - - function restoreState() { - if (saved === undefined) { - delete process.env.SELENIUM_PROMISE_MANAGER; - } else { - process.env.SELENIUM_PROMISE_MANAGER = saved; - } - } - - before(changeState); - after(restoreState); - - try { - changeState(); - fn(); - } finally { - restoreState(); - } - }); -}; - - -/** - * Defines a set of tests to run both with and without the promise manager - * enabled. - */ -exports.promiseManagerSuite = function(fn) { - withPromiseManager(true, fn); - withPromiseManager(false, fn); -}; - - -/** - * Ensures the promise manager is enabled when the provided tests run. - */ -exports.enablePromiseManager = function(fn) { - withPromiseManager(true, fn); -}; - - -/** - * Ensures the promise manager is disabled when the provided tests run. - */ -exports.disablePromiseManager = function(fn) { - withPromiseManager(false, fn); -}; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js b/test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js deleted file mode 100644 index 8e9cceb4..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/test/resources.js +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fs = require('fs'), - path = require('path'); - -var resourceRoot = require('../devmode') ? - require('./build').projectRoot() : - path.join(__dirname, 'data'); - - -// PUBLIC API - - -/** - * Locates a test resource. - * @param {string} resourcePath Path of the resource to locate. - * @param {string} filePath The file to locate from the root of the project. - * @return {string} The full path for the file, if it exists. - * @throws {Error} If the file does not exist. - */ -exports.locate = function(filePath) { - var fullPath = path.normalize(path.join(resourceRoot, filePath)); - if (!fs.existsSync(fullPath)) { - throw Error('File does not exist: ' + filePath); - } - return fullPath; -}; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/until.js b/test-eol-project/node_modules/selenium-webdriver/lib/until.js deleted file mode 100644 index b0e68b88..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/until.js +++ /dev/null @@ -1,427 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Defines common conditions for use with - * {@link webdriver.WebDriver#wait WebDriver wait}. - * - * Sample usage: - * - * driver.get('http://www.google.com/ncr'); - * - * var query = driver.wait(until.elementLocated(By.name('q'))); - * query.sendKeys('webdriver\n'); - * - * driver.wait(until.titleIs('webdriver - Google Search')); - * - * To define a custom condition, simply call WebDriver.wait with a function - * that will eventually return a truthy-value (neither null, undefined, false, - * 0, or the empty string): - * - * driver.wait(function() { - * return driver.getTitle().then(function(title) { - * return title === 'webdriver - Google Search'; - * }); - * }, 1000); - */ - -'use strict'; - -const by = require('./by'); -const By = require('./by').By; -const error = require('./error'); -const webdriver = require('./webdriver'), - Condition = webdriver.Condition, - WebElementCondition = webdriver.WebElementCondition; - - -/** - * Creates a condition that will wait until the input driver is able to switch - * to the designated frame. The target frame may be specified as - * - * 1. a numeric index into - * [window.frames](https://developer.mozilla.org/en-US/docs/Web/API/Window.frames) - * for the currently selected frame. - * 2. a {@link ./webdriver.WebElement}, which must reference a FRAME or IFRAME - * element on the current page. - * 3. a locator which may be used to first locate a FRAME or IFRAME on the - * current page before attempting to switch to it. - * - * Upon successful resolution of this condition, the driver will be left - * focused on the new frame. - * - * @param {!(number|./webdriver.WebElement|By| - * function(!./webdriver.WebDriver): !./webdriver.WebElement)} frame - * The frame identifier. - * @return {!Condition} A new condition. - */ -exports.ableToSwitchToFrame = function ableToSwitchToFrame(frame) { - var condition; - if (typeof frame === 'number' || frame instanceof webdriver.WebElement) { - condition = driver => attemptToSwitchFrames(driver, frame); - } else { - condition = function(driver) { - let locator = /** @type {!(By|Function)} */(frame); - return driver.findElements(locator).then(function(els) { - if (els.length) { - return attemptToSwitchFrames(driver, els[0]); - } - }); - }; - } - - return new Condition('to be able to switch to frame', condition); - - function attemptToSwitchFrames(driver, frame) { - return driver.switchTo().frame(frame).then( - function() { return true; }, - function(e) { - if (!(e instanceof error.NoSuchFrameError)) { - throw e; - } - }); - } -}; - - -/** - * Creates a condition that waits for an alert to be opened. Upon success, the - * returned promise will be fulfilled with the handle for the opened alert. - * - * @return {!Condition} The new condition. - */ -exports.alertIsPresent = function alertIsPresent() { - return new Condition('for alert to be present', function(driver) { - return driver.switchTo().alert().catch(function(e) { - if (!(e instanceof error.NoSuchAlertError - // XXX: Workaround for GeckoDriver error `TypeError: can't convert null - // to object`. For more details, see - // https://github.com/SeleniumHQ/selenium/pull/2137 - || (e instanceof error.WebDriverError - && e.message === `can't convert null to object`) - )) { - throw e; - } - }); - }); -}; - - -/** - * Creates a condition that will wait for the current page's title to match the - * given value. - * - * @param {string} title The expected page title. - * @return {!Condition} The new condition. - */ -exports.titleIs = function titleIs(title) { - return new Condition( - 'for title to be ' + JSON.stringify(title), - function(driver) { - return driver.getTitle().then(function(t) { - return t === title; - }); - }); -}; - - -/** - * Creates a condition that will wait for the current page's title to contain - * the given substring. - * - * @param {string} substr The substring that should be present in the page - * title. - * @return {!Condition} The new condition. - */ -exports.titleContains = function titleContains(substr) { - return new Condition( - 'for title to contain ' + JSON.stringify(substr), - function(driver) { - return driver.getTitle().then(function(title) { - return title.indexOf(substr) !== -1; - }); - }); -}; - - -/** - * Creates a condition that will wait for the current page's title to match the - * given regular expression. - * - * @param {!RegExp} regex The regular expression to test against. - * @return {!Condition} The new condition. - */ -exports.titleMatches = function titleMatches(regex) { - return new Condition('for title to match ' + regex, function(driver) { - return driver.getTitle().then(function(title) { - return regex.test(title); - }); - }); -}; - - -/** - * Creates a condition that will wait for the current page's url to match the - * given value. - * - * @param {string} url The expected page url. - * @return {!Condition} The new condition. - */ -exports.urlIs = function urlIs(url) { - return new Condition( - 'for URL to be ' + JSON.stringify(url), - function(driver) { - return driver.getCurrentUrl().then(function(u) { - return u === url; - }); - }); -}; - - -/** - * Creates a condition that will wait for the current page's url to contain - * the given substring. - * - * @param {string} substrUrl The substring that should be present in the current - * URL. - * @return {!Condition} The new condition. - */ -exports.urlContains = function urlContains(substrUrl) { - return new Condition( - 'for URL to contain ' + JSON.stringify(substrUrl), - function(driver) { - return driver.getCurrentUrl().then(function(url) { - return url.indexOf(substrUrl) !== -1; - }); - }); -}; - - -/** - * Creates a condition that will wait for the current page's url to match the - * given regular expression. - * - * @param {!RegExp} regex The regular expression to test against. - * @return {!Condition} The new condition. - */ -exports.urlMatches = function urlMatches(regex) { - return new Condition('for URL to match ' + regex, function(driver) { - return driver.getCurrentUrl().then(function(url) { - return regex.test(url); - }); - }); -}; - - -/** - * Creates a condition that will loop until an element is - * {@link ./webdriver.WebDriver#findElement found} with the given locator. - * - * @param {!(By|Function)} locator The locator to use. - * @return {!WebElementCondition} The new condition. - */ -exports.elementLocated = function elementLocated(locator) { - locator = by.checkedLocator(locator); - let locatorStr = - typeof locator === 'function' ? 'by function()' : locator + ''; - return new WebElementCondition('for element to be located ' + locatorStr, - function(driver) { - return driver.findElements(locator).then(function(elements) { - return elements[0]; - }); - }); -}; - - -/** - * Creates a condition that will loop until at least one element is - * {@link ./webdriver.WebDriver#findElement found} with the given locator. - * - * @param {!(By|Function)} locator The locator to use. - * @return {!Condition>} The new - * condition. - */ -exports.elementsLocated = function elementsLocated(locator) { - locator = by.checkedLocator(locator); - let locatorStr = - typeof locator === 'function' ? 'by function()' : locator + ''; - return new Condition( - 'for at least one element to be located ' + locatorStr, - function(driver) { - return driver.findElements(locator).then(function(elements) { - return elements.length > 0 ? elements : null; - }); - }); -}; - - -/** - * Creates a condition that will wait for the given element to become stale. An - * element is considered stale once it is removed from the DOM, or a new page - * has loaded. - * - * @param {!./webdriver.WebElement} element The element that should become stale. - * @return {!Condition} The new condition. - */ -exports.stalenessOf = function stalenessOf(element) { - return new Condition('element to become stale', function() { - return element.getTagName().then( - function() { return false; }, - function(e) { - if (e instanceof error.StaleElementReferenceError) { - return true; - } - throw e; - }); - }); -}; - - -/** - * Creates a condition that will wait for the given element to become visible. - * - * @param {!./webdriver.WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see ./webdriver.WebDriver#isDisplayed - */ -exports.elementIsVisible = function elementIsVisible(element) { - return new WebElementCondition('until element is visible', function() { - return element.isDisplayed().then(v => v ? element : null); - }); -}; - - -/** - * Creates a condition that will wait for the given element to be in the DOM, - * yet not visible to the user. - * - * @param {!./webdriver.WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see ./webdriver.WebDriver#isDisplayed - */ -exports.elementIsNotVisible = function elementIsNotVisible(element) { - return new WebElementCondition('until element is not visible', function() { - return element.isDisplayed().then(v => v ? null : element); - }); -}; - - -/** - * Creates a condition that will wait for the given element to be enabled. - * - * @param {!./webdriver.WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#isEnabled - */ -exports.elementIsEnabled = function elementIsEnabled(element) { - return new WebElementCondition('until element is enabled', function() { - return element.isEnabled().then(v => v ? element : null); - }); -}; - - -/** - * Creates a condition that will wait for the given element to be disabled. - * - * @param {!./webdriver.WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#isEnabled - */ -exports.elementIsDisabled = function elementIsDisabled(element) { - return new WebElementCondition('until element is disabled', function() { - return element.isEnabled().then(v => v ? null : element); - }); -}; - - -/** - * Creates a condition that will wait for the given element to be selected. - * @param {!./webdriver.WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#isSelected - */ -exports.elementIsSelected = function elementIsSelected(element) { - return new WebElementCondition('until element is selected', function() { - return element.isSelected().then(v => v ? element : null); - }); -}; - - -/** - * Creates a condition that will wait for the given element to be deselected. - * - * @param {!./webdriver.WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#isSelected - */ -exports.elementIsNotSelected = function elementIsNotSelected(element) { - return new WebElementCondition('until element is not selected', function() { - return element.isSelected().then(v => v ? null : element); - }); -}; - - -/** - * Creates a condition that will wait for the given element's - * {@link webdriver.WebDriver#getText visible text} to match the given - * {@code text} exactly. - * - * @param {!./webdriver.WebElement} element The element to test. - * @param {string} text The expected text. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#getText - */ -exports.elementTextIs = function elementTextIs(element, text) { - return new WebElementCondition('until element text is', function() { - return element.getText().then(t => t === text ? element : null); - }); -}; - - -/** - * Creates a condition that will wait for the given element's - * {@link webdriver.WebDriver#getText visible text} to contain the given - * substring. - * - * @param {!./webdriver.WebElement} element The element to test. - * @param {string} substr The substring to search for. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#getText - */ -exports.elementTextContains = function elementTextContains(element, substr) { - return new WebElementCondition('until element text contains', function() { - return element.getText() - .then(t => t.indexOf(substr) != -1 ? element : null); - }); -}; - - -/** - * Creates a condition that will wait for the given element's - * {@link webdriver.WebDriver#getText visible text} to match a regular - * expression. - * - * @param {!./webdriver.WebElement} element The element to test. - * @param {!RegExp} regex The regular expression to test against. - * @return {!WebElementCondition} The new condition. - * @see webdriver.WebDriver#getText - */ -exports.elementTextMatches = function elementTextMatches(element, regex) { - return new WebElementCondition('until element text matches', function() { - return element.getText().then(t => regex.test(t) ? element : null); - }); -}; diff --git a/test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js b/test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js deleted file mode 100644 index 5df84a15..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/lib/webdriver.js +++ /dev/null @@ -1,2656 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview The heart of the WebDriver JavaScript API. - */ - -'use strict'; - -const actions = require('./actions'); -const by = require('./by'); -const Capabilities = require('./capabilities').Capabilities; -const command = require('./command'); -const error = require('./error'); -const input = require('./input'); -const logging = require('./logging'); -const {Session} = require('./session'); -const Symbols = require('./symbols'); -const promise = require('./promise'); - - -/** - * Defines a condition for use with WebDriver's {@linkplain WebDriver#wait wait - * command}. - * - * @template OUT - */ -class Condition { - /** - * @param {string} message A descriptive error message. Should complete the - * sentence "Waiting [...]" - * @param {function(!WebDriver): OUT} fn The condition function to - * evaluate on each iteration of the wait loop. - */ - constructor(message, fn) { - /** @private {string} */ - this.description_ = 'Waiting ' + message; - - /** @type {function(!WebDriver): OUT} */ - this.fn = fn; - } - - /** @return {string} A description of this condition. */ - description() { - return this.description_; - } -} - - -/** - * Defines a condition that will result in a {@link WebElement}. - * - * @extends {Condition)>} - */ -class WebElementCondition extends Condition { - /** - * @param {string} message A descriptive error message. Should complete the - * sentence "Waiting [...]" - * @param {function(!WebDriver): !(WebElement|IThenable)} - * fn The condition function to evaluate on each iteration of the wait - * loop. - */ - constructor(message, fn) { - super(message, fn); - } -} - - -////////////////////////////////////////////////////////////////////////////// -// -// WebDriver -// -////////////////////////////////////////////////////////////////////////////// - - -/** - * Translates a command to its wire-protocol representation before passing it - * to the given `executor` for execution. - * @param {!command.Executor} executor The executor to use. - * @param {!command.Command} command The command to execute. - * @return {!Promise} A promise that will resolve with the command response. - */ -function executeCommand(executor, command) { - return toWireValue(command.getParameters()). - then(function(parameters) { - command.setParameters(parameters); - return executor.execute(command); - }); -} - - -/** - * Converts an object to its JSON representation in the WebDriver wire protocol. - * When converting values of type object, the following steps will be taken: - *
      - *
    1. if the object is a WebElement, the return value will be the element's - * server ID - *
    2. if the object defines a {@link Symbols.serialize} method, this algorithm - * will be recursively applied to the object's serialized representation - *
    3. if the object provides a "toJSON" function, this algorithm will - * recursively be applied to the result of that function - *
    4. otherwise, the value of each key will be recursively converted according - * to the rules above. - *
    - * - * @param {*} obj The object to convert. - * @return {!Promise} A promise that will resolve to the input value's JSON - * representation. - */ -function toWireValue(obj) { - if (promise.isPromise(obj)) { - return Promise.resolve(obj).then(toWireValue); - } - return Promise.resolve(convertValue(obj)); -} - - -function convertValue(value) { - if (value === void 0 || value === null) { - return value; - } - - if (typeof value === 'boolean' - || typeof value === 'number' - || typeof value === 'string') { - return value; - } - - if (Array.isArray(value)) { - return convertKeys(value); - } - - if (typeof value === 'function') { - return '' + value; - } - - if (typeof value[Symbols.serialize] === 'function') { - return toWireValue(value[Symbols.serialize]()); - } else if (typeof value.toJSON === 'function') { - return toWireValue(value.toJSON()); - } - return convertKeys(value); -} - - -function convertKeys(obj) { - const isArray = Array.isArray(obj); - const numKeys = isArray ? obj.length : Object.keys(obj).length; - const ret = isArray ? new Array(numKeys) : {}; - if (!numKeys) { - return Promise.resolve(ret); - } - - let numResolved = 0; - - function forEachKey(obj, fn) { - if (Array.isArray(obj)) { - for (let i = 0, n = obj.length; i < n; i++) { - fn(obj[i], i); - } - } else { - for (let key in obj) { - fn(obj[key], key); - } - } - } - - return new Promise(function(done, reject) { - forEachKey(obj, function(value, key) { - if (promise.isPromise(value)) { - value.then(toWireValue).then(setValue, reject); - } else { - value = convertValue(value); - if (promise.isPromise(value)) { - value.then(toWireValue).then(setValue, reject); - } else { - setValue(value); - } - } - - function setValue(value) { - ret[key] = value; - maybeFulfill(); - } - }); - - function maybeFulfill() { - if (++numResolved === numKeys) { - done(ret); - } - } - }); -} - - -/** - * Converts a value from its JSON representation according to the WebDriver wire - * protocol. Any JSON object that defines a WebElement ID will be decoded to a - * {@link WebElement} object. All other values will be passed through as is. - * - * @param {!WebDriver} driver The driver to use as the parent of any unwrapped - * {@link WebElement} values. - * @param {*} value The value to convert. - * @return {*} The converted value. - */ -function fromWireValue(driver, value) { - if (Array.isArray(value)) { - value = value.map(v => fromWireValue(driver, v)); - } else if (WebElement.isId(value)) { - let id = WebElement.extractId(value); - value = new WebElement(driver, id); - } else if (value && typeof value === 'object') { - let result = {}; - for (let key in value) { - if (value.hasOwnProperty(key)) { - result[key] = fromWireValue(driver, value[key]); - } - } - value = result; - } - return value; -} - - -/** - * Structural interface for a WebDriver client. - * - * @record - */ -class IWebDriver { - - /** @return {!promise.ControlFlow} The control flow used by this instance. */ - controlFlow() {} - - /** - * Schedules a {@link command.Command} to be executed by this driver's - * {@link command.Executor}. - * - * @param {!command.Command} command The command to schedule. - * @param {string} description A description of the command for debugging. - * @return {!promise.Thenable} A promise that will be resolved - * with the command result. - * @template T - */ - schedule(command, description) {} - - /** - * Sets the {@linkplain input.FileDetector file detector} that should be - * used with this instance. - * @param {input.FileDetector} detector The detector to use or {@code null}. - */ - setFileDetector(detector) {} - - /** - * @return {!command.Executor} The command executor used by this instance. - */ - getExecutor() {} - - /** - * @return {!promise.Thenable} A promise for this client's session. - */ - getSession() {} - - /** - * @return {!promise.Thenable} A promise that will resolve with - * the this instance's capabilities. - */ - getCapabilities() {} - - /** - * Terminates the browser session. After calling quit, this instance will be - * invalidated and may no longer be used to issue commands against the - * browser. - * - * @return {!promise.Thenable} A promise that will be resolved when the - * command has completed. - */ - quit() {} - - /** - * Creates a new action sequence using this driver. The sequence will not be - * scheduled for execution until {@link actions.ActionSequence#perform} is - * called. Example: - * - * driver.actions(). - * mouseDown(element1). - * mouseMove(element2). - * mouseUp(). - * perform(); - * - * @return {!actions.ActionSequence} A new action sequence for this instance. - */ - actions() {} - - /** - * Creates a new touch sequence using this driver. The sequence will not be - * scheduled for execution until {@link actions.TouchSequence#perform} is - * called. Example: - * - * driver.touchActions(). - * tap(element1). - * doubleTap(element2). - * perform(); - * - * @return {!actions.TouchSequence} A new touch sequence for this instance. - */ - touchActions() {} - - /** - * Schedules a command to execute JavaScript in the context of the currently - * selected frame or window. The script fragment will be executed as the body - * of an anonymous function. If the script is provided as a function object, - * that function will be converted to a string for injection into the target - * window. - * - * Any arguments provided in addition to the script will be included as script - * arguments and may be referenced using the {@code arguments} object. - * Arguments may be a boolean, number, string, or {@linkplain WebElement}. - * Arrays and objects may also be used as script arguments as long as each item - * adheres to the types previously mentioned. - * - * The script may refer to any variables accessible from the current window. - * Furthermore, the script will execute in the window's context, thus - * {@code document} may be used to refer to the current document. Any local - * variables will not be available once the script has finished executing, - * though global variables will persist. - * - * If the script has a return value (i.e. if the script contains a return - * statement), then the following steps will be taken for resolving this - * functions return value: - * - * - For a HTML element, the value will resolve to a {@linkplain WebElement} - * - Null and undefined return values will resolve to null
  • - * - Booleans, numbers, and strings will resolve as is - * - Functions will resolve to their string representation - * - For arrays and objects, each member item will be converted according to - * the rules above - * - * @param {!(string|Function)} script The script to execute. - * @param {...*} var_args The arguments to pass to the script. - * @return {!promise.Thenable} A promise that will resolve to the - * scripts return value. - * @template T - */ - executeScript(script, var_args) {} - - /** - * Schedules a command to execute asynchronous JavaScript in the context of the - * currently selected frame or window. The script fragment will be executed as - * the body of an anonymous function. If the script is provided as a function - * object, that function will be converted to a string for injection into the - * target window. - * - * Any arguments provided in addition to the script will be included as script - * arguments and may be referenced using the {@code arguments} object. - * Arguments may be a boolean, number, string, or {@code WebElement}. - * Arrays and objects may also be used as script arguments as long as each item - * adheres to the types previously mentioned. - * - * Unlike executing synchronous JavaScript with {@link #executeScript}, - * scripts executed with this function must explicitly signal they are finished - * by invoking the provided callback. This callback will always be injected - * into the executed function as the last argument, and thus may be referenced - * with {@code arguments[arguments.length - 1]}. The following steps will be - * taken for resolving this functions return value against the first argument - * to the script's callback function: - * - * - For a HTML element, the value will resolve to a - * {@link WebElement} - * - Null and undefined return values will resolve to null - * - Booleans, numbers, and strings will resolve as is - * - Functions will resolve to their string representation - * - For arrays and objects, each member item will be converted according to - * the rules above - * - * __Example #1:__ Performing a sleep that is synchronized with the currently - * selected window: - * - * var start = new Date().getTime(); - * driver.executeAsyncScript( - * 'window.setTimeout(arguments[arguments.length - 1], 500);'). - * then(function() { - * console.log( - * 'Elapsed time: ' + (new Date().getTime() - start) + ' ms'); - * }); - * - * __Example #2:__ Synchronizing a test with an AJAX application: - * - * var button = driver.findElement(By.id('compose-button')); - * button.click(); - * driver.executeAsyncScript( - * 'var callback = arguments[arguments.length - 1];' + - * 'mailClient.getComposeWindowWidget().onload(callback);'); - * driver.switchTo().frame('composeWidget'); - * driver.findElement(By.id('to')).sendKeys('dog@example.com'); - * - * __Example #3:__ Injecting a XMLHttpRequest and waiting for the result. In - * this example, the inject script is specified with a function literal. When - * using this format, the function is converted to a string for injection, so it - * should not reference any symbols not defined in the scope of the page under - * test. - * - * driver.executeAsyncScript(function() { - * var callback = arguments[arguments.length - 1]; - * var xhr = new XMLHttpRequest(); - * xhr.open("GET", "/resource/data.json", true); - * xhr.onreadystatechange = function() { - * if (xhr.readyState == 4) { - * callback(xhr.responseText); - * } - * }; - * xhr.send(''); - * }).then(function(str) { - * console.log(JSON.parse(str)['food']); - * }); - * - * @param {!(string|Function)} script The script to execute. - * @param {...*} var_args The arguments to pass to the script. - * @return {!promise.Thenable} A promise that will resolve to the - * scripts return value. - * @template T - */ - executeAsyncScript(script, var_args) {} - - /** - * Schedules a command to execute a custom function. - * @param {function(...): (T|IThenable)} fn The function to execute. - * @param {Object=} opt_scope The object in whose scope to execute the function. - * @param {...*} var_args Any arguments to pass to the function. - * @return {!promise.Thenable} A promise that will be resolved' - * with the function's result. - * @template T - */ - call(fn, opt_scope, var_args) {} - - /** - * Schedules a command to wait for a condition to hold. The condition may be - * specified by a {@link Condition}, as a custom function, or as any - * promise-like thenable. - * - * For a {@link Condition} or function, the wait will repeatedly - * evaluate the condition until it returns a truthy value. If any errors occur - * while evaluating the condition, they will be allowed to propagate. In the - * event a condition returns a {@link promise.Promise promise}, the polling - * loop will wait for it to be resolved and use the resolved value for whether - * the condition has been satisfied. Note the resolution time for a promise - * is factored into whether a wait has timed out. - * - * Note, if the provided condition is a {@link WebElementCondition}, then - * the wait will return a {@link WebElementPromise} that will resolve to the - * element that satisfied the condition. - * - * _Example:_ waiting up to 10 seconds for an element to be present on the - * page. - * - * var button = driver.wait(until.elementLocated(By.id('foo')), 10000); - * button.click(); - * - * This function may also be used to block the command flow on the resolution - * of any thenable promise object. When given a promise, the command will - * simply wait for its resolution before completing. A timeout may be provided - * to fail the command if the promise does not resolve before the timeout - * expires. - * - * _Example:_ Suppose you have a function, `startTestServer`, that returns a - * promise for when a server is ready for requests. You can block a WebDriver - * client on this promise with: - * - * var started = startTestServer(); - * driver.wait(started, 5 * 1000, 'Server should start within 5 seconds'); - * driver.get(getServerUrl()); - * - * @param {!(IThenable| - * Condition| - * function(!WebDriver): T)} condition The condition to - * wait on, defined as a promise, condition object, or a function to - * evaluate as a condition. - * @param {number=} opt_timeout How long to wait for the condition to be true. - * @param {string=} opt_message An optional message to use if the wait times - * out. - * @return {!(promise.Thenable|WebElementPromise)} A promise that will be - * resolved with the first truthy value returned by the condition - * function, or rejected if the condition times out. If the input - * input condition is an instance of a {@link WebElementCondition}, - * the returned value will be a {@link WebElementPromise}. - * @throws {TypeError} if the provided `condition` is not a valid type. - * @template T - */ - wait(condition, opt_timeout, opt_message) {} - - /** - * Schedules a command to make the driver sleep for the given amount of time. - * @param {number} ms The amount of time, in milliseconds, to sleep. - * @return {!promise.Thenable} A promise that will be resolved - * when the sleep has finished. - */ - sleep(ms) {} - - /** - * Schedules a command to retrieve the current window handle. - * @return {!promise.Thenable} A promise that will be - * resolved with the current window handle. - */ - getWindowHandle() {} - - /** - * Schedules a command to retrieve the current list of available window handles. - * @return {!promise.Thenable>} A promise that will - * be resolved with an array of window handles. - */ - getAllWindowHandles() {} - - /** - * Schedules a command to retrieve the current page's source. The page source - * returned is a representation of the underlying DOM: do not expect it to be - * formatted or escaped in the same way as the response sent from the web - * server. - * @return {!promise.Thenable} A promise that will be - * resolved with the current page source. - */ - getPageSource() {} - - /** - * Schedules a command to close the current window. - * @return {!promise.Thenable} A promise that will be resolved - * when this command has completed. - */ - close() {} - - /** - * Schedules a command to navigate to the given URL. - * @param {string} url The fully qualified URL to open. - * @return {!promise.Thenable} A promise that will be resolved - * when the document has finished loading. - */ - get(url) {} - - /** - * Schedules a command to retrieve the URL of the current page. - * @return {!promise.Thenable} A promise that will be - * resolved with the current URL. - */ - getCurrentUrl() {} - - /** - * Schedules a command to retrieve the current page's title. - * @return {!promise.Thenable} A promise that will be - * resolved with the current page's title. - */ - getTitle() {} - - /** - * Schedule a command to find an element on the page. If the element cannot be - * found, a {@link bot.ErrorCode.NO_SUCH_ELEMENT} result will be returned - * by the driver. Unlike other commands, this error cannot be suppressed. In - * other words, scheduling a command to find an element doubles as an assert - * that the element is present on the page. To test whether an element is - * present on the page, use {@link #findElements}: - * - * driver.findElements(By.id('foo')) - * .then(found => console.log('Element found? %s', !!found.length)); - * - * The search criteria for an element may be defined using one of the - * factories in the {@link webdriver.By} namespace, or as a short-hand - * {@link webdriver.By.Hash} object. For example, the following two statements - * are equivalent: - * - * var e1 = driver.findElement(By.id('foo')); - * var e2 = driver.findElement({id:'foo'}); - * - * You may also provide a custom locator function, which takes as input this - * instance and returns a {@link WebElement}, or a promise that will resolve - * to a WebElement. If the returned promise resolves to an array of - * WebElements, WebDriver will use the first element. For example, to find the - * first visible link on a page, you could write: - * - * var link = driver.findElement(firstVisibleLink); - * - * function firstVisibleLink(driver) { - * var links = driver.findElements(By.tagName('a')); - * return promise.filter(links, function(link) { - * return link.isDisplayed(); - * }); - * } - * - * @param {!(by.By|Function)} locator The locator to use. - * @return {!WebElementPromise} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator) {} - - /** - * Schedule a command to search for multiple elements on the page. - * - * @param {!(by.By|Function)} locator The locator to use. - * @return {!promise.Thenable>} A - * promise that will resolve to an array of WebElements. - */ - findElements(locator) {} - - /** - * Schedule a command to take a screenshot. The driver makes a best effort to - * return a screenshot of the following, in order of preference: - * - * 1. Entire page - * 2. Current window - * 3. Visible portion of the current frame - * 4. The entire display containing the browser - * - * @return {!promise.Thenable} A promise that will be - * resolved to the screenshot as a base-64 encoded PNG. - */ - takeScreenshot() {} - - /** - * @return {!Options} The options interface for this instance. - */ - manage() {} - - /** - * @return {!Navigation} The navigation interface for this instance. - */ - navigate() {} - - /** - * @return {!TargetLocator} The target locator interface for this - * instance. - */ - switchTo() {} -} - - -/** - * Each WebDriver instance provides automated control over a browser session. - * - * @implements {IWebDriver} - */ -class WebDriver { - /** - * @param {!(Session|IThenable)} session Either a known session or a - * promise that will be resolved to a session. - * @param {!command.Executor} executor The executor to use when sending - * commands to the browser. - * @param {promise.ControlFlow=} opt_flow The flow to - * schedule commands through. Defaults to the active flow object. - * @param {(function(this: void): ?)=} opt_onQuit A function to call, if any, - * when the session is terminated. - */ - constructor(session, executor, opt_flow, opt_onQuit) { - /** @private {!promise.ControlFlow} */ - this.flow_ = opt_flow || promise.controlFlow(); - - /** @private {!promise.Thenable} */ - this.session_ = this.flow_.promise(resolve => resolve(session)); - - /** @private {!command.Executor} */ - this.executor_ = executor; - - /** @private {input.FileDetector} */ - this.fileDetector_ = null; - - /** @private @const {(function(this: void): ?|undefined)} */ - this.onQuit_ = opt_onQuit; - } - - /** - * Creates a new WebDriver client for an existing session. - * @param {!command.Executor} executor Command executor to use when querying - * for session details. - * @param {string} sessionId ID of the session to attach to. - * @param {promise.ControlFlow=} opt_flow The control flow all - * driver commands should execute under. Defaults to the - * {@link promise.controlFlow() currently active} control flow. - * @return {!WebDriver} A new client for the specified session. - */ - static attachToSession(executor, sessionId, opt_flow) { - let flow = opt_flow || promise.controlFlow(); - let cmd = new command.Command(command.Name.DESCRIBE_SESSION) - .setParameter('sessionId', sessionId); - let session = flow.execute( - () => executeCommand(executor, cmd).catch(err => { - // The DESCRIBE_SESSION command is not supported by the W3C spec, so - // if we get back an unknown command, just return a session with - // unknown capabilities. - if (err instanceof error.UnknownCommandError) { - return new Session(sessionId, new Capabilities); - } - throw err; - }), - 'WebDriver.attachToSession()'); - return new WebDriver(session, executor, flow); - } - - /** - * Creates a new WebDriver session. - * - * By default, the requested session `capabilities` are merely "desired" and - * the remote end will still create a new session even if it cannot satisfy - * all of the requested capabilities. You can query which capabilities a - * session actually has using the - * {@linkplain #getCapabilities() getCapabilities()} method on the returned - * WebDriver instance. - * - * To define _required capabilities_, provide the `capabilities` as an object - * literal with `required` and `desired` keys. The `desired` key may be - * omitted if all capabilities are required, and vice versa. If the server - * cannot create a session with all of the required capabilities, it will - * return an {@linkplain error.SessionNotCreatedError}. - * - * let required = new Capabilities().set('browserName', 'firefox'); - * let desired = new Capabilities().set('version', '45'); - * let driver = WebDriver.createSession(executor, {required, desired}); - * - * This function will always return a WebDriver instance. If there is an error - * creating the session, such as the aforementioned SessionNotCreatedError, - * the driver will have a rejected {@linkplain #getSession session} promise. - * It is recommended that this promise is left _unhandled_ so it will - * propagate through the {@linkplain promise.ControlFlow control flow} and - * cause subsequent commands to fail. - * - * let required = Capabilities.firefox(); - * let driver = WebDriver.createSession(executor, {required}); - * - * // If the createSession operation failed, then this command will also - * // also fail, propagating the creation failure. - * driver.get('http://www.google.com').catch(e => console.log(e)); - * - * @param {!command.Executor} executor The executor to create the new session - * with. - * @param {(!Capabilities| - * {desired: (Capabilities|undefined), - * required: (Capabilities|undefined)})} capabilities The desired - * capabilities for the new session. - * @param {promise.ControlFlow=} opt_flow The control flow all driver - * commands should execute under, including the initial session creation. - * Defaults to the {@link promise.controlFlow() currently active} - * control flow. - * @param {(function(this: void): ?)=} opt_onQuit A callback to invoke when - * the newly created session is terminated. This should be used to clean - * up any resources associated with the session. - * @return {!WebDriver} The driver for the newly created session. - */ - static createSession(executor, capabilities, opt_flow, opt_onQuit) { - let flow = opt_flow || promise.controlFlow(); - let cmd = new command.Command(command.Name.NEW_SESSION); - - if (capabilities && (capabilities.desired || capabilities.required)) { - cmd.setParameter('desiredCapabilities', capabilities.desired); - cmd.setParameter('requiredCapabilities', capabilities.required); - } else { - cmd.setParameter('desiredCapabilities', capabilities); - } - - let session = flow.execute( - () => executeCommand(executor, cmd), - 'WebDriver.createSession()'); - if (typeof opt_onQuit === 'function') { - session = session.catch(err => { - return Promise.resolve(opt_onQuit.call(void 0)).then(_ => {throw err;}); - }); - } - return new this(session, executor, flow, opt_onQuit); - } - - /** @override */ - controlFlow() { - return this.flow_; - } - - /** @override */ - schedule(command, description) { - command.setParameter('sessionId', this.session_); - - // If any of the command parameters are rejected promises, those - // rejections may be reported as unhandled before the control flow - // attempts to execute the command. To ensure parameters errors - // propagate through the command itself, we resolve all of the - // command parameters now, but suppress any errors until the ControlFlow - // actually executes the command. This addresses scenarios like catching - // an element not found error in: - // - // driver.findElement(By.id('foo')).click().catch(function(e) { - // if (e instanceof NoSuchElementError) { - // // Do something. - // } - // }); - var prepCommand = toWireValue(command.getParameters()); - prepCommand.catch(function() {}); - - var flow = this.flow_; - var executor = this.executor_; - return flow.execute(() => { - // Retrieve resolved command parameters; any previously suppressed errors - // will now propagate up through the control flow as part of the command - // execution. - return prepCommand.then(function(parameters) { - command.setParameters(parameters); - return executor.execute(command); - }).then(value => fromWireValue(this, value)); - }, description); - } - - /** @override */ - setFileDetector(detector) { - this.fileDetector_ = detector; - } - - /** @override */ - getExecutor() { - return this.executor_; - } - - /** @override */ - getSession() { - return this.session_; - } - - /** @override */ - getCapabilities() { - return this.session_.then(s => s.getCapabilities()); - } - - /** @override */ - quit() { - var result = this.schedule( - new command.Command(command.Name.QUIT), - 'WebDriver.quit()'); - // Delete our session ID when the quit command finishes; this will allow us - // to throw an error when attempting to use a driver post-quit. - return /** @type {!promise.Thenable} */(promise.finally(result, () => { - this.session_ = this.flow_.promise((_, reject) => { - reject(new error.NoSuchSessionError( - 'This driver instance does not have a valid session ID ' + - '(did you call WebDriver.quit()?) and may no longer be used.')); - }); - - // Only want the session rejection to bubble if accessed. - this.session_.catch(function() {}); - - if (this.onQuit_) { - return this.onQuit_.call(void 0); - } - })); - } - - /** @override */ - actions() { - return new actions.ActionSequence(this); - } - - /** @override */ - touchActions() { - return new actions.TouchSequence(this); - } - - /** @override */ - executeScript(script, var_args) { - if (typeof script === 'function') { - script = 'return (' + script + ').apply(null, arguments);'; - } - let args = - arguments.length > 1 ? Array.prototype.slice.call(arguments, 1) : []; - return this.schedule( - new command.Command(command.Name.EXECUTE_SCRIPT). - setParameter('script', script). - setParameter('args', args), - 'WebDriver.executeScript()'); - } - - /** @override */ - executeAsyncScript(script, var_args) { - if (typeof script === 'function') { - script = 'return (' + script + ').apply(null, arguments);'; - } - let args = Array.prototype.slice.call(arguments, 1); - return this.schedule( - new command.Command(command.Name.EXECUTE_ASYNC_SCRIPT). - setParameter('script', script). - setParameter('args', args), - 'WebDriver.executeScript()'); - } - - /** @override */ - call(fn, opt_scope, var_args) { - let args = Array.prototype.slice.call(arguments, 2); - return this.flow_.execute(function() { - return promise.fullyResolved(args).then(function(args) { - if (promise.isGenerator(fn)) { - args.unshift(fn, opt_scope); - return promise.consume.apply(null, args); - } - return fn.apply(opt_scope, args); - }); - }, 'WebDriver.call(' + (fn.name || 'function') + ')'); - } - - /** @override */ - wait(condition, opt_timeout, opt_message) { - if (promise.isPromise(condition)) { - return this.flow_.wait( - /** @type {!IThenable} */(condition), - opt_timeout, opt_message); - } - - var message = opt_message; - var fn = /** @type {!Function} */(condition); - if (condition instanceof Condition) { - message = message || condition.description(); - fn = condition.fn; - } - - if (typeof fn !== 'function') { - throw TypeError( - 'Wait condition must be a promise-like object, function, or a ' - + 'Condition object'); - } - - var driver = this; - var result = this.flow_.wait(function() { - if (promise.isGenerator(fn)) { - return promise.consume(fn, null, [driver]); - } - return fn(driver); - }, opt_timeout, message); - - if (condition instanceof WebElementCondition) { - result = new WebElementPromise(this, result.then(function(value) { - if (!(value instanceof WebElement)) { - throw TypeError( - 'WebElementCondition did not resolve to a WebElement: ' - + Object.prototype.toString.call(value)); - } - return value; - })); - } - return result; - } - - /** @override */ - sleep(ms) { - return this.flow_.timeout(ms, 'WebDriver.sleep(' + ms + ')'); - } - - /** @override */ - getWindowHandle() { - return this.schedule( - new command.Command(command.Name.GET_CURRENT_WINDOW_HANDLE), - 'WebDriver.getWindowHandle()'); - } - - /** @override */ - getAllWindowHandles() { - return this.schedule( - new command.Command(command.Name.GET_WINDOW_HANDLES), - 'WebDriver.getAllWindowHandles()'); - } - - /** @override */ - getPageSource() { - return this.schedule( - new command.Command(command.Name.GET_PAGE_SOURCE), - 'WebDriver.getPageSource()'); - } - - /** @override */ - close() { - return this.schedule(new command.Command(command.Name.CLOSE), - 'WebDriver.close()'); - } - - /** @override */ - get(url) { - return this.navigate().to(url); - } - - /** @override */ - getCurrentUrl() { - return this.schedule( - new command.Command(command.Name.GET_CURRENT_URL), - 'WebDriver.getCurrentUrl()'); - } - - /** @override */ - getTitle() { - return this.schedule(new command.Command(command.Name.GET_TITLE), - 'WebDriver.getTitle()'); - } - - /** @override */ - findElement(locator) { - let id; - locator = by.checkedLocator(locator); - if (typeof locator === 'function') { - id = this.findElementInternal_(locator, this); - } else { - let cmd = new command.Command(command.Name.FIND_ELEMENT). - setParameter('using', locator.using). - setParameter('value', locator.value); - id = this.schedule(cmd, 'WebDriver.findElement(' + locator + ')'); - } - return new WebElementPromise(this, id); - } - - /** - * @param {!Function} locatorFn The locator function to use. - * @param {!(WebDriver|WebElement)} context The search - * context. - * @return {!promise.Thenable} A - * promise that will resolve to a list of WebElements. - * @private - */ - findElementInternal_(locatorFn, context) { - return this.call(() => locatorFn(context)).then(function(result) { - if (Array.isArray(result)) { - result = result[0]; - } - if (!(result instanceof WebElement)) { - throw new TypeError('Custom locator did not return a WebElement'); - } - return result; - }); - } - - /** @override */ - findElements(locator) { - locator = by.checkedLocator(locator); - if (typeof locator === 'function') { - return this.findElementsInternal_(locator, this); - } else { - let cmd = new command.Command(command.Name.FIND_ELEMENTS). - setParameter('using', locator.using). - setParameter('value', locator.value); - return this.schedule(cmd, 'WebDriver.findElements(' + locator + ')') - .then( - (res) => Array.isArray(res) ? res : [], - (e) => { - if (e instanceof error.NoSuchElementError) { - return []; - } - throw e; - }); - } - } - - /** - * @param {!Function} locatorFn The locator function to use. - * @param {!(WebDriver|WebElement)} context The search context. - * @return {!promise.Thenable>} A promise that - * will resolve to an array of WebElements. - * @private - */ - findElementsInternal_(locatorFn, context) { - return this.call(() => locatorFn(context)).then(function(result) { - if (result instanceof WebElement) { - return [result]; - } - - if (!Array.isArray(result)) { - return []; - } - - return result.filter(function(item) { - return item instanceof WebElement; - }); - }); - } - - /** @override */ - takeScreenshot() { - return this.schedule(new command.Command(command.Name.SCREENSHOT), - 'WebDriver.takeScreenshot()'); - } - - /** @override */ - manage() { - return new Options(this); - } - - /** @override */ - navigate() { - return new Navigation(this); - } - - /** @override */ - switchTo() { - return new TargetLocator(this); - } -} - - -/** - * Interface for navigating back and forth in the browser history. - * - * This class should never be instantiated directly. Instead, obtain an instance - * with - * - * webdriver.navigate() - * - * @see WebDriver#navigate() - */ -class Navigation { - /** - * @param {!WebDriver} driver The parent driver. - * @private - */ - constructor(driver) { - /** @private {!WebDriver} */ - this.driver_ = driver; - } - - /** - * Schedules a command to navigate to a new URL. - * @param {string} url The URL to navigate to. - * @return {!promise.Thenable} A promise that will be resolved - * when the URL has been loaded. - */ - to(url) { - return this.driver_.schedule( - new command.Command(command.Name.GET). - setParameter('url', url), - 'WebDriver.navigate().to(' + url + ')'); - } - - /** - * Schedules a command to move backwards in the browser history. - * @return {!promise.Thenable} A promise that will be resolved - * when the navigation event has completed. - */ - back() { - return this.driver_.schedule( - new command.Command(command.Name.GO_BACK), - 'WebDriver.navigate().back()'); - } - - /** - * Schedules a command to move forwards in the browser history. - * @return {!promise.Thenable} A promise that will be resolved - * when the navigation event has completed. - */ - forward() { - return this.driver_.schedule( - new command.Command(command.Name.GO_FORWARD), - 'WebDriver.navigate().forward()'); - } - - /** - * Schedules a command to refresh the current page. - * @return {!promise.Thenable} A promise that will be resolved - * when the navigation event has completed. - */ - refresh() { - return this.driver_.schedule( - new command.Command(command.Name.REFRESH), - 'WebDriver.navigate().refresh()'); - } -} - - -/** - * Provides methods for managing browser and driver state. - * - * This class should never be instantiated directly. Instead, obtain an instance - * with {@linkplain WebDriver#manage() webdriver.manage()}. - */ -class Options { - /** - * @param {!WebDriver} driver The parent driver. - * @private - */ - constructor(driver) { - /** @private {!WebDriver} */ - this.driver_ = driver; - } - - /** - * Schedules a command to add a cookie. - * - * __Sample Usage:__ - * - * // Set a basic cookie. - * driver.manage().addCookie({name: 'foo', value: 'bar'}); - * - * // Set a cookie that expires in 10 minutes. - * let expiry = new Date(Date.now() + (10 * 60 * 1000)); - * driver.manage().addCookie({name: 'foo', value: 'bar', expiry}); - * - * // The cookie expiration may also be specified in seconds since epoch. - * driver.manage().addCookie({ - * name: 'foo', - * value: 'bar', - * expiry: Math.floor(Date.now() / 1000) - * }); - * - * @param {!Options.Cookie} spec Defines the cookie to add. - * @return {!promise.Thenable} A promise that will be resolved - * when the cookie has been added to the page. - * @throws {error.InvalidArgumentError} if any of the cookie parameters are - * invalid. - * @throws {TypeError} if `spec` is not a cookie object. - */ - addCookie({name, value, path, domain, secure, httpOnly, expiry}) { - // We do not allow '=' or ';' in the name. - if (/[;=]/.test(name)) { - throw new error.InvalidArgumentError( - 'Invalid cookie name "' + name + '"'); - } - - // We do not allow ';' in value. - if (/;/.test(value)) { - throw new error.InvalidArgumentError( - 'Invalid cookie value "' + value + '"'); - } - - let cookieString = name + '=' + value + - (domain ? ';domain=' + domain : '') + - (path ? ';path=' + path : '') + - (secure ? ';secure' : ''); - - if (typeof expiry === 'number') { - expiry = Math.floor(expiry); - cookieString += ';expires=' + new Date(expiry * 1000).toUTCString(); - } else if (expiry instanceof Date) { - let date = /** @type {!Date} */(expiry); - expiry = Math.floor(date.getTime() / 1000); - cookieString += ';expires=' + date.toUTCString(); - } - - return this.driver_.schedule( - new command.Command(command.Name.ADD_COOKIE). - setParameter('cookie', { - 'name': name, - 'value': value, - 'path': path, - 'domain': domain, - 'secure': !!secure, - 'httpOnly': !!httpOnly, - 'expiry': expiry - }), - 'WebDriver.manage().addCookie(' + cookieString + ')'); - } - - /** - * Schedules a command to delete all cookies visible to the current page. - * @return {!promise.Thenable} A promise that will be resolved - * when all cookies have been deleted. - */ - deleteAllCookies() { - return this.driver_.schedule( - new command.Command(command.Name.DELETE_ALL_COOKIES), - 'WebDriver.manage().deleteAllCookies()'); - } - - /** - * Schedules a command to delete the cookie with the given name. This command - * is a no-op if there is no cookie with the given name visible to the current - * page. - * @param {string} name The name of the cookie to delete. - * @return {!promise.Thenable} A promise that will be resolved - * when the cookie has been deleted. - */ - deleteCookie(name) { - return this.driver_.schedule( - new command.Command(command.Name.DELETE_COOKIE). - setParameter('name', name), - 'WebDriver.manage().deleteCookie(' + name + ')'); - } - - /** - * Schedules a command to retrieve all cookies visible to the current page. - * Each cookie will be returned as a JSON object as described by the WebDriver - * wire protocol. - * @return {!promise.Thenable>} A promise that will be - * resolved with the cookies visible to the current browsing context. - */ - getCookies() { - return this.driver_.schedule( - new command.Command(command.Name.GET_ALL_COOKIES), - 'WebDriver.manage().getCookies()'); - } - - /** - * Schedules a command to retrieve the cookie with the given name. Returns null - * if there is no such cookie. The cookie will be returned as a JSON object as - * described by the WebDriver wire protocol. - * - * @param {string} name The name of the cookie to retrieve. - * @return {!promise.Thenable} A promise that will be resolved - * with the named cookie, or `null` if there is no such cookie. - */ - getCookie(name) { - return this.getCookies().then(function(cookies) { - for (let cookie of cookies) { - if (cookie && cookie['name'] === name) { - return cookie; - } - } - return null; - }); - } - - /** - * Schedules a command to fetch the timeouts currently configured for the - * current session. - * - * @return {!promise.Thenable<{script: number, - * pageLoad: number, - * implicit: number}>} A promise that will be - * resolved with the timeouts currently configured for the current - * session. - * @see #setTimeouts() - */ - getTimeouts() { - return this.driver_.schedule( - new command.Command(command.Name.GET_TIMEOUT), - `WebDriver.manage().getTimeouts()`) - } - - /** - * Schedules a command to set timeout durations associated with the current - * session. - * - * The following timeouts are supported (all timeouts are specified in - * milliseconds): - * - * - `implicit` specifies the maximum amount of time to wait for an element - * locator to succeed when {@linkplain WebDriver#findElement locating} - * {@linkplain WebDriver#findElements elements} on the page. - * Defaults to 0 milliseconds. - * - * - `pageLoad` specifies the maximum amount of time to wait for a page to - * finishing loading. Defaults to 300000 milliseconds. - * - * - `script` specifies the maximum amount of time to wait for an - * {@linkplain WebDriver#executeScript evaluated script} to run. If set to - * `null`, the script timeout will be indefinite. - * Defaults to 30000 milliseconds. - * - * @param {{script: (number|null|undefined), - * pageLoad: (number|null|undefined), - * implicit: (number|null|undefined)}} conf - * The desired timeout configuration. - * @return {!promise.Thenable} A promise that will be resolved when the - * timeouts have been set. - * @throws {!TypeError} if an invalid options object is provided. - * @see #getTimeouts() - * @see - */ - setTimeouts({script, pageLoad, implicit} = {}) { - let cmd = new command.Command(command.Name.SET_TIMEOUT); - - let valid = false; - function setParam(key, value) { - if (value === null || typeof value === 'number') { - valid = true; - cmd.setParameter(key, value); - } else if (typeof value !== 'undefined') { - throw TypeError( - 'invalid timeouts configuration:' - + ` expected "${key}" to be a number, got ${typeof value}`); - } - } - setParam('implicit', implicit); - setParam('pageLoad', pageLoad); - setParam('script', script); - - if (valid) { - return this.driver_.schedule(cmd, `WebDriver.manage().setTimeouts()`) - .catch(() => { - // Fallback to the legacy method. - let cmds = []; - if (typeof script === 'number') { - cmds.push(legacyTimeout(this.driver_, 'script', script)); - } - if (typeof implicit === 'number') { - cmds.push(legacyTimeout(this.driver_, 'implicit', implicit)); - } - if (typeof pageLoad === 'number') { - cmds.push(legacyTimeout(this.driver_, 'page load', pageLoad)); - } - return Promise.all(cmds); - }); - } - throw TypeError('no timeouts specified'); - } - - /** - * @return {!Logs} The interface for managing driver - * logs. - */ - logs() { - return new Logs(this.driver_); - } - - /** - * @return {!Timeouts} The interface for managing driver timeouts. - * @deprecated Use {@link #setTimeouts()} instead. - */ - timeouts() { - return new Timeouts(this.driver_); - } - - /** - * @return {!Window} The interface for managing the current window. - */ - window() { - return new Window(this.driver_); - } -} - - -/** - * @param {!WebDriver} driver - * @param {string} type - * @param {number} ms - * @return {!promise.Thenable} - */ -function legacyTimeout(driver, type, ms) { - return driver.schedule( - new command.Command(command.Name.SET_TIMEOUT) - .setParameter('type', type) - .setParameter('ms', ms), - `WebDriver.manage().setTimeouts({${type}: ${ms}})`); -} - - - -/** - * A record object describing a browser cookie. - * - * @record - */ -Options.Cookie = function() {}; - - -/** - * The name of the cookie. - * - * @type {string} - */ -Options.Cookie.prototype.name; - - -/** - * The cookie value. - * - * @type {string} - */ -Options.Cookie.prototype.value; - - -/** - * The cookie path. Defaults to "/" when adding a cookie. - * - * @type {(string|undefined)} - */ -Options.Cookie.prototype.path; - - -/** - * The domain the cookie is visible to. Defaults to the current browsing - * context's document's URL when adding a cookie. - * - * @type {(string|undefined)} - */ -Options.Cookie.prototype.domain; - - -/** - * Whether the cookie is a secure cookie. Defaults to false when adding a new - * cookie. - * - * @type {(boolean|undefined)} - */ -Options.Cookie.prototype.secure; - - -/** - * Whether the cookie is an HTTP only cookie. Defaults to false when adding a - * new cookie. - * - * @type {(boolean|undefined)} - */ -Options.Cookie.prototype.httpOnly; - - -/** - * When the cookie expires. - * - * When {@linkplain Options#addCookie() adding a cookie}, this may be specified - * as a {@link Date} object, or in _seconds_ since Unix epoch (January 1, 1970). - * - * The expiry is always returned in seconds since epoch when - * {@linkplain Options#getCookies() retrieving cookies} from the browser. - * - * @type {(!Date|number|undefined)} - */ -Options.Cookie.prototype.expiry; - - -/** - * An interface for managing timeout behavior for WebDriver instances. - * - * This class should never be instantiated directly. Instead, obtain an instance - * with - * - * webdriver.manage().timeouts() - * - * @deprecated This has been deprecated in favor of - * {@link Options#setTimeouts()}, which supports setting multiple timeouts - * at once. - * @see WebDriver#manage() - * @see Options#timeouts() - */ -class Timeouts { - /** - * @param {!WebDriver} driver The parent driver. - * @private - */ - constructor(driver) { - /** @private {!WebDriver} */ - this.driver_ = driver; - } - - /** - * Specifies the amount of time the driver should wait when searching for an - * element if it is not immediately present. - * - * When searching for a single element, the driver should poll the page - * until the element has been found, or this timeout expires before failing - * with a {@link bot.ErrorCode.NO_SUCH_ELEMENT} error. When searching - * for multiple elements, the driver should poll the page until at least one - * element has been found or this timeout has expired. - * - * Setting the wait timeout to 0 (its default value), disables implicit - * waiting. - * - * Increasing the implicit wait timeout should be used judiciously as it - * will have an adverse effect on test run time, especially when used with - * slower location strategies like XPath. - * - * @param {number} ms The amount of time to wait, in milliseconds. - * @return {!promise.Thenable} A promise that will be resolved - * when the implicit wait timeout has been set. - * @deprecated Use {@link Options#setTimeouts() - * driver.manage().setTimeouts({implicit: ms})}. - */ - implicitlyWait(ms) { - return this.driver_.manage().setTimeouts({implicit: ms}); - } - - /** - * Sets the amount of time to wait, in milliseconds, for an asynchronous - * script to finish execution before returning an error. If the timeout is - * less than or equal to 0, the script will be allowed to run indefinitely. - * - * @param {number} ms The amount of time to wait, in milliseconds. - * @return {!promise.Thenable} A promise that will be resolved - * when the script timeout has been set. - * @deprecated Use {@link Options#setTimeouts() - * driver.manage().setTimeouts({script: ms})}. - */ - setScriptTimeout(ms) { - return this.driver_.manage().setTimeouts({script: ms}); - } - - /** - * Sets the amount of time to wait for a page load to complete before - * returning an error. If the timeout is negative, page loads may be - * indefinite. - * - * @param {number} ms The amount of time to wait, in milliseconds. - * @return {!promise.Thenable} A promise that will be resolved - * when the timeout has been set. - * @deprecated Use {@link Options#setTimeouts() - * driver.manage().setTimeouts({pageLoad: ms})}. - */ - pageLoadTimeout(ms) { - return this.driver_.manage().setTimeouts({pageLoad: ms}); - } -} - - -/** - * An interface for managing the current window. - * - * This class should never be instantiated directly. Instead, obtain an instance - * with - * - * webdriver.manage().window() - * - * @see WebDriver#manage() - * @see Options#window() - */ -class Window { - /** - * @param {!WebDriver} driver The parent driver. - * @private - */ - constructor(driver) { - /** @private {!WebDriver} */ - this.driver_ = driver; - } - - /** - * Retrieves the window's current position, relative to the top left corner of - * the screen. - * @return {!promise.Thenable<{x: number, y: number}>} A promise - * that will be resolved with the window's position in the form of a - * {x:number, y:number} object literal. - */ - getPosition() { - return this.driver_.schedule( - new command.Command(command.Name.GET_WINDOW_POSITION). - setParameter('windowHandle', 'current'), - 'WebDriver.manage().window().getPosition()'); - } - - /** - * Repositions the current window. - * @param {number} x The desired horizontal position, relative to the left - * side of the screen. - * @param {number} y The desired vertical position, relative to the top of the - * of the screen. - * @return {!promise.Thenable} A promise that will be resolved - * when the command has completed. - */ - setPosition(x, y) { - return this.driver_.schedule( - new command.Command(command.Name.SET_WINDOW_POSITION). - setParameter('windowHandle', 'current'). - setParameter('x', x). - setParameter('y', y), - 'WebDriver.manage().window().setPosition(' + x + ', ' + y + ')'); - } - - /** - * Retrieves the window's current size. - * @return {!promise.Thenable<{width: number, height: number}>} A - * promise that will be resolved with the window's size in the form of a - * {width:number, height:number} object literal. - */ - getSize() { - return this.driver_.schedule( - new command.Command(command.Name.GET_WINDOW_SIZE). - setParameter('windowHandle', 'current'), - 'WebDriver.manage().window().getSize()'); - } - - /** - * Resizes the current window. - * @param {number} width The desired window width. - * @param {number} height The desired window height. - * @return {!promise.Thenable} A promise that will be resolved - * when the command has completed. - */ - setSize(width, height) { - return this.driver_.schedule( - new command.Command(command.Name.SET_WINDOW_SIZE). - setParameter('windowHandle', 'current'). - setParameter('width', width). - setParameter('height', height), - 'WebDriver.manage().window().setSize(' + width + ', ' + height + ')'); - } - - /** - * Maximizes the current window. - * @return {!promise.Thenable} A promise that will be resolved - * when the command has completed. - */ - maximize() { - return this.driver_.schedule( - new command.Command(command.Name.MAXIMIZE_WINDOW). - setParameter('windowHandle', 'current'), - 'WebDriver.manage().window().maximize()'); - } -} - - -/** - * Interface for managing WebDriver log records. - * - * This class should never be instantiated directly. Instead, obtain an - * instance with - * - * webdriver.manage().logs() - * - * @see WebDriver#manage() - * @see Options#logs() - */ -class Logs { - /** - * @param {!WebDriver} driver The parent driver. - * @private - */ - constructor(driver) { - /** @private {!WebDriver} */ - this.driver_ = driver; - } - - /** - * Fetches available log entries for the given type. - * - * Note that log buffers are reset after each call, meaning that available - * log entries correspond to those entries not yet returned for a given log - * type. In practice, this means that this call will return the available log - * entries since the last call, or from the start of the session. - * - * @param {!logging.Type} type The desired log type. - * @return {!promise.Thenable>} A - * promise that will resolve to a list of log entries for the specified - * type. - */ - get(type) { - let cmd = new command.Command(command.Name.GET_LOG). - setParameter('type', type); - return this.driver_.schedule( - cmd, 'WebDriver.manage().logs().get(' + type + ')'). - then(function(entries) { - return entries.map(function(entry) { - if (!(entry instanceof logging.Entry)) { - return new logging.Entry( - entry['level'], entry['message'], entry['timestamp'], - entry['type']); - } - return entry; - }); - }); - } - - /** - * Retrieves the log types available to this driver. - * @return {!promise.Thenable>} A - * promise that will resolve to a list of available log types. - */ - getAvailableLogTypes() { - return this.driver_.schedule( - new command.Command(command.Name.GET_AVAILABLE_LOG_TYPES), - 'WebDriver.manage().logs().getAvailableLogTypes()'); - } -} - - -/** - * An interface for changing the focus of the driver to another frame or window. - * - * This class should never be instantiated directly. Instead, obtain an - * instance with - * - * webdriver.switchTo() - * - * @see WebDriver#switchTo() - */ -class TargetLocator { - /** - * @param {!WebDriver} driver The parent driver. - * @private - */ - constructor(driver) { - /** @private {!WebDriver} */ - this.driver_ = driver; - } - - /** - * Schedules a command retrieve the {@code document.activeElement} element on - * the current document, or {@code document.body} if activeElement is not - * available. - * @return {!WebElementPromise} The active element. - */ - activeElement() { - var id = this.driver_.schedule( - new command.Command(command.Name.GET_ACTIVE_ELEMENT), - 'WebDriver.switchTo().activeElement()'); - return new WebElementPromise(this.driver_, id); - } - - /** - * Schedules a command to switch focus of all future commands to the topmost - * frame on the page. - * @return {!promise.Thenable} A promise that will be resolved - * when the driver has changed focus to the default content. - */ - defaultContent() { - return this.driver_.schedule( - new command.Command(command.Name.SWITCH_TO_FRAME). - setParameter('id', null), - 'WebDriver.switchTo().defaultContent()'); - } - - /** - * Schedules a command to switch the focus of all future commands to another - * frame on the page. The target frame may be specified as one of the - * following: - * - * - A number that specifies a (zero-based) index into [window.frames]( - * https://developer.mozilla.org/en-US/docs/Web/API/Window.frames). - * - A {@link WebElement} reference, which correspond to a `frame` or `iframe` - * DOM element. - * - The `null` value, to select the topmost frame on the page. Passing `null` - * is the same as calling {@link #defaultContent defaultContent()}. - * - * If the specified frame can not be found, the returned promise will be - * rejected with a {@linkplain error.NoSuchFrameError}. - * - * @param {(number|WebElement|null)} id The frame locator. - * @return {!promise.Thenable} A promise that will be resolved - * when the driver has changed focus to the specified frame. - */ - frame(id) { - return this.driver_.schedule( - new command.Command(command.Name.SWITCH_TO_FRAME). - setParameter('id', id), - 'WebDriver.switchTo().frame(' + id + ')'); - } - - /** - * Schedules a command to switch the focus of all future commands to another - * window. Windows may be specified by their {@code window.name} attribute or - * by its handle (as returned by {@link WebDriver#getWindowHandles}). - * - * If the specified window cannot be found, the returned promise will be - * rejected with a {@linkplain error.NoSuchWindowError}. - * - * @param {string} nameOrHandle The name or window handle of the window to - * switch focus to. - * @return {!promise.Thenable} A promise that will be resolved - * when the driver has changed focus to the specified window. - */ - window(nameOrHandle) { - return this.driver_.schedule( - new command.Command(command.Name.SWITCH_TO_WINDOW). - // "name" supports the legacy drivers. "handle" is the W3C - // compliant parameter. - setParameter('name', nameOrHandle). - setParameter('handle', nameOrHandle), - 'WebDriver.switchTo().window(' + nameOrHandle + ')'); - } - - /** - * Schedules a command to change focus to the active modal dialog, such as - * those opened by `window.alert()`, `window.confirm()`, and - * `window.prompt()`. The returned promise will be rejected with a - * {@linkplain error.NoSuchAlertError} if there are no open alerts. - * - * @return {!AlertPromise} The open alert. - */ - alert() { - var text = this.driver_.schedule( - new command.Command(command.Name.GET_ALERT_TEXT), - 'WebDriver.switchTo().alert()'); - var driver = this.driver_; - return new AlertPromise(driver, text.then(function(text) { - return new Alert(driver, text); - })); - } -} - - -////////////////////////////////////////////////////////////////////////////// -// -// WebElement -// -////////////////////////////////////////////////////////////////////////////// - - -const LEGACY_ELEMENT_ID_KEY = 'ELEMENT'; -const ELEMENT_ID_KEY = 'element-6066-11e4-a52e-4f735466cecf'; - - -/** - * Represents a DOM element. WebElements can be found by searching from the - * document root using a {@link WebDriver} instance, or by searching - * under another WebElement: - * - * driver.get('http://www.google.com'); - * var searchForm = driver.findElement(By.tagName('form')); - * var searchBox = searchForm.findElement(By.name('q')); - * searchBox.sendKeys('webdriver'); - */ -class WebElement { - /** - * @param {!WebDriver} driver the parent WebDriver instance for this element. - * @param {(!IThenable|string)} id The server-assigned opaque ID for - * the underlying DOM element. - */ - constructor(driver, id) { - /** @private {!WebDriver} */ - this.driver_ = driver; - - /** @private {!promise.Thenable} */ - this.id_ = driver.controlFlow().promise(resolve => resolve(id)); - } - - /** - * @param {string} id The raw ID. - * @param {boolean=} opt_noLegacy Whether to exclude the legacy element key. - * @return {!Object} The element ID for use with WebDriver's wire protocol. - */ - static buildId(id, opt_noLegacy) { - return opt_noLegacy - ? {[ELEMENT_ID_KEY]: id} - : {[ELEMENT_ID_KEY]: id, [LEGACY_ELEMENT_ID_KEY]: id}; - } - - /** - * Extracts the encoded WebElement ID from the object. - * - * @param {?} obj The object to extract the ID from. - * @return {string} the extracted ID. - * @throws {TypeError} if the object is not a valid encoded ID. - */ - static extractId(obj) { - if (obj && typeof obj === 'object') { - if (typeof obj[ELEMENT_ID_KEY] === 'string') { - return obj[ELEMENT_ID_KEY]; - } else if (typeof obj[LEGACY_ELEMENT_ID_KEY] === 'string') { - return obj[LEGACY_ELEMENT_ID_KEY]; - } - } - throw new TypeError('object is not a WebElement ID'); - } - - /** - * @param {?} obj the object to test. - * @return {boolean} whether the object is a valid encoded WebElement ID. - */ - static isId(obj) { - return obj && typeof obj === 'object' - && (typeof obj[ELEMENT_ID_KEY] === 'string' - || typeof obj[LEGACY_ELEMENT_ID_KEY] === 'string'); - } - - /** - * Compares two WebElements for equality. - * - * @param {!WebElement} a A WebElement. - * @param {!WebElement} b A WebElement. - * @return {!promise.Thenable} A promise that will be - * resolved to whether the two WebElements are equal. - */ - static equals(a, b) { - if (a === b) { - return a.driver_.controlFlow().promise(resolve => resolve(true)); - } - let ids = [a.getId(), b.getId()]; - return promise.all(ids).then(function(ids) { - // If the two element's have the same ID, they should be considered - // equal. Otherwise, they may still be equivalent, but we'll need to - // ask the server to check for us. - if (ids[0] === ids[1]) { - return true; - } - - let cmd = new command.Command(command.Name.ELEMENT_EQUALS); - cmd.setParameter('id', ids[0]); - cmd.setParameter('other', ids[1]); - return a.driver_.schedule(cmd, 'WebElement.equals()'); - }); - } - - /** @return {!WebDriver} The parent driver for this instance. */ - getDriver() { - return this.driver_; - } - - /** - * @return {!promise.Thenable} A promise that resolves to - * the server-assigned opaque ID assigned to this element. - */ - getId() { - return this.id_; - } - - /** - * @return {!Object} Returns the serialized representation of this WebElement. - */ - [Symbols.serialize]() { - return this.getId().then(WebElement.buildId); - } - - /** - * Schedules a command that targets this element with the parent WebDriver - * instance. Will ensure this element's ID is included in the command - * parameters under the "id" key. - * - * @param {!command.Command} command The command to schedule. - * @param {string} description A description of the command for debugging. - * @return {!promise.Thenable} A promise that will be resolved - * with the command result. - * @template T - * @see WebDriver#schedule - * @private - */ - schedule_(command, description) { - command.setParameter('id', this); - return this.driver_.schedule(command, description); - } - - /** - * Schedule a command to find a descendant of this element. If the element - * cannot be found, the returned promise will be rejected with a - * {@linkplain error.NoSuchElementError NoSuchElementError}. - * - * The search criteria for an element may be defined using one of the static - * factories on the {@link by.By} class, or as a short-hand - * {@link ./by.ByHash} object. For example, the following two statements - * are equivalent: - * - * var e1 = element.findElement(By.id('foo')); - * var e2 = element.findElement({id:'foo'}); - * - * You may also provide a custom locator function, which takes as input this - * instance and returns a {@link WebElement}, or a promise that will resolve - * to a WebElement. If the returned promise resolves to an array of - * WebElements, WebDriver will use the first element. For example, to find the - * first visible link on a page, you could write: - * - * var link = element.findElement(firstVisibleLink); - * - * function firstVisibleLink(element) { - * var links = element.findElements(By.tagName('a')); - * return promise.filter(links, function(link) { - * return link.isDisplayed(); - * }); - * } - * - * @param {!(by.By|Function)} locator The locator strategy to use when - * searching for the element. - * @return {!WebElementPromise} A WebElement that can be used to issue - * commands against the located element. If the element is not found, the - * element will be invalidated and all scheduled commands aborted. - */ - findElement(locator) { - locator = by.checkedLocator(locator); - let id; - if (typeof locator === 'function') { - id = this.driver_.findElementInternal_(locator, this); - } else { - let cmd = new command.Command( - command.Name.FIND_CHILD_ELEMENT). - setParameter('using', locator.using). - setParameter('value', locator.value); - id = this.schedule_(cmd, 'WebElement.findElement(' + locator + ')'); - } - return new WebElementPromise(this.driver_, id); - } - - /** - * Schedules a command to find all of the descendants of this element that - * match the given search criteria. - * - * @param {!(by.By|Function)} locator The locator strategy to use when - * searching for the element. - * @return {!promise.Thenable>} A - * promise that will resolve to an array of WebElements. - */ - findElements(locator) { - locator = by.checkedLocator(locator); - let id; - if (typeof locator === 'function') { - return this.driver_.findElementsInternal_(locator, this); - } else { - var cmd = new command.Command( - command.Name.FIND_CHILD_ELEMENTS). - setParameter('using', locator.using). - setParameter('value', locator.value); - return this.schedule_(cmd, 'WebElement.findElements(' + locator + ')') - .then(result => Array.isArray(result) ? result : []); - } - } - - /** - * Schedules a command to click on this element. - * @return {!promise.Thenable} A promise that will be resolved - * when the click command has completed. - */ - click() { - return this.schedule_( - new command.Command(command.Name.CLICK_ELEMENT), - 'WebElement.click()'); - } - - /** - * Schedules a command to type a sequence on the DOM element represented by - * this instance. - * - * Modifier keys (SHIFT, CONTROL, ALT, META) are stateful; once a modifier is - * processed in the key sequence, that key state is toggled until one of the - * following occurs: - * - * - The modifier key is encountered again in the sequence. At this point the - * state of the key is toggled (along with the appropriate keyup/down - * events). - * - The {@link input.Key.NULL} key is encountered in the sequence. When - * this key is encountered, all modifier keys current in the down state are - * released (with accompanying keyup events). The NULL key can be used to - * simulate common keyboard shortcuts: - * - * element.sendKeys("text was", - * Key.CONTROL, "a", Key.NULL, - * "now text is"); - * // Alternatively: - * element.sendKeys("text was", - * Key.chord(Key.CONTROL, "a"), - * "now text is"); - * - * - The end of the key sequence is encountered. When there are no more keys - * to type, all depressed modifier keys are released (with accompanying - * keyup events). - * - * If this element is a file input ({@code }), the - * specified key sequence should specify the path to the file to attach to - * the element. This is analogous to the user clicking "Browse..." and entering - * the path into the file select dialog. - * - * var form = driver.findElement(By.css('form')); - * var element = form.findElement(By.css('input[type=file]')); - * element.sendKeys('/path/to/file.txt'); - * form.submit(); - * - * For uploads to function correctly, the entered path must reference a file - * on the _browser's_ machine, not the local machine running this script. When - * running against a remote Selenium server, a {@link input.FileDetector} - * may be used to transparently copy files to the remote machine before - * attempting to upload them in the browser. - * - * __Note:__ On browsers where native keyboard events are not supported - * (e.g. Firefox on OS X), key events will be synthesized. Special - * punctuation keys will be synthesized according to a standard QWERTY en-us - * keyboard layout. - * - * @param {...(number|string|!IThenable<(number|string)>)} var_args The - * sequence of keys to type. Number keys may be referenced numerically or - * by string (1 or '1'). All arguments will be joined into a single - * sequence. - * @return {!promise.Thenable} A promise that will be resolved - * when all keys have been typed. - */ - sendKeys(var_args) { - let keys = Promise.all(Array.prototype.slice.call(arguments, 0)). - then(keys => { - let ret = []; - keys.forEach(key => { - let type = typeof key; - if (type === 'number') { - key = String(key); - } else if (type !== 'string') { - throw TypeError( - 'each key must be a number of string; got ' + type); - } - - // The W3C protocol requires keys to be specified as an array where - // each element is a single key. - ret.push.apply(ret, key.split('')); - }); - return ret; - }); - - if (!this.driver_.fileDetector_) { - return this.schedule_( - new command.Command(command.Name.SEND_KEYS_TO_ELEMENT). - setParameter('text', keys.then(keys => keys.join(''))). - setParameter('value', keys), - 'WebElement.sendKeys()'); - } - - // Suppress unhandled rejection errors until the flow executes the command. - keys.catch(function() {}); - - var element = this; - return this.getDriver().controlFlow().execute(function() { - return keys.then(function(keys) { - return element.driver_.fileDetector_ - .handleFile(element.driver_, keys.join('')); - }).then(function(keys) { - return element.schedule_( - new command.Command(command.Name.SEND_KEYS_TO_ELEMENT). - setParameter('text', keys). - setParameter('value', keys.split('')), - 'WebElement.sendKeys()'); - }); - }, 'WebElement.sendKeys()'); - } - - /** - * Schedules a command to query for the tag/node name of this element. - * @return {!promise.Thenable} A promise that will be - * resolved with the element's tag name. - */ - getTagName() { - return this.schedule_( - new command.Command(command.Name.GET_ELEMENT_TAG_NAME), - 'WebElement.getTagName()'); - } - - /** - * Schedules a command to query for the computed style of the element - * represented by this instance. If the element inherits the named style from - * its parent, the parent will be queried for its value. Where possible, color - * values will be converted to their hex representation (e.g. #00ff00 instead - * of rgb(0, 255, 0)). - * - * _Warning:_ the value returned will be as the browser interprets it, so - * it may be tricky to form a proper assertion. - * - * @param {string} cssStyleProperty The name of the CSS style property to look - * up. - * @return {!promise.Thenable} A promise that will be - * resolved with the requested CSS value. - */ - getCssValue(cssStyleProperty) { - var name = command.Name.GET_ELEMENT_VALUE_OF_CSS_PROPERTY; - return this.schedule_( - new command.Command(name). - setParameter('propertyName', cssStyleProperty), - 'WebElement.getCssValue(' + cssStyleProperty + ')'); - } - - /** - * Schedules a command to query for the value of the given attribute of the - * element. Will return the current value, even if it has been modified after - * the page has been loaded. More exactly, this method will return the value - * of the given attribute, unless that attribute is not present, in which case - * the value of the property with the same name is returned. If neither value - * is set, null is returned (for example, the "value" property of a textarea - * element). The "style" attribute is converted as best can be to a - * text representation with a trailing semi-colon. The following are deemed to - * be "boolean" attributes and will return either "true" or null: - * - * async, autofocus, autoplay, checked, compact, complete, controls, declare, - * defaultchecked, defaultselected, defer, disabled, draggable, ended, - * formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, - * loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, - * paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, - * selected, spellcheck, truespeed, willvalidate - * - * Finally, the following commonly mis-capitalized attribute/property names - * are evaluated as expected: - * - * - "class" - * - "readonly" - * - * @param {string} attributeName The name of the attribute to query. - * @return {!promise.Thenable} A promise that will be - * resolved with the attribute's value. The returned value will always be - * either a string or null. - */ - getAttribute(attributeName) { - return this.schedule_( - new command.Command(command.Name.GET_ELEMENT_ATTRIBUTE). - setParameter('name', attributeName), - 'WebElement.getAttribute(' + attributeName + ')'); - } - - /** - * Get the visible (i.e. not hidden by CSS) innerText of this element, - * including sub-elements, without any leading or trailing whitespace. - * - * @return {!promise.Thenable} A promise that will be - * resolved with the element's visible text. - */ - getText() { - return this.schedule_( - new command.Command(command.Name.GET_ELEMENT_TEXT), - 'WebElement.getText()'); - } - - /** - * Schedules a command to compute the size of this element's bounding box, in - * pixels. - * @return {!promise.Thenable<{width: number, height: number}>} A - * promise that will be resolved with the element's size as a - * {@code {width:number, height:number}} object. - */ - getSize() { - return this.schedule_( - new command.Command(command.Name.GET_ELEMENT_SIZE), - 'WebElement.getSize()'); - } - - /** - * Schedules a command to compute the location of this element in page space. - * @return {!promise.Thenable<{x: number, y: number}>} A promise that - * will be resolved to the element's location as a - * {@code {x:number, y:number}} object. - */ - getLocation() { - return this.schedule_( - new command.Command(command.Name.GET_ELEMENT_LOCATION), - 'WebElement.getLocation()'); - } - - /** - * Schedules a command to query whether the DOM element represented by this - * instance is enabled, as dictated by the {@code disabled} attribute. - * @return {!promise.Thenable} A promise that will be - * resolved with whether this element is currently enabled. - */ - isEnabled() { - return this.schedule_( - new command.Command(command.Name.IS_ELEMENT_ENABLED), - 'WebElement.isEnabled()'); - } - - /** - * Schedules a command to query whether this element is selected. - * @return {!promise.Thenable} A promise that will be - * resolved with whether this element is currently selected. - */ - isSelected() { - return this.schedule_( - new command.Command(command.Name.IS_ELEMENT_SELECTED), - 'WebElement.isSelected()'); - } - - /** - * Schedules a command to submit the form containing this element (or this - * element if it is a FORM element). This command is a no-op if the element is - * not contained in a form. - * @return {!promise.Thenable} A promise that will be resolved - * when the form has been submitted. - */ - submit() { - return this.schedule_( - new command.Command(command.Name.SUBMIT_ELEMENT), - 'WebElement.submit()'); - } - - /** - * Schedules a command to clear the `value` of this element. This command has - * no effect if the underlying DOM element is neither a text INPUT element - * nor a TEXTAREA element. - * @return {!promise.Thenable} A promise that will be resolved - * when the element has been cleared. - */ - clear() { - return this.schedule_( - new command.Command(command.Name.CLEAR_ELEMENT), - 'WebElement.clear()'); - } - - /** - * Schedules a command to test whether this element is currently displayed. - * @return {!promise.Thenable} A promise that will be - * resolved with whether this element is currently visible on the page. - */ - isDisplayed() { - return this.schedule_( - new command.Command(command.Name.IS_ELEMENT_DISPLAYED), - 'WebElement.isDisplayed()'); - } - - /** - * Take a screenshot of the visible region encompassed by this element's - * bounding rectangle. - * - * @param {boolean=} opt_scroll Optional argument that indicates whether the - * element should be scrolled into view before taking a screenshot. - * Defaults to false. - * @return {!promise.Thenable} A promise that will be - * resolved to the screenshot as a base-64 encoded PNG. - */ - takeScreenshot(opt_scroll) { - var scroll = !!opt_scroll; - return this.schedule_( - new command.Command(command.Name.TAKE_ELEMENT_SCREENSHOT) - .setParameter('scroll', scroll), - 'WebElement.takeScreenshot(' + scroll + ')'); - } -} - - -/** - * WebElementPromise is a promise that will be fulfilled with a WebElement. - * This serves as a forward proxy on WebElement, allowing calls to be - * scheduled without directly on this instance before the underlying - * WebElement has been fulfilled. In other words, the following two statements - * are equivalent: - * - * driver.findElement({id: 'my-button'}).click(); - * driver.findElement({id: 'my-button'}).then(function(el) { - * return el.click(); - * }); - * - * @implements {promise.CancellableThenable} - * @final - */ -class WebElementPromise extends WebElement { - /** - * @param {!WebDriver} driver The parent WebDriver instance for this - * element. - * @param {!promise.Thenable} el A promise - * that will resolve to the promised element. - */ - constructor(driver, el) { - super(driver, 'unused'); - - /** - * Cancel operation is only supported if the wrapped thenable is also - * cancellable. - * @param {(string|Error)=} opt_reason - * @override - */ - this.cancel = function(opt_reason) { - if (promise.CancellableThenable.isImplementation(el)) { - /** @type {!promise.CancellableThenable} */(el).cancel(opt_reason); - } - }; - - /** @override */ - this.then = el.then.bind(el); - - /** @override */ - this.catch = el.catch.bind(el); - - /** - * Defers returning the element ID until the wrapped WebElement has been - * resolved. - * @override - */ - this.getId = function() { - return el.then(function(el) { - return el.getId(); - }); - }; - } -} -promise.CancellableThenable.addImplementation(WebElementPromise); - - -////////////////////////////////////////////////////////////////////////////// -// -// Alert -// -////////////////////////////////////////////////////////////////////////////// - - -/** - * Represents a modal dialog such as {@code alert}, {@code confirm}, or - * {@code prompt}. Provides functions to retrieve the message displayed with - * the alert, accept or dismiss the alert, and set the response text (in the - * case of {@code prompt}). - */ -class Alert { - /** - * @param {!WebDriver} driver The driver controlling the browser this alert - * is attached to. - * @param {string} text The message text displayed with this alert. - */ - constructor(driver, text) { - /** @private {!WebDriver} */ - this.driver_ = driver; - - /** @private {!promise.Thenable} */ - this.text_ = driver.controlFlow().promise(resolve => resolve(text)); - } - - /** - * Retrieves the message text displayed with this alert. For instance, if the - * alert were opened with alert("hello"), then this would return "hello". - * - * @return {!promise.Thenable} A promise that will be - * resolved to the text displayed with this alert. - */ - getText() { - return this.text_; - } - - /** - * Sets the username and password in an alert prompting for credentials (such - * as a Basic HTTP Auth prompt). This method will implicitly - * {@linkplain #accept() submit} the dialog. - * - * @param {string} username The username to send. - * @param {string} password The password to send. - * @return {!promise.Thenable} A promise that will be resolved when this - * command has completed. - */ - authenticateAs(username, password) { - return this.driver_.schedule( - new command.Command(command.Name.SET_ALERT_CREDENTIALS), - 'WebDriver.switchTo().alert()' - + `.authenticateAs("${username}", "${password}")`); - } - - /** - * Accepts this alert. - * - * @return {!promise.Thenable} A promise that will be resolved - * when this command has completed. - */ - accept() { - return this.driver_.schedule( - new command.Command(command.Name.ACCEPT_ALERT), - 'WebDriver.switchTo().alert().accept()'); - } - - /** - * Dismisses this alert. - * - * @return {!promise.Thenable} A promise that will be resolved - * when this command has completed. - */ - dismiss() { - return this.driver_.schedule( - new command.Command(command.Name.DISMISS_ALERT), - 'WebDriver.switchTo().alert().dismiss()'); - } - - /** - * Sets the response text on this alert. This command will return an error if - * the underlying alert does not support response text (e.g. window.alert and - * window.confirm). - * - * @param {string} text The text to set. - * @return {!promise.Thenable} A promise that will be resolved - * when this command has completed. - */ - sendKeys(text) { - return this.driver_.schedule( - new command.Command(command.Name.SET_ALERT_TEXT). - setParameter('text', text), - 'WebDriver.switchTo().alert().sendKeys(' + text + ')'); - } -} - - -/** - * AlertPromise is a promise that will be fulfilled with an Alert. This promise - * serves as a forward proxy on an Alert, allowing calls to be scheduled - * directly on this instance before the underlying Alert has been fulfilled. In - * other words, the following two statements are equivalent: - * - * driver.switchTo().alert().dismiss(); - * driver.switchTo().alert().then(function(alert) { - * return alert.dismiss(); - * }); - * - * @implements {promise.CancellableThenable} - * @final - */ -class AlertPromise extends Alert { - /** - * @param {!WebDriver} driver The driver controlling the browser this - * alert is attached to. - * @param {!promise.Thenable} alert A thenable - * that will be fulfilled with the promised alert. - */ - constructor(driver, alert) { - super(driver, 'unused'); - - /** - * Cancel operation is only supported if the wrapped thenable is also - * cancellable. - * @param {(string|Error)=} opt_reason - * @override - */ - this.cancel = function(opt_reason) { - if (promise.CancellableThenable.isImplementation(alert)) { - /** @type {!promise.CancellableThenable} */(alert).cancel(opt_reason); - } - }; - - /** @override */ - this.then = alert.then.bind(alert); - - /** @override */ - this.catch = alert.catch.bind(alert); - - /** - * Defer returning text until the promised alert has been resolved. - * @override - */ - this.getText = function() { - return alert.then(function(alert) { - return alert.getText(); - }); - }; - - /** - * Defers action until the alert has been located. - * @override - */ - this.authenticateAs = function(username, password) { - return alert.then(function(alert) { - return alert.authenticateAs(username, password); - }); - }; - - /** - * Defers action until the alert has been located. - * @override - */ - this.accept = function() { - return alert.then(function(alert) { - return alert.accept(); - }); - }; - - /** - * Defers action until the alert has been located. - * @override - */ - this.dismiss = function() { - return alert.then(function(alert) { - return alert.dismiss(); - }); - }; - - /** - * Defers action until the alert has been located. - * @override - */ - this.sendKeys = function(text) { - return alert.then(function(alert) { - return alert.sendKeys(text); - }); - }; - } -} -promise.CancellableThenable.addImplementation(AlertPromise); - - -// PUBLIC API - - -module.exports = { - Alert: Alert, - AlertPromise: AlertPromise, - Condition: Condition, - Logs: Logs, - Navigation: Navigation, - Options: Options, - TargetLocator: TargetLocator, - Timeouts: Timeouts, - IWebDriver: IWebDriver, - WebDriver: WebDriver, - WebElement: WebElement, - WebElementCondition: WebElementCondition, - WebElementPromise: WebElementPromise, - Window: Window -}; diff --git a/test-eol-project/node_modules/selenium-webdriver/net/index.js b/test-eol-project/node_modules/selenium-webdriver/net/index.js deleted file mode 100644 index 6c193db5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/net/index.js +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var os = require('os'); - - -function getLoInterface() { - var name; - if (process.platform === 'darwin') { - name = 'lo0'; - } else if (process.platform === 'linux') { - name = 'lo'; - } - return name ? os.networkInterfaces()[name] : null; -} - - -/** - * Queries the system network interfaces for an IP address. - * @param {boolean} loopback Whether to find a loopback address. - * @param {string=} opt_family The IP family (IPv4 or IPv6). Defaults to IPv4. - * @return {string} The located IP address or undefined. - */ -function getAddress(loopback, opt_family) { - var family = opt_family || 'IPv4'; - var addresses = []; - - var interfaces; - if (loopback) { - var lo = getLoInterface(); - interfaces = lo ? [lo] : null; - } - interfaces = interfaces || os.networkInterfaces(); - for (var key in interfaces) { - if (!interfaces.hasOwnProperty(key)) { - continue; - } - - interfaces[key].forEach(function(ipAddress) { - if (ipAddress.family === family && - ipAddress.internal === loopback) { - addresses.push(ipAddress.address); - } - }); - } - return addresses[0]; -} - - -// PUBLIC API - - -/** - * Retrieves the external IP address for this host. - * @param {string=} opt_family The IP family to retrieve. Defaults to "IPv4". - * @return {string} The IP address or undefined if not available. - */ -exports.getAddress = function(opt_family) { - return getAddress(false, opt_family); -}; - - -/** - * Retrieves a loopback address for this machine. - * @param {string=} opt_family The IP family to retrieve. Defaults to "IPv4". - * @return {string} The IP address or undefined if not available. - */ -exports.getLoopbackAddress = function(opt_family) { - return getAddress(true, opt_family); -}; - - -/** - * Splits a hostport string, e.g. "www.example.com:80", into its component - * parts. - * - * @param {string} hostport The string to split. - * @return {{host: string, port: ?number}} A host and port. If no port is - * present in the argument `hostport`, port is null. - */ -exports.splitHostAndPort = function(hostport) { - let lastIndex = hostport.lastIndexOf(':'); - if (lastIndex < 0) { - return {host: hostport, port: null}; - } - - let firstIndex = hostport.indexOf(':'); - if (firstIndex != lastIndex && !hostport.includes('[')) { - // Multiple colons but no brackets, so assume the string is an IPv6 address - // with no port (e.g. "1234:5678:9:0:1234:5678:9:0"). - return {host: hostport, port: null}; - } - - let host = hostport.slice(0, lastIndex); - if (host.startsWith('[') && host.endsWith(']')) { - host = host.slice(1, -1); - } - - let port = parseInt(hostport.slice(lastIndex + 1), 10); - return {host, port}; -}; diff --git a/test-eol-project/node_modules/selenium-webdriver/net/portprober.js b/test-eol-project/node_modules/selenium-webdriver/net/portprober.js deleted file mode 100644 index 311077b6..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/net/portprober.js +++ /dev/null @@ -1,205 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var exec = require('child_process').exec, - fs = require('fs'), - net = require('net'); - - -/** - * The IANA suggested ephemeral port range. - * @type {{min: number, max: number}} - * @const - * @see http://en.wikipedia.org/wiki/Ephemeral_ports - */ -const DEFAULT_IANA_RANGE = {min: 49152, max: 65535}; - - -/** - * The epheremal port range for the current system. Lazily computed on first - * access. - * @type {Promise.<{min: number, max: number}>} - */ -var systemRange = null; - - -/** - * Computes the ephemeral port range for the current system. This is based on - * http://stackoverflow.com/a/924337. - * @return {!Promise<{min: number, max: number}>} A promise that will resolve to - * the ephemeral port range of the current system. - */ -function findSystemPortRange() { - if (systemRange) { - return systemRange; - } - var range = process.platform === 'win32' ? - findWindowsPortRange() : findUnixPortRange(); - return systemRange = range.catch(function() { - return DEFAULT_IANA_RANGE; - }); -} - - -/** - * Executes a command and returns its output if it succeeds. - * @param {string} cmd The command to execute. - * @return {!Promise} A promise that will resolve with the command's - * stdout data. - */ -function execute(cmd) { - return new Promise((resolve, reject) => { - exec(cmd, function(err, stdout) { - if (err) { - reject(err); - } else { - resolve(stdout); - } - }); - }); -} - - -/** - * Computes the ephemeral port range for a Unix-like system. - * @return {!Promise<{min: number, max: number}>} A promise that will resolve - * with the ephemeral port range on the current system. - */ -function findUnixPortRange() { - var cmd; - if (process.platform === 'sunos') { - cmd = - '/usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port'; - } else if (fs.existsSync('/proc/sys/net/ipv4/ip_local_port_range')) { - // Linux - cmd = 'cat /proc/sys/net/ipv4/ip_local_port_range'; - } else { - cmd = 'sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last' + - ' | sed -e "s/.*:\\s*//"'; - } - - return execute(cmd).then(function(stdout) { - if (!stdout || !stdout.length) return DEFAULT_IANA_RANGE; - var range = stdout.trim().split(/\s+/).map(Number); - if (range.some(isNaN)) return DEFAULT_IANA_RANGE; - return {min: range[0], max: range[1]}; - }); -} - - -/** - * Computes the ephemeral port range for a Windows system. - * @return {!Promise<{min: number, max: number}>} A promise that will resolve - * with the ephemeral port range on the current system. - */ -function findWindowsPortRange() { - // First, check if we're running on XP. If this initial command fails, - // we just fallback on the default IANA range. - return execute('cmd.exe /c ver').then(function(stdout) { - if (/Windows XP/.test(stdout)) { - // TODO: Try to read these values from the registry. - return {min: 1025, max: 5000}; - } else { - return execute('netsh int ipv4 show dynamicport tcp'). - then(function(stdout) { - /* > netsh int ipv4 show dynamicport tcp - Protocol tcp Dynamic Port Range - --------------------------------- - Start Port : 49152 - Number of Ports : 16384 - */ - var range = stdout.split(/\n/).filter(function(line) { - return /.*:\s*\d+/.test(line); - }).map(function(line) { - return Number(line.split(/:\s*/)[1]); - }); - - return { - min: range[0], - max: range[0] + range[1] - }; - }); - } - }); -} - - -/** - * Tests if a port is free. - * @param {number} port The port to test. - * @param {string=} opt_host The bound host to test the {@code port} against. - * Defaults to {@code INADDR_ANY}. - * @return {!Promise} A promise that will resolve with whether the port - * is free. - */ -function isFree(port, opt_host) { - return new Promise((resolve, reject) => { - let server = net.createServer().on('error', function(e) { - if (e.code === 'EADDRINUSE') { - resolve(false); - } else { - reject(e); - } - }); - - server.listen(port, opt_host, function() { - server.close(() => resolve(true)); - }); - }); -} - - -/** - * @param {string=} opt_host The bound host to test the {@code port} against. - * Defaults to {@code INADDR_ANY}. - * @return {!Promise} A promise that will resolve to a free port. If a - * port cannot be found, the promise will be rejected. - */ -function findFreePort(opt_host) { - return findSystemPortRange().then(function(range) { - var attempts = 0; - return new Promise((resolve, reject) => { - findPort(); - - function findPort() { - attempts += 1; - if (attempts > 10) { - reject(Error('Unable to find a free port')); - } - - var port = Math.floor( - Math.random() * (range.max - range.min) + range.min); - isFree(port, opt_host).then(function(isFree) { - if (isFree) { - resolve(port); - } else { - findPort(); - } - }, findPort); - } - }); - }); -} - - -// PUBLIC API - - -exports.findFreePort = findFreePort; -exports.isFree = isFree; diff --git a/test-eol-project/node_modules/selenium-webdriver/opera.js b/test-eol-project/node_modules/selenium-webdriver/opera.js deleted file mode 100644 index 3cc06ae6..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/opera.js +++ /dev/null @@ -1,405 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Defines a {@linkplain Driver WebDriver} client for the - * Opera web browser (v26+). Before using this module, you must download the - * latest OperaDriver - * [release](https://github.com/operasoftware/operachromiumdriver/releases) and - * ensure it can be found on your system - * [PATH](http://en.wikipedia.org/wiki/PATH_%28variable%29). - * - * There are three primary classes exported by this module: - * - * 1. {@linkplain ServiceBuilder}: configures the - * {@link selenium-webdriver/remote.DriverService remote.DriverService} - * that manages the - * [OperaDriver](https://github.com/operasoftware/operachromiumdriver) - * child process. - * - * 2. {@linkplain Options}: defines configuration options for each new Opera - * session, such as which {@linkplain Options#setProxy proxy} to use, - * what {@linkplain Options#addExtensions extensions} to install, or - * what {@linkplain Options#addArguments command-line switches} to use when - * starting the browser. - * - * 3. {@linkplain Driver}: the WebDriver client; each new instance will control - * a unique browser session with a clean user profile (unless otherwise - * configured through the {@link Options} class). - * - * By default, every Opera session will use a single driver service, which is - * started the first time a {@link Driver} instance is created and terminated - * when this process exits. The default service will inherit its environment - * from the current process and direct all output to /dev/null. You may obtain - * a handle to this default service using - * {@link #getDefaultService getDefaultService()} and change its configuration - * with {@link #setDefaultService setDefaultService()}. - * - * You may also create a {@link Driver} with its own driver service. This is - * useful if you need to capture the server's log output for a specific session: - * - * var opera = require('selenium-webdriver/opera'); - * - * var service = new opera.ServiceBuilder() - * .loggingTo('/my/log/file.txt') - * .enableVerboseLogging() - * .build(); - * - * var options = new opera.Options(); - * // configure browser options ... - * - * var driver = opera.Driver.createSession(options, service); - * - * Users should only instantiate the {@link Driver} class directly when they - * need a custom driver service configuration (as shown above). For normal - * operation, users should start Opera using the - * {@link selenium-webdriver.Builder}. - */ - -'use strict'; - -const fs = require('fs'); - -const http = require('./http'), - io = require('./io'), - capabilities = require('./lib/capabilities'), - promise = require('./lib/promise'), - Symbols = require('./lib/symbols'), - webdriver = require('./lib/webdriver'), - portprober = require('./net/portprober'), - remote = require('./remote'); - - -/** - * Name of the OperaDriver executable. - * @type {string} - * @const - */ -const OPERADRIVER_EXE = - process.platform === 'win32' ? 'operadriver.exe' : 'operadriver'; - - -/** - * Creates {@link remote.DriverService} instances that manages an - * [OperaDriver](https://github.com/operasoftware/operachromiumdriver) - * server in a child process. - */ -class ServiceBuilder extends remote.DriverService.Builder { - /** - * @param {string=} opt_exe Path to the server executable to use. If omitted, - * the builder will attempt to locate the operadriver on the current - * PATH. - * @throws {Error} If provided executable does not exist, or the operadriver - * cannot be found on the PATH. - */ - constructor(opt_exe) { - let exe = opt_exe || io.findInPath(OPERADRIVER_EXE, true); - if (!exe) { - throw Error( - 'The OperaDriver could not be found on the current PATH. Please ' + - 'download the latest version of the OperaDriver from ' + - 'https://github.com/operasoftware/operachromiumdriver/releases and ' + - 'ensure it can be found on your PATH.'); - } - - super(exe); - this.setLoopback(true); - } - - /** - * Sets the path of the log file the driver should log to. If a log file is - * not specified, the driver will log to stderr. - * @param {string} path Path of the log file to use. - * @return {!ServiceBuilder} A self reference. - */ - loggingTo(path) { - return this.addArguments('--log-path=' + path); - } - - /** - * Enables verbose logging. - * @return {!ServiceBuilder} A self reference. - */ - enableVerboseLogging() { - return this.addArguments('--verbose'); - } - - /** - * Silence sthe drivers output. - * @return {!ServiceBuilder} A self reference. - */ - silent() { - return this.addArguments('--silent'); - } -} - - - -/** @type {remote.DriverService} */ -var defaultService = null; - - -/** - * Sets the default service to use for new OperaDriver instances. - * @param {!remote.DriverService} service The service to use. - * @throws {Error} If the default service is currently running. - */ -function setDefaultService(service) { - if (defaultService && defaultService.isRunning()) { - throw Error( - 'The previously configured OperaDriver service is still running. ' + - 'You must shut it down before you may adjust its configuration.'); - } - defaultService = service; -} - - -/** - * Returns the default OperaDriver service. If such a service has not been - * configured, one will be constructed using the default configuration for - * a OperaDriver executable found on the system PATH. - * @return {!remote.DriverService} The default OperaDriver service. - */ -function getDefaultService() { - if (!defaultService) { - defaultService = new ServiceBuilder().build(); - } - return defaultService; -} - - -/** - * @type {string} - * @const - */ -var OPTIONS_CAPABILITY_KEY = 'chromeOptions'; - - -/** - * Class for managing {@linkplain Driver OperaDriver} specific options. - */ -class Options { - constructor() { - /** @private {!Array.} */ - this.args_ = []; - - /** @private {?string} */ - this.binary_ = null; - - /** @private {!Array.<(string|!Buffer)>} */ - this.extensions_ = []; - - /** @private {./lib/logging.Preferences} */ - this.logPrefs_ = null; - - /** @private {?capabilities.ProxyConfig} */ - this.proxy_ = null; - } - - /** - * Extracts the OperaDriver specific options from the given capabilities - * object. - * @param {!capabilities.Capabilities} caps The capabilities object. - * @return {!Options} The OperaDriver options. - */ - static fromCapabilities(caps) { - var options; - var o = caps.get(OPTIONS_CAPABILITY_KEY); - if (o instanceof Options) { - options = o; - } else if (o) { - options = new Options() - .addArguments(o.args || []) - .addExtensions(o.extensions || []) - .setOperaBinaryPath(o.binary); - } else { - options = new Options; - } - - if (caps.has(capabilities.Capability.PROXY)) { - options.setProxy(caps.get(capabilities.Capability.PROXY)); - } - - if (caps.has(capabilities.Capability.LOGGING_PREFS)) { - options.setLoggingPrefs( - caps.get(capabilities.Capability.LOGGING_PREFS)); - } - - return options; - } - - /** - * Add additional command line arguments to use when launching the Opera - * browser. Each argument may be specified with or without the "--" prefix - * (e.g. "--foo" and "foo"). Arguments with an associated value should be - * delimited by an "=": "foo=bar". - * @param {...(string|!Array.)} var_args The arguments to add. - * @return {!Options} A self reference. - */ - addArguments(var_args) { - this.args_ = this.args_.concat.apply(this.args_, arguments); - return this; - } - - /** - * Add additional extensions to install when launching Opera. Each extension - * should be specified as the path to the packed CRX file, or a Buffer for an - * extension. - * @param {...(string|!Buffer|!Array.<(string|!Buffer)>)} var_args The - * extensions to add. - * @return {!Options} A self reference. - */ - addExtensions(var_args) { - this.extensions_ = this.extensions_.concat.apply( - this.extensions_, arguments); - return this; - } - - /** - * Sets the path to the Opera binary to use. On Mac OS X, this path should - * reference the actual Opera executable, not just the application binary. The - * binary path be absolute or relative to the operadriver server executable, but - * it must exist on the machine that will launch Opera. - * - * @param {string} path The path to the Opera binary to use. - * @return {!Options} A self reference. - */ - setOperaBinaryPath(path) { - this.binary_ = path; - return this; - } - - /** - * Sets the logging preferences for the new session. - * @param {!./lib/logging.Preferences} prefs The logging preferences. - * @return {!Options} A self reference. - */ - setLoggingPrefs(prefs) { - this.logPrefs_ = prefs; - return this; - } - - /** - * Sets the proxy settings for the new session. - * @param {capabilities.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy) { - this.proxy_ = proxy; - return this; - } - - /** - * Converts this options instance to a {@link capabilities.Capabilities} - * object. - * @param {capabilities.Capabilities=} opt_capabilities The capabilities to - * merge these options into, if any. - * @return {!capabilities.Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities) { - var caps = opt_capabilities || capabilities.Capabilities.opera(); - caps. - set(capabilities.Capability.PROXY, this.proxy_). - set(capabilities.Capability.LOGGING_PREFS, this.logPrefs_). - set(OPTIONS_CAPABILITY_KEY, this); - return caps; - } - - /** - * Converts this instance to its JSON wire protocol representation. Note this - * function is an implementation not intended for general use. - * @return {!Object} The JSON wire protocol representation of this instance. - */ - [Symbols.serialize]() { - var json = { - args: this.args_, - extensions: this.extensions_.map(function(extension) { - if (Buffer.isBuffer(extension)) { - return extension.toString('base64'); - } - return io.read(/** @type {string} */(extension)) - .then(buffer => buffer.toString('base64')); - }) - }; - if (this.binary_) { - json.binary = this.binary_; - } - return json; - } -} - - -/** - * Creates a new WebDriver client for Opera. - */ -class Driver extends webdriver.WebDriver { - /** - * Creates a new session for Opera. - * - * @param {(capabilities.Capabilities|Options)=} opt_config The configuration - * options. - * @param {remote.DriverService=} opt_service The session to use; will use - * the {@link getDefaultService default service} by default. - * @param {promise.ControlFlow=} opt_flow The control flow to use, - * or {@code null} to use the currently active flow. - * @return {!Driver} A new driver instance. - */ - static createSession(opt_config, opt_service, opt_flow) { - var service = opt_service || getDefaultService(); - var client = service.start().then(url => new http.HttpClient(url)); - var executor = new http.Executor(client); - - var caps = - opt_config instanceof Options ? opt_config.toCapabilities() : - (opt_config || capabilities.Capabilities.opera()); - - // On Linux, the OperaDriver does not look for Opera on the PATH, so we - // must explicitly find it. See: operachromiumdriver #9. - if (process.platform === 'linux') { - var options = Options.fromCapabilities(caps); - if (!options.binary_) { - let exe = io.findInPath('opera', true); - if (!exe) { - throw Error( - 'The opera executable could not be found on the current PATH'); - } - options.setOperaBinaryPath(exe); - } - caps = options.toCapabilities(caps); - } - - return /** @type {!Driver} */( - super.createSession(executor, caps, opt_flow)); - } - - /** - * This function is a no-op as file detectors are not supported by this - * implementation. - * @override - */ - setFileDetector() {} -} - - -// PUBLIC API - - -exports.Driver = Driver; -exports.Options = Options; -exports.ServiceBuilder = ServiceBuilder; -exports.getDefaultService = getDefaultService; -exports.setDefaultService = setDefaultService; diff --git a/test-eol-project/node_modules/selenium-webdriver/package.json b/test-eol-project/node_modules/selenium-webdriver/package.json deleted file mode 100644 index d9506121..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "selenium-webdriver", - "version": "3.6.0", - "description": "The official WebDriver JavaScript bindings from the Selenium project", - "license": "Apache-2.0", - "keywords": [ - "automation", - "selenium", - "testing", - "webdriver", - "webdriverjs" - ], - "homepage": "https://github.com/SeleniumHQ/selenium", - "bugs": { - "url": "https://github.com/SeleniumHQ/selenium/issues" - }, - "main": "./index", - "repository": { - "type": "git", - "url": "https://github.com/SeleniumHQ/selenium.git" - }, - "engines": { - "node": ">= 6.9.0" - }, - "dependencies": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" - }, - "devDependencies": { - "express": "^4.14.0", - "mocha": "^3.1.2", - "multer": "^1.2.0", - "promises-aplus-tests": "^2.1.2", - "serve-index": "^1.8.0", - "sinon": "^1.17.6" - }, - "scripts": { - "test": "mocha -t 600000 --recursive test" - } -} diff --git a/test-eol-project/node_modules/selenium-webdriver/phantomjs.js b/test-eol-project/node_modules/selenium-webdriver/phantomjs.js deleted file mode 100644 index 89720a50..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/phantomjs.js +++ /dev/null @@ -1,282 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Defines a {@linkplain Driver WebDriver} client for the - * PhantomJS web browser. By default, it is expected that the PhantomJS - * executable can be located on your - * [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) - * - * __Using a Custom PhantomJS Binary__ - * - * If you have PhantomJS.exe placed somewhere other than the root of your - * working directory, you can build a custom Capability and attach the - * executable's location to the Capability - * - * For example, if you're using the - * [phantomjs-prebuilt](https://www.npmjs.com/package/phantomjs-prebuilt) module - * from npm: - * - * //setup custom phantomJS capability - * var phantomjs_exe = require('phantomjs-prebuilt').path; - * var customPhantom = selenium.Capabilities.phantomjs(); - * customPhantom.set("phantomjs.binary.path", phantomjs_exe); - * //build custom phantomJS driver - * var driver = new selenium.Builder(). - * withCapabilities(customPhantom). - * build(); - * - */ - -'use strict'; - -const fs = require('fs'); - -const http = require('./http'), - io = require('./io'), - capabilities = require('./lib/capabilities'), - command = require('./lib/command'), - logging = require('./lib/logging'), - promise = require('./lib/promise'), - webdriver = require('./lib/webdriver'), - portprober = require('./net/portprober'), - remote = require('./remote'); - - -/** - * Name of the PhantomJS executable. - * @type {string} - * @const - */ -const PHANTOMJS_EXE = - process.platform === 'win32' ? 'phantomjs.exe' : 'phantomjs'; - - -/** - * Capability that designates the location of the PhantomJS executable to use. - * @type {string} - * @const - */ -const BINARY_PATH_CAPABILITY = 'phantomjs.binary.path'; - - -/** - * Capability that designates the CLI arguments to pass to PhantomJS. - * @type {string} - * @const - */ -const CLI_ARGS_CAPABILITY = 'phantomjs.cli.args'; - - -/** - * Custom command names supported by PhantomJS. - * @enum {string} - */ -const Command = { - EXECUTE_PHANTOM_SCRIPT: 'executePhantomScript' -}; - - -/** - * Finds the PhantomJS executable. - * @param {string=} opt_exe Path to the executable to use. - * @return {string} The located executable. - * @throws {Error} If the executable cannot be found on the PATH, or if the - * provided executable path does not exist. - */ -function findExecutable(opt_exe) { - var exe = opt_exe || io.findInPath(PHANTOMJS_EXE, true); - if (!exe) { - throw Error( - 'The PhantomJS executable could not be found on the current PATH. ' + - 'Please download the latest version from ' + - 'http://phantomjs.org/download.html and ensure it can be found on ' + - 'your PATH. For more information, see ' + - 'https://github.com/ariya/phantomjs/wiki'); - } - if (!fs.existsSync(exe)) { - throw Error('File does not exist: ' + exe); - } - return exe; -} - - -/** - * Maps WebDriver logging level name to those recognised by PhantomJS. - * @const {!Map} - */ -const WEBDRIVER_TO_PHANTOMJS_LEVEL = new Map([ - [logging.Level.ALL.name, 'DEBUG'], - [logging.Level.DEBUG.name, 'DEBUG'], - [logging.Level.INFO.name, 'INFO'], - [logging.Level.WARNING.name, 'WARN'], - [logging.Level.SEVERE.name, 'ERROR']]); - - -/** - * Creates a command executor with support for PhantomJS' custom commands. - * @param {!Promise} url The server's URL. - * @return {!command.Executor} The new command executor. - */ -function createExecutor(url) { - let client = url.then(url => new http.HttpClient(url)); - let executor = new http.Executor(client); - - executor.defineCommand( - Command.EXECUTE_PHANTOM_SCRIPT, - 'POST', '/session/:sessionId/phantom/execute'); - - return executor; -} - -/** - * Creates a new WebDriver client for PhantomJS. - */ -class Driver extends webdriver.WebDriver { - /** - * Creates a new PhantomJS session. - * - * @param {capabilities.Capabilities=} opt_capabilities The desired - * capabilities. - * @param {promise.ControlFlow=} opt_flow The control flow to use, - * or {@code null} to use the currently active flow. - * @param {string=} opt_logFile Path to the log file for the phantomjs - * executable's output. For convenience, this may be set at runtime with - * the `SELENIUM_PHANTOMJS_LOG` environment variable. - * @return {!Driver} A new driver reference. - */ - static createSession(opt_capabilities, opt_flow, opt_logFile) { - // TODO: add an Options class for consistency with the other driver types. - - var caps = opt_capabilities || capabilities.Capabilities.phantomjs(); - var exe = findExecutable(caps.get(BINARY_PATH_CAPABILITY)); - var args = []; - - var logPrefs = caps.get(capabilities.Capability.LOGGING_PREFS); - if (logPrefs instanceof logging.Preferences) { - logPrefs = logPrefs.toJSON(); - } - - if (logPrefs && logPrefs[logging.Type.DRIVER]) { - let level = WEBDRIVER_TO_PHANTOMJS_LEVEL.get( - logPrefs[logging.Type.DRIVER]); - if (level) { - args.push('--webdriver-loglevel=' + level); - } - } - - opt_logFile = process.env['SELENIUM_PHANTOMJS_LOG'] || opt_logFile; - if (typeof opt_logFile === 'string') { - args.push('--webdriver-logfile=' + opt_logFile); - } - - var proxy = caps.get(capabilities.Capability.PROXY); - if (proxy) { - switch (proxy.proxyType) { - case 'manual': - if (proxy.httpProxy) { - args.push( - '--proxy-type=http', - '--proxy=' + proxy.httpProxy); - console.log(args); - } - break; - case 'pac': - throw Error('PhantomJS does not support Proxy PAC files'); - case 'system': - args.push('--proxy-type=system'); - break; - case 'direct': - args.push('--proxy-type=none'); - break; - } - } - args = args.concat(caps.get(CLI_ARGS_CAPABILITY) || []); - - var port = portprober.findFreePort(); - var service = new remote.DriverService(exe, { - port: port, - args: Promise.resolve(port).then(function(port) { - args.push('--webdriver=' + port); - return args; - }) - }); - - var executor = createExecutor(service.start()); - return /** @type {!Driver} */(super.createSession( - executor, caps, opt_flow, () => service.kill())); - } - - /** - * This function is a no-op as file detectors are not supported by this - * implementation. - * @override - */ - setFileDetector() {} - - /** - * Executes a PhantomJS fragment. This method is similar to - * {@link #executeScript}, except it exposes the - * PhantomJS API to the injected - * script. - * - *

    The injected script will execute in the context of PhantomJS's - * {@code page} variable. If a page has not been loaded before calling this - * method, one will be created.

    - * - *

    Be sure to wrap callback definitions in a try/catch block, as failures - * may cause future WebDriver calls to fail.

    - * - *

    Certain callbacks are used by GhostDriver (the PhantomJS WebDriver - * implementation) and overriding these may cause the script to fail. It is - * recommended that you check for existing callbacks before defining your own. - *

    - * - * As with {@link #executeScript}, the injected script may be defined as - * a string for an anonymous function body (e.g. "return 123;"), or as a - * function. If a function is provided, it will be decompiled to its original - * source. Note that injecting functions is provided as a convenience to - * simplify defining complex scripts. Care must be taken that the function - * only references variables that will be defined in the page's scope and - * that the function does not override {@code Function.prototype.toString} - * (overriding toString() will interfere with how the function is - * decompiled. - * - * @param {(string|!Function)} script The script to execute. - * @param {...*} var_args The arguments to pass to the script. - * @return {!promise.Thenable} A promise that resolve to the - * script's return value. - * @template T - */ - executePhantomJS(script, var_args) { - if (typeof script === 'function') { - script = 'return (' + script + ').apply(this, arguments);'; - } - var args = arguments.length > 1 - ? Array.prototype.slice.call(arguments, 1) : []; - return this.schedule( - new command.Command(Command.EXECUTE_PHANTOM_SCRIPT) - .setParameter('script', script) - .setParameter('args', args), - 'Driver.executePhantomJS()'); - } -} - - -// PUBLIC API - -exports.Driver = Driver; diff --git a/test-eol-project/node_modules/selenium-webdriver/proxy.js b/test-eol-project/node_modules/selenium-webdriver/proxy.js deleted file mode 100644 index 80e52a7a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/proxy.js +++ /dev/null @@ -1,32 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Proxy module alias. - * - * var webdriver = require('selenium-webdriver'), - * proxy = require('selenium-webdriver/proxy'); - * - * var driver = new webdriver.Builder() - * .withCapabilities(webdriver.Capabilities.chrome()) - * .setProxy(proxy.manual({http: 'host:1234'})) - * .build(); - */ - -'use strict'; - -module.exports = require('./lib/proxy'); diff --git a/test-eol-project/node_modules/selenium-webdriver/remote/index.js b/test-eol-project/node_modules/selenium-webdriver/remote/index.js deleted file mode 100644 index 04f0e13f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/remote/index.js +++ /dev/null @@ -1,604 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const url = require('url'); -const util = require('util'); - -const httpUtil = require('../http/util'); -const io = require('../io'); -const exec = require('../io/exec'); -const {Zip} = require('../io/zip'); -const cmd = require('../lib/command'); -const input = require('../lib/input'); -const promise = require('../lib/promise'); -const webdriver = require('../lib/webdriver'); -const net = require('../net'); -const portprober = require('../net/portprober'); - - -/** - * @typedef {(string|!Array)} - */ -var StdIoOptions; - - -/** - * @typedef {(string|!IThenable)} - */ -var CommandLineFlag; - - -/** - * A record object that defines the configuration options for a DriverService - * instance. - * - * @record - */ -function ServiceOptions() {} - -/** - * Whether the service should only be accessed on this host's loopback address. - * - * @type {(boolean|undefined)} - */ -ServiceOptions.prototype.loopback; - -/** - * The host name to access the server on. If this option is specified, the - * {@link #loopback} option will be ignored. - * - * @type {(string|undefined)} - */ -ServiceOptions.prototype.hostname; - -/** - * The port to start the server on (must be > 0). If the port is provided as a - * promise, the service will wait for the promise to resolve before starting. - * - * @type {(number|!IThenable)} - */ -ServiceOptions.prototype.port; - -/** - * The arguments to pass to the service. If a promise is provided, the service - * will wait for it to resolve before starting. - * - * @type {!(Array|IThenable>)} - */ -ServiceOptions.prototype.args; - -/** - * The base path on the server for the WebDriver wire protocol (e.g. '/wd/hub'). - * Defaults to '/'. - * - * @type {(string|undefined|null)} - */ -ServiceOptions.prototype.path; - -/** - * The environment variables that should be visible to the server process. - * Defaults to inheriting the current process's environment. - * - * @type {(Object|undefined)} - */ -ServiceOptions.prototype.env; - -/** - * IO configuration for the spawned server process. For more information, refer - * to the documentation of `child_process.spawn`. - * - * @type {(StdIoOptions|undefined)} - * @see https://nodejs.org/dist/latest-v4.x/docs/api/child_process.html#child_process_options_stdio - */ -ServiceOptions.prototype.stdio; - - -/** - * Manages the life and death of a native executable WebDriver server. - * - * It is expected that the driver server implements the - * https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol. - * Furthermore, the managed server should support multiple concurrent sessions, - * so that this class may be reused for multiple clients. - */ -class DriverService { - /** - * @param {string} executable Path to the executable to run. - * @param {!ServiceOptions} options Configuration options for the service. - */ - constructor(executable, options) { - /** @private {string} */ - this.executable_ = executable; - - /** @private {boolean} */ - this.loopbackOnly_ = !!options.loopback; - - /** @private {(string|undefined)} */ - this.hostname_ = options.hostname; - - /** @private {(number|!IThenable)} */ - this.port_ = options.port; - - /** - * @private {!(Array| - * IThenable>)} - */ - this.args_ = options.args; - - /** @private {string} */ - this.path_ = options.path || '/'; - - /** @private {!Object} */ - this.env_ = options.env || process.env; - - /** - * @private {(string|!Array)} - */ - this.stdio_ = options.stdio || 'ignore'; - - /** - * A promise for the managed subprocess, or null if the server has not been - * started yet. This promise will never be rejected. - * @private {Promise} - */ - this.command_ = null; - - /** - * Promise that resolves to the server's address or null if the server has - * not been started. This promise will be rejected if the server terminates - * before it starts accepting WebDriver requests. - * @private {Promise} - */ - this.address_ = null; - } - - /** - * @return {!Promise} A promise that resolves to the server's address. - * @throws {Error} If the server has not been started. - */ - address() { - if (this.address_) { - return this.address_; - } - throw Error('Server has not been started.'); - } - - /** - * Returns whether the underlying process is still running. This does not take - * into account whether the process is in the process of shutting down. - * @return {boolean} Whether the underlying service process is running. - */ - isRunning() { - return !!this.address_; - } - - /** - * Starts the server if it is not already running. - * @param {number=} opt_timeoutMs How long to wait, in milliseconds, for the - * server to start accepting requests. Defaults to 30 seconds. - * @return {!Promise} A promise that will resolve to the server's base - * URL when it has started accepting requests. If the timeout expires - * before the server has started, the promise will be rejected. - */ - start(opt_timeoutMs) { - if (this.address_) { - return this.address_; - } - - var timeout = opt_timeoutMs || DriverService.DEFAULT_START_TIMEOUT_MS; - var self = this; - - let resolveCommand; - this.command_ = new Promise(resolve => resolveCommand = resolve); - - this.address_ = new Promise((resolveAddress, rejectAddress) => { - resolveAddress(Promise.resolve(this.port_).then(port => { - if (port <= 0) { - throw Error('Port must be > 0: ' + port); - } - - return resolveCommandLineFlags(this.args_).then(args => { - var command = exec(self.executable_, { - args: args, - env: self.env_, - stdio: self.stdio_ - }); - - resolveCommand(command); - - var earlyTermination = command.result().then(function(result) { - var error = result.code == null ? - Error('Server was killed with ' + result.signal) : - Error('Server terminated early with status ' + result.code); - rejectAddress(error); - self.address_ = null; - self.command_ = null; - throw error; - }); - - var hostname = self.hostname_; - if (!hostname) { - hostname = !self.loopbackOnly_ && net.getAddress() - || net.getLoopbackAddress(); - } - - var serverUrl = url.format({ - protocol: 'http', - hostname: hostname, - port: port + '', - pathname: self.path_ - }); - - return new Promise((fulfill, reject) => { - let cancelToken = - earlyTermination.catch(e => reject(Error(e.message))); - - httpUtil.waitForServer(serverUrl, timeout, cancelToken) - .then(_ => fulfill(serverUrl), err => { - if (err instanceof promise.CancellationError) { - fulfill(serverUrl); - } else { - reject(err); - } - }); - }); - }); - })); - }); - - return this.address_; - } - - /** - * Stops the service if it is not currently running. This function will kill - * the server immediately. To synchronize with the active control flow, use - * {@link #stop()}. - * @return {!Promise} A promise that will be resolved when the server has been - * stopped. - */ - kill() { - if (!this.address_ || !this.command_) { - return Promise.resolve(); // Not currently running. - } - let cmd = this.command_; - this.address_ = null; - this.command_ = null; - return cmd.then(c => c.kill('SIGTERM')); - } - - /** - * Schedules a task in the current control flow to stop the server if it is - * currently running. - * @return {!promise.Thenable} A promise that will be resolved when - * the server has been stopped. - */ - stop() { - return promise.controlFlow().execute(this.kill.bind(this)); - } -} - - -/** - * @param {!(Array|IThenable>)} args - * @return {!Promise>} - */ -function resolveCommandLineFlags(args) { - // Resolve the outer array, then the individual flags. - return Promise.resolve(args) - .then(/** !Array */args => Promise.all(args)); -} - - -/** - * The default amount of time, in milliseconds, to wait for the server to - * start. - * @const {number} - */ -DriverService.DEFAULT_START_TIMEOUT_MS = 30 * 1000; - - -/** - * Creates {@link DriverService} objects that manage a WebDriver server in a - * child process. - */ -DriverService.Builder = class { - /** - * @param {string} exe Path to the executable to use. This executable must - * accept the `--port` flag for defining the port to start the server on. - * @throws {Error} If the provided executable path does not exist. - */ - constructor(exe) { - if (!fs.existsSync(exe)) { - throw Error(`The specified executable path does not exist: ${exe}`); - } - - /** @private @const {string} */ - this.exe_ = exe; - - /** @private {!ServiceOptions} */ - this.options_ = { - args: [], - port: 0, - env: null, - stdio: 'ignore' - }; - } - - /** - * Define additional command line arguments to use when starting the server. - * - * @param {...CommandLineFlag} var_args The arguments to include. - * @return {!THIS} A self reference. - * @this {THIS} - * @template THIS - */ - addArguments(var_args) { - let args = Array.prototype.slice.call(arguments, 0); - this.options_.args = this.options_.args.concat(args); - return this; - } - - /** - * Sets the host name to access the server on. If specified, the - * {@linkplain #setLoopback() loopback} setting will be ignored. - * - * @param {string} hostname - * @return {!DriverService.Builder} A self reference. - */ - setHostname(hostname) { - this.options_.hostname = hostname; - return this; - } - - /** - * Sets whether the service should be accessed at this host's loopback - * address. - * - * @param {boolean} loopback - * @return {!DriverService.Builder} A self reference. - */ - setLoopback(loopback) { - this.options_.loopback = loopback; - return this; - } - - /** - * Sets the base path for WebDriver REST commands (e.g. "/wd/hub"). - * By default, the driver will accept commands relative to "/". - * - * @param {?string} basePath The base path to use, or `null` to use the - * default. - * @return {!DriverService.Builder} A self reference. - */ - setPath(basePath) { - this.options_.path = basePath; - return this; - } - - /** - * Sets the port to start the server on. - * - * @param {number} port The port to use, or 0 for any free port. - * @return {!DriverService.Builder} A self reference. - * @throws {Error} If an invalid port is specified. - */ - setPort(port) { - if (port < 0) { - throw Error(`port must be >= 0: ${port}`); - } - this.options_.port = port; - return this; - } - - /** - * Defines the environment to start the server under. This setting will be - * inherited by every browser session started by the server. By default, the - * server will inherit the enviroment of the current process. - * - * @param {(Map|Object|null)} env The desired - * environment to use, or `null` if the server should inherit the - * current environment. - * @return {!DriverService.Builder} A self reference. - */ - setEnvironment(env) { - if (env instanceof Map) { - let tmp = {}; - env.forEach((value, key) => tmp[key] = value); - env = tmp; - } - this.options_.env = env; - return this; - } - - /** - * IO configuration for the spawned server process. For more information, - * refer to the documentation of `child_process.spawn`. - * - * @param {StdIoOptions} config The desired IO configuration. - * @return {!DriverService.Builder} A self reference. - * @see https://nodejs.org/dist/latest-v4.x/docs/api/child_process.html#child_process_options_stdio - */ - setStdio(config) { - this.options_.stdio = config; - return this; - } - - /** - * Creates a new DriverService using this instance's current configuration. - * - * @return {!DriverService} A new driver service. - */ - build() { - let port = this.options_.port || portprober.findFreePort(); - let args = Promise.resolve(port).then(port => { - return this.options_.args.concat('--port=' + port); - }); - - let options = - /** @type {!ServiceOptions} */ - (Object.assign({}, this.options_, {args, port})); - return new DriverService(this.exe_, options); - } -}; - - -/** - * Manages the life and death of the - * - * standalone Selenium server. - */ -class SeleniumServer extends DriverService { - /** - * @param {string} jar Path to the Selenium server jar. - * @param {SeleniumServer.Options=} opt_options Configuration options for the - * server. - * @throws {Error} If the path to the Selenium jar is not specified or if an - * invalid port is specified. - */ - constructor(jar, opt_options) { - if (!jar) { - throw Error('Path to the Selenium jar not specified'); - } - - var options = opt_options || {}; - - if (options.port < 0) { - throw Error('Port must be >= 0: ' + options.port); - } - - let port = options.port || portprober.findFreePort(); - let args = Promise.all([port, options.jvmArgs || [], options.args || []]) - .then(resolved => { - let port = resolved[0]; - let jvmArgs = resolved[1]; - let args = resolved[2]; - return jvmArgs.concat('-jar', jar, '-port', port).concat(args); - }); - - let java = 'java'; - if (process.env['JAVA_HOME']) { - java = path.join(process.env['JAVA_HOME'], 'bin/java'); - } - - super(java, { - loopback: options.loopback, - port: port, - args: args, - path: '/wd/hub', - env: options.env, - stdio: options.stdio - }); - } -} - - -/** - * Options for the Selenium server: - * - * - `loopback` - Whether the server should only be accessed on this host's - * loopback address. - * - `port` - The port to start the server on (must be > 0). If the port is - * provided as a promise, the service will wait for the promise to resolve - * before starting. - * - `args` - The arguments to pass to the service. If a promise is provided, - * the service will wait for it to resolve before starting. - * - `jvmArgs` - The arguments to pass to the JVM. If a promise is provided, - * the service will wait for it to resolve before starting. - * - `env` - The environment variables that should be visible to the server - * process. Defaults to inheriting the current process's environment. - * - `stdio` - IO configuration for the spawned server process. For more - * information, refer to the documentation of `child_process.spawn`. - * - * @typedef {{ - * loopback: (boolean|undefined), - * port: (number|!promise.Promise), - * args: !(Array|promise.Promise>), - * jvmArgs: (!Array| - * !promise.Promise>| - * undefined), - * env: (!Object|undefined), - * stdio: (string|!Array| - * undefined) - * }} - */ -SeleniumServer.Options; - - - -/** - * A {@link webdriver.FileDetector} that may be used when running - * against a remote - * [Selenium server](http://selenium-release.storage.googleapis.com/index.html). - * - * When a file path on the local machine running this script is entered with - * {@link webdriver.WebElement#sendKeys WebElement#sendKeys}, this file detector - * will transfer the specified file to the Selenium server's host; the sendKeys - * command will be updated to use the transfered file's path. - * - * __Note:__ This class depends on a non-standard command supported on the - * Java Selenium server. The file detector will fail if used with a server that - * only supports standard WebDriver commands (such as the ChromeDriver). - * - * @final - */ -class FileDetector extends input.FileDetector { - /** - * Prepares a `file` for use with the remote browser. If the provided path - * does not reference a normal file (i.e. it does not exist or is a - * directory), then the promise returned by this method will be resolved with - * the original file path. Otherwise, this method will upload the file to the - * remote server, which will return the file's path on the remote system so - * it may be referenced in subsequent commands. - * - * @override - */ - handleFile(driver, file) { - return io.stat(file).then(function(stats) { - if (stats.isDirectory()) { - return file; // Not a valid file, return original input. - } - - let zip = new Zip; - return zip.addFile(file) - .then(() => zip.toBuffer()) - .then(buf => buf.toString('base64')) - .then(encodedZip => { - let command = new cmd.Command(cmd.Name.UPLOAD_FILE) - .setParameter('file', encodedZip); - return driver.schedule(command, - 'remote.FileDetector.handleFile(' + file + ')'); - }); - }, function(err) { - if (err.code === 'ENOENT') { - return file; // Not a file; return original input. - } - throw err; - }); - } -} - - -// PUBLIC API - -exports.DriverService = DriverService; -exports.FileDetector = FileDetector; -exports.SeleniumServer = SeleniumServer; -exports.ServiceOptions = ServiceOptions; // Exported for API docs. diff --git a/test-eol-project/node_modules/selenium-webdriver/safari.js b/test-eol-project/node_modules/selenium-webdriver/safari.js deleted file mode 100644 index 38c10544..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/safari.js +++ /dev/null @@ -1,264 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Defines a WebDriver client for Safari. - */ - -'use strict'; - -const http = require('./http'); -const io = require('./io'); -const {Capabilities, Capability} = require('./lib/capabilities'); -const command = require('./lib/command'); -const error = require('./lib/error'); -const logging = require('./lib/logging'); -const promise = require('./lib/promise'); -const Symbols = require('./lib/symbols'); -const webdriver = require('./lib/webdriver'); -const portprober = require('./net/portprober'); -const remote = require('./remote'); - - -/** - * @return {string} . - * @throws {Error} - */ -function findSafariDriver() { - let exe = io.findInPath('safaridriver', true); - if (!exe) { - throw Error( - `The safaridriver executable could not be found on the current PATH. - Please ensure you are using Safari 10.0 or above.`); - } - return exe; -} - - -/** - * Creates {@link selenium-webdriver/remote.DriverService} instances that manage - * a [safaridriver] server in a child process. - * - * [safaridriver]: https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html#//apple_ref/doc/uid/TP40014305-CH11-DontLinkElementID_28 - */ -class ServiceBuilder extends remote.DriverService.Builder { - /** - * @param {string=} opt_exe Path to the server executable to use. If omitted, - * the builder will attempt to locate the safaridriver on the system PATH. - */ - constructor(opt_exe) { - super(opt_exe || findSafariDriver()); - this.setLoopback(true); // Required. - } -} - - -const OPTIONS_CAPABILITY_KEY = 'safari.options'; -const TECHNOLOGY_PREVIEW_OPTIONS_KEY = 'technologyPreview'; - -/** - * Configuration options specific to the {@link Driver SafariDriver}. - */ -class Options { - constructor() { - /** @private {Object} */ - this.options_ = null; - - /** @private {./lib/logging.Preferences} */ - this.logPrefs_ = null; - - /** @private {?./lib/capabilities.ProxyConfig} */ - this.proxy_ = null; - } - - /** - * Extracts the SafariDriver specific options from the given capabilities - * object. - * @param {!Capabilities} capabilities The capabilities object. - * @return {!Options} The SafariDriver options. - */ - static fromCapabilities(capabilities) { - var options = new Options(); - var o = capabilities.get(OPTIONS_CAPABILITY_KEY); - - if (o instanceof Options) { - options = o; - } else if (o) { - options.setCleanSession(o.cleanSession); - options.setTechnologyPreview(o[TECHNOLOGY_PREVIEW_OPTIONS_KEY]); - } - - if (capabilities.has(Capability.PROXY)) { - options.setProxy(capabilities.get(Capability.PROXY)); - } - - if (capabilities.has(Capability.LOGGING_PREFS)) { - options.setLoggingPrefs(capabilities.get(Capability.LOGGING_PREFS)); - } - - return options; - } - - /** - * Sets whether to force Safari to start with a clean session. Enabling this - * option will cause all global browser data to be deleted. - * @param {boolean} clean Whether to make sure the session has no cookies, - * cache entries, local storage, or databases. - * @return {!Options} A self reference. - */ - setCleanSession(clean) { - if (!this.options_) { - this.options_ = {}; - } - this.options_['cleanSession'] = clean; - return this; - } - - /** - * Sets the logging preferences for the new session. - * @param {!./lib/logging.Preferences} prefs The logging preferences. - * @return {!Options} A self reference. - */ - setLoggingPrefs(prefs) { - this.logPrefs_ = prefs; - return this; - } - - /** - * Sets the proxy to use. - * - * @param {./lib/capabilities.ProxyConfig} proxy The proxy configuration to use. - * @return {!Options} A self reference. - */ - setProxy(proxy) { - this.proxy_ = proxy; - return this; - } - - /** - * Instruct the SafariDriver to use the Safari Technology Preview if true. - * Otherwise, use the release version of Safari. Defaults to using the release version of Safari. - * - * @param {boolean} useTechnologyPreview - * @return {!Options} A self reference. - */ - setTechnologyPreview(useTechnologyPreview) { - if (!this.options_) { - this.options_ = {}; - } - - this.options_[TECHNOLOGY_PREVIEW_OPTIONS_KEY] = !!useTechnologyPreview; - return this; - } - - /** - * Converts this options instance to a {@link Capabilities} object. - * @param {Capabilities=} opt_capabilities The capabilities to - * merge these options into, if any. - * @return {!Capabilities} The capabilities. - */ - toCapabilities(opt_capabilities) { - var caps = opt_capabilities || Capabilities.safari(); - if (this.logPrefs_) { - caps.set(Capability.LOGGING_PREFS, this.logPrefs_); - } - if (this.proxy_) { - caps.set(Capability.PROXY, this.proxy_); - } - if (this.options_) { - caps.set(OPTIONS_CAPABILITY_KEY, this); - } - return caps; - } - - /** - * Converts this instance to its JSON wire protocol representation. Note this - * function is an implementation detail not intended for general use. - * @return {!Object} The JSON wire protocol representation of this - * instance. - */ - [Symbols.serialize]() { - return this.options_ || {}; - } -} - -/** - * @param {(Options|Object)=} o The options object - * @return {boolean} - */ -function useTechnologyPreview(o) { - if (o instanceof Options) { - return !!(o.options_ && o.options_[TECHNOLOGY_PREVIEW_OPTIONS_KEY]); - } - - if (o && typeof o === 'object') { - return !!o[TECHNOLOGY_PREVIEW_OPTIONS_KEY]; - } - - return false; -} - -const SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE = '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'; - -/** - * A WebDriver client for Safari. This class should never be instantiated - * directly; instead, use the {@linkplain ./builder.Builder Builder}: - * - * var driver = new Builder() - * .forBrowser('safari') - * .build(); - * - */ -class Driver extends webdriver.WebDriver { - /** - * Creates a new Safari session. - * - * @param {(Options|Capabilities)=} opt_config The configuration - * options for the new session. - * @param {promise.ControlFlow=} opt_flow The control flow to create - * the driver under. - * @return {!Driver} A new driver instance. - */ - static createSession(opt_config, opt_flow) { - let caps, exe; - - if (opt_config instanceof Options) { - caps = opt_config.toCapabilities(); - } else { - caps = opt_config || Capabilities.safari(); - } - - if (useTechnologyPreview(caps.get(OPTIONS_CAPABILITY_KEY))) { - exe = SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE; - } - - let service = new ServiceBuilder(exe).build(); - let executor = new http.Executor( - service.start().then(url => new http.HttpClient(url))); - - return /** @type {!Driver} */(super.createSession( - executor, caps, opt_flow, () => service.kill())); - } -} - - -// Public API - - -exports.Driver = Driver; -exports.Options = Options; -exports.ServiceBuilder = ServiceBuilder; diff --git a/test-eol-project/node_modules/selenium-webdriver/test/actions_test.js b/test-eol-project/node_modules/selenium-webdriver/test/actions_test.js deleted file mode 100644 index ef218f7d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/actions_test.js +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var Browser = require('..').Browser, - By = require('..').By, - until = require('..').until, - test = require('../lib/test'), - fileServer = require('../lib/test/fileserver'); - - -test.suite(function(env) { - var driver; - test.beforeEach(function*() { driver = yield env.builder().build(); }); - test.afterEach(function() { return driver.quit(); }); - - test.ignore( - env.browsers(Browser.FIREFOX, Browser.PHANTOM_JS, Browser.SAFARI)). - describe('WebDriver.actions()', function() { - - test.it('can move to and click element in an iframe', function*() { - yield driver.get(fileServer.whereIs('click_tests/click_in_iframe.html')); - - yield driver.wait(until.elementLocated(By.id('ifr')), 5000) - .then(frame => driver.switchTo().frame(frame)); - - let link = yield driver.findElement(By.id('link')); - yield driver.actions() - .mouseMove(link) - .click() - .perform(); - - return driver.wait(until.titleIs('Submitted Successfully!'), 5000); - }); - - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js b/test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js deleted file mode 100644 index d36a044e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/chrome/options_test.js +++ /dev/null @@ -1,227 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fs = require('fs'); - -var webdriver = require('../..'), - chrome = require('../../chrome'), - symbols = require('../../lib/symbols'), - proxy = require('../../proxy'), - assert = require('../../testing/assert'); - -var test = require('../../lib/test'); - - -describe('chrome.Options', function() { - describe('fromCapabilities', function() { - - it('should return a new Options instance if none were defined', - function() { - var options = chrome.Options.fromCapabilities( - new webdriver.Capabilities()); - assert(options).instanceOf(chrome.Options); - }); - - it('should return options instance if present', function() { - var options = new chrome.Options(); - var caps = options.toCapabilities(); - assert(caps).instanceOf(webdriver.Capabilities); - assert(chrome.Options.fromCapabilities(caps)).equalTo(options); - }); - - it('should rebuild options from wire representation', function() { - var expectedExtension = fs.readFileSync(__filename, 'base64'); - var caps = webdriver.Capabilities.chrome().set('chromeOptions', { - args: ['a', 'b'], - extensions: [__filename], - binary: 'binaryPath', - logPath: 'logFilePath', - detach: true, - localState: 'localStateValue', - prefs: 'prefsValue' - }); - - var options = chrome.Options.fromCapabilities(caps); - var json = options[symbols.serialize](); - - assert(json.args.length).equalTo(2); - assert(json.args[0]).equalTo('a'); - assert(json.args[1]).equalTo('b'); - assert(json.extensions.length).equalTo(1); - assert(json.extensions[0]).equalTo(expectedExtension); - assert(json.binary).equalTo('binaryPath'); - assert(json.logPath).equalTo('logFilePath'); - assert(json.detach).equalTo(true); - assert(json.localState).equalTo('localStateValue'); - assert(json.prefs).equalTo('prefsValue'); - }); - - it('should rebuild options from incomplete wire representation', - function() { - var caps = webdriver.Capabilities.chrome().set('chromeOptions', { - logPath: 'logFilePath' - }); - - var options = chrome.Options.fromCapabilities(caps); - var json = options[symbols.serialize](); - assert(json.args).isUndefined(); - assert(json.binary).isUndefined(); - assert(json.detach).isUndefined(); - assert(json.excludeSwitches).isUndefined(); - assert(json.extensions).isUndefined(); - assert(json.localState).isUndefined(); - assert(json.logPath).equalTo('logFilePath'); - assert(json.prefs).isUndefined(); - assert(json.minidumpPath).isUndefined(); - assert(json.mobileEmulation).isUndefined(); - assert(json.perfLoggingPrefs).isUndefined(); - }); - - it('should extract supported WebDriver capabilities', function() { - var proxyPrefs = proxy.direct(); - var logPrefs = {}; - var caps = webdriver.Capabilities.chrome(). - set(webdriver.Capability.PROXY, proxyPrefs). - set(webdriver.Capability.LOGGING_PREFS, logPrefs); - - var options = chrome.Options.fromCapabilities(caps); - assert(options.proxy_).equalTo(proxyPrefs); - assert(options.logPrefs_).equalTo(logPrefs); - }); - }); - - describe('addArguments', function() { - it('takes var_args', function() { - var options = new chrome.Options(); - assert(options[symbols.serialize]().args).isUndefined(); - - options.addArguments('a', 'b'); - var json = options[symbols.serialize](); - assert(json.args.length).equalTo(2); - assert(json.args[0]).equalTo('a'); - assert(json.args[1]).equalTo('b'); - }); - - it('flattens input arrays', function() { - var options = new chrome.Options(); - assert(options[symbols.serialize]().args).isUndefined(); - - options.addArguments(['a', 'b'], 'c', [1, 2], 3); - var json = options[symbols.serialize](); - assert(json.args.length).equalTo(6); - assert(json.args[0]).equalTo('a'); - assert(json.args[1]).equalTo('b'); - assert(json.args[2]).equalTo('c'); - assert(json.args[3]).equalTo(1); - assert(json.args[4]).equalTo(2); - assert(json.args[5]).equalTo(3); - }); - }); - - describe('addExtensions', function() { - it('takes var_args', function() { - var options = new chrome.Options(); - assert(options.extensions_.length).equalTo(0); - - options.addExtensions('a', 'b'); - assert(options.extensions_.length).equalTo(2); - assert(options.extensions_[0]).equalTo('a'); - assert(options.extensions_[1]).equalTo('b'); - }); - - it('flattens input arrays', function() { - var options = new chrome.Options(); - assert(options.extensions_.length).equalTo(0); - - options.addExtensions(['a', 'b'], 'c', [1, 2], 3); - assert(options.extensions_.length).equalTo(6); - assert(options.extensions_[0]).equalTo('a'); - assert(options.extensions_[1]).equalTo('b'); - assert(options.extensions_[2]).equalTo('c'); - assert(options.extensions_[3]).equalTo(1); - assert(options.extensions_[4]).equalTo(2); - assert(options.extensions_[5]).equalTo(3); - }); - }); - - describe('serialize', function() { - it('base64 encodes extensions', function() { - var expected = fs.readFileSync(__filename, 'base64'); - var wire = new chrome.Options() - .addExtensions(__filename) - [symbols.serialize](); - assert(wire.extensions.length).equalTo(1); - assert(wire.extensions[0]).equalTo(expected); - }); - }); - - describe('toCapabilities', function() { - it('returns a new capabilities object if one is not provided', function() { - var options = new chrome.Options(); - var caps = options.toCapabilities(); - assert(caps.get('browserName')).equalTo('chrome'); - assert(caps.get('chromeOptions')).equalTo(options); - }); - - it('adds to input capabilities object', function() { - var caps = webdriver.Capabilities.firefox(); - var options = new chrome.Options(); - assert(options.toCapabilities(caps)).equalTo(caps); - assert(caps.get('browserName')).equalTo('firefox'); - assert(caps.get('chromeOptions')).equalTo(options); - }); - - it('sets generic driver capabilities', function() { - var proxyPrefs = {}; - var loggingPrefs = {}; - var options = new chrome.Options(). - setLoggingPrefs(loggingPrefs). - setProxy(proxyPrefs); - - var caps = options.toCapabilities(); - assert(caps.get('proxy')).equalTo(proxyPrefs); - assert(caps.get('loggingPrefs')).equalTo(loggingPrefs); - }); - }); -}); - -test.suite(function(env) { - var driver; - - test.afterEach(function() { - return driver.quit(); - }); - - describe('Chrome options', function() { - test.it('can start Chrome with custom args', function*() { - var options = new chrome.Options(). - addArguments('user-agent=foo;bar'); - - driver = yield env.builder() - .setChromeOptions(options) - .build(); - - yield driver.get(test.Pages.ajaxyPage); - - var userAgent = - yield driver.executeScript('return window.navigator.userAgent'); - assert(userAgent).equalTo('foo;bar'); - }); - }); -}, {browsers: ['chrome']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js b/test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js deleted file mode 100644 index 0ccc93b5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/chrome/service_test.js +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var webdriver = require('../..'), - chrome = require('../../chrome'), - assert = require('../../testing/assert'); - -var test = require('../../lib/test'); - - -test.suite(function(env) { - describe('chromedriver', function() { - var service; - test.afterEach(function() { - if (service) { - return service.kill(); - } - }); - - test.it('can be started on a custom path', function() { - service = new chrome.ServiceBuilder() - .setPath('/foo/bar/baz') - .build(); - return service.start().then(function(url) { - assert(url).endsWith('/foo/bar/baz'); - }); - }); - }); -}, {browsers: ['chrome']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js b/test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js deleted file mode 100644 index 40f7d9b5..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/cookie_test.js +++ /dev/null @@ -1,214 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - url = require('url'); - -var test = require('../lib/test'), - fileserver = require('../lib/test/fileserver'), - Browser = require('..').Browser, - Pages = test.Pages; - - -test.suite(function(env) { - var driver; - - test.before(function*() { - driver = yield env.builder().build(); - }); - - test.after(function() { - return driver.quit(); - }); - - // Cookie handling is broken. - test.ignore(env.browsers(Browser.PHANTOM_JS, Browser.SAFARI)). - describe('Cookie Management;', function() { - - test.beforeEach(function*() { - yield driver.get(fileserver.Pages.ajaxyPage); - yield driver.manage().deleteAllCookies(); - return assertHasCookies(); - }); - - test.it('can add new cookies', function*() { - var cookie = createCookieSpec(); - - yield driver.manage().addCookie(cookie); - yield driver.manage().getCookie(cookie.name).then(function(actual) { - assert.equal(actual.value, cookie.value); - }); - }); - - test.it('can get all cookies', function*() { - var cookie1 = createCookieSpec(); - var cookie2 = createCookieSpec(); - - yield driver.manage().addCookie(cookie1); - yield driver.manage().addCookie(cookie2); - - return assertHasCookies(cookie1, cookie2); - }); - - test.ignore(env.browsers(Browser.IE)). - it('only returns cookies visible to the current page', function*() { - var cookie1 = createCookieSpec(); - - yield driver.manage().addCookie(cookie1); - - var pageUrl = fileserver.whereIs('page/1'); - var cookie2 = createCookieSpec({ - path: url.parse(pageUrl).pathname - }); - yield driver.get(pageUrl); - yield driver.manage().addCookie(cookie2); - yield assertHasCookies(cookie1, cookie2); - - yield driver.get(fileserver.Pages.ajaxyPage); - yield assertHasCookies(cookie1); - - yield driver.get(pageUrl); - yield assertHasCookies(cookie1, cookie2); - }); - - test.it('can delete all cookies', function*() { - var cookie1 = createCookieSpec(); - var cookie2 = createCookieSpec(); - - yield driver.executeScript( - 'document.cookie = arguments[0] + "=" + arguments[1];' + - 'document.cookie = arguments[2] + "=" + arguments[3];', - cookie1.name, cookie1.value, cookie2.name, cookie2.value); - yield assertHasCookies(cookie1, cookie2); - - yield driver.manage().deleteAllCookies(); - yield assertHasCookies(); - }); - - test.it('can delete cookies by name', function*() { - var cookie1 = createCookieSpec(); - var cookie2 = createCookieSpec(); - - yield driver.executeScript( - 'document.cookie = arguments[0] + "=" + arguments[1];' + - 'document.cookie = arguments[2] + "=" + arguments[3];', - cookie1.name, cookie1.value, cookie2.name, cookie2.value); - yield assertHasCookies(cookie1, cookie2); - - yield driver.manage().deleteCookie(cookie1.name); - yield assertHasCookies(cookie2); - }); - - test.it('should only delete cookie with exact name', function*() { - var cookie1 = createCookieSpec(); - var cookie2 = createCookieSpec(); - var cookie3 = {name: cookie1.name + 'xx', value: cookie1.value}; - - yield driver.executeScript( - 'document.cookie = arguments[0] + "=" + arguments[1];' + - 'document.cookie = arguments[2] + "=" + arguments[3];' + - 'document.cookie = arguments[4] + "=" + arguments[5];', - cookie1.name, cookie1.value, cookie2.name, cookie2.value, - cookie3.name, cookie3.value); - yield assertHasCookies(cookie1, cookie2, cookie3); - - yield driver.manage().deleteCookie(cookie1.name); - yield assertHasCookies(cookie2, cookie3); - }); - - test.it('can delete cookies set higher in the path', function*() { - var cookie = createCookieSpec(); - var childUrl = fileserver.whereIs('child/childPage.html'); - var grandchildUrl = fileserver.whereIs( - 'child/grandchild/grandchildPage.html'); - - yield driver.get(childUrl); - yield driver.manage().addCookie(cookie); - yield assertHasCookies(cookie); - - yield driver.get(grandchildUrl); - yield assertHasCookies(cookie); - - yield driver.manage().deleteCookie(cookie.name); - yield assertHasCookies(); - - yield driver.get(childUrl); - yield assertHasCookies(); - }); - - test.ignore(env.browsers( - Browser.ANDROID, - Browser.FIREFOX, - 'legacy-' + Browser.FIREFOX, - Browser.IE)). - it('should retain cookie expiry', function*() { - let expirationDelay = 5 * 1000; - let expiry = new Date(Date.now() + expirationDelay); - let cookie = createCookieSpec({expiry}); - - yield driver.manage().addCookie(cookie); - yield driver.manage().getCookie(cookie.name).then(function(actual) { - assert.equal(actual.value, cookie.value); - // expiry times are exchanged in seconds since January 1, 1970 UTC. - assert.equal(actual.expiry, Math.floor(expiry.getTime() / 1000)); - }); - - yield driver.sleep(expirationDelay); - yield assertHasCookies(); - }); - }); - - function createCookieSpec(opt_options) { - let spec = { - name: getRandomString(), - value: getRandomString() - }; - if (opt_options) { - spec = Object.assign(spec, opt_options); - } - return spec; - } - - function buildCookieMap(cookies) { - var map = {}; - cookies.forEach(function(cookie) { - map[cookie.name] = cookie; - }); - return map; - } - - function assertHasCookies(...expected) { - return driver.manage().getCookies().then(function(cookies) { - assert.equal(cookies.length, expected.length, - 'Wrong # of cookies.' + - '\n Expected: ' + JSON.stringify(expected) + - '\n Was : ' + JSON.stringify(cookies)); - - var map = buildCookieMap(cookies); - for (var i = 0; i < expected.length; ++i) { - assert.equal(expected[i].value, map[expected[i].name].value); - } - }); - } - - function getRandomString() { - var x = 1234567890; - return Math.floor(Math.random() * x).toString(36); - } -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js b/test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js deleted file mode 100644 index 9f4568b8..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/element_finding_test.js +++ /dev/null @@ -1,426 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fail = require('assert').fail; - -var Browser = require('..').Browser, - By = require('..').By, - error = require('..').error, - until = require('..').until, - promise = require('../lib/promise'), - test = require('../lib/test'), - assert = require('../testing/assert'), - Pages = test.Pages; - - -test.suite(function(env) { - var browsers = env.browsers; - - var driver; - - test.before(function*() { - driver = yield env.builder().build(); - }); - - after(function() { - return driver.quit(); - }); - - describe('finding elements', function() { - test.it( - 'should work after loading multiple pages in a row', - function*() { - yield driver.get(Pages.formPage); - yield driver.get(Pages.xhtmlTestPage); - yield driver.findElement(By.linkText('click me')).click(); - yield driver.wait(until.titleIs('We Arrive Here'), 5000); - }); - - describe('By.id()', function() { - test.it('should work', function*() { - yield driver.get(Pages.xhtmlTestPage); - yield driver.findElement(By.id('linkId')).click(); - yield driver.wait(until.titleIs('We Arrive Here'), 5000); - }); - - test.it('should fail if ID not present on page', function*() { - yield driver.get(Pages.formPage); - return driver.findElement(By.id('nonExistantButton')). - then(fail, function(e) { - assert(e).instanceOf(error.NoSuchElementError); - }); - }); - - test.it( - 'should find multiple elements by ID even though that is ' + - 'malformed HTML', - function*() { - yield driver.get(Pages.nestedPage); - - let elements = yield driver.findElements(By.id('2')); - assert(elements.length).equalTo(8); - }); - }); - - describe('By.linkText()', function() { - test.it('should be able to click on link identified by text', function*() { - yield driver.get(Pages.xhtmlTestPage); - yield driver.findElement(By.linkText('click me')).click(); - yield driver.wait(until.titleIs('We Arrive Here'), 5000); - }); - - test.it( - 'should be able to find elements by partial link text', - function*() { - yield driver.get(Pages.xhtmlTestPage); - yield driver.findElement(By.partialLinkText('ick me')).click(); - yield driver.wait(until.titleIs('We Arrive Here'), 5000); - }); - - test.it('should work when link text contains equals sign', function*() { - yield driver.get(Pages.xhtmlTestPage); - let el = yield driver.findElement(By.linkText('Link=equalssign')); - - let id = yield el.getAttribute('id'); - assert(id).equalTo('linkWithEqualsSign'); - }); - - test.it('matches by partial text when containing equals sign', - function*() { - yield driver.get(Pages.xhtmlTestPage); - let link = yield driver.findElement(By.partialLinkText('Link=')); - - let id = yield link.getAttribute('id'); - assert(id).equalTo('linkWithEqualsSign'); - }); - - test.it('works when searching for multiple and text contains =', - function*() { - yield driver.get(Pages.xhtmlTestPage); - let elements = - yield driver.findElements(By.linkText('Link=equalssign')); - - assert(elements.length).equalTo(1); - - let id = yield elements[0].getAttribute('id'); - assert(id).equalTo('linkWithEqualsSign'); - }); - - test.it( - 'works when searching for multiple with partial text containing =', - function*() { - yield driver.get(Pages.xhtmlTestPage); - let elements = - yield driver.findElements(By.partialLinkText('Link=')); - - assert(elements.length).equalTo(1); - - let id = yield elements[0].getAttribute('id'); - assert(id).equalTo('linkWithEqualsSign'); - }); - - test.it('should be able to find multiple exact matches', - function*() { - yield driver.get(Pages.xhtmlTestPage); - let elements = yield driver.findElements(By.linkText('click me')); - assert(elements.length).equalTo(2); - }); - - test.it('should be able to find multiple partial matches', - function*() { - yield driver.get(Pages.xhtmlTestPage); - let elements = - yield driver.findElements(By.partialLinkText('ick me')); - assert(elements.length).equalTo(2); - }); - - test.ignore(browsers(Browser.SAFARI)). - it('works on XHTML pages', function*() { - yield driver.get(test.whereIs('actualXhtmlPage.xhtml')); - - let el = yield driver.findElement(By.linkText('Foo')); - return assert(el.getText()).equalTo('Foo'); - }); - }); - - describe('By.name()', function() { - test.it('should work', function*() { - yield driver.get(Pages.formPage); - - let el = yield driver.findElement(By.name('checky')); - yield assert(el.getAttribute('value')).equalTo('furrfu'); - }); - - test.it('should find multiple elements with same name', function*() { - yield driver.get(Pages.nestedPage); - - let elements = yield driver.findElements(By.name('checky')); - assert(elements.length).greaterThan(1); - }); - - test.it( - 'should be able to find elements that do not support name property', - function*() { - yield driver.get(Pages.nestedPage); - yield driver.findElement(By.name('div1')); - // Pass if this does not return an error. - }); - - test.it('shoudl be able to find hidden elements by name', function*() { - yield driver.get(Pages.formPage); - yield driver.findElement(By.name('hidden')); - // Pass if this does not return an error. - }); - }); - - describe('By.className()', function() { - test.it('should work', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let el = yield driver.findElement(By.className('extraDiv')); - yield assert(el.getText()).startsWith('Another div starts here.'); - }); - - test.it('should work when name is first name among many', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let el = yield driver.findElement(By.className('nameA')); - yield assert(el.getText()).equalTo('An H2 title'); - }); - - test.it('should work when name is last name among many', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let el = yield driver.findElement(By.className('nameC')); - yield assert(el.getText()).equalTo('An H2 title'); - }); - - test.it('should work when name is middle of many', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let el = yield driver.findElement(By.className('nameBnoise')); - yield assert(el.getText()).equalTo('An H2 title'); - }); - - test.it('should work when name surrounded by whitespace', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let el = yield driver.findElement(By.className('spaceAround')); - yield assert(el.getText()).equalTo('Spaced out'); - }); - - test.it('should fail if queried name only partially matches', function*() { - yield driver.get(Pages.xhtmlTestPage); - return driver.findElement(By.className('nameB')). - then(fail, function(e) { - assert(e).instanceOf(error.NoSuchElementError); - }); - }); - - test.it('should implicitly wait', function*() { - var TIMEOUT_IN_MS = 1000; - var EPSILON = TIMEOUT_IN_MS / 2; - - yield driver.manage().timeouts().implicitlyWait(TIMEOUT_IN_MS); - yield driver.get(Pages.formPage); - - var start = new Date(); - return driver.findElement(By.id('nonExistantButton')). - then(fail, function(e) { - var end = new Date(); - assert(e).instanceOf(error.NoSuchElementError); - assert(end - start).closeTo(TIMEOUT_IN_MS, EPSILON); - }); - }); - - test.it('should be able to find multiple matches', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let elements = yield driver.findElements(By.className('nameC')); - assert(elements.length).greaterThan(1); - }); - - test.it('permits compound class names', function() { - return driver.get(Pages.xhtmlTestPage) - .then(() => driver.findElement(By.className('nameA nameC'))) - .then(el => el.getText()) - .then(text => assert(text).equalTo('An H2 title')); - }); - }); - - describe('By.xpath()', function() { - test.it('should work with multiple matches', function*() { - yield driver.get(Pages.xhtmlTestPage); - let elements = yield driver.findElements(By.xpath('//div')); - assert(elements.length).greaterThan(1); - }); - - test.it('should work for selectors using contains keyword', function*() { - yield driver.get(Pages.nestedPage); - yield driver.findElement(By.xpath('//a[contains(., "hello world")]')); - // Pass if no error. - }); - }); - - describe('By.tagName()', function() { - test.it('works', function*() { - yield driver.get(Pages.formPage); - - let el = yield driver.findElement(By.tagName('input')); - yield assert(el.getTagName()).equalTo('input'); - }); - - test.it('can find multiple elements', function*() { - yield driver.get(Pages.formPage); - - let elements = yield driver.findElements(By.tagName('input')); - assert(elements.length).greaterThan(1); - }); - }); - - describe('By.css()', function() { - test.it('works', function*() { - yield driver.get(Pages.xhtmlTestPage); - yield driver.findElement(By.css('div.content')); - // Pass if no error. - }); - - test.it('can find multiple elements', function*() { - yield driver.get(Pages.xhtmlTestPage); - - let elements = yield driver.findElements(By.css('p')); - assert(elements.length).greaterThan(1); - // Pass if no error. - }); - - test.it( - 'should find first matching element when searching by ' + - 'compound CSS selector', - function*() { - yield driver.get(Pages.xhtmlTestPage); - - let el = - yield driver.findElement(By.css('div.extraDiv, div.content')); - yield assert(el.getAttribute('class')).equalTo('content'); - }); - - test.it('should be able to find multiple elements by compound selector', - function*() { - yield driver.get(Pages.xhtmlTestPage); - let elements = - yield driver.findElements(By.css('div.extraDiv, div.content')); - - return Promise.all([ - assertClassIs(elements[0], 'content'), - assertClassIs(elements[1], 'extraDiv') - ]); - - function assertClassIs(el, expected) { - return assert(el.getAttribute('class')).equalTo(expected); - } - }); - - // IE only supports short version option[selected]. - test.ignore(browsers(Browser.IE)). - it('should be able to find element by boolean attribute', function*() { - yield driver.get(test.whereIs( - 'locators_tests/boolean_attribute_selected.html')); - - let el = yield driver.findElement(By.css('option[selected="selected"]')); - yield assert(el.getAttribute('value')).equalTo('two'); - }); - - test.it( - 'should be able to find element with short ' + - 'boolean attribute selector', - function*() { - yield driver.get(test.whereIs( - 'locators_tests/boolean_attribute_selected.html')); - - let el = yield driver.findElement(By.css('option[selected]')); - yield assert(el.getAttribute('value')).equalTo('two'); - }); - - test.it( - 'should be able to find element with short boolean attribute ' + - 'selector on HTML4 page', - function*() { - yield driver.get(test.whereIs( - 'locators_tests/boolean_attribute_selected_html4.html')); - - let el = yield driver.findElement(By.css('option[selected]')); - yield assert(el.getAttribute('value')).equalTo('two'); - }); - }); - - describe('by custom locator', function() { - test.it('handles single element result', function*() { - yield driver.get(Pages.javascriptPage); - - let link = yield driver.findElement(function(driver) { - let links = driver.findElements(By.tagName('a')); - return promise.filter(links, function(link) { - return link.getAttribute('id').then(id => id === 'updatediv'); - }).then(links => links[0]); - }); - - yield assert(link.getText()).matches(/Update\s+a\s+div/); - }); - - test.it('uses first element if locator resolves to list', function*() { - yield driver.get(Pages.javascriptPage); - - let link = yield driver.findElement(function() { - return driver.findElements(By.tagName('a')); - }); - - yield assert(link.getText()).isEqualTo('Change the page title!'); - }); - - test.it('fails if locator returns non-webelement value', function*() { - yield driver.get(Pages.javascriptPage); - - let link = driver.findElement(function() { - return driver.getTitle(); - }); - - return link.then( - () => fail('Should have failed'), - (e) => assert(e).instanceOf(TypeError)); - }); - }); - - describe('switchTo().activeElement()', function() { - // SAFARI's new session response does not identify it as a W3C browser, - // so the command is sent in the unsupported wire protocol format. - test.ignore(browsers(Browser.SAFARI)). - it('returns document.activeElement', function*() { - yield driver.get(Pages.formPage); - - let email = yield driver.findElement(By.css('#email')); - yield driver.executeScript('arguments[0].focus()', email); - - let ae = yield driver.switchTo().activeElement(); - let equal = yield driver.executeScript( - 'return arguments[0] === arguments[1]', email, ae); - assert(equal).isTrue(); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js b/test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js deleted file mode 100644 index 97eaa1ed..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/execute_script_test.js +++ /dev/null @@ -1,350 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fail = require('assert').fail; - -var webdriver = require('..'), - Browser = webdriver.Browser, - By = webdriver.By, - assert = require('../testing/assert'), - test = require('../lib/test'); - - -test.suite(function(env) { - var driver; - - test.before(function*() { - driver = yield env.builder().build(); - }); - - test.after(function() { - return driver.quit(); - }); - - test.beforeEach(function() { - return driver.get(test.Pages.echoPage); - }); - - describe('executeScript;', function() { - var shouldHaveFailed = new Error('Should have failed'); - - test.it('fails if script throws', function() { - return execute('throw new Error("boom")') - .then(function() { throw shouldHaveFailed; }) - .catch(function(e) { - // The java WebDriver server adds a bunch of crap to error messages. - // Error message will just be "JavaScript error" for IE. - assert(e.message).matches(/.*(JavaScript error|boom).*/); - }); - }); - - test.it('fails if script does not parse', function() { - return execute('throw function\\*') - .then(function() { throw shouldHaveFailed; }) - .catch(function(e) { - assert(e).notEqualTo(shouldHaveFailed); - }); - }); - - describe('scripts;', function() { - test.it('do not pollute the global scope', function*() { - yield execute('var x = 1;'); - yield assert(execute('return typeof x;')).equalTo('undefined'); - }); - - test.it('can set global variables', function*() { - yield execute('window.x = 1234;'); - yield assert(execute('return x;')).equalTo(1234); - }); - - test.it('may be defined as a function expression', function*() { - let result = yield execute(function() { - return 1234 + 'abc'; - }); - assert(result).equalTo('1234abc'); - }); - }); - - describe('return values;', function() { - - test.it('returns undefined as null', function() { - return assert(execute('var x; return x;')).isNull(); - }); - - test.it('can return null', function() { - return assert(execute('return null;')).isNull(); - }); - - test.it('can return numbers', function*() { - yield assert(execute('return 1234')).equalTo(1234); - yield assert(execute('return 3.1456')).equalTo(3.1456); - }); - - test.it('can return strings', function() { - return assert(execute('return "hello"')).equalTo('hello'); - }); - - test.it('can return booleans', function*() { - yield assert(execute('return true')).equalTo(true); - yield assert(execute('return false')).equalTo(false); - }); - - test.it('can return an array of primitives', function() { - return execute('var x; return [1, false, null, 3.14, x]') - .then(verifyJson([1, false, null, 3.14, null])); - }); - - test.it('can return nested arrays', function() { - return execute('return [[1, 2, [3]]]').then(verifyJson([[1, 2, [3]]])); - }); - - test.ignore(env.browsers(Browser.IE)). - it('can return empty object literal', function() { - return execute('return {}').then(verifyJson({})); - }); - - test.it('can return object literals', function() { - return execute('return {a: 1, b: false, c: null}').then(result => { - verifyJson(['a', 'b', 'c'])(Object.keys(result).sort()); - assert(result.a).equalTo(1); - assert(result.b).equalTo(false); - assert(result.c).isNull(); - }); - }); - - test.it('can return complex object literals', function() { - return execute('return {a:{b: "hello"}}') - .then(verifyJson({a:{b: 'hello'}})); - }); - - test.it('can return dom elements as web elements', function*() { - let result = - yield execute('return document.querySelector(".header.host")'); - assert(result).instanceOf(webdriver.WebElement); - - return assert(result.getText()).startsWith('host: '); - }); - - test.it('can return array of dom elements', function*() { - let result = yield execute( - 'var nodes = document.querySelectorAll(".request,.host");' + - 'return [nodes[0], nodes[1]];'); - assert(result.length).equalTo(2); - - assert(result[0]).instanceOf(webdriver.WebElement); - yield assert(result[0].getText()).startsWith('GET '); - - assert(result[1]).instanceOf(webdriver.WebElement); - yield assert(result[1].getText()).startsWith('host: '); - }); - - test.it('can return a NodeList as an array of web elements', function*() { - let result = - yield execute('return document.querySelectorAll(".request,.host");') - - assert(result.length).equalTo(2); - - assert(result[0]).instanceOf(webdriver.WebElement); - yield assert(result[0].getText()).startsWith('GET '); - - assert(result[1]).instanceOf(webdriver.WebElement); - yield assert(result[1].getText()).startsWith('host: '); - }); - - test.it('can return object literal with element property', function*() { - let result = yield execute('return {a: document.body}'); - - assert(result.a).instanceOf(webdriver.WebElement); - yield assert(result.a.getTagName()).equalTo('body'); - }); - }); - - describe('parameters;', function() { - test.it('can pass numeric arguments', function*() { - yield assert(execute('return arguments[0]', 12)).equalTo(12); - yield assert(execute('return arguments[0]', 3.14)).equalTo(3.14); - }); - - test.it('can pass boolean arguments', function*() { - yield assert(execute('return arguments[0]', true)).equalTo(true); - yield assert(execute('return arguments[0]', false)).equalTo(false); - }); - - test.it('can pass string arguments', function*() { - yield assert(execute('return arguments[0]', 'hi')).equalTo('hi'); - }); - - test.it('can pass null arguments', function*() { - yield assert(execute('return arguments[0] === null', null)).equalTo(true); - yield assert(execute('return arguments[0]', null)).equalTo(null); - }); - - test.it('passes undefined as a null argument', function*() { - var x; - yield assert(execute('return arguments[0] === null', x)).equalTo(true); - yield assert(execute('return arguments[0]', x)).equalTo(null); - }); - - test.it('can pass multiple arguments', function*() { - yield assert(execute('return arguments.length')).equalTo(0); - yield assert(execute('return arguments.length', 1, 'a', false)).equalTo(3); - }); - - test.ignore(env.browsers(Browser.FIREFOX, Browser.SAFARI)). - it('can return arguments object as array', function*() { - let val = yield execute('return arguments', 1, 'a', false); - - assert(val.length).equalTo(3); - assert(val[0]).equalTo(1); - assert(val[1]).equalTo('a'); - assert(val[2]).equalTo(false); - }); - - test.it('can pass object literal', function*() { - let result = yield execute( - 'return [typeof arguments[0], arguments[0].a]', {a: 'hello'}) - assert(result[0]).equalTo('object'); - assert(result[1]).equalTo('hello'); - }); - - test.it('WebElement arguments are passed as DOM elements', function*() { - let el = yield driver.findElement(By.tagName('div')); - let result = - yield execute('return arguments[0].tagName.toLowerCase();', el); - assert(result).equalTo('div'); - }); - - test.it('can pass array containing object literals', function*() { - let result = yield execute('return arguments[0]', [{color: "red"}]); - assert(result.length).equalTo(1); - assert(result[0].color).equalTo('red'); - }); - - test.it('does not modify object literal parameters', function() { - var input = {color: 'red'}; - return execute('return arguments[0];', input).then(verifyJson(input)); - }); - }); - - // See https://code.google.com/p/selenium/issues/detail?id=8223. - describe('issue 8223;', function() { - describe('using for..in loops;', function() { - test.it('can return array built from for-loop index', function() { - return execute(function() { - var ret = []; - for (var i = 0; i < 3; i++) { - ret.push(i); - } - return ret; - }).then(verifyJson[0, 1, 2]); - }); - - test.it('can copy input array contents', function() { - return execute(function(input) { - var ret = []; - for (var i in input) { - ret.push(input[i]); - } - return ret; - }, ['fa', 'fe', 'fi']).then(verifyJson(['fa', 'fe', 'fi'])); - }); - - test.it('can iterate over input object keys', function() { - return execute(function(thing) { - var ret = []; - for (var w in thing.words) { - ret.push(thing.words[w].word); - } - return ret; - }, {words: [{word: 'fa'}, {word: 'fe'}, {word: 'fi'}]}) - .then(verifyJson(['fa', 'fe', 'fi'])); - }); - - describe('recursive functions;', function() { - test.it('can build array from input', function() { - var input = ['fa', 'fe', 'fi']; - return execute(function(thearray) { - var ret = []; - function build_response(thearray, ret) { - ret.push(thearray.shift()); - return (!thearray.length && ret - || build_response(thearray, ret)); - } - return build_response(thearray, ret); - }, input).then(verifyJson(input)); - }); - - test.it('can build array from elements in object', function() { - var input = {words: [{word: 'fa'}, {word: 'fe'}, {word: 'fi'}]}; - return execute(function(thing) { - var ret = []; - function build_response(thing, ret) { - var item = thing.words.shift(); - ret.push(item.word); - return (!thing.words.length && ret - || build_response(thing, ret)); - } - return build_response(thing, ret); - }, input).then(verifyJson(['fa', 'fe', 'fi'])); - }); - }); - }); - }); - - describe('async timeouts', function() { - var TIMEOUT_IN_MS = 200; - var ACCEPTABLE_WAIT = TIMEOUT_IN_MS / 10; - var TOO_LONG_WAIT = TIMEOUT_IN_MS * 10; - - before(function() { - return driver.manage().timeouts().setScriptTimeout(TIMEOUT_IN_MS) - }); - - test.it('does not fail if script execute in time', function() { - return executeTimeOutScript(ACCEPTABLE_WAIT); - }); - - test.it('fails if script took too long', function() { - return executeTimeOutScript(TOO_LONG_WAIT) - .then(function() { - fail('it should have timed out'); - }).catch(function(e) { - assert(e.name).equalTo('ScriptTimeoutError'); - }); - }); - - function executeTimeOutScript(sleepTime) { - return driver.executeAsyncScript(function(sleepTime) { - var callback = arguments[arguments.length - 1]; - setTimeout(callback, sleepTime) - }, sleepTime); - } - }) - }); - - function verifyJson(expected) { - return function(actual) { - return assert(JSON.stringify(actual)).equalTo(JSON.stringify(expected)); - }; - } - - function execute() { - return driver.executeScript.apply(driver, arguments); - } -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js b/test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js deleted file mode 100644 index 0a13dd74..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/fingerprint_test.js +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('../testing/assert'), - test = require('../lib/test'), - Pages = test.Pages; - - -test.suite(function(env) { - var browsers = env.browsers; - - var driver; - test.before(function() { - driver = env.builder().build(); - }); - - test.after(function() { - driver.quit(); - }); - - describe('fingerprinting', function() { - test.it('it should fingerprint the navigator object', function*() { - yield driver.get(Pages.simpleTestPage); - - let wd = yield driver.executeScript('return navigator.webdriver'); - assert(wd).equalTo(true); - }); - - test.it('fingerprint must not be writable', function*() { - yield driver.get(Pages.simpleTestPage); - - let wd = yield driver.executeScript( - 'navigator.webdriver = "ohai"; return navigator.webdriver'); - assert(wd).equalTo(true); - }); - - test.it('leaves fingerprint on svg pages', function*() { - yield driver.get(Pages.svgPage); - - let wd = yield driver.executeScript('return navigator.webdriver'); - assert(wd).equalTo(true); - }); - }); - -// Currently only implemented in legacy firefox. -}, {browsers: ['legacy-firefox']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js b/test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js deleted file mode 100644 index cacb2b18..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/firefox/extension_test.js +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - crypto = require('crypto'), - fs = require('fs'), - path = require('path'); - -var extension = require('../../firefox/extension'), - io = require('../../io'), - zip = require('../../io/zip'), - it = require('../../testing').it; - - -var JETPACK_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/jetpack-sample.xpi'); -var NORMAL_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/sample.xpi'); -var WEBEXTENSION_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/webextension.xpi'); - -var JETPACK_EXTENSION_ID = 'jid1-EaXX7k0wwiZR7w@jetpack'; -var NORMAL_EXTENSION_ID = 'sample@seleniumhq.org'; -var WEBEXTENSION_EXTENSION_ID = 'webextensions-selenium-example@example.com'; - - -describe('extension', function() { - it('can install a jetpack xpi file', function() { - return io.tmpDir().then(function(dir) { - return extension.install(JETPACK_EXTENSION, dir).then(function(id) { - assert.equal(JETPACK_EXTENSION_ID, id); - var file = path.join(dir, id + '.xpi'); - assert.ok(fs.existsSync(file), 'no such file: ' + file); - assert.ok(!fs.statSync(file).isDirectory()); - - var copiedSha1 = crypto.createHash('sha1') - .update(fs.readFileSync(file)) - .digest('hex'); - - var goldenSha1 = crypto.createHash('sha1') - .update(fs.readFileSync(JETPACK_EXTENSION)) - .digest('hex'); - - assert.equal(copiedSha1, goldenSha1); - }); - }); - }); - - it('can install a normal xpi file', function() { - return io.tmpDir().then(function(dir) { - return extension.install(NORMAL_EXTENSION, dir).then(function(id) { - assert.equal(NORMAL_EXTENSION_ID, id); - - var file = path.join(dir, NORMAL_EXTENSION_ID); - assert.ok(fs.statSync(file).isDirectory()); - - assert.ok(fs.existsSync(path.join(file, 'chrome.manifest'))); - assert.ok(fs.existsSync(path.join(file, 'content/overlay.xul'))); - assert.ok(fs.existsSync(path.join(file, 'content/overlay.js'))); - assert.ok(fs.existsSync(path.join(file, 'install.rdf'))); - }); - }); - }); - - it('can install a webextension xpi file', function() { - return io.tmpDir().then(function(dir) { - return extension.install(WEBEXTENSION_EXTENSION, dir).then(function(id) { - assert.equal(WEBEXTENSION_EXTENSION_ID, id); - var file = path.join(dir, id + '.xpi'); - assert.ok(fs.existsSync(file), 'no such file: ' + file); - assert.ok(!fs.statSync(file).isDirectory()); - - var copiedSha1 = crypto.createHash('sha1') - .update(fs.readFileSync(file)) - .digest('hex'); - - var goldenSha1 = crypto.createHash('sha1') - .update(fs.readFileSync(WEBEXTENSION_EXTENSION)) - .digest('hex'); - - assert.equal(copiedSha1, goldenSha1); - }); - }); - }); - - it('can install an extension from a directory', function() { - return io.tmpDir().then(function(srcDir) { - return zip.unzip(NORMAL_EXTENSION, srcDir) - .then(() => io.tmpDir()) - .then(dstDir => { - return extension.install(srcDir, dstDir).then(function(id) { - assert.equal(NORMAL_EXTENSION_ID, id); - - var dir = path.join(dstDir, NORMAL_EXTENSION_ID); - - assert.ok(fs.existsSync(path.join(dir, 'chrome.manifest'))); - assert.ok(fs.existsSync(path.join(dir, 'content/overlay.xul'))); - assert.ok(fs.existsSync(path.join(dir, 'content/overlay.js'))); - assert.ok(fs.existsSync(path.join(dir, 'install.rdf'))); - }); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js b/test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js deleted file mode 100644 index 6262fd3d..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/firefox/firefox_test.js +++ /dev/null @@ -1,244 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var path = require('path'); - -var firefox = require('../../firefox'), - io = require('../../io'), - test = require('../../lib/test'), - assert = require('../../testing/assert'), - Context = require('../../firefox').Context, - error = require('../..').error; - -var {consume} = require('../../lib/promise'); - - -var JETPACK_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/jetpack-sample.xpi'); -var NORMAL_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/sample.xpi'); -var WEBEXTENSION_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/webextension.xpi'); - - -test.suite(function(env) { - describe('firefox', function() { - describe('Options', function() { - let driver; - - beforeEach(function() { - driver = null; - }); - - afterEach(function() { - if (driver) { - return driver.quit(); - } - }); - - /** - * @param {...string} extensions the extensions to install. - * @return {!firefox.Profile} a new profile. - */ - function profileWithExtensions(...extensions) { - let profile = new firefox.Profile(); - profile.setPreference('xpinstall.signatures.required', false); - extensions.forEach(ext => profile.addExtension(ext)); - return profile; - } - - /** - * Runs a test that requires Firefox Developer Edition. The test will be - * skipped if dev cannot be found on the current system. - */ - function runWithFirefoxDev(options, testFn) { - return firefox.Channel.AURORA.locate().then(exe => { - options.setBinary(exe); - driver = env.builder() - .setFirefoxOptions(options) - .build(); - return driver.call(testFn); - }, err => { - console.warn( - 'Skipping test: could not find Firefox Dev Edition: ' + err); - }); - } - - describe('can start Firefox with custom preferences', function() { - function runTest(opt_dir) { - return consume(function*() { - let profile = new firefox.Profile(opt_dir); - profile.setPreference('general.useragent.override', 'foo;bar'); - - let options = new firefox.Options().setProfile(profile); - - driver = env.builder(). - setFirefoxOptions(options). - build(); - - yield driver.get('data:text/html,
    content
    '); - - var userAgent = yield driver.executeScript( - 'return window.navigator.userAgent'); - assert(userAgent).equalTo('foo;bar'); - }); - } - - test.it('profile created from scratch', function() { - return runTest(); - }); - - test.it('profile created from template', function() { - return io.tmpDir().then(runTest); - }); - }); - - test.it('can start Firefox with a jetpack extension', function() { - let profile = profileWithExtensions(JETPACK_EXTENSION); - let options = new firefox.Options().setProfile(profile); - - return runWithFirefoxDev(options, function*() { - yield loadJetpackPage(driver, - 'data:text/html;charset=UTF-8,
    content
    '); - - let text = - yield driver.findElement({id: 'jetpack-sample-banner'}).getText(); - assert(text).equalTo('Hello, world!'); - }); - }); - - test.it('can start Firefox with a normal extension', function() { - let profile = profileWithExtensions(NORMAL_EXTENSION); - let options = new firefox.Options().setProfile(profile); - - return runWithFirefoxDev(options, function*() { - yield driver.get('data:text/html,
    content
    '); - - let footer = - yield driver.findElement({id: 'sample-extension-footer'}); - let text = yield footer.getText(); - assert(text).equalTo('Goodbye'); - }); - }); - - test.it('can start Firefox with a webextension extension', function() { - let profile = profileWithExtensions(WEBEXTENSION_EXTENSION); - let options = new firefox.Options().setProfile(profile); - - return runWithFirefoxDev(options, function*() { - yield driver.get(test.Pages.echoPage); - - let footer = - yield driver.findElement({id: 'webextensions-selenium-example'}); - let text = yield footer.getText(); - assert(text).equalTo('Content injected by webextensions-selenium-example'); - }); - }); - - test.it('can start Firefox with multiple extensions', function() { - let profile = - profileWithExtensions(JETPACK_EXTENSION, NORMAL_EXTENSION); - let options = new firefox.Options().setProfile(profile); - - return runWithFirefoxDev(options, function*() { - yield loadJetpackPage(driver, - 'data:text/html;charset=UTF-8,
    content
    '); - - let banner = - yield driver.findElement({id: 'jetpack-sample-banner'}).getText(); - assert(banner).equalTo('Hello, world!'); - - let footer = - yield driver.findElement({id: 'sample-extension-footer'}) - .getText(); - assert(footer).equalTo('Goodbye'); - }); - }); - - function loadJetpackPage(driver, url) { - // On linux the jetpack extension does not always run the first time - // we load a page. If this happens, just reload the page (a simple - // refresh doesn't appear to work). - return driver.wait(function() { - driver.get(url); - return driver.findElements({id: 'jetpack-sample-banner'}) - .then(found => found.length > 0); - }, 3000); - } - }); - - describe('binary management', function() { - var driver1, driver2; - - test.ignore(env.isRemote). - it('can start multiple sessions with single binary instance', function*() { - var options = new firefox.Options().setBinary(new firefox.Binary); - env.builder().setFirefoxOptions(options); - driver1 = yield env.builder().build(); - driver2 = yield env.builder().build(); - // Ok if this doesn't fail. - }); - - test.afterEach(function*() { - if (driver1) { - yield driver1.quit(); - } - - if (driver2) { - yield driver2.quit(); - } - }); - }); - - describe('context switching', function() { - var driver; - - test.beforeEach(function*() { - driver = yield env.builder().build(); - }); - - test.afterEach(function() { - if (driver) { - return driver.quit(); - } - }); - - test.it('can get context', function() { - return assert(driver.getContext()).equalTo(Context.CONTENT); - }); - - test.it('can set context', function*() { - yield driver.setContext(Context.CHROME); - let ctxt = yield driver.getContext(); - assert(ctxt).equalTo(Context.CHROME); - - yield driver.setContext(Context.CONTENT); - ctxt = yield driver.getContext(); - assert(ctxt).equalTo(Context.CONTENT); - }); - - test.it('throws on unknown context', function() { - return driver.setContext("foo").then(assert.fail, function(e) { - assert(e).instanceOf(error.InvalidArgumentError); - }); - }); - }); - - }); -}, {browsers: ['firefox']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js b/test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js deleted file mode 100644 index 7e7e331e..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/firefox/profile_test.js +++ /dev/null @@ -1,140 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - fs = require('fs'), - path = require('path'); - -var promise = require('../..').promise, - Profile = require('../../firefox/profile').Profile, - decode = require('../../firefox/profile').decode, - loadUserPrefs = require('../../firefox/profile').loadUserPrefs, - io = require('../../io'); - - -var JETPACK_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/jetpack-sample.xpi'); -var NORMAL_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/sample.xpi'); -var WEBEXTENSION_EXTENSION = path.join(__dirname, - '../../lib/test/data/firefox/webextension.xpi'); - -var JETPACK_EXTENSION_ID = 'jid1-EaXX7k0wwiZR7w@jetpack.xpi'; -var NORMAL_EXTENSION_ID = 'sample@seleniumhq.org'; -var WEBEXTENSION_EXTENSION_ID = 'webextensions-selenium-example@example.com'; - - - -describe('Profile', function() { - describe('setPreference', function() { - it('allows setting custom properties', function() { - var profile = new Profile(); - assert.equal(undefined, profile.getPreference('foo')); - - profile.setPreference('foo', 'bar'); - assert.equal('bar', profile.getPreference('foo')); - }); - - it('allows overriding mutable properties', function() { - var profile = new Profile(); - - profile.setPreference('browser.newtab.url', 'http://www.example.com'); - assert.equal('http://www.example.com', - profile.getPreference('browser.newtab.url')); - }); - }); - - describe('writeToDisk', function() { - it('copies template directory recursively', function() { - var templateDir; - return io.tmpDir().then(function(td) { - templateDir = td; - var foo = path.join(templateDir, 'foo'); - fs.writeFileSync(foo, 'Hello, world'); - - var bar = path.join(templateDir, 'subfolder/bar'); - fs.mkdirSync(path.dirname(bar)); - fs.writeFileSync(bar, 'Goodbye, world!'); - - return new Profile(templateDir).writeToDisk(); - }).then(function(profileDir) { - assert.notEqual(profileDir, templateDir); - - assert.equal('Hello, world', - fs.readFileSync(path.join(profileDir, 'foo'))); - assert.equal('Goodbye, world!', - fs.readFileSync(path.join(profileDir, 'subfolder/bar'))); - }); - }); - - it('does not copy lock files', function() { - return io.tmpDir().then(function(dir) { - fs.writeFileSync(path.join(dir, 'parent.lock'), 'lock'); - fs.writeFileSync(path.join(dir, 'lock'), 'lock'); - fs.writeFileSync(path.join(dir, '.parentlock'), 'lock'); - return new Profile(dir).writeToDisk(); - }).then(function(dir) { - assert.ok(fs.existsSync(dir)); - assert.ok(!fs.existsSync(path.join(dir, 'parent.lock'))); - assert.ok(!fs.existsSync(path.join(dir, 'lock'))); - assert.ok(!fs.existsSync(path.join(dir, '.parentlock'))); - }); - }); - - describe('user.js', function() { - it('merges template user.js into preferences', function() { - return io.tmpDir().then(function(dir) { - fs.writeFileSync(path.join(dir, 'user.js'), [ - 'user_pref("browser.newtab.url", "http://www.example.com")', - 'user_pref("dom.max_script_run_time", 1234)' - ].join('\n')); - - return new Profile(dir).writeToDisk(); - }).then(function(profile) { - return loadUserPrefs(path.join(profile, 'user.js')); - }).then(function(prefs) { - assert.equal('http://www.example.com', prefs['browser.newtab.url']); - assert.equal(1234, prefs['dom.max_script_run_time']); - }); - }); - }); - - describe('extensions', function() { - it('are copied into new profile directory', function() { - var profile = new Profile(); - profile.addExtension(JETPACK_EXTENSION); - profile.addExtension(NORMAL_EXTENSION); - profile.addExtension(WEBEXTENSION_EXTENSION); - - return profile.writeToDisk().then(function(dir) { - dir = path.join(dir, 'extensions'); - assertExists(JETPACK_EXTENSION_ID); - assertExists(NORMAL_EXTENSION_ID); - assertExists(WEBEXTENSION_EXTENSION_ID + '.xpi'); - - function assertExists(file) { - assert.ok( - fs.existsSync(path.join(dir, file)), - `expected ${file} to exist`); - } - }); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js b/test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js deleted file mode 100644 index 558cd552..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/http/http_test.js +++ /dev/null @@ -1,223 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - http = require('http'), - url = require('url'); - -var HttpClient = require('../../http').HttpClient, - HttpRequest = require('../../lib/http').Request, - HttpResponse = require('../../lib/http').Response, - Server = require('../../lib/test/httpserver').Server; - -describe('HttpClient', function() { - this.timeout(4 * 1000); - - var server = new Server(function(req, res) { - let parsedUrl = url.parse(req.url); - - if (req.method == 'GET' && req.url == '/echo') { - res.writeHead(200, req.headers); - res.end(); - - } else if (req.method == 'GET' && req.url == '/redirect') { - res.writeHead(303, {'Location': server.url('/hello')}); - res.end(); - - } else if (req.method == 'GET' && req.url == '/hello') { - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('hello, world!'); - - } else if (req.method == 'GET' && req.url == '/chunked') { - res.writeHead(200, { - 'content-type': 'text/html; charset=utf-8', - 'transfer-encoding': 'chunked' - }); - res.write(''); - setTimeout(() => res.end('

    Hello, world!

    '), 20); - - } else if (req.method == 'GET' && req.url == '/badredirect') { - res.writeHead(303, {}); - res.end(); - - } else if (req.method == 'GET' && req.url == '/protected') { - var denyAccess = function() { - res.writeHead(401, {'WWW-Authenticate': 'Basic realm="test"'}); - res.end('Access denied'); - }; - - var basicAuthRegExp = /^\s*basic\s+([a-z0-9\-\._~\+\/]+)=*\s*$/i - var auth = req.headers.authorization; - var match = basicAuthRegExp.exec(auth || ''); - if (!match) { - denyAccess(); - return; - } - - var userNameAndPass = new Buffer(match[1], 'base64').toString(); - var parts = userNameAndPass.split(':', 2); - if (parts[0] !== 'genie' && parts[1] !== 'bottle') { - denyAccess(); - return; - } - - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('Access granted!'); - - } else if (req.method == 'GET' - && parsedUrl.pathname - && parsedUrl.pathname.endsWith('/proxy')) { - let headers = Object.assign({}, req.headers); - headers['x-proxy-request-uri'] = req.url; - res.writeHead(200, headers); - res.end(); - - } else if (req.method == 'GET' - && parsedUrl.pathname - && parsedUrl.pathname.endsWith('/proxy/redirect')) { - let path = `/proxy${parsedUrl.search || ''}${parsedUrl.hash || ''}`; - res.writeHead(303, {'Location': path}); - res.end(); - - } else { - res.writeHead(404, {}); - res.end(); - } - }); - - before(function() { - return server.start(); - }); - - after(function() { - return server.stop(); - }); - - it('can send a basic HTTP request', function() { - var request = new HttpRequest('GET', '/echo'); - request.headers.set('Foo', 'Bar'); - - var agent = new http.Agent(); - agent.maxSockets = 1; // Only making 1 request. - - var client = new HttpClient(server.url(), agent); - return client.send(request).then(function(response) { - assert.equal(200, response.status); - assert.equal(response.headers.get('content-length'), '0'); - assert.equal(response.headers.get('connection'), 'keep-alive'); - assert.equal(response.headers.get('host'), server.host()); - - assert.equal(request.headers.get('Foo'), 'Bar'); - assert.equal( - request.headers.get('Accept'), 'application/json; charset=utf-8'); - }); - }); - - it('handles chunked responses', function() { - let request = new HttpRequest('GET', '/chunked'); - - let client = new HttpClient(server.url()); - return client.send(request).then(response => { - assert.equal(200, response.status); - assert.equal(response.body, '

    Hello, world!

    '); - }); - }); - - it('can use basic auth', function() { - var parsed = url.parse(server.url()); - parsed.auth = 'genie:bottle'; - - var client = new HttpClient(url.format(parsed)); - var request = new HttpRequest('GET', '/protected'); - return client.send(request).then(function(response) { - assert.equal(200, response.status); - assert.equal(response.headers.get('content-type'), 'text/plain'); - assert.equal(response.body, 'Access granted!'); - }); - }); - - it('fails requests missing required basic auth', function() { - var client = new HttpClient(server.url()); - var request = new HttpRequest('GET', '/protected'); - return client.send(request).then(function(response) { - assert.equal(401, response.status); - assert.equal(response.body, 'Access denied'); - }); - }); - - it('automatically follows redirects', function() { - var request = new HttpRequest('GET', '/redirect'); - var client = new HttpClient(server.url()); - return client.send(request).then(function(response) { - assert.equal(200, response.status); - assert.equal(response.headers.get('content-type'), 'text/plain'); - assert.equal(response.body, 'hello, world!'); - }); - }); - - it('handles malformed redirect responses', function() { - var request = new HttpRequest('GET', '/badredirect'); - var client = new HttpClient(server.url()); - return client.send(request).then(assert.fail, function(err) { - assert.ok(/Failed to parse "Location"/.test(err.message), - 'Not the expected error: ' + err.message); - }); - }); - - describe('with proxy', function() { - it('sends request to proxy with absolute URI', function() { - var request = new HttpRequest('GET', '/proxy'); - var client = new HttpClient( - 'http://another.server.com', undefined, server.url()); - return client.send(request).then(function(response) { - assert.equal(200, response.status); - assert.equal(response.headers.get('host'), 'another.server.com'); - assert.equal( - response.headers.get('x-proxy-request-uri'), - 'http://another.server.com/proxy'); - }); - }); - - it('uses proxy when following redirects', function() { - var request = new HttpRequest('GET', '/proxy/redirect'); - var client = new HttpClient( - 'http://another.server.com', undefined, server.url()); - return client.send(request).then(function(response) { - assert.equal(200, response.status); - assert.equal(response.headers.get('host'), 'another.server.com'); - assert.equal( - response.headers.get('x-proxy-request-uri'), - 'http://another.server.com/proxy'); - }); - }); - - it('includes search and hash in redirect URI', function() { - var request = new HttpRequest('GET', '/proxy/redirect?foo#bar'); - var client = new HttpClient( - 'http://another.server.com', undefined, server.url()); - return client.send(request).then(function(response) { - assert.equal(200, response.status); - assert.equal(response.headers.get('host'), 'another.server.com'); - assert.equal( - response.headers.get('x-proxy-request-uri'), - 'http://another.server.com/proxy?foo#bar'); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js b/test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js deleted file mode 100644 index 6361c065..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/http/util_test.js +++ /dev/null @@ -1,178 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const http = require('http'); - -const error = require('../../lib/error'); -const util = require('../../http/util'); -const promise = require('../../lib/promise'); - -describe('selenium-webdriver/http/util', function() { - - var server, baseUrl; - - var status, value, responseCode; - - function startServer(done) { - if (server) return done(); - - server = http.createServer(function(req, res) { - var data = JSON.stringify({status: status, value: value}); - res.writeHead(responseCode, { - 'Content-Type': 'application/json; charset=utf-8', - 'Content-Length': Buffer.byteLength(data, 'utf8') - }); - res.end(data); - }); - - server.listen(0, '127.0.0.1', function(e) { - if (e) return done(e); - - var addr = server.address(); - baseUrl = 'http://' + addr.address + ':' + addr.port; - done(); - }); - } - - function killServer(done) { - if (!server) return done(); - server.close(done); - server = null; - } - - after(killServer); - - beforeEach(function(done) { - status = 0; - value = 'abc123'; - responseCode = 200; - startServer(done); - }); - - describe('#getStatus', function() { - it('should return value field on success', function() { - return util.getStatus(baseUrl).then(function(response) { - assert.equal('abc123', response); - }); - }); - - it('should fail if response object is not success', function() { - status = 1; - return util.getStatus(baseUrl).then(function() { - throw Error('expected a failure'); - }, function(err) { - assert.ok(err instanceof error.WebDriverError); - assert.equal(err.code, error.WebDriverError.code); - assert.equal(err.message, value); - }); - }); - - it('should fail if the server is not listening', function(done) { - killServer(function(e) { - if(e) return done(e); - - util.getStatus(baseUrl).then(function() { - done(Error('expected a failure')); - }, function() { - // Expected. - done(); - }); - }); - }); - - it('should fail if HTTP status is not 200', function() { - status = 1; - responseCode = 404; - return util.getStatus(baseUrl).then(function() { - throw Error('expected a failure'); - }, function(err) { - assert.ok(err instanceof error.WebDriverError); - assert.equal(err.code, error.WebDriverError.code); - assert.equal(err.message, value); - }); - }); - }); - - describe('#waitForServer', function() { - it('resolves when server is ready', function() { - status = 1; - setTimeout(function() { status = 0; }, 50); - return util.waitForServer(baseUrl, 100); - }); - - it('should fail if server does not become ready', function() { - status = 1; - return util.waitForServer(baseUrl, 50). - then(function() {throw Error('Expected to time out')}, - function() {}); - }); - - it('can cancel wait', function() { - status = 1; - let cancel = new Promise(resolve => { - setTimeout(_ => resolve(), 50) - }); - return util.waitForServer(baseUrl, 200, cancel) - .then( - () => { throw Error('Did not expect to succeed!'); }, - (e) => assert.ok(e instanceof promise.CancellationError)); - }); - }); - - describe('#waitForUrl', function() { - it('succeeds when URL returns 2xx', function() { - responseCode = 404; - setTimeout(function() { responseCode = 200; }, 50); - - return util.waitForUrl(baseUrl, 200); - }); - - it('fails if URL always returns 4xx', function() { - responseCode = 404; - - return util.waitForUrl(baseUrl, 50) - .then(() => assert.fail('Expected to time out'), - () => true); - }); - - it('fails if cannot connect to server', function() { - return new Promise((resolve, reject) => { - killServer(function(e) { - if (e) return reject(e); - - util.waitForUrl(baseUrl, 50). - then(function() { reject(Error('Expected to time out')); }, - function() { resolve(); }); - }); - }); - }); - - it('can cancel wait', function() { - responseCode = 404; - let cancel = new Promise(resolve => { - setTimeout(_ => resolve(), 50); - }); - return util.waitForUrl(baseUrl, 200, cancel) - .then( - () => { throw Error('Did not expect to succeed!'); }, - (e) => assert.ok(e instanceof promise.CancellationError)); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js b/test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js deleted file mode 100644 index 40dedc65..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/io/io_test.js +++ /dev/null @@ -1,360 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - fs = require('fs'), - path = require('path'), - tmp = require('tmp'); - -var io = require('../../io'); - - -describe('io', function() { - describe('copy', function() { - var tmpDir; - - before(function() { - return io.tmpDir().then(function(d) { - tmpDir = d; - - fs.writeFileSync(path.join(d, 'foo'), 'Hello, world'); - }); - }); - - it('can copy one file to another', function() { - return io.tmpFile().then(function(f) { - return io.copy(path.join(tmpDir, 'foo'), f).then(function(p) { - assert.equal(p, f); - assert.equal('Hello, world', fs.readFileSync(p)); - }); - }); - }); - - it('can copy symlink to destination', function() { - if (process.platform === 'win32') { - return; // No symlinks on windows. - } - fs.symlinkSync( - path.join(tmpDir, 'foo'), - path.join(tmpDir, 'symlinked-foo')); - return io.tmpFile().then(function(f) { - return io.copy(path.join(tmpDir, 'symlinked-foo'), f).then(function(p) { - assert.equal(p, f); - assert.equal('Hello, world', fs.readFileSync(p)); - }); - }); - }); - - it('fails if given a directory as a source', function() { - return io.tmpFile().then(function(f) { - return io.copy(tmpDir, f); - }).then(function() { - throw Error('Should have failed with a type error'); - }, function() { - // Do nothing; expected. - }); - }); - }); - - describe('copyDir', function() { - it('copies recursively', function() { - return io.tmpDir().then(function(dir) { - fs.writeFileSync(path.join(dir, 'file1'), 'hello'); - fs.mkdirSync(path.join(dir, 'sub')); - fs.mkdirSync(path.join(dir, 'sub/folder')); - fs.writeFileSync(path.join(dir, 'sub/folder/file2'), 'goodbye'); - - return io.tmpDir().then(function(dst) { - return io.copyDir(dir, dst).then(function(ret) { - assert.equal(dst, ret); - - assert.equal('hello', - fs.readFileSync(path.join(dst, 'file1'))); - assert.equal('goodbye', - fs.readFileSync(path.join(dst, 'sub/folder/file2'))); - }); - }); - }); - }); - - it('creates destination dir if necessary', function() { - return io.tmpDir().then(function(srcDir) { - fs.writeFileSync(path.join(srcDir, 'foo'), 'hi'); - return io.tmpDir().then(function(dstDir) { - return io.copyDir(srcDir, path.join(dstDir, 'sub')); - }); - }).then(function(p) { - assert.equal('sub', path.basename(p)); - assert.equal('hi', fs.readFileSync(path.join(p, 'foo'))); - }); - }); - - it('supports regex exclusion filter', function() { - return io.tmpDir().then(function(src) { - fs.writeFileSync(path.join(src, 'foo'), 'a'); - fs.writeFileSync(path.join(src, 'bar'), 'b'); - fs.writeFileSync(path.join(src, 'baz'), 'c'); - fs.mkdirSync(path.join(src, 'sub')); - fs.writeFileSync(path.join(src, 'sub/quux'), 'd'); - fs.writeFileSync(path.join(src, 'sub/quot'), 'e'); - - return io.tmpDir().then(function(dst) { - return io.copyDir(src, dst, /(bar|quux)/); - }); - }).then(function(dir) { - assert.equal('a', fs.readFileSync(path.join(dir, 'foo'))); - assert.equal('c', fs.readFileSync(path.join(dir, 'baz'))); - assert.equal('e', fs.readFileSync(path.join(dir, 'sub/quot'))); - - assert.ok(!fs.existsSync(path.join(dir, 'bar'))); - assert.ok(!fs.existsSync(path.join(dir, 'sub/quux'))); - }); - }); - - it('supports exclusion filter function', function() { - return io.tmpDir().then(function(src) { - fs.writeFileSync(path.join(src, 'foo'), 'a'); - fs.writeFileSync(path.join(src, 'bar'), 'b'); - fs.writeFileSync(path.join(src, 'baz'), 'c'); - fs.mkdirSync(path.join(src, 'sub')); - fs.writeFileSync(path.join(src, 'sub/quux'), 'd'); - fs.writeFileSync(path.join(src, 'sub/quot'), 'e'); - - return io.tmpDir().then(function(dst) { - return io.copyDir(src, dst, function(f) { - return f !== path.join(src, 'foo') - && f !== path.join(src, 'sub/quot'); - }); - }); - }).then(function(dir) { - assert.equal('b', fs.readFileSync(path.join(dir, 'bar'))); - assert.equal('c', fs.readFileSync(path.join(dir, 'baz'))); - assert.equal('d', fs.readFileSync(path.join(dir, 'sub/quux'))); - - assert.ok(!fs.existsSync(path.join(dir, 'foo'))); - assert.ok(!fs.existsSync(path.join(dir, 'sub/quot'))); - }); - }); - }); - - describe('exists', function() { - var dir; - - before(function() { - return io.tmpDir().then(function(d) { - dir = d; - }); - }); - - it('returns a rejected promise if input value is invalid', function() { - return io.exists(undefined).then( - () => assert.fail('should have failed'), - e => assert.ok(e instanceof TypeError)); - }); - - it('works for directories', function() { - return io.exists(dir).then(assert.ok); - }); - - it('works for files', function() { - var file = path.join(dir, 'foo'); - fs.writeFileSync(file, ''); - return io.exists(file).then(assert.ok); - }); - - it('does not return a rejected promise if file does not exist', function() { - return io.exists(path.join(dir, 'not-there')).then(function(exists) { - assert.ok(!exists); - }); - }); - }); - - describe('unlink', function() { - var dir; - - before(function() { - return io.tmpDir().then(function(d) { - dir = d; - }); - }); - - it('silently succeeds if the path does not exist', function() { - return io.unlink(path.join(dir, 'not-there')); - }); - - it('deletes files', function() { - var file = path.join(dir, 'foo'); - fs.writeFileSync(file, ''); - return io.exists(file).then(assert.ok).then(function() { - return io.unlink(file); - }).then(function() { - return io.exists(file); - }).then(function(exists) { - return assert.ok(!exists); - }); - }); - }); - - describe('rmDir', function() { - it('succeeds if the designated directory does not exist', function() { - return io.tmpDir().then(function(d) { - return io.rmDir(path.join(d, 'i/do/not/exist')); - }); - }); - - it('deletes recursively', function() { - return io.tmpDir().then(function(dir) { - fs.writeFileSync(path.join(dir, 'file1'), 'hello'); - fs.mkdirSync(path.join(dir, 'sub')); - fs.mkdirSync(path.join(dir, 'sub/folder')); - fs.writeFileSync(path.join(dir, 'sub/folder/file2'), 'goodbye'); - - return io.rmDir(dir).then(function() { - assert.ok(!fs.existsSync(dir)); - assert.ok(!fs.existsSync(path.join(dir, 'sub/folder/file2'))); - }); - }); - }); - }); - - describe('findInPath', function() { - const savedPathEnv = process.env['PATH']; - afterEach(() => process.env['PATH'] = savedPathEnv); - - const cwd = process.cwd; - afterEach(() => process.cwd = cwd); - - let dirs; - beforeEach(() => { - return Promise.all([io.tmpDir(), io.tmpDir(), io.tmpDir()]).then(arr => { - dirs = arr; - process.env['PATH'] = arr.join(path.delimiter); - }); - }); - - it('returns null if file cannot be found', () => { - assert.strictEqual(io.findInPath('foo.txt'), null); - }); - - it('can find file on path', () => { - let filePath = path.join(dirs[1], 'foo.txt'); - fs.writeFileSync(filePath, 'hi'); - - assert.strictEqual(io.findInPath('foo.txt'), filePath); - }); - - it('returns null if file is in a subdir of a directory on the path', () => { - let subDir = path.join(dirs[2], 'sub'); - fs.mkdirSync(subDir); - - let filePath = path.join(subDir, 'foo.txt'); - fs.writeFileSync(filePath, 'hi'); - - assert.strictEqual(io.findInPath('foo.txt'), null); - }); - - it('does not match on directories', () => { - fs.mkdirSync(path.join(dirs[2], 'sub')); - assert.strictEqual(io.findInPath('sub'), null); - }); - - it('will look in cwd first if requested', () => { - return io.tmpDir().then(fakeCwd => { - process.cwd = () => fakeCwd; - - let theFile = path.join(fakeCwd, 'foo.txt'); - - fs.writeFileSync(path.join(dirs[1], 'foo.txt'), 'hi'); - fs.writeFileSync(theFile, 'bye'); - - assert.strictEqual(io.findInPath('foo.txt', true), theFile); - }); - }); - }); - - describe('read', function() { - var tmpDir; - - before(function() { - return io.tmpDir().then(function(d) { - tmpDir = d; - - fs.writeFileSync(path.join(d, 'foo'), 'Hello, world'); - }); - }); - - it('can read a file', function() { - return io.read(path.join(tmpDir, 'foo')).then(buff => { - assert.ok(buff instanceof Buffer); - assert.equal('Hello, world', buff.toString()); - }); - }); - - it('catches errors from invalid input', function() { - return io.read({}) - .then(() => assert.fail('should have failed'), - (e) => assert.ok(e instanceof TypeError)); - }); - - it('rejects returned promise if file does not exist', function() { - return io.read(path.join(tmpDir, 'not-there')) - .then(() => assert.fail('should have failed'), - (e) => assert.equal('ENOENT', e.code)); - }); - }); - - describe('mkdirp', function() { - it('recursively creates entire directory path', function() { - return io.tmpDir().then(root => { - let dst = path.join(root, 'foo/bar/baz'); - return io.mkdirp(dst).then(d => { - assert.strictEqual(d, dst); - return io.stat(d).then(stats => { - assert.ok(stats.isDirectory()); - }); - }); - }); - }); - - it('does nothing if the directory already exists', function() { - return io.tmpDir() - .then(dir => io.mkdirp(dir).then(d => assert.strictEqual(d, dir))); - }); - }); - - describe('walkDir', function() { - it('walk directory', function() { - return io.tmpDir().then(dir => { - fs.writeFileSync(path.join(dir, 'file1'), 'hello'); - fs.mkdirSync(path.join(dir, 'sub')); - fs.mkdirSync(path.join(dir, 'sub/folder')); - fs.writeFileSync(path.join(dir, 'sub/folder/file2'), 'goodbye'); - - return io.walkDir(dir).then(seen => { - assert.deepStrictEqual( - seen, - [{path: 'file1', dir: false}, - {path: 'sub', dir: true}, - {path: 'sub/folder', dir: true}, - {path: 'sub/folder/file2', dir: false}]); - }); - }); - }); - }) -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js b/test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js deleted file mode 100644 index 9d64778c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/io/zip_test.js +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const fs = require('fs'); -const path = require('path'); - -const io = require('../../io'); -const devmode = require('../../lib/devmode'); -const zip = require('../../io/zip'); -const {InvalidArgumentError} = require('../../lib/error'); - - -const SAMPLE_XPI_PATH = - path.join(__dirname, '../../lib/test/data/firefox/sample.xpi'); - -describe('io/zip', function() { - describe('unzip', function() { - it('creates destination dir if necessary', function() { - return io.tmpDir() - .then(dir => zip.unzip(SAMPLE_XPI_PATH, dir)) - .then(dir => { - assertExists(path.join(dir, 'chrome.manifest')); - assertExists(path.join(dir, 'content/overlay.js')); - assertExists(path.join(dir, 'content/overlay.xul')); - assertExists(path.join(dir, 'install.rdf')); - }); - }); - }); - - describe('Zip', function() { - let dir; - - beforeEach(function() { - return io.tmpDir().then(d => dir = d); - }); - - it('can convert an archive to a buffer', function() { - let z = new zip.Zip; - return io.mkdirp(path.join(dir, 'a/b/c/d/e')).then(() => { - return Promise.all([ - io.write(path.join(dir, 'foo'), 'a file'), - io.write(path.join(dir, 'a/b/c/carrot'), 'an orange carrot'), - io.write(path.join(dir, 'a/b/c/d/e/elephant'), 'e is for elephant') - ]); - }) - .then(() => z.addDir(dir)) - .then(() => Promise.all([io.tmpDir(), z.toBuffer()])) - .then(([outDir, buf]) => { - let output = path.join(outDir, 'out.zip'); - return io.write(output, buf) - .then(() => io.tmpDir()) - .then(d => zip.unzip(output, d)) - .then(d => { - assertContents(path.join(d, 'foo'), 'a file'); - assertContents(path.join(d, 'a/b/c/carrot'), 'an orange carrot'); - assertContents( - path.join(d, 'a/b/c/d/e/elephant'), - 'e is for elephant'); - }); - }); - }); - - describe('getFile', function() { - it('returns archive file contents as a buffer', function() { - let foo = path.join(dir, 'foo'); - fs.writeFileSync(foo, 'hello, world!'); - - let z = new zip.Zip; - return z.addFile(foo).then(() => { - assert.ok(z.has('foo')); - return z.getFile('foo'); - }).then( - buffer => assert.equal(buffer.toString('utf8'), 'hello, world!')); - }); - - it('returns an error if file is not in archive', function() { - let z = new zip.Zip; - assert.ok(!z.has('some-file')); - return z.getFile('some-file') - .then(() => assert.fail('should have failed'), - e => assert.strictEqual(e.constructor, InvalidArgumentError)); - }); - - it( - 'returns a rejected promise if the requested path is a directory', - function() { - let file = path.join(dir, 'aFile'); - fs.writeFileSync(file, 'hello, world!'); - - let z = new zip.Zip; - return z.addDir(dir, 'foo') - .then(() => z.getFile('foo')) - .then( - () => assert.fail('should have failed'), - e => assert.strictEqual( - e.constructor, InvalidArgumentError)) - .then(() => z.getFile('foo/aFile')) - .then(b => assert.equal(b.toString('utf8'), 'hello, world!')); - }); - }); - }); - - function assertExists(p) { - assert.ok(fs.existsSync(p), `expected ${p} to exist`); - } - - function assertContents(p, c) { - assert.strictEqual( - fs.readFileSync(p, 'utf8'), c, `unexpected file contents for ${p}`); - } -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js deleted file mode 100644 index 34314fbf..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/by_test.js +++ /dev/null @@ -1,160 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'); -var by = require('../../lib/by'); - -describe('by', function() { - describe('By', function() { - describe('className', function() { - it('delegates to By.css', function() { - let locator = by.By.className('foo'); - assert.equal('css selector', locator.using); - assert.equal('.foo', locator.value); - }); - - it('escapes class name', function() { - let locator = by.By.className('foo#bar'); - assert.equal('css selector', locator.using); - assert.equal('.foo\\#bar', locator.value); - }); - - it('translates compound class names', function() { - let locator = by.By.className('a b'); - assert.equal('css selector', locator.using); - assert.equal('.a.b', locator.value); - - locator = by.By.className(' x y z-1 "g" '); - assert.equal('css selector', locator.using); - assert.equal('.x.y.z-1.\\"g\\"', locator.value); - }); - }); - - describe('id', function() { - it('delegates to By.css', function() { - let locator = by.By.id('foo'); - assert.equal('css selector', locator.using); - assert.equal('*[id="foo"]', locator.value); - }); - - it('escapes the ID', function() { - let locator = by.By.id('foo#bar'); - assert.equal('css selector', locator.using); - assert.equal('*[id="foo\\#bar"]', locator.value); - }); - }); - - describe('name', function() { - it('delegates to By.css', function() { - let locator = by.By.name('foo') - assert.equal('css selector', locator.using); - assert.equal('*[name="foo"]', locator.value); - }); - - it('escapes the name', function() { - let locator = by.By.name('foo"bar"') - assert.equal('css selector', locator.using); - assert.equal('*[name="foo\\"bar\\""]', locator.value); - }); - - it('escapes the name when it starts with a number', function() { - let locator = by.By.name('123foo"bar"') - assert.equal('css selector', locator.using); - assert.equal('*[name="\\31 23foo\\"bar\\""]', locator.value); - }); - - it('escapes the name when it starts with a negative number', function() { - let locator = by.By.name('-123foo"bar"') - assert.equal('css selector', locator.using); - assert.equal('*[name="-\\31 23foo\\"bar\\""]', locator.value); - }); - }); - }); - - describe('checkedLocator', function() { - it('accepts a By instance', function() { - let original = by.By.name('foo'); - let locator = by.checkedLocator(original); - assert.strictEqual(locator, original); - }); - - it('accepts custom locator functions', function() { - let original = function() {}; - let locator = by.checkedLocator(original); - assert.strictEqual(locator, original); - }); - - // See https://github.com/SeleniumHQ/selenium/issues/3056 - it('accepts By-like objects', function() { - let fakeBy = {using: 'id', value: 'foo'}; - let locator = by.checkedLocator(fakeBy); - assert.strictEqual(locator.constructor, by.By); - assert.equal(locator.using, 'id'); - assert.equal(locator.value, 'foo'); - }); - - it('accepts class name', function() { - let locator = by.checkedLocator({className: 'foo'}); - assert.equal('css selector', locator.using); - assert.equal('.foo', locator.value); - }); - - it('accepts css', function() { - let locator = by.checkedLocator({css: 'a > b'}); - assert.equal('css selector', locator.using); - assert.equal('a > b', locator.value); - }); - - it('accepts id', function() { - let locator = by.checkedLocator({id: 'foobar'}); - assert.equal('css selector', locator.using); - assert.equal('*[id="foobar"]', locator.value); - }); - - it('accepts linkText', function() { - let locator = by.checkedLocator({linkText: 'hello'}); - assert.equal('link text', locator.using); - assert.equal('hello', locator.value); - }); - - it('accepts name', function() { - let locator = by.checkedLocator({name: 'foobar'}); - assert.equal('css selector', locator.using); - assert.equal('*[name="foobar"]', locator.value); - }); - - it('accepts partialLinkText', function() { - let locator = by.checkedLocator({partialLinkText: 'hello'}); - assert.equal('partial link text', locator.using); - assert.equal('hello', locator.value); - }); - - it('accepts tagName', function() { - let locator = by.checkedLocator({tagName: 'div'}); - assert.equal('css selector', locator.using); - assert.equal('div', locator.value); - }); - - it('accepts xpath', function() { - let locator = by.checkedLocator({xpath: '//div[1]'}); - assert.equal('xpath', locator.using); - assert.equal('//div[1]', locator.value); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js deleted file mode 100644 index 0d0c67c9..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/capabilities_test.js +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const Capabilities = require('../../lib/capabilities').Capabilities; -const Symbols = require('../../lib/symbols'); - -const assert = require('assert'); - -describe('Capabilities', function() { - it('can set and unset a capability', function() { - let caps = new Capabilities(); - assert.equal(undefined, caps.get('foo')); - assert.ok(!caps.has('foo')); - - caps.set('foo', 'bar'); - assert.equal('bar', caps.get('foo')); - assert.ok(caps.has('foo')); - - caps.set('foo', null); - assert.equal(null, caps.get('foo')); - assert.ok(caps.has('foo')); - }); - - it('requires string capability keys', function() { - let caps = new Capabilities(); - assert.throws(() => caps.set({}, 'hi')); - }); - - it('can merge capabilities', function() { - let caps1 = new Capabilities() - .set('foo', 'bar') - .set('color', 'red'); - - let caps2 = new Capabilities() - .set('color', 'green'); - - assert.equal('bar', caps1.get('foo')); - assert.equal('red', caps1.get('color')); - assert.equal('green', caps2.get('color')); - assert.equal(undefined, caps2.get('foo')); - - caps2.merge(caps1); - assert.equal('bar', caps1.get('foo')); - assert.equal('red', caps1.get('color')); - assert.equal('red', caps2.get('color')); - assert.equal('bar', caps2.get('foo')); - }); - - it('can be initialized from a hash object', function() { - let caps = new Capabilities({'one': 123, 'abc': 'def'}); - assert.equal(123, caps.get('one')); - assert.equal('def', caps.get('abc')); - }); - - it('can be initialized from a map', function() { - let m = new Map([['one', 123], ['abc', 'def']]); - - let caps = new Capabilities(m); - assert.equal(123, caps.get('one')); - assert.equal('def', caps.get('abc')); - }); - - describe('serialize', function() { - it('works for simple capabilities', function() { - let m = new Map([['one', 123], ['abc', 'def']]); - let caps = new Capabilities(m); - assert.deepEqual({one: 123, abc: 'def'}, caps[Symbols.serialize]()); - }); - - it('does not omit capabilities set to a false-like value', function() { - let caps = new Capabilities; - caps.set('bool', false); - caps.set('number', 0); - caps.set('string', ''); - - assert.deepEqual( - {bool: false, number: 0, string: ''}, - caps[Symbols.serialize]()); - }); - - it('omits capabilities with a null value', function() { - let caps = new Capabilities; - caps.set('foo', null); - caps.set('bar', 123); - assert.deepEqual({bar: 123}, caps[Symbols.serialize]()); - }); - - it('omits capabilities with an undefined value', function() { - let caps = new Capabilities; - caps.set('foo', undefined); - caps.set('bar', 123); - assert.deepEqual({bar: 123}, caps[Symbols.serialize]()); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js deleted file mode 100644 index b92052f4..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/error_test.js +++ /dev/null @@ -1,306 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -describe('error', function() { - let assert = require('assert'); - let error = require('../../lib/error'); - - describe('checkResponse', function() { - it('defaults to WebDriverError if type is unrecognized', function() { - assert.throws( - () => error.checkResponse({error: 'foo', message: 'hi there'}), - (e) => { - assert.equal(e.constructor, error.WebDriverError); - return true; - }); - }); - - it('does not throw if error property is not a string', function() { - let resp = {error: 123, message: 'abc123'}; - let out = error.checkResponse(resp); - assert.strictEqual(out, resp); - }); - - test('unknown error', error.WebDriverError); - test('element not interactable', error.ElementNotInteractableError); - test('element not selectable', error.ElementNotSelectableError); - test('element not visible', error.ElementNotVisibleError); - test('invalid argument', error.InvalidArgumentError); - test('invalid cookie domain', error.InvalidCookieDomainError); - test('invalid element coordinates', error.InvalidElementCoordinatesError); - test('invalid element state', error.InvalidElementStateError); - test('invalid selector', error.InvalidSelectorError); - test('invalid session id', error.NoSuchSessionError); - test('javascript error', error.JavascriptError); - test('move target out of bounds', error.MoveTargetOutOfBoundsError); - test('no such alert', error.NoSuchAlertError); - test('no such element', error.NoSuchElementError); - test('no such frame', error.NoSuchFrameError); - test('no such window', error.NoSuchWindowError); - test('script timeout', error.ScriptTimeoutError); - test('session not created', error.SessionNotCreatedError); - test('stale element reference', error.StaleElementReferenceError); - test('timeout', error.TimeoutError); - test('unable to set cookie', error.UnableToSetCookieError); - test('unable to capture screen', error.UnableToCaptureScreenError); - test('unexpected alert open', error.UnexpectedAlertOpenError); - test('unknown command', error.UnknownCommandError); - test('unknown method', error.UnknownMethodError); - test('unsupported operation', error.UnsupportedOperationError); - - function test(status, expectedType) { - it(`"${status}" => ${expectedType.name}`, function() { - assert.throws( - () => error.checkResponse({error: status, message: 'oops'}), - (e) => { - assert.equal(expectedType, e.constructor); - assert.equal(e.message, 'oops'); - return true; - }); - }); - } - }); - - describe('encodeError', function() { - describe('defaults to an unknown error', function() { - it('for a generic error value', function() { - runTest('hi', 'unknown error', 'hi'); - runTest(1, 'unknown error', '1'); - runTest({}, 'unknown error', '[object Object]'); - }); - - it('for a generic Error object', function() { - runTest(Error('oops'), 'unknown error', 'oops'); - runTest(TypeError('bad value'), 'unknown error', 'bad value'); - }); - }); - - test(error.WebDriverError, 'unknown error'); - test(error.ElementNotSelectableError, 'element not selectable'); - test(error.ElementNotVisibleError, 'element not visible'); - test(error.InvalidArgumentError, 'invalid argument'); - test(error.InvalidCookieDomainError, 'invalid cookie domain'); - test(error.InvalidElementStateError, 'invalid element state'); - test(error.InvalidSelectorError, 'invalid selector'); - test(error.NoSuchSessionError, 'invalid session id'); - test(error.JavascriptError, 'javascript error'); - test(error.MoveTargetOutOfBoundsError, 'move target out of bounds'); - test(error.NoSuchAlertError, 'no such alert'); - test(error.NoSuchElementError, 'no such element'); - test(error.NoSuchFrameError, 'no such frame'); - test(error.NoSuchWindowError, 'no such window'); - test(error.ScriptTimeoutError, 'script timeout'); - test(error.SessionNotCreatedError, 'session not created'); - test(error.StaleElementReferenceError, 'stale element reference'); - test(error.TimeoutError, 'timeout'); - test(error.UnableToSetCookieError, 'unable to set cookie'); - test(error.UnableToCaptureScreenError, 'unable to capture screen'); - test(error.UnexpectedAlertOpenError, 'unexpected alert open'); - test(error.UnknownCommandError, 'unknown command'); - test(error.UnknownMethodError, 'unknown method'); - test(error.UnsupportedOperationError, 'unsupported operation'); - - function test(ctor, code) { - it(`${ctor.name} => "${code}"`, () => { - runTest(new ctor('oops'), code, 'oops'); - }); - } - - function runTest(err, code, message) { - let obj = error.encodeError(err); - assert.strictEqual(obj['error'], code); - assert.strictEqual(obj['message'], message); - } - }); - - describe('throwDecodedError', function() { - it('defaults to WebDriverError if type is unrecognized', function() { - assert.throws( - () => error.throwDecodedError({error: 'foo', message: 'hi there'}), - (e) => { - assert.equal(e.constructor, error.WebDriverError); - return true; - }); - }); - - it('throws generic error if encoded data is not valid', function() { - assert.throws( - () => error.throwDecodedError({error: 123, message: 'abc123'}), - (e) => { - assert.strictEqual(e.constructor, error.WebDriverError); - return true; - }); - - assert.throws( - () => error.throwDecodedError('null'), - (e) => { - assert.strictEqual(e.constructor, error.WebDriverError); - return true; - }); - - assert.throws( - () => error.throwDecodedError(''), - (e) => { - assert.strictEqual(e.constructor, error.WebDriverError); - return true; - }); - }); - - test('unknown error', error.WebDriverError); - test('element not selectable', error.ElementNotSelectableError); - test('element not visible', error.ElementNotVisibleError); - test('invalid argument', error.InvalidArgumentError); - test('invalid cookie domain', error.InvalidCookieDomainError); - test('invalid element coordinates', error.InvalidElementCoordinatesError); - test('invalid element state', error.InvalidElementStateError); - test('invalid selector', error.InvalidSelectorError); - test('invalid session id', error.NoSuchSessionError); - test('javascript error', error.JavascriptError); - test('move target out of bounds', error.MoveTargetOutOfBoundsError); - test('no such alert', error.NoSuchAlertError); - test('no such element', error.NoSuchElementError); - test('no such frame', error.NoSuchFrameError); - test('no such window', error.NoSuchWindowError); - test('script timeout', error.ScriptTimeoutError); - test('session not created', error.SessionNotCreatedError); - test('stale element reference', error.StaleElementReferenceError); - test('timeout', error.TimeoutError); - test('unable to set cookie', error.UnableToSetCookieError); - test('unable to capture screen', error.UnableToCaptureScreenError); - test('unexpected alert open', error.UnexpectedAlertOpenError); - test('unknown command', error.UnknownCommandError); - test('unknown method', error.UnknownMethodError); - test('unsupported operation', error.UnsupportedOperationError); - - it('leaves remoteStacktrace empty if not in encoding', function() { - assert.throws( - () => error.throwDecodedError({ - error: 'session not created', - message: 'oops' - }), - (e) => { - assert.strictEqual(e.constructor, error.SessionNotCreatedError); - assert.strictEqual(e.message, 'oops'); - assert.strictEqual(e.remoteStacktrace, ''); - return true; - }); - }); - - function test(status, expectedType) { - it(`"${status}" => ${expectedType.name}`, function() { - assert.throws( - () => error.throwDecodedError({ - error: status, - message: 'oops', - stacktrace: 'some-stacktrace' - }), - (e) => { - assert.strictEqual(e.constructor, expectedType); - assert.strictEqual(e.message, 'oops'); - assert.strictEqual(e.remoteStacktrace, 'some-stacktrace'); - return true; - }); - }); - } - }); - - describe('checkLegacyResponse', function() { - it('does not throw for success', function() { - let resp = {status: error.ErrorCode.SUCCESS}; - assert.strictEqual(resp, error.checkLegacyResponse(resp)); - }); - - test('NO_SUCH_ELEMENT', error.NoSuchElementError); - test('NO_SUCH_FRAME', error.NoSuchFrameError); - test('UNKNOWN_COMMAND', error.UnsupportedOperationError); - test('UNSUPPORTED_OPERATION', error.UnsupportedOperationError); - test('STALE_ELEMENT_REFERENCE', error.StaleElementReferenceError); - test('ELEMENT_NOT_VISIBLE', error.ElementNotVisibleError); - test('INVALID_ELEMENT_STATE', error.InvalidElementStateError); - test('UNKNOWN_ERROR', error.WebDriverError); - test('ELEMENT_NOT_SELECTABLE', error.ElementNotSelectableError); - test('JAVASCRIPT_ERROR', error.JavascriptError); - test('XPATH_LOOKUP_ERROR', error.InvalidSelectorError); - test('TIMEOUT', error.TimeoutError); - test('NO_SUCH_WINDOW', error.NoSuchWindowError); - test('INVALID_COOKIE_DOMAIN', error.InvalidCookieDomainError); - test('UNABLE_TO_SET_COOKIE', error.UnableToSetCookieError); - test('UNEXPECTED_ALERT_OPEN', error.UnexpectedAlertOpenError); - test('NO_SUCH_ALERT', error.NoSuchAlertError); - test('SCRIPT_TIMEOUT', error.ScriptTimeoutError); - test('INVALID_ELEMENT_COORDINATES', error.InvalidElementCoordinatesError); - test('INVALID_SELECTOR_ERROR', error.InvalidSelectorError); - test('SESSION_NOT_CREATED', error.SessionNotCreatedError); - test('MOVE_TARGET_OUT_OF_BOUNDS', error.MoveTargetOutOfBoundsError); - test('INVALID_XPATH_SELECTOR', error.InvalidSelectorError); - test('INVALID_XPATH_SELECTOR_RETURN_TYPE', error.InvalidSelectorError); - test('METHOD_NOT_ALLOWED', error.UnsupportedOperationError); - - describe('UnexpectedAlertOpenError', function() { - it('includes alert text from the response object', function() { - let response = { - status: error.ErrorCode.UNEXPECTED_ALERT_OPEN, - value: { - message: 'hi', - alert: {text: 'alert text here'} - } - }; - assert.throws( - () => error.checkLegacyResponse(response), - (e) => { - assert.equal(error.UnexpectedAlertOpenError, e.constructor); - assert.equal(e.message, 'hi'); - assert.equal(e.getAlertText(), 'alert text here'); - return true; - }); - }); - - it('uses an empty string if alert text omitted', function() { - let response = { - status: error.ErrorCode.UNEXPECTED_ALERT_OPEN, - value: { - message: 'hi' - } - }; - assert.throws( - () => error.checkLegacyResponse(response), - (e) => { - assert.equal(error.UnexpectedAlertOpenError, e.constructor); - assert.equal(e.message, 'hi'); - assert.equal(e.getAlertText(), ''); - return true; - }); - }); - }); - - function test(codeKey, expectedType) { - it(`${codeKey} => ${expectedType.name}`, function() { - let code = error.ErrorCode[codeKey]; - let resp = {status: code, value: {message: 'hi'}}; - assert.throws( - () => error.checkLegacyResponse(resp), - (e) => { - assert.equal(expectedType, e.constructor); - assert.equal(e.message, 'hi'); - return true; - }); - }); - } - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js deleted file mode 100644 index a02da974..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/events_test.js +++ /dev/null @@ -1,177 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const EventEmitter = require('../../lib/events').EventEmitter; - -const assert = require('assert'); -const sinon = require('sinon'); - -describe('EventEmitter', function() { - describe('#emit()', function() { - it('can emit events when nothing is registered', function() { - let emitter = new EventEmitter; - emitter.emit('foo'); - // Ok if no errors are thrown. - }); - - it('can pass args to listeners on emit', function() { - let emitter = new EventEmitter; - let now = Date.now(); - - let messages = []; - emitter.on('foo', (arg) => messages.push(arg)); - - emitter.emit('foo', now); - assert.deepEqual([now], messages); - - emitter.emit('foo', now + 15); - assert.deepEqual([now, now + 15], messages); - }); - }); - - describe('#addListener()', function() { - it('can add multiple listeners for one event', function() { - let emitter = new EventEmitter; - let count = 0; - emitter.addListener('foo', () => count++); - emitter.addListener('foo', () => count++); - emitter.addListener('foo', () => count++); - emitter.emit('foo'); - assert.equal(3, count); - }); - - it('only registers each listener function once', function() { - let emitter = new EventEmitter; - let count = 0; - let onFoo = () => count++; - emitter.addListener('foo', onFoo); - emitter.addListener('foo', onFoo); - emitter.addListener('foo', onFoo); - - emitter.emit('foo'); - assert.equal(1, count); - - emitter.emit('foo'); - assert.equal(2, count); - }); - - it('allows users to specify a custom scope', function() { - let obj = { - count: 0, - inc: function() { - this.count++; - } - }; - let emitter = new EventEmitter; - emitter.addListener('foo', obj.inc, obj); - - emitter.emit('foo'); - assert.equal(1, obj.count); - - emitter.emit('foo'); - assert.equal(2, obj.count); - }); - }); - - describe('#once()', function() { - it('only calls registered callback once', function() { - let emitter = new EventEmitter; - let count = 0; - emitter.once('foo', () => count++); - emitter.once('foo', () => count++); - emitter.once('foo', () => count++); - - emitter.emit('foo'); - assert.equal(3, count); - - emitter.emit('foo'); - assert.equal(3, count); - - emitter.emit('foo'); - assert.equal(3, count); - }); - }); - - describe('#removeListeners()', function() { - it('only removes the given listener function', function() { - let emitter = new EventEmitter; - let count = 0; - emitter.addListener('foo', () => count++); - emitter.addListener('foo', () => count++); - - let toRemove = () => count++; - emitter.addListener('foo', toRemove); - - emitter.emit('foo'); - assert.equal(3, count); - - emitter.removeListener('foo', toRemove); - emitter.emit('foo'); - assert.equal(5, count); - }); - }); - - describe('#removeAllListeners()', function() { - it('only removes listeners for type if specified', function() { - let emitter = new EventEmitter; - let count = 0; - emitter.addListener('foo', () => count++); - emitter.addListener('foo', () => count++); - emitter.addListener('foo', () => count++); - emitter.addListener('bar', () => count++); - - emitter.emit('foo'); - assert.equal(3, count); - - emitter.removeAllListeners('foo'); - - emitter.emit('foo'); - assert.equal(3, count); - - emitter.emit('bar'); - assert.equal(4, count); - }); - - it('removes absolutely all listeners if no type specified', function() { - let emitter = new EventEmitter; - let count = 0; - emitter.addListener('foo', () => count++); - emitter.addListener('bar', () => count++); - emitter.addListener('baz', () => count++); - emitter.addListener('baz', () => count++); - - emitter.emit('foo'); - assert.equal(1, count); - - emitter.emit('baz'); - assert.equal(3, count); - - emitter.removeAllListeners(); - - emitter.emit('foo'); - assert.equal(3, count); - - emitter.emit('bar'); - assert.equal(3, count); - - emitter.emit('baz'); - assert.equal(3, count); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js deleted file mode 100644 index 7cb0050f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/http_test.js +++ /dev/null @@ -1,696 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - sinon = require('sinon'); - -var Capabilities = require('../../lib/capabilities').Capabilities, - Command = require('../../lib/command').Command, - CommandName = require('../../lib/command').Name, - error = require('../../lib/error'), - http = require('../../lib/http'), - Session = require('../../lib/session').Session, - promise = require('../../lib/promise'), - WebElement = require('../../lib/webdriver').WebElement; - -describe('http', function() { - describe('buildPath', function() { - it('properly replaces path segments with command parameters', function() { - var parameters = {'sessionId':'foo', 'url':'http://www.google.com'}; - var finalPath = http.buildPath('/session/:sessionId/url', parameters); - assert.equal(finalPath, '/session/foo/url'); - assert.deepEqual(parameters, {'url':'http://www.google.com'}); - }); - - it('handles web element references', function() { - var parameters = {'sessionId':'foo', 'id': WebElement.buildId('bar')}; - - var finalPath = http.buildPath( - '/session/:sessionId/element/:id/click', parameters); - assert.equal(finalPath, '/session/foo/element/bar/click'); - assert.deepEqual(parameters, {}); - }); - - it('throws if missing a parameter', function() { - assert.throws( - () => http.buildPath('/session/:sessionId', {}), - function(err) { - return err instanceof error.InvalidArgumentError - && 'Missing required parameter: sessionId' === err.message; - }); - - assert.throws( - () => http.buildPath( - '/session/:sessionId/element/:id', {'sessionId': 'foo'}), - function(err) { - return err instanceof error.InvalidArgumentError - && 'Missing required parameter: id' === err.message; - }); - }); - - it('does not match on segments that do not start with a colon', function() { - assert.equal( - http.buildPath('/session/foo:bar/baz', {}), - '/session/foo:bar/baz'); - }); - }); - - describe('Executor', function() { - let executor; - let client; - let send; - - beforeEach(function setUp() { - client = new http.Client; - send = sinon.stub(client, 'send'); - executor = new http.Executor(client); - }); - - describe('command routing', function() { - it('rejects unrecognized commands', function() { - return executor.execute(new Command('fake-name')) - .then(assert.fail, err => { - if (err instanceof error.UnknownCommandError - && 'Unrecognized command: fake-name' === err.message) { - return; - } - throw err; - }) - }); - - it('rejects promise if client fails to send request', function() { - let error = new Error('boom'); - send.returns(Promise.reject(error)); - return assertFailsToSend(new Command(CommandName.NEW_SESSION)) - .then(function(e) { - assert.strictEqual(error, e); - assertSent( - 'POST', '/session', {}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - - it('can execute commands with no URL parameters', function() { - var resp = JSON.stringify({sessionId: 'abc123'}); - send.returns(Promise.resolve(new http.Response(200, {}, resp))); - - let command = new Command(CommandName.NEW_SESSION); - return assertSendsSuccessfully(command).then(function(response) { - assertSent( - 'POST', '/session', {}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - - it('rejects commands missing URL parameters', function() { - let command = - new Command(CommandName.FIND_CHILD_ELEMENT). - setParameter('sessionId', 's123'). - // Let this be missing: setParameter('id', {'ELEMENT': 'e456'}). - setParameter('using', 'id'). - setParameter('value', 'foo'); - - assert.throws( - () => executor.execute(command), - function(err) { - return err instanceof error.InvalidArgumentError - && 'Missing required parameter: id' === err.message; - }); - assert.ok(!send.called); - }); - - it('replaces URL parameters with command parameters', function() { - var command = new Command(CommandName.GET). - setParameter('sessionId', 's123'). - setParameter('url', 'http://www.google.com'); - - send.returns(Promise.resolve(new http.Response(200, {}, ''))); - - return assertSendsSuccessfully(command).then(function(response) { - assertSent( - 'POST', '/session/s123/url', {'url': 'http://www.google.com'}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - - describe('uses correct URL', function() { - beforeEach(() => executor = new http.Executor(client)); - - describe('in legacy mode', function() { - test(CommandName.GET_WINDOW_SIZE, {sessionId:'s123'}, false, - 'GET', '/session/s123/window/current/size'); - - test(CommandName.SET_WINDOW_SIZE, - {sessionId:'s123', width: 1, height: 1}, false, - 'POST', '/session/s123/window/current/size', - {width: 1, height: 1}); - - test(CommandName.MAXIMIZE_WINDOW, {sessionId:'s123'}, false, - 'POST', '/session/s123/window/current/maximize'); - - // This is consistent b/w legacy and W3C, just making sure. - test(CommandName.GET, - {sessionId:'s123', url: 'http://www.example.com'}, false, - 'POST', '/session/s123/url', {url: 'http://www.example.com'}); - }); - - describe('in W3C mode', function() { - test(CommandName.GET_WINDOW_SIZE, - {sessionId:'s123'}, true, - 'GET', '/session/s123/window/size'); - - test(CommandName.SET_WINDOW_SIZE, - {sessionId:'s123', width: 1, height: 1}, true, - 'POST', '/session/s123/window/size', {width: 1, height: 1}); - - test(CommandName.MAXIMIZE_WINDOW, {sessionId:'s123'}, true, - 'POST', '/session/s123/window/maximize'); - - // This is consistent b/w legacy and W3C, just making sure. - test(CommandName.GET, - {sessionId:'s123', url: 'http://www.example.com'}, true, - 'POST', '/session/s123/url', {url: 'http://www.example.com'}); - }); - - function test(command, parameters, w3c, - expectedMethod, expectedUrl, opt_expectedParams) { - it(`command=${command}`, function() { - var resp = JSON.stringify({sessionId: 'abc123'}); - send.returns(Promise.resolve(new http.Response(200, {}, resp))); - - let cmd = new Command(command).setParameters(parameters); - executor.w3c = w3c; - return executor.execute(cmd).then(function() { - assertSent( - expectedMethod, expectedUrl, opt_expectedParams || {}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - } - }); - }); - - describe('response parsing', function() { - it('extracts value from JSON response', function() { - var responseObj = { - 'status': error.ErrorCode.SUCCESS, - 'value': 'http://www.google.com' - }; - - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(responseObj)))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, 'http://www.google.com'); - }); - }); - - describe('extracts Session from NEW_SESSION response', function() { - beforeEach(() => executor = new http.Executor(client)); - - const command = new Command(CommandName.NEW_SESSION); - - describe('fails if server returns invalid response', function() { - describe('(empty response)', function() { - test(true); - test(false); - - function test(w3c) { - it('w3c === ' + w3c, function() { - send.returns(Promise.resolve(new http.Response(200, {}, ''))); - executor.w3c = w3c; - return executor.execute(command).then( - () => assert.fail('expected to fail'), - (e) => { - if (!e.message.startsWith('Unable to parse')) { - throw e; - } - }); - }); - } - }); - - describe('(no session ID)', function() { - test(true); - test(false); - - function test(w3c) { - it('w3c === ' + w3c, function() { - let resp = {value:{name: 'Bob'}}; - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(resp)))); - executor.w3c = w3c; - return executor.execute(command).then( - () => assert.fail('expected to fail'), - (e) => { - if (!e.message.startsWith('Unable to parse')) { - throw e; - } - }); - }); - } - }); - }); - - it('handles legacy response', function() { - var rawResponse = {sessionId: 's123', status: 0, value: {name: 'Bob'}}; - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(rawResponse)))); - - assert.ok(!executor.w3c); - return executor.execute(command).then(function(response) { - assert.ok(response instanceof Session); - assert.equal(response.getId(), 's123'); - - let caps = response.getCapabilities(); - assert.ok(caps instanceof Capabilities); - assert.equal(caps.get('name'), 'Bob'); - - assert.ok(!executor.w3c); - }); - }); - - it('auto-upgrades on W3C response', function() { - let rawResponse = { - value: { - sessionId: 's123', - value: { - name: 'Bob' - } - } - }; - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(rawResponse)))); - - assert.ok(!executor.w3c); - return executor.execute(command).then(function(response) { - assert.ok(response instanceof Session); - assert.equal(response.getId(), 's123'); - - let caps = response.getCapabilities(); - assert.ok(caps instanceof Capabilities); - assert.equal(caps.get('name'), 'Bob'); - - assert.ok(executor.w3c); - }); - }); - - it('if w3c, does not downgrade on legacy response', function() { - var rawResponse = {sessionId: 's123', status: 0, value: null}; - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(rawResponse)))); - - executor.w3c = true; - return executor.execute(command).then(function(response) { - assert.ok(response instanceof Session); - assert.equal(response.getId(), 's123'); - assert.equal(response.getCapabilities().size, 0); - assert.ok(executor.w3c, 'should never downgrade'); - }); - }); - - it('handles legacy new session failures', function() { - let rawResponse = { - status: error.ErrorCode.NO_SUCH_ELEMENT, - value: {message: 'hi'} - }; - - send.returns(Promise.resolve( - new http.Response(500, {}, JSON.stringify(rawResponse)))); - - return executor.execute(command) - .then(() => assert.fail('should have failed'), - e => { - assert.ok(e instanceof error.NoSuchElementError); - assert.equal(e.message, 'hi'); - }); - }); - - it('handles w3c new session failures', function() { - let rawResponse = - {value: {error: 'no such element', message: 'oops'}}; - - send.returns(Promise.resolve( - new http.Response(500, {}, JSON.stringify(rawResponse)))); - - return executor.execute(command) - .then(() => assert.fail('should have failed'), - e => { - assert.ok(e instanceof error.NoSuchElementError); - assert.equal(e.message, 'oops'); - }); - }); - }); - - describe('extracts Session from DESCRIBE_SESSION response', function() { - let command; - - beforeEach(function() { - executor = new http.Executor(client); - command = new Command(CommandName.DESCRIBE_SESSION) - .setParameter('sessionId', 'foo'); - }); - - describe('fails if server returns invalid response', function() { - describe('(empty response)', function() { - test(true); - test(false); - - function test(w3c) { - it('w3c === ' + w3c, function() { - send.returns(Promise.resolve(new http.Response(200, {}, ''))); - executor.w3c = w3c; - return executor.execute(command).then( - () => assert.fail('expected to fail'), - (e) => { - if (!e.message.startsWith('Unable to parse')) { - throw e; - } - }); - }); - } - }); - - describe('(no session ID)', function() { - test(true); - test(false); - - function test(w3c) { - it('w3c === ' + w3c, function() { - let resp = {value:{name: 'Bob'}}; - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(resp)))); - executor.w3c = w3c; - return executor.execute(command).then( - () => assert.fail('expected to fail'), - (e) => { - if (!e.message.startsWith('Unable to parse')) { - throw e; - } - }); - }); - } - }); - }); - - it('handles legacy response', function() { - var rawResponse = {sessionId: 's123', status: 0, value: {name: 'Bob'}}; - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(rawResponse)))); - - assert.ok(!executor.w3c); - return executor.execute(command).then(function(response) { - assert.ok(response instanceof Session); - assert.equal(response.getId(), 's123'); - - let caps = response.getCapabilities(); - assert.ok(caps instanceof Capabilities); - assert.equal(caps.get('name'), 'Bob'); - - assert.ok(!executor.w3c); - }); - }); - - it('does not auto-upgrade on W3C response', function() { - var rawResponse = {value: {sessionId: 's123', value: {name: 'Bob'}}}; - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(rawResponse)))); - - assert.ok(!executor.w3c); - return executor.execute(command).then(function(response) { - assert.ok(response instanceof Session); - assert.equal(response.getId(), 's123'); - - let caps = response.getCapabilities(); - assert.ok(caps instanceof Capabilities); - assert.equal(caps.get('name'), 'Bob'); - - assert.ok(!executor.w3c); - }); - }); - - it('if w3c, does not downgrade on legacy response', function() { - var rawResponse = {sessionId: 's123', status: 0, value: null}; - - send.returns(Promise.resolve( - new http.Response(200, {}, JSON.stringify(rawResponse)))); - - executor.w3c = true; - return executor.execute(command).then(function(response) { - assert.ok(response instanceof Session); - assert.equal(response.getId(), 's123'); - assert.equal(response.getCapabilities().size, 0); - assert.ok(executor.w3c, 'should never downgrade'); - }); - }); - }); - - it('handles JSON null', function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve(new http.Response(200, {}, 'null'))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, null); - }); - }); - - describe('falsy values', function() { - test(0); - test(false); - test(''); - - function test(value) { - it(`value=${value}`, function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve( - new http.Response(200, {}, - JSON.stringify({status: 0, value: value})))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, value); - }); - }); - } - }); - - it('handles non-object JSON', function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve(new http.Response(200, {}, '123'))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, 123); - }); - }); - - it('returns body text when 2xx but not JSON', function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve( - new http.Response(200, {}, 'hello, world\r\ngoodbye, world!'))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, 'hello, world\ngoodbye, world!'); - }); - }); - - it('returns body text when 2xx but invalid JSON', function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve( - new http.Response(200, {}, '['))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, '['); - }); - }); - - it('returns null if no body text and 2xx', function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve(new http.Response(200, {}, ''))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, null); - }); - }); - - it('returns normalized body text when 2xx but not JSON', function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve(new http.Response(200, {}, '\r\n\n\n\r\n'))); - - return executor.execute(command).then(function(response) { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - assert.strictEqual(response, '\n\n\n\n'); - }); - }); - - it('throws UnsupportedOperationError for 404 and body not JSON', - function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve( - new http.Response(404, {}, 'hello, world\r\ngoodbye, world!'))); - - return executor.execute(command) - .then( - () => assert.fail('should have failed'), - checkError( - error.UnsupportedOperationError, - 'hello, world\ngoodbye, world!')); - }); - - it('throws WebDriverError for generic 4xx when body not JSON', - function() { - var command = new Command(CommandName.GET_CURRENT_URL) - .setParameter('sessionId', 's123'); - - send.returns(Promise.resolve( - new http.Response(500, {}, 'hello, world\r\ngoodbye, world!'))); - - return executor.execute(command) - .then( - () => assert.fail('should have failed'), - checkError( - error.WebDriverError, - 'hello, world\ngoodbye, world!')) - .then(function() { - assertSent('GET', '/session/s123/url', {}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - }); - - it('canDefineNewCommands', function() { - executor.defineCommand('greet', 'GET', '/person/:name'); - - var command = new Command('greet'). - setParameter('name', 'Bob'); - - send.returns(Promise.resolve(new http.Response(200, {}, ''))); - - return assertSendsSuccessfully(command).then(function(response) { - assertSent('GET', '/person/Bob', {}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - - it('canRedefineStandardCommands', function() { - executor.defineCommand(CommandName.GO_BACK, 'POST', '/custom/back'); - - var command = new Command(CommandName.GO_BACK). - setParameter('times', 3); - - send.returns(Promise.resolve(new http.Response(200, {}, ''))); - - return assertSendsSuccessfully(command).then(function(response) { - assertSent('POST', '/custom/back', {'times': 3}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - - it('accepts promised http clients', function() { - executor = new http.Executor(Promise.resolve(client)); - - var resp = JSON.stringify({sessionId: 'abc123'}); - send.returns(Promise.resolve(new http.Response(200, {}, resp))); - - let command = new Command(CommandName.NEW_SESSION); - return executor.execute(command).then(response => { - assertSent( - 'POST', '/session', {}, - [['Accept', 'application/json; charset=utf-8']]); - }); - }); - - function entries(map) { - let entries = []; - for (let e of map.entries()) { - entries.push(e); - } - return entries; - } - - function checkError(type, message) { - return function(e) { - if (e instanceof type) { - assert.strictEqual(e.message, message); - } else { - throw e; - } - }; - } - - function assertSent(method, path, data, headers) { - assert.ok(send.calledWith(sinon.match(function(value) { - assert.equal(value.method, method); - assert.equal(value.path, path); - assert.deepEqual(value.data, data); - assert.deepEqual(entries(value.headers), headers); - return true; - }))); - } - - function assertSendsSuccessfully(command) { - return executor.execute(command).then(function(response) { - return response; - }); - } - - function assertFailsToSend(command, opt_onError) { - return executor.execute(command).then( - () => {throw Error('should have failed')}, - (e) => {return e}); - } - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js deleted file mode 100644 index 29d2af40..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/logging_test.js +++ /dev/null @@ -1,272 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const sinon = require('sinon'); -const logging = require('../../lib/logging'); - -describe('logging', function() { - let mgr, root, clock; - - beforeEach(function setUp() { - mgr = new logging.LogManager; - root = mgr.getLogger(''); - - clock = sinon.useFakeTimers(); - }); - - afterEach(function tearDown() { - clock.restore(); - }); - - describe('LogManager', function() { - describe('getLogger()', function() { - it('handles falsey input', function() { - assert.strictEqual(root, mgr.getLogger()); - assert.strictEqual(root, mgr.getLogger('')); - assert.strictEqual(root, mgr.getLogger(null)); - assert.strictEqual(root, mgr.getLogger(0)); - }); - - it('creates parent loggers', function() { - let logger = mgr.getLogger('foo.bar.baz'); - assert.strictEqual(logger.parent_, mgr.getLogger('foo.bar')); - - logger = logger.parent_; - assert.strictEqual(logger.parent_, mgr.getLogger('foo')); - - logger = logger.parent_; - assert.strictEqual(logger.parent_, mgr.getLogger('')); - - assert.strictEqual(logger.parent_.parent_, null); - }); - }); - }); - - describe('Logger', function() { - describe('getEffectiveLevel()', function() { - it('defaults to OFF', function() { - assert.strictEqual(root.getLevel(), logging.Level.OFF); - assert.strictEqual(root.getEffectiveLevel(), logging.Level.OFF); - - root.setLevel(null); - assert.strictEqual(root.getLevel(), null); - assert.strictEqual(root.getEffectiveLevel(), logging.Level.OFF); - }); - - it('uses own level if set', function() { - let logger = mgr.getLogger('foo.bar.baz'); - assert.strictEqual(logger.getLevel(), null); - assert.strictEqual(logger.getEffectiveLevel(), logging.Level.OFF); - - logger.setLevel(logging.Level.INFO); - assert.strictEqual(logger.getLevel(), logging.Level.INFO); - assert.strictEqual(logger.getEffectiveLevel(), logging.Level.INFO); - }); - - it('uses level from set on nearest parent', function() { - let ancestor = mgr.getLogger('foo'); - ancestor.setLevel(logging.Level.SEVERE); - - let logger = mgr.getLogger('foo.bar.baz'); - assert.strictEqual(logger.getLevel(), null); - assert.strictEqual(logger.getEffectiveLevel(), logging.Level.SEVERE); - }); - }); - - describe('isLoggable()', function() { - it('compares level against logger\'s effective level', function() { - const log1 = mgr.getLogger('foo'); - log1.setLevel(logging.Level.WARNING); - - const log2 = mgr.getLogger('foo.bar.baz'); - - assert(!log2.isLoggable(logging.Level.FINEST)); - assert(!log2.isLoggable(logging.Level.INFO)); - assert(log2.isLoggable(logging.Level.WARNING)); - assert(log2.isLoggable(logging.Level.SEVERE)); - - log2.setLevel(logging.Level.INFO); - - assert(!log2.isLoggable(logging.Level.FINEST)); - assert(log2.isLoggable(logging.Level.INFO)); - assert(log2.isLoggable(logging.Level.WARNING)); - assert(log2.isLoggable(logging.Level.SEVERE)); - - log2.setLevel(logging.Level.ALL); - - assert(log2.isLoggable(logging.Level.FINEST)); - assert(log2.isLoggable(logging.Level.INFO)); - assert(log2.isLoggable(logging.Level.WARNING)); - assert(log2.isLoggable(logging.Level.SEVERE)); - }); - - it('Level.OFF is never loggable', function() { - function test(level) { - root.setLevel(level); - assert(!root.isLoggable(logging.Level.OFF), - 'OFF should not be loggable at ' + level); - } - - test(logging.Level.ALL); - test(logging.Level.INFO); - test(logging.Level.OFF); - }); - }); - - describe('log()', function() { - it('does not invoke loggable if message is not loggable', function() { - const log = mgr.getLogger('foo'); - log.setLevel(logging.Level.OFF); - - let callback = sinon.spy(); - log.addHandler(callback); - root.addHandler(callback); - - assert(!callback.called); - }); - - it('invokes handlers for each parent logger', function() { - const cb1 = sinon.spy(); - const cb2 = sinon.spy(); - const cb3 = sinon.spy(); - const cb4 = sinon.spy(); - - const log1 = mgr.getLogger('foo'); - const log2 = mgr.getLogger('foo.bar'); - const log3 = mgr.getLogger('foo.bar.baz'); - const log4 = mgr.getLogger('foo.bar.baz.quot'); - - log1.addHandler(cb1); - log1.setLevel(logging.Level.INFO); - - log2.addHandler(cb2); - log2.setLevel(logging.Level.WARNING); - - log3.addHandler(cb3); - log3.setLevel(logging.Level.FINER); - - clock.tick(123456); - - log4.finest('this is the finest message'); - log4.finer('this is a finer message'); - log4.info('this is an info message'); - log4.warning('this is a warning message'); - log4.severe('this is a severe message'); - - assert.equal(4, cb1.callCount); - assert.equal(4, cb2.callCount); - assert.equal(4, cb3.callCount); - - const entry1 = new logging.Entry( - logging.Level.FINER, - '[foo.bar.baz.quot] this is a finer message', - 123456); - const entry2 = new logging.Entry( - logging.Level.INFO, - '[foo.bar.baz.quot] this is an info message', - 123456); - const entry3 = new logging.Entry( - logging.Level.WARNING, - '[foo.bar.baz.quot] this is a warning message', - 123456); - const entry4 = new logging.Entry( - logging.Level.SEVERE, - '[foo.bar.baz.quot] this is a severe message', - 123456); - - check(cb1.getCall(0).args[0], entry1); - check(cb1.getCall(1).args[0], entry2); - check(cb1.getCall(2).args[0], entry3); - check(cb1.getCall(3).args[0], entry4); - - check(cb2.getCall(0).args[0], entry1); - check(cb2.getCall(1).args[0], entry2); - check(cb2.getCall(2).args[0], entry3); - check(cb2.getCall(3).args[0], entry4); - - check(cb3.getCall(0).args[0], entry1); - check(cb3.getCall(1).args[0], entry2); - check(cb3.getCall(2).args[0], entry3); - check(cb3.getCall(3).args[0], entry4); - - function check(entry, expected) { - assert.equal(entry.level, expected.level, 'wrong level'); - assert.equal(entry.message, expected.message, 'wrong message'); - assert.equal(entry.timestamp, expected.timestamp, 'wrong time'); - } - }); - - it('does not invoke removed handler', function() { - root.setLevel(logging.Level.INFO); - const cb = sinon.spy(); - - root.addHandler(cb); - root.info('hi'); - assert.equal(1, cb.callCount); - - assert(root.removeHandler(cb)); - root.info('bye'); - assert.equal(1, cb.callCount); - - assert(!root.removeHandler(cb)); - }); - }); - }); - - describe('getLevel()', function() { - it('converts named levels', function() { - assert.strictEqual(logging.Level.DEBUG, logging.getLevel('DEBUG')); - assert.strictEqual(logging.Level.ALL, logging.getLevel('FAKE')); - }); - - it('converts numeric levels', function() { - assert.strictEqual( - logging.Level.DEBUG, - logging.getLevel(logging.Level.DEBUG.value)); - }); - - it('normalizes numeric levels', function() { - assert.strictEqual( - logging.Level.OFF, - logging.getLevel(logging.Level.OFF.value * 2)); - - let diff = logging.Level.SEVERE.value - logging.Level.WARNING.value; - assert.strictEqual( - logging.Level.WARNING, - logging.getLevel(logging.Level.WARNING.value + (diff * .5))); - - assert.strictEqual(logging.Level.ALL, logging.getLevel(0)); - assert.strictEqual(logging.Level.ALL, logging.getLevel(-1)); - }); - }); - - describe('Preferences', function() { - it('can be converted to JSON', function() { - let prefs = new logging.Preferences; - assert.equal('{}', JSON.stringify(prefs)); - - prefs.setLevel('foo', logging.Level.DEBUG); - assert.equal('{"foo":"DEBUG"}', JSON.stringify(prefs)); - - prefs.setLevel(logging.Type.BROWSER, logging.Level.FINE); - assert.equal('{"foo":"DEBUG","browser":"FINE"}', JSON.stringify(prefs)); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js deleted file mode 100644 index 207f490a..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_aplus_test.js +++ /dev/null @@ -1,78 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const promise = require('../../lib/promise'); -const {enablePromiseManager} = require('../../lib/test/promise'); - -describe('Promises/A+ Compliance Tests', function() { - enablePromiseManager(() => { - // The promise spec does not define behavior for unhandled rejections and - // assumes they are effectively swallowed. This is not the case with our - // implementation, so we have to disable error propagation to test that the - // rest of our behavior is compliant. - // We run the tests with a separate instance of the control flow to ensure - // disablign error propagation does not impact other tests. - var flow = new promise.ControlFlow(); - flow.setPropagateUnhandledRejections(false); - - // Skip the tests in 2.2.6.1/2. We are not compliant in these scenarios. - var realDescribe = global.describe; - global.describe = function(name, fn) { - realDescribe(name, function() { - var prefix = 'Promises/A+ Compliance Tests ' - + 'SELENIUM_PROMISE_MANAGER=true 2.2.6: ' - + '`then` may be called multiple times on the same promise.'; - var suffix = 'even when one handler is added inside another handler'; - if (this.fullTitle().startsWith(prefix) - && this.fullTitle().endsWith(suffix)) { - var realSpecify = global.specify; - try { - global.specify = function(name) { - realSpecify(name); - }; - fn(); - } finally { - global.specify = realSpecify; - } - } else { - fn(); - } - }); - }; - - require('promises-aplus-tests').mocha({ - resolved: function(value) { - return new promise.Promise((fulfill) => fulfill(value), flow); - }, - rejected: function(error) { - return new promise.Promise((_, reject) => reject(error), flow); - }, - deferred: function() { - var d = new promise.Deferred(flow); - return { - resolve: d.fulfill, - reject: d.reject, - promise: d.promise - }; - } - }); - - global.describe = realDescribe; - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js deleted file mode 100644 index b89a2f87..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_error_test.js +++ /dev/null @@ -1,884 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Contains tests against promise error handling. Many tests use - * NativePromise to control test termination independent of promise - * (and notably promise.ControlFlow). - */ - -'use strict'; - -const testutil = require('./testutil'); - -const assert = require('assert'); -const promise = require('../../lib/promise'); -const {enablePromiseManager} = require('../../lib/test/promise'); - -const NativePromise = Promise; -const StubError = testutil.StubError; -const throwStubError = testutil.throwStubError; -const assertIsStubError = testutil.assertIsStubError; - -describe('promise error handling', function() { - enablePromiseManager(() => { - var flow, uncaughtExceptions; - - beforeEach(function setUp() { - if (promise.USE_PROMISE_MANAGER) { - flow = promise.controlFlow(); - uncaughtExceptions = []; - flow.on('uncaughtException', onUncaughtException); - } - }); - - afterEach(function tearDown() { - if (promise.USE_PROMISE_MANAGER) { - return waitForIdle(flow).then(function() { - assert.deepEqual( - [], uncaughtExceptions, 'There were uncaught exceptions'); - flow.reset(); - }); - } - }); - - function onUncaughtException(e) { - uncaughtExceptions.push(e); - } - - function waitForAbort(opt_flow, opt_n) { - var n = opt_n || 1; - var theFlow = opt_flow || flow; - theFlow.removeAllListeners( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); - return new NativePromise(function(fulfill, reject) { - theFlow.once('idle', function() { - reject(Error('expected flow to report an unhandled error')); - }); - - var errors = []; - theFlow.on('uncaughtException', onError); - function onError(e) { - errors.push(e); - if (errors.length === n) { - theFlow.removeListener('uncaughtException', onError); - fulfill(n === 1 ? errors[0] : errors); - } - } - }); - } - - function waitForIdle(opt_flow) { - var theFlow = opt_flow || flow; - return new NativePromise(function(fulfill, reject) { - if (theFlow.isIdle()) { - fulfill(); - return; - } - theFlow.once('idle', fulfill); - theFlow.once('uncaughtException', reject); - }); - } - - it('testRejectedPromiseTriggersErrorCallback', function() { - return promise.rejected(new StubError). - then(assert.fail, assertIsStubError); - }); - - describe('callback throws trigger subsequent error callback', function() { - it('fulfilled promise', function() { - return promise.fulfilled(). - then(throwStubError). - then(assert.fail, assertIsStubError); - }); - - it('rejected promise', function() { - var e = Error('not the droids you are looking for'); - return promise.rejected(e). - then(assert.fail, throwStubError). - then(assert.fail, assertIsStubError); - }); - }); - - describe('callback returns rejected promise triggers subsequent errback', function() { - it('from fulfilled callback', function() { - return promise.fulfilled().then(function() { - return promise.rejected(new StubError); - }).then(assert.fail, assertIsStubError); - }); - - it('from rejected callback', function() { - var e = Error('not the droids you are looking for'); - return promise.rejected(e). - then(assert.fail, function() { - return promise.rejected(new StubError); - }). - then(assert.fail, assertIsStubError); - }); - }); - - it('testReportsUnhandledRejectionsThroughTheControlFlow', function() { - promise.rejected(new StubError); - return waitForAbort().then(assertIsStubError); - }); - - describe('multiple unhandled rejections outside a task', function() { - it('are reported in order they occurred', function() { - var e1 = Error('error 1'); - var e2 = Error('error 2'); - - promise.rejected(e1); - promise.rejected(e2); - - return waitForAbort(flow).then(function(error) { - assert.ok( - error instanceof promise.MultipleUnhandledRejectionError); - // TODO: switch to Array.from when we drop node 0.12.x - var errors = []; - for (var e of error.errors) { - errors.push(e); - } - assert.deepEqual([e1, e2], errors); - }); - }); - }); - - describe('does not report unhandled rejection when', function() { - it('handler added before next tick', function() { - promise.rejected(new StubError).then(assert.fail, assertIsStubError); - return waitForIdle(); - }); - - it('added async but before next tick', function() { - var called = false; - return new NativePromise(function(fulfill, reject) { - var aPromise; - NativePromise.resolve().then(function() { - aPromise.then(assert.fail, function(e) { - called = true; - assertIsStubError(e); - }); - waitForIdle().then(fulfill, reject); - }); - aPromise = promise.rejected(new StubError); - }).then(function() { - assert.ok(called); - }) - }); - }); - - it('testTaskThrows', function() { - return flow.execute(throwStubError).then(assert.fail, assertIsStubError); - }); - - it('testTaskReturnsRejectedPromise', function() { - return flow.execute(function() { - return promise.rejected(new StubError) - }).then(assert.fail, assertIsStubError); - }); - - it('testTaskHasUnhandledRejection', function() { - return flow.execute(function() { - promise.rejected(new StubError) - }).then(assert.fail, assertIsStubError); - }); - - it('testTaskfails_returnedPromiseIsUnhandled', function() { - flow.execute(throwStubError); - return waitForAbort().then(assertIsStubError); - }); - - it('testTaskHasUnhandledRejection_cancelsRemainingSubTasks', function() { - var seen = []; - flow.execute(function() { - promise.rejected(new StubError); - - flow.execute(() => seen.push('a')) - .then(() => seen.push('b'), (e) => seen.push(e)); - flow.execute(() => seen.push('c')) - .then(() => seen.push('b'), (e) => seen.push(e)); - }); - - return waitForAbort() - .then(assertIsStubError) - .then(() => assert.deepEqual([], seen)); - }); - - describe('nested task failures', function() { - it('returns up to paren', function() { - return flow.execute(function() { - return flow.execute(function() { - return flow.execute(throwStubError); - }); - }).then(assert.fail, assertIsStubError); - }); - - it('task throws; uncaught error bubbles up', function() { - flow.execute(function() { - flow.execute(function() { - flow.execute(throwStubError); - }); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('task throws; uncaught error bubbles up; is caught at root', function() { - flow.execute(function() { - flow.execute(function() { - flow.execute(throwStubError); - }); - }).then(assert.fail, assertIsStubError); - return waitForIdle(); - }); - - it('unhandled rejection bubbles up', function() { - flow.execute(function() { - flow.execute(function() { - flow.execute(function() { - promise.rejected(new StubError); - }); - }); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('unhandled rejection bubbles up; caught at root', function() { - flow.execute(function() { - flow.execute(function() { - promise.rejected(new StubError); - }); - }).then(assert.fail, assertIsStubError); - return waitForIdle(); - }); - - it('mixtureof hanging and free subtasks', function() { - flow.execute(function() { - return flow.execute(function() { - flow.execute(throwStubError); - }); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('cancels remaining tasks', function() { - var seen = []; - flow.execute(function() { - flow.execute(() => promise.rejected(new StubError)); - flow.execute(() => seen.push('a')) - .then(() => seen.push('b'), (e) => seen.push(e)); - flow.execute(() => seen.push('c')) - .then(() => seen.push('b'), (e) => seen.push(e)); - }); - - return waitForAbort() - .then(assertIsStubError) - .then(() => assert.deepEqual([], seen)); - }); - }); - - it('testTaskReturnsPromiseLikeObjectThatInvokesErrback', function() { - return flow.execute(function() { - return { - 'then': function(_, errback) { - errback('abc123'); - } - }; - }).then(assert.fail, function(value) { - assert.equal('abc123', value); - }); - }); - - describe('ControlFlow#wait();', function() { - describe('condition throws;', function() { - it('failure is caught', function() { - return flow.wait(throwStubError, 50).then(assert.fail, assertIsStubError); - }); - - it('failure is not caught', function() { - flow.wait(throwStubError, 50); - return waitForAbort().then(assertIsStubError); - }); - }); - - describe('condition returns promise', function() { - it('failure is caught', function() { - return flow.wait(function() { - return promise.rejected(new StubError); - }, 50).then(assert.fail, assertIsStubError); - }); - - it('failure is not caught', function() { - flow.wait(function() { - return promise.rejected(new StubError); - }, 50); - return waitForAbort().then(assertIsStubError); - }); - }); - - describe('condition has unhandled promise rejection', function() { - it('failure is caught', function() { - return flow.wait(function() { - promise.rejected(new StubError); - }, 50).then(assert.fail, assertIsStubError); - }); - - it('failure is not caught', function() { - flow.wait(function() { - promise.rejected(new StubError); - }, 50); - return waitForAbort().then(assertIsStubError); - }); - }); - - describe('condition has subtask failure', function() { - it('failure is caught', function() { - return flow.wait(function() { - flow.execute(function() { - flow.execute(throwStubError); - }); - }, 50).then(assert.fail, assertIsStubError); - }); - - it('failure is not caught', function() { - flow.wait(function() { - flow.execute(function() { - flow.execute(throwStubError); - }); - }, 50); - return waitForAbort().then(assertIsStubError); - }); - }); - }); - - describe('errback throws a new error', function() { - it('start with normal promise', function() { - var error = Error('an error'); - return promise.rejected(error). - catch(function(e) { - assert.equal(e, error); - throw new StubError; - }). - catch(assertIsStubError); - }); - - it('start with task result', function() { - var error = Error('an error'); - return flow.execute(function() { - throw error; - }). - catch(function(e) { - assert.equal(e, error); - throw new StubError; - }). - catch(assertIsStubError); - }); - - it('start with normal promise; uncaught error', function() { - var error = Error('an error'); - promise.rejected(error). - catch(function(e) { - assert.equal(e, error); - throw new StubError; - }); - return waitForAbort().then(assertIsStubError); - }); - - it('start with task result; uncaught error', function() { - var error = Error('an error'); - flow.execute(function() { - throw error; - }). - catch(function(e) { - assert.equal(e, error); - throw new StubError; - }); - return waitForAbort().then(assertIsStubError); - }); - }); - - it('thrownPromiseCausesCallbackRejection', function() { - let p = promise.fulfilled(1234); - return promise.fulfilled().then(function() { - throw p; - }).then(assert.fail, function(value) { - assert.strictEqual(p, value); - }); - }); - - describe('task throws promise', function() { - it('promise was fulfilled', function() { - var toThrow = promise.fulfilled(1234); - flow.execute(function() { - throw toThrow; - }).then(assert.fail, function(value) { - assert.equal(toThrow, value); - return toThrow; - }).then(function(value) { - assert.equal(1234, value); - }); - return waitForIdle(); - }); - - it('promise was rejected', function() { - var toThrow = promise.rejected(new StubError); - toThrow.catch(function() {}); // For tearDown. - flow.execute(function() { - throw toThrow; - }).then(assert.fail, function(e) { - assert.equal(toThrow, e); - return e; - }).then(assert.fail, assertIsStubError); - return waitForIdle(); - }); - }); - - it('testFailsTaskIfThereIsAnUnhandledErrorWhileWaitingOnTaskResult', function() { - var d = promise.defer(); - flow.execute(function() { - promise.rejected(new StubError); - return d.promise; - }).then(assert.fail, assertIsStubError); - - return waitForIdle().then(function() { - return d.promise; - }).then(assert.fail, function(e) { - assert.equal('CancellationError: StubError', e.toString()); - }); - }); - - it('testFailsParentTaskIfAsyncScheduledTaskFails', function() { - var d = promise.defer(); - flow.execute(function() { - flow.execute(throwStubError); - return d.promise; - }).then(assert.fail, assertIsStubError); - - return waitForIdle().then(function() { - return d.promise; - }).then(assert.fail, function(e) { - assert.equal('CancellationError: StubError', e.toString()); - }); - }); - - describe('long stack traces', function() { - afterEach(() => promise.LONG_STACK_TRACES = false); - - it('always includes task stacks in failures', function() { - promise.LONG_STACK_TRACES = false; - flow.execute(function() { - flow.execute(function() { - flow.execute(throwStubError, 'throw error'); - }, 'two'); - }, 'three'). - then(assert.fail, function(e) { - assertIsStubError(e); - if (typeof e.stack !== 'string') { - return; - } - var messages = e.stack.split(/\n/).filter(function(line, index) { - return /^From: /.test(line); - }); - assert.deepEqual([ - 'From: Task: throw error', - 'From: Task: two', - 'From: Task: three' - ], messages); - }); - return waitForIdle(); - }); - - it('does not include completed tasks', function () { - flow.execute(function() {}, 'succeeds'); - flow.execute(throwStubError, 'kaboom').then(assert.fail, function(e) { - assertIsStubError(e); - if (typeof e.stack !== 'string') { - return; - } - var messages = e.stack.split(/\n/).filter(function(line, index) { - return /^From: /.test(line); - }); - assert.deepEqual(['From: Task: kaboom'], messages); - }); - return waitForIdle(); - }); - - it('does not include promise chain when disabled', function() { - promise.LONG_STACK_TRACES = false; - flow.execute(function() { - flow.execute(function() { - return promise.fulfilled(). - then(function() {}). - then(function() {}). - then(throwStubError); - }, 'eventually assert.fails'); - }, 'start'). - then(assert.fail, function(e) { - assertIsStubError(e); - if (typeof e.stack !== 'string') { - return; - } - var messages = e.stack.split(/\n/).filter(function(line, index) { - return /^From: /.test(line); - }); - assert.deepEqual([ - 'From: Task: eventually assert.fails', - 'From: Task: start' - ], messages); - }); - return waitForIdle(); - }); - - it('includes promise chain when enabled', function() { - promise.LONG_STACK_TRACES = true; - flow.execute(function() { - flow.execute(function() { - return promise.fulfilled(). - then(function() {}). - then(function() {}). - then(throwStubError); - }, 'eventually assert.fails'); - }, 'start'). - then(assert.fail, function(e) { - assertIsStubError(e); - if (typeof e.stack !== 'string') { - return; - } - var messages = e.stack.split(/\n/).filter(function(line, index) { - return /^From: /.test(line); - }); - assert.deepEqual([ - 'From: Promise: then', - 'From: Task: eventually assert.fails', - 'From: Task: start' - ], messages); - }); - return waitForIdle(); - }); - }); - - describe('frame cancels remaining tasks', function() { - it('on unhandled task failure', function() { - var run = false; - return flow.execute(function() { - flow.execute(throwStubError); - flow.execute(function() { run = true; }); - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.ok(!run); - }); - }); - - it('on unhandled promise rejection', function() { - var run = false; - return flow.execute(function() { - promise.rejected(new StubError); - flow.execute(function() { run = true; }); - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.ok(!run); - }); - }); - - it('if task throws', function() { - var run = false; - return flow.execute(function() { - flow.execute(function() { run = true; }); - throw new StubError; - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.ok(!run); - }); - }); - - describe('task callbacks scheduled in another frame', function() { - flow = promise.controlFlow(); - function noop() {} - - let subTask; - - before(function() { - flow.execute(function() { - // This task will be discarded and never run because of the error below. - subTask = flow.execute(() => 'abc'); - throw new StubError('stub'); - }).catch(noop); - }); - - function assertCancellation(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal( - 'Task was discarded due to a previous failure: stub', e.message); - } - - it('are rejected with cancellation error', function() { - let result; - return Promise.resolve().then(function() { - return flow.execute(function() { - result = subTask.then(assert.fail); - }); - }) - .then(() => result) - .then(assert.fail, assertCancellation); - }); - - it('cancellation errors propagate through callbacks (1)', function() { - let result; - return Promise.resolve().then(function() { - return flow.execute(function() { - result = subTask - .then(assert.fail, assertCancellation) - .then(() => 'abc123'); - }); - }) - .then(() => result) - .then(value => assert.equal('abc123', value)); - }); - - it('cancellation errors propagate through callbacks (2)', function() { - let result; - return Promise.resolve().then(function() { - return flow.execute(function() { - result = subTask.then(assert.fail) - .then(noop, assertCancellation) - .then(() => 'fin'); - }); - }) - // Verify result actually computed successfully all the way through. - .then(() => result) - .then(value => assert.equal('fin', value)); - }); - }); - }); - - it('testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_return', function() { - var seen = []; - return flow.execute(function() { - flow.execute(throwStubError); - - flow.execute(function() { - seen.push(1); - }).then(function() { - seen.push(2); - }, function() { - seen.push(3); - }); - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.deepEqual([], seen); - }); - }); - - it('testRegisteredTaskCallbacksAreDroppedWhenTaskIsCancelled_withReturn', function() { - var seen = []; - return flow.execute(function() { - flow.execute(throwStubError); - - return flow.execute(function() { - seen.push(1); - }).then(function() { - seen.push(2); - }, function() { - seen.push(3); - }); - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.deepEqual([], seen); - }); - }); - - it('testTasksWithinACallbackAreDroppedIfContainingTaskIsAborted', function() { - var seen = []; - return flow.execute(function() { - flow.execute(throwStubError); - - // None of the callbacks on this promise should execute because the - // task assert.failure above is never handled, causing the containing task to - // abort. - promise.fulfilled().then(function() { - seen.push(1); - return flow.execute(function() { - seen.push(2); - }); - }).finally(function() { - seen.push(3); - }); - - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.deepEqual([], seen); - }); - }); - - it('testTaskIsCancelledAfterWaitTimeout', function() { - var seen = []; - return flow.execute(function() { - flow.wait(function() { - return promise.delayed(50); - }, 5); - - return flow.execute(function() { - seen.push(1); - }).then(function() { - seen.push(2); - }, function() { - seen.push(3); - }); - }).then(assert.fail, function() { - assert.deepEqual([], seen); - }); - }); - - describe('task callbacks get cancellation error if registered after task was cancelled', function() { - it('(a)', function() { - var task; - flow.execute(function() { - flow.execute(throwStubError); - task = flow.execute(function() {}); - }).then(assert.fail, assertIsStubError); - return waitForIdle().then(function() { - return task.then(assert.fail, function(e) { - assert.ok(e instanceof promise.CancellationError); - }); - }); - }); - - it('(b)', function() { - var seen = []; - - var task; - flow.execute(function() { - flow.execute(throwStubError); - task = flow.execute(function() {}); - - task.then(() => seen.push(1)) - .then(() => seen.push(2)); - task.then(() => seen.push(3)) - .then(() => seen.push(4)); - - }).then(assert.fail, assertIsStubError); - - return waitForIdle().then(function() { - return task.then(assert.fail, function(e) { - seen.push(5); - assert.ok(e instanceof promise.CancellationError); - }); - }).then(() => assert.deepEqual([5], seen)); - }); - }); - - it('unhandledRejectionInParallelTaskQueue', function() { - var seen = []; - function schedule(name) { - return flow.execute(() => seen.push(name), name); - } - - flow.async(function() { - schedule('a.1'); - flow.execute(throwStubError, 'a.2 (throws)'); - }); - - var b3; - flow.async(function() { - schedule('b.1'); - schedule('b.2'); - b3 = schedule('b.3'); - }); - - var c3; - flow.async(function() { - schedule('c.1'); - schedule('c.2'); - c3 = schedule('c.3'); - }); - - function assertWasCancelled(p) { - return p.then(assert.fail, function(e) { - assert.ok(e instanceof promise.CancellationError); - }); - } - - return waitForAbort() - .then(function() { - assert.deepEqual(['a.1', 'b.1', 'c.1', 'b.2', 'c.2'], seen); - }) - .then(() => assertWasCancelled(b3)) - .then(() => assertWasCancelled(c3)); - }); - - it('errorsInAsyncFunctionsAreReportedAsUnhandledRejection', function() { - flow.removeAllListeners(); // For tearDown. - - var task; - return new Promise(function(fulfill) { - flow.once('uncaughtException', fulfill); - flow.async(function() { - task = flow.execute(function() {}); - throw Error('boom'); - }); - }).then(function(error) { - assert.ok(error instanceof promise.CancellationError); - return task.catch(function(error) { - assert.ok(error instanceof promise.CancellationError); - }); - }); - }); - - describe('does not wait for values thrown from callbacks to be resolved', function() { - it('(a)', function() { - var p1 = promise.fulfilled(); - var reason = promise.fulfilled('should not see me'); - return p1.then(function() { - throw reason; - }).then(assert.fail, function(e) { - assert.equal(reason, e); - }); - }); - - it('(b)', function() { - var p1 = promise.fulfilled(); - var reason = promise.rejected('should not see me'); - reason.catch(function() {}); // For tearDown. - return p1.then(function() { - throw reason; - }).then(assert.fail, function(e) { - assert.equal(reason, e); - }); - }); - - it('(c)', function() { - var p1 = promise.fulfilled(); - var reason = promise.defer(); - setTimeout(() => reason.fulfill('should not see me'), 100); - return p1.then(function() { - throw reason.promise; - }).then(assert.fail, function(e) { - assert.equal(reason.promise, e); - }); - }); - - it('(d)', function() { - var p1 = promise.fulfilled(); - var reason = {then: function() {}}; // A thenable like object. - return p1.then(function() { - throw reason; - }).then(assert.fail, function(e) { - assert.equal(reason, e); - }); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js deleted file mode 100644 index 407fd547..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_flow_test.js +++ /dev/null @@ -1,2288 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const fail = assert.fail; -const sinon = require('sinon'); - -const testutil = require('./testutil'); -const {TimeoutError} = require('../../lib/error'); -const promise = require('../../lib/promise'); -const {enablePromiseManager} = require('../../lib/test/promise'); - -const NativePromise = Promise; - -// Aliases for readability. -const StubError = testutil.StubError; -const assertIsStubError = testutil.assertIsStubError; -const callbackPair = testutil.callbackPair; -const throwStubError = testutil.throwStubError; - -describe('promise control flow', function() { - enablePromiseManager(() => { - let flow, flowHistory, messages, uncaughtExceptions; - - beforeEach(function setUp() { - promise.LONG_STACK_TRACES = false; - flow = new promise.ControlFlow(); - promise.setDefaultFlow(flow); - messages = []; - flowHistory = []; - - uncaughtExceptions = []; - flow.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, - onUncaughtException); - }); - - afterEach(function tearDown() { - flow.removeAllListeners( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); - assert.deepEqual([], uncaughtExceptions, - 'There were uncaught exceptions'); - flow.reset(); - promise.LONG_STACK_TRACES = false; - }); - - function onUncaughtException(e) { - uncaughtExceptions.push(e); - } - - function defer() { - let d = {}; - let promise = new Promise((resolve, reject) => { - Object.assign(d, {resolve, reject}); - }); - d.promise = promise; - return d; - } - - function waitForAbort(opt_flow) { - var theFlow = opt_flow || flow; - theFlow.removeAllListeners( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); - return new NativePromise(function(fulfill, reject) { - theFlow.once(promise.ControlFlow.EventType.IDLE, function() { - reject(Error('expected flow to report an unhandled error')); - }); - theFlow.once( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, - fulfill); - }); - } - - function waitForIdle(opt_flow) { - var theFlow = opt_flow || flow; - return new NativePromise(function(fulfill, reject) { - theFlow.once(promise.ControlFlow.EventType.IDLE, fulfill); - theFlow.once( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, reject); - }); - } - - function timeout(ms) { - return new NativePromise(function(fulfill) { - setTimeout(fulfill, ms); - }); - } - - - function schedule(msg, opt_return) { - return scheduleAction(msg, function() { - return opt_return; - }); - } - - /** - * @param {string} value The value to push. - * @param {promise.Promise=} opt_taskPromise Promise to return from - * the task. - * @return {!promise.Promise} The result. - */ - function schedulePush(value, opt_taskPromise) { - return scheduleAction(value, function() { - messages.push(value); - return opt_taskPromise; - }); - } - - /** - * @param {string} msg Debug message. - * @param {!Function} actionFn The function. - * @return {!promise.Promise} The function result. - */ - function scheduleAction(msg, actionFn) { - return promise.controlFlow().execute(function() { - flowHistory.push(msg); - return actionFn(); - }, msg); - } - - /** - * @param {!Function} condition The condition function. - * @param {number=} opt_timeout The timeout. - * @param {string=} opt_message Optional message. - * @return {!promise.Promise} The wait result. - */ - function scheduleWait(condition, opt_timeout, opt_message) { - var msg = opt_message || ''; - // It's not possible to hook into when the wait itself is scheduled, so - // we record each iteration of the wait loop. - var count = 0; - return promise.controlFlow().wait(function() { - flowHistory.push((count++) + ': ' + msg); - return condition(); - }, opt_timeout, msg); - } - - function asyncRun(fn, opt_self) { - NativePromise.resolve().then(() => fn.call(opt_self)); - } - - function assertFlowHistory(var_args) { - var expected = Array.prototype.slice.call(arguments, 0); - assert.deepEqual(expected, flowHistory); - } - - function assertMessages(var_args) { - var expected = Array.prototype.slice.call(arguments, 0); - assert.deepEqual(expected, messages); - } - - function assertingMessages(var_args) { - var args = Array.prototype.slice.call(arguments, 0); - return () => assertMessages.apply(null, args); - } - - function assertFlowIs(flow) { - assert.equal(flow, promise.controlFlow()); - } - - describe('testScheduling', function() { - it('aSimpleFunction', function() { - schedule('go'); - return waitForIdle().then(function() { - assertFlowHistory('go'); - }); - }); - - it('aSimpleFunctionWithANonPromiseReturnValue', function() { - schedule('go', 123).then(function(value) { - assert.equal(123, value); - }); - return waitForIdle().then(function() { - assertFlowHistory('go'); - }); - }); - - it('aSimpleSequence', function() { - schedule('a'); - schedule('b'); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('invokesCallbacksWhenTaskIsDone', function() { - var d = new promise.Deferred(); - var called = false; - var done = schedule('a', d.promise).then(function(value) { - called = true; - assert.equal(123, value); - }); - return timeout(5).then(function() { - assert.ok(!called); - d.fulfill(123); - return done; - }). - then(function() { - assertFlowHistory('a'); - }); - }); - - it('blocksUntilPromiseReturnedByTaskIsResolved', function() { - var done = promise.defer(); - schedulePush('a', done.promise); - schedulePush('b'); - setTimeout(function() { - done.fulfill(); - messages.push('c'); - }, 25); - return waitForIdle().then(assertingMessages('a', 'c', 'b')); - }); - - it('waitsForReturnedPromisesToResolve', function() { - var d1 = new promise.Deferred(); - var d2 = new promise.Deferred(); - - var callback = sinon.spy(); - schedule('a', d1.promise).then(callback); - - return timeout(5).then(function() { - assert(!callback.called); - d1.fulfill(d2.promise); - return timeout(5); - }).then(function() { - assert(!callback.called); - d2.fulfill('fluffy bunny'); - return waitForIdle(); - }).then(function() { - assert(callback.called); - assert.equal('fluffy bunny', callback.getCall(0).args[0]); - assertFlowHistory('a'); - }); - }); - - it('executesTasksInAFutureTurnAfterTheyAreScheduled', function() { - var count = 0; - function incr() { count++; } - - scheduleAction('', incr); - assert.equal(0, count); - return waitForIdle().then(function() { - assert.equal(1, count); - }); - }); - - it('executesOneTaskPerTurnOfTheEventLoop', function() { - var order = []; - function go() { - order.push(order.length / 2); - asyncRun(function() { - order.push('-'); - }); - } - - scheduleAction('', go); - scheduleAction('', go); - return waitForIdle().then(function() { - assert.deepEqual([0, '-', 1, '-'], order); - }) - }); - - it('firstScheduledTaskIsWithinACallback', function() { - promise.fulfilled().then(function() { - schedule('a'); - schedule('b'); - schedule('c'); - }).then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - return waitForIdle(); - }); - - it('newTasksAddedWhileWaitingOnTaskReturnedPromise1', function() { - scheduleAction('a', function() { - var d = promise.defer(); - setTimeout(function() { - schedule('c'); - d.fulfill(); - }, 10); - return d.promise; - }); - schedule('b'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('newTasksAddedWhileWaitingOnTaskReturnedPromise2', function() { - scheduleAction('a', function() { - var d = promise.defer(); - setTimeout(function() { - schedule('c'); - asyncRun(d.fulfill); - }, 10); - return d.promise; - }); - schedule('b'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'c', 'b'); - }); - }); - }); - - describe('testFraming', function() { - it('callbacksRunInANewFrame', function() { - schedule('a').then(function() { - schedule('c'); - }); - schedule('b'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'c', 'b'); - }); - }); - - it('lotsOfNesting', function() { - schedule('a').then(function() { - schedule('c').then(function() { - schedule('e').then(function() { - schedule('g'); - }); - schedule('f'); - }); - schedule('d'); - }); - schedule('b'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'c', 'e', 'g', 'f', 'd', 'b'); - }); - }); - - it('callbackReturnsPromiseThatDependsOnATask_1', function() { - schedule('a').then(function() { - schedule('b'); - return promise.delayed(5).then(function() { - return schedule('c'); - }); - }); - schedule('d'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd'); - }); - }); - - it('callbackReturnsPromiseThatDependsOnATask_2', function() { - schedule('a').then(function() { - schedule('b'); - return promise.delayed(5). - then(function() { return promise.delayed(5) }). - then(function() { return promise.delayed(5) }). - then(function() { return promise.delayed(5) }). - then(function() { return schedule('c'); }); - }); - schedule('d'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd'); - }); - }); - - it('eachCallbackWaitsForAllScheduledTasksToComplete', function() { - schedule('a'). - then(function() { - schedule('b'); - schedule('c'); - }). - then(function() { - schedule('d'); - }); - schedule('e'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e'); - }); - }); - - it('eachCallbackWaitsForReturnTasksToComplete', function() { - schedule('a'). - then(function() { - schedule('b'); - return schedule('c'); - }). - then(function() { - schedule('d'); - }); - schedule('e'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e'); - }); - }); - - it('callbacksOnAResolvedPromiseInsertIntoTheCurrentFlow', function() { - promise.fulfilled().then(function() { - schedule('b'); - }); - schedule('a'); - - return waitForIdle().then(function() { - assertFlowHistory('b', 'a'); - }); - }); - - it('callbacksInterruptTheFlowWhenPromiseIsResolved', function() { - schedule('a').then(function() { - schedule('c'); - }); - schedule('b'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'c', 'b'); - }); - }); - - it('allCallbacksInAFrameAreScheduledWhenPromiseIsResolved', function() { - var a = schedule('a'); - a.then(function() { schedule('b'); }); - schedule('c'); - a.then(function() { schedule('d'); }); - schedule('e'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e'); - }); - }); - - it('tasksScheduledInInActiveFrameDoNotGetPrecedence', function() { - var d = promise.fulfilled(); - schedule('a'); - schedule('b'); - d.then(function() { schedule('c'); }); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('tasksScheduledInAFrameGetPrecedence_1', function() { - var a = schedule('a'); - schedule('b').then(function() { - a.then(function() { - schedule('c'); - schedule('d'); - }); - var e = schedule('e'); - a.then(function() { - schedule('f'); - e.then(function() { - schedule('g'); - }); - schedule('h'); - }); - schedule('i'); - }); - schedule('j'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'); - }); - }); - }); - - describe('testErrorHandling', function() { - it('thrownErrorsArePassedToTaskErrback', function() { - scheduleAction('function that throws', throwStubError). - then(fail, assertIsStubError); - return waitForIdle(); - }); - - it('thrownErrorsPropagateThroughPromiseChain', function() { - scheduleAction('function that throws', throwStubError). - then(fail). - then(fail, assertIsStubError); - return waitForIdle(); - }); - - it('catchesErrorsFromFailedTasksInAFrame', function() { - schedule('a').then(function() { - schedule('b'); - scheduleAction('function that throws', throwStubError); - }). - then(fail, assertIsStubError); - return waitForIdle(); - }); - - it('abortsIfOnlyTaskReturnsAnUnhandledRejection', function() { - scheduleAction('function that returns rejected promise', function() { - return promise.rejected(new StubError); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('abortsIfThereIsAnUnhandledRejection', function() { - promise.rejected(new StubError); - schedule('this should not run'); - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory(/* none */); - }); - }); - - it('abortsSequenceIfATaskFails', function() { - schedule('a'); - schedule('b'); - scheduleAction('c', throwStubError); - schedule('d'); // Should never execute. - - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('abortsFromUnhandledFramedTaskFailures_1', function() { - schedule('outer task').then(function() { - scheduleAction('inner task', throwStubError); - }); - schedule('this should not run'); - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('outer task', 'inner task'); - }); - }); - - it('abortsFromUnhandledFramedTaskFailures_2', function() { - schedule('a').then(function() { - schedule('b').then(function() { - scheduleAction('c', throwStubError); - // This should not execute. - schedule('d'); - }); - }); - - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('abortsWhenErrorBubblesUpFromFullyResolvingAnObject', function() { - var callback = sinon.spy(); - - scheduleAction('', function() { - var obj = {'foo': promise.rejected(new StubError)}; - return promise.fullyResolved(obj).then(callback); - }); - - return waitForAbort(). - then(assertIsStubError). - then(() => assert(!callback.called)); - }); - - it('abortsWhenErrorBubblesUpFromFullyResolvingAnObject_withCallback', function() { - var callback1 = sinon.spy(); - var callback2 = sinon.spy(); - - scheduleAction('', function() { - var obj = {'foo': promise.rejected(new StubError)}; - return promise.fullyResolved(obj).then(callback1); - }).then(callback2); - - return waitForAbort(). - then(assertIsStubError). - then(() => assert(!callback1.called)). - then(() => assert(!callback2.called)); - }); - - it('canCatchErrorsFromNestedTasks', function() { - var errback = sinon.spy(); - schedule('a'). - then(function() { - return scheduleAction('b', throwStubError); - }). - catch(errback); - return waitForIdle().then(function() { - assert(errback.called); - assertIsStubError(errback.getCall(0).args[0]); - }); - }); - - it('nestedCommandFailuresCanBeCaughtAndSuppressed', function() { - var errback = sinon.spy(); - schedule('a').then(function() { - return schedule('b').then(function() { - return schedule('c').then(function() { - throw new StubError; - }); - }); - }).catch(errback); - schedule('d'); - return waitForIdle(). - then(function() { - assert(errback.called); - assertIsStubError(errback.getCall(0).args[0]); - assertFlowHistory('a', 'b', 'c', 'd'); - }); - }); - - it('aTaskWithAnUnhandledPromiseRejection', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - promise.rejected(new StubError); - }); - schedule('should never run'); - - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('a', 'sub-tasks'); - }); - }); - - it('aTaskThatReutrnsARejectedPromise', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - return promise.rejected(new StubError); - }); - schedule('should never run'); - - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('a', 'sub-tasks'); - }); - }); - - it('discardsSubtasksIfTaskThrows', function() { - var pair = callbackPair(null, assertIsStubError); - scheduleAction('a', function() { - schedule('b'); - schedule('c'); - throwStubError(); - }).then(pair.callback, pair.errback); - schedule('d'); - - return waitForIdle(). - then(pair.assertErrback). - then(function() { - assertFlowHistory('a', 'd'); - }); - }); - - it('discardsRemainingSubtasksIfASubtaskFails', function() { - var pair = callbackPair(null, assertIsStubError); - scheduleAction('a', function() { - schedule('b'); - scheduleAction('c', throwStubError); - schedule('d'); - }).then(pair.callback, pair.errback); - schedule('e'); - - return waitForIdle(). - then(pair.assertErrback). - then(function() { - assertFlowHistory('a', 'b', 'c', 'e'); - }); - }); - }); - - describe('testTryModelingFinally', function() { - it('happyPath', function() { - /* Model: - try { - doFoo(); - doBar(); - } finally { - doBaz(); - } - */ - schedulePush('foo'). - then(() => schedulePush('bar')). - finally(() => schedulePush('baz')); - return waitForIdle().then(assertingMessages('foo', 'bar', 'baz')); - }); - - it('firstTryFails', function() { - /* Model: - try { - doFoo(); - doBar(); - } finally { - doBaz(); - } - */ - - scheduleAction('doFoo and throw', function() { - messages.push('foo'); - throw new StubError; - }). - then(function() { schedulePush('bar'); }). - finally(function() { schedulePush('baz'); }); - - return waitForAbort(). - then(assertIsStubError). - then(assertingMessages('foo', 'baz')); - }); - - it('secondTryFails', function() { - /* Model: - try { - doFoo(); - doBar(); - } finally { - doBaz(); - } - */ - - schedulePush('foo'). - then(function() { - return scheduleAction('doBar and throw', function() { - messages.push('bar'); - throw new StubError; - }); - }). - finally(function() { - return schedulePush('baz'); - }); - return waitForAbort(). - then(assertIsStubError). - then(assertingMessages('foo', 'bar', 'baz')); - }); - }); - - describe('testTaskCallbacksInterruptFlow', function() { - it('(base case)', function() { - schedule('a').then(function() { - schedule('b'); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskDependsOnImmediatelyFulfilledPromise', function() { - scheduleAction('a', function() { - return promise.fulfilled(); - }).then(function() { - schedule('b'); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskDependsOnPreviouslyFulfilledPromise', function() { - var aPromise = promise.fulfilled(123); - scheduleAction('a', function() { - return aPromise; - }).then(function(value) { - assert.equal(123, value); - schedule('b'); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskDependsOnAsyncPromise', function() { - scheduleAction('a', function() { - return promise.delayed(25); - }).then(function() { - schedule('b'); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('promiseChainedToTaskInterruptFlow', function() { - schedule('a').then(function() { - return promise.fulfilled(); - }).then(function() { - return promise.fulfilled(); - }).then(function() { - schedule('b'); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('nestedTaskCallbacksInterruptFlowWhenResolved', function() { - schedule('a').then(function() { - schedule('b').then(function() { - schedule('c'); - }); - }); - schedule('d'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd'); - }); - }); - }); - - describe('testDelayedNesting', function() { - - it('1', function() { - var a = schedule('a'); - schedule('b').then(function() { - a.then(function() { schedule('c'); }); - schedule('d'); - }); - schedule('e'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e'); - }); - }); - - it('2', function() { - var a = schedule('a'); - schedule('b').then(function() { - a.then(function() { schedule('c'); }); - schedule('d'); - a.then(function() { schedule('e'); }); - }); - schedule('f'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f'); - }); - }); - - it('3', function() { - var a = schedule('a'); - schedule('b').then(function() { - a.then(function() { schedule('c'); }); - a.then(function() { schedule('d'); }); - }); - schedule('e'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e'); - }); - }); - - it('4', function() { - var a = schedule('a'); - schedule('b').then(function() { - a.then(function() { schedule('c'); }).then(function() { - schedule('d'); - }); - a.then(function() { schedule('e'); }); - }); - schedule('f'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f'); - }); - }); - - it('5', function() { - var a = schedule('a'); - schedule('b').then(function() { - var c; - a.then(function() { c = schedule('c'); }).then(function() { - schedule('d'); - a.then(function() { schedule('e'); }); - c.then(function() { schedule('f'); }); - schedule('g'); - }); - a.then(function() { schedule('h'); }); - }); - schedule('i'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'); - }); - }); - }); - - describe('testWaiting', function() { - it('onAConditionThatIsAlwaysTrue', function() { - scheduleWait(function() { return true;}, 0, 'waiting on true'); - return waitForIdle().then(function() { - assertFlowHistory('0: waiting on true'); - }); - }); - - it('aSimpleCountingCondition', function() { - var count = 0; - scheduleWait(function() { - return ++count == 3; - }, 100, 'counting to 3'); - - return waitForIdle().then(function() { - assert.equal(3, count); - }); - }); - - it('aConditionThatReturnsAPromise', function() { - var d = new promise.Deferred(); - var count = 0; - - scheduleWait(function() { - count += 1; - return d.promise; - }, 0, 'waiting for promise'); - - return timeout(50).then(function() { - assert.equal(1, count); - d.fulfill(123); - return waitForIdle(); - }); - }); - - it('aConditionThatReturnsAPromise_2', function() { - var count = 0; - scheduleWait(function() { - return promise.fulfilled(++count == 3); - }, 100, 'waiting for promise'); - - return waitForIdle().then(function() { - assert.equal(3, count); - }); - }); - - it('aConditionThatReturnsATaskResult', function() { - var count = 0; - scheduleWait(function() { - return scheduleAction('increment count', function() { - return ++count == 3; - }); - }, 100, 'counting to 3'); - schedule('post wait'); - - return waitForIdle().then(function() { - assert.equal(3, count); - assertFlowHistory( - '0: counting to 3', 'increment count', - '1: counting to 3', 'increment count', - '2: counting to 3', 'increment count', - 'post wait'); - }); - }); - - it('conditionContainsASubtask', function() { - var count = 0; - scheduleWait(function() { - schedule('sub task'); - return ++count == 3; - }, 100, 'counting to 3'); - schedule('post wait'); - - return waitForIdle().then(function() { - assert.equal(3, count); - assertFlowHistory( - '0: counting to 3', 'sub task', - '1: counting to 3', 'sub task', - '2: counting to 3', 'sub task', - 'post wait'); - }); - }); - - it('cancelsWaitIfScheduledTaskFails', function() { - var pair = callbackPair(null, assertIsStubError); - scheduleWait(function() { - scheduleAction('boom', throwStubError); - schedule('this should not run'); - return true; - }, 100, 'waiting to go boom').then(pair.callback, pair.errback); - schedule('post wait'); - - return waitForIdle(). - then(pair.assertErrback). - then(function() { - assertFlowHistory( - '0: waiting to go boom', 'boom', - 'post wait'); - }); - }); - - it('failsIfConditionThrows', function() { - var callbacks = callbackPair(null, assertIsStubError); - scheduleWait(throwStubError, 0, 'goes boom'). - then(callbacks.callback, callbacks.errback); - schedule('post wait'); - - return waitForIdle(). - then(callbacks.assertErrback). - then(function() { - assertFlowHistory('0: goes boom', 'post wait'); - }); - }); - - it('failsIfConditionReturnsARejectedPromise', function() { - var callbacks = callbackPair(null, assertIsStubError); - scheduleWait(function() { - return promise.rejected(new StubError); - }, 0, 'goes boom').then(callbacks.callback, callbacks.errback); - schedule('post wait'); - - return waitForIdle(). - then(callbacks.assertErrback). - then(function() { - assertFlowHistory('0: goes boom', 'post wait'); - }); - }); - - it('failsIfConditionHasUnhandledRejection', function() { - var callbacks = callbackPair(null, assertIsStubError); - scheduleWait(function() { - promise.controlFlow().execute(throwStubError); - }, 0, 'goes boom').then(callbacks.callback, callbacks.errback); - schedule('post wait'); - - return waitForIdle(). - then(callbacks.assertErrback). - then(function() { - assertFlowHistory('0: goes boom', 'post wait'); - }); - }); - - it('failsIfConditionHasAFailedSubtask', function() { - var callbacks = callbackPair(null, assertIsStubError); - var count = 0; - scheduleWait(function() { - scheduleAction('maybe throw', function() { - if (++count == 2) { - throw new StubError; - } - }); - }, 100, 'waiting').then(callbacks.callback, callbacks.errback); - schedule('post wait'); - - return waitForIdle().then(function() { - assert.equal(2, count); - assertFlowHistory( - '0: waiting', 'maybe throw', - '1: waiting', 'maybe throw', - 'post wait'); - }); - }); - - it('pollingLoopWaitsForAllScheduledTasksInCondition', function() { - var count = 0; - scheduleWait(function() { - scheduleAction('increment count', function() { ++count; }); - return count >= 3; - }, 100, 'counting to 3'); - schedule('post wait'); - - return waitForIdle().then(function() { - assert.equal(4, count); - assertFlowHistory( - '0: counting to 3', 'increment count', - '1: counting to 3', 'increment count', - '2: counting to 3', 'increment count', - '3: counting to 3', 'increment count', - 'post wait'); - }); - }); - - it('waitsForeverOnAZeroTimeout', function() { - var done = false; - setTimeout(function() { - done = true; - }, 150); - var waitResult = scheduleWait(function() { - return done; - }, 0); - - return timeout(75).then(function() { - assert.ok(!done); - return timeout(100); - }).then(function() { - assert.ok(done); - return waitResult; - }); - }); - - it('waitsForeverIfTimeoutOmitted', function() { - var done = false; - setTimeout(function() { - done = true; - }, 150); - var waitResult = scheduleWait(function() { - return done; - }); - - return timeout(75).then(function() { - assert.ok(!done); - return timeout(100); - }).then(function() { - assert.ok(done); - return waitResult; - }); - }); - - it('timesOut_nonZeroTimeout', function() { - var count = 0; - scheduleWait(function() { - count += 1; - var ms = count === 2 ? 65 : 5; - return promise.delayed(ms).then(function() { - return false; - }); - }, 60, 'counting to 3'); - return waitForAbort().then(function(e) { - switch (count) { - case 1: - assertFlowHistory('0: counting to 3'); - break; - case 2: - assertFlowHistory('0: counting to 3', '1: counting to 3'); - break; - default: - fail('unexpected polling count: ' + count); - } - assert.ok(e instanceof TimeoutError, 'Unexpected error: ' + e); - assert.ok( - /^counting to 3\nWait timed out after \d+ms$/.test(e.message)); - }); - }); - - it('shouldFailIfConditionReturnsARejectedPromise', function() { - scheduleWait(function() { - return promise.rejected(new StubError); - }, 100, 'returns rejected promise on first pass'); - return waitForAbort().then(assertIsStubError); - }); - - it('scheduleWithIntermittentWaits', function() { - schedule('a'); - scheduleWait(function() { return true; }, 0, 'wait 1'); - schedule('b'); - scheduleWait(function() { return true; }, 0, 'wait 2'); - schedule('c'); - scheduleWait(function() { return true; }, 0, 'wait 3'); - - return waitForIdle().then(function() { - assertFlowHistory('a', '0: wait 1', 'b', '0: wait 2', 'c', '0: wait 3'); - }); - }); - - it('scheduleWithIntermittentAndNestedWaits', function() { - schedule('a'); - scheduleWait(function() { return true; }, 0, 'wait 1'). - then(function() { - schedule('d'); - scheduleWait(function() { return true; }, 0, 'wait 2'); - schedule('e'); - }); - schedule('b'); - scheduleWait(function() { return true; }, 0, 'wait 3'); - schedule('c'); - scheduleWait(function() { return true; }, 0, 'wait 4'); - - return waitForIdle().then(function() { - assertFlowHistory( - 'a', '0: wait 1', 'd', '0: wait 2', 'e', 'b', '0: wait 3', 'c', - '0: wait 4'); - }); - }); - - it('requiresConditionToBeAPromiseOrFunction', function() { - assert.throws(function() { - flow.wait(1234, 0); - }); - flow.wait(function() { return true;}, 0); - flow.wait(promise.fulfilled(), 0); - return waitForIdle(); - }); - - it('promiseThatDoesNotResolveBeforeTimeout', function() { - var d = promise.defer(); - flow.wait(d.promise, 5).then(fail, function(e) { - assert.ok(e instanceof TimeoutError, 'Unexpected error: ' + e); - assert.ok( - /Timed out waiting for promise to resolve after \d+ms/ - .test(e.message), - 'unexpected error message: ' + e.message); - }); - return waitForIdle(); - }); - - it('unboundedWaitOnPromiseResolution', function() { - var messages = []; - var d = promise.defer(); - var waitResult = flow.wait(d.promise).then(function(value) { - messages.push('b'); - assert.equal(1234, value); - }); - setTimeout(function() { - messages.push('a'); - }, 5); - - timeout(10).then(function() { - assert.deepEqual(['a'], messages); - d.fulfill(1234); - return waitResult; - }).then(function() { - assert.deepEqual(['a', 'b'], messages); - }); - - return waitForIdle(); - }); - }); - - describe('testSubtasks', function() { - it('(base case)', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - schedule('c'); - schedule('d'); - }); - schedule('b'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'sub-tasks', 'c', 'd', 'b'); - }); - }); - - it('nesting', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - schedule('b'); - scheduleAction('sub-sub-tasks', function() { - schedule('c'); - schedule('d'); - }); - schedule('e'); - }); - schedule('f'); - - return waitForIdle().then(function() { - assertFlowHistory( - 'a', 'sub-tasks', 'b', 'sub-sub-tasks', 'c', 'd', 'e', 'f'); - }); - }); - - it('taskReturnsSubTaskResult_1', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - return schedule('c'); - }); - schedule('b'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'sub-tasks', 'c', 'b'); - }); - }); - - it('taskReturnsSubTaskResult_2', function() { - let pair = callbackPair((value) => assert.equal(123, value)); - schedule('a'); - schedule('sub-tasks', promise.fulfilled(123)).then(pair.callback); - schedule('b'); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'sub-tasks','b'); - pair.assertCallback(); - }); - }); - - it('taskReturnsPromiseThatDependsOnSubtask_1', function() { - scheduleAction('a', function() { - return promise.delayed(10).then(function() { - schedule('b'); - }); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskReturnsPromiseThatDependsOnSubtask_2', function() { - scheduleAction('a', function() { - return promise.fulfilled().then(function() { - schedule('b'); - }); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskReturnsPromiseThatDependsOnSubtask_3', function() { - scheduleAction('a', function() { - return promise.delayed(10).then(function() { - return schedule('b'); - }); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskReturnsPromiseThatDependsOnSubtask_4', function() { - scheduleAction('a', function() { - return promise.delayed(5).then(function() { - return promise.delayed(5).then(function() { - return schedule('b'); - }); - }); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskReturnsPromiseThatDependsOnSubtask_5', function() { - scheduleAction('a', function() { - return promise.delayed(5).then(function() { - return promise.delayed(5).then(function() { - return promise.delayed(5).then(function() { - return promise.delayed(5).then(function() { - return schedule('b'); - }); - }); - }); - }); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('taskReturnsPromiseThatDependsOnSubtask_6', function() { - scheduleAction('a', function() { - return promise.delayed(5). - then(function() { return promise.delayed(5) }). - then(function() { return promise.delayed(5) }). - then(function() { return promise.delayed(5) }). - then(function() { return schedule('b'); }); - }); - schedule('c'); - return waitForIdle().then(function() { - assertFlowHistory('a', 'b', 'c'); - }); - }); - - it('subTaskFails_1', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - scheduleAction('sub-task that fails', throwStubError); - }); - schedule('should never execute'); - - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('a', 'sub-tasks', 'sub-task that fails'); - }); - }); - - it('subTaskFails_2', function() { - schedule('a'); - scheduleAction('sub-tasks', function() { - return promise.rejected(new StubError); - }); - schedule('should never execute'); - - return waitForAbort(). - then(assertIsStubError). - then(function() { - assertFlowHistory('a', 'sub-tasks'); - }); - }); - - it('subTaskFails_3', function() { - var callbacks = callbackPair(null, assertIsStubError); - - schedule('a'); - scheduleAction('sub-tasks', function() { - return promise.rejected(new StubError); - }).then(callbacks.callback, callbacks.errback); - schedule('b'); - - return waitForIdle(). - then(function() { - assertFlowHistory('a', 'sub-tasks', 'b'); - callbacks.assertErrback(); - }); - }); - }); - - describe('testEventLoopWaitsOnPendingPromiseRejections', function() { - it('oneRejection', function() { - var d = new promise.Deferred; - scheduleAction('one', function() { - return d.promise; - }); - scheduleAction('two', function() {}); - - return timeout(50).then(function() { - assertFlowHistory('one'); - d.reject(new StubError); - return waitForAbort(); - }). - then(assertIsStubError). - then(function() { - assertFlowHistory('one'); - }); - }); - - it('multipleRejections', function() { - var once = Error('once'); - var twice = Error('twice'); - - scheduleAction('one', function() { - promise.rejected(once); - promise.rejected(twice); - }); - var twoResult = scheduleAction('two', function() {}); - - flow.removeAllListeners( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); - return new NativePromise(function(fulfill, reject) { - setTimeout(function() { - reject(Error('Should have reported the two errors by now')); - }, 50); - flow.on( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, - fulfill); - }).then(function(e) { - assert.ok(e instanceof promise.MultipleUnhandledRejectionError, - 'Not a MultipleUnhandledRejectionError'); - let errors = Array.from(e.errors); - assert.deepEqual([once, twice], errors); - assertFlowHistory('one'); - }); - }); - }); - - describe('testCancelsPromiseReturnedByCallbackIfFrameFails', function() { - it('promiseCallback', function() { - var chainPair = callbackPair(null, assertIsStubError); - var deferredPair = callbackPair(null, function(e) { - assert.equal('CancellationError: StubError', e.toString(), - 'callback result should be cancelled'); - }); - - var d = new promise.Deferred(); - d.promise.then(deferredPair.callback, deferredPair.errback); - - promise.fulfilled(). - then(function() { - scheduleAction('boom', throwStubError); - schedule('this should not run'); - return d.promise; - }). - then(chainPair.callback, chainPair.errback); - - return waitForIdle().then(function() { - assertFlowHistory('boom'); - chainPair.assertErrback('chain errback not invoked'); - deferredPair.assertErrback('deferred errback not invoked'); - }); - }); - - it('taskCallback', function() { - var chainPair = callbackPair(null, assertIsStubError); - var deferredPair = callbackPair(null, function(e) { - assert.equal('CancellationError: StubError', e.toString(), - 'callback result should be cancelled'); - }); - - var d = new promise.Deferred(); - d.promise.then(deferredPair.callback, deferredPair.errback); - - schedule('a'). - then(function() { - scheduleAction('boom', throwStubError); - schedule('this should not run'); - return d.promise; - }). - then(chainPair.callback, chainPair.errback); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'boom'); - chainPair.assertErrback('chain errback not invoked'); - deferredPair.assertErrback('deferred errback not invoked'); - }); - }); - }); - - it('testMaintainsOrderInCallbacksWhenATaskReturnsAPromise', function() { - schedule('__start__', promise.fulfilled()). - then(function() { - messages.push('a'); - schedulePush('b'); - messages.push('c'); - }). - then(function() { - messages.push('d'); - }); - schedulePush('e'); - - return waitForIdle().then(function() { - assertFlowHistory('__start__', 'b', 'e'); - assertMessages('a', 'c', 'b', 'd', 'e'); - }); - }); - - it('testOwningFlowIsActivatedForExecutingTasks', function() { - var defaultFlow = promise.controlFlow(); - var order = []; - - promise.createFlow(function(flow) { - assertFlowIs(flow); - order.push(0); - - defaultFlow.execute(function() { - assertFlowIs(defaultFlow); - order.push(1); - }); - }); - - return waitForIdle().then(function() { - assertFlowIs(defaultFlow); - assert.deepEqual([0, 1], order); - }); - }); - - it('testCreateFlowReturnsPromisePairedWithCreatedFlow', function() { - return new NativePromise(function(fulfill, reject) { - var newFlow; - promise.createFlow(function(flow) { - newFlow = flow; - assertFlowIs(newFlow); - }).then(function() { - assertFlowIs(newFlow); - waitForIdle(newFlow).then(fulfill, reject); - }); - }); - }); - - it('testDeferredFactoriesCreateForActiveFlow_defaultFlow', function() { - var e = Error(); - var defaultFlow = promise.controlFlow(); - promise.fulfilled().then(function() { - assertFlowIs(defaultFlow); - }); - promise.rejected(e).then(null, function(err) { - assert.equal(e, err); - assertFlowIs(defaultFlow); - }); - promise.defer().promise.then(function() { - assertFlowIs(defaultFlow); - }); - - return waitForIdle(); - }); - - it('testDeferredFactoriesCreateForActiveFlow_newFlow', function() { - var e = Error(); - var newFlow = new promise.ControlFlow; - newFlow.execute(function() { - promise.fulfilled().then(function() { - assertFlowIs(newFlow); - }); - - promise.rejected(e).then(null, function(err) { - assert.equal(e, err); - assertFlowIs(newFlow); - }); - - let d = promise.defer(); - d.promise.then(function() { - assertFlowIs(newFlow); - }); - d.fulfill(); - }).then(function() { - assertFlowIs(newFlow); - }); - - return waitForIdle(newFlow); - }); - - it('testFlowsSynchronizeWithThemselvesNotEachOther', function() { - var defaultFlow = promise.controlFlow(); - schedulePush('a', 'a'); - promise.controlFlow().timeout(500); - schedulePush('b', 'b'); - - promise.createFlow(function(flow2) { - assertFlowIs(flow2); - schedulePush('c', 'c'); - schedulePush('d', 'd'); - }); - - return waitForIdle().then(function() { - assertMessages('a', 'c', 'd', 'b'); - }); - }); - - it('testUnhandledErrorsAreReportedToTheOwningFlow', function() { - var error1 = Error('e1'); - var error2 = Error('e2'); - - var defaultFlow = promise.controlFlow(); - defaultFlow.removeAllListeners('uncaughtException'); - - var flow1Error = defer(); - flow1Error.promise.then(function(value) { - assert.equal(error2, value); - }); - - var flow2Error = defer(); - flow2Error.promise.then(function(value) { - assert.equal(error1, value); - }); - - promise.createFlow(function(flow) { - flow.once('uncaughtException', flow2Error.resolve); - promise.rejected(error1); - - defaultFlow.once('uncaughtException', flow1Error.resolve); - defaultFlow.execute(function() { - promise.rejected(error2); - }); - }); - - return NativePromise.all([flow1Error.promise, flow2Error.promise]); - }); - - it('testCanSynchronizeFlowsByReturningPromiseFromOneToAnother', function() { - var flow1 = new promise.ControlFlow; - var flow1Done = defer(); - flow1.once('idle', flow1Done.resolve); - flow1.once('uncaughtException', flow1Done.reject); - - var flow2 = new promise.ControlFlow; - var flow2Done = defer(); - flow2.once('idle', flow2Done.resolve); - flow2.once('uncaughtException', flow2Done.reject); - - flow1.execute(function() { - schedulePush('a', 'a'); - return promise.delayed(25); - }, 'start flow 1'); - - flow2.execute(function() { - schedulePush('b', 'b'); - schedulePush('c', 'c'); - flow2.execute(function() { - return flow1.execute(function() { - schedulePush('d', 'd'); - }, 'flow 1 task'); - }, 'inject flow1 result into flow2'); - schedulePush('e', 'e'); - }, 'start flow 2'); - - return NativePromise.all([flow1Done.promise, flow2Done.promise]). - then(function() { - assertMessages('a', 'b', 'c', 'd', 'e'); - }); - }); - - it('testFramesWaitToCompleteForPendingRejections', function() { - return new NativePromise(function(fulfill, reject) { - - promise.controlFlow().execute(function() { - promise.rejected(new StubError); - }).then(fulfill, reject); - - }). - then(() => fail('expected to fail'), assertIsStubError); - }); - - it('testSynchronizeErrorsPropagateToOuterFlow', function() { - var outerFlow = new promise.ControlFlow; - var innerFlow = new promise.ControlFlow; - - var block = defer(); - innerFlow.execute(function() { - return block.promise; - }, 'block inner flow'); - - outerFlow.execute(function() { - block.resolve(); - return innerFlow.execute(function() { - promise.rejected(new StubError); - }, 'trigger unhandled rejection error'); - }, 'run test'); - - return NativePromise.all([ - waitForIdle(innerFlow), - waitForAbort(outerFlow).then(assertIsStubError) - ]); - }); - - it('testFailsIfErrbackThrows', function() { - promise.rejected('').then(null, throwStubError); - return waitForAbort().then(assertIsStubError); - }); - - it('testFailsIfCallbackReturnsRejectedPromise', function() { - promise.fulfilled().then(function() { - return promise.rejected(new StubError); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('testAbortsFrameIfTaskFails', function() { - promise.fulfilled().then(function() { - promise.controlFlow().execute(throwStubError); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('testAbortsFramePromisedChainedFromTaskIsNotHandled', function() { - promise.fulfilled().then(function() { - promise.controlFlow().execute(function() {}). - then(throwStubError); - }); - return waitForAbort().then(assertIsStubError); - }); - - it('testTrapsChainedUnhandledRejectionsWithinAFrame', function() { - var pair = callbackPair(null, assertIsStubError); - promise.fulfilled().then(function() { - promise.controlFlow().execute(function() {}). - then(throwStubError); - }).then(pair.callback, pair.errback); - - return waitForIdle().then(pair.assertErrback); - }); - - it('testCancelsRemainingTasksIfFrameThrowsDuringScheduling', function() { - var task1, task2; - var pair = callbackPair(null, assertIsStubError); - var flow = promise.controlFlow(); - flow.execute(function() { - task1 = flow.execute(function() {}); - task2 = flow.execute(function() {}); - throw new StubError; - }).then(pair.callback, pair.errback); - - return waitForIdle(). - then(pair.assertErrback). - then(function() { - pair = callbackPair(); - return task1.then(pair.callback, pair.errback); - }). - then(function() { - pair.assertErrback(); - pair = callbackPair(); - return task2.then(pair.callback, pair.errback); - }). - then(function() { - pair.assertErrback(); - }); - }); - - it('testCancelsRemainingTasksInFrameIfATaskFails', function() { - var task; - var pair = callbackPair(null, assertIsStubError); - var flow = promise.controlFlow(); - flow.execute(function() { - flow.execute(throwStubError); - task = flow.execute(function() {}); - }).then(pair.callback, pair.errback); - - return waitForIdle().then(pair.assertErrback).then(function() { - pair = callbackPair(); - task.then(pair.callback, pair.errback); - }).then(function() { - pair.assertErrback(); - }); - }); - - it('testDoesNotModifyRejectionErrorIfPromiseNotInsideAFlow', function() { - var error = Error('original message'); - var originalStack = error.stack; - var originalStr = error.toString(); - - var pair = callbackPair(null, function(e) { - assert.equal(error, e); - assert.equal('original message', e.message); - assert.equal(originalStack, e.stack); - assert.equal(originalStr, e.toString()); - }); - - promise.rejected(error).then(pair.callback, pair.errback); - return waitForIdle().then(pair.assertErrback); - }); - - /** See https://github.com/SeleniumHQ/selenium/issues/444 */ - it('testMaintainsOrderWithPromiseChainsCreatedWithinAForeach_1', function() { - var messages = []; - flow.execute(function() { - return promise.fulfilled(['a', 'b', 'c', 'd']); - }, 'start').then(function(steps) { - steps.forEach(function(step) { - promise.fulfilled(step) - .then(function() { - messages.push(step + '.1'); - }).then(function() { - messages.push(step + '.2'); - }); - }) - }); - return waitForIdle().then(function() { - assert.deepEqual( - ['a.1', 'a.2', 'b.1', 'b.2', 'c.1', 'c.2', 'd.1', 'd.2'], - messages); - }); - }); - - /** See https://github.com/SeleniumHQ/selenium/issues/444 */ - it('testMaintainsOrderWithPromiseChainsCreatedWithinAForeach_2', function() { - var messages = []; - flow.execute(function() { - return promise.fulfilled(['a', 'b', 'c', 'd']); - }, 'start').then(function(steps) { - steps.forEach(function(step) { - promise.fulfilled(step) - .then(function() { - messages.push(step + '.1'); - }).then(function() { - flow.execute(function() {}, step + '.2').then(function() { - messages.push(step + '.2'); - }); - }); - }) - }); - return waitForIdle().then(function() { - assert.deepEqual( - ['a.1', 'a.2', 'b.1', 'b.2', 'c.1', 'c.2', 'd.1', 'd.2'], - messages); - }); - }); - - /** See https://github.com/SeleniumHQ/selenium/issues/444 */ - it('testMaintainsOrderWithPromiseChainsCreatedWithinAForeach_3', function() { - var messages = []; - flow.execute(function() { - return promise.fulfilled(['a', 'b', 'c', 'd']); - }, 'start').then(function(steps) { - steps.forEach(function(step) { - promise.fulfilled(step) - .then(function(){}) - .then(function() { - messages.push(step + '.1'); - return flow.execute(function() {}, step + '.1'); - }).then(function() { - flow.execute(function() {}, step + '.2').then(function(text) { - messages.push(step + '.2'); - }); - }); - }) - }); - return waitForIdle().then(function() { - assert.deepEqual( - ['a.1', 'a.2', 'b.1', 'b.2', 'c.1', 'c.2', 'd.1', 'd.2'], - messages); - }); - }); - - /** See https://github.com/SeleniumHQ/selenium/issues/363 */ - it('testTasksScheduledInASeparateTurnOfTheEventLoopGetASeparateTaskQueue_2', function() { - scheduleAction('a', () => promise.delayed(10)); - schedule('b'); - setTimeout(() => schedule('c'), 0); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'c', 'b'); - }); - }); - - /** See https://github.com/SeleniumHQ/selenium/issues/363 */ - it('testTasksScheduledInASeparateTurnOfTheEventLoopGetASeparateTaskQueue_2', function() { - scheduleAction('a', () => promise.delayed(10)); - schedule('b'); - schedule('c'); - setTimeout(function() { - schedule('d'); - scheduleAction('e', () => promise.delayed(10)); - schedule('f'); - }, 0); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'd', 'e', 'b', 'c', 'f'); - }); - }); - - /** See https://github.com/SeleniumHQ/selenium/issues/363 */ - it('testCanSynchronizeTasksFromAdjacentTaskQueues', function() { - var task1 = scheduleAction('a', () => promise.delayed(10)); - schedule('b'); - setTimeout(function() { - scheduleAction('c', () => task1); - schedule('d'); - }, 0); - - return waitForIdle().then(function() { - assertFlowHistory('a', 'c', 'd', 'b'); - }); - }); - - describe('testCancellingAScheduledTask', function() { - it('1', function() { - var called = false; - var task1 = scheduleAction('a', () => called = true); - task1.cancel('no soup for you'); - - return waitForIdle().then(function() { - assert.ok(!called); - assertFlowHistory(); - return task1.catch(function(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal('no soup for you', e.message); - }); - }); - }); - - it('2', function() { - schedule('a'); - var called = false; - var task2 = scheduleAction('b', () => called = true); - schedule('c'); - - task2.cancel('no soup for you'); - - return waitForIdle().then(function() { - assert.ok(!called); - assertFlowHistory('a', 'c'); - return task2.catch(function(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal('no soup for you', e.message); - }); - }); - }); - - it('3', function() { - var called = false; - var task = scheduleAction('a', () => called = true); - task.cancel(new StubError); - - return waitForIdle().then(function() { - assert.ok(!called); - assertFlowHistory(); - return task.catch(function(e) { - assert.ok(e instanceof promise.CancellationError); - }); - }); - }); - - it('4', function() { - var seen = []; - var task = scheduleAction('a', () => seen.push(1)) - .then(() => seen.push(2)) - .then(() => seen.push(3)) - .then(() => seen.push(4)) - .then(() => seen.push(5)); - task.cancel(new StubError); - - return waitForIdle().then(function() { - assert.deepEqual([], seen); - assertFlowHistory(); - return task.catch(function(e) { - assert.ok(e instanceof promise.CancellationError); - }); - }); - }); - - it('fromWithinAnExecutingTask', function() { - var called = false; - var task; - scheduleAction('a', function() { - task.cancel('no soup for you'); - }); - task = scheduleAction('b', () => called = true); - schedule('c'); - - return waitForIdle().then(function() { - assert.ok(!called); - assertFlowHistory('a', 'c'); - return task.catch(function(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal('no soup for you', e.message); - }); - }); - }); - }); - - it('testCancellingAPendingTask', function() { - var order = []; - var unresolved = promise.defer(); - - var innerTask; - var outerTask = scheduleAction('a', function() { - order.push(1); - - // Schedule a task that will never finish. - innerTask = scheduleAction('a.1', function() { - return unresolved.promise; - }); - - // Since the outerTask is cancelled below, innerTask should be cancelled - // with a DiscardedTaskError, which means its callbacks are silently - // dropped - so this should never execute. - innerTask.catch(function(e) { - order.push(2); - }); - }); - schedule('b'); - - outerTask.catch(function(e) { - order.push(3); - assert.ok(e instanceof promise.CancellationError); - assert.equal('no soup for you', e.message); - }); - - unresolved.promise.catch(function(e) { - order.push(4); - assert.ok(e instanceof promise.CancellationError); - }); - - return timeout(10).then(function() { - assert.deepEqual([1], order); - - outerTask.cancel('no soup for you'); - return waitForIdle(); - }).then(function() { - assertFlowHistory('a', 'a.1', 'b'); - assert.deepEqual([1, 3, 4], order); - }); - }); - - it('testCancellingAPendingPromiseCallback', function() { - var called = false; - - var root = promise.fulfilled(); - root.then(function() { - cb2.cancel('no soup for you'); - }); - - var cb2 = root.then(fail, fail); // These callbacks should never be called. - cb2.then(fail, function(e) { - called = true; - assert.ok(e instanceof promise.CancellationError); - assert.equal('no soup for you', e.message); - }); - - return waitForIdle().then(function() { - assert.ok(called); - }); - }); - - describe('testResetFlow', function() { - it('1', function() { - var called = 0; - var task = flow.execute(() => called++); - task.finally(() => called++); - - return new Promise(function(fulfill) { - flow.once('reset', fulfill); - flow.reset(); - - }).then(function() { - assert.equal(0, called); - return task; - - }).then(fail, function(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal('ControlFlow was reset', e.message); - }); - }); - - it('2', function() { - var called = 0; - var task1 = flow.execute(() => called++); - task1.finally(() => called++); - - var task2 = flow.execute(() => called++); - task2.finally(() => called++); - - var task3 = flow.execute(() => called++); - task3.finally(() => called++); - - return new Promise(function(fulfill) { - flow.once('reset', fulfill); - flow.reset(); - - }).then(function() { - assert.equal(0, called); - }); - }); - }); - - describe('testPromiseFulfilledInsideTask', function() { - it('1', function() { - var order = []; - - flow.execute(function() { - var d = promise.defer(); - - d.promise.then(() => order.push('a')); - d.promise.then(() => order.push('b')); - d.promise.then(() => order.push('c')); - d.fulfill(); - - flow.execute(() => order.push('d')); - - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['a', 'b', 'c', 'd', 'fin'], order); - }); - }); - - it('2', function() { - var order = []; - - flow.execute(function() { - flow.execute(() => order.push('a')); - flow.execute(() => order.push('b')); - - var d = promise.defer(); - d.promise.then(() => order.push('c')); - d.promise.then(() => order.push('d')); - d.fulfill(); - - flow.execute(() => order.push('e')); - - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['a', 'b', 'c', 'd', 'e', 'fin'], order); - }); - }); - - it('3', function() { - var order = []; - var d = promise.defer(); - d.promise.then(() => order.push('c')); - d.promise.then(() => order.push('d')); - - flow.execute(function() { - flow.execute(() => order.push('a')); - flow.execute(() => order.push('b')); - - d.promise.then(() => order.push('e')); - d.fulfill(); - - flow.execute(() => order.push('f')); - - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['c', 'd', 'a', 'b', 'e', 'f', 'fin'], order); - }); - }); - - it('4', function() { - var order = []; - var d = promise.defer(); - d.promise.then(() => order.push('a')); - d.promise.then(() => order.push('b')); - - flow.execute(function() { - flow.execute(function() { - order.push('c'); - flow.execute(() => order.push('d')); - d.promise.then(() => order.push('e')); - }); - flow.execute(() => order.push('f')); - - d.promise.then(() => order.push('g')); - d.fulfill(); - - flow.execute(() => order.push('h')); - - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'fin'], order); - }); - }); - }); - - describe('testSettledPromiseCallbacksInsideATask', function() { - it('1', function() { - var order = []; - var p = promise.fulfilled(); - - flow.execute(function() { - flow.execute(() => order.push('a')); - p.then(() => order.push('b')); - flow.execute(() => order.push('c')); - p.then(() => order.push('d')); - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['a', 'b', 'c', 'd', 'fin'], order); - }); - }); - - it('2', function() { - var order = []; - - flow.execute(function() { - flow.execute(() => order.push('a')) - .then( () => order.push('c')); - flow.execute(() => order.push('b')); - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['a', 'c', 'b', 'fin'], order); - }); - }); - }); - - it('testTasksDoNotWaitForNewlyCreatedPromises', function() { - var order = []; - - flow.execute(function() { - var d = promise.defer(); - - // This is a normal promise, not a task, so the task for this callback is - // considered volatile. Volatile tasks should be skipped when they reach - // the front of the task queue. - d.promise.then(() => order.push('a')); - - flow.execute(() => order.push('b')); - flow.execute(function() { - flow.execute(() => order.push('c')); - d.promise.then(() => order.push('d')); - d.fulfill(); - }); - flow.execute(() => order.push('e')); - - }).then(() => order.push('fin')); - - return waitForIdle().then(function() { - assert.deepEqual(['b', 'a', 'c', 'd', 'e', 'fin'], order); - }); - }); - - it('testCallbackDependenciesDoNotDeadlock', function() { - var order = []; - var root = promise.defer(); - var dep = promise.fulfilled().then(function() { - order.push('a'); - return root.promise.then(function() { - order.push('b'); - }); - }); - // This callback depends on |dep|, which depends on another callback - // attached to |root| via a chain. - root.promise.then(function() { - order.push('c'); - return dep.then(() => order.push('d')); - }).then(() => order.push('fin')); - - setTimeout(() => root.fulfill(), 20); - - return waitForIdle().then(function() { - assert.deepEqual(['a', 'b', 'c', 'd', 'fin'], order); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js deleted file mode 100644 index b3388da7..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_generator_test.js +++ /dev/null @@ -1,310 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const promise = require('../../lib/promise'); -const {enablePromiseManager, promiseManagerSuite} = require('../../lib/test/promise'); - -describe('promise.consume()', function() { - promiseManagerSuite(() => { - it('requires inputs to be generator functions', function() { - assert.throws(function() { - promise.consume(function() {}); - }); - }); - - it('handles a basic generator with no yielded promises', function() { - var values = []; - return promise.consume(function* () { - var i = 0; - while (i < 4) { - i = yield i + 1; - values.push(i); - } - }).then(function() { - assert.deepEqual([1, 2, 3, 4], values); - }); - }); - - it('handles a promise yielding generator', function() { - var values = []; - return promise.consume(function* () { - var i = 0; - while (i < 4) { - // Test that things are actually async here. - setTimeout(function() { - values.push(i * 2); - }, 10); - - yield promise.delayed(10).then(function() { - values.push(i++); - }); - } - }).then(function() { - assert.deepEqual([0, 0, 2, 1, 4, 2, 6, 3], values); - }); - }); - - it('assignments to yielded promises get fulfilled value', function() { - return promise.consume(function* () { - let x = yield Promise.resolve(2); - assert.equal(2, x); - }); - }); - - it('uses final return value as fulfillment value', function() { - return promise.consume(function* () { - yield 1; - yield 2; - return 3; - }).then(function(value) { - assert.equal(3, value); - }); - }); - - it('throws rejected promise errors within the generator', function() { - var values = []; - return promise.consume(function* () { - values.push('a'); - var e = Error('stub error'); - try { - yield Promise.reject(e); - values.push('b'); - } catch (ex) { - assert.equal(e, ex); - values.push('c'); - } - values.push('d'); - }).then(function() { - assert.deepEqual(['a', 'c', 'd'], values); - }); - }); - - it('aborts the generator if there is an unhandled rejection', function() { - var values = []; - var e = Error('stub error'); - return promise.consume(function* () { - values.push(1); - yield promise.rejected(e); - values.push(2); - }).catch(function() { - assert.deepEqual([1], values); - }); - }); - - it('yield waits for promises', function() { - let values = []; - let blocker = promise.delayed(100).then(() => { - assert.deepEqual([1], values); - return 2; - }); - - return promise.consume(function* () { - values.push(1); - values.push(yield blocker, 3); - }).then(function() { - assert.deepEqual([1, 2, 3], values); - }); - }); - - it('accepts custom scopes', function() { - return promise.consume(function* () { - return this.name; - }, {name: 'Bob'}).then(function(value) { - assert.equal('Bob', value); - }); - }); - - it('accepts initial generator arguments', function() { - return promise.consume(function* (a, b) { - assert.equal('red', a); - assert.equal('apples', b); - }, null, 'red', 'apples'); - }); - }); - - enablePromiseManager(() => { - it('is possible to cancel promise generators', function() { - var values = []; - var p = promise.consume(function* () { - var i = 0; - while (i < 3) { - yield promise.delayed(100).then(function() { - values.push(i++); - }); - } - }); - return promise.delayed(75).then(function() { - p.cancel(); - return p.catch(function() { - return promise.delayed(300); - }); - }).then(function() { - assert.deepEqual([0], values); - }); - }); - - it('executes generator within the control flow', function() { - var promises = [ - promise.defer(), - promise.defer() - ]; - var values = []; - - setTimeout(function() { - assert.deepEqual([], values); - promises[0].fulfill(1); - }, 100); - - setTimeout(function() { - assert.deepEqual([1], values); - promises[1].fulfill(2); - }, 200); - - return promise.controlFlow().execute(function* () { - values.push(yield promises[0].promise); - values.push(yield promises[1].promise); - values.push('fin'); - }).then(function() { - assert.deepEqual([1, 2, 'fin'], values); - }); - }); - - it('handles tasks scheduled in generator', function() { - var flow = promise.controlFlow(); - return flow.execute(function* () { - var x = yield flow.execute(function() { - return promise.delayed(10).then(function() { - return 1; - }); - }); - - var y = yield flow.execute(function() { - return 2; - }); - - return x + y; - }).then(function(value) { - assert.equal(3, value); - }); - }); - - it('blocks the control flow while processing generator', function() { - var values = []; - return promise.controlFlow().wait(function* () { - yield values.push(1); - values.push(yield promise.delayed(10).then(function() { - return 2; - })); - yield values.push(3); - return values.length === 6; - }, 250).then(function() { - assert.deepEqual([1, 2, 3, 1, 2, 3], values); - }); - }); - - it('ControlFlow.wait() will timeout on long generator', function() { - var values = []; - return promise.controlFlow().wait(function* () { - var i = 0; - while (i < 3) { - yield promise.delayed(100).then(function() { - values.push(i++); - }); - } - }, 75).catch(function() { - assert.deepEqual( - [0, 1, 2], values, 'Should complete one loop of wait condition'); - }); - }); - - describe('generators in promise callbacks', function() { - it('works with no initial value', function() { - var promises = [ - promise.defer(), - promise.defer() - ]; - var values = []; - - setTimeout(function() { - promises[0].fulfill(1); - }, 50); - - setTimeout(function() { - promises[1].fulfill(2); - }, 100); - - return promise.fulfilled().then(function*() { - values.push(yield promises[0].promise); - values.push(yield promises[1].promise); - values.push('fin'); - }).then(function() { - assert.deepEqual([1, 2, 'fin'], values); - }); - }); - - it('starts the generator with promised value', function() { - var promises = [ - promise.defer(), - promise.defer() - ]; - var values = []; - - setTimeout(function() { - promises[0].fulfill(1); - }, 50); - - setTimeout(function() { - promises[1].fulfill(2); - }, 100); - - return promise.fulfilled(3).then(function*(value) { - var p1 = yield promises[0].promise; - var p2 = yield promises[1].promise; - values.push(value + p1); - values.push(value + p2); - values.push('fin'); - }).then(function() { - assert.deepEqual([4, 5, 'fin'], values); - }); - }); - - it('throws yielded rejections within the generator callback', function() { - var d = promise.defer(); - var e = Error('stub'); - - setTimeout(function() { - d.reject(e); - }, 50); - - return promise.fulfilled().then(function*() { - var threw = false; - try { - yield d.promise; - } catch (ex) { - threw = true; - assert.equal(e, ex); - } - assert.ok(threw); - }); - }); - }); - }); -}); - diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js deleted file mode 100644 index 8da1cd89..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/promise_test.js +++ /dev/null @@ -1,1109 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); - -const testutil = require('./testutil'); -const promise = require('../../lib/promise'); -const {enablePromiseManager, promiseManagerSuite} = require('../../lib/test/promise'); - -// Aliases for readability. -const NativePromise = Promise; -const StubError = testutil.StubError; -const assertIsStubError = testutil.assertIsStubError; -const callbackHelper = testutil.callbackHelper; -const callbackPair = testutil.callbackPair; -const throwStubError = testutil.throwStubError; -const fail = () => assert.fail(); - -// Refer to promise_aplus_test for promise compliance with standard behavior. -describe('promise', function() { - var app, uncaughtExceptions; - - beforeEach(function setUp() { - if (promise.USE_PROMISE_MANAGER) { - promise.LONG_STACK_TRACES = false; - uncaughtExceptions = []; - - app = promise.controlFlow(); - app.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, - (e) => uncaughtExceptions.push(e)); - } - }); - - afterEach(function tearDown() { - if (promise.USE_PROMISE_MANAGER) { - app.reset(); - promise.setDefaultFlow(new promise.ControlFlow); - assert.deepEqual([], uncaughtExceptions, - 'Did not expect any uncaught exceptions'); - promise.LONG_STACK_TRACES = false; - } - }); - - const assertIsPromise = (p) => assert.ok(promise.isPromise(p)); - const assertNotPromise = (v) => assert.ok(!promise.isPromise(v)); - - function defer() { - let d = {}; - let promise = new Promise((resolve, reject) => { - Object.assign(d, {resolve, reject}); - }); - d.promise = promise; - return d; - } - - function createRejectedPromise(reason) { - var p = Promise.reject(reason); - p.catch(function() {}); // Silence unhandled rejection handlers. - return p; - } - - enablePromiseManager(() => { - it('testCanDetectPromiseLikeObjects', function() { - assertIsPromise(new promise.Promise(function(fulfill) { - fulfill(); - })); - assertIsPromise(new promise.Deferred().promise); - assertIsPromise(Promise.resolve(123)); - assertIsPromise({then:function() {}}); - - assertNotPromise(new promise.Deferred()); - assertNotPromise(undefined); - assertNotPromise(null); - assertNotPromise(''); - assertNotPromise(true); - assertNotPromise(false); - assertNotPromise(1); - assertNotPromise({}); - assertNotPromise({then:1}); - assertNotPromise({then:true}); - assertNotPromise({then:''}); - }); - - describe('then', function() { - it('returnsOwnPromiseIfNoCallbacksWereGiven', function() { - var deferred = new promise.Deferred(); - assert.equal(deferred.promise, deferred.promise.then()); - assert.equal(deferred.promise, deferred.promise.catch()); - assert.equal(deferred.promise, promise.when(deferred.promise)); - }); - - it('stillConsideredUnHandledIfNoCallbacksWereGivenOnCallsToThen', function() { - promise.rejected(new StubError).then(); - var handler = callbackHelper(assertIsStubError); - - // so tearDown() doesn't throw - app.removeAllListeners(); - app.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, handler); - return NativePromise.resolve() - // Macro yield so the uncaught exception has a chance to trigger. - .then(() => new NativePromise(resolve => setTimeout(resolve, 0))) - .then(() => handler.assertCalled()); - }); - }); - - describe('finally', function() { - it('nonFailingCallbackDoesNotSuppressOriginalError', function() { - var done = callbackHelper(assertIsStubError); - return promise.rejected(new StubError). - finally(function() {}). - catch(done). - finally(done.assertCalled); - }); - - it('failingCallbackSuppressesOriginalError', function() { - var done = callbackHelper(assertIsStubError); - return promise.rejected(new Error('original')). - finally(throwStubError). - catch(done). - finally(done.assertCalled); - }); - - it('callbackThrowsAfterFulfilledPromise', function() { - var done = callbackHelper(assertIsStubError); - return promise.fulfilled(). - finally(throwStubError). - catch(done). - finally(done.assertCalled); - }); - - it('callbackReturnsRejectedPromise', function() { - var done = callbackHelper(assertIsStubError); - return promise.fulfilled(). - finally(function() { - return promise.rejected(new StubError); - }). - catch(done). - finally(done.assertCalled); - }); - }); - - describe('cancel', function() { - it('passesTheCancellationReasonToReject', function() { - var d = new promise.Deferred(); - var res = d.promise.then(assert.fail, function(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal('because i said so', e.message); - }); - d.promise.cancel('because i said so'); - return res; - }); - - describe('can cancel original promise from its child;', function() { - it('child created by then()', function() { - var d = new promise.Deferred(); - var p = d.promise.then(assert.fail, function(e) { - assert.ok(e instanceof promise.CancellationError); - assert.equal('because i said so', e.message); - return 123; - }); - - p.cancel('because i said so'); - return p.then(v => assert.equal(123, v)); - }); - - it('child linked by resolving with parent', function() { - let parent = promise.defer(); - let child = new promise.Promise(resolve => resolve(parent.promise)); - child.cancel('all done'); - - return parent.promise.then( - () => assert.fail('expected a cancellation'), - e => { - assert.ok(e instanceof promise.CancellationError); - assert.equal('all done', e.message); - }); - }); - - it('grand child through thenable chain', function() { - let p = new promise.Promise(function() {/* never resolve*/}); - - let noop = function() {}; - let gc = p.then(noop).then(noop).then(noop); - gc.cancel('stop!'); - - return p.then( - () => assert.fail('expected to be cancelled'), - (e) => { - assert.ok(e instanceof promise.CancellationError); - assert.equal('stop!', e.message); - }); - }); - - it('grand child through thenable chain started at resolve', function() { - function noop() {} - - let parent = promise.defer(); - let child = new promise.Promise(resolve => resolve(parent.promise)); - let grandChild = child.then(noop).then(noop).then(noop); - grandChild.cancel('all done'); - - return parent.promise.then( - () => assert.fail('expected a cancellation'), - e => { - assert.ok(e instanceof promise.CancellationError); - assert.equal('all done', e.message); - }); - }); - - it('"parent" is a CancellableThenable', function() { - function noop() {} - - class FakeThenable { - constructor(p) { - this.promise = p; - } - - cancel(reason) { - this.promise.cancel(reason); - } - - then(cb, eb) { - let result = this.promise.then(cb, eb); - return new FakeThenable(result); - } - } - promise.CancellableThenable.addImplementation(FakeThenable); - - let root = new promise.Promise(noop); - let thenable = new FakeThenable(root); - assert.ok(promise.Thenable.isImplementation(thenable)); - assert.ok(promise.CancellableThenable.isImplementation(thenable)); - - let child = new promise.Promise(resolve => resolve(thenable)); - assert.ok(child instanceof promise.Promise); - child.cancel('stop!'); - - function assertStopped(p) { - return p.then( - () => assert.fail('not stopped!'), - (e) => { - assert.ok(e instanceof promise.CancellationError); - assert.equal('stop!', e.message); - }); - } - - return assertStopped(child).then(() => assertStopped(root)); - }); - }); - - it('canCancelATimeout', function() { - var p = promise.delayed(25) - .then(assert.fail, (e) => e instanceof promise.CancellationError); - setTimeout(() => p.cancel(), 20); - p.cancel(); - return p; - }); - - it('can cancel timeout from grandchild', function() { - }); - - it('cancelIsANoopOnceAPromiseHasBeenFulfilled', function() { - var p = promise.fulfilled(123); - p.cancel(); - return p.then((v) => assert.equal(123, v)); - }); - - it('cancelIsANoopOnceAPromiseHasBeenRejected', function() { - var p = promise.rejected(new StubError); - p.cancel(); - - var pair = callbackPair(null, assertIsStubError); - return p.then(assert.fail, assertIsStubError); - }); - - it('noopCancelTriggeredOnCallbackOfResolvedPromise', function() { - var d = promise.defer(); - var p = d.promise.then(); - - d.fulfill(); - p.cancel(); // This should not throw. - return p; // This should not trigger a failure. - }); - }); - }); - - promiseManagerSuite(() => { - describe('fulfilled', function() { - it('returns input value if it is already a valid promise', function() { - let p = promise.createPromise(function() {}); - let r = promise.fulfilled(p); - assert.strictEqual(p, r); - }); - - it('creates a new promise fulfilled with input', function() { - return promise.fulfilled(1234).then(v => assert.equal(1234, v)); - }); - - it('can convert thenables to valid promise', function() { - let thenable = {then: function(cb) {cb(1234)}}; - let p = promise.fulfilled(thenable); - assert.notStrictEqual(thenable, p); - return p.then(v => assert.equal(1234, v)); - }); - }); - - describe('when', function() { - it('ReturnsAResolvedPromiseIfGivenANonPromiseValue', function() { - var ret = promise.when('abc'); - assertIsPromise(ret); - return ret.then((value) => assert.equal('abc', value)); - }); - - it('PassesRawErrorsToCallbacks', function() { - var error = new Error('boo!'); - return promise.when(error, function(value) { - assert.equal(error, value); - }); - }); - - it('WaitsForValueToBeResolvedBeforeInvokingCallback', function() { - let d = defer(); - let callback; - let result = promise.when(d.promise, callback = callbackHelper(function(value) { - assert.equal('hi', value); - })); - callback.assertNotCalled(); - d.resolve('hi'); - return result.then(callback.assertCalled); - }); - }); - - describe('fullyResolved', function() { - it('primitives', function() { - function runTest(value) { - var callback, errback; - return promise.fullyResolved(value) - .then((resolved) => assert.equal(value, resolved)); - } - return runTest(true) - .then(() => runTest(function() {})) - .then(() => runTest(null)) - .then(() => runTest(123)) - .then(() => runTest('foo bar')) - .then(() => runTest(undefined)); - }); - - it('arrayOfPrimitives', function() { - var fn = function() {}; - var array = [true, fn, null, 123, '', undefined, 1]; - return promise.fullyResolved(array).then(function(resolved) { - assert.equal(array, resolved); - assert.deepEqual([true, fn, null, 123, '', undefined, 1], - resolved); - }); - }); - - it('nestedArrayOfPrimitives', function() { - var fn = function() {}; - var array = [true, [fn, null, 123], '', undefined]; - return promise.fullyResolved(array) - .then(function(resolved) { - assert.equal(array, resolved); - assert.deepEqual([true, [fn, null, 123], '', undefined], resolved); - assert.deepEqual([fn, null, 123], resolved[1]); - }); - }); - - it('arrayWithPromisedPrimitive', function() { - return promise.fullyResolved([Promise.resolve(123)]) - .then(function(resolved) { - assert.deepEqual([123], resolved); - }); - }); - - it('promiseResolvesToPrimitive', function() { - return promise.fullyResolved(Promise.resolve(123)) - .then((resolved) => assert.equal(123, resolved)); - }); - - it('promiseResolvesToArray', function() { - var fn = function() {}; - var array = [true, [fn, null, 123], '', undefined]; - var aPromise = Promise.resolve(array); - - var result = promise.fullyResolved(aPromise); - return result.then(function(resolved) { - assert.equal(array, resolved); - assert.deepEqual([true, [fn, null, 123], '', undefined], - resolved); - assert.deepEqual([fn, null, 123], resolved[1]); - }); - }); - - it('promiseResolvesToArrayWithPromises', function() { - var nestedPromise = Promise.resolve(123); - var aPromise = Promise.resolve([true, nestedPromise]); - return promise.fullyResolved(aPromise) - .then(function(resolved) { - assert.deepEqual([true, 123], resolved); - }); - }); - - it('rejectsIfArrayPromiseRejects', function() { - var nestedPromise = createRejectedPromise(new StubError); - var aPromise = Promise.resolve([true, nestedPromise]); - - var pair = callbackPair(null, assertIsStubError); - return promise.fullyResolved(aPromise) - .then(assert.fail, assertIsStubError); - }); - - it('rejectsOnFirstArrayRejection', function() { - var e1 = new Error('foo'); - var e2 = new Error('bar'); - var aPromise = Promise.resolve([ - createRejectedPromise(e1), - createRejectedPromise(e2) - ]); - - return promise.fullyResolved(aPromise) - .then(assert.fail, function(error) { - assert.strictEqual(e1, error); - }); - }); - - it('rejectsIfNestedArrayPromiseRejects', function() { - var aPromise = Promise.resolve([ - Promise.resolve([ - createRejectedPromise(new StubError) - ]) - ]); - - return promise.fullyResolved(aPromise) - .then(assert.fail, assertIsStubError); - }); - - it('simpleHash', function() { - var hash = {'a': 123}; - return promise.fullyResolved(hash) - .then(function(resolved) { - assert.strictEqual(hash, resolved); - assert.deepEqual(hash, {'a': 123}); - }); - }); - - it('nestedHash', function() { - var nestedHash = {'foo':'bar'}; - var hash = {'a': 123, 'b': nestedHash}; - - return promise.fullyResolved(hash) - .then(function(resolved) { - assert.strictEqual(hash, resolved); - assert.deepEqual({'a': 123, 'b': {'foo': 'bar'}}, resolved); - assert.strictEqual(nestedHash, resolved['b']); - }); - }); - - it('promiseResolvesToSimpleHash', function() { - var hash = {'a': 123}; - var aPromise = Promise.resolve(hash); - - return promise.fullyResolved(aPromise) - .then((resolved) => assert.strictEqual(hash, resolved)); - }); - - it('promiseResolvesToNestedHash', function() { - var nestedHash = {'foo':'bar'}; - var hash = {'a': 123, 'b': nestedHash}; - var aPromise = Promise.resolve(hash); - - return promise.fullyResolved(aPromise) - .then(function(resolved) { - assert.strictEqual(hash, resolved); - assert.strictEqual(nestedHash, resolved['b']); - assert.deepEqual(hash, {'a': 123, 'b': {'foo': 'bar'}}); - }); - }); - - it('promiseResolvesToHashWithPromises', function() { - var aPromise = Promise.resolve({ - 'a': Promise.resolve(123) - }); - - return promise.fullyResolved(aPromise) - .then(function(resolved) { - assert.deepEqual({'a': 123}, resolved); - }); - }); - - it('rejectsIfHashPromiseRejects', function() { - var aPromise = Promise.resolve({ - 'a': createRejectedPromise(new StubError) - }); - - return promise.fullyResolved(aPromise) - .then(assert.fail, assertIsStubError); - }); - - it('rejectsIfNestedHashPromiseRejects', function() { - var aPromise = Promise.resolve({ - 'a': {'b': createRejectedPromise(new StubError)} - }); - - return promise.fullyResolved(aPromise) - .then(assert.fail, assertIsStubError); - }); - - it('instantiatedObject', function() { - function Foo() { - this.bar = 'baz'; - } - var foo = new Foo; - - return promise.fullyResolved(foo).then(function(resolvedFoo) { - assert.equal(foo, resolvedFoo); - assert.ok(resolvedFoo instanceof Foo); - assert.deepEqual(new Foo, resolvedFoo); - }); - }); - - it('withEmptyArray', function() { - return promise.fullyResolved([]).then(function(resolved) { - assert.deepEqual([], resolved); - }); - }); - - it('withEmptyHash', function() { - return promise.fullyResolved({}).then(function(resolved) { - assert.deepEqual({}, resolved); - }); - }); - - it('arrayWithPromisedHash', function() { - var obj = {'foo': 'bar'}; - var array = [Promise.resolve(obj)]; - - return promise.fullyResolved(array).then(function(resolved) { - assert.deepEqual(resolved, [obj]); - }); - }); - }); - - describe('checkedNodeCall', function() { - it('functionThrows', function() { - return promise.checkedNodeCall(throwStubError) - .then(assert.fail, assertIsStubError); - }); - - it('functionReturnsAnError', function() { - return promise.checkedNodeCall(function(callback) { - callback(new StubError); - }).then(assert.fail, assertIsStubError); - }); - - it('functionReturnsSuccess', function() { - var success = 'success!'; - return promise.checkedNodeCall(function(callback) { - callback(null, success); - }).then((value) => assert.equal(success, value)); - }); - - it('functionReturnsAndThrows', function() { - var error = new Error('boom'); - var error2 = new Error('boom again'); - return promise.checkedNodeCall(function(callback) { - callback(error); - throw error2; - }).then(assert.fail, (e) => assert.equal(error, e)); - }); - - it('functionThrowsAndReturns', function() { - var error = new Error('boom'); - var error2 = new Error('boom again'); - return promise.checkedNodeCall(function(callback) { - setTimeout(() => callback(error), 10); - throw error2; - }).then(assert.fail, (e) => assert.equal(error2, e)); - }); - }); - - describe('all', function() { - it('(base case)', function() { - let deferredObjs = [defer(), defer()]; - var a = [ - 0, 1, - deferredObjs[0].promise, - deferredObjs[1].promise, - 4, 5, 6 - ]; - delete a[5]; - - var pair = callbackPair(function(value) { - assert.deepEqual([0, 1, 2, 3, 4, undefined, 6], value); - }); - - var result = promise.all(a).then(pair.callback, pair.errback); - pair.assertNeither(); - - deferredObjs[0].resolve(2); - pair.assertNeither(); - - deferredObjs[1].resolve(3); - return result.then(() => pair.assertCallback()); - }); - - it('empty array', function() { - return promise.all([]).then((a) => assert.deepEqual([], a)); - }); - - it('usesFirstRejection', function() { - let deferredObjs = [defer(), defer()]; - let a = [deferredObjs[0].promise, deferredObjs[1].promise]; - - var result = promise.all(a).then(assert.fail, assertIsStubError); - deferredObjs[1].reject(new StubError); - setTimeout(() => deferredObjs[0].reject(Error('ignored')), 0); - return result; - }); - }); - - describe('map', function() { - it('(base case)', function() { - var a = [1, 2, 3]; - return promise.map(a, function(value, index, a2) { - assert.equal(a, a2); - assert.equal('number', typeof index, 'not a number'); - return value + 1; - }).then(function(value) { - assert.deepEqual([2, 3, 4], value); - }); - }); - - it('omitsDeleted', function() { - var a = [0, 1, 2, 3, 4, 5, 6]; - delete a[1]; - delete a[3]; - delete a[4]; - delete a[6]; - - var expected = [0, 1, 4, 9, 16, 25, 36]; - delete expected[1]; - delete expected[3]; - delete expected[4]; - delete expected[6]; - - return promise.map(a, function(value) { - return value * value; - }).then(function(value) { - assert.deepEqual(expected, value); - }); - }); - - it('emptyArray', function() { - return promise.map([], function(value) { - return value + 1; - }).then(function(value) { - assert.deepEqual([], value); - }); - }); - - it('inputIsPromise', function() { - var input = defer(); - var result = promise.map(input.promise, function(value) { - return value + 1; - }); - - var pair = callbackPair(function(value) { - assert.deepEqual([2, 3, 4], value); - }); - result = result.then(pair.callback, pair.errback); - - setTimeout(function() { - pair.assertNeither(); - input.resolve([1, 2, 3]); - }, 10); - - return result; - }); - - it('waitsForFunctionResultToResolve', function() { - var innerResults = [ - defer(), - defer() - ]; - - var result = promise.map([1, 2], function(value, index) { - return innerResults[index].promise; - }); - - var pair = callbackPair(function(value) { - assert.deepEqual(['a', 'b'], value); - }); - result = result.then(pair.callback, pair.errback); - - return NativePromise.resolve() - .then(function() { - pair.assertNeither(); - innerResults[0].resolve('a'); - }) - .then(function() { - pair.assertNeither(); - innerResults[1].resolve('b'); - return result; - }) - .then(pair.assertCallback); - }); - - it('rejectsPromiseIfFunctionThrows', function() { - return promise.map([1], throwStubError) - .then(assert.fail, assertIsStubError); - }); - - it('rejectsPromiseIfFunctionReturnsRejectedPromise', function() { - return promise.map([1], function() { - return createRejectedPromise(new StubError); - }).then(assert.fail, assertIsStubError); - }); - - it('stopsCallingFunctionIfPreviousIterationFailed', function() { - var count = 0; - return promise.map([1, 2, 3, 4], function() { - count++; - if (count == 3) { - throw new StubError; - } - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.equal(3, count); - }); - }); - - it('rejectsWithFirstRejectedPromise', function() { - var innerResult = [ - Promise.resolve(), - createRejectedPromise(new StubError), - createRejectedPromise(Error('should be ignored')) - ]; - var count = 0; - return promise.map([1, 2, 3, 4], function(value, index) { - count += 1; - return innerResult[index]; - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.equal(2, count); - }); - }); - - it('preservesOrderWhenMapReturnsPromise', function() { - var deferreds = [ - defer(), - defer(), - defer(), - defer() - ]; - var result = promise.map(deferreds, function(value) { - return value.promise; - }); - - var pair = callbackPair(function(value) { - assert.deepEqual([0, 1, 2, 3], value); - }); - result = result.then(pair.callback, pair.errback); - - return Promise.resolve() - .then(function() { - pair.assertNeither(); - for (let i = deferreds.length; i > 0; i -= 1) { - deferreds[i - 1].resolve(i - 1); - } - return result; - }).then(pair.assertCallback); - }); - }); - - describe('filter', function() { - it('basicFiltering', function() { - var a = [0, 1, 2, 3]; - return promise.filter(a, function(val, index, a2) { - assert.equal(a, a2); - assert.equal('number', typeof index, 'not a number'); - return val > 1; - }).then(function(val) { - assert.deepEqual([2, 3], val); - }); - }); - - it('omitsDeleted', function() { - var a = [0, 1, 2, 3, 4, 5, 6]; - delete a[3]; - delete a[4]; - - return promise.filter(a, function(value) { - return value > 1 && value < 6; - }).then(function(val) { - assert.deepEqual([2, 5], val); - }); - }); - - it('preservesInputs', function() { - var a = [0, 1, 2, 3]; - - return promise.filter(a, function(value, i, a2) { - assert.equal(a, a2); - // Even if a function modifies the input array, the original value - // should be inserted into the new array. - a2[i] = a2[i] - 1; - return a2[i] >= 1; - }).then(function(val) { - assert.deepEqual([2, 3], val); - }); - }); - - it('inputIsPromise', function() { - var input = defer(); - var result = promise.filter(input.promise, function(value) { - return value > 1 && value < 3; - }); - - var pair = callbackPair(function(value) { - assert.deepEqual([2], value); - }); - result = result.then(pair.callback, pair.errback); - return NativePromise.resolve() - .then(function() { - pair.assertNeither(); - input.resolve([1, 2, 3]); - return result; - }) - .then(pair.assertCallback); - }); - - it('waitsForFunctionResultToResolve', function() { - var innerResults = [ - defer(), - defer() - ]; - - var result = promise.filter([1, 2], function(value, index) { - return innerResults[index].promise; - }); - - var pair = callbackPair(function(value) { - assert.deepEqual([2], value); - }); - result = result.then(pair.callback, pair.errback); - return NativePromise.resolve() - .then(function() { - pair.assertNeither(); - innerResults[0].resolve(false); - }) - .then(function() { - pair.assertNeither(); - innerResults[1].resolve(true); - return result; - }) - .then(pair.assertCallback); - }); - - it('rejectsPromiseIfFunctionReturnsRejectedPromise', function() { - return promise.filter([1], function() { - return createRejectedPromise(new StubError); - }).then(assert.fail, assertIsStubError); - }); - - it('stopsCallingFunctionIfPreviousIterationFailed', function() { - var count = 0; - return promise.filter([1, 2, 3, 4], function() { - count++; - if (count == 3) { - throw new StubError; - } - }).then(assert.fail, function(e) { - assertIsStubError(e); - assert.equal(3, count); - }); - }); - - it('rejectsWithFirstRejectedPromise', function() { - var innerResult = [ - Promise.resolve(), - createRejectedPromise(new StubError), - createRejectedPromise(Error('should be ignored')) - ]; - - return promise.filter([1, 2, 3, 4], function(value, index) { - assert.ok(index < innerResult.length); - return innerResult[index]; - }).then(assert.fail, assertIsStubError); - }); - - it('preservesOrderWhenFilterReturnsPromise', function() { - var deferreds = [ - defer(), - defer(), - defer(), - defer() - ]; - var result = promise.filter([0, 1, 2, 3], function(value, index) { - return deferreds[index].promise; - }); - - var pair = callbackPair(function(value) { - assert.deepEqual([1, 2], value); - }); - result = result.then(pair.callback, pair.errback); - - return NativePromise.resolve() - .then(function() { - pair.assertNeither(); - for (let i = deferreds.length - 1; i >= 0; i -= 1) { - deferreds[i].resolve(i > 0 && i < 3); - } - return result; - }).then(pair.assertCallback); - }); - }); - }); - - enablePromiseManager(() => { - it('firesUncaughtExceptionEventIfRejectionNeverHandled', function() { - promise.rejected(new StubError); - var handler = callbackHelper(assertIsStubError); - - // so tearDown() doesn't throw - app.removeAllListeners(); - app.on(promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION, handler); - - return NativePromise.resolve() - // Macro yield so the uncaught exception has a chance to trigger. - .then(() => new NativePromise(resolve => setTimeout(resolve, 0))) - .then(handler.assertCalled); - }); - - it('cannotResolveADeferredWithItself', function() { - var deferred = new promise.Deferred(); - assert.throws(() => deferred.fulfill(deferred)); - assert.throws(() => deferred.reject(deferred)); - }); - - describe('testLongStackTraces', function() { - beforeEach(() => promise.LONG_STACK_TRACES = false); - afterEach(() => promise.LONG_STACK_TRACES = false); - - it('doesNotAppendStackIfFeatureDisabled', function() { - promise.LONG_STACK_TRACES = false; - - var error = Error('hello'); - var originalStack = error.stack; - return promise.rejected(error). - then(fail). - then(fail). - then(fail). - then(fail, function(e) { - assert.equal(error, e); - assert.equal(originalStack, e.stack); - }); - }); - - function getStackMessages(error) { - return error.stack.split(/\n/).filter(function(line) { - return /^From: /.test(line); - }); - } - - it('appendsInitialPromiseCreation_resolverThrows', function() { - promise.LONG_STACK_TRACES = true; - - var error = Error('hello'); - var originalStack = '(placeholder; will be overwritten later)'; - - return new promise.Promise(function() { - try { - throw error; - } catch (e) { - originalStack = e.stack; - throw e; - } - }).then(fail, function(e) { - assert.strictEqual(error, e); - if (typeof originalStack !== 'string') { - return; - } - assert.notEqual(originalStack, e.stack); - assert.equal(e.stack.indexOf(originalStack), 0, - 'should start with original stack'); - assert.deepEqual(['From: ManagedPromise: new'], getStackMessages(e)); - }); - }); - - it('appendsInitialPromiseCreation_rejectCalled', function() { - promise.LONG_STACK_TRACES = true; - - var error = Error('hello'); - var originalStack = error.stack; - - return new promise.Promise(function(_, reject) { - reject(error); - }).then(fail, function(e) { - assert.equal(error, e); - if (typeof originalStack !== 'string') { - return; - } - assert.notEqual(originalStack, e.stack); - assert.equal(e.stack.indexOf(originalStack), 0, - 'should start with original stack'); - assert.deepEqual(['From: ManagedPromise: new'], getStackMessages(e)); - }); - }); - - it('appendsEachStepToRejectionError', function() { - promise.LONG_STACK_TRACES = true; - - var error = Error('hello'); - var originalStack = '(placeholder; will be overwritten later)'; - - return new promise.Promise(function() { - try { - throw error; - } catch (e) { - originalStack = e.stack; - throw e; - } - }). - then(fail). - catch(function(e) { throw e; }). - then(fail). - catch(function(e) { throw e; }). - then(fail, function(e) { - assert.equal(error, e); - if (typeof originalStack !== 'string') { - return; - } - assert.notEqual(originalStack, e.stack); - assert.equal(e.stack.indexOf(originalStack), 0, - 'should start with original stack'); - assert.deepEqual([ - 'From: ManagedPromise: new', - 'From: Promise: then', - 'From: Promise: catch', - 'From: Promise: then', - 'From: Promise: catch', - ], getStackMessages(e)); - }); - }); - - it('errorOccursInCallbackChain', function() { - promise.LONG_STACK_TRACES = true; - - var error = Error('hello'); - var originalStack = '(placeholder; will be overwritten later)'; - - return promise.fulfilled(). - then(function() {}). - then(function() {}). - then(function() { - try { - throw error; - } catch (e) { - originalStack = e.stack; - throw e; - } - }). - catch(function(e) { throw e; }). - then(fail, function(e) { - assert.equal(error, e); - if (typeof originalStack !== 'string') { - return; - } - assert.notEqual(originalStack, e.stack); - assert.equal(e.stack.indexOf(originalStack), 0, - 'should start with original stack'); - assert.deepEqual([ - 'From: Promise: then', - 'From: Promise: catch', - ], getStackMessages(e)); - }); - }); - }); - }); - - it('testAddThenableImplementation', function() { - function tmp() {} - assert.ok(!promise.Thenable.isImplementation(new tmp())); - promise.Thenable.addImplementation(tmp); - assert.ok(promise.Thenable.isImplementation(new tmp())); - - class tmpClass {} - assert.ok(!promise.Thenable.isImplementation(new tmpClass())); - promise.Thenable.addImplementation(tmpClass); - assert.ok(promise.Thenable.isImplementation(new tmpClass())); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js deleted file mode 100644 index e68ca28b..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/testutil.js +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const sinon = require('sinon'); - - -class StubError extends Error { - constructor(opt_msg) { - super(opt_msg); - this.name = this.constructor.name; - } -} -exports.StubError = StubError; - -exports.throwStubError = function() { - throw new StubError; -}; - -exports.assertIsStubError = function(value) { - assert.ok(value instanceof StubError, value + ' is not a ' + StubError.name); -}; - -exports.assertIsInstance = function(ctor, value) { - assert.ok(value instanceof ctor, 'Not a ' + ctor.name + ': ' + value); -}; - -function callbackPair(cb, eb) { - if (cb && eb) { - throw new TypeError('can only specify one of callback or errback'); - } - - let callback = cb ? sinon.spy(cb) : sinon.spy(); - let errback = eb ? sinon.spy(eb) : sinon.spy(); - - function assertCallback() { - assert.ok(callback.called, 'callback not called'); - assert.ok(!errback.called, 'errback called'); - if (callback.threw()) { - throw callback.exceptions[0]; - } - } - - function assertErrback() { - assert.ok(!callback.called, 'callback called'); - assert.ok(errback.called, 'errback not called'); - if (errback.threw()) { - throw errback.exceptions[0]; - } - } - - function assertNeither() { - assert.ok(!callback.called, 'callback called'); - assert.ok(!errback.called, 'errback called'); - } - - return { - callback, - errback, - assertCallback, - assertErrback, - assertNeither - }; -} -exports.callbackPair = callbackPair; - - -exports.callbackHelper = function(cb) { - let pair = callbackPair(cb); - let wrapped = pair.callback.bind(null); - wrapped.assertCalled = () => pair.assertCallback(); - wrapped.assertNotCalled = () => pair.assertNeither(); - return wrapped; -}; diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js deleted file mode 100644 index 3226a467..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/until_test.js +++ /dev/null @@ -1,478 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); - -const By = require('../../lib/by').By; -const CommandName = require('../../lib/command').Name; -const error = require('../../lib/error'); -const promise = require('../../lib/promise'); -const until = require('../../lib/until'); -const webdriver = require('../../lib/webdriver'), - WebElement = webdriver.WebElement; - -describe('until', function() { - let driver, executor; - - class TestExecutor { - constructor() { - this.handlers_ = {}; - } - - on(cmd, handler) { - this.handlers_[cmd] = handler; - return this; - } - - execute(cmd) { - let self = this; - return Promise.resolve().then(function() { - if (!self.handlers_[cmd.getName()]) { - throw new error.UnknownCommandError(cmd.getName()); - } - return self.handlers_[cmd.getName()](cmd); - }); - } - } - - function fail(opt_msg) { - throw new assert.AssertionError({message: opt_msg}); - } - - beforeEach(function setUp() { - executor = new TestExecutor(); - driver = new webdriver.WebDriver('session-id', executor); - }); - - describe('ableToSwitchToFrame', function() { - it('failsFastForNonSwitchErrors', function() { - let e = Error('boom'); - executor.on(CommandName.SWITCH_TO_FRAME, function() { - throw e; - }); - return driver.wait(until.ableToSwitchToFrame(0), 100) - .then(fail, (e2) => assert.strictEqual(e2, e)); - }); - - const ELEMENT_ID = 'some-element-id'; - const ELEMENT_INDEX = 1234; - - function onSwitchFrame(expectedId) { - if (typeof expectedId === 'string') { - expectedId = WebElement.buildId(expectedId); - } else { - assert.equal(typeof expectedId, 'number', 'must be string or number'); - } - return cmd => { - assert.deepEqual( - cmd.getParameter('id'), expectedId, 'frame ID not specified'); - return true; - }; - } - - it('byIndex', function() { - executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_INDEX)); - return driver.wait(until.ableToSwitchToFrame(ELEMENT_INDEX), 100); - }); - - it('byWebElement', function() { - executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); - - var el = new webdriver.WebElement(driver, ELEMENT_ID); - return driver.wait(until.ableToSwitchToFrame(el), 100); - }); - - it('byWebElementPromise', function() { - executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); - var el = new webdriver.WebElementPromise(driver, - Promise.resolve(new webdriver.WebElement(driver, ELEMENT_ID))); - return driver.wait(until.ableToSwitchToFrame(el), 100); - }); - - it('byLocator', function() { - executor.on(CommandName.FIND_ELEMENTS, () => [WebElement.buildId(ELEMENT_ID)]); - executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); - return driver.wait(until.ableToSwitchToFrame(By.id('foo')), 100); - }); - - it('byLocator_elementNotInitiallyFound', function() { - let foundResponses = [[], [], [WebElement.buildId(ELEMENT_ID)]]; - executor.on(CommandName.FIND_ELEMENTS, () => foundResponses.shift()); - executor.on(CommandName.SWITCH_TO_FRAME, onSwitchFrame(ELEMENT_ID)); - - return driver.wait(until.ableToSwitchToFrame(By.id('foo')), 2000) - .then(() => assert.deepEqual(foundResponses, [])); - }); - - it('timesOutIfNeverAbletoSwitchFrames', function() { - var count = 0; - executor.on(CommandName.SWITCH_TO_FRAME, function() { - count += 1; - throw new error.NoSuchFrameError; - }); - - return driver.wait(until.ableToSwitchToFrame(0), 100) - .then(fail, function(e) { - assert.ok(count > 0); - assert.ok( - e.message.startsWith('Waiting to be able to switch to frame'), - 'Wrong message: ' + e.message); - }); - }); - }); - - describe('alertIsPresent', function() { - it('failsFastForNonAlertSwitchErrors', function() { - return driver.wait(until.alertIsPresent(), 100).then(fail, function(e) { - assert.ok(e instanceof error.UnknownCommandError); - assert.equal(e.message, CommandName.GET_ALERT_TEXT); - }); - }); - - it('waitsForAlert', function() { - var count = 0; - executor.on(CommandName.GET_ALERT_TEXT, function() { - if (count++ < 3) { - throw new error.NoSuchAlertError; - } else { - return true; - } - }).on(CommandName.DISMISS_ALERT, () => true); - - return driver.wait(until.alertIsPresent(), 1000).then(function(alert) { - assert.equal(count, 4); - return alert.dismiss(); - }); - }); - - // TODO: Remove once GeckoDriver doesn't throw this unwanted error. - // See https://github.com/SeleniumHQ/selenium/pull/2137 - describe('workaround for GeckoDriver', function() { - it('doesNotFailWhenCannotConvertNullToObject', function() { - var count = 0; - executor.on(CommandName.GET_ALERT_TEXT, function() { - if (count++ < 3) { - throw new error.WebDriverError(`can't convert null to object`); - } else { - return true; - } - }).on(CommandName.DISMISS_ALERT, () => true); - - return driver.wait(until.alertIsPresent(), 1000).then(function(alert) { - assert.equal(count, 4); - return alert.dismiss(); - }); - }); - - it('keepsRaisingRegularWebdriverError', function() { - var webDriverError = new error.WebDriverError; - - executor.on(CommandName.GET_ALERT_TEXT, function() { - throw webDriverError; - }); - - return driver.wait(until.alertIsPresent(), 1000).then(function() { - throw new Error('driver did not fail against WebDriverError'); - }, function(error) { - assert.equal(error, webDriverError); - }); - }) - }); - }); - - it('testUntilTitleIs', function() { - var titles = ['foo', 'bar', 'baz']; - executor.on(CommandName.GET_TITLE, () => titles.shift()); - - return driver.wait(until.titleIs('bar'), 3000).then(function() { - assert.deepStrictEqual(titles, ['baz']); - }); - }); - - it('testUntilTitleContains', function() { - var titles = ['foo', 'froogle', 'google']; - executor.on(CommandName.GET_TITLE, () => titles.shift()); - - return driver.wait(until.titleContains('oogle'), 3000).then(function() { - assert.deepStrictEqual(titles, ['google']); - }); - }); - - it('testUntilTitleMatches', function() { - var titles = ['foo', 'froogle', 'aaaabc', 'aabbbc', 'google']; - executor.on(CommandName.GET_TITLE, () => titles.shift()); - - return driver.wait(until.titleMatches(/^a{2,3}b+c$/), 3000) - .then(function() { - assert.deepStrictEqual(titles, ['google']); - }); - }); - - it('testUntilUrlIs', function() { - var urls = ['http://www.foo.com', 'https://boo.com', 'http://docs.yes.com']; - executor.on(CommandName.GET_CURRENT_URL, () => urls.shift()); - - return driver.wait(until.urlIs('https://boo.com'), 3000).then(function() { - assert.deepStrictEqual(urls, ['http://docs.yes.com']); - }); - }); - - it('testUntilUrlContains', function() { - var urls = - ['http://foo.com', 'https://groups.froogle.com', 'http://google.com']; - executor.on(CommandName.GET_CURRENT_URL, () => urls.shift()); - - return driver.wait(until.urlContains('oogle.com'), 3000).then(function() { - assert.deepStrictEqual(urls, ['http://google.com']); - }); - }); - - it('testUntilUrlMatches', function() { - var urls = ['foo', 'froogle', 'aaaabc', 'aabbbc', 'google']; - executor.on(CommandName.GET_CURRENT_URL, () => urls.shift()); - - return driver.wait(until.urlMatches(/^a{2,3}b+c$/), 3000) - .then(function() { - assert.deepStrictEqual(urls, ['google']); - }); - }); - - it('testUntilElementLocated', function() { - var responses = [ - [], - [WebElement.buildId('abc123'), WebElement.buildId('foo')], - ['end'] - ]; - executor.on(CommandName.FIND_ELEMENTS, () => responses.shift()); - - let element = driver.wait(until.elementLocated(By.id('quux')), 2000); - assert.ok(element instanceof webdriver.WebElementPromise); - return element.getId().then(function(id) { - assert.deepStrictEqual(responses, [['end']]); - assert.equal(id, 'abc123'); - }); - }); - - describe('untilElementLocated, elementNeverFound', function() { - function runNoElementFoundTest(locator, locatorStr) { - executor.on(CommandName.FIND_ELEMENTS, () => []); - - function expectedFailure() { - fail('expected condition to timeout'); - } - - return driver.wait(until.elementLocated(locator), 100) - .then(expectedFailure, function(error) { - var expected = 'Waiting for element to be located ' + locatorStr; - var lines = error.message.split(/\n/, 2); - assert.equal(lines[0], expected); - - let regex = /^Wait timed out after \d+ms$/; - assert.ok(regex.test(lines[1]), - `Lines <${lines[1]}> does not match ${regex}`); - }); - } - - it('byLocator', function() { - return runNoElementFoundTest( - By.id('quux'), 'By(css selector, *[id="quux"])'); - }); - - it('byHash', function() { - return runNoElementFoundTest( - {id: 'quux'}, 'By(css selector, *[id="quux"])'); - }); - - it('byFunction', function() { - return runNoElementFoundTest(function() {}, 'by function()'); - }); - }); - - it('testUntilElementsLocated', function() { - var responses = [ - [], - [WebElement.buildId('abc123'), WebElement.buildId('foo')], - ['end'] - ]; - executor.on(CommandName.FIND_ELEMENTS, () => responses.shift()); - - return driver.wait(until.elementsLocated(By.id('quux')), 2000) - .then(function(els) { - return Promise.all(els.map(e => e.getId())); - }).then(function(ids) { - assert.deepStrictEqual(responses, [['end']]); - assert.equal(ids.length, 2); - assert.equal(ids[0], 'abc123'); - assert.equal(ids[1], 'foo'); - }); - }); - - describe('untilElementsLocated, noElementsFound', function() { - function runNoElementsFoundTest(locator, locatorStr) { - executor.on(CommandName.FIND_ELEMENTS, () => []); - - function expectedFailure() { - fail('expected condition to timeout'); - } - - return driver.wait(until.elementsLocated(locator), 100) - .then(expectedFailure, function(error) { - var expected = - 'Waiting for at least one element to be located ' + locatorStr; - var lines = error.message.split(/\n/, 2); - assert.equal(lines[0], expected); - - let regex = /^Wait timed out after \d+ms$/; - assert.ok(regex.test(lines[1]), - `Lines <${lines[1]}> does not match ${regex}`); - }); - } - - it('byLocator', function() { - return runNoElementsFoundTest( - By.id('quux'), 'By(css selector, *[id="quux"])'); - }); - - it('byHash', function() { - return runNoElementsFoundTest( - {id: 'quux'}, 'By(css selector, *[id="quux"])'); - }); - - it('byFunction', function() { - return runNoElementsFoundTest(function() {}, 'by function()'); - }); - }); - - it('testUntilStalenessOf', function() { - let count = 0; - executor.on(CommandName.GET_ELEMENT_TAG_NAME, function() { - while (count < 3) { - count += 1; - return 'body'; - } - throw new error.StaleElementReferenceError('now stale'); - }); - - var el = new webdriver.WebElement(driver, {ELEMENT: 'foo'}); - return driver.wait(until.stalenessOf(el), 2000) - .then(() => assert.equal(count, 3)); - }); - - describe('element state conditions', function() { - function runElementStateTest(predicate, command, responses, var_args) { - let original = new webdriver.WebElement(driver, 'foo'); - let predicateArgs = [original]; - if (arguments.length > 3) { - predicateArgs = predicateArgs.concat(arguments[1]); - command = arguments[2]; - responses = arguments[3]; - } - - assert.ok(responses.length > 1); - - responses = responses.concat(['end']); - executor.on(command, () => responses.shift()); - - let result = driver.wait(predicate.apply(null, predicateArgs), 2000); - assert.ok(result instanceof webdriver.WebElementPromise); - return result.then(function(value) { - assert.ok(value instanceof webdriver.WebElement); - assert.ok(!(value instanceof webdriver.WebElementPromise)); - return value.getId(); - }).then(function(id) { - assert.equal('foo', id); - assert.deepStrictEqual(responses, ['end']); - }); - } - - it('elementIsVisible', function() { - return runElementStateTest( - until.elementIsVisible, - CommandName.IS_ELEMENT_DISPLAYED, [false, false, true]); - }); - - it('elementIsNotVisible', function() { - return runElementStateTest( - until.elementIsNotVisible, - CommandName.IS_ELEMENT_DISPLAYED, [true, true, false]); - }); - - it('elementIsEnabled', function() { - return runElementStateTest( - until.elementIsEnabled, - CommandName.IS_ELEMENT_ENABLED, [false, false, true]); - }); - - it('elementIsDisabled', function() { - return runElementStateTest( - until.elementIsDisabled, - CommandName.IS_ELEMENT_ENABLED, [true, true, false]); - }); - - it('elementIsSelected', function() { - return runElementStateTest( - until.elementIsSelected, - CommandName.IS_ELEMENT_SELECTED, [false, false, true]); - }); - - it('elementIsNotSelected', function() { - return runElementStateTest( - until.elementIsNotSelected, - CommandName.IS_ELEMENT_SELECTED, [true, true, false]); - }); - - it('elementTextIs', function() { - return runElementStateTest( - until.elementTextIs, 'foobar', - CommandName.GET_ELEMENT_TEXT, - ['foo', 'fooba', 'foobar']); - }); - - it('elementTextContains', function() { - return runElementStateTest( - until.elementTextContains, 'bar', - CommandName.GET_ELEMENT_TEXT, - ['foo', 'foobaz', 'foobarbaz']); - }); - - it('elementTextMatches', function() { - return runElementStateTest( - until.elementTextMatches, /fo+bar{3}/, - CommandName.GET_ELEMENT_TEXT, - ['foo', 'foobar', 'fooobarrr']); - }); - }); - - describe('WebElementCondition', function() { - it('fails if wait completes with a non-WebElement value', function() { - let result = driver.wait( - new webdriver.WebElementCondition('testing', () => 123), 1000); - - return result.then( - () => assert.fail('expected to fail'), - function(e) { - assert.ok(e instanceof TypeError); - assert.equal( - 'WebElementCondition did not resolve to a WebElement: ' - + '[object Number]', - e.message); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js b/test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js deleted file mode 100644 index cdb0aef7..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/lib/webdriver_test.js +++ /dev/null @@ -1,2311 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const testutil = require('./testutil'); - -const By = require('../../lib/by').By; -const Capabilities = require('../../lib/capabilities').Capabilities; -const Executor = require('../../lib/command').Executor; -const CName = require('../../lib/command').Name; -const error = require('../../lib/error'); -const Button = require('../../lib/input').Button; -const Key = require('../../lib/input').Key; -const logging = require('../../lib/logging'); -const Session = require('../../lib/session').Session; -const promise = require('../../lib/promise'); -const {enablePromiseManager, promiseManagerSuite} = require('../../lib/test/promise'); -const until = require('../../lib/until'); -const Alert = require('../../lib/webdriver').Alert; -const AlertPromise = require('../../lib/webdriver').AlertPromise; -const UnhandledAlertError = require('../../lib/webdriver').UnhandledAlertError; -const WebDriver = require('../../lib/webdriver').WebDriver; -const WebElement = require('../../lib/webdriver').WebElement; -const WebElementPromise = require('../../lib/webdriver').WebElementPromise; - -const assert = require('assert'); -const sinon = require('sinon'); - -const SESSION_ID = 'test_session_id'; - -// Aliases for readability. -const NativePromise = Promise; -const StubError = testutil.StubError; -const assertIsInstance = testutil.assertIsInstance; -const assertIsStubError = testutil.assertIsStubError; -const throwStubError = testutil.throwStubError; -const fail = (msg) => assert.fail(msg); - -describe('WebDriver', function() { - const LOG = logging.getLogger('webdriver.test'); - - // before(function() { - // logging.getLogger('webdriver').setLevel(logging.Level.ALL); - // logging.installConsoleHandler(); - // }); - - // after(function() { - // logging.getLogger('webdriver').setLevel(null); - // logging.removeConsoleHandler(); - // }); - - var driver; - var flow; - var uncaughtExceptions; - - beforeEach(function setUp() { - flow = promise.controlFlow(); - uncaughtExceptions = []; - flow.on('uncaughtException', onUncaughtException); - }); - - afterEach(function tearDown() { - if (!promise.USE_PROMISE_MANAGER) { - return; - } - return waitForIdle(flow).then(function() { - assert.deepEqual([], uncaughtExceptions); - flow.reset(); - }); - }); - - function onUncaughtException(e) { - uncaughtExceptions.push(e); - } - - function defer() { - let d = {}; - let promise = new Promise((resolve, reject) => { - Object.assign(d, {resolve, reject}); - }); - d.promise = promise; - return d; - } - - function waitForIdle(opt_flow) { - if (!promise.USE_PROMISE_MANAGER) { - return Promise.resolve(); - } - var theFlow = opt_flow || flow; - return new Promise(function(fulfill, reject) { - if (theFlow.isIdle()) { - fulfill(); - return; - } - theFlow.once('idle', fulfill); - theFlow.once('uncaughtException', reject); - }); - } - - function waitForAbort(opt_flow, opt_n) { - var n = opt_n || 1; - var theFlow = opt_flow || flow; - theFlow.removeAllListeners( - promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION); - return new Promise(function(fulfill, reject) { - theFlow.once('idle', function() { - reject(Error('expected flow to report an unhandled error')); - }); - - var errors = []; - theFlow.on('uncaughtException', onError); - function onError(e) { - errors.push(e); - if (errors.length === n) { - theFlow.removeListener('uncaughtException', onError); - fulfill(n === 1 ? errors[0] : errors); - } - } - }); - } - - function expectedError(ctor, message) { - return function(e) { - assertIsInstance(ctor, e); - assert.equal(message, e.message); - }; - } - - class Expectation { - constructor(executor, name, opt_parameters) { - this.executor_ = executor; - this.name_ = name; - this.times_ = 1; - this.sessionId_ = SESSION_ID; - this.check_ = null; - this.toDo_ = null; - this.withParameters(opt_parameters || {}); - } - - anyTimes() { - this.times_ = Infinity; - return this; - } - - times(n) { - this.times_ = n; - return this; - } - - withParameters(parameters) { - this.parameters_ = parameters; - if (this.name_ !== CName.NEW_SESSION) { - this.parameters_['sessionId'] = this.sessionId_; - } - return this; - } - - andReturn(code, opt_value) { - this.toDo_ = function(command) { - LOG.info('executing ' + command.getName() + '; returning ' + code); - return Promise.resolve(opt_value !== void(0) ? opt_value : null); - }; - return this; - } - - andReturnSuccess(opt_value) { - this.toDo_ = function(command) { - LOG.info('executing ' + command.getName() + '; returning success'); - return Promise.resolve(opt_value !== void(0) ? opt_value : null); - }; - return this; - } - - andReturnError(error) { - if (typeof error === 'number') { - throw Error('need error type'); - } - this.toDo_ = function(command) { - LOG.info('executing ' + command.getName() + '; returning failure'); - return Promise.reject(error); - }; - return this; - } - - expect(name, opt_parameters) { - this.end(); - return this.executor_.expect(name, opt_parameters); - } - - end() { - if (!this.toDo_) { - this.andReturnSuccess(null); - } - return this.executor_; - } - - execute(command) { - assert.deepEqual(this.parameters_, command.getParameters()); - return this.toDo_(command); - } - } - - class FakeExecutor { - constructor() { - this.commands_ = new Map; - } - - execute(command) { - let expectations = this.commands_.get(command.getName()); - if (!expectations || !expectations.length) { - assert.fail('unexpected command: ' + command.getName()); - return; - } - - let next = expectations[0]; - let result = next.execute(command); - if (next.times_ != Infinity) { - next.times_ -= 1; - if (!next.times_) { - expectations.shift(); - } - } - return result; - } - - expect(commandName, opt_parameters) { - if (!this.commands_.has(commandName)) { - this.commands_.set(commandName, []); - } - let e = new Expectation(this, commandName, opt_parameters); - this.commands_.get(commandName).push(e); - return e; - } - - createDriver(opt_session) { - let session = opt_session || new Session(SESSION_ID, {}); - return new WebDriver(session, this); - } - } - - - ///////////////////////////////////////////////////////////////////////////// - // - // Tests - // - ///////////////////////////////////////////////////////////////////////////// - - - describe('testAttachToSession', function() { - it('sessionIsAvailable', function() { - let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); - let executor = new FakeExecutor(). - expect(CName.DESCRIBE_SESSION). - withParameters({'sessionId': SESSION_ID}). - andReturnSuccess(aSession). - end(); - - let driver = WebDriver.attachToSession(executor, SESSION_ID); - return driver.getSession().then(v => assert.strictEqual(v, aSession)); - }); - - it('failsToGetSessionInfo', function() { - let e = new Error('boom'); - let executor = new FakeExecutor(). - expect(CName.DESCRIBE_SESSION). - withParameters({'sessionId': SESSION_ID}). - andReturnError(e). - end(); - - let driver = WebDriver.attachToSession(executor, SESSION_ID); - return driver.getSession() - .then(() => assert.fail('should have failed!'), - (actual) => assert.strictEqual(actual, e)); - }); - - it('remote end does not recognize DESCRIBE_SESSION command', function() { - let e = new error.UnknownCommandError; - let executor = new FakeExecutor(). - expect(CName.DESCRIBE_SESSION). - withParameters({'sessionId': SESSION_ID}). - andReturnError(e). - end(); - - let driver = WebDriver.attachToSession(executor, SESSION_ID); - return driver.getSession().then(session => { - assert.ok(session instanceof Session); - assert.strictEqual(session.getId(), SESSION_ID); - assert.equal(session.getCapabilities().size, 0); - }); - }); - - it('usesActiveFlowByDefault', function() { - let executor = new FakeExecutor(). - expect(CName.DESCRIBE_SESSION). - withParameters({'sessionId': SESSION_ID}). - andReturnSuccess({}). - end(); - - var driver = WebDriver.attachToSession(executor, SESSION_ID); - assert.equal(driver.controlFlow(), promise.controlFlow()); - - return waitForIdle(driver.controlFlow()); - }); - - enablePromiseManager(() => { - it('canAttachInCustomFlow', function() { - let executor = new FakeExecutor(). - expect(CName.DESCRIBE_SESSION). - withParameters({'sessionId': SESSION_ID}). - andReturnSuccess({}). - end(); - - var otherFlow = new promise.ControlFlow(); - var driver = WebDriver.attachToSession(executor, SESSION_ID, otherFlow); - assert.equal(otherFlow, driver.controlFlow()); - assert.notEqual(otherFlow, promise.controlFlow()); - - return waitForIdle(otherFlow); - }); - }); - }); - - describe('testCreateSession', function() { - it('happyPathWithCapabilitiesHashObject', function() { - let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({ - 'desiredCapabilities': {'browserName': 'firefox'} - }). - andReturnSuccess(aSession). - end(); - - var driver = WebDriver.createSession(executor, { - 'browserName': 'firefox' - }); - return driver.getSession().then(v => assert.strictEqual(v, aSession)); - }); - - it('happyPathWithCapabilitiesInstance', function() { - let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({'desiredCapabilities': {'browserName': 'firefox'}}). - andReturnSuccess(aSession). - end(); - - var driver = WebDriver.createSession(executor, Capabilities.firefox()); - return driver.getSession().then(v => assert.strictEqual(v, aSession)); - }); - - it('handles desired and required capabilities', function() { - let aSession = new Session(SESSION_ID, {'browserName': 'firefox'}); - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({ - 'desiredCapabilities': {'foo': 'bar'}, - 'requiredCapabilities': {'bim': 'baz'} - }). - andReturnSuccess(aSession). - end(); - - let desired = new Capabilities().set('foo', 'bar'); - let required = new Capabilities().set('bim', 'baz'); - var driver = WebDriver.createSession(executor, {desired, required}); - return driver.getSession().then(v => assert.strictEqual(v, aSession)); - }); - - it('failsToCreateSession', function() { - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({'desiredCapabilities': {'browserName': 'firefox'}}). - andReturnError(new StubError()). - end(); - - var driver = - WebDriver.createSession(executor, {'browserName': 'firefox'}); - return driver.getSession().then(fail, assertIsStubError); - }); - - it('invokes quit callback if it fails to create a session', function() { - let called = false; - let executor = new FakeExecutor() - .expect(CName.NEW_SESSION) - .withParameters({'desiredCapabilities': {'browserName': 'firefox'}}) - .andReturnError(new StubError()) - .end(); - - var driver = - WebDriver.createSession(executor, {'browserName': 'firefox'}, - null, () => called = true); - return driver.getSession().then(fail, err => { - assert.ok(called); - assertIsStubError(err); - }); - }); - - it('usesActiveFlowByDefault', function() { - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({'desiredCapabilities': {}}). - andReturnSuccess(new Session(SESSION_ID)). - end(); - - var driver = WebDriver.createSession(executor, {}); - assert.equal(promise.controlFlow(), driver.controlFlow()); - - return waitForIdle(driver.controlFlow()); - }); - - enablePromiseManager(() => { - it('canCreateInCustomFlow', function() { - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({'desiredCapabilities': {}}). - andReturnSuccess({}). - end(); - - var otherFlow = new promise.ControlFlow(); - var driver = WebDriver.createSession(executor, {}, otherFlow); - assert.equal(otherFlow, driver.controlFlow()); - assert.notEqual(otherFlow, promise.controlFlow()); - - return waitForIdle(otherFlow); - }); - - describe('creation failures bubble up in control flow', function() { - function runTest(...args) { - let executor = new FakeExecutor() - .expect(CName.NEW_SESSION) - .withParameters({'desiredCapabilities': {'browserName': 'firefox'}}) - .andReturnError(new StubError()) - .end(); - - WebDriver.createSession( - executor, {'browserName': 'firefox'}, ...args); - return waitForAbort().then(assertIsStubError); - } - - it('no onQuit callback', () => runTest()); - it('has onQuit callback', () => runTest(null, null, function() {})); - - it('onQuit callback failure suppress creation failure', function() { - let e = new Error('hi!'); - let executor = new FakeExecutor() - .expect(CName.NEW_SESSION) - .withParameters({'desiredCapabilities': {'browserName': 'firefox'}}) - .andReturnError(new StubError()) - .end(); - - WebDriver.createSession( - executor, {'browserName': 'firefox'}, null, () => {throw e}); - return waitForAbort().then(err => assert.strictEqual(err, e)); - }); - }); - }); - }); - - it('testDoesNotExecuteCommandIfSessionDoesNotResolve', function() { - var session = Promise.reject(new StubError); - return new FakeExecutor().createDriver(session) - .getTitle() - .then(_ => assert.fail('should have failed'), assertIsStubError); - }); - - it('testCommandReturnValuesArePassedToFirstCallback', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE).andReturnSuccess('Google Search'). - end(); - - var driver = executor.createDriver(); - return driver.getTitle() - .then(title => assert.equal('Google Search', title)); - }); - - it('testStopsCommandExecutionWhenAnErrorOccurs', function() { - let e = new error.NoSuchWindowError('window not found'); - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW). - withParameters({ - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(e). - end(); - - let driver = executor.createDriver(); - return driver.switchTo().window('foo') - .then( - _ => driver.getTitle(), // mock should blow if this gets executed - v => assert.strictEqual(v, e)); - }); - - it('testCanSuppressCommandFailures', function() { - let e = new error.NoSuchWindowError('window not found'); - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW). - withParameters({ - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(e). - expect(CName.GET_TITLE). - andReturnSuccess('Google Search'). - end(); - - var driver = executor.createDriver(); - driver.switchTo().window('foo') - .catch(v => assert.strictEqual(v, e)); - driver.getTitle(); - return waitForIdle(); - }); - - it('testErrorsPropagateUpToTheRunningApplication', function() { - let e = new error.NoSuchWindowError('window not found'); - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW). - withParameters({ - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(e). - end(); - - return executor.createDriver() - .switchTo().window('foo') - .then(_ => assert.fail(), v => assert.strictEqual(v, e)); - }); - - it('testErrbacksThatReturnErrorsStillSwitchToCallbackChain', function() { - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW). - withParameters({ - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(new error.NoSuchWindowError('window not found')). - end(); - - var driver = executor.createDriver(); - return driver.switchTo().window('foo'). - catch(function() { return new StubError; }); - then(assertIsStubError, () => assert.fail()); - }); - - it('testErrbacksThrownCanOverrideOriginalError', function() { - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW, { - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(new error.NoSuchWindowError('window not found')). - end(); - - var driver = executor.createDriver(); - return driver.switchTo().window('foo') - .catch(throwStubError) - .then(assert.fail, assertIsStubError); - }); - - it('testReportsErrorWhenExecutingCommandsAfterExecutingAQuit', function() { - let executor = new FakeExecutor(). - expect(CName.QUIT). - end(); - - let verifyError = expectedError( - error.NoSuchSessionError, - 'This driver instance does not have a valid session ID ' + - '(did you call WebDriver.quit()?) and may no longer be used.'); - - let driver = executor.createDriver(); - return driver.quit() - .then(_ => driver.get('http://www.google.com')) - .then(assert.fail, verifyError); - }); - - it('testCallbackCommandsExecuteBeforeNextCommand', function() { - let executor = new FakeExecutor(). - expect(CName.GET_CURRENT_URL). - expect(CName.GET, {'url': 'http://www.google.com'}). - expect(CName.CLOSE). - expect(CName.GET_TITLE). - end(); - - var driver = executor.createDriver(); - driver.getCurrentUrl().then(function() { - driver.get('http://www.google.com').then(function() { - driver.close(); - }); - }); - driver.getTitle(); - - return waitForIdle(); - }); - - enablePromiseManager(() => { - it('testEachCallbackFrameRunsToCompletionBeforeTheNext', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE). - expect(CName.GET_CURRENT_URL). - expect(CName.GET_CURRENT_WINDOW_HANDLE). - expect(CName.CLOSE). - expect(CName.QUIT). - end(); - - var driver = executor.createDriver(); - driver.getTitle(). - // Everything in this callback... - then(function() { - driver.getCurrentUrl(); - driver.getWindowHandle(); - }). - // ...should execute before everything in this callback. - then(function() { - driver.close(); - }); - // This should execute after everything above - driver.quit(); - - return waitForIdle(); - }); - }); - - describe('returningAPromise', function() { - it('fromACallback', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE). - expect(CName.GET_CURRENT_URL). - andReturnSuccess('http://www.google.com'). - end(); - - var driver = executor.createDriver(); - return driver.getTitle(). - then(function() { - return driver.getCurrentUrl(); - }). - then(function(value) { - assert.equal('http://www.google.com', value); - }); - }); - - it('fromAnErrbackSuppressesTheError', function() { - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW, { - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(new StubError()). - expect(CName.GET_CURRENT_URL). - andReturnSuccess('http://www.google.com'). - end(); - - var driver = executor.createDriver(); - return driver.switchTo().window('foo'). - catch(function(e) { - assertIsStubError(e); - return driver.getCurrentUrl(); - }). - then(url => assert.equal('http://www.google.com', url)); - }); - }); - - describe('customFunctions', function() { - it('returnsANonPromiseValue', function() { - var driver = new FakeExecutor().createDriver(); - return driver.call(() => 'abc123').then(function(value) { - assert.equal('abc123', value); - }); - }); - - enablePromiseManager(() => { - it('executionOrderWithCustomFunctions', function() { - var msg = []; - let executor = new FakeExecutor(). - expect(CName.GET_TITLE).andReturnSuccess('cheese '). - expect(CName.GET_CURRENT_URL).andReturnSuccess('tasty'). - end(); - - var driver = executor.createDriver(); - - var pushMsg = msg.push.bind(msg); - driver.getTitle().then(pushMsg); - driver.call(() => 'is ').then(pushMsg); - driver.getCurrentUrl().then(pushMsg); - driver.call(() => '!').then(pushMsg); - - return waitForIdle().then(function() { - assert.equal('cheese is tasty!', msg.join('')); - }); - }); - }); - - it('passingArgumentsToACustomFunction', function() { - var add = function(a, b) { - return a + b; - }; - var driver = new FakeExecutor().createDriver(); - return driver.call(add, null, 1, 2).then(function(value) { - assert.equal(3, value); - }); - }); - - it('passingPromisedArgumentsToACustomFunction', function() { - var promisedArg = Promise.resolve(2); - var add = function(a, b) { - return a + b; - }; - var driver = new FakeExecutor().createDriver(); - return driver.call(add, null, 1, promisedArg).then(function(value) { - assert.equal(3, value); - }); - }); - - it('passingArgumentsAndScopeToACustomFunction', function() { - function Foo(name) { - this.name = name; - } - Foo.prototype.getName = function() { - return this.name; - }; - var foo = new Foo('foo'); - - var driver = new FakeExecutor().createDriver(); - return driver.call(foo.getName, foo).then(function(value) { - assert.equal('foo', value); - }); - }); - - it('customFunctionThrowsAnError', function() { - var driver = new FakeExecutor().createDriver(); - return driver.call(throwStubError).then(fail, assertIsStubError); - }); - - it('customFunctionSchedulesCommands', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE). - expect(CName.CLOSE). - expect(CName.QUIT). - end(); - - var driver = executor.createDriver(); - driver.call(function() { - driver.getTitle(); - driver.close(); - }); - driver.quit(); - return waitForIdle(); - }); - - it('returnsATaskResultAfterSchedulingAnother', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE). - andReturnSuccess('Google Search'). - expect(CName.CLOSE). - end(); - - var driver = executor.createDriver(); - return driver.call(function() { - var title = driver.getTitle(); - driver.close(); - return title; - }).then(function(title) { - assert.equal('Google Search', title); - }); - }); - - it('hasANestedCommandThatFails', function() { - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW, { - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(new StubError()). - end(); - - var driver = executor.createDriver(); - return driver.call(function() { - return driver.switchTo().window('foo'); - }).then(fail, assertIsStubError); - }); - - enablePromiseManager(() => { - it('doesNotCompleteUntilReturnedPromiseIsResolved', function() { - var order = []; - var driver = new FakeExecutor().createDriver(); - - var d = promise.defer(); - d.promise.then(function() { - order.push('b'); - }); - - driver.call(function() { - order.push('a'); - return d.promise; - }); - driver.call(function() { - order.push('c'); - }); - - // timeout to ensure the first function starts its execution before we - // trigger d's callbacks. - return new Promise(f => setTimeout(f, 0)).then(function() { - assert.deepEqual(['a'], order); - d.fulfill(); - return waitForIdle().then(function() { - assert.deepEqual(['a', 'b', 'c'], order); - }); - }); - }); - }); - - it('returnsADeferredAction', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE).andReturnSuccess('Google'). - end(); - - var driver = executor.createDriver(); - driver.call(function() { - return driver.getTitle(); - }).then(function(title) { - assert.equal('Google', title); - }); - return waitForIdle(); - }); - }); - - describe('nestedCommands', function() { - enablePromiseManager(() => { - it('commandExecutionOrder', function() { - var msg = []; - var driver = new FakeExecutor().createDriver(); - driver.call(msg.push, msg, 'a'); - driver.call(function() { - driver.call(msg.push, msg, 'c'); - driver.call(function() { - driver.call(msg.push, msg, 'e'); - driver.call(msg.push, msg, 'f'); - }); - driver.call(msg.push, msg, 'd'); - }); - driver.call(msg.push, msg, 'b'); - return waitForIdle().then(function() { - assert.equal('acefdb', msg.join('')); - }); - }); - - it('basicUsage', function() { - var msg = []; - var driver = new FakeExecutor().createDriver(); - var pushMsg = msg.push.bind(msg); - driver.call(() => 'cheese ').then(pushMsg); - driver.call(function() { - driver.call(() => 'is ').then(pushMsg); - driver.call(() => 'tasty').then(pushMsg); - }); - driver.call(() => '!').then(pushMsg); - return waitForIdle().then(function() { - assert.equal('cheese is tasty!', msg.join('')); - }); - }); - - it('normalCommandAfterNestedCommandThatReturnsAnAction', function() { - var msg = []; - let executor = new FakeExecutor(). - expect(CName.CLOSE). - end(); - var driver = executor.createDriver(); - driver.call(function() { - return driver.call(function() { - msg.push('a'); - return driver.call(() => 'foobar'); - }); - }); - driver.close().then(function() { - msg.push('b'); - }); - return waitForIdle().then(function() { - assert.equal('ab', msg.join('')); - }); - }); - }); - - it('canReturnValueFromNestedFunction', function() { - var driver = new FakeExecutor().createDriver(); - return driver.call(function() { - return driver.call(function() { - return driver.call(() => 'foobar'); - }); - }).then(function(value) { - assert.equal('foobar', value); - }); - }); - - it('errorsBubbleUp_caught', function() { - var driver = new FakeExecutor().createDriver(); - var result = driver.call(function() { - return driver.call(function() { - return driver.call(throwStubError); - }); - }).then(fail, assertIsStubError); - return Promise.all([waitForIdle(), result]); - }); - - it('errorsBubbleUp_uncaught', function() { - var driver = new FakeExecutor().createDriver(); - return driver.call(function() { - return driver.call(function() { - return driver.call(throwStubError); - }); - }) - .then(_ => assert.fail('should have failed'), assertIsStubError); - }); - - it('canScheduleCommands', function() { - let executor = new FakeExecutor(). - expect(CName.GET_TITLE). - expect(CName.CLOSE). - end(); - - var driver = executor.createDriver(); - driver.call(function() { - driver.call(function() { - driver.getTitle(); - }); - driver.close(); - }); - return waitForIdle(); - }); - }); - - describe('WebElementPromise', function() { - let driver = new FakeExecutor().createDriver(); - - it('resolvesWhenUnderlyingElementDoes', function() { - let el = new WebElement(driver, {'ELEMENT': 'foo'}); - return new WebElementPromise(driver, Promise.resolve(el)) - .then(e => assert.strictEqual(e, el)); - }); - - it('resolvesBeforeCallbacksOnWireValueTrigger', function() { - var el = defer(); - - var element = new WebElementPromise(driver, el.promise); - var messages = []; - - let steps = [ - element.then(_ => messages.push('element resolved')), - element.getId().then(_ => messages.push('wire value resolved')) - ]; - - el.resolve(new WebElement(driver, {'ELEMENT': 'foo'})); - return Promise.all(steps).then(function() { - assert.deepEqual([ - 'element resolved', - 'wire value resolved' - ], messages); - }); - }); - - it('isRejectedIfUnderlyingIdIsRejected', function() { - let element = - new WebElementPromise(driver, Promise.reject(new StubError)); - return element.then(fail, assertIsStubError); - }); - }); - - describe('executeScript', function() { - it('nullReturnValue', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return document.body;', - 'args': [] - }). - andReturnSuccess(null). - end(); - - var driver = executor.createDriver(); - return driver.executeScript('return document.body;') - .then((result) => assert.equal(null, result)); - }); - - it('primitiveReturnValue', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return document.body;', - 'args': [] - }). - andReturnSuccess(123). - end(); - - var driver = executor.createDriver(); - return driver.executeScript('return document.body;') - .then((result) => assert.equal(123, result)); - }); - - it('webElementReturnValue', function() { - var json = WebElement.buildId('foo'); - - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return document.body;', - 'args': [] - }). - andReturnSuccess(json). - end(); - - var driver = executor.createDriver(); - return driver.executeScript('return document.body;') - .then((element) => element.getId()) - .then((id) => assert.equal(id, 'foo')); - }); - - it('arrayReturnValue', function() { - var json = [WebElement.buildId('foo')]; - - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return document.body;', - 'args': [] - }). - andReturnSuccess(json). - end(); - - var driver = executor.createDriver(); - return driver.executeScript('return document.body;') - .then(function(array) { - assert.equal(1, array.length); - return array[0].getId(); - }) - .then((id) => assert.equal('foo', id)); - }); - - it('objectReturnValue', function() { - var json = {'foo': WebElement.buildId('foo')}; - - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return document.body;', - 'args': [] - }). - andReturnSuccess(json). - end(); - - var driver = executor.createDriver(); - var callback; - return driver.executeScript('return document.body;') - .then((obj) => obj['foo'].getId()) - .then((id) => assert.equal(id, 'foo')); - }); - - it('scriptAsFunction', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return (' + function() {} + - ').apply(null, arguments);', - 'args': [] - }). - andReturnSuccess(null). - end(); - - var driver = executor.createDriver(); - return driver.executeScript(function() {}); - }); - - it('simpleArgumentConversion', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return 1;', - 'args': ['abc', 123, true, [123, {'foo': 'bar'}]] - }). - andReturnSuccess(null). - end(); - - var driver = executor.createDriver(); - return driver.executeScript( - 'return 1;', 'abc', 123, true, [123, {'foo': 'bar'}]); - }); - - it('webElementArgumentConversion', function() { - var elementJson = WebElement.buildId('fefifofum'); - - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return 1;', - 'args': [elementJson] - }). - andReturnSuccess(null). - end(); - - var driver = executor.createDriver(); - return driver.executeScript('return 1;', - new WebElement(driver, 'fefifofum')); - }); - - it('webElementPromiseArgumentConversion', function() { - var elementJson = WebElement.buildId('bar'); - - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {'using': 'css selector', 'value': '*[id="foo"]'}). - andReturnSuccess(elementJson). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return 1;', - 'args': [elementJson] - }). - andReturnSuccess(null). - end(); - - var driver = executor.createDriver(); - var element = driver.findElement(By.id('foo')); - return driver.executeScript('return 1;', element); - }); - - it('argumentConversion', function() { - var elementJson = WebElement.buildId('fefifofum'); - - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'return 1;', - 'args': ['abc', 123, true, elementJson, [123, {'foo': 'bar'}]] - }). - andReturnSuccess(null). - end(); - - var driver = executor.createDriver(); - var element = new WebElement(driver, 'fefifofum'); - return driver.executeScript('return 1;', - 'abc', 123, true, element, [123, {'foo': 'bar'}]); - }); - - it('scriptReturnsAnError', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT). - withParameters({ - 'script': 'throw Error(arguments[0]);', - 'args': ['bam'] - }). - andReturnError(new StubError). - end(); - var driver = executor.createDriver(); - return driver.executeScript('throw Error(arguments[0]);', 'bam'). - then(fail, assertIsStubError); - }); - - it('failsIfArgumentIsARejectedPromise', function() { - let executor = new FakeExecutor(); - - var arg = Promise.reject(new StubError); - arg.catch(function() {}); // Suppress default handler. - - var driver = executor.createDriver(); - return driver.executeScript(function() {}, arg). - then(fail, assertIsStubError); - }); - }); - - describe('executeAsyncScript', function() { - it('failsIfArgumentIsARejectedPromise', function() { - var arg = Promise.reject(new StubError); - arg.catch(function() {}); // Suppress default handler. - - var driver = new FakeExecutor().createDriver(); - return driver.executeAsyncScript(function() {}, arg). - then(fail, assertIsStubError); - }); - }); - - describe('findElement', function() { - it('elementNotFound', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnError(new StubError). - end(); - - var driver = executor.createDriver(); - return driver.findElement(By.id('foo')) - .then(assert.fail, assertIsStubError); - }); - - it('elementNotFoundInACallback', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnError(new StubError). - end(); - - var driver = executor.createDriver(); - return Promise.resolve() - .then(_ => driver.findElement(By.id('foo'))) - .then(assert.fail, assertIsStubError); - }); - - it('elementFound', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnSuccess(WebElement.buildId('bar')). - expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('bar')}). - andReturnSuccess(). - end(); - - var driver = executor.createDriver(); - var element = driver.findElement(By.id('foo')); - element.click(); - return waitForIdle(); - }); - - it('canUseElementInCallback', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnSuccess(WebElement.buildId('bar')). - expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('bar')}). - andReturnSuccess(). - end(); - - var driver = executor.createDriver(); - driver.findElement(By.id('foo')).then(function(element) { - element.click(); - }); - return waitForIdle(); - }); - - it('byJs', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, { - 'script': 'return document.body', - 'args': [] - }). - andReturnSuccess(WebElement.buildId('bar')). - expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('bar')}). - end(); - - var driver = executor.createDriver(); - var element = driver.findElement(By.js('return document.body')); - element.click(); // just to make sure - return waitForIdle(); - }); - - it('byJs_returnsNonWebElementValue', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, {'script': 'return 123', 'args': []}). - andReturnSuccess(123). - end(); - - var driver = executor.createDriver(); - return driver.findElement(By.js('return 123')) - .then(assert.fail, function(e) { - assertIsInstance(TypeError, e); - assert.equal( - 'Custom locator did not return a WebElement', e.message); - }); - }); - - it('byJs_canPassArguments', function() { - var script = 'return document.getElementsByTagName(arguments[0]);'; - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, { - 'script': script, - 'args': ['div'] - }). - andReturnSuccess(WebElement.buildId('one')). - end(); - var driver = executor.createDriver(); - driver.findElement(By.js(script, 'div')); - return waitForIdle(); - }); - - it('customLocator', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENTS, {'using': 'css selector', 'value': 'a'}). - andReturnSuccess([ - WebElement.buildId('foo'), - WebElement.buildId('bar')]). - expect(CName.CLICK_ELEMENT, {'id': WebElement.buildId('foo')}). - andReturnSuccess(). - end(); - - var driver = executor.createDriver(); - var element = driver.findElement(function(d) { - assert.equal(driver, d); - return d.findElements(By.tagName('a')); - }); - return element.click(); - }); - - it('customLocatorThrowsIfresultIsNotAWebElement', function() { - var driver = new FakeExecutor().createDriver(); - return driver.findElement(_ => 1) - .then(assert.fail, function(e) { - assertIsInstance(TypeError, e); - assert.equal( - 'Custom locator did not return a WebElement', e.message); - }); - }); - }); - - describe('findElements', function() { - it('returnsMultipleElements', function() { - var ids = ['foo', 'bar', 'baz']; - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENTS, {'using':'css selector', 'value':'a'}). - andReturnSuccess(ids.map(WebElement.buildId)). - end(); - - var driver = executor.createDriver(); - return driver.findElements(By.tagName('a')) - .then(function(elements) { - return promise.all(elements.map(function(e) { - assert.ok(e instanceof WebElement); - return e.getId(); - })); - }) - .then((actual) => assert.deepEqual(ids, actual)); - }); - - it('byJs', function() { - var ids = ['foo', 'bar', 'baz']; - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, { - 'script': 'return document.getElementsByTagName("div");', - 'args': [] - }). - andReturnSuccess(ids.map(WebElement.buildId)). - end(); - - var driver = executor.createDriver(); - - return driver. - findElements(By.js('return document.getElementsByTagName("div");')). - then(function(elements) { - return promise.all(elements.map(function(e) { - assert.ok(e instanceof WebElement); - return e.getId(); - })); - }). - then((actual) => assert.deepEqual(ids, actual)); - }); - - it('byJs_filtersOutNonWebElementResponses', function() { - var ids = ['foo', 'bar', 'baz']; - var json = [ - WebElement.buildId(ids[0]), - 123, - 'a', - false, - WebElement.buildId(ids[1]), - {'not a web element': 1}, - WebElement.buildId(ids[2]) - ]; - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, { - 'script': 'return document.getElementsByTagName("div");', - 'args': [] - }). - andReturnSuccess(json). - end(); - - var driver = executor.createDriver(); - driver.findElements(By.js('return document.getElementsByTagName("div");')). - then(function(elements) { - return promise.all(elements.map(function(e) { - assert.ok(e instanceof WebElement); - return e.getId(); - })); - }). - then((actual) => assert.deepEqual(ids, actual)); - return waitForIdle(); - }); - - it('byJs_convertsSingleWebElementResponseToArray', function() { - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, { - 'script': 'return document.getElementsByTagName("div");', - 'args': [] - }). - andReturnSuccess(WebElement.buildId('foo')). - end(); - - var driver = executor.createDriver(); - return driver. - findElements(By.js('return document.getElementsByTagName("div");')). - then(function(elements) { - return promise.all(elements.map(function(e) { - assert.ok(e instanceof WebElement); - return e.getId(); - })); - }). - then((actual) => assert.deepEqual(['foo'], actual)); - }); - - it('byJs_canPassScriptArguments', function() { - var script = 'return document.getElementsByTagName(arguments[0]);'; - let executor = new FakeExecutor(). - expect(CName.EXECUTE_SCRIPT, { - 'script': script, - 'args': ['div'] - }). - andReturnSuccess([ - WebElement.buildId('one'), - WebElement.buildId('two') - ]). - end(); - - var driver = executor.createDriver(); - return driver.findElements(By.js(script, 'div')) - then(function(elements) { - return promise.all(elements.map(function(e) { - assert.ok(e instanceof WebElement); - return e.getId(); - })); - }). - then((actual) => assert.deepEqual(['one', 'two'], actual)); - }); - }); - - describe('sendKeys', function() { - it('convertsVarArgsIntoStrings_simpleArgs', function() { - let executor = new FakeExecutor(). - expect(CName.SEND_KEYS_TO_ELEMENT, - {'id': WebElement.buildId('one'), - 'text': '12abc3', - 'value':'12abc3'.split('')}). - andReturnSuccess(). - end(); - - var driver = executor.createDriver(); - var element = new WebElement(driver, 'one'); - element.sendKeys(1, 2, 'abc', 3); - return waitForIdle(); - }); - - it('convertsVarArgsIntoStrings_promisedArgs', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {'using':'css selector', 'value':'*[id="foo"]'}). - andReturnSuccess(WebElement.buildId('one')). - expect(CName.SEND_KEYS_TO_ELEMENT, - {'id':WebElement.buildId('one'), - 'text': 'abc123def', - 'value':'abc123def'.split('')}). - andReturnSuccess(). - end(); - - var driver = executor.createDriver(); - var element = driver.findElement(By.id('foo')); - return element.sendKeys( - Promise.resolve('abc'), - 123, - Promise.resolve('def')); - }); - - it('sendKeysWithAFileDetector', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {'using':'css selector', 'value':'*[id="foo"]'}). - andReturnSuccess(WebElement.buildId('one')). - expect(CName.SEND_KEYS_TO_ELEMENT, - {'id': WebElement.buildId('one'), - 'text': 'modified/path', - 'value':'modified/path'.split('')}). - andReturnSuccess(). - end(); - - let driver = executor.createDriver(); - let handleFile = function(d, path) { - assert.strictEqual(driver, d); - assert.equal(path, 'original/path'); - return Promise.resolve('modified/path'); - }; - driver.setFileDetector({handleFile}); - - return driver.findElement(By.id('foo')).sendKeys('original/', 'path'); - }); - }); - - describe("switchTo()", function() { - describe("window", function() { - it('should return a resolved promise when the window is found', function() { - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW). - withParameters({ - 'name': 'foo', - 'handle': 'foo' - }). - andReturnSuccess(). - end(); - - executor.createDriver().switchTo().window('foo'); - return waitForIdle(); - }); - - it('should propagate exceptions', function() { - let e = new error.NoSuchWindowError('window not found'); - let executor = new FakeExecutor(). - expect(CName.SWITCH_TO_WINDOW). - withParameters({ - 'name': 'foo', - 'handle': 'foo' - }). - andReturnError(e). - end(); - - return executor.createDriver() - .switchTo().window('foo') - .then(assert.fail, v => assert.strictEqual(v, e)); - }); - }); - }); - - describe('elementEquality', function() { - it('isReflexive', function() { - var a = new WebElement(new FakeExecutor().createDriver(), 'foo'); - return WebElement.equals(a, a).then(assert.ok); - }); - - it('failsIfAnInputElementCouldNotBeFound', function() { - let id = Promise.reject(new StubError); - - var driver = new FakeExecutor().createDriver(); - var a = new WebElement(driver, 'foo'); - var b = new WebElementPromise(driver, id); - - return WebElement.equals(a, b).then(fail, assertIsStubError); - }); - }); - - describe('waiting', function() { - describe('supports custom wait functions', function() { - it('waitSucceeds', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnSuccess([]). - times(2). - expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnSuccess([WebElement.buildId('bar')]). - end(); - - var driver = executor.createDriver(); - driver.wait(function() { - return driver.findElements(By.id('foo')).then(els => els.length > 0); - }, 200); - return waitForIdle(); - }); - - it('waitTimesout_timeoutCaught', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnSuccess([]). - anyTimes(). - end(); - - var driver = executor.createDriver(); - return driver.wait(function() { - return driver.findElements(By.id('foo')).then(els => els.length > 0); - }, 25).then(fail, function(e) { - assert.equal('Wait timed out after ', - e.message.substring(0, 'Wait timed out after '.length)); - }); - }); - - enablePromiseManager(() => { - it('waitTimesout_timeoutNotCaught', function() { - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnSuccess([]). - anyTimes(). - end(); - - var driver = executor.createDriver(); - driver.wait(function() { - return driver.findElements(By.id('foo')).then(els => els.length > 0); - }, 25); - return waitForAbort().then(function(e) { - assert.equal('Wait timed out after ', - e.message.substring(0, 'Wait timed out after '.length)); - }); - }); - }); - }); - - describe('supports condition objects', function() { - it('wait succeeds', function() { - let executor = new FakeExecutor() - .expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}) - .andReturnSuccess([]) - .times(2) - .expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}) - .andReturnSuccess([WebElement.buildId('bar')]) - .end(); - - let driver = executor.createDriver(); - return driver.wait(until.elementLocated(By.id('foo')), 200); - }); - - it('wait times out', function() { - let executor = new FakeExecutor() - .expect(CName.FIND_ELEMENTS, - {using: 'css selector', value: '*[id="foo"]'}) - .andReturnSuccess([]) - .anyTimes() - .end(); - - let driver = executor.createDriver(); - return driver.wait(until.elementLocated(By.id('foo')), 5) - .then(fail, err => assert.ok(err instanceof error.TimeoutError)); - }); - }); - - describe('supports promise objects', function() { - it('wait succeeds', function() { - let promise = new Promise(resolve => { - setTimeout(() => resolve(1), 10); - }); - - let driver = new FakeExecutor().createDriver(); - return driver.wait(promise, 200).then(v => assert.equal(v, 1)); - }); - - it('wait times out', function() { - let promise = new Promise(resolve => {/* never resolves */}); - - let driver = new FakeExecutor().createDriver(); - return driver.wait(promise, 5) - .then(fail, err => assert.ok(err instanceof error.TimeoutError)); - }); - - it('wait fails if promise is rejected', function() { - let err = Error('boom'); - let driver = new FakeExecutor().createDriver(); - return driver.wait(Promise.reject(err), 5) - .then(fail, e => assert.strictEqual(e, err)); - }); - }); - - it('fails if not supported condition type provided', function() { - let driver = new FakeExecutor().createDriver(); - assert.throws(() => driver.wait({}, 5), TypeError); - }); - }); - - describe('alert handling', function() { - it('alertResolvesWhenPromisedTextResolves', function() { - let driver = new FakeExecutor().createDriver(); - let deferredText = defer(); - - let alert = new AlertPromise(driver, deferredText.promise); - - deferredText.resolve(new Alert(driver, 'foo')); - return alert.getText().then(text => assert.equal(text, 'foo')); - }); - - it('cannotSwitchToAlertThatIsNotPresent', function() { - let e = new error.NoSuchAlertError; - let executor = new FakeExecutor() - .expect(CName.GET_ALERT_TEXT) - .andReturnError(e) - .end(); - - return executor.createDriver() - .switchTo().alert() - .then(assert.fail, v => assert.strictEqual(v, e)); - }); - - enablePromiseManager(() => { - it('alertsBelongToSameFlowAsParentDriver', function() { - let executor = new FakeExecutor() - .expect(CName.GET_ALERT_TEXT).andReturnSuccess('hello') - .end(); - - var driver = executor.createDriver(); - var otherFlow = new promise.ControlFlow(); - otherFlow.execute(function() { - driver.switchTo().alert().then(function() { - assert.strictEqual( - driver.controlFlow(), promise.controlFlow(), - 'Alert should belong to the same flow as its parent driver'); - }); - }); - - assert.notEqual(otherFlow, driver.controlFlow); - return Promise.all([ - waitForIdle(otherFlow), - waitForIdle(driver.controlFlow()) - ]); - }); - }); - - it('commandsFailIfAlertNotPresent', function() { - let e = new error.NoSuchAlertError; - let executor = new FakeExecutor() - .expect(CName.GET_ALERT_TEXT) - .andReturnError(e) - .end(); - - var driver = executor.createDriver(); - var alert = driver.switchTo().alert(); - - var expectError = (v) => assert.strictEqual(v, e); - - return alert.getText() - .then(fail, expectedError) - .then(() => alert.accept()) - .then(fail, expectedError) - .then(() => alert.dismiss()) - .then(fail, expectError) - .then(() => alert.sendKeys('hi')) - .then(fail, expectError); - }); - }); - - enablePromiseManager(() => { - it('testWebElementsBelongToSameFlowAsParentDriver', function() { - let executor = new FakeExecutor() - .expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}) - .andReturnSuccess(WebElement.buildId('abc123')) - .end(); - - var driver = executor.createDriver(); - var otherFlow = new promise.ControlFlow(); - otherFlow.execute(function() { - driver.findElement({id: 'foo'}).then(function() { - assert.equal(driver.controlFlow(), promise.controlFlow()); - }); - }); - - assert.notEqual(otherFlow, driver.controlFlow); - return Promise.all([ - waitForIdle(otherFlow), - waitForIdle(driver.controlFlow()) - ]); - }); - }); - - it('testFetchingLogs', function() { - let executor = new FakeExecutor(). - expect(CName.GET_LOG, {'type': 'browser'}). - andReturnSuccess([ - {'level': 'INFO', 'message': 'hello', 'timestamp': 1234}, - {'level': 'DEBUG', 'message': 'abc123', 'timestamp': 5678} - ]). - end(); - - var driver = executor.createDriver(); - return driver.manage().logs().get('browser').then(function(entries) { - assert.equal(2, entries.length); - - assert.ok(entries[0] instanceof logging.Entry); - assert.equal(logging.Level.INFO.value, entries[0].level.value); - assert.equal('hello', entries[0].message); - assert.equal(1234, entries[0].timestamp); - - assert.ok(entries[1] instanceof logging.Entry); - assert.equal(logging.Level.DEBUG.value, entries[1].level.value); - assert.equal('abc123', entries[1].message); - assert.equal(5678, entries[1].timestamp); - }); - }); - - it('testCommandsFailIfInitialSessionCreationFailed', function() { - var session = Promise.reject(new StubError); - - var driver = new FakeExecutor().createDriver(session); - var navigateResult = driver.get('some-url').then(fail, assertIsStubError); - var quitResult = driver.quit().then(fail, assertIsStubError); - - return waitForIdle().then(function() { - return promise.all(navigateResult, quitResult); - }); - }); - - it('testWebElementCommandsFailIfInitialDriverCreationFailed', function() { - var session = Promise.reject(new StubError); - var driver = new FakeExecutor().createDriver(session); - return driver.findElement(By.id('foo')).click(). - then(fail, assertIsStubError); - }); - - it('testWebElementCommansFailIfElementCouldNotBeFound', function() { - let e = new error.NoSuchElementError('Unable to find element'); - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnError(e). - end(); - - var driver = executor.createDriver(); - return driver.findElement(By.id('foo')).click() - .then(fail, v => assert.strictEqual(v, e)); - }); - - it('testCannotFindChildElementsIfParentCouldNotBeFound', function() { - let e = new error.NoSuchElementError('Unable to find element'); - let executor = new FakeExecutor(). - expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}). - andReturnError(e). - end(); - - var driver = executor.createDriver(); - return driver.findElement(By.id('foo')) - .findElement(By.id('bar')) - .findElement(By.id('baz')) - .then(fail, v => assert.strictEqual(v, e)); - }); - - describe('actions()', function() { - it('failsIfInitialDriverCreationFailed', function() { - let session = Promise.reject(new StubError('no session for you')); - let driver = new FakeExecutor().createDriver(session); - driver.getSession().catch(function() {}); - return driver. - actions(). - mouseDown(). - mouseUp(). - perform(). - catch(assertIsStubError); - }); - - describe('mouseMove', function() { - it('noElement', function() { - let executor = new FakeExecutor() - .expect(CName.MOVE_TO, {'xoffset': 0, 'yoffset': 125}) - .andReturnSuccess() - .end(); - - return executor.createDriver(). - actions(). - mouseMove({x: 0, y: 125}). - perform(); - }); - - it('element', function() { - let executor = new FakeExecutor() - .expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="foo"]'}) - .andReturnSuccess(WebElement.buildId('abc123')) - .expect(CName.MOVE_TO, - {'element': 'abc123', 'xoffset': 0, 'yoffset': 125}) - .andReturnSuccess() - .end(); - - var driver = executor.createDriver(); - var element = driver.findElement(By.id('foo')); - return driver.actions() - .mouseMove(element, {x: 0, y: 125}) - .perform(); - }); - }); - - it('supportsMouseDown', function() { - let executor = new FakeExecutor() - .expect(CName.MOUSE_DOWN, {'button': Button.LEFT}) - .andReturnSuccess() - .end(); - - return executor.createDriver(). - actions(). - mouseDown(). - perform(); - }); - - it('testActionSequence', function() { - let executor = new FakeExecutor() - .expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="a"]'}) - .andReturnSuccess(WebElement.buildId('id1')) - .expect(CName.FIND_ELEMENT, - {using: 'css selector', value: '*[id="b"]'}) - .andReturnSuccess(WebElement.buildId('id2')) - .expect(CName.SEND_KEYS_TO_ACTIVE_ELEMENT, - {'value': [Key.SHIFT]}) - .andReturnSuccess() - .expect(CName.MOVE_TO, {'element': 'id1'}) - .andReturnSuccess() - .expect(CName.CLICK, {'button': Button.LEFT}) - .andReturnSuccess() - .expect(CName.MOVE_TO, {'element': 'id2'}) - .andReturnSuccess() - .expect(CName.CLICK, {'button': Button.LEFT}) - .andReturnSuccess() - .end(); - - var driver = executor.createDriver(); - var element1 = driver.findElement(By.id('a')); - var element2 = driver.findElement(By.id('b')); - - return driver.actions() - .keyDown(Key.SHIFT) - .click(element1) - .click(element2) - .perform(); - }); - }); - - describe('touchActions()', function() { - it('failsIfInitialDriverCreationFailed', function() { - let session = Promise.reject(new StubError); - let driver = new FakeExecutor().createDriver(session); - driver.getSession().catch(function() {}); - return driver. - touchActions(). - scroll({x: 3, y: 4}). - perform(). - catch(assertIsStubError); - }); - - it('testTouchActionSequence', function() { - let executor = new FakeExecutor() - .expect(CName.TOUCH_DOWN, {x: 1, y: 2}).andReturnSuccess() - .expect(CName.TOUCH_MOVE, {x: 3, y: 4}).andReturnSuccess() - .expect(CName.TOUCH_UP, {x: 5, y: 6}).andReturnSuccess() - .end(); - - var driver = executor.createDriver(); - return driver.touchActions() - .tapAndHold({x: 1, y: 2}) - .move({x: 3, y: 4}) - .release({x: 5, y: 6}) - .perform(); - }); - }); - - describe('manage()', function() { - describe('setTimeouts()', function() { - describe('throws if no timeouts are specified', function() { - let driver; - before(() => driver = new FakeExecutor().createDriver()); - - it('; no arguments', function() { - assert.throws(() => driver.manage().setTimeouts(), TypeError); - }); - - it('; ignores unrecognized timeout keys', function() { - assert.throws( - () => driver.manage().setTimeouts({foo: 123}), TypeError); - }); - - it('; ignores positional arguments', function() { - assert.throws( - () => driver.manage().setTimeouts(1234, 56), TypeError); - }); - }); - - describe('throws timeout is not a number, null, or undefined', () => { - let driver; - before(() => driver = new FakeExecutor().createDriver()); - - function checkError(e) { - return e instanceof TypeError - && /expected "(script|pageLoad|implicit)" to be a number/.test( - e.message); - } - - it('script', function() { - assert.throws( - () => driver.manage().setTimeouts({script: 'abc'}), - checkError); - }); - - it('pageLoad', function() { - assert.throws( - () => driver.manage().setTimeouts({pageLoad: 'abc'}), - checkError); - }); - - it('implicit', function() { - assert.throws( - () => driver.manage().setTimeouts({implicit: 'abc'}), - checkError); - }); - }); - - it('can set multiple timeouts', function() { - let executor = new FakeExecutor() - .expect(CName.SET_TIMEOUT, {script:1, pageLoad: 2, implicit: 3}) - .andReturnSuccess() - .end(); - let driver = executor.createDriver(); - return driver.manage() - .setTimeouts({script: 1, pageLoad: 2, implicit: 3}); - }); - - it('falls back to legacy wire format if W3C version fails', () => { - let executor = new FakeExecutor() - .expect(CName.SET_TIMEOUT, {implicit: 3}) - .andReturnError(Error('oops')) - .expect(CName.SET_TIMEOUT, {type: 'implicit', ms: 3}) - .andReturnSuccess() - .end(); - let driver = executor.createDriver(); - return driver.manage().setTimeouts({implicit: 3}); - }); - - describe('deprecated API calls setTimeouts()', function() { - it('implicitlyWait()', function() { - let executor = new FakeExecutor() - .expect(CName.SET_TIMEOUT, {implicit: 3}) - .andReturnSuccess() - .end(); - let driver = executor.createDriver(); - return driver.manage().timeouts().implicitlyWait(3); - }); - - it('setScriptTimeout()', function() { - let executor = new FakeExecutor() - .expect(CName.SET_TIMEOUT, {script: 3}) - .andReturnSuccess() - .end(); - let driver = executor.createDriver(); - return driver.manage().timeouts().setScriptTimeout(3); - }); - - it('pageLoadTimeout()', function() { - let executor = new FakeExecutor() - .expect(CName.SET_TIMEOUT, {pageLoad: 3}) - .andReturnSuccess() - .end(); - let driver = executor.createDriver(); - return driver.manage().timeouts().pageLoadTimeout(3); - }); - }); - }); - }); - - describe('generator support', function() { - var driver; - - beforeEach(function() { - driver = new WebDriver( - new Session('test-session', {}), - new ExplodingExecutor()); - }); - - it('canUseGeneratorsWithWebDriverCall', function() { - return driver.call(function* () { - var x = yield Promise.resolve(1); - var y = yield Promise.resolve(2); - return x + y; - }).then(function(value) { - assert.deepEqual(3, value); - }); - }); - - it('canDefineScopeOnGeneratorCall', function() { - return driver.call(function* () { - var x = yield Promise.resolve(1); - return this.name + x; - }, {name: 'Bob'}).then(function(value) { - assert.deepEqual('Bob1', value); - }); - }); - - it('canSpecifyArgsOnGeneratorCall', function() { - return driver.call(function* (a, b) { - var x = yield Promise.resolve(1); - var y = yield Promise.resolve(2); - return [x + y, a, b]; - }, null, 'abc', 123).then(function(value) { - assert.deepEqual([3, 'abc', 123], value); - }); - }); - - it('canUseGeneratorWithWebDriverWait', function() { - var values = []; - return driver.wait(function* () { - yield values.push(1); - values.push(yield promise.delayed(10).then(function() { - return 2; - })); - yield values.push(3); - return values.length === 6; - }, 250).then(function() { - assert.deepEqual([1, 2, 3, 1, 2, 3], values); - }); - }); - - /** - * @constructor - * @implements {CommandExecutor} - */ - function ExplodingExecutor() {} - - - /** @override */ - ExplodingExecutor.prototype.execute = function(command, cb) { - cb(Error('Unsupported operation')); - }; - }); - - describe('wire format', function() { - const FAKE_DRIVER = new FakeExecutor().createDriver(); - - describe('can serialize', function() { - function runSerializeTest(input, want) { - let executor = new FakeExecutor(). - expect(CName.NEW_SESSION). - withParameters({'desiredCapabilities': want}). - andReturnSuccess({'browserName': 'firefox'}). - end(); - return WebDriver.createSession(executor, input) - .getSession(); - } - - it('function as a string', function() { - function foo() { return 'foo'; } - return runSerializeTest(foo, '' + foo); - }); - - it('object with toJSON()', function() { - return runSerializeTest( - new Date(605728511546), - '1989-03-12T17:55:11.546Z'); - }); - - it('Session', function() { - return runSerializeTest(new Session('foo', {}), 'foo'); - }); - - it('Capabilities', function() { - var prefs = new logging.Preferences(); - prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); - - var caps = Capabilities.chrome(); - caps.setLoggingPrefs(prefs); - - return runSerializeTest( - caps, - { - 'browserName': 'chrome', - 'loggingPrefs': {'browser': 'DEBUG'} - }); - }); - - it('WebElement', function() { - return runSerializeTest( - new WebElement(FAKE_DRIVER, 'fefifofum'), - WebElement.buildId('fefifofum')); - }); - - it('WebElementPromise', function() { - return runSerializeTest( - new WebElementPromise( - FAKE_DRIVER, - Promise.resolve(new WebElement(FAKE_DRIVER, 'fefifofum'))), - WebElement.buildId('fefifofum')); - }); - - describe('an array', function() { - it('with Serializable', function() { - return runSerializeTest([new Session('foo', {})], ['foo']); - }); - - it('with WebElement', function() { - return runSerializeTest( - [new WebElement(FAKE_DRIVER, 'fefifofum')], - [WebElement.buildId('fefifofum')]); - }); - - it('with WebElementPromise', function() { - return runSerializeTest( - [new WebElementPromise( - FAKE_DRIVER, - Promise.resolve(new WebElement(FAKE_DRIVER, 'fefifofum')))], - [WebElement.buildId('fefifofum')]); - }); - - it('complex array', function() { - var expected = [ - 'abc', 123, true, WebElement.buildId('fefifofum'), - [123, {'foo': 'bar'}] - ]; - - var element = new WebElement(FAKE_DRIVER, 'fefifofum'); - var input = ['abc', 123, true, element, [123, {'foo': 'bar'}]]; - return runSerializeTest(input, expected); - }); - - it('nested promises', function() { - return runSerializeTest( - ['abc', Promise.resolve([123, Promise.resolve(true)])], - ['abc', [123, true]]); - }); - }); - - describe('an object', function() { - it('literal', function() { - var expected = {sessionId: 'foo'}; - return runSerializeTest({sessionId: 'foo'}, expected); - }); - - it('with sub-objects', function() { - var expected = {sessionId: {value: 'foo'}}; - return runSerializeTest( - {sessionId: {value: 'foo'}}, expected); - }); - - it('with values that have toJSON', function() { - return runSerializeTest( - {a: {b: new Date(605728511546)}}, - {a: {b: '1989-03-12T17:55:11.546Z'}}); - }); - - it('with a Session', function() { - return runSerializeTest( - {a: new Session('foo', {})}, - {a: 'foo'}); - }); - - it('nested', function() { - var elementJson = WebElement.buildId('fefifofum'); - var expected = { - 'script': 'return 1', - 'args': ['abc', 123, true, elementJson, [123, {'foo': 'bar'}]], - 'sessionId': 'foo' - }; - - var element = new WebElement(FAKE_DRIVER, 'fefifofum'); - var parameters = { - 'script': 'return 1', - 'args':['abc', 123, true, element, [123, {'foo': 'bar'}]], - 'sessionId': new Session('foo', {}) - }; - - return runSerializeTest(parameters, expected); - }); - }); - }); - - describe('can deserialize', function() { - function runDeserializeTest(original, want) { - let executor = new FakeExecutor() - .expect(CName.GET_CURRENT_URL) - .andReturnSuccess(original) - .end(); - let driver = executor.createDriver(); - return driver.getCurrentUrl().then(function(got) { - assert.deepEqual(got, want); - }); - } - - it('primitives', function() { - return Promise.all([ - runDeserializeTest(1, 1), - runDeserializeTest('', ''), - runDeserializeTest(true, true), - runDeserializeTest(undefined, undefined), - runDeserializeTest(null, null) - ]); - }); - - it('simple object', function() { - return runDeserializeTest( - {sessionId: 'foo'}, - {sessionId: 'foo'}); - }); - - it('nested object', function() { - return runDeserializeTest( - {'foo': {'bar': 123}}, - {'foo': {'bar': 123}}); - }); - - it('array', function() { - return runDeserializeTest( - [{'foo': {'bar': 123}}], - [{'foo': {'bar': 123}}]); - }); - - it('passes through function properties', function() { - function bar() {} - return runDeserializeTest( - [{foo: {'bar': 123}, func: bar}], - [{foo: {'bar': 123}, func: bar}]); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/logging_test.js b/test-eol-project/node_modules/selenium-webdriver/test/logging_test.js deleted file mode 100644 index 54687971..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/logging_test.js +++ /dev/null @@ -1,167 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var Browser = require('..').Browser, - By = require('..').By, - logging = require('..').logging, - assert = require('../testing/assert'), - test = require('../lib/test'); - -test.suite(function(env) { - // Logging API has numerous issues with PhantomJS: - // - does not support adjusting log levels for type "browser". - // - does not return proper log level for "browser" messages. - // - does not delete logs after retrieval - // Logging API is not supported in IE. - // Logging API not supported in Marionette. - // Tests depend on opening data URLs, which is broken in Safari (issue 7586) - test.ignore(env.browsers( - Browser.PHANTOM_JS, Browser.IE, Browser.SAFARI, Browser.FIREFOX)). - describe('logging', function() { - var driver; - - test.beforeEach(function() { - driver = null; - }); - - test.afterEach(function*() { - if (driver) { - return driver.quit(); - } - }); - - test.it('can be disabled', function*() { - var prefs = new logging.Preferences(); - prefs.setLevel(logging.Type.BROWSER, logging.Level.OFF); - - driver = yield env.builder() - .setLoggingPrefs(prefs) - .build(); - - yield driver.get(dataUrl( - '')); - return driver.manage().logs().get(logging.Type.BROWSER) - .then(entries => assert(entries.length).equalTo(0)); - }); - - // Firefox does not capture JS error console log messages. - test.ignore(env.browsers(Browser.FIREFOX, 'legacy-firefox')). - it('can be turned down', function*() { - var prefs = new logging.Preferences(); - prefs.setLevel(logging.Type.BROWSER, logging.Level.SEVERE); - - driver = yield env.builder() - .setLoggingPrefs(prefs) - .build(); - - yield driver.get(dataUrl( - '')); - return driver.manage().logs().get(logging.Type.BROWSER) - .then(function(entries) { - assert(entries.length).equalTo(1); - assert(entries[0].level.name).equalTo('SEVERE'); - assert(entries[0].message).matches(/.*\"?and this is an error\"?/); - }); - }); - - // Firefox does not capture JS error console log messages. - test.ignore(env.browsers(Browser.FIREFOX, 'legacy-firefox')). - it('can be made verbose', function*() { - var prefs = new logging.Preferences(); - prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); - - driver = yield env.builder() - .setLoggingPrefs(prefs) - .build(); - - yield driver.get(dataUrl( - '')); - return driver.manage().logs().get(logging.Type.BROWSER) - .then(function(entries) { - assert(entries.length).equalTo(3); - assert(entries[0].level.name).equalTo('DEBUG'); - assert(entries[0].message).matches(/.*\"?hello\"?/); - - assert(entries[1].level.name).equalTo('WARNING'); - assert(entries[1].message).matches(/.*\"?this is a warning\"?/); - - assert(entries[2].level.name).equalTo('SEVERE'); - assert(entries[2].message).matches(/.*\"?and this is an error\"?/); - }); - }); - - // Firefox does not capture JS error console log messages. - test.ignore(env.browsers(Browser.FIREFOX, 'legacy-firefox')). - it('clears records after retrieval', function*() { - var prefs = new logging.Preferences(); - prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); - - driver = yield env.builder() - .setLoggingPrefs(prefs) - .build(); - - yield driver.get(dataUrl( - '')); - yield driver.manage().logs().get(logging.Type.BROWSER) - .then(entries => assert(entries.length).equalTo(3)); - return driver.manage().logs().get(logging.Type.BROWSER) - .then(entries => assert(entries.length).equalTo(0)); - }); - - test.it('does not mix log types', function*() { - var prefs = new logging.Preferences(); - prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG); - prefs.setLevel(logging.Type.DRIVER, logging.Level.SEVERE); - - driver = yield env.builder() - .setLoggingPrefs(prefs) - .build(); - - yield driver.get(dataUrl( - '')); - return driver.manage().logs().get(logging.Type.DRIVER) - .then(entries => assert(entries.length).equalTo(0)); - }); - }); - - function dataUrl(var_args) { - return 'data:text/html,' - + Array.prototype.slice.call(arguments, 0).join(''); - } -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js b/test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js deleted file mode 100644 index 88c52c06..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/net/index_test.js +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'); - -var net = require('../../net'); - -describe('net.splitHostAndPort', function() { - it('hostname with no port', function() { - assert.deepEqual( - net.splitHostAndPort('www.example.com'), - {host: 'www.example.com', port: null}); - }); - - it('hostname with port', function() { - assert.deepEqual( - net.splitHostAndPort('www.example.com:80'), - {host: 'www.example.com', port: 80}); - }); - - it('IPv4 with no port', function() { - assert.deepEqual( - net.splitHostAndPort('127.0.0.1'), - {host: '127.0.0.1', port: null}); - }); - - it('IPv4 with port', function() { - assert.deepEqual( - net.splitHostAndPort('127.0.0.1:1234'), - {host: '127.0.0.1', port: 1234}); - }); - - it('IPv6 with no port', function() { - assert.deepEqual( - net.splitHostAndPort('1234:0:1000:5768:1234:5678:90'), - {host: '1234:0:1000:5768:1234:5678:90', port: null}); - }); - - it('IPv6 with port', function() { - assert.deepEqual( - net.splitHostAndPort('[1234:0:1000:5768:1234:5678:90]:1234'), - {host: '1234:0:1000:5768:1234:5678:90', port: 1234}); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js b/test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js deleted file mode 100644 index 668c4ae0..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/net/portprober_test.js +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const net = require('net'); - -const portprober = require('../../net/portprober'); - -describe('isFree', function() { - - var server; - - beforeEach(function() { - server = net.createServer(function(){}); - }) - - afterEach(function(done) { - if (!server) return done(); - server.close(function() { - done(); - }); - }); - - it('should work for INADDR_ANY', function(done) { - server.listen(0, function() { - var port = server.address().port; - assertPortNotfree(port).then(function() { - return new Promise(resolve => { - server.close(function() { - server = null; - resolve(assertPortIsFree(port)); - }); - }); - }).then(function() { done(); }, done); - }); - }); - - it('should work for a specific host', function(done) { - var host = '127.0.0.1'; - server.listen(0, host, function() { - var port = server.address().port; - assertPortNotfree(port, host).then(function() { - return new Promise(resolve => { - server.close(function() { - server = null; - resolve(assertPortIsFree(port, host)); - }); - }); - }).then(function() { done(); }, done); - }); - }); -}); - -describe('findFreePort', function() { - var server; - - beforeEach(function() { - server = net.createServer(function(){}); - }) - - afterEach(function(done) { - if (!server) return done(); - server.close(function() { - done(); - }); - }); - - it('should work for INADDR_ANY', function(done) { - portprober.findFreePort().then(function(port) { - server.listen(port, function() { - assertPortNotfree(port).then(function() { - return new Promise(resolve => { - server.close(function() { - server = null; - resolve(assertPortIsFree(port)); - }); - }); - }).then(function() { done(); }, done); - }); - }); - }); - - it('should work for a specific host', function(done) { - var host = '127.0.0.1'; - portprober.findFreePort(host).then(function(port) { - server.listen(port, host, function() { - assertPortNotfree(port, host).then(function() { - return new Promise(resolve => { - server.close(function() { - server = null; - resolve(assertPortIsFree(port, host)); - }); - }); - }).then(function() { done(); }, done); - }); - }); - }); -}); - - -function assertPortIsFree(port, opt_host) { - return portprober.isFree(port, opt_host).then(function(free) { - assert.ok(free, 'port should be free'); - }); -} - - -function assertPortNotfree(port, opt_host) { - return portprober.isFree(port, opt_host).then(function(free) { - assert.ok(!free, 'port should is not free'); - }); -} diff --git a/test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js b/test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js deleted file mode 100644 index f4c3470c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/page_loading_test.js +++ /dev/null @@ -1,166 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var Browser = require('..').Browser, - By = require('..').By, - until = require('..').until, - assert = require('../testing/assert'), - error = require('../lib/error'), - test = require('../lib/test'), - Pages = test.Pages; - - -test.suite(function(env) { - var browsers = env.browsers; - - var driver; - test.before(function*() { - driver = yield env.builder().build(); - }); - - test.beforeEach(function*() { - if (!driver) { - driver = yield env.builder().build(); - } - }); - - test.after(function() { - if (driver) { - return driver.quit(); - } - }); - - test.it('should wait for document to be loaded', function*() { - yield driver.get(Pages.simpleTestPage); - return assert(driver.getTitle()).equalTo('Hello WebDriver'); - }); - - test.it('should follow redirects sent in the http response headers', - function*() { - yield driver.get(Pages.redirectPage); - return assert(driver.getTitle()).equalTo('We Arrive Here'); - }); - - // Skip Firefox; see https://bugzilla.mozilla.org/show_bug.cgi?id=1280300 - test.ignore(browsers(Browser.FIREFOX)). - it('should be able to get a fragment on the current page', function*() { - yield driver.get(Pages.xhtmlTestPage); - yield driver.get(Pages.xhtmlTestPage + '#text'); - yield driver.findElement(By.id('id1')); - }); - - test.ignore(browsers(Browser.IPAD, Browser.IPHONE)). - it('should wait for all frames to load in a frameset', function*() { - yield driver.get(Pages.framesetPage); - yield driver.switchTo().frame(0); - - let txt = yield driver.findElement(By.css('span#pageNumber')).getText(); - assert(txt.trim()).equalTo('1'); - - yield driver.switchTo().defaultContent(); - yield driver.switchTo().frame(1); - txt = yield driver.findElement(By.css('span#pageNumber')).getText(); - - assert(txt.trim()).equalTo('2'); - }); - - test.ignore(browsers(Browser.SAFARI)). - it('should be able to navigate back in browser history', function*() { - yield driver.get(Pages.formPage); - - yield driver.findElement(By.id('imageButton')).click(); - yield driver.wait(until.titleIs('We Arrive Here'), 2500); - - yield driver.navigate().back(); - yield driver.wait(until.titleIs('We Leave From Here'), 2500); - }); - - test.ignore(browsers(Browser.SAFARI)). - it('should be able to navigate back in presence of iframes', function*() { - yield driver.get(Pages.xhtmlTestPage); - - yield driver.findElement(By.name('sameWindow')).click(); - yield driver.wait(until.titleIs('This page has iframes'), 2500); - - yield driver.navigate().back(); - yield driver.wait(until.titleIs('XHTML Test Page'), 2500); - }); - - test.ignore(browsers(Browser.SAFARI)). - it('should be able to navigate forwards in browser history', function*() { - yield driver.get(Pages.formPage); - - yield driver.findElement(By.id('imageButton')).click(); - yield driver.wait(until.titleIs('We Arrive Here'), 5000); - - yield driver.navigate().back(); - yield driver.wait(until.titleIs('We Leave From Here'), 5000); - - yield driver.navigate().forward(); - yield driver.wait(until.titleIs('We Arrive Here'), 5000); - }); - - // PhantomJS 2.0 does not properly reload pages on refresh. - test.ignore(browsers(Browser.PHANTOM_JS)). - it('should be able to refresh a page', function*() { - yield driver.get(Pages.xhtmlTestPage); - - yield driver.navigate().refresh(); - - yield assert(driver.getTitle()).equalTo('XHTML Test Page'); - }); - - test.it('should return title of page if set', function*() { - yield driver.get(Pages.xhtmlTestPage); - yield assert(driver.getTitle()).equalTo('XHTML Test Page'); - - yield driver.get(Pages.simpleTestPage); - yield assert(driver.getTitle()).equalTo('Hello WebDriver'); - }); - - describe('timeouts', function() { - test.afterEach(function() { - let nullDriver = () => driver = null; - if (driver) { - return driver.quit().then(nullDriver, nullDriver); - } - }); - - // Only implemented in Firefox. - test.ignore(browsers( - Browser.CHROME, - Browser.IE, - Browser.IPAD, - Browser.IPHONE, - Browser.OPERA, - Browser.PHANTOM_JS)). - it('should timeout if page load timeout is set', function*() { - yield driver.manage().timeouts().pageLoadTimeout(1); - return driver.get(Pages.sleepingPage + '?time=3') - .then(function() { - throw Error('Should have timed out on page load'); - }, function(e) { - if (!(e instanceof error.ScriptTimeoutError) - && !(e instanceof error.TimeoutError)) { - throw Error('Unexpected error response: ' + e); - } - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js b/test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js deleted file mode 100644 index 8b7a99f8..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/phantomjs/execute_phantomjs_test.js +++ /dev/null @@ -1,59 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'); -var path = require('path'); -var test = require('../../lib/test'); - -test.suite(function(env) { - var driver; - - test.before(function*() { - driver = yield env.builder().build(); - }); - - test.after(function() { - return driver.quit(); - }); - - var testPageUrl = - 'data:text/html,

    ' + path.basename(__filename) + '

    '; - - test.beforeEach(function() { - return driver.get(testPageUrl); - }); - - describe('phantomjs.Driver', function() { - describe('#executePhantomJS()', function() { - - test.it('can execute scripts using PhantomJS API', function*() { - let url = yield driver.executePhantomJS('return this.url;'); - assert.equal(testPageUrl, decodeURIComponent(url)); - }); - - test.it('can execute scripts as functions', function*() { - let result = yield driver.executePhantomJS(function(a, b) { - return a + b; - }, 1, 2); - - assert.equal(3, result); - }); - }); - }); -}, {browsers: ['phantomjs']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js b/test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js deleted file mode 100644 index 442ff606..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/proxy_test.js +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var http = require('http'), - url = require('url'); - -var Browser = require('..').Browser, - promise = require('..').promise, - firefox = require('../firefox'), - proxy = require('../proxy'), - assert = require('../testing/assert'), - test = require('../lib/test'), - Server = require('../lib/test/httpserver').Server, - Pages = test.Pages; - -test.suite(function(env) { - function writeResponse(res, body, encoding, contentType) { - res.writeHead(200, { - 'Content-Length': Buffer.byteLength(body, encoding), - 'Content-Type': contentType - }); - res.end(body); - } - - function writePacFile(res) { - writeResponse(res, [ - 'function FindProxyForURL(url, host) {', - ' if (shExpMatch(url, "' + goodbyeServer.url('*') + '")) {', - ' return "DIRECT";', - ' }', - ' return "PROXY ' + proxyServer.host() + '";', - '}' - ].join('\n'), 'ascii', 'application/x-javascript-config'); - } - - var proxyServer = new Server(function(req, res) { - var pathname = url.parse(req.url).pathname; - if (pathname === '/proxy.pac') { - return writePacFile(res); - } - - writeResponse(res, [ - '', - 'Proxy page', - '

    This is the proxy landing page

    ' - ].join(''), 'utf8', 'text/html; charset=UTF-8'); - }); - - var helloServer = new Server(function(req, res) { - writeResponse(res, [ - '', - 'Hello', - '

    Hello, world!

    ' - ].join(''), 'utf8', 'text/html; charset=UTF-8'); - }); - - var goodbyeServer = new Server(function(req, res) { - writeResponse(res, [ - '', - 'Goodbye', - '

    Goodbye, world!

    ' - ].join(''), 'utf8', 'text/html; charset=UTF-8'); - }); - - // Cannot pass start directly to mocha's before, as mocha will interpret the optional - // port parameter as an async callback parameter. - function mkStartFunc(server) { - return function() { - return server.start(); - }; - } - - test.before(mkStartFunc(proxyServer)); - test.before(mkStartFunc(helloServer)); - test.before(mkStartFunc(goodbyeServer)); - - test.after(proxyServer.stop.bind(proxyServer)); - test.after(helloServer.stop.bind(helloServer)); - test.after(goodbyeServer.stop.bind(goodbyeServer)); - - var driver; - test.beforeEach(function() { driver = null; }); - test.afterEach(function() { return driver && driver.quit(); }); - - function createDriver(proxy) { - // For Firefox we need to explicitly enable proxies for localhost by - // clearing the network.proxy.no_proxies_on preference. - let profile = new firefox.Profile(); - profile.setPreference('network.proxy.no_proxies_on', ''); - - return driver = env.builder() - .setFirefoxOptions(new firefox.Options().setProfile(profile)) - .setProxy(proxy) - .build(); - } - - // Proxy support not implemented. - test.ignore(env.browsers(Browser.IE, Browser.OPERA, Browser.SAFARI)). - describe('manual proxy settings', function() { - // phantomjs 1.9.1 in webdriver mode does not appear to respect proxy - // settings. - test.ignore(env.browsers(Browser.PHANTOM_JS)). - it('can configure HTTP proxy host', function*() { - yield createDriver(proxy.manual({ - http: proxyServer.host() - })); - - yield driver.get(helloServer.url()); - yield assert(driver.getTitle()).equalTo('Proxy page'); - yield assert(driver.findElement({tagName: 'h3'}).getText()). - equalTo('This is the proxy landing page'); - }); - - // PhantomJS does not support bypassing the proxy for individual hosts. - // geckodriver does not support the bypass option, this must be configured - // through profile preferences. - test.ignore(env.browsers( - Browser.FIREFOX, - 'legacy-' + Browser.FIREFOX, - Browser.PHANTOM_JS)). - it('can bypass proxy for specific hosts', function*() { - yield createDriver(proxy.manual({ - http: proxyServer.host(), - bypass: helloServer.host() - })); - - yield driver.get(helloServer.url()); - yield assert(driver.getTitle()).equalTo('Hello'); - yield assert(driver.findElement({tagName: 'h3'}).getText()). - equalTo('Hello, world!'); - - yield driver.get(goodbyeServer.url()); - yield assert(driver.getTitle()).equalTo('Proxy page'); - yield assert(driver.findElement({tagName: 'h3'}).getText()). - equalTo('This is the proxy landing page'); - }); - - // TODO: test ftp and https proxies. - }); - - // PhantomJS does not support PAC file proxy configuration. - // Safari does not support proxies. - test.ignore(env.browsers( - Browser.IE, Browser.OPERA, Browser.PHANTOM_JS, Browser.SAFARI)). - describe('pac proxy settings', function() { - test.it('can configure proxy through PAC file', function*() { - yield createDriver(proxy.pac(proxyServer.url('/proxy.pac'))); - - yield driver.get(helloServer.url()); - yield assert(driver.getTitle()).equalTo('Proxy page'); - yield assert(driver.findElement({tagName: 'h3'}).getText()). - equalTo('This is the proxy landing page'); - - yield driver.get(goodbyeServer.url()); - yield assert(driver.getTitle()).equalTo('Goodbye'); - yield assert(driver.findElement({tagName: 'h3'}).getText()). - equalTo('Goodbye, world!'); - }); - }); - - // TODO: figure out how to test direct and system proxy settings. - describe.skip('direct proxy settings', function() {}); - describe.skip('system proxy settings', function() {}); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/rect_test.js b/test-eol-project/node_modules/selenium-webdriver/test/rect_test.js deleted file mode 100644 index e5ea3652..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/rect_test.js +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); - -const {By} = require('..'); -const test = require('../lib/test'); - -test.suite(function(env) { - describe('rect commands', function() { - let driver; - let el; - - test.before(function*() { - driver = yield env.builder().build(); - yield driver.get( - 'data:text/html,
    Hello
    '); - el = yield driver.findElement(By.css('div')); - }); - - after(function() { - if (driver) { - return driver.quit(); - } - }); - - test.it('WebElement.getLocation()', function*() { - let location = yield el.getLocation(); - assert.equal(location.x, 50); - assert.equal(location.y, 50); - }); - - test.it('WebElement.getSize()', function*() { - let size = yield el.getSize(); - assert.equal(size.width, 50); - assert.equal(size.height, 50); - }); - - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/remote_test.js b/test-eol-project/node_modules/selenium-webdriver/test/remote_test.js deleted file mode 100644 index 4c18398c..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/remote_test.js +++ /dev/null @@ -1,117 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var assert = require('assert'), - fs = require('fs'), - path = require('path'); - -var promise = require('../').promise, - io = require('../io'), - cmd = require('../lib/command'), - remote = require('../remote'); - -const {enablePromiseManager} = require('../lib/test/promise'); - -describe('DriverService', function() { - describe('start()', function() { - var service; - - beforeEach(function() { - service = new remote.DriverService(process.execPath, { - port: 1234, - args: ['-e', 'process.exit(1)'] - }); - }); - - afterEach(function() { - return service.kill(); - }); - - it('fails if child-process dies', function() { - this.timeout(1000); - return service.start(500).then(expectFailure, verifyFailure); - }); - - enablePromiseManager(function() { - describe( - 'failures propagate through control flow if child-process dies', - function() { - it('', function() { - this.timeout(1000); - - return promise.controlFlow().execute(function() { - promise.controlFlow().execute(function() { - return service.start(500); - }); - }).then(expectFailure, verifyFailure); - }); - }); - }); - - function verifyFailure(e) { - assert.ok(!(e instanceof promise.CancellationError)); - assert.equal('Server terminated early with status 1', e.message); - } - - function expectFailure() { - throw Error('expected to fail'); - } - }); -}); - -describe('FileDetector', function() { - class ExplodingDriver { - schedule() { - throw Error('unexpected call'); - } - } - - it('returns the original path if the file does not exist', function() { - return io.tmpDir().then(dir => { - let theFile = path.join(dir, 'not-there'); - return (new remote.FileDetector) - .handleFile(new ExplodingDriver, theFile) - .then(f => assert.equal(f, theFile)); - }); - }); - - it('returns the original path if it is a directory', function() { - return io.tmpDir().then(dir => { - return (new remote.FileDetector) - .handleFile(new ExplodingDriver, dir) - .then(f => assert.equal(f, dir)); - }); - }); - - it('attempts to upload valid files', function() { - return io.tmpFile().then(theFile => { - return (new remote.FileDetector) - .handleFile( - new (class FakeDriver { - schedule(command) { - assert.equal(command.getName(), cmd.Name.UPLOAD_FILE); - assert.equal(typeof command.getParameters()['file'], 'string'); - return Promise.resolve('success!'); - } - }), - theFile) - .then(f => assert.equal(f, 'success!')); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/safari_test.js b/test-eol-project/node_modules/selenium-webdriver/test/safari_test.js deleted file mode 100644 index 6032b865..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/safari_test.js +++ /dev/null @@ -1,108 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const webdriver = require('..'), - proxy = require('../proxy'), - safari = require('../safari'), - assert = require('../testing/assert'), - test = require('../lib/test'); - - -describe('safari.Options', function() { - describe('fromCapabilities', function() { - it('returns a new Options instance if none were defined', function() { - let options = safari.Options.fromCapabilities( - new webdriver.Capabilities()); - assert(options).instanceOf(safari.Options); - }); - - it('returns the options instance if present', function() { - let options = new safari.Options().setCleanSession(true), - caps = options.toCapabilities(); - assert(safari.Options.fromCapabilities(caps)).equalTo(options); - }); - - it('extracts supported WebDriver capabilities', function() { - let proxyPrefs = proxy.direct(), - logPrefs = {}, - caps = webdriver.Capabilities.chrome() - .set(webdriver.Capability.PROXY, proxyPrefs) - .set(webdriver.Capability.LOGGING_PREFS, logPrefs); - - let options = safari.Options.fromCapabilities(caps); - assert(options.proxy_).equalTo(proxyPrefs); - assert(options.logPrefs_).equalTo(logPrefs); - }); - }); - - describe('toCapabilities', function() { - let options; - - before(function() { - options = new safari.Options() - .setCleanSession(true); - }); - - it('returns a new capabilities object if one is not provided', function() { - let caps = options.toCapabilities(); - assert(caps).instanceOf(webdriver.Capabilities); - assert(caps.get('browserName')).equalTo('safari'); - assert(caps.get('safari.options')).equalTo(options); - }); - - it('adds to input capabilities object', function() { - let caps = webdriver.Capabilities.safari(); - assert(options.toCapabilities(caps)).equalTo(caps); - assert(caps.get('safari.options')).equalTo(options); - }); - - it('sets generic driver capabilities', function() { - let proxyPrefs = proxy.direct(), - loggingPrefs = {}; - - options - .setLoggingPrefs(loggingPrefs) - .setProxy(proxyPrefs); - - let caps = options.toCapabilities(); - assert(caps.get('proxy')).equalTo(proxyPrefs); - assert(caps.get('loggingPrefs')).equalTo(loggingPrefs); - }); - }); -}); - -test.suite(function(env) { - describe('safaridriver', function() { - let service; - - afterEach(function() { - if (service) { - return service.kill(); - } - }); - - it('can start safaridriver', function() { - service = new safari.ServiceBuilder().build(); - - return service.start().then(function(url) { - assert(url).matches(/127\.0\.0\.1/); - }); - }); - }); -}, {browsers: ['safari']}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/session_test.js b/test-eol-project/node_modules/selenium-webdriver/test/session_test.js deleted file mode 100644 index 93bc7c88..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/session_test.js +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('../testing/assert'); -const chrome = require('../chrome'); -const edge = require('../edge'); -const firefox = require('../firefox'); -const ie = require('../ie'); -const opera = require('../opera'); -const phantomjs = require('../phantomjs'); -const safari = require('../safari'); -const test = require('../lib/test'); -const {Browser} = require('../lib/capabilities'); -const {Pages} = require('../lib/test'); -const {WebDriver} = require('..'); - - -test.suite(function(env) { - var browsers = env.browsers; - - const BROWSER_MAP = new Map([ - [Browser.CHROME, chrome.Driver], - [Browser.EDGE, edge.Driver], - [Browser.FIREFOX, firefox.Driver], - [Browser.INTERNET_EXPLORER, ie.Driver], - [Browser.OPERA, opera.Driver], - [Browser.PHANTOM_JS, phantomjs.Driver], - [Browser.SAFARI, safari.Driver], - ]); - - if (BROWSER_MAP.has(env.currentBrowser())) { - describe('builder creates thenable driver instances', function() { - let driver; - - after(() => driver && driver.quit()); - - it(env.currentBrowser(), function() { - driver = env.builder().build(); - - const want = BROWSER_MAP.get(env.currentBrowser()); - assert(driver).instanceOf(want, - `want ${want.name}, but got ${driver.name}`); - assert(typeof driver.then).equalTo('function'); - - return driver - .then( - d => assert(d) - .instanceOf(want, `want ${want.name}, but got ${d.name}`)) - // Load something so the safari driver doesn't crash from starting and - // stopping in short time. - .then(() => driver.get(Pages.echoPage)); - }); - }); - } - - describe('session management', function() { - var driver; - test.before(function*() { - driver = yield env.builder().build(); - }); - - test.after(function() { - return driver.quit(); - }); - - test.it('can connect to an existing session', function*() { - yield driver.get(Pages.simpleTestPage); - yield assert(driver.getTitle()).equalTo('Hello WebDriver'); - - return driver.getSession().then(session1 => { - let driver2 = WebDriver.attachToSession( - driver.getExecutor(), - session1.getId()); - - return assert(driver2.getTitle()).equalTo('Hello WebDriver') - .then(_ => { - let session2Id = driver2.getSession().then(s => s.getId()); - return assert(session2Id).equalTo(session1.getId()); - }); - }); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js b/test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js deleted file mode 100644 index d00b5d44..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/stale_element_test.js +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fail = require('assert').fail; - -var Browser = require('..').Browser, - By = require('..').By, - error = require('..').error, - until = require('..').until, - assert = require('../testing/assert'), - test = require('../lib/test'), - Pages = test.Pages; - - -test.suite(function(env) { - var driver; - test.before(function*() { driver = yield env.builder().build(); }); - test.after(function() { return driver.quit(); }); - - // Element never goes stale in Safari. - test.ignore(env.browsers(Browser.SAFARI)). - it( - 'dynamically removing elements from the DOM trigger a ' + - 'StaleElementReferenceError', - function*() { - yield driver.get(Pages.javascriptPage); - - var toBeDeleted = yield driver.findElement(By.id('deleted')); - yield assert(toBeDeleted.getTagName()).isEqualTo('p'); - - yield driver.findElement(By.id('delete')).click(); - yield driver.wait(until.stalenessOf(toBeDeleted), 5000); - }); - - test.it('an element found in a different frame is stale', function*() { - yield driver.get(Pages.missedJsReferencePage); - - var frame = yield driver.findElement(By.css('iframe[name="inner"]')); - yield driver.switchTo().frame(frame); - - var el = yield driver.findElement(By.id('oneline')); - yield driver.switchTo().defaultContent(); - return el.getText().then(fail, function(e) { - assert(e).instanceOf(error.StaleElementReferenceError); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js b/test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js deleted file mode 100644 index b934e6bb..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/tag_name_test.js +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var By = require('..').By, - assert = require('../testing/assert'), - test = require('../lib/test'); - - -test.suite(function(env) { - var driver; - test.after(function() { return driver.quit(); }); - - test.it('should return lower case tag name', function*() { - driver = yield env.builder().build(); - yield driver.get(test.Pages.formPage); - - let el = yield driver.findElement(By.id('cheese')); - return assert(el.getTagName()).equalTo('input'); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js b/test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js deleted file mode 100644 index eaced8bf..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/testing/assert_test.js +++ /dev/null @@ -1,373 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('../../testing/assert'); - -const AssertionError = require('assert').AssertionError; -const assertTrue = require('assert').ok; -const assertEqual = require('assert').equal; -const assertThrows = require('assert').throws; -const fail = require('assert').fail; - - -describe('assert', function() { - describe('atLeast', function() { - it('compares subject >= value', function() { - assert(1).atLeast(0); - assert(1).atLeast(1); - assertThrows(() => assert(1).atLeast(2)); - }); - - it('accepts failure message', function() { - assertThrows( - () => assert(1).atLeast(2, 'hi there!'), - (error) => error.message.indexOf('hi there') != -1); - }); - - it('fails if given a non-numeric subject', function() { - assertThrows(() => assert('a').atLeast(1)); - }); - - it('fails if given a non-numeric bound', function() { - assertThrows(() => assert(1).atLeast('a')); - }); - - it('waits for promised subject', function() { - return assert(Promise.resolve(123)).atLeast(100); - }); - - it('waits for promised subject (with failure)', function() { - return assert(Promise.resolve(100)) - .atLeast(123) - .then(() => fail('should have failed'), function(e) { - assertInstanceOf(AssertionError, e); - assertEqual('100 >= 123', e.message); - }); - }); - }); - - describe('atMost', function() { - it('compares subject <= value', function() { - assertThrows(() => assert(1).atMost(0)); - assert(1).atMost(1); - assert(1).atMost(2); - }); - - it('accepts failure message', function() { - assertThrows( - () => assert(1).atMost(0, 'hi there!'), - (error) => error.message.indexOf('hi there!') != -1); - }); - - it('fails if given a non-numeric subject', function() { - assertThrows(() => assert(1).atMost('a')); - }); - - it('fails if given a non-numeric bound', function() { - assertThrows(() => assert('a').atMost(1)); - }); - - it('waits for promised subject', function() { - return assert(Promise.resolve(100)).atMost(123); - }); - - it('waits for promised subject (with failure)', function() { - return assert(Promise.resolve(123)) - .atMost(100) - .then(() => fail('should have failed'), function(e) { - assertInstanceOf(AssertionError, e); - assertEqual('123 <= 100', e.message); - }); - }); - }); - - describe('greaterThan', function() { - it('compares subject > value', function() { - assertThrows(() => assert(1).greaterThan(1)); - assertThrows(() => assert(1).greaterThan(2)); - assert(2).greaterThan(1); - }); - - it('accepts failure message', function() { - assertThrows( - () => assert(0).greaterThan(1, 'hi there!'), - (error) => error.message.indexOf('hi there!') != -1); - }); - - it('fails if given a non-numeric subject', function() { - assertThrows(() => assert('a').atMost(1)); - }); - - it('fails if given a non-numeric bound', function() { - assertThrows(() => assert(1).atMost('a')); - }); - - it('waits for promised subject', function() { - return assert(Promise.resolve(123)).greaterThan(100); - }); - - it('waits for promised subject (with failure)', function() { - return assert(Promise.resolve(100)) - .greaterThan(123) - .then(() => fail('should have failed'), function(e) { - assertInstanceOf(AssertionError, e); - assertEqual('100 > 123', e.message); - }); - }); - }); - - describe('lessThan', function() { - it('compares subject < value', function() { - assertThrows(() => assert(1).lessThan(0)); - assertThrows(() => assert(1).lessThan(1)); - assert(1).lessThan(2); - }); - - it('accepts failure message', function() { - assertThrows( - () => assert(1).lessThan(0, 'hi there!'), - (error) => error.message.indexOf('hi there!') != -1); - }); - - it('fails if given a non-numeric subject', function() { - assertThrows(() => assert('a').lessThan(1)); - }); - - it('fails if given a non-numeric bound', function() { - assertThrows(() => assert(1).lessThan('a')); - }); - - it('waits for promised subject', function() { - return assert(Promise.resolve(100)).lessThan(123); - }); - - it('waits for promised subject (with failure)', function() { - return assert(Promise.resolve(123)) - .lessThan(100) - .then(() => fail('should have failed'), function(e) { - assertInstanceOf(AssertionError, e); - assertEqual('123 < 100', e.message); - }); - }); - }); - - describe('closeTo', function() { - it('accepts values within epislon of target', function() { - assert(123).closeTo(123, 0); - assert(123).closeTo(124, 1); - assert(125).closeTo(124, 1); - - assertThrows(() => assert(123).closeTo(125, .1)); - assertThrows(() => assert(1./3).closeTo(.8, .01)); - }); - - it('waits for promised values', function() { - let p = new Promise(resolve => setTimeout(() => resolve(123), 10)); - return assert(p).closeTo(124, 1); - }); - }); - - describe('instanceOf', function() { - it('works with direct instances', function() { - assert(Error('foo')).instanceOf(Error); - }); - - it('works with sub-types', function() { - assert(TypeError('foo')).instanceOf(Error); - }); - - it('parent types are not instances of sub-types', function() { - assertThrows(() => assert(Error('foo')).instanceOf(TypeError)); - }); - }); - - describe('isNull', function() { - it('normal case', function() { - assert(null).isNull(); - assertThrows(() => assert(1).isNull()); - }); - - it('handles promised values', function() { - let p = new Promise(function(f) { - setTimeout(() => f(null), 10); - }); - return assert(p).isNull(); - }); - - it('does not match on undefined', function() { - assertThrows(() => assert(void(0)).isNull()); - }) - }); - - describe('isUndefined', function() { - it('normal case', function() { - assert(void(0)).isUndefined(); - assertThrows(() => assert(1).isUndefined()); - }); - - it('handles promised values', function() { - let p = new Promise(function(f) { - setTimeout(() => f(void(0)), 10); - }); - return assert(p).isUndefined(); - }); - - it('does not match on null', function() { - assertThrows(() => assert(null).isUndefined()); - }) - }); - - describe('contains', function() { - it('works with strings', function() { - assert('abc').contains('a'); - assert('abc').contains('ab'); - assert('abc').contains('abc'); - assert('abc').contains('bc'); - assert('abc').contains('c'); - assertThrows(() => assert('abc').contains('d')); - }); - - it('works with arrays', function() { - assert([1, 2, 3]).contains(1); - assert([1, 2, 3]).contains(2); - assert([1, 2, 3]).contains(3); - assertThrows(() => assert([1, 2]).contains(3)); - }); - - it('works with maps', function() { - let m = new Map; - m.set(1, 2); - assert(m).contains(1); - assertThrows(() => assert(m).contains(2)); - }); - - it('works with sets', function() { - let s = new Set; - s.add(1); - assert(s).contains(1); - assertThrows(() => assert(s).contains(2)); - }); - - it('requires an array, string, map, or set subject', function() { - assertThrows(() => assert(123).contains('a')); - }); - }); - - describe('endsWith', function() { - it('works', function() { - assert('abc').endsWith('abc'); - assert('abc').endsWith('bc'); - assert('abc').endsWith('c'); - assertThrows(() => assert('abc').endsWith('d')); - }) - }); - - describe('startsWith', function() { - it('works', function() { - assert('abc').startsWith('abc'); - assert('abc').startsWith('ab'); - assert('abc').startsWith('a'); - assertThrows(() => assert('abc').startsWith('d')); - }) - }); - - describe('matches', function() { - it('requires a regex value', function() { - assertThrows(() => assert('abc').matches(1234)); - }); - - it('requires a string value', function() { - assertThrows(() => assert(1234).matches(/abc/)); - }); - - it('requires a string value (promise case)', function() { - return assert(Promise.resolve(1234)) - .matches(/abc/) - .then(fail, function(error) { - assertEqual( - 'Expected a string matching /abc/, got <1234> (number)', - error.message); - }); - }); - - it('applies regex', function() { - assert('abc').matches(/abc/); - assertThrows(() => assert('def').matches(/abc/)); - }); - }); - - describe('isTrue', function() { - it('only accepts booleans', function() { - assertThrows(() => assert(123).isTrue()); - }); - - it('accepts true values', function() { - assert(true).isTrue(); - assert(Boolean('abc')).isTrue(); - return assert(Promise.resolve(true)).isTrue(); - }); - - it('rejects false values', function() { - assertThrows(() => assert(false).isTrue()); - assertThrows(() => assert(Boolean(0)).isTrue()); - return assert(Promise.resolve(false)).isTrue() - .then(fail, function() {/*no-op, ok*/}); - }); - }); - - describe('isFalse', function() { - it('only accepts booleans', function() { - assertThrows(() => assert(123).isFalse()); - }) - - it('accepts false values', function() { - assert(false).isFalse(); - assert(Boolean('')).isFalse(); - return assert(Promise.resolve(false)).isFalse(); - }); - - it('rejects true values', function() { - assertThrows(() => assert(true).isFalse()); - assertThrows(() => assert(Boolean(1)).isFalse()); - return assert(Promise.resolve(true)).isFalse() - .then(fail, function() {/*no-op, ok*/}); - }); - }); - - describe('isEqualTo', function() { - it('is strict equality', function() { - assert('abc').isEqualTo('abc'); - assert('abc').equals('abc'); - assert('abc').equalTo('abc'); - assertThrows(() => assert('1').isEqualTo(1)); - }); - }); - - describe('notEqualTo', function() { - it('tests strict equality', function() { - assert('1').notEqualTo(1); - assert(1).notEqualTo('1'); - assertThrows(() => assert('abc').notEqualTo('abc')); - }); - }); - - function assertInstanceOf(ctor, value) { - assertTrue(value instanceof ctor); - } -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js b/test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js deleted file mode 100644 index edc841bb..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/testing/index_test.js +++ /dev/null @@ -1,224 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -const assert = require('assert'); -const promise = require('../..').promise; -const {enablePromiseManager} = require('../../lib/test/promise'); - - -var test = require('../../testing'); - -describe('Mocha Integration', function() { - - describe('beforeEach properly binds "this"', function() { - beforeEach(function() { this.x = 1; }); - test.beforeEach(function() { this.x = 2; }); - it('', function() { assert.equal(this.x, 2); }); - }); - - describe('afterEach properly binds "this"', function() { - it('', function() { this.x = 1; }); - test.afterEach(function() { this.x = 2; }); - afterEach(function() { assert.equal(this.x, 2); }); - }); - - describe('it properly binds "this"', function() { - beforeEach(function() { this.x = 1; }); - test.it('', function() { this.x = 2; }); - afterEach(function() { assert.equal(this.x, 2); }); - }); - - enablePromiseManager(function() { - describe('timeout handling', function() { - describe('it does not reset the control flow on a non-timeout', function() { - var flowReset = false; - - beforeEach(function() { - flowReset = false; - test.controlFlow().once(promise.ControlFlow.EventType.RESET, onreset); - }); - - test.it('', function() { - this.timeout(100); - return promise.delayed(50); - }); - - afterEach(function() { - assert.ok(!flowReset); - test.controlFlow().removeListener( - promise.ControlFlow.EventType.RESET, onreset); - }); - - function onreset() { - flowReset = true; - } - }); - - describe('it resets the control flow after a timeout' ,function() { - var timeoutErr, flowReset; - - beforeEach(function() { - flowReset = false; - test.controlFlow().once(promise.ControlFlow.EventType.RESET, onreset); - }); - - test.it('', function() { - var callback = this.runnable().callback; - var test = this; - this.runnable().callback = function(err) { - timeoutErr = err; - // Reset our timeout to 0 so Mocha does not fail the test. - test.timeout(0); - // When we invoke the real callback, do not pass along the error so - // Mocha does not fail the test. - return callback.call(this); - }; - - test.timeout(50); - return promise.defer().promise; - }); - - afterEach(function() { - return Promise.resolve().then(function() { - test.controlFlow().removeListener( - promise.ControlFlow.EventType.RESET, onreset); - assert.ok(flowReset, 'control flow was not reset after a timeout'); - }); - }); - - function onreset() { - flowReset = true; - } - }); - }); - - describe('async "done" support', function() { - this.timeout(2*1000); - - var waited = false; - var DELAY = 100; // ms enough to notice - - // Each test asynchronously sets waited to true, so clear/check waited - // before/after: - beforeEach(function() { - waited = false; - }); - - afterEach(function() { - assert.strictEqual(waited, true); - }); - - // --- First, vanilla mocha "it" should support the "done" callback correctly. - - // This 'it' should block until 'done' is invoked - it('vanilla delayed', function(done) { - setTimeout(function delayedVanillaTimeout() { - waited = true; - done(); - }, DELAY); - }); - - // --- Now with the webdriver wrappers for 'it' should support the "done" callback: - - test.it('delayed', function(done) { - assert(done); - assert.strictEqual(typeof done, 'function'); - setTimeout(function delayedTimeoutCallback() { - waited = true; - done(); - }, DELAY); - }); - - // --- And test that the webdriver wrapper for 'it' works with a returned promise, too: - - test.it('delayed by promise', function() { - var defer = promise.defer(); - setTimeout(function delayedPromiseCallback() { - waited = true; - defer.fulfill('ignored'); - }); - return defer.promise; - }); - }); - - describe('ControlFlow and "done" work together', function() { - var flow, order; - before(function() { - order = []; - flow = test.controlFlow(); - flow.execute(function() { order.push(1); }); - }); - - test.it('control flow updates and async done', function(done) { - flow.execute(function() { order.push(2); }); - flow.execute(function() { order.push(3); }).then(function() { - order.push(4); - }); - done(); - }); - - after(function() { - assert.deepEqual([1, 2, 3, 4], order); - }); - }); - }); - - describe('generator support', function() { - let arr; - - beforeEach(() => arr = []); - afterEach(() => assert.deepEqual(arr, [0, 1, 2, 3])); - - test.it('sync generator', function* () { - arr.push(yield arr.length); - arr.push(yield arr.length); - arr.push(yield arr.length); - arr.push(yield arr.length); - }); - - test.it('async generator', function* () { - arr.push(yield Promise.resolve(arr.length)); - arr.push(yield Promise.resolve(arr.length)); - arr.push(yield Promise.resolve(arr.length)); - arr.push(yield Promise.resolve(arr.length)); - }); - - test.it('generator returns promise', function*() { - arr.push(yield Promise.resolve(arr.length)); - arr.push(yield Promise.resolve(arr.length)); - arr.push(yield Promise.resolve(arr.length)); - setTimeout(_ => arr.push(arr.length), 10); - return new Promise((resolve) => setTimeout(_ => resolve(), 25)); - }); - - describe('generator runs with proper "this" context', () => { - before(function() { this.values = [0, 1, 2, 3]; }); - test.it('', function*() { - arr = this.values; - }); - }); - - it('generator function must not take a callback', function() { - arr = [0, 1, 2, 3]; // For teardown hook. - assert.throws(_ => { - test.it('', function*(done){}); - }, TypeError); - }); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/upload_test.js b/test-eol-project/node_modules/selenium-webdriver/test/upload_test.js deleted file mode 100644 index c677550f..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/upload_test.js +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var fs = require('fs'); - -var Browser = require('..').Browser, - By = require('..').By, - until = require('..').until, - io = require('../io'), - remote = require('../remote'), - assert = require('../testing/assert'), - test = require('../lib/test'), - Pages = test.Pages; - -test.suite(function(env) { - var LOREM_IPSUM_TEXT = 'lorem ipsum dolor sit amet'; - var FILE_HTML = '
    ' + LOREM_IPSUM_TEXT + '
    '; - - var fp; - test.before(function() { - return fp = io.tmpFile().then(function(fp) { - fs.writeFileSync(fp, FILE_HTML); - return fp; - }); - }) - - var driver; - test.before(function*() { - driver = yield env.builder().build(); - }); - - test.after(function() { - if (driver) { - return driver.quit(); - } - }); - - test.ignore(env.browsers( - Browser.IPAD, - Browser.IPHONE, - // Uploads broken in PhantomJS 2.0. - // See https://github.com/ariya/phantomjs/issues/12506 - Browser.PHANTOM_JS, - Browser.SAFARI)). - it('can upload files', function*() { - driver.setFileDetector(new remote.FileDetector); - - yield driver.get(Pages.uploadPage); - - var fp = yield driver.call(function() { - return io.tmpFile().then(function(fp) { - fs.writeFileSync(fp, FILE_HTML); - return fp; - }); - }); - - yield driver.findElement(By.id('upload')).sendKeys(fp); - yield driver.findElement(By.id('go')).click(); - - // Uploading files across a network may take a while, even if they're small. - var label = yield driver.findElement(By.id('upload_label')); - yield driver.wait(until.elementIsNotVisible(label), - 10 * 1000, 'File took longer than 10 seconds to upload!'); - - var frame = yield driver.findElement(By.id('upload_target')); - yield driver.switchTo().frame(frame); - yield assert(driver.findElement(By.css('body')).getText()) - .equalTo(LOREM_IPSUM_TEXT); - }); -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/test/window_test.js b/test-eol-project/node_modules/selenium-webdriver/test/window_test.js deleted file mode 100644 index 73cdd802..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/test/window_test.js +++ /dev/null @@ -1,161 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -'use strict'; - -var Browser = require('..').Browser, - By = require('..').By, - assert = require('../testing/assert'), - test = require('../lib/test'); - - -test.suite(function(env) { - var driver; - - test.before(function*() { driver = yield env.builder().build(); }); - test.after(function() { return driver.quit(); }); - - test.beforeEach(function() { - return driver.switchTo().defaultContent(); - }); - - test.it('can set size of the current window', function*() { - yield driver.get(test.Pages.echoPage); - yield changeSizeBy(-20, -20); - }); - - test.it('can set size of the current window from frame', function*() { - yield driver.get(test.Pages.framesetPage); - - var frame = yield driver.findElement({css: 'frame[name="fourth"]'}); - yield driver.switchTo().frame(frame); - yield changeSizeBy(-20, -20); - }); - - test.it('can set size of the current window from iframe', function*() { - yield driver.get(test.Pages.iframePage); - - var frame = yield driver.findElement({css: 'iframe[name="iframe1-name"]'}); - yield driver.switchTo().frame(frame); - yield changeSizeBy(-20, -20); - }); - - test.it('can switch to a new window', function*() { - yield driver.get(test.Pages.xhtmlTestPage); - - let handle = yield driver.getWindowHandle(); - let originalHandles = yield driver.getAllWindowHandles(); - - yield driver.findElement(By.linkText("Open new window")).click(); - yield driver.wait(forNewWindowToBeOpened(originalHandles), 2000); - yield assert(driver.getTitle()).equalTo("XHTML Test Page"); - - let newHandle = yield getNewWindowHandle(originalHandles); - - yield driver.switchTo().window(newHandle); - yield assert(driver.getTitle()).equalTo("We Arrive Here"); - }); - - test.it('can set the window position of the current window', function*() { - let position = yield driver.manage().window().getPosition(); - - yield driver.manage().window().setSize(640, 480); - yield driver.manage().window().setPosition(position.x + 10, position.y + 10); - - // For phantomjs, setPosition is a no-op and the "window" stays at (0, 0) - if (env.currentBrowser() === Browser.PHANTOM_JS) { - position = yield driver.manage().window().getPosition(); - assert(position.x).equalTo(0); - assert(position.y).equalTo(0); - } else { - var dx = position.x + 10; - var dy = position.y + 10; - return driver.wait(forPositionToBe(dx, dy), 1000); - } - }); - - test.it('can set the window position from a frame', function*() { - yield driver.get(test.Pages.iframePage); - - let frame = yield driver.findElement(By.name('iframe1-name')); - yield driver.switchTo().frame(frame); - - let position = yield driver.manage().window().getPosition(); - yield driver.manage().window().setSize(640, 480); - yield driver.manage().window().setPosition(position.x + 10, position.y + 10); - - // For phantomjs, setPosition is a no-op and the "window" stays at (0, 0) - if (env.currentBrowser() === Browser.PHANTOM_JS) { - return driver.manage().window().getPosition().then(function(position) { - assert(position.x).equalTo(0); - assert(position.y).equalTo(0); - }); - } else { - var dx = position.x + 10; - var dy = position.y + 10; - return driver.wait(forPositionToBe(dx, dy), 1000); - } - }); - - function changeSizeBy(dx, dy) { - return driver.manage().window().getSize().then(function(size) { - return driver.manage().window() - .setSize(size.width + dx, size.height + dy) - .then(_ => { - return driver.wait( - forSizeToBe(size.width + dx, size.height + dy), 1000); - }); - }); - } - - function forSizeToBe(w, h) { - return function() { - return driver.manage().window().getSize().then(function(size) { - return size.width === w && size.height === h; - }); - }; - } - - function forPositionToBe(x, y) { - return function() { - return driver.manage().window().getPosition().then(function(position) { - return position.x === x && - // On OSX, the window height may be bumped down 22px for the top - // status bar. - // On Linux, Opera's window position will be off by 28px. - (position.y >= y && position.y <= (y + 28)); - }); - }; - } - - function forNewWindowToBeOpened(originalHandles) { - return function() { - return driver.getAllWindowHandles().then(function(currentHandles) { - return currentHandles.length > originalHandles.length; - }); - }; - } - - function getNewWindowHandle(originalHandles) { - // Note: this assumes there's just one new window. - return driver.getAllWindowHandles().then(function(currentHandles) { - return currentHandles.filter(function(i) { - return originalHandles.indexOf(i) < 0; - })[0]; - }); - } -}); diff --git a/test-eol-project/node_modules/selenium-webdriver/testing/assert.js b/test-eol-project/node_modules/selenium-webdriver/testing/assert.js deleted file mode 100644 index 253aca03..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/testing/assert.js +++ /dev/null @@ -1,378 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Defines a library that simplifies writing assertions against - * promised values. - * - * >
    - * > __NOTE:__ This module is considered experimental and is subject to - * > change, or removal, at any time! - * >
    - * - * Sample usage: - * - * var driver = new webdriver.Builder().build(); - * driver.get('http://www.google.com'); - * - * assert(driver.getTitle()).equalTo('Google'); - */ - -'use strict'; - -const assert = require('assert'); - -function trueType(v) { - if (v === null) { - return 'null'; - } - - let type = typeof v; - if (type === 'object') { - if (Array.isArray(v)) { - type = 'array'; - } - } - return type; -} - - -function checkType(v, want) { - let got = trueType(v); - if (got !== want) { - throw new TypeError('require ' + want + ', but got ' + got); - } - return v; -} - -const checkNumber = v => checkType(v, 'number'); -const checkFunction = v => checkType(v, 'function'); -const checkString = v => checkType(v, 'string'); - -const isFunction = v => trueType(v) === 'function'; -const isNumber = v => trueType(v) === 'number'; -const isObject = v => trueType(v) === 'object'; -const isString = v => trueType(v) === 'string'; - - -function describe(value) { - let ret; - try { - ret = `<${String(value)}>`; - } catch (e) { - ret = ``; - } - - if (null !== value && void(0) !== value) { - ret += ` (${trueType(value)})`; - } - - return ret; -} - - -function evaluate(value, predicate) { - if (isObject(value) && isFunction(value.then)) { - return value.then(predicate); - } - predicate(value); -} - - -/** - * @private - */ -class Assertion { - /** - * @param {?} subject The subject of this assertion. - * @param {boolean=} opt_invert Whether to invert any assertions performed by - * this instance. - */ - constructor(subject, opt_invert) { - /** @private {?} */ - this.subject_ = subject; - /** @private {boolean} */ - this.invert_ = !!opt_invert; - } - - /** - * @param {number} expected The minimum permissible value (inclusive). - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - atLeast(expected, opt_message) { - checkNumber(expected); - return evaluate(this.subject_, function(actual) { - if (!isNumber(actual) || actual < expected) { - assert.fail(actual, expected, opt_message, '>='); - } - }); - } - - /** - * @param {number} expected The maximum permissible value (inclusive). - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - atMost(expected, opt_message) { - checkNumber(expected); - return evaluate(this.subject_, function (actual) { - if (!isNumber(actual) || actual > expected) { - assert.fail(actual, expected, opt_message, '<='); - } - }); - } - - /** - * @param {number} expected The maximum permissible value (exclusive). - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - greaterThan(expected, opt_message) { - checkNumber(expected); - return evaluate(this.subject_, function(actual) { - if (!isNumber(actual) || actual <= expected) { - assert.fail(actual, expected, opt_message, '>'); - } - }); - } - - /** - * @param {number} expected The minimum permissible value (exclusive). - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - lessThan(expected, opt_message) { - checkNumber(expected); - return evaluate(this.subject_, function (actual) { - if (!isNumber(actual) || actual >= expected) { - assert.fail(actual, expected, opt_message, '<'); - } - }); - } - - /** - * @param {number} expected The desired value. - * @param {number} epsilon The maximum distance from the desired value. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - closeTo(expected, epsilon, opt_message) { - checkNumber(expected); - checkNumber(epsilon); - return evaluate(this.subject_, function(actual) { - checkNumber(actual); - if (Math.abs(expected - actual) > epsilon) { - assert.fail(opt_message || `${actual} === ${expected} (± ${epsilon})`); - } - }); - } - - /** - * @param {function(new: ?)} ctor The exptected type's constructor. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - instanceOf(ctor, opt_message) { - checkFunction(ctor); - return evaluate(this.subject_, function(actual) { - if (!(actual instanceof ctor)) { - assert.fail( - opt_message - || `${describe(actual)} instanceof ${ctor.name || ctor}`); - } - }); - } - - /** - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - isNull(opt_message) { - return this.isEqualTo(null); - } - - /** - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - isUndefined(opt_message) { - return this.isEqualTo(void(0)); - } - - /** - * Ensures the subject of this assertion is either a string or array - * containing the given `value`. - * - * @param {?} value The value expected to be contained within the subject. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - contains(value, opt_message) { - return evaluate(this.subject_, function(actual) { - if (actual instanceof Map || actual instanceof Set) { - assert.ok(actual.has(value), opt_message || `${actual}.has(${value})`); - } else if (Array.isArray(actual) || isString(actual)) { - assert.ok( - actual.indexOf(value) !== -1, - opt_message || `${actual}.indexOf(${value}) !== -1`); - } else { - assert.fail( - `Expected an array, map, set, or string: got ${describe(actual)}`); - } - }); - } - - /** - * @param {string} str The expected suffix. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - endsWith(str, opt_message) { - checkString(str); - return evaluate(this.subject_, function(actual) { - if (!isString(actual) || !actual.endsWith(str)) { - assert.fail(actual, str, 'ends with'); - } - }); - } - - /** - * @param {string} str The expected prefix. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - startsWith(str, opt_message) { - checkString(str); - return evaluate(this.subject_, function(actual) { - if (!isString(actual) || !actual.startsWith(str)) { - assert.fail(actual, str, 'starts with'); - } - }); - } - - /** - * @param {!RegExp} regex The regex the subject is expected to match. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - matches(regex, opt_message) { - if (!(regex instanceof RegExp)) { - throw TypeError(`Not a RegExp: ${describe(regex)}`); - } - return evaluate(this.subject_, function(actual) { - if (!isString(actual) || !regex.test(actual)) { - let message = opt_message - || `Expected a string matching ${regex}, got ${describe(actual)}`; - assert.fail(actual, regex, message); - } - }); - } - - /** - * @param {?} value The unexpected value. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - notEqualTo(value, opt_message) { - return evaluate(this.subject_, function(actual) { - assert.notStrictEqual(actual, value, opt_message); - }); - } - - /** An alias for {@link #isEqualTo}. */ - equalTo(value, opt_message) { - return this.isEqualTo(value, opt_message); - } - - /** An alias for {@link #isEqualTo}. */ - equals(value, opt_message) { - return this.isEqualTo(value, opt_message); - } - - /** - * @param {?} value The expected value. - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - isEqualTo(value, opt_message) { - return evaluate(this.subject_, function(actual) { - assert.strictEqual(actual, value, opt_message); - }); - } - - /** - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - isTrue(opt_message) { - return this.isEqualTo(true, opt_message); - } - - /** - * @param {string=} opt_message An optional failure message. - * @return {(Promise|undefined)} The result of this assertion, if the subject - * is a promised-value. Otherwise, the assertion is performed immediately - * and nothing is returned. - */ - isFalse(opt_message) { - return this.isEqualTo(false, opt_message); - } -} - - -// PUBLIC API - - -/** - * Creates an assertion about the given `value`. - * @return {!Assertion} the new assertion. - */ -module.exports = function assertThat(value) { - return new Assertion(value); -}; -module.exports.Assertion = Assertion; // Exported to help generated docs diff --git a/test-eol-project/node_modules/selenium-webdriver/testing/index.js b/test-eol-project/node_modules/selenium-webdriver/testing/index.js deleted file mode 100644 index 4bd677aa..00000000 --- a/test-eol-project/node_modules/selenium-webdriver/testing/index.js +++ /dev/null @@ -1,426 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -/** - * @fileoverview Provides wrappers around the following global functions from - * [Mocha's BDD interface](https://github.com/mochajs/mocha): - * - * - after - * - afterEach - * - before - * - beforeEach - * - it - * - it.only - * - it.skip - * - xit - * - * Each of the wrapped functions support generator functions. If the generator - * {@linkplain ../lib/promise.consume yields a promise}, the test will wait - * for that promise to resolve before invoking the next iteration of the - * generator: - * - * test.it('generators', function*() { - * let x = yield Promise.resolve(1); - * assert.equal(x, 1); - * }); - * - * The provided wrappers leverage the {@link webdriver.promise.ControlFlow} - * to simplify writing asynchronous tests: - * - * var {Builder, By, Key, until} = require('selenium-webdriver'); - * var test = require('selenium-webdriver/testing'); - * - * test.describe('Google Search', function() { - * var driver; - * - * test.before(function() { - * driver = new Builder().forBrowser('firefox').build(); - * }); - * - * test.after(function() { - * driver.quit(); - * }); - * - * test.it('should append query to title', function() { - * driver.get('http://www.google.com/ncr'); - * driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN); - * driver.wait(until.titleIs('webdriver - Google Search'), 1000); - * }); - * }); - * - * You may conditionally suppress a test function using the exported - * "ignore" function. If the provided predicate returns true, the attached - * test case will be skipped: - * - * test.ignore(maybe()).it('is flaky', function() { - * if (Math.random() < 0.5) throw Error(); - * }); - * - * function maybe() { return Math.random() < 0.5; } - */ - -'use strict'; - -const promise = require('..').promise; -const flow = (function() { - const initial = process.env['SELENIUM_PROMISE_MANAGER']; - try { - process.env['SELENIUM_PROMISE_MANAGER'] = '1'; - return promise.controlFlow(); - } finally { - if (initial === undefined) { - delete process.env['SELENIUM_PROMISE_MANAGER']; - } else { - process.env['SELENIUM_PROMISE_MANAGER'] = initial; - } - } -})(); - - -/** - * Wraps a function so that all passed arguments are ignored. - * @param {!Function} fn The function to wrap. - * @return {!Function} The wrapped function. - */ -function seal(fn) { - return function() { - fn(); - }; -} - - -/** - * Wraps a function on Mocha's BDD interface so it runs inside a - * webdriver.promise.ControlFlow and waits for the flow to complete before - * continuing. - * @param {!Function} globalFn The function to wrap. - * @return {!Function} The new function. - */ -function wrapped(globalFn) { - return function() { - if (arguments.length === 1) { - return globalFn(wrapArgument(arguments[0])); - - } else if (arguments.length === 2) { - return globalFn(arguments[0], wrapArgument(arguments[1])); - - } else { - throw Error('Invalid # arguments: ' + arguments.length); - } - }; -} - - -function wrapArgument(value) { - if (typeof value === 'function') { - return makeAsyncTestFn(value); - } - return value; -} - - -/** - * Make a wrapper to invoke caller's test function, fn. Run the test function - * within a ControlFlow. - * - * Should preserve the semantics of Mocha's Runnable.prototype.run (See - * https://github.com/mochajs/mocha/blob/master/lib/runnable.js#L192) - * - * @param {!Function} fn - * @return {!Function} - */ -function makeAsyncTestFn(fn) { - const isAsync = fn.length > 0; - const isGenerator = promise.isGenerator(fn); - if (isAsync && isGenerator) { - throw TypeError( - 'generator-based tests must not take a callback; for async testing,' - + ' return a promise (or yield on a promise)'); - } - - var ret = /** @type {function(this: mocha.Context)}*/ (function(done) { - const runTest = (resolve, reject) => { - try { - if (isAsync) { - fn.call(this, err => err ? reject(err) : resolve()); - } else if (isGenerator) { - resolve(promise.consume(fn, this)); - } else { - resolve(fn.call(this)); - } - } catch (ex) { - reject(ex); - } - }; - - if (!promise.USE_PROMISE_MANAGER) { - new Promise(runTest).then(seal(done), done); - return; - } - - var runnable = this.runnable(); - var mochaCallback = runnable.callback; - runnable.callback = function() { - flow.reset(); - return mochaCallback.apply(this, arguments); - }; - - flow.execute(function controlFlowExecute() { - return new promise.Promise(function(fulfill, reject) { - return runTest(fulfill, reject); - }, flow); - }, runnable.fullTitle()).then(seal(done), done); - }); - - ret.toString = function() { - return fn.toString(); - }; - - return ret; -} - - -/** - * Ignores the test chained to this function if the provided predicate returns - * true. - * @param {function(): boolean} predicateFn A predicate to call to determine - * if the test should be suppressed. This function MUST be synchronous. - * @return {!Object} An object with wrapped versions of {@link #it()} and - * {@link #describe()} that ignore tests as indicated by the predicate. - */ -function ignore(predicateFn) { - var describe = wrap(exports.xdescribe, exports.describe); - describe.only = wrap(exports.xdescribe, exports.describe.only); - - var it = wrap(exports.xit, exports.it); - it.only = wrap(exports.xit, exports.it.only); - - return { - describe: describe, - it: it - }; - - function wrap(onSkip, onRun) { - return function(title, fn) { - if (predicateFn()) { - onSkip(title, fn); - } else { - onRun(title, fn); - } - }; - } -} - - -/** - * @param {string} name - * @return {!Function} - * @throws {TypeError} - */ -function getMochaGlobal(name) { - let fn = global[name]; - let type = typeof fn; - if (type !== 'function') { - throw TypeError( - `Expected global.${name} to be a function, but is ${type}. ` - + 'This can happen if you try using this module when running ' - + 'with node directly instead of using the mocha executable'); - } - return fn; -} - - -const WRAPPED = { - after: null, - afterEach: null, - before: null, - beforeEach: null, - it: null, - itOnly: null, - xit: null -}; - - -function wrapIt() { - if (!WRAPPED.it) { - let it = getMochaGlobal('it'); - WRAPPED.it = wrapped(it); - WRAPPED.itOnly = wrapped(it.only); - } -} - - - -// PUBLIC API - - -/** - * @return {!promise.ControlFlow} the control flow instance used by this module - * to coordinate test actions. - */ -exports.controlFlow = function(){ - return flow; -}; - - -/** - * Registers a new test suite. - * @param {string} name The suite name. - * @param {function()=} opt_fn The suite function, or `undefined` to define - * a pending test suite. - */ -exports.describe = function(name, opt_fn) { - let fn = getMochaGlobal('describe'); - return opt_fn ? fn(name, opt_fn) : fn(name); -}; - - -/** - * An alias for {@link #describe()} that marks the suite as exclusive, - * suppressing all other test suites. - * @param {string} name The suite name. - * @param {function()=} opt_fn The suite function, or `undefined` to define - * a pending test suite. - */ -exports.describe.only = function(name, opt_fn) { - let desc = getMochaGlobal('describe'); - return opt_fn ? desc.only(name, opt_fn) : desc.only(name); -}; - - -/** - * Defines a suppressed test suite. - * @param {string} name The suite name. - * @param {function()=} opt_fn The suite function, or `undefined` to define - * a pending test suite. - */ -exports.describe.skip = function(name, opt_fn) { - let fn = getMochaGlobal('describe'); - return opt_fn ? fn.skip(name, opt_fn) : fn.skip(name); -}; - - -/** - * Defines a suppressed test suite. - * @param {string} name The suite name. - * @param {function()=} opt_fn The suite function, or `undefined` to define - * a pending test suite. - */ -exports.xdescribe = function(name, opt_fn) { - let fn = getMochaGlobal('xdescribe'); - return opt_fn ? fn(name, opt_fn) : fn(name); -}; - - -/** - * Register a function to call after the current suite finishes. - * @param {function()} fn . - */ -exports.after = function(fn) { - if (!WRAPPED.after) { - WRAPPED.after = wrapped(getMochaGlobal('after')); - } - WRAPPED.after(fn); -}; - - -/** - * Register a function to call after each test in a suite. - * @param {function()} fn . - */ -exports.afterEach = function(fn) { - if (!WRAPPED.afterEach) { - WRAPPED.afterEach = wrapped(getMochaGlobal('afterEach')); - } - WRAPPED.afterEach(fn); -}; - - -/** - * Register a function to call before the current suite starts. - * @param {function()} fn . - */ -exports.before = function(fn) { - if (!WRAPPED.before) { - WRAPPED.before = wrapped(getMochaGlobal('before')); - } - WRAPPED.before(fn); -}; - -/** - * Register a function to call before each test in a suite. - * @param {function()} fn . - */ -exports.beforeEach = function(fn) { - if (!WRAPPED.beforeEach) { - WRAPPED.beforeEach = wrapped(getMochaGlobal('beforeEach')); - } - WRAPPED.beforeEach(fn); -}; - -/** - * Add a test to the current suite. - * @param {string} name The test name. - * @param {function()=} opt_fn The test function, or `undefined` to define - * a pending test case. - */ -exports.it = function(name, opt_fn) { - wrapIt(); - if (opt_fn) { - WRAPPED.it(name, opt_fn); - } else { - WRAPPED.it(name); - } -}; - -/** - * An alias for {@link #it()} that flags the test as the only one that should - * be run within the current suite. - * @param {string} name The test name. - * @param {function()=} opt_fn The test function, or `undefined` to define - * a pending test case. - */ -exports.it.only = function(name, opt_fn) { - wrapIt(); - if (opt_fn) { - WRAPPED.itOnly(name, opt_fn); - } else { - WRAPPED.itOnly(name); - } -}; - - -/** - * Adds a test to the current suite while suppressing it so it is not run. - * @param {string} name The test name. - * @param {function()=} opt_fn The test function, or `undefined` to define - * a pending test case. - */ -exports.xit = function(name, opt_fn) { - if (!WRAPPED.xit) { - WRAPPED.xit = wrapped(getMochaGlobal('xit')); - } - if (opt_fn) { - WRAPPED.xit(name, opt_fn); - } else { - WRAPPED.xit(name); - } -}; - - -exports.it.skip = exports.xit; -exports.ignore = ignore; diff --git a/test-eol-project/node_modules/semver/LICENSE b/test-eol-project/node_modules/semver/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/test-eol-project/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/semver/README.md b/test-eol-project/node_modules/semver/README.md deleted file mode 100644 index f8dfa5a0..00000000 --- a/test-eol-project/node_modules/semver/README.md +++ /dev/null @@ -1,412 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/test-eol-project/node_modules/semver/package.json b/test-eol-project/node_modules/semver/package.json deleted file mode 100644 index db035e97..00000000 --- a/test-eol-project/node_modules/semver/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "semver", - "version": "5.7.2", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap test/ --100 --timeout=30", - "lint": "echo linting disabled", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap test/ --100 --timeout=30", - "posttest": "npm run lint" - }, - "devDependencies": { - "@npmcli/template-oss": "4.17.0", - "tap": "^12.7.0" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "https://github.com/npm/node-semver.git" - }, - "bin": { - "semver": "./bin/semver" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "content": "./scripts/template-oss", - "version": "4.17.0" - } -} diff --git a/test-eol-project/node_modules/semver/range.bnf b/test-eol-project/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d..00000000 --- a/test-eol-project/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/test-eol-project/node_modules/semver/semver.js b/test-eol-project/node_modules/semver/semver.js deleted file mode 100644 index dcb68334..00000000 --- a/test-eol-project/node_modules/semver/semver.js +++ /dev/null @@ -1,1525 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -// The actual regexps go on exports.re -var re = exports.re = [] -var safeRe = exports.safeRe = [] -var src = exports.src = [] -var R = 0 - -var LETTERDASHNUMBER = '[a-zA-Z0-9-]' - -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -var safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] - -function makeSafeRe (value) { - for (var i = 0; i < safeRegexReplacements.length; i++) { - var token = safeRegexReplacements[i][0] - var max = safeRegexReplacements[i][1] - value = value - .split(token + '*').join(token + '{0,' + max + '}') - .split(token + '+').join(token + '{1,' + max + '}') - } - return value -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '\\d+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - - // Replace all greedy whitespace to prevent regex dos issues. These regex are - // used internally via the safeRe object since all inputs in this library get - // normalized first to trim and collapse all extra whitespace. The original - // regexes are exported for userland consumption and lower level usage. A - // future breaking change could export the safer regex only with a note that - // all input should have extra whitespace removed. - safeRe[i] = new RegExp(makeSafeRe(src[i])) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') - - // First, split based on boolean or || - this.set = this.raw.split('||').map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + this.raw) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, safeRe[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(safeRe[CARETTRIM], caretTrimReplace) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(safeRe[STAR], '') -} - -// This function is passed to string.replace(safeRe[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(safeRe[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/test-eol-project/node_modules/set-blocking/CHANGELOG.md b/test-eol-project/node_modules/set-blocking/CHANGELOG.md deleted file mode 100644 index 03bf5919..00000000 --- a/test-eol-project/node_modules/set-blocking/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) - - -### Features - -* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) - - -### BREAKING CHANGES - -* stdio/stderr will not be set to blocking if isTTY === false - - - - -# 1.0.0 (2016-05-14) - - -### Features - -* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/test-eol-project/node_modules/set-blocking/LICENSE.txt b/test-eol-project/node_modules/set-blocking/LICENSE.txt deleted file mode 100644 index 836440be..00000000 --- a/test-eol-project/node_modules/set-blocking/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/set-blocking/README.md b/test-eol-project/node_modules/set-blocking/README.md deleted file mode 100644 index e93b4202..00000000 --- a/test-eol-project/node_modules/set-blocking/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# set-blocking - -[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) -[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) -[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. - -```js -const setBlocking = require('set-blocking') -setBlocking(true) -console.log(someLargeStringToOutput) -``` - -## Historical Context/Word of Warning - -This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on -newer versions of Node.js (`0.12+`), truncating terminal output. - -You should be mindful of the side-effects caused by using `set-blocking`: - -* if your module sets blocking to `true`, it will effect other modules - consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call - `setBlocking(true)` once we already know we are about to call `process.exit(code)`. -* this patch will not apply to subprocesses spawned with `isTTY = true`, this is - the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). - -## License - -ISC diff --git a/test-eol-project/node_modules/set-blocking/index.js b/test-eol-project/node_modules/set-blocking/index.js deleted file mode 100644 index 6f78774b..00000000 --- a/test-eol-project/node_modules/set-blocking/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function (blocking) { - [process.stdout, process.stderr].forEach(function (stream) { - if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking) - } - }) -} diff --git a/test-eol-project/node_modules/set-blocking/package.json b/test-eol-project/node_modules/set-blocking/package.json deleted file mode 100644 index c082db72..00000000 --- a/test-eol-project/node_modules/set-blocking/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "set-blocking", - "version": "2.0.0", - "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc mocha ./test/*.js", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "version": "standard-version" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/yargs/set-blocking.git" - }, - "keywords": [ - "flush", - "terminal", - "blocking", - "shim", - "stdio", - "stderr" - ], - "author": "Ben Coe ", - "license": "ISC", - "bugs": { - "url": "https://github.com/yargs/set-blocking/issues" - }, - "homepage": "https://github.com/yargs/set-blocking#readme", - "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.9", - "mocha": "^2.4.5", - "nyc": "^6.4.4", - "standard": "^7.0.1", - "standard-version": "^2.2.1" - }, - "files": [ - "index.js", - "LICENSE.txt" - ] -} \ No newline at end of file diff --git a/test-eol-project/node_modules/setimmediate/LICENSE.txt b/test-eol-project/node_modules/setimmediate/LICENSE.txt deleted file mode 100644 index 32b20de6..00000000 --- a/test-eol-project/node_modules/setimmediate/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola - -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/test-eol-project/node_modules/setimmediate/package.json b/test-eol-project/node_modules/setimmediate/package.json deleted file mode 100644 index 9b211e43..00000000 --- a/test-eol-project/node_modules/setimmediate/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "setimmediate", - "description": "A shim for the setImmediate efficient script yielding API", - "version": "1.0.5", - "author": "YuzuJS", - "contributors": [ - "Domenic Denicola (https://domenic.me)", - "Donavon West (http://donavon.com)", - "Yaffle" - ], - "license": "MIT", - "repository": "YuzuJS/setImmediate", - "main": "setImmediate.js", - "files": [ - "setImmediate.js" - ], - "scripts": { - "lint": "jshint setImmediate.js", - "test": "mocha test/tests.js", - "test-browser": "opener http://localhost:9008/__zuul && zuul test/tests.js --ui mocha-bdd --local 9008", - "test-browser-only": "opener http://localhost:9007/test/browserOnly/index.html && http-server . -p 9007" - }, - "devDependencies": { - "jshint": "^2.5.0", - "mocha": "~1.18.2", - "http-server": "~0.6.1", - "opener": "^1.3", - "zuul": "^1.6.4" - } -} diff --git a/test-eol-project/node_modules/setimmediate/setImmediate.js b/test-eol-project/node_modules/setimmediate/setImmediate.js deleted file mode 100644 index 3c1b06e6..00000000 --- a/test-eol-project/node_modules/setimmediate/setImmediate.js +++ /dev/null @@ -1,186 +0,0 @@ -(function (global, undefined) { - "use strict"; - - if (global.setImmediate) { - return; - } - - var nextHandle = 1; // Spec says greater than zero - var tasksByHandle = {}; - var currentlyRunningATask = false; - var doc = global.document; - var registerImmediate; - - function setImmediate(callback) { - // Callback can either be a function or a string - if (typeof callback !== "function") { - callback = new Function("" + callback); - } - // Copy function arguments - var args = new Array(arguments.length - 1); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i + 1]; - } - // Store and register the task - var task = { callback: callback, args: args }; - tasksByHandle[nextHandle] = task; - registerImmediate(nextHandle); - return nextHandle++; - } - - function clearImmediate(handle) { - delete tasksByHandle[handle]; - } - - function run(task) { - var callback = task.callback; - var args = task.args; - switch (args.length) { - case 0: - callback(); - break; - case 1: - callback(args[0]); - break; - case 2: - callback(args[0], args[1]); - break; - case 3: - callback(args[0], args[1], args[2]); - break; - default: - callback.apply(undefined, args); - break; - } - } - - function runIfPresent(handle) { - // From the spec: "Wait until any invocations of this algorithm started before this one have completed." - // So if we're currently running a task, we'll need to delay this invocation. - if (currentlyRunningATask) { - // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a - // "too much recursion" error. - setTimeout(runIfPresent, 0, handle); - } else { - var task = tasksByHandle[handle]; - if (task) { - currentlyRunningATask = true; - try { - run(task); - } finally { - clearImmediate(handle); - currentlyRunningATask = false; - } - } - } - } - - function installNextTickImplementation() { - registerImmediate = function(handle) { - process.nextTick(function () { runIfPresent(handle); }); - }; - } - - function canUsePostMessage() { - // The test against `importScripts` prevents this implementation from being installed inside a web worker, - // where `global.postMessage` means something completely different and can't be used for this purpose. - if (global.postMessage && !global.importScripts) { - var postMessageIsAsynchronous = true; - var oldOnMessage = global.onmessage; - global.onmessage = function() { - postMessageIsAsynchronous = false; - }; - global.postMessage("", "*"); - global.onmessage = oldOnMessage; - return postMessageIsAsynchronous; - } - } - - function installPostMessageImplementation() { - // Installs an event handler on `global` for the `message` event: see - // * https://developer.mozilla.org/en/DOM/window.postMessage - // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages - - var messagePrefix = "setImmediate$" + Math.random() + "$"; - var onGlobalMessage = function(event) { - if (event.source === global && - typeof event.data === "string" && - event.data.indexOf(messagePrefix) === 0) { - runIfPresent(+event.data.slice(messagePrefix.length)); - } - }; - - if (global.addEventListener) { - global.addEventListener("message", onGlobalMessage, false); - } else { - global.attachEvent("onmessage", onGlobalMessage); - } - - registerImmediate = function(handle) { - global.postMessage(messagePrefix + handle, "*"); - }; - } - - function installMessageChannelImplementation() { - var channel = new MessageChannel(); - channel.port1.onmessage = function(event) { - var handle = event.data; - runIfPresent(handle); - }; - - registerImmediate = function(handle) { - channel.port2.postMessage(handle); - }; - } - - function installReadyStateChangeImplementation() { - var html = doc.documentElement; - registerImmediate = function(handle) { - // Create a - -``` - -This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: - -```html - -``` - -## Options - -This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: - -```js -require('source-map-support').install({ - handleUncaughtExceptions: false -}); -``` - -This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. - -```js -require('source-map-support').install({ - retrieveSourceMap: function(source) { - if (source === 'compiled.js') { - return { - url: 'original.js', - map: fs.readFileSync('compiled.js.map', 'utf8') - }; - } - return null; - } -}); -``` - -The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. -In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. - -```js -require('source-map-support').install({ - environment: 'node' -}); -``` - -To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. - - -```js -require('source-map-support').install({ - hookRequire: true -}); -``` - -This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. - -## Demos - -#### Basic Demo - -original.js: - -```js -throw new Error('test'); // This is the original code -``` - -compiled.js: - -```js -require('source-map-support').install(); - -throw new Error('test'); // This is the compiled code -// The next line defines the sourceMapping. -//# sourceMappingURL=compiled.js.map -``` - -compiled.js.map: - -```json -{ - "version": 3, - "file": "compiled.js", - "sources": ["original.js"], - "names": [], - "mappings": ";;AAAA,MAAM,IAAI" -} -``` - -Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): - -``` -$ node compiled.js - -original.js:1 -throw new Error('test'); // This is the original code - ^ -Error: test - at Object. (original.js:1:7) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### TypeScript Demo - -demo.ts: - -```typescript -declare function require(name: string); -require('source-map-support').install(); -class Foo { - constructor() { this.bar(); } - bar() { throw new Error('this is a demo'); } -} -new Foo(); -``` - -Compile and run the file using the TypeScript compiler from the terminal: - -``` -$ npm install source-map-support typescript -$ node_modules/typescript/bin/tsc -sourcemap demo.ts -$ node demo.js - -demo.ts:5 - bar() { throw new Error('this is a demo'); } - ^ -Error: this is a demo - at Foo.bar (demo.ts:5:17) - at new Foo (demo.ts:4:24) - at Object. (demo.ts:7:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### CoffeeScript Demo - -demo.coffee: - -```coffee -require('source-map-support').install() -foo = -> - bar = -> throw new Error 'this is a demo' - bar() -foo() -``` - -Compile and run the file using the CoffeeScript compiler from the terminal: - -```sh -$ npm install source-map-support coffee-script -$ node_modules/coffee-script/bin/coffee --map --compile demo.coffee -$ node demo.js - -demo.coffee:3 - bar = -> throw new Error 'this is a demo' - ^ -Error: this is a demo - at bar (demo.coffee:3:22) - at foo (demo.coffee:4:3) - at Object. (demo.coffee:5:1) - at Object. (demo.coffee:1:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) -``` - -## Tests - -This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: - -* Build the tests using `build.js` -* Launch the HTTP server (`npm run serve-tests`) and visit - * http://127.0.0.1:1336/amd-test - * http://127.0.0.1:1336/browser-test - * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). -* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ - -## License - -This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/test-eol-project/node_modules/source-map-support/browser-source-map-support.js b/test-eol-project/node_modules/source-map-support/browser-source-map-support.js deleted file mode 100644 index e7a3990d..00000000 --- a/test-eol-project/node_modules/source-map-support/browser-source-map-support.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Support for source maps in V8 stack traces - * https://github.com/evanw/node-source-map-support - */ -/* - The buffer module from node.js, for the browser. - - @author Feross Aboukhadijeh - license MIT -*/ -(this.define||function(N,O){this.sourceMapSupport=O()})("browser-source-map-support",function(N){(function n(v,m,c){function d(e,a){if(!m[e]){if(!v[e]){var h="function"==typeof require&&require;if(!a&&h)return h(e,!0);if(k)return k(e,!0);throw Error("Cannot find module '"+e+"'");}h=m[e]={exports:{}};v[e][0].call(h.exports,function(a){var c=v[e][1][a];return d(c?c:a)},h,h.exports,n,v,m,c)}return m[e].exports}for(var k="function"==typeof require&&require,q=0;qc)return-1;if(58>c)return c-48+52;if(91>c)return c-65;if(123>c)return c-97+26}var k="undefined"!==typeof Uint8Array?Uint8Array:Array;c.toByteArray=function(c){function e(a){u[b++]=a}if(0>16);e((f&65280)>>8);e(f&255)}2===h?(f=d(c.charAt(a))<<2|d(c.charAt(a+1))>>4,e(f&255)):1===h&&(f=d(c.charAt(a))<<10|d(c.charAt(a+1))<<4|d(c.charAt(a+2))>>2,e(f>>8&255),e(f&255));return u};c.fromByteArray=function(c){var e=c.length%3,a="",h;var d=0;for(h=c.length-e;d>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);a+=r}switch(e){case 1:r=c[c.length-1];a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<< -4&63);a+="==";break;case 2:r=(c[c.length-2]<<8)+c[c.length-1],a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),a+="="}return a}})("undefined"===typeof m?this.base64js={}:m)},{}],3:[function(n,v,m){},{}],4:[function(n,v,m){function c(g,l,b){if(!(this instanceof c))return new c(g,l,b);var x=typeof g; -if("base64"===l&&"string"===x)for(g=g.trim?g.trim():g.replace(/^\s+|\s+$/g,"");0!==g.length%4;)g+="=";if("number"===x)var a=B(g);else if("string"===x)a=c.byteLength(g,l);else if("object"===x)a=B(g.length);else throw Error("First argument needs to be a number, array or string.");if(c._useTypedArrays)var f=c._augment(new Uint8Array(a));else f=this,f.length=a,f._isBuffer=!0;if(c._useTypedArrays&&"number"===typeof g.byteLength)f._set(g);else{var e=g;if(L(e)||c.isBuffer(e)||e&&"object"===typeof e&&"number"=== -typeof e.length)for(l=0;l=a))return b?(b=g[l],l+ -1=a)){var x;b?(l+2>>0)):(l+1>>0);return x}}function e(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"), -p(void 0!==l&&null!==l,"missing offset"),p(l+1=g.length))return g=k(g,l,b,!0),g&32768?-1*(65535-g+1):g}function a(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(void 0!==l&&null!==l,"missing offset"),p(l+3=g.length))return g=q(g,l,b,!0),g&2147483648?-1*(4294967295-g+1):g}function h(g,l,b,a){a||(p("boolean"===typeof b,"missing or invalid endian"),p(l+3=x))for(c=0,x=Math.min(x-b,2);c>>8* -(a?c:1-c)}function b(g,l,b,a,c){c||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+3=x))for(c=0,x=Math.min(x-b,4);c>>8*(a?c:3-c)&255}function f(g,l,b,a,c){c||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof a,"missing or invalid endian"),p(void 0!==b&&null!==b,"missing offset"),p(b+1=g.length||(0<=l?r(g,l,b,a,c):r(g,65535+l+1,b,a,c))}function G(g,l,a,c,f){f||(p(void 0!==l&&null!==l,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3=g.length||(0<=l?b(g,l,a,c,f):b(g,4294967295+l+1,a,c,f))}function t(g,b,a,c,f){f||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof c, -"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+3=g.length||J.write(g,b,a,c,23,4)}function M(g,b,a,c,f){f||(p(void 0!==b&&null!==b,"missing value"),p("boolean"===typeof c,"missing or invalid endian"),p(void 0!==a&&null!==a,"missing offset"),p(a+7=g.length||J.write(g, -b,a,c,52,8)}function I(g,b,a){if("number"!==typeof g)return a;g=~~g;if(g>=b)return b;if(0<=g)return g;g+=b;return 0<=g?g:0}function B(g){g=~~Math.ceil(+g);return 0>g?0:g}function L(g){return(Array.isArray||function(g){return"[object Array]"===Object.prototype.toString.call(g)})(g)}function C(g){return 16>g?"0"+g.toString(16):g.toString(16)}function y(g){for(var b=[],a=0;a=c)b.push(g.charCodeAt(a));else{var f=a;55296<=c&&57343>=c&&a++;c=encodeURIComponent(g.slice(f, -a+1)).substr(1).split("%");for(f=0;f=b.length||l>=g.length);l++)b[l+a]=g[l];return l}function F(g){try{return decodeURIComponent(g)}catch(l){return String.fromCharCode(65533)}}function H(g,b){p("number"===typeof g,"cannot write a non-number as a number");p(0<=g,"specified a negative value for writing an unsigned value");p(g<= -b,"value is larger than maximum value for type");p(Math.floor(g)===g,"value has a fractional component")}function z(g,b,a){p("number"===typeof g,"cannot write a non-number as a number");p(g<=b,"value larger than maximum allowed value");p(g>=a,"value smaller than minimum allowed value");p(Math.floor(g)===g,"value has a fractional component")}function E(g,b,a){p("number"===typeof g,"cannot write a non-number as a number");p(g<=b,"value larger than maximum allowed value");p(g>=a,"value smaller than minimum allowed value")} -function p(g,b){if(!g)throw Error(b||"Failed assertion");}var D=n("base64-js"),J=n("ieee754");m.Buffer=c;m.SlowBuffer=c;m.INSPECT_MAX_BYTES=50;c.poolSize=8192;c._useTypedArrays=function(){try{var g=new ArrayBuffer(0),b=new Uint8Array(g);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray}catch(x){return!1}}();c.isEncoding=function(g){switch(String(g).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0; -default:return!1}};c.isBuffer=function(g){return!(null===g||void 0===g||!g._isBuffer)};c.byteLength=function(g,b){g+="";switch(b||"utf8"){case "hex":var a=g.length/2;break;case "utf8":case "utf-8":a=y(g).length;break;case "ascii":case "binary":case "raw":a=g.length;break;case "base64":a=D.toByteArray(g).length;break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=2*g.length;break;default:throw Error("Unknown encoding");}return a};c.concat=function(g,b){p(L(g),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."); -if(0===g.length)return new c(0);if(1===g.length)return g[0];var a;if("number"!==typeof b)for(a=b=0;al&&(a=l)):a=l;f=String(f||"utf8").toLowerCase();switch(f){case "hex":b=Number(b)||0;f=this.length-b;a?(a=Number(a),a>f&&(a=f)):a=f;f= -g.length;p(0===f%2,"Invalid hex string");a>f/2&&(a=f/2);for(f=0;f>8;h%=256;l.push(h);l.push(f)}g=c._charsWritten=A(l,this,b,a);break;default:throw Error("Unknown encoding");}return g};c.prototype.toString=function(g,b,a){g=String(g||"utf8").toLowerCase();b=Number(b)||0;a=void 0!==a?Number(a):a=this.length;if(a===b)return"";switch(g){case "hex":g=this.length;if(!b||0>b)b=0;if(!a||0>a||a>g)a=g;for(g="";b=this[b]?(g+=F(c)+String.fromCharCode(this[b]), -c=""):c+="%"+this[b].toString(16);a=g+F(c);break;case "ascii":a=d(this,b,a);break;case "binary":a=d(this,b,a);break;case "base64":a=0===b&&a===this.length?D.fromByteArray(this):D.fromByteArray(this.slice(b,a));break;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":a=this.slice(b,a);b="";for(g=0;g=a,"sourceEnd < sourceStart"),p(0<=b&&bthis.length&&(f=this.length),g.length-bf||!c._useTypedArrays)for(var l=0;l=this.length))return this[b]};c.prototype.readUInt16LE=function(b,a){return k(this,b,!0,a)};c.prototype.readUInt16BE=function(b,a){return k(this,b,!1,a)};c.prototype.readUInt32LE=function(b,a){return q(this,b,!0,a)};c.prototype.readUInt32BE=function(b,a){return q(this,b,!1,a)};c.prototype.readInt8=function(b,a){a||(p(void 0!==b&&null!==b,"missing offset"),p(b= -this.length))return this[b]&128?-1*(255-this[b]+1):this[b]};c.prototype.readInt16LE=function(b,a){return e(this,b,!0,a)};c.prototype.readInt16BE=function(b,a){return e(this,b,!1,a)};c.prototype.readInt32LE=function(b,f){return a(this,b,!0,f)};c.prototype.readInt32BE=function(b,f){return a(this,b,!1,f)};c.prototype.readFloatLE=function(b,a){return h(this,b,!0,a)};c.prototype.readFloatBE=function(b,a){return h(this,b,!1,a)};c.prototype.readDoubleLE=function(b,a){return u(this,b,!0,a)};c.prototype.readDoubleBE= -function(b,a){return u(this,b,!1,a)};c.prototype.writeUInt8=function(b,a,f){f||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a=this.length||(this[a]=b)};c.prototype.writeUInt16LE=function(b,a,f){r(this,b,a,!0,f)};c.prototype.writeUInt16BE=function(b,a,f){r(this,b,a,!1,f)};c.prototype.writeUInt32LE=function(a,f,c){b(this,a,f,!0,c)};c.prototype.writeUInt32BE=function(a,f,c){b(this,a,f,!1,c)};c.prototype.writeInt8= -function(b,a,f){f||(p(void 0!==b&&null!==b,"missing value"),p(void 0!==a&&null!==a,"missing offset"),p(a=this.length||(0<=b?this.writeUInt8(b,a,f):this.writeUInt8(255+b+1,a,f))};c.prototype.writeInt16LE=function(b,a,c){f(this,b,a,!0,c)};c.prototype.writeInt16BE=function(b,a,c){f(this,b,a,!1,c)};c.prototype.writeInt32LE=function(b,a,f){G(this,b,a,!0,f)};c.prototype.writeInt32BE=function(b,a,f){G(this,b,a,!1,f)};c.prototype.writeFloatLE= -function(b,a,f){t(this,b,a,!0,f)};c.prototype.writeFloatBE=function(b,a,f){t(this,b,a,!1,f)};c.prototype.writeDoubleLE=function(b,a,f){M(this,b,a,!0,f)};c.prototype.writeDoubleBE=function(b,a,f){M(this,b,a,!1,f)};c.prototype.fill=function(b,a,f){b||(b=0);a||(a=0);f||(f=this.length);"string"===typeof b&&(b=b.charCodeAt(0));p("number"===typeof b&&!isNaN(b),"value is not a number");p(f>=a,"end < start");if(f!==a&&0!==this.length)for(p(0<=a&&a"};c.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(c._useTypedArrays)return(new c(this)).buffer;for(var b=new Uint8Array(this.length),a=0,f=b.length;a>1,r=-7;e=k?e-1:0;var b=k?-1:1,f=c[d+e];e+=b;k=f&(1<<-r)-1;f>>=-r;for(r+=a;0>=-r;for(r+=q;0>1,f=23===e?Math.pow(2,-24)-Math.pow(2,-77):0;a=q?0:a-1;var G=q?1:-1,t=0>d||0===d&&0>1/d?1:0;d=Math.abs(d);isNaN(d)||Infinity===d?(d=isNaN(d)?1:0,q=r):(q=Math.floor(Math.log(d)/Math.LN2),1>d*(h=Math.pow(2,-q))&&(q--,h*=2),d=1<=q+b?d+f/h:d+f*Math.pow(2,1-b),2<=d*h&&(q++,h/=2),q+b>=r?(d=0,q=r):1<=q+b?(d=(d*h-1)*Math.pow(2,e),q+=b):(d=d*Math.pow(2,b-1)*Math.pow(2,e),q=0));for(;8<=e;c[k+a]=d&255,a+=G,d/=256,e-=8);q=q<f?[]:b.slice(a,f-a+1)}a=m.resolve(a).substr(1);c=m.resolve(c).substr(1);for(var h=e(a.split("/")),b=e(c.split("/")),f=Math.min(h.length,b.length),G=f,t=0;tc&&(c=a.length+c);return a.substr(c,e)}}).call(this,n("node_modules/process/browser.js"))}, -{"node_modules/process/browser.js":7}],7:[function(n,v,m){function c(){}n=v.exports={};n.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(c){return window.setImmediate(c)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var c=[];window.addEventListener("message",function(d){var k=d.source;k!==window&&null!==k||"process-tick"!==d.data||(d.stopPropagation(),0d?(-d<<1)+1:(d<<1)+0;do d=q&31,q>>>=5,0=e)throw Error("Expected more digits in base 64 VLQ value.");var u=c.decode(d.charCodeAt(k++));if(-1===u)throw Error("Invalid base64 digit: "+d.charAt(k-1)); -var r=!!(u&32);u&=31;a+=u<>1;q.value=1===(a&1)?-d:d;q.rest=k}},{"./base64":10}],10:[function(n,v,m){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");m.encode=function(d){if(0<=d&&d=c?c-65:97<=c&&122>=c?c-97+26:48<=c&&57>=c?c-48+52:43==c?62:47==c?63:-1}},{}],11:[function(n,v,m){function c(d,k,q,e,a,h){var u=Math.floor((k-d)/2)+d,r= -a(q,e[u],!0);return 0===r?u:0d?-1:d}m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.search=function(d,k,q,e){if(0===k.length)return-1;d=c(-1,k.length,d,k,q,e||m.GREATEST_LOWER_BOUND);if(0>d)return-1;for(;0<=d-1&&0===q(k[d],k[d-1],!0);)--d;return d}},{}],12:[function(n,v,m){function c(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var d=n("./util");c.prototype.unsortedForEach= -function(c,d){this._array.forEach(c,d)};c.prototype.add=function(c){var k=this._last,e=k.generatedLine,a=c.generatedLine,h=k.generatedColumn,u=c.generatedColumn;a>e||a==e&&u>=h||0>=d.compareByGeneratedPositionsInflated(k,c)?this._last=c:this._sorted=!1;this._array.push(c)};c.prototype.toArray=function(){this._sorted||(this._array.sort(d.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};m.MappingList=c},{"./util":17}],13:[function(n,v,m){function c(c,d,e){var a=c[d];c[d]=c[e]; -c[e]=a}function d(k,m,e,a){if(e=m(k[r],u)&&(h+=1,c(k,h,r));c(k,h+1,r);h+=1;d(k,m,e,h-1);d(k,m,h+1,a)}}m.quickSort=function(c,m){d(c,m,0,c.length-1)}},{}],14:[function(n,v,m){function c(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));return null!=a.sections?new q(a):new d(a)}function d(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=e.getArg(a,"version");var c=e.getArg(a, -"sources"),t=e.getArg(a,"names",[]),d=e.getArg(a,"sourceRoot",null),r=e.getArg(a,"sourcesContent",null),k=e.getArg(a,"mappings");a=e.getArg(a,"file",null);if(b!=this._version)throw Error("Unsupported version: "+b);c=c.map(String).map(e.normalize).map(function(b){return d&&e.isAbsolute(d)&&e.isAbsolute(b)?e.relative(d,b):b});this._names=h.fromArray(t.map(String),!0);this._sources=h.fromArray(c,!0);this.sourceRoot=d;this.sourcesContent=r;this._mappings=k;this.file=a}function k(){this.generatedColumn= -this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source=null}function q(b){var a=b;"string"===typeof b&&(a=JSON.parse(b.replace(/^\)\]\}'/,"")));b=e.getArg(a,"version");a=e.getArg(a,"sections");if(b!=this._version)throw Error("Unsupported version: "+b);this._sources=new h;this._names=new h;var d={line:-1,column:0};this._sections=a.map(function(b){if(b.url)throw Error("Support for url field in sections not implemented.");var a=e.getArg(b,"offset"),f=e.getArg(a,"line"),t=e.getArg(a, -"column");if(f=b[e])throw new TypeError("Line must be greater than or equal to 1, got "+b[e]);if(0>b[d])throw new TypeError("Column must be greater than or equal to 0, got "+b[d]);return a.search(b,c,h,r)};d.prototype.computeColumnSpans=function(){for(var b=0;b=this._sources.size()&&!this.sourcesContent.some(function(b){return null==b}):!1};d.prototype.sourceContentFor=function(b,a){if(!this.sourcesContent)return null;null!=this.sourceRoot&&(b=e.relative(this.sourceRoot, -b));if(this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var c;if(null!=this.sourceRoot&&(c=e.urlParse(this.sourceRoot))){var f=b.replace(/^file:\/\//,"");if("file"==c.scheme&&this._sources.has(f))return this.sourcesContent[this._sources.indexOf(f)];if((!c.path||"/"==c.path)&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}if(a)return null;throw Error('"'+b+'" is not in the SourceMap.');};d.prototype.generatedPositionFor=function(b){var a= -e.getArg(b,"source");null!=this.sourceRoot&&(a=e.relative(this.sourceRoot,a));if(!this._sources.has(a))return{line:null,column:null,lastColumn:null};a=this._sources.indexOf(a);a={source:a,originalLine:e.getArg(b,"line"),originalColumn:e.getArg(b,"column")};b=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(b,"bias",c.GREATEST_LOWER_BOUND));return 0<=b&&(b=this._originalMappings[b],b.source===a.source)?{line:e.getArg(b,"generatedLine", -null),column:e.getArg(b,"generatedColumn",null),lastColumn:e.getArg(b,"lastGeneratedColumn",null)}:{line:null,column:null,lastColumn:null}};m.BasicSourceMapConsumer=d;q.prototype=Object.create(c.prototype);q.prototype.constructor=c;q.prototype._version=3;Object.defineProperty(q.prototype,"sources",{get:function(){for(var a=[],c=0;cb||95!==a.charCodeAt(b-1)||95!==a.charCodeAt(b-2)||111!==a.charCodeAt(b-3)||116!==a.charCodeAt(b-4)||111!==a.charCodeAt(b-5)||114!==a.charCodeAt(b-6)||112!==a.charCodeAt(b-7)||95!==a.charCodeAt(b-8)||95!==a.charCodeAt(b- -9))return!1;for(b-=10;0<=b;b--)if(36!==a.charCodeAt(b))return!1;return!0}m.getArg=function(a,c,d){if(c in a)return a[c];if(3===arguments.length)return d;throw Error('"'+c+'" is a required argument.');};var u=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;m.urlParse=c;m.urlGenerate=d;m.normalize=k;m.join=function(a,e){""===a&&(a=".");""===e&&(e=".");var b=c(e),f=c(a);f&&(a=f.path||"/");if(b&&!b.scheme)return f&&(b.scheme=f.scheme),d(b);if(b||e.match(r))return e; -if(f&&!f.host&&!f.path)return f.host=e,d(f);b="/"===e.charAt(0)?e:k(a.replace(/\/+$/,"")+"/"+e);return f?(f.path=b,d(f)):b};m.isAbsolute=function(a){return"/"===a.charAt(0)||!!a.match(u)};m.relative=function(a,c){""===a&&(a=".");a=a.replace(/\/$/,"");for(var b=0;0!==c.indexOf(a+"/");){var d=a.lastIndexOf("/");if(0>d)return c;a=a.slice(0,d);if(a.match(/^([^\/]+:\/)?\/*$/))return c;++b}return Array(b+1).join("../")+c.substr(a.length+1)};n=!("__proto__"in Object.create(null));m.toSetString=n?q:e;m.fromSetString= -n?q:a;m.compareByOriginalPositions=function(a,c,d){var b=a.source-c.source;if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;if(0!==b||d)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b)return b;b=a.generatedLine-c.generatedLine;return 0!==b?b:a.name-c.name};m.compareByGeneratedPositionsDeflated=function(a,c,d){var b=a.generatedLine-c.generatedLine;if(0!==b)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b||d)return b;b=a.source-c.source; -if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;return 0!==b?b:a.name-c.name};m.compareByGeneratedPositionsInflated=function(a,c){var b=a.generatedLine-c.generatedLine;if(0!==b)return b;b=a.generatedColumn-c.generatedColumn;if(0!==b)return b;b=a.source;var d=c.source;b=b===d?0:b>d?1:-1;if(0!==b)return b;b=a.originalLine-c.originalLine;if(0!==b)return b;b=a.originalColumn-c.originalColumn;0===b&&(b=a.name,d=c.name,b=b===d?0:b>d?1:-1);return b}}, -{}],18:[function(n,v,m){m.SourceMapGenerator=n("./lib/source-map-generator").SourceMapGenerator;m.SourceMapConsumer=n("./lib/source-map-consumer").SourceMapConsumer;m.SourceNode=n("./lib/source-node").SourceNode},{"./lib/source-map-consumer":14,"./lib/source-map-generator":15,"./lib/source-node":16}],19:[function(n,v,m){(function(c,d){function k(){return"browser"===K?!0:"node"===K?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&& -"renderer"===window.process.type)}function q(a){return function(b){for(var c=0;c";b=this.getLineNumber();null!=b&&(a+=":"+b,(b=this.getColumnNumber())&&(a+=":"+b))}b="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?b+="new "+(c||""):c?b+=c:(b+=a,d=!1);else{e=this.getTypeName();"[object Object]"===e&&(e="null");var f=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(b+=e+"."),b+=c,f&&c.indexOf("."+f)!=c.length-f.length-1&&(b+=" [as "+f+"]")):b+=e+"."+(f||"")}d&&(b+=" ("+a+")");return b}function r(a){var b= -{};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=u;return b}function b(b){if(b.isNative())return b;var c=b.getFileName()||b.getScriptNameOrSourceURL();if(c){var d=b.getLineNumber(),e=b.getColumnNumber()-1;1===d&&62"); - } - } else if (isConstructor) { - line += "new " + (functionName || ""); - } else if (functionName) { - line += functionName; - } else { - line += fileLocation; - addSuffix = false; - } - if (addSuffix) { - line += " (" + fileLocation + ")"; - } - return line; -} - -function cloneCallSite(frame) { - var object = {}; - Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { - object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; - }); - object.toString = CallSiteToString; - return object; -} - -function wrapCallSite(frame) { - if(frame.isNative()) { - return frame; - } - - // Most call sites will return the source file from getFileName(), but code - // passed to eval() ending in "//# sourceURL=..." will return the source file - // from getScriptNameOrSourceURL() instead - var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); - if (source) { - var line = frame.getLineNumber(); - var column = frame.getColumnNumber() - 1; - - // Fix position in Node where some (internal) code is prepended. - // See https://github.com/evanw/node-source-map-support/issues/36 - var headerLength = 62; - if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { - column -= headerLength; - } - - var position = mapSourcePosition({ - source: source, - line: line, - column: column - }); - frame = cloneCallSite(frame); - frame.getFileName = function() { return position.source; }; - frame.getLineNumber = function() { return position.line; }; - frame.getColumnNumber = function() { return position.column + 1; }; - frame.getScriptNameOrSourceURL = function() { return position.source; }; - return frame; - } - - // Code called using eval() needs special handling - var origin = frame.isEval() && frame.getEvalOrigin(); - if (origin) { - origin = mapEvalOrigin(origin); - frame = cloneCallSite(frame); - frame.getEvalOrigin = function() { return origin; }; - return frame; - } - - // If we get here then we were unable to change the source position - return frame; -} - -// This function is part of the V8 stack trace API, for more info see: -// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi -function prepareStackTrace(error, stack) { - if (emptyCacheBetweenOperations) { - fileContentsCache = {}; - sourceMapCache = {}; - } - - return error + stack.map(function(frame) { - return '\n at ' + wrapCallSite(frame); - }).join(''); -} - -// Generate position and snippet of original source with pointer -function getErrorSource(error) { - var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); - if (match) { - var source = match[1]; - var line = +match[2]; - var column = +match[3]; - - // Support the inline sourceContents inside the source map - var contents = fileContentsCache[source]; - - // Support files on disk - if (!contents && fs && fs.existsSync(source)) { - try { - contents = fs.readFileSync(source, 'utf8'); - } catch (er) { - contents = ''; - } - } - - // Format the line from the original source code like node does - if (contents) { - var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; - if (code) { - return source + ':' + line + '\n' + code + '\n' + - new Array(column).join(' ') + '^'; - } - } - } - return null; -} - -function printErrorAndExit (error) { - var source = getErrorSource(error); - - if (source) { - console.error(); - console.error(source); - } - - console.error(error.stack); - process.exit(1); -} - -function shimEmitUncaughtException () { - var origEmit = process.emit; - - process.emit = function (type) { - if (type === 'uncaughtException') { - var hasStack = (arguments[1] && arguments[1].stack); - var hasListeners = (this.listeners(type).length > 0); - - if (hasStack && !hasListeners) { - return printErrorAndExit(arguments[1]); - } - } - - return origEmit.apply(this, arguments); - }; -} - -exports.wrapCallSite = wrapCallSite; -exports.getErrorSource = getErrorSource; -exports.mapSourcePosition = mapSourcePosition; -exports.retrieveSourceMap = retrieveSourceMap; - -exports.install = function(options) { - options = options || {}; - - if (options.environment) { - environment = options.environment; - if (["node", "browser", "auto"].indexOf(environment) === -1) { - throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") - } - } - - // Allow sources to be found by methods other than reading the files - // directly from disk. - if (options.retrieveFile) { - if (options.overrideRetrieveFile) { - retrieveFileHandlers.length = 0; - } - - retrieveFileHandlers.unshift(options.retrieveFile); - } - - // Allow source maps to be found by methods other than reading the files - // directly from disk. - if (options.retrieveSourceMap) { - if (options.overrideRetrieveSourceMap) { - retrieveMapHandlers.length = 0; - } - - retrieveMapHandlers.unshift(options.retrieveSourceMap); - } - - // Support runtime transpilers that include inline source maps - if (options.hookRequire && !isInBrowser()) { - var Module; - try { - Module = require('module'); - } catch (err) { - // NOP: Loading in catch block to convert webpack error to warning. - } - var $compile = Module.prototype._compile; - - if (!$compile.__sourceMapSupport) { - Module.prototype._compile = function(content, filename) { - fileContentsCache[filename] = content; - sourceMapCache[filename] = undefined; - return $compile.call(this, content, filename); - }; - - Module.prototype._compile.__sourceMapSupport = true; - } - } - - // Configure options - if (!emptyCacheBetweenOperations) { - emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? - options.emptyCacheBetweenOperations : false; - } - - // Install the error reformatter - if (!errorFormatterInstalled) { - errorFormatterInstalled = true; - Error.prepareStackTrace = prepareStackTrace; - } - - if (!uncaughtShimInstalled) { - var installHandler = 'handleUncaughtExceptions' in options ? - options.handleUncaughtExceptions : true; - - // Provide the option to not install the uncaught exception handler. This is - // to support other uncaught exception handlers (in test frameworks, for - // example). If this handler is not installed and there are no other uncaught - // exception handlers, uncaught exceptions will be caught by node's built-in - // exception handler and the process will still be terminated. However, the - // generated JavaScript code will be shown above the stack trace instead of - // the original source code. - if (installHandler && hasGlobalProcessEventEmitter()) { - uncaughtShimInstalled = true; - shimEmitUncaughtException(); - } - } -}; diff --git a/test-eol-project/node_modules/source-map/CHANGELOG.md b/test-eol-project/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066c..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/LICENSE b/test-eol-project/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/README.md b/test-eol-project/node_modules/source-map/README.md deleted file mode 100644 index 32813394..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/dist/source-map.debug.js b/test-eol-project/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab6382..00000000 --- a/test-eol-project/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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZ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QgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYX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ICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudF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xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiB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A9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKT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7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/test-eol-project/node_modules/source-map/dist/source-map.js b/test-eol-project/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e29..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/dist/source-map.min.js b/test-eol-project/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd0..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/array-set.js b/test-eol-project/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/base64-vlq.js b/test-eol-project/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/base64.js b/test-eol-project/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/binary-search.js b/test-eol-project/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/mapping-list.js b/test-eol-project/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/quick-sort.js b/test-eol-project/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/source-map-consumer.js b/test-eol-project/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc280..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/source-map-generator.js b/test-eol-project/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7fb..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/source-node.js b/test-eol-project/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53f..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/lib/util.js b/test-eol-project/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e452..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/source-map/package.json b/test-eol-project/node_modules/source-map/package.json deleted file mode 100644 index 048e3ae8..00000000 --- a/test-eol-project/node_modules/source-map/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "source-map", - "description": "Generates and consumes source maps", - "version": "0.5.7", - "homepage": "https://github.com/mozilla/source-map", - "author": "Nick Fitzgerald ", - "contributors": [ - "Tobias Koppers ", - "Duncan Beevers ", - "Stephen Crane ", - "Ryan Seddon ", - "Miles Elam ", - "Mihai Bazon ", - "Michael Ficarra ", - "Todd Wolfson ", - "Alexander Solovyov ", - "Felix Gnass ", - "Conrad Irwin ", - "usrbincc ", - "David Glasser ", - "Chase Douglas ", - "Evan Wallace ", - "Heather Arthur ", - "Hugh Kennedy ", - "David Glasser ", - "Simon Lydell ", - "Jmeas Smith ", - "Michael Z Goddard ", - "azu ", - "John Gozde ", - "Adam Kirkton ", - "Chris Montgomery ", - "J. Ryan Stinnett ", - "Jack Herrington ", - "Chris Truter ", - "Daniel Espeset ", - "Jamie Wong ", - "Eddy Bruël ", - "Hawken Rives ", - "Gilad Peleg ", - "djchie ", - "Gary Ye ", - "Nicolas Lalevée " - ], - "repository": { - "type": "git", - "url": "http://github.com/mozilla/source-map.git" - }, - "main": "./source-map.js", - "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" - ], - "engines": { - "node": ">=0.10.0" - }, - "license": "BSD-3-Clause", - "scripts": { - "test": "npm run build && node test/run-tests.js", - "build": "webpack --color", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "typings": "source-map" -} diff --git a/test-eol-project/node_modules/source-map/source-map.js b/test-eol-project/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/test-eol-project/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/test-eol-project/node_modules/sshpk/.travis.yml b/test-eol-project/node_modules/sshpk/.travis.yml deleted file mode 100644 index c3394c25..00000000 --- a/test-eol-project/node_modules/sshpk/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "5.10" - - "4.4" - - "4.1" - - "0.12" - - "0.10" -before_install: - - "make check" -after_success: - - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio' diff --git a/test-eol-project/node_modules/sshpk/Jenkinsfile b/test-eol-project/node_modules/sshpk/Jenkinsfile deleted file mode 100644 index cd0bf225..00000000 --- a/test-eol-project/node_modules/sshpk/Jenkinsfile +++ /dev/null @@ -1,86 +0,0 @@ -@Library('jenkins-joylib@v1.0.8') _ - -pipeline { - - agent none - - options { - buildDiscarder(logRotator(numToKeepStr: '30')) - timestamps() - } - - stages { - stage('top') { - parallel { - stage('v0.10.48-zone') { - agent { - label joyCommonLabels(image_ver: '15.4.1') - } - tools { - nodejs 'sdcnode-v0.10.48-zone' - } - stages { - stage('check') { - steps{ - sh('make check') - } - } - stage('test') { - steps{ - sh('make test') - } - } - } - } - - stage('v4-zone') { - agent { - label joyCommonLabels(image_ver: '15.4.1') - } - tools { - nodejs 'sdcnode-v4-zone' - } - stages { - stage('check') { - steps{ - sh('make check') - } - } - stage('test') { - steps{ - sh('make test') - } - } - } - } - - stage('v6-zone64') { - agent { - label joyCommonLabels(image_ver: '18.4.0') - } - tools { - nodejs 'sdcnode-v6-zone64' - } - stages { - stage('check') { - steps{ - sh('make check') - } - } - stage('test') { - steps{ - sh('make test') - } - } - } - } - } - } - } - - post { - always { - joySlackNotifications() - } - } -} diff --git a/test-eol-project/node_modules/sshpk/LICENSE b/test-eol-project/node_modules/sshpk/LICENSE deleted file mode 100644 index f6d947d2..00000000 --- a/test-eol-project/node_modules/sshpk/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. 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/test-eol-project/node_modules/sshpk/README.md b/test-eol-project/node_modules/sshpk/README.md deleted file mode 100644 index 5740f74d..00000000 --- a/test-eol-project/node_modules/sshpk/README.md +++ /dev/null @@ -1,804 +0,0 @@ -sshpk -========= - -Parse, convert, fingerprint and use SSH keys (both public and private) in pure -node -- no `ssh-keygen` or other external dependencies. - -Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1, -PKCS#8) and OpenSSH formats. - -This library has been extracted from -[`node-http-signature`](https://github.com/joyent/node-http-signature) -(work by [Mark Cavage](https://github.com/mcavage) and -[Dave Eddy](https://github.com/bahamas10)) and -[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint) -(work by Dave Eddy), with additions (including ECDSA support) by -[Alex Wilson](https://github.com/arekinath). - -Install -------- - -``` -npm install sshpk -``` - -Examples --------- - -```js -var sshpk = require('sshpk'); - -var fs = require('fs'); - -/* Read in an OpenSSH-format public key */ -var keyPub = fs.readFileSync('id_rsa.pub'); -var key = sshpk.parseKey(keyPub, 'ssh'); - -/* Get metadata about the key */ -console.log('type => %s', key.type); -console.log('size => %d bits', key.size); -console.log('comment => %s', key.comment); - -/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */ -console.log('fingerprint => %s', key.fingerprint().toString()); -console.log('old-style fingerprint => %s', key.fingerprint('md5').toString()); -``` - -Example output: - -``` -type => rsa -size => 2048 bits -comment => foo@foo.com -fingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w -old-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd -``` - -More examples: converting between formats: - -```js -/* Read in a PEM public key */ -var keyPem = fs.readFileSync('id_rsa.pem'); -var key = sshpk.parseKey(keyPem, 'pem'); - -/* Convert to PEM PKCS#8 public key format */ -var pemBuf = key.toBuffer('pkcs8'); - -/* Convert to SSH public key format (and return as a string) */ -var sshKey = key.toString('ssh'); -``` - -Signing and verifying: - -```js -/* Read in an OpenSSH/PEM *private* key */ -var keyPriv = fs.readFileSync('id_ecdsa'); -var key = sshpk.parsePrivateKey(keyPriv, 'pem'); - -var data = 'some data'; - -/* Sign some data with the key */ -var s = key.createSign('sha1'); -s.update(data); -var signature = s.sign(); - -/* Now load the public key (could also use just key.toPublic()) */ -var keyPub = fs.readFileSync('id_ecdsa.pub'); -key = sshpk.parseKey(keyPub, 'ssh'); - -/* Make a crypto.Verifier with this key */ -var v = key.createVerify('sha1'); -v.update(data); -var valid = v.verify(signature); -/* => true! */ -``` - -Matching fingerprints with keys: - -```js -var fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w'); - -var keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...]; - -keys.forEach(function (key) { - if (fp.matches(key)) - console.log('found it!'); -}); -``` - -Usage ------ - -## Public keys - -### `parseKey(data[, format = 'auto'[, options]])` - -Parses a key from a given data format and returns a new `Key` object. - -Parameters - -- `data` -- Either a Buffer or String, containing the key -- `format` -- String name of format to use, valid options are: - - `auto`: choose automatically from all below - - `pem`: supports both PKCS#1 and PKCS#8 - - `ssh`: standard OpenSSH format, - - `pkcs1`, `pkcs8`: variants of `pem` - - `rfc4253`: raw OpenSSH wire format - - `openssh`: new post-OpenSSH 6.5 internal format, produced by - `ssh-keygen -o` - - `dnssec`: `.key` file format output by `dnssec-keygen` etc - - `putty`: the PuTTY `.ppk` file format (supports truncated variant without - all the lines from `Private-Lines:` onwards) -- `options` -- Optional Object, extra options, with keys: - - `filename` -- Optional String, name for the key being parsed - (eg. the filename that was opened). Used to generate - Error messages - - `passphrase` -- Optional String, encryption passphrase used to decrypt an - encrypted PEM file - -### `Key.isKey(obj)` - -Returns `true` if the given object is a valid `Key` object created by a version -of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `Key#type` - -String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. - -### `Key#size` - -Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; -for ECDSA this is the bit size of the curve in use. - -### `Key#comment` - -Optional string, a key comment used by some formats (eg the `ssh` format). - -### `Key#curve` - -Only present if `this.type === 'ecdsa'`, string containing the name of the -named curve used with this key. Possible values include `nistp256`, `nistp384` -and `nistp521`. - -### `Key#toBuffer([format = 'ssh'])` - -Convert the key into a given data format and return the serialized key as -a Buffer. - -Parameters - -- `format` -- String name of format to use, for valid options see `parseKey()` - -### `Key#toString([format = 'ssh])` - -Same as `this.toBuffer(format).toString()`. - -### `Key#fingerprint([algorithm = 'sha256'[, hashType = 'ssh']])` - -Creates a new `Fingerprint` object representing this Key's fingerprint. - -Parameters - -- `algorithm` -- String name of hash algorithm to use, valid options are `md5`, - `sha1`, `sha256`, `sha384`, `sha512` -- `hashType` -- String name of fingerprint hash type to use, valid options are - `ssh` (the type of fingerprint used by OpenSSH, e.g. in - `ssh-keygen`), `spki` (used by HPKP, some OpenSSL applications) - -### `Key#createVerify([hashAlgorithm])` - -Creates a `crypto.Verifier` specialized to use this Key (and the correct public -key algorithm to match it). The returned Verifier has the same API as a regular -one, except that the `verify()` function takes only the target signature as an -argument. - -Parameters - -- `hashAlgorithm` -- optional String name of hash algorithm to use, any - supported by OpenSSL are valid, usually including - `sha1`, `sha256`. - -`v.verify(signature[, format])` Parameters - -- `signature` -- either a Signature object, or a Buffer or String -- `format` -- optional String, name of format to interpret given String with. - Not valid if `signature` is a Signature or Buffer. - -### `Key#createDiffieHellman()` -### `Key#createDH()` - -Creates a Diffie-Hellman key exchange object initialized with this key and all -necessary parameters. This has the same API as a `crypto.DiffieHellman` -instance, except that functions take `Key` and `PrivateKey` objects as -arguments, and return them where indicated for. - -This is only valid for keys belonging to a cryptosystem that supports DHE -or a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt -to call this function on other keys will yield an `Error`. - -## Private keys - -### `parsePrivateKey(data[, format = 'auto'[, options]])` - -Parses a private key from a given data format and returns a new -`PrivateKey` object. - -Parameters - -- `data` -- Either a Buffer or String, containing the key -- `format` -- String name of format to use, valid options are: - - `auto`: choose automatically from all below - - `pem`: supports both PKCS#1 and PKCS#8 - - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by - `ssh-keygen -o` - - `pkcs1`, `pkcs8`: variants of `pem` - - `rfc4253`: raw OpenSSH wire format - - `dnssec`: `.private` format output by `dnssec-keygen` etc. -- `options` -- Optional Object, extra options, with keys: - - `filename` -- Optional String, name for the key being parsed - (eg. the filename that was opened). Used to generate - Error messages - - `passphrase` -- Optional String, encryption passphrase used to decrypt an - encrypted PEM file - -### `generatePrivateKey(type[, options])` - -Generates a new private key of a certain key type, from random data. - -Parameters - -- `type` -- String, type of key to generate. Currently supported are `'ecdsa'` - and `'ed25519'` -- `options` -- optional Object, with keys: - - `curve` -- optional String, for `'ecdsa'` keys, specifies the curve to use. - If ECDSA is specified and this option is not given, defaults to - using `'nistp256'`. - -### `PrivateKey.isPrivateKey(obj)` - -Returns `true` if the given object is a valid `PrivateKey` object created by a -version of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `PrivateKey#type` - -String, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`. - -### `PrivateKey#size` - -Integer, "size" of the key in bits. For RSA/DSA this is the size of the modulus; -for ECDSA this is the bit size of the curve in use. - -### `PrivateKey#curve` - -Only present if `this.type === 'ecdsa'`, string containing the name of the -named curve used with this key. Possible values include `nistp256`, `nistp384` -and `nistp521`. - -### `PrivateKey#toBuffer([format = 'pkcs1'])` - -Convert the key into a given data format and return the serialized key as -a Buffer. - -Parameters - -- `format` -- String name of format to use, valid options are listed under - `parsePrivateKey`. Note that ED25519 keys default to `openssh` - format instead (as they have no `pkcs1` representation). - -### `PrivateKey#toString([format = 'pkcs1'])` - -Same as `this.toBuffer(format).toString()`. - -### `PrivateKey#toPublic()` - -Extract just the public part of this private key, and return it as a `Key` -object. - -### `PrivateKey#fingerprint([algorithm = 'sha256'])` - -Same as `this.toPublic().fingerprint()`. - -### `PrivateKey#createVerify([hashAlgorithm])` - -Same as `this.toPublic().createVerify()`. - -### `PrivateKey#createSign([hashAlgorithm])` - -Creates a `crypto.Sign` specialized to use this PrivateKey (and the correct -key algorithm to match it). The returned Signer has the same API as a regular -one, except that the `sign()` function takes no arguments, and returns a -`Signature` object. - -Parameters - -- `hashAlgorithm` -- optional String name of hash algorithm to use, any - supported by OpenSSL are valid, usually including - `sha1`, `sha256`. - -`v.sign()` Parameters - -- none - -### `PrivateKey#derive(newType)` - -Derives a related key of type `newType` from this key. Currently this is -only supported to change between `ed25519` and `curve25519` keys which are -stored with the same private key (but usually distinct public keys in order -to avoid degenerate keys that lead to a weak Diffie-Hellman exchange). - -Parameters - -- `newType` -- String, type of key to derive, either `ed25519` or `curve25519` - -## Fingerprints - -### `parseFingerprint(fingerprint[, options])` - -Pre-parses a fingerprint, creating a `Fingerprint` object that can be used to -quickly locate a key by using the `Fingerprint#matches` function. - -Parameters - -- `fingerprint` -- String, the fingerprint value, in any supported format -- `options` -- Optional Object, with properties: - - `algorithms` -- Array of strings, names of hash algorithms to limit - support to. If `fingerprint` uses a hash algorithm not on - this list, throws `InvalidAlgorithmError`. - - `hashType` -- String, the type of hash the fingerprint uses, either `ssh` - or `spki` (normally auto-detected based on the format, but - can be overridden) - - `type` -- String, the entity this fingerprint identifies, either `key` or - `certificate` - -### `Fingerprint.isFingerprint(obj)` - -Returns `true` if the given object is a valid `Fingerprint` object created by a -version of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `Fingerprint#toString([format])` - -Returns a fingerprint as a string, in the given format. - -Parameters - -- `format` -- Optional String, format to use, valid options are `hex` and - `base64`. If this `Fingerprint` uses the `md5` algorithm, the - default format is `hex`. Otherwise, the default is `base64`. - -### `Fingerprint#matches(keyOrCertificate)` - -Verifies whether or not this `Fingerprint` matches a given `Key` or -`Certificate`. This function uses double-hashing to avoid leaking timing -information. Returns a boolean. - -Note that a `Key`-type Fingerprint will always return `false` if asked to match -a `Certificate` and vice versa. - -Parameters - -- `keyOrCertificate` -- a `Key` object or `Certificate` object, the entity to - match this fingerprint against - -## Signatures - -### `parseSignature(signature, algorithm, format)` - -Parses a signature in a given format, creating a `Signature` object. Useful -for converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and -also returned as output from `PrivateKey#createSign().sign()`. - -A Signature object can also be passed to a verifier produced by -`Key#createVerify()` and it will automatically be converted internally into the -correct format for verification. - -Parameters - -- `signature` -- a Buffer (binary) or String (base64), data of the actual - signature in the given format -- `algorithm` -- a String, name of the algorithm to be used, possible values - are `rsa`, `dsa`, `ecdsa` -- `format` -- a String, either `asn1` or `ssh` - -### `Signature.isSignature(obj)` - -Returns `true` if the given object is a valid `Signature` object created by a -version of `sshpk` compatible with this one. - -Parameters - -- `obj` -- Object to identify - -### `Signature#toBuffer([format = 'asn1'])` - -Converts a Signature to the given format and returns it as a Buffer. - -Parameters - -- `format` -- a String, either `asn1` or `ssh` - -### `Signature#toString([format = 'asn1'])` - -Same as `this.toBuffer(format).toString('base64')`. - -## Certificates - -`sshpk` includes basic support for parsing certificates in X.509 (PEM) format -and the OpenSSH certificate format. This feature is intended to be used mainly -to access basic metadata about certificates, extract public keys from them, and -also to generate simple self-signed certificates from an existing key. - -Notably, there is no implementation of CA chain-of-trust verification, and only -very minimal support for key usage restrictions. Please do the security world -a favour, and DO NOT use this code for certificate verification in the -traditional X.509 CA chain style. - -### `parseCertificate(data, format)` - -Parameters - - - `data` -- a Buffer or String - - `format` -- a String, format to use, one of `'openssh'`, `'pem'` (X.509 in a - PEM wrapper), or `'x509'` (raw DER encoded) - -### `createSelfSignedCertificate(subject, privateKey[, options])` - -Parameters - - - `subject` -- an Identity, the subject of the certificate - - `privateKey` -- a PrivateKey, the key of the subject: will be used both to be - placed in the certificate and also to sign it (since this is - a self-signed certificate) - - `options` -- optional Object, with keys: - - `lifetime` -- optional Number, lifetime of the certificate from now in - seconds - - `validFrom`, `validUntil` -- optional Dates, beginning and end of - certificate validity period. If given - `lifetime` will be ignored - - `serial` -- optional Buffer, the serial number of the certificate - - `purposes` -- optional Array of String, X.509 key usage restrictions - -### `createCertificate(subject, key, issuer, issuerKey[, options])` - -Parameters - - - `subject` -- an Identity, the subject of the certificate - - `key` -- a Key, the public key of the subject - - `issuer` -- an Identity, the issuer of the certificate who will sign it - - `issuerKey` -- a PrivateKey, the issuer's private key for signing - - `options` -- optional Object, with keys: - - `lifetime` -- optional Number, lifetime of the certificate from now in - seconds - - `validFrom`, `validUntil` -- optional Dates, beginning and end of - certificate validity period. If given - `lifetime` will be ignored - - `serial` -- optional Buffer, the serial number of the certificate - - `purposes` -- optional Array of String, X.509 key usage restrictions - -### `Certificate#subjects` - -Array of `Identity` instances describing the subject of this certificate. - -### `Certificate#issuer` - -The `Identity` of the Certificate's issuer (signer). - -### `Certificate#subjectKey` - -The public key of the subject of the certificate, as a `Key` instance. - -### `Certificate#issuerKey` - -The public key of the signing issuer of this certificate, as a `Key` instance. -May be `undefined` if the issuer's key is unknown (e.g. on an X509 certificate). - -### `Certificate#serial` - -The serial number of the certificate. As this is normally a 64-bit or wider -integer, it is returned as a Buffer. - -### `Certificate#purposes` - -Array of Strings indicating the X.509 key usage purposes that this certificate -is valid for. The possible strings at the moment are: - - * `'signature'` -- key can be used for digital signatures - * `'identity'` -- key can be used to attest about the identity of the signer - (X.509 calls this `nonRepudiation`) - * `'codeSigning'` -- key can be used to sign executable code - * `'keyEncryption'` -- key can be used to encrypt other keys - * `'encryption'` -- key can be used to encrypt data (only applies for RSA) - * `'keyAgreement'` -- key can be used for key exchange protocols such as - Diffie-Hellman - * `'ca'` -- key can be used to sign other certificates (is a Certificate - Authority) - * `'crl'` -- key can be used to sign Certificate Revocation Lists (CRLs) - -### `Certificate#getExtension(nameOrOid)` - -Retrieves information about a certificate extension, if present, or returns -`undefined` if not. The string argument `nameOrOid` should be either the OID -(for X509 extensions) or the name (for OpenSSH extensions) of the extension -to retrieve. - -The object returned will have the following properties: - - * `format` -- String, set to either `'x509'` or `'openssh'` - * `name` or `oid` -- String, only one set based on value of `format` - * `data` -- Buffer, the raw data inside the extension - -### `Certificate#getExtensions()` - -Returns an Array of all present certificate extensions, in the same manner and -format as `getExtension()`. - -### `Certificate#isExpired([when])` - -Tests whether the Certificate is currently expired (i.e. the `validFrom` and -`validUntil` dates specify a range of time that does not include the current -time). - -Parameters - - - `when` -- optional Date, if specified, tests whether the Certificate was or - will be expired at the specified time instead of now - -Returns a Boolean. - -### `Certificate#isSignedByKey(key)` - -Tests whether the Certificate was validly signed by the given (public) Key. - -Parameters - - - `key` -- a Key instance - -Returns a Boolean. - -### `Certificate#isSignedBy(certificate)` - -Tests whether this Certificate was validly signed by the subject of the given -certificate. Also tests that the issuer Identity of this Certificate and the -subject Identity of the other Certificate are equivalent. - -Parameters - - - `certificate` -- another Certificate instance - -Returns a Boolean. - -### `Certificate#fingerprint([hashAlgo])` - -Returns the X509-style fingerprint of the entire certificate (as a Fingerprint -instance). This matches what a web-browser or similar would display as the -certificate fingerprint and should not be confused with the fingerprint of the -subject's public key. - -Parameters - - - `hashAlgo` -- an optional String, any hash function name - -### `Certificate#toBuffer([format])` - -Serializes the Certificate to a Buffer and returns it. - -Parameters - - - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or - `'x509'`. Defaults to `'x509'`. - -Returns a Buffer. - -### `Certificate#toString([format])` - - - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or - `'x509'`. Defaults to `'pem'`. - -Returns a String. - -## Certificate identities - -### `identityForHost(hostname)` - -Constructs a host-type Identity for a given hostname. - -Parameters - - - `hostname` -- the fully qualified DNS name of the host - -Returns an Identity instance. - -### `identityForUser(uid)` - -Constructs a user-type Identity for a given UID. - -Parameters - - - `uid` -- a String, user identifier (login name) - -Returns an Identity instance. - -### `identityForEmail(email)` - -Constructs an email-type Identity for a given email address. - -Parameters - - - `email` -- a String, email address - -Returns an Identity instance. - -### `identityFromDN(dn)` - -Parses an LDAP-style DN string (e.g. `'CN=foo, C=US'`) and turns it into an -Identity instance. - -Parameters - - - `dn` -- a String - -Returns an Identity instance. - -### `identityFromArray(arr)` - -Constructs an Identity from an array of DN components (see `Identity#toArray()` -for the format). - -Parameters - - - `arr` -- an Array of Objects, DN components with `name` and `value` - -Returns an Identity instance. - - -Supported attributes in DNs: - -| Attribute name | OID | -| -------------- | --- | -| `cn` | `2.5.4.3` | -| `o` | `2.5.4.10` | -| `ou` | `2.5.4.11` | -| `l` | `2.5.4.7` | -| `s` | `2.5.4.8` | -| `c` | `2.5.4.6` | -| `sn` | `2.5.4.4` | -| `postalCode` | `2.5.4.17` | -| `serialNumber` | `2.5.4.5` | -| `street` | `2.5.4.9` | -| `x500UniqueIdentifier` | `2.5.4.45` | -| `role` | `2.5.4.72` | -| `telephoneNumber` | `2.5.4.20` | -| `description` | `2.5.4.13` | -| `dc` | `0.9.2342.19200300.100.1.25` | -| `uid` | `0.9.2342.19200300.100.1.1` | -| `mail` | `0.9.2342.19200300.100.1.3` | -| `title` | `2.5.4.12` | -| `gn` | `2.5.4.42` | -| `initials` | `2.5.4.43` | -| `pseudonym` | `2.5.4.65` | - -### `Identity#toString()` - -Returns the identity as an LDAP-style DN string. -e.g. `'CN=foo, O=bar corp, C=us'` - -### `Identity#type` - -The type of identity. One of `'host'`, `'user'`, `'email'` or `'unknown'` - -### `Identity#hostname` -### `Identity#uid` -### `Identity#email` - -Set when `type` is `'host'`, `'user'`, or `'email'`, respectively. Strings. - -### `Identity#cn` - -The value of the first `CN=` in the DN, if any. It's probably better to use -the `#get()` method instead of this property. - -### `Identity#get(name[, asArray])` - -Returns the value of a named attribute in the Identity DN. If there is no -attribute of the given name, returns `undefined`. If multiple components -of the DN contain an attribute of this name, an exception is thrown unless -the `asArray` argument is given as `true` -- then they will be returned as -an Array in the same order they appear in the DN. - -Parameters - - - `name` -- a String - - `asArray` -- an optional Boolean - -### `Identity#toArray()` - -Returns the Identity as an Array of DN component objects. This looks like: - -```js -[ { - "name": "cn", - "value": "Joe Bloggs" -}, -{ - "name": "o", - "value": "Organisation Ltd" -} ] -``` - -Each object has a `name` and a `value` property. The returned objects may be -safely modified. - -Errors ------- - -### `InvalidAlgorithmError` - -The specified algorithm is not valid, either because it is not supported, or -because it was not included on a list of allowed algorithms. - -Thrown by `Fingerprint.parse`, `Key#fingerprint`. - -Properties - -- `algorithm` -- the algorithm that could not be validated - -### `FingerprintFormatError` - -The fingerprint string given could not be parsed as a supported fingerprint -format, or the specified fingerprint format is invalid. - -Thrown by `Fingerprint.parse`, `Fingerprint#toString`. - -Properties - -- `fingerprint` -- if caused by a fingerprint, the string value given -- `format` -- if caused by an invalid format specification, the string value given - -### `KeyParseError` - -The key data given could not be parsed as a valid key. - -Properties - -- `keyName` -- `filename` that was given to `parseKey` -- `format` -- the `format` that was trying to parse the key (see `parseKey`) -- `innerErr` -- the inner Error thrown by the format parser - -### `KeyEncryptedError` - -The key is encrypted with a symmetric key (ie, it is password protected). The -parsing operation would succeed if it was given the `passphrase` option. - -Properties - -- `keyName` -- `filename` that was given to `parseKey` -- `format` -- the `format` that was trying to parse the key (currently can only - be `"pem"`) - -### `CertificateParseError` - -The certificate data given could not be parsed as a valid certificate. - -Properties - -- `certName` -- `filename` that was given to `parseCertificate` -- `format` -- the `format` that was trying to parse the key - (see `parseCertificate`) -- `innerErr` -- the inner Error thrown by the format parser - -Friends of sshpk ----------------- - - * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library - for speaking the `ssh-agent` protocol from node.js, which uses `sshpk` diff --git a/test-eol-project/node_modules/sshpk/lib/algs.js b/test-eol-project/node_modules/sshpk/lib/algs.js deleted file mode 100644 index 3b01e7d1..00000000 --- a/test-eol-project/node_modules/sshpk/lib/algs.js +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -var Buffer = require('safer-buffer').Buffer; - -var algInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y'], - sizePart: 'p' - }, - 'rsa': { - parts: ['e', 'n'], - sizePart: 'n' - }, - 'ecdsa': { - parts: ['curve', 'Q'], - sizePart: 'Q' - }, - 'ed25519': { - parts: ['A'], - sizePart: 'A' - } -}; -algInfo['curve25519'] = algInfo['ed25519']; - -var algPrivInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y', 'x'] - }, - 'rsa': { - parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] - }, - 'ecdsa': { - parts: ['curve', 'Q', 'd'] - }, - 'ed25519': { - parts: ['A', 'k'] - } -}; -algPrivInfo['curve25519'] = algPrivInfo['ed25519']; - -var hashAlgs = { - 'md5': true, - 'sha1': true, - 'sha256': true, - 'sha384': true, - 'sha512': true -}; - -/* - * Taken from - * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf - */ -var curves = { - 'nistp256': { - size: 256, - pkcs8oid: '1.2.840.10045.3.1.7', - p: Buffer.from(('00' + - 'ffffffff 00000001 00000000 00000000' + - '00000000 ffffffff ffffffff ffffffff'). - replace(/ /g, ''), 'hex'), - a: Buffer.from(('00' + - 'FFFFFFFF 00000001 00000000 00000000' + - '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: Buffer.from(( - '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + - '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). - replace(/ /g, ''), 'hex'), - s: Buffer.from(('00' + - 'c49d3608 86e70493 6a6678e1 139d26b7' + - '819f7e90'). - replace(/ /g, ''), 'hex'), - n: Buffer.from(('00' + - 'ffffffff 00000000 ffffffff ffffffff' + - 'bce6faad a7179e84 f3b9cac2 fc632551'). - replace(/ /g, ''), 'hex'), - G: Buffer.from(('04' + - '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + - '77037d81 2deb33a0 f4a13945 d898c296' + - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + - '2bce3357 6b315ece cbb64068 37bf51f5'). - replace(/ /g, ''), 'hex') - }, - 'nistp384': { - size: 384, - pkcs8oid: '1.3.132.0.34', - p: Buffer.from(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffe' + - 'ffffffff 00000000 00000000 ffffffff'). - replace(/ /g, ''), 'hex'), - a: Buffer.from(('00' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + - 'FFFFFFFF 00000000 00000000 FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: Buffer.from(( - 'b3312fa7 e23ee7e4 988e056b e3f82d19' + - '181d9c6e fe814112 0314088f 5013875a' + - 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). - replace(/ /g, ''), 'hex'), - s: Buffer.from(('00' + - 'a335926a a319a27a 1d00896a 6773a482' + - '7acdac73'). - replace(/ /g, ''), 'hex'), - n: Buffer.from(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff c7634d81 f4372ddf' + - '581a0db2 48b0a77a ecec196a ccc52973'). - replace(/ /g, ''), 'hex'), - G: Buffer.from(('04' + - 'aa87ca22 be8b0537 8eb1c71e f320ad74' + - '6e1d3b62 8ba79b98 59f741e0 82542a38' + - '5502f25d bf55296c 3a545e38 72760ab7' + - '3617de4a 96262c6f 5d9e98bf 9292dc29' + - 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). - replace(/ /g, ''), 'hex') - }, - 'nistp521': { - size: 521, - pkcs8oid: '1.3.132.0.35', - p: Buffer.from(( - '01ffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffff').replace(/ /g, ''), 'hex'), - a: Buffer.from(('01FF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: Buffer.from(('51' + - '953eb961 8e1c9a1f 929a21a0 b68540ee' + - 'a2da725b 99b315f3 b8b48991 8ef109e1' + - '56193951 ec7e937b 1652c0bd 3bb1bf07' + - '3573df88 3d2c34f1 ef451fd4 6b503f00'). - replace(/ /g, ''), 'hex'), - s: Buffer.from(('00' + - 'd09e8800 291cb853 96cc6717 393284aa' + - 'a0da64ba').replace(/ /g, ''), 'hex'), - n: Buffer.from(('01ff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffa' + - '51868783 bf2f966b 7fcc0148 f709a5d0' + - '3bb5c9b8 899c47ae bb6fb71e 91386409'). - replace(/ /g, ''), 'hex'), - G: Buffer.from(('04' + - '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + - '9c648139 053fb521 f828af60 6b4d3dba' + - 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + - '3348b3c1 856a429b f97e7e31 c2e5bd66' + - '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + - '98f54449 579b4468 17afbd17 273e662c' + - '97ee7299 5ef42640 c550b901 3fad0761' + - '353c7086 a272c240 88be9476 9fd16650'). - replace(/ /g, ''), 'hex') - } -}; - -module.exports = { - info: algInfo, - privInfo: algPrivInfo, - hashAlgs: hashAlgs, - curves: curves -}; diff --git a/test-eol-project/node_modules/sshpk/lib/certificate.js b/test-eol-project/node_modules/sshpk/lib/certificate.js deleted file mode 100644 index 69323570..00000000 --- a/test-eol-project/node_modules/sshpk/lib/certificate.js +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright 2016 Joyent, Inc. - -module.exports = Certificate; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('./algs'); -var crypto = require('crypto'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var errs = require('./errors'); -var util = require('util'); -var utils = require('./utils'); -var Key = require('./key'); -var PrivateKey = require('./private-key'); -var Identity = require('./identity'); - -var formats = {}; -formats['openssh'] = require('./formats/openssh-cert'); -formats['x509'] = require('./formats/x509'); -formats['pem'] = require('./formats/x509-pem'); - -var CertificateParseError = errs.CertificateParseError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Certificate(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.subjects, 'options.subjects'); - utils.assertCompatible(opts.subjects[0], Identity, [1, 0], - 'options.subjects'); - utils.assertCompatible(opts.subjectKey, Key, [1, 0], - 'options.subjectKey'); - utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); - if (opts.issuerKey !== undefined) { - utils.assertCompatible(opts.issuerKey, Key, [1, 0], - 'options.issuerKey'); - } - assert.object(opts.signatures, 'options.signatures'); - assert.buffer(opts.serial, 'options.serial'); - assert.date(opts.validFrom, 'options.validFrom'); - assert.date(opts.validUntil, 'optons.validUntil'); - - assert.optionalArrayOfString(opts.purposes, 'options.purposes'); - - this._hashCache = {}; - - this.subjects = opts.subjects; - this.issuer = opts.issuer; - this.subjectKey = opts.subjectKey; - this.issuerKey = opts.issuerKey; - this.signatures = opts.signatures; - this.serial = opts.serial; - this.validFrom = opts.validFrom; - this.validUntil = opts.validUntil; - this.purposes = opts.purposes; -} - -Certificate.formats = formats; - -Certificate.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'x509'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - return (formats[format].write(this, options)); -}; - -Certificate.prototype.toString = function (format, options) { - if (format === undefined) - format = 'pem'; - return (this.toBuffer(format, options).toString()); -}; - -Certificate.prototype.fingerprint = function (algo) { - if (algo === undefined) - algo = 'sha256'; - assert.string(algo, 'algorithm'); - var opts = { - type: 'certificate', - hash: this.hash(algo), - algorithm: algo - }; - return (new Fingerprint(opts)); -}; - -Certificate.prototype.hash = function (algo) { - assert.string(algo, 'algorithm'); - algo = algo.toLowerCase(); - if (algs.hashAlgs[algo] === undefined) - throw (new InvalidAlgorithmError(algo)); - - if (this._hashCache[algo]) - return (this._hashCache[algo]); - - var hash = crypto.createHash(algo). - update(this.toBuffer('x509')).digest(); - this._hashCache[algo] = hash; - return (hash); -}; - -Certificate.prototype.isExpired = function (when) { - if (when === undefined) - when = new Date(); - return (!((when.getTime() >= this.validFrom.getTime()) && - (when.getTime() < this.validUntil.getTime()))); -}; - -Certificate.prototype.isSignedBy = function (issuerCert) { - utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); - - if (!this.issuer.equals(issuerCert.subjects[0])) - return (false); - if (this.issuer.purposes && this.issuer.purposes.length > 0 && - this.issuer.purposes.indexOf('ca') === -1) { - return (false); - } - - return (this.isSignedByKey(issuerCert.subjectKey)); -}; - -Certificate.prototype.getExtension = function (keyOrOid) { - assert.string(keyOrOid, 'keyOrOid'); - var ext = this.getExtensions().filter(function (maybeExt) { - if (maybeExt.format === 'x509') - return (maybeExt.oid === keyOrOid); - if (maybeExt.format === 'openssh') - return (maybeExt.name === keyOrOid); - return (false); - })[0]; - return (ext); -}; - -Certificate.prototype.getExtensions = function () { - var exts = []; - var x509 = this.signatures.x509; - if (x509 && x509.extras && x509.extras.exts) { - x509.extras.exts.forEach(function (ext) { - ext.format = 'x509'; - exts.push(ext); - }); - } - var openssh = this.signatures.openssh; - if (openssh && openssh.exts) { - openssh.exts.forEach(function (ext) { - ext.format = 'openssh'; - exts.push(ext); - }); - } - return (exts); -}; - -Certificate.prototype.isSignedByKey = function (issuerKey) { - utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); - - if (this.issuerKey !== undefined) { - return (this.issuerKey. - fingerprint('sha512').matches(issuerKey)); - } - - var fmt = Object.keys(this.signatures)[0]; - var valid = formats[fmt].verify(this, issuerKey); - if (valid) - this.issuerKey = issuerKey; - return (valid); -}; - -Certificate.prototype.signWith = function (key) { - utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); - var fmts = Object.keys(formats); - var didOne = false; - for (var i = 0; i < fmts.length; ++i) { - if (fmts[i] !== 'pem') { - var ret = formats[fmts[i]].sign(this, key); - if (ret === true) - didOne = true; - } - } - if (!didOne) { - throw (new Error('Failed to sign the certificate for any ' + - 'available certificate formats')); - } -}; - -Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { - var subjects; - if (Array.isArray(subjectOrSubjects)) - subjects = subjectOrSubjects; - else - subjects = [subjectOrSubjects]; - - assert.arrayOfObject(subjects); - subjects.forEach(function (subject) { - utils.assertCompatible(subject, Identity, [1, 0], 'subject'); - }); - - utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); - - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalObject(options.validFrom, 'options.validFrom'); - assert.optionalObject(options.validUntil, 'options.validUntil'); - var validFrom = options.validFrom; - var validUntil = options.validUntil; - if (validFrom === undefined) - validFrom = new Date(); - if (validUntil === undefined) { - assert.optionalNumber(options.lifetime, 'options.lifetime'); - var lifetime = options.lifetime; - if (lifetime === undefined) - lifetime = 10*365*24*3600; - validUntil = new Date(); - validUntil.setTime(validUntil.getTime() + lifetime*1000); - } - assert.optionalBuffer(options.serial, 'options.serial'); - var serial = options.serial; - if (serial === undefined) - serial = Buffer.from('0000000000000001', 'hex'); - - var purposes = options.purposes; - if (purposes === undefined) - purposes = []; - - if (purposes.indexOf('signature') === -1) - purposes.push('signature'); - - /* Self-signed certs are always CAs. */ - if (purposes.indexOf('ca') === -1) - purposes.push('ca'); - if (purposes.indexOf('crl') === -1) - purposes.push('crl'); - - /* - * If we weren't explicitly given any other purposes, do the sensible - * thing and add some basic ones depending on the subject type. - */ - if (purposes.length <= 3) { - var hostSubjects = subjects.filter(function (subject) { - return (subject.type === 'host'); - }); - var userSubjects = subjects.filter(function (subject) { - return (subject.type === 'user'); - }); - if (hostSubjects.length > 0) { - if (purposes.indexOf('serverAuth') === -1) - purposes.push('serverAuth'); - } - if (userSubjects.length > 0) { - if (purposes.indexOf('clientAuth') === -1) - purposes.push('clientAuth'); - } - if (userSubjects.length > 0 || hostSubjects.length > 0) { - if (purposes.indexOf('keyAgreement') === -1) - purposes.push('keyAgreement'); - if (key.type === 'rsa' && - purposes.indexOf('encryption') === -1) - purposes.push('encryption'); - } - } - - var cert = new Certificate({ - subjects: subjects, - issuer: subjects[0], - subjectKey: key.toPublic(), - issuerKey: key.toPublic(), - signatures: {}, - serial: serial, - validFrom: validFrom, - validUntil: validUntil, - purposes: purposes - }); - cert.signWith(key); - - return (cert); -}; - -Certificate.create = - function (subjectOrSubjects, key, issuer, issuerKey, options) { - var subjects; - if (Array.isArray(subjectOrSubjects)) - subjects = subjectOrSubjects; - else - subjects = [subjectOrSubjects]; - - assert.arrayOfObject(subjects); - subjects.forEach(function (subject) { - utils.assertCompatible(subject, Identity, [1, 0], 'subject'); - }); - - utils.assertCompatible(key, Key, [1, 0], 'key'); - if (PrivateKey.isPrivateKey(key)) - key = key.toPublic(); - utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); - utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); - - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalObject(options.validFrom, 'options.validFrom'); - assert.optionalObject(options.validUntil, 'options.validUntil'); - var validFrom = options.validFrom; - var validUntil = options.validUntil; - if (validFrom === undefined) - validFrom = new Date(); - if (validUntil === undefined) { - assert.optionalNumber(options.lifetime, 'options.lifetime'); - var lifetime = options.lifetime; - if (lifetime === undefined) - lifetime = 10*365*24*3600; - validUntil = new Date(); - validUntil.setTime(validUntil.getTime() + lifetime*1000); - } - assert.optionalBuffer(options.serial, 'options.serial'); - var serial = options.serial; - if (serial === undefined) - serial = Buffer.from('0000000000000001', 'hex'); - - var purposes = options.purposes; - if (purposes === undefined) - purposes = []; - - if (purposes.indexOf('signature') === -1) - purposes.push('signature'); - - if (options.ca === true) { - if (purposes.indexOf('ca') === -1) - purposes.push('ca'); - if (purposes.indexOf('crl') === -1) - purposes.push('crl'); - } - - var hostSubjects = subjects.filter(function (subject) { - return (subject.type === 'host'); - }); - var userSubjects = subjects.filter(function (subject) { - return (subject.type === 'user'); - }); - if (hostSubjects.length > 0) { - if (purposes.indexOf('serverAuth') === -1) - purposes.push('serverAuth'); - } - if (userSubjects.length > 0) { - if (purposes.indexOf('clientAuth') === -1) - purposes.push('clientAuth'); - } - if (userSubjects.length > 0 || hostSubjects.length > 0) { - if (purposes.indexOf('keyAgreement') === -1) - purposes.push('keyAgreement'); - if (key.type === 'rsa' && - purposes.indexOf('encryption') === -1) - purposes.push('encryption'); - } - - var cert = new Certificate({ - subjects: subjects, - issuer: issuer, - subjectKey: key, - issuerKey: issuerKey.toPublic(), - signatures: {}, - serial: serial, - validFrom: validFrom, - validUntil: validUntil, - purposes: purposes - }); - cert.signWith(issuerKey); - - return (cert); -}; - -Certificate.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - return (k); - } catch (e) { - throw (new CertificateParseError(options.filename, format, e)); - } -}; - -Certificate.isCertificate = function (obj, ver) { - return (utils.isCompatible(obj, Certificate, ver)); -}; - -/* - * API versions for Certificate: - * [1,0] -- initial ver - * [1,1] -- openssh format now unpacks extensions - */ -Certificate.prototype._sshpkApiVersion = [1, 1]; - -Certificate._oldVersionDetect = function (obj) { - return ([1, 0]); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/dhe.js b/test-eol-project/node_modules/sshpk/lib/dhe.js deleted file mode 100644 index a3c8032c..00000000 --- a/test-eol-project/node_modules/sshpk/lib/dhe.js +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright 2017 Joyent, Inc. - -module.exports = { - DiffieHellman: DiffieHellman, - generateECDSA: generateECDSA, - generateED25519: generateED25519 -}; - -var assert = require('assert-plus'); -var crypto = require('crypto'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('./algs'); -var utils = require('./utils'); -var nacl = require('tweetnacl'); - -var Key = require('./key'); -var PrivateKey = require('./private-key'); - -var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); - -var ecdh = require('ecc-jsbn'); -var ec = require('ecc-jsbn/lib/ec'); -var jsbn = require('jsbn').BigInteger; - -function DiffieHellman(key) { - utils.assertCompatible(key, Key, [1, 4], 'key'); - this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); - this._algo = key.type; - this._curve = key.curve; - this._key = key; - if (key.type === 'dsa') { - if (!CRYPTO_HAVE_ECDH) { - throw (new Error('Due to bugs in the node 0.10 ' + - 'crypto API, node 0.12.x or later is required ' + - 'to use DH')); - } - this._dh = crypto.createDiffieHellman( - key.part.p.data, undefined, - key.part.g.data, undefined); - this._p = key.part.p; - this._g = key.part.g; - if (this._isPriv) - this._dh.setPrivateKey(key.part.x.data); - this._dh.setPublicKey(key.part.y.data); - - } else if (key.type === 'ecdsa') { - if (!CRYPTO_HAVE_ECDH) { - this._ecParams = new X9ECParameters(this._curve); - - if (this._isPriv) { - this._priv = new ECPrivate( - this._ecParams, key.part.d.data); - } - return; - } - - var curve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[key.curve]; - this._dh = crypto.createECDH(curve); - if (typeof (this._dh) !== 'object' || - typeof (this._dh.setPrivateKey) !== 'function') { - CRYPTO_HAVE_ECDH = false; - DiffieHellman.call(this, key); - return; - } - if (this._isPriv) - this._dh.setPrivateKey(key.part.d.data); - this._dh.setPublicKey(key.part.Q.data); - - } else if (key.type === 'curve25519') { - if (this._isPriv) { - utils.assertCompatible(key, PrivateKey, [1, 5], 'key'); - this._priv = key.part.k.data; - } - - } else { - throw (new Error('DH not supported for ' + key.type + ' keys')); - } -} - -DiffieHellman.prototype.getPublicKey = function () { - if (this._isPriv) - return (this._key.toPublic()); - return (this._key); -}; - -DiffieHellman.prototype.getPrivateKey = function () { - if (this._isPriv) - return (this._key); - else - return (undefined); -}; -DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; - -DiffieHellman.prototype._keyCheck = function (pk, isPub) { - assert.object(pk, 'key'); - if (!isPub) - utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); - utils.assertCompatible(pk, Key, [1, 4], 'key'); - - if (pk.type !== this._algo) { - throw (new Error('A ' + pk.type + ' key cannot be used in ' + - this._algo + ' Diffie-Hellman')); - } - - if (pk.curve !== this._curve) { - throw (new Error('A key from the ' + pk.curve + ' curve ' + - 'cannot be used with a ' + this._curve + - ' Diffie-Hellman')); - } - - if (pk.type === 'dsa') { - assert.deepEqual(pk.part.p, this._p, - 'DSA key prime does not match'); - assert.deepEqual(pk.part.g, this._g, - 'DSA key generator does not match'); - } -}; - -DiffieHellman.prototype.setKey = function (pk) { - this._keyCheck(pk); - - if (pk.type === 'dsa') { - this._dh.setPrivateKey(pk.part.x.data); - this._dh.setPublicKey(pk.part.y.data); - - } else if (pk.type === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.setPrivateKey(pk.part.d.data); - this._dh.setPublicKey(pk.part.Q.data); - } else { - this._priv = new ECPrivate( - this._ecParams, pk.part.d.data); - } - - } else if (pk.type === 'curve25519') { - var k = pk.part.k; - if (!pk.part.k) - k = pk.part.r; - this._priv = k.data; - if (this._priv[0] === 0x00) - this._priv = this._priv.slice(1); - this._priv = this._priv.slice(0, 32); - } - this._key = pk; - this._isPriv = true; -}; -DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; - -DiffieHellman.prototype.computeSecret = function (otherpk) { - this._keyCheck(otherpk, true); - if (!this._isPriv) - throw (new Error('DH exchange has not been initialized with ' + - 'a private key yet')); - - var pub; - if (this._algo === 'dsa') { - return (this._dh.computeSecret( - otherpk.part.y.data)); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - return (this._dh.computeSecret( - otherpk.part.Q.data)); - } else { - pub = new ECPublic( - this._ecParams, otherpk.part.Q.data); - return (this._priv.deriveSharedSecret(pub)); - } - - } else if (this._algo === 'curve25519') { - pub = otherpk.part.A.data; - while (pub[0] === 0x00 && pub.length > 32) - pub = pub.slice(1); - var priv = this._priv; - assert.strictEqual(pub.length, 32); - assert.strictEqual(priv.length, 32); - - var secret = nacl.box.before(new Uint8Array(pub), - new Uint8Array(priv)); - - return (Buffer.from(secret)); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; - -DiffieHellman.prototype.generateKey = function () { - var parts = []; - var priv, pub; - if (this._algo === 'dsa') { - this._dh.generateKeys(); - - parts.push({name: 'p', data: this._p.data}); - parts.push({name: 'q', data: this._key.part.q.data}); - parts.push({name: 'g', data: this._g.data}); - parts.push({name: 'y', data: this._dh.getPublicKey()}); - parts.push({name: 'x', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'dsa', - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.generateKeys(); - - parts.push({name: 'curve', - data: Buffer.from(this._curve)}); - parts.push({name: 'Q', data: this._dh.getPublicKey()}); - parts.push({name: 'd', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else { - var n = this._ecParams.getN(); - var r = new jsbn(crypto.randomBytes(n.bitLength())); - var n1 = n.subtract(jsbn.ONE); - priv = r.mod(n1).add(jsbn.ONE); - pub = this._ecParams.getG().multiply(priv); - - priv = Buffer.from(priv.toByteArray()); - pub = Buffer.from(this._ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - this._priv = new ECPrivate(this._ecParams, priv); - - parts.push({name: 'curve', - data: Buffer.from(this._curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - } else if (this._algo === 'curve25519') { - var pair = nacl.box.keyPair(); - priv = Buffer.from(pair.secretKey); - pub = Buffer.from(pair.publicKey); - priv = Buffer.concat([priv, pub]); - assert.strictEqual(priv.length, 64); - assert.strictEqual(pub.length, 32); - - parts.push({name: 'A', data: pub}); - parts.push({name: 'k', data: priv}); - this._key = new PrivateKey({ - type: 'curve25519', - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; -DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; - -/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ - -function X9ECParameters(name) { - var params = algs.curves[name]; - assert.object(params); - - var p = new jsbn(params.p); - var a = new jsbn(params.a); - var b = new jsbn(params.b); - var n = new jsbn(params.n); - var h = jsbn.ONE; - var curve = new ec.ECCurveFp(p, a, b); - var G = curve.decodePointHex(params.G.toString('hex')); - - this.curve = curve; - this.g = G; - this.n = n; - this.h = h; -} -X9ECParameters.prototype.getCurve = function () { return (this.curve); }; -X9ECParameters.prototype.getG = function () { return (this.g); }; -X9ECParameters.prototype.getN = function () { return (this.n); }; -X9ECParameters.prototype.getH = function () { return (this.h); }; - -function ECPublic(params, buffer) { - this._params = params; - if (buffer[0] === 0x00) - buffer = buffer.slice(1); - this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); -} - -function ECPrivate(params, buffer) { - this._params = params; - this._priv = new jsbn(utils.mpNormalize(buffer)); -} -ECPrivate.prototype.deriveSharedSecret = function (pubKey) { - assert.ok(pubKey instanceof ECPublic); - var S = pubKey._pub.multiply(this._priv); - return (Buffer.from(S.getX().toBigInteger().toByteArray())); -}; - -function generateED25519() { - var pair = nacl.sign.keyPair(); - var priv = Buffer.from(pair.secretKey); - var pub = Buffer.from(pair.publicKey); - assert.strictEqual(priv.length, 64); - assert.strictEqual(pub.length, 32); - - var parts = []; - parts.push({name: 'A', data: pub}); - parts.push({name: 'k', data: priv.slice(0, 32)}); - var key = new PrivateKey({ - type: 'ed25519', - parts: parts - }); - return (key); -} - -/* Generates a new ECDSA private key on a given curve. */ -function generateECDSA(curve) { - var parts = []; - var key; - - if (CRYPTO_HAVE_ECDH) { - /* - * Node crypto doesn't expose key generation directly, but the - * ECDH instances can generate keys. It turns out this just - * calls into the OpenSSL generic key generator, and we can - * read its output happily without doing an actual DH. So we - * use that here. - */ - var osCurve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[curve]; - - var dh = crypto.createECDH(osCurve); - dh.generateKeys(); - - parts.push({name: 'curve', - data: Buffer.from(curve)}); - parts.push({name: 'Q', data: dh.getPublicKey()}); - parts.push({name: 'd', data: dh.getPrivateKey()}); - - key = new PrivateKey({ - type: 'ecdsa', - curve: curve, - parts: parts - }); - return (key); - } else { - - var ecParams = new X9ECParameters(curve); - - /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ - var n = ecParams.getN(); - /* - * The crypto.randomBytes() function can only give us whole - * bytes, so taking a nod from X9.62, we round up. - */ - var cByteLen = Math.ceil((n.bitLength() + 64) / 8); - var c = new jsbn(crypto.randomBytes(cByteLen)); - - var n1 = n.subtract(jsbn.ONE); - var priv = c.mod(n1).add(jsbn.ONE); - var pub = ecParams.getG().multiply(priv); - - priv = Buffer.from(priv.toByteArray()); - pub = Buffer.from(ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - parts.push({name: 'curve', data: Buffer.from(curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - key = new PrivateKey({ - type: 'ecdsa', - curve: curve, - parts: parts - }); - return (key); - } -} diff --git a/test-eol-project/node_modules/sshpk/lib/ed-compat.js b/test-eol-project/node_modules/sshpk/lib/ed-compat.js deleted file mode 100644 index 70732e1f..00000000 --- a/test-eol-project/node_modules/sshpk/lib/ed-compat.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - Verifier: Verifier, - Signer: Signer -}; - -var nacl = require('tweetnacl'); -var stream = require('stream'); -var util = require('util'); -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var Signature = require('./signature'); - -function Verifier(key, hashAlgo) { - if (hashAlgo.toLowerCase() !== 'sha512') - throw (new Error('ED25519 only supports the use of ' + - 'SHA-512 hashes')); - - this.key = key; - this.chunks = []; - - stream.Writable.call(this, {}); -} -util.inherits(Verifier, stream.Writable); - -Verifier.prototype._write = function (chunk, enc, cb) { - this.chunks.push(chunk); - cb(); -}; - -Verifier.prototype.update = function (chunk) { - if (typeof (chunk) === 'string') - chunk = Buffer.from(chunk, 'binary'); - this.chunks.push(chunk); -}; - -Verifier.prototype.verify = function (signature, fmt) { - var sig; - if (Signature.isSignature(signature, [2, 0])) { - if (signature.type !== 'ed25519') - return (false); - sig = signature.toBuffer('raw'); - - } else if (typeof (signature) === 'string') { - sig = Buffer.from(signature, 'base64'); - - } else if (Signature.isSignature(signature, [1, 0])) { - throw (new Error('signature was created by too old ' + - 'a version of sshpk and cannot be verified')); - } - - assert.buffer(sig); - return (nacl.sign.detached.verify( - new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(sig), - new Uint8Array(this.key.part.A.data))); -}; - -function Signer(key, hashAlgo) { - if (hashAlgo.toLowerCase() !== 'sha512') - throw (new Error('ED25519 only supports the use of ' + - 'SHA-512 hashes')); - - this.key = key; - this.chunks = []; - - stream.Writable.call(this, {}); -} -util.inherits(Signer, stream.Writable); - -Signer.prototype._write = function (chunk, enc, cb) { - this.chunks.push(chunk); - cb(); -}; - -Signer.prototype.update = function (chunk) { - if (typeof (chunk) === 'string') - chunk = Buffer.from(chunk, 'binary'); - this.chunks.push(chunk); -}; - -Signer.prototype.sign = function () { - var sig = nacl.sign.detached( - new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(Buffer.concat([ - this.key.part.k.data, this.key.part.A.data]))); - var sigBuf = Buffer.from(sig); - var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); - sigObj.hashAlgorithm = 'sha512'; - return (sigObj); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/errors.js b/test-eol-project/node_modules/sshpk/lib/errors.js deleted file mode 100644 index 1cc09ec7..00000000 --- a/test-eol-project/node_modules/sshpk/lib/errors.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -var assert = require('assert-plus'); -var util = require('util'); - -function FingerprintFormatError(fp, format) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, FingerprintFormatError); - this.name = 'FingerprintFormatError'; - this.fingerprint = fp; - this.format = format; - this.message = 'Fingerprint format is not supported, or is invalid: '; - if (fp !== undefined) - this.message += ' fingerprint = ' + fp; - if (format !== undefined) - this.message += ' format = ' + format; -} -util.inherits(FingerprintFormatError, Error); - -function InvalidAlgorithmError(alg) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, InvalidAlgorithmError); - this.name = 'InvalidAlgorithmError'; - this.algorithm = alg; - this.message = 'Algorithm "' + alg + '" is not supported'; -} -util.inherits(InvalidAlgorithmError, Error); - -function KeyParseError(name, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, KeyParseError); - this.name = 'KeyParseError'; - this.format = format; - this.keyName = name; - this.innerErr = innerErr; - this.message = 'Failed to parse ' + name + ' as a valid ' + format + - ' format key: ' + innerErr.message; -} -util.inherits(KeyParseError, Error); - -function SignatureParseError(type, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, SignatureParseError); - this.name = 'SignatureParseError'; - this.type = type; - this.format = format; - this.innerErr = innerErr; - this.message = 'Failed to parse the given data as a ' + type + - ' signature in ' + format + ' format: ' + innerErr.message; -} -util.inherits(SignatureParseError, Error); - -function CertificateParseError(name, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, CertificateParseError); - this.name = 'CertificateParseError'; - this.format = format; - this.certName = name; - this.innerErr = innerErr; - this.message = 'Failed to parse ' + name + ' as a valid ' + format + - ' format certificate: ' + innerErr.message; -} -util.inherits(CertificateParseError, Error); - -function KeyEncryptedError(name, format) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, KeyEncryptedError); - this.name = 'KeyEncryptedError'; - this.format = format; - this.keyName = name; - this.message = 'The ' + format + ' format key ' + name + ' is ' + - 'encrypted (password-protected), and no passphrase was ' + - 'provided in `options`'; -} -util.inherits(KeyEncryptedError, Error); - -module.exports = { - FingerprintFormatError: FingerprintFormatError, - InvalidAlgorithmError: InvalidAlgorithmError, - KeyParseError: KeyParseError, - SignatureParseError: SignatureParseError, - KeyEncryptedError: KeyEncryptedError, - CertificateParseError: CertificateParseError -}; diff --git a/test-eol-project/node_modules/sshpk/lib/fingerprint.js b/test-eol-project/node_modules/sshpk/lib/fingerprint.js deleted file mode 100644 index 0004b376..00000000 --- a/test-eol-project/node_modules/sshpk/lib/fingerprint.js +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2018 Joyent, Inc. - -module.exports = Fingerprint; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('./algs'); -var crypto = require('crypto'); -var errs = require('./errors'); -var Key = require('./key'); -var PrivateKey = require('./private-key'); -var Certificate = require('./certificate'); -var utils = require('./utils'); - -var FingerprintFormatError = errs.FingerprintFormatError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Fingerprint(opts) { - assert.object(opts, 'options'); - assert.string(opts.type, 'options.type'); - assert.buffer(opts.hash, 'options.hash'); - assert.string(opts.algorithm, 'options.algorithm'); - - this.algorithm = opts.algorithm.toLowerCase(); - if (algs.hashAlgs[this.algorithm] !== true) - throw (new InvalidAlgorithmError(this.algorithm)); - - this.hash = opts.hash; - this.type = opts.type; - this.hashType = opts.hashType; -} - -Fingerprint.prototype.toString = function (format) { - if (format === undefined) { - if (this.algorithm === 'md5' || this.hashType === 'spki') - format = 'hex'; - else - format = 'base64'; - } - assert.string(format); - - switch (format) { - case 'hex': - if (this.hashType === 'spki') - return (this.hash.toString('hex')); - return (addColons(this.hash.toString('hex'))); - case 'base64': - if (this.hashType === 'spki') - return (this.hash.toString('base64')); - return (sshBase64Format(this.algorithm, - this.hash.toString('base64'))); - default: - throw (new FingerprintFormatError(undefined, format)); - } -}; - -Fingerprint.prototype.matches = function (other) { - assert.object(other, 'key or certificate'); - if (this.type === 'key' && this.hashType !== 'ssh') { - utils.assertCompatible(other, Key, [1, 7], 'key with spki'); - if (PrivateKey.isPrivateKey(other)) { - utils.assertCompatible(other, PrivateKey, [1, 6], - 'privatekey with spki support'); - } - } else if (this.type === 'key') { - utils.assertCompatible(other, Key, [1, 0], 'key'); - } else { - utils.assertCompatible(other, Certificate, [1, 0], - 'certificate'); - } - - var theirHash = other.hash(this.algorithm, this.hashType); - var theirHash2 = crypto.createHash(this.algorithm). - update(theirHash).digest('base64'); - - if (this.hash2 === undefined) - this.hash2 = crypto.createHash(this.algorithm). - update(this.hash).digest('base64'); - - return (this.hash2 === theirHash2); -}; - -/*JSSTYLED*/ -var base64RE = /^[A-Za-z0-9+\/=]+$/; -/*JSSTYLED*/ -var hexRE = /^[a-fA-F0-9]+$/; - -Fingerprint.parse = function (fp, options) { - assert.string(fp, 'fingerprint'); - - var alg, hash, enAlgs; - if (Array.isArray(options)) { - enAlgs = options; - options = {}; - } - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - if (options.enAlgs !== undefined) - enAlgs = options.enAlgs; - if (options.algorithms !== undefined) - enAlgs = options.algorithms; - assert.optionalArrayOfString(enAlgs, 'algorithms'); - - var hashType = 'ssh'; - if (options.hashType !== undefined) - hashType = options.hashType; - assert.string(hashType, 'options.hashType'); - - var parts = fp.split(':'); - if (parts.length == 2) { - alg = parts[0].toLowerCase(); - if (!base64RE.test(parts[1])) - throw (new FingerprintFormatError(fp)); - try { - hash = Buffer.from(parts[1], 'base64'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } else if (parts.length > 2) { - alg = 'md5'; - if (parts[0].toLowerCase() === 'md5') - parts = parts.slice(1); - parts = parts.map(function (p) { - while (p.length < 2) - p = '0' + p; - if (p.length > 2) - throw (new FingerprintFormatError(fp)); - return (p); - }); - parts = parts.join(''); - if (!hexRE.test(parts) || parts.length % 2 !== 0) - throw (new FingerprintFormatError(fp)); - try { - hash = Buffer.from(parts, 'hex'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } else { - if (hexRE.test(fp)) { - hash = Buffer.from(fp, 'hex'); - } else if (base64RE.test(fp)) { - hash = Buffer.from(fp, 'base64'); - } else { - throw (new FingerprintFormatError(fp)); - } - - switch (hash.length) { - case 32: - alg = 'sha256'; - break; - case 16: - alg = 'md5'; - break; - case 20: - alg = 'sha1'; - break; - case 64: - alg = 'sha512'; - break; - default: - throw (new FingerprintFormatError(fp)); - } - - /* Plain hex/base64: guess it's probably SPKI unless told. */ - if (options.hashType === undefined) - hashType = 'spki'; - } - - if (alg === undefined) - throw (new FingerprintFormatError(fp)); - - if (algs.hashAlgs[alg] === undefined) - throw (new InvalidAlgorithmError(alg)); - - if (enAlgs !== undefined) { - enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); - if (enAlgs.indexOf(alg) === -1) - throw (new InvalidAlgorithmError(alg)); - } - - return (new Fingerprint({ - algorithm: alg, - hash: hash, - type: options.type || 'key', - hashType: hashType - })); -}; - -function addColons(s) { - /*JSSTYLED*/ - return (s.replace(/(.{2})(?=.)/g, '$1:')); -} - -function base64Strip(s) { - /*JSSTYLED*/ - return (s.replace(/=*$/, '')); -} - -function sshBase64Format(alg, h) { - return (alg.toUpperCase() + ':' + base64Strip(h)); -} - -Fingerprint.isFingerprint = function (obj, ver) { - return (utils.isCompatible(obj, Fingerprint, ver)); -}; - -/* - * API versions for Fingerprint: - * [1,0] -- initial ver - * [1,1] -- first tagged ver - * [1,2] -- hashType and spki support - */ -Fingerprint.prototype._sshpkApiVersion = [1, 2]; - -Fingerprint._oldVersionDetect = function (obj) { - assert.func(obj.toString); - assert.func(obj.matches); - return ([1, 0]); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/formats/auto.js b/test-eol-project/node_modules/sshpk/lib/formats/auto.js deleted file mode 100644 index f32cd964..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/auto.js +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); - -var pem = require('./pem'); -var ssh = require('./ssh'); -var rfc4253 = require('./rfc4253'); -var dnssec = require('./dnssec'); -var putty = require('./putty'); - -var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; - -function read(buf, options) { - if (typeof (buf) === 'string') { - if (buf.trim().match(/^[-]+[ ]*BEGIN/)) - return (pem.read(buf, options)); - if (buf.match(/^\s*ssh-[a-z]/)) - return (ssh.read(buf, options)); - if (buf.match(/^\s*ecdsa-/)) - return (ssh.read(buf, options)); - if (buf.match(/^putty-user-key-file-2:/i)) - return (putty.read(buf, options)); - if (findDNSSECHeader(buf)) - return (dnssec.read(buf, options)); - buf = Buffer.from(buf, 'binary'); - } else { - assert.buffer(buf); - if (findPEMHeader(buf)) - return (pem.read(buf, options)); - if (findSSHHeader(buf)) - return (ssh.read(buf, options)); - if (findPuTTYHeader(buf)) - return (putty.read(buf, options)); - if (findDNSSECHeader(buf)) - return (dnssec.read(buf, options)); - } - if (buf.readUInt32BE(0) < buf.length) - return (rfc4253.read(buf, options)); - throw (new Error('Failed to auto-detect format of key')); -} - -function findPuTTYHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) - ++offset; - if (offset + 22 <= buf.length && - buf.slice(offset, offset + 22).toString('ascii').toLowerCase() === - 'putty-user-key-file-2:') - return (true); - return (false); -} - -function findSSHHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) - ++offset; - if (offset + 4 <= buf.length && - buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') - return (true); - if (offset + 6 <= buf.length && - buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') - return (true); - return (false); -} - -function findPEMHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10)) - ++offset; - if (buf[offset] !== 45) - return (false); - while (offset < buf.length && - (buf[offset] === 45)) - ++offset; - while (offset < buf.length && - (buf[offset] === 32)) - ++offset; - if (offset + 5 > buf.length || - buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') - return (false); - return (true); -} - -function findDNSSECHeader(buf) { - // private case first - if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) - return (false); - var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); - if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX) - return (true); - - // public-key RFC3110 ? - // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...' - // skip any comment-lines - if (typeof (buf) !== 'string') { - buf = buf.toString('ascii'); - } - var lines = buf.split('\n'); - var line = 0; - /* JSSTYLED */ - while (lines[line].match(/^\;/)) - line++; - if (lines[line].toString('ascii').match(/\. IN KEY /)) - return (true); - if (lines[line].toString('ascii').match(/\. IN DNSKEY /)) - return (true); - return (false); -} - -function write(key, options) { - throw (new Error('"auto" format cannot be used for writing')); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/dnssec.js b/test-eol-project/node_modules/sshpk/lib/formats/dnssec.js deleted file mode 100644 index a74ea9ce..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/dnssec.js +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2017 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var utils = require('../utils'); -var SSHBuffer = require('../ssh-buffer'); -var Dhe = require('../dhe'); - -var supportedAlgos = { - 'rsa-sha1' : 5, - 'rsa-sha256' : 8, - 'rsa-sha512' : 10, - 'ecdsa-p256-sha256' : 13, - 'ecdsa-p384-sha384' : 14 - /* - * ed25519 is hypothetically supported with id 15 - * but the common tools available don't appear to be - * capable of generating/using ed25519 keys - */ -}; - -var supportedAlgosById = {}; -Object.keys(supportedAlgos).forEach(function (k) { - supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); -}); - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - var lines = buf.split('\n'); - if (lines[0].match(/^Private-key-format\: v1/)) { - var algElems = lines[1].split(' '); - var algoNum = parseInt(algElems[1], 10); - var algoName = algElems[2]; - if (!supportedAlgosById[algoNum]) - throw (new Error('Unsupported algorithm: ' + algoName)); - return (readDNSSECPrivateKey(algoNum, lines.slice(2))); - } - - // skip any comment-lines - var line = 0; - /* JSSTYLED */ - while (lines[line].match(/^\;/)) - line++; - // we should now have *one single* line left with our KEY on it. - if ((lines[line].match(/\. IN KEY /) || - lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) { - return (readRFC3110(lines[line])); - } - throw (new Error('Cannot parse dnssec key')); -} - -function readRFC3110(keyString) { - var elems = keyString.split(' '); - //unused var flags = parseInt(elems[3], 10); - //unused var protocol = parseInt(elems[4], 10); - var algorithm = parseInt(elems[5], 10); - if (!supportedAlgosById[algorithm]) - throw (new Error('Unsupported algorithm: ' + algorithm)); - var base64key = elems.slice(6, elems.length).join(); - var keyBuffer = Buffer.from(base64key, 'base64'); - if (supportedAlgosById[algorithm].match(/^RSA-/)) { - // join the rest of the body into a single base64-blob - var publicExponentLen = keyBuffer.readUInt8(0); - if (publicExponentLen != 3 && publicExponentLen != 1) - throw (new Error('Cannot parse dnssec key: ' + - 'unsupported exponent length')); - - var publicExponent = keyBuffer.slice(1, publicExponentLen+1); - publicExponent = utils.mpNormalize(publicExponent); - var modulus = keyBuffer.slice(1+publicExponentLen); - modulus = utils.mpNormalize(modulus); - // now, make the key - var rsaKey = { - type: 'rsa', - parts: [] - }; - rsaKey.parts.push({ name: 'e', data: publicExponent}); - rsaKey.parts.push({ name: 'n', data: modulus}); - return (new Key(rsaKey)); - } - if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' || - supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') { - var curve = 'nistp384'; - var size = 384; - if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { - curve = 'nistp256'; - size = 256; - } - - var ecdsaKey = { - type: 'ecdsa', - curve: curve, - size: size, - parts: [ - {name: 'curve', data: Buffer.from(curve) }, - {name: 'Q', data: utils.ecNormalize(keyBuffer) } - ] - }; - return (new Key(ecdsaKey)); - } - throw (new Error('Unsupported algorithm: ' + - supportedAlgosById[algorithm])); -} - -function elementToBuf(e) { - return (Buffer.from(e.split(' ')[1], 'base64')); -} - -function readDNSSECRSAPrivateKey(elements) { - var rsaParams = {}; - elements.forEach(function (element) { - if (element.split(' ')[0] === 'Modulus:') - rsaParams['n'] = elementToBuf(element); - else if (element.split(' ')[0] === 'PublicExponent:') - rsaParams['e'] = elementToBuf(element); - else if (element.split(' ')[0] === 'PrivateExponent:') - rsaParams['d'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Prime1:') - rsaParams['p'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Prime2:') - rsaParams['q'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Exponent1:') - rsaParams['dmodp'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Exponent2:') - rsaParams['dmodq'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Coefficient:') - rsaParams['iqmp'] = elementToBuf(element); - }); - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'e', data: utils.mpNormalize(rsaParams['e'])}, - { name: 'n', data: utils.mpNormalize(rsaParams['n'])}, - { name: 'd', data: utils.mpNormalize(rsaParams['d'])}, - { name: 'p', data: utils.mpNormalize(rsaParams['p'])}, - { name: 'q', data: utils.mpNormalize(rsaParams['q'])}, - { name: 'dmodp', - data: utils.mpNormalize(rsaParams['dmodp'])}, - { name: 'dmodq', - data: utils.mpNormalize(rsaParams['dmodq'])}, - { name: 'iqmp', - data: utils.mpNormalize(rsaParams['iqmp'])} - ] - }; - return (new PrivateKey(key)); -} - -function readDNSSECPrivateKey(alg, elements) { - if (supportedAlgosById[alg].match(/^RSA-/)) { - return (readDNSSECRSAPrivateKey(elements)); - } - if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' || - supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { - var d = Buffer.from(elements[0].split(' ')[1], 'base64'); - var curve = 'nistp384'; - var size = 384; - if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { - curve = 'nistp256'; - size = 256; - } - // DNSSEC generates the public-key on the fly (go calculate it) - var publicKey = utils.publicFromPrivateECDSA(curve, d); - var Q = publicKey.part['Q'].data; - var ecdsaKey = { - type: 'ecdsa', - curve: curve, - size: size, - parts: [ - {name: 'curve', data: Buffer.from(curve) }, - {name: 'd', data: d }, - {name: 'Q', data: Q } - ] - }; - return (new PrivateKey(ecdsaKey)); - } - throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg])); -} - -function dnssecTimestamp(date) { - var year = date.getFullYear() + ''; //stringify - var month = (date.getMonth() + 1); - var timestampStr = year + month + date.getUTCDate(); - timestampStr += '' + date.getUTCHours() + date.getUTCMinutes(); - timestampStr += date.getUTCSeconds(); - return (timestampStr); -} - -function rsaAlgFromOptions(opts) { - if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1') - return ('5 (RSASHA1)'); - else if (opts.hashAlgo === 'sha256') - return ('8 (RSASHA256)'); - else if (opts.hashAlgo === 'sha512') - return ('10 (RSASHA512)'); - else - throw (new Error('Unknown or unsupported hash: ' + - opts.hashAlgo)); -} - -function writeRSA(key, options) { - // if we're missing parts, add them. - if (!key.part.dmodp || !key.part.dmodq) { - utils.addRSAMissing(key); - } - - var out = ''; - out += 'Private-key-format: v1.3\n'; - out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n'; - var n = utils.mpDenormalize(key.part['n'].data); - out += 'Modulus: ' + n.toString('base64') + '\n'; - var e = utils.mpDenormalize(key.part['e'].data); - out += 'PublicExponent: ' + e.toString('base64') + '\n'; - var d = utils.mpDenormalize(key.part['d'].data); - out += 'PrivateExponent: ' + d.toString('base64') + '\n'; - var p = utils.mpDenormalize(key.part['p'].data); - out += 'Prime1: ' + p.toString('base64') + '\n'; - var q = utils.mpDenormalize(key.part['q'].data); - out += 'Prime2: ' + q.toString('base64') + '\n'; - var dmodp = utils.mpDenormalize(key.part['dmodp'].data); - out += 'Exponent1: ' + dmodp.toString('base64') + '\n'; - var dmodq = utils.mpDenormalize(key.part['dmodq'].data); - out += 'Exponent2: ' + dmodq.toString('base64') + '\n'; - var iqmp = utils.mpDenormalize(key.part['iqmp'].data); - out += 'Coefficient: ' + iqmp.toString('base64') + '\n'; - // Assume that we're valid as-of now - var timestamp = new Date(); - out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; - return (Buffer.from(out, 'ascii')); -} - -function writeECDSA(key, options) { - var out = ''; - out += 'Private-key-format: v1.3\n'; - - if (key.curve === 'nistp256') { - out += 'Algorithm: 13 (ECDSAP256SHA256)\n'; - } else if (key.curve === 'nistp384') { - out += 'Algorithm: 14 (ECDSAP384SHA384)\n'; - } else { - throw (new Error('Unsupported curve')); - } - var base64Key = key.part['d'].data.toString('base64'); - out += 'PrivateKey: ' + base64Key + '\n'; - - // Assume that we're valid as-of now - var timestamp = new Date(); - out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; - - return (Buffer.from(out, 'ascii')); -} - -function write(key, options) { - if (PrivateKey.isPrivateKey(key)) { - if (key.type === 'rsa') { - return (writeRSA(key, options)); - } else if (key.type === 'ecdsa') { - return (writeECDSA(key, options)); - } else { - throw (new Error('Unsupported algorithm: ' + key.type)); - } - } else if (Key.isKey(key)) { - /* - * RFC3110 requires a keyname, and a keytype, which we - * don't really have a mechanism for specifying such - * additional metadata. - */ - throw (new Error('Format "dnssec" only supports ' + - 'writing private keys')); - } else { - throw (new Error('key is not a Key or PrivateKey')); - } -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js b/test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js deleted file mode 100644 index 766f3d39..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/openssh-cert.js +++ /dev/null @@ -1,352 +0,0 @@ -// Copyright 2017 Joyent, Inc. - -module.exports = { - read: read, - verify: verify, - sign: sign, - signAsync: signAsync, - write: write, - - /* Internal private API */ - fromBuffer: fromBuffer, - toBuffer: toBuffer -}; - -var assert = require('assert-plus'); -var SSHBuffer = require('../ssh-buffer'); -var crypto = require('crypto'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var Identity = require('../identity'); -var rfc4253 = require('./rfc4253'); -var Signature = require('../signature'); -var utils = require('../utils'); -var Certificate = require('../certificate'); - -function verify(cert, key) { - /* - * We always give an issuerKey, so if our verify() is being called then - * there was no signature. Return false. - */ - return (false); -} - -var TYPES = { - 'user': 1, - 'host': 2 -}; -Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; }); - -var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/; - -function read(buf, options) { - if (Buffer.isBuffer(buf)) - buf = buf.toString('ascii'); - var parts = buf.trim().split(/[ \t\n]+/g); - if (parts.length < 2 || parts.length > 3) - throw (new Error('Not a valid SSH certificate line')); - - var algo = parts[0]; - var data = parts[1]; - - data = Buffer.from(data, 'base64'); - return (fromBuffer(data, algo)); -} - -function fromBuffer(data, algo, partial) { - var sshbuf = new SSHBuffer({ buffer: data }); - var innerAlgo = sshbuf.readString(); - if (algo !== undefined && innerAlgo !== algo) - throw (new Error('SSH certificate algorithm mismatch')); - if (algo === undefined) - algo = innerAlgo; - - var cert = {}; - cert.signatures = {}; - cert.signatures.openssh = {}; - - cert.signatures.openssh.nonce = sshbuf.readBuffer(); - - var key = {}; - var parts = (key.parts = []); - key.type = getAlg(algo); - - var partCount = algs.info[key.type].parts.length; - while (parts.length < partCount) - parts.push(sshbuf.readPart()); - assert.ok(parts.length >= 1, 'key must have at least one part'); - - var algInfo = algs.info[key.type]; - if (key.type === 'ecdsa') { - var res = ECDSA_ALGO.exec(algo); - assert.ok(res !== null); - assert.strictEqual(res[1], parts[0].data.toString()); - } - - for (var i = 0; i < algInfo.parts.length; ++i) { - parts[i].name = algInfo.parts[i]; - if (parts[i].name !== 'curve' && - algInfo.normalize !== false) { - var p = parts[i]; - p.data = utils.mpNormalize(p.data); - } - } - - cert.subjectKey = new Key(key); - - cert.serial = sshbuf.readInt64(); - - var type = TYPES[sshbuf.readInt()]; - assert.string(type, 'valid cert type'); - - cert.signatures.openssh.keyId = sshbuf.readString(); - - var principals = []; - var pbuf = sshbuf.readBuffer(); - var psshbuf = new SSHBuffer({ buffer: pbuf }); - while (!psshbuf.atEnd()) - principals.push(psshbuf.readString()); - if (principals.length === 0) - principals = ['*']; - - cert.subjects = principals.map(function (pr) { - if (type === 'user') - return (Identity.forUser(pr)); - else if (type === 'host') - return (Identity.forHost(pr)); - throw (new Error('Unknown identity type ' + type)); - }); - - cert.validFrom = int64ToDate(sshbuf.readInt64()); - cert.validUntil = int64ToDate(sshbuf.readInt64()); - - var exts = []; - var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); - var ext; - while (!extbuf.atEnd()) { - ext = { critical: true }; - ext.name = extbuf.readString(); - ext.data = extbuf.readBuffer(); - exts.push(ext); - } - extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); - while (!extbuf.atEnd()) { - ext = { critical: false }; - ext.name = extbuf.readString(); - ext.data = extbuf.readBuffer(); - exts.push(ext); - } - cert.signatures.openssh.exts = exts; - - /* reserved */ - sshbuf.readBuffer(); - - var signingKeyBuf = sshbuf.readBuffer(); - cert.issuerKey = rfc4253.read(signingKeyBuf); - - /* - * OpenSSH certs don't give the identity of the issuer, just their - * public key. So, we use an Identity that matches anything. The - * isSignedBy() function will later tell you if the key matches. - */ - cert.issuer = Identity.forHost('**'); - - var sigBuf = sshbuf.readBuffer(); - cert.signatures.openssh.signature = - Signature.parse(sigBuf, cert.issuerKey.type, 'ssh'); - - if (partial !== undefined) { - partial.remainder = sshbuf.remainder(); - partial.consumed = sshbuf._offset; - } - - return (new Certificate(cert)); -} - -function int64ToDate(buf) { - var i = buf.readUInt32BE(0) * 4294967296; - i += buf.readUInt32BE(4); - var d = new Date(); - d.setTime(i * 1000); - d.sourceInt64 = buf; - return (d); -} - -function dateToInt64(date) { - if (date.sourceInt64 !== undefined) - return (date.sourceInt64); - var i = Math.round(date.getTime() / 1000); - var upper = Math.floor(i / 4294967296); - var lower = Math.floor(i % 4294967296); - var buf = Buffer.alloc(8); - buf.writeUInt32BE(upper, 0); - buf.writeUInt32BE(lower, 4); - return (buf); -} - -function sign(cert, key) { - if (cert.signatures.openssh === undefined) - cert.signatures.openssh = {}; - try { - var blob = toBuffer(cert, true); - } catch (e) { - delete (cert.signatures.openssh); - return (false); - } - var sig = cert.signatures.openssh; - var hashAlgo = undefined; - if (key.type === 'rsa' || key.type === 'dsa') - hashAlgo = 'sha1'; - var signer = key.createSign(hashAlgo); - signer.write(blob); - sig.signature = signer.sign(); - return (true); -} - -function signAsync(cert, signer, done) { - if (cert.signatures.openssh === undefined) - cert.signatures.openssh = {}; - try { - var blob = toBuffer(cert, true); - } catch (e) { - delete (cert.signatures.openssh); - done(e); - return; - } - var sig = cert.signatures.openssh; - - signer(blob, function (err, signature) { - if (err) { - done(err); - return; - } - try { - /* - * This will throw if the signature isn't of a - * type/algo that can be used for SSH. - */ - signature.toBuffer('ssh'); - } catch (e) { - done(e); - return; - } - sig.signature = signature; - done(); - }); -} - -function write(cert, options) { - if (options === undefined) - options = {}; - - var blob = toBuffer(cert); - var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64'); - if (options.comment) - out = out + ' ' + options.comment; - return (out); -} - - -function toBuffer(cert, noSig) { - assert.object(cert.signatures.openssh, 'signature for openssh format'); - var sig = cert.signatures.openssh; - - if (sig.nonce === undefined) - sig.nonce = crypto.randomBytes(16); - var buf = new SSHBuffer({}); - buf.writeString(getCertType(cert.subjectKey)); - buf.writeBuffer(sig.nonce); - - var key = cert.subjectKey; - var algInfo = algs.info[key.type]; - algInfo.parts.forEach(function (part) { - buf.writePart(key.part[part]); - }); - - buf.writeInt64(cert.serial); - - var type = cert.subjects[0].type; - assert.notStrictEqual(type, 'unknown'); - cert.subjects.forEach(function (id) { - assert.strictEqual(id.type, type); - }); - type = TYPES[type]; - buf.writeInt(type); - - if (sig.keyId === undefined) { - sig.keyId = cert.subjects[0].type + '_' + - (cert.subjects[0].uid || cert.subjects[0].hostname); - } - buf.writeString(sig.keyId); - - var sub = new SSHBuffer({}); - cert.subjects.forEach(function (id) { - if (type === TYPES.host) - sub.writeString(id.hostname); - else if (type === TYPES.user) - sub.writeString(id.uid); - }); - buf.writeBuffer(sub.toBuffer()); - - buf.writeInt64(dateToInt64(cert.validFrom)); - buf.writeInt64(dateToInt64(cert.validUntil)); - - var exts = sig.exts; - if (exts === undefined) - exts = []; - - var extbuf = new SSHBuffer({}); - exts.forEach(function (ext) { - if (ext.critical !== true) - return; - extbuf.writeString(ext.name); - extbuf.writeBuffer(ext.data); - }); - buf.writeBuffer(extbuf.toBuffer()); - - extbuf = new SSHBuffer({}); - exts.forEach(function (ext) { - if (ext.critical === true) - return; - extbuf.writeString(ext.name); - extbuf.writeBuffer(ext.data); - }); - buf.writeBuffer(extbuf.toBuffer()); - - /* reserved */ - buf.writeBuffer(Buffer.alloc(0)); - - sub = rfc4253.write(cert.issuerKey); - buf.writeBuffer(sub); - - if (!noSig) - buf.writeBuffer(sig.signature.toBuffer('ssh')); - - return (buf.toBuffer()); -} - -function getAlg(certType) { - if (certType === 'ssh-rsa-cert-v01@openssh.com') - return ('rsa'); - if (certType === 'ssh-dss-cert-v01@openssh.com') - return ('dsa'); - if (certType.match(ECDSA_ALGO)) - return ('ecdsa'); - if (certType === 'ssh-ed25519-cert-v01@openssh.com') - return ('ed25519'); - throw (new Error('Unsupported cert type ' + certType)); -} - -function getCertType(key) { - if (key.type === 'rsa') - return ('ssh-rsa-cert-v01@openssh.com'); - if (key.type === 'dsa') - return ('ssh-dss-cert-v01@openssh.com'); - if (key.type === 'ecdsa') - return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com'); - if (key.type === 'ed25519') - return ('ssh-ed25519-cert-v01@openssh.com'); - throw (new Error('Unsupported key type ' + key.type)); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/pem.js b/test-eol-project/node_modules/sshpk/lib/formats/pem.js deleted file mode 100644 index bbe78fcb..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/pem.js +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var crypto = require('crypto'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); - -var pkcs1 = require('./pkcs1'); -var pkcs8 = require('./pkcs8'); -var sshpriv = require('./ssh-private'); -var rfc4253 = require('./rfc4253'); - -var errors = require('../errors'); - -var OID_PBES2 = '1.2.840.113549.1.5.13'; -var OID_PBKDF2 = '1.2.840.113549.1.5.12'; - -var OID_TO_CIPHER = { - '1.2.840.113549.3.7': '3des-cbc', - '2.16.840.1.101.3.4.1.2': 'aes128-cbc', - '2.16.840.1.101.3.4.1.42': 'aes256-cbc' -}; -var CIPHER_TO_OID = {}; -Object.keys(OID_TO_CIPHER).forEach(function (k) { - CIPHER_TO_OID[OID_TO_CIPHER[k]] = k; -}); - -var OID_TO_HASH = { - '1.2.840.113549.2.7': 'sha1', - '1.2.840.113549.2.9': 'sha256', - '1.2.840.113549.2.11': 'sha512' -}; -var HASH_TO_OID = {}; -Object.keys(OID_TO_HASH).forEach(function (k) { - HASH_TO_OID[OID_TO_HASH[k]] = k; -}); - -/* - * For reading we support both PKCS#1 and PKCS#8. If we find a private key, - * we just take the public component of it and use that. - */ -function read(buf, options, forceType) { - var input = buf; - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var lines = buf.trim().split(/[\r\n]+/g); - - var m; - var si = -1; - while (!m && si < lines.length) { - m = lines[++si].match(/*JSSTYLED*/ - /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - } - assert.ok(m, 'invalid PEM header'); - - var m2; - var ei = lines.length; - while (!m2 && ei > 0) { - m2 = lines[--ei].match(/*JSSTYLED*/ - /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - } - assert.ok(m2, 'invalid PEM footer'); - - /* Begin and end banners must match key type */ - assert.equal(m[2], m2[2]); - var type = m[2].toLowerCase(); - - var alg; - if (m[1]) { - /* They also must match algorithms, if given */ - assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); - alg = m[1].trim(); - } - - lines = lines.slice(si, ei + 1); - - var headers = {}; - while (true) { - lines = lines.slice(1); - m = lines[0].match(/*JSSTYLED*/ - /^([A-Za-z0-9-]+): (.+)$/); - if (!m) - break; - headers[m[1].toLowerCase()] = m[2]; - } - - /* Chop off the first and last lines */ - lines = lines.slice(0, -1).join(''); - buf = Buffer.from(lines, 'base64'); - - var cipher, key, iv; - if (headers['proc-type']) { - var parts = headers['proc-type'].split(','); - if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { - if (typeof (options.passphrase) === 'string') { - options.passphrase = Buffer.from( - options.passphrase, 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } else { - parts = headers['dek-info'].split(','); - assert.ok(parts.length === 2); - cipher = parts[0].toLowerCase(); - iv = Buffer.from(parts[1], 'hex'); - key = utils.opensslKeyDeriv(cipher, iv, - options.passphrase, 1).key; - } - } - } - - if (alg && alg.toLowerCase() === 'encrypted') { - var eder = new asn1.BerReader(buf); - var pbesEnd; - eder.readSequence(); - - eder.readSequence(); - pbesEnd = eder.offset + eder.length; - - var method = eder.readOID(); - if (method !== OID_PBES2) { - throw (new Error('Unsupported PEM/PKCS8 encryption ' + - 'scheme: ' + method)); - } - - eder.readSequence(); /* PBES2-params */ - - eder.readSequence(); /* keyDerivationFunc */ - var kdfEnd = eder.offset + eder.length; - var kdfOid = eder.readOID(); - if (kdfOid !== OID_PBKDF2) - throw (new Error('Unsupported PBES2 KDF: ' + kdfOid)); - eder.readSequence(); - var salt = eder.readString(asn1.Ber.OctetString, true); - var iterations = eder.readInt(); - var hashAlg = 'sha1'; - if (eder.offset < kdfEnd) { - eder.readSequence(); - var hashAlgOid = eder.readOID(); - hashAlg = OID_TO_HASH[hashAlgOid]; - if (hashAlg === undefined) { - throw (new Error('Unsupported PBKDF2 hash: ' + - hashAlgOid)); - } - } - eder._offset = kdfEnd; - - eder.readSequence(); /* encryptionScheme */ - var cipherOid = eder.readOID(); - cipher = OID_TO_CIPHER[cipherOid]; - if (cipher === undefined) { - throw (new Error('Unsupported PBES2 cipher: ' + - cipherOid)); - } - iv = eder.readString(asn1.Ber.OctetString, true); - - eder._offset = pbesEnd; - buf = eder.readString(asn1.Ber.OctetString, true); - - if (typeof (options.passphrase) === 'string') { - options.passphrase = Buffer.from( - options.passphrase, 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } - - var cinfo = utils.opensshCipherInfo(cipher); - - cipher = cinfo.opensslName; - key = utils.pbkdf2(hashAlg, salt, iterations, cinfo.keySize, - options.passphrase); - alg = undefined; - } - - if (cipher && key && iv) { - var cipherStream = crypto.createDecipheriv(cipher, key, iv); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(buf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - buf = Buffer.concat(chunks); - } - - /* The new OpenSSH internal format abuses PEM headers */ - if (alg && alg.toLowerCase() === 'openssh') - return (sshpriv.readSSHPrivate(type, buf, options)); - if (alg && alg.toLowerCase() === 'ssh2') - return (rfc4253.readType(type, buf, options)); - - var der = new asn1.BerReader(buf); - der.originalInput = input; - - /* - * All of the PEM file types start with a sequence tag, so chop it - * off here - */ - der.readSequence(); - - /* PKCS#1 type keys name an algorithm in the banner explicitly */ - if (alg) { - if (forceType) - assert.strictEqual(forceType, 'pkcs1'); - return (pkcs1.readPkcs1(alg, type, der)); - } else { - if (forceType) - assert.strictEqual(forceType, 'pkcs8'); - return (pkcs8.readPkcs8(alg, type, der)); - } -} - -function write(key, options, type) { - assert.object(key); - - var alg = { - 'ecdsa': 'EC', - 'rsa': 'RSA', - 'dsa': 'DSA', - 'ed25519': 'EdDSA' - }[key.type]; - var header; - - var der = new asn1.BerWriter(); - - if (PrivateKey.isPrivateKey(key)) { - if (type && type === 'pkcs8') { - header = 'PRIVATE KEY'; - pkcs8.writePkcs8(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs1'); - header = alg + ' PRIVATE KEY'; - pkcs1.writePkcs1(der, key); - } - - } else if (Key.isKey(key)) { - if (type && type === 'pkcs1') { - header = alg + ' PUBLIC KEY'; - pkcs1.writePkcs1(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs8'); - header = 'PUBLIC KEY'; - pkcs8.writePkcs8(der, key); - } - - } else { - throw (new Error('key is not a Key or PrivateKey')); - } - - var tmp = der.buffer.toString('base64'); - var len = tmp.length + (tmp.length / 64) + - 18 + 16 + header.length*2 + 10; - var buf = Buffer.alloc(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 64; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js b/test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js deleted file mode 100644 index bc485500..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/pkcs1.js +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readPkcs1: readPkcs1, - write: write, - writePkcs1: writePkcs1 -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); - -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); - -var pkcs8 = require('./pkcs8'); -var readECDSACurve = pkcs8.readECDSACurve; - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs1')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs1')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs1(alg, type, der) { - switch (alg) { - case 'RSA': - if (type === 'public') - return (readPkcs1RSAPublic(der)); - else if (type === 'private') - return (readPkcs1RSAPrivate(der)); - throw (new Error('Unknown key type: ' + type)); - case 'DSA': - if (type === 'public') - return (readPkcs1DSAPublic(der)); - else if (type === 'private') - return (readPkcs1DSAPrivate(der)); - throw (new Error('Unknown key type: ' + type)); - case 'EC': - case 'ECDSA': - if (type === 'private') - return (readPkcs1ECDSAPrivate(der)); - else if (type === 'public') - return (readPkcs1ECDSAPublic(der)); - throw (new Error('Unknown key type: ' + type)); - case 'EDDSA': - case 'EdDSA': - if (type === 'private') - return (readPkcs1EdDSAPrivate(der)); - throw (new Error(type + ' keys not supported with EdDSA')); - default: - throw (new Error('Unknown key algo: ' + alg)); - } -} - -function readPkcs1RSAPublic(der) { - // modulus and exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs1RSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version[0], 0); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1DSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 0); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - var y = readMPInt(der, 'y'); - var x = readMPInt(der, 'x'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1EdDSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 1); - - // private key - var k = der.readString(asn1.Ber.OctetString, true); - - der.readSequence(0xa0); - var oid = der.readOID(); - assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier'); - - der.readSequence(0xa1); - var A = utils.readBitString(der); - - var key = { - type: 'ed25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) }, - { name: 'k', data: k } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1DSAPublic(der) { - var y = readMPInt(der, 'y'); - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - var key = { - type: 'dsa', - parts: [ - { name: 'y', data: y }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g } - ] - }; - - return (new Key(key)); -} - -function readPkcs1ECDSAPublic(der) { - der.readSequence(); - - var oid = der.readOID(); - assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); - - var curveOid = der.readOID(); - - var curve; - var curves = Object.keys(algs.curves); - for (var j = 0; j < curves.length; ++j) { - var c = curves[j]; - var cd = algs.curves[c]; - if (cd.pkcs8oid === curveOid) { - curve = c; - break; - } - } - assert.string(curve, 'a known ECDSA named curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curve) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function readPkcs1ECDSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 1); - - // private key - var d = der.readString(asn1.Ber.OctetString, true); - - der.readSequence(0xa0); - var curve = readECDSACurve(der); - assert.string(curve, 'a known elliptic curve'); - - der.readSequence(0xa1); - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curve) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function writePkcs1(der, key) { - der.startSequence(); - - switch (key.type) { - case 'rsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1RSAPrivate(der, key); - else - writePkcs1RSAPublic(der, key); - break; - case 'dsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1DSAPrivate(der, key); - else - writePkcs1DSAPublic(der, key); - break; - case 'ecdsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1ECDSAPrivate(der, key); - else - writePkcs1ECDSAPublic(der, key); - break; - case 'ed25519': - if (PrivateKey.isPrivateKey(key)) - writePkcs1EdDSAPrivate(der, key); - else - writePkcs1EdDSAPublic(der, key); - break; - default: - throw (new Error('Unknown key algo: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs1RSAPublic(der, key) { - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); -} - -function writePkcs1RSAPrivate(der, key) { - var ver = Buffer.from([0]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); -} - -function writePkcs1DSAPrivate(der, key) { - var ver = Buffer.from([0]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); -} - -function writePkcs1DSAPublic(der, key) { - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); -} - -function writePkcs1ECDSAPublic(der, key) { - der.startSequence(); - - der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ - var curve = key.part.curve.data.toString(); - var curveOid = algs.curves[curve].pkcs8oid; - assert.string(curveOid, 'a known ECDSA named curve'); - der.writeOID(curveOid); - - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs1ECDSAPrivate(der, key) { - var ver = Buffer.from([1]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa0); - var curve = key.part.curve.data.toString(); - var curveOid = algs.curves[curve].pkcs8oid; - assert.string(curveOid, 'a known ECDSA named curve'); - der.writeOID(curveOid); - der.endSequence(); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); -} - -function writePkcs1EdDSAPrivate(der, key) { - var ver = Buffer.from([1]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); - - der.startSequence(0xa0); - der.writeOID('1.3.101.112'); - der.endSequence(); - - der.startSequence(0xa1); - utils.writeBitString(der, key.part.A.data); - der.endSequence(); -} - -function writePkcs1EdDSAPublic(der, key) { - throw (new Error('Public keys are not supported for EdDSA PKCS#1')); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js b/test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js deleted file mode 100644 index 07d04c85..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/pkcs8.js +++ /dev/null @@ -1,643 +0,0 @@ -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - readPkcs8: readPkcs8, - write: write, - writePkcs8: writePkcs8, - pkcs8ToBuffer: pkcs8ToBuffer, - - readECDSACurve: readECDSACurve, - writeECDSACurve: writeECDSACurve -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs8')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs8')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs8(alg, type, der) { - /* Private keys in pkcs#8 format have a weird extra int */ - if (der.peek() === asn1.Ber.Integer) { - assert.strictEqual(type, 'private', - 'unexpected Integer at start of public key'); - der.readString(asn1.Ber.Integer, true); - } - - der.readSequence(); - var next = der.offset + der.length; - - var oid = der.readOID(); - switch (oid) { - case '1.2.840.113549.1.1.1': - der._offset = next; - if (type === 'public') - return (readPkcs8RSAPublic(der)); - else - return (readPkcs8RSAPrivate(der)); - case '1.2.840.10040.4.1': - if (type === 'public') - return (readPkcs8DSAPublic(der)); - else - return (readPkcs8DSAPrivate(der)); - case '1.2.840.10045.2.1': - if (type === 'public') - return (readPkcs8ECDSAPublic(der)); - else - return (readPkcs8ECDSAPrivate(der)); - case '1.3.101.112': - if (type === 'public') { - return (readPkcs8EdDSAPublic(der)); - } else { - return (readPkcs8EdDSAPrivate(der)); - } - case '1.3.101.110': - if (type === 'public') { - return (readPkcs8X25519Public(der)); - } else { - return (readPkcs8X25519Private(der)); - } - default: - throw (new Error('Unknown key type OID ' + oid)); - } -} - -function readPkcs8RSAPublic(der) { - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - der.readSequence(); - - // modulus - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - source: der.originalInput, - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs8RSAPrivate(der) { - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var ver = readMPInt(der, 'version'); - assert.equal(ver[0], 0x0, 'unknown RSA private key version'); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8DSAPublic(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - - var y = readMPInt(der, 'y'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y } - ] - }; - - return (new Key(key)); -} - -function readPkcs8DSAPrivate(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - der.readSequence(asn1.Ber.OctetString); - var x = readMPInt(der, 'x'); - - /* The pkcs#8 format does not include the public key */ - var y = utils.calculateDSAPublic(g, p, x); - - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readECDSACurve(der) { - var curveName, curveNames; - var j, c, cd; - - if (der.peek() === asn1.Ber.OID) { - var oid = der.readOID(); - - curveNames = Object.keys(algs.curves); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - if (cd.pkcs8oid === oid) { - curveName = c; - break; - } - } - - } else { - // ECParameters sequence - der.readSequence(); - var version = der.readString(asn1.Ber.Integer, true); - assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); - - var curve = {}; - - // FieldID sequence - der.readSequence(); - var fieldTypeOid = der.readOID(); - assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', - 'ECDSA key is not from a prime-field'); - var p = curve.p = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - /* - * p always starts with a 1 bit, so count the zeros to get its - * real size. - */ - curve.size = p.length * 8 - utils.countZeros(p); - - // Curve sequence - der.readSequence(); - curve.a = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - curve.b = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - if (der.peek() === asn1.Ber.BitString) - curve.s = der.readString(asn1.Ber.BitString, true); - - // Combined Gx and Gy - curve.G = der.readString(asn1.Ber.OctetString, true); - assert.strictEqual(curve.G[0], 0x4, - 'uncompressed G is required'); - - curve.n = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - curve.h = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + - 'required'); - - curveNames = Object.keys(algs.curves); - var ks = Object.keys(curve); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - var equal = true; - for (var i = 0; i < ks.length; ++i) { - var k = ks[i]; - if (cd[k] === undefined) - continue; - if (typeof (cd[k]) === 'object' && - cd[k].equals !== undefined) { - if (!cd[k].equals(curve[k])) { - equal = false; - break; - } - } else if (Buffer.isBuffer(cd[k])) { - if (cd[k].toString('binary') - !== curve[k].toString('binary')) { - equal = false; - break; - } - } else { - if (cd[k] !== curve[k]) { - equal = false; - break; - } - } - } - if (equal) { - curveName = c; - break; - } - } - } - return (curveName); -} - -function readPkcs8ECDSAPrivate(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var version = readMPInt(der, 'version'); - assert.equal(version[0], 1, 'unknown version of ECDSA key'); - - var d = der.readString(asn1.Ber.OctetString, true); - var Q; - - if (der.peek() == 0xa0) { - der.readSequence(0xa0); - der._offset += der.length; - } - if (der.peek() == 0xa1) { - der.readSequence(0xa1); - Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - } - - if (Q === undefined) { - var pub = utils.publicFromPrivateECDSA(curveName, d); - Q = pub.part.Q.data; - } - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curveName) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8ECDSAPublic(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curveName) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function readPkcs8EdDSAPublic(der) { - if (der.peek() === 0x00) - der.readByte(); - - var A = utils.readBitString(der); - - var key = { - type: 'ed25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) } - ] - }; - - return (new Key(key)); -} - -function readPkcs8X25519Public(der) { - var A = utils.readBitString(der); - - var key = { - type: 'curve25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) } - ] - }; - - return (new Key(key)); -} - -function readPkcs8EdDSAPrivate(der) { - if (der.peek() === 0x00) - der.readByte(); - - der.readSequence(asn1.Ber.OctetString); - var k = der.readString(asn1.Ber.OctetString, true); - k = utils.zeroPadToLength(k, 32); - - var A, tag; - while ((tag = der.peek()) !== null) { - if (tag === (asn1.Ber.Context | 1)) { - A = utils.readBitString(der, tag); - } else { - der.readSequence(tag); - der._offset += der.length; - } - } - if (A === undefined) - A = utils.calculateED25519Public(k); - - var key = { - type: 'ed25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) }, - { name: 'k', data: utils.zeroPadToLength(k, 32) } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8X25519Private(der) { - if (der.peek() === 0x00) - der.readByte(); - - der.readSequence(asn1.Ber.OctetString); - var k = der.readString(asn1.Ber.OctetString, true); - k = utils.zeroPadToLength(k, 32); - - var A = utils.calculateX25519Public(k); - - var key = { - type: 'curve25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) }, - { name: 'k', data: utils.zeroPadToLength(k, 32) } - ] - }; - - return (new PrivateKey(key)); -} - -function pkcs8ToBuffer(key) { - var der = new asn1.BerWriter(); - writePkcs8(der, key); - return (der.buffer); -} - -function writePkcs8(der, key) { - der.startSequence(); - - if (PrivateKey.isPrivateKey(key)) { - var version = 0; - if (key.type === 'ed25519') - version = 1; - var vbuf = Buffer.from([version]); - der.writeBuffer(vbuf, asn1.Ber.Integer); - } - - der.startSequence(); - switch (key.type) { - case 'rsa': - der.writeOID('1.2.840.113549.1.1.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8RSAPrivate(key, der); - else - writePkcs8RSAPublic(key, der); - break; - case 'dsa': - der.writeOID('1.2.840.10040.4.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8DSAPrivate(key, der); - else - writePkcs8DSAPublic(key, der); - break; - case 'ecdsa': - der.writeOID('1.2.840.10045.2.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8ECDSAPrivate(key, der); - else - writePkcs8ECDSAPublic(key, der); - break; - case 'ed25519': - der.writeOID('1.3.101.112'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8EdDSAPrivate(key, der); - else - writePkcs8EdDSAPublic(key, der); - break; - default: - throw (new Error('Unsupported key type: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs8RSAPrivate(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = Buffer.from([0]); - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); - - der.endSequence(); - der.endSequence(); -} - -function writePkcs8RSAPublic(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - - der.startSequence(); - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); -} - -function writePkcs8DSAPrivate(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writePkcs8DSAPublic(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writeECDSACurve(key, der) { - var curve = algs.curves[key.curve]; - if (curve.pkcs8oid) { - /* This one has a name in pkcs#8, so just write the oid */ - der.writeOID(curve.pkcs8oid); - - } else { - // ECParameters sequence - der.startSequence(); - - var version = Buffer.from([1]); - der.writeBuffer(version, asn1.Ber.Integer); - - // FieldID sequence - der.startSequence(); - der.writeOID('1.2.840.10045.1.1'); // prime-field - der.writeBuffer(curve.p, asn1.Ber.Integer); - der.endSequence(); - - // Curve sequence - der.startSequence(); - var a = curve.p; - if (a[0] === 0x0) - a = a.slice(1); - der.writeBuffer(a, asn1.Ber.OctetString); - der.writeBuffer(curve.b, asn1.Ber.OctetString); - der.writeBuffer(curve.s, asn1.Ber.BitString); - der.endSequence(); - - der.writeBuffer(curve.G, asn1.Ber.OctetString); - der.writeBuffer(curve.n, asn1.Ber.Integer); - var h = curve.h; - if (!h) { - h = Buffer.from([1]); - } - der.writeBuffer(h, asn1.Ber.Integer); - - // ECParameters - der.endSequence(); - } -} - -function writePkcs8ECDSAPublic(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs8ECDSAPrivate(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = Buffer.from([1]); - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); - - der.endSequence(); - der.endSequence(); -} - -function writePkcs8EdDSAPublic(key, der) { - der.endSequence(); - - utils.writeBitString(der, key.part.A.data); -} - -function writePkcs8EdDSAPrivate(key, der) { - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - var k = utils.mpNormalize(key.part.k.data); - /* RFCs call for storing exactly 32 bytes, so strip any leading zeros */ - while (k.length > 32 && k[0] === 0x00) - k = k.slice(1); - der.writeBuffer(k, asn1.Ber.OctetString); - der.endSequence(); - - utils.writeBitString(der, key.part.A.data, asn1.Ber.Context | 1); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/putty.js b/test-eol-project/node_modules/sshpk/lib/formats/putty.js deleted file mode 100644 index e7b2add3..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/putty.js +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var rfc4253 = require('./rfc4253'); -var Key = require('../key'); -var SSHBuffer = require('../ssh-buffer'); -var crypto = require('crypto'); -var PrivateKey = require('../private-key'); - -var errors = require('../errors'); - -// https://tartarus.org/~simon/putty-prerel-snapshots/htmldoc/AppendixC.html -function read(buf, options) { - var lines = buf.toString('ascii').split(/[\r\n]+/); - var found = false; - var parts; - var si = 0; - var formatVersion; - while (si < lines.length) { - parts = splitHeader(lines[si++]); - if (parts) { - formatVersion = { - 'putty-user-key-file-2': 2, - 'putty-user-key-file-3': 3 - }[parts[0].toLowerCase()]; - if (formatVersion) { - found = true; - break; - } - } - } - if (!found) { - throw (new Error('No PuTTY format first line found')); - } - var alg = parts[1]; - - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'encryption'); - var encryption = parts[1]; - - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'comment'); - var comment = parts[1]; - - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'public-lines'); - var publicLines = parseInt(parts[1], 10); - if (!isFinite(publicLines) || publicLines < 0 || - publicLines > lines.length) { - throw (new Error('Invalid public-lines count')); - } - - var publicBuf = Buffer.from( - lines.slice(si, si + publicLines).join(''), 'base64'); - var keyType = rfc4253.algToKeyType(alg); - var key = rfc4253.read(publicBuf); - if (key.type !== keyType) { - throw (new Error('Outer key algorithm mismatch')); - } - - si += publicLines; - if (lines[si]) { - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'private-lines'); - var privateLines = parseInt(parts[1], 10); - if (!isFinite(privateLines) || privateLines < 0 || - privateLines > lines.length) { - throw (new Error('Invalid private-lines count')); - } - - var privateBuf = Buffer.from( - lines.slice(si, si + privateLines).join(''), 'base64'); - - if (encryption !== 'none' && formatVersion === 3) { - throw new Error('Encrypted keys arenot supported for' + - ' PuTTY format version 3'); - } - - if (encryption === 'aes256-cbc') { - if (!options.passphrase) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } - - var iv = Buffer.alloc(16, 0); - var decipher = crypto.createDecipheriv( - 'aes-256-cbc', - derivePPK2EncryptionKey(options.passphrase), - iv); - decipher.setAutoPadding(false); - privateBuf = Buffer.concat([ - decipher.update(privateBuf), decipher.final()]); - } - - key = new PrivateKey(key); - if (key.type !== keyType) { - throw (new Error('Outer key algorithm mismatch')); - } - - var sshbuf = new SSHBuffer({buffer: privateBuf}); - var privateKeyParts; - if (alg === 'ssh-dss') { - privateKeyParts = [ { - name: 'x', - data: sshbuf.readBuffer() - }]; - } else if (alg === 'ssh-rsa') { - privateKeyParts = [ - { name: 'd', data: sshbuf.readBuffer() }, - { name: 'p', data: sshbuf.readBuffer() }, - { name: 'q', data: sshbuf.readBuffer() }, - { name: 'iqmp', data: sshbuf.readBuffer() } - ]; - } else if (alg.match(/^ecdsa-sha2-nistp/)) { - privateKeyParts = [ { - name: 'd', data: sshbuf.readBuffer() - } ]; - } else if (alg === 'ssh-ed25519') { - privateKeyParts = [ { - name: 'k', data: sshbuf.readBuffer() - } ]; - } else { - throw new Error('Unsupported PPK key type: ' + alg); - } - - key = new PrivateKey({ - type: key.type, - parts: key.parts.concat(privateKeyParts) - }); - } - - key.comment = comment; - return (key); -} - -function derivePPK2EncryptionKey(passphrase) { - var hash1 = crypto.createHash('sha1').update(Buffer.concat([ - Buffer.from([0, 0, 0, 0]), - Buffer.from(passphrase) - ])).digest(); - var hash2 = crypto.createHash('sha1').update(Buffer.concat([ - Buffer.from([0, 0, 0, 1]), - Buffer.from(passphrase) - ])).digest(); - return (Buffer.concat([hash1, hash2]).slice(0, 32)); -} - -function splitHeader(line) { - var idx = line.indexOf(':'); - if (idx === -1) - return (null); - var header = line.slice(0, idx); - ++idx; - while (line[idx] === ' ') - ++idx; - var rest = line.slice(idx); - return ([header, rest]); -} - -function write(key, options) { - assert.object(key); - if (!Key.isKey(key)) - throw (new Error('Must be a public key')); - - var alg = rfc4253.keyTypeToAlg(key); - var buf = rfc4253.write(key); - var comment = key.comment || ''; - - var b64 = buf.toString('base64'); - var lines = wrap(b64, 64); - - lines.unshift('Public-Lines: ' + lines.length); - lines.unshift('Comment: ' + comment); - lines.unshift('Encryption: none'); - lines.unshift('PuTTY-User-Key-File-2: ' + alg); - - return (Buffer.from(lines.join('\n') + '\n')); -} - -function wrap(txt, len) { - var lines = []; - var pos = 0; - while (pos < txt.length) { - lines.push(txt.slice(pos, pos + 64)); - pos += 64; - } - return (lines); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js b/test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js deleted file mode 100644 index 52fddcb6..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/rfc4253.js +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read.bind(undefined, false, undefined), - readType: read.bind(undefined, false), - write: write, - /* semi-private api, used by sshpk-agent */ - readPartial: read.bind(undefined, true), - - /* shared with ssh format */ - readInternal: read, - keyTypeToAlg: keyTypeToAlg, - algToKeyType: algToKeyType -}; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var SSHBuffer = require('../ssh-buffer'); - -function algToKeyType(alg) { - assert.string(alg); - if (alg === 'ssh-dss') - return ('dsa'); - else if (alg === 'ssh-rsa') - return ('rsa'); - else if (alg === 'ssh-ed25519') - return ('ed25519'); - else if (alg === 'ssh-curve25519') - return ('curve25519'); - else if (alg.match(/^ecdsa-sha2-/)) - return ('ecdsa'); - else - throw (new Error('Unknown algorithm ' + alg)); -} - -function keyTypeToAlg(key) { - assert.object(key); - if (key.type === 'dsa') - return ('ssh-dss'); - else if (key.type === 'rsa') - return ('ssh-rsa'); - else if (key.type === 'ed25519') - return ('ssh-ed25519'); - else if (key.type === 'curve25519') - return ('ssh-curve25519'); - else if (key.type === 'ecdsa') - return ('ecdsa-sha2-' + key.part.curve.data.toString()); - else - throw (new Error('Unknown key type ' + key.type)); -} - -function read(partial, type, buf, options) { - if (typeof (buf) === 'string') - buf = Buffer.from(buf); - assert.buffer(buf, 'buf'); - - var key = {}; - - var parts = key.parts = []; - var sshbuf = new SSHBuffer({buffer: buf}); - - var alg = sshbuf.readString(); - assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); - - key.type = algToKeyType(alg); - - var partCount = algs.info[key.type].parts.length; - if (type && type === 'private') - partCount = algs.privInfo[key.type].parts.length; - - while (!sshbuf.atEnd() && parts.length < partCount) - parts.push(sshbuf.readPart()); - while (!partial && !sshbuf.atEnd()) - parts.push(sshbuf.readPart()); - - assert.ok(parts.length >= 1, - 'key must have at least one part'); - assert.ok(partial || sshbuf.atEnd(), - 'leftover bytes at end of key'); - - var Constructor = Key; - var algInfo = algs.info[key.type]; - if (type === 'private' || algInfo.parts.length !== parts.length) { - algInfo = algs.privInfo[key.type]; - Constructor = PrivateKey; - } - assert.strictEqual(algInfo.parts.length, parts.length); - - if (key.type === 'ecdsa') { - var res = /^ecdsa-sha2-(.+)$/.exec(alg); - assert.ok(res !== null); - assert.strictEqual(res[1], parts[0].data.toString()); - } - - var normalized = true; - for (var i = 0; i < algInfo.parts.length; ++i) { - var p = parts[i]; - p.name = algInfo.parts[i]; - /* - * OpenSSH stores ed25519 "private" keys as seed + public key - * concat'd together (k followed by A). We want to keep them - * separate for other formats that don't do this. - */ - if (key.type === 'ed25519' && p.name === 'k') - p.data = p.data.slice(0, 32); - - if (p.name !== 'curve' && algInfo.normalize !== false) { - var nd; - if (key.type === 'ed25519') { - nd = utils.zeroPadToLength(p.data, 32); - } else { - nd = utils.mpNormalize(p.data); - } - if (nd.toString('binary') !== - p.data.toString('binary')) { - p.data = nd; - normalized = false; - } - } - } - - if (normalized) - key._rfc4253Cache = sshbuf.toBuffer(); - - if (partial && typeof (partial) === 'object') { - partial.remainder = sshbuf.remainder(); - partial.consumed = sshbuf._offset; - } - - return (new Constructor(key)); -} - -function write(key, options) { - assert.object(key); - - var alg = keyTypeToAlg(key); - var i; - - var algInfo = algs.info[key.type]; - if (PrivateKey.isPrivateKey(key)) - algInfo = algs.privInfo[key.type]; - var parts = algInfo.parts; - - var buf = new SSHBuffer({}); - - buf.writeString(alg); - - for (i = 0; i < parts.length; ++i) { - var data = key.part[parts[i]].data; - if (algInfo.normalize !== false) { - if (key.type === 'ed25519') - data = utils.zeroPadToLength(data, 32); - else - data = utils.mpNormalize(data); - } - if (key.type === 'ed25519' && parts[i] === 'k') - data = Buffer.concat([data, key.part.A.data]); - buf.writeBuffer(data); - } - - return (buf.toBuffer()); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js b/test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js deleted file mode 100644 index 5e7eed88..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/ssh-private.js +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readSSHPrivate: readSSHPrivate, - write: write -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); -var crypto = require('crypto'); - -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); -var rfc4253 = require('./rfc4253'); -var SSHBuffer = require('../ssh-buffer'); -var errors = require('../errors'); - -var bcrypt; - -function read(buf, options) { - return (pem.read(buf, options)); -} - -var MAGIC = 'openssh-key-v1'; - -function readSSHPrivate(type, buf, options) { - buf = new SSHBuffer({buffer: buf}); - - var magic = buf.readCString(); - assert.strictEqual(magic, MAGIC, 'bad magic string'); - - var cipher = buf.readString(); - var kdf = buf.readString(); - var kdfOpts = buf.readBuffer(); - - var nkeys = buf.readInt(); - if (nkeys !== 1) { - throw (new Error('OpenSSH-format key file contains ' + - 'multiple keys: this is unsupported.')); - } - - var pubKey = buf.readBuffer(); - - if (type === 'public') { - assert.ok(buf.atEnd(), 'excess bytes left after key'); - return (rfc4253.read(pubKey)); - } - - var privKeyBlob = buf.readBuffer(); - assert.ok(buf.atEnd(), 'excess bytes left after key'); - - var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); - switch (kdf) { - case 'none': - if (cipher !== 'none') { - throw (new Error('OpenSSH-format key uses KDF "none" ' + - 'but specifies a cipher other than "none"')); - } - break; - case 'bcrypt': - var salt = kdfOptsBuf.readBuffer(); - var rounds = kdfOptsBuf.readInt(); - var cinf = utils.opensshCipherInfo(cipher); - if (bcrypt === undefined) { - bcrypt = require('bcrypt-pbkdf'); - } - - if (typeof (options.passphrase) === 'string') { - options.passphrase = Buffer.from(options.passphrase, - 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'OpenSSH')); - } - - var pass = new Uint8Array(options.passphrase); - var salti = new Uint8Array(salt); - /* Use the pbkdf to derive both the key and the IV. */ - var out = new Uint8Array(cinf.keySize + cinf.blockSize); - var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, - out, out.length, rounds); - if (res !== 0) { - throw (new Error('bcrypt_pbkdf function returned ' + - 'failure, parameters invalid')); - } - out = Buffer.from(out); - var ckey = out.slice(0, cinf.keySize); - var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); - var cipherStream = crypto.createDecipheriv(cinf.opensslName, - ckey, iv); - cipherStream.setAutoPadding(false); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(privKeyBlob); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - privKeyBlob = Buffer.concat(chunks); - break; - default: - throw (new Error( - 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); - } - - buf = new SSHBuffer({buffer: privKeyBlob}); - - var checkInt1 = buf.readInt(); - var checkInt2 = buf.readInt(); - if (checkInt1 !== checkInt2) { - throw (new Error('Incorrect passphrase supplied, could not ' + - 'decrypt key')); - } - - var ret = {}; - var key = rfc4253.readInternal(ret, 'private', buf.remainder()); - - buf.skip(ret.consumed); - - var comment = buf.readString(); - key.comment = comment; - - return (key); -} - -function write(key, options) { - var pubKey; - if (PrivateKey.isPrivateKey(key)) - pubKey = key.toPublic(); - else - pubKey = key; - - var cipher = 'none'; - var kdf = 'none'; - var kdfopts = Buffer.alloc(0); - var cinf = { blockSize: 8 }; - var passphrase; - if (options !== undefined) { - passphrase = options.passphrase; - if (typeof (passphrase) === 'string') - passphrase = Buffer.from(passphrase, 'utf-8'); - if (passphrase !== undefined) { - assert.buffer(passphrase, 'options.passphrase'); - assert.optionalString(options.cipher, 'options.cipher'); - cipher = options.cipher; - if (cipher === undefined) - cipher = 'aes128-ctr'; - cinf = utils.opensshCipherInfo(cipher); - kdf = 'bcrypt'; - } - } - - var privBuf; - if (PrivateKey.isPrivateKey(key)) { - privBuf = new SSHBuffer({}); - var checkInt = crypto.randomBytes(4).readUInt32BE(0); - privBuf.writeInt(checkInt); - privBuf.writeInt(checkInt); - privBuf.write(key.toBuffer('rfc4253')); - privBuf.writeString(key.comment || ''); - - var n = 1; - while (privBuf._offset % cinf.blockSize !== 0) - privBuf.writeChar(n++); - privBuf = privBuf.toBuffer(); - } - - switch (kdf) { - case 'none': - break; - case 'bcrypt': - var salt = crypto.randomBytes(16); - var rounds = 16; - var kdfssh = new SSHBuffer({}); - kdfssh.writeBuffer(salt); - kdfssh.writeInt(rounds); - kdfopts = kdfssh.toBuffer(); - - if (bcrypt === undefined) { - bcrypt = require('bcrypt-pbkdf'); - } - var pass = new Uint8Array(passphrase); - var salti = new Uint8Array(salt); - /* Use the pbkdf to derive both the key and the IV. */ - var out = new Uint8Array(cinf.keySize + cinf.blockSize); - var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, - out, out.length, rounds); - if (res !== 0) { - throw (new Error('bcrypt_pbkdf function returned ' + - 'failure, parameters invalid')); - } - out = Buffer.from(out); - var ckey = out.slice(0, cinf.keySize); - var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); - - var cipherStream = crypto.createCipheriv(cinf.opensslName, - ckey, iv); - cipherStream.setAutoPadding(false); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - throw (e); - }); - cipherStream.write(privBuf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - privBuf = Buffer.concat(chunks); - break; - default: - throw (new Error('Unsupported kdf ' + kdf)); - } - - var buf = new SSHBuffer({}); - - buf.writeCString(MAGIC); - buf.writeString(cipher); /* cipher */ - buf.writeString(kdf); /* kdf */ - buf.writeBuffer(kdfopts); /* kdfoptions */ - - buf.writeInt(1); /* nkeys */ - buf.writeBuffer(pubKey.toBuffer('rfc4253')); - - if (privBuf) - buf.writeBuffer(privBuf); - - buf = buf.toBuffer(); - - var header; - if (PrivateKey.isPrivateKey(key)) - header = 'OPENSSH PRIVATE KEY'; - else - header = 'OPENSSH PUBLIC KEY'; - - var tmp = buf.toString('base64'); - var len = tmp.length + (tmp.length / 70) + - 18 + 16 + header.length*2 + 10; - buf = Buffer.alloc(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 70; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/ssh.js b/test-eol-project/node_modules/sshpk/lib/formats/ssh.js deleted file mode 100644 index c8e9c931..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/ssh.js +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var rfc4253 = require('./rfc4253'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); - -var sshpriv = require('./ssh-private'); - -/*JSSTYLED*/ -var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; -/*JSSTYLED*/ -var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var trimmed = buf.trim().replace(/[\\\r]/g, ''); - var m = trimmed.match(SSHKEY_RE); - if (!m) - m = trimmed.match(SSHKEY_RE2); - assert.ok(m, 'key must match regex'); - - var type = rfc4253.algToKeyType(m[1]); - var kbuf = Buffer.from(m[2], 'base64'); - - /* - * This is a bit tricky. If we managed to parse the key and locate the - * key comment with the regex, then do a non-partial read and assert - * that we have consumed all bytes. If we couldn't locate the key - * comment, though, there may be whitespace shenanigans going on that - * have conjoined the comment to the rest of the key. We do a partial - * read in this case to try to make the best out of a sorry situation. - */ - var key; - var ret = {}; - if (m[4]) { - try { - key = rfc4253.read(kbuf); - - } catch (e) { - m = trimmed.match(SSHKEY_RE2); - assert.ok(m, 'key must match regex'); - kbuf = Buffer.from(m[2], 'base64'); - key = rfc4253.readInternal(ret, 'public', kbuf); - } - } else { - key = rfc4253.readInternal(ret, 'public', kbuf); - } - - assert.strictEqual(type, key.type); - - if (m[4] && m[4].length > 0) { - key.comment = m[4]; - - } else if (ret.consumed) { - /* - * Now the magic: trying to recover the key comment when it's - * gotten conjoined to the key or otherwise shenanigan'd. - * - * Work out how much base64 we used, then drop all non-base64 - * chars from the beginning up to this point in the the string. - * Then offset in this and try to make up for missing = chars. - */ - var data = m[2] + (m[3] ? m[3] : ''); - var realOffset = Math.ceil(ret.consumed / 3) * 4; - data = data.slice(0, realOffset - 2). /*JSSTYLED*/ - replace(/[^a-zA-Z0-9+\/=]/g, '') + - data.slice(realOffset - 2); - - var padding = ret.consumed % 3; - if (padding > 0 && - data.slice(realOffset - 1, realOffset) !== '=') - realOffset--; - while (data.slice(realOffset, realOffset + 1) === '=') - realOffset++; - - /* Finally, grab what we think is the comment & clean it up. */ - var trailer = data.slice(realOffset); - trailer = trailer.replace(/[\r\n]/g, ' '). - replace(/^\s+/, ''); - if (trailer.match(/^[a-zA-Z0-9]/)) - key.comment = trailer; - } - - return (key); -} - -function write(key, options) { - assert.object(key); - if (!Key.isKey(key)) - throw (new Error('Must be a public key')); - - var parts = []; - var alg = rfc4253.keyTypeToAlg(key); - parts.push(alg); - - var buf = rfc4253.write(key); - parts.push(buf.toString('base64')); - - if (key.comment) - parts.push(key.comment); - - return (Buffer.from(parts.join(' '))); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js b/test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js deleted file mode 100644 index 3155ef0b..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/x509-pem.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2016 Joyent, Inc. - -var x509 = require('./x509'); - -module.exports = { - read: read, - verify: x509.verify, - sign: x509.sign, - write: write -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); -var Identity = require('../identity'); -var Signature = require('../signature'); -var Certificate = require('../certificate'); - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var lines = buf.trim().split(/[\r\n]+/g); - - var m; - var si = -1; - while (!m && si < lines.length) { - m = lines[++si].match(/*JSSTYLED*/ - /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/); - } - assert.ok(m, 'invalid PEM header'); - - var m2; - var ei = lines.length; - while (!m2 && ei > 0) { - m2 = lines[--ei].match(/*JSSTYLED*/ - /[-]+[ ]*END CERTIFICATE[ ]*[-]+/); - } - assert.ok(m2, 'invalid PEM footer'); - - lines = lines.slice(si, ei + 1); - - var headers = {}; - while (true) { - lines = lines.slice(1); - m = lines[0].match(/*JSSTYLED*/ - /^([A-Za-z0-9-]+): (.+)$/); - if (!m) - break; - headers[m[1].toLowerCase()] = m[2]; - } - - /* Chop off the first and last lines */ - lines = lines.slice(0, -1).join(''); - buf = Buffer.from(lines, 'base64'); - - return (x509.read(buf, options)); -} - -function write(cert, options) { - var dbuf = x509.write(cert, options); - - var header = 'CERTIFICATE'; - var tmp = dbuf.toString('base64'); - var len = tmp.length + (tmp.length / 64) + - 18 + 16 + header.length*2 + 10; - var buf = Buffer.alloc(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 64; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} diff --git a/test-eol-project/node_modules/sshpk/lib/formats/x509.js b/test-eol-project/node_modules/sshpk/lib/formats/x509.js deleted file mode 100644 index 0144c444..00000000 --- a/test-eol-project/node_modules/sshpk/lib/formats/x509.js +++ /dev/null @@ -1,752 +0,0 @@ -// Copyright 2017 Joyent, Inc. - -module.exports = { - read: read, - verify: verify, - sign: sign, - signAsync: signAsync, - write: write -}; - -var assert = require('assert-plus'); -var asn1 = require('asn1'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('../algs'); -var utils = require('../utils'); -var Key = require('../key'); -var PrivateKey = require('../private-key'); -var pem = require('./pem'); -var Identity = require('../identity'); -var Signature = require('../signature'); -var Certificate = require('../certificate'); -var pkcs8 = require('./pkcs8'); - -/* - * This file is based on RFC5280 (X.509). - */ - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function verify(cert, key) { - var sig = cert.signatures.x509; - assert.object(sig, 'x509 signature'); - - var algParts = sig.algo.split('-'); - if (algParts[0] !== key.type) - return (false); - - var blob = sig.cache; - if (blob === undefined) { - var der = new asn1.BerWriter(); - writeTBSCert(cert, der); - blob = der.buffer; - } - - var verifier = key.createVerify(algParts[1]); - verifier.write(blob); - return (verifier.verify(sig.signature)); -} - -function Local(i) { - return (asn1.Ber.Context | asn1.Ber.Constructor | i); -} - -function Context(i) { - return (asn1.Ber.Context | i); -} - -var SIGN_ALGS = { - 'rsa-md5': '1.2.840.113549.1.1.4', - 'rsa-sha1': '1.2.840.113549.1.1.5', - 'rsa-sha256': '1.2.840.113549.1.1.11', - 'rsa-sha384': '1.2.840.113549.1.1.12', - 'rsa-sha512': '1.2.840.113549.1.1.13', - 'dsa-sha1': '1.2.840.10040.4.3', - 'dsa-sha256': '2.16.840.1.101.3.4.3.2', - 'ecdsa-sha1': '1.2.840.10045.4.1', - 'ecdsa-sha256': '1.2.840.10045.4.3.2', - 'ecdsa-sha384': '1.2.840.10045.4.3.3', - 'ecdsa-sha512': '1.2.840.10045.4.3.4', - 'ed25519-sha512': '1.3.101.112' -}; -Object.keys(SIGN_ALGS).forEach(function (k) { - SIGN_ALGS[SIGN_ALGS[k]] = k; -}); -SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5'; -SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1'; - -var EXTS = { - 'issuerKeyId': '2.5.29.35', - 'altName': '2.5.29.17', - 'basicConstraints': '2.5.29.19', - 'keyUsage': '2.5.29.15', - 'extKeyUsage': '2.5.29.37' -}; - -function read(buf, options) { - if (typeof (buf) === 'string') { - buf = Buffer.from(buf, 'binary'); - } - assert.buffer(buf, 'buf'); - - var der = new asn1.BerReader(buf); - - der.readSequence(); - if (Math.abs(der.length - der.remain) > 1) { - throw (new Error('DER sequence does not contain whole byte ' + - 'stream')); - } - - var tbsStart = der.offset; - der.readSequence(); - var sigOffset = der.offset + der.length; - var tbsEnd = sigOffset; - - if (der.peek() === Local(0)) { - der.readSequence(Local(0)); - var version = der.readInt(); - assert.ok(version <= 3, - 'only x.509 versions up to v3 supported'); - } - - var cert = {}; - cert.signatures = {}; - var sig = (cert.signatures.x509 = {}); - sig.extras = {}; - - cert.serial = readMPInt(der, 'serial'); - - der.readSequence(); - var after = der.offset + der.length; - var certAlgOid = der.readOID(); - var certAlg = SIGN_ALGS[certAlgOid]; - if (certAlg === undefined) - throw (new Error('unknown signature algorithm ' + certAlgOid)); - - der._offset = after; - cert.issuer = Identity.parseAsn1(der); - - der.readSequence(); - cert.validFrom = readDate(der); - cert.validUntil = readDate(der); - - cert.subjects = [Identity.parseAsn1(der)]; - - der.readSequence(); - after = der.offset + der.length; - cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der); - der._offset = after; - - /* issuerUniqueID */ - if (der.peek() === Local(1)) { - der.readSequence(Local(1)); - sig.extras.issuerUniqueID = - buf.slice(der.offset, der.offset + der.length); - der._offset += der.length; - } - - /* subjectUniqueID */ - if (der.peek() === Local(2)) { - der.readSequence(Local(2)); - sig.extras.subjectUniqueID = - buf.slice(der.offset, der.offset + der.length); - der._offset += der.length; - } - - /* extensions */ - if (der.peek() === Local(3)) { - der.readSequence(Local(3)); - var extEnd = der.offset + der.length; - der.readSequence(); - - while (der.offset < extEnd) - readExtension(cert, buf, der); - - assert.strictEqual(der.offset, extEnd); - } - - assert.strictEqual(der.offset, sigOffset); - - der.readSequence(); - after = der.offset + der.length; - var sigAlgOid = der.readOID(); - var sigAlg = SIGN_ALGS[sigAlgOid]; - if (sigAlg === undefined) - throw (new Error('unknown signature algorithm ' + sigAlgOid)); - der._offset = after; - - var sigData = der.readString(asn1.Ber.BitString, true); - if (sigData[0] === 0) - sigData = sigData.slice(1); - var algParts = sigAlg.split('-'); - - sig.signature = Signature.parse(sigData, algParts[0], 'asn1'); - sig.signature.hashAlgorithm = algParts[1]; - sig.algo = sigAlg; - sig.cache = buf.slice(tbsStart, tbsEnd); - - return (new Certificate(cert)); -} - -function readDate(der) { - if (der.peek() === asn1.Ber.UTCTime) { - return (utcTimeToDate(der.readString(asn1.Ber.UTCTime))); - } else if (der.peek() === asn1.Ber.GeneralizedTime) { - return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime))); - } else { - throw (new Error('Unsupported date format')); - } -} - -function writeDate(der, date) { - if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) { - der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime); - } else { - der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime); - } -} - -/* RFC5280, section 4.2.1.6 (GeneralName type) */ -var ALTNAME = { - OtherName: Local(0), - RFC822Name: Context(1), - DNSName: Context(2), - X400Address: Local(3), - DirectoryName: Local(4), - EDIPartyName: Local(5), - URI: Context(6), - IPAddress: Context(7), - OID: Context(8) -}; - -/* RFC5280, section 4.2.1.12 (KeyPurposeId) */ -var EXTPURPOSE = { - 'serverAuth': '1.3.6.1.5.5.7.3.1', - 'clientAuth': '1.3.6.1.5.5.7.3.2', - 'codeSigning': '1.3.6.1.5.5.7.3.3', - - /* See https://github.com/joyent/oid-docs/blob/master/root.md */ - 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1', - 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2' -}; -var EXTPURPOSE_REV = {}; -Object.keys(EXTPURPOSE).forEach(function (k) { - EXTPURPOSE_REV[EXTPURPOSE[k]] = k; -}); - -var KEYUSEBITS = [ - 'signature', 'identity', 'keyEncryption', - 'encryption', 'keyAgreement', 'ca', 'crl' -]; - -function readExtension(cert, buf, der) { - der.readSequence(); - var after = der.offset + der.length; - var extId = der.readOID(); - var id; - var sig = cert.signatures.x509; - if (!sig.extras.exts) - sig.extras.exts = []; - - var critical; - if (der.peek() === asn1.Ber.Boolean) - critical = der.readBoolean(); - - switch (extId) { - case (EXTS.basicConstraints): - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - var bcEnd = der.offset + der.length; - var ca = false; - if (der.peek() === asn1.Ber.Boolean) - ca = der.readBoolean(); - if (cert.purposes === undefined) - cert.purposes = []; - if (ca === true) - cert.purposes.push('ca'); - var bc = { oid: extId, critical: critical }; - if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer) - bc.pathLen = der.readInt(); - sig.extras.exts.push(bc); - break; - case (EXTS.extKeyUsage): - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - if (cert.purposes === undefined) - cert.purposes = []; - var ekEnd = der.offset + der.length; - while (der.offset < ekEnd) { - var oid = der.readOID(); - cert.purposes.push(EXTPURPOSE_REV[oid] || oid); - } - /* - * This is a bit of a hack: in the case where we have a cert - * that's only allowed to do serverAuth or clientAuth (and not - * the other), we want to make sure all our Subjects are of - * the right type. But we already parsed our Subjects and - * decided if they were hosts or users earlier (since it appears - * first in the cert). - * - * So we go through and mutate them into the right kind here if - * it doesn't match. This might not be hugely beneficial, as it - * seems that single-purpose certs are not often seen in the - * wild. - */ - if (cert.purposes.indexOf('serverAuth') !== -1 && - cert.purposes.indexOf('clientAuth') === -1) { - cert.subjects.forEach(function (ide) { - if (ide.type !== 'host') { - ide.type = 'host'; - ide.hostname = ide.uid || - ide.email || - ide.components[0].value; - } - }); - } else if (cert.purposes.indexOf('clientAuth') !== -1 && - cert.purposes.indexOf('serverAuth') === -1) { - cert.subjects.forEach(function (ide) { - if (ide.type !== 'user') { - ide.type = 'user'; - ide.uid = ide.hostname || - ide.email || - ide.components[0].value; - } - }); - } - sig.extras.exts.push({ oid: extId, critical: critical }); - break; - case (EXTS.keyUsage): - der.readSequence(asn1.Ber.OctetString); - var bits = der.readString(asn1.Ber.BitString, true); - var setBits = readBitField(bits, KEYUSEBITS); - setBits.forEach(function (bit) { - if (cert.purposes === undefined) - cert.purposes = []; - if (cert.purposes.indexOf(bit) === -1) - cert.purposes.push(bit); - }); - sig.extras.exts.push({ oid: extId, critical: critical, - bits: bits }); - break; - case (EXTS.altName): - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - var aeEnd = der.offset + der.length; - while (der.offset < aeEnd) { - switch (der.peek()) { - case ALTNAME.OtherName: - case ALTNAME.EDIPartyName: - der.readSequence(); - der._offset += der.length; - break; - case ALTNAME.OID: - der.readOID(ALTNAME.OID); - break; - case ALTNAME.RFC822Name: - /* RFC822 specifies email addresses */ - var email = der.readString(ALTNAME.RFC822Name); - id = Identity.forEmail(email); - if (!cert.subjects[0].equals(id)) - cert.subjects.push(id); - break; - case ALTNAME.DirectoryName: - der.readSequence(ALTNAME.DirectoryName); - id = Identity.parseAsn1(der); - if (!cert.subjects[0].equals(id)) - cert.subjects.push(id); - break; - case ALTNAME.DNSName: - var host = der.readString( - ALTNAME.DNSName); - id = Identity.forHost(host); - if (!cert.subjects[0].equals(id)) - cert.subjects.push(id); - break; - default: - der.readString(der.peek()); - break; - } - } - sig.extras.exts.push({ oid: extId, critical: critical }); - break; - default: - sig.extras.exts.push({ - oid: extId, - critical: critical, - data: der.readString(asn1.Ber.OctetString, true) - }); - break; - } - - der._offset = after; -} - -var UTCTIME_RE = - /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; -function utcTimeToDate(t) { - var m = t.match(UTCTIME_RE); - assert.ok(m, 'timestamps must be in UTC'); - var d = new Date(); - - var thisYear = d.getUTCFullYear(); - var century = Math.floor(thisYear / 100) * 100; - - var year = parseInt(m[1], 10); - if (thisYear % 100 < 50 && year >= 60) - year += (century - 1); - else - year += century; - d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10)); - d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); - if (m[6] && m[6].length > 0) - d.setUTCSeconds(parseInt(m[6], 10)); - return (d); -} - -var GTIME_RE = - /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; -function gTimeToDate(t) { - var m = t.match(GTIME_RE); - assert.ok(m); - var d = new Date(); - - d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1, - parseInt(m[3], 10)); - d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); - if (m[6] && m[6].length > 0) - d.setUTCSeconds(parseInt(m[6], 10)); - return (d); -} - -function zeroPad(n, m) { - if (m === undefined) - m = 2; - var s = '' + n; - while (s.length < m) - s = '0' + s; - return (s); -} - -function dateToUTCTime(d) { - var s = ''; - s += zeroPad(d.getUTCFullYear() % 100); - s += zeroPad(d.getUTCMonth() + 1); - s += zeroPad(d.getUTCDate()); - s += zeroPad(d.getUTCHours()); - s += zeroPad(d.getUTCMinutes()); - s += zeroPad(d.getUTCSeconds()); - s += 'Z'; - return (s); -} - -function dateToGTime(d) { - var s = ''; - s += zeroPad(d.getUTCFullYear(), 4); - s += zeroPad(d.getUTCMonth() + 1); - s += zeroPad(d.getUTCDate()); - s += zeroPad(d.getUTCHours()); - s += zeroPad(d.getUTCMinutes()); - s += zeroPad(d.getUTCSeconds()); - s += 'Z'; - return (s); -} - -function sign(cert, key) { - if (cert.signatures.x509 === undefined) - cert.signatures.x509 = {}; - var sig = cert.signatures.x509; - - sig.algo = key.type + '-' + key.defaultHashAlgorithm(); - if (SIGN_ALGS[sig.algo] === undefined) - return (false); - - var der = new asn1.BerWriter(); - writeTBSCert(cert, der); - var blob = der.buffer; - sig.cache = blob; - - var signer = key.createSign(); - signer.write(blob); - cert.signatures.x509.signature = signer.sign(); - - return (true); -} - -function signAsync(cert, signer, done) { - if (cert.signatures.x509 === undefined) - cert.signatures.x509 = {}; - var sig = cert.signatures.x509; - - var der = new asn1.BerWriter(); - writeTBSCert(cert, der); - var blob = der.buffer; - sig.cache = blob; - - signer(blob, function (err, signature) { - if (err) { - done(err); - return; - } - sig.algo = signature.type + '-' + signature.hashAlgorithm; - if (SIGN_ALGS[sig.algo] === undefined) { - done(new Error('Invalid signing algorithm "' + - sig.algo + '"')); - return; - } - sig.signature = signature; - done(); - }); -} - -function write(cert, options) { - var sig = cert.signatures.x509; - assert.object(sig, 'x509 signature'); - - var der = new asn1.BerWriter(); - der.startSequence(); - if (sig.cache) { - der._ensure(sig.cache.length); - sig.cache.copy(der._buf, der._offset); - der._offset += sig.cache.length; - } else { - writeTBSCert(cert, der); - } - - der.startSequence(); - der.writeOID(SIGN_ALGS[sig.algo]); - if (sig.algo.match(/^rsa-/)) - der.writeNull(); - der.endSequence(); - - var sigData = sig.signature.toBuffer('asn1'); - var data = Buffer.alloc(sigData.length + 1); - data[0] = 0; - sigData.copy(data, 1); - der.writeBuffer(data, asn1.Ber.BitString); - der.endSequence(); - - return (der.buffer); -} - -function writeTBSCert(cert, der) { - var sig = cert.signatures.x509; - assert.object(sig, 'x509 signature'); - - der.startSequence(); - - der.startSequence(Local(0)); - der.writeInt(2); - der.endSequence(); - - der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer); - - der.startSequence(); - der.writeOID(SIGN_ALGS[sig.algo]); - if (sig.algo.match(/^rsa-/)) - der.writeNull(); - der.endSequence(); - - cert.issuer.toAsn1(der); - - der.startSequence(); - writeDate(der, cert.validFrom); - writeDate(der, cert.validUntil); - der.endSequence(); - - var subject = cert.subjects[0]; - var altNames = cert.subjects.slice(1); - subject.toAsn1(der); - - pkcs8.writePkcs8(der, cert.subjectKey); - - if (sig.extras && sig.extras.issuerUniqueID) { - der.writeBuffer(sig.extras.issuerUniqueID, Local(1)); - } - - if (sig.extras && sig.extras.subjectUniqueID) { - der.writeBuffer(sig.extras.subjectUniqueID, Local(2)); - } - - if (altNames.length > 0 || subject.type === 'host' || - (cert.purposes !== undefined && cert.purposes.length > 0) || - (sig.extras && sig.extras.exts)) { - der.startSequence(Local(3)); - der.startSequence(); - - var exts = []; - if (cert.purposes !== undefined && cert.purposes.length > 0) { - exts.push({ - oid: EXTS.basicConstraints, - critical: true - }); - exts.push({ - oid: EXTS.keyUsage, - critical: true - }); - exts.push({ - oid: EXTS.extKeyUsage, - critical: true - }); - } - exts.push({ oid: EXTS.altName }); - if (sig.extras && sig.extras.exts) - exts = sig.extras.exts; - - for (var i = 0; i < exts.length; ++i) { - der.startSequence(); - der.writeOID(exts[i].oid); - - if (exts[i].critical !== undefined) - der.writeBoolean(exts[i].critical); - - if (exts[i].oid === EXTS.altName) { - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - if (subject.type === 'host') { - der.writeString(subject.hostname, - Context(2)); - } - for (var j = 0; j < altNames.length; ++j) { - if (altNames[j].type === 'host') { - der.writeString( - altNames[j].hostname, - ALTNAME.DNSName); - } else if (altNames[j].type === - 'email') { - der.writeString( - altNames[j].email, - ALTNAME.RFC822Name); - } else { - /* - * Encode anything else as a - * DN style name for now. - */ - der.startSequence( - ALTNAME.DirectoryName); - altNames[j].toAsn1(der); - der.endSequence(); - } - } - der.endSequence(); - der.endSequence(); - } else if (exts[i].oid === EXTS.basicConstraints) { - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - var ca = (cert.purposes.indexOf('ca') !== -1); - var pathLen = exts[i].pathLen; - der.writeBoolean(ca); - if (pathLen !== undefined) - der.writeInt(pathLen); - der.endSequence(); - der.endSequence(); - } else if (exts[i].oid === EXTS.extKeyUsage) { - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - cert.purposes.forEach(function (purpose) { - if (purpose === 'ca') - return; - if (KEYUSEBITS.indexOf(purpose) !== -1) - return; - var oid = purpose; - if (EXTPURPOSE[purpose] !== undefined) - oid = EXTPURPOSE[purpose]; - der.writeOID(oid); - }); - der.endSequence(); - der.endSequence(); - } else if (exts[i].oid === EXTS.keyUsage) { - der.startSequence(asn1.Ber.OctetString); - /* - * If we parsed this certificate from a byte - * stream (i.e. we didn't generate it in sshpk) - * then we'll have a ".bits" property on the - * ext with the original raw byte contents. - * - * If we have this, use it here instead of - * regenerating it. This guarantees we output - * the same data we parsed, so signatures still - * validate. - */ - if (exts[i].bits !== undefined) { - der.writeBuffer(exts[i].bits, - asn1.Ber.BitString); - } else { - var bits = writeBitField(cert.purposes, - KEYUSEBITS); - der.writeBuffer(bits, - asn1.Ber.BitString); - } - der.endSequence(); - } else { - der.writeBuffer(exts[i].data, - asn1.Ber.OctetString); - } - - der.endSequence(); - } - - der.endSequence(); - der.endSequence(); - } - - der.endSequence(); -} - -/* - * Reads an ASN.1 BER bitfield out of the Buffer produced by doing - * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw - * contents of the BitString tag, which is a count of unused bits followed by - * the bits as a right-padded byte string. - * - * `bits` is the Buffer, `bitIndex` should contain an array of string names - * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec. - * - * Returns an array of Strings, the names of the bits that were set to 1. - */ -function readBitField(bits, bitIndex) { - var bitLen = 8 * (bits.length - 1) - bits[0]; - var setBits = {}; - for (var i = 0; i < bitLen; ++i) { - var byteN = 1 + Math.floor(i / 8); - var bit = 7 - (i % 8); - var mask = 1 << bit; - var bitVal = ((bits[byteN] & mask) !== 0); - var name = bitIndex[i]; - if (bitVal && typeof (name) === 'string') { - setBits[name] = true; - } - } - return (Object.keys(setBits)); -} - -/* - * `setBits` is an array of strings, containing the names for each bit that - * sould be set to 1. `bitIndex` is same as in `readBitField()`. - * - * Returns a Buffer, ready to be written out with `BerWriter#writeString()`. - */ -function writeBitField(setBits, bitIndex) { - var bitLen = bitIndex.length; - var blen = Math.ceil(bitLen / 8); - var unused = blen * 8 - bitLen; - var bits = Buffer.alloc(1 + blen); // zero-filled - bits[0] = unused; - for (var i = 0; i < bitLen; ++i) { - var byteN = 1 + Math.floor(i / 8); - var bit = 7 - (i % 8); - var mask = 1 << bit; - var name = bitIndex[i]; - if (name === undefined) - continue; - var bitVal = (setBits.indexOf(name) !== -1); - if (bitVal) { - bits[byteN] |= mask; - } - } - return (bits); -} diff --git a/test-eol-project/node_modules/sshpk/lib/identity.js b/test-eol-project/node_modules/sshpk/lib/identity.js deleted file mode 100644 index 7d75b667..00000000 --- a/test-eol-project/node_modules/sshpk/lib/identity.js +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright 2017 Joyent, Inc. - -module.exports = Identity; - -var assert = require('assert-plus'); -var algs = require('./algs'); -var crypto = require('crypto'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var errs = require('./errors'); -var util = require('util'); -var utils = require('./utils'); -var asn1 = require('asn1'); -var Buffer = require('safer-buffer').Buffer; - -/*JSSTYLED*/ -var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; - -var oids = {}; -oids.cn = '2.5.4.3'; -oids.o = '2.5.4.10'; -oids.ou = '2.5.4.11'; -oids.l = '2.5.4.7'; -oids.s = '2.5.4.8'; -oids.c = '2.5.4.6'; -oids.sn = '2.5.4.4'; -oids.postalCode = '2.5.4.17'; -oids.serialNumber = '2.5.4.5'; -oids.street = '2.5.4.9'; -oids.x500UniqueIdentifier = '2.5.4.45'; -oids.role = '2.5.4.72'; -oids.telephoneNumber = '2.5.4.20'; -oids.description = '2.5.4.13'; -oids.dc = '0.9.2342.19200300.100.1.25'; -oids.uid = '0.9.2342.19200300.100.1.1'; -oids.mail = '0.9.2342.19200300.100.1.3'; -oids.title = '2.5.4.12'; -oids.gn = '2.5.4.42'; -oids.initials = '2.5.4.43'; -oids.pseudonym = '2.5.4.65'; -oids.emailAddress = '1.2.840.113549.1.9.1'; - -var unoids = {}; -Object.keys(oids).forEach(function (k) { - unoids[oids[k]] = k; -}); - -function Identity(opts) { - var self = this; - assert.object(opts, 'options'); - assert.arrayOfObject(opts.components, 'options.components'); - this.components = opts.components; - this.componentLookup = {}; - this.components.forEach(function (c) { - if (c.name && !c.oid) - c.oid = oids[c.name]; - if (c.oid && !c.name) - c.name = unoids[c.oid]; - if (self.componentLookup[c.name] === undefined) - self.componentLookup[c.name] = []; - self.componentLookup[c.name].push(c); - }); - if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { - this.cn = this.componentLookup.cn[0].value; - } - assert.optionalString(opts.type, 'options.type'); - if (opts.type === undefined) { - if (this.components.length === 1 && - this.componentLookup.cn && - this.componentLookup.cn.length === 1 && - this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { - this.type = 'host'; - this.hostname = this.componentLookup.cn[0].value; - - } else if (this.componentLookup.dc && - this.components.length === this.componentLookup.dc.length) { - this.type = 'host'; - this.hostname = this.componentLookup.dc.map( - function (c) { - return (c.value); - }).join('.'); - - } else if (this.componentLookup.uid && - this.components.length === - this.componentLookup.uid.length) { - this.type = 'user'; - this.uid = this.componentLookup.uid[0].value; - - } else if (this.componentLookup.cn && - this.componentLookup.cn.length === 1 && - this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { - this.type = 'host'; - this.hostname = this.componentLookup.cn[0].value; - - } else if (this.componentLookup.uid && - this.componentLookup.uid.length === 1) { - this.type = 'user'; - this.uid = this.componentLookup.uid[0].value; - - } else if (this.componentLookup.mail && - this.componentLookup.mail.length === 1) { - this.type = 'email'; - this.email = this.componentLookup.mail[0].value; - - } else if (this.componentLookup.cn && - this.componentLookup.cn.length === 1) { - this.type = 'user'; - this.uid = this.componentLookup.cn[0].value; - - } else { - this.type = 'unknown'; - } - } else { - this.type = opts.type; - if (this.type === 'host') - this.hostname = opts.hostname; - else if (this.type === 'user') - this.uid = opts.uid; - else if (this.type === 'email') - this.email = opts.email; - else - throw (new Error('Unknown type ' + this.type)); - } -} - -Identity.prototype.toString = function () { - return (this.components.map(function (c) { - var n = c.name.toUpperCase(); - /*JSSTYLED*/ - n = n.replace(/=/g, '\\='); - var v = c.value; - /*JSSTYLED*/ - v = v.replace(/,/g, '\\,'); - return (n + '=' + v); - }).join(', ')); -}; - -Identity.prototype.get = function (name, asArray) { - assert.string(name, 'name'); - var arr = this.componentLookup[name]; - if (arr === undefined || arr.length === 0) - return (undefined); - if (!asArray && arr.length > 1) - throw (new Error('Multiple values for attribute ' + name)); - if (!asArray) - return (arr[0].value); - return (arr.map(function (c) { - return (c.value); - })); -}; - -Identity.prototype.toArray = function (idx) { - return (this.components.map(function (c) { - return ({ - name: c.name, - value: c.value - }); - })); -}; - -/* - * These are from X.680 -- PrintableString allowed chars are in section 37.4 - * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to - * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 - * (the basic ASCII character set). - */ -/* JSSTYLED */ -var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; -/* JSSTYLED */ -var NOT_IA5 = /[^\x00-\x7f]/; - -Identity.prototype.toAsn1 = function (der, tag) { - der.startSequence(tag); - this.components.forEach(function (c) { - der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); - der.startSequence(); - der.writeOID(c.oid); - /* - * If we fit in a PrintableString, use that. Otherwise use an - * IA5String or UTF8String. - * - * If this identity was parsed from a DN, use the ASN.1 types - * from the original representation (otherwise this might not - * be a full match for the original in some validators). - */ - if (c.asn1type === asn1.Ber.Utf8String || - c.value.match(NOT_IA5)) { - var v = Buffer.from(c.value, 'utf8'); - der.writeBuffer(v, asn1.Ber.Utf8String); - - } else if (c.asn1type === asn1.Ber.IA5String || - c.value.match(NOT_PRINTABLE)) { - der.writeString(c.value, asn1.Ber.IA5String); - - } else { - var type = asn1.Ber.PrintableString; - if (c.asn1type !== undefined) - type = c.asn1type; - der.writeString(c.value, type); - } - der.endSequence(); - der.endSequence(); - }); - der.endSequence(); -}; - -function globMatch(a, b) { - if (a === '**' || b === '**') - return (true); - var aParts = a.split('.'); - var bParts = b.split('.'); - if (aParts.length !== bParts.length) - return (false); - for (var i = 0; i < aParts.length; ++i) { - if (aParts[i] === '*' || bParts[i] === '*') - continue; - if (aParts[i] !== bParts[i]) - return (false); - } - return (true); -} - -Identity.prototype.equals = function (other) { - if (!Identity.isIdentity(other, [1, 0])) - return (false); - if (other.components.length !== this.components.length) - return (false); - for (var i = 0; i < this.components.length; ++i) { - if (this.components[i].oid !== other.components[i].oid) - return (false); - if (!globMatch(this.components[i].value, - other.components[i].value)) { - return (false); - } - } - return (true); -}; - -Identity.forHost = function (hostname) { - assert.string(hostname, 'hostname'); - return (new Identity({ - type: 'host', - hostname: hostname, - components: [ { name: 'cn', value: hostname } ] - })); -}; - -Identity.forUser = function (uid) { - assert.string(uid, 'uid'); - return (new Identity({ - type: 'user', - uid: uid, - components: [ { name: 'uid', value: uid } ] - })); -}; - -Identity.forEmail = function (email) { - assert.string(email, 'email'); - return (new Identity({ - type: 'email', - email: email, - components: [ { name: 'mail', value: email } ] - })); -}; - -Identity.parseDN = function (dn) { - assert.string(dn, 'dn'); - var parts = ['']; - var idx = 0; - var rem = dn; - while (rem.length > 0) { - var m; - /*JSSTYLED*/ - if ((m = /^,/.exec(rem)) !== null) { - parts[++idx] = ''; - rem = rem.slice(m[0].length); - /*JSSTYLED*/ - } else if ((m = /^\\,/.exec(rem)) !== null) { - parts[idx] += ','; - rem = rem.slice(m[0].length); - /*JSSTYLED*/ - } else if ((m = /^\\./.exec(rem)) !== null) { - parts[idx] += m[0]; - rem = rem.slice(m[0].length); - /*JSSTYLED*/ - } else if ((m = /^[^\\,]+/.exec(rem)) !== null) { - parts[idx] += m[0]; - rem = rem.slice(m[0].length); - } else { - throw (new Error('Failed to parse DN')); - } - } - var cmps = parts.map(function (c) { - c = c.trim(); - var eqPos = c.indexOf('='); - while (eqPos > 0 && c.charAt(eqPos - 1) === '\\') - eqPos = c.indexOf('=', eqPos + 1); - if (eqPos === -1) { - throw (new Error('Failed to parse DN')); - } - /*JSSTYLED*/ - var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, '='); - var value = c.slice(eqPos + 1); - return ({ name: name, value: value }); - }); - return (new Identity({ components: cmps })); -}; - -Identity.fromArray = function (components) { - assert.arrayOfObject(components, 'components'); - components.forEach(function (cmp) { - assert.object(cmp, 'component'); - assert.string(cmp.name, 'component.name'); - if (!Buffer.isBuffer(cmp.value) && - !(typeof (cmp.value) === 'string')) { - throw (new Error('Invalid component value')); - } - }); - return (new Identity({ components: components })); -}; - -Identity.parseAsn1 = function (der, top) { - var components = []; - der.readSequence(top); - var end = der.offset + der.length; - while (der.offset < end) { - der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); - var after = der.offset + der.length; - der.readSequence(); - var oid = der.readOID(); - var type = der.peek(); - var value; - switch (type) { - case asn1.Ber.PrintableString: - case asn1.Ber.IA5String: - case asn1.Ber.OctetString: - case asn1.Ber.T61String: - value = der.readString(type); - break; - case asn1.Ber.Utf8String: - value = der.readString(type, true); - value = value.toString('utf8'); - break; - case asn1.Ber.CharacterString: - case asn1.Ber.BMPString: - value = der.readString(type, true); - value = value.toString('utf16le'); - break; - default: - throw (new Error('Unknown asn1 type ' + type)); - } - components.push({ oid: oid, asn1type: type, value: value }); - der._offset = after; - } - der._offset = end; - return (new Identity({ - components: components - })); -}; - -Identity.isIdentity = function (obj, ver) { - return (utils.isCompatible(obj, Identity, ver)); -}; - -/* - * API versions for Identity: - * [1,0] -- initial ver - */ -Identity.prototype._sshpkApiVersion = [1, 0]; - -Identity._oldVersionDetect = function (obj) { - return ([1, 0]); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/index.js b/test-eol-project/node_modules/sshpk/lib/index.js deleted file mode 100644 index f76db791..00000000 --- a/test-eol-project/node_modules/sshpk/lib/index.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -var Key = require('./key'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var PrivateKey = require('./private-key'); -var Certificate = require('./certificate'); -var Identity = require('./identity'); -var errs = require('./errors'); - -module.exports = { - /* top-level classes */ - Key: Key, - parseKey: Key.parse, - Fingerprint: Fingerprint, - parseFingerprint: Fingerprint.parse, - Signature: Signature, - parseSignature: Signature.parse, - PrivateKey: PrivateKey, - parsePrivateKey: PrivateKey.parse, - generatePrivateKey: PrivateKey.generate, - Certificate: Certificate, - parseCertificate: Certificate.parse, - createSelfSignedCertificate: Certificate.createSelfSigned, - createCertificate: Certificate.create, - Identity: Identity, - identityFromDN: Identity.parseDN, - identityForHost: Identity.forHost, - identityForUser: Identity.forUser, - identityForEmail: Identity.forEmail, - identityFromArray: Identity.fromArray, - - /* errors */ - FingerprintFormatError: errs.FingerprintFormatError, - InvalidAlgorithmError: errs.InvalidAlgorithmError, - KeyParseError: errs.KeyParseError, - SignatureParseError: errs.SignatureParseError, - KeyEncryptedError: errs.KeyEncryptedError, - CertificateParseError: errs.CertificateParseError -}; diff --git a/test-eol-project/node_modules/sshpk/lib/key.js b/test-eol-project/node_modules/sshpk/lib/key.js deleted file mode 100644 index 706f8340..00000000 --- a/test-eol-project/node_modules/sshpk/lib/key.js +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright 2018 Joyent, Inc. - -module.exports = Key; - -var assert = require('assert-plus'); -var algs = require('./algs'); -var crypto = require('crypto'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var DiffieHellman = require('./dhe').DiffieHellman; -var errs = require('./errors'); -var utils = require('./utils'); -var PrivateKey = require('./private-key'); -var edCompat; - -try { - edCompat = require('./ed-compat'); -} catch (e) { - /* Just continue through, and bail out if we try to use it. */ -} - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var KeyParseError = errs.KeyParseError; - -var formats = {}; -formats['auto'] = require('./formats/auto'); -formats['pem'] = require('./formats/pem'); -formats['pkcs1'] = require('./formats/pkcs1'); -formats['pkcs8'] = require('./formats/pkcs8'); -formats['rfc4253'] = require('./formats/rfc4253'); -formats['ssh'] = require('./formats/ssh'); -formats['ssh-private'] = require('./formats/ssh-private'); -formats['openssh'] = formats['ssh-private']; -formats['dnssec'] = require('./formats/dnssec'); -formats['putty'] = require('./formats/putty'); -formats['ppk'] = formats['putty']; - -function Key(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.parts, 'options.parts'); - assert.string(opts.type, 'options.type'); - assert.optionalString(opts.comment, 'options.comment'); - - var algInfo = algs.info[opts.type]; - if (typeof (algInfo) !== 'object') - throw (new InvalidAlgorithmError(opts.type)); - - var partLookup = {}; - for (var i = 0; i < opts.parts.length; ++i) { - var part = opts.parts[i]; - partLookup[part.name] = part; - } - - this.type = opts.type; - this.parts = opts.parts; - this.part = partLookup; - this.comment = undefined; - this.source = opts.source; - - /* for speeding up hashing/fingerprint operations */ - this._rfc4253Cache = opts._rfc4253Cache; - this._hashCache = {}; - - var sz; - this.curve = undefined; - if (this.type === 'ecdsa') { - var curve = this.part.curve.data.toString(); - this.curve = curve; - sz = algs.curves[curve].size; - } else if (this.type === 'ed25519' || this.type === 'curve25519') { - sz = 256; - this.curve = 'curve25519'; - } else { - var szPart = this.part[algInfo.sizePart]; - sz = szPart.data.length; - sz = sz * 8 - utils.countZeros(szPart.data); - } - this.size = sz; -} - -Key.formats = formats; - -Key.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'ssh'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - if (format === 'rfc4253') { - if (this._rfc4253Cache === undefined) - this._rfc4253Cache = formats['rfc4253'].write(this); - return (this._rfc4253Cache); - } - - return (formats[format].write(this, options)); -}; - -Key.prototype.toString = function (format, options) { - return (this.toBuffer(format, options).toString()); -}; - -Key.prototype.hash = function (algo, type) { - assert.string(algo, 'algorithm'); - assert.optionalString(type, 'type'); - if (type === undefined) - type = 'ssh'; - algo = algo.toLowerCase(); - if (algs.hashAlgs[algo] === undefined) - throw (new InvalidAlgorithmError(algo)); - - var cacheKey = algo + '||' + type; - if (this._hashCache[cacheKey]) - return (this._hashCache[cacheKey]); - - var buf; - if (type === 'ssh') { - buf = this.toBuffer('rfc4253'); - } else if (type === 'spki') { - buf = formats.pkcs8.pkcs8ToBuffer(this); - } else { - throw (new Error('Hash type ' + type + ' not supported')); - } - var hash = crypto.createHash(algo).update(buf).digest(); - this._hashCache[cacheKey] = hash; - return (hash); -}; - -Key.prototype.fingerprint = function (algo, type) { - if (algo === undefined) - algo = 'sha256'; - if (type === undefined) - type = 'ssh'; - assert.string(algo, 'algorithm'); - assert.string(type, 'type'); - var opts = { - type: 'key', - hash: this.hash(algo, type), - algorithm: algo, - hashType: type - }; - return (new Fingerprint(opts)); -}; - -Key.prototype.defaultHashAlgorithm = function () { - var hashAlgo = 'sha1'; - if (this.type === 'rsa') - hashAlgo = 'sha256'; - if (this.type === 'dsa' && this.size > 1024) - hashAlgo = 'sha256'; - if (this.type === 'ed25519') - hashAlgo = 'sha512'; - if (this.type === 'ecdsa') { - if (this.size <= 256) - hashAlgo = 'sha256'; - else if (this.size <= 384) - hashAlgo = 'sha384'; - else - hashAlgo = 'sha512'; - } - return (hashAlgo); -}; - -Key.prototype.createVerify = function (hashAlgo) { - if (hashAlgo === undefined) - hashAlgo = this.defaultHashAlgorithm(); - assert.string(hashAlgo, 'hash algorithm'); - - /* ED25519 is not supported by OpenSSL, use a javascript impl. */ - if (this.type === 'ed25519' && edCompat !== undefined) - return (new edCompat.Verifier(this, hashAlgo)); - if (this.type === 'curve25519') - throw (new Error('Curve25519 keys are not suitable for ' + - 'signing or verification')); - - var v, nm, err; - try { - nm = hashAlgo.toUpperCase(); - v = crypto.createVerify(nm); - } catch (e) { - err = e; - } - if (v === undefined || (err instanceof Error && - err.message.match(/Unknown message digest/))) { - nm = 'RSA-'; - nm += hashAlgo.toUpperCase(); - v = crypto.createVerify(nm); - } - assert.ok(v, 'failed to create verifier'); - var oldVerify = v.verify.bind(v); - var key = this.toBuffer('pkcs8'); - var curve = this.curve; - var self = this; - v.verify = function (signature, fmt) { - if (Signature.isSignature(signature, [2, 0])) { - if (signature.type !== self.type) - return (false); - if (signature.hashAlgorithm && - signature.hashAlgorithm !== hashAlgo) - return (false); - if (signature.curve && self.type === 'ecdsa' && - signature.curve !== curve) - return (false); - return (oldVerify(key, signature.toBuffer('asn1'))); - - } else if (typeof (signature) === 'string' || - Buffer.isBuffer(signature)) { - return (oldVerify(key, signature, fmt)); - - /* - * Avoid doing this on valid arguments, walking the prototype - * chain can be quite slow. - */ - } else if (Signature.isSignature(signature, [1, 0])) { - throw (new Error('signature was created by too old ' + - 'a version of sshpk and cannot be verified')); - - } else { - throw (new TypeError('signature must be a string, ' + - 'Buffer, or Signature object')); - } - }; - return (v); -}; - -Key.prototype.createDiffieHellman = function () { - if (this.type === 'rsa') - throw (new Error('RSA keys do not support Diffie-Hellman')); - - return (new DiffieHellman(this)); -}; -Key.prototype.createDH = Key.prototype.createDiffieHellman; - -Key.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - if (k instanceof PrivateKey) - k = k.toPublic(); - if (!k.comment) - k.comment = options.filename; - return (k); - } catch (e) { - if (e.name === 'KeyEncryptedError') - throw (e); - throw (new KeyParseError(options.filename, format, e)); - } -}; - -Key.isKey = function (obj, ver) { - return (utils.isCompatible(obj, Key, ver)); -}; - -/* - * API versions for Key: - * [1,0] -- initial ver, may take Signature for createVerify or may not - * [1,1] -- added pkcs1, pkcs8 formats - * [1,2] -- added auto, ssh-private, openssh formats - * [1,3] -- added defaultHashAlgorithm - * [1,4] -- added ed support, createDH - * [1,5] -- first explicitly tagged version - * [1,6] -- changed ed25519 part names - * [1,7] -- spki hash types - */ -Key.prototype._sshpkApiVersion = [1, 7]; - -Key._oldVersionDetect = function (obj) { - assert.func(obj.toBuffer); - assert.func(obj.fingerprint); - if (obj.createDH) - return ([1, 4]); - if (obj.defaultHashAlgorithm) - return ([1, 3]); - if (obj.formats['auto']) - return ([1, 2]); - if (obj.formats['pkcs1']) - return ([1, 1]); - return ([1, 0]); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/private-key.js b/test-eol-project/node_modules/sshpk/lib/private-key.js deleted file mode 100644 index 570e0543..00000000 --- a/test-eol-project/node_modules/sshpk/lib/private-key.js +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2017 Joyent, Inc. - -module.exports = PrivateKey; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('./algs'); -var crypto = require('crypto'); -var Fingerprint = require('./fingerprint'); -var Signature = require('./signature'); -var errs = require('./errors'); -var util = require('util'); -var utils = require('./utils'); -var dhe = require('./dhe'); -var generateECDSA = dhe.generateECDSA; -var generateED25519 = dhe.generateED25519; -var edCompat = require('./ed-compat'); -var nacl = require('tweetnacl'); - -var Key = require('./key'); - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var KeyParseError = errs.KeyParseError; -var KeyEncryptedError = errs.KeyEncryptedError; - -var formats = {}; -formats['auto'] = require('./formats/auto'); -formats['pem'] = require('./formats/pem'); -formats['pkcs1'] = require('./formats/pkcs1'); -formats['pkcs8'] = require('./formats/pkcs8'); -formats['rfc4253'] = require('./formats/rfc4253'); -formats['ssh-private'] = require('./formats/ssh-private'); -formats['openssh'] = formats['ssh-private']; -formats['ssh'] = formats['ssh-private']; -formats['dnssec'] = require('./formats/dnssec'); -formats['putty'] = require('./formats/putty'); - -function PrivateKey(opts) { - assert.object(opts, 'options'); - Key.call(this, opts); - - this._pubCache = undefined; -} -util.inherits(PrivateKey, Key); - -PrivateKey.formats = formats; - -PrivateKey.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'pkcs1'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - return (formats[format].write(this, options)); -}; - -PrivateKey.prototype.hash = function (algo, type) { - return (this.toPublic().hash(algo, type)); -}; - -PrivateKey.prototype.fingerprint = function (algo, type) { - return (this.toPublic().fingerprint(algo, type)); -}; - -PrivateKey.prototype.toPublic = function () { - if (this._pubCache) - return (this._pubCache); - - var algInfo = algs.info[this.type]; - var pubParts = []; - for (var i = 0; i < algInfo.parts.length; ++i) { - var p = algInfo.parts[i]; - pubParts.push(this.part[p]); - } - - this._pubCache = new Key({ - type: this.type, - source: this, - parts: pubParts - }); - if (this.comment) - this._pubCache.comment = this.comment; - return (this._pubCache); -}; - -PrivateKey.prototype.derive = function (newType) { - assert.string(newType, 'type'); - var priv, pub, pair; - - if (this.type === 'ed25519' && newType === 'curve25519') { - priv = this.part.k.data; - if (priv[0] === 0x00) - priv = priv.slice(1); - - pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); - pub = Buffer.from(pair.publicKey); - - return (new PrivateKey({ - type: 'curve25519', - parts: [ - { name: 'A', data: utils.mpNormalize(pub) }, - { name: 'k', data: utils.mpNormalize(priv) } - ] - })); - } else if (this.type === 'curve25519' && newType === 'ed25519') { - priv = this.part.k.data; - if (priv[0] === 0x00) - priv = priv.slice(1); - - pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); - pub = Buffer.from(pair.publicKey); - - return (new PrivateKey({ - type: 'ed25519', - parts: [ - { name: 'A', data: utils.mpNormalize(pub) }, - { name: 'k', data: utils.mpNormalize(priv) } - ] - })); - } - throw (new Error('Key derivation not supported from ' + this.type + - ' to ' + newType)); -}; - -PrivateKey.prototype.createVerify = function (hashAlgo) { - return (this.toPublic().createVerify(hashAlgo)); -}; - -PrivateKey.prototype.createSign = function (hashAlgo) { - if (hashAlgo === undefined) - hashAlgo = this.defaultHashAlgorithm(); - assert.string(hashAlgo, 'hash algorithm'); - - /* ED25519 is not supported by OpenSSL, use a javascript impl. */ - if (this.type === 'ed25519' && edCompat !== undefined) - return (new edCompat.Signer(this, hashAlgo)); - if (this.type === 'curve25519') - throw (new Error('Curve25519 keys are not suitable for ' + - 'signing or verification')); - - var v, nm, err; - try { - nm = hashAlgo.toUpperCase(); - v = crypto.createSign(nm); - } catch (e) { - err = e; - } - if (v === undefined || (err instanceof Error && - err.message.match(/Unknown message digest/))) { - nm = 'RSA-'; - nm += hashAlgo.toUpperCase(); - v = crypto.createSign(nm); - } - assert.ok(v, 'failed to create verifier'); - var oldSign = v.sign.bind(v); - var key = this.toBuffer('pkcs1'); - var type = this.type; - var curve = this.curve; - v.sign = function () { - var sig = oldSign(key); - if (typeof (sig) === 'string') - sig = Buffer.from(sig, 'binary'); - sig = Signature.parse(sig, type, 'asn1'); - sig.hashAlgorithm = hashAlgo; - sig.curve = curve; - return (sig); - }; - return (v); -}; - -PrivateKey.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - assert.ok(k instanceof PrivateKey, 'key is not a private key'); - if (!k.comment) - k.comment = options.filename; - return (k); - } catch (e) { - if (e.name === 'KeyEncryptedError') - throw (e); - throw (new KeyParseError(options.filename, format, e)); - } -}; - -PrivateKey.isPrivateKey = function (obj, ver) { - return (utils.isCompatible(obj, PrivateKey, ver)); -}; - -PrivateKey.generate = function (type, options) { - if (options === undefined) - options = {}; - assert.object(options, 'options'); - - switch (type) { - case 'ecdsa': - if (options.curve === undefined) - options.curve = 'nistp256'; - assert.string(options.curve, 'options.curve'); - return (generateECDSA(options.curve)); - case 'ed25519': - return (generateED25519()); - default: - throw (new Error('Key generation not supported with key ' + - 'type "' + type + '"')); - } -}; - -/* - * API versions for PrivateKey: - * [1,0] -- initial ver - * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats - * [1,2] -- added defaultHashAlgorithm - * [1,3] -- added derive, ed, createDH - * [1,4] -- first tagged version - * [1,5] -- changed ed25519 part names and format - * [1,6] -- type arguments for hash() and fingerprint() - */ -PrivateKey.prototype._sshpkApiVersion = [1, 6]; - -PrivateKey._oldVersionDetect = function (obj) { - assert.func(obj.toPublic); - assert.func(obj.createSign); - if (obj.derive) - return ([1, 3]); - if (obj.defaultHashAlgorithm) - return ([1, 2]); - if (obj.formats['auto']) - return ([1, 1]); - return ([1, 0]); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/signature.js b/test-eol-project/node_modules/sshpk/lib/signature.js deleted file mode 100644 index aa8fdbb8..00000000 --- a/test-eol-project/node_modules/sshpk/lib/signature.js +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = Signature; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var algs = require('./algs'); -var crypto = require('crypto'); -var errs = require('./errors'); -var utils = require('./utils'); -var asn1 = require('asn1'); -var SSHBuffer = require('./ssh-buffer'); - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var SignatureParseError = errs.SignatureParseError; - -function Signature(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.parts, 'options.parts'); - assert.string(opts.type, 'options.type'); - - var partLookup = {}; - for (var i = 0; i < opts.parts.length; ++i) { - var part = opts.parts[i]; - partLookup[part.name] = part; - } - - this.type = opts.type; - this.hashAlgorithm = opts.hashAlgo; - this.curve = opts.curve; - this.parts = opts.parts; - this.part = partLookup; -} - -Signature.prototype.toBuffer = function (format) { - if (format === undefined) - format = 'asn1'; - assert.string(format, 'format'); - - var buf; - var stype = 'ssh-' + this.type; - - switch (this.type) { - case 'rsa': - switch (this.hashAlgorithm) { - case 'sha256': - stype = 'rsa-sha2-256'; - break; - case 'sha512': - stype = 'rsa-sha2-512'; - break; - case 'sha1': - case undefined: - break; - default: - throw (new Error('SSH signature ' + - 'format does not support hash ' + - 'algorithm ' + this.hashAlgorithm)); - } - if (format === 'ssh') { - buf = new SSHBuffer({}); - buf.writeString(stype); - buf.writePart(this.part.sig); - return (buf.toBuffer()); - } else { - return (this.part.sig.data); - } - break; - - case 'ed25519': - if (format === 'ssh') { - buf = new SSHBuffer({}); - buf.writeString(stype); - buf.writePart(this.part.sig); - return (buf.toBuffer()); - } else { - return (this.part.sig.data); - } - break; - - case 'dsa': - case 'ecdsa': - var r, s; - if (format === 'asn1') { - var der = new asn1.BerWriter(); - der.startSequence(); - r = utils.mpNormalize(this.part.r.data); - s = utils.mpNormalize(this.part.s.data); - der.writeBuffer(r, asn1.Ber.Integer); - der.writeBuffer(s, asn1.Ber.Integer); - der.endSequence(); - return (der.buffer); - } else if (format === 'ssh' && this.type === 'dsa') { - buf = new SSHBuffer({}); - buf.writeString('ssh-dss'); - r = this.part.r.data; - if (r.length > 20 && r[0] === 0x00) - r = r.slice(1); - s = this.part.s.data; - if (s.length > 20 && s[0] === 0x00) - s = s.slice(1); - if ((this.hashAlgorithm && - this.hashAlgorithm !== 'sha1') || - r.length + s.length !== 40) { - throw (new Error('OpenSSH only supports ' + - 'DSA signatures with SHA1 hash')); - } - buf.writeBuffer(Buffer.concat([r, s])); - return (buf.toBuffer()); - } else if (format === 'ssh' && this.type === 'ecdsa') { - var inner = new SSHBuffer({}); - r = this.part.r.data; - inner.writeBuffer(r); - inner.writePart(this.part.s); - - buf = new SSHBuffer({}); - /* XXX: find a more proper way to do this? */ - var curve; - if (r[0] === 0x00) - r = r.slice(1); - var sz = r.length * 8; - if (sz === 256) - curve = 'nistp256'; - else if (sz === 384) - curve = 'nistp384'; - else if (sz === 528) - curve = 'nistp521'; - buf.writeString('ecdsa-sha2-' + curve); - buf.writeBuffer(inner.toBuffer()); - return (buf.toBuffer()); - } - throw (new Error('Invalid signature format')); - default: - throw (new Error('Invalid signature data')); - } -}; - -Signature.prototype.toString = function (format) { - assert.optionalString(format, 'format'); - return (this.toBuffer(format).toString('base64')); -}; - -Signature.parse = function (data, type, format) { - if (typeof (data) === 'string') - data = Buffer.from(data, 'base64'); - assert.buffer(data, 'data'); - assert.string(format, 'format'); - assert.string(type, 'type'); - - var opts = {}; - opts.type = type.toLowerCase(); - opts.parts = []; - - try { - assert.ok(data.length > 0, 'signature must not be empty'); - switch (opts.type) { - case 'rsa': - return (parseOneNum(data, type, format, opts)); - case 'ed25519': - return (parseOneNum(data, type, format, opts)); - - case 'dsa': - case 'ecdsa': - if (format === 'asn1') - return (parseDSAasn1(data, type, format, opts)); - else if (opts.type === 'dsa') - return (parseDSA(data, type, format, opts)); - else - return (parseECDSA(data, type, format, opts)); - - default: - throw (new InvalidAlgorithmError(type)); - } - - } catch (e) { - if (e instanceof InvalidAlgorithmError) - throw (e); - throw (new SignatureParseError(type, format, e)); - } -}; - -function parseOneNum(data, type, format, opts) { - if (format === 'ssh') { - try { - var buf = new SSHBuffer({buffer: data}); - var head = buf.readString(); - } catch (e) { - /* fall through */ - } - if (buf !== undefined) { - var msg = 'SSH signature does not match expected ' + - 'type (expected ' + type + ', got ' + head + ')'; - switch (head) { - case 'ssh-rsa': - assert.strictEqual(type, 'rsa', msg); - opts.hashAlgo = 'sha1'; - break; - case 'rsa-sha2-256': - assert.strictEqual(type, 'rsa', msg); - opts.hashAlgo = 'sha256'; - break; - case 'rsa-sha2-512': - assert.strictEqual(type, 'rsa', msg); - opts.hashAlgo = 'sha512'; - break; - case 'ssh-ed25519': - assert.strictEqual(type, 'ed25519', msg); - opts.hashAlgo = 'sha512'; - break; - default: - throw (new Error('Unknown SSH signature ' + - 'type: ' + head)); - } - var sig = buf.readPart(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - sig.name = 'sig'; - opts.parts.push(sig); - return (new Signature(opts)); - } - } - opts.parts.push({name: 'sig', data: data}); - return (new Signature(opts)); -} - -function parseDSAasn1(data, type, format, opts) { - var der = new asn1.BerReader(data); - der.readSequence(); - var r = der.readString(asn1.Ber.Integer, true); - var s = der.readString(asn1.Ber.Integer, true); - - opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); - opts.parts.push({name: 's', data: utils.mpNormalize(s)}); - - return (new Signature(opts)); -} - -function parseDSA(data, type, format, opts) { - if (data.length != 40) { - var buf = new SSHBuffer({buffer: data}); - var d = buf.readBuffer(); - if (d.toString('ascii') === 'ssh-dss') - d = buf.readBuffer(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - assert.strictEqual(d.length, 40, 'invalid inner length'); - data = d; - } - opts.parts.push({name: 'r', data: data.slice(0, 20)}); - opts.parts.push({name: 's', data: data.slice(20, 40)}); - return (new Signature(opts)); -} - -function parseECDSA(data, type, format, opts) { - var buf = new SSHBuffer({buffer: data}); - - var r, s; - var inner = buf.readBuffer(); - var stype = inner.toString('ascii'); - if (stype.slice(0, 6) === 'ecdsa-') { - var parts = stype.split('-'); - assert.strictEqual(parts[0], 'ecdsa'); - assert.strictEqual(parts[1], 'sha2'); - opts.curve = parts[2]; - switch (opts.curve) { - case 'nistp256': - opts.hashAlgo = 'sha256'; - break; - case 'nistp384': - opts.hashAlgo = 'sha384'; - break; - case 'nistp521': - opts.hashAlgo = 'sha512'; - break; - default: - throw (new Error('Unsupported ECDSA curve: ' + - opts.curve)); - } - inner = buf.readBuffer(); - assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); - buf = new SSHBuffer({buffer: inner}); - r = buf.readPart(); - } else { - r = {data: inner}; - } - - s = buf.readPart(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - - r.name = 'r'; - s.name = 's'; - - opts.parts.push(r); - opts.parts.push(s); - return (new Signature(opts)); -} - -Signature.isSignature = function (obj, ver) { - return (utils.isCompatible(obj, Signature, ver)); -}; - -/* - * API versions for Signature: - * [1,0] -- initial ver - * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent - * hashAlgorithm property - * [2,1] -- first tagged version - */ -Signature.prototype._sshpkApiVersion = [2, 1]; - -Signature._oldVersionDetect = function (obj) { - assert.func(obj.toBuffer); - if (obj.hasOwnProperty('hashAlgorithm')) - return ([2, 0]); - return ([1, 0]); -}; diff --git a/test-eol-project/node_modules/sshpk/lib/ssh-buffer.js b/test-eol-project/node_modules/sshpk/lib/ssh-buffer.js deleted file mode 100644 index 1dd286c8..00000000 --- a/test-eol-project/node_modules/sshpk/lib/ssh-buffer.js +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = SSHBuffer; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; - -function SSHBuffer(opts) { - assert.object(opts, 'options'); - if (opts.buffer !== undefined) - assert.buffer(opts.buffer, 'options.buffer'); - - this._size = opts.buffer ? opts.buffer.length : 1024; - this._buffer = opts.buffer || Buffer.alloc(this._size); - this._offset = 0; -} - -SSHBuffer.prototype.toBuffer = function () { - return (this._buffer.slice(0, this._offset)); -}; - -SSHBuffer.prototype.atEnd = function () { - return (this._offset >= this._buffer.length); -}; - -SSHBuffer.prototype.remainder = function () { - return (this._buffer.slice(this._offset)); -}; - -SSHBuffer.prototype.skip = function (n) { - this._offset += n; -}; - -SSHBuffer.prototype.expand = function () { - this._size *= 2; - var buf = Buffer.alloc(this._size); - this._buffer.copy(buf, 0); - this._buffer = buf; -}; - -SSHBuffer.prototype.readPart = function () { - return ({data: this.readBuffer()}); -}; - -SSHBuffer.prototype.readBuffer = function () { - var len = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - assert.ok(this._offset + len <= this._buffer.length, - 'length out of bounds at +0x' + this._offset.toString(16) + - ' (data truncated?)'); - var buf = this._buffer.slice(this._offset, this._offset + len); - this._offset += len; - return (buf); -}; - -SSHBuffer.prototype.readString = function () { - return (this.readBuffer().toString()); -}; - -SSHBuffer.prototype.readCString = function () { - var offset = this._offset; - while (offset < this._buffer.length && - this._buffer[offset] !== 0x00) - offset++; - assert.ok(offset < this._buffer.length, 'c string does not terminate'); - var str = this._buffer.slice(this._offset, offset).toString(); - this._offset = offset + 1; - return (str); -}; - -SSHBuffer.prototype.readInt = function () { - var v = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - return (v); -}; - -SSHBuffer.prototype.readInt64 = function () { - assert.ok(this._offset + 8 < this._buffer.length, - 'buffer not long enough to read Int64'); - var v = this._buffer.slice(this._offset, this._offset + 8); - this._offset += 8; - return (v); -}; - -SSHBuffer.prototype.readChar = function () { - var v = this._buffer[this._offset++]; - return (v); -}; - -SSHBuffer.prototype.writeBuffer = function (buf) { - while (this._offset + 4 + buf.length > this._size) - this.expand(); - this._buffer.writeUInt32BE(buf.length, this._offset); - this._offset += 4; - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; - -SSHBuffer.prototype.writeString = function (str) { - this.writeBuffer(Buffer.from(str, 'utf8')); -}; - -SSHBuffer.prototype.writeCString = function (str) { - while (this._offset + 1 + str.length > this._size) - this.expand(); - this._buffer.write(str, this._offset); - this._offset += str.length; - this._buffer[this._offset++] = 0; -}; - -SSHBuffer.prototype.writeInt = function (v) { - while (this._offset + 4 > this._size) - this.expand(); - this._buffer.writeUInt32BE(v, this._offset); - this._offset += 4; -}; - -SSHBuffer.prototype.writeInt64 = function (v) { - assert.buffer(v, 'value'); - if (v.length > 8) { - var lead = v.slice(0, v.length - 8); - for (var i = 0; i < lead.length; ++i) { - assert.strictEqual(lead[i], 0, - 'must fit in 64 bits of precision'); - } - v = v.slice(v.length - 8, v.length); - } - while (this._offset + 8 > this._size) - this.expand(); - v.copy(this._buffer, this._offset); - this._offset += 8; -}; - -SSHBuffer.prototype.writeChar = function (v) { - while (this._offset + 1 > this._size) - this.expand(); - this._buffer[this._offset++] = v; -}; - -SSHBuffer.prototype.writePart = function (p) { - this.writeBuffer(p.data); -}; - -SSHBuffer.prototype.write = function (buf) { - while (this._offset + buf.length > this._size) - this.expand(); - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; diff --git a/test-eol-project/node_modules/sshpk/lib/utils.js b/test-eol-project/node_modules/sshpk/lib/utils.js deleted file mode 100644 index 6b83a322..00000000 --- a/test-eol-project/node_modules/sshpk/lib/utils.js +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright 2015 Joyent, Inc. - -module.exports = { - bufferSplit: bufferSplit, - addRSAMissing: addRSAMissing, - calculateDSAPublic: calculateDSAPublic, - calculateED25519Public: calculateED25519Public, - calculateX25519Public: calculateX25519Public, - mpNormalize: mpNormalize, - mpDenormalize: mpDenormalize, - ecNormalize: ecNormalize, - countZeros: countZeros, - assertCompatible: assertCompatible, - isCompatible: isCompatible, - opensslKeyDeriv: opensslKeyDeriv, - opensshCipherInfo: opensshCipherInfo, - publicFromPrivateECDSA: publicFromPrivateECDSA, - zeroPadToLength: zeroPadToLength, - writeBitString: writeBitString, - readBitString: readBitString, - pbkdf2: pbkdf2 -}; - -var assert = require('assert-plus'); -var Buffer = require('safer-buffer').Buffer; -var PrivateKey = require('./private-key'); -var Key = require('./key'); -var crypto = require('crypto'); -var algs = require('./algs'); -var asn1 = require('asn1'); - -var ec = require('ecc-jsbn/lib/ec'); -var jsbn = require('jsbn').BigInteger; -var nacl = require('tweetnacl'); - -var MAX_CLASS_DEPTH = 3; - -function isCompatible(obj, klass, needVer) { - if (obj === null || typeof (obj) !== 'object') - return (false); - if (needVer === undefined) - needVer = klass.prototype._sshpkApiVersion; - if (obj instanceof klass && - klass.prototype._sshpkApiVersion[0] == needVer[0]) - return (true); - var proto = Object.getPrototypeOf(obj); - var depth = 0; - while (proto.constructor.name !== klass.name) { - proto = Object.getPrototypeOf(proto); - if (!proto || ++depth > MAX_CLASS_DEPTH) - return (false); - } - if (proto.constructor.name !== klass.name) - return (false); - var ver = proto._sshpkApiVersion; - if (ver === undefined) - ver = klass._oldVersionDetect(obj); - if (ver[0] != needVer[0] || ver[1] < needVer[1]) - return (false); - return (true); -} - -function assertCompatible(obj, klass, needVer, name) { - if (name === undefined) - name = 'object'; - assert.ok(obj, name + ' must not be null'); - assert.object(obj, name + ' must be an object'); - if (needVer === undefined) - needVer = klass.prototype._sshpkApiVersion; - if (obj instanceof klass && - klass.prototype._sshpkApiVersion[0] == needVer[0]) - return; - var proto = Object.getPrototypeOf(obj); - var depth = 0; - while (proto.constructor.name !== klass.name) { - proto = Object.getPrototypeOf(proto); - assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, - name + ' must be a ' + klass.name + ' instance'); - } - assert.strictEqual(proto.constructor.name, klass.name, - name + ' must be a ' + klass.name + ' instance'); - var ver = proto._sshpkApiVersion; - if (ver === undefined) - ver = klass._oldVersionDetect(obj); - assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], - name + ' must be compatible with ' + klass.name + ' klass ' + - 'version ' + needVer[0] + '.' + needVer[1]); -} - -var CIPHER_LEN = { - 'des-ede3-cbc': { key: 24, iv: 8 }, - 'aes-128-cbc': { key: 16, iv: 16 }, - 'aes-256-cbc': { key: 32, iv: 16 } -}; -var PKCS5_SALT_LEN = 8; - -function opensslKeyDeriv(cipher, salt, passphrase, count) { - assert.buffer(salt, 'salt'); - assert.buffer(passphrase, 'passphrase'); - assert.number(count, 'iteration count'); - - var clen = CIPHER_LEN[cipher]; - assert.object(clen, 'supported cipher'); - - salt = salt.slice(0, PKCS5_SALT_LEN); - - var D, D_prev, bufs; - var material = Buffer.alloc(0); - while (material.length < clen.key + clen.iv) { - bufs = []; - if (D_prev) - bufs.push(D_prev); - bufs.push(passphrase); - bufs.push(salt); - D = Buffer.concat(bufs); - for (var j = 0; j < count; ++j) - D = crypto.createHash('md5').update(D).digest(); - material = Buffer.concat([material, D]); - D_prev = D; - } - - return ({ - key: material.slice(0, clen.key), - iv: material.slice(clen.key, clen.key + clen.iv) - }); -} - -/* See: RFC2898 */ -function pbkdf2(hashAlg, salt, iterations, size, passphrase) { - var hkey = Buffer.alloc(salt.length + 4); - salt.copy(hkey); - - var gen = 0, ts = []; - var i = 1; - while (gen < size) { - var t = T(i++); - gen += t.length; - ts.push(t); - } - return (Buffer.concat(ts).slice(0, size)); - - function T(I) { - hkey.writeUInt32BE(I, hkey.length - 4); - - var hmac = crypto.createHmac(hashAlg, passphrase); - hmac.update(hkey); - - var Ti = hmac.digest(); - var Uc = Ti; - var c = 1; - while (c++ < iterations) { - hmac = crypto.createHmac(hashAlg, passphrase); - hmac.update(Uc); - Uc = hmac.digest(); - for (var x = 0; x < Ti.length; ++x) - Ti[x] ^= Uc[x]; - } - return (Ti); - } -} - -/* Count leading zero bits on a buffer */ -function countZeros(buf) { - var o = 0, obit = 8; - while (o < buf.length) { - var mask = (1 << obit); - if ((buf[o] & mask) === mask) - break; - obit--; - if (obit < 0) { - o++; - obit = 8; - } - } - return (o*8 + (8 - obit) - 1); -} - -function bufferSplit(buf, chr) { - assert.buffer(buf); - assert.string(chr); - - var parts = []; - var lastPart = 0; - var matches = 0; - for (var i = 0; i < buf.length; ++i) { - if (buf[i] === chr.charCodeAt(matches)) - ++matches; - else if (buf[i] === chr.charCodeAt(0)) - matches = 1; - else - matches = 0; - - if (matches >= chr.length) { - var newPart = i + 1; - parts.push(buf.slice(lastPart, newPart - matches)); - lastPart = newPart; - matches = 0; - } - } - if (lastPart <= buf.length) - parts.push(buf.slice(lastPart, buf.length)); - - return (parts); -} - -function ecNormalize(buf, addZero) { - assert.buffer(buf); - if (buf[0] === 0x00 && buf[1] === 0x04) { - if (addZero) - return (buf); - return (buf.slice(1)); - } else if (buf[0] === 0x04) { - if (!addZero) - return (buf); - } else { - while (buf[0] === 0x00) - buf = buf.slice(1); - if (buf[0] === 0x02 || buf[0] === 0x03) - throw (new Error('Compressed elliptic curve points ' + - 'are not supported')); - if (buf[0] !== 0x04) - throw (new Error('Not a valid elliptic curve point')); - if (!addZero) - return (buf); - } - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x0; - buf.copy(b, 1); - return (b); -} - -function readBitString(der, tag) { - if (tag === undefined) - tag = asn1.Ber.BitString; - var buf = der.readString(tag, true); - assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + - 'not supported (0x' + buf[0].toString(16) + ')'); - return (buf.slice(1)); -} - -function writeBitString(der, buf, tag) { - if (tag === undefined) - tag = asn1.Ber.BitString; - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - der.writeBuffer(b, tag); -} - -function mpNormalize(buf) { - assert.buffer(buf); - while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) - buf = buf.slice(1); - if ((buf[0] & 0x80) === 0x80) { - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - buf = b; - } - return (buf); -} - -function mpDenormalize(buf) { - assert.buffer(buf); - while (buf.length > 1 && buf[0] === 0x00) - buf = buf.slice(1); - return (buf); -} - -function zeroPadToLength(buf, len) { - assert.buffer(buf); - assert.number(len); - while (buf.length > len) { - assert.equal(buf[0], 0x00); - buf = buf.slice(1); - } - while (buf.length < len) { - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - buf = b; - } - return (buf); -} - -function bigintToMpBuf(bigint) { - var buf = Buffer.from(bigint.toByteArray()); - buf = mpNormalize(buf); - return (buf); -} - -function calculateDSAPublic(g, p, x) { - assert.buffer(g); - assert.buffer(p); - assert.buffer(x); - g = new jsbn(g); - p = new jsbn(p); - x = new jsbn(x); - var y = g.modPow(x, p); - var ybuf = bigintToMpBuf(y); - return (ybuf); -} - -function calculateED25519Public(k) { - assert.buffer(k); - - var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); - return (Buffer.from(kp.publicKey)); -} - -function calculateX25519Public(k) { - assert.buffer(k); - - var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); - return (Buffer.from(kp.publicKey)); -} - -function addRSAMissing(key) { - assert.object(key); - assertCompatible(key, PrivateKey, [1, 1]); - - var d = new jsbn(key.part.d.data); - var buf; - - if (!key.part.dmodp) { - var p = new jsbn(key.part.p.data); - var dmodp = d.mod(p.subtract(1)); - - buf = bigintToMpBuf(dmodp); - key.part.dmodp = {name: 'dmodp', data: buf}; - key.parts.push(key.part.dmodp); - } - if (!key.part.dmodq) { - var q = new jsbn(key.part.q.data); - var dmodq = d.mod(q.subtract(1)); - - buf = bigintToMpBuf(dmodq); - key.part.dmodq = {name: 'dmodq', data: buf}; - key.parts.push(key.part.dmodq); - } -} - -function publicFromPrivateECDSA(curveName, priv) { - assert.string(curveName, 'curveName'); - assert.buffer(priv); - var params = algs.curves[curveName]; - var p = new jsbn(params.p); - var a = new jsbn(params.a); - var b = new jsbn(params.b); - var curve = new ec.ECCurveFp(p, a, b); - var G = curve.decodePointHex(params.G.toString('hex')); - - var d = new jsbn(mpNormalize(priv)); - var pub = G.multiply(d); - pub = Buffer.from(curve.encodePointHex(pub), 'hex'); - - var parts = []; - parts.push({name: 'curve', data: Buffer.from(curveName)}); - parts.push({name: 'Q', data: pub}); - - var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); - return (key); -} - -function opensshCipherInfo(cipher) { - var inf = {}; - switch (cipher) { - case '3des-cbc': - inf.keySize = 24; - inf.blockSize = 8; - inf.opensslName = 'des-ede3-cbc'; - break; - case 'blowfish-cbc': - inf.keySize = 16; - inf.blockSize = 8; - inf.opensslName = 'bf-cbc'; - break; - case 'aes128-cbc': - case 'aes128-ctr': - case 'aes128-gcm@openssh.com': - inf.keySize = 16; - inf.blockSize = 16; - inf.opensslName = 'aes-128-' + cipher.slice(7, 10); - break; - case 'aes192-cbc': - case 'aes192-ctr': - case 'aes192-gcm@openssh.com': - inf.keySize = 24; - inf.blockSize = 16; - inf.opensslName = 'aes-192-' + cipher.slice(7, 10); - break; - case 'aes256-cbc': - case 'aes256-ctr': - case 'aes256-gcm@openssh.com': - inf.keySize = 32; - inf.blockSize = 16; - inf.opensslName = 'aes-256-' + cipher.slice(7, 10); - break; - default: - throw (new Error( - 'Unsupported openssl cipher "' + cipher + '"')); - } - return (inf); -} diff --git a/test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 b/test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 deleted file mode 100644 index 0887dce2..00000000 --- a/test-eol-project/node_modules/sshpk/man/man1/sshpk-conv.1 +++ /dev/null @@ -1,135 +0,0 @@ -.TH sshpk\-conv 1 "Jan 2016" sshpk "sshpk Commands" -.SH NAME -.PP -sshpk\-conv \- convert between key formats -.SH SYNOPSYS -.PP -\fB\fCsshpk\-conv\fR \-t FORMAT [FILENAME] [OPTIONS...] -.PP -\fB\fCsshpk\-conv\fR \-i [FILENAME] [OPTIONS...] -.SH DESCRIPTION -.PP -Reads in a public or private key and converts it between different formats, -particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7 -formats. -.PP -In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to -stderr information about its nature, size and fingerprint. -.SH EXAMPLES -.PP -Assume the following SSH\-format public key in \fB\fCid_ecdsa.pub\fR: -.PP -.RS -.nf -ecdsa\-sha2\-nistp256 AAAAE2VjZHNhLXNoYTI...9M/4c4= user@host -.fi -.RE -.PP -Identify it with \fB\fC\-i\fR: -.PP -.RS -.nf -$ sshpk\-conv \-i id_ecdsa.pub -id_ecdsa: a 256 bit ECDSA public key -ECDSA curve: nistp256 -Comment: user@host -Fingerprint: - SHA256:vCNX7eUkdvqqW0m4PoxQAZRv+CM4P4fS8+CbliAvS4k - 81:ad:d5:57:e5:6f:7d:a2:93:79:56:af:d7:c0:38:51 -.fi -.RE -.PP -Convert it to \fB\fCpkcs8\fR format, for use with e.g. OpenSSL: -.PP -.RS -.nf -$ sshpk\-conv \-t pkcs8 id_ecdsa -\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsA4R6N6AS3gzaPBeLjG2ObSgUsR -zOt+kWJoijLnw3ZMYUKmAx+lD0I5XUxdrPcs1vH5f3cn9TvRvO9L0z/hzg== -\-\-\-\-\-END PUBLIC KEY\-\-\-\-\- -.fi -.RE -.PP -Retrieve the public half of a private key: -.PP -.RS -.nf -$ openssl genrsa 2048 | sshpk\-conv \-t ssh \-c foo@bar -ssh\-rsa AAAAB3NzaC1yc2EAAA...koK7 foo@bar -.fi -.RE -.PP -Convert a private key to PKCS#1 (OpenSSL) format from a new\-style OpenSSH key -format (the \fB\fCssh\-keygen \-o\fR format): -.PP -.RS -.nf -$ ssh\-keygen \-o \-f foobar -\&... -$ sshpk\-conv \-p \-t pkcs1 foobar -\-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\- -MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL.... -\-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\- -.fi -.RE -.SH OPTIONS -.TP -\fB\fC\-i, \-\-identify\fR -Instead of converting the key, output identifying information about it to -stderr, including its type, size and fingerprints. -.TP -\fB\fC\-p, \-\-private\fR -Treat the key as a private key instead of a public key (the default). If you -supply \fB\fCsshpk\-conv\fR with a private key and do not give this option, it will -extract only the public half of the key from it and work with that. -.TP -\fB\fC\-f PATH, \-\-file=PATH\fR -Input file to take the key from instead of stdin. If a filename is supplied -as a positional argument, it is equivalent to using this option. -.TP -\fB\fC\-o PATH, \-\-out=PATH\fR -Output file name to use instead of stdout. -.PP -\fB\fC\-T FORMAT, \-\-informat=FORMAT\fR -.TP -\fB\fC\-t FORMAT, \-\-outformat=FORMAT\fR -Selects the input and output formats to be used (see FORMATS, below). -.TP -\fB\fC\-c TEXT, \-\-comment=TEXT\fR -Sets the key comment for the output file, if supported. -.SH FORMATS -.PP -Currently supported formats: -.TP -\fB\fCpem, pkcs1\fR -The standard PEM format used by older OpenSSH and most TLS libraries such as -OpenSSL. The classic \fB\fCid_rsa\fR file is usually in this format. It is an ASN.1 -encoded structure, base64\-encoded and placed between PEM headers. -.TP -\fB\fCssh\fR -The SSH public key text format (the format of an \fB\fCid_rsa.pub\fR file). A single -line, containing 3 space separated parts: the key type, key body and optional -key comment. -.TP -\fB\fCpkcs8\fR -A newer PEM format, usually used only for public keys by TLS libraries such -as OpenSSL. The ASN.1 structure is more generic than that of \fB\fCpkcs1\fR\&. -.TP -\fB\fCopenssh\fR -The new \fB\fCssh\-keygen \-o\fR format from OpenSSH. This can be mistaken for a PEM -encoding but is actually an OpenSSH internal format. -.TP -\fB\fCrfc4253\fR -The internal binary format of keys when sent over the wire in the SSH -protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol. -.SH SEE ALSO -.PP -.BR ssh-keygen (1), -.BR openssl (1) -.SH BUGS -.PP -Encrypted (password\-protected) keys are not supported. -.PP -Report bugs at Github -\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 b/test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 deleted file mode 100644 index 749916ba..00000000 --- a/test-eol-project/node_modules/sshpk/man/man1/sshpk-sign.1 +++ /dev/null @@ -1,81 +0,0 @@ -.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands" -.SH NAME -.PP -sshpk\-sign \- sign data using an SSH key -.SH SYNOPSYS -.PP -\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...] -.SH DESCRIPTION -.PP -Takes in arbitrary bytes, and signs them using an SSH private key. The key can -be of any type or format supported by the \fB\fCsshpk\fR library, including the -standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8. -.PP -The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR -option is given. -.SH EXAMPLES -.PP -Signing with default settings: -.PP -.RS -.nf -$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa -MEUCIAMdLS/vXrrtWFepwe... -.fi -.RE -.PP -Signing in SSH (RFC 4253) format (rather than the default ASN.1): -.PP -.RS -.nf -$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh -AAAAFGVjZHNhLXNoYTIt... -.fi -.RE -.PP -Saving the binary signature to a file: -.PP -.RS -.nf -$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\ - \-o signature.bin \-b -$ cat signature.bin | base64 -MEUCIAMdLS/vXrrtWFepwe... -.fi -.RE -.SH OPTIONS -.TP -\fB\fC\-v, \-\-verbose\fR -Print extra information about the key and signature to stderr when signing. -.TP -\fB\fC\-b, \-\-binary\fR -Don't base64\-encode the signature before outputting it. -.TP -\fB\fC\-i KEY, \-\-identity=KEY\fR -Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute -filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library -is supported, including OpenSSH formats and standard PEM PKCS. -.TP -\fB\fC\-f PATH, \-\-file=PATH\fR -Input file to sign instead of stdin. -.TP -\fB\fC\-o PATH, \-\-out=PATH\fR -Output file to save signature in instead of stdout. -.TP -\fB\fC\-H HASH, \-\-hash=HASH\fR -Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, -\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash -algorithms may be used (e.g. ED25519 keys can only use SHA\-512). -.TP -\fB\fC\-t FORMAT, \-\-format=FORMAT\fR -Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for -ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format -used with TLS and typically the standard in most non\-SSH libraries (e.g. -OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. -.SH SEE ALSO -.PP -.BR sshpk-verify (1) -.SH BUGS -.PP -Report bugs at Github -\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 b/test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 deleted file mode 100644 index f79169d2..00000000 --- a/test-eol-project/node_modules/sshpk/man/man1/sshpk-verify.1 +++ /dev/null @@ -1,68 +0,0 @@ -.TH sshpk\-verify 1 "Jan 2016" sshpk "sshpk Commands" -.SH NAME -.PP -sshpk\-verify \- verify a signature on data using an SSH key -.SH SYNOPSYS -.PP -\fB\fCsshpk\-verify\fR \-i KEYPATH \-s SIGNATURE [OPTION...] -.SH DESCRIPTION -.PP -Takes in arbitrary bytes and a Base64\-encoded signature, and verifies that the -signature was produced by the private half of the given SSH public key. -.SH EXAMPLES -.PP -.RS -.nf -$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s MEUCIQCYp... -OK -$ printf 'foo' | sshpk\-verify \-i ~/.ssh/id_ecdsa \-s GARBAGE... -NOT OK -.fi -.RE -.SH EXIT STATUS -.TP -\fB\fC0\fR -Signature validates and matches the key. -.TP -\fB\fC1\fR -Signature is parseable and the correct length but does not match the key or -otherwise is invalid. -.TP -\fB\fC2\fR -The signature or key could not be parsed. -.TP -\fB\fC3\fR -Invalid commandline options were supplied. -.SH OPTIONS -.TP -\fB\fC\-v, \-\-verbose\fR -Print extra information about the key and signature to stderr when verifying. -.TP -\fB\fC\-i KEY, \-\-identity=KEY\fR -Select the key to be used for verification. \fB\fCKEY\fR must be a relative or -absolute filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR -library is supported, including OpenSSH formats and standard PEM PKCS. -.TP -\fB\fC\-s BASE64, \-\-signature=BASE64\fR -Supplies the base64\-encoded signature to be verified. -.TP -\fB\fC\-f PATH, \-\-file=PATH\fR -Input file to verify instead of stdin. -.TP -\fB\fC\-H HASH, \-\-hash=HASH\fR -Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR, -\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash -algorithms may be used (e.g. ED25519 keys can only use SHA\-512). -.TP -\fB\fC\-t FORMAT, \-\-format=FORMAT\fR -Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for -ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format -used with TLS and typically the standard in most non\-SSH libraries (e.g. -OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent. -.SH SEE ALSO -.PP -.BR sshpk-sign (1) -.SH BUGS -.PP -Report bugs at Github -\[la]https://github.com/arekinath/node-sshpk/issues\[ra] diff --git a/test-eol-project/node_modules/sshpk/package.json b/test-eol-project/node_modules/sshpk/package.json deleted file mode 100644 index 144ec160..00000000 --- a/test-eol-project/node_modules/sshpk/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "sshpk", - "version": "1.18.0", - "description": "A library for finding and using SSH public keys", - "main": "lib/index.js", - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/joyent/node-sshpk.git" - }, - "author": "Joyent, Inc", - "contributors": [ - { - "name": "Dave Eddy", - "email": "dave@daveeddy.com" - }, - { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - { - "name": "Alex Wilson", - "email": "alex@cooperi.net" - } - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/arekinath/node-sshpk/issues" - }, - "engines": { - "node": ">=0.10.0" - }, - "directories": { - "bin": "./bin", - "lib": "./lib", - "man": "./man/man1" - }, - "homepage": "https://github.com/arekinath/node-sshpk#readme", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "dashdash": "^1.12.0", - "getpass": "^0.1.1", - "safer-buffer": "^2.0.2", - "jsbn": "~0.1.0", - "tweetnacl": "~0.14.0", - "ecc-jsbn": "~0.1.1", - "bcrypt-pbkdf": "^1.0.0" - }, - "optionalDependencies": {}, - "devDependencies": { - "tape": "^3.5.0", - "benchmark": "^1.0.0", - "sinon": "^1.17.2", - "temp": "^0.8.2" - } -} diff --git a/test-eol-project/node_modules/string-width/index.d.ts b/test-eol-project/node_modules/string-width/index.d.ts deleted file mode 100644 index 12b53097..00000000 --- a/test-eol-project/node_modules/string-width/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -declare const stringWidth: { - /** - Get the visual width of a string - the number of columns required to display it. - - Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - - @example - ``` - import stringWidth = require('string-width'); - - stringWidth('a'); - //=> 1 - - stringWidth('古'); - //=> 2 - - stringWidth('\u001B[1m古\u001B[22m'); - //=> 2 - ``` - */ - (string: string): number; - - // TODO: remove this in the next major version, refactor the whole definition to: - // declare function stringWidth(string: string): number; - // export = stringWidth; - default: typeof stringWidth; -} - -export = stringWidth; diff --git a/test-eol-project/node_modules/string-width/index.js b/test-eol-project/node_modules/string-width/index.js deleted file mode 100644 index f4d261a9..00000000 --- a/test-eol-project/node_modules/string-width/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex'); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports.default = stringWidth; diff --git a/test-eol-project/node_modules/string-width/license b/test-eol-project/node_modules/string-width/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts deleted file mode 100644 index 2dbf6af2..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace ansiRegex { - interface Options { - /** - Match only the first ANSI escape. - - @default false - */ - onlyFirst: boolean; - } -} - -/** -Regular expression for matching ANSI escape codes. - -@example -``` -import ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` -*/ -declare function ansiRegex(options?: ansiRegex.Options): RegExp; - -export = ansiRegex; diff --git a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff837..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/license b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f5311..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md b/test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md deleted file mode 100644 index 4d848bc3..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# ansi-regex - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex(options?) - -Returns a regex for matching ANSI escape codes. - -#### options - -Type: `object` - -##### onlyFirst - -Type: `boolean`
    -Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 907fccc2..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -declare function stripAnsi(string: string): string; - -export = stripAnsi; diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593dfc..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/license b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108d..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md b/test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md deleted file mode 100644 index 7c4b56d4..00000000 --- a/test-eol-project/node_modules/string-width/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## strip-ansi for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - diff --git a/test-eol-project/node_modules/string-width/package.json b/test-eol-project/node_modules/string-width/package.json deleted file mode 100644 index 28ba7b4c..00000000 --- a/test-eol-project/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "4.2.3", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/test-eol-project/node_modules/string-width/readme.md b/test-eol-project/node_modules/string-width/readme.md deleted file mode 100644 index bdd31412..00000000 --- a/test-eol-project/node_modules/string-width/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# string-width - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -Useful to be able to measure the actual width of command-line output. - - -## Install - -``` -$ npm install string-width -``` - - -## Usage - -```js -const stringWidth = require('string-width'); - -stringWidth('a'); -//=> 1 - -stringWidth('古'); -//=> 2 - -stringWidth('\u001B[1m古\u001B[22m'); -//=> 2 -``` - - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string -- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string - - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/test-eol-project/node_modules/string_decoder/.travis.yml b/test-eol-project/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725..00000000 --- a/test-eol-project/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/test-eol-project/node_modules/string_decoder/LICENSE b/test-eol-project/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20..00000000 --- a/test-eol-project/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. 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. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. 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/test-eol-project/node_modules/string_decoder/README.md b/test-eol-project/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315..00000000 --- a/test-eol-project/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/test-eol-project/node_modules/string_decoder/lib/string_decoder.js b/test-eol-project/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f..00000000 --- a/test-eol-project/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/test-eol-project/node_modules/string_decoder/package.json b/test-eol-project/node_modules/string_decoder/package.json deleted file mode 100644 index 518c3eb9..00000000 --- a/test-eol-project/node_modules/string_decoder/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "string_decoder", - "version": "1.1.1", - "description": "The string_decoder module from Node core", - "main": "lib/string_decoder.js", - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/parallel/*.js && node test/verify-dependencies", - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT" -} diff --git a/test-eol-project/node_modules/strip-ansi/index.js b/test-eol-project/node_modules/strip-ansi/index.js deleted file mode 100644 index 099480fb..00000000 --- a/test-eol-project/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -var ansiRegex = require('ansi-regex')(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; diff --git a/test-eol-project/node_modules/strip-ansi/license b/test-eol-project/node_modules/strip-ansi/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/strip-ansi/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/strip-ansi/package.json b/test-eol-project/node_modules/strip-ansi/package.json deleted file mode 100644 index 301685ba..00000000 --- a/test-eol-project/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "strip-ansi", - "version": "3.0.1", - "description": "Strip ANSI escape codes", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Boy Nicolai Appelman (jbna.nl)", - "JD Ballard (github.com/qix-)" - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/test-eol-project/node_modules/strip-ansi/readme.md b/test-eol-project/node_modules/strip-ansi/readme.md deleted file mode 100644 index cb7d9ff7..00000000 --- a/test-eol-project/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install --save strip-ansi -``` - - -## Usage - -```js -var stripAnsi = require('strip-ansi'); - -stripAnsi('\u001b[4mcake\u001b[0m'); -//=> 'cake' -``` - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/supports-color/index.js b/test-eol-project/node_modules/supports-color/index.js deleted file mode 100644 index 4346e272..00000000 --- a/test-eol-project/node_modules/supports-color/index.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; -var argv = process.argv; - -var terminator = argv.indexOf('--'); -var hasFlag = function (flag) { - flag = '--' + flag; - var pos = argv.indexOf(flag); - return pos !== -1 && (terminator !== -1 ? pos < terminator : true); -}; - -module.exports = (function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - return false; - } - - if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -})(); diff --git a/test-eol-project/node_modules/supports-color/license b/test-eol-project/node_modules/supports-color/license deleted file mode 100644 index 654d0bfe..00000000 --- a/test-eol-project/node_modules/supports-color/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/supports-color/package.json b/test-eol-project/node_modules/supports-color/package.json deleted file mode 100644 index 3bb77ac1..00000000 --- a/test-eol-project/node_modules/supports-color/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "supports-color", - "version": "2.0.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Appelman (jbnicolai.com)" - ], - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect" - ], - "devDependencies": { - "mocha": "*", - "require-uncached": "^1.0.2" - } -} diff --git a/test-eol-project/node_modules/supports-color/readme.md b/test-eol-project/node_modules/supports-color/readme.md deleted file mode 100644 index b4761f1e..00000000 --- a/test-eol-project/node_modules/supports-color/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install --save supports-color -``` - - -## Usage - -```js -var supportsColor = require('supports-color'); - -if (supportsColor) { - console.log('Terminal supports color'); -} -``` - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/test-eol-project/node_modules/tmp/.eslintrc.js b/test-eol-project/node_modules/tmp/.eslintrc.js deleted file mode 100644 index 8222a832..00000000 --- a/test-eol-project/node_modules/tmp/.eslintrc.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - "env": { - "node": true - }, - "extends": "eslint:recommended", - "rules": { - "indent": [ - "error", - 2 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - } -}; diff --git a/test-eol-project/node_modules/tmp/.npmignore b/test-eol-project/node_modules/tmp/.npmignore deleted file mode 100644 index 78f2710d..00000000 --- a/test-eol-project/node_modules/tmp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -.idea/ diff --git a/test-eol-project/node_modules/tmp/.travis.yml b/test-eol-project/node_modules/tmp/.travis.yml deleted file mode 100644 index 9c0aa010..00000000 --- a/test-eol-project/node_modules/tmp/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - "0.6" - - "0.8" - - "0.10" - - "0.12" - - "4.0" - - "4.1" - - "4.2" - - "5.0" - - "5.1" - - "5.2" - - "5.3" - - "5.4" - - "6" diff --git a/test-eol-project/node_modules/tmp/Gruntfile.js b/test-eol-project/node_modules/tmp/Gruntfile.js deleted file mode 100644 index 8df64e70..00000000 --- a/test-eol-project/node_modules/tmp/Gruntfile.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = function(grunt) { - grunt.initConfig({ - jshint: { - all: ['Gruntfile.js', 'lib/*.js', 'test/*.js'] - }, - vows: { - all: { - src: ['test/*.js'], - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - //grunt.loadNpmTasks('grunt-vows-runner'); - grunt.loadNpmTasks('grunt-vows'); - - grunt.registerTask('default', ['jshint', 'vows']); -}; diff --git a/test-eol-project/node_modules/tmp/LICENSE b/test-eol-project/node_modules/tmp/LICENSE deleted file mode 100644 index 72418bd9..00000000 --- a/test-eol-project/node_modules/tmp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 KARASZI István - -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/test-eol-project/node_modules/tmp/README.md b/test-eol-project/node_modules/tmp/README.md deleted file mode 100644 index 804bf339..00000000 --- a/test-eol-project/node_modules/tmp/README.md +++ /dev/null @@ -1,268 +0,0 @@ -# Tmp - -A simple temporary file and directory creator for [node.js.][1] - -[![Build Status](https://travis-ci.org/raszi/node-tmp.svg?branch=master)](https://travis-ci.org/raszi/node-tmp) -[![Dependencies](https://david-dm.org/raszi/node-tmp.svg)](https://david-dm.org/raszi/node-tmp) -[![npm version](https://badge.fury.io/js/tmp.svg)](https://badge.fury.io/js/tmp) - -## About - -This is a [widely used library][2] to create temporary files and directories -in a [node.js][1] environment. - -Tmp offers both an asynchronous and a synchronous API. For all API calls, all -the parameters are optional. - -Tmp uses crypto for determining random file names, or, when using templates, -a six letter random identifier. And just in case that you do not have that much -entropy left on your system, Tmp will fall back to pseudo random numbers. - -You can set whether you want to remove the temporary file on process exit or -not, and the destination directory can also be set. - -## How to install - -```bash -npm install tmp -``` - -## Usage - -### Asynchronous file creation - -Simple temporary file creation, the file will be closed and unlinked on process exit. - -```javascript -var tmp = require('tmp'); - -tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) { - if (err) throw err; - - console.log("File: ", path); - console.log("Filedescriptor: ", fd); - - // If we don't need the file anymore we could manually call the cleanupCallback - // But that is not necessary if we didn't pass the keep option because the library - // will clean after itself. - cleanupCallback(); -}); -``` - -### Synchronous file creation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp'); - -var tmpobj = tmp.fileSync(); -console.log("File: ", tmpobj.name); -console.log("Filedescriptor: ", tmpobj.fd); - -// If we don't need the file anymore we could manually call the removeCallback -// But that is not necessary if we didn't pass the keep option because the library -// will clean after itself. -tmpobj.removeCallback(); -``` - -Note that this might throw an exception if either the maximum limit of retries -for creating a temporary name fails, or, in case that you do not have the permission -to write to the directory where the temporary file should be created in. - -### Asynchronous directory creation - -Simple temporary directory creation, it will be removed on process exit. - -If the directory still contains items on process exit, then it won't be removed. - -```javascript -var tmp = require('tmp'); - -tmp.dir(function _tempDirCreated(err, path, cleanupCallback) { - if (err) throw err; - - console.log("Dir: ", path); - - // Manual cleanup - cleanupCallback(); -}); -``` - -If you want to cleanup the directory even when there are entries in it, then -you can pass the `unsafeCleanup` option when creating it. - -### Synchronous directory creation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp'); - -var tmpobj = tmp.dirSync(); -console.log("Dir: ", tmpobj.name); -// Manual cleanup -tmpobj.removeCallback(); -``` - -Note that this might throw an exception if either the maximum limit of retries -for creating a temporary name fails, or, in case that you do not have the permission -to write to the directory where the temporary directory should be created in. - -### Asynchronous filename generation - -It is possible with this library to generate a unique filename in the specified -directory. - -```javascript -var tmp = require('tmp'); - -tmp.tmpName(function _tempNameGenerated(err, path) { - if (err) throw err; - - console.log("Created temporary filename: ", path); -}); -``` - -### Synchronous filename generation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp'); - -var name = tmp.tmpNameSync(); -console.log("Created temporary filename: ", name); -``` - -## Advanced usage - -### Asynchronous file creation - -Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`. - -```javascript -var tmp = require('tmp'); - -tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) { - if (err) throw err; - - console.log("File: ", path); - console.log("Filedescriptor: ", fd); -}); -``` - -### Synchronous file creation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp'); - -var tmpobj = tmp.fileSync({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }); -console.log("File: ", tmpobj.name); -console.log("Filedescriptor: ", tmpobj.fd); -``` - -### Asynchronous directory creation - -Creates a directory with mode `0755`, prefix will be `myTmpDir_`. - -```javascript -var tmp = require('tmp'); - -tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) { - if (err) throw err; - - console.log("Dir: ", path); -}); -``` - -### Synchronous directory creation - -Again, a synchronous version of the above. - -```javascript -var tmp = require('tmp'); - -var tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' }); -console.log("Dir: ", tmpobj.name); -``` - -### mkstemp like, asynchronously - -Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`. - -```javascript -var tmp = require('tmp'); - -tmp.dir({ template: '/tmp/tmp-XXXXXX' }, function _tempDirCreated(err, path) { - if (err) throw err; - - console.log("Dir: ", path); -}); -``` - -### mkstemp like, synchronously - -This will behave similarly to the asynchronous version. - -```javascript -var tmp = require('tmp'); - -var tmpobj = tmp.dirSync({ template: '/tmp/tmp-XXXXXX' }); -console.log("Dir: ", tmpobj.name); -``` - -### Asynchronous filename generation - -The `tmpName()` function accepts the `prefix`, `postfix`, `dir`, etc. parameters also: - -```javascript -var tmp = require('tmp'); - -tmp.tmpName({ template: '/tmp/tmp-XXXXXX' }, function _tempNameGenerated(err, path) { - if (err) throw err; - - console.log("Created temporary filename: ", path); -}); -``` - -### Synchronous filename generation - -The `tmpNameSync()` function works similarly to `tmpName()`. - -```javascript -var tmp = require('tmp'); -var tmpname = tmp.tmpNameSync({ template: '/tmp/tmp-XXXXXX' }); -console.log("Created temporary filename: ", tmpname); -``` - -## Graceful cleanup - -One may want to cleanup the temporary files even when an uncaught exception -occurs. To enforce this, you can call the `setGracefulCleanup()` method: - -```javascript -var tmp = require('tmp'); - -tmp.setGracefulCleanup(); -``` - -## Options - -All options are optional :) - - * `mode`: the file mode to create with, it fallbacks to `0600` on file creation and `0700` on directory creation - * `prefix`: the optional prefix, fallbacks to `tmp-` if not provided - * `postfix`: the optional postfix, fallbacks to `.tmp` on file creation - * `template`: [`mkstemp`][3] like filename template, no default - * `dir`: the optional temporary directory, fallbacks to system default (guesses from environment) - * `tries`: how many times should the function try to get a unique filename before giving up, default `3` - * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false`, means delete - * Please keep in mind that it is recommended in this case to call the provided `cleanupCallback` function manually. - * `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false` - -[1]: http://nodejs.org/ -[2]: https://www.npmjs.com/browse/depended/tmp -[3]: http://www.kernel.org/doc/man-pages/online/pages/man3/mkstemp.3.html diff --git a/test-eol-project/node_modules/tmp/cleanup.sh b/test-eol-project/node_modules/tmp/cleanup.sh deleted file mode 100755 index d069ebfb..00000000 --- a/test-eol-project/node_modules/tmp/cleanup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -rm -vrf ${TMPDIR}/{foo,tmp,something,complicated,clike,using}* diff --git a/test-eol-project/node_modules/tmp/coverage/coverage.json b/test-eol-project/node_modules/tmp/coverage/coverage.json deleted file mode 100644 index 5a2f97db..00000000 --- a/test-eol-project/node_modules/tmp/coverage/coverage.json +++ /dev/null @@ -1 +0,0 @@ -{"/Users/ikaraszi/_vc/github/node-tmp/lib/tmp.js":{"path":"/Users/ikaraszi/_vc/github/node-tmp/lib/tmp.js","s":{"1":1,"2":1,"3":1,"4":33,"5":33,"6":33,"7":0,"8":33,"9":366,"10":33,"11":1,"12":9,"13":1,"14":79,"15":5,"16":5,"17":5,"18":74,"19":4,"20":79,"21":1,"22":37,"23":4,"24":33,"25":5,"26":28,"27":28,"28":1,"29":25,"30":25,"31":4,"32":21,"33":0,"34":21,"35":21,"36":21,"37":21,"38":0,"39":0,"40":0,"41":21,"42":1,"43":18,"44":18,"45":2,"46":16,"47":0,"48":16,"49":16,"50":16,"51":16,"52":16,"53":0,"54":1,"55":9,"56":9,"57":9,"58":9,"59":1,"60":8,"61":8,"62":0,"63":8,"64":1,"65":9,"66":9,"67":9,"68":8,"69":8,"70":1,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":1,"85":9,"86":9,"87":9,"88":1,"89":8,"90":8,"91":0,"92":8,"93":1,"94":9,"95":9,"96":8,"97":8,"98":1,"99":16,"100":2,"101":2,"102":0,"103":0,"104":2,"105":16,"106":16,"107":16,"108":1,"109":16,"110":16,"111":16,"112":16,"113":16,"114":1,"115":32,"116":32,"117":5,"118":0,"119":5,"120":5,"121":5,"122":5,"123":5,"124":1,"125":0,"126":0,"127":0,"128":0,"129":0,"130":1,"131":0,"132":1,"133":3,"134":1,"135":0,"136":0,"137":0,"138":0,"139":1,"140":0,"141":0,"142":0,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1},"b":{"1":[5,74],"2":[5,5],"3":[4,70],"4":[4,33],"5":[4,4],"6":[5,28],"7":[28,14],"8":[28,8],"9":[28,28],"10":[25,20],"11":[4,21],"12":[25,24],"13":[0,21],"14":[21,3],"15":[0,21],"16":[0,0],"17":[18,16],"18":[2,16],"19":[18,18],"20":[0,16],"21":[16,2],"22":[6,3],"23":[1,8],"24":[8,6],"25":[0,8],"26":[9,6],"27":[8,6],"28":[0,0],"29":[0,0],"30":[0,0],"31":[1,8],"32":[8,6],"33":[0,8],"34":[8,6],"35":[0,0],"36":[0,0],"37":[16,0],"38":[0,16],"39":[16,0],"40":[0,5],"41":[5,0],"42":[0,0],"43":[0,0],"44":[0,1],"45":[1,0,0,0],"46":[0,0]},"f":{"1":33,"2":9,"3":79,"4":37,"5":25,"6":21,"7":21,"8":18,"9":9,"10":9,"11":8,"12":9,"13":0,"14":9,"15":9,"16":8,"17":9,"18":16,"19":2,"20":16,"21":32,"22":5,"23":0,"24":0,"25":3,"26":0,"27":0},"fnMap":{"1":{"name":"_randomChars","line":53,"loc":{"start":{"line":53,"column":0},"end":{"line":53,"column":31}}},"2":{"name":"_isUndefined","line":79,"loc":{"start":{"line":79,"column":0},"end":{"line":79,"column":27}}},"3":{"name":"_parseArguments","line":92,"loc":{"start":{"line":92,"column":0},"end":{"line":92,"column":44}}},"4":{"name":"_generateTmpName","line":112,"loc":{"start":{"line":112,"column":0},"end":{"line":112,"column":32}}},"5":{"name":"_getTmpName","line":140,"loc":{"start":{"line":140,"column":0},"end":{"line":140,"column":40}}},"6":{"name":"_getUniqueName","line":153,"loc":{"start":{"line":153,"column":3},"end":{"line":153,"column":29}}},"7":{"name":"(anonymous_7)","line":157,"loc":{"start":{"line":157,"column":18},"end":{"line":157,"column":33}}},"8":{"name":"_getTmpNameSync","line":176,"loc":{"start":{"line":176,"column":0},"end":{"line":176,"column":34}}},"9":{"name":"_createTmpFile","line":207,"loc":{"start":{"line":207,"column":0},"end":{"line":207,"column":43}}},"10":{"name":"_tmpNameCreated","line":216,"loc":{"start":{"line":216,"column":20},"end":{"line":216,"column":56}}},"11":{"name":"_fileCreated","line":220,"loc":{"start":{"line":220,"column":56},"end":{"line":220,"column":87}}},"12":{"name":"_createTmpFileSync","line":235,"loc":{"start":{"line":235,"column":0},"end":{"line":235,"column":37}}},"13":{"name":"_rmdirRecursiveSync","line":258,"loc":{"start":{"line":258,"column":0},"end":{"line":258,"column":35}}},"14":{"name":"_createTmpDir","line":296,"loc":{"start":{"line":296,"column":0},"end":{"line":296,"column":42}}},"15":{"name":"_tmpNameCreated","line":303,"loc":{"start":{"line":303,"column":20},"end":{"line":303,"column":56}}},"16":{"name":"_dirCreated","line":307,"loc":{"start":{"line":307,"column":42},"end":{"line":307,"column":68}}},"17":{"name":"_createTmpDirSync","line":322,"loc":{"start":{"line":322,"column":0},"end":{"line":322,"column":36}}},"18":{"name":"_prepareTmpFileRemoveCallback","line":345,"loc":{"start":{"line":345,"column":0},"end":{"line":345,"column":55}}},"19":{"name":"_removeCallback","line":346,"loc":{"start":{"line":346,"column":46},"end":{"line":346,"column":79}}},"20":{"name":"_prepareTmpDirRemoveCallback","line":377,"loc":{"start":{"line":377,"column":0},"end":{"line":377,"column":50}}},"21":{"name":"_prepareRemoveCallback","line":396,"loc":{"start":{"line":396,"column":0},"end":{"line":396,"column":53}}},"22":{"name":"_cleanupCallback","line":399,"loc":{"start":{"line":399,"column":9},"end":{"line":399,"column":37}}},"23":{"name":"_garbageCollector","line":417,"loc":{"start":{"line":417,"column":0},"end":{"line":417,"column":29}}},"24":{"name":"_setGracefulCleanup","line":431,"loc":{"start":{"line":431,"column":0},"end":{"line":431,"column":31}}},"25":{"name":"(anonymous_25)","line":435,"loc":{"start":{"line":435,"column":51},"end":{"line":435,"column":68}}},"26":{"name":"_uncaughtExceptionThrown","line":440,"loc":{"start":{"line":440,"column":43},"end":{"line":440,"column":82}}},"27":{"name":"_exit","line":448,"loc":{"start":{"line":448,"column":28},"end":{"line":448,"column":49}}}},"statementMap":{"1":{"start":{"line":12,"column":0},"end":{"line":17,"column":32}},"2":{"start":{"line":23,"column":0},"end":{"line":43,"column":29}},"3":{"start":{"line":53,"column":0},"end":{"line":70,"column":1}},"4":{"start":{"line":54,"column":2},"end":{"line":56,"column":15}},"5":{"start":{"line":59,"column":2},"end":{"line":63,"column":3}},"6":{"start":{"line":60,"column":4},"end":{"line":60,"column":38}},"7":{"start":{"line":62,"column":4},"end":{"line":62,"column":44}},"8":{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},"9":{"start":{"line":66,"column":4},"end":{"line":66,"column":59}},"10":{"start":{"line":69,"column":2},"end":{"line":69,"column":24}},"11":{"start":{"line":79,"column":0},"end":{"line":81,"column":1}},"12":{"start":{"line":80,"column":2},"end":{"line":80,"column":36}},"13":{"start":{"line":92,"column":0},"end":{"line":103,"column":1}},"14":{"start":{"line":93,"column":2},"end":{"line":100,"column":3}},"15":{"start":{"line":94,"column":4},"end":{"line":95,"column":20}},"16":{"start":{"line":96,"column":6},"end":{"line":96,"column":31}},"17":{"start":{"line":97,"column":6},"end":{"line":97,"column":21}},"18":{"start":{"line":98,"column":9},"end":{"line":100,"column":3}},"19":{"start":{"line":99,"column":4},"end":{"line":99,"column":17}},"20":{"start":{"line":102,"column":2},"end":{"line":102,"column":29}},"21":{"start":{"line":112,"column":0},"end":{"line":131,"column":1}},"22":{"start":{"line":113,"column":2},"end":{"line":115,"column":3}},"23":{"start":{"line":114,"column":4},"end":{"line":114,"column":50}},"24":{"start":{"line":118,"column":2},"end":{"line":120,"column":3}},"25":{"start":{"line":119,"column":4},"end":{"line":119,"column":68}},"26":{"start":{"line":123,"column":2},"end":{"line":128,"column":13}},"27":{"start":{"line":130,"column":2},"end":{"line":130,"column":43}},"28":{"start":{"line":140,"column":0},"end":{"line":167,"column":1}},"29":{"start":{"line":141,"column":2},"end":{"line":145,"column":40}},"30":{"start":{"line":147,"column":2},"end":{"line":148,"column":42}},"31":{"start":{"line":148,"column":4},"end":{"line":148,"column":42}},"32":{"start":{"line":150,"column":2},"end":{"line":151,"column":54}},"33":{"start":{"line":151,"column":4},"end":{"line":151,"column":54}},"34":{"start":{"line":153,"column":2},"end":{"line":166,"column":7}},"35":{"start":{"line":154,"column":4},"end":{"line":154,"column":38}},"36":{"start":{"line":157,"column":4},"end":{"line":165,"column":7}},"37":{"start":{"line":158,"column":6},"end":{"line":162,"column":7}},"38":{"start":{"line":159,"column":8},"end":{"line":159,"column":49}},"39":{"start":{"line":159,"column":25},"end":{"line":159,"column":49}},"40":{"start":{"line":161,"column":8},"end":{"line":161,"column":95}},"41":{"start":{"line":164,"column":6},"end":{"line":164,"column":21}},"42":{"start":{"line":176,"column":0},"end":{"line":198,"column":1}},"43":{"start":{"line":177,"column":2},"end":{"line":180,"column":40}},"44":{"start":{"line":182,"column":2},"end":{"line":183,"column":37}},"45":{"start":{"line":183,"column":4},"end":{"line":183,"column":37}},"46":{"start":{"line":185,"column":2},"end":{"line":186,"column":49}},"47":{"start":{"line":186,"column":4},"end":{"line":186,"column":49}},"48":{"start":{"line":188,"column":2},"end":{"line":195,"column":24}},"49":{"start":{"line":189,"column":4},"end":{"line":189,"column":38}},"50":{"start":{"line":190,"column":4},"end":{"line":194,"column":5}},"51":{"start":{"line":191,"column":8},"end":{"line":191,"column":26}},"52":{"start":{"line":193,"column":8},"end":{"line":193,"column":20}},"53":{"start":{"line":197,"column":2},"end":{"line":197,"column":76}},"54":{"start":{"line":207,"column":0},"end":{"line":226,"column":1}},"55":{"start":{"line":208,"column":2},"end":{"line":211,"column":17}},"56":{"start":{"line":213,"column":4},"end":{"line":213,"column":72}},"57":{"start":{"line":216,"column":2},"end":{"line":225,"column":5}},"58":{"start":{"line":217,"column":4},"end":{"line":217,"column":28}},"59":{"start":{"line":217,"column":13},"end":{"line":217,"column":28}},"60":{"start":{"line":220,"column":4},"end":{"line":224,"column":7}},"61":{"start":{"line":221,"column":6},"end":{"line":221,"column":30}},"62":{"start":{"line":221,"column":15},"end":{"line":221,"column":30}},"63":{"start":{"line":223,"column":6},"end":{"line":223,"column":72}},"64":{"start":{"line":235,"column":0},"end":{"line":250,"column":1}},"65":{"start":{"line":236,"column":2},"end":{"line":238,"column":19}},"66":{"start":{"line":240,"column":4},"end":{"line":240,"column":42}},"67":{"start":{"line":242,"column":2},"end":{"line":242,"column":35}},"68":{"start":{"line":243,"column":2},"end":{"line":243,"column":67}},"69":{"start":{"line":245,"column":2},"end":{"line":249,"column":4}},"70":{"start":{"line":258,"column":0},"end":{"line":287,"column":1}},"71":{"start":{"line":259,"column":2},"end":{"line":259,"column":20}},"72":{"start":{"line":261,"column":2},"end":{"line":286,"column":30}},"73":{"start":{"line":262,"column":4},"end":{"line":265,"column":34}},"74":{"start":{"line":267,"column":4},"end":{"line":281,"column":5}},"75":{"start":{"line":268,"column":6},"end":{"line":270,"column":34}},"76":{"start":{"line":272,"column":6},"end":{"line":280,"column":7}},"77":{"start":{"line":273,"column":8},"end":{"line":276,"column":9}},"78":{"start":{"line":274,"column":10},"end":{"line":274,"column":26}},"79":{"start":{"line":275,"column":10},"end":{"line":275,"column":25}},"80":{"start":{"line":277,"column":8},"end":{"line":277,"column":24}},"81":{"start":{"line":279,"column":8},"end":{"line":279,"column":28}},"82":{"start":{"line":283,"column":4},"end":{"line":285,"column":5}},"83":{"start":{"line":284,"column":6},"end":{"line":284,"column":24}},"84":{"start":{"line":296,"column":0},"end":{"line":313,"column":1}},"85":{"start":{"line":297,"column":2},"end":{"line":300,"column":17}},"86":{"start":{"line":303,"column":2},"end":{"line":312,"column":5}},"87":{"start":{"line":304,"column":4},"end":{"line":304,"column":28}},"88":{"start":{"line":304,"column":13},"end":{"line":304,"column":28}},"89":{"start":{"line":307,"column":4},"end":{"line":311,"column":7}},"90":{"start":{"line":308,"column":6},"end":{"line":308,"column":30}},"91":{"start":{"line":308,"column":15},"end":{"line":308,"column":30}},"92":{"start":{"line":310,"column":6},"end":{"line":310,"column":63}},"93":{"start":{"line":322,"column":0},"end":{"line":334,"column":1}},"94":{"start":{"line":323,"column":2},"end":{"line":325,"column":19}},"95":{"start":{"line":327,"column":2},"end":{"line":327,"column":35}},"96":{"start":{"line":328,"column":2},"end":{"line":328,"column":44}},"97":{"start":{"line":330,"column":2},"end":{"line":333,"column":4}},"98":{"start":{"line":345,"column":0},"end":{"line":367,"column":1}},"99":{"start":{"line":346,"column":2},"end":{"line":360,"column":17}},"100":{"start":{"line":347,"column":4},"end":{"line":358,"column":5}},"101":{"start":{"line":348,"column":6},"end":{"line":348,"column":30}},"102":{"start":{"line":354,"column":6},"end":{"line":357,"column":7}},"103":{"start":{"line":356,"column":8},"end":{"line":356,"column":16}},"104":{"start":{"line":359,"column":4},"end":{"line":359,"column":29}},"105":{"start":{"line":362,"column":2},"end":{"line":364,"column":3}},"106":{"start":{"line":363,"column":4},"end":{"line":363,"column":43}},"107":{"start":{"line":366,"column":2},"end":{"line":366,"column":24}},"108":{"start":{"line":377,"column":0},"end":{"line":386,"column":1}},"109":{"start":{"line":378,"column":2},"end":{"line":378,"column":88}},"110":{"start":{"line":379,"column":2},"end":{"line":379,"column":68}},"111":{"start":{"line":381,"column":2},"end":{"line":383,"column":3}},"112":{"start":{"line":382,"column":4},"end":{"line":382,"column":43}},"113":{"start":{"line":385,"column":2},"end":{"line":385,"column":24}},"114":{"start":{"line":396,"column":0},"end":{"line":410,"column":1}},"115":{"start":{"line":397,"column":2},"end":{"line":397,"column":21}},"116":{"start":{"line":399,"column":2},"end":{"line":409,"column":4}},"117":{"start":{"line":400,"column":4},"end":{"line":400,"column":23}},"118":{"start":{"line":400,"column":16},"end":{"line":400,"column":23}},"119":{"start":{"line":402,"column":4},"end":{"line":402,"column":57}},"120":{"start":{"line":403,"column":4},"end":{"line":405,"column":5}},"121":{"start":{"line":404,"column":6},"end":{"line":404,"column":38}},"122":{"start":{"line":407,"column":4},"end":{"line":407,"column":18}},"123":{"start":{"line":408,"column":4},"end":{"line":408,"column":24}},"124":{"start":{"line":417,"column":0},"end":{"line":429,"column":1}},"125":{"start":{"line":418,"column":2},"end":{"line":420,"column":3}},"126":{"start":{"line":419,"column":4},"end":{"line":419,"column":11}},"127":{"start":{"line":422,"column":2},"end":{"line":428,"column":3}},"128":{"start":{"line":423,"column":4},"end":{"line":427,"column":5}},"129":{"start":{"line":424,"column":6},"end":{"line":424,"column":35}},"130":{"start":{"line":431,"column":0},"end":{"line":433,"column":1}},"131":{"start":{"line":432,"column":2},"end":{"line":432,"column":26}},"132":{"start":{"line":435,"column":0},"end":{"line":437,"column":3}},"133":{"start":{"line":436,"column":2},"end":{"line":436,"column":29}},"134":{"start":{"line":439,"column":0},"end":{"line":446,"column":1}},"135":{"start":{"line":440,"column":2},"end":{"line":445,"column":5}},"136":{"start":{"line":441,"column":4},"end":{"line":441,"column":30}},"137":{"start":{"line":442,"column":4},"end":{"line":442,"column":24}},"138":{"start":{"line":444,"column":4},"end":{"line":444,"column":14}},"139":{"start":{"line":448,"column":0},"end":{"line":451,"column":3}},"140":{"start":{"line":449,"column":2},"end":{"line":449,"column":38}},"141":{"start":{"line":449,"column":12},"end":{"line":449,"column":38}},"142":{"start":{"line":450,"column":2},"end":{"line":450,"column":22}},"143":{"start":{"line":454,"column":0},"end":{"line":454,"column":29}},"144":{"start":{"line":455,"column":0},"end":{"line":455,"column":35}},"145":{"start":{"line":456,"column":0},"end":{"line":456,"column":43}},"146":{"start":{"line":457,"column":0},"end":{"line":457,"column":37}},"147":{"start":{"line":458,"column":0},"end":{"line":458,"column":45}},"148":{"start":{"line":459,"column":0},"end":{"line":459,"column":37}},"149":{"start":{"line":460,"column":0},"end":{"line":460,"column":45}},"150":{"start":{"line":461,"column":0},"end":{"line":461,"column":56}}},"branchMap":{"1":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":2},"end":{"line":93,"column":2}},{"start":{"line":93,"column":2},"end":{"line":93,"column":2}}]},"2":{"line":96,"type":"binary-expr","locations":[{"start":{"line":96,"column":16},"end":{"line":96,"column":24}},{"start":{"line":96,"column":28},"end":{"line":96,"column":30}}]},"3":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":9},"end":{"line":98,"column":9}},{"start":{"line":98,"column":9},"end":{"line":98,"column":9}}]},"4":{"line":113,"type":"if","locations":[{"start":{"line":113,"column":2},"end":{"line":113,"column":2}},{"start":{"line":113,"column":2},"end":{"line":113,"column":2}}]},"5":{"line":114,"type":"binary-expr","locations":[{"start":{"line":114,"column":21},"end":{"line":114,"column":29}},{"start":{"line":114,"column":33},"end":{"line":114,"column":37}}]},"6":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":2},"end":{"line":118,"column":2}},{"start":{"line":118,"column":2},"end":{"line":118,"column":2}}]},"7":{"line":124,"type":"binary-expr","locations":[{"start":{"line":124,"column":4},"end":{"line":124,"column":15}},{"start":{"line":124,"column":19},"end":{"line":124,"column":25}}]},"8":{"line":127,"type":"binary-expr","locations":[{"start":{"line":127,"column":4},"end":{"line":127,"column":16}},{"start":{"line":127,"column":20},"end":{"line":127,"column":22}}]},"9":{"line":130,"type":"binary-expr","locations":[{"start":{"line":130,"column":19},"end":{"line":130,"column":27}},{"start":{"line":130,"column":31},"end":{"line":130,"column":35}}]},"10":{"line":145,"type":"binary-expr","locations":[{"start":{"line":145,"column":12},"end":{"line":145,"column":22}},{"start":{"line":145,"column":26},"end":{"line":145,"column":39}}]},"11":{"line":147,"type":"if","locations":[{"start":{"line":147,"column":2},"end":{"line":147,"column":2}},{"start":{"line":147,"column":2},"end":{"line":147,"column":2}}]},"12":{"line":147,"type":"binary-expr","locations":[{"start":{"line":147,"column":6},"end":{"line":147,"column":18}},{"start":{"line":147,"column":22},"end":{"line":147,"column":31}}]},"13":{"line":150,"type":"if","locations":[{"start":{"line":150,"column":2},"end":{"line":150,"column":2}},{"start":{"line":150,"column":2},"end":{"line":150,"column":2}}]},"14":{"line":150,"type":"binary-expr","locations":[{"start":{"line":150,"column":6},"end":{"line":150,"column":19}},{"start":{"line":150,"column":23},"end":{"line":150,"column":61}}]},"15":{"line":158,"type":"if","locations":[{"start":{"line":158,"column":6},"end":{"line":158,"column":6}},{"start":{"line":158,"column":6},"end":{"line":158,"column":6}}]},"16":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":8},"end":{"line":159,"column":8}},{"start":{"line":159,"column":8},"end":{"line":159,"column":8}}]},"17":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":12},"end":{"line":180,"column":22}},{"start":{"line":180,"column":26},"end":{"line":180,"column":39}}]},"18":{"line":182,"type":"if","locations":[{"start":{"line":182,"column":2},"end":{"line":182,"column":2}},{"start":{"line":182,"column":2},"end":{"line":182,"column":2}}]},"19":{"line":182,"type":"binary-expr","locations":[{"start":{"line":182,"column":6},"end":{"line":182,"column":18}},{"start":{"line":182,"column":22},"end":{"line":182,"column":31}}]},"20":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":2},"end":{"line":185,"column":2}},{"start":{"line":185,"column":2},"end":{"line":185,"column":2}}]},"21":{"line":185,"type":"binary-expr","locations":[{"start":{"line":185,"column":6},"end":{"line":185,"column":19}},{"start":{"line":185,"column":23},"end":{"line":185,"column":61}}]},"22":{"line":213,"type":"cond-expr","locations":[{"start":{"line":213,"column":50},"end":{"line":213,"column":56}},{"start":{"line":213,"column":59},"end":{"line":213,"column":71}}]},"23":{"line":217,"type":"if","locations":[{"start":{"line":217,"column":4},"end":{"line":217,"column":4}},{"start":{"line":217,"column":4},"end":{"line":217,"column":4}}]},"24":{"line":220,"type":"binary-expr","locations":[{"start":{"line":220,"column":32},"end":{"line":220,"column":41}},{"start":{"line":220,"column":45},"end":{"line":220,"column":54}}]},"25":{"line":221,"type":"if","locations":[{"start":{"line":221,"column":6},"end":{"line":221,"column":6}},{"start":{"line":221,"column":6},"end":{"line":221,"column":6}}]},"26":{"line":240,"type":"binary-expr","locations":[{"start":{"line":240,"column":19},"end":{"line":240,"column":31}},{"start":{"line":240,"column":35},"end":{"line":240,"column":41}}]},"27":{"line":243,"type":"binary-expr","locations":[{"start":{"line":243,"column":43},"end":{"line":243,"column":52}},{"start":{"line":243,"column":56},"end":{"line":243,"column":65}}]},"28":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":6},"end":{"line":272,"column":6}},{"start":{"line":272,"column":6},"end":{"line":272,"column":6}}]},"29":{"line":273,"type":"if","locations":[{"start":{"line":273,"column":8},"end":{"line":273,"column":8}},{"start":{"line":273,"column":8},"end":{"line":273,"column":8}}]},"30":{"line":283,"type":"if","locations":[{"start":{"line":283,"column":4},"end":{"line":283,"column":4}},{"start":{"line":283,"column":4},"end":{"line":283,"column":4}}]},"31":{"line":304,"type":"if","locations":[{"start":{"line":304,"column":4},"end":{"line":304,"column":4}},{"start":{"line":304,"column":4},"end":{"line":304,"column":4}}]},"32":{"line":307,"type":"binary-expr","locations":[{"start":{"line":307,"column":19},"end":{"line":307,"column":28}},{"start":{"line":307,"column":32},"end":{"line":307,"column":40}}]},"33":{"line":308,"type":"if","locations":[{"start":{"line":308,"column":6},"end":{"line":308,"column":6}},{"start":{"line":308,"column":6},"end":{"line":308,"column":6}}]},"34":{"line":328,"type":"binary-expr","locations":[{"start":{"line":328,"column":21},"end":{"line":328,"column":30}},{"start":{"line":328,"column":34},"end":{"line":328,"column":42}}]},"35":{"line":354,"type":"if","locations":[{"start":{"line":354,"column":6},"end":{"line":354,"column":6}},{"start":{"line":354,"column":6},"end":{"line":354,"column":6}}]},"36":{"line":354,"type":"binary-expr","locations":[{"start":{"line":354,"column":10},"end":{"line":354,"column":30}},{"start":{"line":354,"column":34},"end":{"line":354,"column":55}}]},"37":{"line":362,"type":"if","locations":[{"start":{"line":362,"column":2},"end":{"line":362,"column":2}},{"start":{"line":362,"column":2},"end":{"line":362,"column":2}}]},"38":{"line":378,"type":"cond-expr","locations":[{"start":{"line":378,"column":44},"end":{"line":378,"column":63}},{"start":{"line":378,"column":66},"end":{"line":378,"column":87}}]},"39":{"line":381,"type":"if","locations":[{"start":{"line":381,"column":2},"end":{"line":381,"column":2}},{"start":{"line":381,"column":2},"end":{"line":381,"column":2}}]},"40":{"line":400,"type":"if","locations":[{"start":{"line":400,"column":4},"end":{"line":400,"column":4}},{"start":{"line":400,"column":4},"end":{"line":400,"column":4}}]},"41":{"line":403,"type":"if","locations":[{"start":{"line":403,"column":4},"end":{"line":403,"column":4}},{"start":{"line":403,"column":4},"end":{"line":403,"column":4}}]},"42":{"line":418,"type":"if","locations":[{"start":{"line":418,"column":2},"end":{"line":418,"column":2}},{"start":{"line":418,"column":2},"end":{"line":418,"column":2}}]},"43":{"line":418,"type":"binary-expr","locations":[{"start":{"line":418,"column":6},"end":{"line":418,"column":24}},{"start":{"line":418,"column":28},"end":{"line":418,"column":45}}]},"44":{"line":439,"type":"if","locations":[{"start":{"line":439,"column":0},"end":{"line":439,"column":0}},{"start":{"line":439,"column":0},"end":{"line":439,"column":0}}]},"45":{"line":439,"type":"binary-expr","locations":[{"start":{"line":439,"column":4},"end":{"line":439,"column":20}},{"start":{"line":439,"column":25},"end":{"line":439,"column":39}},{"start":{"line":439,"column":43},"end":{"line":439,"column":59}},{"start":{"line":439,"column":63},"end":{"line":439,"column":77}}]},"46":{"line":449,"type":"if","locations":[{"start":{"line":449,"column":2},"end":{"line":449,"column":2}},{"start":{"line":449,"column":2},"end":{"line":449,"column":2}}]}}}} \ No newline at end of file diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/base.css b/test-eol-project/node_modules/tmp/coverage/lcov-report/base.css deleted file mode 100644 index 29737bcb..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov-report/base.css +++ /dev/null @@ -1,213 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.medium .chart { border:1px solid #f9cd0b; } -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } -/* light gray */ -span.cline-neutral { background: #eaeaea; } - -.cbranch-no { background: yellow !important; color: #111; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/index.html b/test-eol-project/node_modules/tmp/coverage/lcov-report/index.html deleted file mode 100644 index 1d4d14f0..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov-report/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Code coverage report for All files - - - - - - - -
    -
    -

    - / -

    -
    -
    - 74.67% - Statements - 112/150 -
    -
    - 65.96% - Branches - 62/94 -
    -
    - 81.48% - Functions - 22/27 -
    -
    - 76.92% - Lines - 110/143 -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    lib/
    74.67%112/15065.96%62/9481.48%22/2776.92%110/143
    -
    -
    - - - - - - - diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html b/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html deleted file mode 100644 index ee405aea..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Code coverage report for lib/ - - - - - - - -
    -
    -

    - all files lib/ -

    -
    -
    - 74.67% - Statements - 112/150 -
    -
    - 65.96% - Branches - 62/94 -
    -
    - 81.48% - Functions - 22/27 -
    -
    - 76.92% - Lines - 110/143 -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    tmp.js
    74.67%112/15065.96%62/9481.48%22/2776.92%110/143
    -
    -
    - - - - - - - diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html b/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html deleted file mode 100644 index 8d0fa2b1..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov-report/lib/tmp.js.html +++ /dev/null @@ -1,1448 +0,0 @@ - - - - Code coverage report for lib/tmp.js - - - - - - - -
    -
    -

    - all files / lib/ tmp.js -

    -
    -
    - 74.67% - Statements - 112/150 -
    -
    - 65.96% - Branches - 62/94 -
    -
    - 81.48% - Functions - 22/27 -
    -
    - 76.92% - Lines - 110/143 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462  -  -  -  -  -  -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -33× -  -  -  -  -33× -33× -  -  -  -  -33× -366× -  -  -33× -  -  -  -  -  -  -  -  -  - - -  -  -  -  -  -  -  -  -  -  -  - -79× - -  - - -74× - -  -  -79× -  -  -  -  -  -  -  -  -  - -37× - -  -  -  -33× - -  -  -  -28× -  -  -  -  -  -  -28× -  -  -  -  -  -  -  -  -  - -25× -  -  -  -  -  -25× - -  -21× -  -  -21× -21× -  -  -21× -21× -  -  -  -  -  -21× -  -  -  -  -  -  -  -  -  -  -  - -18× -  -  -  -  -18× - -  -16× -  -  -16× -16× -16× -16× -  -16× -  -  -  -  -  -  -  -  -  -  -  -  -  - - -  -  -  -  - -  -  - - -  -  - - -  - -  -  -  -  -  -  -  -  -  -  -  - - -  -  -  - -  - - -  - -  -  -  -  -  -  -  -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - - -  -  -  -  -  - - -  -  - - -  - -  -  -  -  -  -  -  -  -  -  -  - - -  -  -  - - -  - -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -16× - - -  -  -  -  -  -  -  -  -  -  - -  -  -16× -16× -  -  -16× -  -  -  -  -  -  -  -  -  -  - -16× -16× -  -16× -16× -  -  -16× -  -  -  -  -  -  -  -  -  -  - -32× -  -32× - -  - - - -  -  - - -  -  -  -  -  -  -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  - -  -  -  - - -  -  - -  -  -  -  -  -  -  -  - -  -  -  -  -  - - - - - - - - - 
    /*!
    - * Tmp
    - *
    - * Copyright (c) 2011-2015 KARASZI Istvan <github@spam.raszi.hu>
    - *
    - * MIT Licensed
    - */
    - 
    -/**
    - * Module dependencies.
    - */
    -var
    -  fs     = require('fs'),
    -  path   = require('path'),
    -  crypto = require('crypto'),
    -  tmpDir = require('os-tmpdir'),
    -  _c     = require('constants');
    - 
    - 
    -/**
    - * The working inner variables.
    - */
    -var
    -  // store the actual TMP directory
    -  _TMP = tmpDir(),
    - 
    -  // the random characters to choose from
    -  RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
    - 
    -  TEMPLATE_PATTERN = /XXXXXX/,
    - 
    -  DEFAULT_TRIES = 3,
    - 
    -  CREATE_FLAGS = _c.O_CREAT | _c.O_EXCL | _c.O_RDWR,
    - 
    -  DIR_MODE = 448 /* 0700 */,
    -  FILE_MODE = 384 /* 0600 */,
    - 
    -  // this will hold the objects need to be removed on exit
    -  _removeObjects = [],
    - 
    -  _gracefulCleanup = false,
    -  _uncaughtException = false;
    - 
    -/**
    - * Random name generator based on crypto.
    - * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript
    - *
    - * @param {Number} howMany
    - * @return {String}
    - * @api private
    - */
    -function _randomChars(howMany) {
    -  var
    -    value = [],
    -    rnd = null;
    - 
    -  // make sure that we do not fail because we ran out of entropy
    -  try {
    -    rnd = crypto.randomBytes(howMany);
    -  } catch (e) {
    -    rnd = crypto.pseudoRandomBytes(howMany);
    -  }
    - 
    -  for (var i = 0; i < howMany; i++) {
    -    value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
    -  }
    - 
    -  return value.join('');
    -}
    - 
    -/**
    - * Checks whether the `obj` parameter is defined or not.
    - *
    - * @param {Object} obj
    - * @return {Boolean}
    - * @api private
    - */
    -function _isUndefined(obj) {
    -  return typeof obj === 'undefined';
    -}
    - 
    -/**
    - * Parses the function arguments.
    - *
    - * This function helps to have optional arguments.
    - *
    - * @param {Object} options
    - * @param {Function} callback
    - * @api private
    - */
    -function _parseArguments(options, callback) {
    -  if (typeof options == 'function') {
    -    var
    -      tmp = options;
    -      options = callback || {};
    -      callback = tmp;
    -  } else if (typeof options == 'undefined') {
    -    options = {};
    -  }
    - 
    -  return [options, callback];
    -}
    - 
    -/**
    - * Generates a new temporary name.
    - *
    - * @param {Object} opts
    - * @returns {String}
    - * @api private
    - */
    -function _generateTmpName(opts) {
    -  if (opts.name) {
    -    return path.join(opts.dir || _TMP, opts.name);
    -  }
    - 
    -  // mkstemps like template
    -  if (opts.template) {
    -    return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
    -  }
    - 
    -  // prefix and postfix
    -  var name = [
    -    opts.prefix || 'tmp-',
    -    process.pid,
    -    _randomChars(12),
    -    opts.postfix || ''
    -  ].join('');
    - 
    -  return path.join(opts.dir || _TMP, name);
    -}
    - 
    -/**
    - * Gets a temporary file name.
    - *
    - * @param {Object} options
    - * @param {Function} callback
    - * @api private
    - */
    -function _getTmpName(options, callback) {
    -  var
    -    args = _parseArguments(options, callback),
    -    opts = args[0],
    -    cb = args[1],
    -    tries = opts.tries || DEFAULT_TRIES;
    - 
    -  if (isNaN(tries) || tries < 0)
    -    return cb(new Error('Invalid tries'));
    - 
    -  Iif (opts.template && !opts.template.match(TEMPLATE_PATTERN))
    -    return cb(new Error('Invalid template provided'));
    - 
    -  (function _getUniqueName() {
    -    var name = _generateTmpName(opts);
    - 
    -    // check whether the path exists then retry if needed
    -    fs.stat(name, function (err) {
    -      Iif (!err) {
    -        if (tries-- > 0) return _getUniqueName();
    - 
    -        return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));
    -      }
    - 
    -      cb(null, name);
    -    });
    -  }());
    -}
    - 
    -/**
    - * Synchronous version of _getTmpName.
    - *
    - * @param {Object} options
    - * @returns {String}
    - * @api private
    - */
    -function _getTmpNameSync(options) {
    -  var
    -    args = _parseArguments(options),
    -    opts = args[0],
    -    tries = opts.tries || DEFAULT_TRIES;
    - 
    -  if (isNaN(tries) || tries < 0)
    -    throw new Error('Invalid tries');
    - 
    -  Iif (opts.template && !opts.template.match(TEMPLATE_PATTERN))
    -    throw new Error('Invalid template provided');
    - 
    -  do {
    -    var name = _generateTmpName(opts);
    -    try {
    -        fs.statSync(name);
    -    } catch (e) {
    -        return name;
    -    }
    -  } while (tries-- > 0);
    - 
    -  throw new Error('Could not get a unique tmp filename, max tries reached');
    -}
    - 
    -/**
    - * Creates and opens a temporary file.
    - *
    - * @param {Object} options
    - * @param {Function} callback
    - * @api public
    - */
    -function _createTmpFile(options, callback) {
    -  var
    -    args = _parseArguments(options, callback),
    -    opts = args[0],
    -    cb = args[1];
    - 
    -    opts.postfix = (_isUndefined(opts.postfix)) ? '.tmp' : opts.postfix;
    - 
    -  // gets a temporary filename
    -  _getTmpName(opts, function _tmpNameCreated(err, name) {
    -    if (err) return cb(err);
    - 
    -    // create and open the file
    -    fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {
    -      Iif (err) return cb(err);
    - 
    -      cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts));
    -    });
    -  });
    -}
    - 
    -/**
    - * Synchronous version of _createTmpFile.
    - *
    - * @param {Object} options
    - * @returns {Object} object consists of name, fd and removeCallback
    - * @api private
    - */
    -function _createTmpFileSync(options) {
    -  var
    -    args = _parseArguments(options),
    -    opts = args[0];
    - 
    -    opts.postfix = opts.postfix || '.tmp';
    - 
    -  var name = _getTmpNameSync(opts);
    -  var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
    - 
    -  return {
    -    name : name,
    -    fd : fd,
    -    removeCallback : _prepareTmpFileRemoveCallback(name, fd, opts)
    -  };
    -}
    - 
    -/**
    - * Removes files and folders in a directory recursively.
    - *
    - * @param {String} root
    - * @api private
    - */
    -function _rmdirRecursiveSync(root) {
    -  var dirs = [root];
    - 
    -  do {
    -    var
    -      dir = dirs.pop(),
    -      deferred = false,
    -      files = fs.readdirSync(dir);
    - 
    -    for (var i = 0, length = files.length; i < length; i++) {
    -      var
    -        file = path.join(dir, files[i]),
    -        stat = fs.lstatSync(file); // lstat so we don't recurse into symlinked directories
    - 
    -      if (stat.isDirectory()) {
    -        if (!deferred) {
    -          deferred = true;
    -          dirs.push(dir);
    -        }
    -        dirs.push(file);
    -      } else {
    -        fs.unlinkSync(file);
    -      }
    -    }
    - 
    -    if (!deferred) {
    -      fs.rmdirSync(dir);
    -    }
    -  } while (dirs.length !== 0);
    -}
    - 
    -/**
    - * Creates a temporary directory.
    - *
    - * @param {Object} options
    - * @param {Function} callback
    - * @api public
    - */
    -function _createTmpDir(options, callback) {
    -  var
    -    args = _parseArguments(options, callback),
    -    opts = args[0],
    -    cb = args[1];
    - 
    -  // gets a temporary filename
    -  _getTmpName(opts, function _tmpNameCreated(err, name) {
    -    if (err) return cb(err);
    - 
    -    // create the directory
    -    fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {
    -      Iif (err) return cb(err);
    - 
    -      cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
    -    });
    -  });
    -}
    - 
    -/**
    - * Synchronous version of _createTmpDir.
    - *
    - * @param {Object} options
    - * @returns {Object} object consists of name and removeCallback
    - * @api private
    - */
    -function _createTmpDirSync(options) {
    -  var
    -    args = _parseArguments(options),
    -    opts = args[0];
    - 
    -  var name = _getTmpNameSync(opts);
    -  fs.mkdirSync(name, opts.mode || DIR_MODE);
    - 
    -  return {
    -    name : name,
    -    removeCallback : _prepareTmpDirRemoveCallback(name, opts)
    -  };
    -}
    - 
    -/**
    - * Prepares the callback for removal of the temporary file.
    - *
    - * @param {String} name
    - * @param {int} fd
    - * @param {Object} opts
    - * @api private
    - * @returns {Function} the callback
    - */
    -function _prepareTmpFileRemoveCallback(name, fd, opts) {
    -  var removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) {
    -    try {
    -      fs.closeSync(fdPath[0]);
    -    }
    -    catch (e) {
    -      // under some node/windows related circumstances, a temporary file
    -      // may have not be created as expected or the file was already closed
    -      // by the user, in which case we will simply ignore the error
    -      if (e.errno != -_c.EBADF && e.errno != -_c.ENOENT) {
    -        // reraise any unanticipated error
    -        throw e;
    -      }
    -    }
    -    fs.unlinkSync(fdPath[1]);
    -  }, [fd, name]);
    - 
    -  Eif (!opts.keep) {
    -    _removeObjects.unshift(removeCallback);
    -  }
    - 
    -  return removeCallback;
    -}
    - 
    -/**
    - * Prepares the callback for removal of the temporary directory.
    - *
    - * @param {String} name
    - * @param {Object} opts
    - * @returns {Function} the callback
    - * @api private
    - */
    -function _prepareTmpDirRemoveCallback(name, opts) {
    -  var removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs.rmdirSync.bind(fs);
    -  var removeCallback = _prepareRemoveCallback(removeFunction, name);
    - 
    -  Eif (!opts.keep) {
    -    _removeObjects.unshift(removeCallback);
    -  }
    - 
    -  return removeCallback;
    -}
    - 
    -/**
    - * Creates a guarded function wrapping the removeFunction call.
    - *
    - * @param {Function} removeFunction
    - * @param {Object} arg
    - * @returns {Function}
    - * @api private
    - */
    -function _prepareRemoveCallback(removeFunction, arg) {
    -  var called = false;
    - 
    -  return function _cleanupCallback() {
    -    Iif (called) return;
    - 
    -    var index = _removeObjects.indexOf(_cleanupCallback);
    -    Eif (index >= 0) {
    -      _removeObjects.splice(index, 1);
    -    }
    - 
    -    called = true;
    -    removeFunction(arg);
    -  };
    -}
    - 
    -/**
    - * The garbage collector.
    - *
    - * @api private
    - */
    -function _garbageCollector() {
    -  if (_uncaughtException && !_gracefulCleanup) {
    -    return;
    -  }
    - 
    -  for (var i = 0, length = _removeObjects.length; i < length; i++) {
    -    try {
    -      _removeObjects[i].call(null);
    -    } catch (e) {
    -      // already removed?
    -    }
    -  }
    -}
    - 
    -function _setGracefulCleanup() {
    -  _gracefulCleanup = true;
    -}
    - 
    -var version = process.versions.node.split('.').map(function (value) {
    -  return parseInt(value, 10);
    -});
    - 
    -Iif (version[0] === 0 && (version[1] < 9 || version[1] === 9 && version[2] < 5)) {
    -  process.addListener('uncaughtException', function _uncaughtExceptionThrown(err) {
    -    _uncaughtException = true;
    -    _garbageCollector();
    - 
    -    throw err;
    -  });
    -}
    - 
    -process.addListener('exit', function _exit(code) {
    -  if (code) _uncaughtException = true;
    -  _garbageCollector();
    -});
    - 
    -// exporting all the needed methods
    -module.exports.tmpdir = _TMP;
    -module.exports.dir = _createTmpDir;
    -module.exports.dirSync = _createTmpDirSync;
    -module.exports.file = _createTmpFile;
    -module.exports.fileSync = _createTmpFileSync;
    -module.exports.tmpName = _getTmpName;
    -module.exports.tmpNameSync = _getTmpNameSync;
    -module.exports.setGracefulCleanup = _setGracefulCleanup;
    - 
    -
    -
    - - - - - - - diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css b/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7cd..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js b/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js deleted file mode 100644 index ef51e038..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov-report/prettify.js +++ /dev/null @@ -1 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/test-eol-project/node_modules/tmp/coverage/lcov-report/sort-arrow-sprite.png b/test-eol-project/node_modules/tmp/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 03f704a609c6fd0dbfdac63466a7d7c958b5cbf3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function (a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function (a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function () { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i =0 ; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function () { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(cols); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/test-eol-project/node_modules/tmp/coverage/lcov.info b/test-eol-project/node_modules/tmp/coverage/lcov.info deleted file mode 100644 index 1f185c30..00000000 --- a/test-eol-project/node_modules/tmp/coverage/lcov.info +++ /dev/null @@ -1,300 +0,0 @@ -TN: -SF:/Users/ikaraszi/_vc/github/node-tmp/lib/tmp.js -FN:53,_randomChars -FN:79,_isUndefined -FN:92,_parseArguments -FN:112,_generateTmpName -FN:140,_getTmpName -FN:153,_getUniqueName -FN:157,(anonymous_7) -FN:176,_getTmpNameSync -FN:207,_createTmpFile -FN:216,_tmpNameCreated -FN:220,_fileCreated -FN:235,_createTmpFileSync -FN:258,_rmdirRecursiveSync -FN:296,_createTmpDir -FN:303,_tmpNameCreated -FN:307,_dirCreated -FN:322,_createTmpDirSync -FN:345,_prepareTmpFileRemoveCallback -FN:346,_removeCallback -FN:377,_prepareTmpDirRemoveCallback -FN:396,_prepareRemoveCallback -FN:399,_cleanupCallback -FN:417,_garbageCollector -FN:431,_setGracefulCleanup -FN:435,(anonymous_25) -FN:440,_uncaughtExceptionThrown -FN:448,_exit -FNF:27 -FNH:22 -FNDA:33,_randomChars -FNDA:9,_isUndefined -FNDA:79,_parseArguments -FNDA:37,_generateTmpName -FNDA:25,_getTmpName -FNDA:21,_getUniqueName -FNDA:21,(anonymous_7) -FNDA:18,_getTmpNameSync -FNDA:9,_createTmpFile -FNDA:9,_tmpNameCreated -FNDA:8,_fileCreated -FNDA:9,_createTmpFileSync -FNDA:0,_rmdirRecursiveSync -FNDA:9,_createTmpDir -FNDA:9,_tmpNameCreated -FNDA:8,_dirCreated -FNDA:9,_createTmpDirSync -FNDA:16,_prepareTmpFileRemoveCallback -FNDA:2,_removeCallback -FNDA:16,_prepareTmpDirRemoveCallback -FNDA:32,_prepareRemoveCallback -FNDA:5,_cleanupCallback -FNDA:0,_garbageCollector -FNDA:0,_setGracefulCleanup -FNDA:3,(anonymous_25) -FNDA:0,_uncaughtExceptionThrown -FNDA:0,_exit -DA:12,1 -DA:23,1 -DA:53,1 -DA:54,33 -DA:59,33 -DA:60,33 -DA:62,0 -DA:65,33 -DA:66,366 -DA:69,33 -DA:79,1 -DA:80,9 -DA:92,1 -DA:93,79 -DA:94,5 -DA:96,5 -DA:97,5 -DA:98,74 -DA:99,4 -DA:102,79 -DA:112,1 -DA:113,37 -DA:114,4 -DA:118,33 -DA:119,5 -DA:123,28 -DA:130,28 -DA:140,1 -DA:141,25 -DA:147,25 -DA:148,4 -DA:150,21 -DA:151,0 -DA:153,21 -DA:154,21 -DA:157,21 -DA:158,21 -DA:159,0 -DA:161,0 -DA:164,21 -DA:176,1 -DA:177,18 -DA:182,18 -DA:183,2 -DA:185,16 -DA:186,0 -DA:188,16 -DA:189,16 -DA:190,16 -DA:191,16 -DA:193,16 -DA:197,0 -DA:207,1 -DA:208,9 -DA:213,9 -DA:216,9 -DA:217,9 -DA:220,8 -DA:221,8 -DA:223,8 -DA:235,1 -DA:236,9 -DA:240,9 -DA:242,9 -DA:243,8 -DA:245,8 -DA:258,1 -DA:259,0 -DA:261,0 -DA:262,0 -DA:267,0 -DA:268,0 -DA:272,0 -DA:273,0 -DA:274,0 -DA:275,0 -DA:277,0 -DA:279,0 -DA:283,0 -DA:284,0 -DA:296,1 -DA:297,9 -DA:303,9 -DA:304,9 -DA:307,8 -DA:308,8 -DA:310,8 -DA:322,1 -DA:323,9 -DA:327,9 -DA:328,8 -DA:330,8 -DA:345,1 -DA:346,16 -DA:347,2 -DA:348,2 -DA:354,0 -DA:356,0 -DA:359,2 -DA:362,16 -DA:363,16 -DA:366,16 -DA:377,1 -DA:378,16 -DA:379,16 -DA:381,16 -DA:382,16 -DA:385,16 -DA:396,1 -DA:397,32 -DA:399,32 -DA:400,5 -DA:402,5 -DA:403,5 -DA:404,5 -DA:407,5 -DA:408,5 -DA:417,1 -DA:418,0 -DA:419,0 -DA:422,0 -DA:423,0 -DA:424,0 -DA:431,1 -DA:432,0 -DA:435,1 -DA:436,3 -DA:439,1 -DA:440,0 -DA:441,0 -DA:442,0 -DA:444,0 -DA:448,1 -DA:449,0 -DA:450,0 -DA:454,1 -DA:455,1 -DA:456,1 -DA:457,1 -DA:458,1 -DA:459,1 -DA:460,1 -DA:461,1 -LF:143 -LH:110 -BRDA:93,1,0,5 -BRDA:93,1,1,74 -BRDA:96,2,0,5 -BRDA:96,2,1,5 -BRDA:98,3,0,4 -BRDA:98,3,1,70 -BRDA:113,4,0,4 -BRDA:113,4,1,33 -BRDA:114,5,0,4 -BRDA:114,5,1,4 -BRDA:118,6,0,5 -BRDA:118,6,1,28 -BRDA:124,7,0,28 -BRDA:124,7,1,14 -BRDA:127,8,0,28 -BRDA:127,8,1,8 -BRDA:130,9,0,28 -BRDA:130,9,1,28 -BRDA:145,10,0,25 -BRDA:145,10,1,20 -BRDA:147,11,0,4 -BRDA:147,11,1,21 -BRDA:147,12,0,25 -BRDA:147,12,1,24 -BRDA:150,13,0,0 -BRDA:150,13,1,21 -BRDA:150,14,0,21 -BRDA:150,14,1,3 -BRDA:158,15,0,0 -BRDA:158,15,1,21 -BRDA:159,16,0,0 -BRDA:159,16,1,0 -BRDA:180,17,0,18 -BRDA:180,17,1,16 -BRDA:182,18,0,2 -BRDA:182,18,1,16 -BRDA:182,19,0,18 -BRDA:182,19,1,18 -BRDA:185,20,0,0 -BRDA:185,20,1,16 -BRDA:185,21,0,16 -BRDA:185,21,1,2 -BRDA:213,22,0,6 -BRDA:213,22,1,3 -BRDA:217,23,0,1 -BRDA:217,23,1,8 -BRDA:220,24,0,8 -BRDA:220,24,1,6 -BRDA:221,25,0,0 -BRDA:221,25,1,8 -BRDA:240,26,0,9 -BRDA:240,26,1,6 -BRDA:243,27,0,8 -BRDA:243,27,1,6 -BRDA:272,28,0,0 -BRDA:272,28,1,0 -BRDA:273,29,0,0 -BRDA:273,29,1,0 -BRDA:283,30,0,0 -BRDA:283,30,1,0 -BRDA:304,31,0,1 -BRDA:304,31,1,8 -BRDA:307,32,0,8 -BRDA:307,32,1,6 -BRDA:308,33,0,0 -BRDA:308,33,1,8 -BRDA:328,34,0,8 -BRDA:328,34,1,6 -BRDA:354,35,0,0 -BRDA:354,35,1,0 -BRDA:354,36,0,0 -BRDA:354,36,1,0 -BRDA:362,37,0,16 -BRDA:362,37,1,0 -BRDA:378,38,0,0 -BRDA:378,38,1,16 -BRDA:381,39,0,16 -BRDA:381,39,1,0 -BRDA:400,40,0,0 -BRDA:400,40,1,5 -BRDA:403,41,0,5 -BRDA:403,41,1,0 -BRDA:418,42,0,0 -BRDA:418,42,1,0 -BRDA:418,43,0,0 -BRDA:418,43,1,0 -BRDA:439,44,0,0 -BRDA:439,44,1,1 -BRDA:439,45,0,1 -BRDA:439,45,1,0 -BRDA:439,45,2,0 -BRDA:439,45,3,0 -BRDA:449,46,0,0 -BRDA:449,46,1,0 -BRF:94 -BRH:62 -end_of_record diff --git a/test-eol-project/node_modules/tmp/lib/tmp.js b/test-eol-project/node_modules/tmp/lib/tmp.js deleted file mode 100644 index bb83c7ec..00000000 --- a/test-eol-project/node_modules/tmp/lib/tmp.js +++ /dev/null @@ -1,463 +0,0 @@ -/*! - * Tmp - * - * Copyright (c) 2011-2015 KARASZI Istvan - * - * MIT Licensed - */ - -/** - * Module dependencies. - */ -var - fs = require('fs'), - path = require('path'), - crypto = require('crypto'), - tmpDir = require('os-tmpdir'), - _c = process.binding('constants'); - - -/** - * The working inner variables. - */ -var - // store the actual TMP directory - _TMP = tmpDir(), - - // the random characters to choose from - RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', - - TEMPLATE_PATTERN = /XXXXXX/, - - DEFAULT_TRIES = 3, - - CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), - - DIR_MODE = 448 /* 0700 */, - FILE_MODE = 384 /* 0600 */, - - // this will hold the objects need to be removed on exit - _removeObjects = [], - - _gracefulCleanup = false, - _uncaughtException = false; - -/** - * Random name generator based on crypto. - * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript - * - * @param {Number} howMany - * @return {String} - * @api private - */ -function _randomChars(howMany) { - var - value = [], - rnd = null; - - // make sure that we do not fail because we ran out of entropy - try { - rnd = crypto.randomBytes(howMany); - } catch (e) { - rnd = crypto.pseudoRandomBytes(howMany); - } - - for (var i = 0; i < howMany; i++) { - value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); - } - - return value.join(''); -} - -/** - * Checks whether the `obj` parameter is defined or not. - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ -function _isUndefined(obj) { - return typeof obj === 'undefined'; -} - -/** - * Parses the function arguments. - * - * This function helps to have optional arguments. - * - * @param {Object} options - * @param {Function} callback - * @api private - */ -function _parseArguments(options, callback) { - if (typeof options == 'function') { - var - tmp = options, - options = callback || {}, - callback = tmp; - } else if (typeof options == 'undefined') { - options = {}; - } - - return [options, callback]; -} - -/** - * Generates a new temporary name. - * - * @param {Object} opts - * @returns {String} - * @api private - */ -function _generateTmpName(opts) { - if (opts.name) { - return path.join(opts.dir || _TMP, opts.name); - } - - // mkstemps like template - if (opts.template) { - return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6)); - } - - // prefix and postfix - var name = [ - opts.prefix || 'tmp-', - process.pid, - _randomChars(12), - opts.postfix || '' - ].join(''); - - return path.join(opts.dir || _TMP, name); -} - -/** - * Gets a temporary file name. - * - * @param {Object} options - * @param {Function} callback - * @api private - */ -function _getTmpName(options, callback) { - var - args = _parseArguments(options, callback), - opts = args[0], - cb = args[1], - tries = opts.tries || DEFAULT_TRIES; - - if (isNaN(tries) || tries < 0) - return cb(new Error('Invalid tries')); - - if (opts.template && !opts.template.match(TEMPLATE_PATTERN)) - return cb(new Error('Invalid template provided')); - - (function _getUniqueName() { - var name = _generateTmpName(opts); - - // check whether the path exists then retry if needed - fs.stat(name, function (err) { - if (!err) { - if (tries-- > 0) return _getUniqueName(); - - return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name)); - } - - cb(null, name); - }); - }()); -} - -/** - * Synchronous version of _getTmpName. - * - * @param {Object} options - * @returns {String} - * @api private - */ -function _getTmpNameSync(options) { - var - args = _parseArguments(options), - opts = args[0], - tries = opts.tries || DEFAULT_TRIES; - - if (isNaN(tries) || tries < 0) - throw new Error('Invalid tries'); - - if (opts.template && !opts.template.match(TEMPLATE_PATTERN)) - throw new Error('Invalid template provided'); - - do { - var name = _generateTmpName(opts); - try { - fs.statSync(name); - } catch (e) { - return name; - } - } while (tries-- > 0); - - throw new Error('Could not get a unique tmp filename, max tries reached'); -} - -/** - * Creates and opens a temporary file. - * - * @param {Object} options - * @param {Function} callback - * @api public - */ -function _createTmpFile(options, callback) { - var - args = _parseArguments(options, callback), - opts = args[0], - cb = args[1]; - - opts.postfix = (_isUndefined(opts.postfix)) ? '.tmp' : opts.postfix; - - // gets a temporary filename - _getTmpName(opts, function _tmpNameCreated(err, name) { - if (err) return cb(err); - - // create and open the file - fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) { - if (err) return cb(err); - - cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts)); - }); - }); -} - -/** - * Synchronous version of _createTmpFile. - * - * @param {Object} options - * @returns {Object} object consists of name, fd and removeCallback - * @api private - */ -function _createTmpFileSync(options) { - var - args = _parseArguments(options), - opts = args[0]; - - opts.postfix = opts.postfix || '.tmp'; - - var name = _getTmpNameSync(opts); - var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); - - return { - name : name, - fd : fd, - removeCallback : _prepareTmpFileRemoveCallback(name, fd, opts) - }; -} - -/** - * Removes files and folders in a directory recursively. - * - * @param {String} root - * @api private - */ -function _rmdirRecursiveSync(root) { - var dirs = [root]; - - do { - var - dir = dirs.pop(), - deferred = false, - files = fs.readdirSync(dir); - - for (var i = 0, length = files.length; i < length; i++) { - var - file = path.join(dir, files[i]), - stat = fs.lstatSync(file); // lstat so we don't recurse into symlinked directories - - if (stat.isDirectory()) { - if (!deferred) { - deferred = true; - dirs.push(dir); - } - dirs.push(file); - } else { - fs.unlinkSync(file); - } - } - - if (!deferred) { - fs.rmdirSync(dir); - } - } while (dirs.length !== 0); -} - -/** - * Creates a temporary directory. - * - * @param {Object} options - * @param {Function} callback - * @api public - */ -function _createTmpDir(options, callback) { - var - args = _parseArguments(options, callback), - opts = args[0], - cb = args[1]; - - // gets a temporary filename - _getTmpName(opts, function _tmpNameCreated(err, name) { - if (err) return cb(err); - - // create the directory - fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) { - if (err) return cb(err); - - cb(null, name, _prepareTmpDirRemoveCallback(name, opts)); - }); - }); -} - -/** - * Synchronous version of _createTmpDir. - * - * @param {Object} options - * @returns {Object} object consists of name and removeCallback - * @api private - */ -function _createTmpDirSync(options) { - var - args = _parseArguments(options), - opts = args[0]; - - var name = _getTmpNameSync(opts); - fs.mkdirSync(name, opts.mode || DIR_MODE); - - return { - name : name, - removeCallback : _prepareTmpDirRemoveCallback(name, opts) - }; -} - -/** - * Prepares the callback for removal of the temporary file. - * - * @param {String} name - * @param {int} fd - * @param {Object} opts - * @api private - * @returns {Function} the callback - */ -function _prepareTmpFileRemoveCallback(name, fd, opts) { - var removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) { - try { - fs.closeSync(fdPath[0]); - } - catch (e) { - // under some node/windows related circumstances, a temporary file - // may have not be created as expected or the file was already closed - // by the user, in which case we will simply ignore the error - if (e.errno != -(_c.EBADF || _c.os.errno.EBADF) && e.errno != -(_c.ENOENT || _c.os.errno.ENOENT)) { - // reraise any unanticipated error - throw e; - } - } - fs.unlinkSync(fdPath[1]); - }, [fd, name]); - - if (!opts.keep) { - _removeObjects.unshift(removeCallback); - } - - return removeCallback; -} - -/** - * Prepares the callback for removal of the temporary directory. - * - * @param {String} name - * @param {Object} opts - * @returns {Function} the callback - * @api private - */ -function _prepareTmpDirRemoveCallback(name, opts) { - var removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs.rmdirSync.bind(fs); - var removeCallback = _prepareRemoveCallback(removeFunction, name); - - if (!opts.keep) { - _removeObjects.unshift(removeCallback); - } - - return removeCallback; -} - -/** - * Creates a guarded function wrapping the removeFunction call. - * - * @param {Function} removeFunction - * @param {Object} arg - * @returns {Function} - * @api private - */ -function _prepareRemoveCallback(removeFunction, arg) { - var called = false; - - return function _cleanupCallback() { - if (called) return; - - var index = _removeObjects.indexOf(_cleanupCallback); - if (index >= 0) { - _removeObjects.splice(index, 1); - } - - called = true; - removeFunction(arg); - }; -} - -/** - * The garbage collector. - * - * @api private - */ -function _garbageCollector() { - if (_uncaughtException && !_gracefulCleanup) { - return; - } - - // the function being called removes itself from _removeObjects, - // loop until _removeObjects is empty - while (_removeObjects.length) { - try { - _removeObjects[0].call(null); - } catch (e) { - // already removed? - } - } -} - -function _setGracefulCleanup() { - _gracefulCleanup = true; -} - -var version = process.versions.node.split('.').map(function (value) { - return parseInt(value, 10); -}); - -if (version[0] === 0 && (version[1] < 9 || version[1] === 9 && version[2] < 5)) { - process.addListener('uncaughtException', function _uncaughtExceptionThrown(err) { - _uncaughtException = true; - _garbageCollector(); - - throw err; - }); -} - -process.addListener('exit', function _exit(code) { - if (code) _uncaughtException = true; - _garbageCollector(); -}); - -// exporting all the needed methods -module.exports.tmpdir = _TMP; -module.exports.dir = _createTmpDir; -module.exports.dirSync = _createTmpDirSync; -module.exports.file = _createTmpFile; -module.exports.fileSync = _createTmpFileSync; -module.exports.tmpName = _getTmpName; -module.exports.tmpNameSync = _getTmpNameSync; -module.exports.setGracefulCleanup = _setGracefulCleanup; diff --git a/test-eol-project/node_modules/tmp/package.json b/test-eol-project/node_modules/tmp/package.json deleted file mode 100644 index 71f58092..00000000 --- a/test-eol-project/node_modules/tmp/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "tmp", - "version": "0.0.30", - "description": "Temporary file and directory creator", - "author": "KARASZI István (http://raszi.hu/)", - - "homepage": "http://github.com/raszi/node-tmp", - "keywords": [ "temporary", "tmp", "temp", "tempdir", "tempfile", "tmpdir", "tmpfile" ], - - "license": "MIT", - - "repository": { - "type": "git", - "url": "git://github.com/raszi/node-tmp.git" - }, - - "bugs": { - "url": "http://github.com/raszi/node-tmp/issues" - }, - - "main": "lib/tmp.js", - - "scripts": { - "test": "vows test/*-test.js" - }, - - "engines": { - "node": ">=0.4.0" - }, - - "dependencies": { - "os-tmpdir": "~1.0.1" - }, - - "devDependencies": { - "vows": "~0.7.0" - } -} diff --git a/test-eol-project/node_modules/tmp/run-tests b/test-eol-project/node_modules/tmp/run-tests deleted file mode 100755 index a377f108..00000000 --- a/test-eol-project/node_modules/tmp/run-tests +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -DIR="x" - -rm -rf ${DIR} -mkdir ${DIR} -TMPDIR=${DIR} npm test diff --git a/test-eol-project/node_modules/tmp/test/base.js b/test-eol-project/node_modules/tmp/test/base.js deleted file mode 100644 index a77f3a56..00000000 --- a/test-eol-project/node_modules/tmp/test/base.js +++ /dev/null @@ -1,149 +0,0 @@ -var - assert = require('assert'), - path = require('path'), - exec = require('child_process').exec, - tmp = require('../lib/tmp'); - -// make sure that we do not test spam the global tmp -tmp.TMP_DIR = './tmp'; - - -function _spawnTestWithError(testFile, params, cb) { - _spawnTest(true, testFile, params, cb); -} - -function _spawnTestWithoutError(testFile, params, cb) { - _spawnTest(false, testFile, params, cb); -} - -function _spawnTest(passError, testFile, params, cb) { - var - node_path = process.argv[0], - command = [ node_path, path.join(__dirname, testFile) ].concat(params).join(' '); - - exec(command, function _execDone(err, stdout, stderr) { - if (passError) { - if (err) { - return cb(err); - } else if (stderr.length > 0) { - return cb(stderr.toString()); - } - } - - return cb(null, stdout.toString()); - }); -} - -function _testStat(stat, mode) { - assert.equal(stat.uid, process.getuid(), 'should have the same UID'); - assert.equal(stat.gid, process.getgid(), 'should have the same GUID'); - assert.equal(stat.mode, mode); -} - -function _testPrefix(prefix) { - return function _testPrefixGenerated(err, name) { - assert.equal(path.basename(name).slice(0, prefix.length), prefix, 'should have the provided prefix'); - }; -} - -function _testPrefixSync(prefix) { - return function _testPrefixGeneratedSync(result) { - if (result instanceof Error) { - throw result; - } - _testPrefix(prefix)(null, result.name, result.fd); - }; -} - -function _testPostfix(postfix) { - return function _testPostfixGenerated(err, name) { - assert.equal(name.slice(name.length - postfix.length, name.length), postfix, 'should have the provided postfix'); - }; -} - -function _testPostfixSync(postfix) { - return function _testPostfixGeneratedSync(result) { - if (result instanceof Error) { - throw result; - } - _testPostfix(postfix)(null, result.name, result.fd); - }; -} - -function _testKeep(type, keep, cb) { - _spawnTestWithError('keep.js', [ type, keep ], cb); -} - -function _testKeepSync(type, keep, cb) { - _spawnTestWithError('keep-sync.js', [ type, keep ], cb); -} - -function _testGraceful(type, graceful, cb) { - _spawnTestWithoutError('graceful.js', [ type, graceful ], cb); -} - -function _testGracefulSync(type, graceful, cb) { - _spawnTestWithoutError('graceful-sync.js', [ type, graceful ], cb); -} - -function _assertName(err, name) { - assert.isString(name); - assert.isNotZero(name.length, 'an empty string is not a valid name'); -} - -function _assertNameSync(result) { - if (result instanceof Error) { - throw result; - } - var name = typeof(result) == 'string' ? result : result.name; - _assertName(null, name); -} - -function _testName(expected){ - return function _testNameGenerated(err, name) { - assert.equal(expected, name, 'should have the provided name'); - }; -} - -function _testNameSync(expected){ - return function _testNameGeneratedSync(result) { - if (result instanceof Error) { - throw result; - } - _testName(expected)(null, result.name, result.fd); - }; -} - -function _testUnsafeCleanup(unsafe, cb) { - _spawnTestWithoutError('unsafe.js', [ 'dir', unsafe ], cb); -} - -function _testIssue62(cb) { - _spawnTestWithoutError('issue62.js', [], cb); -} - -function _testUnsafeCleanupSync(unsafe, cb) { - _spawnTestWithoutError('unsafe-sync.js', [ 'dir', unsafe ], cb); -} - -function _testIssue62Sync(cb) { - _spawnTestWithoutError('issue62-sync.js', [], cb); -} - -module.exports.testStat = _testStat; -module.exports.testPrefix = _testPrefix; -module.exports.testPrefixSync = _testPrefixSync; -module.exports.testPostfix = _testPostfix; -module.exports.testPostfixSync = _testPostfixSync; -module.exports.testKeep = _testKeep; -module.exports.testKeepSync = _testKeepSync; -module.exports.testGraceful = _testGraceful; -module.exports.testGracefulSync = _testGracefulSync; -module.exports.assertName = _assertName; -module.exports.assertNameSync = _assertNameSync; -module.exports.testName = _testName; -module.exports.testNameSync = _testNameSync; -module.exports.testUnsafeCleanup = _testUnsafeCleanup; -module.exports.testIssue62 = _testIssue62; -module.exports.testUnsafeCleanupSync = _testUnsafeCleanupSync; -module.exports.testIssue62Sync = _testIssue62Sync; diff --git a/test-eol-project/node_modules/tmp/test/dir-sync-test.js b/test-eol-project/node_modules/tmp/test/dir-sync-test.js deleted file mode 100644 index 091a03e5..00000000 --- a/test-eol-project/node_modules/tmp/test/dir-sync-test.js +++ /dev/null @@ -1,230 +0,0 @@ -var - vows = require('vows'), - assert = require('assert'), - - path = require('path'), - fs = require('fs'), - existsSync = fs.existsSync || path.existsSync, - - tmp = require('../lib/tmp.js'), - Test = require('./base.js'); - - -function _testDir(mode) { - return function _testDirGenerated(result) { - assert.ok(existsSync(result.name), 'should exist'); - - var stat = fs.statSync(result.name); - assert.ok(stat.isDirectory(), 'should be a directory'); - - Test.testStat(stat, mode); - }; -} - -vows.describe('Synchronous directory creation').addBatch({ - 'when using without parameters': { - topic: function () { - return tmp.dirSync(); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a directory': _testDir(040700), - 'should have the default prefix': Test.testPrefixSync('tmp-') - }, - - 'when using with prefix': { - topic: function () { - return tmp.dirSync({ prefix: 'something' }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a directory': _testDir(040700), - 'should have the provided prefix': Test.testPrefixSync('something') - }, - - 'when using with postfix': { - topic: function () { - return tmp.dirSync({ postfix: '.txt' }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a directory': _testDir(040700), - 'should have the provided postfix': Test.testPostfixSync('.txt') - }, - - 'when using template': { - topic: function () { - return tmp.dirSync({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a directory': _testDir(040700), - 'should have the provided prefix': Test.testPrefixSync('clike-'), - 'should have the provided postfix': Test.testPostfixSync('-postfix') - }, - - 'when using name': { - topic: function () { - return tmp.dirSync({ name: 'using-name' }); - }, - - 'should return with a name': Test.assertNameSync, - 'should have the provided name': Test.testNameSync(path.join(tmp.tmpdir, 'using-name')), - 'should be a directory': function (result) { - _testDir(040700)(result); - result.removeCallback(); - assert.ok(!existsSync(result.name), 'Directory should be removed'); - } - }, - - 'when using multiple options': { - topic: function () { - return tmp.dirSync({ prefix: 'foo', postfix: 'bar', mode: 0750 }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a directory': _testDir(040750), - 'should have the provided prefix': Test.testPrefixSync('foo'), - 'should have the provided postfix': Test.testPostfixSync('bar') - }, - - 'when using multiple options and mode': { - topic: function () { - return tmp.dirSync({ prefix: 'complicated', postfix: 'options', mode: 0755 }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a directory': _testDir(040755), - 'should have the provided prefix': Test.testPrefixSync('complicated'), - 'should have the provided postfix': Test.testPostfixSync('options') - }, - - 'no tries': { - topic: function () { - try { - return tmp.dirSync({ tries: -1 }); - } - catch (e) { - return e; - } - }, - - 'should return with an error': function (topic) { - assert.instanceOf(topic, Error); - } - }, - - 'keep testing': { - topic: function () { - Test.testKeepSync('dir', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a dir': function (err, name) { - _testDir(040700)({ name: name }); - fs.rmdirSync(name); - } - }, - - 'unlink testing': { - topic: function () { - Test.testKeepSync('dir', '0', this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - } - }, - - 'non graceful testing': { - topic: function () { - Test.testGracefulSync('dir', '0', this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a dir': function (err, name) { - _testDir(040700)({ name: name }); - fs.rmdirSync(name); - } - }, - - 'graceful testing': { - topic: function () { - Test.testGracefulSync('dir', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - } - }, - - 'unsafeCleanup === true': { - topic: function () { - Test.testUnsafeCleanupSync('1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - }, - 'should remove symlinked dir': function(err, name) { - assert.ok( - !existsSync(name + '/symlinkme-target'), - 'should remove target' - ); - }, - 'should not remove contents of symlink dir': function(err, name) { - assert.ok( - existsSync(__dirname + '/symlinkme/file.js'), - 'should not remove symlinked directory\'s content' - ); - } - }, - - 'unsafeCleanup === true with issue62 structure': { - topic: function () { - Test.testIssue62Sync(this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - } - }, - - 'unsafeCleanup === false': { - topic: function () { - Test.testUnsafeCleanupSync('0', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': function (err, name) { - _testDir(040700)({name:name}); - // make sure that everything gets cleaned up - fs.unlinkSync(path.join(name, 'should-be-removed.file')); - fs.unlinkSync(path.join(name, 'symlinkme-target')); - fs.rmdirSync(name); - } - }, - - 'remove callback': { - topic: function () { - return tmp.dirSync(); - }, - - 'should return with a name': Test.assertNameSync, - 'removeCallback should remove directory': function (result) { - result.removeCallback(); - assert.ok(!existsSync(result.name), 'Directory should be removed'); - } - } -}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/dir-test.js b/test-eol-project/node_modules/tmp/test/dir-test.js deleted file mode 100644 index 9f2c282b..00000000 --- a/test-eol-project/node_modules/tmp/test/dir-test.js +++ /dev/null @@ -1,225 +0,0 @@ -var - vows = require('vows'), - assert = require('assert'), - - path = require('path'), - fs = require('fs'), - existsSync = fs.existsSync || path.existsSync, - - tmp = require('../lib/tmp.js'), - Test = require('./base.js'); - - -function _testDir(mode) { - return function _testDirGenerated(err, name) { - assert.ok(existsSync(name), 'should exist'); - - var stat = fs.statSync(name); - assert.ok(stat.isDirectory(), 'should be a directory'); - - Test.testStat(stat, mode); - }; -} - -vows.describe('Directory creation').addBatch({ - 'when using without parameters': { - topic: function () { - tmp.dir(this.callback); - }, - - 'should be a directory': _testDir(040700), - 'should have the default prefix': Test.testPrefix('tmp-') - }, - - 'when using with prefix': { - topic: function () { - tmp.dir({ prefix: 'something' }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': _testDir(040700), - 'should have the provided prefix': Test.testPrefix('something') - }, - - 'when using with postfix': { - topic: function () { - tmp.dir({ postfix: '.txt' }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': _testDir(040700), - 'should have the provided postfix': Test.testPostfix('.txt') - }, - - 'when using template': { - topic: function () { - tmp.dir({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': _testDir(040700), - 'should have the provided prefix': Test.testPrefix('clike-'), - 'should have the provided postfix': Test.testPostfix('-postfix') - }, - - 'when using name': { - topic: function () { - tmp.dir({ name: 'using-name' }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': _testDir(040700), - 'should have the provided name': Test.testName(path.join(tmp.tmpdir, 'using-name')) - }, - - 'when using multiple options': { - topic: function () { - tmp.dir({ prefix: 'foo', postfix: 'bar', mode: 0750 }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': _testDir(040750), - 'should have the provided prefix': Test.testPrefix('foo'), - 'should have the provided postfix': Test.testPostfix('bar') - }, - - 'when using multiple options and mode': { - topic: function () { - tmp.dir({ prefix: 'complicated', postfix: 'options', mode: 0755 }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': _testDir(040755), - 'should have the provided prefix': Test.testPrefix('complicated'), - 'should have the provided postfix': Test.testPostfix('options') - }, - - 'no tries': { - topic: function () { - tmp.dir({ tries: -1 }, this.callback); - }, - - 'should return with an error': assert.isObject - }, - - 'keep testing': { - topic: function () { - Test.testKeep('dir', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a dir': function (err, name) { - _testDir(040700)(err, name); - fs.rmdirSync(name); - } - }, - - 'unlink testing': { - topic: function () { - Test.testKeep('dir', '0', this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - } - }, - - 'non graceful testing': { - topic: function () { - Test.testGraceful('dir', '0', this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a dir': function (err, name) { - _testDir(040700)(err, name); - fs.rmdirSync(name); - } - }, - - 'graceful testing': { - topic: function () { - Test.testGraceful('dir', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - } - }, - - 'unsafeCleanup === true': { - topic: function () { - Test.testUnsafeCleanup('1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - }, - 'should remove symlinked dir': function(err, name) { - assert.ok( - !existsSync(name + '/symlinkme-target'), - 'should remove target' - ); - }, - 'should not remove contents of symlink dir': function(err, name) { - assert.ok( - existsSync(__dirname + '/symlinkme/file.js'), - 'should not remove symlinked directory\'s content' - ); - } - }, - - 'unsafeCleanup === true with issue62 structure': { - topic: function () { - Test.testIssue62(this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'Directory should be removed'); - } - }, - - 'unsafeCleanup === false': { - topic: function () { - Test.testUnsafeCleanup('0', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a directory': function (err, name) { - _testDir(040700)(err, name); - // make sure that everything gets cleaned up - fs.unlinkSync(path.join(name, 'should-be-removed.file')); - fs.unlinkSync(path.join(name, 'symlinkme-target')); - fs.rmdirSync(name); - } - }, - - 'remove callback': { - topic: function () { - tmp.dir(this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'removeCallback should remove directory': function (_err, name, removeCallback) { - removeCallback(); - assert.ok(!existsSync(name), 'Directory should be removed'); - } - } -}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/file-sync-test.js b/test-eol-project/node_modules/tmp/test/file-sync-test.js deleted file mode 100644 index 44c1d22f..00000000 --- a/test-eol-project/node_modules/tmp/test/file-sync-test.js +++ /dev/null @@ -1,190 +0,0 @@ -var - vows = require('vows'), - assert = require('assert'), - - path = require('path'), - fs = require('fs'), - existsSync = fs.existsSync || path.existsSync, - - tmp = require('../lib/tmp.js'), - Test = require('./base.js'); - - -function _testFile(mode, fdTest) { - return function _testFileGenerated(result) { - assert.ok(existsSync(result.name), 'should exist'); - - var stat = fs.statSync(result.name); - assert.equal(stat.size, 0, 'should have zero size'); - assert.ok(stat.isFile(), 'should be a file'); - - Test.testStat(stat, mode); - - // check with fstat as well (fd checking) - if (fdTest) { - var fstat = fs.fstatSync(result.fd); - assert.deepEqual(fstat, stat, 'fstat results should be the same'); - - var data = new Buffer('something'); - assert.equal(fs.writeSync(result.fd, data, 0, data.length, 0), data.length, 'should be writable'); - assert.ok(!fs.closeSync(result.fd), 'should not return with error'); - } - }; -} - -vows.describe('Synchronous file creation').addBatch({ - 'when using without parameters': { - topic: function () { - return tmp.fileSync(); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a file': _testFile(0100600, true), - 'should have the default prefix': Test.testPrefixSync('tmp-'), - 'should have the default postfix': Test.testPostfixSync('.tmp') - }, - - 'when using with prefix': { - topic: function () { - return tmp.fileSync({ prefix: 'something' }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a file': _testFile(0100600, true), - 'should have the provided prefix': Test.testPrefixSync('something') - }, - - 'when using with postfix': { - topic: function () { - return tmp.fileSync({ postfix: '.txt' }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a file': _testFile(0100600, true), - 'should have the provided postfix': Test.testPostfixSync('.txt') - }, - - 'when using template': { - topic: function () { - return tmp.fileSync({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a file': _testFile(0100600, true), - 'should have the provided prefix': Test.testPrefixSync('clike-'), - 'should have the provided postfix': Test.testPostfixSync('-postfix') - }, - - 'when using name': { - topic: function () { - return tmp.fileSync({ name: 'using-name.tmp' }); - }, - - 'should return with a name': Test.assertNameSync, - 'should have the provided name': Test.testNameSync(path.join(tmp.tmpdir, 'using-name.tmp')), - 'should be a file': function (result) { - _testFile(0100600, true); - fs.unlinkSync(result.name); - } - }, - - 'when using multiple options': { - topic: function () { - return tmp.fileSync({ prefix: 'foo', postfix: 'bar', mode: 0640 }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a file': _testFile(0100640, true), - 'should have the provided prefix': Test.testPrefixSync('foo'), - 'should have the provided postfix': Test.testPostfixSync('bar') - }, - - 'when using multiple options and mode': { - topic: function () { - return tmp.fileSync({ prefix: 'complicated', postfix: 'options', mode: 0644 }); - }, - - 'should return with a name': Test.assertNameSync, - 'should be a file': _testFile(0100644, true), - 'should have the provided prefix': Test.testPrefixSync('complicated'), - 'should have the provided postfix': Test.testPostfixSync('options') - }, - - 'no tries': { - topic: function () { - try { - return tmp.fileSync({ tries: -1 }); - } - catch (e) { - return e; - } - }, - - 'should return with an error': function (topic) { - assert.instanceOf(topic, Error); - } - }, - - 'keep testing': { - topic: function () { - Test.testKeepSync('file', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': function (err, name) { - _testFile(0100600, false)({name:name}); - fs.unlinkSync(name); - } - }, - - 'unlink testing': { - topic: function () { - Test.testKeepSync('file', '0', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'File should be removed'); - } - }, - - 'non graceful testing': { - topic: function () { - Test.testGracefulSync('file', '0', this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': function (err, name) { - _testFile(0100600, false)({name:name}); - fs.unlinkSync(name); - } - }, - - 'graceful testing': { - topic: function () { - Test.testGracefulSync('file', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'File should be removed'); - } - }, - - 'remove callback': { - topic: function () { - return tmp.fileSync(); - }, - - 'should return with a name': Test.assertNameSync, - 'removeCallback should remove file': function (result) { - result.removeCallback(); - assert.ok(!existsSync(result.name), 'File should be removed'); - } - } - -}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/file-test.js b/test-eol-project/node_modules/tmp/test/file-test.js deleted file mode 100644 index b710859c..00000000 --- a/test-eol-project/node_modules/tmp/test/file-test.js +++ /dev/null @@ -1,191 +0,0 @@ -var - vows = require('vows'), - assert = require('assert'), - - path = require('path'), - fs = require('fs'), - existsSync = fs.existsSync || path.existsSync, - - tmp = require('../lib/tmp.js'), - Test = require('./base.js'); - - -function _testFile(mode, fdTest) { - return function _testFileGenerated(err, name, fd) { - assert.ok(existsSync(name), 'should exist'); - - var stat = fs.statSync(name); - assert.equal(stat.size, 0, 'should have zero size'); - assert.ok(stat.isFile(), 'should be a file'); - - Test.testStat(stat, mode); - - // check with fstat as well (fd checking) - if (fdTest) { - var fstat = fs.fstatSync(fd); - assert.deepEqual(fstat, stat, 'fstat results should be the same'); - - var data = new Buffer('something'); - assert.equal(fs.writeSync(fd, data, 0, data.length, 0), data.length, 'should be writable'); - assert.ok(!fs.closeSync(fd), 'should not return with error'); - } - }; -} - -vows.describe('File creation').addBatch({ - 'when using without parameters': { - topic: function () { - tmp.file(this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': _testFile(0100600, true), - 'should have the default prefix': Test.testPrefix('tmp-'), - 'should have the default postfix': Test.testPostfix('.tmp') - }, - - 'when using with prefix': { - topic: function () { - tmp.file({ prefix: 'something' }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': _testFile(0100600, true), - 'should have the provided prefix': Test.testPrefix('something') - }, - - 'when using with postfix': { - topic: function () { - tmp.file({ postfix: '.txt' }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': _testFile(0100600, true), - 'should have the provided postfix': Test.testPostfix('.txt') - }, - - 'when using template': { - topic: function () { - tmp.file({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': _testFile(0100600, true), - 'should have the provided prefix': Test.testPrefix('clike-'), - 'should have the provided postfix': Test.testPostfix('-postfix') - }, - - 'when using name': { - topic: function () { - tmp.file({ name: 'using-name.tmp' }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should have the provided name': Test.testName(path.join(tmp.tmpdir, 'using-name.tmp')), - 'should be a file': function (err, name) { - _testFile(0100600, true); - fs.unlinkSync(name); - } - }, - - 'when using multiple options': { - topic: function () { - tmp.file({ prefix: 'foo', postfix: 'bar', mode: 0640 }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': _testFile(0100640, true), - 'should have the provided prefix': Test.testPrefix('foo'), - 'should have the provided postfix': Test.testPostfix('bar') - }, - - 'when using multiple options and mode': { - topic: function () { - tmp.file({ prefix: 'complicated', postfix: 'options', mode: 0644 }, this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': _testFile(0100644, true), - 'should have the provided prefix': Test.testPrefix('complicated'), - 'should have the provided postfix': Test.testPostfix('options') - }, - - 'no tries': { - topic: function () { - tmp.file({ tries: -1 }, this.callback); - }, - - 'should not be created': assert.isObject - }, - - 'keep testing': { - topic: function () { - Test.testKeep('file', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': function (err, name) { - _testFile(0100600, false)(err, name, null); - fs.unlinkSync(name); - } - }, - - 'unlink testing': { - topic: function () { - Test.testKeep('file', '0', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'File should be removed'); - } - }, - - 'non graceful testing': { - topic: function () { - Test.testGraceful('file', '0', this.callback); - }, - - 'should not return with error': assert.isNull, - 'should return with a name': Test.assertName, - 'should be a file': function (err, name) { - _testFile(0100600, false)(err, name, null); - fs.unlinkSync(name); - } - }, - - 'graceful testing': { - topic: function () { - Test.testGraceful('file', '1', this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'should not exist': function (err, name) { - assert.ok(!existsSync(name), 'File should be removed'); - } - }, - - 'remove callback': { - topic: function () { - tmp.file(this.callback); - }, - - 'should not return with an error': assert.isNull, - 'should return with a name': Test.assertName, - 'removeCallback should remove file': function (_err, name, _fd, removeCallback) { - removeCallback(); - assert.ok(!existsSync(name), 'File should be removed'); - } - } - -}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/graceful-sync.js b/test-eol-project/node_modules/tmp/test/graceful-sync.js deleted file mode 100644 index 37766ffa..00000000 --- a/test-eol-project/node_modules/tmp/test/graceful-sync.js +++ /dev/null @@ -1,20 +0,0 @@ -var - tmp = require('../lib/tmp'), - spawn = require('./spawn-sync'); - -var graceful = spawn.arg; - -if (graceful) { - tmp.setGracefulCleanup(); -} - -try { - var result = spawn.tmpFunction(); - spawn.out(result.name, function () { - throw new Error('Thrown on purpose'); - }); -} -catch (e) { - spawn.err(e, spawn.exit); -} - diff --git a/test-eol-project/node_modules/tmp/test/graceful.js b/test-eol-project/node_modules/tmp/test/graceful.js deleted file mode 100644 index dbe554e1..00000000 --- a/test-eol-project/node_modules/tmp/test/graceful.js +++ /dev/null @@ -1,15 +0,0 @@ -var - tmp = require('../lib/tmp'), - spawn = require('./spawn'); - -var graceful = spawn.arg; - -if (graceful) { - tmp.setGracefulCleanup(); -} - -spawn.tmpFunction(function (err, name) { - spawn.out(name, function () { - throw new Error('Thrown on purpose'); - }); -}); diff --git a/test-eol-project/node_modules/tmp/test/issue62-sync.js b/test-eol-project/node_modules/tmp/test/issue62-sync.js deleted file mode 100644 index 94840c66..00000000 --- a/test-eol-project/node_modules/tmp/test/issue62-sync.js +++ /dev/null @@ -1,27 +0,0 @@ - -var - fs = require('fs'), - join = require('path').join, - spawn = require('./spawn-sync'); - -try { - var result = spawn.tmpFunction({ unsafeCleanup: true }); - try { - // creates structure from issue 62 - // https://github.com/raszi/node-tmp/issues/62 - - fs.mkdirSync(join(result.name, 'issue62')); - - ['foo', 'bar'].forEach(function(subdir) { - fs.mkdirSync(join(result.name, 'issue62', subdir)); - fs.writeFileSync(join(result.name, 'issue62', subdir, 'baz.txt'), ''); - }); - - spawn.out(result.name, spawn.exit); - } catch (e) { - spawn.err(e.toString(), spawn.exit); - } -} -catch (e) { - spawn.err(e, spawn.exit); -} diff --git a/test-eol-project/node_modules/tmp/test/issue62.js b/test-eol-project/node_modules/tmp/test/issue62.js deleted file mode 100644 index 004e1907..00000000 --- a/test-eol-project/node_modules/tmp/test/issue62.js +++ /dev/null @@ -1,27 +0,0 @@ -var - fs = require('fs'), - join = require('path').join, - spawn = require('./spawn'); - -spawn.tmpFunction({ unsafeCleanup: true }, function (err, name) { - if (err) { - spawn.err(err, spawn.exit); - return; - } - - try { - // creates structure from issue 62 - // https://github.com/raszi/node-tmp/issues/62 - - fs.mkdirSync(join(name, 'issue62')); - - ['foo', 'bar'].forEach(function(subdir) { - fs.mkdirSync(join(name, 'issue62', subdir)); - fs.writeFileSync(join(name, 'issue62', subdir, 'baz.txt'), ''); - }); - - spawn.out(name, spawn.exit); - } catch (e) { - spawn.err(e.toString(), spawn.exit); - } -}); diff --git a/test-eol-project/node_modules/tmp/test/keep-sync.js b/test-eol-project/node_modules/tmp/test/keep-sync.js deleted file mode 100644 index 6cd8b186..00000000 --- a/test-eol-project/node_modules/tmp/test/keep-sync.js +++ /dev/null @@ -1,12 +0,0 @@ -var spawn = require('./spawn-sync'); - -var keep = spawn.arg; - -try { - var result = spawn.tmpFunction({ keep: keep }); - spawn.out(result.name, spawn.exit); -} -catch (e) { - spawn.err(err, spawn.exit); -} - diff --git a/test-eol-project/node_modules/tmp/test/keep.js b/test-eol-project/node_modules/tmp/test/keep.js deleted file mode 100644 index 9538605d..00000000 --- a/test-eol-project/node_modules/tmp/test/keep.js +++ /dev/null @@ -1,11 +0,0 @@ -var spawn = require('./spawn'); - -var keep = spawn.arg; - -spawn.tmpFunction({ keep: keep }, function (err, name) { - if (err) { - spawn.err(err, spawn.exit); - } else { - spawn.out(name, spawn.exit); - } -}); diff --git a/test-eol-project/node_modules/tmp/test/name-test.js b/test-eol-project/node_modules/tmp/test/name-test.js deleted file mode 100644 index a242c21b..00000000 --- a/test-eol-project/node_modules/tmp/test/name-test.js +++ /dev/null @@ -1,82 +0,0 @@ -var - vows = require('vows'), - assert = require('assert'), - - path = require('path'), - - tmp = require('../lib/tmp.js'), - Test = require('./base.js'); - -vows.describe('Name creation').addBatch({ - 'when using without parameters': { - topic: function () { - tmp.tmpName(this.callback); - }, - - 'should not return with error': assert.isNull, - 'should have the default prefix': Test.testPrefix('tmp-') - }, - - 'when using with prefix': { - topic: function () { - tmp.tmpName({ prefix: 'something' }, this.callback); - }, - - 'should not return with error': assert.isNull, - 'should have the provided prefix': Test.testPrefix('something') - }, - - 'when using with postfix': { - topic: function () { - tmp.tmpName({ postfix: '.txt' }, this.callback); - }, - - 'should not return with error': assert.isNull, - 'should have the provided postfix': Test.testPostfix('.txt') - - }, - - 'when using template': { - topic: function () { - tmp.tmpName({ template: path.join(tmp.tmpdir, 'clike-XXXXXX-postfix') }, this.callback); - }, - - 'should not return with error': assert.isNull, - 'should have the provided prefix': Test.testPrefix('clike-'), - 'should have the provided postfix': Test.testPostfix('-postfix'), - 'should have template filled': function (err, name) { - assert.isTrue(/[a-zA-Z0-9]{6}/.test(name)); - } - }, - - 'when using multiple options': { - topic: function () { - tmp.tmpName({ prefix: 'foo', postfix: 'bar', tries: 5 }, this.callback); - }, - - 'should not return with error': assert.isNull, - 'should have the provided prefix': Test.testPrefix('foo'), - 'should have the provided postfix': Test.testPostfix('bar') - }, - - 'no tries': { - topic: function () { - tmp.tmpName({ tries: -1 }, this.callback); - }, - - 'should fail': function (err, name) { - assert.isObject(err); - } - }, - - 'tries not numeric': { - topic: function () { - tmp.tmpName({ tries: 'hello'}, this.callback); - }, - - 'should fail': function (err, name) { - assert.isObject(err); - } - } - -}).exportTo(module); diff --git a/test-eol-project/node_modules/tmp/test/spawn-sync.js b/test-eol-project/node_modules/tmp/test/spawn-sync.js deleted file mode 100644 index bde2db46..00000000 --- a/test-eol-project/node_modules/tmp/test/spawn-sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var - fs = require('fs'), - tmp = require('../lib/tmp'); - -function _writeSync(stream, str, cb) { - var flushed = stream.write(str); - if (flushed) { - return cb(null); - } - - stream.once('drain', function _flushed() { - cb(null); - }); -} - -module.exports.out = function (str, cb) { - _writeSync(process.stdout, str, cb); -}; - -module.exports.err = function (str, cb) { - _writeSync(process.stderr, str, cb); -}; - -module.exports.exit = function () { - process.exit(0); -}; - -var type = process.argv[2]; -module.exports.tmpFunction = (type == 'file') ? tmp.fileSync : tmp.dirSync; - -var arg = (process.argv[3] && parseInt(process.argv[3], 10) === 1) ? true : false; -module.exports.arg = arg; diff --git a/test-eol-project/node_modules/tmp/test/spawn.js b/test-eol-project/node_modules/tmp/test/spawn.js deleted file mode 100644 index 6468eb39..00000000 --- a/test-eol-project/node_modules/tmp/test/spawn.js +++ /dev/null @@ -1,32 +0,0 @@ -var - fs = require('fs'), - tmp = require('../lib/tmp'); - -function _writeSync(stream, str, cb) { - var flushed = stream.write(str); - if (flushed) { - return cb(null); - } - - stream.once('drain', function _flushed() { - cb(null); - }); -} - -module.exports.out = function (str, cb) { - _writeSync(process.stdout, str, cb); -}; - -module.exports.err = function (str, cb) { - _writeSync(process.stderr, str, cb); -}; - -module.exports.exit = function () { - process.exit(0); -}; - -var type = process.argv[2]; -module.exports.tmpFunction = (type == 'file') ? tmp.file : tmp.dir; - -var arg = (process.argv[3] && parseInt(process.argv[3], 10) === 1) ? true : false; -module.exports.arg = arg; diff --git a/test-eol-project/node_modules/tmp/test/symlinkme/file.js b/test-eol-project/node_modules/tmp/test/symlinkme/file.js deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/tmp/test/unsafe-sync.js b/test-eol-project/node_modules/tmp/test/unsafe-sync.js deleted file mode 100644 index 97717d05..00000000 --- a/test-eol-project/node_modules/tmp/test/unsafe-sync.js +++ /dev/null @@ -1,30 +0,0 @@ -var - fs = require('fs'), - join = require('path').join, - spawn = require('./spawn-sync'); - -var unsafe = spawn.arg; - -try { - var result = spawn.tmpFunction({ unsafeCleanup: unsafe }); - try { - // file that should be removed - var fd = fs.openSync(join(result.name, 'should-be-removed.file'), 'w'); - fs.closeSync(fd); - - // in tree source - var symlinkSource = join(__dirname, 'symlinkme'); - // testing target - var symlinkTarget = join(result.name, 'symlinkme-target'); - - // symlink that should be removed but the contents should be preserved. - fs.symlinkSync(symlinkSource, symlinkTarget, 'dir'); - - spawn.out(result.name, spawn.exit); - } catch (e) { - spawn.err(e.toString(), spawn.exit); - } -} -catch (e) { - spawn.err(err, spawn.exit); -} diff --git a/test-eol-project/node_modules/tmp/test/unsafe.js b/test-eol-project/node_modules/tmp/test/unsafe.js deleted file mode 100644 index 73e4fb34..00000000 --- a/test-eol-project/node_modules/tmp/test/unsafe.js +++ /dev/null @@ -1,30 +0,0 @@ -var - fs = require('fs'), - join = require('path').join, - spawn = require('./spawn'); - -var unsafe = spawn.arg; -spawn.tmpFunction({ unsafeCleanup: unsafe }, function (err, name) { - if (err) { - spawn.err(err, spawn.exit); - return; - } - - try { - // file that should be removed - var fd = fs.openSync(join(name, 'should-be-removed.file'), 'w'); - fs.closeSync(fd); - - // in tree source - var symlinkSource = join(__dirname, 'symlinkme'); - // testing target - var symlinkTarget = join(name, 'symlinkme-target'); - - // symlink that should be removed but the contents should be preserved. - fs.symlinkSync(symlinkSource, symlinkTarget, 'dir'); - - spawn.out(name, spawn.exit); - } catch (e) { - spawn.err(e.toString(), spawn.exit); - } -}); diff --git a/test-eol-project/node_modules/tough-cookie/LICENSE b/test-eol-project/node_modules/tough-cookie/LICENSE deleted file mode 100644 index 22204e87..00000000 --- a/test-eol-project/node_modules/tough-cookie/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2015, Salesforce.com, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of Salesforce.com 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 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/test-eol-project/node_modules/tough-cookie/README.md b/test-eol-project/node_modules/tough-cookie/README.md deleted file mode 100644 index 656a2555..00000000 --- a/test-eol-project/node_modules/tough-cookie/README.md +++ /dev/null @@ -1,527 +0,0 @@ -[RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js - -[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/) - -[![Build Status](https://travis-ci.org/salesforce/tough-cookie.png?branch=master)](https://travis-ci.org/salesforce/tough-cookie) - -# Synopsis - -``` javascript -var tough = require('tough-cookie'); -var Cookie = tough.Cookie; -var cookie = Cookie.parse(header); -cookie.value = 'somethingdifferent'; -header = cookie.toString(); - -var cookiejar = new tough.CookieJar(); -cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); -// ... -cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { - res.headers['cookie'] = cookies.join('; '); -}); -``` - -# Installation - -It's _so_ easy! - -`npm install tough-cookie` - -Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. - -## Version Support - -Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module. - -# API - -## tough - -Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". - -**Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary. - -### `parseDate(string)` - -Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. - -### `formatDate(date)` - -Format a Date into a RFC1123 string (the RFC6265-recommended format). - -### `canonicalDomain(str)` - -Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). - -### `domainMatch(str,domStr[,canonicalize=true])` - -Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". - -The `canonicalize` parameter will run the other two parameters through `canonicalDomain` or not. - -### `defaultPath(path)` - -Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. - -The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. - -### `pathMatch(reqPath,cookiePath)` - -Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. - -This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. - -### `parse(cookieString[, options])` - -alias for `Cookie.parse(cookieString[, options])` - -### `fromJSON(string)` - -alias for `Cookie.fromJSON(string)` - -### `getPublicSuffix(hostname)` - -Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. - -For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. - -For further information, see http://publicsuffix.org/. This module derives its list from that site. This call is currently a wrapper around [`psl`](https://www.npmjs.com/package/psl)'s [get() method](https://www.npmjs.com/package/psl#pslgetdomain). - -### `cookieCompare(a,b)` - -For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence: - -* Longest `.path` -* oldest `.creation` (which has a 1ms precision, same as `Date`) -* lowest `.creationIndex` (to get beyond the 1ms precision) - -``` javascript -var cookies = [ /* unsorted array of Cookie objects */ ]; -cookies = cookies.sort(cookieCompare); -``` - -**Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`. - -### `permuteDomain(domain)` - -Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. - -### `permutePath(path)` - -Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. - - -## Cookie - -Exported via `tough.Cookie`. - -### `Cookie.parse(cookieString[, options])` - -Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. - -The options parameter is not required and currently has only one property: - - * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant. - -If options is not an object, it is ignored, which means you can use `Array#map` with it. - -Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: - -``` javascript -if (res.headers['set-cookie'] instanceof Array) - cookies = res.headers['set-cookie'].map(Cookie.parse); -else - cookies = [Cookie.parse(res.headers['set-cookie'])]; -``` - -_Note:_ in version 2.3.3, tough-cookie limited the number of spaces before the `=` to 256 characters. This limitation has since been removed. -See [Issue 92](https://github.com/salesforce/tough-cookie/issues/92) - -### Properties - -Cookie object properties: - - * _key_ - string - the name or key of the cookie (default "") - * _value_ - string - the value of the cookie (default "") - * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` - * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` - * _domain_ - string - the `Domain=` attribute of the cookie - * _path_ - string - the `Path=` of the cookie - * _secure_ - boolean - the `Secure` cookie flag - * _httpOnly_ - boolean - the `HttpOnly` cookie flag - * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) - * _creation_ - `Date` - when this cookie was constructed - * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation) - -After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: - - * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) - * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. - * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar - * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. - -### `Cookie([{properties}])` - -Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties. - -### `.toString()` - -encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. - -### `.cookieString()` - -encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). - -### `.setExpires(String)` - -sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. - -### `.setMaxAge(number)` - -sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. - -### `.expiryTime([now=Date.now()])` - -### `.expiryDate([now=Date.now()])` - -expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. - -Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` parameter -- is used to offset the `.maxAge` attribute. - -If Expires (`.expires`) is set, that's returned. - -Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). - -### `.TTL([now=Date.now()])` - -compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. - -The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. - -### `.canonicalizedDomain()` - -### `.cdomain()` - -return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. - -### `.toJSON()` - -For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized. - -Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`). - -**NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. - -### `Cookie.fromJSON(strOrObj)` - -Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first. - -Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer. - -Returns `null` upon JSON parsing error. - -### `.clone()` - -Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`. - -### `.validate()` - -Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. - -validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: - -``` javascript -if (cookie.validate() === true) { - // it's tasty -} else { - // yuck! -} -``` - - -## CookieJar - -Exported via `tough.CookieJar`. - -### `CookieJar([store],[options])` - -Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. - -The `options` object can be omitted and can have the following properties: - - * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk" - * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name. - This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers. - -Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. - -### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))` - -Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.creation`, `.lastAccessed` and `.hostOnly` properties. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. `Store` errors aren't ignored by this option. - -As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). - -### `.setCookieSync(cookieOrString, currentUrl, [{options}])` - -Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getCookies(currentUrl, [{options},] cb(err,cookies))` - -Retrieve the list of cookies that can be sent in a Cookie header for the current url. - -If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). - * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the underlying store (the default `MemoryCookieStore` supports it). - -The `.lastAccessed` property of the returned cookies will have been updated. - -### `.getCookiesSync(currentUrl, [{options}])` - -Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getCookieString(...)` - -Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. - -### `.getCookieStringSync(...)` - -Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.getSetCookieStrings(...)` - -Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`. - -### `.getSetCookieStringsSync(...)` - -Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`). - -### `.serialize(cb(err,serializedObject))` - -Serialize the Jar if the underlying store supports `.getAllCookies`. - -**NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array. - -See [Serialization Format]. - -### `.serializeSync()` - -Sync version of .serialize - -### `.toJSON()` - -Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`. - -### `CookieJar.deserialize(serialized, [store], cb(err,object))` - -A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization. - -The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. - -As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback. - -### `CookieJar.deserializeSync(serialized, [store])` - -Sync version of `.deserialize`. _Note_ that the `store` must be synchronous for this to work. - -### `CookieJar.fromJSON(string)` - -Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`. - -### `.clone([store,]cb(err,newJar))` - -Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa. - -The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`. - -### `.cloneSync([store])` - -Synchronous version of `.clone`, returning a new `CookieJar` instance. - -The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used. - -The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls. - -### `.removeAllCookies(cb(err))` - -Removes all cookies from the jar. - -This is a new backwards-compatible feature of `tough-cookie` version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement `removeAllCookies`, the fallback is to call `removeCookie` after `getAllCookies`. If `getAllCookies` fails or isn't implemented in the Store, that error is returned. If one or more of the `removeCookie` calls fail, only the first error is returned. - -### `.removeAllCookiesSync()` - -Sync version of `.removeAllCookies()` - -## Store - -Base class for CookieJar stores. Available as `tough.Store`. - -## Store API - -The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. - -Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. - -Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style - -All `domain` parameters will have been normalized before calling. - -The Cookie store must have all of the following methods. - -### `store.findCookie(domain, path, key, cb(err,cookie))` - -Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. - -Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). - -### `store.findCookies(domain, path, cb(err,cookies))` - -Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. - -If no cookies are found, the callback MUST be passed an empty array. - -The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. - -As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). - -### `store.putCookie(cookie, cb(err))` - -Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. - -The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. - -Pass an error if the cookie cannot be stored. - -### `store.updateCookie(oldCookie, newCookie, cb(err))` - -Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. - -The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock). Both `.creation` and `.creationIndex` are guaranteed to be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement). - -Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. - -The `newCookie` and `oldCookie` objects MUST NOT be modified. - -Pass an error if the newCookie cannot be stored. - -### `store.removeCookie(domain, path, key, cb(err))` - -Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). - -The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. - -### `store.removeCookies(domain, path, cb(err))` - -Removes matching cookies from the store. The `path` parameter is optional, and if missing means all paths in a domain should be removed. - -Pass an error ONLY if removing any existing cookies failed. - -### `store.removeAllCookies(cb(err))` - -_Optional_. Removes all cookies from the store. - -Pass an error if one or more cookies can't be removed. - -**Note**: New method as of `tough-cookie` version 2.5, so not all Stores will implement this, plus some stores may choose not to implement this. - -### `store.getAllCookies(cb(err, cookies))` - -_Optional_. Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure. - -Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms. See `compareCookies` for more detail. - -Pass an error if retrieval fails. - -**Note**: not all Stores can implement this due to technical limitations, so it is optional. - -## MemoryCookieStore - -Inherits from `Store`. - -A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. Supports serialization, `getAllCookies`, and `removeAllCookies`. - -## Community Cookie Stores - -These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look: - -- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases -- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk -- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis -- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk -- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage - - -# Serialization Format - -**NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. - -```js - { - // The version of tough-cookie that serialized this jar. - version: 'tough-cookie@1.x.y', - - // add the store type, to make humans happy: - storeType: 'MemoryCookieStore', - - // CookieJar configuration: - rejectPublicSuffixes: true, - // ... future items go here - - // Gets filled from jar.store.getAllCookies(): - cookies: [ - { - key: 'string', - value: 'string', - // ... - /* other Cookie.serializableProperties go here */ - } - ] - } -``` - -# Copyright and License - -BSD-3-Clause: - -```text - Copyright (c) 2015, Salesforce.com, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Salesforce.com 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 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/test-eol-project/node_modules/tough-cookie/lib/cookie.js b/test-eol-project/node_modules/tough-cookie/lib/cookie.js deleted file mode 100644 index 32dc0f8d..00000000 --- a/test-eol-project/node_modules/tough-cookie/lib/cookie.js +++ /dev/null @@ -1,1482 +0,0 @@ -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com 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 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. - */ -'use strict'; -var net = require('net'); -var urlParse = require('url').parse; -var util = require('util'); -var pubsuffix = require('./pubsuffix-psl'); -var Store = require('./store').Store; -var MemoryCookieStore = require('./memstore').MemoryCookieStore; -var pathMatch = require('./pathMatch').pathMatch; -var VERSION = require('./version'); - -var punycode; -try { - punycode = require('punycode'); -} catch(e) { - console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); -} - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - -var CONTROL_CHARS = /[\x00-\x1F]/; - -// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in -// the "relaxed" mode, see: -// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 -var TERMINATORS = ['\n', '\r', '\0']; - -// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - -// date-time parsing constants (RFC6265 S5.1.1) - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, - jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var MAX_TIME = 2147483647000; // 31-bit max -var MIN_TIME = 0; // 31-bit min - -/* - * Parses a Natural number (i.e., non-negative integer) with either the - * *DIGIT ( non-digit *OCTET ) - * or - * *DIGIT - * grammar (RFC6265 S5.1.1). - * - * The "trailingOK" boolean controls if the grammar accepts a - * "( non-digit *OCTET )" trailer. - */ -function parseDigits(token, minDigits, maxDigits, trailingOK) { - var count = 0; - while (count < token.length) { - var c = token.charCodeAt(count); - // "non-digit = %x00-2F / %x3A-FF" - if (c <= 0x2F || c >= 0x3A) { - break; - } - count++; - } - - // constrain to a minimum and maximum number of digits. - if (count < minDigits || count > maxDigits) { - return null; - } - - if (!trailingOK && count != token.length) { - return null; - } - - return parseInt(token.substr(0,count), 10); -} - -function parseTime(token) { - var parts = token.split(':'); - var result = [0,0,0]; - - /* RF6256 S5.1.1: - * time = hms-time ( non-digit *OCTET ) - * hms-time = time-field ":" time-field ":" time-field - * time-field = 1*2DIGIT - */ - - if (parts.length !== 3) { - return null; - } - - for (var i = 0; i < 3; i++) { - // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be - // followed by "( non-digit *OCTET )" so therefore the last time-field can - // have a trailer - var trailingOK = (i == 2); - var num = parseDigits(parts[i], 1, 2, trailingOK); - if (num === null) { - return null; - } - result[i] = num; - } - - return result; -} - -function parseMonth(token) { - token = String(token).substr(0,3).toLowerCase(); - var num = MONTH_TO_NUM[token]; - return num >= 0 ? num : null; -} - -/* - * RFC6265 S5.1.1 date parser (see RFC for full grammar) - */ -function parseDate(str) { - if (!str) { - return; - } - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) { - return; - } - - var hour = null; - var minute = null; - var second = null; - var dayOfMonth = null; - var month = null; - var year = null; - - for (var i=0; i= 70 && year <= 99) { - year += 1900; - } else if (year >= 0 && year <= 69) { - year += 2000; - } - } - } - } - - /* RFC 6265 S5.1.1 - * "5. Abort these steps and fail to parse the cookie-date if: - * * at least one of the found-day-of-month, found-month, found- - * year, or found-time flags is not set, - * * the day-of-month-value is less than 1 or greater than 31, - * * the year-value is less than 1601, - * * the hour-value is greater than 23, - * * the minute-value is greater than 59, or - * * the second-value is greater than 59. - * (Note that leap seconds cannot be represented in this syntax.)" - * - * So, in order as above: - */ - if ( - dayOfMonth === null || month === null || year === null || second === null || - dayOfMonth < 1 || dayOfMonth > 31 || - year < 1601 || - hour > 23 || - minute > 59 || - second > 59 - ) { - return; - } - - return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) { - return null; - } - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) { - str = punycode.toASCII(str); - } - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) { - return null; - } - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) { - return true; - } - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) { - return false; - } - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) { - return false; // it's a non-match (-1) or prefix (0) - } - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) { // it's not a suffix - return false; - } - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') { - return false; - } - - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") { - return "/"; - } - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") { - return path; - } - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) { - return "/"; - } - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - -function trimTerminator(str) { - for (var t = 0; t < TERMINATORS.length; t++) { - var terminatorIdx = str.indexOf(TERMINATORS[t]); - if (terminatorIdx !== -1) { - str = str.substr(0,terminatorIdx); - } - } - - return str; -} - -function parseCookiePair(cookiePair, looseMode) { - cookiePair = trimTerminator(cookiePair); - - var firstEq = cookiePair.indexOf('='); - if (looseMode) { - if (firstEq === 0) { // '=' is immediately at start - cookiePair = cookiePair.substr(1); - firstEq = cookiePair.indexOf('='); // might still need to split on '=' - } - } else { // non-loose mode - if (firstEq <= 0) { // no '=' or is at start - return; // needs to have non-empty "cookie-name" - } - } - - var cookieName, cookieValue; - if (firstEq <= 0) { - cookieName = ""; - cookieValue = cookiePair.trim(); - } else { - cookieName = cookiePair.substr(0, firstEq).trim(); - cookieValue = cookiePair.substr(firstEq+1).trim(); - } - - if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { - return; - } - - var c = new Cookie(); - c.key = cookieName; - c.value = cookieValue; - return c; -} - -function parse(str, options) { - if (!options || typeof options !== 'object') { - options = {}; - } - str = str.trim(); - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); - var c = parseCookiePair(cookiePair, !!options.loose); - if (!c) { - return; - } - - if (firstSemi === -1) { - return c; - } - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi + 1).trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) { - return c; - } - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(';'); - while (cookie_avs.length) { - var av = cookie_avs.shift().trim(); - if (av.length === 0) { // happens if ";;" appears - continue; - } - var av_sep = av.indexOf('='); - var av_key, av_value; - - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - - if (av_value) { - av_value = av_value.trim(); - } - - switch(av_key) { - case 'expires': // S5.2.1 - if (av_value) { - var exp = parseDate(av_value); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp) { - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - c.expires = exp; - } - } - break; - - case 'max-age': // S5.2.2 - if (av_value) { - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (/^-?[0-9]+$/.test(av_value)) { - var delta = parseInt(av_value, 10); - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - } - } - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (av_value) { - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./, ''); - if (domain) { - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - } - } - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - c.path = av_value && av_value[0] === "/" ? av_value : null; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - return c; -} - -// avoid the V8 deoptimization monster! -function jsonParse(str) { - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return e; - } - return obj; -} - -function fromJSON(str) { - if (!str) { - return null; - } - - var obj; - if (typeof str === 'string') { - obj = jsonParse(str); - if (obj instanceof Error) { - return null; - } - } else { - // assume it's an Object - obj = str; - } - - var c = new Cookie(); - for (var i=0; i 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) { - break; - } - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - -function getCookieContext(url) { - if (url instanceof Object) { - return url; - } - // NOTE: decodeURI will throw on malformed URIs (see GH-32). - // Therefore, we will just skip decoding for such URIs. - try { - url = decodeURI(url); - } - catch(err) { - // Silently swallow error - } - - return urlParse(url); -} - -function Cookie(options) { - options = options || {}; - - Object.keys(options).forEach(function(prop) { - if (Cookie.prototype.hasOwnProperty(prop) && - Cookie.prototype[prop] !== options[prop] && - prop.substr(0,1) !== '_') - { - this[prop] = options[prop]; - } - }, this); - - this.creation = this.creation || new Date(); - - // used to break creation ties in cookieCompare(): - Object.defineProperty(this, 'creationIndex', { - configurable: false, - enumerable: false, // important for assert.deepEqual checks - writable: true, - value: ++Cookie.cookiesCreated - }); -} - -Cookie.cookiesCreated = 0; // incremented each time a cookie is created - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set -Object.defineProperty(Cookie.prototype, 'creationIndex', { - configurable: true, - enumerable: false, - writable: true, - value: 0 -}); - -Cookie.serializableProperties = Object.keys(Cookie.prototype) - .filter(function(prop) { - return !( - Cookie.prototype[prop] instanceof Function || - prop === 'creationIndex' || - prop.substr(0,1) === '_' - ); - }); - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -// Use the new custom inspection symbol to add the custom inspect function if -// available. -if (util.inspect.custom) { - Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; -} - -Cookie.prototype.toJSON = function() { - var obj = {}; - - var props = Cookie.serializableProperties; - for (var i=0; i=0.8" - }, - "devDependencies": { - "async": "^1.4.2", - "genversion": "^2.1.0", - "nyc": "^11.6.0", - "string.prototype.repeat": "^0.2.0", - "vows": "^0.8.2" - }, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } -} diff --git a/test-eol-project/node_modules/tunnel-agent/LICENSE b/test-eol-project/node_modules/tunnel-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/test-eol-project/node_modules/tunnel-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/test-eol-project/node_modules/tunnel-agent/README.md b/test-eol-project/node_modules/tunnel-agent/README.md deleted file mode 100644 index bb533d56..00000000 --- a/test-eol-project/node_modules/tunnel-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -tunnel-agent -============ - -HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/test-eol-project/node_modules/tunnel-agent/index.js b/test-eol-project/node_modules/tunnel-agent/index.js deleted file mode 100644 index 3ee9abc5..00000000 --- a/test-eol-project/node_modules/tunnel-agent/index.js +++ /dev/null @@ -1,244 +0,0 @@ -'use strict' - -var net = require('net') - , tls = require('tls') - , http = require('http') - , https = require('https') - , events = require('events') - , assert = require('assert') - , util = require('util') - , Buffer = require('safe-buffer').Buffer - ; - -exports.httpOverHttp = httpOverHttp -exports.httpsOverHttp = httpsOverHttp -exports.httpOverHttps = httpOverHttps -exports.httpsOverHttps = httpsOverHttps - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - return agent -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - agent.createSocket = createSecureSocket - agent.defaultPort = 443 - return agent -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - return agent -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - agent.createSocket = createSecureSocket - agent.defaultPort = 443 - return agent -} - - -function TunnelingAgent(options) { - var self = this - self.options = options || {} - self.proxyOptions = self.options.proxy || {} - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets - self.requests = [] - self.sockets = [] - - self.on('free', function onFree(socket, host, port) { - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i] - if (pending.host === host && pending.port === port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1) - pending.request.onSocket(socket) - return - } - } - socket.destroy() - self.removeSocket(socket) - }) -} -util.inherits(TunnelingAgent, events.EventEmitter) - -TunnelingAgent.prototype.addRequest = function addRequest(req, options) { - var self = this - - // Legacy API: addRequest(req, host, port, path) - if (typeof options === 'string') { - options = { - host: options, - port: arguments[2], - path: arguments[3] - }; - } - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push({host: options.host, port: options.port, request: req}) - return - } - - // If we are under maxSockets create a new one. - self.createConnection({host: options.host, port: options.port, request: req}) -} - -TunnelingAgent.prototype.createConnection = function createConnection(pending) { - var self = this - - self.createSocket(pending, function(socket) { - socket.on('free', onFree) - socket.on('close', onCloseOrRemove) - socket.on('agentRemove', onCloseOrRemove) - pending.request.onSocket(socket) - - function onFree() { - self.emit('free', socket, pending.host, pending.port) - } - - function onCloseOrRemove(err) { - self.removeSocket(socket) - socket.removeListener('free', onFree) - socket.removeListener('close', onCloseOrRemove) - socket.removeListener('agentRemove', onCloseOrRemove) - } - }) -} - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this - var placeholder = {} - self.sockets.push(placeholder) - - var connectOptions = mergeOptions({}, self.proxyOptions, - { method: 'CONNECT' - , path: options.host + ':' + options.port - , agent: false - } - ) - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {} - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - Buffer.from(connectOptions.proxyAuth).toString('base64') - } - - debug('making CONNECT request') - var connectReq = self.request(connectOptions) - connectReq.useChunkedEncodingByDefault = false // for v0.6 - connectReq.once('response', onResponse) // for v0.6 - connectReq.once('upgrade', onUpgrade) // for v0.6 - connectReq.once('connect', onConnect) // for v0.7 or later - connectReq.once('error', onError) - connectReq.end() - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head) - }) - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners() - socket.removeAllListeners() - - if (res.statusCode === 200) { - assert.equal(head.length, 0) - debug('tunneling connection has established') - self.sockets[self.sockets.indexOf(placeholder)] = socket - cb(socket) - } else { - debug('tunneling socket could not be established, statusCode=%d', res.statusCode) - var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } - } - - function onError(cause) { - connectReq.removeAllListeners() - - debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) - var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } -} - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) return - - this.sockets.splice(pos, 1) - - var pending = this.requests.shift() - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createConnection(pending) - } -} - -function createSecureSocket(options, cb) { - var self = this - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, mergeOptions({}, self.options, - { servername: options.host - , socket: socket - } - )) - self.sockets[self.sockets.indexOf(socket)] = secureSocket - cb(secureSocket) - }) -} - - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i] - if (typeof overrides === 'object') { - var keys = Object.keys(overrides) - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j] - if (overrides[k] !== undefined) { - target[k] = overrides[k] - } - } - } - } - return target -} - - -var debug -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments) - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0] - } else { - args.unshift('TUNNEL:') - } - console.error.apply(console, args) - } -} else { - debug = function() {} -} -exports.debug = debug // for test diff --git a/test-eol-project/node_modules/tunnel-agent/package.json b/test-eol-project/node_modules/tunnel-agent/package.json deleted file mode 100644 index a271fda9..00000000 --- a/test-eol-project/node_modules/tunnel-agent/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "author": "Mikeal Rogers (http://www.futurealoof.com)", - "name": "tunnel-agent", - "license": "Apache-2.0", - "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "version": "0.6.0", - "repository": { - "url": "https://github.com/mikeal/tunnel-agent" - }, - "main": "index.js", - "files": [ - "index.js" - ], - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - } -} diff --git a/test-eol-project/node_modules/tweetnacl/.npmignore b/test-eol-project/node_modules/tweetnacl/.npmignore deleted file mode 100644 index 7d98dcbd..00000000 --- a/test-eol-project/node_modules/tweetnacl/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.eslintrc -.travis.yml -bower.json -test diff --git a/test-eol-project/node_modules/tweetnacl/AUTHORS.md b/test-eol-project/node_modules/tweetnacl/AUTHORS.md deleted file mode 100644 index 6d74d406..00000000 --- a/test-eol-project/node_modules/tweetnacl/AUTHORS.md +++ /dev/null @@ -1,28 +0,0 @@ -List of TweetNaCl.js authors -============================ - - Alphabetical order by first name. - Format: Name (GitHub username or URL) - -* AndSDev (@AndSDev) -* Devi Mandiri (@devi) -* Dmitry Chestnykh (@dchest) - -List of authors of third-party public domain code from which TweetNaCl.js code was derived -========================================================================================== - -[TweetNaCl](http://tweetnacl.cr.yp.to/) --------------------------------------- - -* Bernard van Gastel -* Daniel J. Bernstein -* Peter Schwabe -* Sjaak Smetsers -* Tanja Lange -* Wesley Janssen - - -[Poly1305-donna](https://github.com/floodyberry/poly1305-donna) --------------------------------------------------------------- - -* Andrew Moon (@floodyberry) diff --git a/test-eol-project/node_modules/tweetnacl/CHANGELOG.md b/test-eol-project/node_modules/tweetnacl/CHANGELOG.md deleted file mode 100644 index 92a4fdc5..00000000 --- a/test-eol-project/node_modules/tweetnacl/CHANGELOG.md +++ /dev/null @@ -1,221 +0,0 @@ -TweetNaCl.js Changelog -====================== - - -v0.14.5 -------- - -* Fixed incomplete return types in TypeScript typings. -* Replaced COPYING.txt with LICENSE file, which now has public domain dedication - text from The Unlicense. License fields in package.json and bower.json have - been set to "Unlicense". The project was and will be in the public domain -- - this change just makes it easier for automated tools to know about this fact by - using the widely recognized and SPDX-compatible template for public domain - dedication. - - -v0.14.4 -------- - -* Added TypeScript type definitions (contributed by @AndSDev). -* Improved benchmarking code. - - -v0.14.3 -------- - -Fixed a bug in the fast version of Poly1305 and brought it back. - -Thanks to @floodyberry for promptly responding and fixing the original C code: - -> "The issue was not properly detecting if st->h was >= 2^130 - 5, coupled with -> [testing mistake] not catching the failure. The chance of the bug affecting -> anything in the real world is essentially zero luckily, but it's good to have -> it fixed." - -https://github.com/floodyberry/poly1305-donna/issues/2#issuecomment-202698577 - - -v0.14.2 -------- - -Switched Poly1305 fast version back to original (slow) version due to a bug. - - -v0.14.1 -------- - -No code changes, just tweaked packaging and added COPYING.txt. - - -v0.14.0 -------- - -* **Breaking change!** All functions from `nacl.util` have been removed. These - functions are no longer available: - - nacl.util.decodeUTF8 - nacl.util.encodeUTF8 - nacl.util.decodeBase64 - nacl.util.encodeBase64 - - If want to continue using them, you can include - package: - - - - - or - - var nacl = require('tweetnacl'); - nacl.util = require('tweetnacl-util'); - - However it is recommended to use better packages that have wider - compatibility and better performance. Functions from `nacl.util` were never - intended to be robust solution for string conversion and were included for - convenience: cryptography library is not the right place for them. - - Currently calling these functions will throw error pointing to - `tweetnacl-util-js` (in the next version this error message will be removed). - -* Improved detection of available random number generators, making it possible - to use `nacl.randomBytes` and related functions in Web Workers without - changes. - -* Changes to testing (see README). - - -v0.13.3 -------- - -No code changes. - -* Reverted license field in package.json to "Public domain". - -* Fixed typo in README. - - -v0.13.2 -------- - -* Fixed undefined variable bug in fast version of Poly1305. No worries, this - bug was *never* triggered. - -* Specified CC0 public domain dedication. - -* Updated development dependencies. - - -v0.13.1 -------- - -* Exclude `crypto` and `buffer` modules from browserify builds. - - -v0.13.0 -------- - -* Made `nacl-fast` the default version in NPM package. Now - `require("tweetnacl")` will use fast version; to get the original version, - use `require("tweetnacl/nacl.js")`. - -* Cleanup temporary array after generating random bytes. - - -v0.12.2 -------- - -* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, - `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. - - -v0.12.1 -------- - -* Significantly improved performance of Salsa20 (~1.5x faster) and - Poly1305 (~3.5x faster) in `nacl-fast` version. - - -v0.12.0 -------- - -* Instead of using the given secret key directly, TweetNaCl.js now copies it to - a new array in `nacl.box.keyPair.fromSecretKey` and - `nacl.sign.keyPair.fromSecretKey`. - - -v0.11.2 -------- - -* Added new constant: `nacl.sign.seedLength`. - - -v0.11.1 -------- - -* Even faster hash for both short and long inputs (in `nacl-fast`). - - -v0.11.0 -------- - -* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs - deterministically from a 32-byte seed. (It behaves like - [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) - `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) - -* Fast version now has an improved hash implementation that is 2x-5x faster. - -* Fixed benchmarks, which may have produced incorrect measurements. - - -v0.10.1 -------- - -* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. - - -v0.10.0 -------- - -* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal - with signed messages, and new `nacl.sign.detached` and - `nacl.sign.detached.verify` are available. - - Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a - message and "detached" signature. This was unlike NaCl's API, which dealt with - signed messages (concatenation of signature and message). - - The new API is: - - nacl.sign(message, secretKey) -> signedMessage - nacl.sign.open(signedMessage, publicKey) -> message | null - - Since detached signatures are common, two new API functions were introduced: - - nacl.sign.detached(message, secretKey) -> signature - nacl.sign.detached.verify(message, signature, publicKey) -> true | false - - (Note that it's `verify`, not `open`, and it returns a boolean value, unlike - `open`, which returns an "unsigned" message.) - -* NPM package now comes without `test` directory to keep it small. - - -v0.9.2 ------- - -* Improved documentation. -* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 - bytes in Poly1305 (and thus, secretbox and box). However this has no impact - in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit - indexes, and most implementations won't allocate more than a gigabyte or so. - (Obviously, there are no tests for the correctness of implementation.) Also, - it's not recommended to use messages that large without splitting them into - smaller packets anyway. - - -v0.9.1 ------- - -* Initial release diff --git a/test-eol-project/node_modules/tweetnacl/LICENSE b/test-eol-project/node_modules/tweetnacl/LICENSE deleted file mode 100644 index cf1ab25d..00000000 --- a/test-eol-project/node_modules/tweetnacl/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -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 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. - -For more information, please refer to diff --git a/test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md b/test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a8eb4a9a..00000000 --- a/test-eol-project/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ -# Important! - -If your contribution is not trivial (not a typo fix, etc.), we can only accept -it if you dedicate your copyright for the contribution to the public domain. -Make sure you understand what it means (see http://unlicense.org/)! If you -agree, please add yourself to AUTHORS.md file, and include the following text -to your pull request description or a comment in it: - ------------------------------------------------------------------------------- - - I dedicate any and all copyright interest in this software to the - public domain. I make this dedication for the benefit of the public at - large and to the detriment of my heirs and successors. I intend this - dedication to be an overt act of relinquishment in perpetuity of all - present and future rights to this software under copyright law. - - Anyone is free to copy, modify, publish, use, compile, sell, or - distribute this software, either in source code form or as a compiled - binary, for any purpose, commercial or non-commercial, and by any - means. diff --git a/test-eol-project/node_modules/tweetnacl/README.md b/test-eol-project/node_modules/tweetnacl/README.md deleted file mode 100644 index ffb6871d..00000000 --- a/test-eol-project/node_modules/tweetnacl/README.md +++ /dev/null @@ -1,459 +0,0 @@ -TweetNaCl.js -============ - -Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) -to JavaScript for modern browsers and Node.js. Public domain. - -[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) -](https://travis-ci.org/dchest/tweetnacl-js) - -Demo: - -**:warning: The library is stable and API is frozen, however it has not been -independently reviewed. If you can help reviewing it, please [contact -me](mailto:dmitry@codingrobots.com).** - -Documentation -============= - -* [Overview](#overview) -* [Installation](#installation) -* [Usage](#usage) - * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) - * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) - * [Scalar multiplication](#scalar-multiplication) - * [Signatures](#signatures) - * [Hashing](#hashing) - * [Random bytes generation](#random-bytes-generation) - * [Constant-time comparison](#constant-time-comparison) -* [System requirements](#system-requirements) -* [Development and testing](#development-and-testing) -* [Benchmarks](#benchmarks) -* [Contributors](#contributors) -* [Who uses it](#who-uses-it) - - -Overview --------- - -The primary goal of this project is to produce a translation of TweetNaCl to -JavaScript which is as close as possible to the original C implementation, plus -a thin layer of idiomatic high-level API on top of it. - -There are two versions, you can use either of them: - -* `nacl.js` is the port of TweetNaCl with minimum differences from the - original + high-level API. - -* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with - faster versions. - - -Installation ------------- - -You can install TweetNaCl.js via a package manager: - -[Bower](http://bower.io): - - $ bower install tweetnacl - -[NPM](https://www.npmjs.org/): - - $ npm install tweetnacl - -or [download source code](https://github.com/dchest/tweetnacl-js/releases). - - -Usage ------ - -All API functions accept and return bytes as `Uint8Array`s. If you need to -encode or decode strings, use functions from - or one of the more robust codec -packages. - -In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you -can freely pass them to TweetNaCl.js functions as arguments. The returned -objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to -convert them manually; make sure to convert using copying: `new Buffer(array)`, -instead of sharing: `new Buffer(array.buffer)`, because some functions return -subarrays of their buffers. - - -### Public-key authenticated encryption (box) - -Implements *curve25519-xsalsa20-poly1305*. - -#### nacl.box.keyPair() - -Generates a new random key pair for box and returns it as an object with -`publicKey` and `secretKey` members: - - { - publicKey: ..., // Uint8Array with 32-byte public key - secretKey: ... // Uint8Array with 32-byte secret key - } - - -#### nacl.box.keyPair.fromSecretKey(secretKey) - -Returns a key pair for box with public key corresponding to the given secret -key. - -#### nacl.box(message, nonce, theirPublicKey, mySecretKey) - -Encrypt and authenticates message using peer's public key, our secret key, and -the given nonce, which must be unique for each distinct message for a key pair. - -Returns an encrypted and authenticated message, which is -`nacl.box.overheadLength` longer than the original message. - -#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) - -Authenticates and decrypts the given box with peer's public key, our secret -key, and the given nonce. - -Returns the original message, or `false` if authentication fails. - -#### nacl.box.before(theirPublicKey, mySecretKey) - -Returns a precomputed shared key which can be used in `nacl.box.after` and -`nacl.box.open.after`. - -#### nacl.box.after(message, nonce, sharedKey) - -Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. - -#### nacl.box.open.after(box, nonce, sharedKey) - -Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. - -#### nacl.box.publicKeyLength = 32 - -Length of public key in bytes. - -#### nacl.box.secretKeyLength = 32 - -Length of secret key in bytes. - -#### nacl.box.sharedKeyLength = 32 - -Length of precomputed shared key in bytes. - -#### nacl.box.nonceLength = 24 - -Length of nonce in bytes. - -#### nacl.box.overheadLength = 16 - -Length of overhead added to box compared to original message. - - -### Secret-key authenticated encryption (secretbox) - -Implements *xsalsa20-poly1305*. - -#### nacl.secretbox(message, nonce, key) - -Encrypt and authenticates message using the key and the nonce. The nonce must -be unique for each distinct message for this key. - -Returns an encrypted and authenticated message, which is -`nacl.secretbox.overheadLength` longer than the original message. - -#### nacl.secretbox.open(box, nonce, key) - -Authenticates and decrypts the given secret box using the key and the nonce. - -Returns the original message, or `false` if authentication fails. - -#### nacl.secretbox.keyLength = 32 - -Length of key in bytes. - -#### nacl.secretbox.nonceLength = 24 - -Length of nonce in bytes. - -#### nacl.secretbox.overheadLength = 16 - -Length of overhead added to secret box compared to original message. - - -### Scalar multiplication - -Implements *curve25519*. - -#### nacl.scalarMult(n, p) - -Multiplies an integer `n` by a group element `p` and returns the resulting -group element. - -#### nacl.scalarMult.base(n) - -Multiplies an integer `n` by a standard group element and returns the resulting -group element. - -#### nacl.scalarMult.scalarLength = 32 - -Length of scalar in bytes. - -#### nacl.scalarMult.groupElementLength = 32 - -Length of group element in bytes. - - -### Signatures - -Implements [ed25519](http://ed25519.cr.yp.to). - -#### nacl.sign.keyPair() - -Generates new random key pair for signing and returns it as an object with -`publicKey` and `secretKey` members: - - { - publicKey: ..., // Uint8Array with 32-byte public key - secretKey: ... // Uint8Array with 64-byte secret key - } - -#### nacl.sign.keyPair.fromSecretKey(secretKey) - -Returns a signing key pair with public key corresponding to the given -64-byte secret key. The secret key must have been generated by -`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. - -#### nacl.sign.keyPair.fromSeed(seed) - -Returns a new signing key pair generated deterministically from a 32-byte seed. -The seed must contain enough entropy to be secure. This method is not -recommended for general use: instead, use `nacl.sign.keyPair` to generate a new -key pair from a random seed. - -#### nacl.sign(message, secretKey) - -Signs the message using the secret key and returns a signed message. - -#### nacl.sign.open(signedMessage, publicKey) - -Verifies the signed message and returns the message without signature. - -Returns `null` if verification failed. - -#### nacl.sign.detached(message, secretKey) - -Signs the message using the secret key and returns a signature. - -#### nacl.sign.detached.verify(message, signature, publicKey) - -Verifies the signature for the message and returns `true` if verification -succeeded or `false` if it failed. - -#### nacl.sign.publicKeyLength = 32 - -Length of signing public key in bytes. - -#### nacl.sign.secretKeyLength = 64 - -Length of signing secret key in bytes. - -#### nacl.sign.seedLength = 32 - -Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. - -#### nacl.sign.signatureLength = 64 - -Length of signature in bytes. - - -### Hashing - -Implements *SHA-512*. - -#### nacl.hash(message) - -Returns SHA-512 hash of the message. - -#### nacl.hash.hashLength = 64 - -Length of hash in bytes. - - -### Random bytes generation - -#### nacl.randomBytes(length) - -Returns a `Uint8Array` of the given length containing random bytes of -cryptographic quality. - -**Implementation note** - -TweetNaCl.js uses the following methods to generate random bytes, -depending on the platform it runs on: - -* `window.crypto.getRandomValues` (WebCrypto standard) -* `window.msCrypto.getRandomValues` (Internet Explorer 11) -* `crypto.randomBytes` (Node.js) - -If the platform doesn't provide a suitable PRNG, the following functions, -which require random numbers, will throw exception: - -* `nacl.randomBytes` -* `nacl.box.keyPair` -* `nacl.sign.keyPair` - -Other functions are deterministic and will continue working. - -If a platform you are targeting doesn't implement secure random number -generator, but you somehow have a cryptographically-strong source of entropy -(not `Math.random`!), and you know what you are doing, you can plug it into -TweetNaCl.js like this: - - nacl.setPRNG(function(x, n) { - // ... copy n random bytes into x ... - }); - -Note that `nacl.setPRNG` *completely replaces* internal random byte generator -with the one provided. - - -### Constant-time comparison - -#### nacl.verify(x, y) - -Compares `x` and `y` in constant time and returns `true` if their lengths are -non-zero and equal, and their contents are equal. - -Returns `false` if either of the arguments has zero length, or arguments have -different lengths, or their contents differ. - - -System requirements -------------------- - -TweetNaCl.js supports modern browsers that have a cryptographically secure -pseudorandom number generator and typed arrays, including the latest versions -of: - -* Chrome -* Firefox -* Safari (Mac, iOS) -* Internet Explorer 11 - -Other systems: - -* Node.js - - -Development and testing ------------------------- - -Install NPM modules needed for development: - - $ npm install - -To build minified versions: - - $ npm run build - -Tests use minified version, so make sure to rebuild it every time you change -`nacl.js` or `nacl-fast.js`. - -### Testing - -To run tests in Node.js: - - $ npm run test-node - -By default all tests described here work on `nacl.min.js`. To test other -versions, set environment variable `NACL_SRC` to the file name you want to test. -For example, the following command will test fast minified version: - - $ NACL_SRC=nacl-fast.min.js npm run test-node - -To run full suite of tests in Node.js, including comparing outputs of -JavaScript port to outputs of the original C version: - - $ npm run test-node-all - -To prepare tests for browsers: - - $ npm run build-test-browser - -and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to -run them. - -To run headless browser tests with `tape-run` (powered by Electron): - - $ npm run test-browser - -(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) - -To run tests in both Node and Electron: - - $ npm test - -### Benchmarking - -To run benchmarks in Node.js: - - $ npm run bench - $ NACL_SRC=nacl-fast.min.js npm run bench - -To run benchmarks in a browser, open `test/benchmark/bench.html` (or -`test/benchmark/bench-fast.html`). - - -Benchmarks ----------- - -For reference, here are benchmarks from MacBook Pro (Retina, 13-inch, Mid 2014) -laptop with 2.6 GHz Intel Core i5 CPU (Intel) in Chrome 53/OS X and Xiaomi Redmi -Note 3 smartphone with 1.8 GHz Qualcomm Snapdragon 650 64-bit CPU (ARM) in -Chrome 52/Android: - -| | nacl.js Intel | nacl-fast.js Intel | nacl.js ARM | nacl-fast.js ARM | -| ------------- |:-------------:|:-------------------:|:-------------:|:-----------------:| -| salsa20 | 1.3 MB/s | 128 MB/s | 0.4 MB/s | 43 MB/s | -| poly1305 | 13 MB/s | 171 MB/s | 4 MB/s | 52 MB/s | -| hash | 4 MB/s | 34 MB/s | 0.9 MB/s | 12 MB/s | -| secretbox 1K | 1113 op/s | 57583 op/s | 334 op/s | 14227 op/s | -| box 1K | 145 op/s | 718 op/s | 37 op/s | 368 op/s | -| scalarMult | 171 op/s | 733 op/s | 56 op/s | 380 op/s | -| sign | 77 op/s | 200 op/s | 20 op/s | 61 op/s | -| sign.open | 39 op/s | 102 op/s | 11 op/s | 31 op/s | - -(You can run benchmarks on your devices by clicking on the links at the bottom -of the [home page](https://tweetnacl.js.org)). - -In short, with *nacl-fast.js* and 1024-byte messages you can expect to encrypt and -authenticate more than 57000 messages per second on a typical laptop or more than -14000 messages per second on a $170 smartphone, sign about 200 and verify 100 -messages per second on a laptop or 60 and 30 messages per second on a smartphone, -per CPU core (with Web Workers you can do these operations in parallel), -which is good enough for most applications. - - -Contributors ------------- - -See AUTHORS.md file. - - -Third-party libraries based on TweetNaCl.js -------------------------------------------- - -* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation -* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption -* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) -* [chloride](https://github.com/dominictarr/chloride) - unified API for various NaCl modules - - -Who uses it ------------ - -Some notable users of TweetNaCl.js: - -* [miniLock](http://minilock.io/) -* [Stellar](https://www.stellar.org/) diff --git a/test-eol-project/node_modules/tweetnacl/nacl-fast.js b/test-eol-project/node_modules/tweetnacl/nacl-fast.js deleted file mode 100644 index 5e4562fe..00000000 --- a/test-eol-project/node_modules/tweetnacl/nacl-fast.js +++ /dev/null @@ -1,2388 +0,0 @@ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function ts64(x, i, h, l) { - x[i] = (h >> 24) & 0xff; - x[i+1] = (h >> 16) & 0xff; - x[i+2] = (h >> 8) & 0xff; - x[i+3] = h & 0xff; - x[i+4] = (l >> 24) & 0xff; - x[i+5] = (l >> 16) & 0xff; - x[i+6] = (l >> 8) & 0xff; - x[i+7] = l & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core_salsa20(o, p, k, c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - x0 = x0 + j0 | 0; - x1 = x1 + j1 | 0; - x2 = x2 + j2 | 0; - x3 = x3 + j3 | 0; - x4 = x4 + j4 | 0; - x5 = x5 + j5 | 0; - x6 = x6 + j6 | 0; - x7 = x7 + j7 | 0; - x8 = x8 + j8 | 0; - x9 = x9 + j9 | 0; - x10 = x10 + j10 | 0; - x11 = x11 + j11 | 0; - x12 = x12 + j12 | 0; - x13 = x13 + j13 | 0; - x14 = x14 + j14 | 0; - x15 = x15 + j15 | 0; - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x1 >>> 0 & 0xff; - o[ 5] = x1 >>> 8 & 0xff; - o[ 6] = x1 >>> 16 & 0xff; - o[ 7] = x1 >>> 24 & 0xff; - - o[ 8] = x2 >>> 0 & 0xff; - o[ 9] = x2 >>> 8 & 0xff; - o[10] = x2 >>> 16 & 0xff; - o[11] = x2 >>> 24 & 0xff; - - o[12] = x3 >>> 0 & 0xff; - o[13] = x3 >>> 8 & 0xff; - o[14] = x3 >>> 16 & 0xff; - o[15] = x3 >>> 24 & 0xff; - - o[16] = x4 >>> 0 & 0xff; - o[17] = x4 >>> 8 & 0xff; - o[18] = x4 >>> 16 & 0xff; - o[19] = x4 >>> 24 & 0xff; - - o[20] = x5 >>> 0 & 0xff; - o[21] = x5 >>> 8 & 0xff; - o[22] = x5 >>> 16 & 0xff; - o[23] = x5 >>> 24 & 0xff; - - o[24] = x6 >>> 0 & 0xff; - o[25] = x6 >>> 8 & 0xff; - o[26] = x6 >>> 16 & 0xff; - o[27] = x6 >>> 24 & 0xff; - - o[28] = x7 >>> 0 & 0xff; - o[29] = x7 >>> 8 & 0xff; - o[30] = x7 >>> 16 & 0xff; - o[31] = x7 >>> 24 & 0xff; - - o[32] = x8 >>> 0 & 0xff; - o[33] = x8 >>> 8 & 0xff; - o[34] = x8 >>> 16 & 0xff; - o[35] = x8 >>> 24 & 0xff; - - o[36] = x9 >>> 0 & 0xff; - o[37] = x9 >>> 8 & 0xff; - o[38] = x9 >>> 16 & 0xff; - o[39] = x9 >>> 24 & 0xff; - - o[40] = x10 >>> 0 & 0xff; - o[41] = x10 >>> 8 & 0xff; - o[42] = x10 >>> 16 & 0xff; - o[43] = x10 >>> 24 & 0xff; - - o[44] = x11 >>> 0 & 0xff; - o[45] = x11 >>> 8 & 0xff; - o[46] = x11 >>> 16 & 0xff; - o[47] = x11 >>> 24 & 0xff; - - o[48] = x12 >>> 0 & 0xff; - o[49] = x12 >>> 8 & 0xff; - o[50] = x12 >>> 16 & 0xff; - o[51] = x12 >>> 24 & 0xff; - - o[52] = x13 >>> 0 & 0xff; - o[53] = x13 >>> 8 & 0xff; - o[54] = x13 >>> 16 & 0xff; - o[55] = x13 >>> 24 & 0xff; - - o[56] = x14 >>> 0 & 0xff; - o[57] = x14 >>> 8 & 0xff; - o[58] = x14 >>> 16 & 0xff; - o[59] = x14 >>> 24 & 0xff; - - o[60] = x15 >>> 0 & 0xff; - o[61] = x15 >>> 8 & 0xff; - o[62] = x15 >>> 16 & 0xff; - o[63] = x15 >>> 24 & 0xff; -} - -function core_hsalsa20(o,p,k,c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x5 >>> 0 & 0xff; - o[ 5] = x5 >>> 8 & 0xff; - o[ 6] = x5 >>> 16 & 0xff; - o[ 7] = x5 >>> 24 & 0xff; - - o[ 8] = x10 >>> 0 & 0xff; - o[ 9] = x10 >>> 8 & 0xff; - o[10] = x10 >>> 16 & 0xff; - o[11] = x10 >>> 24 & 0xff; - - o[12] = x15 >>> 0 & 0xff; - o[13] = x15 >>> 8 & 0xff; - o[14] = x15 >>> 16 & 0xff; - o[15] = x15 >>> 24 & 0xff; - - o[16] = x6 >>> 0 & 0xff; - o[17] = x6 >>> 8 & 0xff; - o[18] = x6 >>> 16 & 0xff; - o[19] = x6 >>> 24 & 0xff; - - o[20] = x7 >>> 0 & 0xff; - o[21] = x7 >>> 8 & 0xff; - o[22] = x7 >>> 16 & 0xff; - o[23] = x7 >>> 24 & 0xff; - - o[24] = x8 >>> 0 & 0xff; - o[25] = x8 >>> 8 & 0xff; - o[26] = x8 >>> 16 & 0xff; - o[27] = x8 >>> 24 & 0xff; - - o[28] = x9 >>> 0 & 0xff; - o[29] = x9 >>> 8 & 0xff; - o[30] = x9 >>> 16 & 0xff; - o[31] = x9 >>> 24 & 0xff; -} - -function crypto_core_salsa20(out,inp,k,c) { - core_salsa20(out,inp,k,c); -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core_hsalsa20(out,inp,k,c); -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = x[i]; - } - return 0; -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20(c,cpos,d,sn,s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); -} - -/* -* Port of Andrew Moon's Poly1305-donna-16. Public domain. -* https://github.com/floodyberry/poly1305-donna -*/ - -var poly1305 = function(key) { - this.buffer = new Uint8Array(16); - this.r = new Uint16Array(10); - this.h = new Uint16Array(10); - this.pad = new Uint16Array(8); - this.leftover = 0; - this.fin = 0; - - var t0, t1, t2, t3, t4, t5, t6, t7; - - t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; - t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; - t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; - this.r[5] = ((t4 >>> 1)) & 0x1ffe; - t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; - t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - this.r[9] = ((t7 >>> 5)) & 0x007f; - - this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; - this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; - this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; - this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; - this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; - this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; - this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; - this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; -}; - -poly1305.prototype.blocks = function(m, mpos, bytes) { - var hibit = this.fin ? 0 : (1 << 11); - var t0, t1, t2, t3, t4, t5, t6, t7, c; - var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; - - var h0 = this.h[0], - h1 = this.h[1], - h2 = this.h[2], - h3 = this.h[3], - h4 = this.h[4], - h5 = this.h[5], - h6 = this.h[6], - h7 = this.h[7], - h8 = this.h[8], - h9 = this.h[9]; - - var r0 = this.r[0], - r1 = this.r[1], - r2 = this.r[2], - r3 = this.r[3], - r4 = this.r[4], - r5 = this.r[5], - r6 = this.r[6], - r7 = this.r[7], - r8 = this.r[8], - r9 = this.r[9]; - - while (bytes >= 16) { - t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; - t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; - t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; - h5 += ((t4 >>> 1)) & 0x1fff; - t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; - t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - h9 += ((t7 >>> 5)) | hibit; - - c = 0; - - d0 = c; - d0 += h0 * r0; - d0 += h1 * (5 * r9); - d0 += h2 * (5 * r8); - d0 += h3 * (5 * r7); - d0 += h4 * (5 * r6); - c = (d0 >>> 13); d0 &= 0x1fff; - d0 += h5 * (5 * r5); - d0 += h6 * (5 * r4); - d0 += h7 * (5 * r3); - d0 += h8 * (5 * r2); - d0 += h9 * (5 * r1); - c += (d0 >>> 13); d0 &= 0x1fff; - - d1 = c; - d1 += h0 * r1; - d1 += h1 * r0; - d1 += h2 * (5 * r9); - d1 += h3 * (5 * r8); - d1 += h4 * (5 * r7); - c = (d1 >>> 13); d1 &= 0x1fff; - d1 += h5 * (5 * r6); - d1 += h6 * (5 * r5); - d1 += h7 * (5 * r4); - d1 += h8 * (5 * r3); - d1 += h9 * (5 * r2); - c += (d1 >>> 13); d1 &= 0x1fff; - - d2 = c; - d2 += h0 * r2; - d2 += h1 * r1; - d2 += h2 * r0; - d2 += h3 * (5 * r9); - d2 += h4 * (5 * r8); - c = (d2 >>> 13); d2 &= 0x1fff; - d2 += h5 * (5 * r7); - d2 += h6 * (5 * r6); - d2 += h7 * (5 * r5); - d2 += h8 * (5 * r4); - d2 += h9 * (5 * r3); - c += (d2 >>> 13); d2 &= 0x1fff; - - d3 = c; - d3 += h0 * r3; - d3 += h1 * r2; - d3 += h2 * r1; - d3 += h3 * r0; - d3 += h4 * (5 * r9); - c = (d3 >>> 13); d3 &= 0x1fff; - d3 += h5 * (5 * r8); - d3 += h6 * (5 * r7); - d3 += h7 * (5 * r6); - d3 += h8 * (5 * r5); - d3 += h9 * (5 * r4); - c += (d3 >>> 13); d3 &= 0x1fff; - - d4 = c; - d4 += h0 * r4; - d4 += h1 * r3; - d4 += h2 * r2; - d4 += h3 * r1; - d4 += h4 * r0; - c = (d4 >>> 13); d4 &= 0x1fff; - d4 += h5 * (5 * r9); - d4 += h6 * (5 * r8); - d4 += h7 * (5 * r7); - d4 += h8 * (5 * r6); - d4 += h9 * (5 * r5); - c += (d4 >>> 13); d4 &= 0x1fff; - - d5 = c; - d5 += h0 * r5; - d5 += h1 * r4; - d5 += h2 * r3; - d5 += h3 * r2; - d5 += h4 * r1; - c = (d5 >>> 13); d5 &= 0x1fff; - d5 += h5 * r0; - d5 += h6 * (5 * r9); - d5 += h7 * (5 * r8); - d5 += h8 * (5 * r7); - d5 += h9 * (5 * r6); - c += (d5 >>> 13); d5 &= 0x1fff; - - d6 = c; - d6 += h0 * r6; - d6 += h1 * r5; - d6 += h2 * r4; - d6 += h3 * r3; - d6 += h4 * r2; - c = (d6 >>> 13); d6 &= 0x1fff; - d6 += h5 * r1; - d6 += h6 * r0; - d6 += h7 * (5 * r9); - d6 += h8 * (5 * r8); - d6 += h9 * (5 * r7); - c += (d6 >>> 13); d6 &= 0x1fff; - - d7 = c; - d7 += h0 * r7; - d7 += h1 * r6; - d7 += h2 * r5; - d7 += h3 * r4; - d7 += h4 * r3; - c = (d7 >>> 13); d7 &= 0x1fff; - d7 += h5 * r2; - d7 += h6 * r1; - d7 += h7 * r0; - d7 += h8 * (5 * r9); - d7 += h9 * (5 * r8); - c += (d7 >>> 13); d7 &= 0x1fff; - - d8 = c; - d8 += h0 * r8; - d8 += h1 * r7; - d8 += h2 * r6; - d8 += h3 * r5; - d8 += h4 * r4; - c = (d8 >>> 13); d8 &= 0x1fff; - d8 += h5 * r3; - d8 += h6 * r2; - d8 += h7 * r1; - d8 += h8 * r0; - d8 += h9 * (5 * r9); - c += (d8 >>> 13); d8 &= 0x1fff; - - d9 = c; - d9 += h0 * r9; - d9 += h1 * r8; - d9 += h2 * r7; - d9 += h3 * r6; - d9 += h4 * r5; - c = (d9 >>> 13); d9 &= 0x1fff; - d9 += h5 * r4; - d9 += h6 * r3; - d9 += h7 * r2; - d9 += h8 * r1; - d9 += h9 * r0; - c += (d9 >>> 13); d9 &= 0x1fff; - - c = (((c << 2) + c)) | 0; - c = (c + d0) | 0; - d0 = c & 0x1fff; - c = (c >>> 13); - d1 += c; - - h0 = d0; - h1 = d1; - h2 = d2; - h3 = d3; - h4 = d4; - h5 = d5; - h6 = d6; - h7 = d7; - h8 = d8; - h9 = d9; - - mpos += 16; - bytes -= 16; - } - this.h[0] = h0; - this.h[1] = h1; - this.h[2] = h2; - this.h[3] = h3; - this.h[4] = h4; - this.h[5] = h5; - this.h[6] = h6; - this.h[7] = h7; - this.h[8] = h8; - this.h[9] = h9; -}; - -poly1305.prototype.finish = function(mac, macpos) { - var g = new Uint16Array(10); - var c, mask, f, i; - - if (this.leftover) { - i = this.leftover; - this.buffer[i++] = 1; - for (; i < 16; i++) this.buffer[i] = 0; - this.fin = 1; - this.blocks(this.buffer, 0, 16); - } - - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - for (i = 2; i < 10; i++) { - this.h[i] += c; - c = this.h[i] >>> 13; - this.h[i] &= 0x1fff; - } - this.h[0] += (c * 5); - c = this.h[0] >>> 13; - this.h[0] &= 0x1fff; - this.h[1] += c; - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - this.h[2] += c; - - g[0] = this.h[0] + 5; - c = g[0] >>> 13; - g[0] &= 0x1fff; - for (i = 1; i < 10; i++) { - g[i] = this.h[i] + c; - c = g[i] >>> 13; - g[i] &= 0x1fff; - } - g[9] -= (1 << 13); - - mask = (c ^ 1) - 1; - for (i = 0; i < 10; i++) g[i] &= mask; - mask = ~mask; - for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; - - this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; - this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; - this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; - this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; - this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; - this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; - this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; - this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; - - f = this.h[0] + this.pad[0]; - this.h[0] = f & 0xffff; - for (i = 1; i < 8; i++) { - f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; - this.h[i] = f & 0xffff; - } - - mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; - mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; - mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; - mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; - mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; - mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; - mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; - mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; - mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; - mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; - mac[macpos+10] = (this.h[5] >>> 0) & 0xff; - mac[macpos+11] = (this.h[5] >>> 8) & 0xff; - mac[macpos+12] = (this.h[6] >>> 0) & 0xff; - mac[macpos+13] = (this.h[6] >>> 8) & 0xff; - mac[macpos+14] = (this.h[7] >>> 0) & 0xff; - mac[macpos+15] = (this.h[7] >>> 8) & 0xff; -}; - -poly1305.prototype.update = function(m, mpos, bytes) { - var i, want; - - if (this.leftover) { - want = (16 - this.leftover); - if (want > bytes) - want = bytes; - for (i = 0; i < want; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - bytes -= want; - mpos += want; - this.leftover += want; - if (this.leftover < 16) - return; - this.blocks(this.buffer, 0, 16); - this.leftover = 0; - } - - if (bytes >= 16) { - want = bytes - (bytes % 16); - this.blocks(m, mpos, want); - mpos += want; - bytes -= want; - } - - if (bytes) { - for (i = 0; i < bytes; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - this.leftover += bytes; - } -}; - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s = new poly1305(k); - s.update(m, mpos, n); - s.finish(out, outpos); - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var i, v, c = 1; - for (i = 0; i < 16; i++) { - v = o[i] + c + 65535; - c = Math.floor(v / 65536); - o[i] = v - c * 65536; - } - o[0] += c-1 + 37 * (c-1); -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; -} - -function Z(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; -} - -function M(o, a, b) { - var v, c, - t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, - t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, - t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, - t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, - b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11], - b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - - v = a[0]; - t0 += v * b0; - t1 += v * b1; - t2 += v * b2; - t3 += v * b3; - t4 += v * b4; - t5 += v * b5; - t6 += v * b6; - t7 += v * b7; - t8 += v * b8; - t9 += v * b9; - t10 += v * b10; - t11 += v * b11; - t12 += v * b12; - t13 += v * b13; - t14 += v * b14; - t15 += v * b15; - v = a[1]; - t1 += v * b0; - t2 += v * b1; - t3 += v * b2; - t4 += v * b3; - t5 += v * b4; - t6 += v * b5; - t7 += v * b6; - t8 += v * b7; - t9 += v * b8; - t10 += v * b9; - t11 += v * b10; - t12 += v * b11; - t13 += v * b12; - t14 += v * b13; - t15 += v * b14; - t16 += v * b15; - v = a[2]; - t2 += v * b0; - t3 += v * b1; - t4 += v * b2; - t5 += v * b3; - t6 += v * b4; - t7 += v * b5; - t8 += v * b6; - t9 += v * b7; - t10 += v * b8; - t11 += v * b9; - t12 += v * b10; - t13 += v * b11; - t14 += v * b12; - t15 += v * b13; - t16 += v * b14; - t17 += v * b15; - v = a[3]; - t3 += v * b0; - t4 += v * b1; - t5 += v * b2; - t6 += v * b3; - t7 += v * b4; - t8 += v * b5; - t9 += v * b6; - t10 += v * b7; - t11 += v * b8; - t12 += v * b9; - t13 += v * b10; - t14 += v * b11; - t15 += v * b12; - t16 += v * b13; - t17 += v * b14; - t18 += v * b15; - v = a[4]; - t4 += v * b0; - t5 += v * b1; - t6 += v * b2; - t7 += v * b3; - t8 += v * b4; - t9 += v * b5; - t10 += v * b6; - t11 += v * b7; - t12 += v * b8; - t13 += v * b9; - t14 += v * b10; - t15 += v * b11; - t16 += v * b12; - t17 += v * b13; - t18 += v * b14; - t19 += v * b15; - v = a[5]; - t5 += v * b0; - t6 += v * b1; - t7 += v * b2; - t8 += v * b3; - t9 += v * b4; - t10 += v * b5; - t11 += v * b6; - t12 += v * b7; - t13 += v * b8; - t14 += v * b9; - t15 += v * b10; - t16 += v * b11; - t17 += v * b12; - t18 += v * b13; - t19 += v * b14; - t20 += v * b15; - v = a[6]; - t6 += v * b0; - t7 += v * b1; - t8 += v * b2; - t9 += v * b3; - t10 += v * b4; - t11 += v * b5; - t12 += v * b6; - t13 += v * b7; - t14 += v * b8; - t15 += v * b9; - t16 += v * b10; - t17 += v * b11; - t18 += v * b12; - t19 += v * b13; - t20 += v * b14; - t21 += v * b15; - v = a[7]; - t7 += v * b0; - t8 += v * b1; - t9 += v * b2; - t10 += v * b3; - t11 += v * b4; - t12 += v * b5; - t13 += v * b6; - t14 += v * b7; - t15 += v * b8; - t16 += v * b9; - t17 += v * b10; - t18 += v * b11; - t19 += v * b12; - t20 += v * b13; - t21 += v * b14; - t22 += v * b15; - v = a[8]; - t8 += v * b0; - t9 += v * b1; - t10 += v * b2; - t11 += v * b3; - t12 += v * b4; - t13 += v * b5; - t14 += v * b6; - t15 += v * b7; - t16 += v * b8; - t17 += v * b9; - t18 += v * b10; - t19 += v * b11; - t20 += v * b12; - t21 += v * b13; - t22 += v * b14; - t23 += v * b15; - v = a[9]; - t9 += v * b0; - t10 += v * b1; - t11 += v * b2; - t12 += v * b3; - t13 += v * b4; - t14 += v * b5; - t15 += v * b6; - t16 += v * b7; - t17 += v * b8; - t18 += v * b9; - t19 += v * b10; - t20 += v * b11; - t21 += v * b12; - t22 += v * b13; - t23 += v * b14; - t24 += v * b15; - v = a[10]; - t10 += v * b0; - t11 += v * b1; - t12 += v * b2; - t13 += v * b3; - t14 += v * b4; - t15 += v * b5; - t16 += v * b6; - t17 += v * b7; - t18 += v * b8; - t19 += v * b9; - t20 += v * b10; - t21 += v * b11; - t22 += v * b12; - t23 += v * b13; - t24 += v * b14; - t25 += v * b15; - v = a[11]; - t11 += v * b0; - t12 += v * b1; - t13 += v * b2; - t14 += v * b3; - t15 += v * b4; - t16 += v * b5; - t17 += v * b6; - t18 += v * b7; - t19 += v * b8; - t20 += v * b9; - t21 += v * b10; - t22 += v * b11; - t23 += v * b12; - t24 += v * b13; - t25 += v * b14; - t26 += v * b15; - v = a[12]; - t12 += v * b0; - t13 += v * b1; - t14 += v * b2; - t15 += v * b3; - t16 += v * b4; - t17 += v * b5; - t18 += v * b6; - t19 += v * b7; - t20 += v * b8; - t21 += v * b9; - t22 += v * b10; - t23 += v * b11; - t24 += v * b12; - t25 += v * b13; - t26 += v * b14; - t27 += v * b15; - v = a[13]; - t13 += v * b0; - t14 += v * b1; - t15 += v * b2; - t16 += v * b3; - t17 += v * b4; - t18 += v * b5; - t19 += v * b6; - t20 += v * b7; - t21 += v * b8; - t22 += v * b9; - t23 += v * b10; - t24 += v * b11; - t25 += v * b12; - t26 += v * b13; - t27 += v * b14; - t28 += v * b15; - v = a[14]; - t14 += v * b0; - t15 += v * b1; - t16 += v * b2; - t17 += v * b3; - t18 += v * b4; - t19 += v * b5; - t20 += v * b6; - t21 += v * b7; - t22 += v * b8; - t23 += v * b9; - t24 += v * b10; - t25 += v * b11; - t26 += v * b12; - t27 += v * b13; - t28 += v * b14; - t29 += v * b15; - v = a[15]; - t15 += v * b0; - t16 += v * b1; - t17 += v * b2; - t18 += v * b3; - t19 += v * b4; - t20 += v * b5; - t21 += v * b6; - t22 += v * b7; - t23 += v * b8; - t24 += v * b9; - t25 += v * b10; - t26 += v * b11; - t27 += v * b12; - t28 += v * b13; - t29 += v * b14; - t30 += v * b15; - - t0 += 38 * t16; - t1 += 38 * t17; - t2 += 38 * t18; - t3 += 38 * t19; - t4 += 38 * t20; - t5 += 38 * t21; - t6 += 38 * t22; - t7 += 38 * t23; - t8 += 38 * t24; - t9 += 38 * t25; - t10 += 38 * t26; - t11 += 38 * t27; - t12 += 38 * t28; - t13 += 38 * t29; - t14 += 38 * t30; - // t15 left as is - - // first car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - // second car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - o[ 0] = t0; - o[ 1] = t1; - o[ 2] = t2; - o[ 3] = t3; - o[ 4] = t4; - o[ 5] = t5; - o[ 6] = t6; - o[ 7] = t7; - o[ 8] = t8; - o[ 9] = t9; - o[10] = t10; - o[11] = t11; - o[12] = t12; - o[13] = t13; - o[14] = t14; - o[15] = t15; -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function crypto_hashblocks_hl(hh, hl, m, n) { - var wh = new Int32Array(16), wl = new Int32Array(16), - bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, - bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, - th, tl, i, j, h, l, a, b, c, d; - - var ah0 = hh[0], - ah1 = hh[1], - ah2 = hh[2], - ah3 = hh[3], - ah4 = hh[4], - ah5 = hh[5], - ah6 = hh[6], - ah7 = hh[7], - - al0 = hl[0], - al1 = hl[1], - al2 = hl[2], - al3 = hl[3], - al4 = hl[4], - al5 = hl[5], - al6 = hl[6], - al7 = hl[7]; - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) { - j = 8 * i + pos; - wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; - wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; - } - for (i = 0; i < 80; i++) { - bh0 = ah0; - bh1 = ah1; - bh2 = ah2; - bh3 = ah3; - bh4 = ah4; - bh5 = ah5; - bh6 = ah6; - bh7 = ah7; - - bl0 = al0; - bl1 = al1; - bl2 = al2; - bl3 = al3; - bl4 = al4; - bl5 = al5; - bl6 = al6; - bl7 = al7; - - // add - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma1 - h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); - l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Ch - h = (ah4 & ah5) ^ (~ah4 & ah6); - l = (al4 & al5) ^ (~al4 & al6); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // K - h = K[i*2]; - l = K[i*2+1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // w - h = wh[i%16]; - l = wl[i%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - th = c & 0xffff | d << 16; - tl = a & 0xffff | b << 16; - - // add - h = th; - l = tl; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma0 - h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); - l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Maj - h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); - l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh7 = (c & 0xffff) | (d << 16); - bl7 = (a & 0xffff) | (b << 16); - - // add - h = bh3; - l = bl3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = th; - l = tl; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh3 = (c & 0xffff) | (d << 16); - bl3 = (a & 0xffff) | (b << 16); - - ah1 = bh0; - ah2 = bh1; - ah3 = bh2; - ah4 = bh3; - ah5 = bh4; - ah6 = bh5; - ah7 = bh6; - ah0 = bh7; - - al1 = bl0; - al2 = bl1; - al3 = bl2; - al4 = bl3; - al5 = bl4; - al6 = bl5; - al7 = bl6; - al0 = bl7; - - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - // add - h = wh[j]; - l = wl[j]; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = wh[(j+9)%16]; - l = wl[(j+9)%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma0 - th = wh[(j+1)%16]; - tl = wl[(j+1)%16]; - h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); - l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma1 - th = wh[(j+14)%16]; - tl = wl[(j+14)%16]; - h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); - l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - wh[j] = (c & 0xffff) | (d << 16); - wl[j] = (a & 0xffff) | (b << 16); - } - } - } - - // add - h = ah0; - l = al0; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[0]; - l = hl[0]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[0] = ah0 = (c & 0xffff) | (d << 16); - hl[0] = al0 = (a & 0xffff) | (b << 16); - - h = ah1; - l = al1; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[1]; - l = hl[1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[1] = ah1 = (c & 0xffff) | (d << 16); - hl[1] = al1 = (a & 0xffff) | (b << 16); - - h = ah2; - l = al2; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[2]; - l = hl[2]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[2] = ah2 = (c & 0xffff) | (d << 16); - hl[2] = al2 = (a & 0xffff) | (b << 16); - - h = ah3; - l = al3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[3]; - l = hl[3]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[3] = ah3 = (c & 0xffff) | (d << 16); - hl[3] = al3 = (a & 0xffff) | (b << 16); - - h = ah4; - l = al4; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[4]; - l = hl[4]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[4] = ah4 = (c & 0xffff) | (d << 16); - hl[4] = al4 = (a & 0xffff) | (b << 16); - - h = ah5; - l = al5; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[5]; - l = hl[5]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[5] = ah5 = (c & 0xffff) | (d << 16); - hl[5] = al5 = (a & 0xffff) | (b << 16); - - h = ah6; - l = al6; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[6]; - l = hl[6]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[6] = ah6 = (c & 0xffff) | (d << 16); - hl[6] = al6 = (a & 0xffff) | (b << 16); - - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[7]; - l = hl[7]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[7] = ah7 = (c & 0xffff) | (d << 16); - hl[7] = al7 = (a & 0xffff) | (b << 16); - - pos += 128; - n -= 128; - } - - return n; -} - -function crypto_hash(out, m, n) { - var hh = new Int32Array(8), - hl = new Int32Array(8), - x = new Uint8Array(256), - i, b = n; - - hh[0] = 0x6a09e667; - hh[1] = 0xbb67ae85; - hh[2] = 0x3c6ef372; - hh[3] = 0xa54ff53a; - hh[4] = 0x510e527f; - hh[5] = 0x9b05688c; - hh[6] = 0x1f83d9ab; - hh[7] = 0x5be0cd19; - - hl[0] = 0xf3bcc908; - hl[1] = 0x84caa73b; - hl[2] = 0xfe94f82b; - hl[3] = 0x5f1d36f1; - hl[4] = 0xade682d1; - hl[5] = 0x2b3e6c1f; - hl[6] = 0xfb41bd6b; - hl[7] = 0x137e2179; - - crypto_hashblocks_hl(hh, hl, m, n); - n %= 128; - - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, (b / 0x20000000) | 0, b << 3); - crypto_hashblocks_hl(hh, hl, x, n); - - for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/test-eol-project/node_modules/tweetnacl/nacl-fast.min.js b/test-eol-project/node_modules/tweetnacl/nacl-fast.min.js deleted file mode 100644 index 8bc47daa..00000000 --- a/test-eol-project/node_modules/tweetnacl/nacl-fast.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;i>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+c|0,B=B+u|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,c=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=i[s];for(;o>=64;){for(a(u,c,h,ur),s=0;s<64;s++)r[t+s]=n[e+s]^u[s];for(f=1,s=8;s<16;s++)f=f+(255&c[s])|0,c[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(u,c,h,ur),s=0;s=64;){for(a(s,f,o,ur),h=0;h<64;h++)r[t+h]=s[h];for(i=1,h=8;h<16;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,ur),h=0;h>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;n<16;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,c=0,u=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],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K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=c,r[6]=u,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g;r[14]=_;r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),c=$(),u=$(),y=$();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;o<16;o++)f[o]=h[o],c[o]=a[o]=s[o]=0;for(a[0]=c[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,c,e),x(u,a,s),M(a,a,s),x(s,f,c),M(f,f,c),B(c,u),B(y,a),m(a,s,a),m(s,f,u),x(u,a,s),M(a,a,s),B(f,a),M(s,c,y),m(a,s,ir),x(a,a,c),m(s,s,a),m(a,c,y),m(c,f,h),B(f,u),_(a,f,e),_(s,c,e);for(o=0;o<16;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=c[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,ur)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;U<16;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;U<80;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,c=N,u=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,u=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=c,k=u,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;E<16;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;o=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*vr[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),c=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var u=n+64;for(o=0;o>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],c=[$(),$(),$(),$()];if(h=-1,n<64)return-1;if(X(c,e))return-1;for(i=0;i>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),c=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|c<<8),k+=c>>>5|U,u=0,y=u,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),u=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),u+=y>>>13,y&=8191,l=u,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),u=l>>>13,l&=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,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;e=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n void): void; -} diff --git a/test-eol-project/node_modules/tweetnacl/nacl.js b/test-eol-project/node_modules/tweetnacl/nacl.js deleted file mode 100644 index f72dd78d..00000000 --- a/test-eol-project/node_modules/tweetnacl/nacl.js +++ /dev/null @@ -1,1175 +0,0 @@ -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function L32(x, c) { return (x << c) | (x >>> (32 - c)); } - -function ld32(x, i) { - var u = x[i+3] & 0xff; - u = (u<<8)|(x[i+2] & 0xff); - u = (u<<8)|(x[i+1] & 0xff); - return (u<<8)|(x[i+0] & 0xff); -} - -function dl64(x, i) { - var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; - var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; - return new u64(h, l); -} - -function st32(x, j, u) { - var i; - for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } -} - -function ts64(x, i, u) { - x[i] = (u.hi >> 24) & 0xff; - x[i+1] = (u.hi >> 16) & 0xff; - x[i+2] = (u.hi >> 8) & 0xff; - x[i+3] = u.hi & 0xff; - x[i+4] = (u.lo >> 24) & 0xff; - x[i+5] = (u.lo >> 16) & 0xff; - x[i+6] = (u.lo >> 8) & 0xff; - x[i+7] = u.lo & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core(out,inp,k,c,h) { - var w = new Uint32Array(16), x = new Uint32Array(16), - y = new Uint32Array(16), t = new Uint32Array(4); - var i, j, m; - - for (i = 0; i < 4; i++) { - x[5*i] = ld32(c, 4*i); - x[1+i] = ld32(k, 4*i); - x[6+i] = ld32(inp, 4*i); - x[11+i] = ld32(k, 16+4*i); - } - - for (i = 0; i < 16; i++) y[i] = x[i]; - - for (i = 0; i < 20; i++) { - for (j = 0; j < 4; j++) { - for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; - t[1] ^= L32((t[0]+t[3])|0, 7); - t[2] ^= L32((t[1]+t[0])|0, 9); - t[3] ^= L32((t[2]+t[1])|0,13); - t[0] ^= L32((t[3]+t[2])|0,18); - for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; - } - for (m = 0; m < 16; m++) x[m] = w[m]; - } - - if (h) { - for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; - for (i = 0; i < 4; i++) { - x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; - x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; - } - for (i = 0; i < 4; i++) { - st32(out,4*i,x[5*i]); - st32(out,16+4*i,x[6+i]); - } - } else { - for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); - } -} - -function crypto_core_salsa20(out,inp,k,c) { - core(out,inp,k,c,false); - return 0; -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core(out,inp,k,c,true); - return 0; -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - if (!b) return 0; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - if (m) mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,d,n,k) { - return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); -} - -function add1305(h, c) { - var j, u = 0; - for (j = 0; j < 17; j++) { - u = (u + ((h[j] + c[j]) | 0)) | 0; - h[j] = u & 255; - u >>>= 8; - } -} - -var minusp = new Uint32Array([ - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 -]); - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s, i, j, u; - var x = new Uint32Array(17), r = new Uint32Array(17), - h = new Uint32Array(17), c = new Uint32Array(17), - g = new Uint32Array(17); - for (j = 0; j < 17; j++) r[j]=h[j]=0; - for (j = 0; j < 16; j++) r[j]=k[j]; - r[3]&=15; - r[4]&=252; - r[7]&=15; - r[8]&=252; - r[11]&=15; - r[12]&=252; - r[15]&=15; - - while (n > 0) { - for (j = 0; j < 17; j++) c[j] = 0; - for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; - c[j] = 1; - mpos += j; n -= j; - add1305(h,c); - for (i = 0; i < 17; i++) { - x[i] = 0; - for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; - } - for (i = 0; i < 17; i++) h[i] = x[i]; - u = 0; - for (j = 0; j < 16; j++) { - u = (u + h[j]) | 0; - h[j] = u & 255; - u >>>= 8; - } - u = (u + h[16]) | 0; h[16] = u & 3; - u = (5 * (u >>> 2)) | 0; - for (j = 0; j < 16; j++) { - u = (u + h[j]) | 0; - h[j] = u & 255; - u >>>= 8; - } - u = (u + h[16]) | 0; h[16] = u; - } - - for (j = 0; j < 17; j++) g[j] = h[j]; - add1305(h,minusp); - s = (-(h[16] >>> 7) | 0); - for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); - - for (j = 0; j < 16; j++) c[j] = k[j + 16]; - c[16] = 0; - add1305(h,c); - for (j = 0; j < 16; j++) out[outpos+j] = h[j]; - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var c; - var i; - for (i = 0; i < 16; i++) { - o[i] += 65536; - c = Math.floor(o[i] / 65536); - o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); - o[i] -= (c * 65536); - } -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - var i; - for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; -} - -function Z(o, a, b) { - var i; - for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; -} - -function M(o, a, b) { - var i, j, t = new Float64Array(31); - for (i = 0; i < 31; i++) t[i] = 0; - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - t[i+j] += a[i] * b[j]; - } - } - for (i = 0; i < 15; i++) { - t[i] += 38 * t[i+16]; - } - for (i = 0; i < 16; i++) o[i] = t[i]; - car25519(o); - car25519(o); -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -function add64() { - var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; - for (i = 0; i < arguments.length; i++) { - l = arguments[i].lo; - h = arguments[i].hi; - a += (l & m16); b += (l >>> 16); - c += (h & m16); d += (h >>> 16); - } - - b += (a >>> 16); - c += (b >>> 16); - d += (c >>> 16); - - return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); -} - -function shr64(x, c) { - return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); -} - -function xor64() { - var l = 0, h = 0, i; - for (i = 0; i < arguments.length; i++) { - l ^= arguments[i].lo; - h ^= arguments[i].hi; - } - return new u64(h, l); -} - -function R(x, c) { - var h, l, c1 = 32 - c; - if (c < 32) { - h = (x.hi >>> c) | (x.lo << c1); - l = (x.lo >>> c) | (x.hi << c1); - } else if (c < 64) { - h = (x.lo >>> c) | (x.hi << c1); - l = (x.hi >>> c) | (x.lo << c1); - } - return new u64(h, l); -} - -function Ch(x, y, z) { - var h = (x.hi & y.hi) ^ (~x.hi & z.hi), - l = (x.lo & y.lo) ^ (~x.lo & z.lo); - return new u64(h, l); -} - -function Maj(x, y, z) { - var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), - l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); - return new u64(h, l); -} - -function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } -function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } -function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } -function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } - -var K = [ - new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), - new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), - new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), - new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), - new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), - new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), - new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), - new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), - new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), - new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), - new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), - new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), - new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), - new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), - new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), - new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), - new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), - new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), - new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), - new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), - new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), - new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), - new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), - new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), - new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), - new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), - new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), - new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), - new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), - new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), - new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), - new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), - new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), - new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), - new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), - new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), - new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), - new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), - new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), - new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) -]; - -function crypto_hashblocks(x, m, n) { - var z = [], b = [], a = [], w = [], t, i, j; - - for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); - for (i = 0; i < 80; i++) { - for (j = 0; j < 8; j++) b[j] = a[j]; - t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); - b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); - b[3] = add64(b[3], t); - for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); - } - } - } - - for (i = 0; i < 8; i++) { - a[i] = add64(a[i], z[i]); - z[i] = a[i]; - } - - pos += 128; - n -= 128; - } - - for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); - return n; -} - -var iv = new Uint8Array([ - 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, - 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, - 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, - 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, - 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, - 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, - 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, - 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 -]); - -function crypto_hash(out, m, n) { - var h = new Uint8Array(64), x = new Uint8Array(256); - var i, b = n; - - for (i = 0; i < 64; i++) h[i] = iv[i]; - - crypto_hashblocks(h, m, n); - n %= 128; - - for (i = 0; i < 256; i++) x[i] = 0; - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); - crypto_hashblocks(h, x, n); - - for (i = 0; i < 64; i++) out[i] = h[i]; - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (typeof require !== 'undefined') { - // Node.js. - crypto = require('crypto'); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/test-eol-project/node_modules/tweetnacl/nacl.min.js b/test-eol-project/node_modules/tweetnacl/nacl.min.js deleted file mode 100644 index 4484974e..00000000 --- a/test-eol-project/node_modules/tweetnacl/nacl.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new sr(e,t)}function o(r,n,e){var t;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;i>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),l=new Uint32Array(16),s=new Uint32Array(16),h=new Uint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}else for(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function l(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),l=new Uint32Array(17),s=new Uint32Array(17),h=new Uint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;e<16;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var s=a.subarray(32),h=a.subarray(16);return k(s,s),Y(h,h,s),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new sr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new sr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r>>n|r.lo<>>n|r.hi<>>n|r.hi<>>n|r.lo<=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;o>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", - "test": "npm run test-node-all && npm run test-browser", - "bench": "node test/benchmark/bench.js", - "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/dchest/tweetnacl-js.git" - }, - "keywords": [ - "crypto", - "cryptography", - "curve25519", - "ed25519", - "encrypt", - "hash", - "key", - "nacl", - "poly1305", - "public", - "salsa20", - "signatures" - ], - "author": "TweetNaCl-js contributors", - "license": "Unlicense", - "bugs": { - "url": "https://github.com/dchest/tweetnacl-js/issues" - }, - "homepage": "https://tweetnacl.js.org", - "devDependencies": { - "browserify": "^13.0.0", - "eslint": "^2.2.0", - "faucet": "^0.0.1", - "tap-browser-color": "^0.1.2", - "tape": "^4.4.0", - "tape-run": "^2.1.3", - "tweetnacl-util": "^0.13.3", - "uglify-js": "^2.6.1" - }, - "browser": { - "buffer": false, - "crypto": false - } -} diff --git a/test-eol-project/node_modules/uri-js/LICENSE b/test-eol-project/node_modules/uri-js/LICENSE deleted file mode 100755 index 9338bde8..00000000 --- a/test-eol-project/node_modules/uri-js/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY GARY COURT "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 GARY COURT 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. - -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. diff --git a/test-eol-project/node_modules/uri-js/README.md b/test-eol-project/node_modules/uri-js/README.md deleted file mode 100755 index 43e648bb..00000000 --- a/test-eol-project/node_modules/uri-js/README.md +++ /dev/null @@ -1,203 +0,0 @@ -# URI.js - -URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc). -It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications. - -URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated). - -## API - -### Parsing - - URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body"); - //returns: - //{ - // scheme : "uri", - // userinfo : "user:pass", - // host : "example.com", - // port : 123, - // path : "/one/two.three", - // query : "q1=a1&q2=a2", - // fragment : "body" - //} - -### Serializing - - URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer" - -### Resolving - - URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g" - -### Normalizing - - URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html" - -### Comparison - - URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true - -### IP Support - - //IPv4 normalization - URI.normalize("//192.068.001.000") === "//192.68.1.0" - - //IPv6 normalization - URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]" - - //IPv6 zone identifier support - URI.parse("//[2001:db8::7%25en1]"); - //returns: - //{ - // host : "2001:db8::7%en1" - //} - -### IRI Support - - //convert IRI to URI - URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9" - //convert URI to IRI - URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé" - -### Options - -All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties: - -* `scheme` (string) - - Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior. - -* `reference` (string) - - If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme. - -* `tolerant` (boolean, false) - - If set to `true`, the parser will relax URI resolving rules. - -* `absolutePath` (boolean, false) - - If set to `true`, the serializer will not resolve a relative `path` component. - -* `iri` (boolean, false) - - If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). - -* `unicodeSupport` (boolean, false) - - If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). - -* `domainHost` (boolean, false) - - If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt). - -## Scheme Extendable - -URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes: - -* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\] -* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\] -* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\] -* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\] -* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\] -* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\] -* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\] - -### HTTP/HTTPS Support - - URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true - URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true - -### WS/WSS Support - - URI.parse("wss://example.com/foo?bar=baz"); - //returns: - //{ - // scheme : "wss", - // host: "example.com", - // resourceName: "/foo?bar=baz", - // secure: true, - //} - - URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true - -### Mailto Support - - URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!"); - //returns: - //{ - // scheme : "mailto", - // to : ["alpha@example.com", "bravo@example.com"], - // subject : "SUBSCRIBE", - // body : "Sign me up!" - //} - - URI.serialize({ - scheme : "mailto", - to : ["alpha@example.com"], - subject : "REMOVE", - body : "Please remove me", - headers : { - cc : "charlie@example.com" - } - }) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me" - -### URN Support - - URI.parse("urn:example:foo"); - //returns: - //{ - // scheme : "urn", - // nid : "example", - // nss : "foo", - //} - -#### URN UUID Support - - URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); - //returns: - //{ - // scheme : "urn", - // nid : "uuid", - // uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", - //} - -## Usage - -To load in a browser, use the following tag: - - - -To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line: - - npm install uri-js - # OR - yarn add uri-js - -Then, in your code, load it using: - - const URI = require("uri-js"); - -If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using: - - import * as URI from "uri-js"; - -Or you can load just what you need using named exports: - - import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js"; - -## Breaking changes - -### Breaking changes from 3.x - -URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler. - -The UUID of a URN can now be found in the `uuid` property. - -### Breaking changes from 2.x - -URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful. - -### Breaking changes from 1.x - -The `errors` array on parsed components is now an `error` string. diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts deleted file mode 100755 index da51e235..00000000 --- a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export interface URIComponents { - scheme?: string; - userinfo?: string; - host?: string; - port?: number | string; - path?: string; - query?: string; - fragment?: string; - reference?: string; - error?: string; -} -export interface URIOptions { - scheme?: string; - reference?: string; - tolerant?: boolean; - absolutePath?: boolean; - iri?: boolean; - unicodeSupport?: boolean; - domainHost?: boolean; -} -export interface URISchemeHandler { - scheme: string; - parse(components: ParentComponents, options: Options): Components; - serialize(components: Components, options: Options): ParentComponents; - unicodeSupport?: boolean; - domainHost?: boolean; - absolutePath?: boolean; -} -export interface URIRegExps { - NOT_SCHEME: RegExp; - NOT_USERINFO: RegExp; - NOT_HOST: RegExp; - NOT_PATH: RegExp; - NOT_PATH_NOSCHEME: RegExp; - NOT_QUERY: RegExp; - NOT_FRAGMENT: RegExp; - ESCAPE: RegExp; - UNRESERVED: RegExp; - OTHER_CHARS: RegExp; - PCT_ENCODED: RegExp; - IPV4ADDRESS: RegExp; - IPV6ADDRESS: RegExp; -} -export declare const SCHEMES: { - [scheme: string]: URISchemeHandler; -}; -export declare function pctEncChar(chr: string): string; -export declare function pctDecChars(str: string): string; -export declare function parse(uriString: string, options?: URIOptions): URIComponents; -export declare function removeDotSegments(input: string): string; -export declare function serialize(components: URIComponents, options?: URIOptions): string; -export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; -export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; -export declare function normalize(uri: string, options?: URIOptions): string; -export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; -export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; -export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; -export declare function escapeComponent(str: string, options?: URIOptions): string; -export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js deleted file mode 100755 index 0706116f..00000000 --- a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js +++ /dev/null @@ -1,1443 +0,0 @@ -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.URI = global.URI || {}))); -}(this, (function (exports) { 'use strict'; - -function merge() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { - sets[_key] = arguments[_key]; - } - - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} -function subexp(str) { - return "(?:" + str + ")"; -} -function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); -} -function toUpperCase(str) { - return str.toUpperCase(); -} -function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; -} -function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; -} - -function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), - //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), - //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), - //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), - //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), - //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), - //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), - //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), - //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -var URI_PROTOCOL = buildExps(false); - -var IRI_PROTOCOL = buildExps(true); - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - - - - - - - - - - - - - -var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}; - -/** Highest positive signed 32-bit float value */ - -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' - -/** Regular expressions */ -var regexPunycode = /^xn--/; -var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error$1(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); -}; - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -var digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -var decode = function decode(input) { - // Don't use UCS-2. - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (var j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - var oldi = i; - for (var w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error$1('invalid-input'); - } - - var digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - - w *= baseMinusT; - } - - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - - return String.fromCodePoint.apply(String, output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -var encode = function encode(input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - - // Handle the basic code points. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var basicLength = output.length; - var handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base;; /* no condition */k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -var SCHEMES = {}; -function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; -} -function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} - -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } -} -var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; -function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - //fix port number - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} - -function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} - -var RDS1 = /^\.\.?\//; -var RDS2 = /^\/\.(\/|$)/; -var RDS3 = /^\/\.\.(\/|$)/; -var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} - -function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) {} - //TODO: normalize IPv6 address as per RFC 5952 - - //if host component is a domain name - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - //convert IDN via punycode - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} - -function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} - -function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} - -function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} - -function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} - -function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); -} - -function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); -} - -var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - //normalize the default port - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; - -var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize -}; - -function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; -} -//RFC 6455 -var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse(components, options) { - var wsComponents = components; - //indicate if the secure flag is set - wsComponents.secure = isSecure(wsComponents); - //construct resouce name - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function serialize(wsComponents, options) { - //normalize the default port - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - //ensure scheme matches secure flag - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; - wsComponents.secure = undefined; - } - //reconstruct path from resource name - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split('?'), - _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), - path = _wsComponents$resourc2[0], - query = _wsComponents$resourc2[1]; - - wsComponents.path = path && path !== '/' ? path : undefined; - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - //forbid fragment component - wsComponents.fragment = undefined; - return wsComponents; - } -}; - -var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize -}; - -var O = {}; -var isIRI = true; -//RFC 3986 -var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -var UNRESERVED = new RegExp(UNRESERVED$$, "g"); -var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -var NOT_HFVALUE = NOT_HFNAME; -function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; -} -var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; - -var URN_PARSE = /^([^\:]+)\:(.*)/; -//RFC 2141 -var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } -}; - -var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -//RFC 4122 -var handler$6 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } -}; - -SCHEMES[handler.scheme] = handler; -SCHEMES[handler$1.scheme] = handler$1; -SCHEMES[handler$2.scheme] = handler$2; -SCHEMES[handler$3.scheme] = handler$3; -SCHEMES[handler$4.scheme] = handler$4; -SCHEMES[handler$5.scheme] = handler$5; -SCHEMES[handler$6.scheme] = handler$6; - -exports.SCHEMES = SCHEMES; -exports.pctEncChar = pctEncChar; -exports.pctDecChars = pctDecChars; -exports.parse = parse; -exports.removeDotSegments = removeDotSegments; -exports.serialize = serialize; -exports.resolveComponents = resolveComponents; -exports.resolve = resolve; -exports.normalize = normalize; -exports.equal = equal; -exports.escapeComponent = escapeComponent; -exports.unescapeComponent = unescapeComponent; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=uri.all.js.map diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map deleted file mode 100755 index 5b30c4e2..00000000 --- a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","wss","ws","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","wsComponents","fragment","resourceName","secure","port","isSecure","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","H16$","LS32$","DEC_OCTET_RELAXED$","DEC_OCTET$","UCSCHA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GAA9C;eAEOU,aAAP;;CA1CF,CA8CA;;AD5DA,IAAMH,OAAO,0DAAb;AACA,AAEA;AACA,IAAME,YAAsE;YAClE,UADkE;WAGnE,eAAUV,aAAV,EAAuCI,OAAvC,EAAT;YACQF,iBAAiBF,aAAvB;uBACeR,IAAf,GAAsBU,eAAeD,GAArC;uBACeA,GAAf,GAAqBQ,SAArB;YAEI,CAACL,QAAQE,QAAT,KAAsB,CAACJ,eAAeV,IAAhB,IAAwB,CAACU,eAAeV,IAAf,CAAoBe,KAApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeV,IAAf,IAAuB,EAAxB,EAA4BW,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAT,QAAQQ,QAAKN,MAAb,IAAuBM,OAAvB;AAEA,AACAR,QAAQO,UAAML,MAAd,IAAwBK,SAAxB;AAEA,AACAP,QAAQM,UAAGJ,MAAX,IAAqBI,SAArB;AAEA,AACAN,QAAQK,UAAIH,MAAZ,IAAsBG,SAAtB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts deleted file mode 100755 index da51e235..00000000 --- a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export interface URIComponents { - scheme?: string; - userinfo?: string; - host?: string; - port?: number | string; - path?: string; - query?: string; - fragment?: string; - reference?: string; - error?: string; -} -export interface URIOptions { - scheme?: string; - reference?: string; - tolerant?: boolean; - absolutePath?: boolean; - iri?: boolean; - unicodeSupport?: boolean; - domainHost?: boolean; -} -export interface URISchemeHandler { - scheme: string; - parse(components: ParentComponents, options: Options): Components; - serialize(components: Components, options: Options): ParentComponents; - unicodeSupport?: boolean; - domainHost?: boolean; - absolutePath?: boolean; -} -export interface URIRegExps { - NOT_SCHEME: RegExp; - NOT_USERINFO: RegExp; - NOT_HOST: RegExp; - NOT_PATH: RegExp; - NOT_PATH_NOSCHEME: RegExp; - NOT_QUERY: RegExp; - NOT_FRAGMENT: RegExp; - ESCAPE: RegExp; - UNRESERVED: RegExp; - OTHER_CHARS: RegExp; - PCT_ENCODED: RegExp; - IPV4ADDRESS: RegExp; - IPV6ADDRESS: RegExp; -} -export declare const SCHEMES: { - [scheme: string]: URISchemeHandler; -}; -export declare function pctEncChar(chr: string): string; -export declare function pctDecChars(str: string): string; -export declare function parse(uriString: string, options?: URIOptions): URIComponents; -export declare function removeDotSegments(input: string): string; -export declare function serialize(components: URIComponents, options?: URIOptions): string; -export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; -export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; -export declare function normalize(uri: string, options?: URIOptions): string; -export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; -export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; -export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; -export declare function escapeComponent(str: string, options?: URIOptions): string; -export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js b/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js deleted file mode 100755 index fcd84586..00000000 --- a/test-eol-project/node_modules/uri-js/dist/es5/uri.all.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function g(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=T(n,2),o=t[1];return o?o.split(".").map(m).join("."):e}function v(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=T(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=T(i,2),s=u[0],f=u[1],c=f?f.split(":").map(m):[],p=s.split(":").map(m),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,v=Array(d),E=0;E1){var A=v.slice(0,y.index),D=v.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=v.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?R:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(K);if(o){W?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=v(g(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=J[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=B.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?R:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(v(g(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(ee))e=e.replace(ee,"/");else if(e.match(re))e=e.replace(re,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(ne);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?R:F,t=[],o=J[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?R.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?R.PCT_ENCODED:F.PCT_ENCODED,d)}function N(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function I(e){var r=d(e);return r.match(he)?r:e}var F=u(!1),R=u(!0),T=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode,$=function(e){return String.fromCodePoint.apply(String,_(e))},M=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},V=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},k=function(e,r,n){var t=0;for(e=n?z(e/700):e>>1,e+=z(e/r);e>455;t+=36)e=z(e/35);return z(t+36*e/(e+38))},Z=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=M(e.charCodeAt(f++));(d>=36||d>z((P-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dz(P/m)&&s("overflow"),p*=m}var g=r.length+1;a=k(t-c,g,0==c),z(t/g)>P-o&&s("overflow"),o+=z(t/g),t%=g,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},G=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(L(d))}}catch(U){u=!0,f=U}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,m=l;for(l&&r.push("-");m=t&&Az((P-o)/D)&&s("overflow"),o+=(g-t)*D,t=g;var w=!0,b=!1,x=undefined;try{for(var O,N=e[Symbol.iterator]();!(w=(O=N.next()).done);w=!0){var I=O.value;if(IP&&s("overflow"),I==t){for(var F=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(FA-Z\\x5E-\\x7E]",'[\\"\\\\]'),he=new RegExp(se,"g"),de=new RegExp(ce,"g"),le=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pe),"g"),me=new RegExp(r("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ge=me,ve={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts deleted file mode 100755 index f6be7603..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./uri"; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/index.js b/test-eol-project/node_modules/uri-js/dist/esnext/index.js deleted file mode 100755 index e3531b5b..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import { SCHEMES } from "./uri"; -import http from "./schemes/http"; -SCHEMES[http.scheme] = http; -import https from "./schemes/https"; -SCHEMES[https.scheme] = https; -import ws from "./schemes/ws"; -SCHEMES[ws.scheme] = ws; -import wss from "./schemes/wss"; -SCHEMES[wss.scheme] = wss; -import mailto from "./schemes/mailto"; -SCHEMES[mailto.scheme] = mailto; -import urn from "./schemes/urn"; -SCHEMES[urn.scheme] = urn; -import uuid from "./schemes/urn-uuid"; -SCHEMES[uuid.scheme] = uuid; -export * from "./uri"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/index.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/index.js.map deleted file mode 100755 index 0971f6eb..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAExB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts deleted file mode 100755 index c91cdacb..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URIRegExps } from "./uri"; -declare const _default: URIRegExps; -export default _default; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js deleted file mode 100755 index 34e7de98..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js +++ /dev/null @@ -1,3 +0,0 @@ -import { buildExps } from "./regexps-uri"; -export default buildExps(true); -//# sourceMappingURL=regexps-iri.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map deleted file mode 100755 index 2269c580..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-iri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts deleted file mode 100755 index 6096bda5..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { URIRegExps } from "./uri"; -export declare function buildExps(isIRI: boolean): URIRegExps; -declare const _default: URIRegExps; -export default _default; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js deleted file mode 100755 index 1cc659f1..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js +++ /dev/null @@ -1,42 +0,0 @@ -import { merge, subexp } from "./util"; -export function buildExps(isIRI) { - const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive - LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -export default buildExps(false); -//# sourceMappingURL=regexps-uri.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map deleted file mode 100755 index cb028b80..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/regexps-uri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regex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end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts deleted file mode 100755 index fe5b2f35..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URISchemeHandler } from "../uri"; -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js deleted file mode 100755 index 6abf0fe6..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js +++ /dev/null @@ -1,28 +0,0 @@ -const handler = { - scheme: "http", - domainHost: true, - parse: function (components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function (components, options) { - const secure = String(components.scheme).toLowerCase() === "https"; - //normalize the default port - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; -export default handler; -//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map deleted file mode 100755 index 82118970..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/http.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;QAEnE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACtE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts deleted file mode 100755 index fe5b2f35..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URISchemeHandler } from "../uri"; -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js deleted file mode 100755 index ec4b6e76..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js +++ /dev/null @@ -1,9 +0,0 @@ -import http from "./http"; -const handler = { - scheme: "https", - domainHost: http.domainHost, - parse: http.parse, - serialize: http.serialize -}; -export default handler; -//# sourceMappingURL=https.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map deleted file mode 100755 index 385b8efe..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/https.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts deleted file mode 100755 index e2aefc2a..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { URISchemeHandler, URIComponents } from "../uri"; -export interface MailtoHeaders { - [hfname: string]: string; -} -export interface MailtoComponents extends URIComponents { - to: Array; - headers?: MailtoHeaders; - subject?: string; - body?: string; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js deleted file mode 100755 index 2553713c..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js +++ /dev/null @@ -1,148 +0,0 @@ -import { pctEncChar, pctDecChars, unescapeComponent } from "../uri"; -import punycode from "punycode"; -import { merge, subexp, toUpperCase, toArray } from "../util"; -const O = {}; -const isIRI = true; -//RFC 3986 -const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"); -const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$); -const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$); -const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'); -//RFC 6068 -const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126 -const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$); -const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"); -const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$); -const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$); -const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"); -const HFNAME$ = subexp(QCHAR$ + "*"); -const HFVALUE$ = HFNAME$; -const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$); -const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"); -const HFIELDS$ = subexp("\\?" + HFIELDS2$); -const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"); -const UNRESERVED = new RegExp(UNRESERVED$$, "g"); -const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"); -const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -const NOT_HFVALUE = NOT_HFNAME; -const TO = new RegExp("^" + TO$ + "$"); -const HFIELDS = new RegExp("^" + HFIELDS2$ + "$"); -function decodeUnreserved(str) { - const decStr = pctDecChars(str); - return (!decStr.match(UNRESERVED) ? str : decStr); -} -const handler = { - scheme: "mailto", - parse: function (components, options) { - const mailtoComponents = components; - const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []); - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - let unknownHeaders = false; - const headers = {}; - const hfields = mailtoComponents.query.split("&"); - for (let x = 0, xl = hfields.length; x < xl; ++x) { - const hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - const toAddrs = hfield[1].split(","); - for (let x = 0, xl = toAddrs.length; x < xl; ++x) { - to.push(toAddrs[x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) - mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (let x = 0, xl = to.length; x < xl; ++x) { - const addr = to[x].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } - catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } - else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[x] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function (mailtoComponents, options) { - const components = mailtoComponents; - const to = toArray(mailtoComponents.to); - if (to) { - for (let x = 0, xl = to.length; x < xl; ++x) { - const toAddr = String(to[x]); - const atIdx = toAddr.lastIndexOf("@"); - const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - let domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); - } - catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - const headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) - headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) - headers["body"] = mailtoComponents.body; - const fields = []; - for (const name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + - "=" + - headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; -export default handler; -//# sourceMappingURL=mailto.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map deleted file mode 100755 index 82dba9a1..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/mailto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mailto.js","sourceRoot":"","sources":["../../../src/schemes/mailto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAa9D,MAAM,CAAC,GAAiB,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB,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CAAC,IAAI;YAAE,OAAO,CAAC,MAAM,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC;QAEnE,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE;YAC3B,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE;gBAC9B,MAAM,CAAC,IAAI,CACV,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;oBAC7G,GAAG;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CACvH,CAAC;aACF;SACD;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YAClB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts deleted file mode 100755 index e75f2e79..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { URISchemeHandler, URIOptions } from "../uri"; -import { URNComponents } from "./urn"; -export interface UUIDComponents extends URNComponents { - uuid?: string; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js deleted file mode 100755 index d1fce495..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js +++ /dev/null @@ -1,23 +0,0 @@ -const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/; -//RFC 4122 -const handler = { - scheme: "urn:uuid", - parse: function (urnComponents, options) { - const uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function (uuidComponents, options) { - const urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - }, -}; -export default handler; -//# sourceMappingURL=urn-uuid.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map deleted file mode 100755 index 3b7a8b3a..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts deleted file mode 100755 index 7e0c2fba..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; -export interface URNComponents extends URIComponents { - nid?: string; - nss?: string; -} -export interface URNOptions extends URIOptions { - nid?: string; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js deleted file mode 100755 index 5d3f10aa..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js +++ /dev/null @@ -1,49 +0,0 @@ -import { SCHEMES } from "../uri"; -const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})"; -const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})"; -const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]"; -const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)"; -const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"); -const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"); -const URN_PARSE = /^([^\:]+)\:(.*)/; -const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g; -//RFC 2141 -const handler = { - scheme: "urn", - parse: function (components, options) { - const matches = components.path && components.path.match(URN_PARSE); - let urnComponents = components; - if (matches) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = matches[1].toLowerCase(); - const nss = matches[2]; - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } - else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function (urnComponents, options) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = urnComponents.nid; - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - const uriComponents = urnComponents; - const nss = urnComponents.nss; - uriComponents.path = `${nid || options.nid}:${nss}`; - return uriComponents; - }, -}; -export default handler; -//# sourceMappingURL=urn.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map deleted file mode 100755 index ea43b0be..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/urn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,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AAK,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;aAC7E;SACD;aAAM;YACN,aAAa,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,IAAI,wBAAwB,CAAC;SACtE;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;IAED,SAAS,EAAG,UAAU,aAA2B,EAAE,OAAkB;QACpE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;QAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,aAAa,EAAE;YAClB,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;SACjF;QAED,MAAM,aAAa,GAAG,aAA8B,CAAC;QACrD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,aAAa,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QAEpD,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts deleted file mode 100755 index 47f4835b..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { URISchemeHandler, URIComponents } from "../uri"; -export interface WSComponents extends URIComponents { - resourceName?: string; - secure?: boolean; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js deleted file mode 100755 index 9277f035..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js +++ /dev/null @@ -1,41 +0,0 @@ -function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; -} -//RFC 6455 -const handler = { - scheme: "ws", - domainHost: true, - parse: function (components, options) { - const wsComponents = components; - //indicate if the secure flag is set - wsComponents.secure = isSecure(wsComponents); - //construct resouce name - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function (wsComponents, options) { - //normalize the default port - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - //ensure scheme matches secure flag - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws'); - wsComponents.secure = undefined; - } - //reconstruct path from resource name - if (wsComponents.resourceName) { - const [path, query] = wsComponents.resourceName.split('?'); - wsComponents.path = (path && path !== '/' ? path : undefined); - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - //forbid fragment component - wsComponents.fragment = undefined; - return wsComponents; - } -}; -export default handler; -//# sourceMappingURL=ws.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map deleted file mode 100755 index 186818cc..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/ws.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../../src/schemes/ws.ts"],"names":[],"mappings":"AAOA,kBAAkB,YAAyB;IAC1C,OAAO,OAAO,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,C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Y,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3D,YAAY,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC9D,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;YAC3B,YAAY,CAAC,YAAY,GAAG,SAAS,CAAC;SACtC;QAED,2BAA2B;QAC3B,YAAY,CAAC,QAAQ,GAAG,SAAS,CAAC;QAElC,OAAO,YAAY,CAAC;IACrB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts deleted file mode 100755 index fe5b2f35..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URISchemeHandler } from "../uri"; -declare const handler: URISchemeHandler; -export default handler; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js deleted file mode 100755 index d1e22ccd..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js +++ /dev/null @@ -1,9 +0,0 @@ -import ws from "./ws"; -const handler = { - scheme: "wss", - domainHost: ws.domainHost, - parse: ws.parse, - serialize: ws.serialize -}; -export default handler; -//# sourceMappingURL=wss.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map deleted file mode 100755 index e19006d9..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/schemes/wss.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wss.js","sourceRoot":"","sources":["../../../src/schemes/wss.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,KAAK;IACd,UAAU,EAAG,EAAE,CAAC,UAAU;IAC1B,KAAK,EAAG,EAAE,CAAC,KAAK;IAChB,SAAS,EAAG,EAAE,CAAC,SAAS;CACxB,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts deleted file mode 100755 index da51e235..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/uri.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export interface URIComponents { - scheme?: string; - userinfo?: string; - host?: string; - port?: number | string; - path?: string; - query?: string; - fragment?: string; - reference?: string; - error?: string; -} -export interface URIOptions { - scheme?: string; - reference?: string; - tolerant?: boolean; - absolutePath?: boolean; - iri?: boolean; - unicodeSupport?: boolean; - domainHost?: boolean; -} -export interface URISchemeHandler { - scheme: string; - parse(components: ParentComponents, options: Options): Components; - serialize(components: Components, options: Options): ParentComponents; - unicodeSupport?: boolean; - domainHost?: boolean; - absolutePath?: boolean; -} -export interface URIRegExps { - NOT_SCHEME: RegExp; - NOT_USERINFO: RegExp; - NOT_HOST: RegExp; - NOT_PATH: RegExp; - NOT_PATH_NOSCHEME: RegExp; - NOT_QUERY: RegExp; - NOT_FRAGMENT: RegExp; - ESCAPE: RegExp; - UNRESERVED: RegExp; - OTHER_CHARS: RegExp; - PCT_ENCODED: RegExp; - IPV4ADDRESS: RegExp; - IPV6ADDRESS: RegExp; -} -export declare const SCHEMES: { - [scheme: string]: URISchemeHandler; -}; -export declare function pctEncChar(chr: string): string; -export declare function pctDecChars(str: string): string; -export declare function parse(uriString: string, options?: URIOptions): URIComponents; -export declare function removeDotSegments(input: string): string; -export declare function serialize(components: URIComponents, options?: URIOptions): string; -export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; -export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; -export declare function normalize(uri: string, options?: URIOptions): string; -export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; -export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; -export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; -export declare function escapeComponent(str: string, options?: URIOptions): string; -export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/uri.js b/test-eol-project/node_modules/uri-js/dist/esnext/uri.js deleted file mode 100755 index 659ce265..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/uri.js +++ /dev/null @@ -1,480 +0,0 @@ -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT 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. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -import URI_PROTOCOL from "./regexps-uri"; -import IRI_PROTOCOL from "./regexps-iri"; -import punycode from "punycode"; -import { toUpperCase, typeOf, assign } from "./util"; -export const SCHEMES = {}; -export function pctEncChar(chr) { - const c = chr.charCodeAt(0); - let e; - if (c < 16) - e = "%0" + c.toString(16).toUpperCase(); - else if (c < 128) - e = "%" + c.toString(16).toUpperCase(); - else if (c < 2048) - e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); - else - e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); - return e; -} -export function pctDecChars(str) { - let newStr = ""; - let i = 0; - const il = str.length; - while (i < il) { - const c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } - else if (c >= 194 && c < 224) { - if ((il - i) >= 6) { - const c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - } - else { - newStr += str.substr(i, 6); - } - i += 6; - } - else if (c >= 224) { - if ((il - i) >= 9) { - const c2 = parseInt(str.substr(i + 4, 2), 16); - const c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - } - else { - newStr += str.substr(i, 9); - } - i += 9; - } - else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - const decStr = pctDecChars(str); - return (!decStr.match(protocol.UNRESERVED) ? str : decStr); - } - if (components.scheme) - components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) - components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) - components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) - components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) - components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) - components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} -; -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - const matches = host.match(protocol.IPV4ADDRESS) || []; - const [, address] = matches; - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } - else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - const matches = host.match(protocol.IPV6ADDRESS) || []; - const [, address, zone] = matches; - if (address) { - const [last, first] = address.toLowerCase().split('::').reverse(); - const firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - const lastFields = last.split(":").map(_stripLeadingZeros); - const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - const fieldCount = isLastFieldIPv4Address ? 7 : 8; - const lastFieldsStart = lastFields.length - fieldCount; - const fields = Array(fieldCount); - for (let x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - const allZeroFields = fields.reduce((acc, field, index) => { - if (!field || field === "0") { - const lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } - else { - acc.push({ index, length: 1 }); - } - } - return acc; - }, []); - const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0]; - let newHost; - if (longestZeroFields && longestZeroFields.length > 1) { - const newFirst = fields.slice(0, longestZeroFields.index); - const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } - else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } - else { - return host; - } -} -const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined; -export function parse(uriString, options = {}) { - const components = {}; - const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); - if (options.reference === "suffix") - uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - const matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } - else { //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); - components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); - components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); - //fix port number - if (isNaN(components.port)) { - components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } - else if (components.scheme === undefined) { - components.reference = "relative"; - } - else if (components.fragment === undefined) { - components.reference = "absolute"; - } - else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } - catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } - else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } - else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} -; -function _recomposeAuthority(components, options) { - const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); - const uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} -; -const RDS1 = /^\.\.?\//; -const RDS2 = /^\/\.(\/|$)/; -const RDS3 = /^\/\.\.(\/|$)/; -const RDS4 = /^\.\.?$/; -const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -export function removeDotSegments(input) { - const output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } - else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } - else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } - else if (input === "." || input === "..") { - input = ""; - } - else { - const im = input.match(RDS5); - if (im) { - const s = im[0]; - input = input.slice(s.length); - output.push(s); - } - else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} -; -export function serialize(components, options = {}) { - const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL); - const uriTokens = []; - //find scheme handler - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) - schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) { - //TODO: normalize IPv6 address as per RFC 5952 - } - //if host component is a domain name - else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) { - //convert IDN via punycode - try { - components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); - } - catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - const authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - let s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} -; -export function resolveComponents(base, relative, options = {}, skipNormalization) { - const target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } - else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } - else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } - else { - target.query = base.query; - } - } - else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } - else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } - else if (!base.path) { - target.path = relative.path; - } - else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} -; -export function resolve(baseURI, relativeURI, options) { - const schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} -; -export function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } - else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} -; -export function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } - else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } - else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} -; -export function escapeComponent(str, options) { - return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); -} -; -export function unescapeComponent(str, options) { - return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); -} -; -//# sourceMappingURL=uri.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map deleted file mode 100755 index 2e72ab18..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/uri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAA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,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAC1H,CAAC;AAAA,CAAC;AAEF,MAAM,4BAA4B,GAAU,EAAE,OAAmB;IAChE,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACrI,CAAC;AAAA,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts b/test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts deleted file mode 100755 index 7c128575..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/util.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare function merge(...sets: Array): string; -export declare function subexp(str: string): string; -export declare function typeOf(o: any): string; -export declare function toUpperCase(str: string): string; -export declare function toArray(obj: any): Array; -export declare function assign(target: object, source: any): any; diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/util.js b/test-eol-project/node_modules/uri-js/dist/esnext/util.js deleted file mode 100755 index 072711ef..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/util.js +++ /dev/null @@ -1,36 +0,0 @@ -export function merge(...sets) { - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - const xl = sets.length - 1; - for (let x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } - else { - return sets[0]; - } -} -export function subexp(str) { - return "(?:" + str + ")"; -} -export function typeOf(o) { - return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); -} -export function toUpperCase(str) { - return str.toUpperCase(); -} -export function toArray(obj) { - return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; -} -export function assign(target, source) { - const obj = target; - if (source) { - for (const key in source) { - obj[key] = source[key]; - } - } - return obj; -} -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/dist/esnext/util.js.map b/test-eol-project/node_modules/uri-js/dist/esnext/util.js.map deleted file mode 100755 index 05d9df02..00000000 --- a/test-eol-project/node_modules/uri-js/dist/esnext/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,IAAkB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACrB;SAAM;QACN,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;KACf;AACF,CAAC;AAED,M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No newline at end of file diff --git a/test-eol-project/node_modules/uri-js/package.json b/test-eol-project/node_modules/uri-js/package.json deleted file mode 100755 index de95d91a..00000000 --- a/test-eol-project/node_modules/uri-js/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "uri-js", - "version": "4.4.1", - "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", - "main": "dist/es5/uri.all.js", - "types": "dist/es5/uri.all.d.ts", - "directories": { - "test": "tests" - }, - "files": [ - "dist", - "package.json", - "yarn.lock", - "README.md", - "CHANGELOG", - "LICENSE" - ], - "scripts": { - "build:esnext": "tsc", - "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", - "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", - "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", - "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", - "clean": "rm -rf dist", - "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/garycourt/uri-js" - }, - "keywords": [ - "URI", - "IRI", - "IDN", - "URN", - "UUID", - "HTTP", - "HTTPS", - "WS", - "WSS", - "MAILTO", - "RFC3986", - "RFC3987", - "RFC5891", - "RFC2616", - "RFC2818", - "RFC2141", - "RFC4122", - "RFC4291", - "RFC5952", - "RFC6068", - "RFC6455", - "RFC6874" - ], - "author": "Gary Court ", - "license": "BSD-2-Clause", - "bugs": { - "url": "https://github.com/garycourt/uri-js/issues" - }, - "homepage": "https://github.com/garycourt/uri-js", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-plugin-external-helpers": "^6.22.0", - "babel-preset-latest": "^6.24.1", - "mocha": "^8.2.1", - "mocha-qunit-ui": "^0.1.3", - "rollup": "^0.41.6", - "rollup-plugin-babel": "^2.7.1", - "rollup-plugin-node-resolve": "^2.0.0", - "sorcery": "^0.10.0", - "typescript": "^2.8.1", - "uglify-js": "^2.8.14" - }, - "dependencies": { - "punycode": "^2.1.0" - } -} diff --git a/test-eol-project/node_modules/uri-js/yarn.lock b/test-eol-project/node_modules/uri-js/yarn.lock deleted file mode 100755 index 3c42ded1..00000000 --- a/test-eol-project/node_modules/uri-js/yarn.lock +++ /dev/null @@ -1,2558 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -babel-cli@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" - integrity sha1-UCq1SHTX24itALiHoGODzgPQAvE= - dependencies: - babel-core "^6.26.0" - babel-polyfill "^6.26.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - commander "^2.11.0" - convert-source-map "^1.5.0" - fs-readdir-recursive "^1.0.0" - glob "^7.1.2" - lodash "^4.17.4" - output-file-sync "^1.1.2" - path-is-absolute "^1.0.1" - slash "^1.0.0" - source-map "^0.5.6" - v8flags "^2.1.1" - optionalDependencies: - chokidar "^1.6.1" - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@6: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" - -babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-external-helpers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-classes@^6.9.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-regenerator@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-polyfill@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -babel-preset-es2015@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.24.1" - babel-plugin-transform-es2015-classes "^6.24.1" - babel-plugin-transform-es2015-computed-properties "^6.24.1" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.24.1" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.24.1" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-plugin-transform-es2015-modules-systemjs "^6.24.1" - babel-plugin-transform-es2015-modules-umd "^6.24.1" - babel-plugin-transform-es2015-object-super "^6.24.1" - babel-plugin-transform-es2015-parameters "^6.24.1" - babel-plugin-transform-es2015-shorthand-properties "^6.24.1" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.24.1" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.24.1" - babel-plugin-transform-regenerator "^6.24.1" - -babel-preset-es2016@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" - dependencies: - babel-plugin-transform-exponentiation-operator "^6.24.1" - -babel-preset-es2017@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.24.1" - -babel-preset-latest@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" - dependencies: - babel-preset-es2015 "^6.24.1" - babel-preset-es2016 "^6.24.1" - babel-preset-es2017 "^6.24.1" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browser-resolve@^1.11.0: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - dependencies: - resolve "1.1.7" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -buffer-crc32@^0.2.5: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - -builtin-modules@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chokidar@3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.1.2" - -chokidar@^1.6.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -commander@^2.11.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -convert-source-map@^1.5.0, convert-source-map@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -debug@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== - dependencies: - ms "2.1.2" - -debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -decamelize@^1.0.0, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -diff@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -es6-promise@^3.1.2: - version "3.3.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estree-walker@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fs-readdir-recursive@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.0.0: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -get-caller-file@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob-parent@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob@7.1.6, glob@^7.1.2, glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -graceful-fs@^4.1.11, graceful-fs@^4.1.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -graceful-fs@^4.1.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash@^4.17.4: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -log-symbols@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" - integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== - -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.10: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha-qunit-ui@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/mocha-qunit-ui/-/mocha-qunit-ui-0.1.3.tgz#e3e1ff1dac33222b10cef681efd7f82664141ea9" - -mocha@^8.2.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39" - integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.4.3" - debug "4.2.0" - diff "4.0.2" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.6" - growl "1.10.5" - he "1.2.0" - js-yaml "3.14.0" - log-symbols "4.0.0" - minimatch "3.0.4" - ms "2.1.2" - nanoid "3.1.12" - serialize-javascript "5.0.1" - strip-json-comments "3.1.1" - supports-color "7.2.0" - which "2.0.2" - wide-align "1.1.3" - workerpool "6.0.2" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "2.0.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nanoid@3.1.12: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -output-file-sync@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" - integrity sha1-0KM+7+YaIF+suQCS6CZZjVJFznY= - dependencies: - graceful-fs "^4.1.4" - mkdirp "^0.5.1" - object-assign "^4.1.0" - -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -private@^0.1.6, private@^0.1.7, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -punycode@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -readable-stream@^2.0.2: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - -regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" - -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - -resolve@^1.1.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" - dependencies: - path-parse "^1.0.5" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@^2.5.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - dependencies: - glob "^7.1.3" - -rollup-plugin-babel@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" - dependencies: - babel-core "6" - babel-plugin-transform-es2015-classes "^6.9.0" - object-assign "^4.1.0" - rollup-pluginutils "^1.5.0" - -rollup-plugin-node-resolve@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8" - dependencies: - browser-resolve "^1.11.0" - builtin-modules "^1.1.0" - resolve "^1.1.6" - -rollup-pluginutils@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" - dependencies: - estree-walker "^0.2.1" - minimatch "^3.0.2" - -rollup@^0.41.6: - version "0.41.6" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a" - dependencies: - source-map-support "^0.4.0" - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -sander@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/sander/-/sander-0.5.1.tgz#741e245e231f07cafb6fdf0f133adfa216a502ad" - dependencies: - es6-promise "^3.1.2" - graceful-fs "^4.1.3" - mkdirp "^0.5.1" - rimraf "^2.5.2" - -serialize-javascript@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sorcery@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/sorcery/-/sorcery-0.10.0.tgz#8ae90ad7d7cb05fc59f1ab0c637845d5c15a52b7" - dependencies: - buffer-crc32 "^0.2.5" - minimist "^1.2.0" - sander "^0.5.0" - sourcemap-codec "^1.3.0" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.0, source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -sourcemap-codec@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@7.2.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -typescript@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" - -uglify-js@^2.8.14: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" - integrity sha1-K1viOjK2Onyd640PKNSFcko98ZA= - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -v8flags@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" - integrity sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ= - dependencies: - user-home "^1.1.1" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -workerpool@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" - integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== - -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/test-eol-project/node_modules/util-deprecate/History.md b/test-eol-project/node_modules/util-deprecate/History.md deleted file mode 100644 index acc86753..00000000 --- a/test-eol-project/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/test-eol-project/node_modules/util-deprecate/LICENSE b/test-eol-project/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c2..00000000 --- a/test-eol-project/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/test-eol-project/node_modules/util-deprecate/README.md b/test-eol-project/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7..00000000 --- a/test-eol-project/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/test-eol-project/node_modules/util-deprecate/browser.js b/test-eol-project/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f0..00000000 --- a/test-eol-project/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/test-eol-project/node_modules/util-deprecate/node.js b/test-eol-project/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5..00000000 --- a/test-eol-project/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/test-eol-project/node_modules/util-deprecate/package.json b/test-eol-project/node_modules/util-deprecate/package.json deleted file mode 100644 index 2e79f89a..00000000 --- a/test-eol-project/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "util-deprecate", - "version": "1.0.2", - "description": "The Node.js `util.deprecate()` function with browser support", - "main": "node.js", - "browser": "browser.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "homepage": "https://github.com/TooTallNate/util-deprecate" -} diff --git a/test-eol-project/node_modules/uuid/AUTHORS b/test-eol-project/node_modules/uuid/AUTHORS deleted file mode 100644 index 5a105230..00000000 --- a/test-eol-project/node_modules/uuid/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Robert Kieffer -Christoph Tavan -AJ ONeal -Vincent Voyer -Roman Shtylman diff --git a/test-eol-project/node_modules/uuid/CHANGELOG.md b/test-eol-project/node_modules/uuid/CHANGELOG.md deleted file mode 100644 index f811b8a0..00000000 --- a/test-eol-project/node_modules/uuid/CHANGELOG.md +++ /dev/null @@ -1,119 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) - - -### Features - -* rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) - - -## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) - - -### Bug Fixes - -* typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) - - - - -## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) - - -### Bug Fixes - -* fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) - - - - -# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) - - -### Bug Fixes - -* assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) -* fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) -* Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) -* mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) - -### Features - -* enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) - - - -## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) - - -### Bug Fixes - -* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - - - - -# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) - - -### Bug Fixes - -* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) -* use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - - -### Features - -* Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) - - -# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) - -### Bug Fixes - -* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) -* Fix typo (#178) -* Simple typo fix (#165) - -### Features -* v5 support in CLI (#197) -* V5 support (#188) - - -# 3.0.1 (2016-11-28) - -* split uuid versions into separate files - - -# 3.0.0 (2016-11-17) - -* remove .parse and .unparse - - -# 2.0.0 - -* Removed uuid.BufferClass - - -# 1.4.0 - -* Improved module context detection -* Removed public RNG functions - - -# 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - - -# 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/test-eol-project/node_modules/uuid/LICENSE.md b/test-eol-project/node_modules/uuid/LICENSE.md deleted file mode 100644 index 8c84e398..00000000 --- a/test-eol-project/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2016 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/test-eol-project/node_modules/uuid/README.md b/test-eol-project/node_modules/uuid/README.md deleted file mode 100644 index 1752e475..00000000 --- a/test-eol-project/node_modules/uuid/README.md +++ /dev/null @@ -1,276 +0,0 @@ - - -# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Support for version 1, 3, 4 and 5 UUIDs -* Cross-platform -* Uses cryptographically-strong random number APIs (when available) -* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) - -[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be -supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] - -## Quickstart - CommonJS (Recommended) - -```shell -npm install uuid -``` - -Then generate your uuid version of choice ... - -Version 1 (timestamp): - -```javascript -const uuidv1 = require('uuid/v1'); -uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' - -``` - -Version 3 (namespace): - -```javascript -const uuidv3 = require('uuid/v3'); - -// ... using predefined DNS namespace (for domain names) -uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' - -// ... using predefined URL namespace (for, well, URLs) -uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' - -``` - -Version 4 (random): - -```javascript -const uuidv4 = require('uuid/v4'); -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' - -``` - -Version 5 (namespace): - -```javascript -const uuidv5 = require('uuid/v5'); - -// ... using predefined DNS namespace (for domain names) -uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' - -// ... using predefined URL namespace (for, well, URLs) -uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' - -``` - -## API - -### Version 1 - -```javascript -const uuidv1 = require('uuid/v1'); - -// Incantations -uuidv1(); -uuidv1(options); -uuidv1(options, buffer, offset); -``` - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. - -Example: Generate string UUID with fully-specified options - -```javascript -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}; -uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' - -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -const arr = new Array(); -uuidv1(null, arr, 0); // ⇨ - // [ - // 44, 94, 164, 192, 64, 103, - // 17, 233, 146, 52, 155, 29, - // 235, 77, 59, 125 - // ] -uuidv1(null, arr, 16); // ⇨ - // [ - // 44, 94, 164, 192, 64, 103, 17, 233, - // 146, 52, 155, 29, 235, 77, 59, 125, - // 44, 94, 164, 193, 64, 103, 17, 233, - // 146, 52, 155, 29, 235, 77, 59, 125 - // ] - -``` - -### Version 3 - -```javascript -const uuidv3 = require('uuid/v3'); - -// Incantations -uuidv3(name, namespace); -uuidv3(name, namespace, buffer); -uuidv3(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v3 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript -uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' - -``` - -### Version 4 - -```javascript -const uuidv4 = require('uuid/v4') - -// Incantations -uuidv4(); -uuidv4(options); -uuidv4(options, buffer, offset); -``` - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with predefined `random` values - -```javascript -const v4options = { - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' - -``` - -Example: Generate two IDs in a single buffer - -```javascript -const buffer = new Array(); -uuidv4(null, buffer, 0); // ⇨ - // [ - // 155, 29, 235, 77, 59, - // 125, 75, 173, 155, 221, - // 43, 13, 123, 61, 203, - // 109 - // ] -uuidv4(null, buffer, 16); // ⇨ - // [ - // 155, 29, 235, 77, 59, 125, 75, 173, - // 155, 221, 43, 13, 123, 61, 203, 109, - // 27, 157, 107, 205, 187, 253, 75, 45, - // 155, 93, 171, 141, 251, 189, 75, 237 - // ] - -``` - -### Version 5 - -```javascript -const uuidv5 = require('uuid/v5'); - -// Incantations -uuidv5(name, namespace); -uuidv5(name, namespace, buffer); -uuidv5(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v5 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript -uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' - -``` - -## Command Line - -UUIDs can be generated from the command line with the `uuid` command. - -```shell -$ uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 - -$ uuid v1 -02d37060-d446-11e7-a9fa-7bdae751ebe1 -``` - -Type `uuid --help` for usage details - -## Testing - -```shell -npm test -``` - ----- -Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/test-eol-project/node_modules/uuid/index.js b/test-eol-project/node_modules/uuid/index.js deleted file mode 100644 index e96791ab..00000000 --- a/test-eol-project/node_modules/uuid/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var v1 = require('./v1'); -var v4 = require('./v4'); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; diff --git a/test-eol-project/node_modules/uuid/lib/bytesToUuid.js b/test-eol-project/node_modules/uuid/lib/bytesToUuid.js deleted file mode 100644 index 24b60412..00000000 --- a/test-eol-project/node_modules/uuid/lib/bytesToUuid.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([ - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]] - ]).join(''); -} - -module.exports = bytesToUuid; diff --git a/test-eol-project/node_modules/uuid/lib/md5-browser.js b/test-eol-project/node_modules/uuid/lib/md5-browser.js deleted file mode 100644 index 9b3b6c7e..00000000 --- a/test-eol-project/node_modules/uuid/lib/md5-browser.js +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Browser-compatible JavaScript MD5 - * - * Modification of JavaScript MD5 - * https://github.com/blueimp/JavaScript-MD5 - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ - -'use strict'; - -function md5(bytes) { - if (typeof(bytes) == 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - bytes = new Array(msg.length); - for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); - } - - return md5ToHexEncodedArray( - wordsToMd5( - bytesToWords(bytes) - , bytes.length * 8) - ); -} - - -/* -* Convert an array of little-endian words to an array of bytes -*/ -function md5ToHexEncodedArray(input) { - var i; - var x; - var output = []; - var length32 = input.length * 32; - var hexTab = '0123456789abcdef'; - var hex; - - for (i = 0; i < length32; i += 8) { - x = (input[i >> 5] >>> (i % 32)) & 0xFF; - - hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); - - output.push(hex); - } - return output; -} - -/* -* Calculate the MD5 of an array of little-endian words, and a bit length. -*/ -function wordsToMd5(x, len) { - /* append padding */ - x[len >> 5] |= 0x80 << (len % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; - - var i; - var olda; - var oldb; - var oldc; - var oldd; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - - var d = 271733878; - - for (i = 0; i < x.length; i += 16) { - olda = a; - oldb = b; - oldc = c; - oldd = d; - - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - return [a, b, c, d]; -} - -/* -* Convert an array bytes to an array of little-endian words -* Characters >255 have their high-byte silently ignored. -*/ -function bytesToWords(input) { - var i; - var output = []; - output[(input.length >> 2) - 1] = undefined; - for (i = 0; i < output.length; i += 1) { - output[i] = 0; - } - var length8 = input.length * 8; - for (i = 0; i < length8; i += 8) { - output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); - } - - return output; -} - -/* -* Add integers, wrapping at 2^32. This uses 16-bit operations internally -* to work around bugs in some JS interpreters. -*/ -function safeAdd(x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} - -/* -* Bitwise rotate a 32-bit number to the left. -*/ -function bitRotateLeft(num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)); -} - -/* -* These functions implement the four basic operations the algorithm uses. -*/ -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} -function md5ff(a, b, c, d, x, s, t) { - return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); -} -function md5gg(a, b, c, d, x, s, t) { - return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); -} -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | (~d)), a, b, x, s, t); -} - -module.exports = md5; diff --git a/test-eol-project/node_modules/uuid/lib/md5.js b/test-eol-project/node_modules/uuid/lib/md5.js deleted file mode 100644 index 7044b872..00000000 --- a/test-eol-project/node_modules/uuid/lib/md5.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var crypto = require('crypto'); - -function md5(bytes) { - if (typeof Buffer.from === 'function') { - // Modern Buffer API - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - } else { - // Pre-v4 Buffer API - if (Array.isArray(bytes)) { - bytes = new Buffer(bytes); - } else if (typeof bytes === 'string') { - bytes = new Buffer(bytes, 'utf8'); - } - } - - return crypto.createHash('md5').update(bytes).digest(); -} - -module.exports = md5; diff --git a/test-eol-project/node_modules/uuid/lib/rng-browser.js b/test-eol-project/node_modules/uuid/lib/rng-browser.js deleted file mode 100644 index 6361fb81..00000000 --- a/test-eol-project/node_modules/uuid/lib/rng-browser.js +++ /dev/null @@ -1,34 +0,0 @@ -// Unique ID creation requires a high quality random # generator. In the -// browser this is a little complicated due to unknown quality of Math.random() -// and inconsistent support for the `crypto` API. We do the best we can via -// feature-detection - -// getRandomValues needs to be invoked in a context where "this" is a Crypto -// implementation. Also, find the complete implementation of crypto on IE11. -var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || - (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); - -if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - - module.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; -} else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); - - module.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return rnds; - }; -} diff --git a/test-eol-project/node_modules/uuid/lib/rng.js b/test-eol-project/node_modules/uuid/lib/rng.js deleted file mode 100644 index 58f0dc9c..00000000 --- a/test-eol-project/node_modules/uuid/lib/rng.js +++ /dev/null @@ -1,8 +0,0 @@ -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = require('crypto'); - -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; diff --git a/test-eol-project/node_modules/uuid/lib/sha1-browser.js b/test-eol-project/node_modules/uuid/lib/sha1-browser.js deleted file mode 100644 index 5758ed75..00000000 --- a/test-eol-project/node_modules/uuid/lib/sha1-browser.js +++ /dev/null @@ -1,89 +0,0 @@ -// Adapted from Chris Veness' SHA1 code at -// http://www.movable-type.co.uk/scripts/sha1.html -'use strict'; - -function f(s, x, y, z) { - switch (s) { - case 0: return (x & y) ^ (~x & z); - case 1: return x ^ y ^ z; - case 2: return (x & y) ^ (x & z) ^ (y & z); - case 3: return x ^ y ^ z; - } -} - -function ROTL(x, n) { - return (x << n) | (x>>> (32 - n)); -} - -function sha1(bytes) { - var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - - if (typeof(bytes) == 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - bytes = new Array(msg.length); - for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); - } - - bytes.push(0x80); - - var l = bytes.length/4 + 2; - var N = Math.ceil(l/16); - var M = new Array(N); - - for (var i=0; i>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - - H[0] = (H[0] + a) >>> 0; - H[1] = (H[1] + b) >>> 0; - H[2] = (H[2] + c) >>> 0; - H[3] = (H[3] + d) >>> 0; - H[4] = (H[4] + e) >>> 0; - } - - return [ - H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, - H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, - H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, - H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, - H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff - ]; -} - -module.exports = sha1; diff --git a/test-eol-project/node_modules/uuid/lib/sha1.js b/test-eol-project/node_modules/uuid/lib/sha1.js deleted file mode 100644 index 0b54b250..00000000 --- a/test-eol-project/node_modules/uuid/lib/sha1.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var crypto = require('crypto'); - -function sha1(bytes) { - if (typeof Buffer.from === 'function') { - // Modern Buffer API - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - } else { - // Pre-v4 Buffer API - if (Array.isArray(bytes)) { - bytes = new Buffer(bytes); - } else if (typeof bytes === 'string') { - bytes = new Buffer(bytes, 'utf8'); - } - } - - return crypto.createHash('sha1').update(bytes).digest(); -} - -module.exports = sha1; diff --git a/test-eol-project/node_modules/uuid/lib/v35.js b/test-eol-project/node_modules/uuid/lib/v35.js deleted file mode 100644 index 8b066cc5..00000000 --- a/test-eol-project/node_modules/uuid/lib/v35.js +++ /dev/null @@ -1,57 +0,0 @@ -var bytesToUuid = require('./bytesToUuid'); - -function uuidToBytes(uuid) { - // Note: We assume we're being passed a valid uuid string - var bytes = []; - uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { - bytes.push(parseInt(hex, 16)); - }); - - return bytes; -} - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - var bytes = new Array(str.length); - for (var i = 0; i < str.length; i++) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} - -module.exports = function(name, version, hashfunc) { - var generateUUID = function(value, namespace, buf, offset) { - var off = buf && offset || 0; - - if (typeof(value) == 'string') value = stringToBytes(value); - if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); - - if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); - if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); - - // Per 4.3 - var bytes = hashfunc(namespace.concat(value)); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - - if (buf) { - for (var idx = 0; idx < 16; ++idx) { - buf[off+idx] = bytes[idx]; - } - } - - return buf || bytesToUuid(bytes); - }; - - // Function#name is not settable on some platforms (#270) - try { - generateUUID.name = name; - } catch (err) { - } - - // Pre-defined namespaces, per Appendix C - generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; - generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; - - return generateUUID; -}; diff --git a/test-eol-project/node_modules/uuid/package.json b/test-eol-project/node_modules/uuid/package.json deleted file mode 100644 index efc07b8f..00000000 --- a/test-eol-project/node_modules/uuid/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "uuid", - "version": "3.4.0", - "description": "RFC4122 (v1, v4, and v5) UUIDs", - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "bin": { - "uuid": "./bin/uuid" - }, - "devDependencies": { - "@commitlint/cli": "~8.2.0", - "@commitlint/config-conventional": "~8.2.0", - "eslint": "~6.4.0", - "husky": "~3.0.5", - "mocha": "6.2.0", - "runmd": "1.2.1", - "standard-version": "7.0.0" - }, - "scripts": { - "lint": "eslint .", - "test": "npm run lint && mocha test/test.js", - "md": "runmd --watch --output=README.md README_js.md", - "release": "standard-version", - "prepare": "runmd --output=README.md README_js.md" - }, - "browser": { - "./lib/rng.js": "./lib/rng-browser.js", - "./lib/sha1.js": "./lib/sha1-browser.js", - "./lib/md5.js": "./lib/md5-browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } - } -} diff --git a/test-eol-project/node_modules/uuid/v1.js b/test-eol-project/node_modules/uuid/v1.js deleted file mode 100644 index 8c245de4..00000000 --- a/test-eol-project/node_modules/uuid/v1.js +++ /dev/null @@ -1,109 +0,0 @@ -var rng = require('./lib/rng'); -var bytesToUuid = require('./lib/bytesToUuid'); - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; -var _clockseq; - -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; - -// See https://github.com/uuidjs/uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] - ]; - } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : bytesToUuid(b); -} - -module.exports = v1; diff --git a/test-eol-project/node_modules/uuid/v3.js b/test-eol-project/node_modules/uuid/v3.js deleted file mode 100644 index ee7e14c0..00000000 --- a/test-eol-project/node_modules/uuid/v3.js +++ /dev/null @@ -1,4 +0,0 @@ -var v35 = require('./lib/v35.js'); -var md5 = require('./lib/md5'); - -module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/test-eol-project/node_modules/uuid/v4.js b/test-eol-project/node_modules/uuid/v4.js deleted file mode 100644 index 1f07be1c..00000000 --- a/test-eol-project/node_modules/uuid/v4.js +++ /dev/null @@ -1,29 +0,0 @@ -var rng = require('./lib/rng'); -var bytesToUuid = require('./lib/bytesToUuid'); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; diff --git a/test-eol-project/node_modules/uuid/v5.js b/test-eol-project/node_modules/uuid/v5.js deleted file mode 100644 index 4945baf3..00000000 --- a/test-eol-project/node_modules/uuid/v5.js +++ /dev/null @@ -1,3 +0,0 @@ -var v35 = require('./lib/v35.js'); -var sha1 = require('./lib/sha1'); -module.exports = v35('v5', 0x50, sha1); diff --git a/test-eol-project/node_modules/verror/.npmignore b/test-eol-project/node_modules/verror/.npmignore deleted file mode 100644 index f14aec80..00000000 --- a/test-eol-project/node_modules/verror/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -.gitignore -.gitmodules -deps -examples -experiments -jsl.node.conf -Makefile -Makefile.targ -test diff --git a/test-eol-project/node_modules/verror/CHANGES.md b/test-eol-project/node_modules/verror/CHANGES.md deleted file mode 100644 index bbb745a2..00000000 --- a/test-eol-project/node_modules/verror/CHANGES.md +++ /dev/null @@ -1,28 +0,0 @@ -# Changelog - -## Not yet released - -None yet. - -## v1.10.0 - -* #49 want convenience functions for MultiErrors - -## v1.9.0 - -* #47 could use VError.hasCauseWithName() - -## v1.8.1 - -* #39 captureStackTrace lost when inheriting from WError - -## v1.8.0 - -* #23 Preserve original stack trace(s) - -## v1.7.0 - -* #10 better support for extra properties on Errors -* #11 make it easy to find causes of a particular kind -* #29 No documentation on how to Install this package -* #36 elide development-only files from npm package diff --git a/test-eol-project/node_modules/verror/CONTRIBUTING.md b/test-eol-project/node_modules/verror/CONTRIBUTING.md deleted file mode 100644 index 750cef8d..00000000 --- a/test-eol-project/node_modules/verror/CONTRIBUTING.md +++ /dev/null @@ -1,19 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -Contributions should be "make prepush" clean. The "prepush" target runs the -"check" target, which requires these separate tools: - -* https://github.com/davepacheco/jsstyle -* https://github.com/davepacheco/javascriptlint - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/test-eol-project/node_modules/verror/LICENSE b/test-eol-project/node_modules/verror/LICENSE deleted file mode 100644 index 82a5cb86..00000000 --- a/test-eol-project/node_modules/verror/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016, Joyent, Inc. 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/test-eol-project/node_modules/verror/README.md b/test-eol-project/node_modules/verror/README.md deleted file mode 100644 index c1f0635e..00000000 --- a/test-eol-project/node_modules/verror/README.md +++ /dev/null @@ -1,528 +0,0 @@ -# verror: rich JavaScript errors - -This module provides several classes in support of Joyent's [Best Practices for -Error Handling in Node.js](http://www.joyent.com/developers/node/design/errors). -If you find any of the behavior here confusing or surprising, check out that -document first. - -The error classes here support: - -* printf-style arguments for the message -* chains of causes -* properties to provide extra information about the error -* creating your own subclasses that support all of these - -The classes here are: - -* **VError**, for chaining errors while preserving each one's error message. - This is useful in servers and command-line utilities when you want to - propagate an error up a call stack, but allow various levels to add their own - context. See examples below. -* **WError**, for wrapping errors while hiding the lower-level messages from the - top-level error. This is useful for API endpoints where you don't want to - expose internal error messages, but you still want to preserve the error chain - for logging and debugging. -* **SError**, which is just like VError but interprets printf-style arguments - more strictly. -* **MultiError**, which is just an Error that encapsulates one or more other - errors. (This is used for parallel operations that return several errors.) - - -# Quick start - -First, install the package: - - npm install verror - -If nothing else, you can use VError as a drop-in replacement for the built-in -JavaScript Error class, with the addition of printf-style messages: - -```javascript -var err = new VError('missing file: "%s"', '/etc/passwd'); -console.log(err.message); -``` - -This prints: - - missing file: "/etc/passwd" - -You can also pass a `cause` argument, which is any other Error object: - -```javascript -var fs = require('fs'); -var filename = '/nonexistent'; -fs.stat(filename, function (err1) { - var err2 = new VError(err1, 'stat "%s"', filename); - console.error(err2.message); -}); -``` - -This prints out: - - stat "/nonexistent": ENOENT, stat '/nonexistent' - -which resembles how Unix programs typically report errors: - - $ sort /nonexistent - sort: open failed: /nonexistent: No such file or directory - -To match the Unixy feel, when you print out the error, just prepend the -program's name to the VError's `message`. Or just call -[node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which -does this for you. - -You can get the next-level Error using `err.cause()`: - -```javascript -console.error(err2.cause().message); -``` - -prints: - - ENOENT, stat '/nonexistent' - -Of course, you can chain these as many times as you want, and it works with any -kind of Error: - -```javascript -var err1 = new Error('No such file or directory'); -var err2 = new VError(err1, 'failed to stat "%s"', '/junk'); -var err3 = new VError(err2, 'request failed'); -console.error(err3.message); -``` - -This prints: - - request failed: failed to stat "/junk": No such file or directory - -The idea is that each layer in the stack annotates the error with a description -of what it was doing. The end result is a message that explains what happened -at each level. - -You can also decorate Error objects with additional information so that callers -can not only handle each kind of error differently, but also construct their own -error messages (e.g., to localize them, format them, group them by type, and so -on). See the example below. - - -# Deeper dive - -The two main goals for VError are: - -* **Make it easy to construct clear, complete error messages intended for - people.** Clear error messages greatly improve both user experience and - debuggability, so we wanted to make it easy to build them. That's why the - constructor takes printf-style arguments. -* **Make it easy to construct objects with programmatically-accessible - metadata** (which we call _informational properties_). Instead of just saying - "connection refused while connecting to 192.168.1.2:80", you can add - properties like `"ip": "192.168.1.2"` and `"tcpPort": 80`. This can be used - for feeding into monitoring systems, analyzing large numbers of Errors (as - from a log file), or localizing error messages. - -To really make this useful, it also needs to be easy to compose Errors: -higher-level code should be able to augment the Errors reported by lower-level -code to provide a more complete description of what happened. Instead of saying -"connection refused", you can say "operation X failed: connection refused". -That's why VError supports `causes`. - -In order for all this to work, programmers need to know that it's generally safe -to wrap lower-level Errors with higher-level ones. If you have existing code -that handles Errors produced by a library, you should be able to wrap those -Errors with a VError to add information without breaking the error handling -code. There are two obvious ways that this could break such consumers: - -* The error's name might change. People typically use `name` to determine what - kind of Error they've got. To ensure compatibility, you can create VErrors - with custom names, but this approach isn't great because it prevents you from - representing complex failures. For this reason, VError provides - `findCauseByName`, which essentially asks: does this Error _or any of its - causes_ have this specific type? If error handling code uses - `findCauseByName`, then subsystems can construct very specific causal chains - for debuggability and still let people handle simple cases easily. There's an - example below. -* The error's properties might change. People often hang additional properties - off of Error objects. If we wrap an existing Error in a new Error, those - properties would be lost unless we copied them. But there are a variety of - both standard and non-standard Error properties that should _not_ be copied in - this way: most obviously `name`, `message`, and `stack`, but also `fileName`, - `lineNumber`, and a few others. Plus, it's useful for some Error subclasses - to have their own private properties -- and there'd be no way to know whether - these should be copied. For these reasons, VError first-classes these - information properties. You have to provide them in the constructor, you can - only fetch them with the `info()` function, and VError takes care of making - sure properties from causes wind up in the `info()` output. - -Let's put this all together with an example from the node-fast RPC library. -node-fast implements a simple RPC protocol for Node programs. There's a server -and client interface, and clients make RPC requests to servers. Let's say the -server fails with an UnauthorizedError with message "user 'bob' is not -authorized". The client wraps all server errors with a FastServerError. The -client also wraps all request errors with a FastRequestError that includes the -name of the RPC call being made. The result of this failed RPC might look like -this: - - name: FastRequestError - message: "request failed: server error: user 'bob' is not authorized" - rpcMsgid: - rpcMethod: GetObject - cause: - name: FastServerError - message: "server error: user 'bob' is not authorized" - cause: - name: UnauthorizedError - message: "user 'bob' is not authorized" - rpcUser: "bob" - -When the caller uses `VError.info()`, the information properties are collapsed -so that it looks like this: - - message: "request failed: server error: user 'bob' is not authorized" - rpcMsgid: - rpcMethod: GetObject - rpcUser: "bob" - -Taking this apart: - -* The error's message is a complete description of the problem. The caller can - report this directly to its caller, which can potentially make its way back to - an end user (if appropriate). It can also be logged. -* The caller can tell that the request failed on the server, rather than as a - result of a client problem (e.g., failure to serialize the request), a - transport problem (e.g., failure to connect to the server), or something else - (e.g., a timeout). They do this using `findCauseByName('FastServerError')` - rather than checking the `name` field directly. -* If the caller logs this error, the logs can be analyzed to aggregate - errors by cause, by RPC method name, by user, or whatever. Or the - error can be correlated with other events for the same rpcMsgid. -* It wasn't very hard for any part of the code to contribute to this Error. - Each part of the stack has just a few lines to provide exactly what it knows, - with very little boilerplate. - -It's not expected that you'd use these complex forms all the time. Despite -supporting the complex case above, you can still just do: - - new VError("my service isn't working"); - -for the simple cases. - - -# Reference: VError, WError, SError - -VError, WError, and SError are convenient drop-in replacements for `Error` that -support printf-style arguments, first-class causes, informational properties, -and other useful features. - - -## Constructors - -The VError constructor has several forms: - -```javascript -/* - * This is the most general form. You can specify any supported options - * (including "cause" and "info") this way. - */ -new VError(options, sprintf_args...) - -/* - * This is a useful shorthand when the only option you need is "cause". - */ -new VError(cause, sprintf_args...) - -/* - * This is a useful shorthand when you don't need any options at all. - */ -new VError(sprintf_args...) -``` - -All of these forms construct a new VError that behaves just like the built-in -JavaScript `Error` class, with some additional methods described below. - -In the first form, `options` is a plain object with any of the following -optional properties: - -Option name | Type | Meaning ----------------- | ---------------- | ------- -`name` | string | Describes what kind of error this is. This is intended for programmatic use to distinguish between different kinds of errors. Note that in modern versions of Node.js, this name is ignored in the `stack` property value, but callers can still use the `name` property to get at it. -`cause` | any Error object | Indicates that the new error was caused by `cause`. See `cause()` below. If unspecified, the cause will be `null`. -`strict` | boolean | If true, then `null` and `undefined` values in `sprintf_args` are passed through to `sprintf()`. Otherwise, these are replaced with the strings `'null'`, and '`undefined`', respectively. -`constructorOpt` | function | If specified, then the stack trace for this error ends at function `constructorOpt`. Functions called by `constructorOpt` will not show up in the stack. This is useful when this class is subclassed. -`info` | object | Specifies arbitrary informational properties that are available through the `VError.info(err)` static class method. See that method for details. - -The second form is equivalent to using the first form with the specified `cause` -as the error's cause. This form is distinguished from the first form because -the first argument is an Error. - -The third form is equivalent to using the first form with all default option -values. This form is distinguished from the other forms because the first -argument is not an object or an Error. - -The `WError` constructor is used exactly the same way as the `VError` -constructor. The `SError` constructor is also used the same way as the -`VError` constructor except that in all cases, the `strict` property is -overriden to `true. - - -## Public properties - -`VError`, `WError`, and `SError` all provide the same public properties as -JavaScript's built-in Error objects. - -Property name | Type | Meaning -------------- | ------ | ------- -`name` | string | Programmatically-usable name of the error. -`message` | string | Human-readable summary of the failure. Programmatically-accessible details are provided through `VError.info(err)` class method. -`stack` | string | Human-readable stack trace where the Error was constructed. - -For all of these classes, the printf-style arguments passed to the constructor -are processed with `sprintf()` to form a message. For `WError`, this becomes -the complete `message` property. For `SError` and `VError`, this message is -prepended to the message of the cause, if any (with a suitable separator), and -the result becomes the `message` property. - -The `stack` property is managed entirely by the underlying JavaScript -implementation. It's generally implemented using a getter function because -constructing the human-readable stack trace is somewhat expensive. - -## Class methods - -The following methods are defined on the `VError` class and as exported -functions on the `verror` module. They're defined this way rather than using -methods on VError instances so that they can be used on Errors not created with -`VError`. - -### `VError.cause(err)` - -The `cause()` function returns the next Error in the cause chain for `err`, or -`null` if there is no next error. See the `cause` argument to the constructor. -Errors can have arbitrarily long cause chains. You can walk the `cause` chain -by invoking `VError.cause(err)` on each subsequent return value. If `err` is -not a `VError`, the cause is `null`. - -### `VError.info(err)` - -Returns an object with all of the extra error information that's been associated -with this Error and all of its causes. These are the properties passed in using -the `info` option to the constructor. Properties not specified in the -constructor for this Error are implicitly inherited from this error's cause. - -These properties are intended to provide programmatically-accessible metadata -about the error. For an error that indicates a failure to resolve a DNS name, -informational properties might include the DNS name to be resolved, or even the -list of resolvers used to resolve it. The values of these properties should -generally be plain objects (i.e., consisting only of null, undefined, numbers, -booleans, strings, and objects and arrays containing only other plain objects). - -### `VError.fullStack(err)` - -Returns a string containing the full stack trace, with all nested errors recursively -reported as `'caused by:' + err.stack`. - -### `VError.findCauseByName(err, name)` - -The `findCauseByName()` function traverses the cause chain for `err`, looking -for an error whose `name` property matches the passed in `name` value. If no -match is found, `null` is returned. - -If all you want is to know _whether_ there's a cause (and you don't care what it -is), you can use `VError.hasCauseWithName(err, name)`. - -If a vanilla error or a non-VError error is passed in, then there is no cause -chain to traverse. In this scenario, the function will check the `name` -property of only `err`. - -### `VError.hasCauseWithName(err, name)` - -Returns true if and only if `VError.findCauseByName(err, name)` would return -a non-null value. This essentially determines whether `err` has any cause in -its cause chain that has name `name`. - -### `VError.errorFromList(errors)` - -Given an array of Error objects (possibly empty), return a single error -representing the whole collection of errors. If the list has: - -* 0 elements, returns `null` -* 1 element, returns the sole error -* more than 1 element, returns a MultiError referencing the whole list - -This is useful for cases where an operation may produce any number of errors, -and you ultimately want to implement the usual `callback(err)` pattern. You can -accumulate the errors in an array and then invoke -`callback(VError.errorFromList(errors))` when the operation is complete. - - -### `VError.errorForEach(err, func)` - -Convenience function for iterating an error that may itself be a MultiError. - -In all cases, `err` must be an Error. If `err` is a MultiError, then `func` is -invoked as `func(errorN)` for each of the underlying errors of the MultiError. -If `err` is any other kind of error, `func` is invoked once as `func(err)`. In -all cases, `func` is invoked synchronously. - -This is useful for cases where an operation may produce any number of warnings -that may be encapsulated with a MultiError -- but may not be. - -This function does not iterate an error's cause chain. - - -## Examples - -The "Demo" section above covers several basic cases. Here's a more advanced -case: - -```javascript -var err1 = new VError('something bad happened'); -/* ... */ -var err2 = new VError({ - 'name': 'ConnectionError', - 'cause': err1, - 'info': { - 'errno': 'ECONNREFUSED', - 'remote_ip': '127.0.0.1', - 'port': 215 - } -}, 'failed to connect to "%s:%d"', '127.0.0.1', 215); - -console.log(err2.message); -console.log(err2.name); -console.log(VError.info(err2)); -console.log(err2.stack); -``` - -This outputs: - - failed to connect to "127.0.0.1:215": something bad happened - ConnectionError - { errno: 'ECONNREFUSED', remote_ip: '127.0.0.1', port: 215 } - ConnectionError: failed to connect to "127.0.0.1:215": something bad happened - at Object. (/home/dap/node-verror/examples/info.js:5:12) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:935:3 - -Information properties are inherited up the cause chain, with values at the top -of the chain overriding same-named values lower in the chain. To continue that -example: - -```javascript -var err3 = new VError({ - 'name': 'RequestError', - 'cause': err2, - 'info': { - 'errno': 'EBADREQUEST' - } -}, 'request failed'); - -console.log(err3.message); -console.log(err3.name); -console.log(VError.info(err3)); -console.log(err3.stack); -``` - -This outputs: - - request failed: failed to connect to "127.0.0.1:215": something bad happened - RequestError - { errno: 'EBADREQUEST', remote_ip: '127.0.0.1', port: 215 } - RequestError: request failed: failed to connect to "127.0.0.1:215": something bad happened - at Object. (/home/dap/node-verror/examples/info.js:20:12) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:935:3 - -You can also print the complete stack trace of combined `Error`s by using -`VError.fullStack(err).` - -```javascript -var err1 = new VError('something bad happened'); -/* ... */ -var err2 = new VError(err1, 'something really bad happened here'); - -console.log(VError.fullStack(err2)); -``` - -This outputs: - - VError: something really bad happened here: something bad happened - at Object. (/home/dap/node-verror/examples/fullStack.js:5:12) - at Module._compile (module.js:409:26) - at Object.Module._extensions..js (module.js:416:10) - at Module.load (module.js:343:32) - at Function.Module._load (module.js:300:12) - at Function.Module.runMain (module.js:441:10) - at startup (node.js:139:18) - at node.js:968:3 - caused by: VError: something bad happened - at Object. (/home/dap/node-verror/examples/fullStack.js:3:12) - at Module._compile (module.js:409:26) - at Object.Module._extensions..js (module.js:416:10) - at Module.load (module.js:343:32) - at Function.Module._load (module.js:300:12) - at Function.Module.runMain (module.js:441:10) - at startup (node.js:139:18) - at node.js:968:3 - -`VError.fullStack` is also safe to use on regular `Error`s, so feel free to use -it whenever you need to extract the stack trace from an `Error`, regardless if -it's a `VError` or not. - -# Reference: MultiError - -MultiError is an Error class that represents a group of Errors. This is used -when you logically need to provide a single Error, but you want to preserve -information about multiple underying Errors. A common case is when you execute -several operations in parallel and some of them fail. - -MultiErrors are constructed as: - -```javascript -new MultiError(error_list) -``` - -`error_list` is an array of at least one `Error` object. - -The cause of the MultiError is the first error provided. None of the other -`VError` options are supported. The `message` for a MultiError consists the -`message` from the first error, prepended with a message indicating that there -were other errors. - -For example: - -```javascript -err = new MultiError([ - new Error('failed to resolve DNS name "abc.example.com"'), - new Error('failed to resolve DNS name "def.example.com"'), -]); - -console.error(err.message); -``` - -outputs: - - first of 2 errors: failed to resolve DNS name "abc.example.com" - -See the convenience function `VError.errorFromList`, which is sometimes simpler -to use than this constructor. - -## Public methods - - -### `errors()` - -Returns an array of the errors used to construct this MultiError. - - -# Contributing - -See separate [contribution guidelines](CONTRIBUTING.md). diff --git a/test-eol-project/node_modules/verror/lib/verror.js b/test-eol-project/node_modules/verror/lib/verror.js deleted file mode 100644 index 8663ddea..00000000 --- a/test-eol-project/node_modules/verror/lib/verror.js +++ /dev/null @@ -1,451 +0,0 @@ -/* - * verror.js: richer JavaScript errors - */ - -var mod_assertplus = require('assert-plus'); -var mod_util = require('util'); - -var mod_extsprintf = require('extsprintf'); -var mod_isError = require('core-util-is').isError; -var sprintf = mod_extsprintf.sprintf; - -/* - * Public interface - */ - -/* So you can 'var VError = require('verror')' */ -module.exports = VError; -/* For compatibility */ -VError.VError = VError; -/* Other exported classes */ -VError.SError = SError; -VError.WError = WError; -VError.MultiError = MultiError; - -/* - * Common function used to parse constructor arguments for VError, WError, and - * SError. Named arguments to this function: - * - * strict force strict interpretation of sprintf arguments, even - * if the options in "argv" don't say so - * - * argv error's constructor arguments, which are to be - * interpreted as described in README.md. For quick - * reference, "argv" has one of the following forms: - * - * [ sprintf_args... ] (argv[0] is a string) - * [ cause, sprintf_args... ] (argv[0] is an Error) - * [ options, sprintf_args... ] (argv[0] is an object) - * - * This function normalizes these forms, producing an object with the following - * properties: - * - * options equivalent to "options" in third form. This will never - * be a direct reference to what the caller passed in - * (i.e., it may be a shallow copy), so it can be freely - * modified. - * - * shortmessage result of sprintf(sprintf_args), taking options.strict - * into account as described in README.md. - */ -function parseConstructorArguments(args) -{ - var argv, options, sprintf_args, shortmessage, k; - - mod_assertplus.object(args, 'args'); - mod_assertplus.bool(args.strict, 'args.strict'); - mod_assertplus.array(args.argv, 'args.argv'); - argv = args.argv; - - /* - * First, figure out which form of invocation we've been given. - */ - if (argv.length === 0) { - options = {}; - sprintf_args = []; - } else if (mod_isError(argv[0])) { - options = { 'cause': argv[0] }; - sprintf_args = argv.slice(1); - } else if (typeof (argv[0]) === 'object') { - options = {}; - for (k in argv[0]) { - options[k] = argv[0][k]; - } - sprintf_args = argv.slice(1); - } else { - mod_assertplus.string(argv[0], - 'first argument to VError, SError, or WError ' + - 'constructor must be a string, object, or Error'); - options = {}; - sprintf_args = argv; - } - - /* - * Now construct the error's message. - * - * extsprintf (which we invoke here with our caller's arguments in order - * to construct this Error's message) is strict in its interpretation of - * values to be processed by the "%s" specifier. The value passed to - * extsprintf must actually be a string or something convertible to a - * String using .toString(). Passing other values (notably "null" and - * "undefined") is considered a programmer error. The assumption is - * that if you actually want to print the string "null" or "undefined", - * then that's easy to do that when you're calling extsprintf; on the - * other hand, if you did NOT want that (i.e., there's actually a bug - * where the program assumes some variable is non-null and tries to - * print it, which might happen when constructing a packet or file in - * some specific format), then it's better to stop immediately than - * produce bogus output. - * - * However, sometimes the bug is only in the code calling VError, and a - * programmer might prefer to have the error message contain "null" or - * "undefined" rather than have the bug in the error path crash the - * program (making the first bug harder to identify). For that reason, - * by default VError converts "null" or "undefined" arguments to their - * string representations and passes those to extsprintf. Programmers - * desiring the strict behavior can use the SError class or pass the - * "strict" option to the VError constructor. - */ - mod_assertplus.object(options); - if (!options.strict && !args.strict) { - sprintf_args = sprintf_args.map(function (a) { - return (a === null ? 'null' : - a === undefined ? 'undefined' : a); - }); - } - - if (sprintf_args.length === 0) { - shortmessage = ''; - } else { - shortmessage = sprintf.apply(null, sprintf_args); - } - - return ({ - 'options': options, - 'shortmessage': shortmessage - }); -} - -/* - * See README.md for reference documentation. - */ -function VError() -{ - var args, obj, parsed, cause, ctor, message, k; - - args = Array.prototype.slice.call(arguments, 0); - - /* - * This is a regrettable pattern, but JavaScript's built-in Error class - * is defined to work this way, so we allow the constructor to be called - * without "new". - */ - if (!(this instanceof VError)) { - obj = Object.create(VError.prototype); - VError.apply(obj, arguments); - return (obj); - } - - /* - * For convenience and backwards compatibility, we support several - * different calling forms. Normalize them here. - */ - parsed = parseConstructorArguments({ - 'argv': args, - 'strict': false - }); - - /* - * If we've been given a name, apply it now. - */ - if (parsed.options.name) { - mod_assertplus.string(parsed.options.name, - 'error\'s "name" must be a string'); - this.name = parsed.options.name; - } - - /* - * For debugging, we keep track of the original short message (attached - * this Error particularly) separately from the complete message (which - * includes the messages of our cause chain). - */ - this.jse_shortmsg = parsed.shortmessage; - message = parsed.shortmessage; - - /* - * If we've been given a cause, record a reference to it and update our - * message appropriately. - */ - cause = parsed.options.cause; - if (cause) { - mod_assertplus.ok(mod_isError(cause), 'cause is not an Error'); - this.jse_cause = cause; - - if (!parsed.options.skipCauseMessage) { - message += ': ' + cause.message; - } - } - - /* - * If we've been given an object with properties, shallow-copy that - * here. We don't want to use a deep copy in case there are non-plain - * objects here, but we don't want to use the original object in case - * the caller modifies it later. - */ - this.jse_info = {}; - if (parsed.options.info) { - for (k in parsed.options.info) { - this.jse_info[k] = parsed.options.info[k]; - } - } - - this.message = message; - Error.call(this, message); - - if (Error.captureStackTrace) { - ctor = parsed.options.constructorOpt || this.constructor; - Error.captureStackTrace(this, ctor); - } - - return (this); -} - -mod_util.inherits(VError, Error); -VError.prototype.name = 'VError'; - -VError.prototype.toString = function ve_toString() -{ - var str = (this.hasOwnProperty('name') && this.name || - this.constructor.name || this.constructor.prototype.name); - if (this.message) - str += ': ' + this.message; - - return (str); -}; - -/* - * This method is provided for compatibility. New callers should use - * VError.cause() instead. That method also uses the saner `null` return value - * when there is no cause. - */ -VError.prototype.cause = function ve_cause() -{ - var cause = VError.cause(this); - return (cause === null ? undefined : cause); -}; - -/* - * Static methods - * - * These class-level methods are provided so that callers can use them on - * instances of Errors that are not VErrors. New interfaces should be provided - * only using static methods to eliminate the class of programming mistake where - * people fail to check whether the Error object has the corresponding methods. - */ - -VError.cause = function (err) -{ - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - return (mod_isError(err.jse_cause) ? err.jse_cause : null); -}; - -VError.info = function (err) -{ - var rv, cause, k; - - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - cause = VError.cause(err); - if (cause !== null) { - rv = VError.info(cause); - } else { - rv = {}; - } - - if (typeof (err.jse_info) == 'object' && err.jse_info !== null) { - for (k in err.jse_info) { - rv[k] = err.jse_info[k]; - } - } - - return (rv); -}; - -VError.findCauseByName = function (err, name) -{ - var cause; - - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - mod_assertplus.string(name, 'name'); - mod_assertplus.ok(name.length > 0, 'name cannot be empty'); - - for (cause = err; cause !== null; cause = VError.cause(cause)) { - mod_assertplus.ok(mod_isError(cause)); - if (cause.name == name) { - return (cause); - } - } - - return (null); -}; - -VError.hasCauseWithName = function (err, name) -{ - return (VError.findCauseByName(err, name) !== null); -}; - -VError.fullStack = function (err) -{ - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - - var cause = VError.cause(err); - - if (cause) { - return (err.stack + '\ncaused by: ' + VError.fullStack(cause)); - } - - return (err.stack); -}; - -VError.errorFromList = function (errors) -{ - mod_assertplus.arrayOfObject(errors, 'errors'); - - if (errors.length === 0) { - return (null); - } - - errors.forEach(function (e) { - mod_assertplus.ok(mod_isError(e)); - }); - - if (errors.length == 1) { - return (errors[0]); - } - - return (new MultiError(errors)); -}; - -VError.errorForEach = function (err, func) -{ - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - mod_assertplus.func(func, 'func'); - - if (err instanceof MultiError) { - err.errors().forEach(function iterError(e) { func(e); }); - } else { - func(err); - } -}; - - -/* - * SError is like VError, but stricter about types. You cannot pass "null" or - * "undefined" as string arguments to the formatter. - */ -function SError() -{ - var args, obj, parsed, options; - - args = Array.prototype.slice.call(arguments, 0); - if (!(this instanceof SError)) { - obj = Object.create(SError.prototype); - SError.apply(obj, arguments); - return (obj); - } - - parsed = parseConstructorArguments({ - 'argv': args, - 'strict': true - }); - - options = parsed.options; - VError.call(this, options, '%s', parsed.shortmessage); - - return (this); -} - -/* - * We don't bother setting SError.prototype.name because once constructed, - * SErrors are just like VErrors. - */ -mod_util.inherits(SError, VError); - - -/* - * Represents a collection of errors for the purpose of consumers that generally - * only deal with one error. Callers can extract the individual errors - * contained in this object, but may also just treat it as a normal single - * error, in which case a summary message will be printed. - */ -function MultiError(errors) -{ - mod_assertplus.array(errors, 'list of errors'); - mod_assertplus.ok(errors.length > 0, 'must be at least one error'); - this.ase_errors = errors; - - VError.call(this, { - 'cause': errors[0] - }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); -} - -mod_util.inherits(MultiError, VError); -MultiError.prototype.name = 'MultiError'; - -MultiError.prototype.errors = function me_errors() -{ - return (this.ase_errors.slice(0)); -}; - - -/* - * See README.md for reference details. - */ -function WError() -{ - var args, obj, parsed, options; - - args = Array.prototype.slice.call(arguments, 0); - if (!(this instanceof WError)) { - obj = Object.create(WError.prototype); - WError.apply(obj, args); - return (obj); - } - - parsed = parseConstructorArguments({ - 'argv': args, - 'strict': false - }); - - options = parsed.options; - options['skipCauseMessage'] = true; - VError.call(this, options, '%s', parsed.shortmessage); - - return (this); -} - -mod_util.inherits(WError, VError); -WError.prototype.name = 'WError'; - -WError.prototype.toString = function we_toString() -{ - var str = (this.hasOwnProperty('name') && this.name || - this.constructor.name || this.constructor.prototype.name); - if (this.message) - str += ': ' + this.message; - if (this.jse_cause && this.jse_cause.message) - str += '; caused by ' + this.jse_cause.toString(); - - return (str); -}; - -/* - * For purely historical reasons, WError's cause() function allows you to set - * the cause. - */ -WError.prototype.cause = function we_cause(c) -{ - if (mod_isError(c)) - this.jse_cause = c; - - return (this.jse_cause); -}; diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE b/test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE deleted file mode 100644 index d8d7f943..00000000 --- a/test-eol-project/node_modules/verror/node_modules/core-util-is/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Node.js contributors. 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/test-eol-project/node_modules/verror/node_modules/core-util-is/README.md b/test-eol-project/node_modules/verror/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/test-eol-project/node_modules/verror/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch b/test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/test-eol-project/node_modules/verror/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js b/test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js deleted file mode 100644 index ff4c851c..00000000 --- a/test-eol-project/node_modules/verror/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/package.json b/test-eol-project/node_modules/verror/node_modules/core-util-is/package.json deleted file mode 100644 index 3368e951..00000000 --- a/test-eol-project/node_modules/verror/node_modules/core-util-is/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.2", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "^2.3.0" - } -} diff --git a/test-eol-project/node_modules/verror/node_modules/core-util-is/test.js b/test-eol-project/node_modules/verror/node_modules/core-util-is/test.js deleted file mode 100644 index 1a490c65..00000000 --- a/test-eol-project/node_modules/verror/node_modules/core-util-is/test.js +++ /dev/null @@ -1,68 +0,0 @@ -var assert = require('tap'); - -var t = require('./lib/util'); - -assert.equal(t.isArray([]), true); -assert.equal(t.isArray({}), false); - -assert.equal(t.isBoolean(null), false); -assert.equal(t.isBoolean(true), true); -assert.equal(t.isBoolean(false), true); - -assert.equal(t.isNull(null), true); -assert.equal(t.isNull(undefined), false); -assert.equal(t.isNull(false), false); -assert.equal(t.isNull(), false); - -assert.equal(t.isNullOrUndefined(null), true); -assert.equal(t.isNullOrUndefined(undefined), true); -assert.equal(t.isNullOrUndefined(false), false); -assert.equal(t.isNullOrUndefined(), true); - -assert.equal(t.isNumber(null), false); -assert.equal(t.isNumber('1'), false); -assert.equal(t.isNumber(1), true); - -assert.equal(t.isString(null), false); -assert.equal(t.isString('1'), true); -assert.equal(t.isString(1), false); - -assert.equal(t.isSymbol(null), false); -assert.equal(t.isSymbol('1'), false); -assert.equal(t.isSymbol(1), false); -assert.equal(t.isSymbol(Symbol()), true); - -assert.equal(t.isUndefined(null), false); -assert.equal(t.isUndefined(undefined), true); -assert.equal(t.isUndefined(false), false); -assert.equal(t.isUndefined(), true); - -assert.equal(t.isRegExp(null), false); -assert.equal(t.isRegExp('1'), false); -assert.equal(t.isRegExp(new RegExp()), true); - -assert.equal(t.isObject({}), true); -assert.equal(t.isObject([]), true); -assert.equal(t.isObject(new RegExp()), true); -assert.equal(t.isObject(new Date()), true); - -assert.equal(t.isDate(null), false); -assert.equal(t.isDate('1'), false); -assert.equal(t.isDate(new Date()), true); - -assert.equal(t.isError(null), false); -assert.equal(t.isError({ err: true }), false); -assert.equal(t.isError(new Error()), true); - -assert.equal(t.isFunction(null), false); -assert.equal(t.isFunction({ }), false); -assert.equal(t.isFunction(function() {}), true); - -assert.equal(t.isPrimitive(null), true); -assert.equal(t.isPrimitive(''), true); -assert.equal(t.isPrimitive(0), true); -assert.equal(t.isPrimitive(new Date()), false); - -assert.equal(t.isBuffer(null), false); -assert.equal(t.isBuffer({}), false); -assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/test-eol-project/node_modules/verror/package.json b/test-eol-project/node_modules/verror/package.json deleted file mode 100644 index 79295c57..00000000 --- a/test-eol-project/node_modules/verror/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "verror", - "version": "1.10.0", - "description": "richer JavaScript errors", - "main": "./lib/verror.js", - "repository": { - "type": "git", - "url": "git://github.com/davepacheco/node-verror.git" - }, - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "engines": [ - "node >=0.6.0" - ], - "scripts": { - "test": "make test" - }, - "license": "MIT" -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/.travis.yml b/test-eol-project/node_modules/webdriver-js-extender/.travis.yml deleted file mode 100644 index b9e743a0..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -sudo: false -node_js: - - "6" - - "8" - - "10" - -env: - global: - - CXX=g++-4.8 - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 - -before_install: - - g++-4.8 --version - -script: - - npm test diff --git a/test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md b/test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md deleted file mode 100644 index 22949549..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -Adding support for more commands --------------------------------- - -If you think we need to support another command, you can either make an issue -requesting support, or just implement it yourself. - -Adding new commands is easy. In [`lib/index.ts`](lib/index.ts), you'll see the -implementation of our current commands. If your command is already supported by -[`wd`](https://github.com/admc/wd), you should be able to get all the -information you need [from `webdriverio`]( -https://github.com/webdriverio/webdriverio/tree/master/lib/protocol). Make sure to add tests -in [`spec/index_spec.ts`](spec/index_spec.ts), and run `npm test` before you -submit. diff --git a/test-eol-project/node_modules/webdriver-js-extender/LICENSE b/test-eol-project/node_modules/webdriver-js-extender/LICENSE deleted file mode 100644 index 5cbc7da3..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2016 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/test-eol-project/node_modules/webdriver-js-extender/README.md b/test-eol-project/node_modules/webdriver-js-extender/README.md deleted file mode 100644 index 50727a54..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/README.md +++ /dev/null @@ -1,21 +0,0 @@ -WebDriver JS Extender -===================== - -This tools extends [Selenium's javascript implementation]( -https://www.npmjs.com/package/selenium-webdriver) of the WebDriver API -to include additional commands (e.g. commands required for [appium]( -https://github.com/appium/appium)). - -You can view the full list of commands in [`lib/index.ts`](lib/index.ts#L8). - -Usage ------ - -Use WebDriver JS Extender's `extend` function on your webdriver instance: - - -```js - var extendedWebdriver = require('webdriver-js-extender').extend(webdriver); - - extendedWebdriver.setNetworkConnection(5); -``` diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts deleted file mode 100644 index 8aaae5ed..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { promise as wdpromise } from 'selenium-webdriver'; -import { Extender } from './extender'; -export declare class CommandDefinition { - name: string; - params: string[]; - method: 'GET' | 'POST' | 'DELETE' | 'PUT'; - path: string; - private preprocessParams; - constructor(name: string, params: string[], method: 'GET' | 'POST' | 'DELETE' | 'PUT', path: string, preprocessParams?: (...args: any[]) => any[]); - compile(extender: Extender, silentFailure: boolean): (...args: any[]) => wdpromise.Promise; -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js deleted file mode 100644 index 235feac6..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const path_1 = require("path"); -class CommandDefinition { - constructor(name, params, method, path, preprocessParams = (x) => x) { - this.name = name; - this.params = params; - this.method = method; - this.path = path; - this.preprocessParams = preprocessParams; - } - compile(extender, silentFailure) { - try { - extender.defineCommand(this.name, this.params, this.method, path_1.posix.join('/session/:sessionId', this.path)); - return (...args) => { - return extender.execCommand(this.name, this.method, this.preprocessParams(args)); - }; - } - catch (e) { - if (silentFailure) { - return (...args) => { - throw new Error('Command "' + this.name + '" could not be extended onto WebDriver instance. ' + - 'This is generally a result of using `directConnect` in protractor.'); - }; - } - else { - throw e; - } - } - } -} -exports.CommandDefinition = CommandDefinition; -//# sourceMappingURL=command_definition.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map deleted file mode 100644 index d03d1aa5..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"command_definition.js","sourceRoot":"","sources":["../../lib/command_definition.ts"],"names":[],"mappings":";;AAAA,+BAAmC;AAKnC;IACE,YACW,IAAY,EAAS,MAAgB,EAAS,MAAmC,EACjF,IAAY,EAAU,mBAA8C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAD5E,SAAI,GAAJ,IAAI,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAU;QAAS,WAAM,GAAN,MAAM,CAA6B;QACjF,SAAI,GAAJ,IAAI,CAAQ;QAAU,qBAAgB,GAAhB,gBAAgB,CAAsC;IAAG,CAAC;IAE3F,OAAO,CAAI,QAAkB,EAAE,aAAsB;QACnD,IAAI;YACF,QAAQ,CAAC,aAAa,CAClB,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,YAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACtF,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;gBACxB,OAAO,QAAQ,CAAC,WAAW,CAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;YACtF,CAAC,CAAA;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,aAAa,EAAE;gBACjB,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;oBACxB,MAAM,IAAI,KAAK,CACX,WAAW,GAAG,IAAI,CAAC,IAAI,GAAG,mDAAmD;wBAC7E,oEAAoE,CAAC,CAAC;gBAC5E,CAAC,CAAC;aACH;iBAAM;gBACL,MAAM,CAAC,CAAC;aACT;SACF;IACH,CAAC;CACF;AAxBD,8CAwBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts deleted file mode 100644 index 1aa0a7c8..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { CommandDefinition } from './command_definition'; -export declare let getNetworkConnection: CommandDefinition; -export declare let setNetworkConnection: CommandDefinition; -export declare let toggleAirplaneMode: CommandDefinition; -export declare let toggleWiFi: CommandDefinition; -export declare let toggleData: CommandDefinition; -export declare let toggleLocationServices: CommandDefinition; -export declare let getGeolocation: CommandDefinition<{ - latitude: number; - longitude: number; - altitude: number; -}>; -export declare let setGeolocation: CommandDefinition; -export declare let getCurrentDeviceActivity: CommandDefinition; -export declare let startDeviceActivity: CommandDefinition; -export declare let getAppiumSettings: CommandDefinition<{ - [name: string]: any; -}>; -export declare let setAppiumSettings: CommandDefinition; -export declare let getCurrentContext: CommandDefinition; -export declare let selectContext: CommandDefinition; -export declare let getScreenOrientation: CommandDefinition<"LANDSCAPE" | "PORTRAIT">; -export declare let setScreenOrientation: CommandDefinition; -export declare let isDeviceLocked: CommandDefinition; -export declare let lockDevice: CommandDefinition; -export declare let unlockDevice: CommandDefinition; -export declare let installApp: CommandDefinition; -export declare let isAppInstalled: CommandDefinition; -export declare let removeApp: CommandDefinition; -export declare let pullFileFromDevice: CommandDefinition; -export declare let pullFolderFromDevice: CommandDefinition; -export declare let pushFileToDevice: CommandDefinition; -export declare let listContexts: CommandDefinition; -export declare let uploadFile: CommandDefinition; -export declare let switchToParentFrame: CommandDefinition; -export declare let fullscreen: CommandDefinition; -export declare let sendAppToBackground: CommandDefinition; -export declare let closeApp: CommandDefinition; -export declare let getAppStrings: CommandDefinition; -export declare let launchSession: CommandDefinition; -export declare let resetApp: CommandDefinition; -export declare let hideSoftKeyboard: CommandDefinition; -export declare let getDeviceTime: CommandDefinition; -export declare let openDeviceNotifications: CommandDefinition; -export declare let rotationGesture: CommandDefinition<{}>; -export declare let shakeDevice: CommandDefinition; -export declare let sendChromiumCommand: CommandDefinition; -export declare let sendChromiumCommandAndGetResult: CommandDefinition; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js deleted file mode 100644 index c43250d0..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const command_definition_1 = require("./command_definition"); -exports.getNetworkConnection = new command_definition_1.CommandDefinition('getNetworkConnection', [], 'GET', '/network_connection'); -exports.setNetworkConnection = new command_definition_1.CommandDefinition('setNetworkConnection', ['type'], 'POST', '/network_connection', (args) => { - if (typeof args[0] == 'boolean') { - // Transform into bitmask - return [(args[0] ? 1 : 0) + (args[1] ? 2 : 0) + (args[2] ? 4 : 0)]; - } - else { - return args; - } -}); -exports.toggleAirplaneMode = new command_definition_1.CommandDefinition('toggleAirplaneMode', [], 'POST', 'appium/device/toggle_airplane_mode'); -exports.toggleWiFi = new command_definition_1.CommandDefinition('toggleWiFi', [], 'POST', 'appium/device/toggle_wifi'); -exports.toggleData = new command_definition_1.CommandDefinition('toggleData', [], 'POST', 'appium/device/toggle_data'); -exports.toggleLocationServices = new command_definition_1.CommandDefinition('toggleLocationServices', [], 'POST', 'appium/device/toggle_location_services'); -exports.getGeolocation = new command_definition_1.CommandDefinition('getGeolocation', [], 'GET', '/location'); -exports.setGeolocation = new command_definition_1.CommandDefinition('setGeolocation', ['location'], 'POST', '/location', (args) => { - return [{ latitude: args[0] || 0, longitude: args[1] || 0, altitude: args[2] || 0 }]; -}); -exports.getCurrentDeviceActivity = new command_definition_1.CommandDefinition('getCurrentDeviceActivity', [], 'GET', '/appium/device/current_activity'); -exports.startDeviceActivity = new command_definition_1.CommandDefinition('startDeviceActivity', ['appPackage', 'appActivity', 'appWaitPackage', 'appWaitActivity'], 'POST', '/appium/device/start_activity', (args) => { - if (args.length == 2) { - // No appWait, default parameters to undefined - args[2] = undefined; - args[3] = undefined; - } - if (args.length == 4) { - return args; - } - else { - throw new RangeError('startDeviceActivity requires 2 or 4 arguments, got ' + args.length); - } -}); -exports.getAppiumSettings = new command_definition_1.CommandDefinition('getAppiumSettings', [], 'GET', '/appium/settings'); -exports.setAppiumSettings = new command_definition_1.CommandDefinition('setAppiumSettings', ['settings'], 'POST', '/appium/settings'); -exports.getCurrentContext = new command_definition_1.CommandDefinition('getCurrentContext', [], 'GET', '/context'); -exports.selectContext = new command_definition_1.CommandDefinition('selectContext', ['name'], 'POST', '/context'); -exports.getScreenOrientation = new command_definition_1.CommandDefinition('getScreenOrientation', [], 'GET', '/orientation'); -exports.setScreenOrientation = new command_definition_1.CommandDefinition('setScreenOrientation', ['orientation'], 'POST', '/orientation', (args) => { - let orientation = (args[0] || '').toUpperCase(); - if ((orientation != 'PORTRAIT') && (orientation != 'LANDSCAPE')) { - throw new TypeError('Invalid orientation "' + args[0] + '"'); - } - args[0] = orientation; - return args; -}); -exports.isDeviceLocked = new command_definition_1.CommandDefinition('isDeviceLocked', [], 'POST', '/appium/device/is_locked'); -exports.lockDevice = new command_definition_1.CommandDefinition('lockDevice', ['seconds'], 'POST', '/appium/device/lock', (args) => { - args[0] = args[0] || 0; - return args; -}); -exports.unlockDevice = new command_definition_1.CommandDefinition('unlockDevice', [], 'POST', '/appium/device/unlock'); -exports.installApp = new command_definition_1.CommandDefinition('installApp', ['appPath'], 'POST', '/appium/device/install_app'); -exports.isAppInstalled = new command_definition_1.CommandDefinition('isAppInstalled', ['bundleId'], 'POST', 'appium/device/app_installed'); -exports.removeApp = new command_definition_1.CommandDefinition('removeApp', ['appId'], 'POST', '/appium/device/remove_app'); -exports.pullFileFromDevice = new command_definition_1.CommandDefinition('pullFileFromDevice', ['path'], 'POST', '/appium/device/pull_file'); -exports.pullFolderFromDevice = new command_definition_1.CommandDefinition('pullFolderFromDevice', ['path'], 'POST', '/appium/device/pull_folder'); -exports.pushFileToDevice = new command_definition_1.CommandDefinition('pushFileToDevice', ['path', 'data'], 'POST', 'appium/device/push_file'); -exports.listContexts = new command_definition_1.CommandDefinition('listContexts', [], 'GET', '/contexts'); -exports.uploadFile = new command_definition_1.CommandDefinition('uploadFile', ['file'], 'POST', '/file'); -exports.switchToParentFrame = new command_definition_1.CommandDefinition('switchToParentFrame', [], 'POST', '/frame/parent'); -exports.fullscreen = new command_definition_1.CommandDefinition('fullscreen', [], 'POST', '/window/fullscreen'); -exports.sendAppToBackground = new command_definition_1.CommandDefinition('sendAppToBackground', ['seconds'], 'POST', '/appium/app/background', (args) => { - args[0] = args[0] || 0; - return args; -}); -exports.closeApp = new command_definition_1.CommandDefinition('closeApp', [], 'POST', '/appium/app/close'); -exports.getAppStrings = new command_definition_1.CommandDefinition('getAppStrings', ['language'], 'POST', 'appium/app/strings', (args) => { - args[0] = args.length ? args[0] : undefined; // Default to `undefined` - return args; -}); -exports.launchSession = new command_definition_1.CommandDefinition('launchSession', [], 'POST', '/appium/app/launch'); -exports.resetApp = new command_definition_1.CommandDefinition('resetApp', [], 'POST', '/appium/app/reset'); -exports.hideSoftKeyboard = new command_definition_1.CommandDefinition('hideSoftKeyboard', ['strategy', 'key'], 'POST', '/appium/device/hide_keyboard', (args) => { - switch (args[0] || 'default') { - case 'default': - args[0] = 'default'; - case 'swipeDown': - case 'tapOut': - case 'tapOutside': - if (args.length == 1) { - args[1] = undefined; // Default to `undefined` - } - case 'press': - case 'pressKey': - return args; - default: - throw new RangeError('Invalid keyboard hiding strategy "' + args[0] + '"'); - } -}); -exports.getDeviceTime = new command_definition_1.CommandDefinition('getDeviceTime', [], 'GET', '/appium/device/system_time'); -exports.openDeviceNotifications = new command_definition_1.CommandDefinition('openDeviceNotifications', [], 'POST', '/appium/device/open_notifications'); -exports.rotationGesture = new command_definition_1.CommandDefinition('rotationGesture', ['x', 'y', 'duration', 'rotation', 'touchCount'], 'POST', '/appium/device/rotate', (args) => { - args[0] = args[0] || 0; - args[1] = args[1] || 0; - args[2] = args[2] === undefined ? 1 : args[2]; - args[3] = args[3] === undefined ? 180 : args[3]; - args[4] = args[4] == undefined ? 2 : args[4]; - return args; -}); -exports.shakeDevice = new command_definition_1.CommandDefinition('shakeDevice', [], 'POST', 'appium/device/shake'); -exports.sendChromiumCommand = new command_definition_1.CommandDefinition('sendChromiumCommand', ['cmd', 'params'], 'POST', '/chromium/send_command'); -exports.sendChromiumCommandAndGetResult = new command_definition_1.CommandDefinition('sendChromiumCommandAndGetResult', ['cmd', 'params'], 'POST', '/chromium/send_command_and_get_result'); -//# sourceMappingURL=command_definitions.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map deleted file mode 100644 index ad2bf3bb..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/command_definitions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"command_definitions.js","sourceRoot":"","sources":["../../lib/command_definitions.ts"],"names":[],"mappings":";;AAAA,6DAAuD;AAE5C,QAAA,oBAAoB,GAC3B,IAAI,sCAAiB,CAAS,sBAAsB,EAAE,EAAE,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC;AACjF,QAAA,oBAAoB,G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AAI,sCAAiB,CAClD,qBAAqB,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,wBAAwB,CAAC,CAAC;AACrE,QAAA,+BAA+B,GAAG,IAAI,sCAAiB,CAC9D,iCAAiC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,MAAM,EAC5D,uCAAuC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts deleted file mode 100644 index c84eb1f4..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { promise as wdpromise } from 'selenium-webdriver'; -export declare class DeferredExecutor { - execute: (command: any) => wdpromise.Promise; - defineCommand: (name: string, method: string, path: string) => void; - /** - * @param {!Promise} delegate The promised delegate, which - * may be provided by any promise-like thenable object. - */ - constructor(delegate: wdpromise.Promise); -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js deleted file mode 100644 index e6f61fab..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/* - * Wraps a promised {@link Executor}, ensuring no commands are executed until - * the wrapped executor has been fully resolved. - * - * selenium-webdriver uses this internally, and we overwrite it to give it the - * defineCommand() function - * - * Based off of - * https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/lib/command.js#L240 - * - * @implements {Executor} - */ -class DeferredExecutor { - /** - * @param {!Promise} delegate The promised delegate, which - * may be provided by any promise-like thenable object. - */ - constructor(delegate) { - /** @override */ - this.execute = function (command) { - return delegate.then((executor) => { - return executor.execute(command); - }); - }; - this.defineCommand = function (name, method, path) { - delegate.then((executor) => { - executor.defineCommand(name, method, path); - }); - }; - } -} -exports.DeferredExecutor = DeferredExecutor; -//# sourceMappingURL=deferred_executor.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map deleted file mode 100644 index 4b06c2bd..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/deferred_executor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deferred_executor.js","sourceRoot":"","sources":["../../lib/deferred_executor.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;GAWG;AACH;IAIE;;;OAGG;IACH,YAAY,QAAgC;QAC1C,gBAAgB;QAChB,IAAI,CAAC,OAAO,GAAG,UAAS,OAAY;YAClC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAa,EAAE,EAAE;gBACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,UAAS,IAAY,EAAE,MAAc,EAAE,IAAY;YACtE,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAa,EAAE,EAAE;gBAC9B,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;CACF;AAtBD,4CAsBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts deleted file mode 100644 index 7f1b8640..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { promise as wdpromise, WebDriver } from 'selenium-webdriver'; -export declare class Extender { - driver_: WebDriver; - params_: { - [key: string]: string[]; - }; - executor_: { - defineCommand: (name: string, method: string, path: string) => void; - }; - constructor(driver: WebDriver); - /** - * Defines a new command. When a command is sent, the {@code path} will be - * preprocessed using the command's parameters; any path segments prefixed - * with ":" will be replaced by the parameter of the same name. For example, - * given "/person/:name" and the parameters "{name: 'Bob'}", the final command - * path will be "/person/Bob". - * - * @param {string} name The command name. - * @param {string} params The names of the parameters to the command - * @param {string} method The HTTP method to use when sending this command. - * @param {string} path The path to send the command to, relative to - * the WebDriver server's command root and of the form - * "/path/:variable/segment". - */ - defineCommand(name: string, params: string[], method: string, path: string): void; - /** - * Executes a command which was defined by defineCommand() - * - * @param {string} name The command name. - * @param {*[]} params The parameters to the command - * @return {webdriver.promise.Promise<*>} A promise that will be resolved with - * the command result - */ - execCommand(name: string, method: string, params: any[]): wdpromise.Promise; -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js deleted file mode 100644 index 104b2c65..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -let Command = require('selenium-webdriver/lib/command').Command; -class Extender { - constructor(driver) { - this.driver_ = driver; - this.params_ = {}; - this.executor_ = - driver.getExecutor ? driver.getExecutor() : driver.executor_; - } - /** - * Defines a new command. When a command is sent, the {@code path} will be - * preprocessed using the command's parameters; any path segments prefixed - * with ":" will be replaced by the parameter of the same name. For example, - * given "/person/:name" and the parameters "{name: 'Bob'}", the final command - * path will be "/person/Bob". - * - * @param {string} name The command name. - * @param {string} params The names of the parameters to the command - * @param {string} method The HTTP method to use when sending this command. - * @param {string} path The path to send the command to, relative to - * the WebDriver server's command root and of the form - * "/path/:variable/segment". - */ - defineCommand(name, params, method, path) { - this.executor_.defineCommand(name, method, path); - this.params_[method + ':' + name] = params; - } - /** - * Executes a command which was defined by defineCommand() - * - * @param {string} name The command name. - * @param {*[]} params The parameters to the command - * @return {webdriver.promise.Promise<*>} A promise that will be resolved with - * the command result - */ - execCommand(name, method, params) { - var paramNames = this.params_[method + ':' + name]; - if (paramNames === undefined) { - throw new RangeError('The command "' + name + '" has not yet been defined'); - } - if (paramNames.length !== params.length) { - throw new RangeError('The command "' + name + '" expected ' + paramNames.length + ' parameters, got ' + - params.length); - } - var command = new Command(name); - for (var i = 0; i < params.length; i++) { - if (params[i] !== undefined) { - command.setParameter(paramNames[i], params[i]); - } - } - return this.driver_.schedule(command, 'Custom Command: ' + name + '(' + - params - .map((x) => { - if ((typeof x == 'number') || (typeof x == 'boolean') || - (typeof x == 'function')) { - return x.toString(); - } - else if (x == null) { - return '' + x; - } - else { - return JSON.stringify(x); - } - }) - .join(', ') + - ')'); - } -} -exports.Extender = Extender; -//# sourceMappingURL=extender.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map deleted file mode 100644 index 3a465426..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/extender.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extender.js","sourceRoot":"","sources":["../../lib/extender.ts"],"names":[],"mappings":";;AAEA,IAAI,OAAO,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC,OAAO,CAAC;AAEhE;IAME,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,SAAS;YACT,MAAc,CAAC,WAAW,CAAC,CAAC,CAAE,MAAc,CAAC,WAAW,EAAE,CAAC,CAAC,CAAE,MAAc,CAAC,SAAS,CAAC;IAC9F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,IAAY,EAAE,MAAgB,EAAE,MAAc,EAAE,IAAY;QACxE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC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iBACrB;qBAAM,IAAI,CAAC,IAAI,IAAI,EAAE;oBACpB,OAAO,EAAE,GAAG,CAAC,CAAC;iBACf;qBAAM;oBACL,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;iBAC1B;YACH,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;YACf,GAAG,CAAC,CAAC;IACf,CAAC;CACF;AAzED,4BAyEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts deleted file mode 100644 index 44af777c..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { promise as wdpromise, WebDriver } from 'selenium-webdriver'; -export interface ExtendedWebDriver extends WebDriver { - getNetworkConnection: () => wdpromise.Promise<0 | 1 | 2 | 3 | 4 | 5 | 6 | 7>; - setNetworkConnection: (typeOrAirplaneMode: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | boolean, wifi?: boolean, data?: boolean) => wdpromise.Promise; - toggleAirplaneMode: () => wdpromise.Promise; - toggleWiFi: () => wdpromise.Promise; - toggleData: () => wdpromise.Promise; - toggleLocationServices: () => wdpromise.Promise; - getGeolocation: () => wdpromise.Promise<{ - latitude: number; - longitude: number; - altitude: number; - }>; - setGeolocation: (latitude?: number, longitude?: number, altitude?: number) => wdpromise.Promise; - getCurrentDeviceActivity: () => wdpromise.Promise; - startDeviceActivity: (appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string) => wdpromise.Promise; - getAppiumSettings: () => wdpromise.Promise<{ - [name: string]: any; - }>; - setAppiumSettings: (settings: { - [name: string]: any; - }) => wdpromise.Promise; - getCurrentContext: () => wdpromise.Promise; - selectContext: (name: string) => wdpromise.Promise; - listContexts: () => wdpromise.Promise; - getScreenOrientation: () => wdpromise.Promise<'LANDSCAPE' | 'PORTRAIT'>; - setScreenOrientation: (orientation: string) => wdpromise.Promise; - isDeviceLocked: () => wdpromise.Promise; - lockDevice: (delay?: number) => wdpromise.Promise; - unlockDevice: () => wdpromise.Promise; - installApp: (appPath: string) => wdpromise.Promise; - isAppInstalled: (bundleId: string) => wdpromise.Promise; - removeApp: (appId: string) => wdpromise.Promise; - pullFileFromDevice: (path: string) => wdpromise.Promise; - pullFolderFromDevice: (path: string) => wdpromise.Promise; - pushFileToDevice: (path: string, base64Data: string) => wdpromise.Promise; - uploadFile: (base64Data: string) => wdpromise.Promise; - switchToParentFrame: () => wdpromise.Promise; - fullscreen: () => wdpromise.Promise; - sendAppToBackground: (delay?: number) => wdpromise.Promise; - closeApp: () => wdpromise.Promise; - getAppStrings: (language?: string) => wdpromise.Promise; - launchSession: () => wdpromise.Promise; - resetApp: () => wdpromise.Promise; - hideSoftKeyboard: (strategy?: 'default' | 'tapOutside' | 'tapOut' | 'swipeDown' | 'pressKey' | 'press', key?: string) => wdpromise.Promise; - getDeviceTime: () => wdpromise.Promise; - openDeviceNotifications: () => wdpromise.Promise; - rotationGesture: (x?: number, y?: number, duration?: number, rotation?: number, touchCount?: 1 | 2 | 3 | 4 | 5) => wdpromise.Promise; - shakeDevice: () => wdpromise.Promise; - sendChromiumCommand: (cmd: string, params: Object) => wdpromise.Promise; - sendChromiumCommandAndGetResult: (cmd: string, params: Object) => wdpromise.Promise; -} -export declare function extend(baseDriver: WebDriver, fallbackGracefully?: boolean): ExtendedWebDriver; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js deleted file mode 100644 index 6721ae07..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const commandDefinitions = require("./command_definitions"); -const extender_1 = require("./extender"); -function extend(baseDriver, fallbackGracefully = false) { - var extender = new extender_1.Extender(baseDriver); - let extendedDriver = baseDriver; - for (let commandName in commandDefinitions) { - extendedDriver[commandName] = - commandDefinitions[commandName].compile(extender, fallbackGracefully); - } - return extendedDriver; -} -exports.extend = extend; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map deleted file mode 100644 index ced288fc..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;AAGA,4DAA4D;AAC5D,yCAAoC;AAiJpC,gBAAuB,UAAqB,EAAE,kBAAkB,GAAG,KAAK;IACtE,IAAI,QAAQ,GAAG,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,cAAc,GAAsB,UAA+B,CAAC;IAExE,KAAK,IAAI,WAAW,IAAI,kBAAkB,EAAE;QACzC,cAAsB,CAAC,WAAW,CAAC;YAC/B,kBAA0B,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;KACpF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAVD,wBAUC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/package.json b/test-eol-project/node_modules/webdriver-js-extender/built/package.json deleted file mode 100644 index 7b6bd017..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "webdriver-js-extender", - "version": "2.1.0", - "description": "A plugin which adds additional commands to selenium's javascript implementation of the webdriver client side API", - "scripts": { - "prepublish": "gulp prepublish", - "test": "gulp test" - }, - "keywords": [ - "testing", - "webdriver", - "webdriverjs", - "selenium", - "appium" - ], - "repository": "github:angular/webdriver-js-extender", - "main": "built/lib/index.js", - "author": "Sammy Jelin ", - "license": "MIT", - "typings": "built/lib/index.d.ts", - "dependencies": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" - }, - "devDependencies": { - "@types/jasmine": "^2.5.37", - "clang-format": "^1.0.42", - "gulp": "^3.9.1", - "gulp-clang-format": "^1.0.23", - "jasmine": "^2.4.1", - "portfinder": "^1.0.10", - "run-sequence": "^1.2.2", - "selenium-mock": "^0.1.5", - "typescript": "^2.0.0" - }, - "engines": { - "node": ">=6.9.x" - } -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts deleted file mode 100644 index 5df10614..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ExtendedWebDriver } from '../../lib'; -export declare function initMockSeleniumStandaloneServerAndGetDriverFactory(annotateCommands?: boolean): () => ExtendedWebDriver; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js deleted file mode 100644 index 913bbd3f..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const webdriver = require("selenium-webdriver"); -const commandDefinitions = require("../../lib/command_definitions"); -const mock_server_1 = require("../mock-server"); -const commands_1 = require("../mock-server/commands"); -const selenium_mock_1 = require("selenium-mock"); -const lib_1 = require("../../lib"); -let portfinder = require('portfinder'); -let commandMap = null; -function buildCommandMap(commandList) { - if (commandMap == null) { - commandMap = {}; - } - for (let commandName in commandList) { - let command = commandList[commandName]; - if (command instanceof selenium_mock_1.Command) { - commandMap[command.method + ':' + (command.path[0] == '/' ? '' : '/') + command.path] = command; - } - else { - buildCommandMap(command); - } - } -} -function initMockSeleniumStandaloneServerAndGetDriverFactory(annotateCommands = false) { - let server; - let port; - beforeAll((done) => { - portfinder.getPort((err, p) => { - if (err) { - done.fail(err); - } - else { - port = p; - server = new mock_server_1.MockAppium(port); - server.start(); - done(); - } - }); - }); - if (annotateCommands && !commandMap) { - buildCommandMap(commands_1.session); - } - return () => { - let driver = lib_1.extend(new webdriver.Builder(). - usingServer('http://localhost:' + port + '/wd/hub'). - withCapabilities({ browserName: 'chrome' }).build()); - if (annotateCommands) { - Object.keys(commandDefinitions).forEach((commandName) => { - let clientCommand = commandDefinitions[commandName]; - let serverCommand = commandMap[clientCommand.method + ':' + - (clientCommand.path[0] == '/' ? '' : '/') + clientCommand.path]; - let spy = spyOn(serverCommand, 'exec').and.callThrough(); - let oldFun = driver[commandName]; - driver[commandName] = function () { - let oldCount = spy.calls.count(); - return oldFun.apply(this, arguments).then((result) => { - expect(spy.calls.count()).toBe(oldCount + 1); - let args = spy.calls.mostRecent().args; - return { - result: result, - session: args[0], - params: args[1] - }; - }); - }; - }); - } - return driver; - }; -} -exports.initMockSeleniumStandaloneServerAndGetDriverFactory = initMockSeleniumStandaloneServerAndGetDriverFactory; -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map deleted file mode 100644 index 47224c67..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../spec/command_tests/helpers.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAEhD,oEAAoE;AACpE,gDAA0C;AAE1C,sDAA+D;AAC/D,iDAAsC;AACtC,mCAAoD;AACpD,IAAI,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAGvC,IAAI,UAAU,GAA2C,IAAI,CAAC;AAC9D,yBAAyB,WAAwB;IAC/C,IAAI,UAAU,IAAI,IAAI,EAAE;QACtB,UAAU,GAAG,EAAE,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--git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js deleted file mode 100644 index b094f347..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js +++ /dev/null @@ -1,213 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const helpers_1 = require("./helpers"); -const path = require("path"); -describe('normal tests', () => { - let driverFactory = helpers_1.initMockSeleniumStandaloneServerAndGetDriverFactory(); - it('should set/get device activity', (done) => { - let driver = driverFactory(); - driver.startDeviceActivity('sjelin', '.is.cool').then(() => { - return driver.getCurrentDeviceActivity(); - }).then((activity) => { - expect(activity).toBe('.is.cool'); - return driver.startDeviceActivity('sjelin', '.is.the.coolest'); - }).then(() => { - return driver.getCurrentDeviceActivity(); - }).then((activity) => { - expect(activity).toBe('.is.the.coolest'); - done(); - }); - }); - it('should set/get appium settings', (done) => { - let driver = driverFactory(); - driver.setAppiumSettings({ ignoreUnimportantViews: true }).then(() => { - return driver.getAppiumSettings(); - }).then((settings) => { - expect(settings['ignoreUnimportantViews']).toBe(true); - return driver.setAppiumSettings({ ignoreUnimportantViews: false }); - }).then(() => { - return driver.getAppiumSettings(); - }).then((settings) => { - expect(settings['ignoreUnimportantViews']).toBe(false); - done(); - }); - }); - it('should set/get the context', (done) => { - let driver = driverFactory(); - driver.selectContext('NATIVE_APP').then(() => { - return driver.getCurrentContext(); - }).then((context) => { - expect(context).toBe('NATIVE_APP'); - return driver.selectContext('WEBVIEW_1'); - }).then(() => { - return driver.getCurrentContext(); - }).then((context) => { - expect(context).toBe('WEBVIEW_1'); - done(); - }); - }); - it('should set/get screen orientation', (done) => { - let driver = driverFactory(); - driver.setScreenOrientation('landscape').then(() => { - return driver.getScreenOrientation(); - }).then((orientation) => { - expect(orientation).toBe('LANDSCAPE'); - return driver.setScreenOrientation('portrait'); - }).then(() => { - return driver.getScreenOrientation(); - }).then((orientation) => { - expect(orientation).toBe('PORTRAIT'); - done(); - }); - }); - it('should lock/unlcok the device', (done) => { - let driver = driverFactory(); - driver.lockDevice().then(() => { - return driver.isDeviceLocked(); - }).then((locked) => { - expect(locked).toBe(true); - return driver.unlockDevice(); - }).then(() => { - return driver.isDeviceLocked(); - }).then((locked) => { - expect(locked).toBe(false); - done(); - }); - }); - it('should install/uninstall an app', (done) => { - let driver = driverFactory(); - driver.installApp(path.resolve(__dirname, 'totally_real_apk.apk')).then(() => { - return driver.isAppInstalled('sjelin.is.cool'); - }).then((isInstalled) => { - expect(isInstalled).toBe(true); - return driver.removeApp('sjelin.is.cool'); - }).then(() => { - return driver.isAppInstalled('sjelin.is.cool'); - }).then((isInstalled) => { - expect(isInstalled).toBe(false); - done(); - }); - }); - it('should manipulate file system', (done) => { - let driver = driverFactory(); - Promise.all([ - driver.pushFileToDevice('/tmp/wd_js_ext/foo.txt', 'bar'), - driver.pushFileToDevice('/tmp/wd_js_ext/folder/a.txt', 'x'), - driver.pushFileToDevice('/tmp/wd_js_ext/folder/b.txt', 'y'), - driver.pushFileToDevice('/tmp/wd_js_ext/folder/c.txt', 'z'), - ]).then(() => { - return driver.pullFileFromDevice('/tmp/wd_js_ext/foo.txt'); - }).then((fileContents) => { - expect(fileContents).toBe('bar'); - return driver.pullFolderFromDevice('/tmp/wd_js_ext/folder'); - }).then((folderContents) => { - expect(folderContents['a.txt']).toBe('x'); - expect(folderContents['b.txt']).toBe('y'); - expect(folderContents['c.txt']).toBe('z'); - done(); - }); - }); - describe('network connection', () => { - it('should get/set the network connection', (done) => { - let driver = driverFactory(); - driver.setNetworkConnection(0).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(0); - return driver.setNetworkConnection(6); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(6); - done(); - }); - }); - it('should be able to toggle various settings', (done) => { - let driver = driverFactory(); - driver.setNetworkConnection(0).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(0); - return driver.toggleAirplaneMode(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(1); - return driver.toggleWiFi(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(3); - return driver.toggleData(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(7); - return driver.toggleWiFi(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(5); - return driver.toggleAirplaneMode(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(4); - return driver.toggleWiFi(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(6); - return driver.toggleData(); - }).then(() => { - return driver.getNetworkConnection(); - }).then((networkConnection) => { - expect(networkConnection).toBe(2); - done(); - }); - }); - }); - describe('geolocation', () => { - it('should get/set the geolocation', (done) => { - let driver = driverFactory(); - driver.setGeolocation(1, 2, 3).then(() => { - return driver.getGeolocation(); - }).then((geolocation) => { - expect(geolocation).toEqual({ latitude: 1, longitude: 2, altitude: 3 }); - return driver.setGeolocation(0, 0, 0); - }).then(() => { - return driver.getGeolocation(); - }).then((geolocation) => { - expect(geolocation).toEqual({ latitude: 0, longitude: 0, altitude: 0 }); - done(); - }); - }); - it('should disable geolocation', (done) => { - let driver = driverFactory(); - // Location should initially work - driver.setGeolocation(1, 2, 3).then(() => { - return driver.getGeolocation(); - }).then((geolocation) => { - expect(geolocation).toEqual({ latitude: 1, longitude: 2, altitude: 3 }); - // Double toggle should do nothing - return driver.toggleLocationServices(); - }).then(() => { - return driver.toggleLocationServices(); - }).then(() => { - return driver.setGeolocation(0, 0, 0); - }).then(() => { - return driver.getGeolocation(); - }).then((geolocation) => { - expect(geolocation).toEqual({ latitude: 0, longitude: 0, altitude: 0 }); - // Single toggle should cause the command to fail - return driver.toggleLocationServices(); - }).then(() => { - return driver.getGeolocation().catch((error) => { - expect(error.toString()).toContain('Location services disabled'); - done(); - }); - }); - }); - }); -}); -//# sourceMappingURL=normal_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map deleted file mode 100644 index 9c78220d..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/normal_spec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"normal_spec.js","sourceRoot":"","sources":["../../../spec/command_tests/normal_spec.ts"],"names":[],"mappings":";;AAAA,uCAA8E;AAC9E,6BAA6B;AAE7B,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,aAAa,GAAG,6DAAmD,EAAE,CAAC;IAE1E,EAAE,CAAC,gCAAgC,EAAE,CAAC,IAAI,EAAE,EAAE;QAC5C,IAAI,MAAM,GAAG,aAAa,EAAE,CAAC;QAC7B,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACzD,OAAO,MAAM,CAAC,wBAAwB,EAAE,CAAC;QAC3C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAClC,OAAO,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QACjE,CAAC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AW,CAAC,CAAC,OAAO,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;gBAEtE,iDAAiD;gBACjD,OAAO,MAAM,CAAC,sBAAsB,EAAE,CAAC;YACzC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;gBACX,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;oBAClD,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;oBACjE,IAAI,EAAE,CAAC;gBACT,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts deleted file mode 100644 index 93eaed81..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Session } from '../mock-server/interfaces'; -export interface Testcase { - skip?: boolean; - args?: any[]; - result?: any; - session?: Session; - params?: { - [name: string]: any; - }; -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js deleted file mode 100644 index 7e5afc6d..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const helpers_1 = require("./helpers"); -const path = require("path"); -describe('table tests', () => { - let driverFactory = helpers_1.initMockSeleniumStandaloneServerAndGetDriverFactory(true); - let table = { - getCurrentContext: { result: 'WEBVIEW_1' }, - selectContext: { args: ['WEBVIEW_1'], params: { name: 'WEBVIEW_1' } }, - listContexts: { result: ['WEBVIEW_1'] }, - uploadFile: { args: ['hello'], params: { file: 'hello' } }, - getNetworkConnection: { result: 6 }, - setNetworkConnection: [ - { args: [0], params: { 'type': 0 } }, - { args: [true, false, false], params: { 'type': 1 } }, - { args: [false, true, true], params: { 'type': 6 } } - ], - toggleAirplaneMode: {}, - toggleData: {}, - toggleWiFi: {}, - toggleLocationServices: {}, - getGeolocation: { result: { latitude: 0, longitude: 0, altitude: 0 } }, - setGeolocation: { args: [1, 2, 3], params: { location: { latitude: 1, longitude: 2, altitude: 3 } } }, - getScreenOrientation: { result: 'PORTRAIT' }, - setScreenOrientation: { args: ['landscape'], params: { orientation: 'LANDSCAPE' } }, - switchToParentFrame: {}, - fullscreen: {}, - getAppiumSettings: { result: { ignoreUnimportantViews: false } }, - setAppiumSettings: { args: [{ ignoreUnimportantViews: true }], params: { settings: { ignoreUnimportantViews: true } } }, - sendAppToBackground: [{ params: { seconds: 0 } }, { args: [1], params: { seconds: 1 } }], - closeApp: {}, - getAppStrings: [{ result: ['Hello', 'World'] }, - { result: ['Hello', 'World'], args: ['en'], params: { language: 'en' } }], - launchSession: {}, - resetApp: {}, - getCurrentDeviceActivity: {}, - startDeviceActivity: [{ args: ['a', 'b', 'c', 'd'], params: { appPackage: 'a', appActivity: 'b', appWaitPackage: 'c', appWaitActivity: 'd' } }, - { args: ['a', 'b'], params: { appPackage: 'a', appActivity: 'b' } }], - hideSoftKeyboard: [{ params: { strategy: 'default' } }, - { args: ['pressKey', 'Done'], params: { strategy: 'pressKey', key: 'Done' } }], - installApp: { args: [path.resolve(__dirname, 'totally_real_apk.apk')], - params: { appPath: path.resolve(__dirname, 'totally_real_apk.apk') } }, - isAppInstalled: { result: false, args: ['sjelin.is.cool'], params: { bundleId: 'sjelin.is.cool' } }, - removeApp: { args: ['sjelin.is.cool'], params: { appId: 'sjelin.is.cool' } }, - isDeviceLocked: { result: false }, - lockDevice: [{ params: { seconds: 0 } }, { args: [1], params: { seconds: 1 } }], - unlockDevice: {}, - // pullFileFromDevice: null, // No good way to test this - pullFolderFromDevice: { result: {}, args: [''], params: { path: '' } }, - pushFileToDevice: { args: ['/a/b', 'cde'], params: { path: '/a/b', data: 'cde' } }, - getDeviceTime: { result: new Date().toString() }, - openDeviceNotifications: {}, - rotationGesture: [{ params: { x: 0, y: 0, duration: 1, rotation: 180, touchCount: 2 } }, - { args: [1, 2, 3, 90, 5], params: { x: 1, y: 2, duration: 3, rotation: 90, touchCount: 5 } }], - shakeDevice: {}, - sendChromiumCommand: { args: ['DOM.enable', {}] }, - sendChromiumCommandAndGetResult: { args: ['DOM.enable', {}] } - }; - function runTestcase(commandName) { - let itName = 'should correctly call "' + commandName + '"'; - let tableEntry = table[commandName]; - if (tableEntry == null) { - return it(itName); - } - let testcases = Array.isArray(tableEntry) ? tableEntry : [tableEntry]; - testcases.forEach((testcase, i) => { - let caseName = itName + (tableEntry === testcases ? ' (#' + i + ')' : ''); - if (testcase.skip) { - return it(caseName); - } - it(caseName, (done) => { - let driver = driverFactory(); - driver[commandName].apply(driver, testcase.args || []).then((results) => { - expect(results.result).toEqual(testcase.result == null ? null : testcase.result); - if (testcase.session) { - for (let varname in testcase.session) { - expect(results.session[varname]). - toEqual(testcase.session[varname]); - } - } - if (testcase.params) { - for (let paramName in testcase.params) { - expect(results.params[paramName]).toEqual(testcase.params[paramName]); - } - } - done(); - }); - }); - }); - } - for (let commandName in table) { - runTestcase(commandName); - } -}); -//# sourceMappingURL=table_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map deleted file mode 100644 index 47a84cf8..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/table_spec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"table_spec.js","sourceRoot":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CAAC,CAAC,CAAC;yBACvE;qBACF;oBACD,IAAI,EAAE,CAAC;gBACT,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,IAAI,WAAW,IAAI,KAAK,EAAE;QAC7B,WAAW,CAAC,WAAW,CAAC,CAAC;KAC1B;AACH,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk b/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk deleted file mode 100644 index 066f0038..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/command_tests/totally_real_apk.apk +++ /dev/null @@ -1 +0,0 @@ -sjelin.is.cool diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js deleted file mode 100644 index dd15bbcf..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const extender_1 = require("../lib/extender"); -const mockdriver_1 = require("./mockdriver"); -let noop_define = (n, m, p) => { }; -let noop_exec = (p, m, d) => { }; -describe('extender', () => { - let sessionId = '1234'; - it('should call executor_.defineCommand', (done) => { - let name = 'customCommand'; - let method = 'post'; - let path = '/custom/command'; - let mockdriver = mockdriver_1.buildMockDriver(sessionId, (n, m, p) => { - expect(n).toEqual(name); - expect(m).toEqual(method); - expect(p).toEqual(path); - done(); - }, noop_exec); - let extender = new extender_1.Extender(mockdriver); - extender.defineCommand(name, [], method, path); - }); - it('should schedule custom commands', (done) => { - let name = 'customCommand'; - let method = 'post'; - let path = '/custom/command'; - let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, (p, m, d) => { - expect(p).toEqual(path); - expect(m).toEqual(method); - expect(d['sessionId']).toEqual(sessionId); - expect(Object.keys(d).length).toEqual(1); - done(); - }); - let extender = new extender_1.Extender(mockdriver); - extender.defineCommand(name, [], method, path); - extender.execCommand(name, method, []); - }); - it('should use command parameters', (done) => { - let name = 'customCommand'; - let method = 'post'; - let paramNames = ['var1', 'var2']; - let paramValues = ['val1', 'val2']; - let path = '/custom/:var1/command'; - let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, (p, m, d) => { - expect(p).toEqual('/custom/val1/command'); - expect(m).toEqual(method); - expect(d['sessionId']).toEqual(sessionId); - expect(d['var2']).toEqual('val2'); - expect(Object.keys(d).length).toEqual(2); - done(); - }); - let extender = new extender_1.Extender(mockdriver); - extender.defineCommand(name, paramNames, method, path); - extender.execCommand(name, method, paramValues); - }); - it('should not be able to exec a command that has not been defined', () => { - let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, noop_exec); - let extender = new extender_1.Extender(mockdriver); - expect(() => { extender.execCommand('', '', []); }).toThrowError(RangeError); - }); - it('should require correct number of parameters for execution', () => { - let name = 'customCommand'; - let method = 'post'; - let path = '/custom/:command'; - let mockdriver = mockdriver_1.buildMockDriver(sessionId, noop_define, noop_exec); - let extender = new extender_1.Extender(mockdriver); - extender.defineCommand(name, ['command'], method, path); - expect(() => { extender.execCommand(name, method, []); }).toThrowError(RangeError); - }); -}); -//# sourceMappingURL=extender_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map deleted file mode 100644 index 478bcfbd..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/extender_spec.js.map +++ /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QACpE,IAAI,QAAQ,GAAG,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACxD,MAAM,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js deleted file mode 100644 index 7792bd53..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const lib_1 = require("../lib"); -const mockdriver_1 = require("./mockdriver"); -describe('extender', () => { - it('should support setting/getting the network connection', (done) => { - let ncType; - let baseDriver = mockdriver_1.buildMockDriver('42', (name, method, path) => { }, (path, method, data) => { - expect(path).toEqual('/session/42/network_connection'); - if (method == 'GET') { - expect(Object.keys(data).length).toEqual(0); - return ncType; - } - else if (method == 'POST') { - expect(JSON.stringify(Object.keys(data))).toEqual('["type"]'); - ncType = data['type']; - } - }); - let driver = lib_1.extend(baseDriver); - driver.setNetworkConnection(5).then(() => { - return driver.getNetworkConnection(); - }).then((connectionType) => { - expect(connectionType).toEqual(5); - done(); - }); - }); -}); -//# sourceMappingURL=index_spec.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map deleted file mode 100644 index 094ed85f..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/index_spec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["../../spec/index_spec.ts"],"names":[],"mappings":";;AACA,gCAA8B;AAC9B,6CAAmD;AAGnD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,uDAAuD,EAAE,CAAC,IAAI,EAAE,EAAE;QACnE,IAAI,MAAe,CAAC;QACpB,IAAI,UAAU,GAAG,4BAAe,CAAC,IAAI,EACnC,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY,EAAE,EAAE,GAAE,CAAC,EAClD,CAAC,IAAY,EAAE,MAAc,EAAE,IAAU,EAAE,EAAE;YAC3C,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;YACvD,IAAG,MAAM,IAAI,KAAK,EAAE;gBAClB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC5C,OAAO,MAAM,CAAC;aACf;iBAAM,IAAI,MAAM,IAAI,MAAM,EAAE;gBAC3B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBAC9D,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;aACvB;QACH,CAAC,CACF,CAAC;QACF,IAAI,MAAM,GAAG,YAAM,CAAC,UAAU,CAAC,CAAC;QAChC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACvC,OAAO,MAAM,CAAC,oBAAoB,EAAE,CAAC;QACvC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,cAAsB,EAAE,EAAE;YACjC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAClC,IAAI,EAAE,CAAC;QACT,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts deleted file mode 100644 index 8ec666e1..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { AppiumCommandList } from '../interfaces'; -export declare let appium: AppiumCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js deleted file mode 100644 index 583dcf45..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -/** - * Custom appium commands - * - * In this file we define all the custom commands which are part of the appium API but will probably - * never be part of the webdriver spec or JsonWireProtocol. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const selenium_mock_1 = require("selenium-mock"); -const helpers_1 = require("./helpers"); -let app = {}; -let device = {}; -exports.appium = { - app: app, - device: device -}; -app.toBackground = - new selenium_mock_1.Command('POST', 'appium/app/background', (session, params) => { - return new Promise((resolve) => { - setTimeout(resolve, (params['seconds'] || 0) * 1000); - }); - }); -app.closeApp = helpers_1.noopFactory('appium/app/close'); -app.getStrings = helpers_1.constFactory('POST', '/appium/app/strings', ['Hello', 'World']); -app.launch = helpers_1.noopFactory('appium/app/launch'); -app.reset = helpers_1.noopFactory('appium/app/reset'); -device.getActivity = helpers_1.getterFactory('/appium/device/current_activity', 'activity'); -device.startActivity = helpers_1.setterFactory('/appium/device/start_activity', 'activity', 'appActivity'); -device.hideKeyboard = helpers_1.noopFactory('/appium/device/hide_keyboard'); -device.sendKeyEvent = helpers_1.noopFactory('/appium/device/keyevent'); -device.pressKeyCode = helpers_1.noopFactory('/appium/device/press_keycode'); -device.longPressKeyCode = helpers_1.noopFactory('/appium/device/long_press_keycode'); -device.installApp = - new selenium_mock_1.Command('POST', 'appium/device/install_app', (session, params) => { - fs.readFile(params['appPath'], (err, contents) => { - if (err) { - throw 'Error while trying to read "' + params['appPath'] + ': ' + err; - } - session.installedApps.push(contents.toString().trim()); - }); - }); -device.isAppInstalled = - new selenium_mock_1.Command('POST', 'appium/device/app_installed', (session, params) => { - return session.installedApps.some((app) => { - return app === params['bundleId'] || app === params['appId']; - }); - }); -device.removeApp = - new selenium_mock_1.Command('POST', '/appium/device/remove_app', (session, params) => { - session.installedApps = session.installedApps.filter((app) => { - return app !== params['bundleId'] && app !== params['appId']; - }); - }); -device.isLocked = helpers_1.getterFactory('/appium/device/is_locked', 'locked', 'POST'); -device.lock = - new selenium_mock_1.Command('POST', 'appium/device/lock', (session, params) => { - return new Promise((resolve) => { - setTimeout(() => { - session.locked = true; - resolve(); - }, (params['seconds'] || 0) * 1000); - }); - }); -device.unlock = - new selenium_mock_1.Command('POST', 'appium/device/unlock', (session) => { - session.locked = false; - }); -device.pullFile = - new selenium_mock_1.Command('POST', '/appium/device/pull_file', (session, params) => { - let path = params['path'].split('/'); - if (path[0].length == 0) { - path = path.slice(1); - } - ; - let file = session.files; - for (let folder of path) { - file = file[folder]; - } - return file; - }); -device.pullFolder = - new selenium_mock_1.Command('POST', '/appium/device/pull_folder', (session, params) => { - let path = params['path'].split('/'); - if (path[0].length == 0) { - path = path.slice(1); - } - ; - let folder = session.files; - for (let name of path) { - folder = folder[name]; - } - return folder; - }); -device.pushFile = - new selenium_mock_1.Command('POST', 'appium/device/push_file', (session, params) => { - let path = params['path'].split('/'); - if (path[0].length == 0) { - path = path.slice(1); - } - ; - let folder = session.files; - for (let i = 0; i < path.length - 1; i++) { - if (folder[path[i]] === undefined) { - folder[path[i]] = {}; - } - folder = folder[path[i]]; - } - folder[path[path.length - 1]] = params['data']; - }); -device.getTime = helpers_1.constFactory('GET', '/appium/device/system_time', new Date().toString()); -device.openNotifications = helpers_1.noopFactory('/appium/device/open_notifications'); -device.rotate = helpers_1.noopFactory('appium/device/rotate'); -device.shake = helpers_1.noopFactory('appium/device/shake'); -exports.appium.getSettings = helpers_1.getterFactory('/appium/settings'); -exports.appium.setSettings = helpers_1.setterFactory('/appium/settings'); -exports.appium.setImmediateValue = helpers_1.noopFactory('/appium/element/:id/value'); -//# sourceMappingURL=appium.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map deleted file mode 100644 index 369a36b8..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/appium.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"appium.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/appium.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB,iDAAsC;AAEtC,uCAA8G;AAE9G,IAAI,GAAG,GAAG,EAA0B,CAAC;AAErC,IAAI,MAAM,GAAG,EAA6B,CAAC;AAEhC,QAAA,MAAM,GAAG;IAClB,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,MAAM;CACM,CAAC;AAEvB,GAAG,CAAC,YAAY;IACd,IAAI,uBAAO,CAAU,MAAM,EAAE,uBAAuB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,UAAU,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,IAAE,CAAC,CAAC,GA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,kBAAkB,CAAC,CAAC;AAChD,cAAM,CAAC,iBAAiB,GAAG,qBAAI,CAAC,2BAA2B,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts deleted file mode 100644 index 86c54eae..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ChromiumCommandList } from '../interfaces'; -export declare let chromium: ChromiumCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js deleted file mode 100644 index b72404bf..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -/** - * Custom chromium commands - * - * In this file we define all the custom commands which are part of the chromium API but will probably - * never be part of the webdriver spec or JsonWireProtocol. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -const helpers_1 = require("./helpers"); -exports.chromium = { - sendChromiumCommand: helpers_1.noopFactory('chromium/send_command'), - sendChromiumCommandAndGetResult: helpers_1.noopFactory('chromium/send_command_and_get_result') -}; -//# sourceMappingURL=chromium.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map deleted file mode 100644 index 4fb96979..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/chromium.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/chromium.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAIH,uCAA8C;AAEnC,QAAA,QAAQ,GAAG;IACpB,mBAAmB,EAAE,qBAAI,CAAC,uBAAuB,CAAC;IAClD,+BAA+B,EAAE,qBAAI,CAAC,sCAAsC,CAAC;CACvD,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts deleted file mode 100644 index df20feec..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Helpers for defining commands more quickly. - * - * In this file we define some helpers for quickly defining commands with either do nothing, - * set/get a value on the session, or return a constant value. - */ -import { Command } from 'selenium-mock'; -import { Session } from '../interfaces'; -export declare function noopFactory(path: string, method?: 'GET' | 'POST' | 'DELETE' | 'PUT'): Command; -export declare function getterFactory(path: string, name?: string, method?: 'GET' | 'POST' | 'DELETE' | 'PUT'): Command; -export declare function setterFactory(path: string, name?: string, paramName?: string): Command; -export declare function constFactory(method: 'GET' | 'POST' | 'DELETE' | 'PUT', path: string, val: any): Command; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js deleted file mode 100644 index d4458db9..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Helpers for defining commands more quickly. - * - * In this file we define some helpers for quickly defining commands with either do nothing, - * set/get a value on the session, or return a constant value. - */ -const selenium_mock_1 = require("selenium-mock"); -function noopFactory(path, method = 'POST') { - return new selenium_mock_1.Command(method, path, () => { }); -} -exports.noopFactory = noopFactory; -function getterFactory(path, name, method = 'GET') { - name = name || path.split('/').pop(); - return new selenium_mock_1.Command(method, path, (session) => { - return session[name]; - }); -} -exports.getterFactory = getterFactory; -function setterFactory(path, name, paramName) { - name = name || path.split('/').pop(); - paramName = paramName || name; - return new selenium_mock_1.Command('POST', path, (session, params) => { - session[name] = params[paramName]; - }); -} -exports.setterFactory = setterFactory; -function constFactory(method, path, val) { - return new selenium_mock_1.Command(method, path, () => { - return val; - }); -} -exports.constFactory = constFactory; -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map deleted file mode 100644 index 4d41002e..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/helpers.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iDAAsC;AAGtC,qBAA4B,IAAY,EAAE,SAAsC,MAAM;IACpF,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kCAEC;AAED,uBAA8B,IAAY,EAAE,IAAa,EAAE,SAAsC,KAAK;IACpG,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACrC,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;QACpD,OAAQ,OAAe,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AALD,sCAKC;AAED,uBAA8B,IAAY,EAAE,IAAa,EAAE,SAAkB;IAC3E,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IACrC,SAAS,GAAG,SAAS,IAAI,IAAI,CAAC;IAC9B,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,OAAe,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC;AAND,sCAMC;AAED,sBAA6B,MAAmC,EAAE,IAAY,EAAE,GAAQ;IACtF,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE;QAC7C,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,oCAIC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts deleted file mode 100644 index 1f4e55d4..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { SessionCommandList } from '../interfaces'; -export declare let session: SessionCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js deleted file mode 100644 index 959f6252..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * In this file we define all the commands which run against a particular webdriver session, but - * do not belong in `./appium.ts` or `./storage.ts`. - */ -const selenium_mock_1 = require("selenium-mock"); -const helpers_1 = require("./helpers"); -const appium_1 = require("./appium"); -const chromium_1 = require("./chromium"); -const storage_1 = require("./storage"); -exports.session = { - element: {}, - sessionStorage: storage_1.storageFactory('session'), - localStorage: storage_1.storageFactory('local'), - appium: appium_1.appium, - chromium: chromium_1.chromium, -}; -exports.session.currentContext = helpers_1.getterFactory('context', 'currentContext'); -exports.session.selectContext = helpers_1.setterFactory('context', 'currentContext', 'name'); -exports.session.listContexts = helpers_1.constFactory('GET', 'contexts', ['WEBVIEW_1']); -exports.session.uploadFile = helpers_1.noopFactory('file'); -exports.session.getNetworkConnection = helpers_1.getterFactory('network_connection', 'networkConnection'); -exports.session.setNetworkConnection = helpers_1.setterFactory('network_connection', 'networkConnection', 'type'); -exports.session.toggleAirplaneMode = - new selenium_mock_1.Command('POST', 'appium/device/toggle_airplane_mode', (session) => { - session.networkConnection ^= 1; - }); -exports.session.toggleWiFi = - new selenium_mock_1.Command('POST', 'appium/device/toggle_wifi', (session) => { - session.networkConnection ^= 2; - }); -exports.session.toggleData = - new selenium_mock_1.Command('POST', 'appium/device/toggle_data', (session) => { - session.networkConnection ^= 4; - }); -exports.session.toggleLocationServices = - new selenium_mock_1.Command('POST', 'appium/device/toggle_location_services', (session) => { - session.locationEnabled = !session.locationEnabled; - }); -exports.session.getGeolocation = - new selenium_mock_1.Command('GET', '/location', (session) => { - if (!session.locationEnabled) { - throw 'Location services disabled'; - } - return session.location; - }); -exports.session.setGeolocation = - new selenium_mock_1.Command('POST', '/location', (session, params) => { - if (!session.locationEnabled) { - throw 'Location services disabled'; - } - session.location = params['location']; - }); -exports.session.getOrientation = helpers_1.getterFactory('orientation'); -exports.session.setOrientation = helpers_1.setterFactory('orientation'); -exports.session.switchToParentFrame = helpers_1.noopFactory('frame/parent'); -exports.session.fullscreen = helpers_1.noopFactory('window/fullscreen'); -exports.session.performMultiAction = helpers_1.noopFactory('touch/multi/perform'); -exports.session.performTouchAction = helpers_1.noopFactory('touch/perform'); -exports.session.element.elementIdLocationInView = helpers_1.constFactory('GET', '/element/:id/location_in_view', { x: 0, y: 0 }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map deleted file mode 100644 index c98e99c4..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/index.js.map +++ /dev/null @@ -1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AAC,OAAO,CAAC,uBAAuB,GAAG,sBAAY,CAAC,KAAK,EAAE,+BAA+B,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts deleted file mode 100644 index 85d84a95..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { StorageCommandList } from '../interfaces'; -export declare function storageFactory(type: 'session' | 'local'): StorageCommandList; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js deleted file mode 100644 index 6e9c55d1..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * In this file we define a factory which can be used to create the commands for either - * sessionStorage or localStorage - */ -const selenium_mock_1 = require("selenium-mock"); -function storageFactory(type) { - let storageCmds = {}; - function cmdFactory(method, relPath, fun) { - return new selenium_mock_1.Command(method, type + '_storage' + relPath, (session, params) => { - return fun(session[type + '_storage'], params['key'], params['value']); - }); - } - storageCmds.getKeys = cmdFactory('GET', '', (store) => { - return Object.keys(store); - }); - storageCmds.getValue = cmdFactory('GET', '/key/:key', (store, key) => { - return store[key]; - }); - storageCmds.setValue = cmdFactory('POST', '', (store, key, value) => { - store[key] = value; - }); - storageCmds.deleteEntry = cmdFactory('DELETE', '/key/:key', (store, key) => { - delete store[key]; - }); - storageCmds.deleteAll = cmdFactory('DELETE', '', (store) => { - for (var key in store) { - delete store[key]; - } - }); - storageCmds.getSize = cmdFactory('GET', '/size', (store) => { - return Object.keys(store).length; - }); - return storageCmds; -} -exports.storageFactory = storageFactory; -; -//# sourceMappingURL=storage.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map deleted file mode 100644 index fd888a88..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/commands/storage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../spec/mock-server/commands/storage.ts"],"names":[],"mappings":";;AAAA;;;GAGG;AACH,iDAAsC;AAGtC,wBAA+B,IAAyB;IACtD,IAAI,WAAW,GAAG,EAAwB,CAAC;IAC3C,oBAAoB,MAA6B,EAAE,OAAe,EAAE,GACK;QACvE,OAAO,IAAI,uBAAO,CAAU,MAAM,EAAE,IAAI,GAAG,UAAU,GAAG,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnF,OAAO,GAAG,CAAE,OAAe,CAAC,IAAI,GAAG,UAAU,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC,CAAC;IACL,CAAC;IACD,WAAW,CAAC,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE;QACpD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,WAAW,CAAC,QAAQ,GAAG,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACnE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,WAAW,CAAC,QAAQ,GAAG,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAClE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,WAAW,CAAC,WAAW,GAAG,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACzE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,WAAW,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE;QACzD,KAAK,IAAI,GAAG,IAAI,KAAK,EAAE;YACrB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;SACnB;IACH,CAAC,CAAC,CAAC;IACH,WAAW,CAAC,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACzD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,CAAC;AA7BD,wCA6BC;AAAA,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts deleted file mode 100644 index ee2c66d9..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Session } from './interfaces'; -import { Server } from 'selenium-mock'; -export declare class MockAppium extends Server { - constructor(port: number); -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js deleted file mode 100644 index 24c68696..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const commands_1 = require("./commands"); -const selenium_mock_1 = require("selenium-mock"); -class MockAppium extends selenium_mock_1.Server { - constructor(port) { - super(port, (basicSession) => { - let session = basicSession; - session.currentContext = 'WEBVIEW_1'; - session.installedApps = []; - session.locked = false; - session.localStorage = {}; - session.location = { latitude: 0, longitude: 0, altitude: 0 }; - session.locationEnabled = true; - session.orientation = 'PORTRAIT'; - session.files = {}; - session.sessionStorage = {}; - session.settings = { ignoreUnimportantViews: false }; - session.activity = null; - session.networkConnection = 6; - return session; - }); - let addCommands = (commandList) => { - for (let commandName in commandList) { - let command = commandList[commandName]; - if (command instanceof selenium_mock_1.Command) { - this.addCommand(command); - } - else { - addCommands(command); - } - } - }; - addCommands(commands_1.session); - } -} -exports.MockAppium = MockAppium; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map deleted file mode 100644 index e0ffd1a1..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../spec/mock-server/index.ts"],"names":[],"mappings":";;AAAA,yCAAkD;AAElD,iDAA8C;AAE9C,gBAAwB,SAAQ,sBAAe;IAC7C,YAAY,IAAY;QACtB,KAAK,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;YAC3B,IAAI,OAAO,GAAG,YAAuB,CAAC;YACtC,OAAO,CAAC,cAAc,GAAG,WAAW,CAAC;YACrC,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC;YAC3B,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;YACvB,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC;YAC1B,OAAO,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;YAC/B,OAAO,CAAC,WAAW,GAAG,UAAU,CAAC;YACjC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;YACnB,OAAO,CAAC,cAAc,GAAG,EAAE,CAAC;YAC5B,OAAO,CAAC,QAAQ,GAAG,EAAC,sBAAsB,EAAE,KAAK,EAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;YACxB,OAAO,CAAC,iBAAiB,GAAG,CAAC,CAAC;YAC9B,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,GAAG,CAAC,WAAwB,EAAE,EAAE;YAC7C,KAAK,IAAI,WAAW,IAAI,WAAW,EAAE;gBACnC,IAAI,OAAO,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;gBACvC,IAAI,OAAO,YAAY,uBAAO,EAAE;oBAC9B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;iBAC1B;qBAAM;oBACL,WAAW,CAAC,OAAO,CAAC,CAAC;iBACtB;aACF;QACH,CAAC,CAAA;QAED,WAAW,CAAC,kBAAW,CAAC,CAAC;IAC3B,CAAC;CACF;AAhCD,gCAgCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts deleted file mode 100644 index 61fbfa54..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Session as BasicSession, Command } from 'selenium-mock'; -export interface Location { - latitude: number; - longitude: number; - altitude: number; -} -export interface FsFolder { - [name: string]: (string | FsFolder); -} -export declare type Orientation = 'LANDSCAPE' | 'PORTRAIT'; -export interface Session extends BasicSession { - currentContext?: string; - installedApps?: string[]; - locked?: boolean; - localStorage?: { - [key: string]: string; - }; - location?: Location; - locationEnabled?: boolean; - orientation?: Orientation; - files?: FsFolder; - sessionStorage?: { - [key: string]: string; - }; - settings?: { - [key: string]: any; - }; - activity?: string; - networkConnection?: number; -} -export interface CommandList { - [name: string]: Command | CommandList; -} -export interface ElementCommandList extends CommandList { - elementIdLocationInView: Command; -} -export interface StorageCommandList extends CommandList { - getKeys: Command; - getValue: Command; - setValue: Command; - deleteEntry: Command; - deleteAll: Command; - getSize: Command; -} -export interface AppiumAppCommandList extends CommandList { - toBackground: Command; - closeApp: Command; - getStrings: Command; - launch: Command; - reset: Command; -} -export interface AppiumDeviceCommandList extends CommandList { - getActivity: Command; - startActivity: Command; - hideKeyboard: Command; - sendKeyEvent: Command; - pressKeyCode: Command; - longPressKeyCode: Command; - installApp: Command; - isAppInstalled: Command; - removeApp: Command; - isLocked: Command; - lock: Command; - unlock: Command; - pullFile: Command; - pullFolder: Command; - pushFile: Command; - getTime: Command; - openNotifications: Command; - rotate: Command; - shake: Command; -} -export interface AppiumCommandList extends CommandList { - getSettings: Command; - setSettings: Command; - setImmediateValue: Command; - app: AppiumAppCommandList; - device: AppiumDeviceCommandList; -} -export interface ChromiumCommandList extends CommandList { - sendChromiumCommand: Command; - sendChromiumCommandAndGetResult: Command; -} -export interface SessionCommandList extends CommandList { - currentContext: Command; - selectContext: Command; - listContexts: Command; - uploadFile: Command; - getNetworkConnection: Command; - setNetworkConnection: Command; - toggleAirplaneMode: Command; - toggleData: Command; - toggleWiFi: Command; - toggleLocationServices: Command; - getGeolocation: Command; - setGeolocation: Command; - getOrientation: Command; - setOrientation: Command; - switchToParentFrame: Command; - fullscreen: Command; - performMultiAction: Command; - performTouchAction: Command; - element: ElementCommandList; - sessionStorage: StorageCommandList; - localStorage: StorageCommandList; - appium: AppiumCommandList; - chromium: ChromiumCommandList; -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js deleted file mode 100644 index db919115..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map deleted file mode 100644 index d4f4bfa3..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mock-server/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../spec/mock-server/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts deleted file mode 100644 index 1fe2d189..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as webdriver from 'selenium-webdriver'; -export interface Data { - sessionId: string; - [key: string]: any; -} -export declare function buildMockDriver(sessionId: string, defineCallback: (name: string, method: string, path: string) => void, execCallback: (path: string, method: string, data: Data) => any): webdriver.WebDriver; diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js deleted file mode 100644 index fcd5780f..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const webdriver = require("selenium-webdriver"); -let buildPath = require('selenium-webdriver/lib/http').buildPath; -function buildMockDriver(sessionId, defineCallback, execCallback) { - let paths = {}; - let methods = {}; - let mockSession = new webdriver.Session(sessionId, {}); - return new webdriver.WebDriver(mockSession, { - execute: (command) => { - command.setParameter('sessionId', sessionId); - let params = command.getParameters(); - return webdriver.promise.fulfilled(execCallback(buildPath(paths[command.getName()], params), methods[command.getName()], params)); - }, - defineCommand: (name, method, path) => { - paths[name] = path; - methods[name] = method; - defineCallback(name, method, path); - } - }); -} -exports.buildMockDriver = buildMockDriver; -//# sourceMappingURL=mockdriver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map b/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map deleted file mode 100644 index 068cc0bf..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/built/spec/mockdriver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mockdriver.js","sourceRoot":"","sources":["../../spec/mockdriver.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAChD,IAAI,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC,SAAS,CAAC;AAOjE,yBAAgC,SAAiB,EAC7C,cAAoE,EACpE,YAA+D;IAGjE,IAAI,KAAK,GAA6B,EAAE,CAAC;IACzC,IAAI,OAAO,GAA6B,EAAE,CAAC;IAC3C,IAAI,WAAW,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAEvD,OAAO,IAAI,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE;QAC1C,OAAO,EAAE,CAAC,OAA0B,EAAE,EAAE;YACtC,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YAC7C,IAAI,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;YACrC,OAAO,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAC3C,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAC3C,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,aAAa,EAAE,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY,EAAE,EAAE;YAC5D,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YACvB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;KACoB,CAAC,CAAC;AAC3B,CAAC;AAvBD,0CAuBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-js-extender/gulpfile.js b/test-eol-project/node_modules/webdriver-js-extender/gulpfile.js deleted file mode 100644 index 031acafc..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/gulpfile.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var gulp = require('gulp'); -var runSequence = require('run-sequence'); -var spawn = require('child_process').spawn; -const format = require('gulp-clang-format'); -const clangFormat = require('clang-format'); - -var runSpawn = function(done, task, opt_arg) { - opt_arg = typeof opt_arg !== 'undefined' ? opt_arg : []; - var child = spawn(task, opt_arg, {stdio: 'inherit'}); - var running = false; - child.on('close', function() { - if (!running) { - running = true; - done(); - } - }); - child.on('error', function() { - if (!running) { - console.error('gulp encountered a child error'); - running = true; - done(); - } - }); -}; - -gulp.task('copy', function() { - return gulp.src(['**/*.apk', 'package.json']) - .pipe(gulp.dest('built/')); -}); - -gulp.task('format:enforce', () => { - return gulp.src(['lib/**/*.ts']).pipe( - format.checkFormat('file', clangFormat, {verbose: true, fail: true})); -}); - -gulp.task('format', () => { - return gulp.src(['lib/**/*.ts'], { base: '.' }).pipe( - format.format('file', clangFormat)).pipe(gulp.dest('.')); -}); - -gulp.task('tsc', function(done) { - runSpawn(done, process.execPath, ['node_modules/typescript/bin/tsc']); -}); - -gulp.task('prepublish', function(done) { - runSequence('format', 'tsc', 'copy', done); -}); - -gulp.task('default',['prepublish']); -gulp.task('build',['prepublish']); - -gulp.task('test', ['build'], function(done) { - var opt_arg = []; - opt_arg.push('node_modules/jasmine/bin/jasmine.js'); - runSpawn(done, process.execPath, opt_arg); -}); diff --git a/test-eol-project/node_modules/webdriver-js-extender/package.json b/test-eol-project/node_modules/webdriver-js-extender/package.json deleted file mode 100644 index 7b6bd017..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "webdriver-js-extender", - "version": "2.1.0", - "description": "A plugin which adds additional commands to selenium's javascript implementation of the webdriver client side API", - "scripts": { - "prepublish": "gulp prepublish", - "test": "gulp test" - }, - "keywords": [ - "testing", - "webdriver", - "webdriverjs", - "selenium", - "appium" - ], - "repository": "github:angular/webdriver-js-extender", - "main": "built/lib/index.js", - "author": "Sammy Jelin ", - "license": "MIT", - "typings": "built/lib/index.d.ts", - "dependencies": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" - }, - "devDependencies": { - "@types/jasmine": "^2.5.37", - "clang-format": "^1.0.42", - "gulp": "^3.9.1", - "gulp-clang-format": "^1.0.23", - "jasmine": "^2.4.1", - "portfinder": "^1.0.10", - "run-sequence": "^1.2.2", - "selenium-mock": "^0.1.5", - "typescript": "^2.0.0" - }, - "engines": { - "node": ">=6.9.x" - } -} diff --git a/test-eol-project/node_modules/webdriver-js-extender/tsconfig.json b/test-eol-project/node_modules/webdriver-js-extender/tsconfig.json deleted file mode 100644 index 9c12cf91..00000000 --- a/test-eol-project/node_modules/webdriver-js-extender/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "declaration": true, - "removeComments": false, - "noImplicitAny": true, - "outDir": "built/" - }, - "exclude": [ - "built", - "node_modules" - ] -} diff --git a/test-eol-project/node_modules/webdriver-manager/.circleci/config.yml b/test-eol-project/node_modules/webdriver-manager/.circleci/config.yml deleted file mode 100644 index a8efa3be..00000000 --- a/test-eol-project/node_modules/webdriver-manager/.circleci/config.yml +++ /dev/null @@ -1,24 +0,0 @@ -var_1: &docker_image circleci/node:8-browsers - -anchor_1: &job_defaults - working_directory: ~/workspace - docker: - - image: *docker_image - -version: 2 -jobs: - build_and_test: - <<: *job_defaults - steps: - - checkout - - run: node --version - - run: npm --version - - run: npm install - - run: npm run format-enforce - - run: npm run test-unit - -workflows: - version: 2 - default_workflow: - jobs: - - build_and_test \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/CHANGELOG.md b/test-eol-project/node_modules/webdriver-manager/CHANGELOG.md deleted file mode 100644 index 7424e028..00000000 --- a/test-eol-project/node_modules/webdriver-manager/CHANGELOG.md +++ /dev/null @@ -1,670 +0,0 @@ -# 12.1.9 - -Updates `adm-zip` to version `0.5.2`. - -# 12.1.8 - -Fixes for macOS ChromeDriver download. If you are using a macOS and are -running into a `WebDriver.createSession` error, run -`webdriver-manager clean` to remove the downloaded ChromeDriver -before running `webdriver-manager update`. - -- ([4f5f736](https://github.com/angular/webdriver-manager/commit/4f5f7369790c9ae604b8b51a08b645a89cc4c7b7)) - fix(chromedriver): get most recent version on x64 windows if multiple major versions exist (#473) - -- ([17db8a2](https://github.com/angular/webdriver-manager/commit/17db8a2ad5401ab68c7a400f419760edd9c3e9e3)) - fix(binaries): filter m1 mac chromedriver versions (#478) - -# 12.1.7 - -Updates to Chromedriver to the LATEST_RELEASE. This should work from here on in when Chrome is updated to a new version. - -- [64795b7](https://github.com/angular/webdriver-manager/commit/64795b753b3d00ad2d1f4ac98c531f9e147f3b3e) chore(chrome) get latest chromedriver from LATEST_RELEASE (#418) - - - changed the get latest chromedriver to use the URL getting the latest first, then downloading that specific version. - - removed unused imports. - -# 12.1.6 - -Update the max Chrome version to 76. - -# 12.1.5 - -Update the max Chrome version to 75. - -# 12.1.4 - -Fixes issues introduced by 12.1.3 (--versions.chrome flag and status command did not work). Also prevents downloading version 75 using the config.json file. - -## Bug Fix - -- ([0a6ce24](https://github.com/angular/webdriver-manager/commit/0a6ce24e73ae06319bcafa472e22a2fe99d139e1)) - fix(chromedriver): version fixes for update, status, and start (#380) - - - Set the max versioning set in config.json. This will need to be updated on -every release of chromedriver. This will "fix" chrome and chromedriver -mismatches until Chrome 75 comes out. When it does there will have to be -an update for this again. Possible future work would allow a user -to set this via flag. Example --maxVersions.chrome "74." - - Create a generic way to get a valid version for Chromedriver. If -presented with 2.x, change this to 2.x.0. If presented with a 74.x.x.x, -chop off the last set of numbers and change this to 74.x.x - - Fixes the status command during a semver check. - - Fixes the update and start command when starting a specific version of -chromedriver - -# 12.1.3 - -Fixes download issues for chromedriver version 74+. - -## Bug Fix - -- ([476c117](https://github.com/angular/webdriver-manager/commit/476c117ac10539634d1c8f8973aa94012ed017a4)) - fix(chromedriver): support downloads for chromedriver beyond 2.46 (#377) - - Versions of Chromdriver were versioned as 2.xx. We previously used to -tack on a '.0' at the end to make it a semver version. This is why it -was not downloading 74.0.3729.6. We now have to change 74.0.3729.6 to be -a semver. We will do this by grabbing 74.0.3729 with a regex. - - This should work when downloading the latest chromedriver version since -2.46.0 < 74.0.3729. If Chromedriver releases 75 but we are still on -Chrome 74, this will still break in this version of webdriver-manager. -This does not prevent latest Chromedriver and latest Chrome mismatches. -If you run into an issue where Chromedriver is mismatched with Chrome, -use the `--versions.chrome` flag to pass in the version to download. - -# 12.1.2 - -Fixes download issues for the selenium jar file. - -## Bug Fix - -- ([7dc17ef](https://github.com/angular/webdriver-manager/commit/7dc17ef36e93f71bc63475612e343ffb84efec0f)) - fix(selenium): download jar files and not zip files (#371) - - This fix is here because selenium now has .zip files in the .xml. This worked previously since - there were no .zip files and it would find a version that matched the latest jar file. - - Also do not download alpha versions since we are also not downloading beta versions of the jar - file. - - closes #370 - - -# 12.1.1 - -## Bug Fix - -- ([f17b226](https://github.com/angular/webdriver-manager/commit/f17b226342173e59b4d2fac54632185c26ca7086)) - Fix(types): Operator '==' cannot be applied to types 'string | string[]' and 'number' (#297) - - - build-enforced style changes - - add package-lock.json - -- ([7dbc1df](https://github.com/angular/webdriver-manager/commit/7dbc1dfbccc60c8836e7c1d390fd5562e0af5b9d)) - fix(clean): remove existing chrome meta files from update on clean command (#279) - - - change file name from chromedriver-response.xml to chrome-response.xml -- ([0a4c065](https://github.com/angular/webdriver-manager/commit/0a4c0658b0725154cba07ad6e7125c1dd504fa3d)) - fix(appium): change appiumPort to seleniumPort for selenium server request (#228) - -## Dependencies - -- ([6775421](https://github.com/angular/webdriver-manager/commit/6775421ea9e40db1bf547bcedcb716ba35106a80)) - deps(package): update npm audit. - - - Updates to vulnerable to zipslip. - - Update all dependencies with `npm audit fix --force`. - - closes #314 - -- ([a80ccd2](https://github.com/angular/webdriver-manager/commit/a80ccd22d494e10e8c3c6ef9af22abf38496cb14)) - deps(appium): bump up the appium version (#258) - - -# 12.0.6 - -## Bug Fix - -- ([708ade3](https://github.com/angular/webdriver-manager/commit/708ade31564ab5a48fbfcff80c37370fdc4f659a)) - fix(responses): response xml and json files (#247) - -# 12.0.5 - -## Bug Fix - -- ([242a72f](https://github.com/angular/webdriver-manager/commit/242a72ffc93037d651c9805e09b4fb30318d9f05)) - feat(start): start selenium without making web requests (#232) - -# 12.0.4 - -## Bug Fixes -- ([52d8a23](https://github.com/angular/webdriver-manager/commit/52d8a23f2d5d5021d1d9d302c492bf78a233a79d)) - fix(ignoressl): pass option to both binary and config source - - closes #207. - -- ([5af1c1c](https://github.com/angular/webdriver-manager/commit/5af1c1cdfb2d718004b02e9c0325ea6e758e78f1)) - fix(cache): change timestamp to 1 hour instead of 10 hours (#223) - - closes #221 - -# 12.0.3 - -## Bug Fixes - -- ([bb13882](https://github.com/angular/webdriver-manager/commit/bb13882f1d111fc0c16032be33a7b8dc7b1a797c)) - feat(gecko): Improve error message when Github api limit reached. (#217) - - the user. Also, API limit is reached, the error message now directly informs - when any other failure occurs the status code is reported. - This should hopefully give more info for issue #216. -- ([2cffd30](https://github.com/angular/webdriver-manager/commit/2cffd30d9ef87c5b53433f2aa73eda92b4251a76)) - fix(ignoressl): pass proxy and ignore ssl down to the binary and config source (#208) - - closes #207 and closes #221 - -# 12.0.2 - -- ([0bdf6a4](https://github.com/angular/webdriver-manager/commit/0bdf6a465ae2a4b106bb5ff948718ef4ae3f31ad)) - deps(typescript): use typescript@~2.0.0. fix any types (#203) - -# 12.0.1 - -- ([6209666](https://github.com/angular/webdriver-manager/commit/620966611f48504619a594b582060ba04a61b3a7)) - fix(gecko): add additional check for OS when getting latest (#200) - -# 12.0.0 - -### Changes to update - -This release gets the latest release for selenium standalone, chromedriver, -iedriver, and gecko driver by downloading and parsing either a json or xml file. -These json or xml files are cached in the selenium directory. This means for -users that provide an alternative cdn will also be required to provide the proper -xml or json server response to find these binaries. - -Since we are always downloading the latest, the `config.json` versions will no -longer be a place to override these. - -### Changes to start - -If a new release is out and you have old binaries, running `webdriver-manager -start` without specifying any versions should throw an error. The error will -tell the user that the binary is not present. - -### Changes to status - -Since we are downloading the latest and not maintaining a default version in -`config.json`, we are dropping the default tag. - -## Features - -- ([fe309ef](https://github.com/angular/webdriver-manager/commit/fe309ef0d85081592662164d4a24d79b0f2ed5cf)) - feat(latest): get the latest version from the cdn (#198) - - This reads the xml from the CDN to get the latest chromedriver, iedriver, - or standalone version if the version is 'latest'. If the release is from - Github, use the Github API to get the releases. Also store the downloaded - information to a cache in the output directory (default: selenium/). If - the file is older than one hour it will be rewritten. - - When getting the status, we are no longer showing the default version. - Default versions will be deprecated and will be removed from the config.json - file. - - When starting the standalone server, use the 'latest' version by default - unless specified by --versions.{binary} flag. - - Change the gulp update task to use 3.0.0-beta4 so Firefox tests will pass. - -# 11.1.1 - -## Bug Fixes - -- ([70614a2](https://github.com/angular/webdriver-manager/commit/70614a23e289088c852f5c0162a947488ffc77e0)) - fix(ie): Use 32-bit version by default for IEDriver (#181) - - closes #180 -- ([6f9a2ab](https://github.com/angular/webdriver-manager/commit/6f9a2abbf7d16f35e342f963543706ff3e1c45a1)) - fix(gecko): Respect versions.gecko in start command. (#184) - - Also bump the geckodriver version to latest. - -## Dependencies - -- ([5881c5b](https://github.com/angular/webdriver-manager/commit/5881c5bb49f330abd7804e2605df46901e87bf2a)) - deps(update): update devDependencies (#187) - - -# 11.1.0 - -- Update to set the default chrome driver version to 2.26 - -## Features - -- ([72e3d9f](https://github.com/angular/webdriver-manager/commit/72e3d9f341f1d0ba190036a72938e727d83840c7)) - feat(status): show the last downloaded version when using status (#177) - - - added a test to run update, then checks status for labels - - closes #172 - -## Bug Fixes - -- ([a3b46c7](https://github.com/angular/webdriver-manager/commit/a3b46c7a2ae59357b00fe5ce81d36964d6b0d45c)) - fix(iedriver): if downloading x64, use x64 version on start command (#173) - - - clang formatting - - closes #147 - -# 10.3 - -- Minor version update so users still on ES5/selenium 2.x can access appium/mobile fixes - See https://github.com/angular/webdriver-manager/commits/10.3.0 for details - - -# 11.0.0 - -## Breaking Change: - -- Requires node 6 since node 6 is in long term support. See (node LTS Schedule)[https://github.com/nodejs/LTS#lts-schedule]. - -## Features -- ([b5638ef](https://github.com/angular/webdriver-manager/commit/b5638ef0861843e1d42220af515adc3e03a2b65a)) - feat(update): on update, write full binary paths to file (#140) - - - Adding back in curl calls, these were removed on the new - `Downloader.getFile`. Add curl call to reflect proxies. - - - Fix output dir to read from update's options instead of Config - - - Feature will help directConnect users for Protractor. The file - will keep track of the last binary version as well as all other - binaries downloaded. - - The file will be created in the output directory. By default this is - `selenium/update-config.json`. On `clean` this file will be removed. - - ``` - webdriver-manager update --versions.chrome=2.20 --standalone=false - --gecko=false - ``` - - file created: - ``` - { - "chrome": { - "last": "/opt/src/webdriver-manager/selenium/chromedriver_2.20", - "all": ["/opt/src/webdriver-manager/selenium/chromedriver_2.20"] - } - } - ``` - - then the user wants to use 2.25: - - ``` - webdriver-manager update --versions.chrome=2.25 --standalone=false - --gecko=false - - ``` - - file created: - ``` - { - "chrome": { - "last": "/opt/src/webdriver-manager/selenium/chromedriver_2.25", - "all": ["/opt/src/webdriver-manager/selenium/chromedriver_2.20", - "/opt/src/webdriver-manager/selenium/chromedriver_2.25"] - } - } - ``` - -- ([473ab3e](https://github.com/angular/webdriver-manager/commit/473ab3e40c44468bb79e2a23d7b12753cf6e2b4d)) - feat(android): match android arch to os.arch (#164) - - The default was x86-64, but x86 cannot be emulated on ARM. This makes more sense -- ([c864c9a](https://github.com/angular/webdriver-manager/commit/c864c9af35514a4b5bf8a1d82b4339b39e5ac574)) - feat(shutdown): do not error if you try to shutdown a server which is already off (#162) - - When scripting, you might want to defensively run a `shutdown` command. If the shutdown fails - because the server is already off, you don't care. If it fails for another reason, you do care. - So I made trying to shutdown a server which is already off just a warning. I added a flag in case - you want the old behavior though. - -- ([338fffd](https://github.com/angular/webdriver-manager/commit/338fffddf68ac2767aa5c226ba5374451b9e5308)) - feat(quiet/verbose): add `--quiet` and `--verbose` flags to control the level of output (#156) - - I added the `--quiet` flag for cases like: - where currently the start --detach; ./tests.sh; webdriver-manager shutdown` - selenium server output will get mixed in with other output. - I also added the `--verbose` flag for `webdriver-manager update` in case you *really* wanted to - see all the output which gets eaten by using `--android-accept-licenses`. - -- ([91e36a3](https://github.com/angular/webdriver-manager/commit/91e36a3e56e712af2c104eafc45eeeba5997ad6a)) - feat(android on windows): Support android VMs on windows (#154) - - Closes https://github.com/angular/webdriver-manager/issues/51 - -- ([d533b03](https://github.com/angular/webdriver-manager/commit/d533b0389ac8a43b815890a644fdb9aa403ec769)) - feat(start android): extend the --detach flag to wait for appium/android (#141) - -## Bug fixes - -- ([26586f1](https://github.com/angular/webdriver-manager/commit/26586f1b341e02229d73d40827a9c1af2197ebb3)) - fix(start): wait for emulated android to really be ready before signaling (#161) - - Before, we were just waiting for the emulator to be running, rather than waiting for the OS to be - booted up and ready to instance chrome. - While I was doing that I moved some stuff into `lib/utils.ts` since I felt like too much of - `lib/cmds/start.ts` was being devoted to this one feature. - Also closes https://github.com/angular/webdriver-manager/issues/166 -- ([a7c6eb5](https://github.com/angular/webdriver-manager/commit/a7c6eb5d3d1caed2afea1ef896753d53f4ea14ed)) - fix(update/android): 2a1505f broke android -- ([3ee3e1a](https://github.com/angular/webdriver-manager/commit/3ee3e1a328087cb8c5bf869e00a325cfdeb80f6d)) - fix(fs): path.join does not handle absolute paths as desired (#152) -- ([deead0f](https://github.com/angular/webdriver-manager/commit/deead0fc55ecd00b282aedc234592181746a307c)) - fix(downloader): destroy the request after receiving the header (#144) - - Otherwise we’ll won’t terminate until the whole file was downloaded, even though we don’t need it. -- ([c16bf90](https://github.com/angular/webdriver-manager/commit/c16bf9053fc90e4b5e89ab867c514d0622ab0716)) - chore(es6): allow to use es6 promises (#160) - - - with node 6 on LTS, we can update the tsconfig to es6 - - update travis tests to use node 6 and 7 - -# 10.2.10 - -- Since 10.2.9 produced breaking changes, released as version 11.0.0 -- Version 10.2.8 is the same as 10.2.10 due to [issue #170](https://github.com/angular/webdriver-manager/issues/170). - -# 10.2.8 - -## Features - -- ([1f9713a](https://github.com/angular/webdriver-manager/commit/1f9713aff1e7d44de900ed3c74abac532d3e25ff)) - feat(start and shutdown): Added `--detach` option for `start` command and new `shutdown` command - (#130) - -- ([88cf46b](https://github.com/angular/webdriver-manager/commit/88cf46b715250559ba8a726370a83c5c2f4daed1)) - feat(version): have a way to get the package version (#136) - - closes #119 - -## Bug fixes -- ([5966b6a](https://github.com/angular/webdriver-manager/commit/5966b6ac7329878e9e16f5b1b88261c5b7f7e438)) - fix(cli): fix setting flag to false (#135) - - - This fixes `webdriver-manager update --gecko=false` - - This does not fix `webdriver-manager update --gecko=0`. Minimist interprets 0 as true. - - Add options and programs unit tests - closes #110 - -- ([35676ee](https://github.com/angular/webdriver-manager/commit/35676ee70c816d43f045fa33d02e41bf502a3a14)) - fix(gecko): follow redirects for content-length (#133) - -# 10.2.7 - -## Features - -- ([66776a0](https://github.com/angular/webdriver-manager/commit/66776a0edc97e0b2718f2fdf4eeb2c2c8b40df73)) - feat(start): add way to programmatically detect when the selenium server is running (#120) - -## Bug fixes - -- ([dc2f9f9](https://github.com/angular/webdriver-manager/commit/dc2f9f99ebd9675b02addf06732a4d8d348046bc)) - fix(cli): fix default option values, boolean and string handling (#110) (#122) - - - default option values initialize properly for `minimist` - - user-supplied boolean-type option values respected - - string-type option values are always strings - - simplify boolean-type option value access - -- ([88d6105](https://github.com/angular/webdriver-manager/commit/88d6105f538f075968c152935131bf19bf289532)) - fix(gecko): Update geckodriver to 0.11.0 and fix suffixes. (#128) - - Fixes #111 - -- ([707e015](https://github.com/angular/webdriver-manager/commit/707e015737ee3ca4b26b6d89979251f8d8c2d11d)) - fix(android): fixed four things for android: (#116) - - - Make appium default to 1.6.0 (Android N didn't work on 1.5.x) - - Make virtual devices default to `google_apis` - - Don't delete old virtual devices on update - - Update documentation - -- ([9fe4b22](https://github.com/angular/webdriver-manager/commit/9fe4b226d58fbbce2e9cf49df58f45dee7f13cf2)) - fix typo in webdriver-manager/spec/files (#125) - -# 10.2.6 - -## Features - -- ([f892ec4](https://github.com/angular/webdriver-manager/commit/f892ec41c09c210527998c966a69edc081cf418e)) - chore(chromedriver): update chromedriver version to 2.25 - -# 10.2.5 - -## Bug Fixes - -- ([b103850](https://github.com/angular/webdriver-manager/commit/b1038500466fe790cc8e3c2ff82dc3c7eb3796ba)) - fix(update): fix undefined gecko getBoolean error (#113) - - closes #107 -- ([7fbacf5](https://github.com/angular/webdriver-manager/commit/7fbacf5bc902dd3ccd1c9fbf285c8ca9a1e48ee3)) - fix(start): set the port when standalone server starts - - closes #106 - -# 10.2.4 - -## Bug Fixes - -- ([3984ea4](https://github.com/angular/webdriver-manager/commit/3984ea4e5cfd2edf0401a5e5310aecaaecb63555)) - fix(filemanager): respect proxy/ignoreSSL options in contentLength HEAD request (#101) - - -- ([946ee00](https://github.com/angular/webdriver-manager/commit/946ee005f7d316fd2d404c4bdbeae9a3802051af)) - fix(chrome_driver): use the x64 binary if chrome driver version is greater than 2.23 (#95) - - * fix(chrome_driver): use the x64 binary if chrome driver version is greater than 2.23 - * fix(chrome_driver): add semver to better determine version number - * refactor(chrome_driver): check first to see if we have valid semver or not - - closes #93 -- ([b183fad](https://github.com/angular/webdriver-manager/commit/b183fadd4ae0b47b0773d6979d090c74419ee327)) - fix(filemanager): Binaries can be downloaded from a custom CDN with alternate_cdn(#97) - - closes #96 - -## Features - -- ([5241fc1](https://github.com/angular/webdriver-manager/commit/5241fc14eaf2b5cdf4b35362f260f6973cea0b1e)) - chore(chromedriver): update chromedriver version to 2.24 (#92) - - Chromedriver < 2.24 has issues with Chrome 54+ - (https://bugs.chromium.org/p/chromedriver/issues/detail?id=1451). - -- ([61af7be](https://github.com/angular/webdriver-manager/commit/61af7be4edbaf070bdcc35dc85f11fb46ab9577e)) - feat(gecko): Add geckodriver, related config, and flags - - Users will still need 'marionette': true in their capabilities in order to use gecko driver. - -# 10.2.3 - -## Bug Fixes - -- ([fa48354](https://github.com/angular/webdriver-manager/commit/fa4835453385d4c79fcbba7bb6d408557c870bae)) - fix(downloader): fix against working proxy (#87) - -- ([d6597e8](https://github.com/angular/webdriver-manager/commit/d6597e8a06004888371cca12b8e803c7d44eaf8d)) - fix(start): add the correct flags for windows (#83) - - closes #68 -- ([c96090c](https://github.com/angular/webdriver-manager/commit/c96090c0f7cc24209b34f9634699e68669650070)) - fix(update): download standalone with proxy and ignore ssl (#81) - - closes #79 - -## Features - -- ([7ec082a](https://github.com/angular/webdriver-manager/commit/7ec082a1bcc7f262237a616ec96592c36c28b89a)) - feat(start): add a gecko driver path to the start command (#86) - -## Dependencies - -- ([fe85c94](https://github.com/angular/webdriver-manager/commit/fe85c94e8db0680be25461cd3ea1ef59fc4d8fa4)) - dep(types): update typescript, remove typings in favor of @types (#84) - -# 10.2.2 - -## Bug Fixes - -- ([236a8ec](https://github.com/angular/webdriver-manager/commit/236a8ec901133cb21247fc452d7ef7c9d5fed172)) - fix(downloader): increase timeouts and unlink sync on download errors (#75) - - closes #62 and #63 -- ([fa20ca8](https://github.com/angular/webdriver-manager/commit/fa20ca82e191b122ed49b144b8ebc53ee3b92a9d)) - fix(start): check if edge driver exists before adding to args (#73) - - closes #60 -- ([8b61b71](https://github.com/angular/webdriver-manager/commit/8b61b71410dbca6e205fbc599b954fe61a8ee937)) - fix(start): use ie32 if specified via command line (#72) - - closes #68 - -## Features - -- ([8346858](https://github.com/angular/webdriver-manager/commit/83468588fc21f7584b76a8c55afe659db045a4c9)) - feat(logging): add logging property to selenium standalone (#76) - - closes #61 -- ([18f9f1d](https://github.com/angular/webdriver-manager/commit/18f9f1dfea02cd8f5c5a2cd5f09130f0ca24f68a)) - chore(selenium): add dev/urandom to selenium start args to prevent startup delays in linux - - -# 10.2.1 - -upgrade to latest chrome driver and selenium standalone server versions - -# 10.2.0 - -- ([aa1b8b7](https://github.com/angular/webdriver-manager/commit/aa1b8b7cd9295f02b9bf69274e21eef1a7f3b7f0)) - feat(ios): iOS support (#57) - -# 10.1.0 - -## Bug Fixes - -- ([81c2aa3](https://github.com/angular/webdriver-manager/commit/81c2aa3ea6435934797b4d10c6734945484a641d)) - fix(iedriver): download url fix for iedriver (#54) - - closes #53 - -## Features - -- ([57372eb](https://github.com/angular/webdriver-manager/commit/57372ebd076f6b1ccaf41d920601e867b7b3084c)) - feat(edge): add Microsoft Edge support in CLI (#56) - - closes #55 -- ([d937245](https://github.com/angular/webdriver-manager/commit/d9372459c51a1aec553a79edaa32e497608a65de)) - feat(android): support android - -# 10.0.4 - -## Dependency Upgrades - -- ([970167a](https://github.com/angular/webdriver-manager/commit/970167a1b2db24fc8ca34db2994507ef0187ee7e)) - dep(typings): update typings (#42) - -## Bug Fixes - -- ([5073e23](https://github.com/angular/webdriver-manager/commit/5073e230574237047dd593a702f08f84907871bd)) - fix(folder): fix selenium folder location (#43) - -# 10.0.3 - -## Bug Fixes - -- ([d3724fb](https://github.com/angular/webdriver-manager/commit/d3724fbd9f6b0ceb481538f7f8f0088c8b004959)) - fix(config): simplify locating configuration file, selenium folder (#41) - - * Let the bin file decide which webdriver-manager to use - * Use the configuration file / package from the default position - * Selenium folder will always be located to webdriver-manager/selenium/ - -# 10.0.2 - -## Bug Fixes - -- ([5bca026](https://github.com/angular/webdriver-manager/commit/5bca0266118dcabf2e2782820e5c9095f6d16ed4)) - fix(config): configuration file local look up when used as a dependency (#33) - - closes #32 -- ([0cfcc88](https://github.com/angular/webdriver-manager/commit/0cfcc88f1383c400f72ea5e49f9600ff652f8214)) - fix(binary): Fix typo in fallback case when chalk isn't available. - - -# 10.0.1 - -## Bug Fixes - -- ([a6f1edd](https://github.com/angular/webdriver-manager/commit/a6f1edd782251c96d35e79a3bb78b70c2b137aa9)) - fix(global): fix finding config.json for global installs and release 10.0.1 (#23) - -# 10.0.0 - - -## Bug Fixes - -- ([70d32df](https://github.com/angular/webdriver-manager/commit/70d32df659f19510c25e97ea9a42c7f93813d448)) - fix(dir): check selenium dir and warn user that the folder does not exist (#17) - -- ([0ec1443](https://github.com/angular/webdriver-manager/commit/0ec14435379161259435edc7c766388941f1a846)) - fix(binary): file type, unzipping, and permissions - - closes #7, #16 - -- ([a073fd0](https://github.com/angular/webdriver-manager/commit/a073fd0e9d0290e52ac3a808643b069c71b196c3)) - fix(npm): use global, local, and project without env - - closes #20 - - -- ([6ccb9d8](https://github.com/angular/webdriver-manager/commit/6ccb9d8b9ac6daf79388c44e6d53f1d3d71fd3f8)) - fix(versions): versions option should stay consistent with existing webdriver-manager - - closes #6 - -- ([c34b05c](https://github.com/angular/webdriver-manager/commit/c34b05cc66849708a2fc515bc455a6a661c867d6)) - fix(bin): local, project, and global usage - -- ([4a0caf5](https://github.com/angular/webdriver-manager/commit/4a0caf5a69cacda01df87d4b4cc35092e519d267)) - fix(dep): fix dependency for chalk - -- ([15ae0e8](https://github.com/angular/webdriver-manager/commit/15ae0e815270c8af2441002492e3165edd3140df)) - fix(chmod): set permissions to 755 - -([1820fbc](https://github.com/angular/webdriver-manager/commit/1820fbc46ddc45b70911fb1678f1d99247ec7028)) - Initial commit - -## Features - -- ([374c3e7](https://github.com/angular/webdriver-manager/commit/374c3e719fce18a2f0a1b751b19bffb7d266cc69)) - feat(length): on update, check to see the file is the correct length - - closes #8 -- ([8c47291](https://github.com/angular/webdriver-manager/commit/8c472918ac73390890bbc39fcc4c7a2e86d3b262)) - feat(local): use the local version of webdriver-tool if it is installed - - closes #5 - -- ([f0622d2](https://github.com/angular/webdriver-manager/commit/f0622d2e173b68e4afcd409f9c0356c8a1c2652a)) - feat(logs): add chrome logs command line option - - - closes #11 -- ([3b30312](https://github.com/angular/webdriver-manager/commit/3b303129040b17292028452f13c73d62736f1216)) - feat(logger): update logging methods (#5) diff --git a/test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md b/test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md deleted file mode 100644 index d50963ad..00000000 --- a/test-eol-project/node_modules/webdriver-manager/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -Contributing -============ - -Questions ---------- - -Please ask support questions on [StackOverflow](http://stackoverflow.com/questions/tagged/webdriver-manager) or [Gitter](https://gitter.im/angular/webdriver-manager). - -Any questions posted to webdriver-manager's Github Issues will be closed with this note: - -Please direct general support questions like this one to an appropriate support channel, see https://github.com/angular/webdriver-manager/blob/master/CONTRIBUTING.md#questions. Thank you! - -Issues -====== - -If you have a bug or feature request, please file an issue. When submitting an issue, please include a reproducible case that we can actually run. - -Please format code and markup in your issue using [github markdown](https://help.github.com/articles/github-flavored-markdown). - - -Contributing to Source Code (Pull Requests) -=========================================== - -Loosely, follow the [Angular contribution rules](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md). - - * If your PR changes any behavior or fixes an issue, it should have an associated test. - * New features should be general and as simple as possible. - * Breaking changes should be avoided if possible. - * All pull requests require review. No PR will be submitted without a comment from a team member stating LGTM (Looks good to me). - -Webdriver-manager specific rules -------------------------- - - * JavaScript style should generally follow the [Google JS style guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml). - * Wrap code at 100 chars. - * Document public methods with jsdoc. - * Be consistent with the code around you! - -Commit Messages ---------------- - -Please write meaningful commit messages - they are used to generate the changelog, so the commit message should tell a user everything they need to know about a commit. Webdriver-manager follows AngularJS's [commit message format](https://docs.google.com/a/google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.z8a3t6ehl060). - -In summary, this style is - - (): - - - -Where `` is one of [feat, fix, docs, refactor, test, chore, deps] and -`` is a quick descriptor of the location of the change, such as cli, clientSideScripts, element. - -Testing your changes --------------------- - -Test your changes on your machine by running `npm test` to run the test suite. - -When you submit a PR, tests will also be run on the Continuous Integration environment -through Travis. If your tests fail on Travis, take a look at the logs - if the failures -are known flakes in Internet Explorer or Safari you can ignore them, but otherwise -Travis should pass. diff --git a/test-eol-project/node_modules/webdriver-manager/LICENSE b/test-eol-project/node_modules/webdriver-manager/LICENSE deleted file mode 100644 index 1556807c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2016-2017 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/test-eol-project/node_modules/webdriver-manager/README.md b/test-eol-project/node_modules/webdriver-manager/README.md deleted file mode 100644 index 8fa91dad..00000000 --- a/test-eol-project/node_modules/webdriver-manager/README.md +++ /dev/null @@ -1,76 +0,0 @@ - -Webdriver Manager [![CircleCI Status](https://circleci.com/gh/angular/webdriver-manager.svg?style=shield)](https://circleci.com/gh/angular/webdriver-manager) [![Join the chat at https://gitter.im/angular/webdriver-manager](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular/webdriver-manager?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -================= - -A selenium server and browser driver manager for your end to end tests. This is the same tool as `webdriver-manager` from the [Protractor](https://github.com/angular/protractor) repository. - -**Note:** Version 9 and lower please reference [pose/webdriver-manager](https://github.com/pose/webdriver-manager). If there are features that existed in version 9 and lower, please open up an issue with the missing feature or a create a pull request. - -Getting Started ---------------- - -``` -npm install -g webdriver-manager -``` - -Setting up a Selenium Server ----------------------------- - -Prior to starting the selenium server, download the selenium server jar and driver binaries. By default it will download the selenium server jar and chromedriver binary. - -``` -webdriver-manager update -``` - -Starting the Selenium Server ----------------------------- - -By default, the selenium server will run on `http://localhost:4444/wd/hub`. - - -``` -webdriver-manager start -``` - -Other useful commands ---------------------- - -View different versions of server and driver files: - -``` -webdriver-manager status -``` - -Clear out the server and driver files. If `webdriver-manager start` does not work, try to clear out the saved files. - -``` -webdriver-manager clean -``` - -Running / stopping server in background process (stopping is not yet supported on standalone server 3.x.x): - -``` -webdriver-manager start --detach -webdriver-manager shutdown -``` - -Help commands -------------- - -Wedriver-manager has a main help option: `webdriver-manager help`. There are also other built in help menus for each of the commands. So for example, if you would like to look up all the flag options you can set in `update`, you could run `webdriver-manager update help`. - -Here are a list of all the commands with help: - -``` -webdriver-manager update help -webdriver-manager start help -webdriver-manager clean help -webdriver-manager status help -``` - -Other topics: --------------- - -- [mobile browser support](docs/mobile.md) -- [protractor support](docs/protractor.md) -- [set specific versions](docs/versions.md) \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/config.json b/test-eol-project/node_modules/webdriver-manager/built/config.json deleted file mode 100644 index cc7625a6..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/config.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "webdriverVersions": { - "selenium": "2.53.1", - "chromedriver": "2.27", - "maxChromedriver": "77", - "geckodriver": "v0.13.0", - "iedriver": "2.53.1", - "androidsdk": "24.4.1", - "appium": "1.6.5" - }, - "cdnUrls": { - "selenium": "https://selenium-release.storage.googleapis.com/", - "chromedriver": "https://chromedriver.storage.googleapis.com/", - "geckodriver": "https://github.com/mozilla/geckodriver/releases/download/", - "iedriver": "https://selenium-release.storage.googleapis.com/", - "androidsdk": "http://dl.google.com/android/" - } -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts deleted file mode 100644 index 4c071af8..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Binary, BinaryUrl, OS } from './binary'; -/** - * The android sdk binary. - */ -export declare class AndroidSDK extends Binary { - static os: OS[]; - static id: string; - static versionDefault: string; - static isDefault: boolean; - static DEFAULT_API_LEVELS: string; - static DEFAULT_ARCHITECTURES: string; - static DEFAULT_PLATFORMS: string; - static VERSIONS: { - [api_level: number]: string; - }; - constructor(alternateCDN?: string); - id(): string; - prefix(): string; - suffix(): string; - getUrl(): Promise; - getVersionList(): Promise; - url(ostype: string): string; - zipContentName(): string; - executableSuffix(): string; - remove(sdkPath: string): void; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js deleted file mode 100644 index 67d53084..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const path = require("path"); -const rimraf = require("rimraf"); -const config_1 = require("../config"); -const utils_1 = require("../utils"); -const binary_1 = require("./binary"); -function getAndroidArch() { - switch (config_1.Config.osArch()) { - case 'arm': - return 'armeabi-v7a'; - case 'arm64': - return 'arm64-v8a'; - case 'x86': - case 'x32': - case 'ia32': - case 'ppc': - return 'x86'; - case 'x86-64': - case 'x64': - case 'ia64': - case 'ppc64': - return 'x86_64'; - default: - return config_1.Config.osArch(); - } -} -/** - * The android sdk binary. - */ -class AndroidSDK extends binary_1.Binary { - constructor(alternateCDN) { - super(alternateCDN || config_1.Config.cdnUrls().android); - this.name = 'android-sdk'; - this.versionCustom = AndroidSDK.versionDefault; - } - id() { - return AndroidSDK.id; - } - prefix() { - return 'android-sdk_r'; - } - suffix() { - if (this.ostype === 'Darwin') { - return '-macosx.zip'; - } - else if (this.ostype === 'Linux') { - return '-linux.tgz'; - } - else if (this.ostype === 'Windows_NT') { - return '-windows.zip'; - } - } - getUrl() { - return Promise.resolve({ url: this.cdn + this.filename(), version: this.versionCustom }); - } - getVersionList() { - return null; - } - url(ostype) { - return this.cdn + this.filename(); - } - zipContentName() { - if (this.ostype === 'Darwin') { - return this.name + '-macosx'; - } - else if (this.ostype === 'Linux') { - return this.name + '-linux'; - } - else if (this.ostype === 'Windows_NT') { - return this.name + '-windows'; - } - } - executableSuffix() { - return ''; - } - remove(sdkPath) { - try { - let avds = require(path.resolve(sdkPath, 'available_avds.json')); - let version = path.basename(sdkPath).slice(this.prefix().length); - avds.forEach((avd) => { - utils_1.spawnSync(path.resolve(sdkPath, 'tools', 'android'), ['delete', 'avd', '-n', avd + '-v' + version + '-wd-manager']); - }); - } - catch (e) { - } - rimraf.sync(sdkPath); - } -} -AndroidSDK.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; -AndroidSDK.id = 'android'; -AndroidSDK.versionDefault = config_1.Config.binaryVersions().android; -AndroidSDK.isDefault = false; -AndroidSDK.DEFAULT_API_LEVELS = '24'; -AndroidSDK.DEFAULT_ARCHITECTURES = getAndroidArch(); -AndroidSDK.DEFAULT_PLATFORMS = 'google_apis'; -AndroidSDK.VERSIONS = { - // Before 24 is not supported - 24: '7.0', - 25: '7.1' -}; -exports.AndroidSDK = AndroidSDK; -//# sourceMappingURL=android_sdk.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map deleted file mode 100644 index 8fb43623..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/android_sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"android_sdk.js","sourceRoot":"","sources":["../../../lib/binaries/android_sdk.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,iCAAiC;AAEjC,sCAAiC;AACjC,oCAAmC;AAEnC,qCAA+C;AAE/C;IACE,MAAM,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACxB,KAAK,KAAK;YACR,MAAM,CAAC,aAAa,CAAC;QACvB,KAAK,OAAO;YACV,MAAM,CAAC,WAAW,CAAC;QACrB,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,CAAC;QACX,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,MAAM,CAAC,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC;QACd,KAAK,KAAK,CAAC;QACX,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,MAAM,CAAC,QAAQ,CAAC;QAClB;YACE,MAAM,CAAC,eAAM,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC;AAED;;GAEG;AACH,gBAAwB,SAAQ,eAAM;IAcpC,YAAY,YAAqB;QAC/B,KAAK,CAAC,YAAY,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC;QAEhD,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,cAAc,CAAC;IACjD,CAAC;IAED,EAAE;QACA,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB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ries/appium.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts deleted file mode 100644 index 53a3fc8e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Binary, BinaryUrl, OS } from './binary'; -/** - * The appium binary. - */ -export declare class Appium extends Binary { - static os: OS[]; - static id: string; - static versionDefault: string; - static isDefault: boolean; - constructor(alternateCDN?: string); - id(): string; - prefix(): string; - suffix(): string; - executableSuffix(): string; - getUrl(version?: string): Promise; - getVersionList(): Promise; - remove(sdkPath: string): void; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js deleted file mode 100644 index fbf5b8ee..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const rimraf = require("rimraf"); -const config_1 = require("../config"); -const binary_1 = require("./binary"); -/** - * The appium binary. - */ -class Appium extends binary_1.Binary { - constructor(alternateCDN) { - super(alternateCDN || config_1.Config.cdnUrls().appium); - this.name = 'appium'; - this.versionCustom = Appium.versionDefault; - } - id() { - return Appium.id; - } - prefix() { - return 'appium-'; - } - suffix() { - return ''; - } - executableSuffix() { - return ''; - } - getUrl(version) { - return Promise.resolve({ url: '', version: this.versionCustom }); - } - getVersionList() { - return null; - } - remove(sdkPath) { - rimraf.sync(sdkPath); - } -} -Appium.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; -Appium.id = 'appium'; -Appium.versionDefault = config_1.Config.binaryVersions().appium; -Appium.isDefault = false; -exports.Appium = Appium; -//# sourceMappingURL=appium.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map deleted file mode 100644 index ef091e3f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/appium.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"appium.js","sourceRoot":"","sources":["../../../lib/binaries/appium.ts"],"names":[],"mappings":";;AACA,iCAAiC;AAEjC,sCAAiC;AAEjC,qCAA+C;AAG/C;;GAEG;AACH,YAAoB,SAAQ,eAAM;IAMhC,YAAY,YAAqB;QAC/B,KAAK,CAAC,YAAY,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC;IAC7C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,SAAS,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAED,gBAAgB;QACd,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,OAAgB;QACrB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAC,CAAC,CAAC;IACjE,CAAC;IAED,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;;AArCM,SAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,SAAE,GAAG,QAAQ,CAAC;AACd,qBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC;AAChD,gBAAS,GAAG,KAAK,CAAC;AAJ3B,wBAuCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts deleted file mode 100644 index dfa0c767..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { ConfigSource } from './config_source'; -/** - * operating system enum - */ -export declare enum OS { - Windows_NT = 0, - Linux = 1, - Darwin = 2, -} -export interface BinaryUrl { - url: string; - version: string; -} -/** - * Dictionary to map the binary's id to the binary object - */ -export interface BinaryMap { - [id: string]: T; -} -export declare abstract class Binary { - static os: OS[]; - configSource: ConfigSource; - ostype: string; - osarch: string; - alternativeDownloadUrl: string; - cdn: string; - name: string; - versionDefault: string; - versionCustom: string; - constructor(opt_alternativeCdn?: string); - abstract prefix(): string; - abstract suffix(): string; - executableSuffix(): string; - version(): string; - filename(): string; - /** - * @param ostype The operating system. - * @returns The file name for the executable. - */ - executableFilename(): string; - /** - * Gets the id of the binary. - */ - abstract id(): string; - /** - * Gets the url to download the file set by the version. This will use the XML if available. - * If not, it will download from an existing url. - * - * @param {string} version The version we are looking for. This could also be 'latest'. - */ - getUrl(version?: string): Promise; - /** - * Gets the list of available versions available based on the xml. If no XML exists, return an - * empty list. - */ - abstract getVersionList(): Promise; - /** - * Delete an instance of this binary from the file system - */ - remove(filename: string): void; - /** - * @param ostype The operating system. - * @returns The file name for the file inside the downloaded zip file - */ - zipContentName(): string; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js deleted file mode 100644 index c695eb89..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const config_1 = require("../config"); -/** - * operating system enum - */ -var OS; -(function (OS) { - OS[OS["Windows_NT"] = 0] = "Windows_NT"; - OS[OS["Linux"] = 1] = "Linux"; - OS[OS["Darwin"] = 2] = "Darwin"; -})(OS = exports.OS || (exports.OS = {})); -class Binary { - constructor(opt_alternativeCdn) { - this.ostype = config_1.Config.osType(); - this.osarch = config_1.Config.osArch(); - this.cdn = opt_alternativeCdn; - } - executableSuffix() { - if (this.ostype == 'Windows_NT') { - return '.exe'; - } - else { - return ''; - } - } - version() { - return this.versionCustom; - } - filename() { - return this.prefix() + this.version() + this.suffix(); - } - /** - * @param ostype The operating system. - * @returns The file name for the executable. - */ - executableFilename() { - return this.prefix() + this.version() + this.executableSuffix(); - } - /** - * Gets the url to download the file set by the version. This will use the XML if available. - * If not, it will download from an existing url. - * - * @param {string} version The version we are looking for. This could also be 'latest'. - */ - getUrl(version) { - if (this.alternativeDownloadUrl != null) { - return Promise.resolve({ url: '', version: '' }); - } - else { - return this.getVersionList().then(() => { - version = version || config_1.Config.binaryVersions()[this.id()]; - return this.configSource.getUrl(version).then(binaryUrl => { - this.versionCustom = binaryUrl.version; - return { url: binaryUrl.url, version: binaryUrl.version }; - }); - }); - } - } - /** - * Delete an instance of this binary from the file system - */ - remove(filename) { - fs.unlinkSync(filename); - } - /** - * @param ostype The operating system. - * @returns The file name for the file inside the downloaded zip file - */ - zipContentName() { - return this.name + this.executableSuffix(); - } -} -exports.Binary = Binary; -//# sourceMappingURL=binary.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map deleted file mode 100644 index 29016f9b..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/binary.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../../lib/binaries/binary.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,sCAAiC;AAGjC;;GAEG;AACH,IAAY,EAIX;AAJD,WAAY,EAAE;IACZ,uCAAU,CAAA;IACV,6BAAK,CAAA;IACL,+BAAM,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CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS;oBACrD,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC;oBACvC,MAAM,CAAC,EAAC,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAC,CAAC;gBAC1D,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAQD;;OAEG;IACH,MAAM,CAAC,QAAgB;QACrB,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC7C,CAAC;CACF;AA/FD,wBA+FC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts deleted file mode 100644 index cfaa85fb..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Binary, OS } from './binary'; -export declare class ChromeDriver extends Binary { - static id: string; - static isDefault: boolean; - static os: OS[]; - static versionDefault: string; - constructor(opt_alternativeCdn?: string); - id(): string; - prefix(): string; - suffix(): string; - getVersionList(): Promise; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js deleted file mode 100644 index d23b1c15..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_1 = require("../config"); -const binary_1 = require("./binary"); -const chrome_xml_1 = require("./chrome_xml"); -class ChromeDriver extends binary_1.Binary { - constructor(opt_alternativeCdn) { - super(opt_alternativeCdn || config_1.Config.cdnUrls().chrome); - this.configSource = new chrome_xml_1.ChromeXml(); - this.name = 'chromedriver'; - this.versionDefault = ChromeDriver.versionDefault; - this.versionCustom = this.versionDefault; - } - id() { - return ChromeDriver.id; - } - prefix() { - return 'chromedriver_'; - } - suffix() { - return '.zip'; - } - getVersionList() { - // If an alternative cdn is set, return an empty list. - if (this.alternativeDownloadUrl != null) { - Promise.resolve([]); - } - else { - return this.configSource.getVersionList(); - } - } -} -ChromeDriver.id = 'chrome'; -ChromeDriver.isDefault = true; -ChromeDriver.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; -ChromeDriver.versionDefault = config_1.Config.binaryVersions().chrome; -exports.ChromeDriver = ChromeDriver; -//# sourceMappingURL=chrome_driver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map deleted file mode 100644 index f15bb0cd..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_driver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chrome_driver.js","sourceRoot":"","sources":["../../../lib/binaries/chrome_driver.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAC/C,6CAAuC;AAEvC,kBAA0B,SAAQ,eAAM;IAMtC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAS,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;QAClD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,eAAe,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,sDAAsD;QACtD,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtB,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AAhCM,eAAE,GAAG,QAAQ,CAAC;AACd,sBAAS,GAAG,IAAI,CAAC;AACjB,eAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,2BAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC;AAJzD,oCAkCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts deleted file mode 100644 index 547d36aa..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { BinaryUrl } from './binary'; -import { XmlConfigSource } from './config_source'; -export declare class ChromeXml extends XmlConfigSource { - maxVersion: string; - constructor(); - getUrl(version: string): Promise; - /** - * Get a list of chrome drivers paths available for the configuration OS type and architecture. - */ - getVersionList(): Promise; - /** - * Helper method, gets the ostype and gets the name used by the XML - */ - getOsTypeName(): string; - /** - * Gets the latest item from the XML. - */ - private getLatestChromeDriverVersion(); - /** - * Gets a specific item from the XML. - */ - private getSpecificChromeDriverVersion(inputVersion); -} -/** - * Chromedriver is the only binary that does not conform to semantic versioning - * and either has too little number of digits or too many. To get this to be in - * semver, we will either add a '.0' at the end or chop off the last set of - * digits. This is so we can compare to find the latest and greatest. - * - * Example: - * 2.46 -> 2.46.0 - * 75.0.3770.8 -> 75.0.3770 - * - * @param version - */ -export declare function getValidSemver(version: string): string; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js deleted file mode 100644 index 6dfbea56..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js +++ /dev/null @@ -1,156 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const semver = require("semver"); -const config_1 = require("../config"); -const http_utils_1 = require("../http_utils"); -const config_source_1 = require("./config_source"); -class ChromeXml extends config_source_1.XmlConfigSource { - constructor() { - super('chrome', config_1.Config.cdnUrls()['chrome']); - this.maxVersion = config_1.Config.binaryVersions().maxChrome; - } - getUrl(version) { - if (version === 'latest') { - return this.getLatestChromeDriverVersion(); - } - else { - return this.getSpecificChromeDriverVersion(version); - } - } - /** - * Get a list of chrome drivers paths available for the configuration OS type and architecture. - */ - getVersionList() { - return this.getXml().then(xml => { - let versionPaths = []; - let osType = this.getOsTypeName(); - for (let content of xml.ListBucketResult.Contents) { - let contentKey = content.Key[0]; - if ( - // Filter for 32-bit devices, make sure x64 is not an option - (this.osarch.includes('64') || !contentKey.includes('64')) && - // Filter for x86 macs, make sure m1 is not an option - ((this.ostype === 'Darwin' && this.osarch === 'arm64') || !contentKey.includes('m1'))) { - // Filter for only the osType - if (contentKey.includes(osType)) { - versionPaths.push(contentKey); - } - } - } - return versionPaths; - }); - } - /** - * Helper method, gets the ostype and gets the name used by the XML - */ - getOsTypeName() { - // Get the os type name. - if (this.ostype === 'Darwin') { - return 'mac'; - } - else if (this.ostype === 'Windows_NT') { - return 'win'; - } - else { - return 'linux'; - } - } - /** - * Gets the latest item from the XML. - */ - getLatestChromeDriverVersion() { - const latestReleaseUrl = 'https://chromedriver.storage.googleapis.com/LATEST_RELEASE'; - return http_utils_1.requestBody(latestReleaseUrl).then(latestVersion => { - return this.getSpecificChromeDriverVersion(latestVersion); - }); - } - /** - * Gets a specific item from the XML. - */ - getSpecificChromeDriverVersion(inputVersion) { - return this.getVersionList().then(list => { - const specificVersion = getValidSemver(inputVersion); - if (specificVersion === '') { - throw new Error(`version ${inputVersion} ChromeDriver does not exist`); - } - let itemFound = ''; - for (let item of list) { - // Get a semantic version. - let version = item.split('/')[0]; - if (semver.valid(version) == null) { - const lookUpVersion = getValidSemver(version); - if (semver.valid(lookUpVersion)) { - // Check to see if the specified version matches. - if (lookUpVersion === specificVersion) { - // When item found is null, check the os arch - // 64-bit version works OR not 64-bit version and the path does not have '64' - if (itemFound == '') { - if (this.osarch === 'x64' || - (this.osarch !== 'x64' && !item.includes(this.getOsTypeName() + '64'))) { - itemFound = item; - } - if (this.osarch === 'arm64' && this.ostype === 'Darwin' && item.includes('m1')) { - itemFound = item; - } - } - else if (this.osarch === 'x64') { - // No win64 version exists, so even on x64 we need to look for win32 - const osTypeNameAndArch = this.getOsTypeName() + (this.getOsTypeName() === 'win' ? '32' : '64'); - if (item.includes(osTypeNameAndArch)) { - itemFound = item; - } - } - } - } - } - } - if (itemFound == '') { - return { url: '', version: inputVersion }; - } - else { - return { url: config_1.Config.cdnUrls().chrome + itemFound, version: inputVersion }; - } - }); - } -} -exports.ChromeXml = ChromeXml; -/** - * Chromedriver is the only binary that does not conform to semantic versioning - * and either has too little number of digits or too many. To get this to be in - * semver, we will either add a '.0' at the end or chop off the last set of - * digits. This is so we can compare to find the latest and greatest. - * - * Example: - * 2.46 -> 2.46.0 - * 75.0.3770.8 -> 75.0.3770 - * - * @param version - */ -function getValidSemver(version) { - let lookUpVersion = ''; - // This supports downloading 2.46 - try { - const oldRegex = /(\d+.\d+)/g; - const exec = oldRegex.exec(version); - if (exec) { - lookUpVersion = exec[1] + '.0'; - } - } - catch (_) { - // no-op: is this is not valid, do not throw here. - } - // This supports downloading 74.0.3729.6 - try { - const newRegex = /(\d+.\d+.\d+).\d+/g; - const exec = newRegex.exec(version); - if (exec) { - lookUpVersion = exec[1]; - } - } - catch (_) { - // no-op: if this does not work, use the other regex pattern. - } - return lookUpVersion; -} -exports.getValidSemver = getValidSemver; -//# sourceMappingURL=chrome_xml.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map deleted file mode 100644 index ed3a210b..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/chrome_xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chrome_xml.js","sourceRoot":"","sources":["../../../lib/binaries/chrome_xml.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,sCAAiC;AACjC,8CAA0C;AAG1C,mDAAgD;AAEhD,eAAuB,SAAQ,+BAAe;IAG5C;QACE,KAAK,CAAC,QAAQ,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;QAH9C,eAAU,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,SAAS,CAAC;IAI/C,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC;QAC7C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG;YAC3B,IAAI,YAAY,GAAa,EAAE,CAAC;YAChC,IAAI,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAElC,GAAG,CAAC,CAAC,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AC,IAAI,CAAC,CAAC,CAAC;YACT,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QACjC,CAAC;IACH,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,kDAAkD;IACpD,CAAC;IACD,wCAAwC;IACxC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,oBAAoB,CAAC;QACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACT,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,6DAA6D;IAC/D,CAAC;IACD,MAAM,CAAC,aAAa,CAAC;AACvB,CAAC;AAvBD,wCAuBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts deleted file mode 100644 index e74fa403..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export declare abstract class ConfigSource { - ostype: string; - osarch: string; - out_dir: string; - abstract getUrl(version: string): Promise<{ - url: string; - version: string; - }>; - abstract getVersionList(): Promise; -} -export declare abstract class XmlConfigSource extends ConfigSource { - name: string; - xmlUrl: string; - constructor(name: string, xmlUrl: string); - protected getFileName(): string; - protected getXml(): Promise; - private readResponse(); - private requestXml(); - private convertXml2js(xml); -} -export declare abstract class JsonConfigSource extends ConfigSource { - name: string; - jsonUrl: string; - constructor(name: string, jsonUrl: string); - protected getFileName(): string; - protected abstract getJson(): Promise; -} -export declare abstract class GithubApiConfigSource extends JsonConfigSource { - constructor(name: string, url: string); - /** - * This is an unauthenticated request and since Github limits the rate, we will cache this - * to a file. { timestamp: number, response: response }. We will check the timestamp and renew - * this request if the file is older than an hour. - */ - getJson(): Promise; - private requestJson(); - private readResponse(); -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js deleted file mode 100644 index 251d4898..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js +++ /dev/null @@ -1,209 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const path = require("path"); -const request = require("request"); -const url = require("url"); -const xml2js = require("xml2js"); -const logger_1 = require("../cli/logger"); -const config_1 = require("../config"); -const http_utils_1 = require("../http_utils"); -let logger = new logger_1.Logger('config_source'); -class ConfigSource { - constructor() { - this.ostype = config_1.Config.osType(); - this.osarch = config_1.Config.osArch(); - this.out_dir = config_1.Config.getSeleniumDir(); - } -} -exports.ConfigSource = ConfigSource; -class XmlConfigSource extends ConfigSource { - constructor(name, xmlUrl) { - super(); - this.name = name; - this.xmlUrl = xmlUrl; - } - getFileName() { - try { - fs.statSync(this.out_dir); - } - catch (e) { - fs.mkdirSync(this.out_dir); - } - return path.resolve(this.out_dir, this.name + '-response.xml'); - } - getXml() { - let fileName = this.getFileName(); - let content = this.readResponse(); - if (content) { - return Promise.resolve(content); - } - else { - return this.requestXml().then(text => { - let xml = this.convertXml2js(text); - fs.writeFileSync(fileName, text); - return xml; - }); - } - } - readResponse() { - let fileName = this.getFileName(); - try { - let contents = fs.readFileSync(fileName).toString(); - let timestamp = new Date(fs.statSync(fileName).mtime).getTime(); - let size = fs.statSync(fileName).size; - let now = Date.now(); - // On start, read the file. If not on start, check use the cache as long as the - // size > 0 and within the cache time. - // 60 minutes * 60 seconds / minute * 1000 ms / second - if (config_1.Config.runCommand === 'start' || (size > 0 && (now - (60 * 60 * 1000) < timestamp))) { - return this.convertXml2js(contents); - } - else { - return null; - } - } - catch (err) { - return null; - } - } - requestXml() { - return new Promise((resolve, reject) => { - let options = http_utils_1.HttpUtils.initOptions(this.xmlUrl); - let curl = this.getFileName() + ' ' + options.url; - if (http_utils_1.HttpUtils.requestOpts.proxy) { - let pathUrl = url.parse(options.url.toString()).path; - let host = url.parse(options.url.toString()).host; - let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); - curl = this.getFileName() + ' \'' + newFileUrl + '\' -H \'host:' + host + '\''; - } - if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { - curl = 'k ' + curl; - } - logger.info('curl -o' + curl); - let req = request(options); - req.on('response', response => { - if (response.statusCode === 200) { - let output = ''; - response.on('data', (data) => { - output += data; - }); - response.on('end', () => { - resolve(output); - }); - } - else { - reject(new Error('response status code is not 200')); - } - }); - }); - } - convertXml2js(xml) { - let retResult = null; - xml2js.parseString(xml, (err, result) => { - retResult = result; - }); - return retResult; - } -} -exports.XmlConfigSource = XmlConfigSource; -class JsonConfigSource extends ConfigSource { - constructor(name, jsonUrl) { - super(); - this.name = name; - this.jsonUrl = jsonUrl; - } - getFileName() { - try { - fs.statSync(this.out_dir); - } - catch (e) { - fs.mkdirSync(this.out_dir); - } - return path.resolve(this.out_dir, this.name + '-response.json'); - } -} -exports.JsonConfigSource = JsonConfigSource; -class GithubApiConfigSource extends JsonConfigSource { - constructor(name, url) { - super(name, url); - } - /** - * This is an unauthenticated request and since Github limits the rate, we will cache this - * to a file. { timestamp: number, response: response }. We will check the timestamp and renew - * this request if the file is older than an hour. - */ - getJson() { - let fileName = this.getFileName(); - let content = this.readResponse(); - if (content) { - return Promise.resolve(JSON.parse(content)); - } - else { - return this.requestJson().then(body => { - let json = JSON.parse(body); - fs.writeFileSync(fileName, JSON.stringify(json, null, ' ')); - return json; - }); - } - } - requestJson() { - return new Promise((resolve, reject) => { - let options = http_utils_1.HttpUtils.initOptions(this.jsonUrl); - options = http_utils_1.HttpUtils.optionsHeader(options, 'Host', 'api.github.com'); - options = http_utils_1.HttpUtils.optionsHeader(options, 'User-Agent', 'request'); - let curl = this.getFileName() + ' ' + options.url; - if (http_utils_1.HttpUtils.requestOpts.proxy) { - let pathUrl = url.parse(options.url.toString()).path; - let host = url.parse(options.url.toString()).host; - let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); - curl = this.getFileName() + ' \'' + newFileUrl + '\' -H \'host:' + host + '\''; - } - if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { - curl = 'k ' + curl; - } - logger.info('curl -o' + curl); - let req = request(options); - req.on('response', response => { - if (response.statusCode === 200) { - let output = ''; - response.on('data', (data) => { - output += data; - }); - response.on('end', () => { - resolve(output); - }); - } - else if (response.statusCode == 403 && response.headers['x-ratelimit-remaining'] == '0') { - reject(new Error('Failed to make Github request, rate limit reached.')); - } - else { - reject(new Error('response status code is not 200. It was ' + response.statusCode)); - } - }); - }); - } - readResponse() { - let fileName = this.getFileName(); - try { - let contents = fs.readFileSync(fileName).toString(); - let timestamp = new Date(fs.statSync(fileName).mtime).getTime(); - let size = fs.statSync(fileName).size; - let now = Date.now(); - // On start, read the file. If not on start, check use the cache as long as the - // size > 0 and within the cache time. - // 60 minutes * 60 seconds / minute * 1000 ms / second - if (config_1.Config.runCommand === 'start' || (size > 0 && (now - (60 * 60 * 1000) < timestamp))) { - return contents; - } - else { - return null; - } - } - catch (err) { - return null; - } - } -} -exports.GithubApiConfigSource = GithubApiConfigSource; -//# sourceMappingURL=config_source.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map deleted file mode 100644 index 1149664e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/config_source.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config_source.js","sourceRoot":"","sources":["../../../lib/binaries/config_source.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AAEzB,6BAA6B;AAC7B,mCAAmC;AACnC,2BAA2B;AAC3B,iCAAiC;AAEjC,0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QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;YACpD,IAAI,SAAS,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;YAChE,IAAI,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;YACtC,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAErB,+EAA+E;YAC/E,sCAAsC;YACtC,sDAAsD;YACtD,EAAE,CAAC,CAAC,eAAM,CAAC,UAAU,KAAK,OAAO,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;gBACxF,MAAM,CAAC,QAAQ,CAAC;YAClB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACb,MAAM,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAlFD,sDAkFC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts deleted file mode 100644 index 837438dc..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Binary, OS } from './binary'; -export declare class GeckoDriver extends Binary { - static id: string; - static isDefault: boolean; - static os: OS[]; - static versionDefault: string; - private static suffixes; - constructor(opt_alternativeCdn?: string); - id(): string; - prefix(): string; - suffix(): string; - getVersionList(): Promise; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js deleted file mode 100644 index 7205a205..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_1 = require("../config"); -const binary_1 = require("./binary"); -const gecko_driver_github_1 = require("./gecko_driver_github"); -class GeckoDriver extends binary_1.Binary { - constructor(opt_alternativeCdn) { - super(opt_alternativeCdn || config_1.Config.cdnUrls().gecko); - this.configSource = new gecko_driver_github_1.GeckoDriverGithub(); - this.name = 'geckodriver'; - this.versionDefault = GeckoDriver.versionDefault; - this.versionCustom = this.versionDefault; - } - id() { - return GeckoDriver.id; - } - prefix() { - return 'geckodriver-'; - } - suffix() { - if (this.ostype === 'Windows_NT') { - return '.zip'; - } - else { - return '.tar.gz'; - } - } - getVersionList() { - if (this.alternativeDownloadUrl != null) { - return Promise.resolve([]); - } - else { - return this.configSource.getVersionList(); - } - } -} -GeckoDriver.id = 'gecko'; -GeckoDriver.isDefault = true; -GeckoDriver.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; -GeckoDriver.versionDefault = config_1.Config.binaryVersions().gecko; -GeckoDriver.suffixes = { - 'Darwin': { 'x64': '-macos.tar.gz' }, - 'Linux': { 'x64': '-linux64.tar.gz', 'ia32': '-linux32.tar.gz' }, - 'Windows_NT': { - 'x64': '-win64.zip', - 'ia32': '-win32.zip', - } -}; -exports.GeckoDriver = GeckoDriver; -//# sourceMappingURL=gecko_driver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map deleted file mode 100644 index de1c3723..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"g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eAAM,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC;AACvC,oBAAQ,GAAc;IACnC,QAAQ,EAAE,EAAC,KAAK,EAAE,eAAe,EAAC;IAClC,OAAO,EAAE,EAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAC;IAC9D,YAAY,EAAE;QACZ,KAAK,EAAE,YAAY;QACnB,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAZJ,kCA6CC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts deleted file mode 100644 index 6f5df47d..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BinaryUrl } from './binary'; -import { GithubApiConfigSource } from './config_source'; -export declare class GeckoDriverGithub extends GithubApiConfigSource { - constructor(); - getUrl(version: string): Promise; - getVersionList(): Promise; - getVersionsLookup(): Promise>; - private getLatestGeckoDriverVersion(); - private getSpecificGeckoDrierVersion(inputVersion); - private oshelper(); -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js deleted file mode 100644 index 8e45c751..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const semver = require("semver"); -const config_source_1 = require("./config_source"); -class GeckoDriverGithub extends config_source_1.GithubApiConfigSource { - constructor() { - super('gecko', 'https://api.github.com/repos/mozilla/geckodriver/releases'); - } - getUrl(version) { - if (version === 'latest') { - return this.getLatestGeckoDriverVersion(); - } - else { - return this.getSpecificGeckoDrierVersion(version); - } - } - getVersionList() { - return this.getJson().then(json => { - let versions = []; - for (let i = 0; i < json.length; i++) { - let item = json[i]; - versions.push(item.tag_name); - } - return versions; - }); - } - getVersionsLookup() { - return this.getJson().then(json => { - let versionsLookup = []; - for (let i = 0; i < json.length; i++) { - let item = json[i]; - let index = i.toString(); - versionsLookup.push({ version: item.tag_name, index: index }); - } - return versionsLookup; - }); - } - getLatestGeckoDriverVersion() { - return this.getJson().then(json => { - return this.getVersionsLookup().then(versionsLookup => { - let latest = ''; - for (let item of versionsLookup) { - let version = item.version.replace('v', ''); - let assetsArray = json[item.index].assets; - // check to make sure the version found has the OS - for (let asset of assetsArray) { - if (asset.name.includes(this.oshelper())) { - if (latest === '') { - latest = version; - } - else if (semver.lt(latest, version)) { - latest = version; - } - } - } - } - return this.getSpecificGeckoDrierVersion('v' + latest); - }); - }); - } - getSpecificGeckoDrierVersion(inputVersion) { - return this.getJson().then(json => { - return this.getVersionsLookup().then(versionsLookup => { - for (let item of versionsLookup) { - // Get the asset from the matching version. - if (item.version === inputVersion) { - let assetsArray = json[item.index].assets; - for (let asset of assetsArray) { - if (asset.name.includes(this.oshelper())) { - return { url: asset.browser_download_url, version: inputVersion }; - } - } - } - } - return null; - }); - }); - } - oshelper() { - // Get the os type name. - if (this.ostype === 'Darwin') { - return 'macos'; - } - else if (this.ostype === 'Windows_NT') { - return this.osarch === 'x64' ? 'win64' : 'win32'; - } - else { - return this.osarch === 'x64' ? 'linux64' : 'linux32'; - } - } -} -exports.GeckoDriverGithub = GeckoDriverGithub; -//# sourceMappingURL=gecko_driver_github.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map deleted file mode 100644 index 9c2d52ed..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/gecko_driver_github.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gecko_driver_github.js","sourceRoot":"","sources":["../../../lib/binaries/gecko_driver_github.ts"],"names":[],"mappings":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/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts deleted file mode 100644 index 874c5534..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Binary, OS } from './binary'; -export declare class IEDriver extends Binary { - static id: string; - static isDefault32: boolean; - static isDefault64: boolean; - static os: OS[]; - static versionDefault: string; - constructor(opt_alternativeCdn?: string); - id(): string; - prefix(): string; - suffix(): string; - getVersionList(): Promise; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js deleted file mode 100644 index fb45f7da..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_1 = require("../config"); -const binary_1 = require("./binary"); -const iedriver_xml_1 = require("./iedriver_xml"); -class IEDriver extends binary_1.Binary { - constructor(opt_alternativeCdn) { - super(opt_alternativeCdn || config_1.Config.cdnUrls().ie); - this.configSource = new iedriver_xml_1.IEDriverXml(); - this.name = 'IEDriverServer'; - this.versionDefault = IEDriver.versionDefault; - this.versionCustom = this.versionDefault; - } - id() { - return IEDriver.id; - } - prefix() { - return 'IEDriverServer'; - } - suffix() { - return '.zip'; - } - getVersionList() { - if (this.alternativeDownloadUrl != null) { - return Promise.resolve([]); - } - else { - return this.configSource.getVersionList(); - } - } -} -IEDriver.id = 'ie'; -IEDriver.isDefault32 = false; -IEDriver.isDefault64 = false; -IEDriver.os = [binary_1.OS.Windows_NT]; -IEDriver.versionDefault = config_1.Config.binaryVersions().ie; -exports.IEDriver = IEDriver; -//# sourceMappingURL=iedriver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map deleted file mode 100644 index aaaa9a73..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iedriver.js","sourceRoot":"","sources":["../../../lib/binaries/iedriver.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAC/C,iDAA2C;AAE3C,cAAsB,SAAQ,eAAM;IAOlC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,YAAY,GAAG,IAAI,0BAAW,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;QAC9C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,gBAAgB,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AAhCM,WAAE,GAAG,IAAI,CAAC;AACV,oBAAW,GAAG,KAAK,CAAC;AACpB,oBAAW,GAAG,KAAK,CAAC;AACpB,WAAE,GAAG,CAAC,WAAE,CAAC,UAAU,CAAC,CAAC;AACrB,uBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC;AALrD,4BAkCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts deleted file mode 100644 index 7ab30ed8..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BinaryUrl } from './binary'; -import { XmlConfigSource } from './config_source'; -export declare class IEDriverXml extends XmlConfigSource { - constructor(); - getUrl(version: string): Promise; - getVersionList(): Promise; - private getLatestIEDriverVersion(); - private getSpecificIEDriverVersion(inputVersion); -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js deleted file mode 100644 index e9c0dffb..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const semver = require("semver"); -const config_1 = require("../config"); -const config_source_1 = require("./config_source"); -class IEDriverXml extends config_source_1.XmlConfigSource { - constructor() { - super('iedriver', config_1.Config.cdnUrls()['ie']); - } - getUrl(version) { - if (version === 'latest') { - return this.getLatestIEDriverVersion(); - } - else { - return this.getSpecificIEDriverVersion(version); - } - } - getVersionList() { - return this.getXml().then(xml => { - let versionPaths = []; - for (let content of xml.ListBucketResult.Contents) { - let contentKey = content.Key[0]; - // Filter For IEDriverServer win 32. Removing option to download x64 - if (contentKey.includes('IEDriverServer_Win32_')) { - versionPaths.push(contentKey); - } - } - return versionPaths; - }); - } - getLatestIEDriverVersion() { - return this.getVersionList().then(list => { - let latestVersion = null; - let latest = ''; - for (let item of list) { - // Get a semantic version. - let version = item.split('IEDriverServer_Win32_')[1].replace('.zip', ''); - if (latestVersion == null) { - // First time: use the version found. - latestVersion = version; - latest = item; - } - else if (semver.gt(version, latestVersion)) { - // Get the latest. - latestVersion = version; - latest = item; - } - } - return { url: config_1.Config.cdnUrls().ie + latest, version: latestVersion }; - }); - } - getSpecificIEDriverVersion(inputVersion) { - return this.getVersionList().then(list => { - let itemFound = ''; - for (let item of list) { - // Get a semantic version. - let version = item.split('IEDriverServer_Win32_')[1].replace('.zip', ''); - // Check to see if the specified version matches. - let firstPath = item.split('/')[0]; - if (version === inputVersion) { - return { url: config_1.Config.cdnUrls().ie + item, version: version }; - } - } - return { url: '', version: inputVersion }; - }); - } -} -exports.IEDriverXml = IEDriverXml; -//# sourceMappingURL=iedriver_xml.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map deleted file mode 100644 index 678ec8cd..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/iedriver_xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iedriver_xml.js","sourceRoot":"","sources":["../../../lib/binaries/iedriver_xml.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,sCAAiC;AAGjC,mDAAgD;AAEhD,iBAAyB,SAAQ,+BAAe;IAC9C;QACE,KAAK,CAAC,UAAU,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QACzC,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG;YAC3B,IAAI,YAAY,GAAa,EAAE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AE,aAAa,EAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,0BAA0B,CAAC,YAAoB;QACrD,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,IAAI;YACpC,IAAI,SAAS,GAAG,EAAE,CAAC;YAEnB,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC;gBACtB,0BAA0B;gBAC1B,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAEzE,iDAAiD;gBACjD,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnC,EAAE,CAAC,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC;oBAC7B,MAAM,CAAC,EAAC,GAAG,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;YACD,MAAM,CAAC,EAAC,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApED,kCAoEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts deleted file mode 100644 index 70c3d9b8..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './android_sdk'; -export * from './appium'; -export * from './binary'; -export * from './chrome_driver'; -export * from './gecko_driver'; -export * from './iedriver'; -export * from './standalone'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js deleted file mode 100644 index d65b865e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./android_sdk")); -__export(require("./appium")); -__export(require("./binary")); -__export(require("./chrome_driver")); -__export(require("./gecko_driver")); -__export(require("./iedriver")); -__export(require("./standalone")); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map deleted file mode 100644 index a47d9b2a..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/binaries/index.ts"],"names":[],"mappings":";;;;;AAAA,mCAA8B;AAC9B,8BAAyB;AACzB,8BAAyB;AACzB,qCAAgC;AAChC,oCAA+B;AAC/B,gCAA2B;AAC3B,kCAA6B"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts deleted file mode 100644 index 470c0a58..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Binary, OS } from './binary'; -export declare class Standalone extends Binary { - static id: string; - static isDefault: boolean; - static os: OS[]; - static versionDefault: string; - constructor(opt_alternativeCdn?: string); - id(): string; - prefix(): string; - suffix(): string; - executableSuffix(): string; - getVersionList(): Promise; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js deleted file mode 100644 index b110a0c4..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const config_1 = require("../config"); -const binary_1 = require("./binary"); -const standalone_xml_1 = require("./standalone_xml"); -class Standalone extends binary_1.Binary { - constructor(opt_alternativeCdn) { - super(opt_alternativeCdn || config_1.Config.cdnUrls().selenium); - this.configSource = new standalone_xml_1.StandaloneXml(); - this.name = 'selenium standalone'; - this.versionDefault = Standalone.versionDefault; - this.versionCustom = this.versionDefault; - } - id() { - return Standalone.id; - } - prefix() { - return 'selenium-server-standalone-'; - } - suffix() { - return '.jar'; - } - executableSuffix() { - return '.jar'; - } - getVersionList() { - // If an alternative cdn is set, return an empty list. - if (this.alternativeDownloadUrl != null) { - return Promise.resolve([]); - } - else { - return this.configSource.getVersionList(); - } - } -} -Standalone.id = 'standalone'; -Standalone.isDefault = true; -Standalone.os = [binary_1.OS.Windows_NT, binary_1.OS.Linux, binary_1.OS.Darwin]; -Standalone.versionDefault = config_1.Config.binaryVersions().selenium; -exports.Standalone = Standalone; -//# sourceMappingURL=standalone.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map deleted file mode 100644 index d33fcc5d..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../../lib/binaries/standalone.ts"],"names":[],"mappings":";;AAAA,sCAAiC;AAEjC,qCAA+C;AAE/C,qDAA+C;AAE/C,gBAAwB,SAAQ,eAAM;IAMpC,YAAY,kBAA2B;QACrC,KAAK,CAAC,kBAAkB,IAAI,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,IAAI,8BAAa,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;QAChD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;IAC3C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,6BAA6B,CAAC;IACvC,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,gBAAgB;QACd,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,cAAc;QACZ,sDAAsD;QACtD,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;;AApCM,aAAE,GAAG,YAAY,CAAC;AAClB,oBAAS,GAAG,IAAI,CAAC;AACjB,aAAE,GAAG,CAAC,WAAE,CAAC,UAAU,EAAE,WAAE,CAAC,KAAK,EAAE,WAAE,CAAC,MAAM,CAAC,CAAC;AAC1C,yBAAc,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC;AAJ3D,gCAsCC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts deleted file mode 100644 index 65545d3f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BinaryUrl } from './binary'; -import { XmlConfigSource } from './config_source'; -export declare class StandaloneXml extends XmlConfigSource { - constructor(); - getUrl(version: string): Promise; - getVersionList(): Promise; - private getLatestStandaloneVersion(); - private getSpecificStandaloneVersion(inputVersion); -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js deleted file mode 100644 index 45c2c4bc..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const semver = require("semver"); -const config_1 = require("../config"); -const config_source_1 = require("./config_source"); -class StandaloneXml extends config_source_1.XmlConfigSource { - constructor() { - super('standalone', config_1.Config.cdnUrls()['selenium']); - } - getUrl(version) { - if (version === 'latest') { - return this.getLatestStandaloneVersion(); - } - else { - return this.getSpecificStandaloneVersion(version); - } - } - getVersionList() { - return this.getXml().then(xml => { - let versionPaths = []; - for (let content of xml.ListBucketResult.Contents) { - let contentKey = content.Key[0]; - // Filter the selenium-server-standalone. - if (contentKey.includes('selenium-server-standalone')) { - versionPaths.push(contentKey); - } - } - return versionPaths; - }); - } - getLatestStandaloneVersion() { - return this.getVersionList().then(list => { - let standaloneVersion = null; - let latest = ''; - let latestVersion = ''; - // Use jar files that are not beta and not alpha versions. - const jarList = list.filter((i) => { - return i.endsWith('.jar') && !i.includes('beta') && !i.includes('alpha'); - }); - for (let item of jarList) { - // Get a semantic version. - let version = item.split('selenium-server-standalone-')[1].replace('.jar', ''); - if (standaloneVersion == null) { - // First time: use the version found. - standaloneVersion = version; - latest = item; - latestVersion = version; - } - else if (semver.gt(version, standaloneVersion)) { - // Get the latest. - standaloneVersion = version; - latest = item; - latestVersion = version; - } - } - return { url: config_1.Config.cdnUrls().selenium + latest, version: latestVersion }; - }); - } - getSpecificStandaloneVersion(inputVersion) { - return this.getVersionList().then(list => { - let itemFound = ''; - let standaloneVersion = null; - for (let item of list) { - // Get a semantic version. - let version = item.split('selenium-server-standalone-')[1].replace('.jar', ''); - // Check to see if the specified version matches. - let firstPath = item.split('/')[0]; - if (version === inputVersion) { - // Check if the beta exists that we have the right version - // Example: We will see that beta3 appears in the file and path - // 3.0-beta3/selenium-server-standalone-3.0.0-beta3.jar - // where this should not work: - // 3.0-beta2/selenium-server-standalone-3.0.0-beta3.jar - if (inputVersion.includes('beta')) { - let betaInputVersion = inputVersion.replace('.jar', '').split('beta')[1]; - if (item.split('/')[0].includes('beta' + betaInputVersion)) { - return { url: config_1.Config.cdnUrls().selenium + item, version: version }; - } - } - else { - return { url: config_1.Config.cdnUrls().selenium + item, version: version }; - } - } - } - }); - } -} -exports.StandaloneXml = StandaloneXml; -//# sourceMappingURL=standalone_xml.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map deleted file mode 100644 index 4bb727ff..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/binaries/standalone_xml.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"standalone_xml.js","sourceRoot":"","sources":["../../../lib/binaries/standalone_xml.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,sCAAiC;AAGjC,mDAAgD;AAEhD,mBAA2B,SAAQ,+BAAe;IAChD;QACE,KAAK,CAAC,YAAY,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,OAAe;QACpB,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAC3C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG;YAC3B,IAAI,YAAY,GAAa,EAAE,CAAC;YAEhC,G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AAC,CAAC,CAAC,CAAC;wBACzE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;4BAC3D,MAAM,CAAC,EAAC,GAAG,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC;wBACnE,CAAC;oBACH,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,MAAM,CAAC,EAAC,GAAG,EAAE,eAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC;oBACnE,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAtFD,sCAsFC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts deleted file mode 100644 index e4e19e9c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Options } from './options'; -import { Program, Programs } from './programs'; -/** - * The Cli contains the usage and the collection of programs. - * - * Printing help for all the programs in the following order: - * usage, commands, and options. If the options are used in multiple programs, - * it will list it once. - */ -export declare class Cli { - programs: Programs; - usageText: string; - version: string; - /** - * Register a program to the command line interface. - * @returns The cli for method chaining. - */ - program(prog: Program): Cli; - /** - * Add a usage for the command line interface. - * @returns The cli for method chaining. - */ - usage(usageText: string): Cli; - /** - * Prints help for the programs registered to the cli. - */ - printHelp(): void; - /** - * For commands, gets the position where the description should start so they - * are aligned. - * @returns The position where the command description should start. - */ - posCmdDescription(): number; - /** - * For options, gets the position where the description should start so they - * are aligned. - * @returns The position where the option description should start. - */ - posDescription(): number; - /** - * For options, get the position where the default values should start so they - * are aligned. - * @returns The position where the option default values should start. - */ - posDefault(): number; - /** - * Go through all programs and add options to the collection. - * @returns The options used in the programs. - */ - getOptions(): Options; - /** - * Get the options used by the programs and create the minimist options - * to ensure that minimist parses the values properly. - * @returns The options for minimist. - */ - getMinimistOptions(): Object; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js deleted file mode 100644 index f68cede5..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * The Cli contains the usage and the collection of programs. - * - * Printing help for all the programs in the following order: - * usage, commands, and options. If the options are used in multiple programs, - * it will list it once. - */ -class Cli { - constructor() { - this.programs = {}; - } - /** - * Register a program to the command line interface. - * @returns The cli for method chaining. - */ - program(prog) { - this.programs[prog.cmd] = prog; - return this; - } - /** - * Add a usage for the command line interface. - * @returns The cli for method chaining. - */ - usage(usageText) { - this.usageText = usageText; - return this; - } - /** - * Prints help for the programs registered to the cli. - */ - printHelp() { - console.log('Usage: ' + this.usageText); - console.log('\nCommands:'); - let cmdDescriptionPos = this.posCmdDescription(); - for (let cmd in this.programs) { - let prog = this.programs[cmd]; - prog.printCmd(cmdDescriptionPos); - } - let descriptionPos = this.posDescription(); - let defaultPos = this.posDefault(); - let extOptions = {}; - console.log('\nOptions:'); - // print all options - for (let cmd in this.programs) { - let prog = this.programs[cmd]; - prog.printOptions(descriptionPos, defaultPos, extOptions); - } - } - /** - * For commands, gets the position where the description should start so they - * are aligned. - * @returns The position where the command description should start. - */ - posCmdDescription() { - let position = -1; - for (let cmd in this.programs) { - position = Math.max(position, cmd.length + 6); - } - return position; - } - /** - * For options, gets the position where the description should start so they - * are aligned. - * @returns The position where the option description should start. - */ - posDescription() { - let position = -1; - for (let cmd in this.programs) { - let prog = this.programs[cmd]; - position = Math.max(position, prog.posDescription()); - } - return position; - } - /** - * For options, get the position where the default values should start so they - * are aligned. - * @returns The position where the option default values should start. - */ - posDefault() { - let position = -1; - for (let cmd in this.programs) { - let prog = this.programs[cmd]; - position = Math.max(position, prog.posDefault()); - } - return position; - } - /** - * Go through all programs and add options to the collection. - * @returns The options used in the programs. - */ - getOptions() { - let allOptions = {}; - for (let cmd in this.programs) { - let prog = this.programs[cmd]; - allOptions = prog.getOptions_(allOptions); - } - return allOptions; - } - /** - * Get the options used by the programs and create the minimist options - * to ensure that minimist parses the values properly. - * @returns The options for minimist. - */ - getMinimistOptions() { - let allOptions = this.getOptions(); - let minimistOptions = {}; - let minimistBoolean = []; - let minimistString = []; - let minimistNumber = []; - let minimistDefault = {}; - for (let opt in allOptions) { - let option = allOptions[opt]; - if (option.type === 'boolean') { - minimistBoolean.push(option.opt); - } - else if (option.type === 'string') { - minimistString.push(option.opt); - } - else if (option.type === 'number') { - minimistNumber.push(option.opt); - } - if (typeof option.defaultValue !== 'undefined') { - minimistDefault[option.opt] = option.defaultValue; - } - } - minimistOptions['boolean'] = minimistBoolean; - minimistOptions['string'] = minimistString; - minimistOptions['number'] = minimistNumber; - minimistOptions['default'] = minimistDefault; - return minimistOptions; - } -} -exports.Cli = Cli; -//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map deleted file mode 100644 index d93df787..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/cli.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../lib/cli/cli.ts"],"names":[],"mappings":";;AAUA;;;;;;GAMG;AACH;IAAA;QACE,aAAQ,GAAa,EAAE,CAAC;IAiI1B,CAAC;IA7HC;;;OAGG;IACH,OAAO,CAAC,IAAa;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QAC/B,MAAM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/webdriver-manager/built/lib/cli/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts deleted file mode 100644 index 3b0816a3..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './cli'; -export * from './options'; -export * from './programs'; -export * from './logger'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js deleted file mode 100644 index 16c66275..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./cli")); -__export(require("./options")); -__export(require("./programs")); -__export(require("./logger")); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map deleted file mode 100644 index 69a8ff79..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/cli/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAAsB;AACtB,+BAA0B;AAC1B,gCAA2B;AAC3B,8BAAyB"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts deleted file mode 100644 index 6e028f3f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -export declare enum LogLevel { - ERROR = 0, - WARN = 1, - INFO = 2, - DEBUG = 3, -} -export declare enum WriteTo { - CONSOLE = 0, - FILE = 1, - BOTH = 2, - NONE = 3, -} -/** - * Logger class adds timestamp output, log levels, and identifiers to help - * when debugging. Also could write to console, file, both, or none. - */ -export declare class Logger { - private id; - static logLevel: LogLevel; - static showTimestamp: boolean; - static showId: boolean; - static writeTo: WriteTo; - static fd: any; - static firstWrite: boolean; - /** - * Set up the write location. If writing to a file, get the file descriptor. - * @param writeTo The enum for where to write the logs. - * @param opt_logFile An optional parameter to override the log file location. - */ - static setWrite(writeTo: WriteTo, opt_logFile?: string): void; - /** - * Creates a logger instance with an ID for the logger. - * @constructor - */ - constructor(id: string); - /** - * Log INFO - * @param ...msgs multiple arguments to be logged. - */ - info(...msgs: any[]): void; - /** - * Log DEBUG - * @param ...msgs multiple arguments to be logged. - */ - debug(...msgs: any[]): void; - /** - * Log WARN - * @param ...msgs multiple arguments to be logged. - */ - warn(...msgs: any[]): void; - /** - * Log ERROR - * @param ...msgs multiple arguments to be logged. - */ - error(...msgs: any[]): void; - /** - * For the log level set, check to see if the messages should be logged. - * @param logLevel The log level of the message. - * @param msgs The messages to be logged - */ - log_(logLevel: LogLevel, msgs: any[]): void; - /** - * Format with timestamp, log level, identifier, and message and log to - * specified medium (console, file, both, none). - * @param logLevel The log level of the message. - * @param msgs The messages to be logged. - */ - print_(logLevel: LogLevel, msgs: any[]): void; - /** - * Get a timestamp formatted with [hh:mm:ss] - * @param writeTo The enum for where to write the logs. - * @return The string of the formatted timestamp - */ - static timestamp_(writeTo: WriteTo): string; - /** - * Get the identifier of the logger as '/' - * @param logLevel The log level of the message. - * @param writeTo The enum for where to write the logs. - * @return The string of the formatted id - */ - static id_(logLevel: LogLevel, id: string, writeTo: WriteTo): string; - /** - * Get the log level formatted with the first letter. For info, it is I. - * @param logLevel The log level of the message. - * @param writeTo The enum for where to write the logs. - * @return The string of the formatted log level - */ - static level_(logLevel: LogLevel, id: string, writeTo: WriteTo): string; - /** - * Convert the list of messages to a single string message. - * @param msgs The list of messages. - * @return The string of the formatted messages - */ - static msgToFile_(msgs: any[]): string; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js deleted file mode 100644 index 4fec851b..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const path = require("path"); -// Will use chalk if chalk is available to add color to console logging -let chalk; -let printRed; -let printYellow; -let printGray; -try { - chalk = require('chalk'); - printRed = chalk.red; - printYellow = chalk.yellow; - printGray = chalk.gray; -} -catch (e) { - printRed = printYellow = printGray = (msg) => { - return msg; - }; -} -var LogLevel; -(function (LogLevel) { - LogLevel[LogLevel["ERROR"] = 0] = "ERROR"; - LogLevel[LogLevel["WARN"] = 1] = "WARN"; - LogLevel[LogLevel["INFO"] = 2] = "INFO"; - LogLevel[LogLevel["DEBUG"] = 3] = "DEBUG"; -})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); -var WriteTo; -(function (WriteTo) { - WriteTo[WriteTo["CONSOLE"] = 0] = "CONSOLE"; - WriteTo[WriteTo["FILE"] = 1] = "FILE"; - WriteTo[WriteTo["BOTH"] = 2] = "BOTH"; - WriteTo[WriteTo["NONE"] = 3] = "NONE"; -})(WriteTo = exports.WriteTo || (exports.WriteTo = {})); -let logFile = 'webdriver.log'; // the default log file name -/** - * Logger class adds timestamp output, log levels, and identifiers to help - * when debugging. Also could write to console, file, both, or none. - */ -class Logger { - /** - * Creates a logger instance with an ID for the logger. - * @constructor - */ - constructor(id) { - this.id = id; - } - /** - * Set up the write location. If writing to a file, get the file descriptor. - * @param writeTo The enum for where to write the logs. - * @param opt_logFile An optional parameter to override the log file location. - */ - static setWrite(writeTo, opt_logFile) { - if (opt_logFile) { - logFile = opt_logFile; - } - Logger.writeTo = writeTo; - if (Logger.writeTo == WriteTo.FILE || Logger.writeTo == WriteTo.BOTH) { - Logger.fd = fs.openSync(path.resolve(logFile), 'a'); - Logger.firstWrite = false; - } - } - /** - * Log INFO - * @param ...msgs multiple arguments to be logged. - */ - info(...msgs) { - this.log_(LogLevel.INFO, msgs); - } - /** - * Log DEBUG - * @param ...msgs multiple arguments to be logged. - */ - debug(...msgs) { - this.log_(LogLevel.DEBUG, msgs); - } - /** - * Log WARN - * @param ...msgs multiple arguments to be logged. - */ - warn(...msgs) { - this.log_(LogLevel.WARN, msgs); - } - /** - * Log ERROR - * @param ...msgs multiple arguments to be logged. - */ - error(...msgs) { - this.log_(LogLevel.ERROR, msgs); - } - /** - * For the log level set, check to see if the messages should be logged. - * @param logLevel The log level of the message. - * @param msgs The messages to be logged - */ - log_(logLevel, msgs) { - switch (Logger.logLevel) { - case LogLevel.ERROR: - if (logLevel <= LogLevel.ERROR) { - this.print_(logLevel, msgs); - } - break; - case LogLevel.WARN: - if (logLevel <= LogLevel.WARN) { - this.print_(logLevel, msgs); - } - break; - case LogLevel.INFO: - if (logLevel <= LogLevel.INFO) { - this.print_(logLevel, msgs); - } - break; - case LogLevel.DEBUG: - if (logLevel <= LogLevel.DEBUG) { - this.print_(logLevel, msgs); - } - break; - default: - throw new Error('Log level undefined'); - } - } - /** - * Format with timestamp, log level, identifier, and message and log to - * specified medium (console, file, both, none). - * @param logLevel The log level of the message. - * @param msgs The messages to be logged. - */ - print_(logLevel, msgs) { - let consoleLog = ''; - let fileLog = ''; - if (Logger.showTimestamp) { - consoleLog += Logger.timestamp_(WriteTo.CONSOLE); - fileLog += Logger.timestamp_(WriteTo.FILE); - } - consoleLog += Logger.level_(logLevel, this.id, WriteTo.CONSOLE); - fileLog += Logger.level_(logLevel, this.id, WriteTo.FILE); - if (Logger.showId) { - consoleLog += Logger.id_(logLevel, this.id, WriteTo.CONSOLE); - fileLog += Logger.id_(logLevel, this.id, WriteTo.FILE); - } - consoleLog += ' -'; - fileLog += ' - '; - switch (Logger.writeTo) { - case WriteTo.CONSOLE: - msgs.unshift(consoleLog); - console.log.apply(console, msgs); - break; - case WriteTo.FILE: - // for the first line written to the file, add a space - if (!Logger.firstWrite) { - fs.writeSync(Logger.fd, '\n'); - Logger.firstWrite = true; - } - fileLog += ' ' + Logger.msgToFile_(msgs); - fs.writeSync(Logger.fd, fileLog + '\n'); - break; - case WriteTo.BOTH: - // for the first line written to the file, add a space - if (!Logger.firstWrite) { - fs.writeSync(Logger.fd, '\n'); - Logger.firstWrite = true; - } - fileLog += ' ' + Logger.msgToFile_(msgs); - fs.writeSync(Logger.fd, fileLog + '\n'); - msgs.unshift(consoleLog); - console.log.apply(console, msgs); - break; - case WriteTo.NONE: - break; - } - } - /** - * Get a timestamp formatted with [hh:mm:ss] - * @param writeTo The enum for where to write the logs. - * @return The string of the formatted timestamp - */ - static timestamp_(writeTo) { - let d = new Date(); - let ts = '['; - let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours(); - let minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes(); - let seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(); - if (writeTo == WriteTo.CONSOLE) { - ts += printGray(hours + ':' + minutes + ':' + seconds) + ']'; - } - else { - ts += hours + ':' + minutes + ':' + seconds + ']'; - } - ts += ' '; - return ts; - } - /** - * Get the identifier of the logger as '/' - * @param logLevel The log level of the message. - * @param writeTo The enum for where to write the logs. - * @return The string of the formatted id - */ - static id_(logLevel, id, writeTo) { - let level = LogLevel[logLevel].toString(); - if (writeTo === WriteTo.FILE) { - return '/' + id; - } - else if (logLevel === LogLevel.ERROR) { - return printRed('/' + id); - } - else if (logLevel === LogLevel.WARN) { - return printYellow('/' + id); - } - else { - return '/' + id; - } - } - /** - * Get the log level formatted with the first letter. For info, it is I. - * @param logLevel The log level of the message. - * @param writeTo The enum for where to write the logs. - * @return The string of the formatted log level - */ - static level_(logLevel, id, writeTo) { - let level = LogLevel[logLevel].toString(); - if (writeTo === WriteTo.FILE) { - return level[0]; - } - else if (logLevel === LogLevel.ERROR) { - return printRed(level[0]); - } - else if (logLevel === LogLevel.WARN) { - return printYellow(level[0]); - } - else { - return level[0]; - } - } - /** - * Convert the list of messages to a single string message. - * @param msgs The list of messages. - * @return The string of the formatted messages - */ - static msgToFile_(msgs) { - let log = ''; - for (let pos = 0; pos < msgs.length; pos++) { - let msg = msgs[pos]; - let ret; - if (typeof msg === 'object') { - ret = JSON.stringify(msg); - } - else { - ret = msg; - } - if (pos !== msgs.length - 1) { - ret += ' '; - } - log += ret; - } - return log; - } -} -Logger.logLevel = LogLevel.INFO; -Logger.showTimestamp = true; -Logger.showId = true; -Logger.writeTo = WriteTo.CONSOLE; -Logger.firstWrite = false; -exports.Logger = Logger; -//# sourceMappingURL=logger.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map deleted file mode 100644 index 059e34a9..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/logger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../lib/cli/logger.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,uEAAuE;AACvE,IAAI,KAAU,CAAC;AACf,IAAI,QAAkB,CAAC;AACvB,IAAI,WAAqB,CAAC;AAC1B,IAAI,SAAmB,CAAC;AAExB,IAAI,CAAC;IACH,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC;IACrB,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3B,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;AACzB,CAAC;AAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACX,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,CAAC,GAAQ;QAC5C,MAAM,CAAC,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC;AAED,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,yCAAK,CAAA;IACL,uCAAI,CAAA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AAI,CAAC,CAAC;gBACN,GAAG,GAAG,GAAG,CAAC;YACZ,CAAC;YACD,EAAE,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC5B,GAAG,IAAI,GAAG,CAAC;YACb,CAAC;YACD,GAAG,IAAI,GAAG,CAAC;QACb,CAAC;QACD,MAAM,CAAC,GAAG,CAAC;IACb,CAAC;;AAjOM,eAAQ,GAAa,QAAQ,CAAC,IAAI,CAAC;AACnC,oBAAa,GAAY,IAAI,CAAC;AAC9B,aAAM,GAAY,IAAI,CAAC;AACvB,cAAO,GAAY,OAAO,CAAC,OAAO,CAAC;AAEnC,iBAAU,GAAY,KAAK,CAAC;AANrC,wBAmOC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts deleted file mode 100644 index 52c57eb8..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export interface MinimistArgs { - [opt: string]: string[]; -} -export interface Args { - [opt: string]: number | string | boolean; -} -export interface Options { - [opt: string]: Option; -} -export declare class Option { - opt: string; - description: string; - type: string; - defaultValue: number | string | boolean; - value: number | string | boolean; - constructor(opt: string, description: string, type: string, defaultValue?: number | string | boolean); - getValue_(): number | string | boolean; - getNumber(): number; - getString(): string; - getBoolean(): boolean; -} -export declare function unparseOptions(options: Options): string[]; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js deleted file mode 100644 index ad0ef13e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class Option { - constructor(opt, description, type, defaultValue) { - this.opt = opt; - this.description = description; - this.type = type; - if (defaultValue != null) { - this.defaultValue = defaultValue; - } - } - getValue_() { - if (typeof this.value !== 'undefined') { - return this.value; - } - else { - return this.defaultValue; - } - } - getNumber() { - let value = this.getValue_(); - if (value != null && (typeof value === 'number' || typeof value === 'string')) { - return +value; - } - else { - return null; - } - } - getString() { - let value = this.getValue_(); - if (value != null) { - return '' + this.getValue_(); - } - else { - return ''; - } - } - getBoolean() { - let value = this.getValue_(); - if (value != null) { - if (typeof value === 'string') { - return !(value === '0' || value === 'false'); - } - else if (typeof value === 'number') { - return value !== 0; - } - else { - return value; - } - } - return false; - } -} -exports.Option = Option; -function unparseOptions(options) { - var args = []; - for (let name in options) { - let value = options[name].getValue_(); - if (value !== options[name].defaultValue) { - args.push('--' + name, '' + value); - } - } - return args; -} -exports.unparseOptions = unparseOptions; -; -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map deleted file mode 100644 index 706fcef0..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../lib/cli/options.ts"],"names":[],"mappings":";;AAMA;IAOE,YACI,GAAW,EAAE,WAAmB,EAAE,IAAY,EAAE,YAAoC;QACtF,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC;YACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,CAAC;IACH,CAAC;IAED,SAAS;QACP,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;QAAC,IAAI,CA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DC;AAED,wBAA+B,OAAgB;IAC7C,IAAI,IAAI,GAAa,EAAE,CAAC;IACxB,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC;QACzB,IAAI,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;QACtC,EAAE,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IACD,MAAM,CAAC,IAAI,CAAC;AACd,CAAC;AATD,wCASC;AAAA,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts deleted file mode 100644 index e6e00687..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { MinimistArgs, Option, Options } from './options'; -/** - * Dictionary that maps the command and the program. - */ -export interface Programs { - [cmd: string]: Program; -} -/** - * A program has a command, a description, options, and a run method - */ -export declare class Program { - static MIN_SPACING: number; - cmd: string; - cmdDescription: string; - options: Options; - runMethod: Function; - helpDescription: string; - version: string; - /** - * Register a command and the description. - * @param cmd The command. - * @param cmdDescription The description of the command. - * @returns The program for method chaining. - */ - command(cmd: string, cmdDescription: string): Program; - /** - * Register a new option. - * @param opt The option. - * @param description The description of the option. - * @param type The type of value expected: boolean, number, or string - * @param defaultValue The option's default value. - * @returns The program for method chaining. - */ - option(opt: string, description: string, type: string, opt_defaultValue?: number | string | boolean): Program; - /** - * Adds an option to the program. - * @param option The option. - * @returns The program for method chaining. - */ - addOption(option: Option): Program; - /** - * Registers a method that will be used to run the program. - * @param runMethod The method that will be used to run the program. - * @returns The program for method chaining. - */ - action(runMethod: Function): Program; - /** - * Adds the value to the options and passes the updated options to the run - * method. - * @param args The arguments that will be parsed to run the method. - */ - run(json: JSON): Promise; - private getValue_(key, json); - /** - * Prints the command with the description. The description will have spaces - * between the cmd so that the starting position is "posDescription". If the - * gap between the cmd and the description is less than MIN_SPACING or - * posDescription is undefined, the spacing will be MIN_SPACING. - * - * @param opt_postDescription Starting position of the description. - */ - printCmd(opt_posDescription?: number): void; - /** - * Prints the options with the option descriptions and default values. - * The posDescription and posDefault is the starting position for the option - * description. If extOptions are provided, check to see if we have already - * printed those options. Also, once we print the option, add them to the extOptions. - * - * @param posDescription Position to start logging the description. - * @param posDefault Position to start logging the default value. - * @param opt_extOptions A collection of options that will be updated. - */ - printOptions(posDescription: number, posDefault: number, opt_extOptions?: Options): void; - /** - * Assuming that the this program can run by itself, to print out the program's - * help. Also assuming that the commands are called cmd-run and cmd-help. - */ - printHelp(): void; - posDescription(): number; - posDefault(): number; - lengthOf_(param: string): number; - /** - * Create a collection of options used by this program. - * @returns The options used in the programs. - */ - getOptions_(allOptions: Options): Options; - /** - * Get the options used by the program and create the minimist options - * to ensure that minimist parses the values properly. - * @returns The options for minimist. - */ - getMinimistOptions(): MinimistArgs; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js deleted file mode 100644 index 5894c0b6..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js +++ /dev/null @@ -1,226 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const options_1 = require("./options"); -/** - * A program has a command, a description, options, and a run method - */ -class Program { - constructor() { - this.options = {}; - } - /** - * Register a command and the description. - * @param cmd The command. - * @param cmdDescription The description of the command. - * @returns The program for method chaining. - */ - command(cmd, cmdDescription) { - this.cmd = cmd; - this.cmdDescription = cmdDescription; - return this; - } - /** - * Register a new option. - * @param opt The option. - * @param description The description of the option. - * @param type The type of value expected: boolean, number, or string - * @param defaultValue The option's default value. - * @returns The program for method chaining. - */ - option(opt, description, type, opt_defaultValue) { - this.options[opt] = new options_1.Option(opt, description, type, opt_defaultValue); - return this; - } - /** - * Adds an option to the program. - * @param option The option. - * @returns The program for method chaining. - */ - addOption(option) { - this.options[option.opt] = option; - return this; - } - /** - * Registers a method that will be used to run the program. - * @param runMethod The method that will be used to run the program. - * @returns The program for method chaining. - */ - action(runMethod) { - this.runMethod = runMethod; - return this; - } - /** - * Adds the value to the options and passes the updated options to the run - * method. - * @param args The arguments that will be parsed to run the method. - */ - run(json) { - for (let opt in this.options) { - this.options[opt].value = this.getValue_(opt, json); - } - return Promise.resolve(this.runMethod(this.options)); - } - getValue_(key, json) { - let keyList = key.split('.'); - let tempJson = json; - while (keyList.length > 0) { - let keyItem = keyList[0]; - if (tempJson[keyItem] != null) { - tempJson = tempJson[keyItem]; - keyList = keyList.slice(1); - } - else { - return undefined; - } - } - return tempJson; - } - /** - * Prints the command with the description. The description will have spaces - * between the cmd so that the starting position is "posDescription". If the - * gap between the cmd and the description is less than MIN_SPACING or - * posDescription is undefined, the spacing will be MIN_SPACING. - * - * @param opt_postDescription Starting position of the description. - */ - printCmd(opt_posDescription) { - let log = ' ' + this.cmd; - let spacing = Program.MIN_SPACING; - if (opt_posDescription) { - let diff = opt_posDescription - log.length; - if (diff < Program.MIN_SPACING) { - spacing = Program.MIN_SPACING; - } - else { - spacing = diff; - } - } - log += Array(spacing).join(' ') + this.cmdDescription; - console.log(log); - } - /** - * Prints the options with the option descriptions and default values. - * The posDescription and posDefault is the starting position for the option - * description. If extOptions are provided, check to see if we have already - * printed those options. Also, once we print the option, add them to the extOptions. - * - * @param posDescription Position to start logging the description. - * @param posDefault Position to start logging the default value. - * @param opt_extOptions A collection of options that will be updated. - */ - printOptions(posDescription, posDefault, opt_extOptions) { - for (let opt in this.options) { - // we have already logged it - if (opt_extOptions && opt_extOptions[opt]) { - continue; - } - let option = this.options[opt]; - let log = ' --' + option.opt; - let spacing = Program.MIN_SPACING; - // description - let diff = posDescription - log.length; - if (diff < Program.MIN_SPACING) { - spacing = Program.MIN_SPACING; - } - else { - spacing = diff; - } - log += Array(spacing).join(' ') + option.description; - // default value - if (option.defaultValue) { - spacing = Program.MIN_SPACING; - let diff = posDefault - log.length - 1; - if (diff <= Program.MIN_SPACING) { - spacing = Program.MIN_SPACING; - } - else { - spacing = diff; - } - log += Array(spacing).join(' '); - log += '[default: ' + option.defaultValue + ']'; - } - console.log(log); - if (opt_extOptions) { - opt_extOptions[option.opt] = option; - } - } - } - /** - * Assuming that the this program can run by itself, to print out the program's - * help. Also assuming that the commands are called cmd-run and cmd-help. - */ - printHelp() { - console.log('\n' + - 'Usage: ' + this.cmd + ' [options]\n' + - ' ' + this.cmd + ' help\n' + - 'Description: ' + this.cmdDescription + '\n'); - console.log('Options:'); - this.printOptions(this.posDescription(), this.posDefault()); - } - posDescription() { - return this.lengthOf_('opt') + 2 * Program.MIN_SPACING; - } - posDefault() { - return this.posDescription() + this.lengthOf_('description') + Program.MIN_SPACING; - } - lengthOf_(param) { - let maxLength = -1; - for (let opt in this.options) { - let option = this.options[opt]; - if (param === 'description') { - maxLength = Math.max(maxLength, option.description.length); - } - else if (param === 'opt') { - maxLength = Math.max(maxLength, option.opt.length); - } - } - return maxLength; - } - /** - * Create a collection of options used by this program. - * @returns The options used in the programs. - */ - getOptions_(allOptions) { - for (let opt in this.options) { - allOptions[opt] = this.options[opt]; - } - return allOptions; - } - /** - * Get the options used by the program and create the minimist options - * to ensure that minimist parses the values properly. - * @returns The options for minimist. - */ - getMinimistOptions() { - let allOptions = {}; - allOptions = this.getOptions_(allOptions); - let minimistOptions = {}; - let minimistBoolean = []; - let minimistString = []; - let minimistNumber = []; - let minimistDefault = {}; - for (let opt in allOptions) { - let option = allOptions[opt]; - if (option.type === 'boolean') { - minimistBoolean.push(option.opt); - } - else if (option.type === 'string') { - minimistString.push(option.opt); - } - else if (option.type === 'number') { - minimistNumber.push(option.opt); - } - if (typeof option.defaultValue !== 'undefined') { - minimistDefault[option.opt] = option.defaultValue; - } - } - minimistOptions['boolean'] = minimistBoolean; - minimistOptions['string'] = minimistString; - minimistOptions['number'] = minimistNumber; - minimistOptions['default'] = minimistDefault; - return minimistOptions; - } -} -Program.MIN_SPACING = 4; -exports.Program = Program; -//# sourceMappingURL=programs.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map deleted file mode 100644 index 74b20aee..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli/programs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"programs.js","sourceRoot":"","sources":["../../../lib/cli/programs.ts"],"names":[],"mappings":";;AAEA,uCAA8D;AAQ9D;;GAEG;AACH;IAAA;QAIE,YAAO,GAAY,EAAE,CAAC;IAsOxB,CAAC;IAjOC;;;;;OAKG;IACH,OAAO,CAAC,GAAW,EAAE,cAAsB;QACzC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,GAAW,EAAE,WAAmB,EAAE,IAAY,EAAE,gBAAwC;QAE7F,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,gBAAM,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACzE,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,MAAc;QACtB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAmB;QACxB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,MAAM,CAAC,IAAI,CAA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AAe,GAAQ,EAAE,CAAC;QAC9B,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC;YAC3B,IAAI,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;YAC7B,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC9B,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACnC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACpC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAClC,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACpC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAClC,CAAC;YACD,EAAE,CAAC,CAAC,OAAO,MAAM,CAAC,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC;gBAC/C,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;YACpD,CAAC;QACH,CAAC;QACD,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;QAC7C,eAAe,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAC3C,eAAe,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC;QAC3C,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC;IACzB,CAAC;;AAxOM,mBAAW,GAAW,CAAC,CAAC;AADjC,0BA0OC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts deleted file mode 100644 index 294ae6ff..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Cli } from './cli'; -export declare let cli: Cli; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js deleted file mode 100644 index 8b80e826..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const cli_1 = require("./cli"); -const clean = require("./cmds/clean"); -const shutdown = require("./cmds/shutdown"); -const start = require("./cmds/start"); -const status = require("./cmds/status"); -const update = require("./cmds/update"); -const version = require("./cmds/version"); -exports.cli = new cli_1.Cli() - .usage('webdriver-manager [options]') - .program(clean.program) - .program(start.program) - .program(shutdown.program) - .program(status.program) - .program(update.program) - .program(version.program); -//# sourceMappingURL=cli_instance.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map deleted file mode 100644 index 76942548..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cli_instance.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cli_instance.js","sourceRoot":"","sources":["../../lib/cli_instance.ts"],"names":[],"mappings":";;AAAA,+BAA0B;AAC1B,sCAAsC;AACtC,4CAA4C;AAC5C,sCAAsC;AACtC,wCAAwC;AACxC,wCAAwC;AACxC,0CAA0C;AAE/B,QAAA,GAAG,GAAG,IAAI,SAAG,EAAE;KACJ,KAAK,CAAC,uCAAuC,CAAC;KAC9C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KACtB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;KACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;KACzB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;KACvB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;KACvB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts deleted file mode 100644 index c837c34c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Program } from '../cli'; -export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js deleted file mode 100644 index b3c53918..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const minimist = require("minimist"); -const path = require("path"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -const files_1 = require("../files"); -const Opt = require("./"); -const opts_1 = require("./opts"); -let prog = new cli_1.Program() - .command('clean', 'removes all downloaded driver files from the out_dir') - .action(clean) - .addOption(opts_1.Opts[Opt.OUT_DIR]); -exports.program = prog; -// stand alone runner -let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); -if (argv._[0] === 'clean-run') { - prog.run(JSON.parse(JSON.stringify(argv))); -} -else if (argv._[0] === 'clean-help') { - prog.printHelp(); -} -/** - * Parses the options and cleans the output directory of binaries. - * @param: options - */ -function clean(options) { - let outputDir = config_1.Config.getSeleniumDir(); - if (options[Opt.OUT_DIR].getString()) { - if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { - outputDir = options[Opt.OUT_DIR].getString(); - } - else { - outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); - } - } - files_1.FileManager.removeExistingFiles(outputDir); -} -//# sourceMappingURL=clean.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map deleted file mode 100644 index 5b0c67fe..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/clean.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../../lib/cmds/clean.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AACrC,6BAA6B;AAE7B,gCAAwC;AACxC,sCAAiC;AACjC,oCAAqC;AAErC,0BAA0B;AAC1B,iCAA4B;AAE5B,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,OAAO,EAAE,sDAAsD,CAAC;KACxE,MAAM,CAAC,KAAK,CAAC;KACb,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AAElC,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACtE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,SAAS,EAAE,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,eAAe,OAAgB;IAC7B,IAAI,SAAS,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC;IACxC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACrC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;YACtD,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC;QAC/C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,eAAM,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IACD,mBAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts deleted file mode 100644 index d6ee736f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './opts'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js deleted file mode 100644 index 8ba6184e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./opts")); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map deleted file mode 100644 index 59b3bd87..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/cmds/index.ts"],"names":[],"mappings":";;;;;AAAA,4BAAuB"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts deleted file mode 100644 index 22d9668c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Logger } from '../cli'; -export declare function android(sdkPath: string, apiLevels: string[], architectures: string[], platforms: string[], acceptLicenses: boolean, version: string, oldAVDs: string[], logger: Logger, verbose: boolean): void; -export declare function iOS(logger: Logger): void; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js deleted file mode 100644 index 231bd655..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const child_process_1 = require("child_process"); -const fs = require("fs"); -const glob = require("glob"); -const ini = require("ini"); -const path = require("path"); -const q = require("q"); -const config_1 = require("../config"); -const utils_1 = require("../utils"); -const noop = () => { }; -// Make a function which configures a child process to automatically respond -// to a certain question -function respondFactory(question, answer, verbose) { - return (child) => { - child.stdin.setDefaultEncoding('utf-8'); - child.stdout.on('data', (data) => { - if (data != null) { - if (verbose) { - process.stdout.write(data); - } - if (data.toString().indexOf(question) != -1) { - child.stdin.write(answer + '\n'); - } - } - }); - }; -} -// Run a command on the android SDK -function runAndroidSDKCommand(sdkPath, cmd, args, stdio, config_fun) { - let child = utils_1.spawn(path.resolve(sdkPath, 'tools', 'android'), [cmd].concat(args), stdio); - if (config_fun) { - config_fun(child); - } - ; - let deferred = q.defer(); - child.on('exit', (code) => { - if (deferred != null) { - if (code) { - deferred.reject(code); - } - else { - deferred.resolve(); - } - deferred = null; - } - }); - child.on('error', (err) => { - if (deferred != null) { - deferred.reject(err); - deferred = null; - } - }); - return deferred.promise; -} -// Download updates via the android SDK -function downloadAndroidUpdates(sdkPath, targets, search_all, auto_accept, verbose) { - return runAndroidSDKCommand(sdkPath, 'update', ['sdk', '-u'].concat(search_all ? ['-a'] : []).concat(['-t', targets.join(',')]), auto_accept ? 'pipe' : 'inherit', auto_accept ? respondFactory('Do you accept the license', 'y', verbose) : noop); -} -// Setup hardware acceleration for x86-64 emulation -function setupHardwareAcceleration(sdkPath) { - // TODO(sjelin): linux setup - let toolDir = path.resolve(sdkPath, 'extras', 'intel', 'Hardware_Accelerated_Execution_Manager'); - if (config_1.Config.osType() == 'Darwin') { - console.log('Enabling hardware acceleration (requires root access)'); - // We don't need the wrapped spawnSync because we know we're on OSX - child_process_1.spawnSync('sudo', ['silent_install.sh'], { stdio: 'inherit', cwd: toolDir }); - } - else if (config_1.Config.osType() == 'Windows_NT') { - console.log('Enabling hardware acceleration (requires admin access)'); - // We don't need the wrapped spawnSync because we know we're on windows - child_process_1.spawnSync('silent_install.bat', [], { stdio: 'inherit', cwd: toolDir }); - } -} -// Get a list of all the SDK download targets for a given set of APIs, -// architectures, and platforms -function getAndroidSDKTargets(apiLevels, architectures, platforms, oldAVDs) { - function getSysImgTarget(architecture, platform, level) { - if (platform.toUpperCase() == 'DEFAULT') { - platform = 'android'; - } - return 'sys-img-' + architecture + '-' + platform + '-' + level; - } - let targets = apiLevels - .map((level) => { - return 'android-' + level; - }) - .concat(architectures.reduce((targets, architecture) => { - return targets.concat.apply(targets, platforms.map((platform) => { - return apiLevels.map(getSysImgTarget.bind(null, architecture, platform)); - })); - }, [])); - oldAVDs.forEach((name) => { - let avd = new AVDDescriptor(name); - if (targets.indexOf(avd.api) == -1) { - targets.push(avd.api); - } - let sysImgTarget = getSysImgTarget(avd.architecture, avd.platform, avd.api.slice('android-'.length)); - if (targets.indexOf(sysImgTarget) == -1) { - targets.push(sysImgTarget); - } - }); - return targets; -} -// All the information about an android virtual device -class AVDDescriptor { - constructor(api, platform, architecture) { - if (platform != undefined) { - this.api = api; - this.platform = platform; - this.architecture = architecture; - this.name = [api, platform, architecture].join('-'); - } - else { - this.name = api; - let nameParts = this.name.split('-'); - this.api = nameParts[0] + '-' + nameParts[1]; - if (/v[0-9]+[a-z]+/.test(nameParts[nameParts.length - 1]) && - (nameParts[nameParts.length - 2].slice(0, 3) == 'arm')) { - this.architecture = nameParts[nameParts.length - 2] + '-' + nameParts[nameParts.length - 1]; - } - else { - this.architecture = nameParts[nameParts.length - 1]; - } - this.platform = this.name.slice(this.api.length + 1, -this.architecture.length - 1); - } - this.abi = - (this.platform.toUpperCase() == 'DEFAULT' ? '' : this.platform + '/') + this.architecture; - } - avdName(version) { - return this.name + '-v' + version + '-wd-manager'; - } -} -// Gets the descriptors for all AVDs which are possible to make given the -// SDKs which were downloaded -function getAVDDescriptors(sdkPath) { - let deferred = q.defer(); - // `glob` package always prefers patterns to use `/` - glob('system-images/*/*/*', { cwd: sdkPath }, (err, files) => { - if (err) { - deferred.reject(err); - } - else { - deferred.resolve(files.map((file) => { - // `file` could use `/` or `\`, so we use `path.normalize` - let info = path.normalize(file).split(path.sep).slice(-3); - return new AVDDescriptor(info[0], info[1], info[2]); - })); - } - }); - return deferred.promise; -} -function sequentialForEach(array, func) { - let ret = q(null); - array.forEach((x) => { - ret = ret.then(() => { - return func(x); - }); - }); - return ret; -} -// Configures the hardware.ini file for a system image of a new AVD -function configureAVDHardware(sdkPath, desc) { - let file = path.resolve(sdkPath, 'system-images', desc.api, desc.platform, desc.architecture, 'hardware.ini'); - return q.nfcall(fs.stat, file) - .then((stats) => { - return q.nfcall(fs.readFile, file); - }, (err) => { - return q(''); - }) - .then((contents) => { - let config = ini.parse(contents.toString()); - config['hw.keyboard'] = 'yes'; - config['hw.battery'] = 'yes'; - config['hw.ramSize'] = 1024; - return q.nfcall(fs.writeFile, file, ini.stringify(config)); - }); -} -// Make an android virtual device -function makeAVD(sdkPath, desc, version, verbose) { - return runAndroidSDKCommand(sdkPath, 'delete', ['avd', '--name', desc.avdName(version)]) - .then(noop, noop) - .then(() => { - return runAndroidSDKCommand(sdkPath, 'create', ['avd', '--name', desc.avdName(version), '--target', desc.api, '--abi', desc.abi], 'pipe', respondFactory('Do you wish to create a custom hardware profile', 'no', verbose)); - }); -} -// Initialize the android SDK -function android(sdkPath, apiLevels, architectures, platforms, acceptLicenses, version, oldAVDs, logger, verbose) { - let avdDescriptors; - let tools = ['platform-tool', 'tool']; - if ((config_1.Config.osType() == 'Darwin') || (config_1.Config.osType() == 'Windows_NT')) { - tools.push('extra-intel-Hardware_Accelerated_Execution_Manager'); - } - logger.info('android-sdk: Downloading additional SDK updates'); - downloadAndroidUpdates(sdkPath, tools, false, acceptLicenses, verbose) - .then(() => { - return setupHardwareAcceleration(sdkPath); - }) - .then(() => { - logger.info('android-sdk: Downloading more additional SDK updates ' + - '(this may take a while)'); - return downloadAndroidUpdates(sdkPath, ['build-tools-24.0.0'].concat(getAndroidSDKTargets(apiLevels, architectures, platforms, oldAVDs)), true, acceptLicenses, verbose); - }) - .then(() => { - return getAVDDescriptors(sdkPath); - }) - .then((descriptors) => { - avdDescriptors = descriptors; - logger.info('android-sdk: Configuring virtual device hardware'); - return sequentialForEach(avdDescriptors, (descriptor) => { - return configureAVDHardware(sdkPath, descriptor); - }); - }) - .then(() => { - return sequentialForEach(avdDescriptors, (descriptor) => { - logger.info('android-sdk: Setting up virtual device "' + descriptor.name + '"'); - return makeAVD(sdkPath, descriptor, version, verbose); - }); - }) - .then(() => { - return q.nfcall(fs.writeFile, path.resolve(sdkPath, 'available_avds.json'), JSON.stringify(avdDescriptors.map((descriptor) => { - return descriptor.name; - }))); - }) - .then(() => { - logger.info('android-sdk: Initialization complete'); - }) - .done(); -} -exports.android = android; -; -function iOS(logger) { - if (config_1.Config.osType() != 'Darwin') { - throw new Error('Must be on a Mac to simulate iOS devices.'); - } - try { - fs.statSync('/Applications/Xcode.app'); - } - catch (e) { - logger.warn('You must install the xcode commandline tools!'); - } -} -exports.iOS = iOS; -//# sourceMappingURL=initialize.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map deleted file mode 100644 index 22a118b3..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/initialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initialize.js","sourceRoot":"","sources":["../../../lib/cmds/initialize.ts"],"names":[],"mappings":";;AAAA,iDAAsD;AACtD,yBAAyB;AACzB,6BAA6B;AAC7B,2BAA2B;AAC3B,6BAA6B;AAC7B,uBAAuB;AAGvB,sCAAiC;AACjC,oCAA+B;AAG/B,MAAM,IAAI,GAAG,QAAO,CAAC,CAAC;AAEtB,4EAA4E;AAC5E,wBAAwB;AACxB,wBAAwB,QAAgB,EAAE,MAAc,EAAE,OAAgB;IACxE,MAAM,CAAC,CAAC,KAAmB;QACnB,KAAK,CAAC,KAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC/C,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAmB;YAC1C,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC;gBACjB,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;oBACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAc,CAAC,CAAC;gBACvC,CAAC;gBACD,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC5C,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,mCAAmC;AACnC,8BACI,OAAe,EAAE,GAAW,EAAE,IAAc,EAAE,KAAc,EAC5D,UAAqB;IACvB,IAAI,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;QACJ,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC,CAAC;SACD,IAAI,EAAE,CAAC;AACd,CAAC;AApDD,0BAoDC;AAAA,CAAC;AAEF,aAAoB,MAAc;IAChC,EAAE,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IACD,IAAI,CAAC;QACH,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IACzC,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACX,MAAM,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC;AATD,kBASC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts deleted file mode 100644 index 270f5b5e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Options } from '../cli'; -export declare const OUT_DIR = "out_dir"; -export declare const SELENIUM_PORT = "seleniumPort"; -export declare const APPIUM_PORT = "appium-port"; -export declare const AVD_PORT = "avd-port"; -export declare const IGNORE_SSL = "ignore_ssl"; -export declare const PROXY = "proxy"; -export declare const ALTERNATE_CDN = "alternate_cdn"; -export declare const STANDALONE = "standalone"; -export declare const CHROME = "chrome"; -export declare const IE = "ie"; -export declare const IE32 = "ie32"; -export declare const IE64 = "ie64"; -export declare const EDGE = "edge"; -export declare const GECKO = "gecko"; -export declare const ANDROID = "android"; -export declare const IOS = "ios"; -export declare const VERSIONS_CHROME = "versions.chrome"; -export declare const VERSIONS_GECKO = "versions.gecko"; -export declare const VERSIONS_STANDALONE = "versions.standalone"; -export declare const VERSIONS_IE = "versions.ie"; -export declare const VERSIONS_ANDROID = "versions.android"; -export declare const VERSIONS_APPIUM = "versions.appium"; -export declare const CHROME_LOGS = "chrome_logs"; -export declare const LOGGING = "logging"; -export declare const ANDROID_API_LEVELS = "android-api-levels"; -export declare const ANDROID_ARCHITECTURES = "android-archs"; -export declare const ANDROID_PLATFORMS = "android-platorms"; -export declare const ANDROID_ACCEPT_LICENSES = "android-accept-licenses"; -export declare const AVDS = "avds"; -export declare const AVD_USE_SNAPSHOTS = "avd-use-snapshots"; -export declare const STARTED_SIGNIFIER = "started-signifier"; -export declare const SIGNAL_VIA_IPC = "signal-via-ipc"; -export declare const DETACH = "detach"; -export declare const QUIET = "quiet"; -export declare const VERBOSE = "verbose"; -export declare const ALREADY_OFF_ERROR = "already-off-error"; -export declare var Opts: Options; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js deleted file mode 100644 index 0360146c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const binaries_1 = require("../binaries"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -exports.OUT_DIR = 'out_dir'; -exports.SELENIUM_PORT = 'seleniumPort'; -exports.APPIUM_PORT = 'appium-port'; -exports.AVD_PORT = 'avd-port'; -exports.IGNORE_SSL = 'ignore_ssl'; -exports.PROXY = 'proxy'; -exports.ALTERNATE_CDN = 'alternate_cdn'; -exports.STANDALONE = 'standalone'; -exports.CHROME = 'chrome'; -exports.IE = 'ie'; -exports.IE32 = 'ie32'; -exports.IE64 = 'ie64'; -exports.EDGE = 'edge'; -exports.GECKO = 'gecko'; -exports.ANDROID = 'android'; -exports.IOS = 'ios'; -exports.VERSIONS_CHROME = 'versions.chrome'; -exports.VERSIONS_GECKO = 'versions.gecko'; -exports.VERSIONS_STANDALONE = 'versions.standalone'; -exports.VERSIONS_IE = 'versions.ie'; -exports.VERSIONS_ANDROID = 'versions.android'; -exports.VERSIONS_APPIUM = 'versions.appium'; -exports.CHROME_LOGS = 'chrome_logs'; -exports.LOGGING = 'logging'; -exports.ANDROID_API_LEVELS = 'android-api-levels'; -exports.ANDROID_ARCHITECTURES = 'android-archs'; -exports.ANDROID_PLATFORMS = 'android-platorms'; -exports.ANDROID_ACCEPT_LICENSES = 'android-accept-licenses'; -exports.AVDS = 'avds'; -exports.AVD_USE_SNAPSHOTS = 'avd-use-snapshots'; -exports.STARTED_SIGNIFIER = 'started-signifier'; -exports.SIGNAL_VIA_IPC = 'signal-via-ipc'; -exports.DETACH = 'detach'; -exports.QUIET = 'quiet'; -exports.VERBOSE = 'verbose'; -exports.ALREADY_OFF_ERROR = 'already-off-error'; -/** - * The options used by the commands. - */ -var opts = {}; -opts[exports.OUT_DIR] = new cli_1.Option(exports.OUT_DIR, 'Location to output/expect', 'string', config_1.Config.getSeleniumDir()); -opts[exports.SELENIUM_PORT] = - new cli_1.Option(exports.SELENIUM_PORT, 'Optional port for the selenium standalone server', 'string', '4444'); -opts[exports.APPIUM_PORT] = - new cli_1.Option(exports.APPIUM_PORT, 'Optional port for the appium server', 'string', '4723'); -opts[exports.AVD_PORT] = new cli_1.Option(exports.AVD_PORT, 'Optional port for android virtual devices. See mobile.md for details', 'number', 5554); -opts[exports.IGNORE_SSL] = new cli_1.Option(exports.IGNORE_SSL, 'Ignore SSL certificates', 'boolean', false); -opts[exports.PROXY] = new cli_1.Option(exports.PROXY, 'Proxy to use for the install or update command', 'string'); -opts[exports.ALTERNATE_CDN] = new cli_1.Option(exports.ALTERNATE_CDN, 'Alternate CDN to binaries', 'string'); -opts[exports.STANDALONE] = new cli_1.Option(exports.STANDALONE, 'Install or update selenium standalone', 'boolean', binaries_1.Standalone.isDefault); -opts[exports.CHROME] = - new cli_1.Option(exports.CHROME, 'Install or update chromedriver', 'boolean', binaries_1.ChromeDriver.isDefault); -opts[exports.GECKO] = new cli_1.Option(exports.GECKO, 'Install or update geckodriver', 'boolean', binaries_1.GeckoDriver.isDefault); -opts[exports.IE] = new cli_1.Option(exports.IE, 'Install or update 32-bit ie driver', 'boolean', binaries_1.IEDriver.isDefault32); -opts[exports.IE32] = - new cli_1.Option(exports.IE32, 'Install or update 32-bit ie driver', 'boolean', binaries_1.IEDriver.isDefault32); -opts[exports.IE64] = new cli_1.Option(exports.IE64, 'Update: install or update 64-bit IE driver. Start: use installed x64 IE driver.', 'boolean', binaries_1.IEDriver.isDefault64); -opts[exports.EDGE] = new cli_1.Option(exports.EDGE, 'Use installed Microsoft Edge driver', 'string', 'C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe'); -opts[exports.ANDROID] = new cli_1.Option(exports.ANDROID, 'Update/use the android sdk', 'boolean', binaries_1.AndroidSDK.isDefault); -opts[exports.IOS] = new cli_1.Option(exports.IOS, 'Update the iOS sdk', 'boolean', false); -opts[exports.VERSIONS_CHROME] = new cli_1.Option(exports.VERSIONS_CHROME, 'Optional chrome driver version (use \'latest\' to get the most recent version)', 'string', 'latest'); -opts[exports.VERSIONS_GECKO] = - new cli_1.Option(exports.VERSIONS_GECKO, 'Optional gecko driver version', 'string', 'latest'); -opts[exports.VERSIONS_ANDROID] = new cli_1.Option(exports.VERSIONS_ANDROID, 'Optional android sdk version', 'string', binaries_1.AndroidSDK.versionDefault); -opts[exports.VERSIONS_STANDALONE] = new cli_1.Option(exports.VERSIONS_STANDALONE, 'Optional seleniuim standalone server version (use \'latest\' to get the most recent version)', 'string', 'latest'); -opts[exports.VERSIONS_APPIUM] = - new cli_1.Option(exports.VERSIONS_APPIUM, 'Optional appium version', 'string', binaries_1.Appium.versionDefault); -opts[exports.VERSIONS_IE] = new cli_1.Option(exports.VERSIONS_IE, 'Optional internet explorer driver version (use \'latest\' to get the most recent version)', 'string', 'latest'); -opts[exports.CHROME_LOGS] = new cli_1.Option(exports.CHROME_LOGS, 'File path to chrome logs', 'string', undefined); -opts[exports.LOGGING] = new cli_1.Option(exports.LOGGING, 'File path to logging properties file', 'string', undefined); -opts[exports.ANDROID_API_LEVELS] = new cli_1.Option(exports.ANDROID_API_LEVELS, 'Which versions of the android API you want to emulate', 'string', binaries_1.AndroidSDK.DEFAULT_API_LEVELS); -opts[exports.ANDROID_ARCHITECTURES] = new cli_1.Option(exports.ANDROID_ARCHITECTURES, 'Which architectures you want to use in android emulation. By default it will try to match os.arch()', 'string', binaries_1.AndroidSDK.DEFAULT_ARCHITECTURES); -opts[exports.ANDROID_PLATFORMS] = new cli_1.Option(exports.ANDROID_PLATFORMS, 'Which platforms you want to use in android emulation', 'string', binaries_1.AndroidSDK.DEFAULT_PLATFORMS); -opts[exports.ANDROID_ACCEPT_LICENSES] = - new cli_1.Option(exports.ANDROID_ACCEPT_LICENSES, 'Automatically accept android licenses', 'boolean', false); -opts[exports.AVDS] = new cli_1.Option(exports.AVDS, 'Android virtual devices to emulate. Use "all" for emulating all possible devices, and "none" for no devices', 'string', 'all'); -opts[exports.AVD_USE_SNAPSHOTS] = new cli_1.Option(exports.AVD_USE_SNAPSHOTS, 'Rather than booting a new AVD every time, save/load snapshots of the last time it was used', 'boolean', true); -opts[exports.STARTED_SIGNIFIER] = new cli_1.Option(exports.STARTED_SIGNIFIER, 'A string to be outputted once the selenium server is up and running. Useful if you are writing a script which uses webdriver-manager.', 'string'); -opts[exports.SIGNAL_VIA_IPC] = new cli_1.Option(exports.SIGNAL_VIA_IPC, 'If you are using --' + exports.STARTED_SIGNIFIER + - ', this flag will emit the signal string using process.send(), rather than writing it to stdout', 'boolean', false); -opts[exports.DETACH] = new cli_1.Option(exports.DETACH, 'Once the selenium server is up and running, return control to the parent process and continue running the server in the background.', 'boolean', false); -opts[exports.VERBOSE] = new cli_1.Option(exports.VERBOSE, 'Extra console output', 'boolean', false); -opts[exports.QUIET] = new cli_1.Option(exports.QUIET, 'Minimal console output', 'boolean', false); -opts[exports.ALREADY_OFF_ERROR] = new cli_1.Option(exports.ALREADY_OFF_ERROR, 'Normally if you try to shut down a selenium which is not running, you will get a warning. This turns it into an error', 'boolean', false); -exports.Opts = opts; -//# sourceMappingURL=opts.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map deleted file mode 100644 index eb616994..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/opts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"opts.js","sourceRoot":"","sources":["../../../lib/cmds/opts.ts"],"names":[],"mappings":";;AAAA,0CAAgG;AAChG,gCAA4C;AAC5C,sCAAiC;AAEpB,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,aAAa,GAAG,cAAc,CAAC;AAC/B,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,QAAQ,GAAG,UAAU,CAAC;AACtB,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,MAAM,GAAG,QAAQ,CAAC;AAClB,QAAA,EAAE,GAAG,IAAI,CAAC;AACV,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,GAAG,GAAG,KAAK,CAAC;AACZ,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAClC,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAC5C,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AACtC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,WAAW,GAAG,aA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ib/cmds/shutdown.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts deleted file mode 100644 index c837c34c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Program } from '../cli'; -export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js deleted file mode 100644 index a6e290d7..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const minimist = require("minimist"); -const cli_1 = require("../cli"); -const Opt = require("./"); -const opts_1 = require("./opts"); -let logger = new cli_1.Logger('shutdown'); -let prog = new cli_1.Program() - .command('shutdown', 'shut down the selenium server') - .action(shutdown) - .addOption(opts_1.Opts[Opt.SELENIUM_PORT]) - .addOption(opts_1.Opts[Opt.ALREADY_OFF_ERROR]); -exports.program = prog; -// stand alone runner -let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); -if (argv._[0] === 'shutdown-run') { - prog.run(JSON.parse(JSON.stringify(argv))); -} -else if (argv._[0] === 'shutdown-help') { - prog.printHelp(); -} -/** - * Parses the options and starts the selenium standalone server. - * @param options - */ -function shutdown(options) { - logger.info('Attempting to shut down selenium nicely'); - http.get('http://localhost:' + options[Opt.SELENIUM_PORT].getString() + - '/selenium-server/driver/?cmd=shutDownSeleniumServer') - .on('error', (e) => { - if ((e.code == 'ECONNREFUSED') && (e.syscall == 'connect')) { - if (!options[Opt.ALREADY_OFF_ERROR].getBoolean()) { - logger.warn('Server does not appear to be on'); - } - else { - logger.error('Server unreachable, probably not running'); - throw e; - } - } - else { - throw e; - } - }); -} -//# sourceMappingURL=shutdown.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map deleted file mode 100644 index 561603d2..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/shutdown.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shutdown.js","sourceRoot":"","sources":["../../../lib/cmds/shutdown.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,qCAAqC;AAErC,gCAAgD;AAEhD,0BAA0B;AAC1B,iCAA4B;AAG5B,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,UAAU,CAAC,CAAC;AACpC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,UAAU,EAAE,+BAA+B,CAAC;KACpD,MAAM,CAAC,QAAQ,CAAC;KAChB,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;KAClC,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE5C,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACtE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,EAAE,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,kBAAkB,OAAgB;IAChC,MAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACvD,IAAI,CAAC,GAAG,CACA,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,SAAS,EAAE;QAC5D,qDAAqD,CAAC;SACzD,EAAE,CAAC,OAAO,EAAE,CAAC,CAAwB;QACpC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;YAC3D,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;gBACjD,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;YACjD,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBACzD,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts deleted file mode 100644 index c837c34c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Program } from '../cli'; -export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js deleted file mode 100644 index 86a7394c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js +++ /dev/null @@ -1,458 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const http = require("http"); -const minimist = require("minimist"); -const path = require("path"); -const binaries_1 = require("../binaries"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -const files_1 = require("../files"); -const utils_1 = require("../utils"); -const Opt = require("./"); -const opts_1 = require("./opts"); -const commandName = 'start'; -config_1.Config.runCommand = commandName; -let logger = new cli_1.Logger('start'); -let prog = new cli_1.Program() - .command(commandName, 'start up the selenium server') - .action(start) - .addOption(opts_1.Opts[Opt.OUT_DIR]) - .addOption(opts_1.Opts[Opt.SELENIUM_PORT]) - .addOption(opts_1.Opts[Opt.APPIUM_PORT]) - .addOption(opts_1.Opts[Opt.AVD_PORT]) - .addOption(opts_1.Opts[Opt.VERSIONS_STANDALONE]) - .addOption(opts_1.Opts[Opt.VERSIONS_CHROME]) - .addOption(opts_1.Opts[Opt.VERSIONS_GECKO]) - .addOption(opts_1.Opts[Opt.VERSIONS_ANDROID]) - .addOption(opts_1.Opts[Opt.VERSIONS_APPIUM]) - .addOption(opts_1.Opts[Opt.CHROME_LOGS]) - .addOption(opts_1.Opts[Opt.LOGGING]) - .addOption(opts_1.Opts[Opt.ANDROID]) - .addOption(opts_1.Opts[Opt.AVDS]) - .addOption(opts_1.Opts[Opt.AVD_USE_SNAPSHOTS]) - .addOption(opts_1.Opts[Opt.STARTED_SIGNIFIER]) - .addOption(opts_1.Opts[Opt.SIGNAL_VIA_IPC]) - .addOption(opts_1.Opts[Opt.QUIET]) - .addOption(opts_1.Opts[Opt.DETACH]); -if (config_1.Config.osType() === 'Darwin') { - prog.addOption(opts_1.Opts[Opt.IOS]); -} -if (config_1.Config.osType() === 'Windows_NT') { - prog.addOption(opts_1.Opts[Opt.VERSIONS_IE]).addOption(opts_1.Opts[Opt.IE64]).addOption(opts_1.Opts[Opt.EDGE]); -} -exports.program = prog; -// stand alone runner -let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); -if (argv._[0] === 'start-run') { - prog.run(JSON.parse(JSON.stringify(argv))); -} -else if (argv._[0] === 'start-help') { - prog.printHelp(); -} -// Manage processes used in android emulation -let androidProcesses = []; -let androidActiveAVDs = []; -/** - * Parses the options and starts the selenium standalone server. - * @param options - */ -function start(options) { - if (options[Opt.DETACH].getBoolean()) { - return detachedRun(options); - } - let osType = config_1.Config.osType(); - let stdio = options[Opt.QUIET].getBoolean() ? 'pipe' : 'inherit'; - let binaries = files_1.FileManager.setupBinaries(); - let seleniumPort = options[Opt.SELENIUM_PORT].getString(); - let appiumPort = options[Opt.APPIUM_PORT].getString(); - let avdPort = options[Opt.AVD_PORT].getNumber(); - let android = options[Opt.ANDROID].getBoolean(); - let outputDir = config_1.Config.getSeleniumDir(); - if (options[Opt.OUT_DIR].getString()) { - if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { - outputDir = options[Opt.OUT_DIR].getString(); - } - else { - outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); - } - } - try { - // check if folder exists - fs.statSync(outputDir).isDirectory(); - } - catch (e) { - // if the folder does not exist, quit early. - logger.warn('the out_dir path ' + outputDir + ' does not exist, run webdriver-manager update'); - return; - } - let chromeLogs = null; - let loggingFile = null; - if (options[Opt.CHROME_LOGS].getString()) { - if (path.isAbsolute(options[Opt.CHROME_LOGS].getString())) { - chromeLogs = options[Opt.CHROME_LOGS].getString(); - } - else { - chromeLogs = path.resolve(config_1.Config.getBaseDir(), options[Opt.CHROME_LOGS].getString()); - } - } - binaries[binaries_1.Standalone.id].versionCustom = options[Opt.VERSIONS_STANDALONE].getString(); - binaries[binaries_1.ChromeDriver.id].versionCustom = options[Opt.VERSIONS_CHROME].getString(); - binaries[binaries_1.GeckoDriver.id].versionCustom = options[Opt.VERSIONS_GECKO].getString(); - if (options[Opt.VERSIONS_IE]) { - binaries[binaries_1.IEDriver.id].versionCustom = options[Opt.VERSIONS_IE].getString(); - } - binaries[binaries_1.AndroidSDK.id].versionCustom = options[Opt.VERSIONS_ANDROID].getString(); - binaries[binaries_1.Appium.id].versionCustom = options[Opt.VERSIONS_APPIUM].getString(); - let downloadedBinaries = files_1.FileManager.downloadedBinaries(outputDir); - if (downloadedBinaries[binaries_1.Standalone.id] == null) { - logger.error('Selenium Standalone is not present. Install with ' + - 'webdriver-manager update --standalone'); - process.exit(1); - } - let promises = []; - let args = []; - if (osType === 'Linux') { - // selenium server may take a long time to start because /dev/random is BLOCKING if there is not - // enough entropy the solution is to use /dev/urandom, which is NON-BLOCKING (use /dev/./urandom - // because of a java bug) - // https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/1301 - // https://bugs.openjdk.java.net/browse/JDK-6202721 - promises.push(Promise.resolve(args.push('-Djava.security.egd=file:///dev/./urandom'))); - } - if (options[Opt.LOGGING].getString()) { - if (path.isAbsolute(options[Opt.LOGGING].getString())) { - loggingFile = options[Opt.LOGGING].getString(); - } - else { - loggingFile = path.resolve(config_1.Config.getBaseDir(), options[Opt.LOGGING].getString()); - } - promises.push(Promise.resolve(args.push('-Djava.util.logging.config.file=' + loggingFile))); - } - if (downloadedBinaries[binaries_1.ChromeDriver.id] != null) { - let chrome = binaries[binaries_1.ChromeDriver.id]; - promises.push(chrome.getUrl(chrome.versionCustom) - .then(() => { - args.push('-Dwebdriver.chrome.driver=' + - path.resolve(outputDir, binaries[binaries_1.ChromeDriver.id].executableFilename())); - if (chromeLogs != null) { - args.push('-Dwebdriver.chrome.logfile=' + chromeLogs); - } - }) - .catch(err => { - console.log(err); - })); - } - if (downloadedBinaries[binaries_1.GeckoDriver.id] != null) { - let gecko = binaries[binaries_1.GeckoDriver.id]; - promises.push(gecko.getUrl(gecko.versionCustom) - .then(() => { - args.push('-Dwebdriver.gecko.driver=' + - path.resolve(outputDir, binaries[binaries_1.GeckoDriver.id].executableFilename())); - }) - .catch(err => { - console.log(err); - })); - } - if (downloadedBinaries[binaries_1.IEDriver.id] != null) { - let ie = binaries[binaries_1.IEDriver.id]; - promises.push(ie.getUrl(ie.versionCustom) - .then(() => { - binaries[binaries_1.IEDriver.id].osarch = 'Win32'; // use Win 32 by default - if (options[Opt.IE64].getBoolean()) { - binaries[binaries_1.IEDriver.id].osarch = - config_1.Config.osArch(); // use the system architecture - } - args.push('-Dwebdriver.ie.driver=' + - path.resolve(outputDir, binaries[binaries_1.IEDriver.id].executableFilename())); - }) - .catch(err => { - console.log(err); - })); - } - if (options[Opt.EDGE] && options[Opt.EDGE].getString()) { - // validate that the file exists prior to adding it to args - try { - let edgeFile = options[Opt.EDGE].getString(); - if (fs.statSync(edgeFile).isFile()) { - promises.push(Promise.resolve(args.push('-Dwebdriver.edge.driver=' + options[Opt.EDGE].getString()))); - } - } - catch (err) { - // Either the default file or user specified location of the edge - // driver does not exist. - } - } - Promise.all(promises).then(() => { - let standalone = binaries[binaries_1.Standalone.id]; - standalone.getUrl(standalone.versionCustom) - .then(() => { - // starting android - if (android) { - if (downloadedBinaries[binaries_1.AndroidSDK.id] != null) { - let avds = options[Opt.AVDS].getString(); - startAndroid(outputDir, binaries[binaries_1.AndroidSDK.id], avds.split(','), options[Opt.AVD_USE_SNAPSHOTS].getBoolean(), avdPort, stdio); - } - else { - logger.warn('Not starting android because it is not installed'); - } - } - if (downloadedBinaries[binaries_1.Appium.id] != null) { - startAppium(outputDir, binaries[binaries_1.Appium.id], binaries[binaries_1.AndroidSDK.id], appiumPort, stdio); - } - args.push('-jar'); - args.push(path.resolve(outputDir, binaries[binaries_1.Standalone.id].filename())); - }) - .catch(err => { - console.log(err); - }) - .then(() => { - // Add the port parameter, has to declared after the jar file - if (seleniumPort) { - args.push('-port', seleniumPort); - } - let argsToString = ''; - for (let arg in args) { - argsToString += ' ' + args[arg]; - } - logger.info('java' + argsToString); - let seleniumProcess = utils_1.spawn('java', args, stdio); - if (options[Opt.STARTED_SIGNIFIER].getString()) { - signalWhenReady(options[Opt.STARTED_SIGNIFIER].getString(), options[Opt.SIGNAL_VIA_IPC].getBoolean(), outputDir, seleniumPort, downloadedBinaries[binaries_1.Appium.id] ? appiumPort : '', binaries[binaries_1.AndroidSDK.id], avdPort, androidActiveAVDs); - } - logger.info('seleniumProcess.pid: ' + seleniumProcess.pid); - seleniumProcess.on('exit', (code) => { - logger.info('Selenium Standalone has exited with code ' + code); - shutdownEverything(); - process.exit(process.exitCode || code); - }); - seleniumProcess.on('error', (error) => { - logger.warn('Selenium Standalone server encountered an error: ' + error); - }); - process.stdin.resume(); - process.stdin.on('data', (chunk) => { - logger.info('Attempting to shut down selenium nicely'); - shutdownEverything(seleniumPort); - }); - process.on('SIGINT', () => { - logger.info('Staying alive until the Selenium Standalone process exits'); - shutdownEverything(seleniumPort); - }); - }); - }); -} -function startAndroid(outputDir, sdk, avds, useSnapshots, port, stdio) { - let sdkPath = path.resolve(outputDir, sdk.executableFilename()); - if (avds[0] == 'all') { - avds = require(path.resolve(sdkPath, 'available_avds.json')); - } - else if (avds[0] == 'none') { - avds.length = 0; - } - const minAVDPort = 5554; - const maxAVDPort = 5586 - 2 * avds.length; - if (avds.length && ((port < minAVDPort) || (port > maxAVDPort))) { - throw new RangeError('AVD Port must be between ' + minAVDPort + ' and ' + maxAVDPort + ' to emulate ' + - avds.length + ' android devices'); - } - avds.forEach((avd, i) => { - // Credit to appium-ci, which this code was adapted from - let emuBin = 'emulator'; // TODO(sjelin): get the 64bit linux version working - let emuArgs = [ - '-avd', - avd + '-v' + sdk.versionCustom + '-wd-manager', - '-netfast', - ]; - let portArg = null; - if (!useSnapshots) { - emuArgs = emuArgs.concat(['-no-snapshot-load', '-no-snapshot-save']); - } - if (port) { - portArg = port + i * 2; - emuArgs = emuArgs.concat(['-port', '' + portArg]); - } - if (emuBin !== 'emulator') { - emuArgs = emuArgs.concat(['-qemu', '-enable-kvm']); - } - logger.info('Starting ' + avd + ' on ' + (portArg == null ? 'default port' : 'port ' + portArg)); - let child = utils_1.spawn(path.resolve(sdkPath, 'tools', emuBin), emuArgs, stdio); - child.on('error', (error) => { - logger.warn(avd + ' encountered an error: ' + error); - }); - androidProcesses.push(child); - androidActiveAVDs.push(avd); - }); -} -function killAndroid() { - for (var i = 0; i < androidProcesses.length; i++) { - logger.info('Shutting down ' + androidActiveAVDs[i]); - androidProcesses[i].kill(); - } - androidProcesses.length = androidActiveAVDs.length = 0; -} -// Manage appium process -let appiumProcess; -function startAppium(outputDir, binary, androidSDK, port, stdio) { - logger.info('Starting appium server'); - if (androidSDK) { - process.env.ANDROID_HOME = path.resolve(outputDir, androidSDK.executableFilename()); - } - appiumProcess = utils_1.spawn('npm', ['run', 'appium'].concat(port ? ['--', '--port', port] : []), stdio, { cwd: path.resolve(outputDir, binary.filename()) }); -} -function killAppium() { - if (appiumProcess != null) { - appiumProcess.kill(); - appiumProcess = null; - } -} -function signalWhenReady(signal, viaIPC, outputDir, seleniumPort, appiumPort, androidSDK, avdPort, avdNames) { - const maxWait = 10 * 60 * 1000; // Ten minutes - function waitFor(getStatus, testStatus, desc) { - const checkInterval = 100; - return new Promise((resolve, reject) => { - let waited = 0; - (function recursiveCheck() { - setTimeout(() => { - getStatus() - .then((status) => { - if (!testStatus(status)) { - return Promise.reject('Invalid status' + (desc ? ' for ' + desc : '') + ': ' + status); - } - }) - .then(() => { - resolve(); - }, (error) => { - waited += checkInterval; - if (waited < maxWait) { - recursiveCheck(); - } - else { - reject('Timed out' + (desc ? ' wating for' + desc : '') + - '. Final rejection reason: ' + JSON.stringify(error)); - } - }); - }, checkInterval); - })(); - }); - } - ; - function waitForAndroid(avdPort, avdName, appiumPort) { - let sdkPath = path.resolve(outputDir, androidSDK.executableFilename()); - logger.info('Waiting for ' + avdName + '\'s emulator to start'); - return utils_1.adb(sdkPath, avdPort, 'wait-for-device', maxWait) - .then(() => { - logger.info('Waiting for ' + avdName + '\'s OS to boot up'); - return waitFor(() => { - return utils_1.adb(sdkPath, avdPort, 'shell', maxWait, ['getprop', 'sys.boot_completed']); - }, (status) => { - return status.trim() == '1'; - }, avdName + '\'s OS'); - }, (error) => { - return Promise.reject('Failed to wait for ' + avdName + '\'s emulator to start (' + error.code + ': ' + - error.message + ')'); - }) - .then(() => { - logger.info('Waiting for ' + avdName + ' to be ready to launch chrome'); - let version = binaries_1.AndroidSDK.VERSIONS[parseInt(avdName.slice('android-'.length))]; - return utils_1.request('POST', appiumPort, '/wd/hub/session', maxWait, { - desiredCapabilities: { - browserName: 'chrome', - platformName: 'Android', - platformVersion: version, - deviceName: 'Android Emulator' - } - }) - .then((data) => { - return JSON.parse(data)['sessionId']; - }, (error) => { - return Promise.reject('Could not start chrome on ' + avdName + ' (' + error.code + ': ' + - error.message + ')'); - }); - }) - .then((sessionId) => { - logger.info('Shutting down dummy chrome instance for ' + avdName); - return utils_1.request('DELETE', appiumPort, '/wd/hub/session/' + sessionId) - .then(() => { }, (error) => { - return Promise.reject('Could not close chrome on ' + avdName + ' (' + error.code + ': ' + - error.message + ')'); - }); - }); - } - let pending = [waitFor(() => { - return utils_1.request('GET', seleniumPort, '/wd/hub/status', maxWait); - }, (status) => { - return JSON.parse(status).status == 0; - }, 'selenium server')]; - if (appiumPort) { - pending.push(waitFor(() => { - return utils_1.request('GET', appiumPort, '/wd/hub/status', maxWait); - }, (status) => { - return JSON.parse(status).status == 0; - }, 'appium server')); - } - if (androidSDK && avdPort) { - for (let i = 0; i < avdNames.length; i++) { - pending.push(waitForAndroid(avdPort + 2 * i, avdNames[i], appiumPort)); - } - } - Promise.all(pending).then(() => { - logger.info('Everything started'); - sendStartedSignal(signal, viaIPC); - }, (error) => { - logger.error(error); - shutdownEverything(seleniumPort); - process.exitCode = 1; - }); -} -function sendStartedSignal(signal, viaIPC) { - if (viaIPC) { - if (process.send) { - return process.send(signal); - } - else { - logger.warn('No IPC channel, sending signal via stdout'); - } - } - console.log(signal); -} -function shutdownEverything(seleniumPort) { - if (seleniumPort) { - http.get('http://localhost:' + seleniumPort + '/selenium-server/driver/?cmd=shutDownSeleniumServer'); - } - killAndroid(); - killAppium(); -} -function detachedRun(options) { - var file = path.resolve(__dirname, '..', 'webdriver.js'); - var oldSignal = options[Opt.STARTED_SIGNIFIER].getString(); - var oldViaIPC = options[Opt.SIGNAL_VIA_IPC].getBoolean(); - options[Opt.DETACH].value = false; - options[Opt.STARTED_SIGNIFIER].value = 'server started'; - options[Opt.SIGNAL_VIA_IPC].value = true; - let args = [file, commandName].concat(cli_1.unparseOptions(options)); - var unreffed = false; - let child = utils_1.spawn(process.execPath, args, ['ignore', 1, 2, 'ipc']); - child.on('message', (message) => { - if (message == options[Opt.STARTED_SIGNIFIER].getString()) { - if (oldSignal) { - sendStartedSignal(oldSignal, oldViaIPC); - } - logger.info('Detached pid: ' + child.pid); - child.disconnect(); - child.unref(); - unreffed = true; - } - }); - child.on('exit', (code) => { - if (!unreffed) { - if (code == 0) { - logger.warn('Server never seemed to start, and has now exited'); - } - else { - logger.error('Server never seemed to start, and has probably crashed'); - } - process.exit(code); - } - }); -} -//# sourceMappingURL=start.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map deleted file mode 100644 index 7862b9ff..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/start.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../lib/cmds/start.ts"],"names":[],"mappings":";;AACA,yBAAyB;AACzB,6BAA6B;AAC7B,qCAAqC;AACrC,6BAA6B;AAG7B,0CAAmH;AACnH,gCAAgE;AAChE,sCAAiC;AACjC,oCAAqC;AACrC,oCAA6C;AAE7C,0BAA0B;AAC1B,iCAA4B;AAE5B,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,eAAM,CAAC,UAAU,GAAG,WAAW,CAAC;AAEhC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,OAAO,CAAC,CAAC;AACjC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,WAAW,EAAE,8BAA8B,CAAC;KACpD,MAAM,CAAC,KAAK,CAAC;KACb,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KAC5B,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;KAClC,SAAS,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C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACd,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;gBACd,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;YAClE,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;YACzE,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts deleted file mode 100644 index c837c34c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Program } from '../cli'; -export declare var program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js deleted file mode 100644 index fc5ad7f0..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const minimist = require("minimist"); -const path = require("path"); -const semver = require("semver"); -const binaries_1 = require("../binaries"); -const chrome_xml_1 = require("../binaries/chrome_xml"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -const files_1 = require("../files"); -const Opt = require("./"); -const opts_1 = require("./opts"); -let logger = new cli_1.Logger('status'); -let prog = new cli_1.Program() - .command('status', 'list the current available drivers') - .addOption(opts_1.Opts[Opt.OUT_DIR]) - .action(status); -exports.program = prog; -// stand alone runner -let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); -if (argv._[0] === 'status-run') { - prog.run(JSON.parse(JSON.stringify(argv))); -} -else if (argv._[0] === 'status-help') { - prog.printHelp(); -} -/** - * Parses the options and logs the status of the binaries downloaded. - * @param options - */ -function status(options) { - let binaries = files_1.FileManager.setupBinaries(); - let outputDir = config_1.Config.getSeleniumDir(); - if (options[Opt.OUT_DIR].value) { - if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { - outputDir = options[Opt.OUT_DIR].getString(); - } - else { - outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); - } - } - try { - // check if folder exists - fs.statSync(outputDir).isDirectory(); - } - catch (e) { - // if the folder does not exist, quit early. - logger.warn('the out_dir path ' + outputDir + ' does not exist'); - return; - } - // Try to get the update-config.json. This will be used for showing the last binary downloaded. - let updateConfig = {}; - try { - updateConfig = - JSON.parse(fs.readFileSync(path.resolve(outputDir, 'update-config.json')).toString()) || {}; - } - catch (err) { - updateConfig = {}; - } - let downloadedBinaries = files_1.FileManager.downloadedBinaries(outputDir); - // Log which binaries have been downloaded. - for (let bin in downloadedBinaries) { - let downloaded = downloadedBinaries[bin]; - let log = downloaded.name + ' '; - log += downloaded.versions.length == 1 ? 'version available: ' : 'versions available: '; - // Get the "last" downloaded binary from the updateConfig. - let last = null; - if (downloaded.binary instanceof binaries_1.Appium && updateConfig[binaries_1.Appium.id]) { - last = updateConfig[binaries_1.Appium.id]['last']; - } - else if (downloaded.binary instanceof binaries_1.AndroidSDK && updateConfig[binaries_1.AndroidSDK.id]) { - last = updateConfig[binaries_1.AndroidSDK.id]['last']; - } - else if (downloaded.binary instanceof binaries_1.ChromeDriver && updateConfig[binaries_1.ChromeDriver.id]) { - last = updateConfig[binaries_1.ChromeDriver.id]['last']; - } - else if (downloaded.binary instanceof binaries_1.GeckoDriver && updateConfig[binaries_1.GeckoDriver.id]) { - last = updateConfig[binaries_1.GeckoDriver.id]['last']; - } - else if (downloaded.binary instanceof binaries_1.IEDriver && updateConfig[binaries_1.IEDriver.id]) { - last = updateConfig[binaries_1.IEDriver.id]['last']; - } - else if (downloaded.binary instanceof binaries_1.Standalone && updateConfig[binaries_1.Standalone.id]) { - last = updateConfig[binaries_1.Standalone.id]['last']; - } - // Sort the versions then log them: - // - last: the last binary downloaded by webdriver-manager per the update-config.json - downloaded.versions = downloaded.versions.sort((a, b) => { - if (!semver.valid(a)) { - a = chrome_xml_1.getValidSemver(a); - b = chrome_xml_1.getValidSemver(b); - } - if (semver.gt(a, b)) { - return 1; - } - else { - return 0; - } - }); - for (let ver in downloaded.versions) { - let version = downloaded.versions[ver]; - log += version; - if (last && last.indexOf(version) >= 0) { - log += ' [last]'; - } - if (+ver != downloaded.versions.length - 1) { - log += ', '; - } - } - logger.info(log); - } - // for binaries that are available for the operating system, show them here - for (let bin in binaries) { - if (downloadedBinaries[bin] == null) { - logger.info(binaries[bin].name + ' is not present'); - } - } -} -//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map deleted file mode 100644 index d804808c..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/status.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../lib/cmds/status.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,qCAAqC;AACrC,6BAA6B;AAC7B,iCAAiC;AAEjC,0CAAgG;AAChG,uDAAsD;AACtD,gCAAgD;AAChD,sCAAiC;AACjC,oCAAqC;AAErC,0BAA0B;AAC1B,iCAA4B;AAE5B,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,QAAQ,CAAC,CAAC;AAClC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,QAAQ,EAAE,oCAAoC,CAAC;KACvD,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KAC5B,MAAM,CAAC,MAAM,CAAC,CAAC;AAEpB,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GA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c,CAAC,CAAC,CAAC,CAAC;gBACtB,CAAC,GAAG,2BAAc,CAAC,CAAC,CAAC,CAAC;YACxB,CAAC;YACD,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBACpB,MAAM,CAAC,CAAC,CAAC;YACX,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,CAAC,CAAC;YACX,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;YACpC,IAAI,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACvC,GAAG,IAAI,OAAO,CAAC;YACf,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACvC,GAAG,IAAI,SAAS,CAAA;YAClB,CAAC;YACD,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC3C,GAAG,IAAI,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,2EAA2E;IAC3E,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC;QACzB,EAAE,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,iBAAiB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts deleted file mode 100644 index 2dec5ba6..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Program } from '../cli'; -export declare let program: Program; -export declare function clearBrowserFile(): void; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js deleted file mode 100644 index b98cdced..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js +++ /dev/null @@ -1,300 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const AdmZip = require("adm-zip"); -const child_process = require("child_process"); -const fs = require("fs"); -const minimist = require("minimist"); -const path = require("path"); -const q = require("q"); -const rimraf = require("rimraf"); -const binaries_1 = require("../binaries"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -const files_1 = require("../files"); -const http_utils_1 = require("../http_utils"); -const utils_1 = require("../utils"); -const Opt = require("./"); -const initialize_1 = require("./initialize"); -const opts_1 = require("./opts"); -config_1.Config.runCommand = 'update'; -let logger = new cli_1.Logger('update'); -let prog = new cli_1.Program() - .command('update', 'install or update selected binaries') - .action(update) - .addOption(opts_1.Opts[Opt.OUT_DIR]) - .addOption(opts_1.Opts[Opt.VERBOSE]) - .addOption(opts_1.Opts[Opt.IGNORE_SSL]) - .addOption(opts_1.Opts[Opt.PROXY]) - .addOption(opts_1.Opts[Opt.ALTERNATE_CDN]) - .addOption(opts_1.Opts[Opt.STANDALONE]) - .addOption(opts_1.Opts[Opt.CHROME]) - .addOption(opts_1.Opts[Opt.GECKO]) - .addOption(opts_1.Opts[Opt.ANDROID]) - .addOption(opts_1.Opts[Opt.ANDROID_API_LEVELS]) - .addOption(opts_1.Opts[Opt.ANDROID_ARCHITECTURES]) - .addOption(opts_1.Opts[Opt.ANDROID_PLATFORMS]) - .addOption(opts_1.Opts[Opt.ANDROID_ACCEPT_LICENSES]); -if (config_1.Config.osType() === 'Darwin') { - prog.addOption(opts_1.Opts[Opt.IOS]); -} -if (config_1.Config.osType() === 'Windows_NT') { - prog.addOption(opts_1.Opts[Opt.IE]).addOption(opts_1.Opts[Opt.IE32]).addOption(opts_1.Opts[Opt.IE64]); -} -prog.addOption(opts_1.Opts[Opt.VERSIONS_STANDALONE]) - .addOption(opts_1.Opts[Opt.VERSIONS_CHROME]) - .addOption(opts_1.Opts[Opt.VERSIONS_APPIUM]) - .addOption(opts_1.Opts[Opt.VERSIONS_ANDROID]) - .addOption(opts_1.Opts[Opt.VERSIONS_GECKO]); -if (config_1.Config.osType() === 'Windows_NT') { - prog.addOption(opts_1.Opts[Opt.VERSIONS_IE]); -} -exports.program = prog; -// stand alone runner -let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); -if (argv._[0] === 'update-run') { - prog.run(JSON.parse(JSON.stringify(argv))); -} -else if (argv._[0] === 'update-help') { - prog.printHelp(); -} -let browserFile; -/** - * Parses the options and downloads binaries if they do not exist. - * @param options - */ -function update(options) { - let promises = []; - let standalone = options[Opt.STANDALONE].getBoolean(); - let chrome = options[Opt.CHROME].getBoolean(); - let gecko = options[Opt.GECKO].getBoolean(); - let ie32 = false; - let ie64 = false; - if (options[Opt.IE]) { - ie32 = ie32 || options[Opt.IE].getBoolean(); - } - if (options[Opt.IE32]) { - ie32 = ie32 || options[Opt.IE32].getBoolean(); - } - if (options[Opt.IE64]) { - ie64 = options[Opt.IE64].getBoolean(); - } - let android = options[Opt.ANDROID].getBoolean(); - let ios = false; - if (options[Opt.IOS]) { - ios = options[Opt.IOS].getBoolean(); - } - let outputDir = options[Opt.OUT_DIR].getString(); - try { - browserFile = - JSON.parse(fs.readFileSync(path.resolve(outputDir, 'update-config.json')).toString()); - } - catch (err) { - browserFile = {}; - } - let android_api_levels = options[Opt.ANDROID_API_LEVELS].getString().split(','); - let android_architectures = options[Opt.ANDROID_ARCHITECTURES].getString().split(','); - let android_platforms = options[Opt.ANDROID_PLATFORMS].getString().split(','); - let android_accept_licenses = options[Opt.ANDROID_ACCEPT_LICENSES].getBoolean(); - if (options[Opt.OUT_DIR].getString()) { - if (path.isAbsolute(options[Opt.OUT_DIR].getString())) { - outputDir = options[Opt.OUT_DIR].getString(); - } - else { - outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString()); - } - files_1.FileManager.makeOutputDirectory(outputDir); - } - let ignoreSSL = options[Opt.IGNORE_SSL].getBoolean(); - let proxy = options[Opt.PROXY].getString(); - http_utils_1.HttpUtils.assignOptions({ ignoreSSL, proxy }); - let verbose = options[Opt.VERBOSE].getBoolean(); - // setup versions for binaries - let binaries = files_1.FileManager.setupBinaries(options[Opt.ALTERNATE_CDN].getString()); - binaries[binaries_1.Standalone.id].versionCustom = options[Opt.VERSIONS_STANDALONE].getString(); - binaries[binaries_1.ChromeDriver.id].versionCustom = options[Opt.VERSIONS_CHROME].getString(); - if (options[Opt.VERSIONS_IE]) { - binaries[binaries_1.IEDriver.id].versionCustom = options[Opt.VERSIONS_IE].getString(); - } - if (options[Opt.VERSIONS_GECKO]) { - binaries[binaries_1.GeckoDriver.id].versionCustom = options[Opt.VERSIONS_GECKO].getString(); - } - binaries[binaries_1.AndroidSDK.id].versionCustom = options[Opt.VERSIONS_ANDROID].getString(); - binaries[binaries_1.Appium.id].versionCustom = options[Opt.VERSIONS_APPIUM].getString(); - // if the file has not been completely downloaded, download it - // else if the file has already been downloaded, unzip the file, rename it, and give it - // permissions - if (standalone) { - let binary = binaries[binaries_1.Standalone.id]; - promises.push(files_1.FileManager.downloadFile(binary, outputDir) - .then((downloaded) => { - if (!downloaded) { - logger.info(binary.name + ': file exists ' + - path.resolve(outputDir, binary.filename())); - logger.info(binary.name + ': ' + binary.filename() + ' up to date'); - } - }) - .then(() => { - updateBrowserFile(binary, outputDir); - })); - } - if (chrome) { - let binary = binaries[binaries_1.ChromeDriver.id]; - promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { - return Promise.resolve(updateBrowserFile(binary, outputDir)); - })); - } - if (gecko) { - let binary = binaries[binaries_1.GeckoDriver.id]; - promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { - return Promise.resolve(updateBrowserFile(binary, outputDir)); - })); - } - if (ie64) { - let binary = binaries[binaries_1.IEDriver.id]; - binary.osarch = config_1.Config.osArch(); // Win32 or x64 - promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { - return Promise.resolve(updateBrowserFile(binary, outputDir)); - })); - } - if (ie32) { - let binary = binaries[binaries_1.IEDriver.id]; - binary.osarch = 'Win32'; - promises.push(updateBinary(binary, outputDir, proxy, ignoreSSL).then(() => { - return Promise.resolve(updateBrowserFile(binary, outputDir)); - })); - } - if (android) { - let binary = binaries[binaries_1.AndroidSDK.id]; - let sdk_path = path.resolve(outputDir, binary.executableFilename()); - let oldAVDList; - updateBrowserFile(binary, outputDir); - promises.push(q.nfcall(fs.readFile, path.resolve(sdk_path, 'available_avds.json')) - .then((oldAVDs) => { - oldAVDList = oldAVDs; - }, () => { - oldAVDList = '[]'; - }) - .then(() => { - return updateBinary(binary, outputDir, proxy, ignoreSSL); - }) - .then(() => { - initialize_1.android(path.resolve(outputDir, binary.executableFilename()), android_api_levels, android_architectures, android_platforms, android_accept_licenses, binaries[binaries_1.AndroidSDK.id].versionCustom, JSON.parse(oldAVDList), logger, verbose); - })); - } - if (ios) { - initialize_1.iOS(logger); - } - if (android || ios) { - installAppium(binaries[binaries_1.Appium.id], outputDir); - updateBrowserFile(binaries[binaries_1.Appium.id], outputDir); - } - return Promise.all(promises).then(() => { - writeBrowserFile(outputDir); - }); -} -function updateBinary(binary, outputDir, proxy, ignoreSSL) { - return files_1.FileManager - .downloadFile(binary, outputDir, (binary, outputDir, fileName) => { - unzip(binary, outputDir, fileName); - }) - .then(downloaded => { - if (!downloaded) { - // The file did not have to download, we should unzip it. - logger.info(binary.name + ': file exists ' + path.resolve(outputDir, binary.filename())); - let fileName = binary.filename(); - unzip(binary, outputDir, fileName); - logger.info(binary.name + ': ' + binary.executableFilename() + ' up to date'); - } - }); -} -function unzip(binary, outputDir, fileName) { - // remove the previously saved file and unzip it - let osType = config_1.Config.osType(); - let mv = path.resolve(outputDir, binary.executableFilename()); - try { - fs.unlinkSync(mv); - } - catch (err) { - try { - rimraf.sync(mv); - } - catch (err2) { - } - } - // unzip the file - logger.info(binary.name + ': unzipping ' + fileName); - if (fileName.slice(-4) == '.zip') { - try { - let zip = new AdmZip(path.resolve(outputDir, fileName)); - zip.extractAllTo(outputDir, true); - } - catch (e) { - throw new Error(`Invalid filename: ${path.resolve(outputDir, fileName)}`); - } - } - else { - // We will only ever get .tar files on linux - child_process.spawnSync('tar', ['zxvf', path.resolve(outputDir, fileName), '-C', outputDir]); - } - // rename - fs.renameSync(path.resolve(outputDir, binary.zipContentName()), mv); - // set permissions - if (osType !== 'Windows_NT') { - logger.info(binary.name + ': setting permissions to 0755 for ' + mv); - if (binary.id() !== binaries_1.AndroidSDK.id) { - fs.chmodSync(mv, '0755'); - } - else { - fs.chmodSync(path.resolve(mv, 'tools', 'android'), '0755'); - fs.chmodSync(path.resolve(mv, 'tools', 'emulator'), '0755'); - // TODO(sjelin): get 64 bit versions working - } - } -} -function installAppium(binary, outputDir) { - logger.info('appium: installing appium'); - let folder = path.resolve(outputDir, binary.filename()); - try { - rimraf.sync(folder); - } - catch (err) { - } - fs.mkdirSync(folder); - fs.writeFileSync(path.resolve(folder, 'package.json'), JSON.stringify({ scripts: { appium: 'appium' } })); - utils_1.spawn('npm', ['install', 'appium@' + binary.version()], null, { cwd: folder }); -} -function updateBrowserFile(binary, outputDir) { - let currentDownload = path.resolve(outputDir, binary.executableFilename()); - // if browserFile[id] exists, we should update it - if (browserFile[binary.id()]) { - let binaryPath = browserFile[binary.id()]; - if (binaryPath.last === currentDownload) { - return; - } - else { - binaryPath.last = currentDownload; - for (let bin of binaryPath.all) { - if (bin === currentDownload) { - return; - } - } - binaryPath.all.push(currentDownload); - } - } - else { - // The browserFile[id] does not exist / has not been downloaded previously. - // We should create the entry. - let binaryPath = { last: currentDownload, all: [currentDownload] }; - browserFile[binary.id()] = binaryPath; - } -} -function writeBrowserFile(outputDir) { - let filePath = path.resolve(outputDir, 'update-config.json'); - fs.writeFileSync(filePath, JSON.stringify(browserFile)); -} -// for testing -function clearBrowserFile() { - browserFile = {}; -} -exports.clearBrowserFile = clearBrowserFile; -//# sourceMappingURL=update.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map deleted file mode 100644 index bf3b16ba..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/update.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../lib/cmds/update.ts"],"names":[],"mappings":";;AAAA,kCAAkC;AAClC,+CAA+C;AAC/C,yBAAyB;AACzB,qCAAqC;AACrC,6BAA6B;AAC7B,uBAAuB;AACvB,iCAAiC;AAEjC,0CAAwG;AACxG,gCAAgD;AAChD,sCAAiC;AACjC,oCAAiD;AACjD,8CAAwC;AACxC,oCAA+B;AAE/B,0BAA0B;AAC1B,6CAA2E;AAC3E,iCAA4B;AAE5B,eAAM,CAAC,UAAU,GAAG,QAAQ,CAAC;AAE7B,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,QAAQ,CAAC,CAAC;AAClC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE;KACR,OAAO,CAAC,QAAQ,EAAE,qCAAqC,CAAC;KACxD,MAAM,CAAC,MAAM,CAAC;KACd,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KAC5B,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KAC5B,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;KAC/B,SAAS,CAAC,WAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KAC1B,SAA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B,WAAmB,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/D,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC;QACT,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,UAAU,CAAC,IAAI,GAAG,eAAe,CAAC;YAClC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC/B,EAAE,CAAC,CAAC,GAAG,KAAK,eAAe,CAAC,CAAC,CAAC;oBAC5B,MAAM,CAAC;gBACT,CAAC;YACH,CAAC;YACD,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,2EAA2E;QAC3E,8BAA8B;QAC9B,IAAI,UAAU,GAAe,EAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,EAAC,CAAC;QAC5E,WAAmB,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC;IACjD,CAAC;AACH,CAAC;AAED,0BAA0B,SAAiB;IACzC,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAC7D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,cAAc;AACd;IACE,WAAW,GAAG,EAAE,CAAC;AACnB,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts deleted file mode 100644 index 89c28059..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Program } from '../cli'; -export declare let program: Program; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js deleted file mode 100644 index 9fb2e957..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const minimist = require("minimist"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -let logger = new cli_1.Logger('version'); -let prog = new cli_1.Program().command('version', 'get the current version').action(getVersion); -exports.program = prog; -// stand alone runner -let argv = minimist(process.argv.slice(2), prog.getMinimistOptions()); -if (argv._[0] === 'version-run') { - prog.run(JSON.parse(JSON.stringify(argv))); -} -function getVersion() { - logger.info('webdriver-manager', config_1.Config.getVersion()); -} -//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map deleted file mode 100644 index f1b57a61..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/cmds/version.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../lib/cmds/version.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AACrC,gCAAgD;AAChD,sCAAiC;AAKjC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,SAAS,CAAC,CAAC;AAEnC,IAAI,IAAI,GAAG,IAAI,aAAO,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAE/E,QAAA,OAAO,GAAG,IAAI,CAAC;AAE1B,qBAAqB;AACrB,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACtE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC;IAChC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;IACE,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,eAAM,CAAC,UAAU,EAAE,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts deleted file mode 100644 index 2bef6f06..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/config.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export interface ConfigFile { - [key: string]: string; - selenium?: string; - chrome?: string; - gecko?: string; - ie?: string; - android?: string; - appium?: string; - maxChrome?: string; -} -/** - * The configuration for webdriver-manager - * - * The config.json, package.json, and selenium directory are found in the - * same location at the root directory in webdriver-manager. - * - */ -export declare class Config { - static runCommand: string; - static configFile: string; - static packageFile: string; - static nodeModuleName: string; - static cwd: string; - static localInstall: string; - static parentPath: string; - static dir: string; - static folder: string; - static isProjectVersion: boolean; - static isLocalVersion: boolean; - static osArch_: string; - static osType_: string; - static noProxy_: any; - static httpsProxy_: any; - static httpProxy_: any; - static osArch(): string; - static osType(): string; - static noProxy(): string; - static httpProxy(): string; - static httpsProxy(): string; - static getConfigFile_(): string; - static getPackageFile_(): string; - static getSeleniumDir(): string; - static getBaseDir(): string; - /** - * Get the binary versions from the configuration file. - * @returns A map of the versions defined in the configuration file. - */ - static binaryVersions(): ConfigFile; - /** - * Get the CDN urls from the configuration file. - * @returns A map of the CDN versions defined in the configuration file. - */ - static cdnUrls(): ConfigFile; - /** - * Get the package version. - */ - static getVersion(): string; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/config.js b/test-eol-project/node_modules/webdriver-manager/built/lib/config.js deleted file mode 100644 index 1fd07120..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/config.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const os = require("os"); -const path = require("path"); -const cli_1 = require("./cli"); -let logger = new cli_1.Logger('config'); -/** - * The configuration for webdriver-manager - * - * The config.json, package.json, and selenium directory are found in the - * same location at the root directory in webdriver-manager. - * - */ -class Config { - static osArch() { - return Config.osArch_; - } - static osType() { - return Config.osType_; - } - static noProxy() { - return Config.noProxy_; - } - static httpProxy() { - return Config.httpProxy_; - } - static httpsProxy() { - return Config.httpsProxy_; - } - static getConfigFile_() { - return path.resolve(Config.dir, '..', Config.configFile); - } - static getPackageFile_() { - return path.resolve(Config.dir, '..', Config.packageFile); - } - static getSeleniumDir() { - return path.resolve(Config.dir, '..', '..', 'selenium/'); - } - static getBaseDir() { - return path.resolve(Config.dir, '..', '..'); - } - /** - * Get the binary versions from the configuration file. - * @returns A map of the versions defined in the configuration file. - */ - static binaryVersions() { - let configFile = require(Config.getConfigFile_()); - let configVersions = {}; - configVersions.selenium = configFile.webdriverVersions.selenium; - configVersions.chrome = configFile.webdriverVersions.chromedriver; - configVersions.gecko = configFile.webdriverVersions.geckodriver; - configVersions.ie = configFile.webdriverVersions.iedriver; - configVersions.android = configFile.webdriverVersions.androidsdk; - configVersions.appium = configFile.webdriverVersions.appium; - configVersions.maxChrome = configFile.webdriverVersions.maxChromedriver; - return configVersions; - } - /** - * Get the CDN urls from the configuration file. - * @returns A map of the CDN versions defined in the configuration file. - */ - static cdnUrls() { - let configFile = require(Config.getConfigFile_()); - let configCdnUrls = {}; - configCdnUrls.selenium = configFile.cdnUrls.selenium; - configCdnUrls.chrome = configFile.cdnUrls.chromedriver; - configCdnUrls.gecko = configFile.cdnUrls.geckodriver; - configCdnUrls.ie = configFile.cdnUrls.iedriver; - configCdnUrls.android = configFile.cdnUrls.androidsdk; - return configCdnUrls; - } - /** - * Get the package version. - */ - static getVersion() { - let packageFile = require(Config.getPackageFile_()); - return packageFile.version; - } -} -Config.configFile = 'config.json'; -Config.packageFile = 'package.json'; -Config.nodeModuleName = 'webdriver-manager'; -Config.cwd = process.cwd(); -Config.parentPath = path.resolve(Config.cwd, '..'); -Config.dir = __dirname; -Config.folder = Config.cwd.replace(Config.parentPath, '').substring(1); -Config.isProjectVersion = Config.folder === Config.nodeModuleName; -Config.isLocalVersion = false; -Config.osArch_ = os.arch(); -Config.osType_ = os.type(); -Config.noProxy_ = process.env.NO_PROXY || process.env.no_proxy; -Config.httpsProxy_ = process.env.HTTPS_PROXY || process.env.https_proxy; -Config.httpProxy_ = process.env.HTTP_PROXY || process.env.http_proxy; -exports.Config = Config; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map deleted file mode 100644 index 5a04cc20..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":";;AACA,yBAAyB;AACzB,6BAA6B;AAE7B,+BAA6B;AAG7B,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,QAAQ,CAAC,CAAC;AAalC;;;;;;GAMG;AACH;IAsBE,MAAM,CAAC,MAAM;QACX,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,MAAM;QACX,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,OAAO;QACZ,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,SAAS;QACd,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,UAAU;QACf,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,cAAc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,CAAC,IAAI,EAAE,CAAC;AACpB,eAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;AACxD,kBAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;AACjE,iBAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AApBvE,wBAgGC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts deleted file mode 100644 index e8fbef5f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Binary, BinaryUrl } from '../binaries'; -/** - * The downloaded binary is the binary with the list of versions downloaded. - */ -export declare class DownloadedBinary extends Binary { - versions: string[]; - binary: Binary; - constructor(binary: Binary); - id(): string; - prefix(): string; - suffix(): string; - getUrl(): Promise; - getVersionList(): Promise; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js deleted file mode 100644 index 6d00cce0..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const binaries_1 = require("../binaries"); -/** - * The downloaded binary is the binary with the list of versions downloaded. - */ -class DownloadedBinary extends binaries_1.Binary { - constructor(binary) { - super(); - this.versions = []; - this.binary = binary; - this.name = binary.name; - this.versionCustom = binary.versionCustom; - } - id() { - return this.binary.id(); - } - prefix() { - return null; - } - suffix() { - return null; - } - getUrl() { - return null; - } - getVersionList() { - return null; - } -} -exports.DownloadedBinary = DownloadedBinary; -//# sourceMappingURL=downloaded_binary.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map deleted file mode 100644 index f88f1348..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloaded_binary.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"downloaded_binary.js","sourceRoot":"","sources":["../../../lib/files/downloaded_binary.ts"],"names":[],"mappings":";;AAAA,0CAA8C;AAE9C;;GAEG;AACH,sBAA8B,SAAQ,iBAAM;IAI1C,YAAY,MAAc;QACxB,KAAK,EAAE,CAAC;QAJV,aAAQ,GAAa,EAAE,CAAC;QAKtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IAC5C,CAAC;IAED,EAAE;QACA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,MAAM;QACJ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,MAAM;QACJ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IACD,cAAc;QACZ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;CACF;AA3BD,4CA2BC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts deleted file mode 100644 index 3cc75e4d..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Binary } from '../binaries'; -/** - * The file downloader. - */ -export declare class Downloader { - /** - * Http get the file. Check the content length of the file before writing the file. - * If the content length does not match, remove it and download the file. - * - * @param binary The binary of interest. - * @param fileName The file name. - * @param outputDir The directory where files are downloaded and stored. - * @param contentLength The content length of the existing file. - * @param opt_proxy The proxy for downloading files. - * @param opt_callback Callback method to be executed after the file is downloaded. - * @returns Promise Resolves true = downloaded. Resolves false = not downloaded. - * Rejected with an error. - */ - static getFile(binary: Binary, fileUrl: string, fileName: string, outputDir: string, contentLength: number, callback?: Function): Promise; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js deleted file mode 100644 index 067389cf..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const path = require("path"); -const request = require("request"); -const url = require("url"); -const cli_1 = require("../cli"); -const http_utils_1 = require("../http_utils"); -let logger = new cli_1.Logger('downloader'); -/** - * The file downloader. - */ -class Downloader { - /** - * Http get the file. Check the content length of the file before writing the file. - * If the content length does not match, remove it and download the file. - * - * @param binary The binary of interest. - * @param fileName The file name. - * @param outputDir The directory where files are downloaded and stored. - * @param contentLength The content length of the existing file. - * @param opt_proxy The proxy for downloading files. - * @param opt_callback Callback method to be executed after the file is downloaded. - * @returns Promise Resolves true = downloaded. Resolves false = not downloaded. - * Rejected with an error. - */ - static getFile(binary, fileUrl, fileName, outputDir, contentLength, callback) { - let filePath = path.resolve(outputDir, fileName); - let file; - let options = http_utils_1.HttpUtils.initOptions(fileUrl); - let req = null; - let resContentLength; - return new Promise((resolve, reject) => { - req = request(options); - req.on('response', response => { - if (response.statusCode === 200) { - resContentLength = +response.headers['content-length']; - if (contentLength === resContentLength) { - // if the size is the same, do not download and stop here - response.destroy(); - resolve(false); - } - else { - let curl = outputDir + '/' + fileName + ' ' + options.url; - if (http_utils_1.HttpUtils.requestOpts.proxy) { - let pathUrl = url.parse(options.url.toString()).path; - let host = url.parse(options.url.toString()).host; - let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); - curl = outputDir + '/' + fileName + ' \'' + newFileUrl + - '\' -H \'host:' + host + '\''; - } - if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { - curl = 'k ' + curl; - } - logger.info('curl -o' + curl); - // only pipe if the headers are different length - file = fs.createWriteStream(filePath); - req.pipe(file); - file.on('close', () => { - fs.stat(filePath, (error, stats) => { - if (error) { - error.msg = 'Error: Got error ' + error + ' from ' + fileUrl; - return reject(error); - } - if (stats.size != resContentLength) { - error.msg = 'Error: corrupt download for ' + fileName + - '. Please re-run webdriver-manager update'; - fs.unlinkSync(filePath); - reject(error); - } - if (callback) { - callback(binary, outputDir, fileName); - } - resolve(true); - }); - }); - } - } - else { - let error = new Error(); - error.msg = - 'Expected response code 200, received: ' + response.statusCode; - reject(error); - } - }); - req.on('error', error => { - if (error.code === 'ETIMEDOUT') { - error.msg = 'Connection timeout downloading: ' + fileUrl + - '. Default timeout is 4 minutes.'; - } - else if (error.connect) { - error.msg = 'Could not connect to the server to download: ' + fileUrl; - } - reject(error); - }); - }) - .catch(error => { - logger.error(error.msg || error.message); - }); - } -} -exports.Downloader = Downloader; -//# sourceMappingURL=downloader.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map deleted file mode 100644 index 63858282..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/downloader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"downloader.js","sourceRoot":"","sources":["../../../lib/files/downloader.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,mCAAmC;AACnC,2BAA2B;AAG3B,gCAA8B;AAE9B,8CAAwC;AAExC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,YAAY,CAAC,CAAC;AAEtC;;GAEG;AACH;IACE;;;;;;;;;;;;OAYG;IACH,MAAM,CAA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AAO,CAAC,IAAI,CAAC,CAAC;4BAChB,CAAC,CAAC,CAAC;wBACL,CAAC,CAAC,CAAC;oBACL,CAAC;gBAEH,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACN,IAAI,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;oBACvB,KAAa,CAAC,GAAG;wBACd,wCAAwC,GAAG,QAAQ,CAAC,UAAU,CAAC;oBACnE,MAAM,CAAC,KAAK,CAAC,CAAC;gBAChB,CAAC;YACH,CAAC,CAAC,CAAC;YACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK;gBACnB,EAAE,CAAC,CAAE,KAAa,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;oBACvC,KAAa,CAAC,GAAG,GAAG,kCAAkC,GAAG,OAAO;wBAC7D,iCAAiC,CAAC;gBACxC,CAAC;gBAAC,IAAI,CAAC,EAAE,CAAC,CAAE,KAAa,CAAC,OAAO,CAAC,CAAC,CAAC;oBACjC,KAAa,CAAC,GAAG,GAAG,+CAA+C,GAAG,OAAO,CAAC;gBACjF,CAAC;gBACD,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;aACJ,KAAK,CAAC,KAAK;YACV,MAAM,CAAC,KAAK,CAAE,KAAa,CAAC,GAAG,IAAK,KAAa,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACT,CAAC;CACF;AA5FD,gCA4FC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts deleted file mode 100644 index 7edf34ee..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Binary, BinaryMap } from '../binaries'; -import { DownloadedBinary } from './downloaded_binary'; -/** - * The File Manager class is where the webdriver manager will compile a list of - * binaries that could be downloaded and get a list of previously downloaded - * file versions. - */ -export declare class FileManager { - /** - * Create a directory if it does not exist. - * @param outputDir The directory to create. - */ - static makeOutputDirectory(outputDir: string): void; - /** - * For the operating system, check against the list of operating systems that the - * binary is available for. - * @param osType The operating system. - * @param binary The class type to have access to the static properties. - * @returns If the binary is available for the operating system. - */ - static checkOS_(osType: string, binary: typeof Binary): boolean; - /** - * For the operating system, create a list that includes the binaries - * for selenium standalone, chrome, and internet explorer. - * @param osType The operating system. - * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. - * @returns A binary map that are available for the operating system. - */ - static compileBinaries_(osType: string, alternateCDN?: string): BinaryMap; - /** - * Look up the operating system and compile a list of binaries that are available - * for the system. - * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. - * @returns A binary map that is available for the operating system. - */ - static setupBinaries(alternateCDN?: string): BinaryMap; - /** - * Get the list of existing files from the output directory - * @param outputDir The directory where binaries are saved - * @returns A list of existing files. - */ - static getExistingFiles(outputDir: string): string[]; - /** - * For the binary, operating system, and system architecture, look through - * the existing files and the downloaded binary - * @param binary The binary of interest - * @param osType The operating system. - * @param existingFiles A list of existing files. - * @returns The downloaded binary with all the versions found. - */ - static downloadedVersions_(binary: T, osType: string, arch: string, existingFiles: string[]): DownloadedBinary; - /** - * Finds all the downloaded binary versions stored in the output directory. - * @param outputDir The directory where files are downloaded and stored. - * @returns An dictionary map of all the downloaded binaries found in the output folder. - */ - static downloadedBinaries(outputDir: string): BinaryMap; - /** - * Try to download the binary version. - * @param binary The binary of interest. - * @param outputDir The directory where files are downloaded and stored. - * @returns Promise resolved to true for files downloaded, resolved to false for files not - * downloaded because they exist, rejected if there is an error. - */ - static downloadFile(binary: T, outputDir: string, callback?: Function): Promise; - /** - * Removes the existing files found in the output directory that match the - * binary prefix names. - * @param outputDir The directory where files are downloaded and stored. - */ - static removeExistingFiles(outputDir: string): void; -} diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js deleted file mode 100644 index 761cbff2..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js +++ /dev/null @@ -1,239 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs = require("fs"); -const path = require("path"); -const binaries_1 = require("../binaries"); -const cli_1 = require("../cli"); -const config_1 = require("../config"); -const downloaded_binary_1 = require("./downloaded_binary"); -const downloader_1 = require("./downloader"); -let logger = new cli_1.Logger('file_manager'); -/** - * The File Manager class is where the webdriver manager will compile a list of - * binaries that could be downloaded and get a list of previously downloaded - * file versions. - */ -class FileManager { - /** - * Create a directory if it does not exist. - * @param outputDir The directory to create. - */ - static makeOutputDirectory(outputDir) { - try { - fs.statSync(outputDir); - } - catch (e) { - logger.info('creating folder ' + outputDir); - fs.mkdirSync(outputDir); - } - } - /** - * For the operating system, check against the list of operating systems that the - * binary is available for. - * @param osType The operating system. - * @param binary The class type to have access to the static properties. - * @returns If the binary is available for the operating system. - */ - static checkOS_(osType, binary) { - for (let os in binary.os) { - if (binaries_1.OS[os] == osType) { - return true; - } - } - return false; - } - /** - * For the operating system, create a list that includes the binaries - * for selenium standalone, chrome, and internet explorer. - * @param osType The operating system. - * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. - * @returns A binary map that are available for the operating system. - */ - static compileBinaries_(osType, alternateCDN) { - let binaries = {}; - if (FileManager.checkOS_(osType, binaries_1.Standalone)) { - binaries[binaries_1.Standalone.id] = new binaries_1.Standalone(alternateCDN); - } - if (FileManager.checkOS_(osType, binaries_1.ChromeDriver)) { - binaries[binaries_1.ChromeDriver.id] = new binaries_1.ChromeDriver(alternateCDN); - } - if (FileManager.checkOS_(osType, binaries_1.GeckoDriver)) { - binaries[binaries_1.GeckoDriver.id] = new binaries_1.GeckoDriver(alternateCDN); - } - if (FileManager.checkOS_(osType, binaries_1.IEDriver)) { - binaries[binaries_1.IEDriver.id] = new binaries_1.IEDriver(alternateCDN); - } - if (FileManager.checkOS_(osType, binaries_1.AndroidSDK)) { - binaries[binaries_1.AndroidSDK.id] = new binaries_1.AndroidSDK(alternateCDN); - } - if (FileManager.checkOS_(osType, binaries_1.Appium)) { - binaries[binaries_1.Appium.id] = new binaries_1.Appium(alternateCDN); - } - return binaries; - } - /** - * Look up the operating system and compile a list of binaries that are available - * for the system. - * @param alternateCDN URL of the alternative CDN to be used instead of the default ones. - * @returns A binary map that is available for the operating system. - */ - static setupBinaries(alternateCDN) { - return FileManager.compileBinaries_(config_1.Config.osType(), alternateCDN); - } - /** - * Get the list of existing files from the output directory - * @param outputDir The directory where binaries are saved - * @returns A list of existing files. - */ - static getExistingFiles(outputDir) { - try { - return fs.readdirSync(outputDir); - } - catch (e) { - return []; - } - } - /** - * For the binary, operating system, and system architecture, look through - * the existing files and the downloaded binary - * @param binary The binary of interest - * @param osType The operating system. - * @param existingFiles A list of existing files. - * @returns The downloaded binary with all the versions found. - */ - static downloadedVersions_(binary, osType, arch, existingFiles) { - let versions = []; - for (let existPos in existingFiles) { - let existFile = existingFiles[existPos]; - // use only files that have a prefix and suffix that we care about - if (existFile.indexOf(binary.prefix()) === 0) { - let editExistFile = existFile.replace(binary.prefix(), ''); - // if the suffix matches the executable suffix, add it - if (binary.suffix() === binary.executableSuffix()) { - versions.push(editExistFile.replace(binary.suffix(), '')); - } - else if (!existFile.endsWith('.zip') && !existFile.endsWith('.tar.gz') && - existFile.indexOf(binary.suffix()) === -1) { - editExistFile = editExistFile.replace(binary.executableSuffix(), ''); - editExistFile = editExistFile.indexOf('_') === 0 ? - editExistFile.substring(1, editExistFile.length) : - editExistFile; - versions.push(editExistFile); - } - } - } - if (versions.length === 0) { - return null; - } - let downloadedBinary = new downloaded_binary_1.DownloadedBinary(binary); - downloadedBinary.versions = versions; - return downloadedBinary; - } - /** - * Finds all the downloaded binary versions stored in the output directory. - * @param outputDir The directory where files are downloaded and stored. - * @returns An dictionary map of all the downloaded binaries found in the output folder. - */ - static downloadedBinaries(outputDir) { - let ostype = config_1.Config.osType(); - let arch = config_1.Config.osArch(); - let binaries = FileManager.setupBinaries(); - let existingFiles = FileManager.getExistingFiles(outputDir); - let downloaded = {}; - for (let bin in binaries) { - let binary = FileManager.downloadedVersions_(binaries[bin], ostype, arch, existingFiles); - if (binary != null) { - downloaded[binary.id()] = binary; - } - } - return downloaded; - } - /** - * Try to download the binary version. - * @param binary The binary of interest. - * @param outputDir The directory where files are downloaded and stored. - * @returns Promise resolved to true for files downloaded, resolved to false for files not - * downloaded because they exist, rejected if there is an error. - */ - static downloadFile(binary, outputDir, callback) { - return new Promise((resolve, reject) => { - let outDir = config_1.Config.getSeleniumDir(); - let downloaded = FileManager.downloadedBinaries(outputDir); - let contentLength = 0; - // Pass options down to binary to make request to get the latest version to download. - binary.getUrl(binary.version()).then(fileUrl => { - binary.versionCustom = fileUrl.version; - let filePath = path.resolve(outputDir, binary.filename()); - let fileName = binary.filename(); - // If we have downloaded the file before, check the content length - if (downloaded[binary.id()]) { - let downloadedBinary = downloaded[binary.id()]; - let versions = downloadedBinary.versions; - let version = binary.versionCustom; - for (let index in versions) { - let v = versions[index]; - if (v === version) { - contentLength = fs.statSync(filePath).size; - downloader_1.Downloader.getFile(binary, fileUrl.url, fileName, outputDir, contentLength, callback) - .then(downloaded => { - resolve(downloaded); - }); - } - } - } - // We have not downloaded it before, or the version does not exist. Use the default content - // length of zero and download the file. - downloader_1.Downloader.getFile(binary, fileUrl.url, fileName, outputDir, contentLength, callback) - .then(downloaded => { - resolve(downloaded); - }); - }); - }); - } - /** - * Removes the existing files found in the output directory that match the - * binary prefix names. - * @param outputDir The directory where files are downloaded and stored. - */ - static removeExistingFiles(outputDir) { - try { - fs.statSync(outputDir); - } - catch (e) { - logger.warn('path does not exist ' + outputDir); - return; - } - let existingFiles = FileManager.getExistingFiles(outputDir); - if (existingFiles.length === 0) { - logger.warn('no files found in path ' + outputDir); - return; - } - let binaries = FileManager.setupBinaries(); - existingFiles.forEach((file) => { - for (let binPos in binaries) { - let bin = binaries[binPos]; - if (file.indexOf(bin.prefix()) !== -1) { - bin.remove(path.resolve(outputDir, file)); - logger.info('removed ' + file); - } - } - }); - let metaFiles = [ - 'chrome-response.xml', 'gecko-response.json', 'iedriver-response.xml', - 'standalone-response.xml', 'update-config.json' - ]; - for (let metaFile of metaFiles) { - try { - let metaFilePath = path.resolve(outputDir, metaFile); - if (fs.statSync(metaFilePath)) { - fs.unlinkSync(metaFilePath); - logger.info('removed ' + metaFile); - } - } - catch (e) { - } - } - } -} -exports.FileManager = FileManager; -//# sourceMappingURL=file_manager.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map deleted file mode 100644 index e693a4f2..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/file_manager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"file_manager.js","sourceRoot":"","sources":["../../../lib/files/file_manager.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAG7B,0CAAuH;AACvH,gCAA8B;AAC9B,sCAAiC;AAEjC,2DAAqD;AACrD,6CAAwC;AAExC,IAAI,MAAM,GAAG,IAAI,YAAM,CAAC,cAAc,CAAC,CAAC;AAExC;;;;GAIG;AACH;IACE;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAiB;QAC1C,IAAI,CAAC;YACH,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;QAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;YAC5C,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAc,EAAE,MAAqB;QACnD,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,MAAM,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AAC;YACH,CAAC;YAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACb,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA9OD,kCA8OC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts deleted file mode 100644 index 74536c2e..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './downloaded_binary'; -export * from './downloader'; -export * from './file_manager'; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js deleted file mode 100644 index 0596600f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./downloaded_binary")); -__export(require("./downloader")); -__export(require("./file_manager")); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map deleted file mode 100644 index 222383da..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/files/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/files/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAAoC;AACpC,kCAA6B;AAC7B,oCAA+B"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts deleted file mode 100644 index 61d9449d..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// -import { OptionsWithUrl } from 'request'; -export interface RequestOptionsValue { - proxy?: string; - ignoreSSL?: boolean; -} -export declare class HttpUtils { - static requestOpts: RequestOptionsValue; - static assignOptions(options: RequestOptionsValue): void; - static initOptions(url: string, timeout?: number): OptionsWithUrl; - static optionsSSL(options: OptionsWithUrl, opt_ignoreSSL: boolean): OptionsWithUrl; - static optionsProxy(options: OptionsWithUrl, requestUrl: string, opt_proxy: string): OptionsWithUrl; - static optionsHeader(options: OptionsWithUrl, key: string, value: string): OptionsWithUrl; - /** - * Resolves proxy based on values set - * @param fileUrl The url to download the file. - * @param opt_proxy The proxy to connect to to download files. - * @return Either undefined or the proxy. - */ - static resolveProxy(fileUrl: string, opt_proxy?: string): string; -} -/** - * Request the body from the url. - * @param requestUrl The request url. - * @returns A promise string of the response body. - */ -export declare function requestBody(requestUrl: string): Promise; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js deleted file mode 100644 index 6122ea73..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const request = require("request"); -const url = require("url"); -const logger_1 = require("./cli/logger"); -const config_1 = require("./config"); -let logger = new logger_1.Logger('http_utils'); -class HttpUtils { - static assignOptions(options) { - Object.assign(HttpUtils.requestOpts, options); - } - static initOptions(url, timeout) { - let options = { - url: url, - // default Linux can be anywhere from 20-120 seconds - // increasing this arbitrarily to 4 minutes - timeout: 240000 - }; - HttpUtils.optionsSSL(options, HttpUtils.requestOpts.ignoreSSL); - HttpUtils.optionsProxy(options, url, HttpUtils.requestOpts.proxy); - return options; - } - static optionsSSL(options, opt_ignoreSSL) { - if (opt_ignoreSSL) { - logger.info('ignoring SSL certificate'); - options.strictSSL = !opt_ignoreSSL; - options.rejectUnauthorized = !opt_ignoreSSL; - } - return options; - } - static optionsProxy(options, requestUrl, opt_proxy) { - if (opt_proxy) { - options.proxy = HttpUtils.resolveProxy(requestUrl, opt_proxy); - if (url.parse(requestUrl).protocol === 'https:') { - options.url = requestUrl.replace('https:', 'http:'); - } - } - return options; - } - static optionsHeader(options, key, value) { - if (options.headers == null) { - options.headers = {}; - } - options.headers[key] = value; - return options; - } - /** - * Resolves proxy based on values set - * @param fileUrl The url to download the file. - * @param opt_proxy The proxy to connect to to download files. - * @return Either undefined or the proxy. - */ - static resolveProxy(fileUrl, opt_proxy) { - let protocol = url.parse(fileUrl).protocol; - let hostname = url.parse(fileUrl).hostname; - if (opt_proxy) { - return opt_proxy; - } - else { - // If the NO_PROXY environment variable exists and matches the host name, - // to ignore the resolve proxy. - // the checks to see if it exists and equal to empty string is to help with testing - let noProxy = config_1.Config.noProxy(); - if (noProxy) { - // array of hostnames/domain names listed in the NO_PROXY environment variable - let noProxyTokens = noProxy.split(','); - // check if the fileUrl hostname part does not end with one of the - // NO_PROXY environment variable's hostnames/domain names - for (let noProxyToken of noProxyTokens) { - if (hostname.indexOf(noProxyToken) !== -1) { - return undefined; - } - } - } - // If the HTTPS_PROXY and HTTP_PROXY environment variable is set, use that as the proxy - if (protocol === 'https:') { - return config_1.Config.httpsProxy() || config_1.Config.httpProxy(); - } - else if (protocol === 'http:') { - return config_1.Config.httpProxy(); - } - } - return undefined; - } -} -HttpUtils.requestOpts = {}; -exports.HttpUtils = HttpUtils; -/** - * Request the body from the url. - * @param requestUrl The request url. - * @returns A promise string of the response body. - */ -function requestBody(requestUrl) { - const options = HttpUtils.initOptions(requestUrl); - options.followRedirect = true; - return new Promise((resolve, reject) => { - const req = request(options); - req.on('response', response => { - if (response.statusCode === 200) { - let output = ''; - response.on('data', (data) => { - output += data; - }); - response.on('end', () => { - resolve(output); - }); - } - else { - reject(new Error('response status code is not 200')); - } - }); - req.on('error', error => { - reject(error); - }); - }); -} -exports.requestBody = requestBody; -//# sourceMappingURL=http_utils.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map deleted file mode 100644 index 5a67b445..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/http_utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http_utils.js","sourceRoot":"","sources":["../../lib/http_utils.ts"],"names":[],"mappings":";;AAAA,mCAAmC;AAEnC,2BAA2B;AAE3B,yCAAoC;AACpC,qCAAgC;AAEhC,IAAI,MAAM,GAAG,IAAI,eAAM,CAAC,YAAY,CAAC,CAAC;AAOtC;IAEE,MAAM,CAAC,aAAa,CAAC,OAA4B;QAC/C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,OAAgB;QAC9C,IAAI,OAAO,GAAmB;YAC5B,GAAG,EAAE,GAAG;YACR,oDAAoD;YACpD,2CAA2C;YAC3C,OAAO,EAAE,MAAM;SAChB,CAAC;QACF,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC/D,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,CAAC,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAuB,EAAE,aAAsB;QAC/D,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YACxC,OAAO,CAAC,SAAS,GAAG,CAAC,aAAa,CAAC;YAClC,OAAe,CAAC,kBAAkB,GAAG,CAAC,aAAa,CAAC;QACvD,CAAC;QAED,MAAM,CAAC,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAuB,EAAE,UAAkB,EAAE,SAAiB;QAEhF,EAAE,CAAC,CA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,KAAK,EAAE;oBACjB,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClB,CAAC,CAAC,CAAC;YACL,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;YACvD,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK;YACnB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,kCAsBC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts deleted file mode 100644 index 21740b35..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import * as child_process from 'child_process'; -export declare let spawn: (cmd: string, args: string[], stdio?: any, opts?: child_process.SpawnOptions) => child_process.ChildProcess; -export declare let spawnSync: (cmd: string, args: string[], stdio?: any, opts?: child_process.SpawnSyncOptions) => child_process.SpawnSyncReturns; -export declare function request(method: string, port: string, path: string, timeout?: number, data?: any): Promise; -export declare function adb(sdkPath: string, port: number, command: string, timeout: number, args?: string[]): Promise; diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js deleted file mode 100644 index cb33251f..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const child_process = require("child_process"); -const fs = require("fs"); -const http = require("http"); -const path = require("path"); -const config_1 = require("./config"); -function spawnFactory(sync) { - return (cmd, args, stdio, opts) => { - if ((config_1.Config.osType() === 'Windows_NT') && (cmd.slice(-4) !== '.exe')) { - if (fs.existsSync(cmd + '.exe')) { - cmd += '.exe'; - } - else { - args = ['/c'].concat([cmd], args); - cmd = 'cmd'; - } - } - if (stdio) { - opts = opts || {}; - opts.stdio = stdio; - } - if (sync) { - return child_process.spawnSync(cmd, args, opts); - } - else { - return child_process.spawn(cmd, args, opts); - } - }; -} -exports.spawn = spawnFactory(false); -exports.spawnSync = spawnFactory(true); -function request(method, port, path, timeout, data) { - let headers = {}; - let hasContent = data && ((method == 'POST') || (method == 'PUT')); - if (hasContent) { - data = data ? JSON.stringify(data) : ''; - headers['Content-Length'] = data.length; - headers['Content-Type'] = 'application/json;charset=UTF-8'; - } - return new Promise((resolve, reject) => { - let unexpectedEnd = () => { - reject({ code: 'UNKNOWN', message: 'Request ended unexpectedly' }); - }; - let req = http.request({ port: parseInt(port), method: method, path: path, headers: headers }, (res) => { - req.removeListener('end', unexpectedEnd); - if (res.statusCode !== 200) { - reject({ code: res.statusCode, message: res.statusMessage }); - } - else { - let buffer = []; - res.on('data', buffer.push.bind(buffer)); - res.on('end', () => { - resolve(buffer.join('').replace(/\0/g, '')); - }); - } - }); - if (timeout) { - req.setTimeout(timeout, () => { - reject({ code: 'TIMEOUT', message: 'Request timed out' }); - }); - } - req.on('error', reject); - req.on('end', unexpectedEnd); - if (hasContent) { - req.write(data); - } - req.end(); - }); -} -exports.request = request; -function adb(sdkPath, port, command, timeout, args) { - return new Promise((resolve, reject) => { - let child = exports.spawn(path.resolve(sdkPath, 'platform-tools', 'adb'), ['-s', 'emulator-' + port, command].concat(args || []), 'pipe'); - let done = false; - let buffer = []; - child.stdout.on('data', buffer.push.bind(buffer)); - child.on('error', (err) => { - if (!done) { - done = true; - reject(err); - } - }); - child.on('exit', (code, signal) => { - if (!done) { - done = true; - if (code === 0) { - resolve(buffer.join('')); - } - else { - reject({ - code: code, - message: 'abd command "' + command + '" ' + - (signal ? 'received signal ' + signal : 'returned with a non-zero exit code') + - 'for emulator-' + port - }); - } - } - }); - if (timeout) { - setTimeout(() => { - if (!done) { - done = true; - child.kill(); - reject({ - code: 'TIMEOUT', - message: 'adb command "' + command + '" timed out for emulator-' + port - }); - } - }, timeout); - } - }); -} -exports.adb = adb; -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map deleted file mode 100644 index 72cd0023..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAC/C,yBAAyB;AACzB,6BAA6B;AAC7B,6BAA6B;AAE7B,qCAAgC;AAQhC,sBAAsB,IAAa;IAIjC,MAAM,CAAC,CAAC,GAAW,EAAE,IAAc,EAAE,KAAc,EAC3C,IAAgE;QACtE,EAAE,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,KAAK,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;YACrE,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAChC,GAAG,IAAI,MAAM,CAAC;YAChB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;gBAClC,GAAG,GAAG,KAAK,CAAC;YACd,CAAC;QACH,CAAC;QACD,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACV,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;QACD,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACT,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,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T,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBACV,IAAI,GAAG,IAAI,CAAC;oBACZ,KAAK,CAAC,IAAI,EAAE,CAAC;oBACb,MAAM,CAAC;wBACL,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,2BAA2B,GAAG,IAAI;qBACxE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,EAAE,OAAO,CAAC,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA5CD,kBA4CC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.d.ts b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.d.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js deleted file mode 100644 index 4e661448..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const minimist = require("minimist"); -const cli_instance_1 = require("./cli_instance"); -let minimistOptions = cli_instance_1.cli.getMinimistOptions(); -let argv = minimist(process.argv.slice(2), minimistOptions); -let cmd = argv._; -if (cli_instance_1.cli.programs[cmd[0]]) { - if (cmd[0] === 'help') { - cli_instance_1.cli.printHelp(); - } - else if (cmd[1] === 'help' || argv['help'] || argv['h']) { - cli_instance_1.cli.programs[cmd[0]].printHelp(); - } - else { - cli_instance_1.cli.programs[cmd[0]].run(JSON.parse(JSON.stringify(argv))); - } -} -else { - cli_instance_1.cli.printHelp(); -} -//# sourceMappingURL=webdriver.js.map \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map b/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map deleted file mode 100644 index 12cbdf5b..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/lib/webdriver.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webdriver.js","sourceRoot":"","sources":["../../lib/webdriver.ts"],"names":[],"mappings":";;AAAA,qCAAqC;AAErC,iDAAkD;AAElD,IAAI,eAAe,GAAG,kBAAW,CAAC,kBAAkB,EAAE,CAAC;AACvD,IAAI,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;AAC5D,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;AACjB,EAAE,CAAC,CAAC,kBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;QACtB,kBAAW,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC1D,kBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3C,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,kBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAAC,IAAI,CAAC,CAAC;IACN,kBAAW,CAAC,SAAS,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/built/package.json b/test-eol-project/node_modules/webdriver-manager/built/package.json deleted file mode 100644 index 08490842..00000000 --- a/test-eol-project/node_modules/webdriver-manager/built/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "webdriver-manager", - "version": "12.1.9", - "description": "A selenium server and browser driver manager for your end to end tests.", - "scripts": { - "format": "gulp format", - "format-enforce": "gulp format:enforce", - "gulp": "gulp", - "jasmine": "jasmine", - "prepublish": "npm run format-enforce && tsc && gulp copy", - "tsc": "tsc", - "pretest": "tsc && gulp copy", - "test": "npm run test-unit && npm run test-e2e", - "test-unit": "jasmine", - "pretest-e2e:update": "node ./bin/webdriver-manager update", - "pretest-e2e:start": "node ./bin/webdriver-manager start --detach --seleniumPort 4444 --quiet", - "pretest-e2e": "npm run pretest && npm run pretest-e2e:update && npm run pretest-e2e:start", - "test-e2e": "jasmine JASMINE_CONFIG_PATH=e2e_spec/support/headless.json", - "posttest-e2e": "node ./bin/webdriver-manager shutdown" - }, - "keywords": [ - "angular", - "test", - "testing", - "protractor", - "webdriver", - "webdriverjs", - "selenium", - "selenium-webdriver" - ], - "repository": { - "type": "git", - "url": "git://github.com/angular/webdriver-manager.git" - }, - "bin": { - "webdriver-manager": "bin/webdriver-manager" - }, - "main": "built/lib/webdriver.js", - "author": "Craig Nishina ", - "license": "MIT", - "dependencies": { - "adm-zip": "^0.5.2", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.87.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - }, - "devDependencies": { - "@types/adm-zip": "^0.5.0", - "@types/chalk": "^0.4.28", - "@types/form-data": "^0.0.33", - "@types/glob": "^5.0.29", - "@types/ini": "^1.3.28", - "@types/jasmine": "^2.5.43", - "@types/minimatch": "^2.0.28", - "@types/minimist": "^1.1.28", - "@types/node": "^7.0.4", - "@types/q": "^0.0.32", - "@types/request": "^0.0.39", - "@types/rimraf": "^0.0.28", - "@types/selenium-webdriver": "^2.53.35", - "@types/semver": "^5.3.30", - "@types/xml2js": "0.0.32", - "clang-format": "^1.0.35", - "gulp": "^4.0.0", - "gulp-clang-format": "^1.0.23", - "jasmine": "^2.4.1", - "run-sequence": "^1.1.5", - "selenium-webdriver": "~3.0.1", - "typescript": "~2.3.0" - }, - "engines": { - "node": ">=6.9.x" - } -} diff --git a/test-eol-project/node_modules/webdriver-manager/config.json b/test-eol-project/node_modules/webdriver-manager/config.json deleted file mode 100644 index cc7625a6..00000000 --- a/test-eol-project/node_modules/webdriver-manager/config.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "webdriverVersions": { - "selenium": "2.53.1", - "chromedriver": "2.27", - "maxChromedriver": "77", - "geckodriver": "v0.13.0", - "iedriver": "2.53.1", - "androidsdk": "24.4.1", - "appium": "1.6.5" - }, - "cdnUrls": { - "selenium": "https://selenium-release.storage.googleapis.com/", - "chromedriver": "https://chromedriver.storage.googleapis.com/", - "geckodriver": "https://github.com/mozilla/geckodriver/releases/download/", - "iedriver": "https://selenium-release.storage.googleapis.com/", - "androidsdk": "http://dl.google.com/android/" - } -} diff --git a/test-eol-project/node_modules/webdriver-manager/docs/README.md b/test-eol-project/node_modules/webdriver-manager/docs/README.md deleted file mode 100644 index efc1fb5d..00000000 --- a/test-eol-project/node_modules/webdriver-manager/docs/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Contents - -- [main page](../README.md) -- [mobile browser support](mobile.md) -- [protractor support](protractor.md) -- [set specific versions](versions.md) diff --git a/test-eol-project/node_modules/webdriver-manager/docs/mobile.md b/test-eol-project/node_modules/webdriver-manager/docs/mobile.md deleted file mode 100644 index 64ddd36a..00000000 --- a/test-eol-project/node_modules/webdriver-manager/docs/mobile.md +++ /dev/null @@ -1,79 +0,0 @@ -Mobile Browser Support -====================== - -Support for mobile browsers is provided via [appium](https://github.com/appium/appium). If you -have used `webdriver-manager update --android` or `webdriver-manager update --ios`, when you run -`webdriver-manager start`, Appium will automatically start on the port specified by `--appium-port`. - - -Android SDK ------------ - -`webdriver-manager` will not install the android SDK by default. If you want to test on android, -run `webdriver-manager update --android`. This will download the android SDK, Appium, and set up -some virtual android devices for you to run tests against. By default, this will create only an -android device running version 24 on x86-64. If you need a different device, you must use the -`--android-api-levels` and `--android-abis` flags. So you might run a command like this: - -``` -webdriver-manager update --android --android-api-levels 24 --android-archs armeabi-v7a -``` - -Valid values for the `--android-api-levels` flag are: `24` and `25`. You *can* specify a lower -API level, but the virtual device create will not have Chrome installed. - -Valid values for the `--android-archs` flag are: - -* `x86` -* `x86_64` -* `armeabi-v7a` (or possibly some other 32-bit ARM architecture) -* `arm64-v8a` (or possibly some other 64-bit ARM architecture) -* `mips` - -Note that we always use the `google_apis/*` ABIs, since only those versions comes with chrome. So -if you specify `--android-archs x86_64`, this tool will use the ABI `google_apis/x86_64`. If you -wish to use a different platform (i.e. `android-wear`, `android-tv` or `default`), you can do so -with the `--android-platforms` flag. But only the `google_apis` version comes with Chrome. - - -As a practical matter, if you don't want to manually accept the license agreements, you can use -`--android-accept-licenses`, which will accept them on your behalf. - -Once you have installed the Android SDK with the virtual devices you need, use -`webdriver-manager start --android` to boot up Appium and begin emulating your android device(s). -By default `webdriver-manager` will emulate all available android devices. If you would rather -emulate a specific device, use `--avds`. So you might use: - -``` -webdriver-manager start --android --avds android-23-default-x86_64 -``` - -If you would prefer not to emulate any android virtual devices, use `--avds none`. - -If you need to specify the ports used by the android virtual devices, use `--avd_port`. The port -you specify will be used for the console of the first device, and the port one higher will be used -for its ADB. The second device will use the next two ports, and so on. - - -### "Welcome to Chome" UI - -Every time appium boots up chrome, a "Welcome to Chrome" dialog will pop up. It won't interfere -with your tests, since the webpage still renders underneath the dialog, and those tests access the -webpage directly. However, you won't be able to watch what's going on unless you manually click -"Accept & Continue". Also, since webdriver boots up a fresh chrome instance every time, chrome -won't remember that you've clicked "Accept & Continue" between tests. Any time you want to actually -watch the test as it's run, you'll need to click through the dialog again. For now, there is no -good way around this sadly (https://github.com/appium/appium/issues/6618). - -iOS ---------- - -When you run `webdriver-manager update --ios`, `webdriver-manager` will install Appium and check -your computer for iOS simulation capabilities. `webdriver-manager` cannot download the xcode -commandline tools for you however, nor can it agree to Apple's user agreement. The xcode -commandline tools come with several virtual devices pre-setup. If you need more, run -`xcrun simctl` for help doing that. - -Once you have installed Appium, `webdriver-manager` will launch it automatically when you run -`webdriver-manager start`. Appium will automatically handle starting iOS device emulation as -needed. diff --git a/test-eol-project/node_modules/webdriver-manager/docs/protractor.md b/test-eol-project/node_modules/webdriver-manager/docs/protractor.md deleted file mode 100644 index 0d236ea8..00000000 --- a/test-eol-project/node_modules/webdriver-manager/docs/protractor.md +++ /dev/null @@ -1,41 +0,0 @@ -# Protractor support topics - -## Supported browsers - -### Tests with Protractor test suite (v 4.0.13) - -The following are the supported browsers / drivers based on running the -Protractor test suite. Since the test suite checks only firefox and chrome, -these are the only browsers reported. - -### Current supported browsers / drivers - -| selenium standalone | firefox | chromedriver | chrome | -| ------------------- | ------- | ------------ | ------ | -| 2.53.1 | 47.0.1 | 2.26 | 54 | - - -### Investigated - -| selenium standalone | firefox 47.0.1 | firefox 49.0.1 | -| ------------------- | -------------- | -------------- | -| 2.53.1 | pass | fail | -| 3.0.0 | fail | fail | - - -## Driver providers - -There are a couple cases where Protractor launches downloaded binaries -(from webdriver-manager) without specifying which version to use: - -- local driver providers - when no `seleniumAddress`, `directConnect`, saucelabs - or browser stack configuration is set -- direct connect - when setting `directConnect` to true - -Protractor knows which downloaded binaries to use based on the -`update-config.json`. The `update-config.json` is written during the `update` -command and provides the path to the current downloaded version and a list of -all the binaries previously downloaded. - -During the launch of either local driver provider or direct connect, Protractor -will launch the last downloaded binary. diff --git a/test-eol-project/node_modules/webdriver-manager/docs/versions.md b/test-eol-project/node_modules/webdriver-manager/docs/versions.md deleted file mode 100644 index cf581386..00000000 --- a/test-eol-project/node_modules/webdriver-manager/docs/versions.md +++ /dev/null @@ -1,87 +0,0 @@ -# update command: downloading specific binaries - -The help command for update. The flags shown here are OS specific. If you are not on a Windows machine, the `--ie` flags are not shown. - -``` -webdriver-manager update help -``` - -Overview when you call `update`: - -* The output directory is created if it does not exist (`out_dir`) -* If this is the first time downloading, it will make web requests to selenium-release.storage.googleapis.com, chromedriver.storage.googleapis.com, and api.github.com. The responses will be stored in the `out_dir` as a cache. -* If this is not the first time downloading, it will look at the cached files in `out_dir` and if the file is older than an hour, it will make a request for new files. Note: api.github.com is rate limited by the ip address making the request. This is an issue for common CI systems like Travis or Circle and have an issue opened for this. -* The response will then be parsed for the url to get the latest version if no version is provided via command line. The latest version will be based on what is available for your OS type and architecture. -* Next we download the file from the url. If the file already exists (based on content length), we cancel the download. -* We uncompress zip and tar files and for linux and mac, we set the permissions. Currently, we always uncompress the files even if the uncompressed files already exist. -* Finally we write the file locations to the `update-config.json` which is also located in the `out_dir`. - -## Download defaults --chrome, --gecko, --standalone flags - -Let's say you want to download just chromedriver... - -``` -webdriver-manager update --gecko false --standalone false -``` - -Why do we set `--gecko` and `--standalone` to false? By default chromedriver, geckodriver and selenium standalone server download with no flags set. Setting `--gecko` and `--standalone` to false will prevent them from downloading and will just download chromedriver. - -## Download using --ie - -When setting the `--ie` flag, this will download IEDriver 32 bit. Why 32-bit? We prefer using the 32-bit version because the 64-bit version has been previously reported to be very slow and flaky. - -## Download a specific version - -Let's say there is an issue with the latest version of chromedriver and we need version 2.20: - -``` -webdriver-manager update --versions.chrome 2.20 -``` - -So the only thing different here is that instead of parsing for the latest version, we are parsing for version 2.20. We could then verify that it was the last item downloaded by calling `webdriver-manager status`. - -What about selenium standalone 2.53.1? This is similar but instead of the flag would be `--versions.standalone 2.53.1`. What if the selenium standalone server has a beta in the name? The idea is similar: - -``` -webdriver-manager update --versions.standalone 3.0.0-beta1 -``` - -# start command: setting specific versions - -The help command for start. - -``` -webdriver-manager start help -``` - -When starting selenium standalone server with `webdriver-manager start`, it will use the latest version that is found in the cache unless you specify the version. Why? The idea here is that if you run `webdriver-manager update` without flags, you are using the latest binary versions, so the start command would be similar `webdriver-manager start`. - -## Starting a specific version - -So let's say you downloaded chromedriver 2.20 and let's also say that the latest version is 2.29. If you have never downloaded 2.29, then chromedriver will not be associated with your selenium standalone server. In order for you to get 2.20 working: - -``` -webdriver-manager start --versions.chrome 2.20 -``` - -What about chrome version 2.20, selenium standalone server 3.0.0-beta1, and not start with gecko driver? - -``` -webdriver-manager start --versions.chrome 2.20 --versions.standalone 3.0.0-beta1 --gecko false -``` - -## Starting with --ie - -Since IEDriver is not set by default, you'll still need to pass this field if you would like to start the selenium standalone server with the IEDriver. - -``` -webdriver-manager start --ie -``` - -## Starting with --edge - -We make the assumption that you already have the EdgeDriver downloaded and installed. To get this working pass the full path to the `--edge` flag - -``` -webdriver-manager start --edge "C:\Program Files (x86)\Microsoft Web Driver\MicrosoftWebDriver.exe" -``` diff --git a/test-eol-project/node_modules/webdriver-manager/gulpfile.js b/test-eol-project/node_modules/webdriver-manager/gulpfile.js deleted file mode 100644 index f397bd1a..00000000 --- a/test-eol-project/node_modules/webdriver-manager/gulpfile.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; -const path = require('path'); -const gulp = require('gulp'); -const tsGlobs = ['lib/**/*.ts', '*spec/**/*.ts']; - -let runSpawn = (task, args, done) => { - done = done || function() {}; - const spawn = require('child_process').spawn; - let child = spawn(task, args, {stdio: 'inherit'}); - let running = false; - child.on('close', (code) => { - if (!running) { - running = true; - done(code); - } - }); - child.on('error', (err) => { - if (!running) { - console.error('gulp encountered a child error'); - running = true; - done(err || 1); - } - }); - return child; -}; - -gulp.task('copy', function() { - return gulp.src(['config.json', 'package.json']) - .pipe(gulp.dest('built/')); -}); - -gulp.task('format:enforce', () => { - const format = require('gulp-clang-format'); - const clangFormat = require('clang-format'); - return gulp.src(tsGlobs).pipe( - format.checkFormat('file', clangFormat, {verbose: true, fail: true})); -}); - -gulp.task('format', () => { - const format = require('gulp-clang-format'); - const clangFormat = require('clang-format'); - return gulp.src(tsGlobs, { base: '.' }).pipe( - format.format('file', clangFormat)).pipe(gulp.dest('.')); -}); \ No newline at end of file diff --git a/test-eol-project/node_modules/webdriver-manager/package.json b/test-eol-project/node_modules/webdriver-manager/package.json deleted file mode 100644 index 08490842..00000000 --- a/test-eol-project/node_modules/webdriver-manager/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "webdriver-manager", - "version": "12.1.9", - "description": "A selenium server and browser driver manager for your end to end tests.", - "scripts": { - "format": "gulp format", - "format-enforce": "gulp format:enforce", - "gulp": "gulp", - "jasmine": "jasmine", - "prepublish": "npm run format-enforce && tsc && gulp copy", - "tsc": "tsc", - "pretest": "tsc && gulp copy", - "test": "npm run test-unit && npm run test-e2e", - "test-unit": "jasmine", - "pretest-e2e:update": "node ./bin/webdriver-manager update", - "pretest-e2e:start": "node ./bin/webdriver-manager start --detach --seleniumPort 4444 --quiet", - "pretest-e2e": "npm run pretest && npm run pretest-e2e:update && npm run pretest-e2e:start", - "test-e2e": "jasmine JASMINE_CONFIG_PATH=e2e_spec/support/headless.json", - "posttest-e2e": "node ./bin/webdriver-manager shutdown" - }, - "keywords": [ - "angular", - "test", - "testing", - "protractor", - "webdriver", - "webdriverjs", - "selenium", - "selenium-webdriver" - ], - "repository": { - "type": "git", - "url": "git://github.com/angular/webdriver-manager.git" - }, - "bin": { - "webdriver-manager": "bin/webdriver-manager" - }, - "main": "built/lib/webdriver.js", - "author": "Craig Nishina ", - "license": "MIT", - "dependencies": { - "adm-zip": "^0.5.2", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.87.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - }, - "devDependencies": { - "@types/adm-zip": "^0.5.0", - "@types/chalk": "^0.4.28", - "@types/form-data": "^0.0.33", - "@types/glob": "^5.0.29", - "@types/ini": "^1.3.28", - "@types/jasmine": "^2.5.43", - "@types/minimatch": "^2.0.28", - "@types/minimist": "^1.1.28", - "@types/node": "^7.0.4", - "@types/q": "^0.0.32", - "@types/request": "^0.0.39", - "@types/rimraf": "^0.0.28", - "@types/selenium-webdriver": "^2.53.35", - "@types/semver": "^5.3.30", - "@types/xml2js": "0.0.32", - "clang-format": "^1.0.35", - "gulp": "^4.0.0", - "gulp-clang-format": "^1.0.23", - "jasmine": "^2.4.1", - "run-sequence": "^1.1.5", - "selenium-webdriver": "~3.0.1", - "typescript": "~2.3.0" - }, - "engines": { - "node": ">=6.9.x" - } -} diff --git a/test-eol-project/node_modules/which-module/LICENSE b/test-eol-project/node_modules/which-module/LICENSE deleted file mode 100644 index ab601b65..00000000 --- a/test-eol-project/node_modules/which-module/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/test-eol-project/node_modules/which-module/README.md b/test-eol-project/node_modules/which-module/README.md deleted file mode 100644 index 008a1ae2..00000000 --- a/test-eol-project/node_modules/which-module/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# which-module - -> Find the module object for something that was require()d - -[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module) -[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) -[![Greenkeeper badge](https://badges.greenkeeper.io/nexdrew/which-module.svg)](https://greenkeeper.io/) - -Find the `module` object in `require.cache` for something that was `require()`d -or `import`ed - essentially a reverse `require()` lookup. - -Useful for libs that want to e.g. lookup a filename for a module or submodule -that it did not `require()` itself. - -## Install and Usage - -``` -npm install --save which-module -``` - -```js -const whichModule = require('which-module') - -console.log(whichModule(require('something'))) -// Module { -// id: '/path/to/project/node_modules/something/index.js', -// exports: [Function], -// parent: ..., -// filename: '/path/to/project/node_modules/something/index.js', -// loaded: true, -// children: [], -// paths: [ '/path/to/project/node_modules/something/node_modules', -// '/path/to/project/node_modules', -// '/path/to/node_modules', -// '/path/node_modules', -// '/node_modules' ] } -``` - -## API - -### `whichModule(exported)` - -Return the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object), -if any, that represents the given argument in the `require.cache`. - -`exported` can be anything that was previously `require()`d or `import`ed as a -module, submodule, or dependency - which means `exported` is identical to the -`module.exports` returned by this method. - -If `exported` did not come from the `exports` of a `module` in `require.cache`, -then this method returns `null`. - -## License - -ISC © Contributors - -[opensourceregistry_package_id]: # (458260416784685e5ef3091fee54001785dd4360406aa3000315ff256eef6878) diff --git a/test-eol-project/node_modules/which-module/index.js b/test-eol-project/node_modules/which-module/index.js deleted file mode 100644 index 45559b78..00000000 --- a/test-eol-project/node_modules/which-module/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -module.exports = function whichModule (exported) { - for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { - mod = require.cache[files[i]] - if (mod.exports === exported) return mod - } - return null -} diff --git a/test-eol-project/node_modules/which-module/package.json b/test-eol-project/node_modules/which-module/package.json deleted file mode 100644 index 65535755..00000000 --- a/test-eol-project/node_modules/which-module/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "which-module", - "version": "2.0.1", - "description": "Find the module object for something that was require()d", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "files": [ - "index.js" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/nexdrew/which-module.git" - }, - "keywords": [ - "which", - "module", - "exports", - "filename", - "require", - "reverse", - "lookup" - ], - "author": "nexdrew", - "license": "ISC", - "bugs": { - "url": "https://github.com/nexdrew/which-module/issues" - }, - "homepage": "https://github.com/nexdrew/which-module#readme", - "devDependencies": { - "ava": "^2.0.0", - "coveralls": "^3.0.3", - "nyc": "^14.0.0", - "standard": "^14.0.0", - "standard-version": "^7.0.0" - } -} diff --git a/test-eol-project/node_modules/wrap-ansi/index.js b/test-eol-project/node_modules/wrap-ansi/index.js deleted file mode 100755 index a6e54431..00000000 --- a/test-eol-project/node_modules/wrap-ansi/index.js +++ /dev/null @@ -1,186 +0,0 @@ -'use strict'; -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); -const ansiStyles = require('ansi-styles'); - -const ESCAPES = new Set([ - '\u001B', - '\u009B' -]); - -const END_CODE = 39; - -const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`; - -// Calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); - -// Wrap a long word across multiple rows -// Ansi escape codes do not count towards length -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - - let isInsideEscape = false; - let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - - if (ESCAPES.has(character)) { - isInsideEscape = true; - } else if (isInsideEscape && character === 'm') { - isInsideEscape = false; - continue; - } - - if (isInsideEscape) { - continue; - } - - visible += characterLength; - - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - - // It's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; - -// Trims spaces from a string ignoring invisible sequences -const stringVisibleTrimSpacesRight = str => { - const words = str.split(' '); - let last = words.length; - - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - - last--; - } - - if (last === words.length) { - return str; - } - - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; - -// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode -// -// 'hard' will never allow a string to take up more than columns characters -// -// 'soft' allows long words to expand past the column length -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - - let pre = ''; - let ret = ''; - let escapeCode; - - const lengths = wordLengths(string); - let rows = ['']; - - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows[rows.length - 1].trimLeft(); - } - - let rowLength = stringWidth(rows[rows.length - 1]); - - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - // If we start with a new word but the current row length equals the length of the columns, add a new row - rows.push(''); - rowLength = 0; - } - - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - - // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - - wrapWord(rows, word, columns); - continue; - } - - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - - rows.push(''); - } - - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - - rows[rows.length - 1] += word; - } - - if (options.trim !== false) { - rows = rows.map(stringVisibleTrimSpacesRight); - } - - pre = rows.join('\n'); - - for (const [index, character] of [...pre].entries()) { - ret += character; - - if (ESCAPES.has(character)) { - const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4))); - escapeCode = code === END_CODE ? null : code; - } - - const code = ansiStyles.codes.get(Number(escapeCode)); - - if (escapeCode && code) { - if (pre[index + 1] === '\n') { - ret += wrapAnsi(code); - } else if (character === '\n') { - ret += wrapAnsi(escapeCode); - } - } - } - - return ret; -}; - -// For each newline, invoke the method separately -module.exports = (string, columns, options) => { - return String(string) - .normalize() - .replace(/\r\n/g, '\n') - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -}; diff --git a/test-eol-project/node_modules/wrap-ansi/license b/test-eol-project/node_modules/wrap-ansi/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/wrap-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts deleted file mode 100644 index 2dbf6af2..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -declare namespace ansiRegex { - interface Options { - /** - Match only the first ANSI escape. - - @default false - */ - onlyFirst: boolean; - } -} - -/** -Regular expression for matching ANSI escape codes. - -@example -``` -import ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` -*/ -declare function ansiRegex(options?: ansiRegex.Options): RegExp; - -export = ansiRegex; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff837..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f5311..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md deleted file mode 100644 index 4d848bc3..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# ansi-regex - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex(options?) - -Returns a regex for matching ANSI escape codes. - -#### options - -Type: `object` - -##### onlyFirst - -Type: `boolean`
    -Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 44a907e5..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,345 +0,0 @@ -declare type CSSColor = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; - -declare namespace ansiStyles { - interface ColorConvert { - /** - The RGB color space. - - @param red - (`0`-`255`) - @param green - (`0`-`255`) - @param blue - (`0`-`255`) - */ - rgb(red: number, green: number, blue: number): string; - - /** - The RGB HEX color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hex(hex: string): string; - - /** - @param keyword - A CSS color name. - */ - keyword(keyword: CSSColor): string; - - /** - The HSL color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param lightness - (`0`-`100`) - */ - hsl(hue: number, saturation: number, lightness: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param value - (`0`-`100`) - */ - hsv(hue: number, saturation: number, value: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param whiteness - (`0`-`100`) - @param blackness - (`0`-`100`) - */ - hwb(hue: number, whiteness: number, blackness: number): string; - - /** - Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. - */ - ansi(ansi: number): string; - - /** - Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(ansi: number): string; - } - - interface CSPair { - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; - } - - interface ColorBase { - readonly ansi: ColorConvert; - readonly ansi256: ColorConvert; - readonly ansi16m: ColorConvert; - - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - } - - interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; - } - - interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; - } - - interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; - } -} - -declare const ansiStyles: { - readonly modifier: ansiStyles.Modifier; - readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; - readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; - readonly codes: ReadonlyMap; -} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; - -export = ansiStyles; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581a..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json deleted file mode 100644 index 75393284..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "4.3.0", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^2.0.1" - }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md b/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md deleted file mode 100644 index 24883de8..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,152 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - -## Install - -``` -$ npm install ansi-styles -``` - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -The following color spaces from `color-convert` are supported: - -- `rgb` -- `hex` -- `keyword` -- `hsl` -- `hsv` -- `hwb` -- `ansi` -- `ansi256` - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - -## For enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 907fccc2..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -declare function stripAnsi(string: string): string; - -export = stripAnsi; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593dfc..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108d..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md b/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md deleted file mode 100644 index 7c4b56d4..00000000 --- a/test-eol-project/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## strip-ansi for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - diff --git a/test-eol-project/node_modules/wrap-ansi/package.json b/test-eol-project/node_modules/wrap-ansi/package.json deleted file mode 100644 index 1d57c9f1..00000000 --- a/test-eol-project/node_modules/wrap-ansi/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "wrap-ansi", - "version": "6.2.0", - "description": "Wordwrap a string with ANSI escape codes", - "license": "MIT", - "repository": "chalk/wrap-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && nyc ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "wrap", - "break", - "wordwrap", - "wordbreak", - "linewrap", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "devDependencies": { - "ava": "^2.1.0", - "chalk": "^2.4.2", - "coveralls": "^3.0.3", - "has-ansi": "^3.0.0", - "nyc": "^14.1.1", - "xo": "^0.24.0" - } -} diff --git a/test-eol-project/node_modules/wrap-ansi/readme.md b/test-eol-project/node_modules/wrap-ansi/readme.md deleted file mode 100644 index d81a4d51..00000000 --- a/test-eol-project/node_modules/wrap-ansi/readme.md +++ /dev/null @@ -1,97 +0,0 @@ -# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) - -> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - - -## Install - -``` -$ npm install wrap-ansi -``` - - -## Usage - -```js -const chalk = require('chalk'); -const wrapAnsi = require('wrap-ansi'); - -const input = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(wrapAnsi(input, 20)); -``` - - - - -## API - -### wrapAnsi(string, columns, options?) - -Wrap words to the specified column width. - -#### string - -Type: `string` - -String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. - -#### columns - -Type: `number` - -Number of columns to wrap the text to. - -#### options - -Type: `object` - -##### hard - -Type: `boolean`
    -Default: `false` - -By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. - -##### wordWrap - -Type: `boolean`
    -Default: `true` - -By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. - -##### trim - -Type: `boolean`
    -Default: `true` - -Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. - - -## Related - -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right -- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) -- [Benjamin Coe](https://github.com/bcoe) - - ---- - -
    - - Get professional support for this package with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -
    diff --git a/test-eol-project/node_modules/wrappy/LICENSE b/test-eol-project/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/test-eol-project/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/wrappy/README.md b/test-eol-project/node_modules/wrappy/README.md deleted file mode 100644 index 98eab252..00000000 --- a/test-eol-project/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/test-eol-project/node_modules/wrappy/package.json b/test-eol-project/node_modules/wrappy/package.json deleted file mode 100644 index 13075204..00000000 --- a/test-eol-project/node_modules/wrappy/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "wrappy", - "version": "1.0.2", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "files": [ - "wrappy.js" - ], - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "^2.3.1" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/wrappy" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "homepage": "https://github.com/npm/wrappy" -} diff --git a/test-eol-project/node_modules/wrappy/wrappy.js b/test-eol-project/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6f..00000000 --- a/test-eol-project/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/test-eol-project/node_modules/xml2js/LICENSE b/test-eol-project/node_modules/xml2js/LICENSE deleted file mode 100644 index e3b4222a..00000000 --- a/test-eol-project/node_modules/xml2js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2010, 2011, 2012, 2013. 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/test-eol-project/node_modules/xml2js/README.md b/test-eol-project/node_modules/xml2js/README.md deleted file mode 100644 index 7534c893..00000000 --- a/test-eol-project/node_modules/xml2js/README.md +++ /dev/null @@ -1,488 +0,0 @@ -node-xml2js -=========== - -Ever had the urge to parse XML? And wanted to access the data in some sane, -easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is -what you're looking for! - -Description -=========== - -Simple XML to JavaScript object converter. It supports bi-directional conversion. -Uses [sax-js](https://github.com/isaacs/sax-js/) and -[xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js/). - -Note: If you're looking for a full DOM parser, you probably want -[JSDom](https://github.com/tmpvar/jsdom). - -Installation -============ - -Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm -install xml2js` which will download xml2js and all dependencies. - -xml2js is also available via [Bower](http://bower.io/), just `bower install -xml2js` which will download xml2js and all dependencies. - -Usage -===== - -No extensive tutorials required because you are a smart developer! The task of -parsing XML should be an easy one, so let's make it so! Here's some examples. - -Shoot-and-forget usage ----------------------- - -You want to parse XML as simple and easy as possible? It's dangerous to go -alone, take this: - -```javascript -var parseString = require('xml2js').parseString; -var xml = "Hello xml2js!" -parseString(xml, function (err, result) { - console.dir(result); -}); -``` - -Can't get easier than this, right? This works starting with `xml2js` 0.2.3. -With CoffeeScript it looks like this: - -```coffeescript -{parseString} = require 'xml2js' -xml = "Hello xml2js!" -parseString xml, (err, result) -> - console.dir result -``` - -If you need some special options, fear not, `xml2js` supports a number of -options (see below), you can specify these as second argument: - -```javascript -parseString(xml, {trim: true}, function (err, result) { -}); -``` - -Simple as pie usage -------------------- - -That's right, if you have been using xml-simple or a home-grown -wrapper, this was added in 0.1.11 just for you: - -```javascript -var fs = require('fs'), - xml2js = require('xml2js'); - -var parser = new xml2js.Parser(); -fs.readFile(__dirname + '/foo.xml', function(err, data) { - parser.parseString(data, function (err, result) { - console.dir(result); - console.log('Done'); - }); -}); -``` - -Look ma, no event listeners! - -You can also use `xml2js` from -[CoffeeScript](https://github.com/jashkenas/coffeescript), further reducing -the clutter: - -```coffeescript -fs = require 'fs', -xml2js = require 'xml2js' - -parser = new xml2js.Parser() -fs.readFile __dirname + '/foo.xml', (err, data) -> - parser.parseString data, (err, result) -> - console.dir result - console.log 'Done.' -``` - -But what happens if you forget the `new` keyword to create a new `Parser`? In -the middle of a nightly coding session, it might get lost, after all. Worry -not, we got you covered! Starting with 0.2.8 you can also leave it out, in -which case `xml2js` will helpfully add it for you, no bad surprises and -inexplicable bugs! - -Promise usage -------------- - -```javascript -var xml2js = require('xml2js'); -var xml = ''; - -// With parser -var parser = new xml2js.Parser(/* options */); -parser.parseStringPromise(data).then(function (result) { - console.dir(result); - console.log('Done'); -}) -.catch(function (err) { - // Failed -}); - -// Without parser -xml2js.parseStringPromise(data /*, options */).then(function (result) { - console.dir(result); - console.log('Done'); -}) -.catch(function (err) { - // Failed -}); -``` - -Parsing multiple files ----------------------- - -If you want to parse multiple files, you have multiple possibilities: - - * You can create one `xml2js.Parser` per file. That's the recommended one - and is promised to always *just work*. - * You can call `reset()` on your parser object. - * You can hope everything goes well anyway. This behaviour is not - guaranteed work always, if ever. Use option #1 if possible. Thanks! - -So you wanna some JSON? ------------------------ - -Just wrap the `result` object in a call to `JSON.stringify` like this -`JSON.stringify(result)`. You get a string containing the JSON representation -of the parsed object that you can feed to JSON-hungry consumers. - -Displaying results ------------------- - -You might wonder why, using `console.dir` or `console.log` the output at some -level is only `[Object]`. Don't worry, this is not because `xml2js` got lazy. -That's because Node uses `util.inspect` to convert the object into strings and -that function stops after `depth=2` which is a bit low for most XML. - -To display the whole deal, you can use `console.log(util.inspect(result, false, -null))`, which displays the whole result. - -So much for that, but what if you use -[eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it -truncates the output with `…`? Don't fear, there's also a solution for that, -you just need to increase the `maxLength` limit by creating a custom inspector -`var inspect = require('eyes').inspector({maxLength: false})` and then you can -easily `inspect(result)`. - -XML builder usage ------------------ - -Since 0.4.0, objects can be also be used to build XML: - -```javascript -var xml2js = require('xml2js'); - -var obj = {name: "Super", Surname: "Man", age: 23}; - -var builder = new xml2js.Builder(); -var xml = builder.buildObject(obj); -``` - -At the moment, a one to one bi-directional conversion is guaranteed only for -default configuration, except for `attrkey`, `charkey` and `explicitArray` options -you can redefine to your taste. Writing CDATA is supported via setting the `cdata` -option to `true`. - -To specify attributes: -```javascript -var xml2js = require('xml2js'); - -var obj = {root: {$: {id: "my id"}, _: "my inner text"}}; - -var builder = new xml2js.Builder(); -var xml = builder.buildObject(obj); -``` - -### Adding xmlns attributes - -You can generate XML that declares XML namespace prefix / URI pairs with xmlns attributes. - -Example declaring a default namespace on the root element: - -```javascript -let obj = { - Foo: { - $: { - "xmlns": "http://foo.com" - } - } -}; -``` -Result of `buildObject(obj)`: -```xml - -``` -Example declaring non-default namespaces on non-root elements: -```javascript -let obj = { - 'foo:Foo': { - $: { - 'xmlns:foo': 'http://foo.com' - }, - 'bar:Bar': { - $: { - 'xmlns:bar': 'http://bar.com' - } - } - } -} -``` -Result of `buildObject(obj)`: -```xml - - - -``` - - -Processing attribute, tag names and values ------------------------------------------- - -Since 0.4.1 you can optionally provide the parser with attribute name and tag name processors as well as element value processors (Since 0.4.14, you can also optionally provide the parser with attribute value processors): - -```javascript - -function nameToUpperCase(name){ - return name.toUpperCase(); -} - -//transform all attribute and tag names and values to uppercase -parseString(xml, { - tagNameProcessors: [nameToUpperCase], - attrNameProcessors: [nameToUpperCase], - valueProcessors: [nameToUpperCase], - attrValueProcessors: [nameToUpperCase]}, - function (err, result) { - // processed data -}); -``` - -The `tagNameProcessors` and `attrNameProcessors` options -accept an `Array` of functions with the following signature: - -```javascript -function (name){ - //do something with `name` - return name -} -``` - -The `attrValueProcessors` and `valueProcessors` options -accept an `Array` of functions with the following signature: - -```javascript -function (value, name) { - //`name` will be the node name or attribute name - //do something with `value`, (optionally) dependent on the node/attr name - return value -} -``` - -Some processors are provided out-of-the-box and can be found in `lib/processors.js`: - -- `normalize`: transforms the name to lowercase. -(Automatically used when `options.normalize` is set to `true`) - -- `firstCharLowerCase`: transforms the first character to lower case. -E.g. 'MyTagName' becomes 'myTagName' - -- `stripPrefix`: strips the xml namespace prefix. E.g `` will become 'Bar'. -(N.B.: the `xmlns` prefix is NOT stripped.) - -- `parseNumbers`: parses integer-like strings as integers and float-like strings as floats -E.g. "0" becomes 0 and "15.56" becomes 15.56 - -- `parseBooleans`: parses boolean-like strings to booleans -E.g. "true" becomes true and "False" becomes false - -Options -======= - -Apart from the default settings, there are a number of options that can be -specified for the parser. Options are specified by ``new Parser({optionName: -value})``. Possible options are: - - * `attrkey` (default: `$`): Prefix that is used to access the attributes. - Version 0.1 default was `@`. - * `charkey` (default: `_`): Prefix that is used to access the character - content. Version 0.1 default was `#`. - * `explicitCharkey` (default: `false`) - * `trim` (default: `false`): Trim the whitespace at the beginning and end of - text nodes. - * `normalizeTags` (default: `false`): Normalize all tag names to lowercase. - * `normalize` (default: `false`): Trim whitespaces inside text nodes. - * `explicitRoot` (default: `true`): Set this if you want to get the root - node in the resulting object. - * `emptyTag` (default: `''`): what will the value of empty nodes be. - * `explicitArray` (default: `true`): Always put child nodes in an array if - true; otherwise an array is created only if there is more than one. - * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create - text nodes. - * `mergeAttrs` (default: `false`): Merge attributes and child elements as - properties of the parent, instead of keying attributes off a child - attribute object. This option is ignored if `ignoreAttrs` is `true`. - * `validator` (default `null`): You can specify a callable that validates - the resulting structure somehow, however you want. See unit tests - for an example. - * `xmlns` (default `false`): Give each element a field usually called '$ns' - (the first character is the same as attrkey) that contains its local name - and namespace URI. - * `explicitChildren` (default `false`): Put child elements to separate - property. Doesn't work with `mergeAttrs = true`. If element has no children - then "children" won't be created. Added in 0.2.5. - * `childkey` (default `$$`): Prefix that is used to access child elements if - `explicitChildren` is set to `true`. Added in 0.2.5. - * `preserveChildrenOrder` (default `false`): Modifies the behavior of - `explicitChildren` so that the value of the "children" property becomes an - ordered array. When this is `true`, every node will also get a `#name` field - whose value will correspond to the XML nodeName, so that you may iterate - the "children" array and still be able to determine node names. The named - (and potentially unordered) properties are also retained in this - configuration at the same level as the ordered "children" array. Added in - 0.4.9. - * `charsAsChildren` (default `false`): Determines whether chars should be - considered children if `explicitChildren` is on. Added in 0.2.5. - * `includeWhiteChars` (default `false`): Determines whether whitespace-only - text nodes should be included. Added in 0.4.17. - * `async` (default `false`): Should the callbacks be async? This *might* be - an incompatible change if your code depends on sync execution of callbacks. - Future versions of `xml2js` might change this default, so the recommendation - is to not depend on sync execution anyway. Added in 0.2.6. - * `strict` (default `true`): Set sax-js to strict or non-strict parsing mode. - Defaults to `true` which is *highly* recommended, since parsing HTML which - is not well-formed XML might yield just about anything. Added in 0.2.7. - * `attrNameProcessors` (default: `null`): Allows the addition of attribute - name processing functions. Accepts an `Array` of functions with following - signature: - ```javascript - function (name){ - //do something with `name` - return name - } - ``` - Added in 0.4.14 - * `attrValueProcessors` (default: `null`): Allows the addition of attribute - value processing functions. Accepts an `Array` of functions with following - signature: - ```javascript - function (value, name){ - //do something with `name` - return name - } - ``` - Added in 0.4.1 - * `tagNameProcessors` (default: `null`): Allows the addition of tag name - processing functions. Accepts an `Array` of functions with following - signature: - ```javascript - function (name){ - //do something with `name` - return name - } - ``` - Added in 0.4.1 - * `valueProcessors` (default: `null`): Allows the addition of element value - processing functions. Accepts an `Array` of functions with following - signature: - ```javascript - function (value, name){ - //do something with `name` - return name - } - ``` - Added in 0.4.6 - -Options for the `Builder` class -------------------------------- -These options are specified by ``new Builder({optionName: value})``. -Possible options are: - - * `attrkey` (default: `$`): Prefix that is used to access the attributes. - Version 0.1 default was `@`. - * `charkey` (default: `_`): Prefix that is used to access the character - content. Version 0.1 default was `#`. - * `rootName` (default `root` or the root key name): root element name to be used in case - `explicitRoot` is `false` or to override the root element name. - * `renderOpts` (default `{ 'pretty': true, 'indent': ' ', 'newline': '\n' }`): - Rendering options for xmlbuilder-js. - * pretty: prettify generated XML - * indent: whitespace for indentation (only when pretty) - * newline: newline char (only when pretty) - * `xmldec` (default `{ 'version': '1.0', 'encoding': 'UTF-8', 'standalone': true }`: - XML declaration attributes. - * `xmldec.version` A version number string, e.g. 1.0 - * `xmldec.encoding` Encoding declaration, e.g. UTF-8 - * `xmldec.standalone` standalone document declaration: true or false - * `doctype` (default `null`): optional DTD. Eg. `{'ext': 'hello.dtd'}` - * `headless` (default: `false`): omit the XML header. Added in 0.4.3. - * `allowSurrogateChars` (default: `false`): allows using characters from the Unicode - surrogate blocks. - * `cdata` (default: `false`): wrap text nodes in `` instead of - escaping when necessary. Does not add `` if it is not required. - Added in 0.4.5. - -`renderOpts`, `xmldec`,`doctype` and `headless` pass through to -[xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js). - -Updating to new version -======================= - -Version 0.2 changed the default parsing settings, but version 0.1.14 introduced -the default settings for version 0.2, so these settings can be tried before the -migration. - -```javascript -var xml2js = require('xml2js'); -var parser = new xml2js.Parser(xml2js.defaults["0.2"]); -``` - -To get the 0.1 defaults in version 0.2 you can just use -`xml2js.defaults["0.1"]` in the same place. This provides you with enough time -to migrate to the saner way of parsing in `xml2js` 0.2. We try to make the -migration as simple and gentle as possible, but some breakage cannot be -avoided. - -So, what exactly did change and why? In 0.2 we changed some defaults to parse -the XML in a more universal and sane way. So we disabled `normalize` and `trim` -so `xml2js` does not cut out any text content. You can reenable this at will of -course. A more important change is that we return the root tag in the resulting -JavaScript structure via the `explicitRoot` setting, so you need to access the -first element. This is useful for anybody who wants to know what the root node -is and preserves more information. The last major change was to enable -`explicitArray`, so everytime it is possible that one might embed more than one -sub-tag into a tag, xml2js >= 0.2 returns an array even if the array just -includes one element. This is useful when dealing with APIs that return -variable amounts of subtags. - -Running tests, development -========================== - -[![Build Status](https://travis-ci.org/Leonidas-from-XIV/node-xml2js.svg?branch=master)](https://travis-ci.org/Leonidas-from-XIV/node-xml2js) -[![Coverage Status](https://coveralls.io/repos/Leonidas-from-XIV/node-xml2js/badge.svg?branch=)](https://coveralls.io/r/Leonidas-from-XIV/node-xml2js?branch=master) -[![Dependency Status](https://david-dm.org/Leonidas-from-XIV/node-xml2js.svg)](https://david-dm.org/Leonidas-from-XIV/node-xml2js) - -The development requirements are handled by npm, you just need to install them. -We also have a number of unit tests, they can be run using `npm test` directly -from the project root. This runs zap to discover all the tests and execute -them. - -If you like to contribute, keep in mind that `xml2js` is written in -CoffeeScript, so don't develop on the JavaScript files that are checked into -the repository for convenience reasons. Also, please write some unit test to -check your behaviour and if it is some user-facing thing, add some -documentation to this README, so people will know it exists. Thanks in advance! - -Getting support -=============== - -Please, if you have a problem with the library, first make sure you read this -README. If you read this far, thanks, you're good. Then, please make sure your -problem really is with `xml2js`. It is? Okay, then I'll look at it. Send me a -mail and we can talk. Please don't open issues, as I don't think that is the -proper forum for support problems. Some problems might as well really be bugs -in `xml2js`, if so I'll let you know to open an issue instead :) - -But if you know you really found a bug, feel free to open an issue instead. diff --git a/test-eol-project/node_modules/xml2js/lib/bom.js b/test-eol-project/node_modules/xml2js/lib/bom.js deleted file mode 100644 index 7b8fb27b..00000000 --- a/test-eol-project/node_modules/xml2js/lib/bom.js +++ /dev/null @@ -1,12 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - exports.stripBOM = function(str) { - if (str[0] === '\uFEFF') { - return str.substring(1); - } else { - return str; - } - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/builder.js b/test-eol-project/node_modules/xml2js/lib/builder.js deleted file mode 100644 index 58f36384..00000000 --- a/test-eol-project/node_modules/xml2js/lib/builder.js +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, - hasProp = {}.hasOwnProperty; - - builder = require('xmlbuilder'); - - defaults = require('./defaults').defaults; - - requiresCDATA = function(entry) { - return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0); - }; - - wrapCDATA = function(entry) { - return ""; - }; - - escapeCDATA = function(entry) { - return entry.replace(']]>', ']]]]>'); - }; - - exports.Builder = (function() { - function Builder(opts) { - var key, ref, value; - this.options = {}; - ref = defaults["0.2"]; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!hasProp.call(opts, key)) continue; - value = opts[key]; - this.options[key] = value; - } - } - - Builder.prototype.buildObject = function(rootObj) { - var attrkey, charkey, render, rootElement, rootName; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) { - rootName = Object.keys(rootObj)[0]; - rootObj = rootObj[rootName]; - } else { - rootName = this.options.rootName; - } - render = (function(_this) { - return function(element, obj) { - var attr, child, entry, index, key, value; - if (typeof obj !== 'object') { - if (_this.options.cdata && requiresCDATA(obj)) { - element.raw(wrapCDATA(obj)); - } else { - element.txt(obj); - } - } else if (Array.isArray(obj)) { - for (index in obj) { - if (!hasProp.call(obj, index)) continue; - child = obj[index]; - for (key in child) { - entry = child[key]; - element = render(element.ele(key), entry).up(); - } - } - } else { - for (key in obj) { - if (!hasProp.call(obj, key)) continue; - child = obj[key]; - if (key === attrkey) { - if (typeof child === "object") { - for (attr in child) { - value = child[attr]; - element = element.att(attr, value); - } - } - } else if (key === charkey) { - if (_this.options.cdata && requiresCDATA(child)) { - element = element.raw(wrapCDATA(child)); - } else { - element = element.txt(child); - } - } else if (Array.isArray(child)) { - for (index in child) { - if (!hasProp.call(child, index)) continue; - entry = child[index]; - if (typeof entry === 'string') { - if (_this.options.cdata && requiresCDATA(entry)) { - element = element.ele(key).raw(wrapCDATA(entry)).up(); - } else { - element = element.ele(key, entry).up(); - } - } else { - element = render(element.ele(key), entry).up(); - } - } - } else if (typeof child === "object") { - element = render(element.ele(key), child).up(); - } else { - if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) { - element = element.ele(key).raw(wrapCDATA(child)).up(); - } else { - if (child == null) { - child = ''; - } - element = element.ele(key, child.toString()).up(); - } - } - } - } - return element; - }; - })(this); - rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { - headless: this.options.headless, - allowSurrogateChars: this.options.allowSurrogateChars - }); - return render(rootElement, rootObj).end(this.options.renderOpts); - }; - - return Builder; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/defaults.js b/test-eol-project/node_modules/xml2js/lib/defaults.js deleted file mode 100644 index 0a21da0a..00000000 --- a/test-eol-project/node_modules/xml2js/lib/defaults.js +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - exports.defaults = { - "0.1": { - explicitCharkey: false, - trim: true, - normalize: true, - normalizeTags: false, - attrkey: "@", - charkey: "#", - explicitArray: false, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: false, - validator: null, - xmlns: false, - explicitChildren: false, - childkey: '@@', - charsAsChildren: false, - includeWhiteChars: false, - async: false, - strict: true, - attrNameProcessors: null, - attrValueProcessors: null, - tagNameProcessors: null, - valueProcessors: null, - emptyTag: '' - }, - "0.2": { - explicitCharkey: false, - trim: false, - normalize: false, - normalizeTags: false, - attrkey: "$", - charkey: "_", - explicitArray: true, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: true, - validator: null, - xmlns: false, - explicitChildren: false, - preserveChildrenOrder: false, - childkey: '$$', - charsAsChildren: false, - includeWhiteChars: false, - async: false, - strict: true, - attrNameProcessors: null, - attrValueProcessors: null, - tagNameProcessors: null, - valueProcessors: null, - rootName: 'root', - xmldec: { - 'version': '1.0', - 'encoding': 'UTF-8', - 'standalone': true - }, - doctype: null, - renderOpts: { - 'pretty': true, - 'indent': ' ', - 'newline': '\n' - }, - headless: false, - chunkSize: 10000, - emptyTag: '', - cdata: false - } - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/parser.js b/test-eol-project/node_modules/xml2js/lib/parser.js deleted file mode 100644 index 59f4d545..00000000 --- a/test-eol-project/node_modules/xml2js/lib/parser.js +++ /dev/null @@ -1,381 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate, - bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - sax = require('sax'); - - events = require('events'); - - bom = require('./bom'); - - processors = require('./processors'); - - setImmediate = require('timers').setImmediate; - - defaults = require('./defaults').defaults; - - isEmpty = function(thing) { - return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; - }; - - processItem = function(processors, item, key) { - var i, len, process; - for (i = 0, len = processors.length; i < len; i++) { - process = processors[i]; - item = process(item, key); - } - return item; - }; - - exports.Parser = (function(superClass) { - extend(Parser, superClass); - - function Parser(opts) { - this.parseStringPromise = bind(this.parseStringPromise, this); - this.parseString = bind(this.parseString, this); - this.reset = bind(this.reset, this); - this.assignOrPush = bind(this.assignOrPush, this); - this.processAsync = bind(this.processAsync, this); - var key, ref, value; - if (!(this instanceof exports.Parser)) { - return new exports.Parser(opts); - } - this.options = {}; - ref = defaults["0.2"]; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!hasProp.call(opts, key)) continue; - value = opts[key]; - this.options[key] = value; - } - if (this.options.xmlns) { - this.options.xmlnskey = this.options.attrkey + "ns"; - } - if (this.options.normalizeTags) { - if (!this.options.tagNameProcessors) { - this.options.tagNameProcessors = []; - } - this.options.tagNameProcessors.unshift(processors.normalize); - } - this.reset(); - } - - Parser.prototype.processAsync = function() { - var chunk, err; - try { - if (this.remaining.length <= this.options.chunkSize) { - chunk = this.remaining; - this.remaining = ''; - this.saxParser = this.saxParser.write(chunk); - return this.saxParser.close(); - } else { - chunk = this.remaining.substr(0, this.options.chunkSize); - this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length); - this.saxParser = this.saxParser.write(chunk); - return setImmediate(this.processAsync); - } - } catch (error1) { - err = error1; - if (!this.saxParser.errThrown) { - this.saxParser.errThrown = true; - return this.emit(err); - } - } - }; - - Parser.prototype.assignOrPush = function(obj, key, newValue) { - if (!(key in obj)) { - if (!this.options.explicitArray) { - return obj[key] = newValue; - } else { - return obj[key] = [newValue]; - } - } else { - if (!(obj[key] instanceof Array)) { - obj[key] = [obj[key]]; - } - return obj[key].push(newValue); - } - }; - - Parser.prototype.reset = function() { - var attrkey, charkey, ontext, stack; - this.removeAllListeners(); - this.saxParser = sax.parser(this.options.strict, { - trim: false, - normalize: false, - xmlns: this.options.xmlns - }); - this.saxParser.errThrown = false; - this.saxParser.onerror = (function(_this) { - return function(error) { - _this.saxParser.resume(); - if (!_this.saxParser.errThrown) { - _this.saxParser.errThrown = true; - return _this.emit("error", error); - } - }; - })(this); - this.saxParser.onend = (function(_this) { - return function() { - if (!_this.saxParser.ended) { - _this.saxParser.ended = true; - return _this.emit("end", _this.resultObject); - } - }; - })(this); - this.saxParser.ended = false; - this.EXPLICIT_CHARKEY = this.options.explicitCharkey; - this.resultObject = null; - stack = []; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - this.saxParser.onopentag = (function(_this) { - return function(node) { - var key, newValue, obj, processedKey, ref; - obj = {}; - obj[charkey] = ""; - if (!_this.options.ignoreAttrs) { - ref = node.attributes; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - if (!(attrkey in obj) && !_this.options.mergeAttrs) { - obj[attrkey] = {}; - } - newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key]; - processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key; - if (_this.options.mergeAttrs) { - _this.assignOrPush(obj, processedKey, newValue); - } else { - obj[attrkey][processedKey] = newValue; - } - } - } - obj["#name"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name; - if (_this.options.xmlns) { - obj[_this.options.xmlnskey] = { - uri: node.uri, - local: node.local - }; - } - return stack.push(obj); - }; - })(this); - this.saxParser.onclosetag = (function(_this) { - return function() { - var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath; - obj = stack.pop(); - nodeName = obj["#name"]; - if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) { - delete obj["#name"]; - } - if (obj.cdata === true) { - cdata = obj.cdata; - delete obj.cdata; - } - s = stack[stack.length - 1]; - if (obj[charkey].match(/^\s*$/) && !cdata) { - emptyStr = obj[charkey]; - delete obj[charkey]; - } else { - if (_this.options.trim) { - obj[charkey] = obj[charkey].trim(); - } - if (_this.options.normalize) { - obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim(); - } - obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey]; - if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { - obj = obj[charkey]; - } - } - if (isEmpty(obj)) { - obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr; - } - if (_this.options.validator != null) { - xpath = "/" + ((function() { - var i, len, results; - results = []; - for (i = 0, len = stack.length; i < len; i++) { - node = stack[i]; - results.push(node["#name"]); - } - return results; - })()).concat(nodeName).join("/"); - (function() { - var err; - try { - return obj = _this.options.validator(xpath, s && s[nodeName], obj); - } catch (error1) { - err = error1; - return _this.emit("error", err); - } - })(); - } - if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') { - if (!_this.options.preserveChildrenOrder) { - node = {}; - if (_this.options.attrkey in obj) { - node[_this.options.attrkey] = obj[_this.options.attrkey]; - delete obj[_this.options.attrkey]; - } - if (!_this.options.charsAsChildren && _this.options.charkey in obj) { - node[_this.options.charkey] = obj[_this.options.charkey]; - delete obj[_this.options.charkey]; - } - if (Object.getOwnPropertyNames(obj).length > 0) { - node[_this.options.childkey] = obj; - } - obj = node; - } else if (s) { - s[_this.options.childkey] = s[_this.options.childkey] || []; - objClone = {}; - for (key in obj) { - if (!hasProp.call(obj, key)) continue; - objClone[key] = obj[key]; - } - s[_this.options.childkey].push(objClone); - delete obj["#name"]; - if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { - obj = obj[charkey]; - } - } - } - if (stack.length > 0) { - return _this.assignOrPush(s, nodeName, obj); - } else { - if (_this.options.explicitRoot) { - old = obj; - obj = {}; - obj[nodeName] = old; - } - _this.resultObject = obj; - _this.saxParser.ended = true; - return _this.emit("end", _this.resultObject); - } - }; - })(this); - ontext = (function(_this) { - return function(text) { - var charChild, s; - s = stack[stack.length - 1]; - if (s) { - s[charkey] += text; - if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\n/g, '').trim() !== '')) { - s[_this.options.childkey] = s[_this.options.childkey] || []; - charChild = { - '#name': '__text__' - }; - charChild[charkey] = text; - if (_this.options.normalize) { - charChild[charkey] = charChild[charkey].replace(/\s{2,}/g, " ").trim(); - } - s[_this.options.childkey].push(charChild); - } - return s; - } - }; - })(this); - this.saxParser.ontext = ontext; - return this.saxParser.oncdata = (function(_this) { - return function(text) { - var s; - s = ontext(text); - if (s) { - return s.cdata = true; - } - }; - })(this); - }; - - Parser.prototype.parseString = function(str, cb) { - var err; - if ((cb != null) && typeof cb === "function") { - this.on("end", function(result) { - this.reset(); - return cb(null, result); - }); - this.on("error", function(err) { - this.reset(); - return cb(err); - }); - } - try { - str = str.toString(); - if (str.trim() === '') { - this.emit("end", null); - return true; - } - str = bom.stripBOM(str); - if (this.options.async) { - this.remaining = str; - setImmediate(this.processAsync); - return this.saxParser; - } - return this.saxParser.write(str).close(); - } catch (error1) { - err = error1; - if (!(this.saxParser.errThrown || this.saxParser.ended)) { - this.emit('error', err); - return this.saxParser.errThrown = true; - } else if (this.saxParser.ended) { - throw err; - } - } - }; - - Parser.prototype.parseStringPromise = function(str) { - return new Promise((function(_this) { - return function(resolve, reject) { - return _this.parseString(str, function(err, value) { - if (err) { - return reject(err); - } else { - return resolve(value); - } - }); - }; - })(this)); - }; - - return Parser; - - })(events); - - exports.parseString = function(str, a, b) { - var cb, options, parser; - if (b != null) { - if (typeof b === 'function') { - cb = b; - } - if (typeof a === 'object') { - options = a; - } - } else { - if (typeof a === 'function') { - cb = a; - } - options = {}; - } - parser = new exports.Parser(options); - return parser.parseString(str, cb); - }; - - exports.parseStringPromise = function(str, a) { - var options, parser; - if (typeof a === 'object') { - options = a; - } - parser = new exports.Parser(options); - return parser.parseStringPromise(str); - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/processors.js b/test-eol-project/node_modules/xml2js/lib/processors.js deleted file mode 100644 index 89aa85f2..00000000 --- a/test-eol-project/node_modules/xml2js/lib/processors.js +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var prefixMatch; - - prefixMatch = new RegExp(/(?!xmlns)^.*:/); - - exports.normalize = function(str) { - return str.toLowerCase(); - }; - - exports.firstCharLowerCase = function(str) { - return str.charAt(0).toLowerCase() + str.slice(1); - }; - - exports.stripPrefix = function(str) { - return str.replace(prefixMatch, ''); - }; - - exports.parseNumbers = function(str) { - if (!isNaN(str)) { - str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str); - } - return str; - }; - - exports.parseBooleans = function(str) { - if (/^(?:true|false)$/i.test(str)) { - str = str.toLowerCase() === 'true'; - } - return str; - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xml2js/lib/xml2js.js b/test-eol-project/node_modules/xml2js/lib/xml2js.js deleted file mode 100644 index 24b6e699..00000000 --- a/test-eol-project/node_modules/xml2js/lib/xml2js.js +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var builder, defaults, parser, processors, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - defaults = require('./defaults'); - - builder = require('./builder'); - - parser = require('./parser'); - - processors = require('./processors'); - - exports.defaults = defaults.defaults; - - exports.processors = processors; - - exports.ValidationError = (function(superClass) { - extend(ValidationError, superClass); - - function ValidationError(message) { - this.message = message; - } - - return ValidationError; - - })(Error); - - exports.Builder = builder.Builder; - - exports.Parser = parser.Parser; - - exports.parseString = parser.parseString; - - exports.parseStringPromise = parser.parseStringPromise; - -}).call(this); diff --git a/test-eol-project/node_modules/xml2js/package.json b/test-eol-project/node_modules/xml2js/package.json deleted file mode 100644 index 0769b611..00000000 --- a/test-eol-project/node_modules/xml2js/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "xml2js", - "description": "Simple XML to JavaScript object converter.", - "keywords": [ - "xml", - "json" - ], - "homepage": "https://github.com/Leonidas-from-XIV/node-xml2js", - "version": "0.4.23", - "author": "Marek Kubica (https://xivilization.net)", - "contributors": [ - "maqr (https://github.com/maqr)", - "Ben Weaver (http://benweaver.com/)", - "Jae Kwon (https://github.com/jaekwon)", - "Jim Robert", - "Ștefan Rusu (http://www.saltwaterc.eu/)", - "Carter Cole (http://cartercole.com/)", - "Kurt Raschke (http://www.kurtraschke.com/)", - "Contra (https://github.com/Contra)", - "Marcelo Diniz (https://github.com/mdiniz)", - "Michael Hart (https://github.com/mhart)", - "Zachary Scott (http://zacharyscott.net/)", - "Raoul Millais (https://github.com/raoulmillais)", - "Salsita Software (http://www.salsitasoft.com/)", - "Mike Schilling (http://www.emotive.com/)", - "Jackson Tian (http://weibo.com/shyvo)", - "Mikhail Zyatin (https://github.com/Sitin)", - "Chris Tavares (https://github.com/christav)", - "Frank Xu (http://f2e.us/)", - "Guido D'Albore (http://www.bitstorm.it/)", - "Jack Senechal (http://jacksenechal.com/)", - "Matthias Hölzl (https://github.com/hoelzl)", - "Camille Reynders (http://www.creynders.be/)", - "Taylor Gautier (https://github.com/tsgautier)", - "Todd Bryan (https://github.com/toddrbryan)", - "Leore Avidar (http://leoreavidar.com/)", - "Dave Aitken (http://www.actionshrimp.com/)", - "Shaney Orrowe ", - "Candle ", - "Jess Telford (http://jes.st)", - "Tom Hughes < (http://compton.nu/)", - "Piotr Rochala (http://rocha.la/)", - "Michael Avila (https://github.com/michaelavila)", - "Ryan Gahl (https://github.com/ryedin)", - "Eric Laberge (https://github.com/elaberge)", - "Benjamin E. Coe (https://twitter.com/benjamincoe)", - "Stephen Cresswell (https://github.com/cressie176)", - "Pascal Ehlert (http://www.hacksrus.net/)", - "Tom Spencer (http://fiznool.com/)", - "Tristian Flanagan (https://github.com/tflanagan)", - "Tim Johns (https://github.com/TimJohns)", - "Bogdan Chadkin (https://github.com/TrySound)", - "David Wood (http://codesleuth.co.uk/)", - "Nicolas Maquet (https://github.com/nmaquet)", - "Lovell Fuller (http://lovell.info/)", - "d3adc0d3 (https://github.com/d3adc0d3)" - ], - "main": "./lib/xml2js", - "files": [ - "lib" - ], - "directories": { - "lib": "./lib" - }, - "scripts": { - "build": "cake build", - "test": "zap", - "coverage": "nyc npm test && nyc report", - "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", - "doc": "cake doc" - }, - "repository": { - "type": "git", - "url": "https://github.com/Leonidas-from-XIV/node-xml2js.git" - }, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "devDependencies": { - "coffee-script": ">=1.10.0", - "coveralls": "^3.0.1", - "diff": ">=1.0.8", - "docco": ">=0.6.2", - "nyc": ">=2.2.1", - "zap": ">=0.2.9" - }, - "engines": { - "node": ">=4.0.0" - }, - "license": "MIT" -} diff --git a/test-eol-project/node_modules/xmlbuilder/CHANGELOG.md b/test-eol-project/node_modules/xmlbuilder/CHANGELOG.md deleted file mode 100644 index 610f412e..00000000 --- a/test-eol-project/node_modules/xmlbuilder/CHANGELOG.md +++ /dev/null @@ -1,470 +0,0 @@ -# Change Log - -All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200). - -## [11.0.0] - 2019-02-18 -- Calling `end()` with arguments no longer overwrites writer options. See [#120](https://github.com/oozcitak/xmlbuilder-js/issues/120). -- Added writer state and customizable space and endline functions to help customize writer behavior. Also added `openNode` and `closeNode` functions to writer. See [#193](https://github.com/oozcitak/xmlbuilder-js/issues/193). -- Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See [#195](https://github.com/oozcitak/xmlbuilder-js/issues/195). -- Renamed `elEscape` to `textEscape` in `XMLStringifier`. -- Fixed a bug where empty arrays would produce child nodes. See [#190](https://github.com/oozcitak/xmlbuilder-js/issues/190). -- Removed the `skipNullAttributes` option. `null` attributes are now skipped by default. Added the `keepNullAttributes` option in case someone needs the old behavior. -- Removed the `skipNullNodes` option. `null` nodes are now skipped by default. Added the `keepNullNodes` option in case someone needs the old behavior. -- `undefined` values are now skipped when converting JS objects. -- Renamed stringify functions. See [#194](https://github.com/oozcitak/xmlbuilder-js/issues/194): - * `eleName` -> `name` - * `attName` -> `name` - * `eleText` -> `text` -- Fixed argument order for `attribute` function in the writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). -- Added `openAttribute` and `closeAttribute` functions to writer. See [#196](https://github.com/oozcitak/xmlbuilder-js/issues/196). -- Added node types to node objects. Node types and writer states are exported by the module with the `nodeType` and `writerState` properties. -- Fixed a bug where array items would not be correctly converted. See [#159](https://github.com/oozcitak/xmlbuilder-js/issues/159). -- Fixed a bug where mixed-content inside JS objects with `#text` decorator would not be correctly converted. See [#171](https://github.com/oozcitak/xmlbuilder-js/issues/171). -- Fixed a bug where JS objects would not be expanded in callback mode. See [#173](https://github.com/oozcitak/xmlbuilder-js/issues/173). -- Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See [#169](https://github.com/oozcitak/xmlbuilder-js/issues/169). -- Fixed a bug where names would not be validated according to the spec. See [#49](https://github.com/oozcitak/xmlbuilder-js/issues/49). -- Renamed `text` property to `value` in comment and cdata nodes to unify the API. -- Removed `doctype` function to prevent name clash with DOM implementation. Use the `dtd` function instead. -- Removed dummy nodes from the XML tree (Those were created while chain-building the tree). -- Renamed `attributes`property to `attribs` to prevent name clash with DOM property with the same name. -- Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See [#122](https://github.com/oozcitak/xmlbuilder-js/issues/122). - -## [10.1.1] - 2018-10-24 -- Fixed an edge case where a null node at root level would be printed although `skipNullNodes` was set. See [#187](https://github.com/oozcitak/xmlbuilder-js/issues/187). - -## [10.1.0] - 2018-10-10 -- Added the `skipNullNodes` option to skip nodes with null values. See [#158](https://github.com/oozcitak/xmlbuilder-js/issues/158). - -## [10.0.0] - 2018-04-26 -- Added current indentation level as a parameter to the onData function when in callback mode. See [#125](https://github.com/oozcitak/xmlbuilder-js/issues/125). -- Added name of the current node and parent node to error messages where possible. See [#152](https://github.com/oozcitak/xmlbuilder-js/issues/152). This has the potential to break code depending on the content of error messages. -- Fixed an issue where objects created with Object.create(null) created an error. See [#176](https://github.com/oozcitak/xmlbuilder-js/issues/176). -- Added test builds for node.js v8 and v10. - -## [9.0.7] - 2018-02-09 -- Simplified regex used for validating encoding. - -## [9.0.4] - 2017-08-16 -- `spacebeforeslash` writer option accepts `true` as well as space char(s). - -## [9.0.3] - 2017-08-15 -- `spacebeforeslash` writer option can now be used with XML fragments. - -## [9.0.2] - 2017-08-15 -- Added the `spacebeforeslash` writer option to add a space character before closing tags of empty elements. See -[#157](https://github.com/oozcitak/xmlbuilder-js/issues/157). - -## [9.0.1] - 2017-06-19 -- Fixed character validity checks to work with node.js 4.0 and 5.0. See -[#161](https://github.com/oozcitak/xmlbuilder-js/issues/161). - -## [9.0.0] - 2017-05-05 -- Removed case conversion options. -- Removed support for node.js 4.0 and 5.0. Minimum required version is now 6.0. -- Fixed valid char filter to use XML 1.1 instead of 1.0. See -[#147](https://github.com/oozcitak/xmlbuilder-js/issues/147). -- Added options for negative indentation and suppressing pretty printing of text -nodes. See -[#145](https://github.com/oozcitak/xmlbuilder-js/issues/145). - -## [8.2.2] - 2016-04-08 -- Falsy values can now be used as a text node in callback mode. - -## [8.2.1] - 2016-04-07 -- Falsy values can now be used as a text node. See -[#117](https://github.com/oozcitak/xmlbuilder-js/issues/117). - -## [8.2.0] - 2016-04-01 -- Removed lodash dependency to keep the library small and simple. See -[#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), -[#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), -and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43). -- Added title case to name conversion options. - -## [8.1.0] - 2016-03-29 -- Added the callback option to the `begin` export function. When used with a -callback function, the XML document will be generated in chunks and each chunk -will be passed to the supplied function. In this mode, `begin` uses a different -code path and the builder should use much less memory since the entire XML tree -is not kept. There are a few drawbacks though. For example, traversing the document -tree or adding attributes to a node after it is written is not possible. It is -also not possible to remove nodes or attributes. - -``` js -var result = ''; - -builder.begin(function(chunk) { result += chunk; }) - .dec() - .ele('root') - .ele('xmlbuilder').up() - .end(); -``` - -- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111). - -## [8.0.0] - 2016-03-25 -- Added the `begin` export function. See the wiki for details. -- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose. -- Dropped support for old node.js releases. Minimum required node.js version is now 4.0. - -## [7.0.0] - 2016-03-21 -- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element. -```js -root.ele('node').ins('pi'); -// pre-v7 - -// v7 - -``` - -## [6.0.0] - 2016-03-20 -- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document. - -## [5.0.1] - 2016-03-08 -- Moved require statements for text case conversion to the top of files to reduce lazy requires. - -## [5.0.0] - 2016-03-05 -- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`. -- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). -- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed. -- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]>`. - -## [4.2.1] - 2016-01-15 -- Updated lodash dependency to 4.0.0. - -## [4.2.0] - 2015-12-16 -- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded. - -## [4.1.0] - 2015-11-11 -- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g. - -```js -root.ele({ number: [ "one", "two" ]}); -// with separateArrayItems: true - - - - -// with separateArrayItems: false -one -two -``` - -## [4.0.0] - 2015-11-01 -- Removed the `#list` decorator. Array items are now created as child nodes by default. -- Fixed a bug where the XML encoding string was checked partially. - -## [3.1.0] - 2015-09-19 -- `#list` decorator ignores empty arrays. - -## [3.0.0] - 2015-09-10 -- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). - -## [2.6.5] - 2015-09-09 -- Use native `isArray` instead of lodash. -- Indentation of processing instructions are set to the parent element's. - -## [2.6.4] - 2015-05-27 -- Updated lodash dependency to 3.5.0. - -## [2.6.3] - 2015-05-27 -- Bumped version because previous release was not published on npm. - -## [2.6.2] - 2015-03-10 -- Updated lodash dependency to 3.5.0. - -## [2.6.1] - 2015-02-20 -- Updated lodash dependency to 3.3.0. - -## [2.6.0] - 2015-02-20 -- Fixed a bug where the `XMLNode` constructor overwrote the super class parent. -- Removed document property from cloned nodes. -- Switched to mocha.js for testing. - -## [2.5.2] - 2015-02-16 -- Updated lodash dependency to 3.2.0. - -## [2.5.1] - 2015-02-09 -- Updated lodash dependency to 3.1.0. -- Support all node >= 0.8. - -## [2.5.0] - 2015-00-03 -- Updated lodash dependency to 3.0.0. - -## [2.4.6] - 2015-01-26 -- Show more information from attribute creation with null values. -- Added iojs as an engine. -- Self close elements with empty text. - -## [2.4.5] - 2014-11-15 -- Fixed prepublish script to run on windows. -- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value. -- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62). - -## [2.4.4] - 2014-09-08 -- Added the `offset` option to `toString()` for use in XML fragments. - -## [2.4.3] - 2014-08-13 -- Corrected license in package description. - -## [2.4.2] - 2014-08-13 -- Dropped performance test and memwatch dependency. - -## [2.4.1] - 2014-08-12 -- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59). - -## [2.4.0] - 2014-08-04 -- Correct cases of pubID and sysID. -- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53). -- Escape according to Canonical XML 1.0. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54). - -## [2.3.0] - 2014-07-17 -- Convert objects to JS primitives while sanitizing user input. -- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44). -- Use modularized lodash functions to cut down dependencies. -- Process empty objects when converting from objects so that we don't throw on empty child objects. - -## [2.2.1] - 2014-04-04 -- Bumped version because previous release was not published on npm. - -## [2.2.0] - 2014-04-04 -- Switch to lodash from underscore. -- Removed legacy `ext` option from `create()`. -- Drop old node versions: 0.4, 0.5, 0.6. 0.8 is the minimum requirement from now on. - -## [2.1.0] - 2013-12-30 -- Removed duplicate null checks from constructors. -- Fixed node count in performance test. -- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26). -- Allow multiple values in `att()` and `ins()`. -- Added ability to run individual performance tests. -- Added flag for ignoring decorator strings. - -## [2.0.1] - 2013-12-24 -- Removed performance tests from npm package. - -## [2.0.0] - 2013-12-24 -- Combined loops for speed up. -- Added support for the DTD and XML declaration. -- `clone` includes attributes. -- Added performance tests. -- Evaluate attribute value if function. -- Evaluate instruction value if function. - -## [1.1.2] - 2013-12-11 -- Changed processing instruction decorator to `?`. - -## [1.1.1] - 2013-12-11 -- Added processing instructions to JS object conversion. - -## [1.1.0] - 2013-12-10 -- Added license to package. -- `create()` and `element()` accept JS object to fully build the document. -- Added `nod()` and `n()` aliases for `node()`. -- Renamed `convertAttChar` decorator to `convertAttKey`. -- Ignore empty decorator strings when converting JS objects. - -## [1.0.2] - 2013-11-27 -- Removed temp file which was accidentally included in the package. - -## [1.0.1] - 2013-11-27 -- Custom stringify functions affect current instance only. - -## [1.0.0] - 2013-11-27 -- Added processing instructions. -- Added stringify functions to sanitize and convert input values. -- Added option for headless XML documents. -- Added vows tests. -- Removed Makefile. Using npm publish scripts instead. -- Removed the `begin()` function. `create()` begins the document by creating the root node. - -## [0.4.3] - 2013-11-08 -- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29). -- Fixed empty value string representation in pretty mode. -- Added pre and postpublish scripts to package.json. -- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31). - -## [0.4.2] - 2012-09-14 -- Removed README.md from `.npmignore`. - -## [0.4.1] - 2012-08-31 -- Removed `begin()` calls in favor of `XMLBuilder` constructor. -- Added the `end()` function. `end()` is a convenience over `doc().toString()`. - -## [0.4.0] - 2012-08-31 -- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line. -- Soft deprecated `begin()`. - -## [0.3.11] - 2012-08-13 -- Package keywords are fixed to be an array of values. - -## [0.3.10] - 2012-08-13 -- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases. - -## [0.3.3] - 2012-07-27 -- Implemented `importXMLBuilder()`. - -## [0.3.2] - 2012-07-20 -- Fixed a duplicated escaping problem on `element()`. -- Fixed a problem with text node creation from empty string. -- Calling `root()` on the document element returns the root element. -- `XMLBuilder` no longer extends `XMLFragment`. - -## [0.3.1] - 2011-11-28 -- Added guards for document element so that nodes cannot be inserted at document level. - -## [0.3.0] - 2011-11-28 -- Added `doc()` to return the document element. - -## [0.2.2] - 2011-11-28 -- Prevent code relying on `up()`'s older behavior to break. - -## [0.2.1] - 2011-11-28 -- Added the `root()` function. - -## [0.2.0] - 2011-11-21 -- Added Travis-CI integration. -- Added coffee-script dependency. -- Added insert, traversal and delete functions. - -## [0.1.7] - 2011-10-25 -- No changes. Accidental release. - -## [0.1.6] - 2011-10-25 -- Corrected `package.json` bugs link to `url` from `web`. - -## [0.1.5] - 2011-08-08 -- Added missing npm package contents. - -## [0.1.4] - 2011-07-29 -- Text-only nodes are no longer indented. -- Added documentation for multiple instances. - -## [0.1.3] - 2011-07-27 -- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed. -- Fixed `u()` function so that it now correctly calls `up()`. -- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably. - -## [0.1.2] - 2011-06-03 -- `ele()` accepts element text. -- `attributes()` now overrides existing attributes if passed the same attribute name. - -## [0.1.1] - 2011-05-19 -- Added the raw output option. -- Removed most validity checks. - -## [0.1.0] - 2011-04-27 -- `text()` and `cdata()` now return parent element. -- Attribute values are escaped. - -## [0.0.7] - 2011-04-23 -- Coerced text values to string. - -## [0.0.6] - 2011-02-23 -- Added support for XML comments. -- Text nodes are checked against CharData. - -## [0.0.5] - 2010-12-31 -- Corrected the name of the main npm module in `package.json`. - -## [0.0.4] - 2010-12-28 -- Added `.npmignore`. - -## [0.0.3] - 2010-12-27 -- root element is now constructed in `begin()`. -- moved prolog to `begin()`. -- Added the ability to have CDATA in element text. -- Removed unused prolog aliases. -- Removed `builder()` function from main module. -- Added the name of the main npm module in `package.json`. - -## [0.0.2] - 2010-11-03 -- `element()` expands nested arrays. -- Added pretty printing. -- Added the `up()`, `build()` and `prolog()` functions. -- Added readme. - -## 0.0.1 - 2010-11-02 -- Initial release - -[11.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.1...v11.0.0 -[10.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.1.0...v10.1.1 -[10.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v10.0.0...v10.1.0 -[10.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.7...v10.0.0 -[9.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.4...v9.0.7 -[9.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.3...v9.0.4 -[9.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.2...v9.0.3 -[9.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.1...v9.0.2 -[9.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v9.0.0...v9.0.1 -[9.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.2...v9.0.0 -[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2 -[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1 -[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0 -[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0 -[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0 -[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0 -[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0 -[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1 -[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0 -[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1 -[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0 -[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0 -[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0 -[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0 -[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0 -[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5 -[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4 -[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3 -[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2 -[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1 -[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0 -[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2 -[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1 -[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0 -[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6 -[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5 -[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4 -[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3 -[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2 -[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1 -[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0 -[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0 -[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1 -[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0 -[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0 -[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0 -[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0 -[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0 -[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3 -[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2 -[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0 -[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11 -[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10 -[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3 -[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2 -[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0 -[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0 -[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7 -[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6 -[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5 -[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4 -[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2 -[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0 -[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7 -[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6 -[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5 -[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4 -[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3 -[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2 - diff --git a/test-eol-project/node_modules/xmlbuilder/LICENSE b/test-eol-project/node_modules/xmlbuilder/LICENSE deleted file mode 100644 index 9fb97002..00000000 --- a/test-eol-project/node_modules/xmlbuilder/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Ozgur Ozcitak - -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/test-eol-project/node_modules/xmlbuilder/README.md b/test-eol-project/node_modules/xmlbuilder/README.md deleted file mode 100644 index 1a96edb5..00000000 --- a/test-eol-project/node_modules/xmlbuilder/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# xmlbuilder-js - -An XML builder for [node.js](https://nodejs.org/) similar to -[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). - -[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) -[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) -[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) - -[![Travis Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) -[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js) -[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) -[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) - -### Installation: - -``` sh -npm install xmlbuilder -``` - -### Usage: - -``` js -var builder = require('xmlbuilder'); -var xml = builder.create('root') - .ele('xmlbuilder') - .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') - .end({ pretty: true}); - -console.log(xml); -``` - -will result in: - -``` xml - - - - git://github.com/oozcitak/xmlbuilder-js.git - - -``` - -It is also possible to convert objects into nodes: - -``` js -builder.create({ - root: { - xmlbuilder: { - repo: { - '@type': 'git', // attributes start with @ - '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node - } - } - } -}); -``` - -If you need to do some processing: - -``` js -var root = builder.create('squares'); -root.com('f(x) = x^2'); -for(var i = 1; i <= 5; i++) -{ - var item = root.ele('data'); - item.att('x', i); - item.att('y', i * i); -} -``` - -This will result in: - -``` xml - - - - - - - - - -``` - -See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples. diff --git a/test-eol-project/node_modules/xmlbuilder/appveyor.yml b/test-eol-project/node_modules/xmlbuilder/appveyor.yml deleted file mode 100644 index 9604b785..00000000 --- a/test-eol-project/node_modules/xmlbuilder/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -environment: - matrix: - - nodejs_version: "4" - - nodejs_version: "5" - - nodejs_version: "6" - - nodejs_version: "8" - - nodejs_version: "10" - - nodejs_version: "" # latest - -install: - - ps: "Install-Product node $env:nodejs_version" - - "npm install" - -test_script: - - "node --version" - - "npm --version" - - "npm test" - -build: off - diff --git a/test-eol-project/node_modules/xmlbuilder/lib/Derivation.js b/test-eol-project/node_modules/xmlbuilder/lib/Derivation.js deleted file mode 100644 index 2abfd08d..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/Derivation.js +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - module.exports = { - Restriction: 1, - Extension: 2, - Union: 4, - List: 8 - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js b/test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js deleted file mode 100644 index 1cbd21c1..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/DocumentPosition.js +++ /dev/null @@ -1,12 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - module.exports = { - Disconnected: 1, - Preceding: 2, - Following: 4, - Contains: 8, - ContainedBy: 16, - ImplementationSpecific: 32 - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/NodeType.js b/test-eol-project/node_modules/xmlbuilder/lib/NodeType.js deleted file mode 100644 index 4c200e3c..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/NodeType.js +++ /dev/null @@ -1,23 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - module.exports = { - Element: 1, - Attribute: 2, - Text: 3, - CData: 4, - EntityReference: 5, - EntityDeclaration: 6, - ProcessingInstruction: 7, - Comment: 8, - Document: 9, - DocType: 10, - DocumentFragment: 11, - NotationDeclaration: 12, - Declaration: 201, - Raw: 202, - AttributeDeclaration: 203, - ElementDeclaration: 204, - Dummy: 205 - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/OperationType.js b/test-eol-project/node_modules/xmlbuilder/lib/OperationType.js deleted file mode 100644 index 29428f61..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/OperationType.js +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - module.exports = { - Clones: 1, - Imported: 2, - Deleted: 3, - Renamed: 4, - Adopted: 5 - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/Utility.js b/test-eol-project/node_modules/xmlbuilder/lib/Utility.js deleted file mode 100644 index 1d42cfd3..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/Utility.js +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, - slice = [].slice, - hasProp = {}.hasOwnProperty; - - assign = function() { - var i, key, len, source, sources, target; - target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; - if (isFunction(Object.assign)) { - Object.assign.apply(null, arguments); - } else { - for (i = 0, len = sources.length; i < len; i++) { - source = sources[i]; - if (source != null) { - for (key in source) { - if (!hasProp.call(source, key)) continue; - target[key] = source[key]; - } - } - } - } - return target; - }; - - isFunction = function(val) { - return !!val && Object.prototype.toString.call(val) === '[object Function]'; - }; - - isObject = function(val) { - var ref; - return !!val && ((ref = typeof val) === 'function' || ref === 'object'); - }; - - isArray = function(val) { - if (isFunction(Array.isArray)) { - return Array.isArray(val); - } else { - return Object.prototype.toString.call(val) === '[object Array]'; - } - }; - - isEmpty = function(val) { - var key; - if (isArray(val)) { - return !val.length; - } else { - for (key in val) { - if (!hasProp.call(val, key)) continue; - return false; - } - return true; - } - }; - - isPlainObject = function(val) { - var ctor, proto; - return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); - }; - - getValue = function(obj) { - if (isFunction(obj.valueOf)) { - return obj.valueOf(); - } else { - return obj; - } - }; - - module.exports.assign = assign; - - module.exports.isFunction = isFunction; - - module.exports.isObject = isObject; - - module.exports.isArray = isArray; - - module.exports.isEmpty = isEmpty; - - module.exports.isPlainObject = isPlainObject; - - module.exports.getValue = getValue; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/WriterState.js b/test-eol-project/node_modules/xmlbuilder/lib/WriterState.js deleted file mode 100644 index 0923eec9..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/WriterState.js +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - module.exports = { - None: 0, - OpenTag: 1, - InsideTag: 2, - CloseTag: 3 - }; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js deleted file mode 100644 index c208566d..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLAttribute.js +++ /dev/null @@ -1,108 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLAttribute, XMLNode; - - NodeType = require('./NodeType'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLAttribute = (function() { - function XMLAttribute(parent, name, value) { - this.parent = parent; - if (this.parent) { - this.options = this.parent.options; - this.stringify = this.parent.stringify; - } - if (name == null) { - throw new Error("Missing attribute name. " + this.debugInfo(name)); - } - this.name = this.stringify.name(name); - this.value = this.stringify.attValue(value); - this.type = NodeType.Attribute; - this.isId = false; - this.schemaTypeInfo = null; - } - - Object.defineProperty(XMLAttribute.prototype, 'nodeType', { - get: function() { - return this.type; - } - }); - - Object.defineProperty(XMLAttribute.prototype, 'ownerElement', { - get: function() { - return this.parent; - } - }); - - Object.defineProperty(XMLAttribute.prototype, 'textContent', { - get: function() { - return this.value; - }, - set: function(value) { - return this.value = value || ''; - } - }); - - Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', { - get: function() { - return ''; - } - }); - - Object.defineProperty(XMLAttribute.prototype, 'prefix', { - get: function() { - return ''; - } - }); - - Object.defineProperty(XMLAttribute.prototype, 'localName', { - get: function() { - return this.name; - } - }); - - Object.defineProperty(XMLAttribute.prototype, 'specified', { - get: function() { - return true; - } - }); - - XMLAttribute.prototype.clone = function() { - return Object.create(this); - }; - - XMLAttribute.prototype.toString = function(options) { - return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); - }; - - XMLAttribute.prototype.debugInfo = function(name) { - name = name || this.name; - if (name == null) { - return "parent: <" + this.parent.name + ">"; - } else { - return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; - } - }; - - XMLAttribute.prototype.isEqualNode = function(node) { - if (node.namespaceURI !== this.namespaceURI) { - return false; - } - if (node.prefix !== this.prefix) { - return false; - } - if (node.localName !== this.localName) { - return false; - } - if (node.value !== this.value) { - return false; - } - return true; - }; - - return XMLAttribute; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js deleted file mode 100644 index c732ec5b..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLCData.js +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLCData, XMLCharacterData, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - NodeType = require('./NodeType'); - - XMLCharacterData = require('./XMLCharacterData'); - - module.exports = XMLCData = (function(superClass) { - extend(XMLCData, superClass); - - function XMLCData(parent, text) { - XMLCData.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing CDATA text. " + this.debugInfo()); - } - this.name = "#cdata-section"; - this.type = NodeType.CData; - this.value = this.stringify.cdata(text); - } - - XMLCData.prototype.clone = function() { - return Object.create(this); - }; - - XMLCData.prototype.toString = function(options) { - return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); - }; - - return XMLCData; - - })(XMLCharacterData); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js deleted file mode 100644 index c007a181..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLCharacterData.js +++ /dev/null @@ -1,79 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLCharacterData, XMLNode, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLCharacterData = (function(superClass) { - extend(XMLCharacterData, superClass); - - function XMLCharacterData(parent) { - XMLCharacterData.__super__.constructor.call(this, parent); - this.value = ''; - } - - Object.defineProperty(XMLCharacterData.prototype, 'data', { - get: function() { - return this.value; - }, - set: function(value) { - return this.value = value || ''; - } - }); - - Object.defineProperty(XMLCharacterData.prototype, 'length', { - get: function() { - return this.value.length; - } - }); - - Object.defineProperty(XMLCharacterData.prototype, 'textContent', { - get: function() { - return this.value; - }, - set: function(value) { - return this.value = value || ''; - } - }); - - XMLCharacterData.prototype.clone = function() { - return Object.create(this); - }; - - XMLCharacterData.prototype.substringData = function(offset, count) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLCharacterData.prototype.appendData = function(arg) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLCharacterData.prototype.insertData = function(offset, arg) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLCharacterData.prototype.deleteData = function(offset, count) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLCharacterData.prototype.replaceData = function(offset, count, arg) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLCharacterData.prototype.isEqualNode = function(node) { - if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.data !== this.data) { - return false; - } - return true; - }; - - return XMLCharacterData; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js deleted file mode 100644 index 82872168..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLComment.js +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLCharacterData, XMLComment, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - NodeType = require('./NodeType'); - - XMLCharacterData = require('./XMLCharacterData'); - - module.exports = XMLComment = (function(superClass) { - extend(XMLComment, superClass); - - function XMLComment(parent, text) { - XMLComment.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing comment text. " + this.debugInfo()); - } - this.name = "#comment"; - this.type = NodeType.Comment; - this.value = this.stringify.comment(text); - } - - XMLComment.prototype.clone = function() { - return Object.create(this); - }; - - XMLComment.prototype.toString = function(options) { - return this.options.writer.comment(this, this.options.writer.filterOptions(options)); - }; - - return XMLComment; - - })(XMLCharacterData); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js deleted file mode 100644 index b331b86f..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; - - XMLDOMErrorHandler = require('./XMLDOMErrorHandler'); - - XMLDOMStringList = require('./XMLDOMStringList'); - - module.exports = XMLDOMConfiguration = (function() { - function XMLDOMConfiguration() { - var clonedSelf; - this.defaultParams = { - "canonical-form": false, - "cdata-sections": false, - "comments": false, - "datatype-normalization": false, - "element-content-whitespace": true, - "entities": true, - "error-handler": new XMLDOMErrorHandler(), - "infoset": true, - "validate-if-schema": false, - "namespaces": true, - "namespace-declarations": true, - "normalize-characters": false, - "schema-location": '', - "schema-type": '', - "split-cdata-sections": true, - "validate": false, - "well-formed": true - }; - this.params = clonedSelf = Object.create(this.defaultParams); - } - - Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', { - get: function() { - return new XMLDOMStringList(Object.keys(this.defaultParams)); - } - }); - - XMLDOMConfiguration.prototype.getParameter = function(name) { - if (this.params.hasOwnProperty(name)) { - return this.params[name]; - } else { - return null; - } - }; - - XMLDOMConfiguration.prototype.canSetParameter = function(name, value) { - return true; - }; - - XMLDOMConfiguration.prototype.setParameter = function(name, value) { - if (value != null) { - return this.params[name] = value; - } else { - return delete this.params[name]; - } - }; - - return XMLDOMConfiguration; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js deleted file mode 100644 index 4a0446c0..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +++ /dev/null @@ -1,16 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLDOMErrorHandler; - - module.exports = XMLDOMErrorHandler = (function() { - function XMLDOMErrorHandler() {} - - XMLDOMErrorHandler.prototype.handleError = function(error) { - throw new Error(error); - }; - - return XMLDOMErrorHandler; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js deleted file mode 100644 index 4f9f9db1..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMImplementation.js +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLDOMImplementation; - - module.exports = XMLDOMImplementation = (function() { - function XMLDOMImplementation() {} - - XMLDOMImplementation.prototype.hasFeature = function(feature, version) { - return true; - }; - - XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { - throw new Error("This DOM method is not implemented."); - }; - - XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { - throw new Error("This DOM method is not implemented."); - }; - - XMLDOMImplementation.prototype.createHTMLDocument = function(title) { - throw new Error("This DOM method is not implemented."); - }; - - XMLDOMImplementation.prototype.getFeature = function(feature, version) { - throw new Error("This DOM method is not implemented."); - }; - - return XMLDOMImplementation; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js deleted file mode 100644 index ba558c5b..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDOMStringList.js +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLDOMStringList; - - module.exports = XMLDOMStringList = (function() { - function XMLDOMStringList(arr) { - this.arr = arr || []; - } - - Object.defineProperty(XMLDOMStringList.prototype, 'length', { - get: function() { - return this.arr.length; - } - }); - - XMLDOMStringList.prototype.item = function(index) { - return this.arr[index] || null; - }; - - XMLDOMStringList.prototype.contains = function(str) { - return this.arr.indexOf(str) !== -1; - }; - - return XMLDOMStringList; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js deleted file mode 100644 index aca9dbd4..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDAttList.js +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDTDAttList, XMLNode, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDTDAttList = (function(superClass) { - extend(XMLDTDAttList, superClass); - - function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { - XMLDTDAttList.__super__.constructor.call(this, parent); - if (elementName == null) { - throw new Error("Missing DTD element name. " + this.debugInfo()); - } - if (attributeName == null) { - throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); - } - if (!attributeType) { - throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); - } - if (!defaultValueType) { - throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); - } - if (defaultValueType.indexOf('#') !== 0) { - defaultValueType = '#' + defaultValueType; - } - if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { - throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); - } - if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { - throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); - } - this.elementName = this.stringify.name(elementName); - this.type = NodeType.AttributeDeclaration; - this.attributeName = this.stringify.name(attributeName); - this.attributeType = this.stringify.dtdAttType(attributeType); - if (defaultValue) { - this.defaultValue = this.stringify.dtdAttDefault(defaultValue); - } - this.defaultValueType = defaultValueType; - } - - XMLDTDAttList.prototype.toString = function(options) { - return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); - }; - - return XMLDTDAttList; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js deleted file mode 100644 index f8f1ae76..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDElement.js +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDTDElement, XMLNode, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDTDElement = (function(superClass) { - extend(XMLDTDElement, superClass); - - function XMLDTDElement(parent, name, value) { - XMLDTDElement.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD element name. " + this.debugInfo()); - } - if (!value) { - value = '(#PCDATA)'; - } - if (Array.isArray(value)) { - value = '(' + value.join(',') + ')'; - } - this.name = this.stringify.name(name); - this.type = NodeType.ElementDeclaration; - this.value = this.stringify.dtdElementValue(value); - } - - XMLDTDElement.prototype.toString = function(options) { - return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); - }; - - return XMLDTDElement; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js deleted file mode 100644 index 0a940d6e..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDEntity.js +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDTDEntity, XMLNode, isObject, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - isObject = require('./Utility').isObject; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDTDEntity = (function(superClass) { - extend(XMLDTDEntity, superClass); - - function XMLDTDEntity(parent, pe, name, value) { - XMLDTDEntity.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD entity name. " + this.debugInfo(name)); - } - if (value == null) { - throw new Error("Missing DTD entity value. " + this.debugInfo(name)); - } - this.pe = !!pe; - this.name = this.stringify.name(name); - this.type = NodeType.EntityDeclaration; - if (!isObject(value)) { - this.value = this.stringify.dtdEntityValue(value); - this.internal = true; - } else { - if (!value.pubID && !value.sysID) { - throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); - } - if (value.pubID && !value.sysID) { - throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); - } - this.internal = false; - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - if (value.nData != null) { - this.nData = this.stringify.dtdNData(value.nData); - } - if (this.pe && this.nData) { - throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); - } - } - } - - Object.defineProperty(XMLDTDEntity.prototype, 'publicId', { - get: function() { - return this.pubID; - } - }); - - Object.defineProperty(XMLDTDEntity.prototype, 'systemId', { - get: function() { - return this.sysID; - } - }); - - Object.defineProperty(XMLDTDEntity.prototype, 'notationName', { - get: function() { - return this.nData || null; - } - }); - - Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', { - get: function() { - return null; - } - }); - - Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', { - get: function() { - return null; - } - }); - - Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', { - get: function() { - return null; - } - }); - - XMLDTDEntity.prototype.toString = function(options) { - return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); - }; - - return XMLDTDEntity; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js deleted file mode 100644 index 57a119d2..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDTDNotation.js +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDTDNotation, XMLNode, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDTDNotation = (function(superClass) { - extend(XMLDTDNotation, superClass); - - function XMLDTDNotation(parent, name, value) { - XMLDTDNotation.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD notation name. " + this.debugInfo(name)); - } - if (!value.pubID && !value.sysID) { - throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); - } - this.name = this.stringify.name(name); - this.type = NodeType.NotationDeclaration; - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - } - - Object.defineProperty(XMLDTDNotation.prototype, 'publicId', { - get: function() { - return this.pubID; - } - }); - - Object.defineProperty(XMLDTDNotation.prototype, 'systemId', { - get: function() { - return this.sysID; - } - }); - - XMLDTDNotation.prototype.toString = function(options) { - return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); - }; - - return XMLDTDNotation; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js deleted file mode 100644 index d4f7f447..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDeclaration.js +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDeclaration, XMLNode, isObject, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - isObject = require('./Utility').isObject; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDeclaration = (function(superClass) { - extend(XMLDeclaration, superClass); - - function XMLDeclaration(parent, version, encoding, standalone) { - var ref; - XMLDeclaration.__super__.constructor.call(this, parent); - if (isObject(version)) { - ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; - } - if (!version) { - version = '1.0'; - } - this.type = NodeType.Declaration; - this.version = this.stringify.xmlVersion(version); - if (encoding != null) { - this.encoding = this.stringify.xmlEncoding(encoding); - } - if (standalone != null) { - this.standalone = this.stringify.xmlStandalone(standalone); - } - } - - XMLDeclaration.prototype.toString = function(options) { - return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); - }; - - return XMLDeclaration; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js deleted file mode 100644 index ef043f4c..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocType.js +++ /dev/null @@ -1,186 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - isObject = require('./Utility').isObject; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLNamedNodeMap = require('./XMLNamedNodeMap'); - - module.exports = XMLDocType = (function(superClass) { - extend(XMLDocType, superClass); - - function XMLDocType(parent, pubID, sysID) { - var child, i, len, ref, ref1, ref2; - XMLDocType.__super__.constructor.call(this, parent); - this.type = NodeType.DocType; - if (parent.children) { - ref = parent.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.Element) { - this.name = child.name; - break; - } - } - } - this.documentObject = parent; - if (isObject(pubID)) { - ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; - } - if (sysID == null) { - ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; - } - if (pubID != null) { - this.pubID = this.stringify.dtdPubID(pubID); - } - if (sysID != null) { - this.sysID = this.stringify.dtdSysID(sysID); - } - } - - Object.defineProperty(XMLDocType.prototype, 'entities', { - get: function() { - var child, i, len, nodes, ref; - nodes = {}; - ref = this.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if ((child.type === NodeType.EntityDeclaration) && !child.pe) { - nodes[child.name] = child; - } - } - return new XMLNamedNodeMap(nodes); - } - }); - - Object.defineProperty(XMLDocType.prototype, 'notations', { - get: function() { - var child, i, len, nodes, ref; - nodes = {}; - ref = this.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.NotationDeclaration) { - nodes[child.name] = child; - } - } - return new XMLNamedNodeMap(nodes); - } - }); - - Object.defineProperty(XMLDocType.prototype, 'publicId', { - get: function() { - return this.pubID; - } - }); - - Object.defineProperty(XMLDocType.prototype, 'systemId', { - get: function() { - return this.sysID; - } - }); - - Object.defineProperty(XMLDocType.prototype, 'internalSubset', { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - - XMLDocType.prototype.element = function(name, value) { - var child; - child = new XMLDTDElement(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var child; - child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.entity = function(name, value) { - var child; - child = new XMLDTDEntity(this, false, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.pEntity = function(name, value) { - var child; - child = new XMLDTDEntity(this, true, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.notation = function(name, value) { - var child; - child = new XMLDTDNotation(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.toString = function(options) { - return this.options.writer.docType(this, this.options.writer.filterOptions(options)); - }; - - XMLDocType.prototype.ele = function(name, value) { - return this.element(name, value); - }; - - XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); - }; - - XMLDocType.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - - XMLDocType.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - - XMLDocType.prototype.not = function(name, value) { - return this.notation(name, value); - }; - - XMLDocType.prototype.up = function() { - return this.root() || this.documentObject; - }; - - XMLDocType.prototype.isEqualNode = function(node) { - if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.name !== this.name) { - return false; - } - if (node.publicId !== this.publicId) { - return false; - } - if (node.systemId !== this.systemId) { - return false; - } - return true; - }; - - return XMLDocType; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js deleted file mode 100644 index 88df56c4..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocument.js +++ /dev/null @@ -1,242 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - isPlainObject = require('./Utility').isPlainObject; - - XMLDOMImplementation = require('./XMLDOMImplementation'); - - XMLDOMConfiguration = require('./XMLDOMConfiguration'); - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - XMLStringifier = require('./XMLStringifier'); - - XMLStringWriter = require('./XMLStringWriter'); - - module.exports = XMLDocument = (function(superClass) { - extend(XMLDocument, superClass); - - function XMLDocument(options) { - XMLDocument.__super__.constructor.call(this, null); - this.name = "#document"; - this.type = NodeType.Document; - this.documentURI = null; - this.domConfig = new XMLDOMConfiguration(); - options || (options = {}); - if (!options.writer) { - options.writer = new XMLStringWriter(); - } - this.options = options; - this.stringify = new XMLStringifier(options); - } - - Object.defineProperty(XMLDocument.prototype, 'implementation', { - value: new XMLDOMImplementation() - }); - - Object.defineProperty(XMLDocument.prototype, 'doctype', { - get: function() { - var child, i, len, ref; - ref = this.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.DocType) { - return child; - } - } - return null; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'documentElement', { - get: function() { - return this.rootObject || null; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'inputEncoding', { - get: function() { - return null; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', { - get: function() { - return false; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', { - get: function() { - if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { - return this.children[0].encoding; - } else { - return null; - } - } - }); - - Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', { - get: function() { - if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { - return this.children[0].standalone === 'yes'; - } else { - return false; - } - } - }); - - Object.defineProperty(XMLDocument.prototype, 'xmlVersion', { - get: function() { - if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { - return this.children[0].version; - } else { - return "1.0"; - } - } - }); - - Object.defineProperty(XMLDocument.prototype, 'URL', { - get: function() { - return this.documentURI; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'origin', { - get: function() { - return null; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'compatMode', { - get: function() { - return null; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'characterSet', { - get: function() { - return null; - } - }); - - Object.defineProperty(XMLDocument.prototype, 'contentType', { - get: function() { - return null; - } - }); - - XMLDocument.prototype.end = function(writer) { - var writerOptions; - writerOptions = {}; - if (!writer) { - writer = this.options.writer; - } else if (isPlainObject(writer)) { - writerOptions = writer; - writer = this.options.writer; - } - return writer.document(this, writer.filterOptions(writerOptions)); - }; - - XMLDocument.prototype.toString = function(options) { - return this.options.writer.document(this, this.options.writer.filterOptions(options)); - }; - - XMLDocument.prototype.createElement = function(tagName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createDocumentFragment = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createTextNode = function(data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createComment = function(data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createCDATASection = function(data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createProcessingInstruction = function(target, data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createAttribute = function(name) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createEntityReference = function(name) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.getElementsByTagName = function(tagname) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.importNode = function(importedNode, deep) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.getElementById = function(elementId) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.adoptNode = function(source) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.normalizeDocument = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.getElementsByClassName = function(classNames) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createEvent = function(eventInterface) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createRange = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - return XMLDocument; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js deleted file mode 100644 index ca1aa1cf..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentCB.js +++ /dev/null @@ -1,528 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, - hasProp = {}.hasOwnProperty; - - ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; - - NodeType = require('./NodeType'); - - XMLDocument = require('./XMLDocument'); - - XMLElement = require('./XMLElement'); - - XMLCData = require('./XMLCData'); - - XMLComment = require('./XMLComment'); - - XMLRaw = require('./XMLRaw'); - - XMLText = require('./XMLText'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - XMLDeclaration = require('./XMLDeclaration'); - - XMLDocType = require('./XMLDocType'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLAttribute = require('./XMLAttribute'); - - XMLStringifier = require('./XMLStringifier'); - - XMLStringWriter = require('./XMLStringWriter'); - - WriterState = require('./WriterState'); - - module.exports = XMLDocumentCB = (function() { - function XMLDocumentCB(options, onData, onEnd) { - var writerOptions; - this.name = "?xml"; - this.type = NodeType.Document; - options || (options = {}); - writerOptions = {}; - if (!options.writer) { - options.writer = new XMLStringWriter(); - } else if (isPlainObject(options.writer)) { - writerOptions = options.writer; - options.writer = new XMLStringWriter(); - } - this.options = options; - this.writer = options.writer; - this.writerOptions = this.writer.filterOptions(writerOptions); - this.stringify = new XMLStringifier(options); - this.onDataCallback = onData || function() {}; - this.onEndCallback = onEnd || function() {}; - this.currentNode = null; - this.currentLevel = -1; - this.openTags = {}; - this.documentStarted = false; - this.documentCompleted = false; - this.root = null; - } - - XMLDocumentCB.prototype.createChildNode = function(node) { - var att, attName, attributes, child, i, len, ref1, ref2; - switch (node.type) { - case NodeType.CData: - this.cdata(node.value); - break; - case NodeType.Comment: - this.comment(node.value); - break; - case NodeType.Element: - attributes = {}; - ref1 = node.attribs; - for (attName in ref1) { - if (!hasProp.call(ref1, attName)) continue; - att = ref1[attName]; - attributes[attName] = att.value; - } - this.node(node.name, attributes); - break; - case NodeType.Dummy: - this.dummy(); - break; - case NodeType.Raw: - this.raw(node.value); - break; - case NodeType.Text: - this.text(node.value); - break; - case NodeType.ProcessingInstruction: - this.instruction(node.target, node.value); - break; - default: - throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); - } - ref2 = node.children; - for (i = 0, len = ref2.length; i < len; i++) { - child = ref2[i]; - this.createChildNode(child); - if (child.type === NodeType.Element) { - this.up(); - } - } - return this; - }; - - XMLDocumentCB.prototype.dummy = function() { - return this; - }; - - XMLDocumentCB.prototype.node = function(name, attributes, text) { - var ref1; - if (name == null) { - throw new Error("Missing node name."); - } - if (this.root && this.currentLevel === -1) { - throw new Error("Document can only have one root node. " + this.debugInfo(name)); - } - this.openCurrent(); - name = getValue(name); - if (attributes == null) { - attributes = {}; - } - attributes = getValue(attributes); - if (!isObject(attributes)) { - ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; - } - this.currentNode = new XMLElement(this, name, attributes); - this.currentNode.children = false; - this.currentLevel++; - this.openTags[this.currentLevel] = this.currentNode; - if (text != null) { - this.text(text); - } - return this; - }; - - XMLDocumentCB.prototype.element = function(name, attributes, text) { - var child, i, len, oldValidationFlag, ref1, root; - if (this.currentNode && this.currentNode.type === NodeType.DocType) { - this.dtdElement.apply(this, arguments); - } else { - if (Array.isArray(name) || isObject(name) || isFunction(name)) { - oldValidationFlag = this.options.noValidation; - this.options.noValidation = true; - root = new XMLDocument(this.options).element('TEMP_ROOT'); - root.element(name); - this.options.noValidation = oldValidationFlag; - ref1 = root.children; - for (i = 0, len = ref1.length; i < len; i++) { - child = ref1[i]; - this.createChildNode(child); - if (child.type === NodeType.Element) { - this.up(); - } - } - } else { - this.node(name, attributes, text); - } - } - return this; - }; - - XMLDocumentCB.prototype.attribute = function(name, value) { - var attName, attValue; - if (!this.currentNode || this.currentNode.children) { - throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); - } - if (name != null) { - name = getValue(name); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (this.options.keepNullAttributes && (value == null)) { - this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); - } else if (value != null) { - this.currentNode.attribs[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - - XMLDocumentCB.prototype.text = function(value) { - var node; - this.openCurrent(); - node = new XMLText(this, value); - this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.cdata = function(value) { - var node; - this.openCurrent(); - node = new XMLCData(this, value); - this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.comment = function(value) { - var node; - this.openCurrent(); - node = new XMLComment(this, value); - this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.raw = function(value) { - var node; - this.openCurrent(); - node = new XMLRaw(this, value); - this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.instruction = function(target, value) { - var i, insTarget, insValue, len, node; - this.openCurrent(); - if (target != null) { - target = getValue(target); - } - if (value != null) { - value = getValue(value); - } - if (Array.isArray(target)) { - for (i = 0, len = target.length; i < len; i++) { - insTarget = target[i]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - node = new XMLProcessingInstruction(this, target, value); - this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - } - return this; - }; - - XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) { - var node; - this.openCurrent(); - if (this.documentStarted) { - throw new Error("declaration() must be the first node."); - } - node = new XMLDeclaration(this, version, encoding, standalone); - this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) { - this.openCurrent(); - if (root == null) { - throw new Error("Missing root node name."); - } - if (this.root) { - throw new Error("dtd() must come before the root node."); - } - this.currentNode = new XMLDocType(this, pubID, sysID); - this.currentNode.rootNodeName = root; - this.currentNode.children = false; - this.currentLevel++; - this.openTags[this.currentLevel] = this.currentNode; - return this; - }; - - XMLDocumentCB.prototype.dtdElement = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDElement(this, name, value); - this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var node; - this.openCurrent(); - node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.entity = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDEntity(this, false, name, value); - this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.pEntity = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDEntity(this, true, name, value); - this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.notation = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDNotation(this, name, value); - this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - - XMLDocumentCB.prototype.up = function() { - if (this.currentLevel < 0) { - throw new Error("The document node has no parent."); - } - if (this.currentNode) { - if (this.currentNode.children) { - this.closeNode(this.currentNode); - } else { - this.openNode(this.currentNode); - } - this.currentNode = null; - } else { - this.closeNode(this.openTags[this.currentLevel]); - } - delete this.openTags[this.currentLevel]; - this.currentLevel--; - return this; - }; - - XMLDocumentCB.prototype.end = function() { - while (this.currentLevel >= 0) { - this.up(); - } - return this.onEnd(); - }; - - XMLDocumentCB.prototype.openCurrent = function() { - if (this.currentNode) { - this.currentNode.children = true; - return this.openNode(this.currentNode); - } - }; - - XMLDocumentCB.prototype.openNode = function(node) { - var att, chunk, name, ref1; - if (!node.isOpen) { - if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { - this.root = node; - } - chunk = ''; - if (node.type === NodeType.Element) { - this.writerOptions.state = WriterState.OpenTag; - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name; - ref1 = node.attribs; - for (name in ref1) { - if (!hasProp.call(ref1, name)) continue; - att = ref1[name]; - chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); - } - chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel); - this.writerOptions.state = WriterState.InsideTag; - } else { - this.writerOptions.state = WriterState.OpenTag; - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ''; - } - chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); - } - this.onData(chunk, this.currentLevel); - return node.isOpen = true; - } - }; - - XMLDocumentCB.prototype.closeNode = function(node) { - var chunk; - if (!node.isClosed) { - chunk = ''; - this.writerOptions.state = WriterState.CloseTag; - if (node.type === NodeType.Element) { - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '' + this.writer.endline(node, this.writerOptions, this.currentLevel); - } else { - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel); - } - this.writerOptions.state = WriterState.None; - this.onData(chunk, this.currentLevel); - return node.isClosed = true; - } - }; - - XMLDocumentCB.prototype.onData = function(chunk, level) { - this.documentStarted = true; - return this.onDataCallback(chunk, level + 1); - }; - - XMLDocumentCB.prototype.onEnd = function() { - this.documentCompleted = true; - return this.onEndCallback(); - }; - - XMLDocumentCB.prototype.debugInfo = function(name) { - if (name == null) { - return ""; - } else { - return "node: <" + name + ">"; - } - }; - - XMLDocumentCB.prototype.ele = function() { - return this.element.apply(this, arguments); - }; - - XMLDocumentCB.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLDocumentCB.prototype.txt = function(value) { - return this.text(value); - }; - - XMLDocumentCB.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLDocumentCB.prototype.com = function(value) { - return this.comment(value); - }; - - XMLDocumentCB.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLDocumentCB.prototype.dec = function(version, encoding, standalone) { - return this.declaration(version, encoding, standalone); - }; - - XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) { - return this.doctype(root, pubID, sysID); - }; - - XMLDocumentCB.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLDocumentCB.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLDocumentCB.prototype.t = function(value) { - return this.text(value); - }; - - XMLDocumentCB.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLDocumentCB.prototype.c = function(value) { - return this.comment(value); - }; - - XMLDocumentCB.prototype.r = function(value) { - return this.raw(value); - }; - - XMLDocumentCB.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - - XMLDocumentCB.prototype.att = function() { - if (this.currentNode && this.currentNode.type === NodeType.DocType) { - return this.attList.apply(this, arguments); - } else { - return this.attribute.apply(this, arguments); - } - }; - - XMLDocumentCB.prototype.a = function() { - if (this.currentNode && this.currentNode.type === NodeType.DocType) { - return this.attList.apply(this, arguments); - } else { - return this.attribute.apply(this, arguments); - } - }; - - XMLDocumentCB.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - - XMLDocumentCB.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - - XMLDocumentCB.prototype.not = function(name, value) { - return this.notation(name, value); - }; - - return XMLDocumentCB; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js deleted file mode 100644 index 5d6039c4..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDocumentFragment.js +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDocumentFragment, XMLNode, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDocumentFragment = (function(superClass) { - extend(XMLDocumentFragment, superClass); - - function XMLDocumentFragment() { - XMLDocumentFragment.__super__.constructor.call(this, null); - this.name = "#document-fragment"; - this.type = NodeType.DocumentFragment; - } - - return XMLDocumentFragment; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js deleted file mode 100644 index b26083a3..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLDummy.js +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLDummy, XMLNode, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - module.exports = XMLDummy = (function(superClass) { - extend(XMLDummy, superClass); - - function XMLDummy(parent) { - XMLDummy.__super__.constructor.call(this, parent); - this.type = NodeType.Dummy; - } - - XMLDummy.prototype.clone = function() { - return Object.create(this); - }; - - XMLDummy.prototype.toString = function(options) { - return ''; - }; - - return XMLDummy; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js deleted file mode 100644 index c1657299..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLElement.js +++ /dev/null @@ -1,298 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; - - XMLNode = require('./XMLNode'); - - NodeType = require('./NodeType'); - - XMLAttribute = require('./XMLAttribute'); - - XMLNamedNodeMap = require('./XMLNamedNodeMap'); - - module.exports = XMLElement = (function(superClass) { - extend(XMLElement, superClass); - - function XMLElement(parent, name, attributes) { - var child, j, len, ref1; - XMLElement.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing element name. " + this.debugInfo()); - } - this.name = this.stringify.name(name); - this.type = NodeType.Element; - this.attribs = {}; - this.schemaTypeInfo = null; - if (attributes != null) { - this.attribute(attributes); - } - if (parent.type === NodeType.Document) { - this.isRoot = true; - this.documentObject = parent; - parent.rootObject = this; - if (parent.children) { - ref1 = parent.children; - for (j = 0, len = ref1.length; j < len; j++) { - child = ref1[j]; - if (child.type === NodeType.DocType) { - child.name = this.name; - break; - } - } - } - } - } - - Object.defineProperty(XMLElement.prototype, 'tagName', { - get: function() { - return this.name; - } - }); - - Object.defineProperty(XMLElement.prototype, 'namespaceURI', { - get: function() { - return ''; - } - }); - - Object.defineProperty(XMLElement.prototype, 'prefix', { - get: function() { - return ''; - } - }); - - Object.defineProperty(XMLElement.prototype, 'localName', { - get: function() { - return this.name; - } - }); - - Object.defineProperty(XMLElement.prototype, 'id', { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - - Object.defineProperty(XMLElement.prototype, 'className', { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - - Object.defineProperty(XMLElement.prototype, 'classList', { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - - Object.defineProperty(XMLElement.prototype, 'attributes', { - get: function() { - if (!this.attributeMap || !this.attributeMap.nodes) { - this.attributeMap = new XMLNamedNodeMap(this.attribs); - } - return this.attributeMap; - } - }); - - XMLElement.prototype.clone = function() { - var att, attName, clonedSelf, ref1; - clonedSelf = Object.create(this); - if (clonedSelf.isRoot) { - clonedSelf.documentObject = null; - } - clonedSelf.attribs = {}; - ref1 = this.attribs; - for (attName in ref1) { - if (!hasProp.call(ref1, attName)) continue; - att = ref1[attName]; - clonedSelf.attribs[attName] = att.clone(); - } - clonedSelf.children = []; - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - return clonedSelf; - }; - - XMLElement.prototype.attribute = function(name, value) { - var attName, attValue; - if (name != null) { - name = getValue(name); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (this.options.keepNullAttributes && (value == null)) { - this.attribs[name] = new XMLAttribute(this, name, ""); - } else if (value != null) { - this.attribs[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - - XMLElement.prototype.removeAttribute = function(name) { - var attName, j, len; - if (name == null) { - throw new Error("Missing attribute name. " + this.debugInfo()); - } - name = getValue(name); - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - attName = name[j]; - delete this.attribs[attName]; - } - } else { - delete this.attribs[name]; - } - return this; - }; - - XMLElement.prototype.toString = function(options) { - return this.options.writer.element(this, this.options.writer.filterOptions(options)); - }; - - XMLElement.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.getAttribute = function(name) { - if (this.attribs.hasOwnProperty(name)) { - return this.attribs[name].value; - } else { - return null; - } - }; - - XMLElement.prototype.setAttribute = function(name, value) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getAttributeNode = function(name) { - if (this.attribs.hasOwnProperty(name)) { - return this.attribs[name]; - } else { - return null; - } - }; - - XMLElement.prototype.setAttributeNode = function(newAttr) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.removeAttributeNode = function(oldAttr) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getElementsByTagName = function(name) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.setAttributeNodeNS = function(newAttr) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.hasAttribute = function(name) { - return this.attribs.hasOwnProperty(name); - }; - - XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.setIdAttribute = function(name, isId) { - if (this.attribs.hasOwnProperty(name)) { - return this.attribs[name].isId; - } else { - return isId; - } - }; - - XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getElementsByTagName = function(tagname) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.getElementsByClassName = function(classNames) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLElement.prototype.isEqualNode = function(node) { - var i, j, ref1; - if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.namespaceURI !== this.namespaceURI) { - return false; - } - if (node.prefix !== this.prefix) { - return false; - } - if (node.localName !== this.localName) { - return false; - } - if (node.attribs.length !== this.attribs.length) { - return false; - } - for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { - if (!this.attribs[i].isEqualNode(node.attribs[i])) { - return false; - } - } - return true; - }; - - return XMLElement; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js deleted file mode 100644 index 885402d0..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLNamedNodeMap; - - module.exports = XMLNamedNodeMap = (function() { - function XMLNamedNodeMap(nodes) { - this.nodes = nodes; - } - - Object.defineProperty(XMLNamedNodeMap.prototype, 'length', { - get: function() { - return Object.keys(this.nodes).length || 0; - } - }); - - XMLNamedNodeMap.prototype.clone = function() { - return this.nodes = null; - }; - - XMLNamedNodeMap.prototype.getNamedItem = function(name) { - return this.nodes[name]; - }; - - XMLNamedNodeMap.prototype.setNamedItem = function(node) { - var oldNode; - oldNode = this.nodes[node.nodeName]; - this.nodes[node.nodeName] = node; - return oldNode || null; - }; - - XMLNamedNodeMap.prototype.removeNamedItem = function(name) { - var oldNode; - oldNode = this.nodes[name]; - delete this.nodes[name]; - return oldNode || null; - }; - - XMLNamedNodeMap.prototype.item = function(index) { - return this.nodes[Object.keys(this.nodes)[index]] || null; - }; - - XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented."); - }; - - XMLNamedNodeMap.prototype.setNamedItemNS = function(node) { - throw new Error("This DOM method is not implemented."); - }; - - XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented."); - }; - - return XMLNamedNodeMap; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js deleted file mode 100644 index e2c7bb76..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLNode.js +++ /dev/null @@ -1,785 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, - hasProp = {}.hasOwnProperty; - - ref1 = require('./Utility'), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; - - XMLElement = null; - - XMLCData = null; - - XMLComment = null; - - XMLDeclaration = null; - - XMLDocType = null; - - XMLRaw = null; - - XMLText = null; - - XMLProcessingInstruction = null; - - XMLDummy = null; - - NodeType = null; - - XMLNodeList = null; - - XMLNamedNodeMap = null; - - DocumentPosition = null; - - module.exports = XMLNode = (function() { - function XMLNode(parent1) { - this.parent = parent1; - if (this.parent) { - this.options = this.parent.options; - this.stringify = this.parent.stringify; - } - this.value = null; - this.children = []; - this.baseURI = null; - if (!XMLElement) { - XMLElement = require('./XMLElement'); - XMLCData = require('./XMLCData'); - XMLComment = require('./XMLComment'); - XMLDeclaration = require('./XMLDeclaration'); - XMLDocType = require('./XMLDocType'); - XMLRaw = require('./XMLRaw'); - XMLText = require('./XMLText'); - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - XMLDummy = require('./XMLDummy'); - NodeType = require('./NodeType'); - XMLNodeList = require('./XMLNodeList'); - XMLNamedNodeMap = require('./XMLNamedNodeMap'); - DocumentPosition = require('./DocumentPosition'); - } - } - - Object.defineProperty(XMLNode.prototype, 'nodeName', { - get: function() { - return this.name; - } - }); - - Object.defineProperty(XMLNode.prototype, 'nodeType', { - get: function() { - return this.type; - } - }); - - Object.defineProperty(XMLNode.prototype, 'nodeValue', { - get: function() { - return this.value; - } - }); - - Object.defineProperty(XMLNode.prototype, 'parentNode', { - get: function() { - return this.parent; - } - }); - - Object.defineProperty(XMLNode.prototype, 'childNodes', { - get: function() { - if (!this.childNodeList || !this.childNodeList.nodes) { - this.childNodeList = new XMLNodeList(this.children); - } - return this.childNodeList; - } - }); - - Object.defineProperty(XMLNode.prototype, 'firstChild', { - get: function() { - return this.children[0] || null; - } - }); - - Object.defineProperty(XMLNode.prototype, 'lastChild', { - get: function() { - return this.children[this.children.length - 1] || null; - } - }); - - Object.defineProperty(XMLNode.prototype, 'previousSibling', { - get: function() { - var i; - i = this.parent.children.indexOf(this); - return this.parent.children[i - 1] || null; - } - }); - - Object.defineProperty(XMLNode.prototype, 'nextSibling', { - get: function() { - var i; - i = this.parent.children.indexOf(this); - return this.parent.children[i + 1] || null; - } - }); - - Object.defineProperty(XMLNode.prototype, 'ownerDocument', { - get: function() { - return this.document() || null; - } - }); - - Object.defineProperty(XMLNode.prototype, 'textContent', { - get: function() { - var child, j, len, ref2, str; - if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { - str = ''; - ref2 = this.children; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - if (child.textContent) { - str += child.textContent; - } - } - return str; - } else { - return null; - } - }, - set: function(value) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - - XMLNode.prototype.setParent = function(parent) { - var child, j, len, ref2, results; - this.parent = parent; - if (parent) { - this.options = parent.options; - this.stringify = parent.stringify; - } - ref2 = this.children; - results = []; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - results.push(child.setParent(this)); - } - return results; - }; - - XMLNode.prototype.element = function(name, attributes, text) { - var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; - lastChild = null; - if (attributes === null && (text == null)) { - ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; - } - if (attributes == null) { - attributes = {}; - } - attributes = getValue(attributes); - if (!isObject(attributes)) { - ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; - } - if (name != null) { - name = getValue(name); - } - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - item = name[j]; - lastChild = this.element(item); - } - } else if (isFunction(name)) { - lastChild = this.element(name.apply()); - } else if (isObject(name)) { - for (key in name) { - if (!hasProp.call(name, key)) continue; - val = name[key]; - if (isFunction(val)) { - val = val.apply(); - } - if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { - lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); - } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { - lastChild = this.dummy(); - } else if (isObject(val) && isEmpty(val)) { - lastChild = this.element(key); - } else if (!this.options.keepNullNodes && (val == null)) { - lastChild = this.dummy(); - } else if (!this.options.separateArrayItems && Array.isArray(val)) { - for (k = 0, len1 = val.length; k < len1; k++) { - item = val[k]; - childNode = {}; - childNode[key] = item; - lastChild = this.element(childNode); - } - } else if (isObject(val)) { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.element(val); - } else { - lastChild = this.element(key); - lastChild.element(val); - } - } else { - lastChild = this.element(key, val); - } - } - } else if (!this.options.keepNullNodes && text === null) { - lastChild = this.dummy(); - } else { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.text(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { - lastChild = this.cdata(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { - lastChild = this.comment(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { - lastChild = this.raw(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { - lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); - } else { - lastChild = this.node(name, attributes, text); - } - } - if (lastChild == null) { - throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); - } - return lastChild; - }; - - XMLNode.prototype.insertBefore = function(name, attributes, text) { - var child, i, newChild, refChild, removed; - if (name != null ? name.type : void 0) { - newChild = name; - refChild = attributes; - newChild.setParent(this); - if (refChild) { - i = children.indexOf(refChild); - removed = children.splice(i); - children.push(newChild); - Array.prototype.push.apply(children, removed); - } else { - children.push(newChild); - } - return newChild; - } else { - if (this.isRoot) { - throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - } - }; - - XMLNode.prototype.insertAfter = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.remove = function() { - var i, ref2; - if (this.isRoot) { - throw new Error("Cannot remove the root element. " + this.debugInfo()); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; - return this.parent; - }; - - XMLNode.prototype.node = function(name, attributes, text) { - var child, ref2; - if (name != null) { - name = getValue(name); - } - attributes || (attributes = {}); - attributes = getValue(attributes); - if (!isObject(attributes)) { - ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; - } - child = new XMLElement(this, name, attributes); - if (text != null) { - child.text(text); - } - this.children.push(child); - return child; - }; - - XMLNode.prototype.text = function(value) { - var child; - if (isObject(value)) { - this.element(value); - } - child = new XMLText(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.commentBefore = function(value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.comment(value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.commentAfter = function(value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.comment(value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.raw = function(value) { - var child; - child = new XMLRaw(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.dummy = function() { - var child; - child = new XMLDummy(this); - return child; - }; - - XMLNode.prototype.instruction = function(target, value) { - var insTarget, insValue, instruction, j, len; - if (target != null) { - target = getValue(target); - } - if (value != null) { - value = getValue(value); - } - if (Array.isArray(target)) { - for (j = 0, len = target.length; j < len; j++) { - insTarget = target[j]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - instruction = new XMLProcessingInstruction(this, target, value); - this.children.push(instruction); - } - return this; - }; - - XMLNode.prototype.instructionBefore = function(target, value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.instruction(target, value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.instructionAfter = function(target, value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.instruction(target, value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.declaration = function(version, encoding, standalone) { - var doc, xmldec; - doc = this.document(); - xmldec = new XMLDeclaration(doc, version, encoding, standalone); - if (doc.children.length === 0) { - doc.children.unshift(xmldec); - } else if (doc.children[0].type === NodeType.Declaration) { - doc.children[0] = xmldec; - } else { - doc.children.unshift(xmldec); - } - return doc.root() || doc; - }; - - XMLNode.prototype.dtd = function(pubID, sysID) { - var child, doc, doctype, i, j, k, len, len1, ref2, ref3; - doc = this.document(); - doctype = new XMLDocType(doc, pubID, sysID); - ref2 = doc.children; - for (i = j = 0, len = ref2.length; j < len; i = ++j) { - child = ref2[i]; - if (child.type === NodeType.DocType) { - doc.children[i] = doctype; - return doctype; - } - } - ref3 = doc.children; - for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { - child = ref3[i]; - if (child.isRoot) { - doc.children.splice(i, 0, doctype); - return doctype; - } - } - doc.children.push(doctype); - return doctype; - }; - - XMLNode.prototype.up = function() { - if (this.isRoot) { - throw new Error("The root node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - - XMLNode.prototype.root = function() { - var node; - node = this; - while (node) { - if (node.type === NodeType.Document) { - return node.rootObject; - } else if (node.isRoot) { - return node; - } else { - node = node.parent; - } - } - }; - - XMLNode.prototype.document = function() { - var node; - node = this; - while (node) { - if (node.type === NodeType.Document) { - return node; - } else { - node = node.parent; - } - } - }; - - XMLNode.prototype.end = function(options) { - return this.document().end(options); - }; - - XMLNode.prototype.prev = function() { - var i; - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node. " + this.debugInfo()); - } - return this.parent.children[i - 1]; - }; - - XMLNode.prototype.next = function() { - var i; - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node. " + this.debugInfo()); - } - return this.parent.children[i + 1]; - }; - - XMLNode.prototype.importDocument = function(doc) { - var clonedRoot; - clonedRoot = doc.root().clone(); - clonedRoot.parent = this; - clonedRoot.isRoot = false; - this.children.push(clonedRoot); - return this; - }; - - XMLNode.prototype.debugInfo = function(name) { - var ref2, ref3; - name = name || this.name; - if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) { - return ""; - } else if (name == null) { - return "parent: <" + this.parent.name + ">"; - } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { - return "node: <" + name + ">"; - } else { - return "node: <" + name + ">, parent: <" + this.parent.name + ">"; - } - }; - - XMLNode.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.txt = function(value) { - return this.text(value); - }; - - XMLNode.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.com = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLNode.prototype.doc = function() { - return this.document(); - }; - - XMLNode.prototype.dec = function(version, encoding, standalone) { - return this.declaration(version, encoding, standalone); - }; - - XMLNode.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.t = function(value) { - return this.text(value); - }; - - XMLNode.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.c = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.r = function(value) { - return this.raw(value); - }; - - XMLNode.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - - XMLNode.prototype.u = function() { - return this.up(); - }; - - XMLNode.prototype.importXMLBuilder = function(doc) { - return this.importDocument(doc); - }; - - XMLNode.prototype.replaceChild = function(newChild, oldChild) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.removeChild = function(oldChild) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.appendChild = function(newChild) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.hasChildNodes = function() { - return this.children.length !== 0; - }; - - XMLNode.prototype.cloneNode = function(deep) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.normalize = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.isSupported = function(feature, version) { - return true; - }; - - XMLNode.prototype.hasAttributes = function() { - return this.attribs.length !== 0; - }; - - XMLNode.prototype.compareDocumentPosition = function(other) { - var ref, res; - ref = this; - if (ref === other) { - return 0; - } else if (this.document() !== other.document()) { - res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; - if (Math.random() < 0.5) { - res |= DocumentPosition.Preceding; - } else { - res |= DocumentPosition.Following; - } - return res; - } else if (ref.isAncestor(other)) { - return DocumentPosition.Contains | DocumentPosition.Preceding; - } else if (ref.isDescendant(other)) { - return DocumentPosition.Contains | DocumentPosition.Following; - } else if (ref.isPreceding(other)) { - return DocumentPosition.Preceding; - } else { - return DocumentPosition.Following; - } - }; - - XMLNode.prototype.isSameNode = function(other) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.lookupPrefix = function(namespaceURI) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.isDefaultNamespace = function(namespaceURI) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.lookupNamespaceURI = function(prefix) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.isEqualNode = function(node) { - var i, j, ref2; - if (node.nodeType !== this.nodeType) { - return false; - } - if (node.children.length !== this.children.length) { - return false; - } - for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { - if (!this.children[i].isEqualNode(node.children[i])) { - return false; - } - } - return true; - }; - - XMLNode.prototype.getFeature = function(feature, version) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.setUserData = function(key, data, handler) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.getUserData = function(key) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - - XMLNode.prototype.contains = function(other) { - if (!other) { - return false; - } - return other === this || this.isDescendant(other); - }; - - XMLNode.prototype.isDescendant = function(node) { - var child, isDescendantChild, j, len, ref2; - ref2 = this.children; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - if (node === child) { - return true; - } - isDescendantChild = child.isDescendant(node); - if (isDescendantChild) { - return true; - } - } - return false; - }; - - XMLNode.prototype.isAncestor = function(node) { - return node.isDescendant(this); - }; - - XMLNode.prototype.isPreceding = function(node) { - var nodePos, thisPos; - nodePos = this.treePosition(node); - thisPos = this.treePosition(this); - if (nodePos === -1 || thisPos === -1) { - return false; - } else { - return nodePos < thisPos; - } - }; - - XMLNode.prototype.isFollowing = function(node) { - var nodePos, thisPos; - nodePos = this.treePosition(node); - thisPos = this.treePosition(this); - if (nodePos === -1 || thisPos === -1) { - return false; - } else { - return nodePos > thisPos; - } - }; - - XMLNode.prototype.treePosition = function(node) { - var found, pos; - pos = 0; - found = false; - this.foreachTreeNode(this.document(), function(childNode) { - pos++; - if (!found && childNode === node) { - return found = true; - } - }); - if (found) { - return pos; - } else { - return -1; - } - }; - - XMLNode.prototype.foreachTreeNode = function(node, func) { - var child, j, len, ref2, res; - node || (node = this.document()); - ref2 = node.children; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - if (res = func(child)) { - return res; - } else { - res = this.foreachTreeNode(child, func); - if (res) { - return res; - } - } - } - }; - - return XMLNode; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js deleted file mode 100644 index ce32fd59..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeFilter.js +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLNodeFilter; - - module.exports = XMLNodeFilter = (function() { - function XMLNodeFilter() {} - - XMLNodeFilter.prototype.FilterAccept = 1; - - XMLNodeFilter.prototype.FilterReject = 2; - - XMLNodeFilter.prototype.FilterSkip = 3; - - XMLNodeFilter.prototype.ShowAll = 0xffffffff; - - XMLNodeFilter.prototype.ShowElement = 0x1; - - XMLNodeFilter.prototype.ShowAttribute = 0x2; - - XMLNodeFilter.prototype.ShowText = 0x4; - - XMLNodeFilter.prototype.ShowCDataSection = 0x8; - - XMLNodeFilter.prototype.ShowEntityReference = 0x10; - - XMLNodeFilter.prototype.ShowEntity = 0x20; - - XMLNodeFilter.prototype.ShowProcessingInstruction = 0x40; - - XMLNodeFilter.prototype.ShowComment = 0x80; - - XMLNodeFilter.prototype.ShowDocument = 0x100; - - XMLNodeFilter.prototype.ShowDocumentType = 0x200; - - XMLNodeFilter.prototype.ShowDocumentFragment = 0x400; - - XMLNodeFilter.prototype.ShowNotation = 0x800; - - XMLNodeFilter.prototype.acceptNode = function(node) { - throw new Error("This DOM method is not implemented."); - }; - - return XMLNodeFilter; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js deleted file mode 100644 index 3414a3e4..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLNodeList.js +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLNodeList; - - module.exports = XMLNodeList = (function() { - function XMLNodeList(nodes) { - this.nodes = nodes; - } - - Object.defineProperty(XMLNodeList.prototype, 'length', { - get: function() { - return this.nodes.length || 0; - } - }); - - XMLNodeList.prototype.clone = function() { - return this.nodes = null; - }; - - XMLNodeList.prototype.item = function(index) { - return this.nodes[index] || null; - }; - - return XMLNodeList; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js deleted file mode 100644 index d4333d46..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLCharacterData, XMLProcessingInstruction, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - NodeType = require('./NodeType'); - - XMLCharacterData = require('./XMLCharacterData'); - - module.exports = XMLProcessingInstruction = (function(superClass) { - extend(XMLProcessingInstruction, superClass); - - function XMLProcessingInstruction(parent, target, value) { - XMLProcessingInstruction.__super__.constructor.call(this, parent); - if (target == null) { - throw new Error("Missing instruction target. " + this.debugInfo()); - } - this.type = NodeType.ProcessingInstruction; - this.target = this.stringify.insTarget(target); - this.name = this.target; - if (value) { - this.value = this.stringify.insValue(value); - } - } - - XMLProcessingInstruction.prototype.clone = function() { - return Object.create(this); - }; - - XMLProcessingInstruction.prototype.toString = function(options) { - return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); - }; - - XMLProcessingInstruction.prototype.isEqualNode = function(node) { - if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.target !== this.target) { - return false; - } - return true; - }; - - return XMLProcessingInstruction; - - })(XMLCharacterData); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js deleted file mode 100644 index b5928502..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLRaw.js +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, XMLNode, XMLRaw, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - NodeType = require('./NodeType'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLRaw = (function(superClass) { - extend(XMLRaw, superClass); - - function XMLRaw(parent, text) { - XMLRaw.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing raw text. " + this.debugInfo()); - } - this.type = NodeType.Raw; - this.value = this.stringify.raw(text); - } - - XMLRaw.prototype.clone = function() { - return Object.create(this); - }; - - XMLRaw.prototype.toString = function(options) { - return this.options.writer.raw(this, this.options.writer.filterOptions(options)); - }; - - return XMLRaw; - - })(XMLNode); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js deleted file mode 100644 index 159dc6b6..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLStreamWriter.js +++ /dev/null @@ -1,176 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - NodeType = require('./NodeType'); - - XMLWriterBase = require('./XMLWriterBase'); - - WriterState = require('./WriterState'); - - module.exports = XMLStreamWriter = (function(superClass) { - extend(XMLStreamWriter, superClass); - - function XMLStreamWriter(stream, options) { - this.stream = stream; - XMLStreamWriter.__super__.constructor.call(this, options); - } - - XMLStreamWriter.prototype.endline = function(node, options, level) { - if (node.isLastRootNode && options.state === WriterState.CloseTag) { - return ''; - } else { - return XMLStreamWriter.__super__.endline.call(this, node, options, level); - } - }; - - XMLStreamWriter.prototype.document = function(doc, options) { - var child, i, j, k, len, len1, ref, ref1, results; - ref = doc.children; - for (i = j = 0, len = ref.length; j < len; i = ++j) { - child = ref[i]; - child.isLastRootNode = i === doc.children.length - 1; - } - options = this.filterOptions(options); - ref1 = doc.children; - results = []; - for (k = 0, len1 = ref1.length; k < len1; k++) { - child = ref1[k]; - results.push(this.writeChildNode(child, options, 0)); - } - return results; - }; - - XMLStreamWriter.prototype.attribute = function(att, options, level) { - return this.stream.write(XMLStreamWriter.__super__.attribute.call(this, att, options, level)); - }; - - XMLStreamWriter.prototype.cdata = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.cdata.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.comment = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.comment.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.declaration = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.declaration.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.docType = function(node, options, level) { - var child, j, len, ref; - level || (level = 0); - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - this.stream.write(this.indent(node, options, level)); - this.stream.write(' 0) { - this.stream.write(' ['); - this.stream.write(this.endline(node, options, level)); - options.state = WriterState.InsideTag; - ref = node.children; - for (j = 0, len = ref.length; j < len; j++) { - child = ref[j]; - this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - this.stream.write(']'); - } - options.state = WriterState.CloseTag; - this.stream.write(options.spaceBeforeSlash + '>'); - this.stream.write(this.endline(node, options, level)); - options.state = WriterState.None; - return this.closeNode(node, options, level); - }; - - XMLStreamWriter.prototype.element = function(node, options, level) { - var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; - level || (level = 0); - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - this.stream.write(this.indent(node, options, level) + '<' + node.name); - ref = node.attribs; - for (name in ref) { - if (!hasProp.call(ref, name)) continue; - att = ref[name]; - this.attribute(att, options, level); - } - childNodeCount = node.children.length; - firstChildNode = childNodeCount === 0 ? null : node.children[0]; - if (childNodeCount === 0 || node.children.every(function(e) { - return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ''; - })) { - if (options.allowEmpty) { - this.stream.write('>'); - options.state = WriterState.CloseTag; - this.stream.write(''); - } else { - options.state = WriterState.CloseTag; - this.stream.write(options.spaceBeforeSlash + '/>'); - } - } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) { - this.stream.write('>'); - options.state = WriterState.InsideTag; - options.suppressPrettyCount++; - prettySuppressed = true; - this.writeChildNode(firstChildNode, options, level + 1); - options.suppressPrettyCount--; - prettySuppressed = false; - options.state = WriterState.CloseTag; - this.stream.write(''); - } else { - this.stream.write('>' + this.endline(node, options, level)); - options.state = WriterState.InsideTag; - ref1 = node.children; - for (j = 0, len = ref1.length; j < len; j++) { - child = ref1[j]; - this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - this.stream.write(this.indent(node, options, level) + ''); - } - this.stream.write(this.endline(node, options, level)); - options.state = WriterState.None; - return this.closeNode(node, options, level); - }; - - XMLStreamWriter.prototype.processingInstruction = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.raw = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.raw.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.text = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.text.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.dtdAttList = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.dtdElement = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.dtdEntity = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this, node, options, level)); - }; - - XMLStreamWriter.prototype.dtdNotation = function(node, options, level) { - return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this, node, options, level)); - }; - - return XMLStreamWriter; - - })(XMLWriterBase); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js deleted file mode 100644 index 71870170..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLStringWriter.js +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLStringWriter, XMLWriterBase, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - XMLWriterBase = require('./XMLWriterBase'); - - module.exports = XMLStringWriter = (function(superClass) { - extend(XMLStringWriter, superClass); - - function XMLStringWriter(options) { - XMLStringWriter.__super__.constructor.call(this, options); - } - - XMLStringWriter.prototype.document = function(doc, options) { - var child, i, len, r, ref; - options = this.filterOptions(options); - r = ''; - ref = doc.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - r += this.writeChildNode(child, options, 0); - } - if (options.pretty && r.slice(-options.newline.length) === options.newline) { - r = r.slice(0, -options.newline.length); - } - return r; - }; - - return XMLStringWriter; - - })(XMLWriterBase); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js b/test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js deleted file mode 100644 index a39475c1..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/XMLStringifier.js +++ /dev/null @@ -1,240 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var XMLStringifier, - bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - hasProp = {}.hasOwnProperty; - - module.exports = XMLStringifier = (function() { - function XMLStringifier(options) { - this.assertLegalName = bind(this.assertLegalName, this); - this.assertLegalChar = bind(this.assertLegalChar, this); - var key, ref, value; - options || (options = {}); - this.options = options; - if (!this.options.version) { - this.options.version = '1.0'; - } - ref = options.stringify || {}; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this[key] = value; - } - } - - XMLStringifier.prototype.name = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalName('' + val || ''); - }; - - XMLStringifier.prototype.text = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar(this.textEscape('' + val || '')); - }; - - XMLStringifier.prototype.cdata = function(val) { - if (this.options.noValidation) { - return val; - } - val = '' + val || ''; - val = val.replace(']]>', ']]]]>'); - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.comment = function(val) { - if (this.options.noValidation) { - return val; - } - val = '' + val || ''; - if (val.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.raw = function(val) { - if (this.options.noValidation) { - return val; - } - return '' + val || ''; - }; - - XMLStringifier.prototype.attValue = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar(this.attEscape(val = '' + val || '')); - }; - - XMLStringifier.prototype.insTarget = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.insValue = function(val) { - if (this.options.noValidation) { - return val; - } - val = '' + val || ''; - if (val.match(/\?>/)) { - throw new Error("Invalid processing instruction value: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.xmlVersion = function(val) { - if (this.options.noValidation) { - return val; - } - val = '' + val || ''; - if (!val.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlEncoding = function(val) { - if (this.options.noValidation) { - return val; - } - val = '' + val || ''; - if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { - throw new Error("Invalid encoding: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.xmlStandalone = function(val) { - if (this.options.noValidation) { - return val; - } - if (val) { - return "yes"; - } else { - return "no"; - } - }; - - XMLStringifier.prototype.dtdPubID = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.dtdSysID = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.dtdElementValue = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.dtdAttType = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.dtdAttDefault = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.dtdEntityValue = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.dtdNData = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar('' + val || ''); - }; - - XMLStringifier.prototype.convertAttKey = '@'; - - XMLStringifier.prototype.convertPIKey = '?'; - - XMLStringifier.prototype.convertTextKey = '#text'; - - XMLStringifier.prototype.convertCDataKey = '#cdata'; - - XMLStringifier.prototype.convertCommentKey = '#comment'; - - XMLStringifier.prototype.convertRawKey = '#raw'; - - XMLStringifier.prototype.assertLegalChar = function(str) { - var regex, res; - if (this.options.noValidation) { - return str; - } - regex = ''; - if (this.options.version === '1.0') { - regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - if (res = str.match(regex)) { - throw new Error("Invalid character in string: " + str + " at index " + res.index); - } - } else if (this.options.version === '1.1') { - regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - if (res = str.match(regex)) { - throw new Error("Invalid character in string: " + str + " at index " + res.index); - } - } - return str; - }; - - XMLStringifier.prototype.assertLegalName = function(str) { - var regex; - if (this.options.noValidation) { - return str; - } - this.assertLegalChar(str); - regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; - if (!str.match(regex)) { - throw new Error("Invalid character in name"); - } - return str; - }; - - XMLStringifier.prototype.textEscape = function(str) { - var ampregex; - if (this.options.noValidation) { - return str; - } - ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; - return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); - }; - - XMLStringifier.prototype.attEscape = function(str) { - var ampregex; - if (this.options.noValidation) { - return str; - } - ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; - return str.replace(ampregex, '&').replace(/ 0) { - return new Array(indentLevel).join(options.indent); - } - } - return ''; - }; - - XMLWriterBase.prototype.endline = function(node, options, level) { - if (!options.pretty || options.suppressPrettyCount) { - return ''; - } else { - return options.newline; - } - }; - - XMLWriterBase.prototype.attribute = function(att, options, level) { - var r; - this.openAttribute(att, options, level); - r = ' ' + att.name + '="' + att.value + '"'; - this.closeAttribute(att, options, level); - return r; - }; - - XMLWriterBase.prototype.cdata = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + '' + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.comment = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + '' + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.declaration = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + ''; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.docType = function(node, options, level) { - var child, i, len, r, ref; - level || (level = 0); - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level); - r += ' 0) { - r += ' ['; - r += this.endline(node, options, level); - options.state = WriterState.InsideTag; - ref = node.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - r += this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - r += ']'; - } - options.state = WriterState.CloseTag; - r += options.spaceBeforeSlash + '>'; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.element = function(node, options, level) { - var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; - level || (level = 0); - prettySuppressed = false; - r = ''; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r += this.indent(node, options, level) + '<' + node.name; - ref = node.attribs; - for (name in ref) { - if (!hasProp.call(ref, name)) continue; - att = ref[name]; - r += this.attribute(att, options, level); - } - childNodeCount = node.children.length; - firstChildNode = childNodeCount === 0 ? null : node.children[0]; - if (childNodeCount === 0 || node.children.every(function(e) { - return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ''; - })) { - if (options.allowEmpty) { - r += '>'; - options.state = WriterState.CloseTag; - r += '' + this.endline(node, options, level); - } else { - options.state = WriterState.CloseTag; - r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level); - } - } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) { - r += '>'; - options.state = WriterState.InsideTag; - options.suppressPrettyCount++; - prettySuppressed = true; - r += this.writeChildNode(firstChildNode, options, level + 1); - options.suppressPrettyCount--; - prettySuppressed = false; - options.state = WriterState.CloseTag; - r += '' + this.endline(node, options, level); - } else { - if (options.dontPrettyTextNodes) { - ref1 = node.children; - for (i = 0, len = ref1.length; i < len; i++) { - child = ref1[i]; - if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) { - options.suppressPrettyCount++; - prettySuppressed = true; - break; - } - } - } - r += '>' + this.endline(node, options, level); - options.state = WriterState.InsideTag; - ref2 = node.children; - for (j = 0, len1 = ref2.length; j < len1; j++) { - child = ref2[j]; - r += this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - r += this.indent(node, options, level) + ''; - if (prettySuppressed) { - options.suppressPrettyCount--; - } - r += this.endline(node, options, level); - options.state = WriterState.None; - } - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.writeChildNode = function(node, options, level) { - switch (node.type) { - case NodeType.CData: - return this.cdata(node, options, level); - case NodeType.Comment: - return this.comment(node, options, level); - case NodeType.Element: - return this.element(node, options, level); - case NodeType.Raw: - return this.raw(node, options, level); - case NodeType.Text: - return this.text(node, options, level); - case NodeType.ProcessingInstruction: - return this.processingInstruction(node, options, level); - case NodeType.Dummy: - return ''; - case NodeType.Declaration: - return this.declaration(node, options, level); - case NodeType.DocType: - return this.docType(node, options, level); - case NodeType.AttributeDeclaration: - return this.dtdAttList(node, options, level); - case NodeType.ElementDeclaration: - return this.dtdElement(node, options, level); - case NodeType.EntityDeclaration: - return this.dtdEntity(node, options, level); - case NodeType.NotationDeclaration: - return this.dtdNotation(node, options, level); - default: - throw new Error("Unknown XML node type: " + node.constructor.name); - } - }; - - XMLWriterBase.prototype.processingInstruction = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + ''; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.raw = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level); - options.state = WriterState.InsideTag; - r += node.value; - options.state = WriterState.CloseTag; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.text = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level); - options.state = WriterState.InsideTag; - r += node.value; - options.state = WriterState.CloseTag; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.dtdAttList = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + '' + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.dtdElement = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + '' + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.dtdEntity = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + '' + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.dtdNotation = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + '' + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - - XMLWriterBase.prototype.openNode = function(node, options, level) {}; - - XMLWriterBase.prototype.closeNode = function(node, options, level) {}; - - XMLWriterBase.prototype.openAttribute = function(att, options, level) {}; - - XMLWriterBase.prototype.closeAttribute = function(att, options, level) {}; - - return XMLWriterBase; - - })(); - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/lib/index.js b/test-eol-project/node_modules/xmlbuilder/lib/index.js deleted file mode 100644 index b1ed2636..00000000 --- a/test-eol-project/node_modules/xmlbuilder/lib/index.js +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; - - ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction; - - XMLDOMImplementation = require('./XMLDOMImplementation'); - - XMLDocument = require('./XMLDocument'); - - XMLDocumentCB = require('./XMLDocumentCB'); - - XMLStringWriter = require('./XMLStringWriter'); - - XMLStreamWriter = require('./XMLStreamWriter'); - - NodeType = require('./NodeType'); - - WriterState = require('./WriterState'); - - module.exports.create = function(name, xmldec, doctype, options) { - var doc, root; - if (name == null) { - throw new Error("Root element needs a name."); - } - options = assign({}, xmldec, doctype, options); - doc = new XMLDocument(options); - root = doc.element(name); - if (!options.headless) { - doc.declaration(options); - if ((options.pubID != null) || (options.sysID != null)) { - doc.dtd(options); - } - } - return root; - }; - - module.exports.begin = function(options, onData, onEnd) { - var ref1; - if (isFunction(options)) { - ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; - options = {}; - } - if (onData) { - return new XMLDocumentCB(options, onData, onEnd); - } else { - return new XMLDocument(options); - } - }; - - module.exports.stringWriter = function(options) { - return new XMLStringWriter(options); - }; - - module.exports.streamWriter = function(stream, options) { - return new XMLStreamWriter(stream, options); - }; - - module.exports.implementation = new XMLDOMImplementation(); - - module.exports.nodeType = NodeType; - - module.exports.writerState = WriterState; - -}).call(this); diff --git a/test-eol-project/node_modules/xmlbuilder/package.json b/test-eol-project/node_modules/xmlbuilder/package.json deleted file mode 100644 index 512cd977..00000000 --- a/test-eol-project/node_modules/xmlbuilder/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "xmlbuilder", - "version": "11.0.1", - "keywords": [ - "xml", - "xmlbuilder" - ], - "homepage": "http://github.com/oozcitak/xmlbuilder-js", - "description": "An XML builder for node.js", - "author": "Ozgur Ozcitak ", - "contributors": [], - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/oozcitak/xmlbuilder-js.git" - }, - "bugs": { - "url": "http://github.com/oozcitak/xmlbuilder-js/issues" - }, - "main": "./lib/index", - "typings": "./typings/index.d.ts", - "engines": { - "node": ">=4.0" - }, - "dependencies": {}, - "devDependencies": { - "coffeescript": "1.*", - "mocha": "*", - "coffee-coverage": "2.*", - "istanbul": "*", - "coveralls": "*", - "xpath": "*" - }, - "scripts": { - "prepublishOnly": "coffee -co lib src", - "postpublish": "rm -rf lib", - "test": "mocha \"test/**/*.coffee\" && istanbul report text lcov" - } -} diff --git a/test-eol-project/node_modules/xmlbuilder/typings/index.d.ts b/test-eol-project/node_modules/xmlbuilder/typings/index.d.ts deleted file mode 100644 index 3e0e5b0a..00000000 --- a/test-eol-project/node_modules/xmlbuilder/typings/index.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -// Type definitions for xmlbuilder -// Project: https://github.com/oozcitak/xmlbuilder-js -// Definitions by: Wallymathieu -// : GaikwadPratik -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = xmlbuilder; - -declare namespace xmlbuilder { - - class XMLDocType { - clone(): XMLDocType; - element(name: string, value?: Object): XMLDocType; - attList(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; - entity(name: string, value: any): XMLDocType; - pEntity(name: string, value: any): XMLDocType; - notation(name: string, value: any): XMLDocType; - cdata(value: string): XMLDocType; - comment(value: string): XMLDocType; - instruction(target: string, value: any): XMLDocType; - root(): XMLDocType; - document(): any; - toString(options?: XMLToStringOptions, level?: Number): string; - - ele(name: string, value?: Object): XMLDocType; - att(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; - ent(name: string, value: any): XMLDocType; - pent(name: string, value: any): XMLDocType; - not(name: string, value: any): XMLDocType; - dat(value: string): XMLDocType; - com(value: string): XMLDocType; - ins(target: string, value: any): XMLDocType; - up(): XMLDocType; - doc(): any; - } - - class XMLElementOrXMLNode { - // XMLElement: - clone(): XMLElementOrXMLNode; - attribute(name: any, value?: any): XMLElementOrXMLNode; - att(name: any, value?: any): XMLElementOrXMLNode; - removeAttribute(name: string): XMLElementOrXMLNode; - instruction(target: string, value: any): XMLElementOrXMLNode; - instruction(array: Array): XMLElementOrXMLNode; - instruction(obj: Object): XMLElementOrXMLNode; - ins(target: string, value: any): XMLElementOrXMLNode; - ins(array: Array): XMLElementOrXMLNode; - ins(obj: Object): XMLElementOrXMLNode; - a(name: any, value?: any): XMLElementOrXMLNode; - i(target: string, value: any): XMLElementOrXMLNode; - i(array: Array): XMLElementOrXMLNode; - i(obj: Object): XMLElementOrXMLNode; - toString(options?: XMLToStringOptions, level?: Number): string; - // XMLNode: - element(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - ele(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - insertBefore(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - insertAfter(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - remove(): XMLElementOrXMLNode; - node(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - text(value: string): XMLElementOrXMLNode; - cdata(value: string): XMLElementOrXMLNode; - comment(value: string): XMLElementOrXMLNode; - raw(value: string): XMLElementOrXMLNode; - declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; - doctype(pubID: string, sysID: string): XMLDocType; - up(): XMLElementOrXMLNode; - importDocument(input: XMLElementOrXMLNode): XMLElementOrXMLNode; - root(): XMLElementOrXMLNode; - document(): any; - end(options?: XMLEndOptions): string; - prev(): XMLElementOrXMLNode; - next(): XMLElementOrXMLNode; - nod(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - txt(value: string): XMLElementOrXMLNode; - dat(value: string): XMLElementOrXMLNode; - com(value: string): XMLElementOrXMLNode; - doc(): XMLElementOrXMLNode; - dec(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; - dtd(pubID: string, sysID: string): XMLDocType; - e(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - n(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; - t(value: string): XMLElementOrXMLNode; - d(value: string): XMLElementOrXMLNode; - c(value: string): XMLElementOrXMLNode; - r(value: string): XMLElementOrXMLNode; - u(): XMLElementOrXMLNode; - } - - interface XMLDec { - version?: string; - encoding?: string; - standalone?: boolean; - } - - interface XMLDtd { - pubID?: string; - sysID?: string; - } - - interface XMLStringifier { - [x: string]: ((v: any) => string) | string; - } - - interface XMLWriter { - [x: string]: ((e: XMLElementOrXMLNode, options: WriterOptions, level?: number) => void); - } - - interface XMLCreateOptions { - headless?: boolean; - keepNullNodes?: boolean; - keepNullAttributes?: boolean; - ignoreDecorators?: boolean; - separateArrayItems?: boolean; - noDoubleEncoding?: boolean; - stringify?: XMLStringifier; - } - - interface XMLToStringOptions { - pretty?: boolean; - indent?: string; - offset?: number; - newline?: string; - allowEmpty?: boolean; - spacebeforeslash?: string; - } - - interface XMLEndOptions extends XMLToStringOptions { - writer?: XMLWriter; - } - - interface WriterOptions { - pretty?: boolean; - indent?: string; - newline?: string; - offset?: number; - allowEmpty?: boolean; - dontPrettyTextNodes?: boolean; - spaceBeforeSlash?: string | boolean; - user? :any; - state?: WriterState; - } - - enum WriterState { - None = 0, - OpenTag = 1, - InsideTag = 2, - CloseTag = 3 - } - - function create(nameOrObjSpec: string | { [name: string]: Object }, xmldecOrOptions?: XMLDec | XMLCreateOptions, doctypeOrOptions?: XMLDtd | XMLCreateOptions, options?: XMLCreateOptions): XMLElementOrXMLNode; - function begin(): XMLElementOrXMLNode; -} \ No newline at end of file diff --git a/test-eol-project/node_modules/y18n/CHANGELOG.md b/test-eol-project/node_modules/y18n/CHANGELOG.md deleted file mode 100644 index b7e86e94..00000000 --- a/test-eol-project/node_modules/y18n/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -### [4.0.3](https://www.github.com/yargs/y18n/compare/y18n-v4.0.2...y18n-v4.0.3) (2021-04-07) - - -### Bug Fixes - -* **release:** 4.x.x should not enforce Node 10 ([#126](https://www.github.com/yargs/y18n/issues/126)) ([1e21a53](https://www.github.com/yargs/y18n/commit/1e21a536e9135d8403a47be88922157a706b7cde)) - -### 4.0.1 (2020-11-30) - -### Bug Fixes - -* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) - - -# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) - - -### Bug Fixes - -* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) - - -### Features - -* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf)) - - -### BREAKING CHANGES - -* **__:** dropping Node 0.10/Node 0.12 support diff --git a/test-eol-project/node_modules/y18n/LICENSE b/test-eol-project/node_modules/y18n/LICENSE deleted file mode 100644 index 3c157f0b..00000000 --- a/test-eol-project/node_modules/y18n/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/test-eol-project/node_modules/y18n/README.md b/test-eol-project/node_modules/y18n/README.md deleted file mode 100644 index 826474f2..00000000 --- a/test-eol-project/node_modules/y18n/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# y18n - -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) - -The bare-bones internationalization library used by yargs. - -Inspired by [i18n](https://www.npmjs.com/package/i18n). - -## Examples - -_simple string translation:_ - -```js -var __ = require('y18n').__ - -console.log(__('my awesome string %s', 'foo')) -``` - -output: - -`my awesome string foo` - -_using tagged template literals_ - -```js -var __ = require('y18n').__ -var str = 'foo' - -console.log(__`my awesome string ${str}`) -``` - -output: - -`my awesome string foo` - -_pluralization support:_ - -```js -var __n = require('y18n').__n - -console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) -``` - -output: - -`2 fishes foo` - -## JSON Language Files - -The JSON language files should be stored in a `./locales` folder. -File names correspond to locales, e.g., `en.json`, `pirate.json`. - -When strings are observed for the first time they will be -added to the JSON file corresponding to the current locale. - -## Methods - -### require('y18n')(config) - -Create an instance of y18n with the config provided, options include: - -* `directory`: the locale directory, default `./locales`. -* `updateFiles`: should newly observed strings be updated in file, default `true`. -* `locale`: what locale should be used. -* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) - be allowed if a file matching the locale does not exist (e.g. `en_US.json`), - default `true`. - -### y18n.\_\_(str, arg, arg, arg) - -Print a localized string, `%s` will be replaced with `arg`s. - -This function can also be used as a tag for a template literal. You can use it -like this: __`hello ${'world'}`. This will be equivalent to -`__('hello %s', 'world')`. - -### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) - -Print a localized string with appropriate pluralization. If `%d` is provided -in the string, the `count` will replace this placeholder. - -### y18n.setLocale(str) - -Set the current locale being used. - -### y18n.getLocale() - -What locale is currently being used? - -### y18n.updateLocale(obj) - -Update the current locale with the key value pairs in `obj`. - -## License - -ISC - -[travis-url]: https://travis-ci.org/yargs/y18n -[travis-image]: https://img.shields.io/travis/yargs/y18n.svg -[coveralls-url]: https://coveralls.io/github/yargs/y18n -[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg -[npm-url]: https://npmjs.org/package/y18n -[npm-image]: https://img.shields.io/npm/v/y18n.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: https://github.com/feross/standard diff --git a/test-eol-project/node_modules/y18n/index.js b/test-eol-project/node_modules/y18n/index.js deleted file mode 100644 index 727362aa..00000000 --- a/test-eol-project/node_modules/y18n/index.js +++ /dev/null @@ -1,188 +0,0 @@ -var fs = require('fs') -var path = require('path') -var util = require('util') - -function Y18N (opts) { - // configurable options. - opts = opts || {} - this.directory = opts.directory || './locales' - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true - this.locale = opts.locale || 'en' - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true - - // internal stuff. - this.cache = Object.create(null) - this.writeQueue = [] -} - -Y18N.prototype.__ = function () { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral.apply(this, arguments) - } - var args = Array.prototype.slice.call(arguments) - var str = args.shift() - var cb = function () {} // start with noop. - - if (typeof args[args.length - 1] === 'function') cb = args.pop() - cb = cb || function () {} // noop. - - if (!this.cache[this.locale]) this._readLocaleFile() - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) -} - -Y18N.prototype._taggedLiteral = function (parts) { - var args = arguments - var str = '' - parts.forEach(function (part, i) { - var arg = args[i + 1] - str += part - if (typeof arg !== 'undefined') { - str += '%s' - } - }) - return this.__.apply(null, [str].concat([].slice.call(arguments, 1))) -} - -Y18N.prototype._enqueueWrite = function (work) { - this.writeQueue.push(work) - if (this.writeQueue.length === 1) this._processWriteQueue() -} - -Y18N.prototype._processWriteQueue = function () { - var _this = this - var work = this.writeQueue[0] - - // destructure the enqueued work. - var directory = work[0] - var locale = work[1] - var cb = work[2] - - var languageFile = this._resolveLocaleFile(directory, locale) - var serializedLocale = JSON.stringify(this.cache[locale], null, 2) - - fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift() - if (_this.writeQueue.length > 0) _this._processWriteQueue() - cb(err) - }) -} - -Y18N.prototype._readLocaleFile = function () { - var localeLookup = {} - var languageFile = this._resolveLocaleFile(this.directory, this.locale) - - try { - localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) - } catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile - } - - if (err.code === 'ENOENT') localeLookup = {} - else throw err - } - - this.cache[this.locale] = localeLookup -} - -Y18N.prototype._resolveLocaleFile = function (directory, locale) { - var file = path.resolve(directory, './', locale + '.json') - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') - if (this._fileExistsSync(languageFile)) file = languageFile - } - return file -} - -// this only exists because fs.existsSync() "will be deprecated" -// see https://nodejs.org/api/fs.html#fs_fs_existssync_path -Y18N.prototype._fileExistsSync = function (file) { - try { - return fs.statSync(file).isFile() - } catch (err) { - return false - } -} - -Y18N.prototype.__n = function () { - var args = Array.prototype.slice.call(arguments) - var singular = args.shift() - var plural = args.shift() - var quantity = args.shift() - - var cb = function () {} // start with noop. - if (typeof args[args.length - 1] === 'function') cb = args.pop() - - if (!this.cache[this.locale]) this._readLocaleFile() - - var str = quantity === 1 ? singular : plural - if (this.cache[this.locale][singular]) { - str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] - } - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - } - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - var values = [str] - if (~str.indexOf('%d')) values.push(quantity) - - return util.format.apply(util, values.concat(args)) -} - -Y18N.prototype.setLocale = function (locale) { - this.locale = locale -} - -Y18N.prototype.getLocale = function () { - return this.locale -} - -Y18N.prototype.updateLocale = function (obj) { - if (!this.cache[this.locale]) this._readLocaleFile() - - for (var key in obj) { - this.cache[this.locale][key] = obj[key] - } -} - -module.exports = function (opts) { - var y18n = new Y18N(opts) - - // bind all functions to y18n, so that - // they can be used in isolation. - for (var key in y18n) { - if (typeof y18n[key] === 'function') { - y18n[key] = y18n[key].bind(y18n) - } - } - - return y18n -} diff --git a/test-eol-project/node_modules/y18n/package.json b/test-eol-project/node_modules/y18n/package.json deleted file mode 100644 index 6f08863e..00000000 --- a/test-eol-project/node_modules/y18n/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "y18n", - "version": "4.0.3", - "description": "the bare-bones internationalization library used by yargs", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc mocha", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "repository": { - "type": "git", - "url": "git@github.com:yargs/y18n.git" - }, - "files": [ - "index.js" - ], - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "author": "Ben Coe ", - "license": "ISC", - "bugs": { - "url": "https://github.com/yargs/y18n/issues" - }, - "homepage": "https://github.com/yargs/y18n", - "devDependencies": { - "chai": "^4.0.1", - "coveralls": "^3.0.0", - "mocha": "^4.0.1", - "nyc": "^11.0.1", - "rimraf": "^2.5.0", - "standard": "^10.0.0-beta.0", - "standard-version": "^4.2.0" - } -} diff --git a/test-eol-project/node_modules/yargs-parser/CHANGELOG.md b/test-eol-project/node_modules/yargs-parser/CHANGELOG.md deleted file mode 100644 index d91dc516..00000000 --- a/test-eol-project/node_modules/yargs-parser/CHANGELOG.md +++ /dev/null @@ -1,601 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16) - - -### Bug Fixes - -* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e)) - -### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26) - - -### Bug Fixes - -* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13)) - -### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16) - - -### Bug Fixes - -* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential -prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) - -## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07) - - -### Features - -* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f)) - -## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02) - - -### ⚠ BREAKING CHANGES - -* the narg count is now enforced when parsing arrays. - -### Features - -* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c)) - -## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01) - - -### Features - -* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb)) - -### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29) - - -### Bug Fixes - -* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba)) - -## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10) - - -### ⚠ BREAKING CHANGES - -* this reverts parsing behavior of booleans to that of yargs@14 -* objects used during parsing are now created with a null -prototype. There may be some scenarios where this change in behavior -leaks externally. - -### Features - -* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5)) -* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732)) - - -### Bug Fixes - -* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346)) -* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c)) -* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de)) -* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5)) - -## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01) - - -### ⚠ BREAKING CHANGES - -* populate error if incompatible narg/count or array/count options are used (#191) - -### Features - -* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0)) -* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9)) - - -### Reverts - -* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf)) - -## [15.0.0](https://github.com/yargs/yargs-parser/compare/v14.0.0...v15.0.0) (2019-10-07) - - -### Features - -* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality ([ef771ca](https://github.com/yargs/yargs-parser/commit/ef771ca)) - - -### BREAKING CHANGES - -* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality - - - -## [14.0.0](https://github.com/yargs/yargs-parser/compare/v13.1.1...v14.0.0) (2019-09-06) - - -### Bug Fixes - -* boolean arrays with default values ([#185](https://github.com/yargs/yargs-parser/issues/185)) ([7d42572](https://github.com/yargs/yargs-parser/commit/7d42572)) -* boolean now behaves the same as other array types ([#184](https://github.com/yargs/yargs-parser/issues/184)) ([17ca3bd](https://github.com/yargs/yargs-parser/commit/17ca3bd)) -* eatNargs() for 'opt.narg === 0' and boolean typed options ([#188](https://github.com/yargs/yargs-parser/issues/188)) ([c5a1db0](https://github.com/yargs/yargs-parser/commit/c5a1db0)) -* maybeCoerceNumber now takes precedence over coerce return value ([#182](https://github.com/yargs/yargs-parser/issues/182)) ([2f26436](https://github.com/yargs/yargs-parser/commit/2f26436)) -* take into account aliases when appending arrays from config object ([#199](https://github.com/yargs/yargs-parser/issues/199)) ([f8a2d3f](https://github.com/yargs/yargs-parser/commit/f8a2d3f)) - - -### Features - -* add configuration option to "collect-unknown-options" ([#181](https://github.com/yargs/yargs-parser/issues/181)) ([7909cc4](https://github.com/yargs/yargs-parser/commit/7909cc4)) -* maybeCoerceNumber() now takes into account arrays ([#187](https://github.com/yargs/yargs-parser/issues/187)) ([31c204b](https://github.com/yargs/yargs-parser/commit/31c204b)) - - -### BREAKING CHANGES - -* unless "parse-numbers" is set to "false", arrays of numeric strings are now parsed as numbers, rather than strings. -* we have dropped the broken "defaulted" functionality; we would like to revisit adding this in the future. -* maybeCoerceNumber now takes precedence over coerce return value (#182) - - - -### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) - - -### Bug Fixes - -* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) -* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) -* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) - -## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) - - -### Features - -* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) -* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) - - - - -# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) - - -### Features - -* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) - - -### BREAKING CHANGES - -* options with leading '+' or '0' now parse as strings - - - - -# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) - - -### Bug Fixes - -* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) - - -### Features - -* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) - - -### BREAKING CHANGES - -* a flag with no right-hand value no longer populates defaulted options with `undefined`. -* quotes at beginning and endings of strings are not removed during parsing. - - - - -## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) - - -### Bug Fixes - -* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) - - -### Reverts - -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) - - - - -# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) - - -### Bug Fixes - -* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) - - -### Features - -* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) - - - - -# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) - - -### Bug Fixes - -* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) -* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) - - -### Chores - -* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) - - -### Features - -* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) -* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) - - -### BREAKING CHANGES - -* drops Node 4 support -* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. - - - - -# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) - - -### Features - -* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) - - - - -# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) - - -### Bug Fixes - -* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) - - -### BREAKING CHANGES - -* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. - -Previous behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [], flag: false } -``` - -New behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [] } => flag not set similarly to other option type -``` - - - - -## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) - - -### Bug Fixes - -* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) - - - - -## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) - - -### Bug Fixes - -* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) - - - - -# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) - - -### Features - -* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3)) - - -### BREAKING CHANGES - -* arguments of form --foo, -abc, will no longer be consumed by nargs - - - - -# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) - - -### Bug Fixes - -* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) -* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) -* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) -* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) -* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) -* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) - - -### Features - -* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) -* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) - - - - -# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) - - -### Bug Fixes - -* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) - - -### Features - -* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) -* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) - - -### BREAKING CHANGES - -* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. - - - - -# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) - - -### Chores - -* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) - - -### BREAKING CHANGES - -* populate-- now defaults to false. - - - - -## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) - - -### Bug Fixes - -* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) - - - - -# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) - - -### Bug Fixes - -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) -* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) - - -### Chores - -* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) - - -### Features - -* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) -* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) - - -### BREAKING CHANGES - -* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. -* camelcase now requires Node 4+. -* environment variables will now override config files (args, env, config-file, config-object) - - - - -# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) - - -### Bug Fixes - -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) - - -### BREAKING CHANGES - -* environment variables will now override config files (args, env, config-file, config-object) - - - - -## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) - - -### Bug Fixes - -* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) - - - - -# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) - - -### Bug Fixes - -* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) - - -### Features - -* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) - - - - -# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) - - -### Features - -* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) -* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) - - - - -## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) - - -### Bug Fixes - -* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) - - - - -## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) - - -### Bug Fixes - -* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) - - - - -# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) - - -### Bug Fixes - -* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) - - -### BREAKING CHANGES - -* coerce is no longer applied to individual arguments in an implicit array. - - - - -# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) - - -### Features - -* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) - - - - -# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) - - -### Bug Fixes - -* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) -* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) -* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) - - -### Features - -* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) - - - - -# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) - - -### Bug Fixes - -* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) -* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) - -### BREAKING CHANGES - -* subtle change to how values are parsed in a group of single-character arguments. -* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ - - - - -## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) - - -### Bug Fixes - -* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) - - - - -# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) - - -### Features - -* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) - - - - -# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) - - -### Bug Fixes - -* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) -* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) -* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) -* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) -* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) - -### Features - -* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) -* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) diff --git a/test-eol-project/node_modules/yargs-parser/LICENSE.txt b/test-eol-project/node_modules/yargs-parser/LICENSE.txt deleted file mode 100644 index 836440be..00000000 --- a/test-eol-project/node_modules/yargs-parser/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/test-eol-project/node_modules/yargs-parser/README.md b/test-eol-project/node_modules/yargs-parser/README.md deleted file mode 100644 index bae61c2a..00000000 --- a/test-eol-project/node_modules/yargs-parser/README.md +++ /dev/null @@ -1,449 +0,0 @@ -# yargs-parser - -[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](https://travis-ci.org/yargs/yargs-parser) -[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - - -The mighty option parser used by [yargs](https://github.com/yargs/yargs). - -visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. - - - -## Example - -```sh -npm i yargs-parser --save -``` - -```js -var argv = require('yargs-parser')(process.argv.slice(2)) -console.log(argv) -``` - -```sh -node example.js --foo=33 --bar hello -{ _: [], foo: 33, bar: 'hello' } -``` - -_or parse a string!_ - -```js -var argv = require('yargs-parser')('--foo=99 --bar=33') -console.log(argv) -``` - -```sh -{ _: [], foo: 99, bar: 33 } -``` - -Convert an array of mixed types before passing to `yargs-parser`: - -```js -var parse = require('yargs-parser') -parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string -parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings -``` - -## API - -### require('yargs-parser')(args, opts={}) - -Parses command line arguments returning a simple mapping of keys and values. - -**expects:** - -* `args`: a string or array of strings representing the options to parse. -* `opts`: provide a set of hints indicating how `args` should be parsed: - * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
    - Indicate that keys should be parsed as an array and coerced to booleans / numbers:
    - `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. - * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error). For arrays the function is called only once for the entire array:
    - `{coerce: {foo: function (arg) {return modifiedArg}}}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). - * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
    - `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). - * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. - * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. - * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. - * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. - * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.number`: keys should be treated as numbers. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - -**returns:** - -* `obj`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. - -### require('yargs-parser').detailed(args, opts={}) - -Parses a command line string, returning detailed information required by the -yargs engine. - -**expects:** - -* `args`: a string or array of strings representing options to parse. -* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. - -**returns:** - -* `argv`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. -* `error`: populated with an error object if an exception occurred during parsing. -* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. -* `newAliases`: any new aliases added via camel-case expansion: - * `boolean`: `{ fooBar: true }` -* `defaulted`: any new argument created by `opts.default`, no aliases included. - * `boolean`: `{ foo: true }` -* `configuration`: given by default settings and `opts.configuration`. - - - -### Configuration - -The yargs-parser applies several automated transformations on the keys provided -in `args`. These features can be turned on and off using the `configuration` field -of `opts`. - -```js -var parsed = parser(['--no-dice'], { - configuration: { - 'boolean-negation': false - } -}) -``` - -### short option groups - -* default: `true`. -* key: `short-option-groups`. - -Should a group of short-options be treated as boolean flags? - -```sh -node example.js -abc -{ _: [], a: true, b: true, c: true } -``` - -_if disabled:_ - -```sh -node example.js -abc -{ _: [], abc: true } -``` - -### camel-case expansion - -* default: `true`. -* key: `camel-case-expansion`. - -Should hyphenated arguments be expanded into camel-case aliases? - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true, fooBar: true } -``` - -_if disabled:_ - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true } -``` - -### dot-notation - -* default: `true` -* key: `dot-notation` - -Should keys that contain `.` be treated as objects? - -```sh -node example.js --foo.bar -{ _: [], foo: { bar: true } } -``` - -_if disabled:_ - -```sh -node example.js --foo.bar -{ _: [], "foo.bar": true } -``` - -### parse numbers - -* default: `true` -* key: `parse-numbers` - -Should keys that look like numbers be treated as such? - -```sh -node example.js --foo=99.3 -{ _: [], foo: 99.3 } -``` - -_if disabled:_ - -```sh -node example.js --foo=99.3 -{ _: [], foo: "99.3" } -``` - -### boolean negation - -* default: `true` -* key: `boolean-negation` - -Should variables prefixed with `--no` be treated as negations? - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if disabled:_ - -```sh -node example.js --no-foo -{ _: [], "no-foo": true } -``` - -### combine arrays - -* default: `false` -* key: `combine-arrays` - -Should arrays be combined when provided by both command line arguments and -a configuration file. - -### duplicate arguments array - -* default: `true` -* key: `duplicate-arguments-array` - -Should arguments be coerced into an array when duplicated: - -```sh -node example.js -x 1 -x 2 -{ _: [], x: [1, 2] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 -x 2 -{ _: [], x: 2 } -``` - -### flatten duplicate arrays - -* default: `true` -* key: `flatten-duplicate-arrays` - -Should array arguments be coerced into a single array when duplicated: - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [1, 2, 3, 4] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [[1, 2], [3, 4]] } -``` - -### greedy arrays - -* default: `true` -* key: `greedy-arrays` - -Should arrays consume more than one positional argument following their flag. - -```sh -node example --arr 1 2 -{ _[], arr: [1, 2] } -``` - -_if disabled:_ - -```sh -node example --arr 1 2 -{ _[2], arr: [1] } -``` - -**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.** - -### nargs eats options - -* default: `false` -* key: `nargs-eats-options` - -Should nargs consume dash options as well as positional arguments. - -### negation prefix - -* default: `no-` -* key: `negation-prefix` - -The prefix to use for negated boolean variables. - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if set to `quux`:_ - -```sh -node example.js --quuxfoo -{ _: [], foo: false } -``` - -### populate -- - -* default: `false`. -* key: `populate--` - -Should unparsed flags be stored in `--` or `_`. - -_If disabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a', 'x', 'y' ], b: true } -``` - -_If enabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } -``` - -### set placeholder key - -* default: `false`. -* key: `set-placeholder-key`. - -Should a placeholder be added for keys not set via the corresponding CLI argument? - -_If disabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, c: 2 } -``` - -_If enabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, b: undefined, c: 2 } -``` - -### halt at non-option - -* default: `false`. -* key: `halt-at-non-option`. - -Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. - -_If disabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'b' ], a: 'run', x: 'y' } -``` - -_If enabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'b', '-x', 'y' ], a: 'run' } -``` - -### strip aliased - -* default: `false` -* key: `strip-aliased` - -Should aliases be removed before returning results? - -_If disabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } -``` - -_If enabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -### strip dashed - -* default: `false` -* key: `strip-dashed` - -Should dashed keys be removed before returning results? This option has no effect if -`camel-case-expansion` is disabled. - -_If disabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -_If enabled:_ - -```sh -node example.js --test-field 1 -{ _: [], testField: 1 } -``` - -### unknown options as args - -* default: `false` -* key: `unknown-options-as-args` - -Should unknown options be treated like regular arguments? An unknown option is one that is not -configured in `opts`. - -_If disabled_ - -```sh -node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } -``` - -_If enabled_ - -```sh -node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } -``` - -## Special Thanks - -The yargs project evolves from optimist and minimist. It owes its -existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ - -## License - -ISC diff --git a/test-eol-project/node_modules/yargs-parser/index.js b/test-eol-project/node_modules/yargs-parser/index.js deleted file mode 100644 index c14c1fc7..00000000 --- a/test-eol-project/node_modules/yargs-parser/index.js +++ /dev/null @@ -1,1032 +0,0 @@ -const camelCase = require('camelcase') -const decamelize = require('decamelize') -const path = require('path') -const tokenizeArgString = require('./lib/tokenize-arg-string') -const util = require('util') - -function parse (args, opts) { - opts = Object.assign(Object.create(null), opts) - // allow a string argument to be passed in rather - // than an argv array. - args = tokenizeArgString(args) - - // aliases might have transitive relationships, normalize this. - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)) - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration) - const defaults = Object.assign(Object.create(null), opts.default) - const configObjects = opts.configObjects || [] - const envPrefix = opts.envPrefix - const notFlagsOption = configuration['populate--'] - const notFlagsArgv = notFlagsOption ? '--' : '_' - const newAliases = Object.create(null) - const defaulted = Object.create(null) - // allow a i18n handler to be passed in, default to a fake one (util.format). - const __ = opts.__ || util.format - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - } - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/ - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') - - ;[].concat(opts.array).filter(Boolean).forEach(function (opt) { - const key = opt.key || opt - - // assign to flags[bools|strings|numbers] - const assignment = Object.keys(opt).map(function (key) { - return ({ - boolean: 'bools', - string: 'strings', - number: 'numbers' - })[key] - }).filter(Boolean).pop() - - // assign key to be coerced - if (assignment) { - flags[assignment][key] = true - } - - flags.arrays[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.number).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.count).filter(Boolean).forEach(function (key) { - flags.counts[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true - flags.keys.push(key) - }) - - Object.keys(opts.narg || {}).forEach(function (k) { - flags.nargs[k] = opts.narg[k] - flags.keys.push(k) - }) - - Object.keys(opts.coerce || {}).forEach(function (k) { - flags.coercions[k] = opts.coerce[k] - flags.keys.push(k) - }) - - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - ;[].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true - }) - } else { - Object.keys(opts.config || {}).forEach(function (k) { - flags.configs[k] = opts.config[k] - }) - } - - // create a lookup table that takes into account all - // combinations of aliases: {f: ['foo'], foo: ['f']} - extendAliases(opts.key, aliases, opts.default, flags.arrays) - - // apply default values to all aliases. - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key] - }) - }) - - let error = null - checkConfiguration() - - let notFlags = [] - - const argv = Object.assign(Object.create(null), { _: [] }) - // TODO(bcoe): for the first pass at removing object prototype we didn't - // remove all prototypes from objects returned by this API, we might want - // to gradually move towards doing so. - const argvReturn = {} - - for (let i = 0; i < args.length; i++) { - const arg = args[i] - let broken - let key - let letters - let m - let next - let value - - // any unknown option (except for end-of-options, "--") - if (arg !== '--' && isUnknownOptionAsArg(arg)) { - argv._.push(arg) - // -- separated by = - } else if (arg.match(/^--.+=/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+=/) - )) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--?([^=]+)=([\s\S]*)$/) - - // arrays format = '--f=a b c' - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]) - } else if (checkAllAliases(m[1], flags.nargs) !== false) { - // nargs format = '--f=monkey washing cat' - i = eatNargs(i, m[1], args, m[2]) - } else { - setArg(m[1], m[2]) - } - } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - key = arg.match(negatedBoolean)[1] - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false) - - // -- separated by space. - } else if (arg.match(/^--.+/) || ( - !configuration['short-option-groups'] && arg.match(/^-[^-]+/) - )) { - key = arg.match(/^--?(.+)/)[1] - - if (checkAllAliases(key, flags.arrays)) { - // array format = '--foo a b c' - i = eatArray(i, key, args) - } else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '--foo a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } - - // dot-notation flag separated by '='. - } else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/) - setArg(m[1], m[2]) - - // dot-notation flag separated by space. - } else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1] - key = arg.match(/^-(.\..+)/)[1] - - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split('') - broken = false - - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3) - key = letters[j] - - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f=a b c' - i = eatArray(i, key, args, value) - } else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f=monkey washing cat' - i = eatNargs(i, key, args, value) - } else { - setArg(key, value) - } - - broken = true - break - } - - if (next === '-') { - setArg(letters[j], next) - continue - } - - // current letter is an alphabetic character and next value is a number - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next) - broken = true - break - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next) - broken = true - break - } else { - setArg(letters[j], defaultValue(letters[j])) - } - } - - key = arg.slice(-1)[0] - - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - // array format = '-f a b c' - i = eatArray(i, key, args) - } else if (checkAllAliases(key, flags.nargs) !== false) { - // nargs format = '-f a b c' - // should be truthy even if: flags.nargs[key] === 0 - i = eatNargs(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } - } - } else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - // single-digit boolean alias, e.g: xargs -0 - key = arg.slice(1) - setArg(key, defaultValue(key)) - } else if (arg === '--') { - notFlags = args.slice(i + 1) - break - } else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i) - break - } else { - argv._.push(maybeCoerceNumber('_', arg)) - } - } - - // order of precedence: - // 1. command line arg - // 2. value from env var - // 3. value from config file - // 4. value from config objects - // 5. configured default value - applyEnvVars(argv, true) // special case: check env vars that point to config file - applyEnvVars(argv, false) - setConfig(argv) - setConfigObjects() - applyDefaultsAndAliases(argv, flags.aliases, defaults, true) - applyCoercions(argv) - if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) - - // for any counts either not in args or without an explicit default, set to 0 - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) setArg(key, 0) - }) - - // '--' defaults to undefined. - if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key) - }) - - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key] - }) - } - - if (configuration['strip-aliased']) { - ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion']) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] - } - - delete argv[alias] - }) - } - - // how many arguments should we consume, based - // on the nargs option? - function eatNargs (i, key, args, argAfterEqualSign) { - let ii - let toEat = checkAllAliases(key, flags.nargs) - // NaN has a special meaning for the array type, indicating that one or - // more values are expected. - toEat = isNaN(toEat) ? 1 : toEat - - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)) - } - setArg(key, defaultValue(key)) - return i - } - - let available = isUndefined(argAfterEqualSign) ? 0 : 1 - if (configuration['nargs-eats-options']) { - // classic behavior, yargs eats positional and dash arguments. - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)) - } - available = toEat - } else { - // nargs will not consume flag arguments, e.g., -abc, --foo, - // and terminates when one is observed. - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) available++ - else break - } - if (available < toEat) error = Error(__('Not enough arguments following: %s', key)) - } - - let consumed = Math.min(available, toEat) - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign) - consumed-- - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]) - } - - return (i + consumed) - } - - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray (i, key, args, argAfterEqualSign) { - let argsToSet = [] - let next = argAfterEqualSign || args[i + 1] - // If both array and nargs are configured, enforce the nargs count: - const nargsCount = checkAllAliases(key, flags.nargs) - - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true) - } else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - // for keys without value ==> argsToSet remains an empty [] - // set user default value, if available - if (defaults[key] !== undefined) { - const defVal = defaults[key] - argsToSet = Array.isArray(defVal) ? defVal : [defVal] - } - } else { - // value in --option=value is eaten as is - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign)) - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && argsToSet.length >= nargsCount)) break - next = args[ii] - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break - i = ii - argsToSet.push(processValue(key, next)) - } - } - - // If both array and nargs are configured, create an error if less than - // nargs positionals were found. NaN has special meaning, indicating - // that at least one value is required (more are okay). - if ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0)) { - error = Error(__('Not enough arguments following: %s', key)) - } - - setArg(key, argsToSet) - return i - } - - function setArg (key, val) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop) - }).join('.') - addNewAlias(key, alias) - } - - const value = processValue(key, val) - const splitKey = key.split('.') - setKey(argv, splitKey, value) - - // handle populating aliases of the full key - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - x = x.split('.') - setKey(argv, x, value) - }) - } - - // handle populating aliases of the first element of the dot-notation key - if (splitKey.length > 1 && configuration['dot-notation']) { - ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { - x = x.split('.') - - // expand alias with nested objects in key - const a = [].concat(splitKey) - a.shift() // nuke the old key. - x = x.concat(a) - - // populate alias only if is not already an alias of the full key - // (already populated above) - if (!(flags.aliases[key] || []).includes(x.join('.'))) { - setKey(argv, x, value) - } - }) - } - - // Set normalize getter and setter when key is in 'normalize' but isn't an array - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []) - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get () { - return val - }, - set (value) { - val = typeof value === 'string' ? path.normalize(value) : value - } - }) - }) - } - } - - function addNewAlias (key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias] - newAliases[alias] = true - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key) - } - } - - function processValue (key, val) { - // strings may be quoted, clean this up as we assign values. - if (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0] - ) { - val = val.substring(1, val.length - 1) - } - - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') val = val === 'true' - } - - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v) }) - : maybeCoerceNumber(key, val) - - // increment a count given as arg (either no value or value parsed as boolean) - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment - } - - // Set normalized value when key is in 'normalize' and in 'arrays' - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) value = val.map(path.normalize) - else value = path.normalize(val) - } - return value - } - - function maybeCoerceNumber (key, value) { - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( - Number.isSafeInteger(Math.floor(value)) - ) - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) - } - return value - } - - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig (argv) { - const configLookup = Object.create(null) - - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, flags.aliases, defaults) - - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey] - if (configPath) { - try { - let config = null - const resolvedConfigPath = path.resolve(process.cwd(), configPath) - - if (typeof flags.configs[configKey] === 'function') { - try { - config = flags.configs[configKey](resolvedConfigPath) - } catch (e) { - config = e - } - if (config instanceof Error) { - error = config - return - } - } else { - config = require(resolvedConfigPath) - } - - setConfigObject(config) - } catch (ex) { - if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) - } - } - }) - } - - // set args from config object. - // it recursively checks nested objects. - function setConfigObject (config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key] - const fullKey = prev ? prev + '.' + key : key - - // if the value is an inner object and we have dot-notation - // enabled, treat inner objects in config the same as - // heavily nested dot notations (foo.bar.apple). - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - // if the value is an object but not an array, check nested object - setConfigObject(value, fullKey) - } else { - // setting arguments via CLI takes precedence over - // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value) - } - } - }) - } - - // set all config objects passed in opts - function setConfigObjects () { - if (typeof configObjects === 'undefined') return - configObjects.forEach(function (configObject) { - setConfigObject(configObject) - }) - } - - function applyEnvVars (argv, configOnly) { - if (typeof envPrefix === 'undefined') return - - const prefix = typeof envPrefix === 'string' ? envPrefix : '' - Object.keys(process.env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - // get array of nested keys and convert them to camel case - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length) - } - return camelCase(key) - }) - - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), process.env[envVar]) - } - } - }) - } - - function applyCoercions (argv) { - let coerce - const applied = new Set() - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases - coerce = checkAllAliases(key, flags.coercions) - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])) - ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali) - argv[ali] = value - }) - } catch (err) { - error = err - } - } - } - }) - } - - function setPlaceholderKeys (argv) { - flags.keys.forEach((key) => { - // don't set placeholder keys for dot notation options 'foo.bar'. - if (~key.indexOf('.')) return - if (typeof argv[key] === 'undefined') argv[key] = undefined - }) - return argv - } - - function applyDefaultsAndAliases (obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]) - if (canLog) defaulted[key] = true - - ;(aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) return - setKey(obj, x.split('.'), defaults[key]) - }) - } - }) - } - - function hasKey (obj, keys) { - let o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}) - }) - - const key = keys[keys.length - 1] - - if (typeof o !== 'object') return false - else return key in o - } - - function setKey (obj, keys, value) { - let o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key, index) { - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - key = sanitizeKey(key) - - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {} - } - - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - // ensure that o[key] is an array, and that the last item is an empty object. - if (Array.isArray(o[key])) { - o[key].push({}) - } else { - o[key] = [o[key], {}] - } - - // we want to update the empty object at the end of the o[key] array, so set o to that object - o = o[key][o[key].length - 1] - } else { - o = o[key] - } - }) - - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - const key = sanitizeKey(keys[keys.length - 1]) - - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) - const isValueArray = Array.isArray(value) - let duplicate = configuration['duplicate-arguments-array'] - - // nargs has higher priority than duplicate - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined - } - } - - if (value === increment) { - o[key] = increment(o[key]) - } else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]) - } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value - } else { - o[key] = o[key].concat([value]) - } - } else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value] - } else if (duplicate && !( - o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools) - )) { - o[key] = [o[key], value] - } else { - o[key] = value - } - } - - // extend the aliases list with inferred aliases. - function extendAliases (...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - // short-circuit if we've already added a key - // to the aliases array, for example it might - // exist in both 'opts.default' and 'opts.key'. - if (flags.aliases[key]) return - - flags.aliases[key] = [].concat(aliases[key] || []) - // For "--option-name", also set argv.optionName - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x) - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - // For "--optionName", also set argv['option-name'] - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-') - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y - })) - }) - }) - }) - } - - // return the 1st set flag for any of a key's aliases (or false if no flag set) - function checkAllAliases (key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key) - const keys = Object.keys(flag) - const setAlias = toCheck.find(key => keys.includes(key)) - return setAlias ? flag[setAlias] : false - } - - function hasAnyFlag (key) { - const toCheck = [].concat(Object.keys(flags).map(k => flags[k])) - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key] - }) - } - - function hasFlagsMatching (arg, ...patterns) { - const toCheck = [].concat(...patterns) - return toCheck.some(function (pattern) { - const match = arg.match(pattern) - return match && hasAnyFlag(match[1]) - }) - } - - // based on a simplified version of the short flag group parsing logic - function hasAllShortFlags (arg) { - // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false } - let hasAllFlags = true - let next - const letters = arg.slice(1).split('') - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false - break - } - - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break - } - } - return hasAllFlags - } - - function isUnknownOptionAsArg (arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg) - } - - function isUnknownOption (arg) { - // ignore negative numbers - if (arg.match(negative)) { return false } - // if this is a short option group and all of them are configured, it isn't unknown - if (hasAllShortFlags(arg)) { return false } - // e.g. '--count=2' - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/ - // e.g. '-a' or '--arg' - const normalFlag = /^-+([^=]+?)$/ - // e.g. '-a-' - const flagEndingInHyphen = /^-+([^=]+?)-$/ - // e.g. '-abc123' - const flagEndingInDigits = /^-+([^=]+?\d+)$/ - // e.g. '-a/usr/local' - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/ - // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters) - } - - // make a best effor to pick a default value - // for an option based on name and type. - function defaultValue (key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key] - } else { - return defaultForType(guessType(key)) - } - } - - // return a default value, given the type of a flag., - // e.g., key of type 'string' will default to '', rather than 'true'. - function defaultForType (type) { - const def = { - boolean: true, - string: '', - number: undefined, - array: [] - } - - return def[type] - } - - // given a flag, enforce a default type. - function guessType (key) { - let type = 'boolean' - if (checkAllAliases(key, flags.strings)) type = 'string' - else if (checkAllAliases(key, flags.numbers)) type = 'number' - else if (checkAllAliases(key, flags.bools)) type = 'boolean' - else if (checkAllAliases(key, flags.arrays)) type = 'array' - return type - } - - function isNumber (x) { - if (x === null || x === undefined) return false - // if loaded from config, may already be a number. - if (typeof x === 'number') return true - // hexadecimal. - if (/^0x[0-9a-f]+$/i.test(x)) return true - // don't treat 0123 as a number; as it drops the leading '0'. - if (x.length > 1 && x[0] === '0') return false - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) - } - - function isUndefined (num) { - return num === undefined - } - - // check user configuration settings for inconsistencies - function checkConfiguration () { - // count keys should not be set as array/narg - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)) - return true - } else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)) - return true - } - }) - } - - return { - argv: Object.assign(argvReturn, argv), - error: error, - aliases: Object.assign({}, flags.aliases), - newAliases: Object.assign({}, newAliases), - defaulted: Object.assign({}, defaulted), - configuration: configuration - } -} - -// if any aliases reference each other, we should -// merge them together. -function combineAliases (aliases) { - const aliasArrays = [] - const combined = Object.create(null) - let change = true - - // turn alias lookup hash {key: ['alias1', 'alias2']} into - // a simple array ['key', 'alias1', 'alias2'] - Object.keys(aliases).forEach(function (key) { - aliasArrays.push( - [].concat(aliases[key], key) - ) - }) - - // combine arrays until zero changes are - // made in an iteration. - while (change) { - change = false - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1 - }) - - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) - aliasArrays.splice(ii, 1) - change = true - break - } - } - } - } - - // map arrays back to the hash-lookup (de-dupe while - // we're at it). - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i - }) - combined[aliasArray.pop()] = aliasArray - }) - - return combined -} - -// this function should only be called when a count is given as an arg -// it is NOT called to set a default value -// thus we can start the count at 1 instead of 0 -function increment (orig) { - return orig !== undefined ? orig + 1 : 1 -} - -function Parser (args, opts) { - const result = parse(args.slice(), opts) - return result.argv -} - -// parse arguments and return detailed -// meta information, aliases, etc. -Parser.detailed = function (args, opts) { - return parse(args.slice(), opts) -} - -// TODO(bcoe): in the next major version of yargs, switch to -// Object.create(null) for dot notation: -function sanitizeKey (key) { - if (key === '__proto__') return '___proto___' - return key -} - -module.exports = Parser diff --git a/test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js b/test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js deleted file mode 100644 index 260c67c1..00000000 --- a/test-eol-project/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ /dev/null @@ -1,40 +0,0 @@ -// take an un-split argv string and tokenize it. -module.exports = function (argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e) - } - - argString = argString.trim() - - let i = 0 - let prevC = null - let c = null - let opening = null - const args = [] - - for (let ii = 0; ii < argString.length; ii++) { - prevC = c - c = argString.charAt(ii) - - // split on spaces unless we're in quotes. - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++ - } - continue - } - - // don't split the string if we're in matching - // opening or closing single and double quotes. - if (c === opening) { - opening = null - } else if ((c === "'" || c === '"') && !opening) { - opening = c - } - - if (!args[i]) args[i] = '' - args[i] += c - } - - return args -} diff --git a/test-eol-project/node_modules/yargs-parser/package.json b/test-eol-project/node_modules/yargs-parser/package.json deleted file mode 100644 index 636ff176..00000000 --- a/test-eol-project/node_modules/yargs-parser/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "yargs-parser", - "version": "18.1.3", - "description": "the mighty option parser used by yargs", - "main": "index.js", - "scripts": { - "fix": "standard --fix", - "test": "c8 --reporter=text --reporter=html mocha test/*.js", - "posttest": "standard", - "coverage": "c8 report --check-coverage check-coverage --lines=100 --branches=97 --statements=100" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs-parser.git" - }, - "keywords": [ - "argument", - "parser", - "yargs", - "command", - "cli", - "parsing", - "option", - "args", - "argument" - ], - "author": "Ben Coe ", - "license": "ISC", - "devDependencies": { - "c8": "^7.0.1", - "chai": "^4.2.0", - "mocha": "^7.0.0", - "standard": "^14.3.1" - }, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "files": [ - "lib", - "index.js" - ], - "engines": { - "node": ">=6" - } -} diff --git a/test-eol-project/node_modules/yargs/CHANGELOG.md b/test-eol-project/node_modules/yargs/CHANGELOG.md deleted file mode 100644 index a010cf34..00000000 --- a/test-eol-project/node_modules/yargs/CHANGELOG.md +++ /dev/null @@ -1,420 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [15.4.0](https://www.github.com/yargs/yargs/compare/v15.3.1...v15.4.0) (2020-06-30) - - -### Features - -* adds deprecation option for commands ([027a636](https://www.github.com/yargs/yargs/commit/027a6365b737e13116811a8ef43670196e1fa00a)) -* support array of examples ([#1682](https://www.github.com/yargs/yargs/issues/1682)) ([225ab82](https://www.github.com/yargs/yargs/commit/225ab8271938bed3a48d23175f3d580ce8cd1306)) - - -### Bug Fixes - -* **docs:** describe usage of `.check()` in more detail ([932cd11](https://www.github.com/yargs/yargs/commit/932cd1177e93f5cc99edfe57a4028e30717bf8fb)) -* **i18n:** Japanese translation phrasing ([#1619](https://www.github.com/yargs/yargs/issues/1619)) ([0894175](https://www.github.com/yargs/yargs/commit/089417550ef5a5b8ce3578dd2a989191300b64cd)) -* **strict mode:** report default command unknown arguments ([#1626](https://www.github.com/yargs/yargs/issues/1626)) ([69f29a9](https://www.github.com/yargs/yargs/commit/69f29a9cd429d4bb99481238305390107ac75b02)) -* **usage:** translate 'options' group only when displaying help ([#1600](https://www.github.com/yargs/yargs/issues/1600)) ([e60b39b](https://www.github.com/yargs/yargs/commit/e60b39b9d3a912c06db43f87c86ba894142b6c1c)) - - -### Reverts - -* Revert "chore(deps): update dependency eslint to v7 (#1656)" (#1673) ([34949f8](https://www.github.com/yargs/yargs/commit/34949f89ee7cdf88f7b315659df4b5f62f714842)), closes [#1656](https://www.github.com/yargs/yargs/issues/1656) [#1673](https://www.github.com/yargs/yargs/issues/1673) - -### [15.3.1](https://www.github.com/yargs/yargs/compare/v15.3.0...v15.3.1) (2020-03-16) - - -### Bug Fixes - -* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential -prototype pollution vulnerability. This was reported by the Snyk Security Research Team. ([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2)) - -## [15.3.0](https://www.github.com/yargs/yargs/compare/v15.2.0...v15.3.0) (2020-03-08) - - -### Features - -* **yargs-parser:** introduce single-digit boolean aliases ([#1576](https://www.github.com/yargs/yargs/issues/1576)) ([3af7f04](https://www.github.com/yargs/yargs/commit/3af7f04cdbfcbd4b3f432aca5144d43f21958c39)) -* add usage for single-digit boolean aliases ([#1580](https://www.github.com/yargs/yargs/issues/1580)) ([6014e39](https://www.github.com/yargs/yargs/commit/6014e39bca3a1e8445aa0fb2a435f6181e344c45)) - - -### Bug Fixes - -* address ambiguity between nargs of 1 and requiresArg ([#1572](https://www.github.com/yargs/yargs/issues/1572)) ([a5edc32](https://www.github.com/yargs/yargs/commit/a5edc328ecb3f90d1ba09cfe70a0040f68adf50a)) - -## [15.2.0](https://www.github.com/yargs/yargs/compare/v15.1.0...v15.2.0) (2020-03-01) - - -### ⚠ BREAKING CHANGES - -* **deps:** yargs-parser@17.0.0 no longer implicitly creates arrays out of boolean -arguments when duplicates are provided - -### Features - -* **completion:** takes negated flags into account when boolean-negation is set ([#1509](https://www.github.com/yargs/yargs/issues/1509)) ([7293ad5](https://www.github.com/yargs/yargs/commit/7293ad50d20ea0fb7dd1ac9b925e90e1bd95dea8)) -* **deps:** pull in yargs-parser@17.0.0 ([#1553](https://www.github.com/yargs/yargs/issues/1553)) ([b9409da](https://www.github.com/yargs/yargs/commit/b9409da199ebca515a848489c206b807fab2e65d)) -* deprecateOption ([#1559](https://www.github.com/yargs/yargs/issues/1559)) ([8aae333](https://www.github.com/yargs/yargs/commit/8aae3332251d09fa136db17ef4a40d83fa052bc4)) -* display appropriate $0 for electron apps ([#1536](https://www.github.com/yargs/yargs/issues/1536)) ([d0e4379](https://www.github.com/yargs/yargs/commit/d0e437912917d6a66bb5128992fa2f566a5f830b)) -* introduces strictCommands() subset of strict mode ([#1540](https://www.github.com/yargs/yargs/issues/1540)) ([1d4cca3](https://www.github.com/yargs/yargs/commit/1d4cca395a98b395e6318f0505fc73bef8b01350)) -* **deps:** yargs-parser with 'greedy-array' configuration ([#1569](https://www.github.com/yargs/yargs/issues/1569)) ([a03a320](https://www.github.com/yargs/yargs/commit/a03a320dbf5c0ce33d829a857fc04a651c0bb53e)) - - -### Bug Fixes - -* help always displayed for the first command parsed having an async handler ([#1535](https://www.github.com/yargs/yargs/issues/1535)) ([d585b30](https://www.github.com/yargs/yargs/commit/d585b303a43746201b05c9c9fda94a444634df33)) -* **deps:** fix enumeration for normalized path arguments ([#1567](https://www.github.com/yargs/yargs/issues/1567)) ([0b5b1b0](https://www.github.com/yargs/yargs/commit/0b5b1b0e5f4f9baf393c48e9cc2bc85c1b67a47a)) -* **locales:** only translate default option group name ([acc16de](https://www.github.com/yargs/yargs/commit/acc16de6b846ea7332db753646a9cec76b589162)) -* **locales:** remove extra space in French for 'default' ([#1564](https://www.github.com/yargs/yargs/issues/1564)) ([ecfc2c4](https://www.github.com/yargs/yargs/commit/ecfc2c474575c6cdbc6d273c94c13181bd1dbaa6)) -* **translations:** add French translation for unknown command ([#1563](https://www.github.com/yargs/yargs/issues/1563)) ([18b0b75](https://www.github.com/yargs/yargs/commit/18b0b752424bf560271e670ff95a0f90c8386787)) -* **translations:** fix pluralization in error messages. ([#1557](https://www.github.com/yargs/yargs/issues/1557)) ([94fa38c](https://www.github.com/yargs/yargs/commit/94fa38cbab8d86943e87bf41d368ed56dffa6835)) -* **yargs:** correct support of bundled electron apps ([#1554](https://www.github.com/yargs/yargs/issues/1554)) ([a0b61ac](https://www.github.com/yargs/yargs/commit/a0b61ac21e2b554aa73dbf1a66d4a7af94047c2f)) - -## [15.1.0](https://www.github.com/yargs/yargs/compare/v15.0.2...v15.1.0) (2020-01-02) - - -### Features - -* **lang:** add Finnish localization (language code fi) ([222c8fe](https://www.github.com/yargs/yargs/commit/222c8fef2e2ad46e314c337dec96940f896bec35)) -* complete short options with a single dash ([#1507](https://www.github.com/yargs/yargs/issues/1507)) ([99011ab](https://www.github.com/yargs/yargs/commit/99011ab5ba90232506ece0a17e59e2001a1ab562)) -* onFinishCommand handler ([#1473](https://www.github.com/yargs/yargs/issues/1473)) ([fe380cd](https://www.github.com/yargs/yargs/commit/fe380cd356aa33aef0449facd59c22cab8930ac9)) - - -### Bug Fixes - -* getCompletion() was not working for options ([#1495](https://www.github.com/yargs/yargs/issues/1495)) ([463feb2](https://www.github.com/yargs/yargs/commit/463feb2870158eb9df670222b0f0a40a05cf18d0)) -* misspelling of package.json `engines` field ([0891d0e](https://www.github.com/yargs/yargs/commit/0891d0ed35b30c83a6d9e9f6a5c5f84d13c546a0)) -* populate positionals when unknown-options-as-args is set ([#1508](https://www.github.com/yargs/yargs/issues/1508)) ([bb0f2eb](https://www.github.com/yargs/yargs/commit/bb0f2eb996fa4e19d330b31a01c2036cafa99a7e)), closes [#1444](https://www.github.com/yargs/yargs/issues/1444) -* show 2 dashes on help for single digit option key or alias ([#1493](https://www.github.com/yargs/yargs/issues/1493)) ([63b3dd3](https://www.github.com/yargs/yargs/commit/63b3dd31a455d428902220c1992ae930e18aff5c)) -* **docs:** use recommended cjs import syntax for ts examples ([#1513](https://www.github.com/yargs/yargs/issues/1513)) ([f9a18bf](https://www.github.com/yargs/yargs/commit/f9a18bfd624a5013108084f690cd8a1de794c430)) - -### [15.0.2](https://www.github.com/yargs/yargs/compare/v15.0.1...v15.0.2) (2019-11-19) - - -### Bug Fixes - -* temporary fix for libraries that call Object.freeze() ([#1483](https://www.github.com/yargs/yargs/issues/1483)) ([99c2dc8](https://www.github.com/yargs/yargs/commit/99c2dc850e67c606644f8b0c0bca1a59c87dcbcd)) - -### [15.0.1](https://www.github.com/yargs/yargs/compare/v15.0.0...v15.0.1) (2019-11-16) - - -### Bug Fixes - -* **deps:** cliui, find-up, and string-width, all drop Node 6 support ([#1479](https://www.github.com/yargs/yargs/issues/1479)) ([6a9ebe2](https://www.github.com/yargs/yargs/commit/6a9ebe2d955e3e979e76c07ffbb1c17fef64cb49)) - -## [15.0.0](https://www.github.com/yargs/yargs/compare/v14.2.0...v15.0.0) (2019-11-10) - - -### ⚠ BREAKING CHANGES - -* **deps:** yargs-parser now throws on invalid combinations of config (#1470) -* yargs-parser@16.0.0 drops support for Node 6 -* drop Node 6 support (#1461) -* remove package.json-based parserConfiguration (#1460) - -### Features - -* **deps:** yargs-parser now throws on invalid combinations of config ([#1470](https://www.github.com/yargs/yargs/issues/1470)) ([c10c38c](https://www.github.com/yargs/yargs/commit/c10c38cca04298f96b55a7e374a9a134abefffa7)) -* expose `Parser` from `require('yargs/yargs')` ([#1477](https://www.github.com/yargs/yargs/issues/1477)) ([1840ba2](https://www.github.com/yargs/yargs/commit/1840ba22f1a24c0ece8e32bbd31db4134a080aee)) - - -### Bug Fixes - -* **docs:** TypeScript import to prevent a future major release warning ([#1441](https://www.github.com/yargs/yargs/issues/1441)) ([b1b156a](https://www.github.com/yargs/yargs/commit/b1b156a3eb4ddd6803fbbd56c611a77919293000)) -* stop-parse was not being respected by commands ([#1459](https://www.github.com/yargs/yargs/issues/1459)) ([12c82e6](https://www.github.com/yargs/yargs/commit/12c82e62663e928148a7ee2f51629aa26a0f9bb2)) -* update to yargs-parser with fix for array default values ([#1463](https://www.github.com/yargs/yargs/issues/1463)) ([ebee59d](https://www.github.com/yargs/yargs/commit/ebee59d9022da538410e69a5c025019ed46d13d2)) -* **docs:** update boolean description and examples in docs ([#1474](https://www.github.com/yargs/yargs/issues/1474)) ([afd5b48](https://www.github.com/yargs/yargs/commit/afd5b4871bfeb90d58351ac56c5c44a83ef033e6)) - - -### Miscellaneous Chores - -* drop Node 6 support ([#1461](https://www.github.com/yargs/yargs/issues/1461)) ([2ba8ce0](https://www.github.com/yargs/yargs/commit/2ba8ce05e8fefbeffc6cb7488d9ebf6e86cceb1d)) - - -### Code Refactoring - -* remove package.json-based parserConfiguration ([#1460](https://www.github.com/yargs/yargs/issues/1460)) ([0d3642b](https://www.github.com/yargs/yargs/commit/0d3642b6f829b637938774c0c6ce5f6bfe1afa51)) - -## [14.2.0](https://github.com/yargs/yargs/compare/v14.1.0...v14.2.0) (2019-10-07) - - -### Bug Fixes - -* async middleware was called twice ([#1422](https://github.com/yargs/yargs/issues/1422)) ([9a42b63](https://github.com/yargs/yargs/commit/9a42b63)) -* fix promise check to accept any spec conform object ([#1424](https://github.com/yargs/yargs/issues/1424)) ([0be43d2](https://github.com/yargs/yargs/commit/0be43d2)) -* groups were not being maintained for nested commands ([#1430](https://github.com/yargs/yargs/issues/1430)) ([d38650e](https://github.com/yargs/yargs/commit/d38650e)) -* **docs:** broken markdown link ([#1426](https://github.com/yargs/yargs/issues/1426)) ([236e24e](https://github.com/yargs/yargs/commit/236e24e)) -* support merging deeply nested configuration ([#1423](https://github.com/yargs/yargs/issues/1423)) ([bae66fe](https://github.com/yargs/yargs/commit/bae66fe)) - - -### Features - -* **deps:** introduce yargs-parser with support for unknown-options-as-args ([#1440](https://github.com/yargs/yargs/issues/1440)) ([4d21520](https://github.com/yargs/yargs/commit/4d21520)) - -## [14.1.0](https://github.com/yargs/yargs/compare/v14.0.0...v14.1.0) (2019-09-06) - - -### Bug Fixes - -* **docs:** fix incorrect parserConfiguration documentation ([2a99124](https://github.com/yargs/yargs/commit/2a99124)) -* detect zsh when zsh isnt run as a login prompt ([#1395](https://github.com/yargs/yargs/issues/1395)) ([8792d13](https://github.com/yargs/yargs/commit/8792d13)) -* populate correct value on yargs.parsed and stop warning on access ([#1412](https://github.com/yargs/yargs/issues/1412)) ([bb0eb52](https://github.com/yargs/yargs/commit/bb0eb52)) -* showCompletionScript was logging script twice ([#1388](https://github.com/yargs/yargs/issues/1388)) ([07c8537](https://github.com/yargs/yargs/commit/07c8537)) -* strict() should not ignore hyphenated arguments ([#1414](https://github.com/yargs/yargs/issues/1414)) ([b774b5e](https://github.com/yargs/yargs/commit/b774b5e)) -* **docs:** formalize existing callback argument to showHelp ([#1386](https://github.com/yargs/yargs/issues/1386)) ([d217764](https://github.com/yargs/yargs/commit/d217764)) - - -### Features - -* make it possible to merge configurations when extending other config. ([#1411](https://github.com/yargs/yargs/issues/1411)) ([5d7ad98](https://github.com/yargs/yargs/commit/5d7ad98)) - -## [14.0.0](https://github.com/yargs/yargs/compare/v13.3.0...v14.0.0) (2019-07-30) - - -### ⚠ BREAKING CHANGES - -* we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed -* previously to this fix methods like `yargs.getOptions()` contained the state of the last command to execute. -* do not allow additional positionals in strict mode - -### Bug Fixes - -* calling parse multiple times now appropriately maintains state ([#1137](https://github.com/yargs/yargs/issues/1137)) ([#1369](https://github.com/yargs/yargs/issues/1369)) ([026b151](https://github.com/yargs/yargs/commit/026b151)) -* prefer user supplied script name in usage ([#1383](https://github.com/yargs/yargs/issues/1383)) ([28c74b9](https://github.com/yargs/yargs/commit/28c74b9)) -* **deps:** use decamelize from npm instead of vendored copy ([#1377](https://github.com/yargs/yargs/issues/1377)) ([015eeb9](https://github.com/yargs/yargs/commit/015eeb9)) -* **examples:** fix usage-options.js to reflect current API ([#1375](https://github.com/yargs/yargs/issues/1375)) ([6e5b76b](https://github.com/yargs/yargs/commit/6e5b76b)) -* do not allow additional positionals in strict mode ([35d777c](https://github.com/yargs/yargs/commit/35d777c)) -* properties accessed on singleton now reflect current state of instance ([#1366](https://github.com/yargs/yargs/issues/1366)) ([409d35b](https://github.com/yargs/yargs/commit/409d35b)) -* tolerate null prototype for config objects with `extends` ([#1376](https://github.com/yargs/yargs/issues/1376)) ([3d26d11](https://github.com/yargs/yargs/commit/3d26d11)), closes [#1372](https://github.com/yargs/yargs/issues/1372) -* yargs.parsed now populated before returning, when yargs.parse() called with no args (#1382) ([e3981fd](https://github.com/yargs/yargs/commit/e3981fd)), closes [#1382](https://github.com/yargs/yargs/issues/1382) - -### Features - -* adds support for multiple epilog messages ([#1384](https://github.com/yargs/yargs/issues/1384)) ([07a5554](https://github.com/yargs/yargs/commit/07a5554)) -* allow completionCommand to be set via showCompletionScript ([#1385](https://github.com/yargs/yargs/issues/1385)) ([5562853](https://github.com/yargs/yargs/commit/5562853)) - -## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10) - - -### Bug Fixes - -* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b)) - - -### Features - -* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b)) -* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c)) - -### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13) - - -### Bug Fixes - -* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813)) - - - -### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05) - - -### Bug Fixes - -* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65)) -* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132)) - - -### Tests - -* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b)) - - - -## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06) - - - -## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18) - - -### Bug Fixes - -* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224)) -* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394)) - - -# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15) - - -### Features - -* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156) - - - -# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12) - - -### Features - -* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a)) - - - - -# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02) - - -### Bug Fixes - -* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739)) -* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6)) -* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2)) -* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518)) - - -### Chores - -* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~ - * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._ -* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f)) - - -### Features - -* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a)) -* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9)) -* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa)) -* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f)) - - -### BREAKING CHANGES - -* options with leading '+' or '0' now parse as strings -* dropping Node 6 which hits end of life in April 2019 -* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) -* we now warn if the yargs stanza package.json is used. - - - - -## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) - - -### Bug Fixes - -* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035)) - - - - -## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10) - - -### Bug Fixes - -* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92)) - - - - -## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06) - - -### Bug Fixes - -* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b)) -* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214) -* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028)) -* improve Norwegian Bokmål translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4)) -* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5)) - - - - -## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04) - - -### Bug Fixes - -* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178) -* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea)) -* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970)) - - - - -## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29) - - - - -# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26) - - -### Bug Fixes - -* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4)) -* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c)) -* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5)) - - -### Chores - -* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b)) -* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4)) - - -### Features - -* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7)) -* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae)) -* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82)) - - -### BREAKING CHANGES - -* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined` -* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4. -* yargs-parser does not populate 'false' when boolean flag is not passed -* tests that assert against help output will need to be updated - - - - -# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) - - -### Bug Fixes - -* choose correct config directory when require.main does not exist ([#1056](https://github.com/yargs/yargs/issues/1056)) ([a04678c](https://github.com/yargs/yargs/commit/a04678c)) - - -### Features - -* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae)) -* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6)) - - - - -# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) - - -### Bug Fixes - -* Set implicit nargs=1 when type=number requiresArg=true ([#1050](https://github.com/yargs/yargs/issues/1050)) ([2b56812](https://github.com/yargs/yargs/commit/2b56812)) - - -### Features - -* requiresArg is now simply an alias for nargs(1) ([#1054](https://github.com/yargs/yargs/issues/1054)) ([a3ddacc](https://github.com/yargs/yargs/commit/a3ddacc)) - - -### BREAKING CHANGES - -* requiresArg now has significantly different error output, matching nargs. - -[Historical Versions](/docs/CHANGELOG-historical.md) diff --git a/test-eol-project/node_modules/yargs/LICENSE b/test-eol-project/node_modules/yargs/LICENSE deleted file mode 100644 index b0145ca0..00000000 --- a/test-eol-project/node_modules/yargs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) - -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/test-eol-project/node_modules/yargs/README.md b/test-eol-project/node_modules/yargs/README.md deleted file mode 100644 index 0db992b1..00000000 --- a/test-eol-project/node_modules/yargs/README.md +++ /dev/null @@ -1,140 +0,0 @@ -

    - -

    -

    Yargs

    -

    - Yargs be a node.js library fer hearties tryin' ter parse optstrings -

    - -
    - -[![Build Status][travis-image]][travis-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Coverage][coverage-image]][coverage-url] -[![Conventional Commits][conventional-commits-image]][conventional-commits-url] -[![Slack][slack-image]][slack-url] - -## Description : -Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. - -It gives you: - -* commands and (grouped) options (`my-program.js serve --port=5000`). -* a dynamically generated help menu based on your arguments. - -> - -* bash-completion shortcuts for commands and options. -* and [tons more](/docs/api.md). - -## Installation - -Stable version: -```bash -npm i yargs -``` - -Bleeding edge version with the most recent features: -```bash -npm i yargs@next -``` - -## Usage : - -### Simple Example - -```javascript -#!/usr/bin/env node -const {argv} = require('yargs') - -if (argv.ships > 3 && argv.distance < 53.5) { - console.log('Plunder more riffiwobbles!') -} else { - console.log('Retreat from the xupptumblers!') -} -``` - -```bash -$ ./plunder.js --ships=4 --distance=22 -Plunder more riffiwobbles! - -$ ./plunder.js --ships 12 --distance 98.7 -Retreat from the xupptumblers! -``` - -### Complex Example - -```javascript -#!/usr/bin/env node -require('yargs') // eslint-disable-line - .command('serve [port]', 'start the server', (yargs) => { - yargs - .positional('port', { - describe: 'port to bind on', - default: 5000 - }) - }, (argv) => { - if (argv.verbose) console.info(`start server on :${argv.port}`) - serve(argv.port) - }) - .option('verbose', { - alias: 'v', - type: 'boolean', - description: 'Run with verbose logging' - }) - .argv -``` - -Run the example above with `--help` to see the help for the application. - -## TypeScript - -yargs has type definitions at [@types/yargs][type-definitions]. - -``` -npm i @types/yargs --save-dev -``` - -See usage examples in [docs](/docs/typescript.md). - -## Webpack - -See usage examples of yargs with webpack in [docs](/docs/webpack.md). - -## Community : - -Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). - -## Documentation : - -### Table of Contents - -* [Yargs' API](/docs/api.md) -* [Examples](/docs/examples.md) -* [Parsing Tricks](/docs/tricks.md) - * [Stop the Parser](/docs/tricks.md#stop) - * [Negating Boolean Arguments](/docs/tricks.md#negate) - * [Numbers](/docs/tricks.md#numbers) - * [Arrays](/docs/tricks.md#arrays) - * [Objects](/docs/tricks.md#objects) - * [Quotes](/docs/tricks.md#quotes) -* [Advanced Topics](/docs/advanced.md) - * [Composing Your App Using Commands](/docs/advanced.md#commands) - * [Building Configurable CLI Apps](/docs/advanced.md#configuration) - * [Customizing Yargs' Parser](/docs/advanced.md#customizing) -* [Contributing](/contributing.md) - -[travis-url]: https://travis-ci.org/yargs/yargs -[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg -[npm-url]: https://www.npmjs.com/package/yargs -[npm-image]: https://img.shields.io/npm/v/yargs.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: http://standardjs.com/ -[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg -[conventional-commits-url]: https://conventionalcommits.org/ -[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg -[slack-url]: http://devtoolscommunity.herokuapp.com -[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs -[coverage-image]: https://img.shields.io/nycrc/yargs/yargs -[coverage-url]: https://github.com/yargs/yargs/blob/master/.nycrc diff --git a/test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts b/test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts deleted file mode 100644 index 5a9aca77..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/apply-extends.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Dictionary } from './common-types'; -export declare function applyExtends(config: Dictionary, cwd: string, mergeExtends?: boolean): Dictionary; diff --git a/test-eol-project/node_modules/yargs/build/lib/apply-extends.js b/test-eol-project/node_modules/yargs/build/lib/apply-extends.js deleted file mode 100644 index 005734a0..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/apply-extends.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.applyExtends = void 0; -const fs = require("fs"); -const path = require("path"); -const yerror_1 = require("./yerror"); -let previouslyVisitedConfigs = []; -function checkForCircularExtends(cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new yerror_1.YError(`Circular extended configurations: '${cfgPath}'.`); - } -} -function getPathToDefaultConfig(cwd, pathToExtend) { - return path.resolve(cwd, pathToExtend); -} -function mergeDeep(config1, config2) { - const target = {}; - function isObject(obj) { - return obj && typeof obj === 'object' && !Array.isArray(obj); - } - Object.assign(target, config1); - for (const key of Object.keys(config2)) { - if (isObject(config2[key]) && isObject(target[key])) { - target[key] = mergeDeep(config1[key], config2[key]); - } - else { - target[key] = config2[key]; - } - } - return target; -} -function applyExtends(config, cwd, mergeExtends = false) { - let defaultConfig = {}; - if (Object.prototype.hasOwnProperty.call(config, 'extends')) { - if (typeof config.extends !== 'string') - return defaultConfig; - const isPath = /\.json|\..*rc$/.test(config.extends); - let pathToDefault = null; - if (!isPath) { - try { - pathToDefault = require.resolve(config.extends); - } - catch (err) { - // most likely this simply isn't a module. - } - } - else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends); - } - // maybe the module uses key for some other reason, - // err on side of caution. - if (!pathToDefault && !isPath) - return config; - if (!pathToDefault) - throw new yerror_1.YError(`Unable to find extended config '${config.extends}' in '${cwd}'.`); - checkForCircularExtends(pathToDefault); - previouslyVisitedConfigs.push(pathToDefault); - defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends); - delete config.extends; - defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault), mergeExtends); - } - previouslyVisitedConfigs = []; - return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config); -} -exports.applyExtends = applyExtends; diff --git a/test-eol-project/node_modules/yargs/build/lib/argsert.d.ts b/test-eol-project/node_modules/yargs/build/lib/argsert.d.ts deleted file mode 100644 index 6f7a83f5..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/argsert.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function argsert(callerArguments: any[], length?: number): void; -export declare function argsert(expected: string, callerArguments: any[], length?: number): void; diff --git a/test-eol-project/node_modules/yargs/build/lib/argsert.js b/test-eol-project/node_modules/yargs/build/lib/argsert.js deleted file mode 100644 index 40cb091a..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/argsert.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.argsert = void 0; -const yerror_1 = require("./yerror"); -const parse_command_1 = require("./parse-command"); -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; -function argsert(arg1, arg2, arg3) { - function parseArgs() { - return typeof arg1 === 'object' - ? [{ demanded: [], optional: [] }, arg1, arg2] - : [parse_command_1.parseCommand(`cmd ${arg1}`), arg2, arg3]; - } - // TODO: should this eventually raise an exception. - try { - // preface the argument description with "cmd", so - // that we can run it through yargs' command parser. - let position = 0; - let [parsed, callerArguments, length] = parseArgs(); - const args = [].slice.call(callerArguments); - while (args.length && args[args.length - 1] === undefined) - args.pop(); - length = length || args.length; - if (length < parsed.demanded.length) { - throw new yerror_1.YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); - } - const totalCommands = parsed.demanded.length + parsed.optional.length; - if (length > totalCommands) { - throw new yerror_1.YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); - } - parsed.demanded.forEach((demanded) => { - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, demanded.cmd, position); - position += 1; - }); - parsed.optional.forEach((optional) => { - if (args.length === 0) - return; - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, optional.cmd, position); - position += 1; - }); - } - catch (err) { - console.warn(err.stack); - } -} -exports.argsert = argsert; -function guessType(arg) { - if (Array.isArray(arg)) { - return 'array'; - } - else if (arg === null) { - return 'null'; - } - return typeof arg; -} -function argumentTypeError(observedType, allowedTypes, position) { - throw new yerror_1.YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); -} diff --git a/test-eol-project/node_modules/yargs/build/lib/command.d.ts b/test-eol-project/node_modules/yargs/build/lib/command.d.ts deleted file mode 100644 index 9db6ab5e..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/command.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/// -import { Dictionary } from './common-types'; -import { Middleware } from './middleware'; -import { Positional } from './parse-command'; -import { RequireDirectoryOptions } from 'require-directory'; -import { UsageInstance } from './usage'; -import { ValidationInstance } from './validation'; -import { YargsInstance, Options, OptionDefinition, Context, Arguments, DetailedArguments } from './yargs'; -export declare function command(yargs: YargsInstance, usage: UsageInstance, validation: ValidationInstance, globalMiddleware?: Middleware[]): CommandInstance; -/** Instance of the command module. */ -export interface CommandInstance { - addDirectory(dir: string, context: Context, req: NodeRequireFunction, callerFile: string, opts?: RequireDirectoryOptions): void; - addHandler(handler: CommandHandlerDefinition): void; - addHandler(cmd: string | string[], description: CommandHandler['description'], builder?: CommandBuilderDefinition | CommandBuilder, handler?: CommandHandlerCallback, commandMiddleware?: Middleware[], deprecated?: boolean): void; - cmdToParseOptions(cmdString: string): Positionals; - freeze(): void; - getCommandHandlers(): Dictionary; - getCommands(): string[]; - hasDefaultCommand(): boolean; - reset(): CommandInstance; - runCommand(command: string | null, yargs: YargsInstance, parsed: DetailedArguments, commandIndex?: number): Arguments | Promise; - runDefaultBuilderOn(yargs: YargsInstance): void; - unfreeze(): void; -} -export interface CommandHandlerDefinition extends Partial> { - aliases?: string[]; - builder?: CommandBuilder | CommandBuilderDefinition; - command?: string | string[]; - desc?: CommandHandler['description']; - describe?: CommandHandler['description']; -} -export declare function isCommandHandlerDefinition(cmd: string | string[] | CommandHandlerDefinition): cmd is CommandHandlerDefinition; -export interface CommandBuilderDefinition { - builder?: CommandBuilder; - deprecated?: boolean; - handler: CommandHandlerCallback; - middlewares?: Middleware[]; -} -export declare function isCommandBuilderDefinition(builder?: CommandBuilder | CommandBuilderDefinition): builder is CommandBuilderDefinition; -export interface CommandHandlerCallback { - (argv: Arguments): any; -} -export interface CommandHandler { - builder: CommandBuilder; - demanded: Positional[]; - deprecated?: boolean; - description?: string | false; - handler: CommandHandlerCallback; - middlewares: Middleware[]; - optional: Positional[]; - original: string; -} -export declare type CommandBuilder = CommandBuilderCallback | Dictionary; -interface CommandBuilderCallback { - (y: YargsInstance): YargsInstance | void; -} -export declare function isCommandBuilderCallback(builder: CommandBuilder): builder is CommandBuilderCallback; -interface Positionals extends Pick { - demand: Dictionary; -} -export interface FinishCommandHandler { - (handlerResult: any): any; -} -export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/command.js b/test-eol-project/node_modules/yargs/build/lib/command.js deleted file mode 100644 index d90c4559..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/command.js +++ /dev/null @@ -1,416 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isCommandBuilderCallback = exports.isCommandBuilderDefinition = exports.isCommandHandlerDefinition = exports.command = void 0; -const common_types_1 = require("./common-types"); -const is_promise_1 = require("./is-promise"); -const middleware_1 = require("./middleware"); -const parse_command_1 = require("./parse-command"); -const path = require("path"); -const util_1 = require("util"); -const yargs_1 = require("./yargs"); -const requireDirectory = require("require-directory"); -const whichModule = require("which-module"); -const Parser = require("yargs-parser"); -const DEFAULT_MARKER = /(^\*)|(^\$0)/; -// handles parsing positional arguments, -// and populating argv with said positional -// arguments. -function command(yargs, usage, validation, globalMiddleware = []) { - const self = {}; - let handlers = {}; - let aliasMap = {}; - let defaultCommand; - self.addHandler = function addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { - let aliases = []; - const middlewares = middleware_1.commandMiddlewareFactory(commandMiddleware); - handler = handler || (() => { }); - if (Array.isArray(cmd)) { - aliases = cmd.slice(1); - cmd = cmd[0]; - } - else if (isCommandHandlerDefinition(cmd)) { - let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd); - if (cmd.aliases) - command = [].concat(command).concat(cmd.aliases); - self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); - return; - } - // allow a module to be provided instead of separate builder and handler - if (isCommandBuilderDefinition(builder)) { - self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); - return; - } - // parse positionals out of cmd string - const parsedCommand = parse_command_1.parseCommand(cmd); - // remove positional args from aliases only - aliases = aliases.map(alias => parse_command_1.parseCommand(alias).cmd); - // check for default and filter out '*'' - let isDefault = false; - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true; - return false; - } - return true; - }); - // standardize on $0 for default command. - if (parsedAliases.length === 0 && isDefault) - parsedAliases.push('$0'); - // shift cmd and aliases after filtering out '*' - if (isDefault) { - parsedCommand.cmd = parsedAliases[0]; - aliases = parsedAliases.slice(1); - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); - } - // populate aliasMap - aliases.forEach((alias) => { - aliasMap[alias] = parsedCommand.cmd; - }); - if (description !== false) { - usage.command(cmd, description, isDefault, aliases, deprecated); - } - handlers[parsedCommand.cmd] = { - original: cmd, - description, - handler, - builder: builder || {}, - middlewares, - deprecated, - demanded: parsedCommand.demanded, - optional: parsedCommand.optional - }; - if (isDefault) - defaultCommand = handlers[parsedCommand.cmd]; - }; - self.addDirectory = function addDirectory(dir, context, req, callerFile, opts) { - opts = opts || {}; - // disable recursion to support nested directories of subcommands - if (typeof opts.recurse !== 'boolean') - opts.recurse = false; - // exclude 'json', 'coffee' from require-directory defaults - if (!Array.isArray(opts.extensions)) - opts.extensions = ['js']; - // allow consumer to define their own visitor function - const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o; - // call addHandler via visitor function - opts.visit = function visit(obj, joined, filename) { - const visited = parentVisit(obj, joined, filename); - // allow consumer to skip modules with their own visitor - if (visited) { - // check for cyclic reference - // each command file path should only be seen once per execution - if (~context.files.indexOf(joined)) - return visited; - // keep track of visited files in context.files - context.files.push(joined); - self.addHandler(visited); - } - return visited; - }; - requireDirectory({ require: req, filename: callerFile }, dir, opts); - }; - // lookup module object from require()d command and derive name - // if module was not require()d and no name given, throw error - function moduleName(obj) { - const mod = whichModule(obj); - if (!mod) - throw new Error(`No command name given for module: ${util_1.inspect(obj)}`); - return commandFromFilename(mod.filename); - } - // derive command name from filename - function commandFromFilename(filename) { - return path.basename(filename, path.extname(filename)); - } - function extractDesc({ describe, description, desc }) { - for (const test of [describe, description, desc]) { - if (typeof test === 'string' || test === false) - return test; - common_types_1.assertNotStrictEqual(test, true); - } - return false; - } - self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)); - self.getCommandHandlers = () => handlers; - self.hasDefaultCommand = () => !!defaultCommand; - self.runCommand = function runCommand(command, yargs, parsed, commandIndex) { - let aliases = parsed.aliases; - const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand; - const currentContext = yargs.getContext(); - let numFiles = currentContext.files.length; - const parentCommands = currentContext.commands.slice(); - // what does yargs look like after the builder is run? - let innerArgv = parsed.argv; - let positionalMap = {}; - if (command) { - currentContext.commands.push(command); - currentContext.fullCommands.push(commandHandler.original); - } - const builder = commandHandler.builder; - if (isCommandBuilderCallback(builder)) { - // a function can be provided, which builds - // up a yargs chain and possibly returns it. - const builderOutput = builder(yargs.reset(parsed.aliases)); - const innerYargs = yargs_1.isYargsInstance(builderOutput) ? builderOutput : yargs; - if (shouldUpdateUsage(innerYargs)) { - innerYargs.getUsageInstance().usage(usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex); - aliases = innerYargs.parsed.aliases; - } - else if (isCommandBuilderOptionDefinitions(builder)) { - // as a short hand, an object can instead be provided, specifying - // the options that a command takes. - const innerYargs = yargs.reset(parsed.aliases); - if (shouldUpdateUsage(innerYargs)) { - innerYargs.getUsageInstance().usage(usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - Object.keys(commandHandler.builder).forEach((key) => { - innerYargs.option(key, builder[key]); - }); - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex); - aliases = innerYargs.parsed.aliases; - } - if (!yargs._hasOutput()) { - positionalMap = populatePositionals(commandHandler, innerArgv, currentContext); - } - const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares); - middleware_1.applyMiddleware(innerArgv, yargs, middlewares, true); - // we apply validation post-hoc, so that custom - // checks get passed populated positional arguments. - if (!yargs._hasOutput()) { - yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error, !command); - } - if (commandHandler.handler && !yargs._hasOutput()) { - yargs._setHasOutput(); - // to simplify the parsing of positionals in commands, - // we temporarily populate '--' rather than _, with arguments - const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; - if (!populateDoubleDash) - yargs._copyDoubleDash(innerArgv); - innerArgv = middleware_1.applyMiddleware(innerArgv, yargs, middlewares, false); - let handlerResult; - if (is_promise_1.isPromise(innerArgv)) { - handlerResult = innerArgv.then(argv => commandHandler.handler(argv)); - } - else { - handlerResult = commandHandler.handler(innerArgv); - } - const handlerFinishCommand = yargs.getHandlerFinishCommand(); - if (is_promise_1.isPromise(handlerResult)) { - yargs.getUsageInstance().cacheHelpMessage(); - handlerResult - .then(value => { - if (handlerFinishCommand) { - handlerFinishCommand(value); - } - }) - .catch(error => { - try { - yargs.getUsageInstance().fail(null, error); - } - catch (err) { - // fail's throwing would cause an unhandled rejection. - } - }) - .then(() => { - yargs.getUsageInstance().clearCachedHelpMessage(); - }); - } - else { - if (handlerFinishCommand) { - handlerFinishCommand(handlerResult); - } - } - } - if (command) { - currentContext.commands.pop(); - currentContext.fullCommands.pop(); - } - numFiles = currentContext.files.length - numFiles; - if (numFiles > 0) - currentContext.files.splice(numFiles * -1, numFiles); - return innerArgv; - }; - function shouldUpdateUsage(yargs) { - return !yargs.getUsageInstance().getUsageDisabled() && - yargs.getUsageInstance().getUsage().length === 0; - } - function usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original; - const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c); }); - pc.push(c); - return `$0 ${pc.join(' ')}`; - } - self.runDefaultBuilderOn = function (yargs) { - common_types_1.assertNotStrictEqual(defaultCommand, undefined); - if (shouldUpdateUsage(yargs)) { - // build the root-level command string from the default string. - const commandString = DEFAULT_MARKER.test(defaultCommand.original) - ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); - yargs.getUsageInstance().usage(commandString, defaultCommand.description); - } - const builder = defaultCommand.builder; - if (isCommandBuilderCallback(builder)) { - builder(yargs); - } - else { - Object.keys(builder).forEach((key) => { - yargs.option(key, builder[key]); - }); - } - }; - // transcribe all positional arguments "command [apple]" - // onto argv. - function populatePositionals(commandHandler, argv, context) { - argv._ = argv._.slice(context.commands.length); // nuke the current commands - const demanded = commandHandler.demanded.slice(0); - const optional = commandHandler.optional.slice(0); - const positionalMap = {}; - validation.positionalCount(demanded.length, argv._.length); - while (demanded.length) { - const demand = demanded.shift(); - populatePositional(demand, argv, positionalMap); - } - while (optional.length) { - const maybe = optional.shift(); - populatePositional(maybe, argv, positionalMap); - } - argv._ = context.commands.concat(argv._); - postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)); - return positionalMap; - } - function populatePositional(positional, argv, positionalMap) { - const cmd = positional.cmd[0]; - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String); - } - else { - if (argv._.length) - positionalMap[cmd] = [String(argv._.shift())]; - } - } - // we run yargs-parser against the positional arguments - // applying the same parsing logic used for flags. - function postProcessPositionals(argv, positionalMap, parseOptions) { - // combine the parsing hints we've inferred from the command - // string with explicitly configured parsing hints. - const options = Object.assign({}, yargs.getOptions()); - options.default = Object.assign(parseOptions.default, options.default); - for (const key of Object.keys(parseOptions.alias)) { - options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); - } - options.array = options.array.concat(parseOptions.array); - delete options.config; // don't load config when processing positionals. - const unparsed = []; - Object.keys(positionalMap).forEach((key) => { - positionalMap[key].map((value) => { - if (options.configuration['unknown-options-as-args']) - options.key[key] = true; - unparsed.push(`--${key}`); - unparsed.push(value); - }); - }); - // short-circuit parse. - if (!unparsed.length) - return; - const config = Object.assign({}, options.configuration, { - 'populate--': true - }); - const parsed = Parser.detailed(unparsed, Object.assign({}, options, { - configuration: config - })); - if (parsed.error) { - yargs.getUsageInstance().fail(parsed.error.message, parsed.error); - } - else { - // only copy over positional keys (don't overwrite - // flag arguments that were already parsed). - const positionalKeys = Object.keys(positionalMap); - Object.keys(positionalMap).forEach((key) => { - positionalKeys.push(...parsed.aliases[key]); - }); - Object.keys(parsed.argv).forEach((key) => { - if (positionalKeys.indexOf(key) !== -1) { - // any new aliases need to be placed in positionalMap, which - // is used for validation. - if (!positionalMap[key]) - positionalMap[key] = parsed.argv[key]; - argv[key] = parsed.argv[key]; - } - }); - } - } - self.cmdToParseOptions = function (cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {} - }; - const parsed = parse_command_1.parseCommand(cmdString); - parsed.demanded.forEach((d) => { - const [cmd, ...aliases] = d.cmd; - if (d.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - parseOptions.demand[cmd] = true; - }); - parsed.optional.forEach((o) => { - const [cmd, ...aliases] = o.cmd; - if (o.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - }); - return parseOptions; - }; - self.reset = () => { - handlers = {}; - aliasMap = {}; - defaultCommand = undefined; - return self; - }; - // used by yargs.parse() to freeze - // the state of commands such that - // we can apply .parse() multiple times - // with the same yargs instance. - const frozens = []; - self.freeze = () => { - frozens.push({ - handlers, - aliasMap, - defaultCommand - }); - }; - self.unfreeze = () => { - const frozen = frozens.pop(); - common_types_1.assertNotStrictEqual(frozen, undefined); - ({ - handlers, - aliasMap, - defaultCommand - } = frozen); - }; - return self; -} -exports.command = command; -function isCommandHandlerDefinition(cmd) { - return typeof cmd === 'object'; -} -exports.isCommandHandlerDefinition = isCommandHandlerDefinition; -function isCommandBuilderDefinition(builder) { - return typeof builder === 'object' && - !!builder.builder && - typeof builder.handler === 'function'; -} -exports.isCommandBuilderDefinition = isCommandBuilderDefinition; -function isCommandBuilderCallback(builder) { - return typeof builder === 'function'; -} -exports.isCommandBuilderCallback = isCommandBuilderCallback; -function isCommandBuilderOptionDefinitions(builder) { - return typeof builder === 'object'; -} diff --git a/test-eol-project/node_modules/yargs/build/lib/common-types.d.ts b/test-eol-project/node_modules/yargs/build/lib/common-types.d.ts deleted file mode 100644 index f83c0dd0..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/common-types.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * An object whose all properties have the same type. - */ -export declare type Dictionary = { - [key: string]: T; -}; -/** - * Returns the keys of T that match Dictionary and are not arrays. - */ -export declare type DictionaryKeyof = Exclude>, KeyOf>; -/** - * Returns the keys of T that match U. - */ -export declare type KeyOf = Exclude<{ - [K in keyof T]: T[K] extends U ? K : never; -}[keyof T], undefined>; -/** - * An array whose first element is not undefined. - */ -export declare type NotEmptyArray = [T, ...T[]]; -/** - * Returns the type of a Dictionary or array values. - */ -export declare type ValueOf = T extends (infer U)[] ? U : T[keyof T]; -/** - * Typing wrapper around assert.notStrictEqual() - */ -export declare function assertNotStrictEqual(actual: T | N, expected: N, message?: string | Error): asserts actual is Exclude; -/** - * Asserts actual is a single key, not a key array or a key map. - */ -export declare function assertSingleKey(actual: string | string[] | Dictionary): asserts actual is string; -/** - * Typing wrapper around Object.keys() - */ -export declare function objectKeys(object: T): (keyof T)[]; diff --git a/test-eol-project/node_modules/yargs/build/lib/common-types.js b/test-eol-project/node_modules/yargs/build/lib/common-types.js deleted file mode 100644 index 3064cbf4..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/common-types.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.objectKeys = exports.assertSingleKey = exports.assertNotStrictEqual = void 0; -const assert_1 = require("assert"); -/** - * Typing wrapper around assert.notStrictEqual() - */ -function assertNotStrictEqual(actual, expected, message) { - assert_1.notStrictEqual(actual, expected, message); -} -exports.assertNotStrictEqual = assertNotStrictEqual; -/** - * Asserts actual is a single key, not a key array or a key map. - */ -function assertSingleKey(actual) { - assert_1.strictEqual(typeof actual, 'string'); -} -exports.assertSingleKey = assertSingleKey; -/** - * Typing wrapper around Object.keys() - */ -function objectKeys(object) { - return Object.keys(object); -} -exports.objectKeys = objectKeys; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts b/test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts deleted file mode 100644 index 67bcd303..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/completion-templates.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const completionShTemplate = "###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word=\"${COMP_WORDS[COMP_CWORD]}\"\n args=(\"${COMP_WORDS[@]}\")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions \"${args[@]}\")\n\n COMPREPLY=( $(compgen -W \"${type_list}\" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o default -F _yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n"; -export declare const completionZshTemplate = "###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc\n# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local reply\n local si=$IFS\n IFS=$'\n' reply=($(COMP_CWORD=\"$((CURRENT-1))\" COMP_LINE=\"$BUFFER\" COMP_POINT=\"$CURSOR\" {{app_path}} --get-yargs-completions \"${words[@]}\"))\n IFS=$si\n _describe 'values' reply\n}\ncompdef _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n"; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion-templates.js b/test-eol-project/node_modules/yargs/build/lib/completion-templates.js deleted file mode 100644 index 3ee0e068..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/completion-templates.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.completionZshTemplate = exports.completionShTemplate = void 0; -exports.completionShTemplate = `###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_yargs_completions() -{ - local cur_word args type_list - - cur_word="\${COMP_WORDS[COMP_CWORD]}" - args=("\${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") - - COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ \${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=() - fi - - return 0 -} -complete -o default -F _yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; -exports.completionZshTemplate = `###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc -# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local reply - local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) - IFS=$si - _describe 'values' reply -} -compdef _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion.d.ts b/test-eol-project/node_modules/yargs/build/lib/completion.d.ts deleted file mode 100644 index 176a91b5..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/completion.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { CommandInstance } from './command'; -import { UsageInstance } from './usage'; -import { YargsInstance } from './yargs'; -import { Arguments, DetailedArguments } from 'yargs-parser'; -export declare function completion(yargs: YargsInstance, usage: UsageInstance, command: CommandInstance): CompletionInstance; -/** Instance of the completion module. */ -export interface CompletionInstance { - completionKey: string; - generateCompletionScript($0: string, cmd: string): string; - getCompletion(args: string[], done: (completions: string[]) => any): any; - registerFunction(fn: CompletionFunction): void; - setParsed(parsed: DetailedArguments): void; -} -export declare type CompletionFunction = SyncCompletionFunction | AsyncCompletionFunction; -interface SyncCompletionFunction { - (current: string, argv: Arguments): string[] | Promise; -} -interface AsyncCompletionFunction { - (current: string, argv: Arguments, done: (completions: string[]) => any): any; -} -export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/completion.js b/test-eol-project/node_modules/yargs/build/lib/completion.js deleted file mode 100644 index d65925ab..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/completion.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.completion = void 0; -const command_1 = require("./command"); -const templates = require("./completion-templates"); -const is_promise_1 = require("./is-promise"); -const parse_command_1 = require("./parse-command"); -const path = require("path"); -const common_types_1 = require("./common-types"); -// add bash completions to your -// yargs-powered applications. -function completion(yargs, usage, command) { - const self = { - completionKey: 'get-yargs-completions' - }; - let aliases; - self.setParsed = function setParsed(parsed) { - aliases = parsed.aliases; - }; - const zshShell = (process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1) || - (process.env.ZSH_NAME && process.env.ZSH_NAME.indexOf('zsh') !== -1); - // get a list of completion commands. - // 'args' is the array of strings from the line to be completed - self.getCompletion = function getCompletion(args, done) { - const completions = []; - const current = args.length ? args[args.length - 1] : ''; - const argv = yargs.parse(args, true); - const parentCommands = yargs.getContext().commands; - // a custom completion function can be provided - // to completion(). - function runCompletionFunction(argv) { - common_types_1.assertNotStrictEqual(completionFunction, null); - if (isSyncCompletionFunction(completionFunction)) { - const result = completionFunction(current, argv); - // promise based completion function. - if (is_promise_1.isPromise(result)) { - return result.then((list) => { - process.nextTick(() => { done(list); }); - }).catch((err) => { - process.nextTick(() => { throw err; }); - }); - } - // synchronous completion function. - return done(result); - } - else { - // asynchronous completion function - return completionFunction(current, argv, (completions) => { - done(completions); - }); - } - } - if (completionFunction) { - return is_promise_1.isPromise(argv) ? argv.then(runCompletionFunction) : runCompletionFunction(argv); - } - const handlers = command.getCommandHandlers(); - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder; - if (command_1.isCommandBuilderCallback(builder)) { - const y = yargs.reset(); - builder(y); - return y.argv; - } - } - } - if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) { - usage.getCommands().forEach((usageCommand) => { - const commandName = parse_command_1.parseCommand(usageCommand[0]).cmd; - if (args.indexOf(commandName) === -1) { - if (!zshShell) { - completions.push(commandName); - } - else { - const desc = usageCommand[1] || ''; - completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); - } - } - }); - } - if (current.match(/^-/) || (current === '' && completions.length === 0)) { - const descs = usage.getDescriptions(); - const options = yargs.getOptions(); - Object.keys(options.key).forEach((key) => { - const negable = !!options.configuration['boolean-negation'] && options.boolean.includes(key); - // If the key and its aliases aren't in 'args', add the key to 'completions' - let keyAndAliases = [key].concat(aliases[key] || []); - if (negable) - keyAndAliases = keyAndAliases.concat(keyAndAliases.map(key => `no-${key}`)); - function completeOptionKey(key) { - const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1); - if (notInArgs) { - const startsByTwoDashes = (s) => /^--/.test(s); - const isShortOption = (s) => /^[^0-9]$/.test(s); - const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; - if (!zshShell) { - completions.push(dashes + key); - } - else { - const desc = descs[key] || ''; - completions.push(dashes + `${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`); - } - } - } - completeOptionKey(key); - if (negable && !!options.default[key]) - completeOptionKey(`no-${key}`); - }); - } - done(completions); - }; - // generate the completion script to add to your .bashrc. - self.generateCompletionScript = function generateCompletionScript($0, cmd) { - let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate; - const name = path.basename($0); - // add ./to applications not yet installed as bin. - if ($0.match(/\.js$/)) - $0 = `./${$0}`; - script = script.replace(/{{app_name}}/g, name); - script = script.replace(/{{completion_command}}/g, cmd); - return script.replace(/{{app_path}}/g, $0); - }; - // register a function to perform your own custom - // completions., this function can be either - // synchrnous or asynchronous. - let completionFunction = null; - self.registerFunction = (fn) => { - completionFunction = fn; - }; - return self; -} -exports.completion = completion; -function isSyncCompletionFunction(completionFunction) { - return completionFunction.length < 3; -} diff --git a/test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts b/test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts deleted file mode 100644 index 19b5566b..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/is-promise.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function isPromise(maybePromise: T | Promise): maybePromise is Promise; diff --git a/test-eol-project/node_modules/yargs/build/lib/is-promise.js b/test-eol-project/node_modules/yargs/build/lib/is-promise.js deleted file mode 100644 index c24f9a86..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/is-promise.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isPromise = void 0; -function isPromise(maybePromise) { - return !!maybePromise && - !!maybePromise.then && - (typeof maybePromise.then === 'function'); -} -exports.isPromise = isPromise; diff --git a/test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts b/test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts deleted file mode 100644 index 08b6b7f5..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/levenshtein.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function levenshtein(a: string, b: string): number; diff --git a/test-eol-project/node_modules/yargs/build/lib/levenshtein.js b/test-eol-project/node_modules/yargs/build/lib/levenshtein.js deleted file mode 100644 index 84c0831f..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/levenshtein.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -/* -Copyright (c) 2011 Andrei Mackenzie - -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. -*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.levenshtein = void 0; -// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. -// gist, which can be found here: https://gist.github.com/andrei-m/982927 -// Compute the edit distance between the two given strings -function levenshtein(a, b) { - if (a.length === 0) - return b.length; - if (b.length === 0) - return a.length; - const matrix = []; - // increment along the first column of each row - let i; - for (i = 0; i <= b.length; i++) { - matrix[i] = [i]; - } - // increment each column in the first row - let j; - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j; - } - // Fill in the rest of the matrix - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1]; - } - else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution - Math.min(matrix[i][j - 1] + 1, // insertion - matrix[i - 1][j] + 1)); // deletion - } - } - } - return matrix[b.length][a.length]; -} -exports.levenshtein = levenshtein; diff --git a/test-eol-project/node_modules/yargs/build/lib/middleware.d.ts b/test-eol-project/node_modules/yargs/build/lib/middleware.d.ts deleted file mode 100644 index 8fa7c34f..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/middleware.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { YargsInstance, Arguments } from './yargs'; -export declare function globalMiddlewareFactory(globalMiddleware: Middleware[], context: T): (callback: MiddlewareCallback | MiddlewareCallback[], applyBeforeValidation?: boolean) => T; -export declare function commandMiddlewareFactory(commandMiddleware?: MiddlewareCallback[]): Middleware[]; -export declare function applyMiddleware(argv: Arguments | Promise, yargs: YargsInstance, middlewares: Middleware[], beforeValidation: boolean): Arguments | Promise; -export interface MiddlewareCallback { - (argv: Arguments, yargs: YargsInstance): Partial | Promise>; -} -export interface Middleware extends MiddlewareCallback { - applyBeforeValidation: boolean; -} diff --git a/test-eol-project/node_modules/yargs/build/lib/middleware.js b/test-eol-project/node_modules/yargs/build/lib/middleware.js deleted file mode 100644 index e93b6d27..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/middleware.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.applyMiddleware = exports.commandMiddlewareFactory = exports.globalMiddlewareFactory = void 0; -const argsert_1 = require("./argsert"); -const is_promise_1 = require("./is-promise"); -function globalMiddlewareFactory(globalMiddleware, context) { - return function (callback, applyBeforeValidation = false) { - argsert_1.argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length); - if (Array.isArray(callback)) { - for (let i = 0; i < callback.length; i++) { - if (typeof callback[i] !== 'function') { - throw Error('middleware must be a function'); - } - callback[i].applyBeforeValidation = applyBeforeValidation; - } - Array.prototype.push.apply(globalMiddleware, callback); - } - else if (typeof callback === 'function') { - callback.applyBeforeValidation = applyBeforeValidation; - globalMiddleware.push(callback); - } - return context; - }; -} -exports.globalMiddlewareFactory = globalMiddlewareFactory; -function commandMiddlewareFactory(commandMiddleware) { - if (!commandMiddleware) - return []; - return commandMiddleware.map(middleware => { - middleware.applyBeforeValidation = false; - return middleware; - }); -} -exports.commandMiddlewareFactory = commandMiddlewareFactory; -function applyMiddleware(argv, yargs, middlewares, beforeValidation) { - const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true'); - return middlewares - .reduce((acc, middleware) => { - if (middleware.applyBeforeValidation !== beforeValidation) { - return acc; - } - if (is_promise_1.isPromise(acc)) { - return acc - .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) - .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); - } - else { - const result = middleware(acc, yargs); - if (beforeValidation && is_promise_1.isPromise(result)) - throw beforeValidationError; - return is_promise_1.isPromise(result) - ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) - : Object.assign(acc, result); - } - }, argv); -} -exports.applyMiddleware = applyMiddleware; diff --git a/test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts b/test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts deleted file mode 100644 index 031ae289..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/obj-filter.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function objFilter(original?: T, filter?: (k: keyof T, v: T[keyof T]) => boolean): T; diff --git a/test-eol-project/node_modules/yargs/build/lib/obj-filter.js b/test-eol-project/node_modules/yargs/build/lib/obj-filter.js deleted file mode 100644 index 790f9478..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/obj-filter.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.objFilter = void 0; -const common_types_1 = require("./common-types"); -function objFilter(original = {}, filter = () => true) { - const obj = {}; - common_types_1.objectKeys(original).forEach((key) => { - if (filter(key, original[key])) { - obj[key] = original[key]; - } - }); - return obj; -} -exports.objFilter = objFilter; diff --git a/test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts b/test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts deleted file mode 100644 index fc578369..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/parse-command.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NotEmptyArray } from './common-types'; -export declare function parseCommand(cmd: string): ParsedCommand; -export interface ParsedCommand { - cmd: string; - demanded: Positional[]; - optional: Positional[]; -} -export interface Positional { - cmd: NotEmptyArray; - variadic: boolean; -} diff --git a/test-eol-project/node_modules/yargs/build/lib/parse-command.js b/test-eol-project/node_modules/yargs/build/lib/parse-command.js deleted file mode 100644 index aaf23272..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/parse-command.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseCommand = void 0; -function parseCommand(cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); - const bregex = /\.*[\][<>]/g; - const firstCommand = splitCommand.shift(); - if (!firstCommand) - throw new Error(`No command found in: ${cmd}`); - const parsedCommand = { - cmd: firstCommand.replace(bregex, ''), - demanded: [], - optional: [] - }; - splitCommand.forEach((cmd, i) => { - let variadic = false; - cmd = cmd.replace(/\s/g, ''); - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) - variadic = true; - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic - }); - } - else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic - }); - } - }); - return parsedCommand; -} -exports.parseCommand = parseCommand; diff --git a/test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts b/test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts deleted file mode 100644 index 18fd43b9..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/process-argv.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function getProcessArgvWithoutBin(): string[]; -export declare function getProcessArgvBin(): string; diff --git a/test-eol-project/node_modules/yargs/build/lib/process-argv.js b/test-eol-project/node_modules/yargs/build/lib/process-argv.js deleted file mode 100644 index a9201dd7..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/process-argv.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getProcessArgvBin = exports.getProcessArgvWithoutBin = void 0; -function getProcessArgvBinIndex() { - // The binary name is the first command line argument for: - // - bundled Electron apps: bin argv1 argv2 ... argvn - if (isBundledElectronApp()) - return 0; - // or the second one (default) for: - // - standard node apps: node bin.js argv1 argv2 ... argvn - // - unbundled Electron apps: electron bin.js argv1 arg2 ... argvn - return 1; -} -function isBundledElectronApp() { - // process.defaultApp is either set by electron in an electron unbundled app, or undefined - // see https://github.com/electron/electron/blob/master/docs/api/process.md#processdefaultapp-readonly - return isElectronApp() && !process.defaultApp; -} -function isElectronApp() { - // process.versions.electron is either set by electron, or undefined - // see https://github.com/electron/electron/blob/master/docs/api/process.md#processversionselectron-readonly - return !!process.versions.electron; -} -function getProcessArgvWithoutBin() { - return process.argv.slice(getProcessArgvBinIndex() + 1); -} -exports.getProcessArgvWithoutBin = getProcessArgvWithoutBin; -function getProcessArgvBin() { - return process.argv[getProcessArgvBinIndex()]; -} -exports.getProcessArgvBin = getProcessArgvBin; diff --git a/test-eol-project/node_modules/yargs/build/lib/usage.d.ts b/test-eol-project/node_modules/yargs/build/lib/usage.d.ts deleted file mode 100644 index d9dd1fa7..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/usage.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Dictionary } from './common-types'; -import { YargsInstance } from './yargs'; -import { YError } from './yerror'; -import { Y18N } from 'y18n'; -export declare function usage(yargs: YargsInstance, y18n: Y18N): UsageInstance; -/** Instance of the usage module. */ -export interface UsageInstance { - cacheHelpMessage(): void; - clearCachedHelpMessage(): void; - command(cmd: string, description: string | undefined, isDefault: boolean, aliases: string[], deprecated?: boolean): void; - deferY18nLookup(str: string): string; - describe(keys: string | string[] | Dictionary, desc?: string): void; - epilog(msg: string): void; - example(cmd: string, description?: string): void; - fail(msg?: string | null, err?: YError | string): void; - failFn(f: FailureFunction): void; - freeze(): void; - functionDescription(fn: { - name?: string; - }): string; - getCommands(): [string, string, boolean, string[], boolean][]; - getDescriptions(): Dictionary; - getPositionalGroupName(): string; - getUsage(): [string, string][]; - getUsageDisabled(): boolean; - help(): string; - reset(localLookup: Dictionary): UsageInstance; - showHelp(level: 'error' | 'log' | ((message: string) => void)): void; - showHelpOnFail(enabled?: boolean | string, message?: string): UsageInstance; - showVersion(): void; - stringifiedValues(values?: any[], separator?: string): string; - unfreeze(): void; - usage(msg: string | null, description?: string | false): UsageInstance; - version(ver: any): void; - wrap(cols: number | null | undefined): void; -} -export interface FailureFunction { - (msg: string | undefined | null, err: YError | string | undefined, usage: UsageInstance): void; -} -export interface FrozenUsageInstance { - failMessage: string | undefined | null; - failureOutput: boolean; - usages: [string, string][]; - usageDisabled: boolean; - epilogs: string[]; - examples: [string, string][]; - commands: [string, string, boolean, string[], boolean][]; - descriptions: Dictionary; -} diff --git a/test-eol-project/node_modules/yargs/build/lib/usage.js b/test-eol-project/node_modules/yargs/build/lib/usage.js deleted file mode 100644 index 73f7b244..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/usage.js +++ /dev/null @@ -1,540 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.usage = void 0; -// this file handles outputting usage instructions, -// failures, etc. keeps logging in one place. -const common_types_1 = require("./common-types"); -const obj_filter_1 = require("./obj-filter"); -const path = require("path"); -const yerror_1 = require("./yerror"); -const decamelize = require("decamelize"); -const setBlocking = require("set-blocking"); -const stringWidth = require("string-width"); -function usage(yargs, y18n) { - const __ = y18n.__; - const self = {}; - // methods for ouputting/building failure message. - const fails = []; - self.failFn = function failFn(f) { - fails.push(f); - }; - let failMessage = null; - let showHelpOnFail = true; - self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { - function parseFunctionArgs() { - return typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; - } - const [enabled, message] = parseFunctionArgs(); - failMessage = message; - showHelpOnFail = enabled; - return self; - }; - let failureOutput = false; - self.fail = function fail(msg, err) { - const logger = yargs._getLoggerInstance(); - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - fails[i](msg, err, self); - } - } - else { - if (yargs.getExitProcess()) - setBlocking(true); - // don't output failure message more than once - if (!failureOutput) { - failureOutput = true; - if (showHelpOnFail) { - yargs.showHelp('error'); - logger.error(); - } - if (msg || err) - logger.error(msg || err); - if (failMessage) { - if (msg || err) - logger.error(''); - logger.error(failMessage); - } - } - err = err || new yerror_1.YError(msg); - if (yargs.getExitProcess()) { - return yargs.exit(1); - } - else if (yargs._hasParseCallback()) { - return yargs.exit(1, err); - } - else { - throw err; - } - } - }; - // methods for ouputting/building help (usage) message. - let usages = []; - let usageDisabled = false; - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true; - usages = []; - return self; - } - usageDisabled = false; - usages.push([msg, description || '']); - return self; - }; - self.getUsage = () => { - return usages; - }; - self.getUsageDisabled = () => { - return usageDisabled; - }; - self.getPositionalGroupName = () => { - return __('Positionals:'); - }; - let examples = []; - self.example = (cmd, description) => { - examples.push([cmd, description || '']); - }; - let commands = []; - self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { - // the last default wins, so cancel out any previously set default - if (isDefault) { - commands = commands.map((cmdArray) => { - cmdArray[2] = false; - return cmdArray; - }); - } - commands.push([cmd, description || '', isDefault, aliases, deprecated]); - }; - self.getCommands = () => commands; - let descriptions = {}; - self.describe = function describe(keyOrKeys, desc) { - if (Array.isArray(keyOrKeys)) { - keyOrKeys.forEach((k) => { - self.describe(k, desc); - }); - } - else if (typeof keyOrKeys === 'object') { - Object.keys(keyOrKeys).forEach((k) => { - self.describe(k, keyOrKeys[k]); - }); - } - else { - descriptions[keyOrKeys] = desc; - } - }; - self.getDescriptions = () => descriptions; - let epilogs = []; - self.epilog = (msg) => { - epilogs.push(msg); - }; - let wrapSet = false; - let wrap; - self.wrap = (cols) => { - wrapSet = true; - wrap = cols; - }; - function getWrap() { - if (!wrapSet) { - wrap = windowWidth(); - wrapSet = true; - } - return wrap; - } - const deferY18nLookupPrefix = '__yargsString__:'; - self.deferY18nLookup = str => deferY18nLookupPrefix + str; - self.help = function help() { - if (cachedHelpMessage) - return cachedHelpMessage; - normalizeAliases(); - // handle old demanded API - const base$0 = yargs.customScriptName ? yargs.$0 : path.basename(yargs.$0); - const demandedOptions = yargs.getDemandedOptions(); - const demandedCommands = yargs.getDemandedCommands(); - const deprecatedOptions = yargs.getDeprecatedOptions(); - const groups = yargs.getGroups(); - const options = yargs.getOptions(); - let keys = []; - keys = keys.concat(Object.keys(descriptions)); - keys = keys.concat(Object.keys(demandedOptions)); - keys = keys.concat(Object.keys(demandedCommands)); - keys = keys.concat(Object.keys(options.default)); - keys = keys.filter(filterHiddenOptions); - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') - acc[key] = true; - return acc; - }, {})); - const theWrap = getWrap(); - const ui = require('cliui')({ - width: theWrap, - wrap: !!theWrap - }); - // the usage string. - if (!usageDisabled) { - if (usages.length) { - // user-defined usage. - usages.forEach((usage) => { - ui.div(`${usage[0].replace(/\$0/g, base$0)}`); - if (usage[1]) { - ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); - } - }); - ui.div(); - } - else if (commands.length) { - let u = null; - // demonstrate how commands are used. - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n`; - } - else { - u = `${base$0} [${__('command')}]\n`; - } - ui.div(`${u}`); - } - } - // your application's commands, i.e., non-option - // arguments populated in '_'. - if (commands.length) { - ui.div(__('Commands:')); - const context = yargs.getContext(); - const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : ''; - if (yargs.getParserConfiguration()['sort-commands'] === true) { - commands = commands.sort((a, b) => a[0].localeCompare(b[0])); - } - commands.forEach((command) => { - const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; // drop $0 from default commands. - ui.span({ - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 - }, { text: command[1] }); - const hints = []; - if (command[2]) - hints.push(`[${__('default')}]`); - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); - } - if (command[4]) { - if (typeof command[4] === 'string') { - hints.push(`[${__('deprecated: %s', command[4])}]`); - } - else { - hints.push(`[${__('deprecated')}]`); - } - } - if (hints.length) { - ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' }); - } - else { - ui.div(); - } - }); - ui.div(); - } - // perform some cleanup on the keys array, making it - // only include top-level keys not their aliases. - const aliasKeys = (Object.keys(options.alias) || []) - .concat(Object.keys(yargs.parsed.newAliases) || []); - keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); - // populate 'Options:' group with any keys that have not - // explicitly had a group set. - const defaultGroup = __('Options:'); - if (!groups[defaultGroup]) - groups[defaultGroup] = []; - addUngroupedKeys(keys, options.alias, groups, defaultGroup); - // display 'Options:' table along with any custom tables: - Object.keys(groups).forEach((groupName) => { - if (!groups[groupName].length) - return; - // if we've grouped the key 'f', but 'f' aliases 'foobar', - // normalizedKeys should contain only 'foobar'. - const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => { - if (~aliasKeys.indexOf(key)) - return key; - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if (~(options.alias[aliasKey] || []).indexOf(key)) - return aliasKey; - } - return key; - }); - if (normalizedKeys.length < 1) - return; - ui.div(groupName); - // actually generate the switches string --foo, -f, --bar. - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [key].concat(options.alias[key] || []) - .map(sw => { - // for the special positional group don't - // add '--' or '-' prefix. - if (groupName === self.getPositionalGroupName()) - return sw; - else { - return ( - // matches yargs-parser logic in which single-digits - // aliases declared with a boolean type are now valid - /^[0-9]$/.test(sw) - ? ~options.boolean.indexOf(key) ? '-' : '--' - : sw.length > 1 ? '--' : '-') + sw; - } - }) - .join(', '); - return acc; - }, {}); - normalizedKeys.forEach((key) => { - const kswitch = switches[key]; - let desc = descriptions[key] || ''; - let type = null; - if (~desc.lastIndexOf(deferY18nLookupPrefix)) - desc = __(desc.substring(deferY18nLookupPrefix.length)); - if (~options.boolean.indexOf(key)) - type = `[${__('boolean')}]`; - if (~options.count.indexOf(key)) - type = `[${__('count')}]`; - if (~options.string.indexOf(key)) - type = `[${__('string')}]`; - if (~options.normalize.indexOf(key)) - type = `[${__('string')}]`; - if (~options.array.indexOf(key)) - type = `[${__('array')}]`; - if (~options.number.indexOf(key)) - type = `[${__('number')}]`; - const deprecatedExtra = (deprecated) => typeof deprecated === 'string' - ? `[${__('deprecated: %s', deprecated)}]` - : `[${__('deprecated')}]`; - const extra = [ - (key in deprecatedOptions) ? deprecatedExtra(deprecatedOptions[key]) : null, - type, - (key in demandedOptions) ? `[${__('required')}]` : null, - options.choices && options.choices[key] ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` : null, - defaultString(options.default[key], options.defaultDescription[key]) - ].filter(Boolean).join(' '); - ui.span({ text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 }, desc); - if (extra) - ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); - else - ui.div(); - }); - ui.div(); - }); - // describe some common use-cases for your application. - if (examples.length) { - ui.div(__('Examples:')); - examples.forEach((example) => { - example[0] = example[0].replace(/\$0/g, base$0); - }); - examples.forEach((example) => { - if (example[1] === '') { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2] - }); - } - else { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4 - }, { - text: example[1] - }); - } - }); - ui.div(); - } - // the usage string. - if (epilogs.length > 0) { - const e = epilogs.map(epilog => epilog.replace(/\$0/g, base$0)).join('\n'); - ui.div(`${e}\n`); - } - // Remove the trailing white spaces - return ui.toString().replace(/\s*$/, ''); - }; - // return the maximum width of a string - // in the left-hand column of a table. - function maxWidth(table, theWrap, modifier) { - let width = 0; - // table might be of the form [leftColumn], - // or {key: leftColumn} - if (!Array.isArray(table)) { - table = Object.values(table).map(v => [v]); - } - table.forEach((v) => { - width = Math.max(stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]), width); - }); - // if we've enabled 'wrap' we should limit - // the max-width of the left-column. - if (theWrap) - width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); - return width; - } - // make sure any options set for aliases, - // are copied to the keys being aliased. - function normalizeAliases() { - // handle old demanded API - const demandedOptions = yargs.getDemandedOptions(); - const options = yargs.getOptions(); - (Object.keys(options.alias) || []).forEach((key) => { - options.alias[key].forEach((alias) => { - // copy descriptions. - if (descriptions[alias]) - self.describe(key, descriptions[alias]); - // copy demanded. - if (alias in demandedOptions) - yargs.demandOption(key, demandedOptions[alias]); - // type messages. - if (~options.boolean.indexOf(alias)) - yargs.boolean(key); - if (~options.count.indexOf(alias)) - yargs.count(key); - if (~options.string.indexOf(alias)) - yargs.string(key); - if (~options.normalize.indexOf(alias)) - yargs.normalize(key); - if (~options.array.indexOf(alias)) - yargs.array(key); - if (~options.number.indexOf(alias)) - yargs.number(key); - }); - }); - } - // if yargs is executing an async handler, we take a snapshot of the - // help message to display on failure: - let cachedHelpMessage; - self.cacheHelpMessage = function () { - cachedHelpMessage = this.help(); - }; - // however this snapshot must be cleared afterwards - // not to be be used by next calls to parse - self.clearCachedHelpMessage = function () { - cachedHelpMessage = undefined; - }; - // given a set of keys, place any keys that are - // ungrouped under the 'Options:' grouping. - function addUngroupedKeys(keys, aliases, groups, defaultGroup) { - let groupedKeys = []; - let toCheck = null; - Object.keys(groups).forEach((group) => { - groupedKeys = groupedKeys.concat(groups[group]); - }); - keys.forEach((key) => { - toCheck = [key].concat(aliases[key]); - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key); - } - }); - return groupedKeys; - } - function filterHiddenOptions(key) { - return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt]; - } - self.showHelp = (level) => { - const logger = yargs._getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(self.help()); - }; - self.functionDescription = (fn) => { - const description = fn.name ? decamelize(fn.name, '-') : __('generated-value'); - return ['(', description, ')'].join(''); - }; - self.stringifiedValues = function stringifiedValues(values, separator) { - let string = ''; - const sep = separator || ', '; - const array = [].concat(values); - if (!values || !array.length) - return string; - array.forEach((value) => { - if (string.length) - string += sep; - string += JSON.stringify(value); - }); - return string; - }; - // format the default-value-string displayed in - // the right-hand column. - function defaultString(value, defaultDescription) { - let string = `[${__('default:')} `; - if (value === undefined && !defaultDescription) - return null; - if (defaultDescription) { - string += defaultDescription; - } - else { - switch (typeof value) { - case 'string': - string += `"${value}"`; - break; - case 'object': - string += JSON.stringify(value); - break; - default: - string += value; - } - } - return `${string}]`; - } - // guess the width of the console window, max-width 80. - function windowWidth() { - const maxWidth = 80; - // CI is not a TTY - /* c8 ignore next 2 */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return Math.min(maxWidth, process.stdout.columns); - } - else { - return maxWidth; - } - } - // logic for displaying application version. - let version = null; - self.version = (ver) => { - version = ver; - }; - self.showVersion = () => { - const logger = yargs._getLoggerInstance(); - logger.log(version); - }; - self.reset = function reset(localLookup) { - // do not reset wrap here - // do not reset fails here - failMessage = null; - failureOutput = false; - usages = []; - usageDisabled = false; - epilogs = []; - examples = []; - commands = []; - descriptions = obj_filter_1.objFilter(descriptions, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - common_types_1.assertNotStrictEqual(frozen, undefined); - ({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions - } = frozen); - }; - return self; -} -exports.usage = usage; diff --git a/test-eol-project/node_modules/yargs/build/lib/validation.d.ts b/test-eol-project/node_modules/yargs/build/lib/validation.d.ts deleted file mode 100644 index e2d78548..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/validation.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Dictionary } from './common-types'; -import { UsageInstance } from './usage'; -import { YargsInstance, Arguments } from './yargs'; -import { DetailedArguments } from 'yargs-parser'; -import { Y18N } from 'y18n'; -export declare function validation(yargs: YargsInstance, usage: UsageInstance, y18n: Y18N): ValidationInstance; -/** Instance of the validation module. */ -export interface ValidationInstance { - check(f: CustomCheck['func'], global: boolean): void; - conflicting(argv: Arguments): void; - conflicts(key: string | Dictionary, value?: string | string[]): void; - customChecks(argv: Arguments, aliases: DetailedArguments['aliases']): void; - freeze(): void; - getConflicting(): Dictionary<(string | undefined)[]>; - getImplied(): Dictionary; - implications(argv: Arguments): void; - implies(key: string | Dictionary, value?: KeyOrPos | KeyOrPos[]): void; - isValidAndSomeAliasIsNotNew(key: string, aliases: DetailedArguments['aliases']): boolean; - limitedChoices(argv: Arguments): void; - nonOptionCount(argv: Arguments): void; - positionalCount(required: number, observed: number): void; - recommendCommands(cmd: string, potentialCommands: string[]): void; - requiredArguments(argv: Arguments): void; - reset(localLookup: Dictionary): ValidationInstance; - unfreeze(): void; - unknownArguments(argv: Arguments, aliases: DetailedArguments['aliases'], positionalMap: Dictionary, isDefaultCommand: boolean): void; - unknownCommands(argv: Arguments): boolean; -} -interface CustomCheck { - func: (argv: Arguments, aliases: DetailedArguments['aliases']) => any; - global: boolean; -} -export declare type KeyOrPos = string | number; -export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/validation.js b/test-eol-project/node_modules/yargs/build/lib/validation.js deleted file mode 100644 index 60c5e43b..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/validation.js +++ /dev/null @@ -1,330 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validation = void 0; -const argsert_1 = require("./argsert"); -const common_types_1 = require("./common-types"); -const levenshtein_1 = require("./levenshtein"); -const obj_filter_1 = require("./obj-filter"); -const specialKeys = ['$0', '--', '_']; -// validation-type-stuff, missing params, -// bad implications, custom checks. -function validation(yargs, usage, y18n) { - const __ = y18n.__; - const __n = y18n.__n; - const self = {}; - // validate appropriate # of non-option - // arguments were provided, i.e., '_'. - self.nonOptionCount = function nonOptionCount(argv) { - const demandedCommands = yargs.getDemandedCommands(); - // don't count currently executing commands - const _s = argv._.length - yargs.getContext().commands.length; - if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail( - // replace $0 with observed, $1 with expected. - demandedCommands._.minMsg - ? demandedCommands._.minMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.min.toString()) - : null); - } - else { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s, demandedCommands._.min)); - } - } - else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail( - // replace $0 with observed, $1 with expected. - demandedCommands._.maxMsg - ? demandedCommands._.maxMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.max.toString()) - : null); - } - else { - usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s, demandedCommands._.max)); - } - } - } - }; - // validate the appropriate # of - // positional arguments were provided: - self.positionalCount = function positionalCount(required, observed) { - if (observed < required) { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed, required)); - } - }; - // make sure all the required arguments are present. - self.requiredArguments = function requiredArguments(argv) { - const demandedOptions = yargs.getDemandedOptions(); - let missing = null; - for (const key of Object.keys(demandedOptions)) { - if (!Object.prototype.hasOwnProperty.call(argv, key) || typeof argv[key] === 'undefined') { - missing = missing || {}; - missing[key] = demandedOptions[key]; - } - } - if (missing) { - const customMsgs = []; - for (const key of Object.keys(missing)) { - const msg = missing[key]; - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg); - } - } - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; - usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); - } - }; - // check for unknown arguments (strict-mode). - self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand) { - const commandKeys = yargs.getCommandInstance().getCommands(); - const unknown = []; - const currentContext = yargs.getContext(); - Object.keys(argv).forEach((key) => { - if (specialKeys.indexOf(key) === -1 && - !Object.prototype.hasOwnProperty.call(positionalMap, key) && - !Object.prototype.hasOwnProperty.call(yargs._getParseContext(), key) && - !self.isValidAndSomeAliasIsNotNew(key, aliases)) { - unknown.push(key); - } - }); - if ((currentContext.commands.length > 0) || (commandKeys.length > 0) || isDefaultCommand) { - argv._.slice(currentContext.commands.length).forEach((key) => { - if (commandKeys.indexOf(key) === -1) { - unknown.push(key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.join(', '))); - } - }; - self.unknownCommands = function unknownCommands(argv) { - const commandKeys = yargs.getCommandInstance().getCommands(); - const unknown = []; - const currentContext = yargs.getContext(); - if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) { - argv._.slice(currentContext.commands.length).forEach((key) => { - if (commandKeys.indexOf(key) === -1) { - unknown.push(key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); - return true; - } - else { - return false; - } - }; - // check for a key that is not an alias, or for which every alias is new, - // implying that it was invented by the parser, e.g., during camelization - self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { - if (!Object.prototype.hasOwnProperty.call(aliases, key)) { - return false; - } - const newAliases = yargs.parsed.newAliases; - for (const a of [key, ...aliases[key]]) { - if (!Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]) { - return true; - } - } - return false; - }; - // validate arguments limited to enumerated choices - self.limitedChoices = function limitedChoices(argv) { - const options = yargs.getOptions(); - const invalid = {}; - if (!Object.keys(options.choices).length) - return; - Object.keys(argv).forEach((key) => { - if (specialKeys.indexOf(key) === -1 && - Object.prototype.hasOwnProperty.call(options.choices, key)) { - [].concat(argv[key]).forEach((value) => { - // TODO case-insensitive configurability - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value); - } - }); - } - }); - const invalidKeys = Object.keys(invalid); - if (!invalidKeys.length) - return; - let msg = __('Invalid values:'); - invalidKeys.forEach((key) => { - msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; - }); - usage.fail(msg); - }; - // custom checks, added using the `check` option on yargs. - let checks = []; - self.check = function check(f, global) { - checks.push({ - func: f, - global - }); - }; - self.customChecks = function customChecks(argv, aliases) { - for (let i = 0, f; (f = checks[i]) !== undefined; i++) { - const func = f.func; - let result = null; - try { - result = func(argv, aliases); - } - catch (err) { - usage.fail(err.message ? err.message : err, err); - continue; - } - if (!result) { - usage.fail(__('Argument check failed: %s', func.toString())); - } - else if (typeof result === 'string' || result instanceof Error) { - usage.fail(result.toString(), result); - } - } - }; - // check implications, argument foo implies => argument bar. - let implied = {}; - self.implies = function implies(key, value) { - argsert_1.argsert(' [array|number|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.implies(k, key[k]); - }); - } - else { - yargs.global(key); - if (!implied[key]) { - implied[key] = []; - } - if (Array.isArray(value)) { - value.forEach((i) => self.implies(key, i)); - } - else { - common_types_1.assertNotStrictEqual(value, undefined); - implied[key].push(value); - } - } - }; - self.getImplied = function getImplied() { - return implied; - }; - function keyExists(argv, val) { - // convert string '1' to number 1 - const num = Number(val); - val = isNaN(num) ? val : num; - if (typeof val === 'number') { - // check length of argv._ - val = argv._.length >= val; - } - else if (val.match(/^--no-.+/)) { - // check if key/value doesn't exist - val = val.match(/^--no-(.+)/)[1]; - val = !argv[val]; - } - else { - // check if key/value exists - val = argv[val]; - } - return val; - } - self.implications = function implications(argv) { - const implyFail = []; - Object.keys(implied).forEach((key) => { - const origKey = key; - (implied[key] || []).forEach((value) => { - let key = origKey; - const origValue = value; - key = keyExists(argv, key); - value = keyExists(argv, value); - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`); - } - }); - }); - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n`; - implyFail.forEach((value) => { - msg += (value); - }); - usage.fail(msg); - } - }; - let conflicting = {}; - self.conflicts = function conflicts(key, value) { - argsert_1.argsert(' [array|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.conflicts(k, key[k]); - }); - } - else { - yargs.global(key); - if (!conflicting[key]) { - conflicting[key] = []; - } - if (Array.isArray(value)) { - value.forEach((i) => self.conflicts(key, i)); - } - else { - conflicting[key].push(value); - } - } - }; - self.getConflicting = () => conflicting; - self.conflicting = function conflictingFn(argv) { - Object.keys(argv).forEach((key) => { - if (conflicting[key]) { - conflicting[key].forEach((value) => { - // we default keys to 'undefined' that have been configured, we should not - // apply conflicting check unless they are a value other than 'undefined'. - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - } - }); - }; - self.recommendCommands = function recommendCommands(cmd, potentialCommands) { - const threshold = 3; // if it takes more than three edits, let's move on. - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); - let recommended = null; - let bestDistance = Infinity; - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = levenshtein_1.levenshtein(cmd, candidate); - if (d <= threshold && d < bestDistance) { - bestDistance = d; - recommended = candidate; - } - } - if (recommended) - usage.fail(__('Did you mean %s?', recommended)); - }; - self.reset = function reset(localLookup) { - implied = obj_filter_1.objFilter(implied, k => !localLookup[k]); - conflicting = obj_filter_1.objFilter(conflicting, k => !localLookup[k]); - checks = checks.filter(c => c.global); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - implied, - checks, - conflicting - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - common_types_1.assertNotStrictEqual(frozen, undefined); - ({ - implied, - checks, - conflicting - } = frozen); - }; - return self; -} -exports.validation = validation; diff --git a/test-eol-project/node_modules/yargs/build/lib/yargs.d.ts b/test-eol-project/node_modules/yargs/build/lib/yargs.d.ts deleted file mode 100644 index 8e6e27cd..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/yargs.d.ts +++ /dev/null @@ -1,274 +0,0 @@ -/// -import { CommandInstance, CommandHandler, CommandBuilderDefinition, CommandBuilder, CommandHandlerCallback, FinishCommandHandler } from './command'; -import { Dictionary } from './common-types'; -import { Arguments as ParserArguments, DetailedArguments as ParserDetailedArguments, Configuration as ParserConfiguration, Options as ParserOptions, ConfigCallback, CoerceCallback } from 'yargs-parser'; -import { YError } from './yerror'; -import { UsageInstance, FailureFunction } from './usage'; -import { CompletionFunction } from './completion'; -import { ValidationInstance, KeyOrPos } from './validation'; -import { Y18N } from 'y18n'; -import { MiddlewareCallback, Middleware } from './middleware'; -import { RequireDirectoryOptions } from 'require-directory'; -export declare function Yargs(processArgs?: string | string[], cwd?: string, parentRequire?: NodeRequire): YargsInstance; -export declare function rebase(base: string, dir: string): string; -/** Instance of the yargs module. */ -export interface YargsInstance { - $0: string; - argv: Arguments; - customScriptName: boolean; - parsed: DetailedArguments | false; - _copyDoubleDash>(argv: T): T; - _getLoggerInstance(): LoggerInstance; - _getParseContext(): Object; - _hasOutput(): boolean; - _hasParseCallback(): boolean; - _parseArgs: { - (args: null, shortCircuit: null, _calledFromCommand: boolean, commandIndex?: number): Arguments | Promise; - (args: string | string[], shortCircuit?: boolean): Arguments | Promise; - }; - _runValidation(argv: Arguments, aliases: Dictionary, positionalMap: Dictionary, parseErrors: Error | null, isDefaultCommand?: boolean): void; - _setHasOutput(): void; - addHelpOpt: { - (opt?: string | false): YargsInstance; - (opt?: string, msg?: string): YargsInstance; - }; - addShowHiddenOpt: { - (opt?: string | false): YargsInstance; - (opt?: string, msg?: string): YargsInstance; - }; - alias: { - (keys: string | string[], aliases: string | string[]): YargsInstance; - (keyAliases: Dictionary): YargsInstance; - }; - array(keys: string | string[]): YargsInstance; - boolean(keys: string | string[]): YargsInstance; - check(f: (argv: Arguments, aliases: Dictionary) => any, _global?: boolean): YargsInstance; - choices: { - (keys: string | string[], choices: string | string[]): YargsInstance; - (keyChoices: Dictionary): YargsInstance; - }; - coerce: { - (keys: string | string[], coerceCallback: CoerceCallback): YargsInstance; - (keyCoerceCallbacks: Dictionary): YargsInstance; - }; - command(cmd: string | string[], description: CommandHandler['description'], builder?: CommandBuilderDefinition | CommandBuilder, handler?: CommandHandlerCallback, commandMiddleware?: Middleware[], deprecated?: boolean): YargsInstance; - commandDir(dir: string, opts?: RequireDirectoryOptions): YargsInstance; - completion: { - (cmd?: string, fn?: CompletionFunction): YargsInstance; - (cmd?: string, desc?: string | false, fn?: CompletionFunction): YargsInstance; - }; - config: { - (config: Dictionary): YargsInstance; - (keys?: string | string[], configCallback?: ConfigCallback): YargsInstance; - (keys?: string | string[], msg?: string, configCallback?: ConfigCallback): YargsInstance; - }; - conflicts: { - (key: string, conflictsWith: string | string[]): YargsInstance; - (keyConflicts: Dictionary): YargsInstance; - }; - count(keys: string | string[]): YargsInstance; - default: { - (key: string, value: any, defaultDescription?: string): YargsInstance; - (keys: string[], value: Exclude): YargsInstance; - (keys: Dictionary): YargsInstance; - }; - defaults: YargsInstance['default']; - demand: { - (min: number, max?: number | string, msg?: string): YargsInstance; - (keys: string | string[], msg?: string | true): YargsInstance; - (keys: string | string[], max: string[], msg?: string | true): YargsInstance; - (keyMsgs: Dictionary): YargsInstance; - (keyMsgs: Dictionary, max: string[], msg?: string): YargsInstance; - }; - demandCommand(): YargsInstance; - demandCommand(min: number, minMsg?: string): YargsInstance; - demandCommand(min: number, max: number, minMsg?: string | null, maxMsg?: string | null): YargsInstance; - demandOption: { - (keys: string | string[], msg?: string): YargsInstance; - (keyMsgs: Dictionary): YargsInstance; - }; - deprecateOption(option: string, message?: string | boolean): YargsInstance; - describe: { - (keys: string | string[], description?: string): YargsInstance; - (keyDescriptions: Dictionary): YargsInstance; - }; - detectLocale(detect: boolean): YargsInstance; - env(prefix?: string | false): YargsInstance; - epilog: YargsInstance['epilogue']; - epilogue(msg: string): YargsInstance; - example(cmd: string | [string, string?][], description?: string): YargsInstance; - exit(code: number, err?: YError | string): void; - exitProcess(enabled: boolean): YargsInstance; - fail(f: FailureFunction): YargsInstance; - getCommandInstance(): CommandInstance; - getCompletion(args: string[], done: (completions: string[]) => any): void; - getContext(): Context; - getDemandedCommands(): Options['demandedCommands']; - getDemandedOptions(): Options['demandedOptions']; - getDeprecatedOptions(): Options['deprecatedOptions']; - getDetectLocale(): boolean; - getExitProcess(): boolean; - getGroups(): Dictionary; - getHandlerFinishCommand(): FinishCommandHandler | null; - getOptions(): Options; - getParserConfiguration(): Configuration; - getStrict(): boolean; - getStrictCommands(): boolean; - getUsageInstance(): UsageInstance; - getValidationInstance(): ValidationInstance; - global(keys: string | string[], global?: boolean): YargsInstance; - group(keys: string | string[], groupName: string): YargsInstance; - help: YargsInstance['addHelpOpt']; - hide(key: string): YargsInstance; - implies: { - (key: string, implication: KeyOrPos | KeyOrPos[]): YargsInstance; - (keyImplications: Dictionary): YargsInstance; - }; - locale: { - (): string; - (locale: string): YargsInstance; - }; - middleware(callback: MiddlewareCallback | MiddlewareCallback[], applyBeforeValidation?: boolean): YargsInstance; - nargs: { - (keys: string | string[], nargs: number): YargsInstance; - (keyNargs: Dictionary): YargsInstance; - }; - normalize(keys: string | string[]): YargsInstance; - number(keys: string | string[]): YargsInstance; - onFinishCommand(f: FinishCommandHandler): YargsInstance; - option: { - (key: string, optionDefinition: OptionDefinition): YargsInstance; - (keyOptionDefinitions: Dictionary): YargsInstance; - }; - options: YargsInstance['option']; - parse: { - (): Arguments | Promise; - (args: string | string[], context: object, parseCallback?: ParseCallback): Arguments | Promise; - (args: string | string[], parseCallback: ParseCallback): Arguments | Promise; - (args: string | string[], shortCircuit: boolean): Arguments | Promise; - }; - parserConfiguration(config: Configuration): YargsInstance; - pkgConf(key: string, rootPath?: string): YargsInstance; - positional(key: string, positionalDefinition: PositionalDefinition): YargsInstance; - recommendCommands(recommend: boolean): YargsInstance; - require: YargsInstance['demand']; - required: YargsInstance['demand']; - requiresArg(keys: string | string[] | Dictionary): YargsInstance; - reset(aliases?: DetailedArguments['aliases']): YargsInstance; - resetOptions(aliases?: DetailedArguments['aliases']): YargsInstance; - scriptName(scriptName: string): YargsInstance; - showCompletionScript($0?: string, cmd?: string): YargsInstance; - showHelp(level: 'error' | 'log' | ((message: string) => void)): YargsInstance; - showHelpOnFail: { - (message?: string): YargsInstance; - (enabled: boolean, message: string): YargsInstance; - }; - showHidden: YargsInstance['addShowHiddenOpt']; - skipValidation(keys: string | string[]): YargsInstance; - strict(enable?: boolean): YargsInstance; - strictCommands(enable?: boolean): YargsInstance; - string(key: string | string[]): YargsInstance; - terminalWidth(): number | null; - updateStrings(obj: Dictionary): YargsInstance; - updateLocale: YargsInstance['updateStrings']; - usage: { - (msg: string | null): YargsInstance; - (msg: string, description: CommandHandler['description'], builder?: CommandBuilderDefinition | CommandBuilder, handler?: CommandHandlerCallback): YargsInstance; - }; - version: { - (ver?: string | false): YargsInstance; - (key?: string, ver?: string): YargsInstance; - (key?: string, msg?: string, ver?: string): YargsInstance; - }; - wrap(cols: number | null | undefined): YargsInstance; -} -export declare function isYargsInstance(y: YargsInstance | void): y is YargsInstance; -/** Yargs' context. */ -export interface Context { - commands: string[]; - files: string[]; - fullCommands: string[]; -} -declare type LoggerInstance = Pick; -export interface Options extends ParserOptions { - __: Y18N['__']; - alias: Dictionary; - array: string[]; - boolean: string[]; - choices: Dictionary; - config: Dictionary; - configObjects: Dictionary[]; - configuration: Configuration; - count: string[]; - defaultDescription: Dictionary; - demandedCommands: Dictionary<{ - min: number; - max: number; - minMsg?: string | null; - maxMsg?: string | null; - }>; - demandedOptions: Dictionary; - deprecatedOptions: Dictionary; - hiddenOptions: string[]; - /** Manually set keys */ - key: Dictionary; - local: string[]; - normalize: string[]; - number: string[]; - showHiddenOpt: string; - skipValidation: string[]; - string: string[]; -} -export interface Configuration extends Partial { - /** Should a config object be deep-merged with the object config it extends? */ - 'deep-merge-config'?: boolean; - /** Should commands be sorted in help? */ - 'sort-commands'?: boolean; -} -export interface OptionDefinition { - alias?: string | string[]; - array?: boolean; - boolean?: boolean; - choices?: string | string[]; - coerce?: CoerceCallback; - config?: boolean; - configParser?: ConfigCallback; - conflicts?: string | string[]; - count?: boolean; - default?: any; - defaultDescription?: string; - deprecate?: string | boolean; - deprecated?: OptionDefinition['deprecate']; - desc?: string; - describe?: OptionDefinition['desc']; - description?: OptionDefinition['desc']; - demand?: string | true; - demandOption?: OptionDefinition['demand']; - global?: boolean; - group?: string; - hidden?: boolean; - implies?: string | number | KeyOrPos[]; - nargs?: number; - normalize?: boolean; - number?: boolean; - require?: OptionDefinition['demand']; - required?: OptionDefinition['demand']; - requiresArg?: boolean; - skipValidation?: boolean; - string?: boolean; - type?: 'array' | 'boolean' | 'count' | 'number' | 'string'; -} -interface PositionalDefinition extends Pick { - type?: 'boolean' | 'number' | 'string'; -} -interface ParseCallback { - (err: YError | string | undefined | null, argv: Arguments | Promise, output: string): void; -} -export interface Arguments extends ParserArguments { - /** The script name or node command */ - $0: string; -} -export interface DetailedArguments extends ParserDetailedArguments { - argv: Arguments; -} -export {}; diff --git a/test-eol-project/node_modules/yargs/build/lib/yargs.js b/test-eol-project/node_modules/yargs/build/lib/yargs.js deleted file mode 100644 index 316f3d6e..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/yargs.js +++ /dev/null @@ -1,1190 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isYargsInstance = exports.rebase = exports.Yargs = void 0; -const command_1 = require("./command"); -const common_types_1 = require("./common-types"); -const yerror_1 = require("./yerror"); -const usage_1 = require("./usage"); -const argsert_1 = require("./argsert"); -const fs = require("fs"); -const completion_1 = require("./completion"); -const path = require("path"); -const validation_1 = require("./validation"); -const obj_filter_1 = require("./obj-filter"); -const apply_extends_1 = require("./apply-extends"); -const middleware_1 = require("./middleware"); -const processArgv = require("./process-argv"); -const is_promise_1 = require("./is-promise"); -const Parser = require("yargs-parser"); -const y18nFactory = require("y18n"); -const setBlocking = require("set-blocking"); -const findUp = require("find-up"); -const requireMainFilename = require("require-main-filename"); -function Yargs(processArgs = [], cwd = process.cwd(), parentRequire = require) { - const self = {}; - let command; - let completion = null; - let groups = {}; - const globalMiddleware = []; - let output = ''; - const preservedGroups = {}; - let usage; - let validation; - let handlerFinishCommand = null; - const y18n = y18nFactory({ - directory: path.resolve(__dirname, '../../locales'), - updateFiles: false - }); - self.middleware = middleware_1.globalMiddlewareFactory(globalMiddleware, self); - self.scriptName = function (scriptName) { - self.customScriptName = true; - self.$0 = scriptName; - return self; - }; - // ignore the node bin, specify this in your - // bin file with #!/usr/bin/env node - let default$0; - if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) { - default$0 = process.argv.slice(1, 2); - } - else { - default$0 = process.argv.slice(0, 1); - } - self.$0 = default$0 - .map(x => { - const b = rebase(cwd, x); - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; - }) - .join(' ').trim(); - if (process.env._ !== undefined && processArgv.getProcessArgvBin() === process.env._) { - self.$0 = process.env._.replace(`${path.dirname(process.execPath)}/`, ''); - } - // use context object to keep track of resets, subcommand execution, etc - // submodules should modify and check the state of context as necessary - const context = { resets: -1, commands: [], fullCommands: [], files: [] }; - self.getContext = () => context; - // puts yargs back into an initial state. any keys - // that have been set to "global" will not be reset - // by this action. - let options; - self.resetOptions = self.reset = function resetOptions(aliases = {}) { - context.resets++; - options = options || {}; - // put yargs back into an initial state, this - // logic is used to build a nested command - // hierarchy. - const tmpOptions = {}; - tmpOptions.local = options.local ? options.local : []; - tmpOptions.configObjects = options.configObjects ? options.configObjects : []; - // if a key has been explicitly set as local, - // we should reset it before passing options to command. - const localLookup = {}; - tmpOptions.local.forEach((l) => { - localLookup[l] = true; - (aliases[l] || []).forEach((a) => { - localLookup[a] = true; - }); - }); - // add all groups not set to local to preserved groups - Object.assign(preservedGroups, Object.keys(groups).reduce((acc, groupName) => { - const keys = groups[groupName].filter(key => !(key in localLookup)); - if (keys.length > 0) { - acc[groupName] = keys; - } - return acc; - }, {})); - // groups can now be reset - groups = {}; - const arrayOptions = [ - 'array', 'boolean', 'string', 'skipValidation', - 'count', 'normalize', 'number', - 'hiddenOptions' - ]; - const objectOptions = [ - 'narg', 'key', 'alias', 'default', 'defaultDescription', - 'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce', - 'deprecatedOptions' - ]; - arrayOptions.forEach(k => { - tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k]); - }); - objectOptions.forEach((k) => { - tmpOptions[k] = obj_filter_1.objFilter(options[k], k => !localLookup[k]); - }); - tmpOptions.envPrefix = options.envPrefix; - options = tmpOptions; - // if this is the first time being executed, create - // instances of all our helpers -- otherwise just reset. - usage = usage ? usage.reset(localLookup) : usage_1.usage(self, y18n); - validation = validation ? validation.reset(localLookup) : validation_1.validation(self, usage, y18n); - command = command ? command.reset() : command_1.command(self, usage, validation, globalMiddleware); - if (!completion) - completion = completion_1.completion(self, usage, command); - completionCommand = null; - output = ''; - exitError = null; - hasOutput = false; - self.parsed = false; - return self; - }; - self.resetOptions(); - // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) - const frozens = []; - function freeze() { - frozens.push({ - options, - configObjects: options.configObjects.slice(0), - exitProcess, - groups, - strict, - strictCommands, - completionCommand, - output, - exitError, - hasOutput, - parsed: self.parsed, - parseFn, - parseContext, - handlerFinishCommand - }); - usage.freeze(); - validation.freeze(); - command.freeze(); - } - function unfreeze() { - const frozen = frozens.pop(); - common_types_1.assertNotStrictEqual(frozen, undefined); - let configObjects; - ({ - options, - configObjects, - exitProcess, - groups, - output, - exitError, - hasOutput, - parsed: self.parsed, - strict, - strictCommands, - completionCommand, - parseFn, - parseContext, - handlerFinishCommand - } = frozen); - options.configObjects = configObjects; - usage.unfreeze(); - validation.unfreeze(); - command.unfreeze(); - } - self.boolean = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('boolean', keys); - return self; - }; - self.array = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('array', keys); - return self; - }; - self.number = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('number', keys); - return self; - }; - self.normalize = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('normalize', keys); - return self; - }; - self.count = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('count', keys); - return self; - }; - self.string = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('string', keys); - return self; - }; - self.requiresArg = function (keys) { - // the 2nd paramter [number] in the argsert the assertion is mandatory - // as populateParserHintSingleValueDictionary recursively calls requiresArg - // with Nan as a 2nd parameter, although we ignore it - argsert_1.argsert(' [number]', [keys], arguments.length); - // If someone configures nargs at the same time as requiresArg, - // nargs should take precedent, - // see: https://github.com/yargs/yargs/pull/1572 - // TODO: make this work with aliases, using a check similar to - // checkAllAliases() in yargs-parser. - if (typeof keys === 'string' && options.narg[keys]) { - return self; - } - else { - populateParserHintSingleValueDictionary(self.requiresArg, 'narg', keys, NaN); - } - return self; - }; - self.skipValidation = function (keys) { - argsert_1.argsert('', [keys], arguments.length); - populateParserHintArray('skipValidation', keys); - return self; - }; - function populateParserHintArray(type, keys) { - keys = [].concat(keys); - keys.forEach((key) => { - key = sanitizeKey(key); - options[type].push(key); - }); - } - self.nargs = function (key, value) { - argsert_1.argsert(' [number]', [key, value], arguments.length); - populateParserHintSingleValueDictionary(self.nargs, 'narg', key, value); - return self; - }; - self.choices = function (key, value) { - argsert_1.argsert(' [string|array]', [key, value], arguments.length); - populateParserHintArrayDictionary(self.choices, 'choices', key, value); - return self; - }; - self.alias = function (key, value) { - argsert_1.argsert(' [string|array]', [key, value], arguments.length); - populateParserHintArrayDictionary(self.alias, 'alias', key, value); - return self; - }; - // TODO: actually deprecate self.defaults. - self.default = self.defaults = function (key, value, defaultDescription) { - argsert_1.argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); - if (defaultDescription) { - common_types_1.assertSingleKey(key); - options.defaultDescription[key] = defaultDescription; - } - if (typeof value === 'function') { - common_types_1.assertSingleKey(key); - if (!options.defaultDescription[key]) - options.defaultDescription[key] = usage.functionDescription(value); - value = value.call(); - } - populateParserHintSingleValueDictionary(self.default, 'default', key, value); - return self; - }; - self.describe = function (key, desc) { - argsert_1.argsert(' [string]', [key, desc], arguments.length); - setKey(key, true); - usage.describe(key, desc); - return self; - }; - function setKey(key, set) { - populateParserHintSingleValueDictionary(setKey, 'key', key, set); - return self; - } - function demandOption(keys, msg) { - argsert_1.argsert(' [string]', [keys, msg], arguments.length); - populateParserHintSingleValueDictionary(self.demandOption, 'demandedOptions', keys, msg); - return self; - } - self.demandOption = demandOption; - self.coerce = function (keys, value) { - argsert_1.argsert(' [function]', [keys, value], arguments.length); - populateParserHintSingleValueDictionary(self.coerce, 'coerce', keys, value); - return self; - }; - function populateParserHintSingleValueDictionary(builder, type, key, value) { - populateParserHintDictionary(builder, type, key, value, (type, key, value) => { - options[type][key] = value; - }); - } - function populateParserHintArrayDictionary(builder, type, key, value) { - populateParserHintDictionary(builder, type, key, value, (type, key, value) => { - options[type][key] = (options[type][key] || []).concat(value); - }); - } - function populateParserHintDictionary(builder, type, key, value, singleKeyHandler) { - if (Array.isArray(key)) { - // an array of keys with one value ['x', 'y', 'z'], function parse () {} - key.forEach((k) => { - builder(k, value); - }); - } - else if (((key) => typeof key === 'object')(key)) { - // an object of key value pairs: {'x': parse () {}, 'y': parse() {}} - for (const k of common_types_1.objectKeys(key)) { - builder(k, key[k]); - } - } - else { - singleKeyHandler(type, sanitizeKey(key), value); - } - } - function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; - } - function deleteFromParserHintObject(optionKey) { - // delete from all parsing hints: - // boolean, array, key, alias, etc. - common_types_1.objectKeys(options).forEach((hintKey) => { - // configObjects is not a parsing hint array - if (((key) => key === 'configObjects')(hintKey)) - return; - const hint = options[hintKey]; - if (Array.isArray(hint)) { - if (~hint.indexOf(optionKey)) - hint.splice(hint.indexOf(optionKey), 1); - } - else if (typeof hint === 'object') { - delete hint[optionKey]; - } - }); - // now delete the description from usage.js. - delete usage.getDescriptions()[optionKey]; - } - self.config = function config(key = 'config', msg, parseFn) { - argsert_1.argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); - // allow a config object to be provided directly. - if ((typeof key === 'object') && !Array.isArray(key)) { - key = apply_extends_1.applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config']); - options.configObjects = (options.configObjects || []).concat(key); - return self; - } - // allow for a custom parsing function. - if (typeof msg === 'function') { - parseFn = msg; - msg = undefined; - } - self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')); - (Array.isArray(key) ? key : [key]).forEach((k) => { - options.config[k] = parseFn || true; - }); - return self; - }; - self.example = function (cmd, description) { - argsert_1.argsert(' [string]', [cmd, description], arguments.length); - if (Array.isArray(cmd)) { - cmd.forEach((exampleParams) => self.example(...exampleParams)); - } - else { - usage.example(cmd, description); - } - return self; - }; - self.command = function (cmd, description, builder, handler, middlewares, deprecated) { - argsert_1.argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); - command.addHandler(cmd, description, builder, handler, middlewares, deprecated); - return self; - }; - self.commandDir = function (dir, opts) { - argsert_1.argsert(' [object]', [dir, opts], arguments.length); - const req = parentRequire || require; - command.addDirectory(dir, self.getContext(), req, require('get-caller-file')(), opts); - return self; - }; - // TODO: deprecate self.demand in favor of - // .demandCommand() .demandOption(). - self.demand = self.required = self.require = function demand(keys, max, msg) { - // you can optionally provide a 'max' key, - // which will raise an exception if too many '_' - // options are provided. - if (Array.isArray(max)) { - max.forEach((key) => { - common_types_1.assertNotStrictEqual(msg, true); - demandOption(key, msg); - }); - max = Infinity; - } - else if (typeof max !== 'number') { - msg = max; - max = Infinity; - } - if (typeof keys === 'number') { - common_types_1.assertNotStrictEqual(msg, true); - self.demandCommand(keys, max, msg, msg); - } - else if (Array.isArray(keys)) { - keys.forEach((key) => { - common_types_1.assertNotStrictEqual(msg, true); - demandOption(key, msg); - }); - } - else { - if (typeof msg === 'string') { - demandOption(keys, msg); - } - else if (msg === true || typeof msg === 'undefined') { - demandOption(keys); - } - } - return self; - }; - self.demandCommand = function demandCommand(min = 1, max, minMsg, maxMsg) { - argsert_1.argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); - if (typeof max !== 'number') { - minMsg = max; - max = Infinity; - } - self.global('_', false); - options.demandedCommands._ = { - min, - max, - minMsg, - maxMsg - }; - return self; - }; - self.getDemandedOptions = () => { - argsert_1.argsert([], 0); - return options.demandedOptions; - }; - self.getDemandedCommands = () => { - argsert_1.argsert([], 0); - return options.demandedCommands; - }; - self.deprecateOption = function deprecateOption(option, message) { - argsert_1.argsert(' [string|boolean]', [option, message], arguments.length); - options.deprecatedOptions[option] = message; - return self; - }; - self.getDeprecatedOptions = () => { - argsert_1.argsert([], 0); - return options.deprecatedOptions; - }; - self.implies = function (key, value) { - argsert_1.argsert(' [number|string|array]', [key, value], arguments.length); - validation.implies(key, value); - return self; - }; - self.conflicts = function (key1, key2) { - argsert_1.argsert(' [string|array]', [key1, key2], arguments.length); - validation.conflicts(key1, key2); - return self; - }; - self.usage = function (msg, description, builder, handler) { - argsert_1.argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); - if (description !== undefined) { - common_types_1.assertNotStrictEqual(msg, null); - // .usage() can be used as an alias for defining - // a default command. - if ((msg || '').match(/^\$0( |$)/)) { - return self.command(msg, description, builder, handler); - } - else { - throw new yerror_1.YError('.usage() description must start with $0 if being used as alias for .command()'); - } - } - else { - usage.usage(msg); - return self; - } - }; - self.epilogue = self.epilog = function (msg) { - argsert_1.argsert('', [msg], arguments.length); - usage.epilog(msg); - return self; - }; - self.fail = function (f) { - argsert_1.argsert('', [f], arguments.length); - usage.failFn(f); - return self; - }; - self.onFinishCommand = function (f) { - argsert_1.argsert('', [f], arguments.length); - handlerFinishCommand = f; - return self; - }; - self.getHandlerFinishCommand = () => handlerFinishCommand; - self.check = function (f, _global) { - argsert_1.argsert(' [boolean]', [f, _global], arguments.length); - validation.check(f, _global !== false); - return self; - }; - self.global = function global(globals, global) { - argsert_1.argsert(' [boolean]', [globals, global], arguments.length); - globals = [].concat(globals); - if (global !== false) { - options.local = options.local.filter(l => globals.indexOf(l) === -1); - } - else { - globals.forEach((g) => { - if (options.local.indexOf(g) === -1) - options.local.push(g); - }); - } - return self; - }; - self.pkgConf = function pkgConf(key, rootPath) { - argsert_1.argsert(' [string]', [key, rootPath], arguments.length); - let conf = null; - // prefer cwd to require-main-filename in this method - // since we're looking for e.g. "nyc" config in nyc consumer - // rather than "yargs" config in nyc (where nyc is the main filename) - const obj = pkgUp(rootPath || cwd); - // If an object exists in the key, add it to options.configObjects - if (obj[key] && typeof obj[key] === 'object') { - conf = apply_extends_1.applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config']); - options.configObjects = (options.configObjects || []).concat(conf); - } - return self; - }; - const pkgs = {}; - function pkgUp(rootPath) { - const npath = rootPath || '*'; - if (pkgs[npath]) - return pkgs[npath]; - let obj = {}; - try { - let startDir = rootPath || requireMainFilename(parentRequire); - // When called in an environment that lacks require.main.filename, such as a jest test runner, - // startDir is already process.cwd(), and should not be shortened. - // Whether or not it is _actually_ a directory (e.g., extensionless bin) is irrelevant, find-up handles it. - if (!rootPath && path.extname(startDir)) { - startDir = path.dirname(startDir); - } - const pkgJsonPath = findUp.sync('package.json', { - cwd: startDir - }); - common_types_1.assertNotStrictEqual(pkgJsonPath, undefined); - obj = JSON.parse(fs.readFileSync(pkgJsonPath).toString()); - } - catch (noop) { } - pkgs[npath] = obj || {}; - return pkgs[npath]; - } - let parseFn = null; - let parseContext = null; - self.parse = function parse(args, shortCircuit, _parseFn) { - argsert_1.argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); - freeze(); - if (typeof args === 'undefined') { - const argv = self._parseArgs(processArgs); - const tmpParsed = self.parsed; - unfreeze(); - // TODO: remove this compatibility hack when we release yargs@15.x: - self.parsed = tmpParsed; - return argv; - } - // a context object can optionally be provided, this allows - // additional information to be passed to a command handler. - if (typeof shortCircuit === 'object') { - parseContext = shortCircuit; - shortCircuit = _parseFn; - } - // by providing a function as a second argument to - // parse you can capture output that would otherwise - // default to printing to stdout/stderr. - if (typeof shortCircuit === 'function') { - parseFn = shortCircuit; - shortCircuit = false; - } - // completion short-circuits the parsing process, - // skipping validation, etc. - if (!shortCircuit) - processArgs = args; - if (parseFn) - exitProcess = false; - const parsed = self._parseArgs(args, !!shortCircuit); - completion.setParsed(self.parsed); - if (parseFn) - parseFn(exitError, parsed, output); - unfreeze(); - return parsed; - }; - self._getParseContext = () => parseContext || {}; - self._hasParseCallback = () => !!parseFn; - self.option = self.options = function option(key, opt) { - argsert_1.argsert(' [object]', [key, opt], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.options(k, key[k]); - }); - } - else { - if (typeof opt !== 'object') { - opt = {}; - } - options.key[key] = true; // track manually set keys. - if (opt.alias) - self.alias(key, opt.alias); - const deprecate = opt.deprecate || opt.deprecated; - if (deprecate) { - self.deprecateOption(key, deprecate); - } - const demand = opt.demand || opt.required || opt.require; - // A required option can be specified via "demand: true". - if (demand) { - self.demand(key, demand); - } - if (opt.demandOption) { - self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); - } - if (opt.conflicts) { - self.conflicts(key, opt.conflicts); - } - if ('default' in opt) { - self.default(key, opt.default); - } - if (opt.implies !== undefined) { - self.implies(key, opt.implies); - } - if (opt.nargs !== undefined) { - self.nargs(key, opt.nargs); - } - if (opt.config) { - self.config(key, opt.configParser); - } - if (opt.normalize) { - self.normalize(key); - } - if (opt.choices) { - self.choices(key, opt.choices); - } - if (opt.coerce) { - self.coerce(key, opt.coerce); - } - if (opt.group) { - self.group(key, opt.group); - } - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - if (opt.alias) - self.boolean(opt.alias); - } - if (opt.array || opt.type === 'array') { - self.array(key); - if (opt.alias) - self.array(opt.alias); - } - if (opt.number || opt.type === 'number') { - self.number(key); - if (opt.alias) - self.number(opt.alias); - } - if (opt.string || opt.type === 'string') { - self.string(key); - if (opt.alias) - self.string(opt.alias); - } - if (opt.count || opt.type === 'count') { - self.count(key); - } - if (typeof opt.global === 'boolean') { - self.global(key, opt.global); - } - if (opt.defaultDescription) { - options.defaultDescription[key] = opt.defaultDescription; - } - if (opt.skipValidation) { - self.skipValidation(key); - } - const desc = opt.describe || opt.description || opt.desc; - self.describe(key, desc); - if (opt.hidden) { - self.hide(key); - } - if (opt.requiresArg) { - self.requiresArg(key); - } - } - return self; - }; - self.getOptions = () => options; - self.positional = function (key, opts) { - argsert_1.argsert(' ', [key, opts], arguments.length); - if (context.resets === 0) { - throw new yerror_1.YError(".positional() can only be called in a command's builder function"); - } - // .positional() only supports a subset of the configuration - // options available to .option(). - const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize', - 'choices', 'conflicts', 'coerce', 'type', 'describe', - 'desc', 'description', 'alias']; - opts = obj_filter_1.objFilter(opts, (k, v) => { - let accept = supportedOpts.indexOf(k) !== -1; - // type can be one of string|number|boolean. - if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) - accept = false; - return accept; - }); - // copy over any settings that can be inferred from the command string. - const fullCommand = context.fullCommands[context.fullCommands.length - 1]; - const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : { - array: [], - alias: {}, - default: {}, - demand: {} - }; - common_types_1.objectKeys(parseOptions).forEach((pk) => { - const parseOption = parseOptions[pk]; - if (Array.isArray(parseOption)) { - if (parseOption.indexOf(key) !== -1) - opts[pk] = true; - } - else { - if (parseOption[key] && !(pk in opts)) - opts[pk] = parseOption[key]; - } - }); - self.group(key, usage.getPositionalGroupName()); - return self.option(key, opts); - }; - self.group = function group(opts, groupName) { - argsert_1.argsert(' ', [opts, groupName], arguments.length); - const existing = preservedGroups[groupName] || groups[groupName]; - if (preservedGroups[groupName]) { - // we now only need to track this group name in groups. - delete preservedGroups[groupName]; - } - const seen = {}; - groups[groupName] = (existing || []).concat(opts).filter((key) => { - if (seen[key]) - return false; - return (seen[key] = true); - }); - return self; - }; - // combine explicit and preserved groups. explicit groups should be first - self.getGroups = () => Object.assign({}, groups, preservedGroups); - // as long as options.envPrefix is not undefined, - // parser will apply env vars matching prefix to argv - self.env = function (prefix) { - argsert_1.argsert('[string|boolean]', [prefix], arguments.length); - if (prefix === false) - delete options.envPrefix; - else - options.envPrefix = prefix || ''; - return self; - }; - self.wrap = function (cols) { - argsert_1.argsert('', [cols], arguments.length); - usage.wrap(cols); - return self; - }; - let strict = false; - self.strict = function (enabled) { - argsert_1.argsert('[boolean]', [enabled], arguments.length); - strict = enabled !== false; - return self; - }; - self.getStrict = () => strict; - let strictCommands = false; - self.strictCommands = function (enabled) { - argsert_1.argsert('[boolean]', [enabled], arguments.length); - strictCommands = enabled !== false; - return self; - }; - self.getStrictCommands = () => strictCommands; - let parserConfig = {}; - self.parserConfiguration = function parserConfiguration(config) { - argsert_1.argsert('', [config], arguments.length); - parserConfig = config; - return self; - }; - self.getParserConfiguration = () => parserConfig; - self.showHelp = function (level) { - argsert_1.argsert('[string|function]', [level], arguments.length); - if (!self.parsed) - self._parseArgs(processArgs); // run parser, if it has not already been executed. - if (command.hasDefaultCommand()) { - context.resets++; // override the restriction on top-level positoinals. - command.runDefaultBuilderOn(self); - } - usage.showHelp(level); - return self; - }; - let versionOpt = null; - self.version = function version(opt, msg, ver) { - const defaultVersionOpt = 'version'; - argsert_1.argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); - // nuke the key previously configured - // to return version #. - if (versionOpt) { - deleteFromParserHintObject(versionOpt); - usage.version(undefined); - versionOpt = null; - } - if (arguments.length === 0) { - ver = guessVersion(); - opt = defaultVersionOpt; - } - else if (arguments.length === 1) { - if (opt === false) { // disable default 'version' key. - return self; - } - ver = opt; - opt = defaultVersionOpt; - } - else if (arguments.length === 2) { - ver = msg; - msg = undefined; - } - versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt; - msg = msg || usage.deferY18nLookup('Show version number'); - usage.version(ver || undefined); - self.boolean(versionOpt); - self.describe(versionOpt, msg); - return self; - }; - function guessVersion() { - const obj = pkgUp(); - return obj.version || 'unknown'; - } - let helpOpt = null; - self.addHelpOpt = self.help = function addHelpOpt(opt, msg) { - const defaultHelpOpt = 'help'; - argsert_1.argsert('[string|boolean] [string]', [opt, msg], arguments.length); - // nuke the key previously configured - // to return help. - if (helpOpt) { - deleteFromParserHintObject(helpOpt); - helpOpt = null; - } - if (arguments.length === 1) { - if (opt === false) - return self; - } - // use arguments, fallback to defaults for opt and msg - helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt; - self.boolean(helpOpt); - self.describe(helpOpt, msg || usage.deferY18nLookup('Show help')); - return self; - }; - const defaultShowHiddenOpt = 'show-hidden'; - options.showHiddenOpt = defaultShowHiddenOpt; - self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt(opt, msg) { - argsert_1.argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (arguments.length === 1) { - if (opt === false) - return self; - } - const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt; - self.boolean(showHiddenOpt); - self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options')); - options.showHiddenOpt = showHiddenOpt; - return self; - }; - self.hide = function hide(key) { - argsert_1.argsert('', [key], arguments.length); - options.hiddenOptions.push(key); - return self; - }; - self.showHelpOnFail = function showHelpOnFail(enabled, message) { - argsert_1.argsert('[boolean|string] [string]', [enabled, message], arguments.length); - usage.showHelpOnFail(enabled, message); - return self; - }; - var exitProcess = true; - self.exitProcess = function (enabled = true) { - argsert_1.argsert('[boolean]', [enabled], arguments.length); - exitProcess = enabled; - return self; - }; - self.getExitProcess = () => exitProcess; - var completionCommand = null; - self.completion = function (cmd, desc, fn) { - argsert_1.argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); - // a function to execute when generating - // completions can be provided as the second - // or third argument to completion. - if (typeof desc === 'function') { - fn = desc; - desc = undefined; - } - // register the completion command. - completionCommand = cmd || completionCommand || 'completion'; - if (!desc && desc !== false) { - desc = 'generate completion script'; - } - self.command(completionCommand, desc); - // a function can be provided - if (fn) - completion.registerFunction(fn); - return self; - }; - self.showCompletionScript = function ($0, cmd) { - argsert_1.argsert('[string] [string]', [$0, cmd], arguments.length); - $0 = $0 || self.$0; - _logger.log(completion.generateCompletionScript($0, cmd || completionCommand || 'completion')); - return self; - }; - self.getCompletion = function (args, done) { - argsert_1.argsert(' ', [args, done], arguments.length); - completion.getCompletion(args, done); - }; - self.locale = function (locale) { - argsert_1.argsert('[string]', [locale], arguments.length); - if (!locale) { - guessLocale(); - return y18n.getLocale(); - } - detectLocale = false; - y18n.setLocale(locale); - return self; - }; - self.updateStrings = self.updateLocale = function (obj) { - argsert_1.argsert('', [obj], arguments.length); - detectLocale = false; - y18n.updateLocale(obj); - return self; - }; - let detectLocale = true; - self.detectLocale = function (detect) { - argsert_1.argsert('', [detect], arguments.length); - detectLocale = detect; - return self; - }; - self.getDetectLocale = () => detectLocale; - var hasOutput = false; - var exitError = null; - // maybe exit, always capture - // context about why we wanted to exit. - self.exit = (code, err) => { - hasOutput = true; - exitError = err; - if (exitProcess) - process.exit(code); - }; - // we use a custom logger that buffers output, - // so that we can print to non-CLIs, e.g., chat-bots. - const _logger = { - log(...args) { - if (!self._hasParseCallback()) - console.log(...args); - hasOutput = true; - if (output.length) - output += '\n'; - output += args.join(' '); - }, - error(...args) { - if (!self._hasParseCallback()) - console.error(...args); - hasOutput = true; - if (output.length) - output += '\n'; - output += args.join(' '); - } - }; - self._getLoggerInstance = () => _logger; - // has yargs output an error our help - // message in the current execution context. - self._hasOutput = () => hasOutput; - self._setHasOutput = () => { - hasOutput = true; - }; - let recommendCommands; - self.recommendCommands = function (recommend = true) { - argsert_1.argsert('[boolean]', [recommend], arguments.length); - recommendCommands = recommend; - return self; - }; - self.getUsageInstance = () => usage; - self.getValidationInstance = () => validation; - self.getCommandInstance = () => command; - self.terminalWidth = () => { - argsert_1.argsert([], 0); - return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null; - }; - Object.defineProperty(self, 'argv', { - get: () => self._parseArgs(processArgs), - enumerable: true - }); - self._parseArgs = function parseArgs(args, shortCircuit, _calledFromCommand, commandIndex) { - let skipValidation = !!_calledFromCommand; - args = args || processArgs; - options.__ = y18n.__; - options.configuration = self.getParserConfiguration(); - const populateDoubleDash = !!options.configuration['populate--']; - const config = Object.assign({}, options.configuration, { - 'populate--': true - }); - const parsed = Parser.detailed(args, Object.assign({}, options, { - configuration: config - })); - let argv = parsed.argv; - if (parseContext) - argv = Object.assign({}, argv, parseContext); - const aliases = parsed.aliases; - argv.$0 = self.$0; - self.parsed = parsed; - try { - guessLocale(); // guess locale lazily, so that it can be turned off in chain. - // while building up the argv object, there - // are two passes through the parser. If completion - // is being performed short-circuit on the first pass. - if (shortCircuit) { - return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv); - } - // if there's a handler associated with a - // command defer processing to it. - if (helpOpt) { - // consider any multi-char helpOpt alias as a valid help command - // unless all helpOpt aliases are single-char - // note that parsed.aliases is a normalized bidirectional map :) - const helpCmds = [helpOpt] - .concat(aliases[helpOpt] || []) - .filter(k => k.length > 1); - // check if help should trigger and strip it from _. - if (~helpCmds.indexOf(argv._[argv._.length - 1])) { - argv._.pop(); - argv[helpOpt] = true; - } - } - const handlerKeys = command.getCommands(); - const requestCompletions = completion.completionKey in argv; - const skipRecommendation = argv[helpOpt] || requestCompletions; - const skipDefaultCommand = skipRecommendation && (handlerKeys.length > 1 || handlerKeys[0] !== '$0'); - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand; - for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]); - if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { - // commands are executed using a recursive algorithm that executes - // the deepest command first; we keep track of the position in the - // argv._ array that is currently being executed. - const innerArgv = command.runCommand(cmd, self, parsed, i + 1); - return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv); - } - else if (!firstUnknownCommand && cmd !== completionCommand) { - firstUnknownCommand = cmd; - break; - } - } - // run the default command, if defined - if (command.hasDefaultCommand() && !skipDefaultCommand) { - const innerArgv = command.runCommand(null, self, parsed); - return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv); - } - // recommend a command if recommendCommands() has - // been enabled, and no commands were found to execute - if (recommendCommands && firstUnknownCommand && !skipRecommendation) { - validation.recommendCommands(firstUnknownCommand, handlerKeys); - } - } - // generate a completion script for adding to ~/.bashrc. - if (completionCommand && ~argv._.indexOf(completionCommand) && !requestCompletions) { - if (exitProcess) - setBlocking(true); - self.showCompletionScript(); - self.exit(0); - } - } - else if (command.hasDefaultCommand() && !skipDefaultCommand) { - const innerArgv = command.runCommand(null, self, parsed); - return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv); - } - // we must run completions first, a user might - // want to complete the --help or --version option. - if (requestCompletions) { - if (exitProcess) - setBlocking(true); - // we allow for asynchronous completions, - // e.g., loading in a list of commands from an API. - args = [].concat(args); - const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1); - completion.getCompletion(completionArgs, (completions) => { - ; - (completions || []).forEach((completion) => { - _logger.log(completion); - }); - self.exit(0); - }); - return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv); - } - // Handle 'help' and 'version' options - // if we haven't already output help! - if (!hasOutput) { - Object.keys(argv).forEach((key) => { - if (key === helpOpt && argv[key]) { - if (exitProcess) - setBlocking(true); - skipValidation = true; - self.showHelp('log'); - self.exit(0); - } - else if (key === versionOpt && argv[key]) { - if (exitProcess) - setBlocking(true); - skipValidation = true; - usage.showVersion(); - self.exit(0); - } - }); - } - // Check if any of the options to skip validation were provided - if (!skipValidation && options.skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true); - } - // If the help or version options where used and exitProcess is false, - // or if explicitly skipped, we won't run validations. - if (!skipValidation) { - if (parsed.error) - throw new yerror_1.YError(parsed.error.message); - // if we're executed via bash completion, don't - // bother with validation. - if (!requestCompletions) { - self._runValidation(argv, aliases, {}, parsed.error); - } - } - } - catch (err) { - if (err instanceof yerror_1.YError) - usage.fail(err.message, err); - else - throw err; - } - return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv); - }; - // to simplify the parsing of positionals in commands, - // we temporarily populate '--' rather than _, with arguments - // after the '--' directive. After the parse, we copy these back. - self._copyDoubleDash = function (argv) { - if (is_promise_1.isPromise(argv) || !argv._ || !argv['--']) - return argv; - argv._.push.apply(argv._, argv['--']); - // TODO(bcoe): refactor command parsing such that this delete is not - // necessary: https://github.com/yargs/yargs/issues/1482 - try { - delete argv['--']; - } - catch (_err) { } - return argv; - }; - self._runValidation = function runValidation(argv, aliases, positionalMap, parseErrors, isDefaultCommand = false) { - if (parseErrors) - throw new yerror_1.YError(parseErrors.message); - validation.nonOptionCount(argv); - validation.requiredArguments(argv); - let failedStrictCommands = false; - if (strictCommands) { - failedStrictCommands = validation.unknownCommands(argv); - } - if (strict && !failedStrictCommands) { - validation.unknownArguments(argv, aliases, positionalMap, isDefaultCommand); - } - validation.customChecks(argv, aliases); - validation.limitedChoices(argv); - validation.implications(argv); - validation.conflicting(argv); - }; - function guessLocale() { - if (!detectLocale) - return; - const locale = process.env.LC_ALL || process.env.LC_MESSAGES || process.env.LANG || process.env.LANGUAGE || 'en_US'; - self.locale(locale.replace(/[.:].*/, '')); - } - // an app should almost always have --version and --help, - // if you *really* want to disable this use .help(false)/.version(false). - self.help(); - self.version(); - return self; -} -exports.Yargs = Yargs; -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -function rebase(base, dir) { - return path.relative(base, dir); -} -exports.rebase = rebase; -function isYargsInstance(y) { - return !!y && (typeof y._parseArgs === 'function'); -} -exports.isYargsInstance = isYargsInstance; diff --git a/test-eol-project/node_modules/yargs/build/lib/yerror.d.ts b/test-eol-project/node_modules/yargs/build/lib/yerror.d.ts deleted file mode 100644 index 024d0c7a..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/yerror.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class YError extends Error { - name: string; - constructor(msg?: string | null); -} diff --git a/test-eol-project/node_modules/yargs/build/lib/yerror.js b/test-eol-project/node_modules/yargs/build/lib/yerror.js deleted file mode 100644 index 0fa146e5..00000000 --- a/test-eol-project/node_modules/yargs/build/lib/yerror.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.YError = void 0; -class YError extends Error { - constructor(msg) { - super(msg || 'yargs error'); - this.name = 'YError'; - Error.captureStackTrace(this, YError); - } -} -exports.YError = YError; diff --git a/test-eol-project/node_modules/yargs/index.js b/test-eol-project/node_modules/yargs/index.js deleted file mode 100644 index 7dc62de9..00000000 --- a/test-eol-project/node_modules/yargs/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict' -// classic singleton yargs API, to use yargs -// without running as a singleton do: -// require('yargs/yargs')(process.argv.slice(2)) -const yargs = require('./yargs') -const processArgv = require('./build/lib/process-argv') - -Argv(processArgv.getProcessArgvWithoutBin()) - -module.exports = Argv - -function Argv (processArgs, cwd) { - const argv = yargs(processArgs, cwd, require) - singletonify(argv) - return argv -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function singletonify (inst) { - Object.keys(inst).forEach((key) => { - if (key === 'argv') { - Argv.__defineGetter__(key, inst.__lookupGetter__(key)) - } else if (typeof inst[key] === 'function') { - Argv[key] = inst[key].bind(inst) - } else { - Argv.__defineGetter__('$0', () => { - return inst.$0 - }) - Argv.__defineGetter__('parsed', () => { - return inst.parsed - }) - } - }) -} diff --git a/test-eol-project/node_modules/yargs/locales/be.json b/test-eol-project/node_modules/yargs/locales/be.json deleted file mode 100644 index e28fa301..00000000 --- a/test-eol-project/node_modules/yargs/locales/be.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Каманды:", - "Options:": "Опцыі:", - "Examples:": "Прыклады:", - "boolean": "булевы тып", - "count": "падлік", - "string": "радковы тып", - "number": "лік", - "array": "масіў", - "required": "неабходна", - "default": "па змаўчанні", - "default:": "па змаўчанні:", - "choices:": "магчымасці:", - "aliases:": "аліасы:", - "generated-value": "згенераванае значэнне", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", - "other": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", - "other": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s" - }, - "Missing argument value: %s": { - "one": "Не хапае значэння аргументу: %s", - "other": "Не хапае значэнняў аргументаў: %s" - }, - "Missing required argument: %s": { - "one": "Не хапае неабходнага аргументу: %s", - "other": "Не хапае неабходных аргументаў: %s" - }, - "Unknown argument: %s": { - "one": "Невядомы аргумент: %s", - "other": "Невядомыя аргументы: %s" - }, - "Invalid values:": "Несапраўдныя значэння:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", - "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", - "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", - "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", - "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", - "Path to JSON config file": "Шлях да файла канфігурацыі JSON", - "Show help": "Паказаць дапамогу", - "Show version number": "Паказаць нумар версіі", - "Did you mean %s?": "Вы мелі на ўвазе %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/de.json b/test-eol-project/node_modules/yargs/locales/de.json deleted file mode 100644 index dc73ec3f..00000000 --- a/test-eol-project/node_modules/yargs/locales/de.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Kommandos:", - "Options:": "Optionen:", - "Examples:": "Beispiele:", - "boolean": "boolean", - "count": "Zähler", - "string": "string", - "number": "Zahl", - "array": "array", - "required": "erforderlich", - "default": "Standard", - "default:": "Standard:", - "choices:": "Möglichkeiten:", - "aliases:": "Aliase:", - "generated-value": "Generierter-Wert", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", - "other": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", - "other": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt" - }, - "Missing argument value: %s": { - "one": "Fehlender Argumentwert: %s", - "other": "Fehlende Argumentwerte: %s" - }, - "Missing required argument: %s": { - "one": "Fehlendes Argument: %s", - "other": "Fehlende Argumente: %s" - }, - "Unknown argument: %s": { - "one": "Unbekanntes Argument: %s", - "other": "Unbekannte Argumente: %s" - }, - "Invalid values:": "Unzulässige Werte:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", - "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Fehlende abhängige Argumente:", - "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", - "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", - "Path to JSON config file": "Pfad zur JSON-Config Datei", - "Show help": "Hilfe anzeigen", - "Show version number": "Version anzeigen", - "Did you mean %s?": "Meintest du %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/en.json b/test-eol-project/node_modules/yargs/locales/en.json deleted file mode 100644 index d794947d..00000000 --- a/test-eol-project/node_modules/yargs/locales/en.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "Commands:", - "Options:": "Options:", - "Examples:": "Examples:", - "boolean": "boolean", - "count": "count", - "string": "string", - "number": "number", - "array": "array", - "required": "required", - "default": "default", - "default:": "default:", - "choices:": "choices:", - "aliases:": "aliases:", - "generated-value": "generated-value", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Not enough non-option arguments: got %s, need at least %s", - "other": "Not enough non-option arguments: got %s, need at least %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Too many non-option arguments: got %s, maximum of %s", - "other": "Too many non-option arguments: got %s, maximum of %s" - }, - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missing required argument: %s", - "other": "Missing required arguments: %s" - }, - "Unknown argument: %s": { - "one": "Unknown argument: %s", - "other": "Unknown arguments: %s" - }, - "Invalid values:": "Invalid values:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", - "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Missing dependent arguments:", - "Not enough arguments following: %s": "Not enough arguments following: %s", - "Invalid JSON config file: %s": "Invalid JSON config file: %s", - "Path to JSON config file": "Path to JSON config file", - "Show help": "Show help", - "Show version number": "Show version number", - "Did you mean %s?": "Did you mean %s?", - "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", - "Positionals:": "Positionals:", - "command": "command", - "deprecated": "deprecated", - "deprecated: %s": "deprecated: %s" -} diff --git a/test-eol-project/node_modules/yargs/locales/es.json b/test-eol-project/node_modules/yargs/locales/es.json deleted file mode 100644 index d77b4616..00000000 --- a/test-eol-project/node_modules/yargs/locales/es.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opciones:", - "Examples:": "Ejemplos:", - "boolean": "booleano", - "count": "cuenta", - "string": "cadena de caracteres", - "number": "número", - "array": "tabla", - "required": "requerido", - "default": "defecto", - "default:": "defecto:", - "choices:": "selección:", - "aliases:": "alias:", - "generated-value": "valor-generado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", - "other": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", - "other": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s" - }, - "Missing argument value: %s": { - "one": "Falta argumento: %s", - "other": "Faltan argumentos: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento requerido: %s", - "other": "Faltan argumentos requeridos: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconocido: %s", - "other": "Argumentos desconocidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", - "Argument check failed: %s": "Verificación de argumento ha fallado: %s", - "Implications failed:": "Implicaciones fallidas:", - "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", - "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", - "Path to JSON config file": "Ruta al archivo de configuración JSON", - "Show help": "Muestra ayuda", - "Show version number": "Muestra número de versión", - "Did you mean %s?": "Quisiste decir %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/fi.json b/test-eol-project/node_modules/yargs/locales/fi.json deleted file mode 100644 index 0728c578..00000000 --- a/test-eol-project/node_modules/yargs/locales/fi.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Komennot:", - "Options:": "Valinnat:", - "Examples:": "Esimerkkejä:", - "boolean": "totuusarvo", - "count": "lukumäärä", - "string": "merkkijono", - "number": "numero", - "array": "taulukko", - "required": "pakollinen", - "default": "oletusarvo", - "default:": "oletusarvo:", - "choices:": "vaihtoehdot:", - "aliases:": "aliakset:", - "generated-value": "generoitu-arvo", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s", - "other": "Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s", - "other": "Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s" - }, - "Missing argument value: %s": { - "one": "Argumentin arvo puuttuu: %s", - "other": "Argumentin arvot puuttuvat: %s" - }, - "Missing required argument: %s": { - "one": "Pakollinen argumentti puuttuu: %s", - "other": "Pakollisia argumentteja puuttuu: %s" - }, - "Unknown argument: %s": { - "one": "Tuntematon argumenttn: %s", - "other": "Tuntemattomia argumentteja: %s" - }, - "Invalid values:": "Virheelliset arvot:", - "Argument: %s, Given: %s, Choices: %s": "Argumentti: %s, Annettu: %s, Vaihtoehdot: %s", - "Argument check failed: %s": "Argumentin tarkistus epäonnistui: %s", - "Implications failed:": "Riippuvia argumentteja puuttuu:", - "Not enough arguments following: %s": "Argumentin perässä ei ole tarpeeksi argumentteja: %s", - "Invalid JSON config file: %s": "Epävalidi JSON-asetustiedosto: %s", - "Path to JSON config file": "JSON-asetustiedoston polku", - "Show help": "Näytä ohje", - "Show version number": "Näytä versionumero", - "Did you mean %s?": "Tarkoititko %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentit %s ja %s eivät ole yhteensopivat", - "Positionals:": "Sijaintiparametrit:", - "command": "komento" -} diff --git a/test-eol-project/node_modules/yargs/locales/fr.json b/test-eol-project/node_modules/yargs/locales/fr.json deleted file mode 100644 index edd743f0..00000000 --- a/test-eol-project/node_modules/yargs/locales/fr.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "Commands:": "Commandes :", - "Options:": "Options :", - "Examples:": "Exemples :", - "boolean": "booléen", - "count": "compteur", - "string": "chaîne de caractères", - "number": "nombre", - "array": "tableau", - "required": "requis", - "default": "défaut", - "default:": "défaut :", - "choices:": "choix :", - "aliases:": "alias :", - "generated-value": "valeur générée", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s", - "other": "Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Trop d'arguments (hors options) : reçu %s, maximum de %s", - "other": "Trop d'arguments (hors options) : reçus %s, maximum de %s" - }, - "Missing argument value: %s": { - "one": "Argument manquant : %s", - "other": "Arguments manquants : %s" - }, - "Missing required argument: %s": { - "one": "Argument requis manquant : %s", - "other": "Arguments requis manquants : %s" - }, - "Unknown argument: %s": { - "one": "Argument inconnu : %s", - "other": "Arguments inconnus : %s" - }, - "Unknown command: %s": { - "one": "Commande inconnue : %s", - "other": "Commandes inconnues : %s" - }, - "Invalid values:": "Valeurs invalides :", - "Argument: %s, Given: %s, Choices: %s": "Argument : %s, donné : %s, choix : %s", - "Argument check failed: %s": "Echec de la vérification de l'argument : %s", - "Implications failed:": "Arguments dépendants manquants :", - "Not enough arguments following: %s": "Pas assez d'arguments après : %s", - "Invalid JSON config file: %s": "Fichier de configuration JSON invalide : %s", - "Path to JSON config file": "Chemin du fichier de configuration JSON", - "Show help": "Affiche l'aide", - "Show version number": "Affiche le numéro de version", - "Did you mean %s?": "Vouliez-vous dire %s ?", - "Arguments %s and %s are mutually exclusive" : "Les arguments %s et %s sont mutuellement exclusifs", - "Positionals:": "Arguments positionnels :", - "command": "commande" -} diff --git a/test-eol-project/node_modules/yargs/locales/hi.json b/test-eol-project/node_modules/yargs/locales/hi.json deleted file mode 100644 index a9de77cc..00000000 --- a/test-eol-project/node_modules/yargs/locales/hi.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "आदेश:", - "Options:": "विकल्प:", - "Examples:": "उदाहरण:", - "boolean": "सत्यता", - "count": "संख्या", - "string": "वर्णों का तार ", - "number": "अंक", - "array": "सरणी", - "required": "आवश्यक", - "default": "डिफॉल्ट", - "default:": "डिफॉल्ट:", - "choices:": "विकल्प:", - "aliases:": "उपनाम:", - "generated-value": "उत्पन्न-मूल्य", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", - "other": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", - "other": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य" - }, - "Missing argument value: %s": { - "one": "कुछ तर्को के मूल्य गुम हैं: %s", - "other": "कुछ तर्को के मूल्य गुम हैं: %s" - }, - "Missing required argument: %s": { - "one": "आवश्यक तर्क गुम हैं: %s", - "other": "आवश्यक तर्क गुम हैं: %s" - }, - "Unknown argument: %s": { - "one": "अज्ञात तर्क प्राप्त: %s", - "other": "अज्ञात तर्क प्राप्त: %s" - }, - "Invalid values:": "अमान्य मूल्य:", - "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", - "Argument check failed: %s": "तर्क जांच विफल: %s", - "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", - "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", - "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", - "Path to JSON config file": "JSON config फाइल का पथ", - "Show help": "सहायता दिखाएँ", - "Show version number": "Version संख्या दिखाएँ", - "Did you mean %s?": "क्या आपका मतलब है %s?", - "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", - "Positionals:": "स्थानीय:", - "command": "आदेश" -} diff --git a/test-eol-project/node_modules/yargs/locales/hu.json b/test-eol-project/node_modules/yargs/locales/hu.json deleted file mode 100644 index 21492d05..00000000 --- a/test-eol-project/node_modules/yargs/locales/hu.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Parancsok:", - "Options:": "Opciók:", - "Examples:": "Példák:", - "boolean": "boolean", - "count": "számláló", - "string": "szöveg", - "number": "szám", - "array": "tömb", - "required": "kötelező", - "default": "alapértelmezett", - "default:": "alapértelmezett:", - "choices:": "lehetőségek:", - "aliases:": "aliaszok:", - "generated-value": "generált-érték", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", - "other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", - "other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet" - }, - "Missing argument value: %s": { - "one": "Hiányzó argumentum érték: %s", - "other": "Hiányzó argumentum értékek: %s" - }, - "Missing required argument: %s": { - "one": "Hiányzó kötelező argumentum: %s", - "other": "Hiányzó kötelező argumentumok: %s" - }, - "Unknown argument: %s": { - "one": "Ismeretlen argumentum: %s", - "other": "Ismeretlen argumentumok: %s" - }, - "Invalid values:": "Érvénytelen érték:", - "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", - "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", - "Implications failed:": "Implikációk sikertelenek:", - "Not enough arguments following: %s": "Nem elég argumentum követi: %s", - "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", - "Path to JSON config file": "JSON konfigurációs file helye", - "Show help": "Súgo megjelenítése", - "Show version number": "Verziószám megjelenítése", - "Did you mean %s?": "Erre gondoltál %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/id.json b/test-eol-project/node_modules/yargs/locales/id.json deleted file mode 100644 index 125867cb..00000000 --- a/test-eol-project/node_modules/yargs/locales/id.json +++ /dev/null @@ -1,50 +0,0 @@ - -{ - "Commands:": "Perintah:", - "Options:": "Pilihan:", - "Examples:": "Contoh:", - "boolean": "boolean", - "count": "jumlah", - "number": "nomor", - "string": "string", - "array": "larik", - "required": "diperlukan", - "default": "bawaan", - "default:": "bawaan:", - "aliases:": "istilah lain:", - "choices:": "pilihan:", - "generated-value": "nilai-yang-dihasilkan", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumen wajib kurang: hanya %s, minimal %s", - "other": "Argumen wajib kurang: hanya %s, minimal %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Terlalu banyak argumen wajib: ada %s, maksimal %s", - "other": "Terlalu banyak argumen wajib: ada %s, maksimal %s" - }, - "Missing argument value: %s": { - "one": "Kurang argumen: %s", - "other": "Kurang argumen: %s" - }, - "Missing required argument: %s": { - "one": "Kurang argumen wajib: %s", - "other": "Kurang argumen wajib: %s" - }, - "Unknown argument: %s": { - "one": "Argumen tak diketahui: %s", - "other": "Argumen tak diketahui: %s" - }, - "Invalid values:": "Nilai-nilai tidak valid:", - "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", - "Argument check failed: %s": "Pemeriksaan argument gagal: %s", - "Implications failed:": "Implikasi gagal:", - "Not enough arguments following: %s": "Kurang argumen untuk: %s", - "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", - "Path to JSON config file": "Alamat berkas konfigurasi JSON", - "Show help": "Lihat bantuan", - "Show version number": "Lihat nomor versi", - "Did you mean %s?": "Maksud Anda: %s?", - "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", - "Positionals:": "Posisional-posisional:", - "command": "perintah" -} diff --git a/test-eol-project/node_modules/yargs/locales/it.json b/test-eol-project/node_modules/yargs/locales/it.json deleted file mode 100644 index fde57561..00000000 --- a/test-eol-project/node_modules/yargs/locales/it.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Comandi:", - "Options:": "Opzioni:", - "Examples:": "Esempi:", - "boolean": "booleano", - "count": "contatore", - "string": "stringa", - "number": "numero", - "array": "vettore", - "required": "richiesto", - "default": "predefinito", - "default:": "predefinito:", - "choices:": "scelte:", - "aliases:": "alias:", - "generated-value": "valore generato", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", - "other": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", - "other": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s" - }, - "Missing argument value: %s": { - "one": "Argomento mancante: %s", - "other": "Argomenti mancanti: %s" - }, - "Missing required argument: %s": { - "one": "Argomento richiesto mancante: %s", - "other": "Argomenti richiesti mancanti: %s" - }, - "Unknown argument: %s": { - "one": "Argomento sconosciuto: %s", - "other": "Argomenti sconosciuti: %s" - }, - "Invalid values:": "Valori non validi:", - "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", - "Argument check failed: %s": "Controllo dell'argomento fallito: %s", - "Implications failed:": "Argomenti dipendenti mancanti:", - "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", - "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", - "Path to JSON config file": "Percorso del file di configurazione JSON", - "Show help": "Mostra la schermata di aiuto", - "Show version number": "Mostra il numero di versione", - "Did you mean %s?": "Intendi forse %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/ja.json b/test-eol-project/node_modules/yargs/locales/ja.json deleted file mode 100644 index 3954ae68..00000000 --- a/test-eol-project/node_modules/yargs/locales/ja.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Commands:": "コマンド:", - "Options:": "オプション:", - "Examples:": "例:", - "boolean": "真偽", - "count": "カウント", - "string": "文字列", - "number": "数値", - "array": "配列", - "required": "必須", - "default": "デフォルト", - "default:": "デフォルト:", - "choices:": "選択してください:", - "aliases:": "エイリアス:", - "generated-value": "生成された値", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", - "other": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", - "other": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:" - }, - "Missing argument value: %s": { - "one": "引数の値が見つかりません: %s", - "other": "引数の値が見つかりません: %s" - }, - "Missing required argument: %s": { - "one": "必須の引数が見つかりません: %s", - "other": "必須の引数が見つかりません: %s" - }, - "Unknown argument: %s": { - "one": "未知の引数です: %s", - "other": "未知の引数です: %s" - }, - "Invalid values:": "不正な値です:", - "Argument: %s, Given: %s, Choices: %s": "引数は %s です。与えられた値: %s, 選択してください: %s", - "Argument check failed: %s": "引数のチェックに失敗しました: %s", - "Implications failed:": "オプションの組み合わせで不正が生じました:", - "Not enough arguments following: %s": "次の引数が不足しています。: %s", - "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", - "Path to JSON config file": "JSONの設定ファイルまでのpath", - "Show help": "ヘルプを表示", - "Show version number": "バージョンを表示", - "Did you mean %s?": "もしかして %s?", - "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", - "Positionals:": "位置:", - "command": "コマンド", - "deprecated": "非推奨", - "deprecated: %s": "非推奨: %s" -} diff --git a/test-eol-project/node_modules/yargs/locales/ko.json b/test-eol-project/node_modules/yargs/locales/ko.json deleted file mode 100644 index e3187eaf..00000000 --- a/test-eol-project/node_modules/yargs/locales/ko.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "명령:", - "Options:": "옵션:", - "Examples:": "예시:", - "boolean": "여부", - "count": "개수", - "string": "문자열", - "number": "숫자", - "array": "배열", - "required": "필수", - "default": "기본", - "default:": "기본:", - "choices:": "선택:", - "aliases:": "별칭:", - "generated-value": "생성된 값", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", - "other": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", - "other": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다" - }, - "Missing argument value: %s": { - "one": "인자값을 받지 못했습니다: %s", - "other": "인자값들을 받지 못했습니다: %s" - }, - "Missing required argument: %s": { - "one": "필수 인자를 받지 못했습니다: %s", - "other": "필수 인자들을 받지 못했습니다: %s" - }, - "Unknown argument: %s": { - "one": "알 수 없는 인자입니다: %s", - "other": "알 수 없는 인자들입니다: %s" - }, - "Invalid values:": "잘못된 값입니다:", - "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", - "Argument check failed: %s": "유효하지 않은 인자입니다: %s", - "Implications failed:": "옵션의 조합이 잘못되었습니다:", - "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", - "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", - "Path to JSON config file": "JSON 설정파일 경로", - "Show help": "도움말을 보여줍니다", - "Show version number": "버전 넘버를 보여줍니다", - "Did you mean %s?": "찾고계신게 %s입니까?", - "Arguments %s and %s are mutually exclusive" : "%s와 %s 인자는 같이 사용될 수 없습니다", - "Positionals:": "위치:", - "command": "명령" -} diff --git a/test-eol-project/node_modules/yargs/locales/nb.json b/test-eol-project/node_modules/yargs/locales/nb.json deleted file mode 100644 index 6f410ed0..00000000 --- a/test-eol-project/node_modules/yargs/locales/nb.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Commands:": "Kommandoer:", - "Options:": "Alternativer:", - "Examples:": "Eksempler:", - "boolean": "boolsk", - "count": "antall", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default": "standard", - "default:": "standard:", - "choices:": "valg:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", - "other": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", - "other": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Mangler argument verdi: %s", - "other": "Mangler argument verdier: %s" - }, - "Missing required argument: %s": { - "one": "Mangler obligatorisk argument: %s", - "other": "Mangler obligatoriske argumenter: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjente argumenter: %s" - }, - "Invalid values:": "Ugyldige verdier:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argumentsjekk mislyktes: %s", - "Implications failed:": "Konsekvensene mislyktes:", - "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/test-eol-project/node_modules/yargs/locales/nl.json b/test-eol-project/node_modules/yargs/locales/nl.json deleted file mode 100644 index 9ff95c55..00000000 --- a/test-eol-project/node_modules/yargs/locales/nl.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Commando's:", - "Options:": "Opties:", - "Examples:": "Voorbeelden:", - "boolean": "booleaans", - "count": "aantal", - "string": "string", - "number": "getal", - "array": "lijst", - "required": "verplicht", - "default": "standaard", - "default:": "standaard:", - "choices:": "keuzes:", - "aliases:": "aliassen:", - "generated-value": "gegenereerde waarde", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", - "other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", - "other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s" - }, - "Missing argument value: %s": { - "one": "Missende argumentwaarde: %s", - "other": "Missende argumentwaarden: %s" - }, - "Missing required argument: %s": { - "one": "Missend verplicht argument: %s", - "other": "Missende verplichte argumenten: %s" - }, - "Unknown argument: %s": { - "one": "Onbekend argument: %s", - "other": "Onbekende argumenten: %s" - }, - "Invalid values:": "Ongeldige waarden:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argumentcontrole mislukt: %s", - "Implications failed:": "Ontbrekende afhankelijke argumenten:", - "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", - "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", - "Path to JSON config file": "Pad naar JSON-config-bestand", - "Show help": "Toon help", - "Show version number": "Toon versienummer", - "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", - "Positionals:": "Positie-afhankelijke argumenten", - "command": "commando" -} diff --git a/test-eol-project/node_modules/yargs/locales/nn.json b/test-eol-project/node_modules/yargs/locales/nn.json deleted file mode 100644 index 24479ac9..00000000 --- a/test-eol-project/node_modules/yargs/locales/nn.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Commands:": "Kommandoar:", - "Options:": "Alternativ:", - "Examples:": "Døme:", - "boolean": "boolsk", - "count": "mengd", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default": "standard", - "default:": "standard:", - "choices:": "val:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", - "other": "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "For mange ikkje-alternativ argument: fekk %s, maksimum %s", - "other": "For mange ikkje-alternativ argument: fekk %s, maksimum %s" - }, - "Missing argument value: %s": { - "one": "Manglar argumentverdi: %s", - "other": "Manglar argumentverdiar: %s" - }, - "Missing required argument: %s": { - "one": "Manglar obligatorisk argument: %s", - "other": "Manglar obligatoriske argument: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjende argument: %s" - }, - "Invalid values:": "Ugyldige verdiar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", - "Argument check failed: %s": "Argumentsjekk mislukkast: %s", - "Implications failed:": "Konsekvensane mislukkast:", - "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/test-eol-project/node_modules/yargs/locales/pirate.json b/test-eol-project/node_modules/yargs/locales/pirate.json deleted file mode 100644 index dcb5cb75..00000000 --- a/test-eol-project/node_modules/yargs/locales/pirate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Commands:": "Choose yer command:", - "Options:": "Options for me hearties!", - "Examples:": "Ex. marks the spot:", - "required": "requi-yar-ed", - "Missing required argument: %s": { - "one": "Ye be havin' to set the followin' argument land lubber: %s", - "other": "Ye be havin' to set the followin' arguments land lubber: %s" - }, - "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer", - "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" -} diff --git a/test-eol-project/node_modules/yargs/locales/pl.json b/test-eol-project/node_modules/yargs/locales/pl.json deleted file mode 100644 index a41d4bd5..00000000 --- a/test-eol-project/node_modules/yargs/locales/pl.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "Commands:": "Polecenia:", - "Options:": "Opcje:", - "Examples:": "Przykłady:", - "boolean": "boolean", - "count": "ilość", - "string": "ciąg znaków", - "number": "liczba", - "array": "tablica", - "required": "wymagany", - "default": "domyślny", - "default:": "domyślny:", - "choices:": "dostępne:", - "aliases:": "aliasy:", - "generated-value": "wygenerowana-wartość", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", - "other": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", - "other": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s" - }, - "Missing argument value: %s": { - "one": "Brak wartości dla argumentu: %s", - "other": "Brak wartości dla argumentów: %s" - }, - "Missing required argument: %s": { - "one": "Brak wymaganego argumentu: %s", - "other": "Brak wymaganych argumentów: %s" - }, - "Unknown argument: %s": { - "one": "Nieznany argument: %s", - "other": "Nieznane argumenty: %s" - }, - "Invalid values:": "Nieprawidłowe wartości:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", - "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", - "Implications failed:": "Założenia nie zostały spełnione:", - "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", - "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", - "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", - "Show help": "Pokaż pomoc", - "Show version number": "Pokaż numer wersji", - "Did you mean %s?": "Czy chodziło Ci o %s?", - "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", - "Positionals:": "Pozycyjne:", - "command": "polecenie" -} diff --git a/test-eol-project/node_modules/yargs/locales/pt.json b/test-eol-project/node_modules/yargs/locales/pt.json deleted file mode 100644 index 0c8ac99c..00000000 --- a/test-eol-project/node_modules/yargs/locales/pt.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "cadeia de caracteres", - "number": "número", - "array": "arranjo", - "required": "requerido", - "default": "padrão", - "default:": "padrão:", - "choices:": "escolhas:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", - "other": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", - "other": "Excesso de argumentos não opcionais: recebido %s, máximo de %s" - }, - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", - "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", - "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", - "Show help": "Mostra ajuda", - "Show version number": "Mostra número de versão", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" -} diff --git a/test-eol-project/node_modules/yargs/locales/pt_BR.json b/test-eol-project/node_modules/yargs/locales/pt_BR.json deleted file mode 100644 index eae1ec60..00000000 --- a/test-eol-project/node_modules/yargs/locales/pt_BR.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "booleano", - "count": "contagem", - "string": "string", - "number": "número", - "array": "array", - "required": "obrigatório", - "default:": "padrão:", - "choices:": "opções:", - "aliases:": "sinônimos:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", - "other": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Excesso de argumentos: recebido %s, máximo de %s", - "other": "Excesso de argumentos: recebido %s, máximo de %s" - }, - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", - "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", - "Path to JSON config file": "Caminho para o arquivo JSON de configuração", - "Show help": "Exibe ajuda", - "Show version number": "Exibe a versão", - "Did you mean %s?": "Você quis dizer %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", - "Positionals:": "Posicionais:", - "command": "comando" -} diff --git a/test-eol-project/node_modules/yargs/locales/ru.json b/test-eol-project/node_modules/yargs/locales/ru.json deleted file mode 100644 index 5f7f7681..00000000 --- a/test-eol-project/node_modules/yargs/locales/ru.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "Команды:", - "Options:": "Опции:", - "Examples:": "Примеры:", - "boolean": "булевый тип", - "count": "подсчет", - "string": "строковой тип", - "number": "число", - "array": "массив", - "required": "необходимо", - "default": "по умолчанию", - "default:": "по умолчанию:", - "choices:": "возможности:", - "aliases:": "алиасы:", - "generated-value": "генерированное значение", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", - "other": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", - "other": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s" - }, - "Missing argument value: %s": { - "one": "Не хватает значения аргумента: %s", - "other": "Не хватает значений аргументов: %s" - }, - "Missing required argument: %s": { - "one": "Не хватает необходимого аргумента: %s", - "other": "Не хватает необходимых аргументов: %s" - }, - "Unknown argument: %s": { - "one": "Неизвестный аргумент: %s", - "other": "Неизвестные аргументы: %s" - }, - "Invalid values:": "Недействительные значения:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", - "Argument check failed: %s": "Проверка аргументов не удалась: %s", - "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", - "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", - "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", - "Path to JSON config file": "Путь к файлу конфигурации JSON", - "Show help": "Показать помощь", - "Show version number": "Показать номер версии", - "Did you mean %s?": "Вы имели в виду %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/th.json b/test-eol-project/node_modules/yargs/locales/th.json deleted file mode 100644 index 33b048e2..00000000 --- a/test-eol-project/node_modules/yargs/locales/th.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Commands:": "คอมมาน", - "Options:": "ออฟชั่น", - "Examples:": "ตัวอย่าง", - "boolean": "บูลีน", - "count": "นับ", - "string": "สตริง", - "number": "ตัวเลข", - "array": "อาเรย์", - "required": "จำเป็น", - "default": "ค่าเริ่มต้", - "default:": "ค่าเริ่มต้น", - "choices:": "ตัวเลือก", - "aliases:": "เอเลียส", - "generated-value": "ค่าที่ถูกสร้างขึ้น", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", - "other": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", - "other": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า" - }, - "Missing argument value: %s": { - "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", - "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" - }, - "Missing required argument: %s": { - "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", - "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" - }, - "Unknown argument: %s": { - "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", - "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" - }, - "Invalid values:": "ค่าไม่ถูกต้อง:", - "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", - "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", - "Implications failed:": "Implications ไม่สำเร็จ:", - "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", - "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", - "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", - "Show help": "ขอความช่วยเหลือ", - "Show version number": "แสดงตัวเลขเวอร์ชั่น", - "Did you mean %s?": "คุณหมายถึง %s?" -} diff --git a/test-eol-project/node_modules/yargs/locales/tr.json b/test-eol-project/node_modules/yargs/locales/tr.json deleted file mode 100644 index 0d0d2ccd..00000000 --- a/test-eol-project/node_modules/yargs/locales/tr.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "Komutlar:", - "Options:": "Seçenekler:", - "Examples:": "Örnekler:", - "boolean": "boolean", - "count": "sayı", - "string": "string", - "number": "numara", - "array": "array", - "required": "zorunlu", - "default": "varsayılan", - "default:": "varsayılan:", - "choices:": "seçimler:", - "aliases:": "takma adlar:", - "generated-value": "oluşturulan-değer", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", - "other": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", - "other": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s" - }, - "Missing argument value: %s": { - "one": "Eksik argüman değeri: %s", - "other": "Eksik argüman değerleri: %s" - }, - "Missing required argument: %s": { - "one": "Eksik zorunlu argüman: %s", - "other": "Eksik zorunlu argümanlar: %s" - }, - "Unknown argument: %s": { - "one": "Bilinmeyen argüman: %s", - "other": "Bilinmeyen argümanlar: %s" - }, - "Invalid values:": "Geçersiz değerler:", - "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", - "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", - "Implications failed:": "Sonuçlar başarısız oldu:", - "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", - "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", - "Path to JSON config file": "JSON yapılandırma dosya konumu", - "Show help": "Yardım detaylarını göster", - "Show version number": "Versiyon detaylarını göster", - "Did you mean %s?": "Bunu mu demek istediniz: %s?", - "Positionals:": "Sıralılar:", - "command": "komut" -} diff --git a/test-eol-project/node_modules/yargs/locales/zh_CN.json b/test-eol-project/node_modules/yargs/locales/zh_CN.json deleted file mode 100644 index 257d26ba..00000000 --- a/test-eol-project/node_modules/yargs/locales/zh_CN.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "选项:", - "Examples:": "示例:", - "boolean": "布尔", - "count": "计数", - "string": "字符串", - "number": "数字", - "array": "数组", - "required": "必需", - "default": "默认值", - "default:": "默认值:", - "choices:": "可选值:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", - "other": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", - "other": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个" - }, - "Missing argument value: %s": { - "one": "没有给此选项指定值:%s", - "other": "没有给这些选项指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必须的选项:%s", - "other": "缺少这些必须的选项:%s" - }, - "Unknown argument: %s": { - "one": "无法识别的选项:%s", - "other": "无法识别这些选项:%s" - }, - "Invalid values:": "无效的选项值:", - "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", - "Argument check failed: %s": "选项值验证失败:%s", - "Implications failed:": "缺少依赖的选项:", - "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", - "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", - "Path to JSON config file": "JSON 配置文件的路径", - "Show help": "显示帮助信息", - "Show version number": "显示版本号", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", - "Positionals:": "位置:", - "command": "命令" -} diff --git a/test-eol-project/node_modules/yargs/locales/zh_TW.json b/test-eol-project/node_modules/yargs/locales/zh_TW.json deleted file mode 100644 index e3c7bcf4..00000000 --- a/test-eol-project/node_modules/yargs/locales/zh_TW.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "選項:", - "Examples:": "例:", - "boolean": "布林", - "count": "次數", - "string": "字串", - "number": "數字", - "array": "陣列", - "required": "必須", - "default": "預設值", - "default:": "預設值:", - "choices:": "可選值:", - "aliases:": "別名:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": { - "one": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", - "other": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個" - }, - "Too many non-option arguments: got %s, maximum of %s": { - "one": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", - "other": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個" - }, - "Missing argument value: %s": { - "one": "此引數無指定值:%s", - "other": "這些引數無指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必須的引數:%s", - "other": "缺少這些必須的引數:%s" - }, - "Unknown argument: %s": { - "one": "未知的引數:%s", - "other": "未知的這些引數:%s" - }, - "Invalid values:": "無效的選項值:", - "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", - "Argument check failed: %s": "引數驗證失敗:%s", - "Implications failed:": "缺少依賴的選項:", - "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", - "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", - "Path to JSON config file": "JSON 設置文件的路徑", - "Show help": "顯示說明", - "Show version number": "顯示版本", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 是互斥的" -} diff --git a/test-eol-project/node_modules/yargs/package.json b/test-eol-project/node_modules/yargs/package.json deleted file mode 100644 index dc3018ae..00000000 --- a/test-eol-project/node_modules/yargs/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "yargs", - "version": "15.4.1", - "description": "yargs the modern, pirate-themed, successor to optimist.", - "main": "./index.js", - "contributors": [ - { - "name": "Yargs Contributors", - "url": "https://github.com/yargs/yargs/graphs/contributors" - } - ], - "files": [ - "index.js", - "yargs.js", - "build", - "locales", - "LICENSE" - ], - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/decamelize": "^1.2.0", - "@types/mocha": "^7.0.2", - "@types/node": "^10.0.3", - "@typescript-eslint/eslint-plugin": "^3.0.0", - "@typescript-eslint/parser": "^3.0.0", - "c8": "^7.0.0", - "chai": "^4.2.0", - "chalk": "^4.0.0", - "coveralls": "^3.0.9", - "cpr": "^3.0.1", - "cross-spawn": "^7.0.0", - "es6-promise": "^4.2.5", - "eslint": "^6.8.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-node": "^11.0.0", - "gts": "^2.0.0-alpha.4", - "hashish": "0.0.4", - "mocha": "^7.0.0", - "rimraf": "^3.0.2", - "standardx": "^5.0.0", - "typescript": "^3.7.0", - "which": "^2.0.0", - "yargs-test-extends": "^1.0.1" - }, - "scripts": { - "fix": "standardx --fix && standardx --fix **/*.ts", - "posttest": "npm run check", - "test": "c8 mocha --require ./test/before.js --timeout=12000 --check-leaks", - "coverage": "c8 report --check-coverage", - "check": "standardx && standardx **/*.ts", - "compile": "rimraf build && tsc", - "prepare": "npm run compile", - "pretest": "npm run compile -- -p tsconfig.test.json" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs.git" - }, - "homepage": "https://yargs.js.org/", - "standardx": { - "ignore": [ - "build", - "**/example/**" - ] - }, - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "license": "MIT", - "engines": { - "node": ">=8" - } -} diff --git a/test-eol-project/node_modules/yargs/yargs.js b/test-eol-project/node_modules/yargs/yargs.js deleted file mode 100644 index 93e8059e..00000000 --- a/test-eol-project/node_modules/yargs/yargs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -// an async function fails early in Node.js versions prior to 8. -async function requiresNode8OrGreater () {} -requiresNode8OrGreater() - -const { Yargs, rebase } = require('./build/lib/yargs') -const Parser = require('yargs-parser') - -exports = module.exports = Yargs -exports.rebase = rebase - -// allow consumers to directly use the version of yargs-parser used by yargs -exports.Parser = Parser
    - - Get professional support for 'camelcase' with a Tidelift subscription - -
    - - Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. -
    -

    If this Deferred is rejected and there are no listeners registered before - * the next turn of the event loop, the rejection will be passed to the - * {@link promise.ControlFlow} as an unhandled failure. - */ - class Deferred { - // region Constructors - - /** - * @param {promise.ControlFlow=} opt_flow The control flow - * this instance was created under. This should only be provided during - * unit tests. - */ - constructor(opt_flow?: ControlFlow); - - // endregion - - static State_: { - BLOCKED: number; - PENDING: number; - REJECTED: number; - RESOLVED: number; - }; - - // region Properties - - /** - * The consumer promise for this instance. Provides protected access to the - * callback registering functions. - */ - promise: Promise; - - // endregion - - // region Methods - - /** - * Rejects this promise. If the error is itself a promise, this instance will - * be chained to it and be rejected with the error's resolved value. - * @param {*=} opt_error The rejection reason, typically either a - * {@code Error} or a {@code string}. - */ - reject(opt_error?: any): void; - errback(opt_error?: any): void; - - /** - * Resolves this promise with the given value. If the value is itself a - * promise and not a reference to this deferred, this instance will wait for - * it before resolving. - * @param {*=} opt_value The resolved value. - */ - fulfill(opt_value?: T): void; - - /** - * Removes all of the listeners previously registered on this deferred. - * @throws {Error} If this deferred has already been resolved. - */ - removeAll(): void; - - // endregion - } - - interface IControlFlowTimer { - clearInterval(ms: number): void; - clearTimeout(ms: number): void; - setInterval(fn: Function, ms: number): number; - setTimeout(fn: Function, ms: number): number; - } - - interface IEventType { - /** Emitted when all tasks have been successfully executed. */ - IDLE: string; - - /** Emitted when a ControlFlow has been reset. */ - RESET: string; - - /** Emitted whenever a new task has been scheduled. */ - SCHEDULE_TASK: string; - - /** - * Emitted whenever a control flow aborts due to an unhandled promise - * rejection. This event will be emitted along with the offending rejection - * reason. Upon emitting this event, the control flow will empty its task - * queue and revert to its initial state. - */ - UNCAUGHT_EXCEPTION: string; - } - - /** - * Handles the execution of scheduled tasks, each of which may be an - * asynchronous operation. The control flow will ensure tasks are executed in - * the ordered scheduled, starting each task only once those before it have - * completed. - * - * Each task scheduled within this flow may return a - * {@link promise.Promise} to indicate it is an asynchronous - * operation. The ControlFlow will wait for such promises to be resolved before - * marking the task as completed. - * - * Tasks and each callback registered on a {@link promise.Promise} - * will be run in their own ControlFlow frame. Any tasks scheduled within a - * frame will take priority over previously scheduled tasks. Furthermore, if any - * of the tasks in the frame fail, the remainder of the tasks in that frame will - * be discarded and the failure will be propagated to the user through the - * callback/task's promised result. - * - * Each time a ControlFlow empties its task queue, it will fire an - * {@link promise.ControlFlow.EventType.IDLE IDLE} event. Conversely, - * whenever the flow terminates due to an unhandled error, it will remove all - * remaining tasks in its queue and fire an - * {@link promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION - * UNCAUGHT_EXCEPTION} event. If there are no listeners registered with the - * flow, the error will be rethrown to the global error handler. - * - * @final - */ - class ControlFlow extends EventEmitter { - /** */ - constructor(); - - /** - * Events that may be emitted by an {@link promise.ControlFlow}. - */ - static EventType: IEventType; - - /** - * Returns a string representation of this control flow, which is its current - * {@link #getSchedule() schedule}, sans task stack traces. - * @return {string} The string representation of this contorl flow. - * @override - */ - toString(): string; - - /** - * Resets this instance, clearing its queue and removing all event listeners. - */ - reset(): void; - - /** - * Generates an annotated string describing the internal state of this control - * flow, including the currently executing as well as pending tasks. If - * {@code opt_includeStackTraces === true}, the string will include the - * stack trace from when each task was scheduled. - * @param {string=} opt_includeStackTraces Whether to include the stack traces - * from when each task was scheduled. Defaults to false. - * @return {string} String representation of this flow's internal state. - */ - getSchedule(opt_includeStackTraces?: boolean): string; - - /** - * Schedules a task for execution. If there is nothing currently in the - * queue, the task will be executed in the next turn of the event loop. If - * the task function is a generator, the task will be executed using - * {@link promise.consume}. - * - * @param {function(): (T|promise.Promise)} fn The function to - * call to start the task. If the function returns a - * {@link promise.Promise}, this instance will wait for it to be - * resolved before starting the next task. - * @param {string=} opt_description A description of the task. - * @return {!promise.Promise} A promise that will be resolved - * with the result of the action. - * @template T - */ - execute(fn: () => T | Promise, opt_description?: string): Promise; - - /** - * Inserts a {@code setTimeout} into the command queue. This is equivalent to - * a thread sleep in a synchronous programming language. - * - * @param {number} ms The timeout delay, in milliseconds. - * @param {string=} opt_description A description to accompany the timeout. - * @return {!promise.Promise} A promise that will be resolved with - * the result of the action. - */ - timeout(ms: number, opt_description?: string): Promise; - - /** - * Schedules a task that shall wait for a condition to hold. Each condition - * function may return any value, but it will always be evaluated as a boolean. - * - * Condition functions may schedule sub-tasks with this instance, however, - * their execution time will be factored into whether a wait has timed out. - * - * In the event a condition returns a Promise, the polling loop will wait for - * it to be resolved before evaluating whether the condition has been satisfied. - * The resolution time for a promise is factored into whether a wait has timed - * out. - * - * If the condition function throws, or returns a rejected promise, the - * wait task will fail. - * - * If the condition is defined as a promise, the flow will wait for it to - * settle. If the timeout expires before the promise settles, the promise - * returned by this function will be rejected. - * - * If this function is invoked with `timeout === 0`, or the timeout is omitted, - * the flow will wait indefinitely for the condition to be satisfied. - * - * @param {(!promise.Promise|function())} condition The condition to poll, - * or a promise to wait on. - * @param {number=} opt_timeout How long to wait, in milliseconds, for the - * condition to hold before timing out. If omitted, the flow will wait - * indefinitely. - * @param {string=} opt_message An optional error message to include if the - * wait times out; defaults to the empty string. - * @return {!promise.Promise} A promise that will be fulfilled - * when the condition has been satisified. The promise shall be rejected if - * the wait times out waiting for the condition. - * @throws {TypeError} If condition is not a function or promise or if timeout - * is not a number >= 0. - * @template T - */ - wait(condition: Promise | Function, opt_timeout?: number, opt_message?: string): Promise; - } -} - -/** - * Defines a condition for use with WebDriver's WebDriver#wait wait command. - */ -export class Condition { - /** - * @param {string} message A descriptive error message. Should complete the - * sentence 'Waiting [...]' - * @param {function(!WebDriver): OUT} fn The condition function to - * evaluate on each iteration of the wait loop. - */ - constructor(message: string, fn: (webdriver: WebDriver) => any); - - /** @return {string} A description of this condition. */ - description(): string; - - fn(webdriver: WebDriver): any; -} - -/** - * Defines a condition that will result in a {@link WebElement}. - */ -export class WebElementCondition extends Condition { - // add an unused private member so the compiler treats this - // class distinct from other Conditions - private _nominal: undefined; -} - -export namespace until { - /** - * Creates a condition that will wait until the input driver is able to switch - * to the designated frame. The target frame may be specified as - * - * 1. a numeric index into - * [window.frames](https://developer.mozilla.org/en-US/docs/Web/API/Window.frames) - * for the currently selected frame. - * 2. a {@link ./WebElement}, which must reference a FRAME or IFRAME - * element on the current page. - * 3. a locator which may be used to first locate a FRAME or IFRAME on the - * current page before attempting to switch to it. - * - * Upon successful resolution of this condition, the driver will be left - * focused on the new frame. - * - * @param {!(number|./WebElement|By| - * function(!./WebDriver): !./WebElement)} frame - * The frame identifier. - * @return {!Condition} A new condition. - */ - function ableToSwitchToFrame( - frame: number | WebElement | By | ((webdriver: WebDriver) => WebElement) | ByHash, - ): Condition; - - /** - * Creates a condition that waits for an alert to be opened. Upon success, the - * returned promise will be fulfilled with the handle for the opened alert. - * - * @return {!Condition} The new condition. - */ - function alertIsPresent(): Condition; - - /** - * Creates a condition that will wait for the given element to be disabled. - * - * @param {!WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#isEnabled - */ - function elementIsDisabled(element: WebElement): WebElementCondition; - - /** - * Creates a condition that will wait for the given element to be enabled. - * - * @param {!WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#isEnabled - */ - function elementIsEnabled(element: WebElement): WebElementCondition; - - /** - * Creates a condition that will wait for the given element to be deselected. - * - * @param {!WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#isSelected - */ - function elementIsNotSelected(element: WebElement): WebElementCondition; - - /** - * Creates a condition that will wait for the given element to be in the DOM, - * yet not visible to the user. - * - * @param {!WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#isDisplayed - */ - function elementIsNotVisible(element: WebElement): WebElementCondition; - - /** - * Creates a condition that will wait for the given element to be selected. - * @param {!WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#isSelected - */ - function elementIsSelected(element: WebElement): WebElementCondition; - - /** - * Creates a condition that will wait for the given element to become visible. - * - * @param {!WebElement} element The element to test. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#isDisplayed - */ - function elementIsVisible(element: WebElement): WebElementCondition; - - /** - * Creates a condition that will loop until an element is - * {@link ./WebDriver#findElement found} with the given locator. - * - * @param {!(By|Function)} locator The locator to use. - * @return {!WebElementCondition} The new condition. - */ - function elementLocated(locator: Locator): WebElementCondition; - - /** - * Creates a condition that will wait for the given element's - * {@link WebDriver#getText visible text} to contain the given - * substring. - * - * @param {!WebElement} element The element to test. - * @param {string} substr The substring to search for. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#getText - */ - function elementTextContains(element: WebElement, substr: string): WebElementCondition; - - /** - * Creates a condition that will wait for the given element's - * {@link WebDriver#getText visible text} to match the given - * {@code text} exactly. - * - * @param {!WebElement} element The element to test. - * @param {string} text The expected text. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#getText - */ - function elementTextIs(element: WebElement, text: string): WebElementCondition; - - /** - * Creates a condition that will wait for the given element's - * {@link WebDriver#getText visible text} to match a regular - * expression. - * - * @param {!WebElement} element The element to test. - * @param {!RegExp} regex The regular expression to test against. - * @return {!WebElementCondition} The new condition. - * @see WebDriver#getText - */ - function elementTextMatches(element: WebElement, regex: RegExp): WebElementCondition; - - /** - * Creates a condition that will loop until at least one element is - * {@link WebDriver#findElement found} with the given locator. - * - * @param {!(Locator|By.Hash|Function)} locator The locator - * to use. - * @return {!Condition.>} The new - * condition. - */ - function elementsLocated(locator: Locator): Condition; - - /** - * Creates a condition that will wait for the given element to become stale. An - * element is considered stale once it is removed from the DOM, or a new page - * has loaded. - * - * @param {!WebElement} element The element that should become stale. - * @return {!Condition} The new condition. - */ - function stalenessOf(element: WebElement): Condition; - - /** - * Creates a condition that will wait for the current page's title to contain - * the given substring. - * - * @param {string} substr The substring that should be present in the page - * title. - * @return {!Condition.} The new condition. - */ - function titleContains(substr: string): Condition; - - /** - * Creates a condition that will wait for the current page's title to match the - * given value. - * - * @param {string} title The expected page title. - * @return {!Condition} The new condition. - */ - function titleIs(title: string): Condition; - - /** - * Creates a condition that will wait for the current page's title to match the - * given regular expression. - * - * @param {!RegExp} regex The regular expression to test against. - * @return {!Condition.} The new condition. - */ - function titleMatches(regex: RegExp): Condition; - - /** - * Creates a condition that will wait for the current page's url to contain - * the given substring. - * - * @param {string} substrUrl The substring that should be present in the current - * URL. - * @return {!Condition} The new condition. - */ - function urlContains(substrUrl: string): Condition; - - /** - * Creates a condition that will wait for the current page's url to match the - * given value. - * - * @param {string} url The expected page url. - * @return {!Condition} The new condition. - */ - function urlIs(url: string): Condition; - - /** - * Creates a condition that will wait for the current page's url to match the - * given regular expression. - * - * @param {!RegExp} regex The regular expression to test against. - * @return {!Condition} The new condition. - */ - function urlMatches(regex: RegExp): Condition; -} - -export interface ILocation { - x: number; - y: number; -} - -export interface ISize { - width: number; - height: number; -} - -export interface IButton { - LEFT: string; - MIDDLE: string; - RIGHT: string; -} - -/** - * Representations of pressable keys that aren't text. These are stored in - * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to - * http://www.google.com.au/search?&q=unicode+pua&btnG=Search - */ -export const Button: IButton; - -export interface IKey { - NULL: string; - CANCEL: string; // ^break - HELP: string; - BACK_SPACE: string; - TAB: string; - CLEAR: string; - RETURN: string; - ENTER: string; - SHIFT: string; - CONTROL: string; - ALT: string; - PAUSE: string; - ESCAPE: string; - SPACE: string; - PAGE_UP: string; - PAGE_DOWN: string; - END: string; - HOME: string; - ARROW_LEFT: string; - LEFT: string; - ARROW_UP: string; - UP: string; - ARROW_RIGHT: string; - RIGHT: string; - ARROW_DOWN: string; - DOWN: string; - INSERT: string; - DELETE: string; - SEMICOLON: string; - EQUALS: string; - - NUMPAD0: string; // number pad keys - NUMPAD1: string; - NUMPAD2: string; - NUMPAD3: string; - NUMPAD4: string; - NUMPAD5: string; - NUMPAD6: string; - NUMPAD7: string; - NUMPAD8: string; - NUMPAD9: string; - MULTIPLY: string; - ADD: string; - SEPARATOR: string; - SUBTRACT: string; - DECIMAL: string; - DIVIDE: string; - - F1: string; // function keys - F2: string; - F3: string; - F4: string; - F5: string; - F6: string; - F7: string; - F8: string; - F9: string; - F10: string; - F11: string; - F12: string; - - COMMAND: string; // Apple command key - META: string; // alias for Windows key - - /** - * Simulate pressing many keys at once in a 'chord'. Takes a sequence of - * keys or strings, appends each of the values to a string, - * and adds the chord termination key ({@link Key.NULL}) and returns - * the resulting string. - * - * Note: when the low-level webdriver key handlers see Keys.NULL, active - * modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event. - * - * @param {...string} var_args The key sequence to concatenate. - * @return {string} The null-terminated key sequence. - */ - chord(...var_args: Array): string; -} - -/** - * Representations of pressable keys that aren't text. These are stored in - * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to - * http://www.google.com.au/search?&q=unicode+pua&btnG=Search - */ -export const Key: IKey; - -/** - * Class for defining sequences of complex user interactions. Each sequence - * will not be executed until {@link #perform} is called. - * - * Example: - * - * new ActionSequence(driver). - * keyDown(Key.SHIFT). - * click(element1). - * click(element2). - * dragAndDrop(element3, element4). - * keyUp(Key.SHIFT). - * perform(); - */ -export class ActionSequence { - // region Constructors - - /** - * @param {!WebDriver} driver The driver instance to use. - */ - constructor(driver: WebDriver); - - // endregion - - // region Methods - - /** - * Executes this action sequence. - * @return {!promise.Promise} A promise that will be resolved once - * this sequence has completed. - */ - perform(): promise.Promise; - - /** - * Moves the mouse. The location to move to may be specified in terms of the - * mouse's current location, an offset relative to the top-left corner of an - * element, or an element (in which case the middle of the element is used). - * - * @param {(!./WebElement|{x: number, y: number})} location The - * location to drag to, as either another WebElement or an offset in - * pixels. - * @param {{x: number, y: number}=} opt_offset If the target {@code location} - * is defined as a {@link ./WebElement}, this parameter defines - * an offset within that element. The offset should be specified in pixels - * relative to the top-left corner of the element's bounding box. If - * omitted, the element's center will be used as the target offset. - * @return {!ActionSequence} A self reference. - */ - mouseMove(location: WebElement | ILocation, opt_offset?: ILocation): ActionSequence; - - /** - * Presses a mouse button. The mouse button will not be released until - * {@link #mouseUp} is called, regardless of whether that call is made in this - * sequence or another. The behavior for out-of-order events (e.g. mouseDown, - * click) is undefined. - * - * If an element is provided, the mouse will first be moved to the center - * of that element. This is equivalent to: - * - * sequence.mouseMove(element).mouseDown() - * - * Warning: this method currently only supports the left mouse button. See - * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047). - * - * @param {(./WebElement|input.Button)=} opt_elementOrButton Either - * the element to interact with or the button to click with. - * Defaults to {@link input.Button.LEFT} if neither an element nor - * button is specified. - * @param {input.Button=} opt_button The button to use. Defaults to - * {@link input.Button.LEFT}. Ignored if a button is provided as the - * first argument. - * @return {!ActionSequence} A self reference. - */ - mouseDown(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; - - /** - * Releases a mouse button. Behavior is undefined for calling this function - * without a previous call to {@link #mouseDown}. - * - * If an element is provided, the mouse will first be moved to the center - * of that element. This is equivalent to: - * - * sequence.mouseMove(element).mouseUp() - * - * Warning: this method currently only supports the left mouse button. See - * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047). - * - * @param {(./WebElement|input.Button)=} opt_elementOrButton Either - * the element to interact with or the button to click with. - * Defaults to {@link input.Button.LEFT} if neither an element nor - * button is specified. - * @param {input.Button=} opt_button The button to use. Defaults to - * {@link input.Button.LEFT}. Ignored if a button is provided as the - * first argument. - * @return {!ActionSequence} A self reference. - */ - mouseUp(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; - - /** - * Convenience function for performing a 'drag and drop' manuever. The target - * element may be moved to the location of another element, or by an offset (in - * pixels). - * - * @param {!./WebElement} element The element to drag. - * @param {(!./WebElement|{x: number, y: number})} location The - * location to drag to, either as another WebElement or an offset in - * pixels. - * @return {!ActionSequence} A self reference. - */ - dragAndDrop(element: WebElement, location: WebElement | ILocation): ActionSequence; - - /** - * Clicks a mouse button. - * - * If an element is provided, the mouse will first be moved to the center - * of that element. This is equivalent to: - * - * sequence.mouseMove(element).click() - * - * @param {(./WebElement|input.Button)=} opt_elementOrButton Either - * the element to interact with or the button to click with. - * Defaults to {@link input.Button.LEFT} if neither an element nor - * button is specified. - * @param {input.Button=} opt_button The button to use. Defaults to - * {@link input.Button.LEFT}. Ignored if a button is provided as the - * first argument. - * @return {!ActionSequence} A self reference. - */ - click(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; - - /** - * Double-clicks a mouse button. - * - * If an element is provided, the mouse will first be moved to the center of - * that element. This is equivalent to: - * - * sequence.mouseMove(element).doubleClick() - * - * Warning: this method currently only supports the left mouse button. See - * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047). - * - * @param {(./WebElement|input.Button)=} opt_elementOrButton Either - * the element to interact with or the button to click with. - * Defaults to {@link input.Button.LEFT} if neither an element nor - * button is specified. - * @param {input.Button=} opt_button The button to use. Defaults to - * {@link input.Button.LEFT}. Ignored if a button is provided as the - * first argument. - * @return {!ActionSequence} A self reference. - */ - doubleClick(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; - - /** - * Performs a modifier key press. The modifier key is not released - * until {@link #keyUp} or {@link #sendKeys} is called. The key press will be - * targetted at the currently focused element. - * @param {!Key} key The modifier key to push. Must be one of - * {ALT, CONTROL, SHIFT, COMMAND, META}. - * @return {!ActionSequence} A self reference. - * @throws {Error} If the key is not a valid modifier key. - */ - keyDown(key: string): ActionSequence; - - /** - * Performs a modifier key release. The release is targetted at the currently - * focused element. - * @param {!Key} key The modifier key to release. Must be one of - * {ALT, CONTROL, SHIFT, COMMAND, META}. - * @return {!ActionSequence} A self reference. - * @throws {Error} If the key is not a valid modifier key. - */ - keyUp(key: string): ActionSequence; - - /** - * Simulates typing multiple keys. Each modifier key encountered in the - * sequence will not be released until it is encountered again. All key events - * will be targeted at the currently focused element. - * - * @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args - * The keys to type. - * @return {!ActionSequence} A self reference. - * @throws {Error} If the key is not a valid modifier key. - */ - sendKeys(...var_args: Array>): ActionSequence; - - // endregion -} - -/** - * Class for defining sequences of user touch interactions. Each sequence - * will not be executed until {@link #perform} is called. - * - * Example: - * - * new TouchSequence(driver). - * tapAndHold({x: 0, y: 0}). - * move({x: 3, y: 4}). - * release({x: 10, y: 10}). - * perform(); - */ -export class TouchSequence { - /* - * @param {!WebDriver} driver The driver instance to use. - * @constructor - */ - constructor(driver: WebDriver); - - /** - * Executes this action sequence. - * @return {!promise.Promise} A promise that will be resolved once - * this sequence has completed. - */ - perform(): promise.Promise; - - /** - * Taps an element. - * - * @param {!WebElement} elem The element to tap. - * @return {!TouchSequence} A self reference. - */ - tap(elem: WebElement): TouchSequence; - - /** - * Double taps an element. - * - * @param {!WebElement} elem The element to double tap. - * @return {!TouchSequence} A self reference. - */ - doubleTap(elem: WebElement): TouchSequence; - - /** - * Long press on an element. - * - * @param {!WebElement} elem The element to long press. - * @return {!TouchSequence} A self reference. - */ - longPress(elem: WebElement): TouchSequence; - - /** - * Touch down at the given location. - * - * @param {{ x: number, y: number }} location The location to touch down at. - * @return {!TouchSequence} A self reference. - */ - tapAndHold(location: ILocation): TouchSequence; - - /** - * Move a held {@linkplain #tapAndHold touch} to the specified location. - * - * @param {{x: number, y: number}} location The location to move to. - * @return {!TouchSequence} A self reference. - */ - move(location: ILocation): TouchSequence; - - /** - * Release a held {@linkplain #tapAndHold touch} at the specified location. - * - * @param {{x: number, y: number}} location The location to release at. - * @return {!TouchSequence} A self reference. - */ - release(location: ILocation): TouchSequence; - - /** - * Scrolls the touch screen by the given offset. - * - * @param {{x: number, y: number}} offset The offset to scroll to. - * @return {!TouchSequence} A self reference. - */ - scroll(offset: IOffset): TouchSequence; - - /** - * Scrolls the touch screen, starting on `elem` and moving by the specified - * offset. - * - * @param {!WebElement} elem The element where scroll starts. - * @param {{x: number, y: number}} offset The offset to scroll to. - * @return {!TouchSequence} A self reference. - */ - scrollFromElement(elem: WebElement, offset: IOffset): TouchSequence; - - /** - * Flick, starting anywhere on the screen, at speed xspeed and yspeed. - * - * @param {{xspeed: number, yspeed: number}} speed The speed to flick in each - direction, in pixels per second. - * @return {!TouchSequence} A self reference. - */ - flick(speed: ISpeed): TouchSequence; - - /** - * Flick starting at elem and moving by x and y at specified speed. - * - * @param {!WebElement} elem The element where flick starts. - * @param {{x: number, y: number}} offset The offset to flick to. - * @param {number} speed The speed to flick at in pixels per second. - * @return {!TouchSequence} A self reference. - */ - flickElement(elem: WebElement, offset: IOffset, speed: number): TouchSequence; -} - -export interface IOffset { - x: number; - y: number; -} - -export interface ISpeed { - xspeed: number; - yspeed: number; -} - -/** - * Represents a modal dialog such as {@code alert}, {@code confirm}, or - * {@code prompt}. Provides functions to retrieve the message displayed with - * the alert, accept or dismiss the alert, and set the response text (in the - * case of {@code prompt}). - */ -export class Alert { - /** - * @param {!WebDriver} driver The driver controlling the browser this alert - * is attached to. - * @param {string} text The message text displayed with this alert. - */ - constructor(driver: WebDriver, text: string); - - // region Methods - - /** - * Retrieves the message text displayed with this alert. For instance, if the - * alert were opened with alert('hello'), then this would return 'hello'. - * @return {!promise.Promise} A promise that will be resolved to the - * text displayed with this alert. - */ - getText(): promise.Promise; - - /** - * Sets the username and password in an alert prompting for credentials (such - * as a Basic HTTP Auth prompt). This method will implicitly - * {@linkplain #accept() submit} the dialog. - * - * @param {string} username The username to send. - * @param {string} password The password to send. - * @return {!promise.Promise} A promise that will be resolved when this - * command has completed. - */ - authenticateAs(username: string, password: string): promise.Promise; - - /** - * Accepts this alert. - * @return {!promise.Promise} A promise that will be resolved when - * this command has completed. - */ - accept(): promise.Promise; - - /** - * Dismisses this alert. - * @return {!promise.Promise} A promise that will be resolved when - * this command has completed. - */ - dismiss(): promise.Promise; - - /** - * Sets the response text on this alert. This command will return an error if - * the underlying alert does not support response text (e.g. window.alert and - * window.confirm). - * @param {string} text The text to set. - * @return {!promise.Promise} A promise that will be resolved when - * this command has completed. - */ - sendKeys(text: string): promise.Promise; - - // endregion -} - -/** - * AlertPromise is a promise that will be fulfilled with an Alert. This promise - * serves as a forward proxy on an Alert, allowing calls to be scheduled - * directly on this instance before the underlying Alert has been fulfilled. In - * other words, the following two statements are equivalent: - * - * driver.switchTo().alert().dismiss(); - * driver.switchTo().alert().then(function(alert) { - * return alert.dismiss(); - * }); - * - * @final - */ -export interface AlertPromise extends promise.IThenable {} -export class AlertPromise extends Alert { - /** - * @param {!WebDriver} driver The driver controlling the browser this - * alert is attached to. - * @param {!promise.Thenable} alert A thenable - * that will be fulfilled with the promised alert. - */ - constructor(driver: WebDriver, alert: promise.Promise); -} - -/** - * Recognized browser names. - */ -export interface IBrowser { - ANDROID: string; - CHROME: string; - EDGE: string; - FIREFOX: string; - IE: string; - INTERNET_EXPLORER: string; - IPAD: string; - IPHONE: string; - OPERA: string; - PHANTOM_JS: string; - SAFARI: string; - HTMLUNIT: string; -} - -export const Browser: IBrowser; - -export interface ProxyConfig { - proxyType: string; - proxyAutoconfigUrl?: string | undefined; - ftpProxy?: string | undefined; - httpProxy?: string | undefined; - sslProxy?: string | undefined; - noProxy?: string | undefined; - socksProxy?: string | undefined; - socksUsername?: string | undefined; - socksPassword?: string | undefined; -} - -/** - * Creates new {@link WebDriver WebDriver} instances. The environment - * variables listed below may be used to override a builder's configuration, - * allowing quick runtime changes. - * - * - {@code SELENIUM_BROWSER}: defines the target browser in the form - * {@code browser[:version][:platform]}. - * - * - {@code SELENIUM_REMOTE_URL}: defines the remote URL for all builder - * instances. This environment variable should be set to a fully qualified - * URL for a WebDriver server (e.g. http://localhost:4444/wd/hub). This - * option always takes precedence over {@code SELENIUM_SERVER_JAR}. - * - * - {@code SELENIUM_SERVER_JAR}: defines the path to the - * - * standalone Selenium server jar to use. The server will be started the - * first time a WebDriver instance and be killed when the process exits. - * - * Suppose you had mytest.js that created WebDriver with - * - * var driver = new Builder() - * .forBrowser('chrome') - * .build(); - * - * This test could be made to use Firefox on the local machine by running with - * `SELENIUM_BROWSER=firefox node mytest.js`. Rather than change the code to - * target Google Chrome on a remote machine, you can simply set the - * `SELENIUM_BROWSER` and `SELENIUM_REMOTE_URL` environment variables: - * - * SELENIUM_BROWSER=chrome:36:LINUX \ - * SELENIUM_REMOTE_URL=http://www.example.com:4444/wd/hub \ - * node mytest.js - * - * You could also use a local copy of the standalone Selenium server: - * - * SELENIUM_BROWSER=chrome:36:LINUX \ - * SELENIUM_SERVER_JAR=/path/to/selenium-server-standalone.jar \ - * node mytest.js - */ -export class Builder { - // region Constructors - - /** */ - constructor(); - - // endregion - - // region Methods - - /** - * Configures this builder to ignore any environment variable overrides and to - * only use the configuration specified through this instance's API. - * - * @return {!Builder} A self reference. - */ - disableEnvironmentOverrides(): Builder; - - /** - * Creates a new WebDriver client based on this builder's current - * configuration. - * - * This method will return a {@linkplain ThenableWebDriver} instance, allowing - * users to issue commands directly without calling `then()`. The returned - * thenable wraps a promise that will resolve to a concrete - * {@linkplain webdriver.WebDriver WebDriver} instance. The promise will be - * rejected if the remote end fails to create a new session. - * - * @return {!ThenableWebDriver} A new WebDriver instance. - * @throws {Error} If the current configuration is invalid. - */ - build(): ThenableWebDriver; - - /** - * Configures the target browser for clients created by this instance. - * Any calls to {@link #withCapabilities} after this function will - * overwrite these settings. - * - *

    + + Get professional support for 'camelcase' with a Tidelift subscription + +
    + + Tidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies. +
    +

    If this Deferred is rejected and there are no listeners registered before + * the next turn of the event loop, the rejection will be passed to the + * {@link promise.ControlFlow} as an unhandled failure. + */ + class Deferred { + // region Constructors + + /** + * @param {promise.ControlFlow=} opt_flow The control flow + * this instance was created under. This should only be provided during + * unit tests. + */ + constructor(opt_flow?: ControlFlow); + + // endregion + + static State_: { + BLOCKED: number; + PENDING: number; + REJECTED: number; + RESOLVED: number; + }; + + // region Properties + + /** + * The consumer promise for this instance. Provides protected access to the + * callback registering functions. + */ + promise: Promise; + + // endregion + + // region Methods + + /** + * Rejects this promise. If the error is itself a promise, this instance will + * be chained to it and be rejected with the error's resolved value. + * @param {*=} opt_error The rejection reason, typically either a + * {@code Error} or a {@code string}. + */ + reject(opt_error?: any): void; + errback(opt_error?: any): void; + + /** + * Resolves this promise with the given value. If the value is itself a + * promise and not a reference to this deferred, this instance will wait for + * it before resolving. + * @param {*=} opt_value The resolved value. + */ + fulfill(opt_value?: T): void; + + /** + * Removes all of the listeners previously registered on this deferred. + * @throws {Error} If this deferred has already been resolved. + */ + removeAll(): void; + + // endregion + } + + interface IControlFlowTimer { + clearInterval(ms: number): void; + clearTimeout(ms: number): void; + setInterval(fn: Function, ms: number): number; + setTimeout(fn: Function, ms: number): number; + } + + interface IEventType { + /** Emitted when all tasks have been successfully executed. */ + IDLE: string; + + /** Emitted when a ControlFlow has been reset. */ + RESET: string; + + /** Emitted whenever a new task has been scheduled. */ + SCHEDULE_TASK: string; + + /** + * Emitted whenever a control flow aborts due to an unhandled promise + * rejection. This event will be emitted along with the offending rejection + * reason. Upon emitting this event, the control flow will empty its task + * queue and revert to its initial state. + */ + UNCAUGHT_EXCEPTION: string; + } + + /** + * Handles the execution of scheduled tasks, each of which may be an + * asynchronous operation. The control flow will ensure tasks are executed in + * the ordered scheduled, starting each task only once those before it have + * completed. + * + * Each task scheduled within this flow may return a + * {@link promise.Promise} to indicate it is an asynchronous + * operation. The ControlFlow will wait for such promises to be resolved before + * marking the task as completed. + * + * Tasks and each callback registered on a {@link promise.Promise} + * will be run in their own ControlFlow frame. Any tasks scheduled within a + * frame will take priority over previously scheduled tasks. Furthermore, if any + * of the tasks in the frame fail, the remainder of the tasks in that frame will + * be discarded and the failure will be propagated to the user through the + * callback/task's promised result. + * + * Each time a ControlFlow empties its task queue, it will fire an + * {@link promise.ControlFlow.EventType.IDLE IDLE} event. Conversely, + * whenever the flow terminates due to an unhandled error, it will remove all + * remaining tasks in its queue and fire an + * {@link promise.ControlFlow.EventType.UNCAUGHT_EXCEPTION + * UNCAUGHT_EXCEPTION} event. If there are no listeners registered with the + * flow, the error will be rethrown to the global error handler. + * + * @final + */ + class ControlFlow extends EventEmitter { + /** */ + constructor(); + + /** + * Events that may be emitted by an {@link promise.ControlFlow}. + */ + static EventType: IEventType; + + /** + * Returns a string representation of this control flow, which is its current + * {@link #getSchedule() schedule}, sans task stack traces. + * @return {string} The string representation of this contorl flow. + * @override + */ + toString(): string; + + /** + * Resets this instance, clearing its queue and removing all event listeners. + */ + reset(): void; + + /** + * Generates an annotated string describing the internal state of this control + * flow, including the currently executing as well as pending tasks. If + * {@code opt_includeStackTraces === true}, the string will include the + * stack trace from when each task was scheduled. + * @param {string=} opt_includeStackTraces Whether to include the stack traces + * from when each task was scheduled. Defaults to false. + * @return {string} String representation of this flow's internal state. + */ + getSchedule(opt_includeStackTraces?: boolean): string; + + /** + * Schedules a task for execution. If there is nothing currently in the + * queue, the task will be executed in the next turn of the event loop. If + * the task function is a generator, the task will be executed using + * {@link promise.consume}. + * + * @param {function(): (T|promise.Promise)} fn The function to + * call to start the task. If the function returns a + * {@link promise.Promise}, this instance will wait for it to be + * resolved before starting the next task. + * @param {string=} opt_description A description of the task. + * @return {!promise.Promise} A promise that will be resolved + * with the result of the action. + * @template T + */ + execute(fn: () => T | Promise, opt_description?: string): Promise; + + /** + * Inserts a {@code setTimeout} into the command queue. This is equivalent to + * a thread sleep in a synchronous programming language. + * + * @param {number} ms The timeout delay, in milliseconds. + * @param {string=} opt_description A description to accompany the timeout. + * @return {!promise.Promise} A promise that will be resolved with + * the result of the action. + */ + timeout(ms: number, opt_description?: string): Promise; + + /** + * Schedules a task that shall wait for a condition to hold. Each condition + * function may return any value, but it will always be evaluated as a boolean. + * + * Condition functions may schedule sub-tasks with this instance, however, + * their execution time will be factored into whether a wait has timed out. + * + * In the event a condition returns a Promise, the polling loop will wait for + * it to be resolved before evaluating whether the condition has been satisfied. + * The resolution time for a promise is factored into whether a wait has timed + * out. + * + * If the condition function throws, or returns a rejected promise, the + * wait task will fail. + * + * If the condition is defined as a promise, the flow will wait for it to + * settle. If the timeout expires before the promise settles, the promise + * returned by this function will be rejected. + * + * If this function is invoked with `timeout === 0`, or the timeout is omitted, + * the flow will wait indefinitely for the condition to be satisfied. + * + * @param {(!promise.Promise|function())} condition The condition to poll, + * or a promise to wait on. + * @param {number=} opt_timeout How long to wait, in milliseconds, for the + * condition to hold before timing out. If omitted, the flow will wait + * indefinitely. + * @param {string=} opt_message An optional error message to include if the + * wait times out; defaults to the empty string. + * @return {!promise.Promise} A promise that will be fulfilled + * when the condition has been satisified. The promise shall be rejected if + * the wait times out waiting for the condition. + * @throws {TypeError} If condition is not a function or promise or if timeout + * is not a number >= 0. + * @template T + */ + wait(condition: Promise | Function, opt_timeout?: number, opt_message?: string): Promise; + } +} + +/** + * Defines a condition for use with WebDriver's WebDriver#wait wait command. + */ +export class Condition { + /** + * @param {string} message A descriptive error message. Should complete the + * sentence 'Waiting [...]' + * @param {function(!WebDriver): OUT} fn The condition function to + * evaluate on each iteration of the wait loop. + */ + constructor(message: string, fn: (webdriver: WebDriver) => any); + + /** @return {string} A description of this condition. */ + description(): string; + + fn(webdriver: WebDriver): any; +} + +/** + * Defines a condition that will result in a {@link WebElement}. + */ +export class WebElementCondition extends Condition { + // add an unused private member so the compiler treats this + // class distinct from other Conditions + private _nominal: undefined; +} + +export namespace until { + /** + * Creates a condition that will wait until the input driver is able to switch + * to the designated frame. The target frame may be specified as + * + * 1. a numeric index into + * [window.frames](https://developer.mozilla.org/en-US/docs/Web/API/Window.frames) + * for the currently selected frame. + * 2. a {@link ./WebElement}, which must reference a FRAME or IFRAME + * element on the current page. + * 3. a locator which may be used to first locate a FRAME or IFRAME on the + * current page before attempting to switch to it. + * + * Upon successful resolution of this condition, the driver will be left + * focused on the new frame. + * + * @param {!(number|./WebElement|By| + * function(!./WebDriver): !./WebElement)} frame + * The frame identifier. + * @return {!Condition} A new condition. + */ + function ableToSwitchToFrame( + frame: number | WebElement | By | ((webdriver: WebDriver) => WebElement) | ByHash, + ): Condition; + + /** + * Creates a condition that waits for an alert to be opened. Upon success, the + * returned promise will be fulfilled with the handle for the opened alert. + * + * @return {!Condition} The new condition. + */ + function alertIsPresent(): Condition; + + /** + * Creates a condition that will wait for the given element to be disabled. + * + * @param {!WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#isEnabled + */ + function elementIsDisabled(element: WebElement): WebElementCondition; + + /** + * Creates a condition that will wait for the given element to be enabled. + * + * @param {!WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#isEnabled + */ + function elementIsEnabled(element: WebElement): WebElementCondition; + + /** + * Creates a condition that will wait for the given element to be deselected. + * + * @param {!WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#isSelected + */ + function elementIsNotSelected(element: WebElement): WebElementCondition; + + /** + * Creates a condition that will wait for the given element to be in the DOM, + * yet not visible to the user. + * + * @param {!WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#isDisplayed + */ + function elementIsNotVisible(element: WebElement): WebElementCondition; + + /** + * Creates a condition that will wait for the given element to be selected. + * @param {!WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#isSelected + */ + function elementIsSelected(element: WebElement): WebElementCondition; + + /** + * Creates a condition that will wait for the given element to become visible. + * + * @param {!WebElement} element The element to test. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#isDisplayed + */ + function elementIsVisible(element: WebElement): WebElementCondition; + + /** + * Creates a condition that will loop until an element is + * {@link ./WebDriver#findElement found} with the given locator. + * + * @param {!(By|Function)} locator The locator to use. + * @return {!WebElementCondition} The new condition. + */ + function elementLocated(locator: Locator): WebElementCondition; + + /** + * Creates a condition that will wait for the given element's + * {@link WebDriver#getText visible text} to contain the given + * substring. + * + * @param {!WebElement} element The element to test. + * @param {string} substr The substring to search for. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#getText + */ + function elementTextContains(element: WebElement, substr: string): WebElementCondition; + + /** + * Creates a condition that will wait for the given element's + * {@link WebDriver#getText visible text} to match the given + * {@code text} exactly. + * + * @param {!WebElement} element The element to test. + * @param {string} text The expected text. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#getText + */ + function elementTextIs(element: WebElement, text: string): WebElementCondition; + + /** + * Creates a condition that will wait for the given element's + * {@link WebDriver#getText visible text} to match a regular + * expression. + * + * @param {!WebElement} element The element to test. + * @param {!RegExp} regex The regular expression to test against. + * @return {!WebElementCondition} The new condition. + * @see WebDriver#getText + */ + function elementTextMatches(element: WebElement, regex: RegExp): WebElementCondition; + + /** + * Creates a condition that will loop until at least one element is + * {@link WebDriver#findElement found} with the given locator. + * + * @param {!(Locator|By.Hash|Function)} locator The locator + * to use. + * @return {!Condition.>} The new + * condition. + */ + function elementsLocated(locator: Locator): Condition; + + /** + * Creates a condition that will wait for the given element to become stale. An + * element is considered stale once it is removed from the DOM, or a new page + * has loaded. + * + * @param {!WebElement} element The element that should become stale. + * @return {!Condition} The new condition. + */ + function stalenessOf(element: WebElement): Condition; + + /** + * Creates a condition that will wait for the current page's title to contain + * the given substring. + * + * @param {string} substr The substring that should be present in the page + * title. + * @return {!Condition.} The new condition. + */ + function titleContains(substr: string): Condition; + + /** + * Creates a condition that will wait for the current page's title to match the + * given value. + * + * @param {string} title The expected page title. + * @return {!Condition} The new condition. + */ + function titleIs(title: string): Condition; + + /** + * Creates a condition that will wait for the current page's title to match the + * given regular expression. + * + * @param {!RegExp} regex The regular expression to test against. + * @return {!Condition.} The new condition. + */ + function titleMatches(regex: RegExp): Condition; + + /** + * Creates a condition that will wait for the current page's url to contain + * the given substring. + * + * @param {string} substrUrl The substring that should be present in the current + * URL. + * @return {!Condition} The new condition. + */ + function urlContains(substrUrl: string): Condition; + + /** + * Creates a condition that will wait for the current page's url to match the + * given value. + * + * @param {string} url The expected page url. + * @return {!Condition} The new condition. + */ + function urlIs(url: string): Condition; + + /** + * Creates a condition that will wait for the current page's url to match the + * given regular expression. + * + * @param {!RegExp} regex The regular expression to test against. + * @return {!Condition} The new condition. + */ + function urlMatches(regex: RegExp): Condition; +} + +export interface ILocation { + x: number; + y: number; +} + +export interface ISize { + width: number; + height: number; +} + +export interface IButton { + LEFT: string; + MIDDLE: string; + RIGHT: string; +} + +/** + * Representations of pressable keys that aren't text. These are stored in + * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to + * http://www.google.com.au/search?&q=unicode+pua&btnG=Search + */ +export const Button: IButton; + +export interface IKey { + NULL: string; + CANCEL: string; // ^break + HELP: string; + BACK_SPACE: string; + TAB: string; + CLEAR: string; + RETURN: string; + ENTER: string; + SHIFT: string; + CONTROL: string; + ALT: string; + PAUSE: string; + ESCAPE: string; + SPACE: string; + PAGE_UP: string; + PAGE_DOWN: string; + END: string; + HOME: string; + ARROW_LEFT: string; + LEFT: string; + ARROW_UP: string; + UP: string; + ARROW_RIGHT: string; + RIGHT: string; + ARROW_DOWN: string; + DOWN: string; + INSERT: string; + DELETE: string; + SEMICOLON: string; + EQUALS: string; + + NUMPAD0: string; // number pad keys + NUMPAD1: string; + NUMPAD2: string; + NUMPAD3: string; + NUMPAD4: string; + NUMPAD5: string; + NUMPAD6: string; + NUMPAD7: string; + NUMPAD8: string; + NUMPAD9: string; + MULTIPLY: string; + ADD: string; + SEPARATOR: string; + SUBTRACT: string; + DECIMAL: string; + DIVIDE: string; + + F1: string; // function keys + F2: string; + F3: string; + F4: string; + F5: string; + F6: string; + F7: string; + F8: string; + F9: string; + F10: string; + F11: string; + F12: string; + + COMMAND: string; // Apple command key + META: string; // alias for Windows key + + /** + * Simulate pressing many keys at once in a 'chord'. Takes a sequence of + * keys or strings, appends each of the values to a string, + * and adds the chord termination key ({@link Key.NULL}) and returns + * the resulting string. + * + * Note: when the low-level webdriver key handlers see Keys.NULL, active + * modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event. + * + * @param {...string} var_args The key sequence to concatenate. + * @return {string} The null-terminated key sequence. + */ + chord(...var_args: Array): string; +} + +/** + * Representations of pressable keys that aren't text. These are stored in + * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to + * http://www.google.com.au/search?&q=unicode+pua&btnG=Search + */ +export const Key: IKey; + +/** + * Class for defining sequences of complex user interactions. Each sequence + * will not be executed until {@link #perform} is called. + * + * Example: + * + * new ActionSequence(driver). + * keyDown(Key.SHIFT). + * click(element1). + * click(element2). + * dragAndDrop(element3, element4). + * keyUp(Key.SHIFT). + * perform(); + */ +export class ActionSequence { + // region Constructors + + /** + * @param {!WebDriver} driver The driver instance to use. + */ + constructor(driver: WebDriver); + + // endregion + + // region Methods + + /** + * Executes this action sequence. + * @return {!promise.Promise} A promise that will be resolved once + * this sequence has completed. + */ + perform(): promise.Promise; + + /** + * Moves the mouse. The location to move to may be specified in terms of the + * mouse's current location, an offset relative to the top-left corner of an + * element, or an element (in which case the middle of the element is used). + * + * @param {(!./WebElement|{x: number, y: number})} location The + * location to drag to, as either another WebElement or an offset in + * pixels. + * @param {{x: number, y: number}=} opt_offset If the target {@code location} + * is defined as a {@link ./WebElement}, this parameter defines + * an offset within that element. The offset should be specified in pixels + * relative to the top-left corner of the element's bounding box. If + * omitted, the element's center will be used as the target offset. + * @return {!ActionSequence} A self reference. + */ + mouseMove(location: WebElement | ILocation, opt_offset?: ILocation): ActionSequence; + + /** + * Presses a mouse button. The mouse button will not be released until + * {@link #mouseUp} is called, regardless of whether that call is made in this + * sequence or another. The behavior for out-of-order events (e.g. mouseDown, + * click) is undefined. + * + * If an element is provided, the mouse will first be moved to the center + * of that element. This is equivalent to: + * + * sequence.mouseMove(element).mouseDown() + * + * Warning: this method currently only supports the left mouse button. See + * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047). + * + * @param {(./WebElement|input.Button)=} opt_elementOrButton Either + * the element to interact with or the button to click with. + * Defaults to {@link input.Button.LEFT} if neither an element nor + * button is specified. + * @param {input.Button=} opt_button The button to use. Defaults to + * {@link input.Button.LEFT}. Ignored if a button is provided as the + * first argument. + * @return {!ActionSequence} A self reference. + */ + mouseDown(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; + + /** + * Releases a mouse button. Behavior is undefined for calling this function + * without a previous call to {@link #mouseDown}. + * + * If an element is provided, the mouse will first be moved to the center + * of that element. This is equivalent to: + * + * sequence.mouseMove(element).mouseUp() + * + * Warning: this method currently only supports the left mouse button. See + * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047). + * + * @param {(./WebElement|input.Button)=} opt_elementOrButton Either + * the element to interact with or the button to click with. + * Defaults to {@link input.Button.LEFT} if neither an element nor + * button is specified. + * @param {input.Button=} opt_button The button to use. Defaults to + * {@link input.Button.LEFT}. Ignored if a button is provided as the + * first argument. + * @return {!ActionSequence} A self reference. + */ + mouseUp(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; + + /** + * Convenience function for performing a 'drag and drop' manuever. The target + * element may be moved to the location of another element, or by an offset (in + * pixels). + * + * @param {!./WebElement} element The element to drag. + * @param {(!./WebElement|{x: number, y: number})} location The + * location to drag to, either as another WebElement or an offset in + * pixels. + * @return {!ActionSequence} A self reference. + */ + dragAndDrop(element: WebElement, location: WebElement | ILocation): ActionSequence; + + /** + * Clicks a mouse button. + * + * If an element is provided, the mouse will first be moved to the center + * of that element. This is equivalent to: + * + * sequence.mouseMove(element).click() + * + * @param {(./WebElement|input.Button)=} opt_elementOrButton Either + * the element to interact with or the button to click with. + * Defaults to {@link input.Button.LEFT} if neither an element nor + * button is specified. + * @param {input.Button=} opt_button The button to use. Defaults to + * {@link input.Button.LEFT}. Ignored if a button is provided as the + * first argument. + * @return {!ActionSequence} A self reference. + */ + click(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; + + /** + * Double-clicks a mouse button. + * + * If an element is provided, the mouse will first be moved to the center of + * that element. This is equivalent to: + * + * sequence.mouseMove(element).doubleClick() + * + * Warning: this method currently only supports the left mouse button. See + * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047). + * + * @param {(./WebElement|input.Button)=} opt_elementOrButton Either + * the element to interact with or the button to click with. + * Defaults to {@link input.Button.LEFT} if neither an element nor + * button is specified. + * @param {input.Button=} opt_button The button to use. Defaults to + * {@link input.Button.LEFT}. Ignored if a button is provided as the + * first argument. + * @return {!ActionSequence} A self reference. + */ + doubleClick(opt_elementOrButton?: WebElement | string, opt_button?: string): ActionSequence; + + /** + * Performs a modifier key press. The modifier key is not released + * until {@link #keyUp} or {@link #sendKeys} is called. The key press will be + * targetted at the currently focused element. + * @param {!Key} key The modifier key to push. Must be one of + * {ALT, CONTROL, SHIFT, COMMAND, META}. + * @return {!ActionSequence} A self reference. + * @throws {Error} If the key is not a valid modifier key. + */ + keyDown(key: string): ActionSequence; + + /** + * Performs a modifier key release. The release is targetted at the currently + * focused element. + * @param {!Key} key The modifier key to release. Must be one of + * {ALT, CONTROL, SHIFT, COMMAND, META}. + * @return {!ActionSequence} A self reference. + * @throws {Error} If the key is not a valid modifier key. + */ + keyUp(key: string): ActionSequence; + + /** + * Simulates typing multiple keys. Each modifier key encountered in the + * sequence will not be released until it is encountered again. All key events + * will be targeted at the currently focused element. + * + * @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args + * The keys to type. + * @return {!ActionSequence} A self reference. + * @throws {Error} If the key is not a valid modifier key. + */ + sendKeys(...var_args: Array>): ActionSequence; + + // endregion +} + +/** + * Class for defining sequences of user touch interactions. Each sequence + * will not be executed until {@link #perform} is called. + * + * Example: + * + * new TouchSequence(driver). + * tapAndHold({x: 0, y: 0}). + * move({x: 3, y: 4}). + * release({x: 10, y: 10}). + * perform(); + */ +export class TouchSequence { + /* + * @param {!WebDriver} driver The driver instance to use. + * @constructor + */ + constructor(driver: WebDriver); + + /** + * Executes this action sequence. + * @return {!promise.Promise} A promise that will be resolved once + * this sequence has completed. + */ + perform(): promise.Promise; + + /** + * Taps an element. + * + * @param {!WebElement} elem The element to tap. + * @return {!TouchSequence} A self reference. + */ + tap(elem: WebElement): TouchSequence; + + /** + * Double taps an element. + * + * @param {!WebElement} elem The element to double tap. + * @return {!TouchSequence} A self reference. + */ + doubleTap(elem: WebElement): TouchSequence; + + /** + * Long press on an element. + * + * @param {!WebElement} elem The element to long press. + * @return {!TouchSequence} A self reference. + */ + longPress(elem: WebElement): TouchSequence; + + /** + * Touch down at the given location. + * + * @param {{ x: number, y: number }} location The location to touch down at. + * @return {!TouchSequence} A self reference. + */ + tapAndHold(location: ILocation): TouchSequence; + + /** + * Move a held {@linkplain #tapAndHold touch} to the specified location. + * + * @param {{x: number, y: number}} location The location to move to. + * @return {!TouchSequence} A self reference. + */ + move(location: ILocation): TouchSequence; + + /** + * Release a held {@linkplain #tapAndHold touch} at the specified location. + * + * @param {{x: number, y: number}} location The location to release at. + * @return {!TouchSequence} A self reference. + */ + release(location: ILocation): TouchSequence; + + /** + * Scrolls the touch screen by the given offset. + * + * @param {{x: number, y: number}} offset The offset to scroll to. + * @return {!TouchSequence} A self reference. + */ + scroll(offset: IOffset): TouchSequence; + + /** + * Scrolls the touch screen, starting on `elem` and moving by the specified + * offset. + * + * @param {!WebElement} elem The element where scroll starts. + * @param {{x: number, y: number}} offset The offset to scroll to. + * @return {!TouchSequence} A self reference. + */ + scrollFromElement(elem: WebElement, offset: IOffset): TouchSequence; + + /** + * Flick, starting anywhere on the screen, at speed xspeed and yspeed. + * + * @param {{xspeed: number, yspeed: number}} speed The speed to flick in each + direction, in pixels per second. + * @return {!TouchSequence} A self reference. + */ + flick(speed: ISpeed): TouchSequence; + + /** + * Flick starting at elem and moving by x and y at specified speed. + * + * @param {!WebElement} elem The element where flick starts. + * @param {{x: number, y: number}} offset The offset to flick to. + * @param {number} speed The speed to flick at in pixels per second. + * @return {!TouchSequence} A self reference. + */ + flickElement(elem: WebElement, offset: IOffset, speed: number): TouchSequence; +} + +export interface IOffset { + x: number; + y: number; +} + +export interface ISpeed { + xspeed: number; + yspeed: number; +} + +/** + * Represents a modal dialog such as {@code alert}, {@code confirm}, or + * {@code prompt}. Provides functions to retrieve the message displayed with + * the alert, accept or dismiss the alert, and set the response text (in the + * case of {@code prompt}). + */ +export class Alert { + /** + * @param {!WebDriver} driver The driver controlling the browser this alert + * is attached to. + * @param {string} text The message text displayed with this alert. + */ + constructor(driver: WebDriver, text: string); + + // region Methods + + /** + * Retrieves the message text displayed with this alert. For instance, if the + * alert were opened with alert('hello'), then this would return 'hello'. + * @return {!promise.Promise} A promise that will be resolved to the + * text displayed with this alert. + */ + getText(): promise.Promise; + + /** + * Sets the username and password in an alert prompting for credentials (such + * as a Basic HTTP Auth prompt). This method will implicitly + * {@linkplain #accept() submit} the dialog. + * + * @param {string} username The username to send. + * @param {string} password The password to send. + * @return {!promise.Promise} A promise that will be resolved when this + * command has completed. + */ + authenticateAs(username: string, password: string): promise.Promise; + + /** + * Accepts this alert. + * @return {!promise.Promise} A promise that will be resolved when + * this command has completed. + */ + accept(): promise.Promise; + + /** + * Dismisses this alert. + * @return {!promise.Promise} A promise that will be resolved when + * this command has completed. + */ + dismiss(): promise.Promise; + + /** + * Sets the response text on this alert. This command will return an error if + * the underlying alert does not support response text (e.g. window.alert and + * window.confirm). + * @param {string} text The text to set. + * @return {!promise.Promise} A promise that will be resolved when + * this command has completed. + */ + sendKeys(text: string): promise.Promise; + + // endregion +} + +/** + * AlertPromise is a promise that will be fulfilled with an Alert. This promise + * serves as a forward proxy on an Alert, allowing calls to be scheduled + * directly on this instance before the underlying Alert has been fulfilled. In + * other words, the following two statements are equivalent: + * + * driver.switchTo().alert().dismiss(); + * driver.switchTo().alert().then(function(alert) { + * return alert.dismiss(); + * }); + * + * @final + */ +export interface AlertPromise extends promise.IThenable {} +export class AlertPromise extends Alert { + /** + * @param {!WebDriver} driver The driver controlling the browser this + * alert is attached to. + * @param {!promise.Thenable} alert A thenable + * that will be fulfilled with the promised alert. + */ + constructor(driver: WebDriver, alert: promise.Promise); +} + +/** + * Recognized browser names. + */ +export interface IBrowser { + ANDROID: string; + CHROME: string; + EDGE: string; + FIREFOX: string; + IE: string; + INTERNET_EXPLORER: string; + IPAD: string; + IPHONE: string; + OPERA: string; + PHANTOM_JS: string; + SAFARI: string; + HTMLUNIT: string; +} + +export const Browser: IBrowser; + +export interface ProxyConfig { + proxyType: string; + proxyAutoconfigUrl?: string | undefined; + ftpProxy?: string | undefined; + httpProxy?: string | undefined; + sslProxy?: string | undefined; + noProxy?: string | undefined; + socksProxy?: string | undefined; + socksUsername?: string | undefined; + socksPassword?: string | undefined; +} + +/** + * Creates new {@link WebDriver WebDriver} instances. The environment + * variables listed below may be used to override a builder's configuration, + * allowing quick runtime changes. + * + * - {@code SELENIUM_BROWSER}: defines the target browser in the form + * {@code browser[:version][:platform]}. + * + * - {@code SELENIUM_REMOTE_URL}: defines the remote URL for all builder + * instances. This environment variable should be set to a fully qualified + * URL for a WebDriver server (e.g. http://localhost:4444/wd/hub). This + * option always takes precedence over {@code SELENIUM_SERVER_JAR}. + * + * - {@code SELENIUM_SERVER_JAR}: defines the path to the + * + * standalone Selenium server jar to use. The server will be started the + * first time a WebDriver instance and be killed when the process exits. + * + * Suppose you had mytest.js that created WebDriver with + * + * var driver = new Builder() + * .forBrowser('chrome') + * .build(); + * + * This test could be made to use Firefox on the local machine by running with + * `SELENIUM_BROWSER=firefox node mytest.js`. Rather than change the code to + * target Google Chrome on a remote machine, you can simply set the + * `SELENIUM_BROWSER` and `SELENIUM_REMOTE_URL` environment variables: + * + * SELENIUM_BROWSER=chrome:36:LINUX \ + * SELENIUM_REMOTE_URL=http://www.example.com:4444/wd/hub \ + * node mytest.js + * + * You could also use a local copy of the standalone Selenium server: + * + * SELENIUM_BROWSER=chrome:36:LINUX \ + * SELENIUM_SERVER_JAR=/path/to/selenium-server-standalone.jar \ + * node mytest.js + */ +export class Builder { + // region Constructors + + /** */ + constructor(); + + // endregion + + // region Methods + + /** + * Configures this builder to ignore any environment variable overrides and to + * only use the configuration specified through this instance's API. + * + * @return {!Builder} A self reference. + */ + disableEnvironmentOverrides(): Builder; + + /** + * Creates a new WebDriver client based on this builder's current + * configuration. + * + * This method will return a {@linkplain ThenableWebDriver} instance, allowing + * users to issue commands directly without calling `then()`. The returned + * thenable wraps a promise that will resolve to a concrete + * {@linkplain webdriver.WebDriver WebDriver} instance. The promise will be + * rejected if the remote end fails to create a new session. + * + * @return {!ThenableWebDriver} A new WebDriver instance. + * @throws {Error} If the current configuration is invalid. + */ + build(): ThenableWebDriver; + + /** + * Configures the target browser for clients created by this instance. + * Any calls to {@link #withCapabilities} after this function will + * overwrite these settings. + * + *